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

Side by Side Diff: dart/pkg/shadow_dom/lib/shadow_dom.min.js

Issue 56933002: Version 0.8.10.1 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « dart/pkg/shadow_dom/lib/shadow_dom.debug.js ('k') | dart/sdk/lib/async/future_impl.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 if(!HTMLElement.prototype.createShadowRoot||window.__forceShadowDomPolyfill){!fu nction(){Element.prototype.webkitCreateShadowRoot&&(Element.prototype.webkitCrea teShadowRoot=function(){return window.ShadowDOMPolyfill.wrapIfNeeded(this).creat eShadowRoot()})}(),function(a){"use strict";function b(){function a(a){"splice"= ==a[0].type&&"splice"===a[1].type&&(b=!0)}if("function"!=typeof Object.observe|| "function"!=typeof Array.observe)return!1;var b=!1,c=[0];return Array.observe(c, a),c[1]=1,c.length=0,Object.deliverChangeRecords(a),b}function c(){if(a.document &&"securityPolicy"in a.document&&!a.document.securityPolicy.allowsEval)return!1; try{var b=new Function("","return true;");return b()}catch(c){return!1}}function d(a){return+a===a>>>0}function e(a){return+a}function f(a){return a===Object(a) }function g(a,b){return a===b?0!==a||1/a===1/b:H(a)&&H(b)?!0:a!==a&&b!==b}functi on h(a){return"string"!=typeof a?!1:(a=a.trim(),""==a?!0:"."==a[0]?!1:P.test(a)) }function i(a,b){if(b!==Q)throw Error("Use Path.get to retrieve path objects");r eturn""==a.trim()?this:d(a)?(this.push(a),this):(a.split(/\s*\.\s*/).filter(func tion(a){return a}).forEach(function(a){this.push(a)},this),G&&!F&&this.length&&( this.getValueFrom=this.compiledGetValueFromFn()),void 0)}function j(a){if(a inst anceof i)return a;null==a&&(a=""),"string"!=typeof a&&(a=String(a));var b=R[a];i f(b)return b;if(!h(a))return S;var b=new i(a,Q);return R[a]=b,b}function k(b){fo r(var c=0;T>c&&b.check();)b.report(),c++;a.testingExposeCycleCount&&(a.dirtyChec kCycleCount=c)}function l(a){for(var b in a)return!1;return!0}function m(a){retu rn l(a.added)&&l(a.removed)&&l(a.changed)}function n(a,b){var c={},d={},e={};for (var f in b){var g=a[f];(void 0===g||g!==b[f])&&(f in a?g!==b[f]&&(e[f]=g):d[f]= void 0)}for(var f in a)f in b||(c[f]=a[f]);return Array.isArray(a)&&a.length!==b .length&&(e.length=a.length),{added:c,removed:d,changed:e}}function o(a,b){var c =b||(Array.isArray(a)?[]:{});for(var d in a)c[d]=a[d];return Array.isArray(a)&&( c.length=a.length),c}function p(a,b,c,d){if(this.closed=!1,this.object=a,this.ca llback=b,this.target=c,this.token=d,this.reporting=!0,F){var e=this;this.boundIn ternalCallback=function(a){e.internalCallback(a)}}q(this)}function q(a){V&&(U.pu sh(a),p._allObserversCount++)}function r(a,b,c,d){p.call(this,a,b,c,d),this.conn ect(),this.sync(!0)}function s(a,b,c,d){if(!Array.isArray(a))throw Error("Provid ed object is not an Array");r.call(this,a,b,c,d)}function t(a){this.arr=[],this. callback=a,this.isObserved=!0}function u(a,b,c,d,e,g,h){var b=b instanceof i?b:j (b);return b&&b.length&&f(a)?(p.call(this,a,c,d,e),this.valueFn=g,this.setValueF n=h,this.path=b,this.connect(),this.sync(!0),void 0):(this.value_=b?b.getValueFr om(a):void 0,this.value=g?g(this.value_):this.value_,this.closed=!0,void 0)}func tion v(a,b,c,d){p.call(this,void 0,a,b,c),this.valueFn=d,this.observed=[],this.v alues=[],this.value=void 0,this.oldValue=void 0,this.oldValues=void 0,this.chang eFlags=void 0,this.started=!1}function w(a,b){if("function"==typeof Object.obser ve){var c=Object.getNotifier(a);return function(d,e){var f={object:a,type:d,name :b};2===arguments.length&&(f.oldValue=e),c.notify(f)}}}function x(a,b,c){for(var d={},e={},f=0;f<b.length;f++){var g=b[f];$[g.type]?(g.name in c||(c[g.name]=g.o ldValue),"updated"!=g.type&&("new"!=g.type?g.name in d?(delete d[g.name],delete c[g.name]):e[g.name]=!0:g.name in e?delete e[g.name]:d[g.name]=!0)):(console.err or("Unknown changeRecord type: "+g.type),console.error(g))}for(var h in d)d[h]=a [h];for(var h in e)e[h]=void 0;var i={};for(var h in c)if(!(h in d||h in e)){var j=a[h];c[h]!==j&&(i[h]=j)}return{added:d,removed:e,changed:i}}function y(a,b,c) {return{index:a,removed:b,addedCount:c}}function z(){}function A(a,b,c,d,e,f){re turn db.calcSplices(a,b,c,d,e,f)}function B(a,b,c,d){return c>b||a>d?-1:b==c||d= =a?0:c>a?d>b?b-c:d-c:b>d?d-a:b-a}function C(a,b,c,d){for(var e=y(b,c,d),f=!1,g=0 ,h=0;h<a.length;h++){var i=a[h];if(i.index+=g,!f){var j=B(e.index,e.index+e.remo ved.length,i.index,i.index+i.addedCount);if(j>=0){a.splice(h,1),h--,g-=i.addedCo unt-i.removed.length,e.addedCount+=i.addedCount-j;var k=e.removed.length+i.remov ed.length-j;if(e.addedCount||k){var c=i.removed;if(e.index<i.index){var l=e.remo ved.slice(0,i.index-e.index);Array.prototype.push.apply(l,c),c=l}if(e.index+e.re moved.length>i.index+i.addedCount){var m=e.removed.slice(i.index+i.addedCount-e. index);Array.prototype.push.apply(c,m)}e.removed=c,i.index<e.index&&(e.index=i.i ndex)}else f=!0}else if(e.index<i.index){f=!0,a.splice(h,0,e),h++;var n=e.addedC ount-e.removed.length;i.index+=n,g+=n}}}f||a.push(e)}function D(a,b){for(var c=[ ],f=0;f<b.length;f++){var g=b[f];switch(g.type){case"splice":C(c,g.index,g.remov ed.slice(),g.addedCount);break;case"new":case"updated":case"deleted":if(!d(g.nam e))continue;var h=e(g.name);if(0>h)continue;C(c,h,[g.oldValue],1);break;default: console.error("Unexpected record type: "+JSON.stringify(g))}}return c}function E (a,b){var c=[];return D(a,b).forEach(function(b){return 1==b.addedCount&&1==b.re moved.length?(b.removed[0]!==a[b.index]&&c.push(b),void 0):(c=c.concat(A(a,b.ind ex,b.index+b.addedCount,b.removed,0,b.removed.length)),void 0)}),c}var F=b(),G=c (),H=a.Number.isNaN||function(b){return"number"==typeof b&&a.isNaN(b)},I="__prot o__"in{}?function(a){return a}:function(a){var b=a.__proto__;if(!b)return a;var c=Object.create(b);return Object.getOwnPropertyNames(a).forEach(function(b){Obje ct.defineProperty(c,b,Object.getOwnPropertyDescriptor(a,b))}),c},J="[$_a-zA-Z]", K="[$_a-zA-Z0-9]",L=J+"+"+K+"*",M="(?:[0-9]|[1-9]+[0-9]+)",N="(?:"+L+"|"+M+")",O ="(?:"+N+")(?:\\s*\\.\\s*"+N+")*",P=new RegExp("^"+O+"$"),Q={},R={};i.get=j,i.pr ototype=I({__proto__:[],valid:!0,toString:function(){return this.join(".")},getV alueFrom:function(a,b){for(var c=0;c<this.length;c++){if(null==a)return;b&&b.obs erve(a),a=a[this[c]]}return a},compiledGetValueFromFn:function(){var a=this.map( function(a){return d(a)?'["'+a+'"]':"."+a}),b="",c="obj";b+="if (obj != null";fo r(var e=0;e<this.length-1;e++)this[e],c+=a[e],b+=" &&\n "+c+" != null";retur n b+=")\n",c+=a[e],b+=" return "+c+";\nelse\n return undefined;",new Function( "obj",b)},setValueFrom:function(a,b){if(!this.length)return!1;for(var c=0;c<this .length-1;c++){if(!f(a))return!1;a=a[this[c]]}return f(a)?(a[this[c]]=b,!0):!1}} );var S=new i("",Q);S.valid=!1,S.getValueFrom=S.setValueFrom=function(){};var T= 1e3;p.prototype={internalCallback:function(a){this.closed||this.reporting&&this. check(a)&&(this.report(),this.testingResults&&(this.testingResults.anyChanged=!0 ))},close:function(){this.closed||(this.object&&"function"==typeof this.object.c lose&&this.object.close(),this.disconnect(),this.object=void 0,this.closed=!0)}, deliver:function(a){this.closed||(F?(this.testingResults=a,Object.deliverChangeR ecords(this.boundInternalCallback),this.testingResults=void 0):k(this))},report: function(){this.reporting&&(this.sync(!1),this.callback&&(this.reportArgs.push(t his.token),this.invokeCallback(this.reportArgs)),this.reportArgs=void 0)},invoke Callback:function(a){try{this.callback.apply(this.target,a)}catch(b){p._errorThr ownDuringCallback=!0,console.error("Exception caught during observer callback: " +(b.stack||b))}},reset:function(){this.closed||(F&&(this.reporting=!1,Object.del iverChangeRecords(this.boundInternalCallback),this.reporting=!0),this.sync(!0))} };var U,V=!F||a.forceCollectObservers;p._allObserversCount=0,V&&(U=[]);var W=!1, X="function"==typeof Object.deliverAllChangeRecords;a.Platform=a.Platform||{},a. Platform.performMicrotaskCheckpoint=function(){if(!W){if(X)return Object.deliver AllChangeRecords(),void 0;if(V){W=!0;var b=0,c={};do{b++;var d=U;U=[],c.anyChang ed=!1;for(var e=0;e<d.length;e++){var f=d[e];f.closed||(F?f.deliver(c):f.check() &&(c.anyChanged=!0,f.report()),U.push(f))}}while(T>b&&c.anyChanged);a.testingExp oseCycleCount&&(a.dirtyCheckCycleCount=b),p._allObserversCount=U.length,W=!1}}}, V&&(a.Platform.clearObservers=function(){U=[]}),r.prototype=I({__proto__:p.proto type,connect:function(){F&&Object.observe(this.object,this.boundInternalCallback )},sync:function(){F||(this.oldObject=o(this.object))},check:function(a){var b,c ;if(F){if(!a)return!1;c={},b=x(this.object,a,c)}else c=this.oldObject,b=n(this.o bject,this.oldObject);return m(b)?!1:(this.reportArgs=[b.added||{},b.removed||{} ,b.changed||{}],this.reportArgs.push(function(a){return c[a]}),!0)},disconnect:f unction(){F?this.object&&Object.unobserve(this.object,this.boundInternalCallback ):this.oldObject=void 0}}),s.prototype=I({__proto__:r.prototype,connect:function (){F&&Array.observe(this.object,this.boundInternalCallback)},sync:function(){F|| (this.oldObject=this.object.slice())},check:function(a){var b;if(F){if(!a)return !1;b=E(this.object,a)}else b=A(this.object,0,this.object.length,this.oldObject,0 ,this.oldObject.length);return b&&b.length?(this.reportArgs=[b],!0):!1}}),s.appl ySplices=function(a,b,c){c.forEach(function(c){for(var d=[c.index,c.removed.leng th],e=c.index;e<c.index+c.addedCount;)d.push(b[e]),e++;Array.prototype.splice.ap ply(a,d)})};var Y=Object.getPrototypeOf({}),Z=Object.getPrototypeOf([]);t.protot ype={reset:function(){this.isObserved=!this.isObserved},observe:function(a){if(f (a)&&a!==Y&&a!==Z){var b=this.arr.indexOf(a);b>=0&&this.arr[b+1]===this.isObserv ed||(0>b&&(b=this.arr.length,this.arr[b]=a,Object.observe(a,this.callback)),this .arr[b+1]=this.isObserved,this.observe(Object.getPrototypeOf(a)))}},cleanup:func tion(){for(var a=0,b=0,c=this.isObserved;b<this.arr.length;){var d=this.arr[b];t his.arr[b+1]==c?(b>a&&(this.arr[a]=d,this.arr[a+1]=c),a+=2):Object.unobserve(d,t his.callback),b+=2}this.arr.length=a}},u.prototype=I({__proto__:p.prototype,conn ect:function(){F&&(this.observedSet=new t(this.boundInternalCallback))},disconne ct:function(){this.value=void 0,this.value_=void 0,this.observedSet&&(this.obser vedSet.reset(),this.observedSet.cleanup(),this.observedSet=void 0)},check:functi on(){return this.observedSet&&this.observedSet.reset(),this.value_=this.path.get ValueFrom(this.object,this.observedSet),this.observedSet&&this.observedSet.clean up(),g(this.value_,this.oldValue_)?!1:(this.value=this.valueFn?this.valueFn(this .value_):this.value_,this.reportArgs=[this.value,this.oldValue],!0)},sync:functi on(a){a&&(this.observedSet&&this.observedSet.reset(),this.value_=this.path.getVa lueFrom(this.object,this.observedSet),this.value=this.valueFn?this.valueFn(this. value_):this.value_,this.observedSet&&this.observedSet.cleanup()),this.oldValue_ =this.value_,this.oldValue=this.value},setValue:function(a){this.path&&("functio n"==typeof this.setValueFn&&(a=this.setValueFn(a)),this.path.setValueFrom(this.o bject,a))}}),v.prototype=I({__proto__:u.prototype,addPath:function(a,b){if(this. started)throw Error("Cannot add more paths once started.");var b=b instanceof i? b:j(b),c=b?b.getValueFrom(a):void 0;this.observed.push(a,b),this.values.push(c)} ,start:function(){this.started=!0,this.connect(),this.sync(!0)},getValues:functi on(){this.observedSet&&this.observedSet.reset();for(var a=!1,b=0;b<this.observed .length;b+=2){var c=this.observed[b+1];if(c){var d=this.observed[b],e=c.getValue From(d,this.observedSet),f=this.values[b/2];if(!g(e,f)){if(!a&&!this.valueFn){th is.oldValues=this.oldValues||[],this.changeFlags=this.changeFlags||[];for(var h= 0;h<this.values.length;h++)this.oldValues[h]=this.values[h],this.changeFlags[h]= !1}this.valueFn||(this.changeFlags[b/2]=!0),this.values[b/2]=e,a=!0}}}return thi s.observedSet&&this.observedSet.cleanup(),a},check:function(){if(this.getValues( )){if(this.valueFn){if(this.value=this.valueFn(this.values),g(this.value,this.ol dValue))return!1;this.reportArgs=[this.value,this.oldValue]}else this.reportArgs =[this.values,this.oldValues,this.changeFlags,this.observed];return!0}},sync:fun ction(a){a&&(this.getValues(),this.valueFn&&(this.value=this.valueFn(this.values ))),this.valueFn&&(this.oldValue=this.value)},close:function(){if(this.observed) {for(var a=0;a<this.observed.length;a+=2){var b=this.observed[a];b&&"function"== typeof b.close&&b.close()}this.observed=void 0,this.values=void 0}p.prototype.cl ose.call(this)}});var $={"new":!0,updated:!0,deleted:!0};u.defineProperty=functi on(a,b,c){var d=c.object,e=j(c.path),f=w(a,b),g=new u(d,c.path,function(a,b){f&& f("updated",b)});return Object.defineProperty(a,b,{get:function(){return e.getVa lueFrom(d)},set:function(a){e.setValueFrom(d,a)},configurable:!0}),{close:functi on(){var c=e.getValueFrom(d);f&&g.deliver(),g.close(),Object.defineProperty(a,b, {value:c,writable:!0,configurable:!0})}}};var _=0,ab=1,bb=2,cb=3;z.prototype={ca lcEditDistances:function(a,b,c,d,e,f){for(var g=f-e+1,h=c-b+1,i=new Array(g),j=0 ;g>j;j++)i[j]=new Array(h),i[j][0]=j;for(var k=0;h>k;k++)i[0][k]=k;for(var j=1;g >j;j++)for(var k=1;h>k;k++)if(this.equals(a[b+k-1],d[e+j-1]))i[j][k]=i[j-1][k-1] ;else{var l=i[j-1][k]+1,m=i[j][k-1]+1;i[j][k]=m>l?l:m}return i},spliceOperations FromEditDistances:function(a){for(var b=a.length-1,c=a[0].length-1,d=a[b][c],e=[ ];b>0||c>0;)if(0!=b)if(0!=c){var f,g=a[b-1][c-1],h=a[b-1][c],i=a[b][c-1];f=i>h?g >h?h:g:g>i?i:g,f==g?(g==d?e.push(_):(e.push(ab),d=g),b--,c--):f==h?(e.push(cb),b --,d=h):(e.push(bb),c--,d=i)}else e.push(cb),b--;else e.push(bb),c--;return e.re verse(),e},calcSplices:function(a,b,c,d,e,f){var g=0,h=0,i=Math.min(c-b,f-e);if( 0==b&&0==e&&(g=this.sharedPrefix(a,d,i)),c==a.length&&f==d.length&&(h=this.share dSuffix(a,d,i-g)),b+=g,e+=g,c-=h,f-=h,0==c-b&&0==f-e)return[];if(b==c){for(var j =y(b,[],0);f>e;)j.removed.push(d[e++]);return[j]}if(e==f)return[y(b,[],c-b)];for (var k=this.spliceOperationsFromEditDistances(this.calcEditDistances(a,b,c,d,e,f )),j=void 0,l=[],m=b,n=e,o=0;o<k.length;o++)switch(k[o]){case _:j&&(l.push(j),j= void 0),m++,n++;break;case ab:j||(j=y(m,[],0)),j.addedCount++,m++,j.removed.push (d[n]),n++;break;case bb:j||(j=y(m,[],0)),j.addedCount++,m++;break;case cb:j||(j =y(m,[],0)),j.removed.push(d[n]),n++}return j&&l.push(j),l},sharedPrefix:functio n(a,b,c){for(var d=0;c>d;d++)if(!this.equals(a[d],b[d]))return d;return c},share dSuffix:function(a,b,c){for(var d=a.length,e=b.length,f=0;c>f&&this.equals(a[--d ],b[--e]);)f++;return f},calculateSplices:function(a,b){return this.calcSplices( a,0,a.length,b,0,b.length)},equals:function(a,b){return a===b}};var db=new z;a.O bserver=p,a.Observer.hasObjectObserve=F,a.ArrayObserver=s,a.ArrayObserver.calcul ateSplices=function(a,b){return db.calculateSplices(a,b)},a.ArraySplice=z,a.Obje ctObserver=r,a.PathObserver=u,a.CompoundPathObserver=v,a.Path=i}("undefined"!=ty peof global&&global?global:this),"undefined"==typeof WeakMap&&!function(){var a= Object.defineProperty,b=Date.now()%1e9,c=function(){this.name="__st"+(1e9*Math.r andom()>>>0)+(b++ +"__")};c.prototype={set:function(b,c){var d=b[this.name];d&&d [0]===b?d[1]=c:a(b,this.name,{value:[b,c],writable:!0})},get:function(a){var b;r eturn(b=a[this.name])&&b[0]===a?b[1]:void 0},"delete":function(a){this.set(a,voi d 0)}},window.WeakMap=c}();var ShadowDOMPolyfill={};!function(a){"use strict";fu nction b(a){if(!a)throw new Error("Assertion failed")}function c(a,b){return Obj ect.getOwnPropertyNames(b).forEach(function(c){Object.defineProperty(a,c,Object. getOwnPropertyDescriptor(b,c))}),a}function d(a,b){return Object.getOwnPropertyN ames(b).forEach(function(c){switch(c){case"arguments":case"caller":case"length": case"name":case"prototype":case"toString":return}Object.defineProperty(a,c,Objec t.getOwnPropertyDescriptor(b,c))}),a}function e(a,b){for(var c=0;c<b.length;c++) if(b[c]in a)return b[c]}function f(a){var b=a.__proto__||Object.getPrototypeOf(a ),c=D.get(b);if(c)return c;var d=f(b),e=s(d);return p(b,e,a),e}function g(a,b){n (a,b,!0)}function h(a,b){n(b,a,!1)}function i(a){return/^on[a-z]+$/.test(a)}func tion j(a){return/^\w[a-zA-Z_0-9]*$/.test(a)}function k(a){return G&&j(a)?new Fun ction("return this.impl."+a):function(){return this.impl[a]}}function l(a){retur n G&&j(a)?new Function("v","this.impl."+a+" = v"):function(b){this.impl[a]=b}}fu nction m(a){return G&&j(a)?new Function("return this.impl."+a+".apply(this.impl, arguments)"):function(){return this.impl[a].apply(this.impl,arguments)}}functio n n(b,c,d){Object.getOwnPropertyNames(b).forEach(function(e){if(!(e in c)){J&&b. __lookupGetter__(e);var f;try{f=Object.getOwnPropertyDescriptor(b,e)}catch(g){f= K}var h,j;if(d&&"function"==typeof f.value)return c[e]=m(e),void 0;var n=i(e);h= n?a.getEventHandlerGetter(e):k(e),(f.writable||f.set)&&(j=n?a.getEventHandlerSet ter(e):l(e)),Object.defineProperty(c,e,{get:h,set:j,configurable:f.configurable, enumerable:f.enumerable})}})}function o(a,b,c){var e=a.prototype;p(e,b,c),d(b,a) }function p(a,c,d){var e=c.prototype;b(void 0===D.get(a)),D.set(a,c),E.set(e,a), g(a,e),d&&h(e,d)}function q(a,b){return D.get(b.prototype)===a}function r(a){var b=Object.getPrototypeOf(a),c=f(b),d=s(c);return p(b,d,a),d}function s(a){functi on b(b){a.call(this,b)}return b.prototype=Object.create(a.prototype),b.prototype .constructor=b,b}function t(a){return a instanceof F.EventTarget||a instanceof F .Event||a instanceof F.Range||a instanceof F.DOMImplementation||a instanceof F.C anvasRenderingContext2D||F.WebGLRenderingContext&&a instanceof F.WebGLRenderingC ontext}function u(a){return a instanceof N||a instanceof M||a instanceof O||a in stanceof P||a instanceof L||a instanceof Q||R&&a instanceof R}function v(a){retu rn null===a?null:(b(u(a)),a.polymerWrapper_||(a.polymerWrapper_=new(f(a))(a)))}f unction w(a){return null===a?null:(b(t(a)),a.impl)}function x(a){return a&&t(a)? w(a):a}function y(a){return a&&!t(a)?v(a):a}function z(a,c){null!==c&&(b(u(a)),b (void 0===c||t(c)),a.polymerWrapper_=c)}function A(a,b,c){Object.defineProperty( a.prototype,b,{get:c,configurable:!0,enumerable:!0})}function B(a,b){A(a,b,funct ion(){return v(this.impl[b])})}function C(a,b){a.forEach(function(a){b.forEach(f unction(b){a.prototype[b]=function(){var a=y(this);return a[b].apply(a,arguments )}})})}var D=new WeakMap,E=new WeakMap,F=Object.create(null),G=!("securityPolicy "in document)||document.securityPolicy.allowsEval;if(G)try{var H=new Function("" ,"return true;");G=H()}catch(I){}Object.getOwnPropertyNames(window);var J=/Firef ox/.test(navigator.userAgent),K={get:function(){},set:function(){},configurable: !0,enumerable:!0},L=window.DOMImplementation,M=window.Event,N=window.Node,O=wind ow.Window,P=window.Range,Q=window.CanvasRenderingContext2D,R=window.WebGLRenderi ngContext;a.assert=b,a.constructorTable=D,a.defineGetter=A,a.defineWrapGetter=B, a.forwardMethodsToWrapper=C,a.isWrapperFor=q,a.mixin=c,a.nativePrototypeTable=E, a.oneOf=e,a.registerObject=r,a.registerWrapper=o,a.rewrap=z,a.unwrap=w,a.unwrapI fNeeded=x,a.wrap=v,a.wrapIfNeeded=y,a.wrappers=F}(this.ShadowDOMPolyfill),functi on(a){"use strict";function b(a){return a instanceof O.ShadowRoot}function c(a){ var b=a.localName;return"content"===b||"shadow"===b}function d(a){return!!a.shad owRoot}function e(a){var b;return a.parentNode||(b=a.defaultView)&&N(b)||null}fu nction f(f,g,h){if(h.length)return h.shift();if(b(f))return j(f)||a.getHostForSh adowRoot(f);var i=a.eventParentsTable.get(f);if(i){for(var k=1;k<i.length;k++)h[ k-1]=i[k];return i[0]}if(g&&c(f)){var l=f.parentNode;if(l&&d(l))for(var m=a.getS hadowTrees(l),n=j(g),k=0;k<m.length;k++)if(m[k].contains(n))return n}return e(f) }function g(a){for(var d=[],e=a,g=[],i=[];e;){var j=null;if(c(e)){j=h(d);var k=d [d.length-1]||e;d.push(k)}else d.length||d.push(e);var l=d[d.length-1];g.push({t arget:l,currentTarget:e}),b(e)&&d.pop(),e=f(e,j,i)}return g}function h(a){for(va r b=a.length-1;b>=0;b--)if(!c(a[b]))return a[b];return null}function i(d,e){for( var g=[];d;){for(var i=[],j=e,l=void 0;j;){var n=null;if(i.length){if(c(j)&&(n=h (i),k(l))){var o=i[i.length-1];i.push(o)}}else i.push(j);if(m(j,d))return i[i.le ngth-1];b(j)&&i.pop(),l=j,j=f(j,n,g)}d=b(d)?a.getHostForShadowRoot(d):d.parentNo de}}function j(b){return a.insertionParentTable.get(b)}function k(a){return j(a) }function l(a){for(var b;b=a.parentNode;)a=b;return a}function m(a,b){return l(a )===l(b)}function n(b,c){if(b===c)return!0;if(b instanceof O.ShadowRoot){var d=a .getHostForShadowRoot(b);return n(l(d),c)}return!1}function o(){Z++}function p() {Z--}function q(b){if(!Q.get(b)){if(Q.set(b,!0),b instanceof $){if(Z)return}else a.renderAllPending();var c=N(b.target),d=N(b);return r(d,c)}}function r(a,b){va r c=g(b);return"load"===a.type&&2===c.length&&c[0].target instanceof O.Document& &c.shift(),Y.set(a,c),s(a,c)&&t(a,c)&&u(a,c),U.set(a,x.NONE),S.set(a,null),a.def aultPrevented}function s(a,b){for(var c,d=b.length-1;d>0;d--){var e=b[d].target, f=b[d].currentTarget;if(e!==f&&(c=x.CAPTURING_PHASE,!v(b[d],a,c)))return!1}retur n!0}function t(a,b){var c=x.AT_TARGET;return v(b[0],a,c)}function u(a,b){for(var c,d=a.bubbles,e=1;e<b.length;e++){var f=b[e].target,g=b[e].currentTarget;if(f== =g)c=x.AT_TARGET;else{if(!d||W.get(a))continue;c=x.BUBBLING_PHASE}if(!v(b[e],a,c ))return}}function v(a,b,c){var d=a.target,e=a.currentTarget,f=P.get(e);if(!f)re turn!0;if("relatedTarget"in b){var g=M(b);if(g.relatedTarget){var h=N(g.relatedT arget),j=i(e,h);if(j===d)return!0;T.set(b,j)}}U.set(b,c);var k=b.type,l=!1;R.set (b,d),S.set(b,e);for(var m=0;m<f.length;m++){var n=f[m];if(n.removed)l=!0;else i f(!(n.type!==k||!n.capture&&c===x.CAPTURING_PHASE||n.capture&&c===x.BUBBLING_PHA SE))try{if("function"==typeof n.handler?n.handler.call(e,b):n.handler.handleEven t(b),W.get(b))return!1}catch(o){window.onerror?window.onerror(o.message):console .error(o,o.stack)}}if(l){var p=f.slice();f.length=0;for(var m=0;m<p.length;m++)p [m].removed||f.push(p[m])}return!V.get(b)}function w(a,b,c){this.type=a,this.han dler=b,this.capture=Boolean(c)}function x(a,b){return a instanceof _?(this.impl= a,void 0):N(B(_,"Event",a,b))}function y(a){return a&&a.relatedTarget?Object.cre ate(a,{relatedTarget:{value:M(a.relatedTarget)}}):a}function z(a,b,c){var d=wind ow[a],e=function(b,c){return b instanceof d?(this.impl=b,void 0):N(B(d,a,b,c))}; return e.prototype=Object.create(b.prototype),c&&K(e.prototype,c),d&&(d.prototyp e["init"+a]?L(d,e,document.createEvent(a)):L(d,e,new d("temp"))),e}function A(a, b){return function(){arguments[b]=M(arguments[b]);var c=M(this);c[a].apply(c,arg uments)}}function B(a,b,c,d){if(jb)return new a(c,y(d));var e=M(document.createE vent(b)),f=ib[b],g=[c];return Object.keys(f).forEach(function(a){var b=null!=d&& a in d?d[a]:f[a];"relatedTarget"===a&&(b=M(b)),g.push(b)}),e["init"+b].apply(e,g ),e}function C(a){return"function"==typeof a?!0:a&&a.handleEvent}function D(a){t his.impl=a}function E(b){return b instanceof O.ShadowRoot&&(b=a.getHostForShadow Root(b)),M(b)}function F(a){J(a,mb)}function G(b,c,d,e){a.renderAllPending();for (var f=N(nb.call(c.impl,d,e)),h=g(f,this),i=0;i<h.length;i++){var j=h[i];if(j.cu rrentTarget===b)return j.target}return null}function H(a){return function(){var b=X.get(this);return b&&b[a]&&b[a].value||null}}function I(a){var b=a.slice(2);r eturn function(c){var d=X.get(this);d||(d=Object.create(null),X.set(this,d));var e=d[a];if(e&&this.removeEventListener(b,e.wrapped,!1),"function"==typeof c){var f=function(b){var d=c.call(this,b);d===!1?b.preventDefault():"onbeforeunload"== =a&&"string"==typeof d&&(b.returnValue=d)};this.addEventListener(b,f,!1),d[a]={v alue:c,wrapped:f}}}}var J=a.forwardMethodsToWrapper,K=a.mixin,L=a.registerWrappe r,M=a.unwrap,N=a.wrap,O=a.wrappers;new WeakMap;var P=new WeakMap,Q=new WeakMap,R =new WeakMap,S=new WeakMap,T=new WeakMap,U=new WeakMap,V=new WeakMap,W=new WeakM ap,X=new WeakMap,Y=new WeakMap,Z=0,$=window.MutationEvent;w.prototype={equals:fu nction(a){return this.handler===a.handler&&this.type===a.type&&this.capture===a. capture},get removed(){return null===this.handler},remove:function(){this.handle r=null}};var _=window.Event;x.prototype={get target(){return R.get(this)},get cu rrentTarget(){return S.get(this)},get eventPhase(){return U.get(this)},get path( ){var a=new O.NodeList,b=Y.get(this);if(b){for(var c=0,d=b.length-1,e=l(S.get(th is)),f=0;d>=f;f++){var g=b[f].currentTarget,h=l(g);n(e,h)&&(f!==d||g instanceof O.Node)&&(a[c++]=g)}a.length=c}return a},stopPropagation:function(){V.set(this,! 0)},stopImmediatePropagation:function(){V.set(this,!0),W.set(this,!0)}},L(_,x,do cument.createEvent("Event"));var ab=z("UIEvent",x),bb=z("CustomEvent",x),cb={get relatedTarget(){return T.get(this)||N(M(this).relatedTarget)}},db=K({initMouseE vent:A("initMouseEvent",14)},cb),eb=K({initFocusEvent:A("initFocusEvent",5)},cb) ,fb=z("MouseEvent",ab,db),gb=z("FocusEvent",ab,eb),hb=z("MutationEvent",x,{initM utationEvent:A("initMutationEvent",3),get relatedNode(){return N(this.impl.relat edNode)}}),ib=Object.create(null),jb=function(){try{new window.MouseEvent("click ")}catch(a){return!1}return!0}();if(!jb){var kb=function(a,b,c){if(c){var d=ib[c ];b=K(K({},d),b)}ib[a]=b};kb("Event",{bubbles:!1,cancelable:!1}),kb("CustomEvent ",{detail:null},"Event"),kb("UIEvent",{view:null,detail:0},"Event"),kb("MouseEve nt",{screenX:0,screenY:0,clientX:0,clientY:0,ctrlKey:!1,altKey:!1,shiftKey:!1,me taKey:!1,button:0,relatedTarget:null},"UIEvent"),kb("FocusEvent",{relatedTarget: null},"UIEvent")}var lb=window.EventTarget,mb=["addEventListener","removeEventLi stener","dispatchEvent"];[Node,Window].forEach(function(a){var b=a.prototype;mb. forEach(function(a){Object.defineProperty(b,a+"_",{value:b[a]})})}),D.prototype= {addEventListener:function(a,b,c){if(C(b)){var d=new w(a,b,c),e=P.get(this);if(e ){for(var f=0;f<e.length;f++)if(d.equals(e[f]))return}else e=[],P.set(this,e);e. push(d);var g=E(this);g.addEventListener_(a,q,!0)}},removeEventListener:function (a,b,c){c=Boolean(c);var d=P.get(this);if(d){for(var e=0,f=!1,g=0;g<d.length;g++ )d[g].type===a&&d[g].capture===c&&(e++,d[g].handler===b&&(f=!0,d[g].remove()));i f(f&&1===e){var h=E(this);h.removeEventListener_(a,q,!0)}}},dispatchEvent:functi on(a){var b=E(this),c=M(a);return Q.set(c,!1),b.dispatchEvent_(c)}},lb&&L(lb,D); var nb=document.elementFromPoint;a.adjustRelatedTarget=i,a.elementFromPoint=G,a. getEventHandlerGetter=H,a.getEventHandlerSetter=I,a.muteMutationEvents=o,a.unmut eMutationEvents=p,a.wrapEventTargetMethods=F,a.wrappers.CustomEvent=bb,a.wrapper s.Event=x,a.wrappers.EventTarget=D,a.wrappers.FocusEvent=gb,a.wrappers.MouseEven t=fb,a.wrappers.MutationEvent=hb,a.wrappers.UIEvent=ab}(this.ShadowDOMPolyfill), function(a){"use strict";function b(a,b){Object.defineProperty(a,b,{enumerable:! 1})}function c(){this.length=0,b(this,"length")}function d(a){if(null==a)return a;for(var b=new c,d=0,e=a.length;e>d;d++)b[d]=f(a[d]);return b.length=e,b}functi on e(a,b){a.prototype[b]=function(){return d(this.impl[b].apply(this.impl,argume nts))}}var f=a.wrap;c.prototype={item:function(a){return this[a]}},b(c.prototype ,"item"),a.wrappers.NodeList=c,a.addWrapNodeListMethod=e,a.wrapNodeList=d}(this. ShadowDOMPolyfill),function(a){"use strict";function b(a){o(a instanceof k)}func tion c(a,b,c,d){if(!(a instanceof DocumentFragment))return a.parentNode&&a.paren tNode.removeChild(a),a.parentNode_=b,a.previousSibling_=c,a.nextSibling_=d,c&&(c .nextSibling_=a),d&&(d.previousSibling_=a),[a];for(var e,f=[];e=a.firstChild;)a. removeChild(e),f.push(e),e.parentNode_=b;for(var g=0;g<f.length;g++)f[g].previou sSibling_=f[g-1]||c,f[g].nextSibling_=f[g+1]||d;return c&&(c.nextSibling_=f[0]), d&&(d.previousSibling_=f[f.length-1]),f}function d(a){if(a instanceof DocumentFr agment){for(var b=[],c=0,d=a.firstChild;d;d=d.nextSibling)b[c++]=d;return b}retu rn[a]}function e(a){for(var b=0;b<a.length;b++)a[b].nodeWasAdded_()}function f(a ,b){var c=a.nodeType===k.DOCUMENT_NODE?a:a.ownerDocument;c!==b.ownerDocument&&c. adoptNode(b)}function g(b,c){if(c.length){var d=b.ownerDocument;if(d!==c[0].owne rDocument)for(var e=0;e<c.length;e++)a.adoptNodeNoRemove(c[e],d)}}function h(a,b ){g(a,b);var c=b.length;if(1===c)return r(b[0]);for(var d=r(a.ownerDocument.crea teDocumentFragment()),e=0;c>e;e++)d.appendChild(r(b[e]));return d}function i(a){ if(a.invalidateShadowRenderer()){for(var b=a.firstChild;b;){o(b.parentNode===a); var c=b.nextSibling,d=r(b),e=d.parentNode;e&&y.call(e,d),b.previousSibling_=b.ne xtSibling_=b.parentNode_=null,b=c}a.firstChild_=a.lastChild_=null}else for(var c ,f=r(a),g=f.firstChild;g;)c=g.nextSibling,y.call(f,g),g=c}function j(a){var b=a. parentNode;return b&&b.invalidateShadowRenderer()}function k(a){o(a instanceof u ),l.call(this,a),this.parentNode_=void 0,this.firstChild_=void 0,this.lastChild_ =void 0,this.nextSibling_=void 0,this.previousSibling_=void 0}var l=a.wrappers.E ventTarget,m=a.wrappers.NodeList,n=a.defineWrapGetter,o=a.assert,p=a.mixin,q=a.r egisterWrapper,r=a.unwrap,s=a.wrap,t=a.wrapIfNeeded,u=window.Node,v=u.prototype. appendChild,w=u.prototype.insertBefore,x=u.prototype.replaceChild,y=u.prototype. removeChild,z=u.prototype.compareDocumentPosition;k.prototype=Object.create(l.pr ototype),p(k.prototype,{appendChild:function(a){b(a);var g;if(this.invalidateSha dowRenderer()||j(a)){var i=this.lastChild,k=null;g=c(a,this,i,k),this.lastChild_ =g[g.length-1],i||(this.firstChild_=g[0]),v.call(this.impl,h(this,g))}else g=d(a ),f(this,a),v.call(this.impl,r(a));return e(g),a},insertBefore:function(a,i){if( !i)return this.appendChild(a);b(a),b(i),o(i.parentNode===this);var k;if(this.inv alidateShadowRenderer()||j(a)){var l=i.previousSibling,m=i;k=c(a,this,l,m),this. firstChild===i&&(this.firstChild_=k[0]);var n=r(i),p=n.parentNode;p?w.call(p,h(t his,k),n):g(this,k)}else k=d(a),f(this,a),w.call(this.impl,r(a),r(i));return e(k ),a},removeChild:function(a){if(b(a),a.parentNode!==this)throw new Error("NotFou ndError");var c=r(a);if(this.invalidateShadowRenderer()){var d=this.firstChild,e =this.lastChild,f=a.nextSibling,g=a.previousSibling,h=c.parentNode;h&&y.call(h,c ),d===a&&(this.firstChild_=f),e===a&&(this.lastChild_=g),g&&(g.nextSibling_=f),f &&(f.previousSibling_=g),a.previousSibling_=a.nextSibling_=a.parentNode_=void 0} else y.call(this.impl,c);return a},replaceChild:function(a,g){if(b(a),b(g),g.par entNode!==this)throw new Error("NotFoundError");var i,k=r(g);if(this.invalidateS hadowRenderer()||j(a)){var l=g.previousSibling,m=g.nextSibling;m===a&&(m=a.nextS ibling),i=c(a,this,l,m),this.firstChild===g&&(this.firstChild_=i[0]),this.lastCh ild===g&&(this.lastChild_=i[i.length-1]),g.previousSibling_=g.nextSibling_=g.par entNode_=void 0,k.parentNode&&x.call(k.parentNode,h(this,i),k)}else i=d(a),f(thi s,a),x.call(this.impl,r(a),k);return e(i),g},nodeWasAdded_:function(){for(var a= this.firstChild;a;a=a.nextSibling)a.nodeWasAdded_()},hasChildNodes:function(){re turn null!==this.firstChild},get parentNode(){return void 0!==this.parentNode_?t his.parentNode_:s(this.impl.parentNode)},get firstChild(){return void 0!==this.f irstChild_?this.firstChild_:s(this.impl.firstChild)},get lastChild(){return void 0!==this.lastChild_?this.lastChild_:s(this.impl.lastChild)},get nextSibling(){r eturn void 0!==this.nextSibling_?this.nextSibling_:s(this.impl.nextSibling)},get previousSibling(){return void 0!==this.previousSibling_?this.previousSibling_:s (this.impl.previousSibling)},get parentElement(){for(var a=this.parentNode;a&&a. nodeType!==k.ELEMENT_NODE;)a=a.parentNode;return a},get textContent(){for(var a= "",b=this.firstChild;b;b=b.nextSibling)a+=b.textContent;return a},set textConten t(a){if(this.invalidateShadowRenderer()){if(i(this),""!==a){var b=this.impl.owne rDocument.createTextNode(a);this.appendChild(b)}}else this.impl.textContent=a},g et childNodes(){for(var a=new m,b=0,c=this.firstChild;c;c=c.nextSibling)a[b++]=c ;return a.length=b,a},cloneNode:function(a){if(!this.invalidateShadowRenderer()) return s(this.impl.cloneNode(a));var b=s(this.impl.cloneNode(!1));if(a)for(var c =this.firstChild;c;c=c.nextSibling)b.appendChild(c.cloneNode(!0));return b},cont ains:function(a){if(!a)return!1;if(a=t(a),a===this)return!0;var b=a.parentNode;r eturn b?this.contains(b):!1},compareDocumentPosition:function(a){return z.call(t his.impl,r(a))}}),n(k,"ownerDocument"),q(u,k,document.createDocumentFragment()), delete k.prototype.querySelector,delete k.prototype.querySelectorAll,k.prototype =p(Object.create(l.prototype),k.prototype),a.wrappers.Node=k}(this.ShadowDOMPoly fill),function(a){"use strict";function b(a,c){for(var d,e=a.firstElementChild;e ;){if(e.matches(c))return e; 1 if(!HTMLElement.prototype.createShadowRoot||window.__forceShadowDomPolyfill){!fu nction(){Element.prototype.webkitCreateShadowRoot&&(Element.prototype.webkitCrea teShadowRoot=function(){return window.ShadowDOMPolyfill.wrapIfNeeded(this).creat eShadowRoot()})}(),function(a){"use strict";function b(){function a(a){b=a}if("f unction"!=typeof Object.observe||"function"!=typeof Array.observe)return!1;var b =[],c={};if(Object.observe(c,a),c.id=1,c.id=2,delete c.id,Object.deliverChangeRe cords(a),3!==b.length)return!1;if("new"==b[0].type&&"updated"==b[1].type&&"delet ed"==b[2].type)F="new",G="updated",H="reconfigured",I="deleted";else if("add"!=b [0].type||"update"!=b[1].type||"delete"!=b[2].type)return console.error("Unexpec ted change record names for Object.observe. Using dirty-checking instead"),!1;re turn Object.unobserve(c,a),c=[0],Array.observe(c,a),c[1]=1,c.length=0,Object.del iverChangeRecords(a),2!=b.length?!1:b[0].type!=J||b[1].type!=J?!1:(Array.unobser ve(c,a),!0)}function c(){if(a.document&&"securityPolicy"in a.document&&!a.docume nt.securityPolicy.allowsEval)return!1;try{var b=new Function("","return true;"); return b()}catch(c){return!1}}function d(a){return+a===a>>>0}function e(a){retur n+a}function f(a){return a===Object(a)}function g(a,b){return a===b?0!==a||1/a== =1/b:M(a)&&M(b)?!0:a!==a&&b!==b}function h(a){return"string"!=typeof a?!1:(a=a.t rim(),""==a?!0:"."==a[0]?!1:U.test(a))}function i(a,b){if(b!==V)throw Error("Use Path.get to retrieve path objects");return""==a.trim()?this:d(a)?(this.push(a), this):(a.split(/\s*\.\s*/).filter(function(a){return a}).forEach(function(a){thi s.push(a)},this),L&&!K&&this.length&&(this.getValueFrom=this.compiledGetValueFro mFn()),void 0)}function j(a){if(a instanceof i)return a;null==a&&(a=""),"string" !=typeof a&&(a=String(a));var b=W[a];if(b)return b;if(!h(a))return X;var b=new i (a,V);return W[a]=b,b}function k(b){for(var c=0;Y>c&&b.check();)b.report(),c++;a .testingExposeCycleCount&&(a.dirtyCheckCycleCount=c)}function l(a){for(var b in a)return!1;return!0}function m(a){return l(a.added)&&l(a.removed)&&l(a.changed)} function n(a,b){var c={},d={},e={};for(var f in b){var g=a[f];(void 0===g||g!==b [f])&&(f in a?g!==b[f]&&(e[f]=g):d[f]=void 0)}for(var f in a)f in b||(c[f]=a[f]) ;return Array.isArray(a)&&a.length!==b.length&&(e.length=a.length),{added:c,remo ved:d,changed:e}}function o(a,b){var c=b||(Array.isArray(a)?[]:{});for(var d in a)c[d]=a[d];return Array.isArray(a)&&(c.length=a.length),c}function p(a,b,c,d){i f(this.closed=!1,this.object=a,this.callback=b,this.target=c,this.token=d,this.r eporting=!0,K){var e=this;this.boundInternalCallback=function(a){e.internalCallb ack(a)}}q(this)}function q(a){$&&(Z.push(a),p._allObserversCount++)}function r(a ,b,c,d){p.call(this,a,b,c,d),this.connect(),this.sync(!0)}function s(a,b,c,d){if (!Array.isArray(a))throw Error("Provided object is not an Array");r.call(this,a, b,c,d)}function t(a){this.arr=[],this.callback=a,this.isObserved=!0}function u(a ,b,c,d,e,g,h){var b=b instanceof i?b:j(b);return b&&b.length&&f(a)?(p.call(this, a,c,d,e),this.valueFn=g,this.setValueFn=h,this.path=b,this.connect(),this.sync(! 0),void 0):(this.value_=b?b.getValueFrom(a):void 0,this.value=g?g(this.value_):t his.value_,this.closed=!0,void 0)}function v(a,b,c,d){p.call(this,void 0,a,b,c), this.valueFn=d,this.observed=[],this.values=[],this.value=void 0,this.oldValue=v oid 0,this.oldValues=void 0,this.changeFlags=void 0,this.started=!1}function w(a ,b){if("function"==typeof Object.observe){var c=Object.getNotifier(a);return fun ction(d,e){var f={object:a,type:d,name:b};2===arguments.length&&(f.oldValue=e),c .notify(f)}}}function x(a,b,c){for(var d={},e={},f=0;f<b.length;f++){var g=b[f]; db[g.type]?(g.name in c||(c[g.name]=g.oldValue),g.type!=G&&(g.type!=F?g.name in d?(delete d[g.name],delete c[g.name]):e[g.name]=!0:g.name in e?delete e[g.name]: d[g.name]=!0)):(console.error("Unknown changeRecord type: "+g.type),console.erro r(g))}for(var h in d)d[h]=a[h];for(var h in e)e[h]=void 0;var i={};for(var h in c)if(!(h in d||h in e)){var j=a[h];c[h]!==j&&(i[h]=j)}return{added:d,removed:e,c hanged:i}}function y(a,b,c){return{index:a,removed:b,addedCount:c}}function z(){ }function A(a,b,c,d,e,f){return ib.calcSplices(a,b,c,d,e,f)}function B(a,b,c,d){ return c>b||a>d?-1:b==c||d==a?0:c>a?d>b?b-c:d-c:b>d?d-a:b-a}function C(a,b,c,d){ for(var e=y(b,c,d),f=!1,g=0,h=0;h<a.length;h++){var i=a[h];if(i.index+=g,!f){var j=B(e.index,e.index+e.removed.length,i.index,i.index+i.addedCount);if(j>=0){a.s plice(h,1),h--,g-=i.addedCount-i.removed.length,e.addedCount+=i.addedCount-j;var k=e.removed.length+i.removed.length-j;if(e.addedCount||k){var c=i.removed;if(e. index<i.index){var l=e.removed.slice(0,i.index-e.index);Array.prototype.push.app ly(l,c),c=l}if(e.index+e.removed.length>i.index+i.addedCount){var m=e.removed.sl ice(i.index+i.addedCount-e.index);Array.prototype.push.apply(c,m)}e.removed=c,i. index<e.index&&(e.index=i.index)}else f=!0}else if(e.index<i.index){f=!0,a.splic e(h,0,e),h++;var n=e.addedCount-e.removed.length;i.index+=n,g+=n}}}f||a.push(e)} function D(a,b){for(var c=[],f=0;f<b.length;f++){var g=b[f];switch(g.type){case J:C(c,g.index,g.removed.slice(),g.addedCount);break;case F:case G:case I:if(!d(g .name))continue;var h=e(g.name);if(0>h)continue;C(c,h,[g.oldValue],1);break;defa ult:console.error("Unexpected record type: "+JSON.stringify(g))}}return c}functi on E(a,b){var c=[];return D(a,b).forEach(function(b){return 1==b.addedCount&&1== b.removed.length?(b.removed[0]!==a[b.index]&&c.push(b),void 0):(c=c.concat(A(a,b .index,b.index+b.addedCount,b.removed,0,b.removed.length)),void 0)}),c}var F="ad d",G="update",H="reconfigure",I="delete",J="splice",K=b(),L=c(),M=a.Number.isNaN ||function(b){return"number"==typeof b&&a.isNaN(b)},N="__proto__"in{}?function(a ){return a}:function(a){var b=a.__proto__;if(!b)return a;var c=Object.create(b); return Object.getOwnPropertyNames(a).forEach(function(b){Object.defineProperty(c ,b,Object.getOwnPropertyDescriptor(a,b))}),c},O="[$_a-zA-Z]",P="[$_a-zA-Z0-9]",Q =O+"+"+P+"*",R="(?:[0-9]|[1-9]+[0-9]+)",S="(?:"+Q+"|"+R+")",T="(?:"+S+")(?:\\s*\ \.\\s*"+S+")*",U=new RegExp("^"+T+"$"),V={},W={};i.get=j,i.prototype=N({__proto_ _:[],valid:!0,toString:function(){return this.join(".")},getValueFrom:function(a ,b){for(var c=0;c<this.length;c++){if(null==a)return;b&&b.observe(a),a=a[this[c] ]}return a},compiledGetValueFromFn:function(){var a=this.map(function(a){return d(a)?'["'+a+'"]':"."+a}),b="",c="obj";b+="if (obj != null";for(var e=0;e<this.le ngth-1;e++)this[e],c+=a[e],b+=" &&\n "+c+" != null";return b+=")\n",c+=a[e], b+=" return "+c+";\nelse\n return undefined;",new Function("obj",b)},setValueF rom:function(a,b){if(!this.length)return!1;for(var c=0;c<this.length-1;c++){if(! f(a))return!1;a=a[this[c]]}return f(a)?(a[this[c]]=b,!0):!1}});var X=new i("",V) ;X.valid=!1,X.getValueFrom=X.setValueFrom=function(){};var Y=1e3;p.prototype={in ternalCallback:function(a){this.closed||this.reporting&&this.check(a)&&(this.rep ort(),this.testingResults&&(this.testingResults.anyChanged=!0))},close:function( ){this.closed||(this.object&&"function"==typeof this.object.close&&this.object.c lose(),this.disconnect(),this.object=void 0,this.closed=!0)},deliver:function(a) {this.closed||(K?(this.testingResults=a,Object.deliverChangeRecords(this.boundIn ternalCallback),this.testingResults=void 0):k(this))},report:function(){this.rep orting&&(this.sync(!1),this.callback&&(this.reportArgs.push(this.token),this.inv okeCallback(this.reportArgs)),this.reportArgs=void 0)},invokeCallback:function(a ){try{this.callback.apply(this.target,a)}catch(b){p._errorThrownDuringCallback=! 0,console.error("Exception caught during observer callback: "+(b.stack||b))}},re set:function(){this.closed||(K&&(this.reporting=!1,Object.deliverChangeRecords(t his.boundInternalCallback),this.reporting=!0),this.sync(!0))}};var Z,$=!K||a.for ceCollectObservers;p._allObserversCount=0,$&&(Z=[]);var _=!1,ab="function"==type of Object.deliverAllChangeRecords;a.Platform=a.Platform||{},a.Platform.performMi crotaskCheckpoint=function(){if(!_){if(ab)return Object.deliverAllChangeRecords( ),void 0;if($){_=!0;var b=0,c={};do{b++;var d=Z;Z=[],c.anyChanged=!1;for(var e=0 ;e<d.length;e++){var f=d[e];f.closed||(K?f.deliver(c):f.check()&&(c.anyChanged=! 0,f.report()),Z.push(f))}}while(Y>b&&c.anyChanged);a.testingExposeCycleCount&&(a .dirtyCheckCycleCount=b),p._allObserversCount=Z.length,_=!1}}},$&&(a.Platform.cl earObservers=function(){Z=[]}),r.prototype=N({__proto__:p.prototype,connect:func tion(){K&&Object.observe(this.object,this.boundInternalCallback)},sync:function( ){K||(this.oldObject=o(this.object))},check:function(a){var b,c;if(K){if(!a)retu rn!1;c={},b=x(this.object,a,c)}else c=this.oldObject,b=n(this.object,this.oldObj ect);return m(b)?!1:(this.reportArgs=[b.added||{},b.removed||{},b.changed||{}],t his.reportArgs.push(function(a){return c[a]}),!0)},disconnect:function(){K?this. object&&Object.unobserve(this.object,this.boundInternalCallback):this.oldObject= void 0}}),s.prototype=N({__proto__:r.prototype,connect:function(){K&&Array.obser ve(this.object,this.boundInternalCallback)},sync:function(){K||(this.oldObject=t his.object.slice())},check:function(a){var b;if(K){if(!a)return!1;b=E(this.objec t,a)}else b=A(this.object,0,this.object.length,this.oldObject,0,this.oldObject.l ength);return b&&b.length?(this.reportArgs=[b],!0):!1}}),s.applySplices=function (a,b,c){c.forEach(function(c){for(var d=[c.index,c.removed.length],e=c.index;e<c .index+c.addedCount;)d.push(b[e]),e++;Array.prototype.splice.apply(a,d)})};var b b=Object.getPrototypeOf({}),cb=Object.getPrototypeOf([]);t.prototype={reset:func tion(){this.isObserved=!this.isObserved},observe:function(a){if(f(a)&&a!==bb&&a! ==cb){var b=this.arr.indexOf(a);b>=0&&this.arr[b+1]===this.isObserved||(0>b&&(b= this.arr.length,this.arr[b]=a,Object.observe(a,this.callback)),this.arr[b+1]=thi s.isObserved,this.observe(Object.getPrototypeOf(a)))}},cleanup:function(){for(va r a=0,b=0,c=this.isObserved;b<this.arr.length;){var d=this.arr[b];this.arr[b+1]= =c?(b>a&&(this.arr[a]=d,this.arr[a+1]=c),a+=2):Object.unobserve(d,this.callback) ,b+=2}this.arr.length=a}},u.prototype=N({__proto__:p.prototype,connect:function( ){K&&(this.observedSet=new t(this.boundInternalCallback))},disconnect:function() {this.value=void 0,this.value_=void 0,this.observedSet&&(this.observedSet.reset( ),this.observedSet.cleanup(),this.observedSet=void 0)},check:function(){return t his.observedSet&&this.observedSet.reset(),this.value_=this.path.getValueFrom(thi s.object,this.observedSet),this.observedSet&&this.observedSet.cleanup(),g(this.v alue_,this.oldValue_)?!1:(this.value=this.valueFn?this.valueFn(this.value_):this .value_,this.reportArgs=[this.value,this.oldValue],!0)},sync:function(a){a&&(thi s.observedSet&&this.observedSet.reset(),this.value_=this.path.getValueFrom(this. object,this.observedSet),this.value=this.valueFn?this.valueFn(this.value_):this. value_,this.observedSet&&this.observedSet.cleanup()),this.oldValue_=this.value_, this.oldValue=this.value},setValue:function(a){this.path&&("function"==typeof th is.setValueFn&&(a=this.setValueFn(a)),this.path.setValueFrom(this.object,a))}}), v.prototype=N({__proto__:u.prototype,addPath:function(a,b){if(this.started)throw Error("Cannot add more paths once started.");var b=b instanceof i?b:j(b),c=b?b. getValueFrom(a):void 0;this.observed.push(a,b),this.values.push(c)},start:functi on(){this.started=!0,this.connect(),this.sync(!0)},getValues:function(){this.obs ervedSet&&this.observedSet.reset();for(var a=!1,b=0;b<this.observed.length;b+=2) {var c=this.observed[b+1];if(c){var d=this.observed[b],e=c.getValueFrom(d,this.o bservedSet),f=this.values[b/2];if(!g(e,f)){if(!a&&!this.valueFn){this.oldValues= this.oldValues||[],this.changeFlags=this.changeFlags||[];for(var h=0;h<this.valu es.length;h++)this.oldValues[h]=this.values[h],this.changeFlags[h]=!1}this.value Fn||(this.changeFlags[b/2]=!0),this.values[b/2]=e,a=!0}}}return this.observedSet &&this.observedSet.cleanup(),a},check:function(){if(this.getValues()){if(this.va lueFn){if(this.value=this.valueFn(this.values),g(this.value,this.oldValue))retur n!1;this.reportArgs=[this.value,this.oldValue]}else this.reportArgs=[this.values ,this.oldValues,this.changeFlags,this.observed];return!0}},sync:function(a){a&&( this.getValues(),this.valueFn&&(this.value=this.valueFn(this.values))),this.valu eFn&&(this.oldValue=this.value)},close:function(){if(this.observed){for(var a=0; a<this.observed.length;a+=2){var b=this.observed[a];b&&"function"==typeof b.clos e&&b.close()}this.observed=void 0,this.values=void 0}p.prototype.close.call(this )}});var db={};db[F]=!0,db[G]=!0,db[I]=!0,u.defineProperty=function(a,b,c){var d =c.object,e=j(c.path),f=w(a,b),g=new u(d,c.path,function(a,b){f&&f(G,b)});return Object.defineProperty(a,b,{get:function(){return e.getValueFrom(d)},set:functio n(a){e.setValueFrom(d,a)},configurable:!0}),{close:function(){var c=e.getValueFr om(d);f&&g.deliver(),g.close(),Object.defineProperty(a,b,{value:c,writable:!0,co nfigurable:!0})}}};var eb=0,fb=1,gb=2,hb=3;z.prototype={calcEditDistances:functi on(a,b,c,d,e,f){for(var g=f-e+1,h=c-b+1,i=new Array(g),j=0;g>j;j++)i[j]=new Arra y(h),i[j][0]=j;for(var k=0;h>k;k++)i[0][k]=k;for(var j=1;g>j;j++)for(var k=1;h>k ;k++)if(this.equals(a[b+k-1],d[e+j-1]))i[j][k]=i[j-1][k-1];else{var l=i[j-1][k]+ 1,m=i[j][k-1]+1;i[j][k]=m>l?l:m}return i},spliceOperationsFromEditDistances:func tion(a){for(var b=a.length-1,c=a[0].length-1,d=a[b][c],e=[];b>0||c>0;)if(0!=b)if (0!=c){var f,g=a[b-1][c-1],h=a[b-1][c],i=a[b][c-1];f=i>h?g>h?h:g:g>i?i:g,f==g?(g ==d?e.push(eb):(e.push(fb),d=g),b--,c--):f==h?(e.push(hb),b--,d=h):(e.push(gb),c --,d=i)}else e.push(hb),b--;else e.push(gb),c--;return e.reverse(),e},calcSplice s:function(a,b,c,d,e,f){var g=0,h=0,i=Math.min(c-b,f-e);if(0==b&&0==e&&(g=this.s haredPrefix(a,d,i)),c==a.length&&f==d.length&&(h=this.sharedSuffix(a,d,i-g)),b+= g,e+=g,c-=h,f-=h,0==c-b&&0==f-e)return[];if(b==c){for(var j=y(b,[],0);f>e;)j.rem oved.push(d[e++]);return[j]}if(e==f)return[y(b,[],c-b)];for(var k=this.spliceOpe rationsFromEditDistances(this.calcEditDistances(a,b,c,d,e,f)),j=void 0,l=[],m=b, n=e,o=0;o<k.length;o++)switch(k[o]){case eb:j&&(l.push(j),j=void 0),m++,n++;brea k;case fb:j||(j=y(m,[],0)),j.addedCount++,m++,j.removed.push(d[n]),n++;break;cas e gb:j||(j=y(m,[],0)),j.addedCount++,m++;break;case hb:j||(j=y(m,[],0)),j.remove d.push(d[n]),n++}return j&&l.push(j),l},sharedPrefix:function(a,b,c){for(var d=0 ;c>d;d++)if(!this.equals(a[d],b[d]))return d;return c},sharedSuffix:function(a,b ,c){for(var d=a.length,e=b.length,f=0;c>f&&this.equals(a[--d],b[--e]);)f++;retur n f},calculateSplices:function(a,b){return this.calcSplices(a,0,a.length,b,0,b.l ength)},equals:function(a,b){return a===b}};var ib=new z;a.Observer=p,a.Observer .hasObjectObserve=K,a.ArrayObserver=s,a.ArrayObserver.calculateSplices=function( a,b){return ib.calculateSplices(a,b)},a.ArraySplice=z,a.ObjectObserver=r,a.PathO bserver=u,a.CompoundPathObserver=v,a.Path=i,a.Observer.changeRecordTypes={add:F, update:G,reconfigure:H,"delete":I,splice:J}}("undefined"!=typeof global&&global? global:this),"undefined"==typeof WeakMap&&!function(){var a=Object.definePropert y,b=Date.now()%1e9,c=function(){this.name="__st"+(1e9*Math.random()>>>0)+(b++ +" __")};c.prototype={set:function(b,c){var d=b[this.name];d&&d[0]===b?d[1]=c:a(b,t his.name,{value:[b,c],writable:!0})},get:function(a){var b;return(b=a[this.name] )&&b[0]===a?b[1]:void 0},"delete":function(a){this.set(a,void 0)}},window.WeakMa p=c}();var ShadowDOMPolyfill={};!function(a){"use strict";function b(a){if(!a)th row new Error("Assertion failed")}function c(a,b){return Object.getOwnPropertyNa mes(b).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescri ptor(b,c))}),a}function d(a,b){return Object.getOwnPropertyNames(b).forEach(func tion(c){switch(c){case"arguments":case"caller":case"length":case"name":case"prot otype":case"toString":return}Object.defineProperty(a,c,Object.getOwnPropertyDesc riptor(b,c))}),a}function e(a,b){for(var c=0;c<b.length;c++)if(b[c]in a)return b [c]}function f(a){var b=a.__proto__||Object.getPrototypeOf(a),c=D.get(b);if(c)re turn c;var d=f(b),e=s(d);return p(b,e,a),e}function g(a,b){n(a,b,!0)}function h( a,b){n(b,a,!1)}function i(a){return/^on[a-z]+$/.test(a)}function j(a){return/^\w [a-zA-Z_0-9]*$/.test(a)}function k(a){return G&&j(a)?new Function("return this.i mpl."+a):function(){return this.impl[a]}}function l(a){return G&&j(a)?new Functi on("v","this.impl."+a+" = v"):function(b){this.impl[a]=b}}function m(a){return G &&j(a)?new Function("return this.impl."+a+".apply(this.impl, arguments)"):functi on(){return this.impl[a].apply(this.impl,arguments)}}function n(b,c,d){Object.ge tOwnPropertyNames(b).forEach(function(e){if(!(e in c)){J&&b.__lookupGetter__(e); var f;try{f=Object.getOwnPropertyDescriptor(b,e)}catch(g){f=K}var h,j;if(d&&"fun ction"==typeof f.value)return c[e]=m(e),void 0;var n=i(e);h=n?a.getEventHandlerG etter(e):k(e),(f.writable||f.set)&&(j=n?a.getEventHandlerSetter(e):l(e)),Object. defineProperty(c,e,{get:h,set:j,configurable:f.configurable,enumerable:f.enumera ble})}})}function o(a,b,c){var e=a.prototype;p(e,b,c),d(b,a)}function p(a,c,d){v ar e=c.prototype;b(void 0===D.get(a)),D.set(a,c),E.set(e,a),g(a,e),d&&h(e,d)}fun ction q(a,b){return D.get(b.prototype)===a}function r(a){var b=Object.getPrototy peOf(a),c=f(b),d=s(c);return p(b,d,a),d}function s(a){function b(b){a.call(this, b)}return b.prototype=Object.create(a.prototype),b.prototype.constructor=b,b}fun ction t(a){return a instanceof F.EventTarget||a instanceof F.Event||a instanceof F.Range||a instanceof F.DOMImplementation||a instanceof F.CanvasRenderingContex t2D||F.WebGLRenderingContext&&a instanceof F.WebGLRenderingContext}function u(a) {return a instanceof N||a instanceof M||a instanceof O||a instanceof P||a instan ceof L||a instanceof Q||R&&a instanceof R}function v(a){return null===a?null:(b( u(a)),a.polymerWrapper_||(a.polymerWrapper_=new(f(a))(a)))}function w(a){return null===a?null:(b(t(a)),a.impl)}function x(a){return a&&t(a)?w(a):a}function y(a) {return a&&!t(a)?v(a):a}function z(a,c){null!==c&&(b(u(a)),b(void 0===c||t(c)),a .polymerWrapper_=c)}function A(a,b,c){Object.defineProperty(a.prototype,b,{get:c ,configurable:!0,enumerable:!0})}function B(a,b){A(a,b,function(){return v(this. impl[b])})}function C(a,b){a.forEach(function(a){b.forEach(function(b){a.prototy pe[b]=function(){var a=y(this);return a[b].apply(a,arguments)}})})}var D=new Wea kMap,E=new WeakMap,F=Object.create(null),G=!("securityPolicy"in document)||docum ent.securityPolicy.allowsEval;if(G)try{var H=new Function("","return true;");G=H ()}catch(I){G=!1}Object.getOwnPropertyNames(window);var J=/Firefox/.test(navigat or.userAgent),K={get:function(){},set:function(){},configurable:!0,enumerable:!0 },L=window.DOMImplementation,M=window.Event,N=window.Node,O=window.Window,P=wind ow.Range,Q=window.CanvasRenderingContext2D,R=window.WebGLRenderingContext;a.asse rt=b,a.constructorTable=D,a.defineGetter=A,a.defineWrapGetter=B,a.forwardMethods ToWrapper=C,a.isWrapperFor=q,a.mixin=c,a.nativePrototypeTable=E,a.oneOf=e,a.regi sterObject=r,a.registerWrapper=o,a.rewrap=z,a.unwrap=w,a.unwrapIfNeeded=x,a.wrap =v,a.wrapIfNeeded=y,a.wrappers=F}(this.ShadowDOMPolyfill),function(a){"use stric t";function b(a){return a instanceof O.ShadowRoot}function c(a){var b=a.localNam e;return"content"===b||"shadow"===b}function d(a){return!!a.shadowRoot}function e(a){var b;return a.parentNode||(b=a.defaultView)&&N(b)||null}function f(f,g,h){ if(h.length)return h.shift();if(b(f))return j(f)||a.getHostForShadowRoot(f);var i=a.eventParentsTable.get(f);if(i){for(var k=1;k<i.length;k++)h[k-1]=i[k];return i[0]}if(g&&c(f)){var l=f.parentNode;if(l&&d(l))for(var m=a.getShadowTrees(l),n= j(g),k=0;k<m.length;k++)if(m[k].contains(n))return n}return e(f)}function g(a){f or(var d=[],e=a,g=[],i=[];e;){var j=null;if(c(e)){j=h(d);var k=d[d.length-1]||e; d.push(k)}else d.length||d.push(e);var l=d[d.length-1];g.push({target:l,currentT arget:e}),b(e)&&d.pop(),e=f(e,j,i)}return g}function h(a){for(var b=a.length-1;b >=0;b--)if(!c(a[b]))return a[b];return null}function i(d,e){for(var g=[];d;){for (var i=[],j=e,l=void 0;j;){var n=null;if(i.length){if(c(j)&&(n=h(i),k(l))){var o =i[i.length-1];i.push(o)}}else i.push(j);if(m(j,d))return i[i.length-1];b(j)&&i. pop(),l=j,j=f(j,n,g)}d=b(d)?a.getHostForShadowRoot(d):d.parentNode}}function j(b ){return a.insertionParentTable.get(b)}function k(a){return j(a)}function l(a){f or(var b;b=a.parentNode;)a=b;return a}function m(a,b){return l(a)===l(b)}functio n n(b,c){if(b===c)return!0;if(b instanceof O.ShadowRoot){var d=a.getHostForShado wRoot(b);return n(l(d),c)}return!1}function o(){Z++}function p(){Z--}function q( b){if(!Q.get(b)){if(Q.set(b,!0),b instanceof $){if(Z)return}else a.renderAllPend ing();var c=N(b.target),d=N(b);return r(d,c)}}function r(a,b){var c=g(b);return" load"===a.type&&2===c.length&&c[0].target instanceof O.Document&&c.shift(),Y.set (a,c),s(a,c)&&t(a,c)&&u(a,c),U.set(a,x.NONE),S.set(a,null),a.defaultPrevented}fu nction s(a,b){for(var c,d=b.length-1;d>0;d--){var e=b[d].target,f=b[d].currentTa rget;if(e!==f&&(c=x.CAPTURING_PHASE,!v(b[d],a,c)))return!1}return!0}function t(a ,b){var c=x.AT_TARGET;return v(b[0],a,c)}function u(a,b){for(var c,d=a.bubbles,e =1;e<b.length;e++){var f=b[e].target,g=b[e].currentTarget;if(f===g)c=x.AT_TARGET ;else{if(!d||W.get(a))continue;c=x.BUBBLING_PHASE}if(!v(b[e],a,c))return}}functi on v(a,b,c){var d=a.target,e=a.currentTarget,f=P.get(e);if(!f)return!0;if("relat edTarget"in b){var g=M(b);if(g.relatedTarget){var h=N(g.relatedTarget),j=i(e,h); if(j===d)return!0;T.set(b,j)}}U.set(b,c);var k=b.type,l=!1;R.set(b,d),S.set(b,e) ;for(var m=0;m<f.length;m++){var n=f[m];if(n.removed)l=!0;else if(!(n.type!==k|| !n.capture&&c===x.CAPTURING_PHASE||n.capture&&c===x.BUBBLING_PHASE))try{if("func tion"==typeof n.handler?n.handler.call(e,b):n.handler.handleEvent(b),W.get(b))re turn!1}catch(o){window.onerror?window.onerror(o.message):console.error(o,o.stack )}}if(l){var p=f.slice();f.length=0;for(var m=0;m<p.length;m++)p[m].removed||f.p ush(p[m])}return!V.get(b)}function w(a,b,c){this.type=a,this.handler=b,this.capt ure=Boolean(c)}function x(a,b){return a instanceof _?(this.impl=a,void 0):N(B(_, "Event",a,b))}function y(a){return a&&a.relatedTarget?Object.create(a,{relatedTa rget:{value:M(a.relatedTarget)}}):a}function z(a,b,c){var d=window[a],e=function (b,c){return b instanceof d?(this.impl=b,void 0):N(B(d,a,b,c))};return e.prototy pe=Object.create(b.prototype),c&&K(e.prototype,c),d&&(d.prototype["init"+a]?L(d, e,document.createEvent(a)):L(d,e,new d("temp"))),e}function A(a,b){return functi on(){arguments[b]=M(arguments[b]);var c=M(this);c[a].apply(c,arguments)}}functio n B(a,b,c,d){if(jb)return new a(c,y(d));var e=M(document.createEvent(b)),f=ib[b] ,g=[c];return Object.keys(f).forEach(function(a){var b=null!=d&&a in d?d[a]:f[a] ;"relatedTarget"===a&&(b=M(b)),g.push(b)}),e["init"+b].apply(e,g),e}function C(a ){return"function"==typeof a?!0:a&&a.handleEvent}function D(a){this.impl=a}funct ion E(b){return b instanceof O.ShadowRoot&&(b=a.getHostForShadowRoot(b)),M(b)}fu nction F(a){J(a,mb)}function G(b,c,d,e){a.renderAllPending();for(var f=N(nb.call (c.impl,d,e)),h=g(f,this),i=0;i<h.length;i++){var j=h[i];if(j.currentTarget===b) return j.target}return null}function H(a){return function(){var b=X.get(this);re turn b&&b[a]&&b[a].value||null}}function I(a){var b=a.slice(2);return function(c ){var d=X.get(this);d||(d=Object.create(null),X.set(this,d));var e=d[a];if(e&&th is.removeEventListener(b,e.wrapped,!1),"function"==typeof c){var f=function(b){v ar d=c.call(this,b);d===!1?b.preventDefault():"onbeforeunload"===a&&"string"==ty peof d&&(b.returnValue=d)};this.addEventListener(b,f,!1),d[a]={value:c,wrapped:f }}}}var J=a.forwardMethodsToWrapper,K=a.mixin,L=a.registerWrapper,M=a.unwrap,N=a .wrap,O=a.wrappers;new WeakMap;var P=new WeakMap,Q=new WeakMap,R=new WeakMap,S=n ew WeakMap,T=new WeakMap,U=new WeakMap,V=new WeakMap,W=new WeakMap,X=new WeakMap ,Y=new WeakMap,Z=0,$=window.MutationEvent;w.prototype={equals:function(a){return this.handler===a.handler&&this.type===a.type&&this.capture===a.capture},get rem oved(){return null===this.handler},remove:function(){this.handler=null}};var _=w indow.Event;x.prototype={get target(){return R.get(this)},get currentTarget(){re turn S.get(this)},get eventPhase(){return U.get(this)},get path(){var a=new O.No deList,b=Y.get(this);if(b){for(var c=0,d=b.length-1,e=l(S.get(this)),f=0;d>=f;f+ +){var g=b[f].currentTarget,h=l(g);n(e,h)&&(f!==d||g instanceof O.Node)&&(a[c++] =g)}a.length=c}return a},stopPropagation:function(){V.set(this,!0)},stopImmediat ePropagation:function(){V.set(this,!0),W.set(this,!0)}},L(_,x,document.createEve nt("Event"));var ab=z("UIEvent",x),bb=z("CustomEvent",x),cb={get relatedTarget() {return T.get(this)||N(M(this).relatedTarget)}},db=K({initMouseEvent:A("initMous eEvent",14)},cb),eb=K({initFocusEvent:A("initFocusEvent",5)},cb),fb=z("MouseEven t",ab,db),gb=z("FocusEvent",ab,eb),hb=z("MutationEvent",x,{initMutationEvent:A(" initMutationEvent",3),get relatedNode(){return N(this.impl.relatedNode)}}),ib=Ob ject.create(null),jb=function(){try{new window.MouseEvent("click")}catch(a){retu rn!1}return!0}();if(!jb){var kb=function(a,b,c){if(c){var d=ib[c];b=K(K({},d),b) }ib[a]=b};kb("Event",{bubbles:!1,cancelable:!1}),kb("CustomEvent",{detail:null}, "Event"),kb("UIEvent",{view:null,detail:0},"Event"),kb("MouseEvent",{screenX:0,s creenY:0,clientX:0,clientY:0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button: 0,relatedTarget:null},"UIEvent"),kb("FocusEvent",{relatedTarget:null},"UIEvent") }var lb=window.EventTarget,mb=["addEventListener","removeEventListener","dispatc hEvent"];[Node,Window].forEach(function(a){var b=a.prototype;mb.forEach(function (a){Object.defineProperty(b,a+"_",{value:b[a]})})}),D.prototype={addEventListene r:function(a,b,c){if(C(b)){var d=new w(a,b,c),e=P.get(this);if(e){for(var f=0;f< e.length;f++)if(d.equals(e[f]))return}else e=[],P.set(this,e);e.push(d);var g=E( this);g.addEventListener_(a,q,!0)}},removeEventListener:function(a,b,c){c=Boolea n(c);var d=P.get(this);if(d){for(var e=0,f=!1,g=0;g<d.length;g++)d[g].type===a&& d[g].capture===c&&(e++,d[g].handler===b&&(f=!0,d[g].remove()));if(f&&1===e){var h=E(this);h.removeEventListener_(a,q,!0)}}},dispatchEvent:function(a){var b=E(th is),c=M(a);return Q.set(c,!1),b.dispatchEvent_(c)}},lb&&L(lb,D);var nb=document. elementFromPoint;a.adjustRelatedTarget=i,a.elementFromPoint=G,a.getEventHandlerG etter=H,a.getEventHandlerSetter=I,a.muteMutationEvents=o,a.unmuteMutationEvents= p,a.wrapEventTargetMethods=F,a.wrappers.CustomEvent=bb,a.wrappers.Event=x,a.wrap pers.EventTarget=D,a.wrappers.FocusEvent=gb,a.wrappers.MouseEvent=fb,a.wrappers. MutationEvent=hb,a.wrappers.UIEvent=ab}(this.ShadowDOMPolyfill),function(a){"use strict";function b(a,b){Object.defineProperty(a,b,{enumerable:!1})}function c() {this.length=0,b(this,"length")}function d(a){if(null==a)return a;for(var b=new c,d=0,e=a.length;e>d;d++)b[d]=f(a[d]);return b.length=e,b}function e(a,b){a.prot otype[b]=function(){return d(this.impl[b].apply(this.impl,arguments))}}var f=a.w rap;c.prototype={item:function(a){return this[a]}},b(c.prototype,"item"),a.wrapp ers.NodeList=c,a.addWrapNodeListMethod=e,a.wrapNodeList=d}(this.ShadowDOMPolyfil l),function(a){"use strict";function b(a){o(a instanceof k)}function c(a,b,c,d){ if(!(a instanceof DocumentFragment))return a.parentNode&&a.parentNode.removeChil d(a),a.parentNode_=b,a.previousSibling_=c,a.nextSibling_=d,c&&(c.nextSibling_=a) ,d&&(d.previousSibling_=a),[a];for(var e,f=[];e=a.firstChild;)a.removeChild(e),f .push(e),e.parentNode_=b;for(var g=0;g<f.length;g++)f[g].previousSibling_=f[g-1] ||c,f[g].nextSibling_=f[g+1]||d;return c&&(c.nextSibling_=f[0]),d&&(d.previousSi bling_=f[f.length-1]),f}function d(a){if(a instanceof DocumentFragment){for(var b=[],c=0,d=a.firstChild;d;d=d.nextSibling)b[c++]=d;return b}return[a]}function e (a){for(var b=0;b<a.length;b++)a[b].nodeWasAdded_()}function f(a,b){var c=a.node Type===k.DOCUMENT_NODE?a:a.ownerDocument;c!==b.ownerDocument&&c.adoptNode(b)}fun ction g(b,c){if(c.length){var d=b.ownerDocument;if(d!==c[0].ownerDocument)for(va r e=0;e<c.length;e++)a.adoptNodeNoRemove(c[e],d)}}function h(a,b){g(a,b);var c=b .length;if(1===c)return r(b[0]);for(var d=r(a.ownerDocument.createDocumentFragme nt()),e=0;c>e;e++)d.appendChild(r(b[e]));return d}function i(a){if(a.invalidateS hadowRenderer()){for(var b=a.firstChild;b;){o(b.parentNode===a);var c=b.nextSibl ing,d=r(b),e=d.parentNode;e&&y.call(e,d),b.previousSibling_=b.nextSibling_=b.par entNode_=null,b=c}a.firstChild_=a.lastChild_=null}else for(var c,f=r(a),g=f.firs tChild;g;)c=g.nextSibling,y.call(f,g),g=c}function j(a){var b=a.parentNode;retur n b&&b.invalidateShadowRenderer()}function k(a){o(a instanceof u),l.call(this,a) ,this.parentNode_=void 0,this.firstChild_=void 0,this.lastChild_=void 0,this.nex tSibling_=void 0,this.previousSibling_=void 0}var l=a.wrappers.EventTarget,m=a.w rappers.NodeList,n=a.defineWrapGetter,o=a.assert,p=a.mixin,q=a.registerWrapper,r =a.unwrap,s=a.wrap,t=a.wrapIfNeeded,u=window.Node,v=u.prototype.appendChild,w=u. prototype.insertBefore,x=u.prototype.replaceChild,y=u.prototype.removeChild,z=u. prototype.compareDocumentPosition;k.prototype=Object.create(l.prototype),p(k.pro totype,{appendChild:function(a){b(a);var g;if(this.invalidateShadowRenderer()||j (a)){var i=this.lastChild,k=null;g=c(a,this,i,k),this.lastChild_=g[g.length-1],i ||(this.firstChild_=g[0]),v.call(this.impl,h(this,g))}else g=d(a),f(this,a),v.ca ll(this.impl,r(a));return e(g),a},insertBefore:function(a,i){if(!i)return this.a ppendChild(a);b(a),b(i),o(i.parentNode===this);var k;if(this.invalidateShadowRen derer()||j(a)){var l=i.previousSibling,m=i;k=c(a,this,l,m),this.firstChild===i&& (this.firstChild_=k[0]);var n=r(i),p=n.parentNode;p?w.call(p,h(this,k),n):g(this ,k)}else k=d(a),f(this,a),w.call(this.impl,r(a),r(i));return e(k),a},removeChild :function(a){if(b(a),a.parentNode!==this)throw new Error("NotFoundError");var c= r(a);if(this.invalidateShadowRenderer()){var d=this.firstChild,e=this.lastChild, f=a.nextSibling,g=a.previousSibling,h=c.parentNode;h&&y.call(h,c),d===a&&(this.f irstChild_=f),e===a&&(this.lastChild_=g),g&&(g.nextSibling_=f),f&&(f.previousSib ling_=g),a.previousSibling_=a.nextSibling_=a.parentNode_=void 0}else y.call(this .impl,c);return a},replaceChild:function(a,g){if(b(a),b(g),g.parentNode!==this)t hrow new Error("NotFoundError");var i,k=r(g);if(this.invalidateShadowRenderer()| |j(a)){var l=g.previousSibling,m=g.nextSibling;m===a&&(m=a.nextSibling),i=c(a,th is,l,m),this.firstChild===g&&(this.firstChild_=i[0]),this.lastChild===g&&(this.l astChild_=i[i.length-1]),g.previousSibling_=g.nextSibling_=g.parentNode_=void 0, k.parentNode&&x.call(k.parentNode,h(this,i),k)}else i=d(a),f(this,a),x.call(this .impl,r(a),k);return e(i),g},nodeWasAdded_:function(){for(var a=this.firstChild; a;a=a.nextSibling)a.nodeWasAdded_()},hasChildNodes:function(){return null!==this .firstChild},get parentNode(){return void 0!==this.parentNode_?this.parentNode_: s(this.impl.parentNode)},get firstChild(){return void 0!==this.firstChild_?this. firstChild_:s(this.impl.firstChild)},get lastChild(){return void 0!==this.lastCh ild_?this.lastChild_:s(this.impl.lastChild)},get nextSibling(){return void 0!==t his.nextSibling_?this.nextSibling_:s(this.impl.nextSibling)},get previousSibling (){return void 0!==this.previousSibling_?this.previousSibling_:s(this.impl.previ ousSibling)},get parentElement(){for(var a=this.parentNode;a&&a.nodeType!==k.ELE MENT_NODE;)a=a.parentNode;return a},get textContent(){for(var a="",b=this.firstC hild;b;b=b.nextSibling)a+=b.textContent;return a},set textContent(a){if(this.inv alidateShadowRenderer()){if(i(this),""!==a){var b=this.impl.ownerDocument.create TextNode(a);this.appendChild(b)}}else this.impl.textContent=a},get childNodes(){ for(var a=new m,b=0,c=this.firstChild;c;c=c.nextSibling)a[b++]=c;return a.length =b,a},cloneNode:function(a){if(!this.invalidateShadowRenderer())return s(this.im pl.cloneNode(a));var b=s(this.impl.cloneNode(!1));if(a)for(var c=this.firstChild ;c;c=c.nextSibling)b.appendChild(c.cloneNode(!0));
2 if(d=b(e,c))return d;e=e.nextElementSibling}return null}function c(a,b,d){for(va r e=a.firstElementChild;e;)e.matches(b)&&(d[d.length++]=e),c(e,b,d),e=e.nextElem entSibling;return d}var d={querySelector:function(a){return b(this,a)},querySele ctorAll:function(a){return c(this,a,new NodeList)}},e={getElementsByTagName:func tion(a){return this.querySelectorAll(a)},getElementsByClassName:function(a){retu rn this.querySelectorAll("."+a)},getElementsByTagNameNS:function(a,b){if("*"===a )return this.getElementsByTagName(b);for(var c=new NodeList,d=this.getElementsBy TagName(b),e=0,f=0;e<d.length;e++)d[e].namespaceURI===a&&(c[f++]=d[e]);return c. length=f,c}};a.GetElementsByInterface=e,a.SelectorsInterface=d}(this.ShadowDOMPo lyfill),function(a){"use strict";function b(a){for(;a&&a.nodeType!==Node.ELEMENT _NODE;)a=a.nextSibling;return a}function c(a){for(;a&&a.nodeType!==Node.ELEMENT_ NODE;)a=a.previousSibling;return a}var d=a.wrappers.NodeList,e={get firstElement Child(){return b(this.firstChild)},get lastElementChild(){return c(this.lastChil d)},get childElementCount(){for(var a=0,b=this.firstElementChild;b;b=b.nextEleme ntSibling)a++;return a},get children(){for(var a=new d,b=0,c=this.firstElementCh ild;c;c=c.nextElementSibling)a[b++]=c;return a.length=b,a}},f={get nextElementSi bling(){return b(this.nextSibling)},get previousElementSibling(){return c(this.p reviousSibling)}};a.ChildNodeInterface=f,a.ParentNodeInterface=e}(this.ShadowDOM Polyfill),function(a){"use strict";function b(a){d.call(this,a)}var c=a.ChildNod eInterface,d=a.wrappers.Node,e=a.mixin,f=a.registerWrapper,g=window.CharacterDat a;b.prototype=Object.create(d.prototype),e(b.prototype,{get textContent(){return this.data},set textContent(a){this.data=a}}),e(b.prototype,c),f(g,b,document.cr eateTextNode("")),a.wrappers.CharacterData=b}(this.ShadowDOMPolyfill),function(a ){"use strict";function b(b,c){var d=b.parentNode;if(d&&d.shadowRoot){var e=a.ge tRendererForHost(d);e.dependsOnAttribute(c)&&e.invalidate()}}function c(a){g.cal l(this,a)}function d(a,c,d){var e=d||c;Object.defineProperty(a,c,{get:function() {return this.impl[c]},set:function(a){this.impl[c]=a,b(this,e)},configurable:!0, enumerable:!0})}var e=a.ChildNodeInterface,f=a.GetElementsByInterface,g=a.wrappe rs.Node,h=a.ParentNodeInterface,i=a.SelectorsInterface;a.addWrapNodeListMethod;v ar j=a.mixin,k=a.oneOf,l=a.registerWrapper,m=a.wrappers,n=window.Element,o=k(n.p rototype,["matches","mozMatchesSelector","msMatchesSelector","webkitMatchesSelec tor"]),p=n.prototype[o];c.prototype=Object.create(g.prototype),j(c.prototype,{cr eateShadowRoot:function(){var b=new m.ShadowRoot(this);this.impl.polymerShadowRo ot_=b;var c=a.getRendererForHost(this);return c.invalidate(),b},get shadowRoot() {return this.impl.polymerShadowRoot_||null},setAttribute:function(a,c){this.impl .setAttribute(a,c),b(this,a)},removeAttribute:function(a){this.impl.removeAttrib ute(a),b(this,a)},matches:function(a){return p.call(this.impl,a)}}),c.prototype[ o]=function(a){return this.matches(a)},n.prototype.webkitCreateShadowRoot&&(c.pr ototype.webkitCreateShadowRoot=c.prototype.createShadowRoot),d(c.prototype,"id") ,d(c.prototype,"className","class"),j(c.prototype,e),j(c.prototype,f),j(c.protot ype,h),j(c.prototype,i),l(n,c),a.matchesName=o,a.wrappers.Element=c}(this.Shadow DOMPolyfill),function(a){"use strict";function b(a){switch(a){case"&":return"&am p;";case"<":return"&lt;";case'"':return"&quot;"}}function c(a){return a.replace( r,b)}function d(a){switch(a.nodeType){case Node.ELEMENT_NODE:for(var b,d=a.tagNa me.toLowerCase(),f="<"+d,g=a.attributes,h=0;b=g[h];h++)f+=" "+b.name+'="'+c(b.va lue)+'"';return f+=">",s[d]?f:f+e(a)+"</"+d+">";case Node.TEXT_NODE:return c(a.n odeValue);case Node.COMMENT_NODE:return"<!--"+c(a.nodeValue)+"-->";default:throw console.error(a),new Error("not implemented")}}function e(a){for(var b="",c=a.f irstChild;c;c=c.nextSibling)b+=d(c);return b}function f(a,b,c){var d=c||"div";a. textContent="";var e=p(a.ownerDocument.createElement(d));e.innerHTML=b;for(var f ;f=e.firstChild;)a.appendChild(q(f))}function g(a){l.call(this,a)}function h(b){ return function(){return a.renderAllPending(),this.impl[b]}}function i(a){m(g,a, h(a))}function j(b){Object.defineProperty(g.prototype,b,{get:h(b),set:function(c ){a.renderAllPending(),this.impl[b]=c},configurable:!0,enumerable:!0})}function k(b){Object.defineProperty(g.prototype,b,{value:function(){return a.renderAllPen ding(),this.impl[b].apply(this.impl,arguments)},configurable:!0,enumerable:!0})} var l=a.wrappers.Element,m=a.defineGetter,n=a.mixin,o=a.registerWrapper,p=a.unwr ap,q=a.wrap,r=/&|<|"/g,s={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,hr:!0 ,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},t =window.HTMLElement;g.prototype=Object.create(l.prototype),n(g.prototype,{get in nerHTML(){return e(this)},set innerHTML(a){this.invalidateShadowRenderer()?f(thi s,a,this.tagName):this.impl.innerHTML=a},get outerHTML(){return d(this)},set out erHTML(a){var b=this.parentNode;b&&(b.invalidateShadowRenderer(),this.impl.outer HTML=a)}}),["clientHeight","clientLeft","clientTop","clientWidth","offsetHeight" ,"offsetLeft","offsetTop","offsetWidth","scrollHeight","scrollWidth"].forEach(i) ,["scrollLeft","scrollTop"].forEach(j),["getBoundingClientRect","getClientRects" ,"scrollIntoView"].forEach(k),o(t,g,document.createElement("b")),a.wrappers.HTML Element=g,a.getInnerHTML=e,a.setInnerHTML=f}(this.ShadowDOMPolyfill),function(a) {"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixi n,e=a.registerWrapper,f=a.wrap,g=window.HTMLCanvasElement;b.prototype=Object.cre ate(c.prototype),d(b.prototype,{getContext:function(){var a=this.impl.getContext .apply(this.impl,arguments);return a&&f(a)}}),e(g,b,document.createElement("canv as")),a.wrappers.HTMLCanvasElement=b}(this.ShadowDOMPolyfill),function(a){"use s trict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.r egisterWrapper,f=window.HTMLContentElement;b.prototype=Object.create(c.prototype ),d(b.prototype,{get select(){return this.getAttribute("select")},set select(a){ this.setAttribute("select",a)},setAttribute:function(a,b){c.prototype.setAttribu te.call(this,a,b),"select"===String(a).toLowerCase()&&this.invalidateShadowRende rer(!0)}}),f&&e(f,b),a.wrappers.HTMLContentElement=b}(this.ShadowDOMPolyfill),fu nction(a){"use strict";function b(a){d.call(this,a)}function c(a,b){if(!(this in stanceof c))throw new TypeError("DOM object constructor cannot be called as a fu nction.");var e=f(document.createElement("img"));void 0!==a&&(e.width=a),void 0! ==b&&(e.height=b),d.call(this,e),g(e,this)}var d=a.wrappers.HTMLElement,e=a.regi sterWrapper,f=a.unwrap,g=a.rewrap,h=window.HTMLImageElement;b.prototype=Object.c reate(d.prototype),e(h,b,document.createElement("img")),c.prototype=b.prototype, a.wrappers.HTMLImageElement=b,a.wrappers.Image=c}(this.ShadowDOMPolyfill),functi on(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a .mixin,e=a.registerWrapper,f=window.HTMLShadowElement;b.prototype=Object.create( c.prototype),d(b.prototype,{}),f&&e(f,b),a.wrappers.HTMLShadowElement=b}(this.Sh adowDOMPolyfill),function(a){"use strict";function b(a){if(!a.defaultView)return a;var b=o.get(a);if(!b){for(b=a.implementation.createHTMLDocument("");b.lastChi ld;)b.removeChild(b.lastChild);o.set(a,b)}return b}function c(a){var c,d=b(a.own erDocument),e=l(d.createDocumentFragment());for(h();c=a.firstChild;)e.appendChil d(c);return k(),e}function d(a){if(e.call(this,a),!p){var b=c(a);n.set(this,m(b) )}}var e=a.wrappers.HTMLElement,f=a.getInnerHTML,g=a.mixin,h=a.muteMutationEvent s,i=a.registerWrapper,j=a.setInnerHTML,k=a.unmuteMutationEvents,l=a.unwrap,m=a.w rap,n=new WeakMap,o=new WeakMap,p=window.HTMLTemplateElement;d.prototype=Object. create(e.prototype),g(d.prototype,{get content(){return p?m(this.impl.content):n .get(this)},get innerHTML(){return f(this.content)},set innerHTML(a){j(this.cont ent,a)}}),p&&i(p,d),a.wrappers.HTMLTemplateElement=d}(this.ShadowDOMPolyfill),fu nction(a){"use strict";function b(a){switch(a.localName){case"content":return ne w c(a);case"shadow":return new e(a);case"template":return new f(a)}d.call(this,a )}var c=a.wrappers.HTMLContentElement,d=a.wrappers.HTMLElement,e=a.wrappers.HTML ShadowElement,f=a.wrappers.HTMLTemplateElement;a.mixin;var g=a.registerWrapper,h =window.HTMLUnknownElement;b.prototype=Object.create(d.prototype),g(h,b),a.wrapp ers.HTMLUnknownElement=b}(this.ShadowDOMPolyfill),function(a){"use strict";funct ion b(a){this.impl=a}var c=a.mixin,d=a.registerWrapper,e=a.unwrap,f=a.unwrapIfNe eded,g=a.wrap,h=window.CanvasRenderingContext2D;c(b.prototype,{get canvas(){retu rn g(this.impl.canvas)},drawImage:function(){arguments[0]=f(arguments[0]),this.i mpl.drawImage.apply(this.impl,arguments)},createPattern:function(){return argume nts[0]=e(arguments[0]),this.impl.createPattern.apply(this.impl,arguments)}}),d(h ,b),a.wrappers.CanvasRenderingContext2D=b}(this.ShadowDOMPolyfill),function(a){" use strict";function b(a){this.impl=a}var c=a.mixin,d=a.registerWrapper,e=a.unwr apIfNeeded,f=a.wrap,g=window.WebGLRenderingContext;g&&(c(b.prototype,{get canvas (){return f(this.impl.canvas)},texImage2D:function(){arguments[5]=e(arguments[5] ),this.impl.texImage2D.apply(this.impl,arguments)},texSubImage2D:function(){argu ments[6]=e(arguments[6]),this.impl.texSubImage2D.apply(this.impl,arguments)}}),d (g,b),a.wrappers.WebGLRenderingContext=b)}(this.ShadowDOMPolyfill),function(a){" use strict";var b=a.GetElementsByInterface,c=a.ParentNodeInterface,d=a.Selectors Interface,e=a.mixin,f=a.registerObject,g=f(document.createDocumentFragment());e( g.prototype,c),e(g.prototype,d),e(g.prototype,b);var h=f(document.createTextNode ("")),i=f(document.createComment(""));a.wrappers.Comment=i,a.wrappers.DocumentFr agment=g,a.wrappers.Text=h}(this.ShadowDOMPolyfill),function(a){"use strict";fun ction b(a){var b=i(a.impl.ownerDocument.createDocumentFragment());c.call(this,b) ,g(b,this);var d=a.shadowRoot;k.set(this,d),j.set(this,a)}var c=a.wrappers.Docum entFragment,d=a.elementFromPoint,e=a.getInnerHTML,f=a.mixin,g=a.rewrap,h=a.setIn nerHTML,i=a.unwrap,j=new WeakMap,k=new WeakMap;b.prototype=Object.create(c.proto type),f(b.prototype,{get innerHTML(){return e(this)},set innerHTML(a){h(this,a), this.invalidateShadowRenderer()},get olderShadowRoot(){return k.get(this)||null} ,invalidateShadowRenderer:function(){return j.get(this).invalidateShadowRenderer ()},elementFromPoint:function(a,b){return d(this,this.ownerDocument,a,b)},getEle mentById:function(a){return this.querySelector("#"+a)}}),a.wrappers.ShadowRoot=b ,a.getHostForShadowRoot=function(a){return j.get(a)}}(this.ShadowDOMPolyfill),fu nction(a){"use strict";function b(a){a.previousSibling_=a.previousSibling,a.next Sibling_=a.nextSibling,a.parentNode_=a.parentNode}function c(a,c,e){var f=G(a),g =G(c),h=e?G(e):null;if(d(c),b(c),e)a.firstChild===e&&(a.firstChild_=e),e.previou sSibling_=e.previousSibling;else{a.lastChild_=a.lastChild,a.lastChild===a.firstC hild&&(a.firstChild_=a.firstChild);var i=H(f.lastChild);i&&(i.nextSibling_=i.nex tSibling)}f.insertBefore(g,h)}function d(a){var c=G(a),d=c.parentNode;if(d){var e=H(d);b(a),a.previousSibling&&(a.previousSibling.nextSibling_=a),a.nextSibling& &(a.nextSibling.previousSibling_=a),e.lastChild===a&&(e.lastChild_=a),e.firstChi ld===a&&(e.firstChild_=a),d.removeChild(c)}}function e(a,b){g(b).push(a),x(a,b); var c=J.get(a);c||J.set(a,c=[]),c.push(b)}function f(a){I.set(a,[])}function g(a ){return I.get(a)}function h(a){for(var b=[],c=0,d=a.firstChild;d;d=d.nextSiblin g)b[c++]=d;return b}function i(a,b,c){for(var d=a.firstChild;d;d=d.nextSibling)i f(b(d)){if(c(d)===!1)return}else i(d,b,c)}function j(a,b){var c=b.getAttribute(" select");if(!c)return!0;if(c=c.trim(),!c)return!0;if(!(a instanceof y))return!1; if(!M.test(c))return!1;if(":"===c[0]&&!N.test(c))return!1;try{return a.matches(c )}catch(d){return!1}}function k(){for(var a=0;a<P.length;a++)P[a].render();P=[]} function l(){F=null,k()}function m(a){var b=L.get(a);return b||(b=new q(a),L.set (a,b)),b}function n(a){for(;a;a=a.parentNode)if(a instanceof C)return a;return n ull}function o(a){return m(D(a))}function p(a){this.skip=!1,this.node=a,this.chi ldNodes=[]}function q(a){this.host=a,this.dirty=!1,this.invalidateAttributes(),t his.associateNode(a)}function r(a){return a instanceof z}function s(a){return a instanceof z}function t(a){return a instanceof A}function u(a){return a instance of A}function v(a){return a.shadowRoot}function w(a){for(var b=[],c=a.shadowRoot ;c;c=c.olderShadowRoot)b.push(c);return b}function x(a,b){K.set(a,b)}var y=a.wra ppers.Element,z=a.wrappers.HTMLContentElement,A=a.wrappers.HTMLShadowElement,B=a .wrappers.Node,C=a.wrappers.ShadowRoot;a.assert;var D=a.getHostForShadowRoot;a.m ixin,a.muteMutationEvents;var E=a.oneOf;a.unmuteMutationEvents;var F,G=a.unwrap, H=a.wrap,I=new WeakMap,J=new WeakMap,K=new WeakMap,L=new WeakMap,M=/^[*.:#[a-zA- Z_|]/,N=new RegExp("^:("+["link","visited","target","enabled","disabled","checke d","indeterminate","nth-child","nth-last-child","nth-of-type","nth-last-of-type" ,"first-child","last-child","first-of-type","last-of-type","only-of-type"].join( "|")+")"),O=E(window,["requestAnimationFrame","mozRequestAnimationFrame","webkit RequestAnimationFrame","setTimeout"]),P=[],Q=new ArraySplice;Q.equals=function(a ,b){return G(a.node)===b},p.prototype={append:function(a){var b=new p(a);return this.childNodes.push(b),b},sync:function(a){if(!this.skip){for(var b=this.node,e =this.childNodes,f=h(G(b)),g=a||new WeakMap,i=Q.calculateSplices(e,f),j=0,k=0,l= 0,m=0;m<i.length;m++){for(var n=i[m];l<n.index;l++)k++,e[j++].sync(g);for(var o= n.removed.length,p=0;o>p;p++){var q=H(f[k++]);g.get(q)||d(q)}for(var r=n.addedCo unt,s=f[k]&&H(f[k]),p=0;r>p;p++){var t=e[j++],u=t.node;c(b,u,s),g.set(u,!0),t.sy nc(g)}l+=r}for(var m=l;m<e.length;m++)e[m].sync(g)}}},q.prototype={render:functi on(a){if(this.dirty){this.invalidateAttributes(),this.treeComposition();var b=th is.host,c=b.shadowRoot;this.associateNode(b);for(var d=!e,e=a||new p(b),f=c.firs tChild;f;f=f.nextSibling)this.renderNode(c,e,f,!1);d&&e.sync(),this.dirty=!1}},i nvalidate:function(){if(!this.dirty){if(this.dirty=!0,P.push(this),F)return;F=wi ndow[O](l,0)}},renderNode:function(a,b,c,d){if(v(c)){b=b.append(c);var e=m(c);e. dirty=!0,e.render(b)}else r(c)?this.renderInsertionPoint(a,b,c,d):t(c)?this.rend erShadowInsertionPoint(a,b,c):this.renderAsAnyDomTree(a,b,c,d)},renderAsAnyDomTr ee:function(a,b,c,d){if(b=b.append(c),v(c)){var e=m(c);b.skip=!e.dirty,e.render( b)}else for(var f=c.firstChild;f;f=f.nextSibling)this.renderNode(a,b,f,d)},rende rInsertionPoint:function(a,b,c,d){var e=g(c);if(e.length){this.associateNode(c); for(var f=0;f<e.length;f++){var h=e[f];r(h)&&d?this.renderInsertionPoint(a,b,h,d ):this.renderAsAnyDomTree(a,b,h,d)}}else this.renderFallbackContent(a,b,c);this. associateNode(c.parentNode)},renderShadowInsertionPoint:function(a,b,c){var d=a. olderShadowRoot;if(d){x(d,c),this.associateNode(c.parentNode);for(var e=d.firstC hild;e;e=e.nextSibling)this.renderNode(d,b,e,!0)}else this.renderFallbackContent (a,b,c)},renderFallbackContent:function(a,b,c){this.associateNode(c),this.associ ateNode(c.parentNode);for(var d=c.firstChild;d;d=d.nextSibling)this.renderAsAnyD omTree(a,b,d,!1)},invalidateAttributes:function(){this.attributes=Object.create( null)},updateDependentAttributes:function(a){if(a){var b=this.attributes;/\.\w+/ .test(a)&&(b["class"]=!0),/#\w+/.test(a)&&(b.id=!0),a.replace(/\[\s*([^\s=\|~\]] +)/g,function(a,c){b[c]=!0})}},dependsOnAttribute:function(a){return this.attrib utes[a]},distribute:function(a,b){var c=this;i(a,s,function(a){f(a),c.updateDepe ndentAttributes(a.getAttribute("select"));for(var d=0;d<b.length;d++){var g=b[d] ;void 0!==g&&j(g,a)&&(e(g,a),b[d]=void 0)}})},treeComposition:function(){for(var a=this.host,b=a.shadowRoot,c=[],d=a.firstChild;d;d=d.nextSibling)if(r(d)){var e =g(d);e&&e.length||(e=h(d)),c.push.apply(c,e)}else c.push(d);for(var f,j;b;){if( f=void 0,i(b,u,function(a){return f=a,!1}),j=f,this.distribute(b,c),j){var k=b.o lderShadowRoot;if(k){b=k,x(b,j);continue}break}break}},associateNode:function(a) {a.impl.polymerShadowRenderer_=this}},B.prototype.invalidateShadowRenderer=funct ion(){var a=this.impl.polymerShadowRenderer_;return a?(a.invalidate(),!0):!1},z. prototype.getDistributedNodes=function(){return k(),g(this)},A.prototype.nodeWas Added_=z.prototype.nodeWasAdded_=function(){this.invalidateShadowRenderer();var a,b=n(this);b&&(a=o(b)),this.impl.polymerShadowRenderer_=a,a&&a.invalidate()},a. eventParentsTable=J,a.getRendererForHost=m,a.getShadowTrees=w,a.insertionParentT able=K,a.renderAllPending=k,a.visual={insertBefore:c,remove:d}}(this.ShadowDOMPo lyfill),function(a){"use strict";function b(b){if(window[b]){d(!a.wrappers[b]);v ar i=function(a){c.call(this,a)};i.prototype=Object.create(c.prototype),e(i.prot otype,{get form(){return h(g(this).form)}}),f(window[b],i,document.createElement (b.slice(4,-7))),a.wrappers[b]=i}}var c=a.wrappers.HTMLElement,d=a.assert,e=a.mi xin,f=a.registerWrapper,g=a.unwrap,h=a.wrap,i=["HTMLButtonElement","HTMLFieldSet Element","HTMLInputElement","HTMLKeygenElement","HTMLLabelElement","HTMLLegendEl ement","HTMLObjectElement","HTMLOptionElement","HTMLOutputElement","HTMLSelectEl ement","HTMLTextAreaElement"];i.forEach(b)}(this.ShadowDOMPolyfill),function(a){ "use strict";function b(a){k.call(this,a)}function c(a){var c=document[a];b.prot otype[a]=function(){return v(c.apply(this.impl,arguments))}}function d(a,b){y.ca ll(b.impl,u(a)),e(a,b)}function e(a,b){a.shadowRoot&&b.adoptNode(a.shadowRoot),a instanceof n&&f(a,b);for(var c=a.firstChild;c;c=c.nextSibling)e(c,b)}function f (a,b){var c=a.olderShadowRoot;c&&b.adoptNode(c)}function g(a){this.impl=a}functi on h(a,b){var c=document.implementation[b];a.prototype[b]=function(){return v(c. apply(this.impl,arguments))}}function i(a,b){var c=document.implementation[b];a. prototype[b]=function(){return c.apply(this.impl,arguments)}}var j=a.GetElements ByInterface,k=a.wrappers.Node,l=a.ParentNodeInterface,m=a.SelectorsInterface,n=a .wrappers.ShadowRoot,o=a.defineWrapGetter,p=a.elementFromPoint,q=a.forwardMethod sToWrapper,r=a.matchesName,s=a.mixin,t=a.registerWrapper,u=a.unwrap,v=a.wrap,w=a .wrapEventTargetMethods;a.wrapNodeList;var x=new WeakMap;b.prototype=Object.crea te(k.prototype),o(b,"documentElement"),o(b,"body"),o(b,"head"),["createComment", "createDocumentFragment","createElement","createElementNS","createEvent","create EventNS","createRange","createTextNode","getElementById"].forEach(c);var y=docum ent.adoptNode;if(s(b.prototype,{adoptNode:function(a){return a.parentNode&&a.par entNode.removeChild(a),d(a,this),a},elementFromPoint:function(a,b){return p(this ,this,a,b)}}),document.register){var z=document.register;b.prototype.register=fu nction(b,c){function d(a){return a?(this.impl=a,void 0):document.createElement(b )}var e=c.prototype;if(a.nativePrototypeTable.get(e))throw new Error("NotSupport edError");for(var f,g=Object.getPrototypeOf(e),h=[];g&&!(f=a.nativePrototypeTabl e.get(g));)h.push(g),g=Object.getPrototypeOf(g);if(!f)throw new Error("NotSuppor tedError");for(var i=Object.create(f),j=h.length-1;j>=0;j--)i=Object.create(i);r eturn["createdCallback","enteredViewCallback","leftViewCallback","attributeChang edCallback"].forEach(function(a){var b=e[a];b&&(i[a]=function(){b.apply(v(this), arguments)})}),z.call(u(this),b,{prototype:i}),d.prototype=e,d.prototype.constru ctor=d,a.constructorTable.set(i,d),a.nativePrototypeTable.set(e,i),d},q([window. HTMLDocument||window.Document],["register"])}q([window.HTMLBodyElement,window.HT MLDocument||window.Document,window.HTMLHeadElement,window.HTMLHtmlElement],["app endChild","compareDocumentPosition","contains","getElementsByClassName","getElem entsByTagName","getElementsByTagNameNS","insertBefore","querySelector","querySel ectorAll","removeChild","replaceChild",r]),q([window.HTMLDocument||window.Docume nt],["adoptNode","contains","createComment","createDocumentFragment","createElem ent","createElementNS","createEvent","createEventNS","createRange","createTextNo de","elementFromPoint","getElementById"]),s(b.prototype,j),s(b.prototype,l),s(b. prototype,m),s(b.prototype,{get implementation(){var a=x.get(this);return a?a:(a =new g(u(this).implementation),x.set(this,a),a)}}),t(window.Document,b,document. implementation.createHTMLDocument("")),window.HTMLDocument&&t(window.HTMLDocumen t,b),w([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLH eadElement]),h(g,"createDocumentType"),h(g,"createDocument"),h(g,"createHTMLDocu ment"),i(g,"hasFeature"),t(window.DOMImplementation,g),q([window.DOMImplementati on],["createDocumentType","createDocument","createHTMLDocument","hasFeature"]),a .adoptNodeNoRemove=d,a.wrappers.DOMImplementation=g,a.wrappers.Document=b}(this. ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a .wrappers.EventTarget,d=a.mixin,e=a.registerWrapper,f=a.unwrap,g=a.unwrapIfNeede d,h=a.wrap,i=a.renderAllPending,j=window.Window;b.prototype=Object.create(c.prot otype);var k=window.getComputedStyle;j.prototype.getComputedStyle=function(a,b){ return i(),k.call(this||window,g(a),b)},["addEventListener","removeEventListener ","dispatchEvent"].forEach(function(a){j.prototype[a]=function(){var b=h(this||w indow);return b[a].apply(b,arguments)}}),d(b.prototype,{getComputedStyle:functio n(a,b){return k.call(f(this),g(a),b)}}),e(j,b),a.wrappers.Window=b}(this.ShadowD OMPolyfill),function(a){"use strict";function b(a){this.impl=a}function c(a){ret urn new b(a)}function d(a){return a.map(c)}function e(a){var b=this;this.impl=ne w k(function(c){a.call(b,d(c),b)})}var f=a.defineGetter,g=a.defineWrapGetter,h=a .registerWrapper,i=a.unwrapIfNeeded,j=a.wrapNodeList;a.wrappers;var k=window.Mut ationObserver||window.WebKitMutationObserver;if(k){var l=window.MutationRecord;b .prototype={get addedNodes(){return j(this.impl.addedNodes)},get removedNodes(){ return j(this.impl.removedNodes)}},["target","previousSibling","nextSibling"].fo rEach(function(a){g(b,a)}),["type","attributeName","attributeNamespace","oldValu e"].forEach(function(a){f(b,a,function(){return this.impl[a]})}),l&&h(l,b),windo w.Node,e.prototype={observe:function(a,b){this.impl.observe(i(a),b)},disconnect: function(){this.impl.disconnect()},takeRecords:function(){return d(this.impl.tak eRecords())}},a.wrappers.MutationObserver=e,a.wrappers.MutationRecord=b}}(this.S hadowDOMPolyfill),function(a){"use strict";function b(a){this.impl=a}var c=a.reg isterWrapper,d=a.unwrap,e=a.unwrapIfNeeded,f=a.wrap,g=window.Range;b.prototype={ get startContainer(){return f(this.impl.startContainer)},get endContainer(){retu rn f(this.impl.endContainer)},get commonAncestorContainer(){return f(this.impl.c ommonAncestorContainer)},setStart:function(a,b){this.impl.setStart(e(a),b)},setE nd:function(a,b){this.impl.setEnd(e(a),b)},setStartBefore:function(a){this.impl. setStartBefore(e(a))},setStartAfter:function(a){this.impl.setStartAfter(e(a))},s etEndBefore:function(a){this.impl.setEndBefore(e(a))},setEndAfter:function(a){th is.impl.setEndAfter(e(a))},selectNode:function(a){this.impl.selectNode(e(a))},se lectNodeContents:function(a){this.impl.selectNodeContents(e(a))},compareBoundary Points:function(a,b){return this.impl.compareBoundaryPoints(a,d(b))},extractCont ents:function(){return f(this.impl.extractContents())},cloneContents:function(){ return f(this.impl.cloneContents())},insertNode:function(a){this.impl.insertNode (e(a))},surroundContents:function(a){this.impl.surroundContents(e(a))},cloneRang e:function(){return f(this.impl.cloneRange())},isPointInRange:function(a,b){retu rn this.impl.isPointInRange(e(a),b)},comparePoint:function(a,b){return this.impl .comparePoint(e(a),b)},intersectsNode:function(a){return this.impl.intersectsNod e(e(a))}},g.prototype.createContextualFragment&&(b.prototype.createContextualFra gment=function(a){return f(this.impl.createContextualFragment(a))}),c(window.Ran ge,b),a.wrappers.Range=b}(this.ShadowDOMPolyfill),function(a){"use strict";funct ion b(a){var b=c[a],d=window[b];if(d){var e=document.createElement(a),f=e.constr uctor;window[b]=f}}a.isWrapperFor;var c={a:"HTMLAnchorElement",applet:"HTMLApple tElement",area:"HTMLAreaElement",audio:"HTMLAudioElement",br:"HTMLBRElement",bas e:"HTMLBaseElement",body:"HTMLBodyElement",button:"HTMLButtonElement",dl:"HTMLDL istElement",datalist:"HTMLDataListElement",data:"HTMLDataElement",dir:"HTMLDirec toryElement",div:"HTMLDivElement",embed:"HTMLEmbedElement",fieldset:"HTMLFieldSe tElement",font:"HTMLFontElement",form:"HTMLFormElement",frame:"HTMLFrameElement" ,frameset:"HTMLFrameSetElement",hr:"HTMLHRElement",head:"HTMLHeadElement",h1:"HT MLHeadingElement",html:"HTMLHtmlElement",iframe:"HTMLIFrameElement",input:"HTMLI nputElement",li:"HTMLLIElement",label:"HTMLLabelElement",legend:"HTMLLegendEleme nt",link:"HTMLLinkElement",map:"HTMLMapElement",marquee:"HTMLMarqueeElement",men u:"HTMLMenuElement",menuitem:"HTMLMenuItemElement",meta:"HTMLMetaElement",meter: "HTMLMeterElement",del:"HTMLModElement",ol:"HTMLOListElement",object:"HTMLObject Element",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLO utputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",pre:"HTMLPreElem ent",progress:"HTMLProgressElement",q:"HTMLQuoteElement",script:"HTMLScriptEleme nt",select:"HTMLSelectElement",source:"HTMLSourceElement",span:"HTMLSpanElement" ,style:"HTMLStyleElement",time:"HTMLTimeElement",caption:"HTMLTableCaptionElemen t",col:"HTMLTableColElement",table:"HTMLTableElement",tr:"HTMLTableRowElement",t head:"HTMLTableSectionElement",tbody:"HTMLTableSectionElement",textarea:"HTMLTex tAreaElement",track:"HTMLTrackElement",title:"HTMLTitleElement",ul:"HTMLUListEle ment",video:"HTMLVideoElement"};Object.keys(c).forEach(b),Object.getOwnPropertyN ames(a.wrappers).forEach(function(b){window[b]=a.wrappers[b]}),a.knownElements=c }(this.ShadowDOMPolyfill),function(){var a=window.ShadowDOMPolyfill;a.wrap,Objec t.defineProperties(HTMLElement.prototype,{webkitShadowRoot:{get:function(){retur n this.shadowRoot}}}),HTMLElement.prototype.webkitCreateShadowRoot=HTMLElement.p rototype.createShadowRoot,window.dartExperimentalFixupGetTag=function(b){functio n c(a){if(a instanceof d)return"NodeList";if(a instanceof e)return"ShadowRoot";i f(window.MutationRecord&&a instanceof MutationRecord)return"MutationRecord";if(w indow.MutationObserver&&a instanceof MutationObserver)return"MutationObserver";i f(a instanceof HTMLTemplateElement)return"HTMLTemplateElement";var c=f(a);if(a!= =c){var g=a.constructor;if(g===c.constructor){var h=g._ShadowDOMPolyfill$cacheTa g_;return h||(h=Object.prototype.toString.call(c),h=h.substring(8,h.length-1),g. _ShadowDOMPolyfill$cacheTag_=h),h}a=c}return b(a)}var d=a.wrappers.NodeList,e=a. wrappers.ShadowRoot,f=a.unwrapIfNeeded;return c}}();var Platform={};!function(a) {function b(a,b){var c="";return Array.prototype.forEach.call(a,function(a){c+=a .textContent+"\n\n"}),b||(c=c.replace(n,"")),c}function c(a){var b=document.crea teElement("style");return b.textContent=a,b}function d(a){var b=c(a);document.he ad.appendChild(b);var d=b.sheet.cssRules;return b.parentNode.removeChild(b),d}fu nction e(a){for(var b=0,c=[];b<a.length;b++)c.push(a[b].cssText);return c.join(" \n\n")}function f(a){a&&g().appendChild(document.createTextNode(a))}function g() {return h||(h=document.createElement("style"),h.setAttribute("ShadowCSSShim","") ),h}var h,i={strictStyling:!1,registry:{},shimStyling:function(a,b,d){var e=this .isTypeExtension(d),g=this.registerDefinition(a,b,d);this.strictStyling&&this.ap plyScopeToContent(a,b),this.insertPolyfillDirectives(g.rootStyles),this.insertPo lyfillRules(g.rootStyles);var h=this.stylesToShimmedCssText(g.scopeStyles,b,e);h +=this.extractPolyfillUnscopedRules(g.rootStyles),g.shimmedStyle=c(h),a&&(a.shim medStyle=g.shimmedStyle);for(var i,j=0,k=g.rootStyles.length;k>j&&(i=g.rootStyle s[j]);j++)i.parentNode.removeChild(i);f(h)},registerDefinition:function(a,b,c){v ar d=this.registry[b]={root:a,name:b,extendsName:c},e=a?a.querySelectorAll("styl e"):[];e=e?Array.prototype.slice.call(e,0):[],d.rootStyles=e,d.scopeStyles=d.roo tStyles;var f=this.registry[d.extendsName];return!f||a&&!a.querySelector("shadow ")||(d.scopeStyles=f.scopeStyles.concat(d.scopeStyles)),d},isTypeExtension:funct ion(a){return a&&a.indexOf("-")<0},applyScopeToContent:function(a,b){a&&(Array.p rototype.forEach.call(a.querySelectorAll("*"),function(a){a.setAttribute(b,"")}) ,Array.prototype.forEach.call(a.querySelectorAll("template"),function(a){this.ap plyScopeToContent(a.content,b)},this))},insertPolyfillDirectives:function(a){a&& Array.prototype.forEach.call(a,function(a){a.textContent=this.insertPolyfillDire ctivesInCssText(a.textContent)},this)},insertPolyfillDirectivesInCssText:functio n(a){return a.replace(o,function(a,b){return b.slice(0,-2)+"{"})},insertPolyfill Rules:function(a){a&&Array.prototype.forEach.call(a,function(a){a.textContent=th is.insertPolyfillRulesInCssText(a.textContent)},this)},insertPolyfillRulesInCssT ext:function(a){return a.replace(p,function(a,b){return b.slice(0,-1)})},extract PolyfillUnscopedRules:function(a){var b="";return a&&Array.prototype.forEach.cal l(a,function(a){b+=this.extractPolyfillUnscopedRulesFromCssText(a.textContent)+" \n\n"},this),b},extractPolyfillUnscopedRulesFromCssText:function(a){for(var b,c= "";b=q.exec(a);)c+=b[1].slice(0,-1)+"\n\n";return c},stylesToShimmedCssText:func tion(a,b,c){return this.shimAtHost(a,b,c)+this.shimScoping(a,b,c)},shimAtHost:fu nction(a,b,c){return a?this.convertAtHostStyles(a,b,c):void 0},convertAtHostStyl es:function(a,c,f){var g=b(a),h=this;return g=g.replace(j,function(a,b){return h .scopeHostCss(b,c,f)}),g=e(this.findAtHostRules(d(g),new RegExp("^"+c+u,"m")))}, scopeHostCss:function(a,b,c){var d=this;return a.replace(k,function(a,e,f){retur n d.scopeHostSelector(e,b,c)+" "+f+"\n "})},scopeHostSelector:function(a,b,c){v ar d=[],e=a.split(","),f="[is="+b+"]";return e.forEach(function(a){a=a.trim(),a. match(l)?a=a.replace(l,c?f+"$1$3":b+"$1$3"):a.match(m)&&(a=c?f+a:b+a),d.push(a)} ,this),d.join(", ")},findAtHostRules:function(a,b){return Array.prototype.filter .call(a,this.isHostRule.bind(this,b))},isHostRule:function(a,b){return b.selecto rText&&b.selectorText.match(a)||b.cssRules&&this.findAtHostRules(b.cssRules,a).l ength||b.type==CSSRule.WEBKIT_KEYFRAMES_RULE},shimScoping:function(a,b,c){return a?this.convertScopedStyles(a,b,c):void 0},convertScopedStyles:function(a,c,e){v ar f=b(a).replace(j,"");f=this.insertPolyfillHostInCssText(f),f=this.convertColo nHost(f),f=this.convertPseudos(f),f=this.convertParts(f),f=this.convertCombinato rs(f);var g=d(f);return f=this.scopeRules(g,c,e)},convertPseudos:function(a){ret urn a.replace(r," [pseudo=$1]")},convertParts:function(a){return a.replace(s," [ part=$1]")},convertColonHost:function(a){return a.replace(t,function(a,b,c,d){re turn c?y+c+d+", "+c+" "+b+d:b+d})},convertCombinators:function(a){return a.repla ce("^^"," ").replace("^"," ")},scopeRules:function(a,b,c){var d="";return Array. prototype.forEach.call(a,function(a){a.selectorText&&a.style&&a.style.cssText?(d +=this.scopeSelector(a.selectorText,b,c,this.strictStyling)+" {\n ",d+=thi s.propertiesFromRule(a)+"\n}\n\n"):a.media?(d+="@media "+a.media.mediaText+" {\n ",d+=this.scopeRules(a.cssRules,b),d+="\n}\n\n"):a.cssText&&(d+=a.cssText+"\n\n" )},this),d},scopeSelector:function(a,b,c,d){var e=[],f=a.split(",");return f.for Each(function(a){a=a.trim(),this.selectorNeedsScoping(a,b,c)&&(a=d?this.applyStr ictSelectorScope(a,b):this.applySimpleSelectorScope(a,b,c)),e.push(a)},this),e.j oin(", ")},selectorNeedsScoping:function(a,b,c){var d=c?b:"\\[is="+b+"\\]",e=new RegExp("^("+d+")"+u,"m");return!a.match(e)},applySimpleSelectorScope:function(a ,b,c){var d=c?"[is="+b+"]":b;return a.match(z)?(a=a.replace(y,d),a.replace(z,d+" ")):d+" "+a},applyStrictSelectorScope:function(a,b){var c=[" ",">","+","~"],d=a ,e="["+b+"]";return c.forEach(function(a){var b=d.split(a);d=b.map(function(a){v ar b=a.trim().replace(z,"");return b&&c.indexOf(b)<0&&b.indexOf(e)<0&&(a=b.repla ce(/([^:]*)(:*)(.*)/,"$1"+e+"$2$3")),a}).join(a)}),d},insertPolyfillHostInCssTex t:function(a){return a.replace(v,x).replace(w,x) 2 return b},contains:function(a){if(!a)return!1;if(a=t(a),a===this)return!0;var b= a.parentNode;return b?this.contains(b):!1},compareDocumentPosition:function(a){r eturn z.call(this.impl,r(a))}}),n(k,"ownerDocument"),q(u,k,document.createDocume ntFragment()),delete k.prototype.querySelector,delete k.prototype.querySelectorA ll,k.prototype=p(Object.create(l.prototype),k.prototype),a.wrappers.Node=k}(this .ShadowDOMPolyfill),function(a){"use strict";function b(a,c){for(var d,e=a.first ElementChild;e;){if(e.matches(c))return e;if(d=b(e,c))return d;e=e.nextElementSi bling}return null}function c(a,b,d){for(var e=a.firstElementChild;e;)e.matches(b )&&(d[d.length++]=e),c(e,b,d),e=e.nextElementSibling;return d}var d={querySelect or:function(a){return b(this,a)},querySelectorAll:function(a){return c(this,a,ne w NodeList)}},e={getElementsByTagName:function(a){return this.querySelectorAll(a )},getElementsByClassName:function(a){return this.querySelectorAll("."+a)},getEl ementsByTagNameNS:function(a,b){if("*"===a)return this.getElementsByTagName(b);f or(var c=new NodeList,d=this.getElementsByTagName(b),e=0,f=0;e<d.length;e++)d[e] .namespaceURI===a&&(c[f++]=d[e]);return c.length=f,c}};a.GetElementsByInterface= e,a.SelectorsInterface=d}(this.ShadowDOMPolyfill),function(a){"use strict";funct ion b(a){for(;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.nextSibling;return a}functi on c(a){for(;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.previousSibling;return a}var d=a.wrappers.NodeList,e={get firstElementChild(){return b(this.firstChild)},get lastElementChild(){return c(this.lastChild)},get childElementCount(){for(var a= 0,b=this.firstElementChild;b;b=b.nextElementSibling)a++;return a},get children() {for(var a=new d,b=0,c=this.firstElementChild;c;c=c.nextElementSibling)a[b++]=c; return a.length=b,a}},f={get nextElementSibling(){return b(this.nextSibling)},ge t previousElementSibling(){return c(this.previousSibling)}};a.ChildNodeInterface =f,a.ParentNodeInterface=e}(this.ShadowDOMPolyfill),function(a){"use strict";fun ction b(a){d.call(this,a)}var c=a.ChildNodeInterface,d=a.wrappers.Node,e=a.mixin ,f=a.registerWrapper,g=window.CharacterData;b.prototype=Object.create(d.prototyp e),e(b.prototype,{get textContent(){return this.data},set textContent(a){this.da ta=a}}),e(b.prototype,c),f(g,b,document.createTextNode("")),a.wrappers.Character Data=b}(this.ShadowDOMPolyfill),function(a){"use strict";function b(b,c){var d=b .parentNode;if(d&&d.shadowRoot){var e=a.getRendererForHost(d);e.dependsOnAttribu te(c)&&e.invalidate()}}function c(a){g.call(this,a)}function d(a,c,d){var e=d||c ;Object.defineProperty(a,c,{get:function(){return this.impl[c]},set:function(a){ this.impl[c]=a,b(this,e)},configurable:!0,enumerable:!0})}var e=a.ChildNodeInter face,f=a.GetElementsByInterface,g=a.wrappers.Node,h=a.ParentNodeInterface,i=a.Se lectorsInterface;a.addWrapNodeListMethod;var j=a.mixin,k=a.oneOf,l=a.registerWra pper,m=a.wrappers,n=window.Element,o=k(n.prototype,["matches","mozMatchesSelecto r","msMatchesSelector","webkitMatchesSelector"]),p=n.prototype[o];c.prototype=Ob ject.create(g.prototype),j(c.prototype,{createShadowRoot:function(){var b=new m. ShadowRoot(this);this.impl.polymerShadowRoot_=b;var c=a.getRendererForHost(this) ;return c.invalidate(),b},get shadowRoot(){return this.impl.polymerShadowRoot_|| null},setAttribute:function(a,c){this.impl.setAttribute(a,c),b(this,a)},removeAt tribute:function(a){this.impl.removeAttribute(a),b(this,a)},matches:function(a){ return p.call(this.impl,a)}}),c.prototype[o]=function(a){return this.matches(a)} ,n.prototype.webkitCreateShadowRoot&&(c.prototype.webkitCreateShadowRoot=c.proto type.createShadowRoot),d(c.prototype,"id"),d(c.prototype,"className","class"),j( c.prototype,e),j(c.prototype,f),j(c.prototype,h),j(c.prototype,i),l(n,c),a.match esName=o,a.wrappers.Element=c}(this.ShadowDOMPolyfill),function(a){"use strict"; function b(a){switch(a){case"&":return"&amp;";case"<":return"&lt;";case'"':retur n"&quot;"}}function c(a){return a.replace(r,b)}function d(a){switch(a.nodeType){ case Node.ELEMENT_NODE:for(var b,d=a.tagName.toLowerCase(),f="<"+d,g=a.attribute s,h=0;b=g[h];h++)f+=" "+b.name+'="'+c(b.value)+'"';return f+=">",s[d]?f:f+e(a)+" </"+d+">";case Node.TEXT_NODE:return c(a.nodeValue);case Node.COMMENT_NODE:retur n"<!--"+c(a.nodeValue)+"-->";default:throw console.error(a),new Error("not imple mented")}}function e(a){for(var b="",c=a.firstChild;c;c=c.nextSibling)b+=d(c);re turn b}function f(a,b,c){var d=c||"div";a.textContent="";var e=p(a.ownerDocument .createElement(d));e.innerHTML=b;for(var f;f=e.firstChild;)a.appendChild(q(f))}f unction g(a){l.call(this,a)}function h(b){return function(){return a.renderAllPe nding(),this.impl[b]}}function i(a){m(g,a,h(a))}function j(b){Object.definePrope rty(g.prototype,b,{get:h(b),set:function(c){a.renderAllPending(),this.impl[b]=c} ,configurable:!0,enumerable:!0})}function k(b){Object.defineProperty(g.prototype ,b,{value:function(){return a.renderAllPending(),this.impl[b].apply(this.impl,ar guments)},configurable:!0,enumerable:!0})}var l=a.wrappers.Element,m=a.defineGet ter,n=a.mixin,o=a.registerWrapper,p=a.unwrap,q=a.wrap,r=/&|<|"/g,s={area:!0,base :!0,br:!0,col:!0,command:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,met a:!0,param:!0,source:!0,track:!0,wbr:!0},t=window.HTMLElement;g.prototype=Object .create(l.prototype),n(g.prototype,{get innerHTML(){return e(this)},set innerHTM L(a){this.invalidateShadowRenderer()?f(this,a,this.tagName):this.impl.innerHTML= a},get outerHTML(){return d(this)},set outerHTML(a){var b=this.parentNode;b&&(b. invalidateShadowRenderer(),this.impl.outerHTML=a)}}),["clientHeight","clientLeft ","clientTop","clientWidth","offsetHeight","offsetLeft","offsetTop","offsetWidth ","scrollHeight","scrollWidth"].forEach(i),["scrollLeft","scrollTop"].forEach(j) ,["getBoundingClientRect","getClientRects","scrollIntoView"].forEach(k),o(t,g,do cument.createElement("b")),a.wrappers.HTMLElement=g,a.getInnerHTML=e,a.setInnerH TML=f}(this.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(thi s,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=a.wrap,g=windo w.HTMLCanvasElement;b.prototype=Object.create(c.prototype),d(b.prototype,{getCon text:function(){var a=this.impl.getContext.apply(this.impl,arguments);return a&& f(a)}}),e(g,b,document.createElement("canvas")),a.wrappers.HTMLCanvasElement=b}( this.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}va r c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=window.HTMLContentEle ment;b.prototype=Object.create(c.prototype),d(b.prototype,{get select(){return t his.getAttribute("select")},set select(a){this.setAttribute("select",a)},setAttr ibute:function(a,b){c.prototype.setAttribute.call(this,a,b),"select"===String(a) .toLowerCase()&&this.invalidateShadowRenderer(!0)}}),f&&e(f,b),a.wrappers.HTMLCo ntentElement=b}(this.ShadowDOMPolyfill),function(a){"use strict";function b(a){d .call(this,a)}function c(a,b){if(!(this instanceof c))throw new TypeError("DOM o bject constructor cannot be called as a function.");var e=f(document.createEleme nt("img"));void 0!==a&&(e.width=a),void 0!==b&&(e.height=b),d.call(this,e),g(e,t his)}var d=a.wrappers.HTMLElement,e=a.registerWrapper,f=a.unwrap,g=a.rewrap,h=wi ndow.HTMLImageElement;b.prototype=Object.create(d.prototype),e(h,b,document.crea teElement("img")),c.prototype=b.prototype,a.wrappers.HTMLImageElement=b,a.wrappe rs.Image=c}(this.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.cal l(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=window.HT MLShadowElement;b.prototype=Object.create(c.prototype),d(b.prototype,{}),f&&e(f, b),a.wrappers.HTMLShadowElement=b}(this.ShadowDOMPolyfill),function(a){"use stri ct";function b(a){if(!a.defaultView)return a;var b=o.get(a);if(!b){for(b=a.imple mentation.createHTMLDocument("");b.lastChild;)b.removeChild(b.lastChild);o.set(a ,b)}return b}function c(a){var c,d=b(a.ownerDocument),e=l(d.createDocumentFragme nt());for(h();c=a.firstChild;)e.appendChild(c);return k(),e}function d(a){if(e.c all(this,a),!p){var b=c(a);n.set(this,m(b))}}var e=a.wrappers.HTMLElement,f=a.ge tInnerHTML,g=a.mixin,h=a.muteMutationEvents,i=a.registerWrapper,j=a.setInnerHTML ,k=a.unmuteMutationEvents,l=a.unwrap,m=a.wrap,n=new WeakMap,o=new WeakMap,p=wind ow.HTMLTemplateElement;d.prototype=Object.create(e.prototype),g(d.prototype,{get content(){return p?m(this.impl.content):n.get(this)},get innerHTML(){return f(t his.content)},set innerHTML(a){j(this.content,a)}}),p&&i(p,d),a.wrappers.HTMLTem plateElement=d}(this.ShadowDOMPolyfill),function(a){"use strict";function b(a){s witch(a.localName){case"content":return new c(a);case"shadow":return new e(a);ca se"template":return new f(a)}d.call(this,a)}var c=a.wrappers.HTMLContentElement, d=a.wrappers.HTMLElement,e=a.wrappers.HTMLShadowElement,f=a.wrappers.HTMLTemplat eElement;a.mixin;var g=a.registerWrapper,h=window.HTMLUnknownElement;b.prototype =Object.create(d.prototype),g(h,b),a.wrappers.HTMLUnknownElement=b}(this.ShadowD OMPolyfill),function(a){"use strict";function b(a){this.impl=a}var c=a.mixin,d=a .registerWrapper,e=a.unwrap,f=a.unwrapIfNeeded,g=a.wrap,h=window.CanvasRendering Context2D;c(b.prototype,{get canvas(){return g(this.impl.canvas)},drawImage:func tion(){arguments[0]=f(arguments[0]),this.impl.drawImage.apply(this.impl,argument s)},createPattern:function(){return arguments[0]=e(arguments[0]),this.impl.creat ePattern.apply(this.impl,arguments)}}),d(h,b),a.wrappers.CanvasRenderingContext2 D=b}(this.ShadowDOMPolyfill),function(a){"use strict";function b(a){this.impl=a} var c=a.mixin,d=a.registerWrapper,e=a.unwrapIfNeeded,f=a.wrap,g=window.WebGLRend eringContext;g&&(c(b.prototype,{get canvas(){return f(this.impl.canvas)},texImag e2D:function(){arguments[5]=e(arguments[5]),this.impl.texImage2D.apply(this.impl ,arguments)},texSubImage2D:function(){arguments[6]=e(arguments[6]),this.impl.tex SubImage2D.apply(this.impl,arguments)}}),d(g,b),a.wrappers.WebGLRenderingContext =b)}(this.ShadowDOMPolyfill),function(a){"use strict";var b=a.GetElementsByInter face,c=a.ParentNodeInterface,d=a.SelectorsInterface,e=a.mixin,f=a.registerObject ,g=f(document.createDocumentFragment());e(g.prototype,c),e(g.prototype,d),e(g.pr ototype,b);var h=f(document.createTextNode("")),i=f(document.createComment("")); a.wrappers.Comment=i,a.wrappers.DocumentFragment=g,a.wrappers.Text=h}(this.Shado wDOMPolyfill),function(a){"use strict";function b(a){var b=i(a.impl.ownerDocumen t.createDocumentFragment());c.call(this,b),g(b,this);var d=a.shadowRoot;k.set(th is,d),j.set(this,a)}var c=a.wrappers.DocumentFragment,d=a.elementFromPoint,e=a.g etInnerHTML,f=a.mixin,g=a.rewrap,h=a.setInnerHTML,i=a.unwrap,j=new WeakMap,k=new WeakMap;b.prototype=Object.create(c.prototype),f(b.prototype,{get innerHTML(){r eturn e(this)},set innerHTML(a){h(this,a),this.invalidateShadowRenderer()},get o lderShadowRoot(){return k.get(this)||null},invalidateShadowRenderer:function(){r eturn j.get(this).invalidateShadowRenderer()},elementFromPoint:function(a,b){ret urn d(this,this.ownerDocument,a,b)},getElementById:function(a){return this.query Selector("#"+a)}}),a.wrappers.ShadowRoot=b,a.getHostForShadowRoot=function(a){re turn j.get(a)}}(this.ShadowDOMPolyfill),function(a){"use strict";function b(a){a .previousSibling_=a.previousSibling,a.nextSibling_=a.nextSibling,a.parentNode_=a .parentNode}function c(a,c,e){var f=G(a),g=G(c),h=e?G(e):null;if(d(c),b(c),e)a.f irstChild===e&&(a.firstChild_=e),e.previousSibling_=e.previousSibling;else{a.las tChild_=a.lastChild,a.lastChild===a.firstChild&&(a.firstChild_=a.firstChild);var i=H(f.lastChild);i&&(i.nextSibling_=i.nextSibling)}f.insertBefore(g,h)}function d(a){var c=G(a),d=c.parentNode;if(d){var e=H(d);b(a),a.previousSibling&&(a.prev iousSibling.nextSibling_=a),a.nextSibling&&(a.nextSibling.previousSibling_=a),e. lastChild===a&&(e.lastChild_=a),e.firstChild===a&&(e.firstChild_=a),d.removeChil d(c)}}function e(a,b){g(b).push(a),x(a,b);var c=J.get(a);c||J.set(a,c=[]),c.push (b)}function f(a){I.set(a,[])}function g(a){return I.get(a)}function h(a){for(va r b=[],c=0,d=a.firstChild;d;d=d.nextSibling)b[c++]=d;return b}function i(a,b,c){ for(var d=a.firstChild;d;d=d.nextSibling)if(b(d)){if(c(d)===!1)return}else i(d,b ,c)}function j(a,b){var c=b.getAttribute("select");if(!c)return!0;if(c=c.trim(), !c)return!0;if(!(a instanceof y))return!1;if(!M.test(c))return!1;if(":"===c[0]&& !N.test(c))return!1;try{return a.matches(c)}catch(d){return!1}}function k(){for( var a=0;a<P.length;a++)P[a].render();P=[]}function l(){F=null,k()}function m(a){ var b=L.get(a);return b||(b=new q(a),L.set(a,b)),b}function n(a){for(;a;a=a.pare ntNode)if(a instanceof C)return a;return null}function o(a){return m(D(a))}funct ion p(a){this.skip=!1,this.node=a,this.childNodes=[]}function q(a){this.host=a,t his.dirty=!1,this.invalidateAttributes(),this.associateNode(a)}function r(a){ret urn a instanceof z}function s(a){return a instanceof z}function t(a){return a in stanceof A}function u(a){return a instanceof A}function v(a){return a.shadowRoot }function w(a){for(var b=[],c=a.shadowRoot;c;c=c.olderShadowRoot)b.push(c);retur n b}function x(a,b){K.set(a,b)}var y=a.wrappers.Element,z=a.wrappers.HTMLContent Element,A=a.wrappers.HTMLShadowElement,B=a.wrappers.Node,C=a.wrappers.ShadowRoot ;a.assert;var D=a.getHostForShadowRoot;a.mixin,a.muteMutationEvents;var E=a.oneO f;a.unmuteMutationEvents;var F,G=a.unwrap,H=a.wrap,I=new WeakMap,J=new WeakMap,K =new WeakMap,L=new WeakMap,M=/^[*.:#[a-zA-Z_|]/,N=new RegExp("^:("+["link","visi ted","target","enabled","disabled","checked","indeterminate","nth-child","nth-la st-child","nth-of-type","nth-last-of-type","first-child","last-child","first-of- type","last-of-type","only-of-type"].join("|")+")"),O=E(window,["requestAnimatio nFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","setTimeout"]), P=[],Q=new ArraySplice;Q.equals=function(a,b){return G(a.node)===b},p.prototype= {append:function(a){var b=new p(a);return this.childNodes.push(b),b},sync:functi on(a){if(!this.skip){for(var b=this.node,e=this.childNodes,f=h(G(b)),g=a||new We akMap,i=Q.calculateSplices(e,f),j=0,k=0,l=0,m=0;m<i.length;m++){for(var n=i[m];l <n.index;l++)k++,e[j++].sync(g);for(var o=n.removed.length,p=0;o>p;p++){var q=H( f[k++]);g.get(q)||d(q)}for(var r=n.addedCount,s=f[k]&&H(f[k]),p=0;r>p;p++){var t =e[j++],u=t.node;c(b,u,s),g.set(u,!0),t.sync(g)}l+=r}for(var m=l;m<e.length;m++) e[m].sync(g)}}},q.prototype={render:function(a){if(this.dirty){this.invalidateAt tributes(),this.treeComposition();var b=this.host,c=b.shadowRoot;this.associateN ode(b);for(var d=!e,e=a||new p(b),f=c.firstChild;f;f=f.nextSibling)this.renderNo de(c,e,f,!1);d&&e.sync(),this.dirty=!1}},invalidate:function(){if(!this.dirty){i f(this.dirty=!0,P.push(this),F)return;F=window[O](l,0)}},renderNode:function(a,b ,c,d){if(v(c)){b=b.append(c);var e=m(c);e.dirty=!0,e.render(b)}else r(c)?this.re nderInsertionPoint(a,b,c,d):t(c)?this.renderShadowInsertionPoint(a,b,c):this.ren derAsAnyDomTree(a,b,c,d)},renderAsAnyDomTree:function(a,b,c,d){if(b=b.append(c), v(c)){var e=m(c);b.skip=!e.dirty,e.render(b)}else for(var f=c.firstChild;f;f=f.n extSibling)this.renderNode(a,b,f,d)},renderInsertionPoint:function(a,b,c,d){var e=g(c);if(e.length){this.associateNode(c);for(var f=0;f<e.length;f++){var h=e[f] ;r(h)&&d?this.renderInsertionPoint(a,b,h,d):this.renderAsAnyDomTree(a,b,h,d)}}el se this.renderFallbackContent(a,b,c);this.associateNode(c.parentNode)},renderSha dowInsertionPoint:function(a,b,c){var d=a.olderShadowRoot;if(d){x(d,c),this.asso ciateNode(c.parentNode);for(var e=d.firstChild;e;e=e.nextSibling)this.renderNode (d,b,e,!0)}else this.renderFallbackContent(a,b,c)},renderFallbackContent:functio n(a,b,c){this.associateNode(c),this.associateNode(c.parentNode);for(var d=c.firs tChild;d;d=d.nextSibling)this.renderAsAnyDomTree(a,b,d,!1)},invalidateAttributes :function(){this.attributes=Object.create(null)},updateDependentAttributes:funct ion(a){if(a){var b=this.attributes;/\.\w+/.test(a)&&(b["class"]=!0),/#\w+/.test( a)&&(b.id=!0),a.replace(/\[\s*([^\s=\|~\]]+)/g,function(a,c){b[c]=!0})}},depends OnAttribute:function(a){return this.attributes[a]},distribute:function(a,b){var c=this;i(a,s,function(a){f(a),c.updateDependentAttributes(a.getAttribute("select "));for(var d=0;d<b.length;d++){var g=b[d];void 0!==g&&j(g,a)&&(e(g,a),b[d]=void 0)}})},treeComposition:function(){for(var a=this.host,b=a.shadowRoot,c=[],d=a.f irstChild;d;d=d.nextSibling)if(r(d)){var e=g(d);e&&e.length||(e=h(d)),c.push.app ly(c,e)}else c.push(d);for(var f,j;b;){if(f=void 0,i(b,u,function(a){return f=a, !1}),j=f,this.distribute(b,c),j){var k=b.olderShadowRoot;if(k){b=k,x(b,j);contin ue}break}break}},associateNode:function(a){a.impl.polymerShadowRenderer_=this}}, B.prototype.invalidateShadowRenderer=function(){var a=this.impl.polymerShadowRen derer_;return a?(a.invalidate(),!0):!1},z.prototype.getDistributedNodes=function (){return k(),g(this)},A.prototype.nodeWasAdded_=z.prototype.nodeWasAdded_=funct ion(){this.invalidateShadowRenderer();var a,b=n(this);b&&(a=o(b)),this.impl.poly merShadowRenderer_=a,a&&a.invalidate()},a.eventParentsTable=J,a.getRendererForHo st=m,a.getShadowTrees=w,a.insertionParentTable=K,a.renderAllPending=k,a.visual={ insertBefore:c,remove:d}}(this.ShadowDOMPolyfill),function(a){"use strict";funct ion b(b){if(window[b]){d(!a.wrappers[b]);var i=function(a){c.call(this,a)};i.pro totype=Object.create(c.prototype),e(i.prototype,{get form(){return h(g(this).for m)}}),f(window[b],i,document.createElement(b.slice(4,-7))),a.wrappers[b]=i}}var c=a.wrappers.HTMLElement,d=a.assert,e=a.mixin,f=a.registerWrapper,g=a.unwrap,h=a .wrap,i=["HTMLButtonElement","HTMLFieldSetElement","HTMLInputElement","HTMLKeyge nElement","HTMLLabelElement","HTMLLegendElement","HTMLObjectElement","HTMLOption Element","HTMLOutputElement","HTMLSelectElement","HTMLTextAreaElement"];i.forEac h(b)}(this.ShadowDOMPolyfill),function(a){"use strict";function b(a){k.call(this ,a)}function c(a){var c=document[a];b.prototype[a]=function(){return v(c.apply(t his.impl,arguments))}}function d(a,b){y.call(b.impl,u(a)),e(a,b)}function e(a,b) {a.shadowRoot&&b.adoptNode(a.shadowRoot),a instanceof n&&f(a,b);for(var c=a.firs tChild;c;c=c.nextSibling)e(c,b)}function f(a,b){var c=a.olderShadowRoot;c&&b.ado ptNode(c)}function g(a){this.impl=a}function h(a,b){var c=document.implementatio n[b];a.prototype[b]=function(){return v(c.apply(this.impl,arguments))}}function i(a,b){var c=document.implementation[b];a.prototype[b]=function(){return c.apply (this.impl,arguments)}}var j=a.GetElementsByInterface,k=a.wrappers.Node,l=a.Pare ntNodeInterface,m=a.SelectorsInterface,n=a.wrappers.ShadowRoot,o=a.defineWrapGet ter,p=a.elementFromPoint,q=a.forwardMethodsToWrapper,r=a.matchesName,s=a.mixin,t =a.registerWrapper,u=a.unwrap,v=a.wrap,w=a.wrapEventTargetMethods;a.wrapNodeList ;var x=new WeakMap;b.prototype=Object.create(k.prototype),o(b,"documentElement") ,o(b,"body"),o(b,"head"),["createComment","createDocumentFragment","createElemen t","createElementNS","createEvent","createEventNS","createRange","createTextNode ","getElementById"].forEach(c);var y=document.adoptNode;if(s(b.prototype,{adoptN ode:function(a){return a.parentNode&&a.parentNode.removeChild(a),d(a,this),a},el ementFromPoint:function(a,b){return p(this,this,a,b)}}),document.register){var z =document.register;b.prototype.register=function(b,c){function d(a){return a?(th is.impl=a,void 0):document.createElement(b)}var e=c.prototype;if(a.nativePrototy peTable.get(e))throw new Error("NotSupportedError");for(var f,g=Object.getProtot ypeOf(e),h=[];g&&!(f=a.nativePrototypeTable.get(g));)h.push(g),g=Object.getProto typeOf(g);if(!f)throw new Error("NotSupportedError");for(var i=Object.create(f), j=h.length-1;j>=0;j--)i=Object.create(i);return["createdCallback","enteredViewCa llback","leftViewCallback","attributeChangedCallback"].forEach(function(a){var b =e[a];b&&(i[a]=function(){b.apply(v(this),arguments)})}),z.call(u(this),b,c.exte nds?{prototype:i,"extends":c.extends}:{prototype:i}),d.prototype=e,d.prototype.c onstructor=d,a.constructorTable.set(i,d),a.nativePrototypeTable.set(e,i),d},q([w indow.HTMLDocument||window.Document],["register"])}q([window.HTMLBodyElement,win dow.HTMLDocument||window.Document,window.HTMLHeadElement,window.HTMLHtmlElement] ,["appendChild","compareDocumentPosition","contains","getElementsByClassName","g etElementsByTagName","getElementsByTagNameNS","insertBefore","querySelector","qu erySelectorAll","removeChild","replaceChild",r]),q([window.HTMLDocument||window. Document],["adoptNode","contains","createComment","createDocumentFragment","crea teElement","createElementNS","createEvent","createEventNS","createRange","create TextNode","elementFromPoint","getElementById"]),s(b.prototype,j),s(b.prototype,l ),s(b.prototype,m),s(b.prototype,{get implementation(){var a=x.get(this);return a?a:(a=new g(u(this).implementation),x.set(this,a),a)}}),t(window.Document,b,doc ument.implementation.createHTMLDocument("")),window.HTMLDocument&&t(window.HTMLD ocument,b),w([window.HTMLBodyElement,window.HTMLDocument||window.Document,window .HTMLHeadElement]),h(g,"createDocumentType"),h(g,"createDocument"),h(g,"createHT MLDocument"),i(g,"hasFeature"),t(window.DOMImplementation,g),q([window.DOMImplem entation],["createDocumentType","createDocument","createHTMLDocument","hasFeatur e"]),a.adoptNodeNoRemove=d,a.wrappers.DOMImplementation=g,a.wrappers.Document=b} (this.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}v ar c=a.wrappers.EventTarget,d=a.mixin,e=a.registerWrapper,f=a.unwrap,g=a.unwrapI fNeeded,h=a.wrap,i=a.renderAllPending,j=window.Window;b.prototype=Object.create( c.prototype);var k=window.getComputedStyle;j.prototype.getComputedStyle=function (a,b){return i(),k.call(this||window,g(a),b)},["addEventListener","removeEventLi stener","dispatchEvent"].forEach(function(a){j.prototype[a]=function(){var b=h(t his||window);return b[a].apply(b,arguments)}}),d(b.prototype,{getComputedStyle:f unction(a,b){return k.call(f(this),g(a),b)}}),e(j,b),a.wrappers.Window=b}(this.S hadowDOMPolyfill),function(a){"use strict";function b(a){this.impl=a}function c( a){return new b(a)}function d(a){return a.map(c)}function e(a){var b=this;this.i mpl=new k(function(c){a.call(b,d(c),b)})}var f=a.defineGetter,g=a.defineWrapGett er,h=a.registerWrapper,i=a.unwrapIfNeeded,j=a.wrapNodeList;a.wrappers;var k=wind ow.MutationObserver||window.WebKitMutationObserver;if(k){var l=window.MutationRe cord;b.prototype={get addedNodes(){return j(this.impl.addedNodes)},get removedNo des(){return j(this.impl.removedNodes)}},["target","previousSibling","nextSiblin g"].forEach(function(a){g(b,a)}),["type","attributeName","attributeNamespace","o ldValue"].forEach(function(a){f(b,a,function(){return this.impl[a]})}),l&&h(l,b) ,window.Node,e.prototype={observe:function(a,b){this.impl.observe(i(a),b)},disco nnect:function(){this.impl.disconnect()},takeRecords:function(){return d(this.im pl.takeRecords())}},a.wrappers.MutationObserver=e,a.wrappers.MutationRecord=b}}( this.ShadowDOMPolyfill),function(a){"use strict";function b(a){this.impl=a}var c =a.registerWrapper,d=a.unwrap,e=a.unwrapIfNeeded,f=a.wrap,g=window.Range;b.proto type={get startContainer(){return f(this.impl.startContainer)},get endContainer( ){return f(this.impl.endContainer)},get commonAncestorContainer(){return f(this. impl.commonAncestorContainer)},setStart:function(a,b){this.impl.setStart(e(a),b) },setEnd:function(a,b){this.impl.setEnd(e(a),b)},setStartBefore:function(a){this .impl.setStartBefore(e(a))},setStartAfter:function(a){this.impl.setStartAfter(e( a))},setEndBefore:function(a){this.impl.setEndBefore(e(a))},setEndAfter:function (a){this.impl.setEndAfter(e(a))},selectNode:function(a){this.impl.selectNode(e(a ))},selectNodeContents:function(a){this.impl.selectNodeContents(e(a))},compareBo undaryPoints:function(a,b){return this.impl.compareBoundaryPoints(a,d(b))},extra ctContents:function(){return f(this.impl.extractContents())},cloneContents:funct ion(){return f(this.impl.cloneContents())},insertNode:function(a){this.impl.inse rtNode(e(a))},surroundContents:function(a){this.impl.surroundContents(e(a))},clo neRange:function(){return f(this.impl.cloneRange())},isPointInRange:function(a,b ){return this.impl.isPointInRange(e(a),b)},comparePoint:function(a,b){return thi s.impl.comparePoint(e(a),b)},intersectsNode:function(a){return this.impl.interse ctsNode(e(a))}},g.prototype.createContextualFragment&&(b.prototype.createContext ualFragment=function(a){return f(this.impl.createContextualFragment(a))}),c(wind ow.Range,b),a.wrappers.Range=b}(this.ShadowDOMPolyfill),function(a){"use strict" ;function b(a){var b=c[a],d=window[b];if(d){var e=document.createElement(a),f=e. constructor;window[b]=f}}a.isWrapperFor;var c={a:"HTMLAnchorElement",applet:"HTM LAppletElement",area:"HTMLAreaElement",audio:"HTMLAudioElement",br:"HTMLBRElemen t",base:"HTMLBaseElement",body:"HTMLBodyElement",button:"HTMLButtonElement",dl:" HTMLDListElement",datalist:"HTMLDataListElement",data:"HTMLDataElement",dir:"HTM LDirectoryElement",div:"HTMLDivElement",embed:"HTMLEmbedElement",fieldset:"HTMLF ieldSetElement",font:"HTMLFontElement",form:"HTMLFormElement",frame:"HTMLFrameEl ement",frameset:"HTMLFrameSetElement",hr:"HTMLHRElement",head:"HTMLHeadElement", h1:"HTMLHeadingElement",html:"HTMLHtmlElement",iframe:"HTMLIFrameElement",input: "HTMLInputElement",li:"HTMLLIElement",label:"HTMLLabelElement",legend:"HTMLLegen dElement",link:"HTMLLinkElement",map:"HTMLMapElement",marquee:"HTMLMarqueeElemen t",menu:"HTMLMenuElement",menuitem:"HTMLMenuItemElement",meta:"HTMLMetaElement", meter:"HTMLMeterElement",del:"HTMLModElement",ol:"HTMLOListElement",object:"HTML ObjectElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output: "HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",pre:"HTMLP reElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",script:"HTMLScrip tElement",select:"HTMLSelectElement",source:"HTMLSourceElement",span:"HTMLSpanEl ement",style:"HTMLStyleElement",time:"HTMLTimeElement",caption:"HTMLTableCaption Element",col:"HTMLTableColElement",table:"HTMLTableElement",tr:"HTMLTableRowElem ent",thead:"HTMLTableSectionElement",tbody:"HTMLTableSectionElement",textarea:"H TMLTextAreaElement",track:"HTMLTrackElement",title:"HTMLTitleElement",ul:"HTMLUL istElement",video:"HTMLVideoElement"};Object.keys(c).forEach(b),Object.getOwnPro pertyNames(a.wrappers).forEach(function(b){window[b]=a.wrappers[b]}),a.knownElem ents=c}(this.ShadowDOMPolyfill),function(){var a=window.ShadowDOMPolyfill;a.wrap ,Object.defineProperties(HTMLElement.prototype,{webkitShadowRoot:{get:function() {return this.shadowRoot}}}),HTMLElement.prototype.webkitCreateShadowRoot=HTMLEle ment.prototype.createShadowRoot,window.dartExperimentalFixupGetTag=function(b){f unction c(a){if(a instanceof d)return"NodeList";if(a instanceof e)return"ShadowR oot";if(window.MutationRecord&&a instanceof MutationRecord)return"MutationRecord ";if(window.MutationObserver&&a instanceof MutationObserver)return"MutationObser ver";if(a instanceof HTMLTemplateElement)return"HTMLTemplateElement";var c=f(a); if(a!==c){var g=a.constructor;if(g===c.constructor){var h=g._ShadowDOMPolyfill$c acheTag_;return h||(h=Object.prototype.toString.call(c),h=h.substring(8,h.length -1),g._ShadowDOMPolyfill$cacheTag_=h),h}a=c}return b(a)}var d=a.wrappers.NodeLis t,e=a.wrappers.ShadowRoot,f=a.unwrapIfNeeded;return c}}();var Platform={};!funct ion(a){function b(a,b){var c="";return Array.prototype.forEach.call(a,function(a ){c+=a.textContent+"\n\n"}),b||(c=c.replace(n,"")),c}function c(a){var b=documen t.createElement("style");return b.textContent=a,b}function d(a){var b=c(a);docum ent.head.appendChild(b);var d=b.sheet.cssRules;return b.parentNode.removeChild(b ),d}function e(a){for(var b=0,c=[];b<a.length;b++)c.push(a[b].cssText);return c. join("\n\n")}function f(a){a&&g().appendChild(document.createTextNode(a))}functi on g(){return h||(h=document.createElement("style"),h.setAttribute("ShadowCSSShi m","")),h}var h,i={strictStyling:!1,registry:{},shimStyling:function(a,b,d){var e=this.isTypeExtension(d),g=this.registerDefinition(a,b,d);this.strictStyling&&t his.applyScopeToContent(a,b),this.insertPolyfillDirectives(g.rootStyles),this.in sertPolyfillRules(g.rootStyles);var h=this.stylesToShimmedCssText(g.scopeStyles, b,e);h+=this.extractPolyfillUnscopedRules(g.rootStyles),g.shimmedStyle=c(h),a&&( a.shimmedStyle=g.shimmedStyle);for(var i,j=0,k=g.rootStyles.length;k>j&&(i=g.roo tStyles[j]);j++)i.parentNode.removeChild(i);f(h)},registerDefinition:function(a, b,c){var d=this.registry[b]={root:a,name:b,extendsName:c},e=a?a.querySelectorAll ("style"):[];e=e?Array.prototype.slice.call(e,0):[],d.rootStyles=e,d.scopeStyles =d.rootStyles;var f=this.registry[d.extendsName];return!f||a&&!a.querySelector(" shadow")||(d.scopeStyles=f.scopeStyles.concat(d.scopeStyles)),d},isTypeExtension :function(a){return a&&a.indexOf("-")<0},applyScopeToContent:function(a,b){a&&(A rray.prototype.forEach.call(a.querySelectorAll("*"),function(a){a.setAttribute(b ,"")}),Array.prototype.forEach.call(a.querySelectorAll("template"),function(a){t his.applyScopeToContent(a.content,b)},this))},insertPolyfillDirectives:function( a){a&&Array.prototype.forEach.call(a,function(a){a.textContent=this.insertPolyfi llDirectivesInCssText(a.textContent)},this)},insertPolyfillDirectivesInCssText:f unction(a){return a.replace(o,function(a,b){return b.slice(0,-2)+"{"})},insertPo lyfillRules:function(a){a&&Array.prototype.forEach.call(a,function(a){a.textCont ent=this.insertPolyfillRulesInCssText(a.textContent)},this)},insertPolyfillRules InCssText:function(a){return a.replace(p,function(a,b){return b.slice(0,-1)})},e xtractPolyfillUnscopedRules:function(a){var b="";return a&&Array.prototype.forEa ch.call(a,function(a){b+=this.extractPolyfillUnscopedRulesFromCssText(a.textCont ent)+"\n\n"},this),b},extractPolyfillUnscopedRulesFromCssText:function(a){for(va r b,c="";b=q.exec(a);)c+=b[1].slice(0,-1)+"\n\n";return c},stylesToShimmedCssTex t:function(a,b,c){return this.shimAtHost(a,b,c)+this.shimScoping(a,b,c)},shimAtH ost:function(a,b,c){return a?this.convertAtHostStyles(a,b,c):void 0},convertAtHo stStyles:function(a,c,f){var g=b(a),h=this;return g=g.replace(j,function(a,b){re turn h.scopeHostCss(b,c,f)}),g=e(this.findAtHostRules(d(g),new RegExp("^"+c+u,"m ")))},scopeHostCss:function(a,b,c){var d=this;return a.replace(k,function(a,e,f) {return d.scopeHostSelector(e,b,c)+" "+f+"\n "})},scopeHostSelector:function( a,b,c){var d=[],e=a.split(","),f="[is="+b+"]";return e.forEach(function(a){a=a.t rim(),a.match(l)?a=a.replace(l,c?f+"$1$3":b+"$1$3"):a.match(m)&&(a=c?f+a:b+a),d. push(a)},this),d.join(", ")},findAtHostRules:function(a,b){return Array.prototyp e.filter.call(a,this.isHostRule.bind(this,b))},isHostRule:function(a,b){return b .selectorText&&b.selectorText.match(a)||b.cssRules&&this.findAtHostRules(b.cssRu les,a).length||b.type==CSSRule.WEBKIT_KEYFRAMES_RULE},shimScoping:function(a,b,c ){return a?this.convertScopedStyles(a,b,c):void 0},convertScopedStyles:function( a,c,e){var f=b(a).replace(j,"");f=this.insertPolyfillHostInCssText(f),f=this.con vertColonHost(f),f=this.convertPseudos(f),f=this.convertParts(f),f=this.convertC ombinators(f);var g=d(f);return f=this.scopeRules(g,c,e)},convertPseudos:functio n(a){return a.replace(r," [pseudo=$1]")},convertParts:function(a){return a.repla ce(s," [part=$1]")},convertColonHost:function(a){return a.replace(t,function(a,b ,c,d){return c?y+c+d+", "+c+" "+b+d:b+d})},convertCombinators:function(a){return a.replace("^^"," ").replace("^"," ")},scopeRules:function(a,b,c){var d="";retur n Array.prototype.forEach.call(a,function(a){a.selectorText&&a.style&&a.style.cs sText?(d+=this.scopeSelector(a.selectorText,b,c,this.strictStyling)+" {\n ",d+=this.propertiesFromRule(a)+"\n}\n\n"):a.media?(d+="@media "+a.media.mediaTe xt+" {\n",d+=this.scopeRules(a.cssRules,b),d+="\n}\n\n"):a.cssText&&(d+=a.cssTex t+"\n\n")},this),d},scopeSelector:function(a,b,c,d){var e=[],f=a.split(",");retu rn f.forEach(function(a){a=a.trim(),this.selectorNeedsScoping(a,b,c)&&(a=d?this. applyStrictSelectorScope(a,b):this.applySimpleSelectorScope(a,b,c)),e.push(a)},t his),e.join(", ")
3 },propertiesFromRule:function(a){var b=a.style.cssText;return a.style.content&&! a.style.content.match(/['"]+/)&&(b="content: '"+a.style.content+"';\n"+a.style.c ssText.replace(/content:[^;]*;/g,"")),b}},j=/@host[^{]*{(([^}]*?{[^{]*?}[\s\S]*? )+)}/gim,k=/([^{]*)({[\s\S]*?})/gim,l=/(.*)((?:\*)|(?:\:scope))(.*)/,m=/^[.\[:]/ ,n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,o=/\/\*\s*@polyfill ([^*]*\*+([^/*][^*]*\ *+)*\/)([^{]*?){/gim,p=/\/\*\s@polyfill-rule([^*]*\*+([^/*][^*]*\*+)*)\//gim,q=/ \/\*\s@polyfill-unscoped-rule([^*]*\*+([^/*][^*]*\*+)*)\//gim,r=/::(x-[^\s{,(]*) /gim,s=/::part\(([^)]*)\)/gim,t=/(-host)(?:\(([^)]*)\))?([^,{]*)/gim,u="([>\\s~+ [.,{:][\\s\\S]*)?$",v=/@host/gim,w=/\:host/gim,x="-host",y="-host-no-combinator" ,z=/-host/gim;if(window.ShadowDOMPolyfill){f("style { display: none !important; }\n");var A=document.querySelector("head");A.insertBefore(g(),A.childNodes[0])}a .ShadowCSS=i}(window.Platform)} 3 },selectorNeedsScoping:function(a,b,c){var d=c?b:"\\[is="+b+"\\]",e=new RegExp(" ^("+d+")"+u,"m");return!a.match(e)},applySimpleSelectorScope:function(a,b,c){var d=c?"[is="+b+"]":b;return a.match(z)?(a=a.replace(y,d),a.replace(z,d+" ")):d+" "+a},applyStrictSelectorScope:function(a,b){var c=[" ",">","+","~"],d=a,e="["+b+ "]";return c.forEach(function(a){var b=d.split(a);d=b.map(function(a){var b=a.tr im().replace(z,"");return b&&c.indexOf(b)<0&&b.indexOf(e)<0&&(a=b.replace(/([^:] *)(:*)(.*)/,"$1"+e+"$2$3")),a}).join(a)}),d},insertPolyfillHostInCssText:functio n(a){return a.replace(v,x).replace(w,x)},propertiesFromRule:function(a){var b=a. style.cssText;return a.style.content&&!a.style.content.match(/['"]+/)&&(b="conte nt: '"+a.style.content+"';\n"+a.style.cssText.replace(/content:[^;]*;/g,"")),b}} ,j=/@host[^{]*{(([^}]*?{[^{]*?}[\s\S]*?)+)}/gim,k=/([^{]*)({[\s\S]*?})/gim,l=/(. *)((?:\*)|(?:\:scope))(.*)/,m=/^[.\[:]/,n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,o= /\/\*\s*@polyfill ([^*]*\*+([^/*][^*]*\*+)*\/)([^{]*?){/gim,p=/\/\*\s@polyfill-r ule([^*]*\*+([^/*][^*]*\*+)*)\//gim,q=/\/\*\s@polyfill-unscoped-rule([^*]*\*+([^ /*][^*]*\*+)*)\//gim,r=/::(x-[^\s{,(]*)/gim,s=/::part\(([^)]*)\)/gim,t=/(-host)( ?:\(([^)]*)\))?([^,{]*)/gim,u="([>\\s~+[.,{:][\\s\\S]*)?$",v=/@host/gim,w=/\:hos t/gim,x="-host",y="-host-no-combinator",z=/-host/gim;if(window.ShadowDOMPolyfill ){f("style { display: none !important; }\n");var A=document.querySelector("head" );A.insertBefore(g(),A.childNodes[0])}a.ShadowCSS=i}(window.Platform)}
OLDNEW
« no previous file with comments | « dart/pkg/shadow_dom/lib/shadow_dom.debug.js ('k') | dart/sdk/lib/async/future_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698