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

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

Issue 84163002: update shadow_dom (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
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 | « pkg/shadow_dom/lib/shadow_dom.debug.js ('k') | pkg/shadow_dom/tool/build.json » ('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){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}(),window.ShadowDOMPolyfill={},function(a){"use strict";function b(a){if(!a) throw new Error("Assertion failed")}function c(a,b){return Object.getOwnProperty Names(b).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDesc riptor(b,c))}),a}function d(a,b){return Object.getOwnPropertyNames(b).forEach(fu nction(c){switch(c){case"arguments":case"caller":case"length":case"name":case"pr ototype":case"toString":return}Object.defineProperty(a,c,Object.getOwnPropertyDe scriptor(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)}function j(a){return/^ \w[a-zA-Z_0-9]*$/.test(a)}function k(a){return G&&j(a)?new Function("return this .impl."+a):function(){return this.impl[a]}}function l(a){return G&&j(a)?new Func tion("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)"):func tion(){return this.impl[a].apply(this.impl,arguments)}}function 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&&"f unction"==typeof f.value)return c[e]=m(e),void 0;var n=i(e);h=n?a.getEventHandle rGetter(e):k(e),(f.writable||f.set)&&(j=n?a.getEventHandlerSetter(e):l(e)),Objec t.defineProperty(c,e,{get:h,set:j,configurable:f.configurable,enumerable:f.enume rable})}})}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)}f unction q(a,b){return D.get(b.prototype)===a}function r(a){var b=Object.getProto typeOf(a),c=f(b),d=s(c);return p(b,d,a),d}function s(a){function b(b){a.call(thi s,b)}return b.prototype=Object.create(a.prototype),b.prototype.constructor=b,b}f unction t(a){return a instanceof F.EventTarget||a instanceof F.Event||a instance of F.Range||a instanceof F.DOMImplementation||a instanceof F.CanvasRenderingCont ext2D||F.WebGLRenderingContext&&a instanceof F.WebGLRenderingContext}function u( a){return a instanceof N||a instanceof M||a instanceof O||a instanceof P||a inst anceof 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){retur n 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(thi s.impl[b])})}function C(a,b){a.forEach(function(a){b.forEach(function(b){a.proto type[b]=function(){var a=y(this);return a[b].apply(a,arguments)}})})}var D=new W eakMap,E=new WeakMap,F=Object.create(null),G=!("securityPolicy"in document)||doc ument.securityPolicy.allowsEval;if(G)try{var H=new Function("","return true;");G =H()}catch(I){G=!1}Object.getOwnPropertyNames(window);var J=/Firefox/.test(navig ator.userAgent),K={get:function(){},set:function(){},configurable:!0,enumerable: !0},L=window.DOMImplementation,M=window.Event,N=window.Node,O=window.Window,P=wi ndow.Range,Q=window.CanvasRenderingContext2D,R=window.WebGLRenderingContext;a.as sert=b,a.constructorTable=D,a.defineGetter=A,a.defineWrapGetter=B,a.forwardMetho dsToWrapper=C,a.isWrapperFor=q,a.mixin=c,a.nativePrototypeTable=E,a.oneOf=e,a.re gisterObject=r,a.registerWrapper=o,a.rewrap=z,a.unwrap=w,a.unwrapIfNeeded=x,a.wr ap=v,a.wrapIfNeeded=y,a.wrappers=F}(window.ShadowDOMPolyfill),function(a){"use s trict";function b(){g=!1;var a=f.slice(0);f=[];for(var b=0;b<a.length;b++)a[b]() }function c(a){f.push(a),g||(g=!0,d(b,0))}var d,e=window.MutationObserver,f=[],g =!1;if(e){var h=1,i=new e(b),j=document.createTextNode(h);i.observe(j,{character Data:!0}),d=function(){h=(h+1)%2,j.data=h}}else d=window.setImmediate||window.se tTimeout;a.setEndOfMicrotask=c}(window.ShadowDOMPolyfill),function(a){"use stric t";function b(){p||(k(c),p=!0)}function c(){p=!1;do for(var a=o.slice(),b=!1,c=0 ;c<a.length;c++){var d=a[c],e=d.takeRecords();f(d),e.length&&(d.callback_(e,d),b =!0)}while(b)}function d(a,b){this.type=a,this.target=b,this.addedNodes=new m.No deList,this.removedNodes=new m.NodeList,this.previousSibling=null,this.nextSibli ng=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null} function e(a,b){for(;a;a=a.parentNode){var c=n.get(a);if(c)for(var d=0;d<c.lengt h;d++){var e=c[d];e.options.subtree&&e.addTransientObserver(b)}}}function f(a){f or(var b=0;b<a.nodes_.length;b++){var c=a.nodes_[b],d=n.get(c);if(!d)return;for( var e=0;e<d.length;e++){var f=d[e];f.observer===a&&f.removeTransientObservers()} }}function g(a,c,e){for(var f=Object.create(null),g=Object.create(null),h=a;h;h= h.parentNode){var i=n.get(h);if(i)for(var j=0;j<i.length;j++){var k=i[j],l=k.opt ions;if(!(h!==a&&!l.subtree||"attributes"===c&&!l.attributes||"attributes"===c&& l.attributeFilter&&(null!==e.namespace||-1===l.attributeFilter.indexOf(e.name))| |"characterData"===c&&!l.characterData||"childList"===c&&!l.childList)){var m=k. observer;f[m.uid_]=m,("attributes"===c&&l.attributeOldValue||"characterData"===c &&l.characterDataOldValue)&&(g[m.uid_]=e.oldValue)}}}var o=!1;for(var p in f){va r m=f[p],q=new d(c,a);"name"in e&&"namespace"in e&&(q.attributeName=e.name,q.att ributeNamespace=e.namespace),e.addedNodes&&(q.addedNodes=e.addedNodes),e.removed Nodes&&(q.removedNodes=e.removedNodes),e.previousSibling&&(q.previousSibling=e.p reviousSibling),e.nextSibling&&(q.nextSibling=e.nextSibling),void 0!==g[p]&&(q.o ldValue=g[p]),m.records_.push(q),o=!0}o&&b()}function h(a){if(this.childList=!!a .childList,this.subtree=!!a.subtree,this.attributes="attributes"in a||!("attribu teOldValue"in a||"attributeFilter"in a)?!!a.attributes:!0,this.characterData="ch aracterDataOldValue"in a&&!("characterData"in a)?!0:!!a.characterData,!this.attr ibutes&&(a.attributeOldValue||"attributeFilter"in a)||!this.characterData&&a.cha racterDataOldValue)throw new TypeError;if(this.characterData=!!a.characterData,t his.attributeOldValue=!!a.attributeOldValue,this.characterDataOldValue=!!a.chara cterDataOldValue,"attributeFilter"in a){if(null==a.attributeFilter||"object"!=ty peof a.attributeFilter)throw new TypeError;this.attributeFilter=q.call(a.attribu teFilter)}else this.attributeFilter=null}function i(a){this.callback_=a,this.nod es_=[],this.records_=[],this.uid_=++r,o.push(this)}function j(a,b,c){this.observ er=a,this.target=b,this.options=c,this.transientObservedNodes=[]}var k=a.setEndO fMicrotask,l=a.wrapIfNeeded,m=a.wrappers,n=new WeakMap,o=[],p=!1,q=Array.prototy pe.slice,r=0;i.prototype={observe:function(a,b){a=l(a);var c,d=new h(b),e=n.get( a);e||n.set(a,e=[]);for(var f=0;f<e.length;f++)e[f].observer===this&&(c=e[f],c.r emoveTransientObservers(),c.options=d);c||(c=new j(this,a,d),e.push(c),this.node s_.push(a))},disconnect:function(){this.nodes_.forEach(function(a){for(var b=n.g et(a),c=0;c<b.length;c++){var d=b[c];if(d.observer===this){b.splice(c,1);break}} },this),this.records_=[]},takeRecords:function(){var a=this.records_;return this .records_=[],a}},j.prototype={addTransientObserver:function(a){if(a!==this.targe t){this.transientObservedNodes.push(a);var b=n.get(a);b||n.set(a,b=[]),b.push(th is)}},removeTransientObservers:function(){var a=this.transientObservedNodes;this .transientObservedNodes=[];for(var b=0;b<a.length;b++)for(var c=a[b],d=n.get(c), e=0;e<d.length;e++)if(d[e]===this){d.splice(e,1);break}}},a.enqueueMutation=g,a. registerTransientObservers=e,a.wrappers.MutationObserver=i,a.wrappers.MutationRe cord=d}(window.ShadowDOMPolyfill),function(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.shadowRoot}function e(a){var b;return a.pare ntNode||(b=a.defaultView)&&N(b)||null}function f(f,g,h){if(h.length)return h.shi ft();if(b(f))return j(f)||f.host;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){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({target:l,currentTarget: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(a,d){for(var e=[];a;){for(var g=[],i=d,j=void 0;i;){var l=null;if(g. length){if(c(i)&&(l=h(g),k(j))){var n=g[g.length-1];g.push(n)}}else g.push(i);if (m(i,a))return g[g.length-1];b(i)&&g.pop(),j=i,i=f(i,l,e)}a=b(a)?a.host:a.parent Node}}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(a,b){return a===b?!0:a instanceof O.ShadowRoot?n(l(a.host) ,b):!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){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}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.CAPTURIN G_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))contin ue;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)return!0;if("relatedTarget"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("function"==typeof n.handler?n.ha ndler.call(e,b):n.handler.handleEvent(b),W.get(b))return!1}catch(o){window.onerr or?window.onerror(o.message):console.error(o,o.stack)}}if(l){var p=f.slice();f.l ength=0;for(var m=0;m<p.length;m++)p[m].removed||f.push(p[m])}return!V.get(b)}fu nction w(a,b,c){this.type=a,this.handler=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.create(a,{relatedTarget:{value:M(a.relatedTarge t)}}):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.prototype=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 function(){arguments[b]=M(argument s[b]);var c=M(this);c[a].apply(c,arguments)}}function B(a,b,c,d){if(jb)return ne w 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}function E(a){return a instanceof O.ShadowRoot&&(a=a.host),M(a)}function F(a){J(a,mb)}function G(b,c,d,e){a.rende rAllPending();for(var f=N(nb.call(c.impl,d,e)),h=g(f,this),i=0;i<h.length;i++){v ar j=h[i];if(j.currentTarget===b)return j.target}return null}function H(a){retur n function(){var b=X.get(this);return b&&b[a]&&b[a].value||null}}function I(a){v ar 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&&this.removeEventListener(b,e.wrapped,!1),"functio n"==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.addEventListene r(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 WeakMa p,Q=new WeakMap,R=new WeakMap,S=new WeakMap,T=new WeakMap,U=new WeakMap,V=new We akMap,W=new WeakMap,X=new WeakMap,Y=new WeakMap,Z=0,$=window.MutationEvent;w.pro totype={equals:function(a){return this.handler===a.handler&&this.type===a.type&& this.capture===a.capture},get removed(){return null===this.handler},remove:funct ion(){this.handler=null}};var _=window.Event;x.prototype={get target(){return R. get(this)},get currentTarget(){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.leng th-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:functi on(){V.set(this,!0)},stopImmediatePropagation:function(){V.set(this,!0),W.set(th is,!0)}},L(_,x,document.createEvent("Event"));var ab=z("UIEvent",x),bb=z("Custom Event",x),cb={get relatedTarget(){return T.get(this)||N(M(this).relatedTarget)}} ,db=K({initMouseEvent:A("initMouseEvent",14)},cb),eb=K({initFocusEvent:A("initFo cusEvent",5)},cb),fb=z("MouseEvent",ab,db),gb=z("FocusEvent",ab,eb),hb=z("Mutati onEvent",x,{initMutationEvent:A("initMutationEvent",3),get relatedNode(){return N(this.impl.relatedNode)}}),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},"Eve nt"),kb("MouseEvent",{screenX:0,screenY: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=["addEventListene r","removeEventListener","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)}},removeEvent Listener: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()));if(f&&1===e){var h=E(this);h.removeEventListener_(a,q,!0)}}},dis patchEvent:function(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.elem entFromPoint=G,a.getEventHandlerGetter=H,a.getEventHandlerSetter=I,a.muteMutatio nEvents=o,a.unmuteMutationEvents=p,a.wrapEventTargetMethods=F,a.wrappers.CustomE vent=bb,a.wrappers.Event=x,a.wrappers.EventTarget=D,a.wrappers.FocusEvent=gb,a.w rappers.MouseEvent=fb,a.wrappers.MutationEvent=hb,a.wrappers.UIEvent=ab}(window. ShadowDOMPolyfill),function(a){"use strict";function b(a,b){Object.definePropert y(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.prototype[b]=function(){return d(this.impl[b].app ly(this.impl,arguments))}}var f=a.wrap;c.prototype={item:function(a){return this [a]}},b(c.prototype,"item"),a.wrappers.NodeList=c,a.addWrapNodeListMethod=e,a.wr apNodeList=d}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){v (a instanceof s)}function c(a){var b=new u;return b[0]=a,b.length=1,b}function d (a,b,c){x(b,"childList",{removedNodes:c,previousSibling:a.previousSibling,nextSi bling:a.nextSibling})}function e(a,b){x(a,"childList",{removedNodes:b})}function f(a,b,d,e){if(a instanceof DocumentFragment){var f=h(a);E=!0;for(var g=f.length -1;g>=0;g--)a.removeChild(f[g]),f[g].parentNode_=b;E=!1;for(var g=0;g<f.length;g ++)f[g].previousSibling_=f[g-1]||d,f[g].nextSibling_=f[g+1]||e;return d&&(d.next Sibling_=f[0]),e&&(e.previousSibling_=f[f.length-1]),f}var f=c(a),i=a.parentNode ;return i&&i.removeChild(a),a.parentNode_=b,a.previousSibling_=d,a.nextSibling_= e,d&&(d.nextSibling_=a),e&&(e.previousSibling_=a),f}function g(a){if(a instanceo f DocumentFragment)return h(a);var b=c(a),e=a.parentNode;return e&&d(a,e,b),b}fu nction h(a){for(var b=new u,c=0,d=a.firstChild;d;d=d.nextSibling)b[c++]=d; 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)},setValu eFrom: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={ internalCallback:function(a){this.closed||this.reporting&&this.check(a)&&(this.r eport(),this.testingResults&&(this.testingResults.anyChanged=!0))},close:functio n(){this.closed||(this.object&&"function"==typeof this.object.close&&this.object .close(),this.disconnect(),this.object=void 0,this.closed=!0)},deliver:function( a){this.closed||(K?(this.testingResults=a,Object.deliverChangeRecords(this.bound InternalCallback),this.testingResults=void 0):k(this))},report:function(){this.r eporting&&(this.sync(!1),this.callback&&(this.reportArgs.push(this.token),this.i nvokeCallback(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))}}, reset:function(){this.closed||(K&&(this.reporting=!1,Object.deliverChangeRecords (this.boundInternalCallback),this.reporting=!0),this.sync(!0))}};var Z,$=!K||a.f orceCollectObservers;p._allObserversCount=0,$&&(Z=[]);var _=!1,ab="function"==ty peof Object.deliverAllChangeRecords;a.Platform=a.Platform||{},a.Platform.perform MicrotaskCheckpoint=function(){if(!_){if(ab)return Object.deliverAllChangeRecord s(),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. clearObservers=function(){Z=[]}),r.prototype=N({__proto__:p.prototype,connect:fu nction(){K&&Object.observe(this.object,this.boundInternalCallback)},sync:functio n(){K||(this.oldObject=o(this.object))},check:function(a){var b,c;if(K){if(!a)re turn!1;c={},b=x(this.object,a,c)}else c=this.oldObject,b=n(this.object,this.oldO bject);return m(b)?!1:(this.reportArgs=[b.added||{},b.removed||{},b.changed||{}] ,this.reportArgs.push(function(a){return c[a]}),!0)},disconnect:function(){K?thi s.object&&Object.unobserve(this.object,this.boundInternalCallback):this.oldObjec t=void 0}}),s.prototype=N({__proto__:r.prototype,connect:function(){K&&Array.obs erve(this.object,this.boundInternalCallback)},sync:function(){K||(this.oldObject =this.object.slice())},check:function(a){var b;if(K){if(!a)return!1;b=E(this.obj ect,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.applySplices=functi on(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 bb=Object.getPrototypeOf({}),cb=Object.getPrototypeOf([]);t.prototype={reset:fu nction(){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]=t his.isObserved,this.observe(Object.getPrototypeOf(a)))}},cleanup:function(){for( var 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.callbac k),b+=2}this.arr.length=a}},u.prototype=N({__proto__:p.prototype,connect:functio n(){K&&(this.observedSet=new t(this.boundInternalCallback))},disconnect:function (){this.value=void 0,this.value_=void 0,this.observedSet&&(this.observedSet.rese t(),this.observedSet.cleanup(),this.observedSet=void 0)},check:function(){return this.observedSet&&this.observedSet.reset(),this.value_=this.path.getValueFrom(t his.object,this.observedSet),this.observedSet&&this.observedSet.cleanup(),g(this .value_,this.oldValue_)?!1:(this.value=this.valueFn?this.valueFn(this.value_):th is.value_,this.reportArgs=[this.value,this.oldValue],!0)},sync:function(a){a&&(t his.observedSet&&this.observedSet.reset(),this.value_=this.path.getValueFrom(thi s.object,this.observedSet),this.value=this.valueFn?this.valueFn(this.value_):thi s.value_,this.observedSet&&this.observedSet.cleanup()),this.oldValue_=this.value _,this.oldValue=this.value},setValue:function(a){this.path&&("function"==typeof this.setValueFn&&(a=this.setValueFn(a)),this.path.setValueFrom(this.object,a))}} ),v.prototype=N({__proto__:u.prototype,addPath:function(a,b){if(this.started)thr ow 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:func tion(){this.started=!0,this.connect(),this.sync(!0)},getValues:function(){this.o bservedSet&&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 .observedSet),f=this.values[b/2];if(!g(e,f)){if(!a&&!this.valueFn){this.oldValue s=this.oldValues||[],this.changeFlags=this.changeFlags||[];for(var h=0;h<this.va lues.length;h++)this.oldValues[h]=this.values[h],this.changeFlags[h]=!1}this.val ueFn||(this.changeFlags[b/2]=!0),this.values[b/2]=e,a=!0}}}return this.observedS et&&this.observedSet.cleanup(),a},check:function(){if(this.getValues()){if(this. valueFn){if(this.value=this.valueFn(this.values),g(this.value,this.oldValue))ret urn!1;this.reportArgs=[this.value,this.oldValue]}else this.reportArgs=[this.valu es,this.oldValues,this.changeFlags,this.observed];return!0}},sync:function(a){a& &(this.getValues(),this.valueFn&&(this.value=this.valueFn(this.values))),this.va lueFn&&(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.cl ose&&b.close()}this.observed=void 0,this.values=void 0}p.prototype.close.call(th is)}});var db={};db[F]=!0,db[G]=!0,db[I]=!0,u.defineProperty=function(a,b,c,d){d =j(d);var e=w(a,b),f=new u(c,d,function(a,b){e&&e(G,b)});return Object.definePro perty(a,b,{get:function(){return d.getValueFrom(c)},set:function(a){d.setValueFr om(c,a)},configurable:!0}),{close:function(){var g=d.getValueFrom(c);e&&f.delive r(),f.close(),Object.defineProperty(a,b,{value:g,writable:!0,configurable:!0})}} };var eb=0,fb=1,gb=2,hb=3;z.prototype={calcEditDistances:function(a,b,c,d,e,f){f or(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;fo r(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.equa ls(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: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(eb):(e .push(fb),d=g),b--,c--):f==h?(e.push(hb),b--,d=h):(e.push(gb),c--,d=i)}else e.pu sh(hb),b--;else e.push(gb),c--;return e.reverse(),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.sharedSuffix(a,d,i-g)),b+=g,e+=g,c-=h,f-=h, c-b==0&&f-e==0)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.spliceOperationsFromEditDi stances(this.calcEditDistances(a,b,c,d,e,f)),j=void 0,l=[],m=b,n=e,o=0;o<k.lengt h;o++)switch(k[o]){case eb:j&&(l.push(j),j=void 0),m++,n++;break;case fb:j||(j=y (m,[],0)),j.addedCount++,m++,j.removed.push(d[n]),n++;break;case gb:j||(j=y(m,[] ,0)),j.addedCount++,m++;break;case hb:j||(j=y(m,[],0)),j.removed.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.l ength,e=b.length,f=0;c>f&&this.equals(a[--d],b[--e]);)f++;return f},calculateSpl ices:function(a,b){return this.calcSplices(a,0,a.length,b,0,b.length)},equals:fu nction(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.ca lculateSplices(a,b)},a.ArraySplice=z,a.ObjectObserver=r,a.PathObserver=u,a.Compo undPathObserver=v,a.Path=i,a.Observer.changeRecordTypes={add:F,update:G,reconfig ure:H,"delete":I,splice:J}}("undefined"!=typeof global&&global?global:this||wind ow),"undefined"==typeof WeakMap&&!function(){var a=Object.defineProperty,b=Date. now()%1e9,c=function(){this.name="__st"+(1e9*Math.random()>>>0)+(b++ +"__")};c.p rototype={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;return(b=a[this.name])&&b[0]== =a?b[1]:void 0},"delete":function(a){this.set(a,void 0)}},window.WeakMap=c}(),wi ndow.ShadowDOMPolyfill={},function(a){"use strict";function b(a){if(!a)throw new Error("Assertion failed")}function c(a,b){return L(b).forEach(function(c){K(a,c ,M(b,c))}),a}function d(a,b){return L(b).forEach(function(c){switch(c){case"argu ments":case"caller":case"length":case"name":case"prototype":case"toString":retur n}K(a,c,M(b,c))}),a}function e(a,b){for(var c=0;c<b.length;c++)if(b[c]in a)retur n b[c]}function f(a){var b=a.__proto__||Object.getPrototypeOf(a),c=E.get(b);if(c )return c;var d=f(b),e=t(d);return q(b,e,a),e}function g(a,b){o(a,b,!0)}function h(a,b){o(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 H&&j(a)?new Function("return thi s.impl."+a):function(){return this.impl[a]}}function l(a){return H&&j(a)?new Fun ction("v","this.impl."+a+" = v"):function(b){this.impl[a]=b}}function m(a){retur n H&&j(a)?new Function("return this.impl."+a+".apply(this.impl, arguments)"):fun ction(){return this.impl[a].apply(this.impl,arguments)}}function n(a,b){try{retu rn Object.getOwnPropertyDescriptor(a,b)}catch(c){return O}}function o(b,c,d){for (var e=L(b),f=0;f<e.length;f++){var g=e[f];if("polymerBlackList_"!==g&&!(g in c| |b.polymerBlackList_&&b.polymerBlackList_[g])){N&&b.__lookupGetter__(g);var h,j, o=n(b,g);if(d&&"function"==typeof o.value)c[g]=m(g);else{var p=i(g);h=p?a.getEve ntHandlerGetter(g):k(g),(o.writable||o.set)&&(j=p?a.getEventHandlerSetter(g):l(g )),K(c,g,{get:h,set:j,configurable:o.configurable,enumerable:o.enumerable})}}}}f unction p(a,b,c){var e=a.prototype;q(e,b,c),d(b,a)}function q(a,c,d){var e=c.pro totype;b(void 0===E.get(a)),E.set(a,c),F.set(e,a),g(a,e),d&&h(e,d),K(e,"construc tor",{value:c,configurable:!0,enumerable:!1,writable:!0})}function r(a,b){return E.get(b.prototype)===a}function s(a){var b=Object.getPrototypeOf(a),c=f(b),d=t( c);return q(b,d,a),d}function t(a){function b(b){a.call(this,b)}return b.prototy pe=Object.create(a.prototype),b.prototype.constructor=b,b}function u(a){return a instanceof G.EventTarget||a instanceof G.Event||a instanceof G.Range||a instanc eof G.DOMImplementation||a instanceof G.CanvasRenderingContext2D||G.WebGLRenderi ngContext&&a instanceof G.WebGLRenderingContext}function v(a){return a instanceo f R||a instanceof Q||a instanceof S||a instanceof T||a instanceof P||a instanceo f U||V&&a instanceof V}function w(a){return null===a?null:(b(v(a)),a.polymerWrap per_||(a.polymerWrapper_=new(f(a))(a)))}function x(a){return null===a?null:(b(u( a)),a.impl)}function y(a){return a&&u(a)?x(a):a}function z(a){return a&&!u(a)?w( a):a}function A(a,c){null!==c&&(b(v(a)),b(void 0===c||u(c)),a.polymerWrapper_=c) }function B(a,b,c){K(a.prototype,b,{get:c,configurable:!0,enumerable:!0})}functi on C(a,b){B(a,b,function(){return w(this.impl[b])})}function D(a,b){a.forEach(fu nction(a){b.forEach(function(b){a.prototype[b]=function(){var a=z(this);return a [b].apply(a,arguments)}})})}var E=new WeakMap,F=new WeakMap,G=Object.create(null ),H=!("securityPolicy"in document)||document.securityPolicy.allowsEval;if(H)try{ var I=new Function("","return true;");H=I()}catch(J){H=!1}var K=Object.definePro perty,L=Object.getOwnPropertyNames,M=Object.getOwnPropertyDescriptor;L(window);v ar N=/Firefox/.test(navigator.userAgent),O={get:function(){},set:function(){},co nfigurable:!0,enumerable:!0},P=window.DOMImplementation,Q=window.Event,R=window. Node,S=window.Window,T=window.Range,U=window.CanvasRenderingContext2D,V=window.W ebGLRenderingContext;a.assert=b,a.constructorTable=E,a.defineGetter=B,a.defineWr apGetter=C,a.forwardMethodsToWrapper=D,a.isWrapperFor=r,a.mixin=c,a.nativeProtot ypeTable=F,a.oneOf=e,a.registerObject=s,a.registerWrapper=p,a.rewrap=A,a.unwrap= x,a.unwrapIfNeeded=y,a.wrap=w,a.wrapIfNeeded=z,a.wrappers=G}(window.ShadowDOMPol yfill),function(a){"use strict";function b(){g=!1;var a=f.slice(0);f=[];for(var b=0;b<a.length;b++)a[b]()}function c(a){f.push(a),g||(g=!0,d(b,0))}var d,e=windo w.MutationObserver,f=[],g=!1;if(e){var h=1,i=new e(b),j=document.createTextNode( h);i.observe(j,{characterData:!0}),d=function(){h=(h+1)%2,j.data=h}}else d=windo w.setImmediate||window.setTimeout;a.setEndOfMicrotask=c}(window.ShadowDOMPolyfil l),function(a){"use strict";function b(){p||(k(c),p=!0)}function c(){p=!1;do for (var a=o.slice(),b=!1,c=0;c<a.length;c++){var d=a[c],e=d.takeRecords();f(d),e.le ngth&&(d.callback_(e,d),b=!0)}while(b)}function d(a,b){this.type=a,this.target=b ,this.addedNodes=new m.NodeList,this.removedNodes=new m.NodeList,this.previousSi bling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace =null,this.oldValue=null}function e(a,b){for(;a;a=a.parentNode){var c=n.get(a);i f(c)for(var d=0;d<c.length;d++){var e=c[d];e.options.subtree&&e.addTransientObse rver(b)}}}function f(a){for(var b=0;b<a.nodes_.length;b++){var c=a.nodes_[b],d=n .get(c);if(!d)return;for(var e=0;e<d.length;e++){var f=d[e];f.observer===a&&f.re moveTransientObservers()}}}function g(a,c,e){for(var f=Object.create(null),g=Obj ect.create(null),h=a;h;h=h.parentNode){var i=n.get(h);if(i)for(var j=0;j<i.lengt h;j++){var k=i[j],l=k.options;if((h===a||l.subtree)&&!("attributes"===c&&!l.attr ibutes||"attributes"===c&&l.attributeFilter&&(null!==e.namespace||-1===l.attribu teFilter.indexOf(e.name))||"characterData"===c&&!l.characterData||"childList"=== c&&!l.childList)){var m=k.observer;f[m.uid_]=m,("attributes"===c&&l.attributeOld Value||"characterData"===c&&l.characterDataOldValue)&&(g[m.uid_]=e.oldValue)}}}v ar o=!1;for(var p in f){var m=f[p],q=new d(c,a);"name"in e&&"namespace"in e&&(q. attributeName=e.name,q.attributeNamespace=e.namespace),e.addedNodes&&(q.addedNod es=e.addedNodes),e.removedNodes&&(q.removedNodes=e.removedNodes),e.previousSibli ng&&(q.previousSibling=e.previousSibling),e.nextSibling&&(q.nextSibling=e.nextSi bling),void 0!==g[p]&&(q.oldValue=g[p]),m.records_.push(q),o=!0}o&&b()}function h(a){if(this.childList=!!a.childList,this.subtree=!!a.subtree,this.attributes="a ttributes"in a||!("attributeOldValue"in a||"attributeFilter"in a)?!!a.attributes :!0,this.characterData="characterDataOldValue"in a&&!("characterData"in a)?!0:!! a.characterData,!this.attributes&&(a.attributeOldValue||"attributeFilter"in a)|| !this.characterData&&a.characterDataOldValue)throw new TypeError;if(this.charact erData=!!a.characterData,this.attributeOldValue=!!a.attributeOldValue,this.chara cterDataOldValue=!!a.characterDataOldValue,"attributeFilter"in a){if(null==a.att ributeFilter||"object"!=typeof a.attributeFilter)throw new TypeError;this.attrib uteFilter=q.call(a.attributeFilter)}else this.attributeFilter=null}function i(a) {this.callback_=a,this.nodes_=[],this.records_=[],this.uid_=++r,o.push(this)}fun ction j(a,b,c){this.observer=a,this.target=b,this.options=c,this.transientObserv edNodes=[]}var k=a.setEndOfMicrotask,l=a.wrapIfNeeded,m=a.wrappers,n=new WeakMap ,o=[],p=!1,q=Array.prototype.slice,r=0;i.prototype={observe:function(a,b){a=l(a) ;var c,d=new h(b),e=n.get(a);e||n.set(a,e=[]);for(var f=0;f<e.length;f++)e[f].ob server===this&&(c=e[f],c.removeTransientObservers(),c.options=d);c||(c=new j(thi s,a,d),e.push(c),this.nodes_.push(a))},disconnect:function(){this.nodes_.forEach (function(a){for(var b=n.get(a),c=0;c<b.length;c++){var d=b[c];if(d.observer===t his){b.splice(c,1);break}}},this),this.records_=[]},takeRecords:function(){var a =this.records_;return this.records_=[],a}},j.prototype={addTransientObserver:fun ction(a){if(a!==this.target){this.transientObservedNodes.push(a);var b=n.get(a); b||n.set(a,b=[]),b.push(this)}},removeTransientObservers:function(){var a=this.t ransientObservedNodes;this.transientObservedNodes=[];for(var b=0;b<a.length;b++) for(var c=a[b],d=n.get(c),e=0;e<d.length;e++)if(d[e]===this){d.splice(e,1);break }}},a.enqueueMutation=g,a.registerTransientObservers=e,a.wrappers.MutationObserv er=i,a.wrappers.MutationRecord=d}(window.ShadowDOMPolyfill),function(a){"use str ict";function b(a){return a instanceof O.ShadowRoot}function c(a){var b=a.localN ame;return"content"===b||"shadow"===b}function d(a){return!!a.shadowRoot}functio n 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)||f.host;var i=a.eventParentsT able.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.leng th;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({target:l,currentTarget: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(a,d){for(var e=[];a;){for(var g=[],i=d,j=v oid 0;i;){var l=null;if(g.length){if(c(i)&&(l=h(g),k(j))){var n=g[g.length-1];g. push(n)}}else g.push(i);if(m(i,a))return g[g.length-1];b(i)&&g.pop(),j=i,i=f(i,l ,e)}a=b(a)?a.host:a.parentNode}}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(a,b){return a===b?!0:a instanceo f O.ShadowRoot?n(l(a.host),b):!1}function o(b){if(!Q.get(b)){Q.set(b,!0),a.rende rAllPending();var c=N(b.target),d=N(b);return p(d,c)}}function p(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),q(a,c)&&r(a,c)&&s(a,c),U.set(a,v.NONE),S.set(a,null),a.defaultPrev ented}function q(a,b){for(var c,d=b.length-1;d>0;d--){var e=b[d].target,f=b[d].c urrentTarget;if(e!==f&&(c=v.CAPTURING_PHASE,!t(b[d],a,c)))return!1}return!0}func tion r(a,b){var c=v.AT_TARGET;return t(b[0],a,c)}function s(a,b){for(var c,d=a.b ubbles,e=1;e<b.length;e++){var f=b[e].target,g=b[e].currentTarget;if(f===g)c=v.A T_TARGET;else{if(!d||W.get(a))continue;c=v.BUBBLING_PHASE}if(!t(b[e],a,c))return }}function t(a,b,c){var d=a.target,e=a.currentTarget,f=P.get(e);if(!f)return!0;i f("relatedTarget"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.ty pe!==k||!n.capture&&c===v.CAPTURING_PHASE||n.capture&&c===v.BUBBLING_PHASE))try{ if("function"==typeof n.handler?n.handler.call(e,b):n.handler.handleEvent(b),W.g et(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].remo ved||f.push(p[m])}return!V.get(b)}function u(a,b,c){this.type=a,this.handler=b,t his.capture=Boolean(c)}function v(a,b){return a instanceof Z?(this.impl=a,void 0 ):N(z(Z,"Event",a,b))}function w(a){return a&&a.relatedTarget?Object.create(a,{r elatedTarget:{value:M(a.relatedTarget)}}):a}function x(a,b,c){var d=window[a],e= function(b,c){return b instanceof d?(this.impl=b,void 0):N(z(d,a,b,c))};return e .prototype=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 y(a,b){retur n function(){arguments[b]=M(arguments[b]);var c=M(this);c[a].apply(c,arguments)} }function z(a,b,c,d){if(gb)return new a(c,w(d));var e=M(document.createEvent(b)) ,f=fb[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}func tion A(){v.call(this)}function B(a){return"function"==typeof a?!0:a&&a.handleEve nt}function C(a){switch(a){case"DOMAttrModified":case"DOMAttributeNameChanged":c ase"DOMCharacterDataModified":case"DOMElementNameChanged":case"DOMNodeInserted": case"DOMNodeInsertedIntoDocument":case"DOMNodeRemoved":case"DOMNodeRemovedFromDo cument":case"DOMSubtreeModified":return!0}return!1}function D(a){this.impl=a}fun ction E(a){return a instanceof O.ShadowRoot&&(a=a.host),M(a)}function F(a){J(a,j b)}function G(b,c,d,e){a.renderAllPending();for(var f=N(kb.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}r eturn 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);return function(c){var d=X.get(thi s);d||(d=Object.create(null),X.set(this,d));var e=d[a];if(e&&this.removeEventLis tener(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.return Value=d)};this.addEventListener(b,f,!1),d[a]={value:c,wrapped:f}}}}var J=a.forwa rdMethodsToWrapper,K=a.mixin,L=a.registerWrapper,M=a.unwrap,N=a.wrap,O=a.wrapper s,P=(new WeakMap,new WeakMap),Q=new WeakMap,R=new WeakMap,S=new WeakMap,T=new We akMap,U=new WeakMap,V=new WeakMap,W=new WeakMap,X=new WeakMap,Y=new WeakMap;u.pr ototype={equals:function(a){return this.handler===a.handler&&this.type===a.type& &this.capture===a.capture},get removed(){return null===this.handler},remove:func tion(){this.handler=null}};var Z=window.Event;Z.prototype.polymerBlackList_={ret urnValue:!0},v.prototype={get target(){return R.get(this)},get currentTarget(){r eturn S.get(this)},get eventPhase(){return U.get(this)},get path(){var a=new O.N odeList,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)},stopImmedia tePropagation:function(){V.set(this,!0),W.set(this,!0)}},L(Z,v,document.createEv ent("Event"));var $=x("UIEvent",v),_=x("CustomEvent",v),ab={get relatedTarget(){ return T.get(this)||N(M(this).relatedTarget)}},bb=K({initMouseEvent:y("initMouse Event",14)},ab),cb=K({initFocusEvent:y("initFocusEvent",5)},ab),db=x("MouseEvent ",$,bb),eb=x("FocusEvent",$,cb),fb=Object.create(null),gb=function(){try{new win dow.MouseEvent("click")}catch(a){return!1}return!0}();if(!gb){var hb=function(a, b,c){if(c){var d=fb[c];b=K(K({},d),b)}fb[a]=b};hb("Event",{bubbles:!1,cancelable :!1}),hb("CustomEvent",{detail:null},"Event"),hb("UIEvent",{view:null,detail:0}, "Event"),hb("MouseEvent",{screenX:0,screenY:0,clientX:0,clientY:0,ctrlKey:!1,alt Key:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null},"UIEvent"),hb("FocusE vent",{relatedTarget:null},"UIEvent")}A.prototype=Object.create(v.prototype),K(A .prototype,{get returnValue(){return this.impl.returnValue},set returnValue(a){t his.impl.returnValue=a}});var ib=window.EventTarget,jb=["addEventListener","remo veEventListener","dispatchEvent"];[Node,Window].forEach(function(a){var b=a.prot otype;jb.forEach(function(a){Object.defineProperty(b,a+"_",{value:b[a]})})}),D.p rototype={addEventListener:function(a,b,c){if(B(b)&&!C(a)){var d=new u(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,o,!0)}},removeEventL istener: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()));if(f&&1===e){var h=E(this);h.removeEventListener_(a,o,!0)}}},disp atchEvent:function(a){var b=E(this),c=M(a);return Q.set(c,!1),b.dispatchEvent_(c )}},ib&&L(ib,D);var kb=document.elementFromPoint;a.adjustRelatedTarget=i,a.eleme ntFromPoint=G,a.getEventHandlerGetter=H,a.getEventHandlerSetter=I,a.wrapEventTar getMethods=F,a.wrappers.BeforeUnloadEvent=A,a.wrappers.CustomEvent=_,a.wrappers. Event=v,a.wrappers.EventTarget=D,a.wrappers.FocusEvent=eb,a.wrappers.MouseEvent= db,a.wrappers.UIEvent=$}(window.ShadowDOMPolyfill),function(a){"use strict";func tion 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.len gth;e>d;d++)b[d]=f(a[d]);return b.length=e,b}function e(a,b){a.prototype[b]=func tion(){return d(this.impl[b].apply(this.impl,arguments))}}var f=a.wrap;c.prototy pe={item:function(a){return this[a]}},b(c.prototype,"item"),a.wrappers.NodeList= c,a.addWrapNodeListMethod=e,a.wrapNodeList=d}(window.ShadowDOMPolyfill),function (a){"use strict";function b(a){v(a instanceof s)}function c(a){var b=new u;retur n b[0]=a,b.length=1,b}function d(a,b,c){x(b,"childList",{removedNodes:c,previous Sibling:a.previousSibling,nextSibling:a.nextSibling})}function e(a,b){x(a,"child List",{removedNodes:b})}function f(a,b,d,e){if(a instanceof DocumentFragment){va r f=h(a);E=!0;for(var g=f.length-1;g>=0;g--)a.removeChild(f[g]),f[g].parentNode_ =b;E=!1;for(var g=0;g<f.length;g++)f[g].previousSibling_=f[g-1]||d,f[g].nextSibl ing_=f[g+1]||e;return d&&(d.nextSibling_=f[0]),e&&(e.previousSibling_=f[f.length -1]),f
2 return b.length=c,e(a,b),b}function i(a){return a}function j(a){a.nodeIsInserted _()}function k(a){for(var b=0;b<a.length;b++)j(a[b])}function l(){}function m(){ }function n(a,b){var c=a.nodeType===s.DOCUMENT_NODE?a:a.ownerDocument;c!==b.owne rDocument&&c.adoptNode(b)}function o(b,c){if(c.length){var d=b.ownerDocument;if( d!==c[0].ownerDocument)for(var e=0;e<c.length;e++)a.adoptNodeNoRemove(c[e],d)}}f unction p(a,b){o(a,b);var c=b.length;if(1===c)return B(b[0]);for(var d=B(a.owner Document.createDocumentFragment()),e=0;c>e;e++)d.appendChild(B(b[e]));return d}f unction q(a){if(a.invalidateShadowRenderer()){for(var b=a.firstChild;b;){v(b.par entNode===a);var c=b.nextSibling,d=B(b),e=d.parentNode;e&&J.call(e,d),b.previous Sibling_=b.nextSibling_=b.parentNode_=null,b=c}a.firstChild_=a.lastChild_=null}e lse for(var c,f=B(a),g=f.firstChild;g;)c=g.nextSibling,J.call(f,g),g=c}function r(a){var b=a.parentNode;return b&&b.invalidateShadowRenderer()}function s(a){v(a instanceof F),t.call(this,a),this.parentNode_=void 0,this.firstChild_=void 0,th is.lastChild_=void 0,this.nextSibling_=void 0,this.previousSibling_=void 0}var t =a.wrappers.EventTarget,u=a.wrappers.NodeList,v=a.assert,w=a.defineWrapGetter,x= a.enqueueMutation,y=a.mixin,z=a.registerTransientObservers,A=a.registerWrapper,B =a.unwrap,C=a.wrap,D=a.wrapIfNeeded,E=!1,F=window.Node,G=window.DocumentFragment ;F.prototype.appendChild;var H=F.prototype.compareDocumentPosition,I=F.prototype .insertBefore,J=F.prototype.removeChild,K=F.prototype.replaceChild,L=/Trident/.t est(navigator.userAgent),M=L?function(a,b){try{J.call(a,b)}catch(c){if(!(a insta nceof G))throw c}}:function(a,b){J.call(a,b)};s.prototype=Object.create(t.protot ype),y(s.prototype,{appendChild:function(a){return this.insertBefore(a,null)},in sertBefore:function(a,c){b(a),c=c||null,c&&b(c),c&&v(c.parentNode===this);var d, e=c?c.previousSibling:this.lastChild,h=!this.invalidateShadowRenderer()&&!r(a);i f(d=h?g(a):f(a,this,e,c),h)n(this,a),I.call(this.impl,B(a),B(c));else{e||(this.f irstChild_=d[0]),c||(this.lastChild_=d[d.length-1]);var i=B(c),j=i?i.parentNode: this.impl;j?I.call(j,p(this,d),i):o(this,d)}return x(this,"childList",{addedNode s:d,nextSibling:c,previousSibling:e}),k(d),a},removeChild:function(a){if(b(a),a. parentNode!==this){var d=!1;this.childNodes;for(var e=this.firstChild;e;e=e.next Sibling)if(e===a){d=!0;break}if(!d)throw new Error("NotFoundError")}var f=B(a),g =a.nextSibling,h=a.previousSibling;if(this.invalidateShadowRenderer()){var i=thi s.firstChild,j=this.lastChild,k=f.parentNode;k&&M(k,f),i===a&&(this.firstChild_= g),j===a&&(this.lastChild_=h),h&&(h.nextSibling_=g),g&&(g.previousSibling_=h),a. previousSibling_=a.nextSibling_=a.parentNode_=void 0}else M(this.impl,f);return E||x(this,"childList",{removedNodes:c(a),nextSibling:g,previousSibling:h}),z(thi s,a),a},replaceChild:function(a,d){if(b(a),b(d),d.parentNode!==this)throw new Er ror("NotFoundError");var e,h=B(d),i=d.nextSibling,j=d.previousSibling,m=!this.in validateShadowRenderer()&&!r(a);return m?e=g(a):(i===a&&(i=a.nextSibling),e=f(a, this,j,i)),m?(n(this,a),K.call(this.impl,B(a),h)):(this.firstChild===d&&(this.fi rstChild_=e[0]),this.lastChild===d&&(this.lastChild_=e[e.length-1]),d.previousSi bling_=d.nextSibling_=d.parentNode_=void 0,h.parentNode&&K.call(h.parentNode,p(t his,e),h)),x(this,"childList",{addedNodes:e,removedNodes:c(d),nextSibling:i,prev iousSibling:j}),l(d),k(e),d},nodeIsInserted_:function(){for(var a=this.firstChil d;a;a=a.nextSibling)a.nodeIsInserted_()},hasChildNodes:function(){return null!== this.firstChild},get parentNode(){return void 0!==this.parentNode_?this.parentNo de_:C(this.impl.parentNode)},get firstChild(){return void 0!==this.firstChild_?t his.firstChild_:C(this.impl.firstChild)},get lastChild(){return void 0!==this.la stChild_?this.lastChild_:C(this.impl.lastChild)},get nextSibling(){return void 0 !==this.nextSibling_?this.nextSibling_:C(this.impl.nextSibling)},get previousSib ling(){return void 0!==this.previousSibling_?this.previousSibling_:C(this.impl.p reviousSibling)},get parentElement(){for(var a=this.parentNode;a&&a.nodeType!==s .ELEMENT_NODE;)a=a.parentNode;return a},get textContent(){for(var a="",b=this.fi rstChild;b;b=b.nextSibling)a+=b.textContent;return a},set textContent(a){var b=i (this.childNodes);if(this.invalidateShadowRenderer()){if(q(this),""!==a){var c=t his.impl.ownerDocument.createTextNode(a);this.appendChild(c)}}else this.impl.tex tContent=a;var d=i(this.childNodes);x(this,"childList",{addedNodes:d,removedNode s:b}),m(b),k(d)},get childNodes(){for(var a=new u,b=0,c=this.firstChild;c;c=c.ne xtSibling)a[b++]=c;return a.length=b,a},cloneNode:function(a){var b=C(this.impl. cloneNode(!1));if(a)for(var c=this.firstChild;c;c=c.nextSibling)b.appendChild(c. cloneNode(!0));return b},contains:function(a){if(!a)return!1;if(a=D(a),a===this) return!0;var b=a.parentNode;return b?this.contains(b):!1},compareDocumentPositio n:function(a){return H.call(this.impl,B(a))}}),w(s,"ownerDocument"),A(F,s,docume nt.createDocumentFragment()),delete s.prototype.querySelector,delete s.prototype .querySelectorAll,s.prototype=y(Object.create(t.prototype),s.prototype),a.nodeWa sAdded=j,a.nodeWasRemoved=l,a.nodesWereAdded=k,a.nodesWereRemoved=m,a.snapshotNo deList=i,a.wrappers.Node=s}(window.ShadowDOMPolyfill),function(a){"use strict";f unction b(a,c){for(var d,e=a.firstElementChild;e;){if(e.matches(c))return e;if(d =b(e,c))return d;e=e.nextElementSibling}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.nextElementS ibling;return d}var d={querySelector:function(a){return b(this,a)},querySelector All:function(a){return c(this,a,new NodeList)}},e={getElementsByTagName:function (a){return this.querySelectorAll(a)},getElementsByClassName:function(a){return t his.querySelectorAll("."+a)},getElementsByTagNameNS:function(a,b){if("*"===a)ret urn this.getElementsByTagName(b);for(var c=new NodeList,d=this.getElementsByTagN ame(b),e=0,f=0;e<d.length;e++)d[e].namespaceURI===a&&(c[f++]=d[e]);return c.leng th=f,c}};a.GetElementsByInterface=e,a.SelectorsInterface=d}(window.ShadowDOMPoly fill),function(a){"use strict";function b(a){for(;a&&a.nodeType!==Node.ELEMENT_N ODE;)a=a.nextSibling;return a}function c(a){for(;a&&a.nodeType!==Node.ELEMENT_NO DE;)a=a.previousSibling;return a}var d=a.wrappers.NodeList,e={get firstElementCh ild(){return b(this.firstChild)},get lastElementChild(){return c(this.lastChild) },get childElementCount(){for(var a=0,b=this.firstElementChild;b;b=b.nextElement Sibling)a++;return a},get children(){for(var a=new d,b=0,c=this.firstElementChil d;c;c=c.nextElementSibling)a[b++]=c;return a.length=b,a}},f={get nextElementSibl ing(){return b(this.nextSibling)},get previousElementSibling(){return c(this.pre viousSibling)}};a.ChildNodeInterface=f,a.ParentNodeInterface=e}(window.ShadowDOM Polyfill),function(a){"use strict";function b(a){d.call(this,a)}var c=a.ChildNod eInterface,d=a.wrappers.Node,e=a.enqueueMutation,f=a.mixin,g=a.registerWrapper,h =window.CharacterData;b.prototype=Object.create(d.prototype),f(b.prototype,{get textContent(){return this.data},set textContent(a){this.data=a},get data(){retur n this.impl.data},set data(a){var b=this.impl.data;e(this,"characterData",{oldVa lue:b}),this.impl.data=a}}),f(b.prototype,c),g(h,b,document.createTextNode("")), a.wrappers.CharacterData=b}(window.ShadowDOMPolyfill),function(a){"use strict";f unction b(b,c){var d=b.parentNode;if(d&&d.shadowRoot){var e=a.getRendererForHost (d);e.dependsOnAttribute(c)&&e.invalidate()}}function c(a,b,c){k(a,"attributes", {name:b,namespace:null,oldValue:c})}function d(a){h.call(this,a)}function e(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 f=a.C hildNodeInterface,g=a.GetElementsByInterface,h=a.wrappers.Node,i=a.ParentNodeInt erface,j=a.SelectorsInterface;a.addWrapNodeListMethod;var k=a.enqueueMutation,l= a.mixin,m=a.oneOf,n=a.registerWrapper,o=a.wrappers,p=window.Element,q=m(p.protot ype,["matches","mozMatchesSelector","msMatchesSelector","webkitMatchesSelector"] ),r=p.prototype[q];d.prototype=Object.create(h.prototype),l(d.prototype,{createS hadowRoot:function(){var b=new o.ShadowRoot(this);this.impl.polymerShadowRoot_=b ;var c=a.getRendererForHost(this);return c.invalidate(),b},get shadowRoot(){retu rn this.impl.polymerShadowRoot_||null},setAttribute:function(a,d){var e=this.imp l.getAttribute(a);this.impl.setAttribute(a,d),c(this,a,e),b(this,a)},removeAttri bute:function(a){var d=this.impl.getAttribute(a);this.impl.removeAttribute(a),c( this,a,d),b(this,a)},matches:function(a){return r.call(this.impl,a)}}),d.prototy pe[q]=function(a){return this.matches(a)},p.prototype.webkitCreateShadowRoot&&(d .prototype.webkitCreateShadowRoot=d.prototype.createShadowRoot),e(d.prototype,"i d"),e(d.prototype,"className","class"),l(d.prototype,f),l(d.prototype,g),l(d.pro totype,i),l(d.prototype,j),n(p,d),a.matchesName=q,a.wrappers.Element=d}(window.S hadowDOMPolyfill),function(a){"use strict";function b(a){switch(a){case"&":retur n"&amp;";case"<":return"&lt;";case'"':return"&quot;"}}function c(a){return a.rep lace(v,b)}function d(a){switch(a.nodeType){case Node.ELEMENT_NODE:for(var b,d=a. tagName.toLowerCase(),f="<"+d,g=a.attributes,h=0;b=g[h];h++)f+=" "+b.name+'="'+c (b.value)+'"';return f+=">",w[d]?f:f+e(a)+"</"+d+">";case Node.TEXT_NODE:return c(a.nodeValue);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.firstChild;c;c=c.nextSibling)b+=d(c);return b}function f(a,b,c){var d=c||"di v";a.textContent="";var e=t(a.ownerDocument.createElement(d));e.innerHTML=b;for( var f;f=e.firstChild;)a.appendChild(u(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:funct ion(c){a.renderAllPending(),this.impl[b]=c},configurable:!0,enumerable:!0})}func tion k(b){Object.defineProperty(g.prototype,b,{value:function(){return a.renderA llPending(),this.impl[b].apply(this.impl,arguments)},configurable:!0,enumerable: !0})}var l=a.wrappers.Element,m=a.defineGetter,n=a.enqueueMutation,o=a.mixin,p=a .nodesWereAdded,q=a.nodesWereRemoved,r=a.registerWrapper,s=a.snapshotNodeList,t= a.unwrap,u=a.wrap,v=/&|<|"/g,w={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},x=window.HTMLElement;g.prototype=Object.create(l.prototype),o(g.prototype,{ get innerHTML(){return e(this)},set innerHTML(a){var b=s(this.childNodes);this.i nvalidateShadowRenderer()?f(this,a,this.tagName):this.impl.innerHTML=a;var c=s(t his.childNodes);n(this,"childList",{addedNodes:c,removedNodes:b}),q(b),p(c)},get outerHTML(){return d(this)},set outerHTML(a){var b=this.parentNode;b&&(b.invali dateShadowRenderer(),this.impl.outerHTML=a)}}),["clientHeight","clientLeft","cli entTop","clientWidth","offsetHeight","offsetLeft","offsetTop","offsetWidth","scr ollHeight","scrollWidth"].forEach(i),["scrollLeft","scrollTop"].forEach(j),["get BoundingClientRect","getClientRects","scrollIntoView"].forEach(k),r(x,g,document .createElement("b")),a.wrappers.HTMLElement=g,a.getInnerHTML=e,a.setInnerHTML=f} (window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a) }var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=a.wrap,g=window.HT MLCanvasElement;b.prototype=Object.create(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("canvas")),a.wrappers.HTMLCanvasElement=b}(wind ow.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=window.HTMLContentEleme nt;b.prototype=Object.create(c.prototype),d(b.prototype,{get select(){return thi s.getAttribute("select")},set select(a){this.setAttribute("select",a)},setAttrib ute:function(a,b){c.prototype.setAttribute.call(this,a,b),"select"===String(a).t oLowerCase()&&this.invalidateShadowRenderer(!0)}}),f&&e(f,b),a.wrappers.HTMLCont entElement=b}(window.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"));d.call(this,e),g(e,this),void 0!==a&&(e.width=a),void 0!==b&&(e.heigh t=b)}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}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.c all(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}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){if(!a.defaultView)return a;var b=o.get(a);if(!b){for(b=a.i mplementation.createHTMLDocument("");b.lastChild;)b.removeChild(b.lastChild);o.s et(a,b)}return b}function c(a){var c,d=b(a.ownerDocument),e=l(d.createDocumentFr agment());for(h();c=a.firstChild;)e.appendChild(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.muteMutationEvents,i=a.registerWrapper,j=a.setInner HTML,k=a.unmuteMutationEvents,l=a.unwrap,m=a.wrap,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.content,a)}}),p&&i(p,d),a.wrappers.HTM LTemplateElement=d}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.registerWrapper,e=window.HT MLMediaElement;b.prototype=Object.create(c.prototype),d(e,b,document.createEleme nt("audio")),a.wrappers.HTMLMediaElement=b}(window.ShadowDOMPolyfill),function(a ){"use strict";function b(a){d.call(this,a)}function c(a){if(!(this instanceof c ))throw new TypeError("DOM object constructor cannot be called as a function."); var b=f(document.createElement("audio"));d.call(this,b),g(b,this),b.setAttribute ("preload","auto"),void 0!==a&&b.setAttribute("src",a)}var d=a.wrappers.HTMLMedi aElement,e=a.registerWrapper,f=a.unwrap,g=a.rewrap,h=window.HTMLAudioElement;b.p rototype=Object.create(d.prototype),e(h,b,document.createElement("audio")),c.pro totype=b.prototype,a.wrappers.HTMLAudioElement=b,a.wrappers.Audio=c}(window.Shad owDOMPolyfill),function(a){"use strict";function b(a){return a.replace(/\s+/g," ").trim()}function c(a){e.call(this,a)}function d(a,b,c,f){if(!(this instanceof d))throw new TypeError("DOM object constructor cannot be called as a function.") ;var g=i(document.createElement("option"));e.call(this,g),h(g,this),void 0!==a&& (g.text=a),void 0!==b&&g.setAttribute("value",b),c===!0&&g.setAttribute("selecte d",""),g.selected=f===!0}var e=a.wrappers.HTMLElement,f=a.mixin,g=a.registerWrap per,h=a.rewrap,i=a.unwrap,j=a.wrap,k=window.HTMLOptionElement;c.prototype=Object .create(e.prototype),f(c.prototype,{get text(){return b(this.textContent)},set t ext(a){this.textContent=b(String(a))},get form(){return j(i(this).form)}}),g(k,c ,document.createElement("option")),d.prototype=c.prototype,a.wrappers.HTMLOption Element=c,a.wrappers.Option=d}(window.ShadowDOMPolyfill),function(a){"use strict ";function b(a){switch(a.localName){case"content":return new c(a);case"shadow":r eturn new e(a);case"template":return new f(a)}d.call(this,a)}var c=a.wrappers.HT MLContentElement,d=a.wrappers.HTMLElement,e=a.wrappers.HTMLShadowElement,f=a.wra ppers.HTMLTemplateElement;a.mixin;var g=a.registerWrapper,h=window.HTMLUnknownEl ement;b.prototype=Object.create(d.prototype),g(h,b),a.wrappers.HTMLUnknownElemen t=b}(window.ShadowDOMPolyfill),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=win dow.CanvasRenderingContext2D;c(b.prototype,{get canvas(){return g(this.impl.canv as)},drawImage:function(){arguments[0]=f(arguments[0]),this.impl.drawImage.apply (this.impl,arguments)},createPattern:function(){return arguments[0]=e(arguments[ 0]),this.impl.createPattern.apply(this.impl,arguments)}}),d(h,b,document.createE lement("canvas").getContext("2d")),a.wrappers.CanvasRenderingContext2D=b}(window .ShadowDOMPolyfill),function(a){"use strict";function b(a){this.impl=a}var c=a.m ixin,d=a.registerWrapper,e=a.unwrapIfNeeded,f=a.wrap,g=window.WebGLRenderingCont ext;if(g){c(b.prototype,{get canvas(){return f(this.impl.canvas)},texImage2D:fun ction(){arguments[5]=e(arguments[5]),this.impl.texImage2D.apply(this.impl,argume nts)},texSubImage2D:function(){arguments[6]=e(arguments[6]),this.impl.texSubImag e2D.apply(this.impl,arguments)}});var h=/WebKit/.test(navigator.userAgent)?{draw ingBufferHeight:null,drawingBufferWidth:null}:{};d(g,b,h),a.wrappers.WebGLRender ingContext=b}}(window.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=win dow.Range;b.prototype={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))},set EndAfter:function(a){this.impl.setEndAfter(e(a))},selectNode:function(a){this.im pl.selectNode(e(a))},selectNodeContents:function(a){this.impl.selectNodeContents (e(a))},compareBoundaryPoints:function(a,b){return this.impl.compareBoundaryPoin ts(a,d(b))},extractContents:function(){return f(this.impl.extractContents())},cl oneContents:function(){return f(this.impl.cloneContents())},insertNode:function( a){this.impl.insertNode(e(a))},surroundContents:function(a){this.impl.surroundCo ntents(e(a))},cloneRange:function(){return f(this.impl.cloneRange())},isPointInR ange:function(a,b){return this.impl.isPointInRange(e(a),b)},comparePoint:functio n(a,b){return this.impl.comparePoint(e(a),b)},intersectsNode:function(a){return this.impl.intersectsNode(e(a))}},g.prototype.createContextualFragment&&(b.protot ype.createContextualFragment=function(a){return f(this.impl.createContextualFrag ment(a))}),c(window.Range,b,document.createRange()),a.wrappers.Range=b}(window.S hadowDOMPolyfill),function(a){"use strict";var b=a.GetElementsByInterface,c=a.Pa rentNodeInterface,d=a.SelectorsInterface,e=a.mixin,f=a.registerObject,g=f(docume nt.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.DocumentFragment=g,a.wrappers.Text=h}(window.ShadowDOMPolyf ill),function(a){"use strict";function b(a){var b=i(a.impl.ownerDocument.createD ocumentFragment());c.call(this,b),g(b,this);var d=a.shadowRoot;k.set(this,d),j.s et(this,a)}var c=a.wrappers.DocumentFragment,d=a.elementFromPoint,e=a.getInnerHT ML,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(){return e(t his)},set innerHTML(a){h(this,a),this.invalidateShadowRenderer()},get olderShado wRoot(){return k.get(this)||null},get host(){return j.get(this)||null},invalidat eShadowRenderer:function(){return j.get(this).invalidateShadowRenderer()},elemen tFromPoint:function(a,b){return d(this,this.ownerDocument,a,b)},getElementById:f unction(a){return this.querySelector("#"+a)}}),a.wrappers.ShadowRoot=b}(window.S hadowDOMPolyfill),function(a){"use strict";function b(a){a.previousSibling_=a.pr eviousSibling,a.nextSibling_=a.nextSibling,a.parentNode_=a.parentNode}function c (a,c,e){var f=F(a),g=F(c),h=e?F(e):null;if(d(c),b(c),e)a.firstChild===e&&(a.firs tChild_=e),e.previousSibling_=e.previousSibling;else{a.lastChild_=a.lastChild,a. lastChild===a.firstChild&&(a.firstChild_=a.firstChild);var i=G(f.lastChild);i&&( i.nextSibling_=i.nextSibling)}f.insertBefore(g,h)}function d(a){var c=F(a),d=c.p arentNode;if(d){var e=G(d);b(a),a.previousSibling&&(a.previousSibling.nextSiblin g_=a),a.nextSibling&&(a.nextSibling.previousSibling_=a),e.lastChild===a&&(e.last Child_=a),e.firstChild===a&&(e.firstChild_=a),d.removeChild(c)}}function e(a,b){ g(b).push(a),x(a,b);var c=I.get(a);c||I.set(a,c=[]),c.push(b)}function f(a){H.se t(a,[])}function g(a){return H.get(a)}function h(a){for(var b=[],c=0,d=a.firstCh ild;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){va r c=b.getAttribute("select");if(!c)return!0;if(c=c.trim(),!c)return!0;if(!(a ins tanceof y))return!1;if(!L.test(c))return!1;if(":"===c[0]&&!M.test(c))return!1;tr y{return a.matches(c)}catch(d){return!1}}function k(){for(var a=0;a<O.length;a++ )O[a].render();O=[]}function l(){E=null,k()}function m(a){var b=K.get(a);return b||(b=new q(a),K.set(a,b)),b}function n(a){for(;a;a=a.parentNode)if(a instanceof C)return a;return null}function o(a){return m(a.host)}function p(a){this.skip=! 1,this.node=a,this.childNodes=[]}function q(a){this.host=a,this.dirty=!1,this.in validateAttributes(),this.associateNode(a)}function r(a){return a instanceof z}f unction s(a){return a instanceof z}function t(a){return a instanceof A}function u(a){return a instanceof A}function v(a){return a.shadowRoot}function w(a){for(v ar b=[],c=a.shadowRoot;c;c=c.olderShadowRoot)b.push(c);return b}function x(a,b){ J.set(a,b)}var y=a.wrappers.Element,z=a.wrappers.HTMLContentElement,A=a.wrappers .HTMLShadowElement,B=a.wrappers.Node,C=a.wrappers.ShadowRoot;a.assert,a.mixin,a. muteMutationEvents;var D=a.oneOf;a.unmuteMutationEvents;var E,F=a.unwrap,G=a.wra p,H=new WeakMap,I=new WeakMap,J=new WeakMap,K=new WeakMap,L=/^[*.:#[a-zA-Z_|]/,M =new RegExp("^:("+["link","visited","target","enabled","disabled","checked","ind eterminate","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("|")+") "),N=D(window,["requestAnimationFrame","mozRequestAnimationFrame","webkitRequest AnimationFrame","setTimeout"]),O=[],P=new ArraySplice;P.equals=function(a,b){ret urn F(a.node)===b},p.prototype={append:function(a){var b=new p(a);return this.ch ildNodes.push(b),b},sync:function(a){if(!this.skip){for(var b=this.node,e=this.c hildNodes,f=h(F(b)),g=a||new WeakMap,i=P.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.remov ed.length,p=0;o>p;p++){var q=G(f[k++]);g.get(q)||d(q)}for(var r=n.addedCount,s=f [k]&&G(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){i f(this.dirty){this.invalidateAttributes(),this.treeComposition();var b=this.host ,c=b.shadowRoot;this.associateNode(b);for(var d=!e,e=a||new p(b),f=c.firstChild; f;f=f.nextSibling)this.renderNode(c,e,f,!1);d&&e.sync(),this.dirty=!1}},invalida te:function(){if(!this.dirty){if(this.dirty=!0,O.push(this),E)return;E=window[N] (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.renderShado wInsertionPoint(a,b,c):this.renderAsAnyDomTree(a,b,c,d)},renderAsAnyDomTree:func tion(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)},renderInsert ionPoint: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.associa teNode(c.parentNode)},renderShadowInsertionPoint:function(a,b,c){var d=a.olderSh adowRoot;if(d){x(d,c),this.associateNode(c.parentNode);for(var e=d.firstChild;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.associateNode (c.parentNode);for(var d=c.firstChild;d;d=d.nextSibling)this.renderAsAnyDomTree( 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,fu nction(a,c){b[c]=!0})}},dependsOnAttribute:function(a){return this.attributes[a] },distribute:function(a,b){var c=this;i(a,s,function(a){f(a),c.updateDependentAt tributes(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.olderSha dowRoot;if(k){b=k,x(b,j);continue}break}break}},associateNode:function(a){a.impl .polymerShadowRenderer_=this}},B.prototype.invalidateShadowRenderer=function(){v ar a=this.impl.polymerShadowRenderer_;return a?(a.invalidate(),!0):!1},z.prototy pe.getDistributedNodes=function(){return k(),g(this)},A.prototype.nodeIsInserted _=z.prototype.nodeIsInserted_=function(){this.invalidateShadowRenderer();var a,b =n(this);b&&(a=o(b)),this.impl.polymerShadowRenderer_=a,a&&a.invalidate()},a.eve ntParentsTable=I,a.getRendererForHost=m,a.getShadowTrees=w,a.insertionParentTabl e=J,a.renderAllPending=k,a.visual={insertBefore:c,remove:d}}(window.ShadowDOMPol yfill),function(a){"use strict";function b(b){if(window[b]){d(!a.wrappers[b]);va r i=function(a){c.call(this,a)};i.prototype=Object.create(c.prototype),e(i.proto type,{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.mix in,f=a.registerWrapper,g=a.unwrap,h=a.wrap,i=["HTMLButtonElement","HTMLFieldSetE lement","HTMLInputElement","HTMLKeygenElement","HTMLLabelElement","HTMLLegendEle ment","HTMLObjectElement","HTMLOutputElement","HTMLSelectElement","HTMLTextAreaE lement"];i.forEach(b)}(window.ShadowDOMPolyfill),function(a){"use strict";functi on b(a){k.call(this,a)}function c(a){var c=document[a];b.prototype[a]=function() {return v(c.apply(this.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.firstChild;c;c=c.nextSibling)e(c,b)}function f(a,b){var c=a.older ShadowRoot;c&&b.adoptNode(c)}function g(a){this.impl=a}function h(a,b){var c=doc ument.implementation[b];a.prototype[b]=function(){return v(c.apply(this.impl,arg uments))}}function i(a,b){var c=document.implementation[b];a.prototype[b]=functi on(){return c.apply(this.impl,arguments)}}var j=a.GetElementsByInterface,k=a.wra ppers.Node,l=a.ParentNodeInterface,m=a.SelectorsInterface,n=a.wrappers.ShadowRoo t,o=a.defineWrapGetter,p=a.elementFromPoint,q=a.forwardMethodsToWrapper,r=a.matc hesName,s=a.mixin,t=a.registerWrapper,u=a.unwrap,v=a.wrap,w=a.wrapEventTargetMet hods;a.wrapNodeList;var x=new WeakMap;b.prototype=Object.create(k.prototype),o(b ,"documentElement"),o(b,"body"),o(b,"head"),["createComment","createDocumentFrag ment","createElement","createElementNS","createEvent","createEventNS","createRan ge","createTextNode","getElementById"].forEach(c);var y=document.adoptNode;if(s( b.prototype,{adoptNode:function(a){return a.parentNode&&a.parentNode.removeChild (a),d(a,this),a},elementFromPoint:function(a,b){return p(this,this,a,b)}}),docum ent.register){var z=document.register;b.prototype.register=function(b,c){functio n d(a){return a?(this.impl=a,void 0):c.extends?document.createElement(c.extends, b):document.createElement(b)}var e=c.prototype;if(a.nativePrototypeTable.get(e)) throw new Error("NotSupportedError");for(var f,g=Object.getPrototypeOf(e),h=[];g &&!(f=a.nativePrototypeTable.get(g));)h.push(g),g=Object.getPrototypeOf(g);if(!f )throw new Error("NotSupportedError");for(var i=Object.create(f),j=h.length-1;j> =0;j--)i=Object.create(i);["createdCallback","enteredViewCallback","leftViewCall back","attributeChangedCallback"].forEach(function(a){var b=e[a];b&&(i[a]=functi on(){b.apply(v(this),arguments)})});var k={prototype:i};return c.extends&&(k.ext ends=c.extends),z.call(u(this),b,k),d.prototype=e,d.prototype.constructor=d,a.co nstructorTable.set(i,d),a.nativePrototypeTable.set(e,i),d},q([window.HTMLDocumen t||window.Document],["register"])}q([window.HTMLBodyElement,window.HTMLDocument| |window.Document,window.HTMLHeadElement,window.HTMLHtmlElement],["appendChild"," compareDocumentPosition","contains","getElementsByClassName","getElementsByTagNa me","getElementsByTagNameNS","insertBefore","querySelector","querySelectorAll"," removeChild","replaceChild",r]),q([window.HTMLDocument||window.Document],["adopt Node","contains","createComment","createDocumentFragment","createElement","creat eElementNS","createEvent","createEventNS","createRange","createTextNode","elemen tFromPoint","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(th is).implementation),x.set(this,a),a)}}),t(window.Document,b,document.implementat ion.createHTMLDocument("")),window.HTMLDocument&&t(window.HTMLDocument,b),w([win dow.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement] ),h(g,"createDocumentType"),h(g,"createDocument"),h(g,"createHTMLDocument"),i(g, "hasFeature"),t(window.DOMImplementation,g),q([window.DOMImplementation],["creat eDocumentType","createDocument","createHTMLDocument","hasFeature"]),a.adoptNodeN oRemove=d,a.wrappers.DOMImplementation=g,a.wrappers.Document=b}(window.ShadowDOM Polyfill),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.unwrapIfNeeded,h=a.wra p,i=a.renderAllPending,j=window.Window;b.prototype=Object.create(c.prototype);va r k=window.getComputedStyle;j.prototype.getComputedStyle=function(a,b){return i( ),k.call(this||window,g(a),b)},["addEventListener","removeEventListener","dispat chEvent"].forEach(function(a){j.prototype[a]=function(){var b=h(this||window);re turn b[a].apply(b,arguments)}}),d(b.prototype,{getComputedStyle:function(a,b){re turn k.call(f(this),g(a),b)}}),e(j,b),a.wrappers.Window=b}(window.ShadowDOMPolyf ill),function(a){"use strict";function b(a){var b=c[a],d=window[b];if(d){var e=d ocument.createElement(a),f=e.constructor;window[b]=f}}a.isWrapperFor;var c={a:"H TMLAnchorElement",applet:"HTMLAppletElement",area:"HTMLAreaElement",br:"HTMLBREl ement",base:"HTMLBaseElement",body:"HTMLBodyElement",button:"HTMLButtonElement", dl:"HTMLDListElement",datalist:"HTMLDataListElement",data:"HTMLDataElement",dir: "HTMLDirectoryElement",div:"HTMLDivElement",embed:"HTMLEmbedElement",fieldset:"H TMLFieldSetElement",font:"HTMLFontElement",form:"HTMLFormElement",frame:"HTMLFra meElement",frameset:"HTMLFrameSetElement",hr:"HTMLHRElement",head:"HTMLHeadEleme nt",h1:"HTMLHeadingElement",html:"HTMLHtmlElement",iframe:"HTMLIFrameElement",in put:"HTMLInputElement",li:"HTMLLIElement",label:"HTMLLabelElement",legend:"HTMLL egendElement",link:"HTMLLinkElement",map:"HTMLMapElement",marquee:"HTMLMarqueeEl ement",menu:"HTMLMenuElement",menuitem:"HTMLMenuItemElement",meta:"HTMLMetaEleme nt",meter:"HTMLMeterElement",del:"HTMLModElement",ol:"HTMLOListElement",object:" HTMLObjectElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",out put:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",pre:"H TMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",script:"HTMLS criptElement",select:"HTMLSelectElement",source:"HTMLSourceElement",span:"HTMLSp anElement",style:"HTMLStyleElement",time:"HTMLTimeElement",caption:"HTMLTableCap tionElement",col:"HTMLTableColElement",table:"HTMLTableElement",tr:"HTMLTableRow Element",thead:"HTMLTableSectionElement",tbody:"HTMLTableSectionElement",textare a:"HTMLTextAreaElement",track:"HTMLTrackElement",title:"HTMLTitleElement",ul:"HT MLUListElement",video:"HTMLVideoElement"}; 2 }var f=c(a),i=a.parentNode;return i&&i.removeChild(a),a.parentNode_=b,a.previous Sibling_=d,a.nextSibling_=e,d&&(d.nextSibling_=a),e&&(e.previousSibling_=a),f}fu nction g(a){if(a instanceof DocumentFragment)return h(a);var b=c(a),e=a.parentNo de;return e&&d(a,e,b),b}function h(a){for(var b=new u,c=0,d=a.firstChild;d;d=d.n extSibling)b[c++]=d;return b.length=c,e(a,b),b}function i(a){return a}function j (a){a.nodeIsInserted_()}function k(a){for(var b=0;b<a.length;b++)j(a[b])}functio n l(){}function m(){}function n(a,b){var c=a.nodeType===s.DOCUMENT_NODE?a:a.owne rDocument;c!==b.ownerDocument&&c.adoptNode(b)}function o(b,c){if(c.length){var d =b.ownerDocument;if(d!==c[0].ownerDocument)for(var e=0;e<c.length;e++)a.adoptNod eNoRemove(c[e],d)}}function p(a,b){o(a,b);var c=b.length;if(1===c)return B(b[0]) ;for(var d=B(a.ownerDocument.createDocumentFragment()),e=0;c>e;e++)d.appendChild (B(b[e]));return d}function q(a){if(a.invalidateShadowRenderer()){for(var b=a.fi rstChild;b;){v(b.parentNode===a);var c=b.nextSibling,d=B(b),e=d.parentNode;e&&J. call(e,d),b.previousSibling_=b.nextSibling_=b.parentNode_=null,b=c}a.firstChild_ =a.lastChild_=null}else for(var c,f=B(a),g=f.firstChild;g;)c=g.nextSibling,J.cal l(f,g),g=c}function r(a){var b=a.parentNode;return b&&b.invalidateShadowRenderer ()}function s(a){v(a instanceof F),t.call(this,a),this.parentNode_=void 0,this.f irstChild_=void 0,this.lastChild_=void 0,this.nextSibling_=void 0,this.previousS ibling_=void 0}var t=a.wrappers.EventTarget,u=a.wrappers.NodeList,v=a.assert,w=a .defineWrapGetter,x=a.enqueueMutation,y=a.mixin,z=a.registerTransientObservers,A =a.registerWrapper,B=a.unwrap,C=a.wrap,D=a.wrapIfNeeded,E=!1,F=window.Node,G=win dow.DocumentFragment,H=(F.prototype.appendChild,F.prototype.compareDocumentPosit ion),I=F.prototype.insertBefore,J=F.prototype.removeChild,K=F.prototype.replaceC hild,L=/Trident/.test(navigator.userAgent),M=L?function(a,b){try{J.call(a,b)}cat ch(c){if(!(a instanceof G))throw c}}:function(a,b){J.call(a,b)};s.prototype=Obje ct.create(t.prototype),y(s.prototype,{appendChild:function(a){return this.insert Before(a,null)},insertBefore:function(a,c){b(a),c=c||null,c&&b(c),c&&v(c.parentN ode===this);var d,e=c?c.previousSibling:this.lastChild,h=!this.invalidateShadowR enderer()&&!r(a);if(d=h?g(a):f(a,this,e,c),h)n(this,a),I.call(this.impl,B(a),B(c ));else{e||(this.firstChild_=d[0]),c||(this.lastChild_=d[d.length-1]);var i=B(c) ,j=i?i.parentNode:this.impl;j?I.call(j,p(this,d),i):o(this,d)}return x(this,"chi ldList",{addedNodes:d,nextSibling:c,previousSibling:e}),k(d),a},removeChild:func tion(a){if(b(a),a.parentNode!==this){for(var d=!1,e=(this.childNodes,this.firstC hild);e;e=e.nextSibling)if(e===a){d=!0;break}if(!d)throw new Error("NotFoundErro r")}var f=B(a),g=a.nextSibling,h=a.previousSibling;if(this.invalidateShadowRende rer()){var i=this.firstChild,j=this.lastChild,k=f.parentNode;k&&M(k,f),i===a&&(t his.firstChild_=g),j===a&&(this.lastChild_=h),h&&(h.nextSibling_=g),g&&(g.previo usSibling_=h),a.previousSibling_=a.nextSibling_=a.parentNode_=void 0}else M(this .impl,f);return E||x(this,"childList",{removedNodes:c(a),nextSibling:g,previousS ibling:h}),z(this,a),a},replaceChild:function(a,d){if(b(a),b(d),d.parentNode!==t his)throw new Error("NotFoundError");var e,h=B(d),i=d.nextSibling,j=d.previousSi bling,m=!this.invalidateShadowRenderer()&&!r(a);return m?e=g(a):(i===a&&(i=a.nex tSibling),e=f(a,this,j,i)),m?(n(this,a),K.call(this.impl,B(a),h)):(this.firstChi ld===d&&(this.firstChild_=e[0]),this.lastChild===d&&(this.lastChild_=e[e.length- 1]),d.previousSibling_=d.nextSibling_=d.parentNode_=void 0,h.parentNode&&K.call( h.parentNode,p(this,e),h)),x(this,"childList",{addedNodes:e,removedNodes:c(d),ne xtSibling:i,previousSibling:j}),l(d),k(e),d},nodeIsInserted_:function(){for(var a=this.firstChild;a;a=a.nextSibling)a.nodeIsInserted_()},hasChildNodes:function( ){return null!==this.firstChild},get parentNode(){return void 0!==this.parentNod e_?this.parentNode_:C(this.impl.parentNode)},get firstChild(){return void 0!==th is.firstChild_?this.firstChild_:C(this.impl.firstChild)},get lastChild(){return void 0!==this.lastChild_?this.lastChild_:C(this.impl.lastChild)},get nextSibling (){return void 0!==this.nextSibling_?this.nextSibling_:C(this.impl.nextSibling)} ,get previousSibling(){return void 0!==this.previousSibling_?this.previousSiblin g_:C(this.impl.previousSibling)},get parentElement(){for(var a=this.parentNode;a &&a.nodeType!==s.ELEMENT_NODE;)a=a.parentNode;return a},get textContent(){for(va r a="",b=this.firstChild;b;b=b.nextSibling)a+=b.textContent;return a},set textCo ntent(a){var b=i(this.childNodes);if(this.invalidateShadowRenderer()){if(q(this) ,""!==a){var c=this.impl.ownerDocument.createTextNode(a);this.appendChild(c)}}el se this.impl.textContent=a;var d=i(this.childNodes);x(this,"childList",{addedNod es:d,removedNodes:b}),m(b),k(d)},get childNodes(){for(var a=new u,b=0,c=this.fir stChild;c;c=c.nextSibling)a[b++]=c;return a.length=b,a},cloneNode:function(a){va r b=C(this.impl.cloneNode(!1));if(a)for(var c=this.firstChild;c;c=c.nextSibling) b.appendChild(c.cloneNode(!0));return b},contains:function(a){if(!a)return!1;if( a=D(a),a===this)return!0;var b=a.parentNode;return b?this.contains(b):!1},compar eDocumentPosition:function(a){return H.call(this.impl,B(a))}}),w(s,"ownerDocumen t"),A(F,s,document.createDocumentFragment()),delete s.prototype.querySelector,de lete s.prototype.querySelectorAll,s.prototype=y(Object.create(t.prototype),s.pro totype),a.nodeWasAdded=j,a.nodeWasRemoved=l,a.nodesWereAdded=k,a.nodesWereRemove d=m,a.snapshotNodeList=i,a.wrappers.Node=s}(window.ShadowDOMPolyfill),function(a ){"use strict";function b(a,c){for(var d,e=a.firstElementChild;e;){if(e.matches( c))return e;if(d=b(e,c))return d;e=e.nextElementSibling}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={querySelector:function(a){return b(this,a )},querySelectorAll:function(a){return c(this,a,new NodeList)}},e={getElementsBy TagName:function(a){return this.querySelectorAll(a)},getElementsByClassName:func tion(a){return this.querySelectorAll("."+a)},getElementsByTagNameNS:function(a,b ){if("*"===a)return this.getElementsByTagName(b);for(var c=new NodeList,d=this.g etElementsByTagName(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}(wind ow.ShadowDOMPolyfill),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={ge t 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)},get previousElementSibling(){r eturn c(this.previousSibling)}};a.ChildNodeInterface=f,a.ParentNodeInterface=e}( window.ShadowDOMPolyfill),function(a){"use strict";function b(a){d.call(this,a)} var c=a.ChildNodeInterface,d=a.wrappers.Node,e=a.enqueueMutation,f=a.mixin,g=a.r egisterWrapper,h=window.CharacterData;b.prototype=Object.create(d.prototype),f(b .prototype,{get textContent(){return this.data},set textContent(a){this.data=a}, get data(){return this.impl.data},set data(a){var b=this.impl.data;e(this,"chara cterData",{oldValue:b}),this.impl.data=a}}),f(b.prototype,c),g(h,b,document.crea teTextNode("")),a.wrappers.CharacterData=b}(window.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,b,c){k (a,"attributes",{name:b,namespace:null,oldValue:c})}function d(a){h.call(this,a) }function e(a,c,d){var e=d||c;Object.defineProperty(a,c,{get:function(){return t his.impl[c]},set:function(a){this.impl[c]=a,b(this,e)},configurable:!0,enumerabl e:!0})}var f=a.ChildNodeInterface,g=a.GetElementsByInterface,h=a.wrappers.Node,i =a.ParentNodeInterface,j=a.SelectorsInterface,k=(a.addWrapNodeListMethod,a.enque ueMutation),l=a.mixin,m=a.oneOf,n=a.registerWrapper,o=a.wrappers,p=window.Elemen t,q=m(p.prototype,["matches","mozMatchesSelector","msMatchesSelector","webkitMat chesSelector"]),r=p.prototype[q];d.prototype=Object.create(h.prototype),l(d.prot otype,{createShadowRoot:function(){var b=new o.ShadowRoot(this);this.impl.polyme rShadowRoot_=b;var c=a.getRendererForHost(this);return c.invalidate(),b},get sha dowRoot(){return this.impl.polymerShadowRoot_||null},setAttribute:function(a,d){ var e=this.impl.getAttribute(a);this.impl.setAttribute(a,d),c(this,a,e),b(this,a )},removeAttribute:function(a){var d=this.impl.getAttribute(a);this.impl.removeA ttribute(a),c(this,a,d),b(this,a)},matches:function(a){return r.call(this.impl,a )}}),d.prototype[q]=function(a){return this.matches(a)},p.prototype.webkitCreate ShadowRoot&&(d.prototype.webkitCreateShadowRoot=d.prototype.createShadowRoot),e( d.prototype,"id"),e(d.prototype,"className","class"),l(d.prototype,f),l(d.protot ype,g),l(d.prototype,i),l(d.prototype,j),n(p,d),a.matchesName=q,a.wrappers.Eleme nt=d}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){switch(a) {case"&":return"&amp;";case"<":return"&lt;";case'"':return"&quot;"}}function c(a ){return a.replace(v,b)}function d(a){switch(a.nodeType){case Node.ELEMENT_NODE: for(var b,d=a.tagName.toLowerCase(),f="<"+d,g=a.attributes,h=0;b=g[h];h++)f+=" " +b.name+'="'+c(b.value)+'"';return f+=">",w[d]?f:f+e(a)+"</"+d+">";case Node.TEX T_NODE:return c(a.nodeValue);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.firstChild;c;c=c.nextSibling)b+=d(c);return b}function f(a,b,c ){var d=c||"div";a.textContent="";var e=t(a.ownerDocument.createElement(d));e.in nerHTML=b;for(var f;f=e.firstChild;)a.appendChild(u(f))}function g(a){l.call(thi s,a)}function h(b){return function(){return a.renderAllPending(),this.impl[b]}}f unction 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,enumer able:!0})}function k(b){Object.defineProperty(g.prototype,b,{value:function(){re turn a.renderAllPending(),this.impl[b].apply(this.impl,arguments)},configurable: !0,enumerable:!0})}var l=a.wrappers.Element,m=a.defineGetter,n=a.enqueueMutation ,o=a.mixin,p=a.nodesWereAdded,q=a.nodesWereRemoved,r=a.registerWrapper,s=a.snaps hotNodeList,t=a.unwrap,u=a.wrap,v=/&|<|"/g,w={area:!0,base:!0,br:!0,col:!0,comma nd:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:! 0,track:!0,wbr:!0},x=window.HTMLElement;g.prototype=Object.create(l.prototype),o (g.prototype,{get innerHTML(){return e(this)},set innerHTML(a){var b=s(this.chil dNodes);this.invalidateShadowRenderer()?f(this,a,this.tagName):this.impl.innerHT ML=a;var c=s(this.childNodes);n(this,"childList",{addedNodes:c,removedNodes:b}), q(b),p(c)},get outerHTML(){return d(this)},set outerHTML(a){var b=this.parentNod e;b&&(b.invalidateShadowRenderer(),this.impl.outerHTML=a)}}),["clientHeight","cl ientLeft","clientTop","clientWidth","offsetHeight","offsetLeft","offsetTop","off setWidth","scrollHeight","scrollWidth"].forEach(i),["scrollLeft","scrollTop"].fo rEach(j),["getBoundingClientRect","getClientRects","scrollIntoView"].forEach(k), r(x,g,document.createElement("b")),a.wrappers.HTMLElement=g,a.getInnerHTML=e,a.s etInnerHTML=f}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){ c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=a.wr ap,g=window.HTMLCanvasElement;b.prototype=Object.create(c.prototype),d(b.prototy pe,{getContext:function(){var a=this.impl.getContext.apply(this.impl,arguments); return a&&f(a)}}),e(g,b,document.createElement("canvas")),a.wrappers.HTMLCanvasE lement=b}(window.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 MLContentElement;b.prototype=Object.create(c.prototype),d(b.prototype,{get selec t(){return this.getAttribute("select")},set select(a){this.setAttribute("select" ,a)},setAttribute:function(a,b){c.prototype.setAttribute.call(this,a,b),"select" ===String(a).toLowerCase()&&this.invalidateShadowRenderer(!0)}}),f&&e(f,b),a.wra ppers.HTMLContentElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";f unction b(a){d.call(this,a)}function c(a,b){if(!(this instanceof c))throw new Ty peError("DOM object constructor cannot be called as a function.");var e=f(docume nt.createElement("img"));d.call(this,e),g(e,this),void 0!==a&&(e.width=a),void 0 !==b&&(e.height=b)}var d=a.wrappers.HTMLElement,e=a.registerWrapper,f=a.unwrap,g =a.rewrap,h=window.HTMLImageElement;b.prototype=Object.create(d.prototype),e(h,b ,document.createElement("img")),c.prototype=b.prototype,a.wrappers.HTMLImageElem ent=b,a.wrappers.Image=c}(window.ShadowDOMPolyfill),function(a){"use strict";fun ction b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWra pper,f=window.HTMLShadowElement;b.prototype=Object.create(c.prototype),d(b.proto type,{}),f&&e(f,b),a.wrappers.HTMLShadowElement=b}(window.ShadowDOMPolyfill),fun ction(a){"use strict";function b(a){if(!a.defaultView)return a;var b=m.get(a);if (!b){for(b=a.implementation.createHTMLDocument("");b.lastChild;)b.removeChild(b. lastChild);m.set(a,b)}return b}function c(a){for(var c,d=b(a.ownerDocument),e=j( d.createDocumentFragment());c=a.firstChild;)e.appendChild(c);return e}function d (a){if(e.call(this,a),!n){var b=c(a);l.set(this,k(b))}}var e=a.wrappers.HTMLElem ent,f=a.getInnerHTML,g=a.mixin,h=a.registerWrapper,i=a.setInnerHTML,j=a.unwrap,k =a.wrap,l=new WeakMap,m=new WeakMap,n=window.HTMLTemplateElement;d.prototype=Obj ect.create(e.prototype),g(d.prototype,{get content(){return n?k(this.impl.conten t):l.get(this)},get innerHTML(){return f(this.content)},set innerHTML(a){i(this. content,a)}}),n&&h(n,d),a.wrappers.HTMLTemplateElement=d}(window.ShadowDOMPolyfi ll),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLE lement,d=a.registerWrapper,e=window.HTMLMediaElement;b.prototype=Object.create(c .prototype),d(e,b,document.createElement("audio")),a.wrappers.HTMLMediaElement=b }(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){d.call(this,a )}function c(a){if(!(this instanceof c))throw new TypeError("DOM object construc tor cannot be called as a function.");var b=f(document.createElement("audio"));d .call(this,b),g(b,this),b.setAttribute("preload","auto"),void 0!==a&&b.setAttrib ute("src",a)}var d=a.wrappers.HTMLMediaElement,e=a.registerWrapper,f=a.unwrap,g= a.rewrap,h=window.HTMLAudioElement;b.prototype=Object.create(d.prototype),e(h,b, document.createElement("audio")),c.prototype=b.prototype,a.wrappers.HTMLAudioEle ment=b,a.wrappers.Audio=c}(window.ShadowDOMPolyfill),function(a){"use strict";fu nction b(a){return a.replace(/\s+/g," ").trim()}function c(a){e.call(this,a)}fun ction d(a,b,c,f){if(!(this instanceof d))throw new TypeError("DOM object constru ctor cannot be called as a function.");var g=i(document.createElement("option")) ;e.call(this,g),h(g,this),void 0!==a&&(g.text=a),void 0!==b&&g.setAttribute("val ue",b),c===!0&&g.setAttribute("selected",""),g.selected=f===!0}var e=a.wrappers. HTMLElement,f=a.mixin,g=a.registerWrapper,h=a.rewrap,i=a.unwrap,j=a.wrap,k=windo w.HTMLOptionElement;c.prototype=Object.create(e.prototype),f(c.prototype,{get te xt(){return b(this.textContent)},set text(a){this.textContent=b(String(a))},get form(){return j(i(this).form)}}),g(k,c,document.createElement("option")),d.proto type=c.prototype,a.wrappers.HTMLOptionElement=c,a.wrappers.Option=d}(window.Shad owDOMPolyfill),function(a){"use strict";function b(a){switch(a.localName){case"c ontent":return new 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.HTMLShadowElement,f=a.wrappers.HTMLTemplateElement,g=(a.mixin,a.reg isterWrapper),h=window.HTMLUnknownElement;b.prototype=Object.create(d.prototype) ,g(h,b),a.wrappers.HTMLUnknownElement=b}(window.ShadowDOMPolyfill),function(a){" use strict";function b(a){this.impl=a}var c=a.mixin,d=a.registerWrapper,e=a.unwr ap,f=a.unwrapIfNeeded,g=a.wrap,h=window.CanvasRenderingContext2D;c(b.prototype,{ get canvas(){return g(this.impl.canvas)},drawImage:function(){arguments[0]=f(arg uments[0]),this.impl.drawImage.apply(this.impl,arguments)},createPattern:functio n(){return arguments[0]=e(arguments[0]),this.impl.createPattern.apply(this.impl, arguments)}}),d(h,b,document.createElement("canvas").getContext("2d")),a.wrapper s.CanvasRenderingContext2D=b}(window.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.WebGLRenderingContext;if(g){c(b.prototype,{get canvas(){return f(this.impl.canvas)},texImage2D:function(){arguments[5]=e(arguments[5]),this.im pl.texImage2D.apply(this.impl,arguments)},texSubImage2D:function(){arguments[6]= e(arguments[6]),this.impl.texSubImage2D.apply(this.impl,arguments)}});var h=/Web Kit/.test(navigator.userAgent)?{drawingBufferHeight:null,drawingBufferWidth:null }:{};d(g,b,h),a.wrappers.WebGLRenderingContext=b}}(window.ShadowDOMPolyfill),fun ction(a){"use strict";function b(a){this.impl=a}var c=a.registerWrapper,d=a.unwr ap,e=a.unwrapIfNeeded,f=a.wrap,g=window.Range;b.prototype={get startContainer(){ return f(this.impl.startContainer)},get endContainer(){return f(this.impl.endCon tainer)},get commonAncestorContainer(){return f(this.impl.commonAncestorContaine r)},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:func tion(a){this.impl.selectNodeContents(e(a))},compareBoundaryPoints:function(a,b){ return this.impl.compareBoundaryPoints(a,d(b))},extractContents:function(){retur n f(this.impl.extractContents())},cloneContents:function(){return f(this.impl.cl oneContents())},insertNode:function(a){this.impl.insertNode(e(a))},surroundConte nts:function(a){this.impl.surroundContents(e(a))},cloneRange:function(){return f (this.impl.cloneRange())},isPointInRange:function(a,b){return this.impl.isPointI nRange(e(a),b)},comparePoint:function(a,b){return this.impl.comparePoint(e(a),b) },intersectsNode:function(a){return this.impl.intersectsNode(e(a))}},g.prototype .createContextualFragment&&(b.prototype.createContextualFragment=function(a){ret urn f(this.impl.createContextualFragment(a))}),c(window.Range,b,document.createR ange()),a.wrappers.Range=b}(window.ShadowDOMPolyfill),function(a){"use strict";v ar b=a.GetElementsByInterface,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.prototype,b);var h=f(document.createTextNode("")),i=f(doc ument.createComment(""));a.wrappers.Comment=i,a.wrappers.DocumentFragment=g,a.wr appers.Text=h}(window.ShadowDOMPolyfill),function(a){"use strict";function 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.DocumentFragment ,d=a.elementFromPoint,e=a.getInnerHTML,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.p rototype,{get innerHTML(){return e(this)},set innerHTML(a){h(this,a),this.invali dateShadowRenderer()},get olderShadowRoot(){return k.get(this)||null},get host() {return j.get(this)||null},invalidateShadowRenderer:function(){return j.get(this ).invalidateShadowRenderer()},elementFromPoint:function(a,b){return d(this,this. ownerDocument,a,b)},getElementById:function(a){return this.querySelector("#"+a)} }),a.wrappers.ShadowRoot=b}(window.ShadowDOMPolyfill),function(a){"use strict";f unction b(a){a.previousSibling_=a.previousSibling,a.nextSibling_=a.nextSibling,a .parentNode_=a.parentNode}function c(a,c,e){var f=F(a),g=F(c),h=e?F(e):null;if(d (c),b(c),e)a.firstChild===e&&(a.firstChild_=e),e.previousSibling_=e.previousSibl ing;else{a.lastChild_=a.lastChild,a.lastChild===a.firstChild&&(a.firstChild_=a.f irstChild);var i=G(f.lastChild);i&&(i.nextSibling_=i.nextSibling)}f.insertBefore (g,h)}function d(a){var c=F(a),d=c.parentNode;if(d){var e=G(d);b(a),a.previousSi bling&&(a.previousSibling.nextSibling_=a),a.nextSibling&&(a.nextSibling.previous Sibling_=a),e.lastChild===a&&(e.lastChild_=a),e.firstChild===a&&(e.firstChild_=a ),d.removeChild(c)}}function e(a,b){g(b).push(a),x(a,b);var c=I.get(a);c||I.set( a,c=[]),c.push(b)}function f(a){H.set(a,[])}function g(a){return H.get(a)}functi on h(a){for(var b=[],c=0,d=a.firstChild;d;d=d.nextSibling)b[c++]=d;return b}func tion i(a,b,c){for(var d=a.firstChild;d;d=d.nextSibling)if(b(d)){if(c(d)===!1)ret urn}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 z))return!1;if(!L.test(c))return!1;i f(":"===c[0]&&!M.test(c))return!1;try{return a.matches(c)}catch(d){return!1}}fun ction k(){for(var a=0;a<O.length;a++)O[a].render();O=[]}function l(){y=null,k()} function m(a){var b=K.get(a);return b||(b=new q(a),K.set(a,b)),b}function n(a){f or(;a;a=a.parentNode)if(a instanceof D)return a;return null}function o(a){return m(a.host)}function p(a){this.skip=!1,this.node=a,this.childNodes=[]}function q( a){this.host=a,this.dirty=!1,this.invalidateAttributes(),this.associateNode(a)}f unction r(a){return a instanceof A}function s(a){return a instanceof A}function t(a){return a instanceof B}function u(a){return a instanceof B}function v(a){ret urn a.shadowRoot}function w(a){for(var b=[],c=a.shadowRoot;c;c=c.olderShadowRoot )b.push(c);return b}function x(a,b){J.set(a,b)}var y,z=a.wrappers.Element,A=a.wr appers.HTMLContentElement,B=a.wrappers.HTMLShadowElement,C=a.wrappers.Node,D=a.w rappers.ShadowRoot,E=(a.assert,a.mixin,a.oneOf),F=a.unwrap,G=a.wrap,H=new WeakMa p,I=new WeakMap,J=new WeakMap,K=new WeakMap,L=/^[*.:#[a-zA-Z_|]/,M=new RegExp("^ :("+["link","visited","target","enabled","disabled","checked","indeterminate","n th-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("|")+")"),N=E(window, ["requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame ","setTimeout"]),O=[],P=new ArraySplice;P.equals=function(a,b){return F(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( F(b)),g=a||new WeakMap,i=P.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=G(f[k++]);g.get(q)||d(q)}for(var r=n.addedCount,s=f[k]&&G(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.invalidateAttributes(),this.treeComposition();var b=this.host,c=b.shadowRoo t;this.associateNode(b);for(var d=!e,e=a||new p(b),f=c.firstChild;f;f=f.nextSibl ing)this.renderNode(c,e,f,!1);d&&e.sync(),this.dirty=!1}},invalidate:function(){ if(!this.dirty){if(this.dirty=!0,O.push(this),y)return;y=window[N](l,0)}},render Node: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.renderShadowInsertionPoin t(a,b,c):this.renderAsAnyDomTree(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.f irstChild;f;f=f.nextSibling)this.renderNode(a,b,f,d)},renderInsertionPoint:funct ion(a,b,c,d){var e=g(c);if(e.length){this.associateNode(c);for(var f=0;f<e.lengt h;f++){var h=e[f];r(h)&&d?this.renderInsertionPoint(a,b,h,d):this.renderAsAnyDom Tree(a,b,h,d)}}else this.renderFallbackContent(a,b,c);this.associateNode(c.paren tNode)},renderShadowInsertionPoint:function(a,b,c){var d=a.olderShadowRoot;if(d) {x(d,c),this.associateNode(c.parentNode);for(var e=d.firstChild;e;e=e.nextSiblin g)this.renderNode(d,b,e,!0)}else this.renderFallbackContent(a,b,c)},renderFallba ckContent:function(a,b,c){this.associateNode(c),this.associateNode(c.parentNode) ;for(var d=c.firstChild;d;d=d.nextSibling)this.renderAsAnyDomTree(a,b,d,!1)},inv alidateAttributes:function(){this.attributes=Object.create(null)},updateDependen tAttributes: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.attributes[a]},distribute:f unction(a,b){var c=this;i(a,s,function(a){f(a),c.updateDependentAttributes(a.get Attribute("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.shad owRoot,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,functi on(a){return f=a,!1}),j=f,this.distribute(b,c),j){var k=b.olderShadowRoot;if(k){ b=k,x(b,j);continue}break}break}},associateNode:function(a){a.impl.polymerShadow Renderer_=this}},C.prototype.invalidateShadowRenderer=function(){var a=this.impl .polymerShadowRenderer_;return a?(a.invalidate(),!0):!1},A.prototype.getDistribu tedNodes=function(){return k(),g(this)},B.prototype.nodeIsInserted_=A.prototype. nodeIsInserted_=function(){this.invalidateShadowRenderer();var a,b=n(this);b&&(a =o(b)),this.impl.polymerShadowRenderer_=a,a&&a.invalidate()},a.eventParentsTable =I,a.getRendererForHost=m,a.getShadowTrees=w,a.insertionParentTable=J,a.renderAl lPending=k,a.visual={insertBefore:c,remove:d}}(window.ShadowDOMPolyfill),functio n(a){"use strict";function b(b){if(window[b]){d(!a.wrappers[b]);var i=function(a ){c.call(this,a)};i.prototype=Object.create(c.prototype),e(i.prototype,{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.mixin,f=a.registe rWrapper,g=a.unwrap,h=a.wrap,i=["HTMLButtonElement","HTMLFieldSetElement","HTMLI nputElement","HTMLKeygenElement","HTMLLabelElement","HTMLLegendElement","HTMLObj ectElement","HTMLOutputElement","HTMLSelectElement","HTMLTextAreaElement"];i.for Each(b)}(window.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.ap ply(this.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 .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}function h(a,b){var c=document.implemen tation[b];a.prototype[b]=function(){return v(c.apply(this.impl,arguments))}}func tion 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 .ParentNodeInterface,m=a.SelectorsInterface,n=a.wrappers.ShadowRoot,o=a.defineWr apGetter,p=a.elementFromPoint,q=a.forwardMethodsToWrapper,r=a.matchesName,s=a.mi xin,t=a.registerWrapper,u=a.unwrap,v=a.wrap,w=a.wrapEventTargetMethods,x=(a.wrap NodeList,new WeakMap);b.prototype=Object.create(k.prototype),o(b,"documentElemen t"),o(b,"body"),o(b,"head"),["createComment","createDocumentFragment","createEle ment","createElementNS","createEvent","createEventNS","createRange","createTextN ode","getElementById"].forEach(c);var y=document.adoptNode,z=document.importNode ;if(s(b.prototype,{adoptNode:function(a){return a.parentNode&&a.parentNode.remov eChild(a),d(a,this),a},elementFromPoint:function(a,b){return p(this,this,a,b)},i mportNode:function(a,b){var c=v(z.call(this.impl,u(a),!1));if(b)for(var d=a.firs tChild;d;d=d.nextSibling)c.appendChild(this.importNode(d,!0));return c}}),docume nt.register){var A=document.register;b.prototype.register=function(b,c){function d(a){return a?(this.impl=a,void 0):c.extends?document.createElement(c.extends,b ):document.createElement(b)}var e=c.prototype;if(a.nativePrototypeTable.get(e))t hrow new Error("NotSupportedError");for(var f,g=Object.getPrototypeOf(e),h=[];g& &!(f=a.nativePrototypeTable.get(g));)h.push(g),g=Object.getPrototypeOf(g);if(!f) throw new Error("NotSupportedError");for(var i=Object.create(f),j=h.length-1;j>= 0;j--)i=Object.create(i);["createdCallback","enteredViewCallback","leftViewCallb ack","attributeChangedCallback"].forEach(function(a){var b=e[a];b&&(i[a]=functio n(){b.apply(v(this),arguments)})});var k={prototype:i};c.extends&&(k.extends=c.e xtends);A.call(u(this),b,k);return d.prototype=e,d.prototype.constructor=d,a.con structorTable.set(i,d),a.nativePrototypeTable.set(e,i),d},q([window.HTMLDocument ||window.Document],["register"])}q([window.HTMLBodyElement,window.HTMLDocument|| window.Document,window.HTMLHeadElement,window.HTMLHtmlElement],["appendChild","c ompareDocumentPosition","contains","getElementsByClassName","getElementsByTagNam e","getElementsByTagNameNS","insertBefore","querySelector","querySelectorAll","r emoveChild","replaceChild",r]),q([window.HTMLDocument||window.Document],["adoptN ode","importNode","contains","createComment","createDocumentFragment","createEle ment","createElementNS","createEvent","createEventNS","createRange","createTextN ode","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.HTMLDocume nt,b),w([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTML HeadElement]),h(g,"createDocumentType"),h(g,"createDocument"),h(g,"createHTMLDoc ument"),i(g,"hasFeature"),t(window.DOMImplementation,g),q([window.DOMImplementat ion],["createDocumentType","createDocument","createHTMLDocument","hasFeature"]), a.adoptNodeNoRemove=d,a.wrappers.DOMImplementation=g,a.wrappers.Document=b}(wind ow.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.unwrapIfNe eded,h=a.wrap,i=a.renderAllPending,j=window.Window;b.prototype=Object.create(c.p rototype);var k=window.getComputedStyle;j.prototype.getComputedStyle=function(a, b){return i(),k.call(this||window,g(a),b)},["addEventListener","removeEventListe ner","dispatchEvent"].forEach(function(a){j.prototype[a]=function(){var b=h(this ||window);return b[a].apply(b,arguments)}}),d(b.prototype,{getComputedStyle:func tion(a,b){return k.call(f(this),g(a),b)}}),e(j,b),a.wrappers.Window=b}(window.Sh adowDOMPolyfill),function(a){"use strict";function b(a){var b=c[a],d=window[b];i f(d){var e=document.createElement(a),f=e.constructor;window[b]=f}}var c=(a.isWra pperFor,{a:"HTMLAnchorElement",applet:"HTMLAppletElement",area:"HTMLAreaElement" ,br:"HTMLBRElement",base:"HTMLBaseElement",body:"HTMLBodyElement",button:"HTMLBu ttonElement",dl:"HTMLDListElement",datalist:"HTMLDataListElement",data:"HTMLData Element",dir:"HTMLDirectoryElement",div:"HTMLDivElement",embed:"HTMLEmbedElement ",fieldset:"HTMLFieldSetElement",font:"HTMLFontElement",form:"HTMLFormElement",f rame:"HTMLFrameElement",frameset:"HTMLFrameSetElement",hr:"HTMLHRElement",head:" HTMLHeadElement",h1:"HTMLHeadingElement",html:"HTMLHtmlElement",iframe:"HTMLIFra meElement",input:"HTMLInputElement",li:"HTMLLIElement",label:"HTMLLabelElement", legend:"HTMLLegendElement",link:"HTMLLinkElement",map:"HTMLMapElement",marquee:" HTMLMarqueeElement",menu:"HTMLMenuElement",menuitem:"HTMLMenuItemElement",meta:" HTMLMetaElement",meter:"HTMLMeterElement",del:"HTMLModElement",ol:"HTMLOListElem ent",object:"HTMLObjectElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptio nElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamEl ement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement", script:"HTMLScriptElement",select:"HTMLSelectElement",source:"HTMLSourceElement" ,span:"HTMLSpanElement",style:"HTMLStyleElement",time:"HTMLTimeElement",caption: "HTMLTableCaptionElement",col:"HTMLTableColElement",table:"HTMLTableElement",tr: "HTMLTableRowElement",thead:"HTMLTableSectionElement",tbody:"HTMLTableSectionEle ment",textarea:"HTMLTextAreaElement",track:"HTMLTrackElement",title:"HTMLTitleEl ement",ul:"HTMLUListElement",video:"HTMLVideoElement"});
3 Object.keys(c).forEach(b),Object.getOwnPropertyNames(a.wrappers).forEach(functio n(b){window[b]=a.wrappers[b]}),a.knownElements=c}(window.ShadowDOMPolyfill),func tion(){var a=window.ShadowDOMPolyfill;a.wrap,Object.defineProperties(HTMLElement .prototype,{webkitShadowRoot:{get:function(){return this.shadowRoot}}}),HTMLElem ent.prototype.webkitCreateShadowRoot=HTMLElement.prototype.createShadowRoot,wind ow.dartExperimentalFixupGetTag=function(b){function c(a){if(a instanceof d)retur n"NodeList";if(a instanceof e)return"ShadowRoot";if(window.MutationRecord&&a ins tanceof MutationRecord)return"MutationRecord";if(window.MutationObserver&&a inst anceof MutationObserver)return"MutationObserver";if(a instanceof HTMLTemplateEle ment)return"HTMLTemplateElement";var c=f(a);if(a!==c){var g=a.constructor;if(g== =c.constructor){var h=g._ShadowDOMPolyfill$cacheTag_;return h||(h=Object.prototy pe.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.unwrap IfNeeded;return c}}();var Platform={};!function(a){function b(a,b){var c="";retu rn Array.prototype.forEach.call(a,function(a){c+=a.textContent+"\n\n"}),b||(c=c. replace(n,"")),c}function c(a){var b=document.createElement("style");return b.te xtContent=a,b}function d(a){var b=c(a);document.head.appendChild(b);var d=b.shee t.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().ap pendChild(document.createTextNode(a))}function g(){return h||(h=document.createE lement("style"),h.setAttribute("ShadowCSSShim","")),h}var h,i={strictStyling:!1, registry:{},shimStyling:function(a,b,d){var e=this.isTypeExtension(d),g=this.reg isterDefinition(a,b,d);this.strictStyling&&this.applyScopeToContent(a,b),this.in sertPolyfillDirectives(g.rootStyles),this.insertPolyfillRules(g.rootStyles);var h=this.stylesToShimmedCssText(g.scopeStyles,b,e);h+=this.extractPolyfillUnscoped Rules(g.rootStyles),g.shimmedStyle=c(h),a&&(a.shimmedStyle=g.shimmedStyle);for(v ar i,j=0,k=g.rootStyles.length;k>j&&(i=g.rootStyles[j]);j++)i.parentNode.removeC hild(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.sli ce.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.scopeStyl es.concat(d.scopeStyles)),d},isTypeExtension:function(a){return a&&a.indexOf("-" )<0},applyScopeToContent:function(a,b){a&&(Array.prototype.forEach.call(a.queryS electorAll("*"),function(a){a.setAttribute(b,"")}),Array.prototype.forEach.call( a.querySelectorAll("template"),function(a){this.applyScopeToContent(a.content,b) },this))},insertPolyfillDirectives:function(a){a&&Array.prototype.forEach.call(a ,function(a){a.textContent=this.insertPolyfillDirectivesInCssText(a.textContent) },this)},insertPolyfillDirectivesInCssText:function(a){return a.replace(o,functi on(a,b){return b.slice(0,-2)+"{"})},insertPolyfillRules:function(a){a&&Array.pro totype.forEach.call(a,function(a){a.textContent=this.insertPolyfillRulesInCssTex t(a.textContent)},this)},insertPolyfillRulesInCssText:function(a){return a.repla ce(p,function(a,b){return b.slice(0,-1)})},extractPolyfillUnscopedRules:function (a){var b="";return a&&Array.prototype.forEach.call(a,function(a){b+=this.extrac tPolyfillUnscopedRulesFromCssText(a.textContent)+"\n\n"},this),b},extractPolyfil lUnscopedRulesFromCssText:function(a){for(var b,c="";b=q.exec(a);)c+=b[1].slice( 0,-1)+"\n\n";return c},stylesToShimmedCssText:function(a,b,c){return this.shimAt Host(a,b,c)+this.shimScoping(a,b,c)},shimAtHost:function(a,b,c){return a?this.co nvertAtHostStyles(a,b,c):void 0},convertAtHostStyles: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(thi s.findAtHostRules(d(g),this.makeScopeMatcher(c,f)))},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.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(", ")},fin dAtHostRules:function(a,b){return Array.prototype.filter.call(a,this.isHostRule. bind(this,b))},isHostRule:function(a,b){return b.selectorText&&b.selectorText.ma tch(a)||b.cssRules&&this.findAtHostRules(b.cssRules,a).length||b.type==CSSRule.W EBKIT_KEYFRAMES_RULE},shimScoping:function(a,b,c){return a?this.convertScopedSty les(a,b,c):void 0},convertScopedStyles:function(a,c,e){var f=b(a).replace(j,""); f=this.insertPolyfillHostInCssText(f),f=this.convertColonHost(f),f=this.convertP seudos(f),f=this.convertParts(f),f=this.convertCombinators(f);var g=d(f);return f=this.scopeRules(g,c,e)},convertPseudos:function(a){return a.replace(r," [pseud o=$1]")},convertParts:function(a){return a.replace(s," [part=$1]")},convertColon Host:function(a){return a.replace(t,function(a,b,c,d){return b=y,c?c.match(x)?b+ c.replace(x,"")+d:b+c+d+", "+c+" "+b+d:b+d})},convertCombinators:function(a){ret urn a.replace(/\^\^/g," ").replace(/\^/g," ")},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+=this.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.forEach(function(a){a=a.trim(),this.selectorNeedsScoping(a,b,c)&&(a =d?this.applyStrictSelectorScope(a,b):this.applySimpleSelectorScope(a,b,c)),e.pu sh(a)},this),e.join(", ")},selectorNeedsScoping:function(a,b,c){var d=this.makeS copeMatcher(b,c);return!a.match(d)},makeScopeMatcher:function(a,b){var c=b?"\\[i s=['\"]?"+a+"['\"]?\\]":a;return new RegExp("^("+c+")"+u,"m")},applySimpleSelect orScope: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.trim().replace(z,"");return b&&c.indexOf(b)<0&&b.indexO f(e)<0&&(a=b.replace(/([^:]*)(:*)(.*)/,"$1"+e+"$2$3")),a}).join(a)}),d},insertPo lyfillHostInCssText:function(a){return a.replace(v,x).replace(w,x)},propertiesFr omRule:function(a){var b=a.style.cssText;return a.style.content&&!a.style.conten t.match(/['"]+/)&&(b="content: '"+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-rule([^*]*\*+([^/*][^*]*\*+)*)\//gim,q=/\/\*\s@polyfil l-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=do cument.querySelector("head");A.insertBefore(g(),A.childNodes[0])}a.ShadowCSS=i}( window.Platform)} 3 Object.keys(c).forEach(b),Object.getOwnPropertyNames(a.wrappers).forEach(functio n(b){window[b]=a.wrappers[b]}),a.knownElements=c}(window.ShadowDOMPolyfill),func tion(){{var a=window.ShadowDOMPolyfill;a.wrap}Object.defineProperties(HTMLElemen t.prototype,{webkitShadowRoot:{get:function(){return this.shadowRoot}}}),HTMLEle ment.prototype.webkitCreateShadowRoot=HTMLElement.prototype.createShadowRoot,win dow.dartExperimentalFixupGetTag=function(b){function c(a){if(a instanceof d)retu rn"NodeList";if(a instanceof e)return"ShadowRoot";if(window.MutationRecord&&a in stanceof MutationRecord)return"MutationRecord";if(window.MutationObserver&&a ins tanceof MutationObserver)return"MutationObserver";if(a instanceof HTMLTemplateEl ement)return"HTMLTemplateElement";var c=f(a);if(a!==c){var g=a.constructor;if(g= ==c.constructor){var h=g._ShadowDOMPolyfill$cacheTag_;return h||(h=Object.protot ype.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.unwra pIfNeeded;return c}}();var Platform={};!function(a){function b(a,b){var c="";ret urn Array.prototype.forEach.call(a,function(a){c+=a.textContent+"\n\n"}),b||(c=c .replace(n,"")),c}function c(a){var b=document.createElement("style");return b.t extContent=a,b}function d(a){var b=c(a);document.head.appendChild(b);var d=b.she et.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().a ppendChild(document.createTextNode(a))}function g(){return h||(h=document.create Element("style"),h.setAttribute("ShadowCSSShim","")),h}var h,i={strictStyling:!1 ,registry:{},shimStyling:function(a,b,d){var e=this.isTypeExtension(d),g=this.re gisterDefinition(a,b,d);this.strictStyling&&this.applyScopeToContent(a,b),this.i nsertPolyfillDirectives(g.rootStyles),this.insertPolyfillRules(g.rootStyles);var h=this.stylesToShimmedCssText(g.scopeStyles,b,e);h+=this.extractPolyfillUnscope dRules(g.rootStyles),g.shimmedStyle=c(h),a&&(a.shimmedStyle=g.shimmedStyle);for( var i,j=0,k=g.rootStyles.length;k>j&&(i=g.rootStyles[j]);j++)i.parentNode.remove Child(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.sl ice.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.scopeSty les.concat(d.scopeStyles)),d},isTypeExtension:function(a){return a&&a.indexOf("- ")<0},applyScopeToContent:function(a,b){a&&(Array.prototype.forEach.call(a.query SelectorAll("*"),function(a){a.setAttribute(b,"")}),Array.prototype.forEach.call (a.querySelectorAll("template"),function(a){this.applyScopeToContent(a.content,b )},this))},insertPolyfillDirectives:function(a){a&&Array.prototype.forEach.call( a,function(a){a.textContent=this.insertPolyfillDirectivesInCssText(a.textContent )},this)},insertPolyfillDirectivesInCssText:function(a){return a.replace(o,funct ion(a,b){return b.slice(0,-2)+"{"})},insertPolyfillRules:function(a){a&&Array.pr ototype.forEach.call(a,function(a){a.textContent=this.insertPolyfillRulesInCssTe xt(a.textContent)},this)},insertPolyfillRulesInCssText:function(a){return a.repl ace(p,function(a,b){return b.slice(0,-1)})},extractPolyfillUnscopedRules:functio n(a){var b="";return a&&Array.prototype.forEach.call(a,function(a){b+=this.extra ctPolyfillUnscopedRulesFromCssText(a.textContent)+"\n\n"},this),b},extractPolyfi llUnscopedRulesFromCssText:function(a){for(var b,c="";b=q.exec(a);)c+=b[1].slice (0,-1)+"\n\n";return c},stylesToShimmedCssText:function(a,b,c){return this.shimA tHost(a,b,c)+this.shimScoping(a,b,c)},shimAtHost:function(a,b,c){return a?this.c onvertAtHostStyles(a,b,c):void 0},convertAtHostStyles: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(th is.findAtHostRules(d(g),this.makeScopeMatcher(c,f)))},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.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(", ")},fin dAtHostRules:function(a,b){return Array.prototype.filter.call(a,this.isHostRule. bind(this,b))},isHostRule:function(a,b){return b.selectorText&&b.selectorText.ma tch(a)||b.cssRules&&this.findAtHostRules(b.cssRules,a).length||b.type==CSSRule.W EBKIT_KEYFRAMES_RULE},shimScoping:function(a,b,c){return a?this.convertScopedSty les(a,b,c):void 0},convertScopedStyles:function(a,c,e){var f=b(a).replace(j,""); f=this.insertPolyfillHostInCssText(f),f=this.convertColonHost(f),f=this.convertP seudos(f),f=this.convertParts(f),f=this.convertCombinators(f);var g=d(f);return f=this.scopeRules(g,c,e)},convertPseudos:function(a){return a.replace(r," [pseud o=$1]")},convertParts:function(a){return a.replace(s," [part=$1]")},convertColon Host:function(a){return a.replace(u,function(a,b,c,d){if(b=y,c){for(var e,f=c.sp lit(","),g=[],h=0,i=f.length;i>h&&(e=f[h]);h++)e=e.trim(),e.match(t)?g.push(b+e. replace(t,"")+d):g.push(b+e+d+", "+e+" "+b+d);return g.join(",")}return b+d})},c onvertCombinators:function(a){return a.replace(/\^\^/g," ").replace(/\^/g," ")}, scopeRules:function(a,b,c){var d="";return Array.prototype.forEach.call(a,functi on(a){a.selectorText&&a.style&&a.style.cssText?(d+=this.scopeSelector(a.selector Text,b,c,this.strictStyling)+" {\n ",d+=this.propertiesFromRule(a)+"\n}\n\n "):a.media?(d+="@media "+a.media.mediaText+" {\n",d+=this.scopeRules(a.cssRules, b,c),d+="\n}\n\n"):a.cssText&&(d+=a.cssText+"\n\n")},this),d},scopeSelector:func tion(a,b,c,d){var e=[],f=a.split(",");return f.forEach(function(a){a=a.trim(),th is.selectorNeedsScoping(a,b,c)&&(a=d&&!a.match(y)?this.applyStrictSelectorScope( a,b):this.applySimpleSelectorScope(a,b,c)),e.push(a)},this),e.join(", ")},select orNeedsScoping:function(a,b,c){var d=this.makeScopeMatcher(b,c);return!a.match(d )},makeScopeMatcher:function(a,b){var c=b?"\\[is=['\"]?"+a+"['\"]?\\]":a;return new RegExp("^("+c+")"+v,"m")},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},a pplyStrictSelectorScope:function(a,b){var c=[" ",">","+","~"],d=a,e="["+b+"]";re turn c.forEach(function(a){var b=d.split(a);d=b.map(function(a){var b=a.trim().r eplace(z,"");return b&&c.indexOf(b)<0&&b.indexOf(e)<0&&(a=b.replace(/([^:]*)(:*) (.*)/,"$1"+e+"$2$3")),a}).join(a)}),d},insertPolyfillHostInCssText:function(a){r eturn a.replace(w,t).replace(x,t)},propertiesFromRule:function(a){return a.style .cssText}},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 ="-shadowcsshost",u=new RegExp("("+t+")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^ ,{]*)","gim"),v="([>\\s~+[.,{:][\\s\\S]*)?$",w=/@host/gim,x=/\:host/gim,y=t+"-no -combinator",z=new RegExp(t,"gim");if(window.ShadowDOMPolyfill){f("style { displ ay: 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 | « pkg/shadow_dom/lib/shadow_dom.debug.js ('k') | pkg/shadow_dom/tool/build.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698