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

Side by Side Diff: third_party/polymer/platform/platform.js

Issue 98583008: Checkout Polymer using bower instead of the raw repository. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years 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 | « third_party/polymer/platform/build.log ('k') | third_party/polymer/platform/platform.js.map » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Polymer Authors. All rights reserved.
2 //
3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions are
5 // met:
6 //
7 // * Redistributions of source code must retain the above copyright
8 // notice, this list of conditions and the following disclaimer.
9 // * Redistributions in binary form must reproduce the above
10 // copyright notice, this list of conditions and the following disclaimer
11 // in the documentation and/or other materials provided with the
12 // distribution.
13 // * Neither the name of Google Inc. nor the names of its
14 // contributors may be used to endorse or promote products derived from
15 // this software without specific prior written permission.
16 //
17 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
29 function PointerGestureEvent(a,b){var c=b||{},d=document.createEvent("Event"),e= {bubbles:Boolean(c.bubbles)===c.bubbles||!0,cancelable:Boolean(c.cancelable)===c .cancelable||!0};d.initEvent(a,e.bubbles,e.cancelable);for(var f,g=Object.keys(c ),h=0;h<g.length;h++)f=g[h],d[f]=c[f];return d.preventTap=this.preventTap,d}"und efined"==typeof WeakMap&&!function(){var a=Object.defineProperty,b=Date.now()%1e 9,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,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}(),function(a ){"use strict";function b(){function a(a){b=a}if("function"!=typeof Object.obser ve||"function"!=typeof Array.observe)return!1;var b=[],c={};if(Object.observe(c, a),c.id=1,c.id=2,delete c.id,Object.deliverChangeRecords(a),3!==b.length)return! 1;if("new"==b[0].type&&"updated"==b[1].type&&"deleted"==b[2].type)F="new",G="upd ated",H="reconfigured",I="deleted";else if("add"!=b[0].type||"update"!=b[1].type ||"delete"!=b[2].type)return console.error("Unexpected change record names for O bject.observe. Using dirty-checking instead"),!1;return Object.unobserve(c,a),c= [0],Array.observe(c,a),c[1]=1,c.length=0,Object.deliverChangeRecords(a),2!=b.len gth?!1:b[0].type!=J||b[1].type!=J?!1:(Array.unobserve(c,a),!0)}function c(){if(a .document&&"securityPolicy"in a.document&&!a.document.securityPolicy.allowsEval) return!1;try{var b=new Function("","return true;");return b()}catch(c){return!1} }function d(a){return+a===a>>>0}function e(a){return+a}function f(a){return a=== Object(a)}function g(a,b){return a===b?0!==a||1/a===1/b:M(a)&&M(b)?!0:a!==a&&b!= =b}function h(a){return"string"!=typeof a?!1:(a=a.trim(),""==a?!0:"."==a[0]?!1:U .test(a))}function i(a,b){if(b!==V)throw Error("Use Path.get to retrieve path ob jects");return""==a.trim()?this:d(a)?(this.push(a),this):(a.split(/\s*\.\s*/).fi lter(function(a){return a}).forEach(function(a){this.push(a)},this),L&&!K&&this. length&&(this.getValueFrom=this.compiledGetValueFromFn()),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}functio n 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}functio n 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,removed:d,changed:e}}function o (a,b){var c=b||(Array.isArray(a)?[]:{});for(var d in a)c[d]=a[d];return Array.is Array(a)&&(c.length=a.length),c}function p(a,b,c){if(this.closed_=!1,this.object _=a,this.callback=b,this.target=c,this.reporting_=!0,K){var d=this;this.boundInt ernalCallback_=function(a){d.internalCallback_(a)}}q(this)}function q(a){$&&(Z.p ush(a),p._allObserversCount++)}function r(a,b,c){p.call(this,a,b,c),this.connect _(),this.sync_(!0)}function s(a,b,c){if(!Array.isArray(a))throw Error("Provided object is not an Array");r.call(this,a,b,c)}function t(a){this.arr=[],this.callb ack=a,this.isObserved=!0}function u(a,b,c,d,e,g){var b=b instanceof i?b:j(b);ret urn b.valid&&b.length&&f(a)?(p.call(this,a,c,d),this.transformFn_=e,this.setValu eFn_=g,this.path_=b,this.connect_(),this.sync_(!0),void 0):(this.value_=b.getVal ueFrom(a),this.value=e?e(this.value_):this.value_,this.closed_=!0,void 0)}functi on v(a,b,c,d){p.call(this,void 0,a,b),this.transformFn_=c,this.setValueFn_=d,thi s.observed_=[],this.values_=[],this.value=void 0,this.oldValue=void 0,this.oldVa lues_=void 0,this.changeFlags_=void 0,this.started_=!1}function w(a,b){if("funct ion"==typeof Object.observe){var c=Object.getNotifier(a);return function(d,e){va r 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.error(g))}for(var h in d)d[h]=a[h];for(var h in e)e[h]=void 0;var i={};for(var h in c)if(!(h in d ||h in e)){var j=a[h];c[h]!==j&&(i[h]=j)}return{added:d,removed:e,changed:i}}fun ction 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.splice(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.apply(l,c),c=l}i f(e.index+e.removed.length>i.index+i.addedCount){var m=e.removed.slice(i.index+i .addedCount-e.index);Array.prototype.push.apply(c,m)}e.removed=c,i.index<e.index &&(e.index=i.index)}else f=!0}else if(e.index<i.index){f=!0,a.splice(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))contin ue;var h=e(g.name);if(0>h)continue;C(c,h,[g.oldValue],1);break;default:console.e rror("Unexpected record type: "+JSON.stringify(g))}}return c}function E(a,b){var c=[];return D(a,b).forEach(function(b){return 1==b.addedCount&&1==b.removed.len gth?(b.removed[0]!==a[b.index]&&c.push(b),void 0):(c=c.concat(A(a,b.index,b.inde x+b.addedCount,b.removed,0,b.removed.length)),void 0)}),c}var F="add",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}:f unction(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.get OwnPropertyDescriptor(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},c ompiledGetValueFromFn: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.length-1;e++){{ this[e]}c+=a[e],b+=" &&\n "+c+" != null"}return b+=")\n",c+=a[e],b+=" retur n "+c+";\nelse\n return undefined;",new Function("obj",b)},setValueFrom:functio n(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={internalCallb ack_:function(a){this.closed_||this.reporting_&&this.check_(a)&&(this.report_(), this.testingResults&&(this.testingResults.anyChanged=!0))},close:function(){this .closed_||(this.object_&&"function"==typeof this.object_.close&&this.object_.clo se(),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 .reporting_&&(this.sync_(!1),this.callback&&this.invokeCallback_(this.reportArgs ),this.reportArgs=void 0)},invokeCallback_:function(a){try{this.callback.apply(t his.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.forceCollectObservers;p._ allObserversCount=0,$&&(Z=[]);var _=!1,ab="function"==typeof Object.deliverAllCh angeRecords;a.Platform=a.Platform||{},a.Platform.performMicrotaskCheckpoint=func tion(){if(!_){if(ab)return Object.deliverAllChangeRecords(),void 0;if($){_=!0;va r 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.pus h(f))}}while(Y>b&&c.anyChanged);a.testingExposeCycleCount&&(a.dirtyCheckCycleCou nt=b),p._allObserversCount=Z.length,_=!1}}},$&&(a.Platform.clearObservers=functi on(){Z=[]}),r.prototype=N({__proto__:p.prototype,connect_:function(){K&&Object.o bserve(this.object_,this.boundInternalCallback_)},sync_:function(){K||(this.oldO bject=o(this.object_))},check_:function(a){var b,c;if(K){if(!a)return!1;c={},b=x (this.object_,a,c)}else c=this.oldObject,b=n(this.object_,this.oldObject);return m(b)?!1:(this.reportArgs=[b.added||{},b.removed||{},b.changed||{}],this.reportA rgs.push(function(a){return c[a]}),!0)},disconnect_:function(){K?this.object_&&O bject.unobserve(this.object_,this.boundInternalCallback_):this.oldObject=void 0} }),s.prototype=N({__proto__:r.prototype,connect_:function(){K&&Array.observe(thi s.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.object _,a)}else b=A(this.object_,0,this.object_.length,this.oldObject,0,this.oldObject .length);return b&&b.length?(this.reportArgs=[b],!0):!1}}),s.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_:functi on(){K&&(this.observedSet_=new t(this.boundInternalCallback_))},disconnect_:func tion(){this.value=void 0,this.value_=void 0,this.observedSet_&&(this.observedSet _.reset(),this.observedSet_.cleanup(),this.observedSet_=void 0)},check_:function (){return this.observedSet_&&this.observedSet_.reset(),this.value_=this.path_.ge tValueFrom(this.object_,this.observedSet_),this.observedSet_&&this.observedSet_. cleanup(),g(this.value_,this.oldValue_)?!1:(this.value=this.transformFn_?this.tr ansformFn_(this.value_):this.value_,this.reportArgs=[this.value,this.oldValue],! 0)},sync_:function(a){a&&(this.observedSet_&&this.observedSet_.reset(),this.valu e_=this.path_.getValueFrom(this.object_,this.observedSet_),this.value=this.trans formFn_?this.transformFn_(this.value_):this.value_,this.observedSet_&&this.obser vedSet_.cleanup()),this.oldValue_=this.value_,this.oldValue=this.value},setValue :function(a){this.setValueFn_?this.setValueFn_(a):this.path_&&this.path_.setValu eFrom(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.getValueFrom(a);this.observed_.push(a,b),this.values_.pu sh(c)},start:function(){this.started_=!0,this.connect_(),this.sync_(!0)},getValu es_:function(){this.observedSet_&&this.observedSet_.reset();for(var a=!1,b=0;b<t his.observed_.length;b+=2){var c=this.observed_[b+1],d=this.observed_[b],e=c.get ValueFrom(d,this.observedSet_),f=this.values_[b/2];if(!g(e,f)){if(!a&&!this.tran sformFn_){this.oldValues_=this.oldValues_||[],this.changeFlags_=this.changeFlags _||[];for(var h=0;h<this.values_.length;h++)this.oldValues_[h]=this.values_[h],t his.changeFlags_[h]=!1}this.transformFn_||(this.changeFlags_[b/2]=!0),this.value s_[b/2]=e,a=!0}}return this.observedSet_&&this.observedSet_.cleanup(),a},check_: function(){if(this.getValues_()){if(this.transformFn_){if(this.value=this.transf ormFn_(this.values_),g(this.value,this.oldValue))return!1;this.reportArgs=[this. value,this.oldValue]}else this.reportArgs=[this.values_,this.oldValues_,this.cha ngeFlags_,this.observed_];return!0}},sync_:function(a){a&&(this.getValues_(),thi s.transformFn_&&(this.value=this.transformFn_(this.values_))),this.transformFn_& &(this.oldValue=this.value)},close:function(){if(this.observed_){for(var a=0;a<t his.observed_.length;a+=2){var b=this.observed_[a];b&&"function"==typeof b.close &&b.close()}this.observed_=void 0,this.values_=void 0}p.prototype.close.call(thi s)}});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.defineProp erty(a,b,{get:function(){return d.getValueFrom(c)},set:function(a){d.setValueFro m(c,a)},configurable:!0}),{close:function(){var g=d.getValueFrom(c);e&&f.deliver (),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){fo r(var g=f-e+1,h=c-b+1,i=new Array(g),j=0;g>j;j++)i[j]=new Array(h),i[j][0]=j;for (var k=0;h>k;k++)i[0][k]=k;for(var j=1;g>j;j++)for(var k=1;h>k;k++)if(this.equal s(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.pus h(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.spliceOperationsFromEditDis tances(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++;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++}r eturn 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.le ngth,e=b.length,f=0;c>f&&this.equals(a[--d],b[--e]);)f++;return f},calculateSpli ces:function(a,b){return this.calcSplices(a,0,a.length,b,0,b.length)},equals:fun ction(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.cal culateSplices(a,b)},a.ArraySplice=z,a.ObjectObserver=r,a.PathObserver=u,a.Compou ndPathObserver=v,a.Path=i,a.Observer.changeRecordTypes={add:F,update:G,reconfigu re:H,"delete":I,splice:J}}("undefined"!=typeof global&&global?global:this||windo w),window.Platform=window.Platform||{},window.logFlags=window.logFlags||{},funct ion(a){var b=a.flags||{};location.search.slice(1).split("&").forEach(function(a) {a=a.split("="),a[0]&&(b[a[0]]=a[1]||!0)}),b.shadow=b.shadow||b.shadowdom||b.pol yfill,b.shadow="native"===b.shadow?!1:b.shadow||!HTMLElement.prototype.createSha dowRoot&&"polyfill",a.flags=b}(Platform),"polyfill"===Platform.flags.shadow?(win dow.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"argum ents":case"caller":case"length":case"name":case"prototype":case"toString":return }K(a,c,M(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=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 this .impl."+a):function(){return this.impl[a]}}function l(a){return H&&j(a)?new Func tion("v","this.impl."+a+" = v"):function(b){this.impl[a]=b}}function m(a){return H&&j(a)?new Function("return this.impl."+a+".apply(this.impl, arguments)"):func tion(){return this.impl[a].apply(this.impl,arguments)}}function n(a,b){try{retur n 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.getEven tHandlerGetter(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})}}}}fu nction p(a,b,c){var e=a.prototype;q(e,b,c),d(b,a)}function q(a,c,d){var e=c.prot otype;b(void 0===E.get(a)),E.set(a,c),F.set(e,a),g(a,e),d&&h(e,d),K(e,"construct or",{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.prototyp e=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 instance of G.DOMImplementation||a instanceof G.CanvasRenderingContext2D||G.WebGLRenderin gContext&&a instanceof G.WebGLRenderingContext}function v(a){return a instanceof R||a instanceof Q||a instanceof S||a instanceof T||a instanceof P||a instanceof U||V&&a instanceof V}function w(a){return null===a?null:(b(v(a)),a.polymerWrapp er_||(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})}functio n C(a,b){B(a,b,function(){return w(this.impl[b])})}function D(a,b){a.forEach(fun ction(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{v ar I=new Function("","return true;");H=I()}catch(J){H=!1}var K=Object.defineProp erty,L=Object.getOwnPropertyNames,M=Object.getOwnPropertyDescriptor;L(window);va r N=/Firefox/.test(navigator.userAgent),O={get:function(){},set:function(){},con figurable:!0,enumerable:!0},P=window.DOMImplementation,Q=window.Event,R=window.N ode,S=window.Window,T=window.Range,U=window.CanvasRenderingContext2D,V=window.We bGLRenderingContext;a.assert=b,a.constructorTable=E,a.defineGetter=B,a.defineWra pGetter=C,a.forwardMethodsToWrapper=D,a.isWrapper=u,a.isWrapperFor=r,a.mixin=c,a .nativePrototypeTable=F,a.oneOf=e,a.registerObject=s,a.registerWrapper=p,a.rewra p=A,a.unwrap=x,a.unwrapIfNeeded=y,a.wrap=w,a.wrapIfNeeded=z,a.wrappers=G}(window .ShadowDOMPolyfill),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=window.MutationObserver,f=[],g=!1;if(e){var h=1,i=new e(b),j=document.cr eateTextNode(h);i.observe(j,{characterData:!0}),d=function(){h=(h+1)%2,j.data=h} }else d=window.setImmediate||window.setTimeout;a.setEndOfMicrotask=c}(window.Sha dowDOMPolyfill),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.takeRecord s();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.NodeList,this.removedNodes=new m.NodeList,th is.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attri buteNamespace=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.length;d++){var e=c[d];e.options.subtree&&e.add TransientObserver(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.obser ver===a&&f.removeTransientObservers()}}}function g(a,c,e){for(var f=Object.creat e(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.options;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){var m=f[p],q=new d(c,a);"name"in e&&"namesp ace"in e&&(q.attributeName=e.name,q.attributeNamespace=e.namespace),e.addedNodes &&(q.addedNodes=e.addedNodes),e.removedNodes&&(q.removedNodes=e.removedNodes),e. previousSibling&&(q.previousSibling=e.previousSibling),e.nextSibling&&(q.nextSib ling=e.nextSibling),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="attributes"in a||!("attributeOldValue"in a||"attributeFilter"in a)?! !a.attributes:!0,this.characterData="characterDataOldValue"in a&&!("characterDat a"in a)?!0:!!a.characterData,!this.attributes&&(a.attributeOldValue||"attributeF ilter"in a)||!this.characterData&&a.characterDataOldValue)throw new TypeError;if (this.characterData=!!a.characterData,this.attributeOldValue=!!a.attributeOldVal ue,this.characterDataOldValue=!!a.characterDataOldValue,"attributeFilter"in a){i f(null==a.attributeFilter||"object"!=typeof a.attributeFilter)throw new TypeErro r;this.attributeFilter=q.call(a.attributeFilter)}else this.attributeFilter=null} function i(a){this.callback_=a,this.nodes_=[],this.records_=[],this.uid_=++r,o.p ush(this)}function j(a,b,c){this.observer=a,this.target=b,this.options=c,this.tr ansientObservedNodes=[]}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:functio n(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.lengt h;f++)e[f].observer===this&&(c=e[f],c.removeTransientObservers(),c.options=d);c| |(c=new j(this,a,d),e.push(c),this.nodes_.push(a))},disconnect:function(){this.n odes_.forEach(function(a){for(var b=n.get(a),c=0;c<b.length;c++){var d=b[c];if(d .observer===this){b.splice(c,1);break}}},this),this.records_=[]},takeRecords:fun ction(){var a=this.records_;return this.records_=[],a}},j.prototype={addTransien tObserver:function(a){if(a!==this.target){this.transientObservedNodes.push(a);va r b=n.get(a);b||n.set(a,b=[]),b.push(this)}},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.spli ce(e,1);break}}},a.enqueueMutation=g,a.registerTransientObservers=e,a.wrappers.M utationObserver=i,a.wrappers.MutationRecord=d}(window.ShadowDOMPolyfill),functio n(a){"use strict";function b(a){return a instanceof O.ShadowRoot}function c(a){v ar b=a.localName;return"content"===b||"shadow"===b}function d(a){return!!a.shado wRoot}function e(a){var b;return a.parentNode||(b=a.defaultView)&&N(b)||null}fun ction f(f,g,h){if(h.length)return h.shift();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(v ar d=[],e=a,g=[],i=[];e;){var j=null;if(c(e)){j=h(d);var k=d[d.length-1]||e;d.pu sh(k)}else d.length||d.push(e);var l=d[d.length-1];g.push({target:l,currentTarge t: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.parentNode}}function j(b){return a.insertionPar entTable.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(a){return Q.get(a)?void 0:(Q.set(a,!0),p(N(a),N(a.target)))}function p(b,c){if(R.get(b))throw new Error ("InvalidStateError");R.set(b,!0),a.renderAllPending();var d=g(c);return"load"== =b.type&&2===d.length&&d[0].target instanceof O.Document&&d.shift(),Z.set(b,d),q (b,d)&&r(b,d)&&s(b,d),V.set(b,v.NONE),T.delete(b,null),R.delete(b),b.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||X.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;U.set(b,j)}}V.set(b,c);var k=b.type,l=!1;S.set(b,d),T. 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),X.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!W.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 $?(this.impl=a,void 0 ):N(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))};if(e.pro totype=Object.create(b.prototype),c&&K(e.prototype,c),d)try{L(d,e,new d("temp")) }catch(f){L(d,e,document.createEvent(a))}return e}function y(a,b){return functio n(){arguments[b]=M(arguments[b]);var c=M(this);c[a].apply(c,arguments)}}function z(a,b,c,d){if(hb)return new a(c,w(d));var e=M(document.createEvent(b)),f=gb[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 A(){ v.call(this)}function B(a){return"function"==typeof a?!0:a&&a.handleEvent}functi on C(a){switch(a){case"DOMAttrModified":case"DOMAttributeNameChanged":case"DOMCh aracterDataModified":case"DOMElementNameChanged":case"DOMNodeInserted":case"DOMN odeInsertedIntoDocument":case"DOMNodeRemoved":case"DOMNodeRemovedFromDocument":c ase"DOMSubtreeModified":return!0}return!1}function D(a){this.impl=a}function E(a ){return a instanceof O.ShadowRoot&&(a=a.host),M(a)}function F(a){J(a,kb)}functi on G(b,c,d,e){a.renderAllPending();for(var f=N(lb.call(c.impl,d,e)),h=g(f,this), i=0;i<h.length;i++){var j=h[i];if(j.currentTarget===b)return j.target}return nul l}function H(a){return function(){var b=Y.get(this);return b&&b[a]&&b[a].value|| null}}function I(a){var b=a.slice(2);return function(c){var d=Y.get(this);d||(d= Object.create(null),Y.set(this,d));var e=d[a];if(e&&this.removeEventListener(b,e .wrapped,!1),"function"==typeof c){var f=function(b){var d=c.call(this,b);d===!1 ?b.preventDefault():"onbeforeunload"===a&&"string"==typeof d&&(b.returnValue=d)} ;this.addEventListener(b,f,!1),d[a]={value:c,wrapped:f}}}}var J=a.forwardMethods ToWrapper,K=a.mixin,L=a.registerWrapper,M=a.unwrap,N=a.wrap,O=a.wrappers,P=(new WeakMap,new WeakMap),Q=new WeakMap,R=new WeakMap,S=new WeakMap,T=new WeakMap,U=n ew WeakMap,V=new WeakMap,W=new WeakMap,X=new WeakMap,Y=new WeakMap,Z=new WeakMap ;u.prototype={equals:function(a){return this.handler===a.handler&&this.type===a. type&&this.capture===a.capture},get removed(){return null===this.handler},remove :function(){this.handler=null}};var $=window.Event;$.prototype.polymerBlackList_ ={returnValue:!0},v.prototype={get target(){return S.get(this)},get currentTarge t(){return T.get(this)},get eventPhase(){return V.get(this)},get path(){var a=ne w O.NodeList,b=Z.get(this);if(b){for(var c=0,d=b.length-1,e=l(T.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(){W.set(this,!0)},stopIm mediatePropagation:function(){W.set(this,!0),X.set(this,!0)}},L($,v,document.cre ateEvent("Event"));var _=x("UIEvent",v),ab=x("CustomEvent",v),bb={get relatedTar get(){return U.get(this)||N(M(this).relatedTarget)}},cb=K({initMouseEvent:y("ini tMouseEvent",14)},bb),db=K({initFocusEvent:y("initFocusEvent",5)},bb),eb=x("Mous eEvent",_,cb),fb=x("FocusEvent",_,db),gb=Object.create(null),hb=function(){try{n ew window.FocusEvent("focus")}catch(a){return!1}return!0}();if(!hb){var ib=funct ion(a,b,c){if(c){var d=gb[c];b=K(K({},d),b)}gb[a]=b};ib("Event",{bubbles:!1,canc elable:!1}),ib("CustomEvent",{detail:null},"Event"),ib("UIEvent",{view:null,deta il:0},"Event"),ib("MouseEvent",{screenX:0,screenY:0,clientX:0,clientY:0,ctrlKey: !1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null},"UIEvent"),ib(" FocusEvent",{relatedTarget:null},"UIEvent")}A.prototype=Object.create(v.prototyp e),K(A.prototype,{get returnValue(){return this.impl.returnValue},set returnValu e(a){this.impl.returnValue=a}});var jb=window.EventTarget,kb=["addEventListener" ,"removeEventListener","dispatchEvent"];[Node,Window].forEach(function(a){var b= a.prototype;kb.forEach(function(a){Object.defineProperty(b,a+"_",{value:b[a]})}) }),D.prototype={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)}},remove EventListener: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)}} },dispatchEvent:function(a){p(a,this)}},jb&&L(jb,D);var lb=document.elementFromP oint;a.adjustRelatedTarget=i,a.elementFromPoint=G,a.getEventHandlerGetter=H,a.ge tEventHandlerSetter=I,a.wrapEventTargetMethods=F,a.wrappers.BeforeUnloadEvent=A, a.wrappers.CustomEvent=ab,a.wrappers.Event=v,a.wrappers.EventTarget=D,a.wrappers .FocusEvent=fb,a.wrappers.MouseEvent=eb,a.wrappers.UIEvent=_}(window.ShadowDOMPo lyfill),function(a){"use strict";function b(a,b){Object.defineProperty(a,b,{enum erable:!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].apply(this.imp l,arguments))}}var f=a.wrap;c.prototype={item:function(a){return this[a]}},b(c.p rototype,"item"),a.wrappers.NodeList=c,a.addWrapNodeListMethod=e,a.wrapNodeList= d
30 }(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){v(a instanceo f 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,nextSibling:a.next Sibling})}function e(a,b){x(a,"childList",{removedNodes:b})}function f(a,b,d,e){ if(a instanceof DocumentFragment){var f=h(a);F=!0;for(var g=f.length-1;g>=0;g--) a.removeChild(f[g]),f[g].parentNode_=b;F=!1;for(var g=0;g<f.length;g++)f[g].prev iousSibling_=f[g-1]||d,f[g].nextSibling_=f[g+1]||e;return d&&(d.nextSibling_=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.next Sibling_=a),e&&(e.previousSibling_=a),f}function g(a){if(a instanceof DocumentFr agment)return h(a);var b=c(a),e=a.parentNode;return e&&d(a,e,b),b}function h(a){ for(var b=new u,c=0,d=a.firstChild;d;d=d.nextSibling)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])}function l(){}function m(){}function n(a,b){v ar c=a.nodeType===s.DOCUMENT_NODE?a:a.ownerDocument;c!==b.ownerDocument&&c.adopt Node(b)}function o(b,c){if(c.length){var d=b.ownerDocument;if(d!==c[0].ownerDocu ment)for(var e=0;e<c.length;e++)a.adoptNodeNoRemove(c[e],d)}}function p(a,b){o(a ,b);var c=b.length;if(1===c)return C(b[0]);for(var d=C(a.ownerDocument.createDoc umentFragment()),e=0;c>e;e++)d.appendChild(C(b[e]));return d}function q(a){if(a. invalidateShadowRenderer()){for(var b=a.firstChild;b;){v(b.parentNode===a);var c =b.nextSibling,d=C(b),e=d.parentNode;e&&K.call(e,d),b.previousSibling_=b.nextSib ling_=b.parentNode_=null,b=c}a.firstChild_=a.lastChild_=null}else for(var c,f=C( a),g=f.firstChild;g;)c=g.nextSibling,K.call(f,g),g=c}function r(a){var b=a.paren tNode;return b&&b.invalidateShadowRenderer()}function s(a){v(a instanceof G),t.c all(this,a),this.parentNode_=void 0,this.firstChild_=void 0,this.lastChild_=void 0,this.nextSibling_=void 0,this.previousSibling_=void 0}var t=a.wrappers.EventT arget,u=a.wrappers.NodeList,v=a.assert,w=a.defineWrapGetter,x=a.enqueueMutation, y=a.isWrapper,z=a.mixin,A=a.registerTransientObservers,B=a.registerWrapper,C=a.u nwrap,D=a.wrap,E=a.wrapIfNeeded,F=!1,G=window.Node,H=window.DocumentFragment,I=( G.prototype.appendChild,G.prototype.compareDocumentPosition),J=G.prototype.inser tBefore,K=G.prototype.removeChild,L=G.prototype.replaceChild,M=/Trident/.test(na vigator.userAgent),N=M?function(a,b){try{K.call(a,b)}catch(c){if(!(a instanceof H))throw c}}:function(a,b){K.call(a,b)};s.prototype=Object.create(t.prototype),z (s.prototype,{appendChild:function(a){return this.insertBefore(a,null)},insertBe fore:function(a,c){b(a);var d;c?y(c)?d=C(c):(d=c,c=D(d)):(c=null,d=null),c&&v(c. parentNode===this);var e,h=c?c.previousSibling:this.lastChild,i=!this.invalidate ShadowRenderer()&&!r(a);if(e=i?g(a):f(a,this,h,c),i)n(this,a),J.call(this.impl,C (a),d);else{h||(this.firstChild_=e[0]),c||(this.lastChild_=e[e.length-1]);var j= d?d.parentNode:this.impl;j?J.call(j,p(this,e),d):o(this,e)}return x(this,"childL ist",{addedNodes:e,nextSibling:c,previousSibling:h}),k(e),a},removeChild:functio n(a){if(b(a),a.parentNode!==this){for(var d=!1,e=(this.childNodes,this.firstChil d);e;e=e.nextSibling)if(e===a){d=!0;break}if(!d)throw new Error("NotFoundError") }var f=C(a),g=a.nextSibling,h=a.previousSibling;if(this.invalidateShadowRenderer ()){var i=this.firstChild,j=this.lastChild,k=f.parentNode;k&&N(k,f),i===a&&(this .firstChild_=g),j===a&&(this.lastChild_=h),h&&(h.nextSibling_=g),g&&(g.previousS ibling_=h),a.previousSibling_=a.nextSibling_=a.parentNode_=void 0}else N(this.im pl,f);return F||x(this,"childList",{removedNodes:c(a),nextSibling:g,previousSibl ing:h}),A(this,a),a},replaceChild:function(a,d){b(a);var e;if(y(d)?e=C(d):(e=d,d =D(e)),d.parentNode!==this)throw new Error("NotFoundError");var h,i=d.nextSiblin g,j=d.previousSibling,m=!this.invalidateShadowRenderer()&&!r(a);return m?h=g(a): (i===a&&(i=a.nextSibling),h=f(a,this,j,i)),m?(n(this,a),L.call(this.impl,C(a),e) ):(this.firstChild===d&&(this.firstChild_=h[0]),this.lastChild===d&&(this.lastCh ild_=h[h.length-1]),d.previousSibling_=d.nextSibling_=d.parentNode_=void 0,e.par entNode&&L.call(e.parentNode,p(this,h),e)),x(this,"childList",{addedNodes:h,remo vedNodes:c(d),nextSibling:i,previousSibling:j}),l(d),k(h),d},nodeIsInserted_:fun ction(){for(var a=this.firstChild;a;a=a.nextSibling)a.nodeIsInserted_()},hasChil dNodes:function(){return null!==this.firstChild},get parentNode(){return void 0! ==this.parentNode_?this.parentNode_:D(this.impl.parentNode)},get firstChild(){re turn void 0!==this.firstChild_?this.firstChild_:D(this.impl.firstChild)},get las tChild(){return void 0!==this.lastChild_?this.lastChild_:D(this.impl.lastChild)} ,get nextSibling(){return void 0!==this.nextSibling_?this.nextSibling_:D(this.im pl.nextSibling)},get previousSibling(){return void 0!==this.previousSibling_?thi s.previousSibling_:D(this.impl.previousSibling)},get parentElement(){for(var a=t his.parentNode;a&&a.nodeType!==s.ELEMENT_NODE;)a=a.parentNode;return a},get text Content(){for(var a="",b=this.firstChild;b;b=b.nextSibling)a+=b.textContent;retu rn a},set textContent(a){var b=i(this.childNodes);if(this.invalidateShadowRender er()){if(q(this),""!==a){var c=this.impl.ownerDocument.createTextNode(a);this.ap pendChild(c)}}else this.impl.textContent=a;var d=i(this.childNodes);x(this,"chil dList",{addedNodes:d,removedNodes:b}),m(b),k(d)},get childNodes(){for(var a=new u,b=0,c=this.firstChild;c;c=c.nextSibling)a[b++]=c;return a.length=b,a},cloneNod e:function(a){var b=D(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=E(a),a===this)return!0;var b=a.parentNode;return b?this.contai ns(b):!1},compareDocumentPosition:function(a){return I.call(this.impl,C(a))}}),w (s,"ownerDocument"),B(G,s,document.createDocumentFragment()),delete s.prototype. querySelector,delete s.prototype.querySelectorAll,s.prototype=z(Object.create(t. prototype),s.prototype),a.nodeWasAdded=j,a.nodeWasRemoved=l,a.nodesWereAdded=k,a .nodesWereRemoved=m,a.snapshotNodeList=i,a.wrappers.Node=s}(window.ShadowDOMPoly fill),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 n ull}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={getElementsByTagName:function(a){return this.querySelectorAll(a)},getElements ByClassName:function(a){return this.querySelectorAll("."+a)},getElementsByTagNam eNS:function(a,b){if("*"===a)return this.getElementsByTagName(b);for(var c=new N odeList,d=this.getElementsByTagName(b),e=0,f=0;e<d.length;e++)d[e].namespaceURI= ==a&&(c[f++]=d[e]);return c.length=f,c}};a.GetElementsByInterface=e,a.SelectorsI nterface=d}(window.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.wrapper s.NodeList,e={get firstElementChild(){return b(this.firstChild)},get lastElement Child(){return c(this.lastChild)},get childElementCount(){for(var a=0,b=this.fir stElementChild;b;b=b.nextElementSibling)a++;return a},get children(){for(var a=n ew d,b=0,c=this.firstElementChild;c;c=c.nextElementSibling)a[b++]=c;return a.len gth=b,a}},f={get nextElementSibling(){return b(this.nextSibling)},get previousEl ementSibling(){return c(this.previousSibling)}};a.ChildNodeInterface=f,a.ParentN odeInterface=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.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(){return this.impl.data},set data(a){var b=this.impl.da ta;e(this,"characterData",{oldValue:b}),this.impl.data=a}}),f(b.prototype,c),g(h ,b,document.createTextNode("")),a.wrappers.CharacterData=b}(window.ShadowDOMPoly fill),function(a){"use strict";function b(b,c){var d=b.parentNode;if(d&&d.shadow Root){var e=a.getRendererForHost(d);e.dependsOnAttribute(c)&&e.invalidate()}}fun ction 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:fun ction(){return this.impl[c]},set:function(a){this.impl[c]=a,b(this,e)},configura ble:!0,enumerable:!0})}var f=a.ChildNodeInterface,g=a.GetElementsByInterface,h=a .wrappers.Node,i=a.ParentNodeInterface,j=a.SelectorsInterface,k=(a.addWrapNodeLi stMethod,a.enqueueMutation),l=a.mixin,m=a.oneOf,n=a.registerWrapper,o=a.wrappers ,p=window.Element,q=m(p.prototype,["matches","mozMatchesSelector","msMatchesSele ctor","webkitMatchesSelector"]),r=p.prototype[q];d.prototype=Object.create(h.pro totype),l(d.prototype,{createShadowRoot:function(){var b=new o.ShadowRoot(this); this.impl.polymerShadowRoot_=b;var c=a.getRendererForHost(this);return c.invalid ate(),b},get shadowRoot(){return this.impl.polymerShadowRoot_||null},setAttribut e:function(a,d){var e=this.impl.getAttribute(a);this.impl.setAttribute(a,d),c(th is,a,e),b(this,a)},removeAttribute:function(a){var d=this.impl.getAttribute(a);t his.impl.removeAttribute(a),c(this,a,d),b(this,a)},matches:function(a){return r. call(this.impl,a)}}),"matches"!=q&&(d.prototype[q]=function(a){return this.match es(a)}),p.prototype.webkitCreateShadowRoot&&(d.prototype.webkitCreateShadowRoot= d.prototype.createShadowRoot),e(d.prototype,"id"),e(d.prototype,"className","cla ss"),l(d.prototype,f),l(d.prototype,g),l(d.prototype,i),l(d.prototype,j),n(p,d), a.matchesName=q,a.wrappers.Element=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(w,b)}function d(a){switch(a.n odeType){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+=">",x[d]?f :f+e(a)+"</"+d+">";case Node.TEXT_NODE:return c(a.nodeValue);case Node.COMMENT_N ODE: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=u(a.owne rDocument.createElement(d));e.innerHTML=b;for(var f;f=e.firstChild;)a.appendChil d(v(f))}function g(a){m.call(this,a)}function h(a,b){var c=u(a.cloneNode(!1));c. innerHTML=b;for(var d,e=u(document.createDocumentFragment());d=c.firstChild;)e.a ppendChild(d);return v(e)}function i(b){return function(){return a.renderAllPend ing(),this.impl[b]}}function j(a){n(g,a,i(a))}function k(b){Object.definePropert y(g.prototype,b,{get:i(b),set:function(c){a.renderAllPending(),this.impl[b]=c},c onfigurable:!0,enumerable:!0})}function l(b){Object.defineProperty(g.prototype,b ,{value:function(){return a.renderAllPending(),this.impl[b].apply(this.impl,argu ments)},configurable:!0,enumerable:!0})}var m=a.wrappers.Element,n=a.defineGette r,o=a.enqueueMutation,p=a.mixin,q=a.nodesWereAdded,r=a.nodesWereRemoved,s=a.regi sterWrapper,t=a.snapshotNodeList,u=a.unwrap,v=a.wrap,w=/&|<|"/g,x={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},y=window.HTMLElement;g.prototype=Object. create(m.prototype),p(g.prototype,{get innerHTML(){return e(this)},set innerHTML (a){var b=t(this.childNodes);this.invalidateShadowRenderer()?f(this,a,this.tagNa me):this.impl.innerHTML=a;var c=t(this.childNodes);o(this,"childList",{addedNode s:c,removedNodes:b}),r(b),q(c)},get outerHTML(){return d(this)},set outerHTML(a) {var b=this.parentNode;if(b){b.invalidateShadowRenderer();var c=h(b,a);b.replace Child(c,this)}},insertAdjacentHTML:function(a,b){var c,d;switch(String(a).toLowe rCase()){case"beforebegin":c=this.parentNode,d=this;break;case"afterend":c=this. parentNode,d=this.nextSibling;break;case"afterbegin":c=this,d=this.firstChild;br eak;case"beforeend":c=this,d=null;break;default:return}var e=h(c,b);c.insertBefo re(e,d)}}),["clientHeight","clientLeft","clientTop","clientWidth","offsetHeight" ,"offsetLeft","offsetTop","offsetWidth","scrollHeight","scrollWidth"].forEach(j) ,["scrollLeft","scrollTop"].forEach(k),["getBoundingClientRect","getClientRects" ,"scrollIntoView"].forEach(l),s(y,g,document.createElement("b")),a.wrappers.HTML Element=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.mi xin,e=a.registerWrapper,f=a.wrap,g=window.HTMLCanvasElement;b.prototype=Object.c reate(c.prototype),d(b.prototype,{getContext:function(){var a=this.impl.getConte xt.apply(this.impl,arguments);return a&&f(a)}}),e(g,b,document.createElement("ca nvas")),a.wrappers.HTMLCanvasElement=b}(window.ShadowDOMPolyfill),function(a){"u se strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e =a.registerWrapper,f=window.HTMLContentElement;b.prototype=Object.create(c.proto type),d(b.prototype,{get select(){return this.getAttribute("select")},set select (a){this.setAttribute("select",a)},setAttribute:function(a,b){c.prototype.setAtt ribute.call(this,a,b),"select"===String(a).toLowerCase()&&this.invalidateShadowR enderer(!0)}}),f&&e(f,b),a.wrappers.HTMLContentElement=b}(window.ShadowDOMPolyfi ll),function(a){"use strict";function b(a){d.call(this,a)}function c(a,b){if(!(t his instanceof c))throw new TypeError("DOM object constructor cannot be called a s a function.");var e=f(document.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=Ob ject.create(d.prototype),e(h,b,document.createElement("img")),c.prototype=b.prot otype,a.wrappers.HTMLImageElement=b,a.wrappers.Image=c}(window.ShadowDOMPolyfill ),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLEle ment,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.defaultV iew)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(v ar c,d=b(a.ownerDocument),e=j(d.createDocumentFragment());c=a.firstChild;)e.appe ndChild(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.HTMLElement,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.HTMLT emplateElement;d.prototype=Object.create(e.prototype),g(d.prototype,{get content (){return n?k(this.impl.content):l.get(this)},get innerHTML(){return f(this.cont ent)},set innerHTML(a){i(this.content,a)}}),n&&h(n,d),a.wrappers.HTMLTemplateEle ment=d}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call( this,a)}var c=a.wrappers.HTMLElement,d=a.registerWrapper,e=window.HTMLMediaEleme nt;b.prototype=Object.create(c.prototype),d(e,b,document.createElement("audio")) ,a.wrappers.HTMLMediaElement=b}(window.ShadowDOMPolyfill),function(a){"use stric t";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(docu ment.createElement("audio"));d.call(this,b),g(b,this),b.setAttribute("preload"," auto"),void 0!==a&&b.setAttribute("src",a)}var d=a.wrappers.HTMLMediaElement,e=a .registerWrapper,f=a.unwrap,g=a.rewrap,h=window.HTMLAudioElement;b.prototype=Obj ect.create(d.prototype),e(h,b,document.createElement("audio")),c.prototype=b.pro totype,a.wrappers.HTMLAudioElement=b,a.wrappers.Audio=c}(window.ShadowDOMPolyfil l),function(a){"use strict";function b(a){return a.replace(/\s+/g," ").trim()}fu nction 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(doc ument.createElement("option"));e.call(this,g),h(g,this),void 0!==a&&(g.text=a),v oid 0!==b&&g.setAttribute("value",b),c===!0&&g.setAttribute("selected",""),g.sel ected=f===!0}var e=a.wrappers.HTMLElement,f=a.mixin,g=a.registerWrapper,h=a.rewr ap,i=a.unwrap,j=a.wrap,k=window.HTMLOptionElement;c.prototype=Object.create(e.pr ototype),f(c.prototype,{get text(){return b(this.textContent)},set text(a){this. textContent=b(String(a))},get form(){return j(i(this).form)}}),g(k,c,document.cr eateElement("option")),d.prototype=c.prototype,a.wrappers.HTMLOptionElement=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":return new e( a);case"template":return new f(a)}d.call(this,a)}var c=a.wrappers.HTMLContentEle ment,d=a.wrappers.HTMLElement,e=a.wrappers.HTMLShadowElement,f=a.wrappers.HTMLTe mplateElement,g=(a.mixin,a.registerWrapper),h=window.HTMLUnknownElement;b.protot ype=Object.create(d.prototype),g(h,b),a.wrappers.HTMLUnknownElement=b}(window.Sh adowDOMPolyfill),function(a){"use strict";function b(a){this.impl=a}var c=a.mixi n,d=a.registerWrapper,e=a.unwrap,f=a.unwrapIfNeeded,g=a.wrap,h=window.CanvasRend eringContext2D;c(b.prototype,{get canvas(){return g(this.impl.canvas)},drawImage :function(){arguments[0]=f(arguments[0]),this.impl.drawImage.apply(this.impl,arg uments)},createPattern:function(){return arguments[0]=e(arguments[0]),this.impl. createPattern.apply(this.impl,arguments)}}),d(h,b,document.createElement("canvas ").getContext("2d")),a.wrappers.CanvasRenderingContext2D=b}(window.ShadowDOMPoly fill),function(a){"use strict";function b(a){this.impl=a}var c=a.mixin,d=a.regis terWrapper,e=a.unwrapIfNeeded,f=a.wrap,g=window.WebGLRenderingContext;if(g){c(b. prototype,{get canvas(){return f(this.impl.canvas)},texImage2D:function(){argume nts[5]=e(arguments[5]),this.impl.texImage2D.apply(this.impl,arguments)},texSubIm age2D:function(){arguments[6]=e(arguments[6]),this.impl.texSubImage2D.apply(this .impl,arguments)}});var h=/WebKit/.test(navigator.userAgent)?{drawingBufferHeigh t:null,drawingBufferWidth:null}:{};d(g,b,h),a.wrappers.WebGLRenderingContext=b}} (window.ShadowDOMPolyfill),function(a){"use strict";function b(a){this.impl=a}va r c=a.registerWrapper,d=a.unwrap,e=a.unwrapIfNeeded,f=a.wrap,g=window.Range;b.pr ototype={get startContainer(){return f(this.impl.startContainer)},get endContain er(){return f(this.impl.endContainer)},get commonAncestorContainer(){return f(th is.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){t his.impl.setStartBefore(e(a))},setStartAfter:function(a){this.impl.setStartAfter (e(a))},setEndBefore:function(a){this.impl.setEndBefore(e(a))},setEndAfter:funct ion(a){this.impl.setEndAfter(e(a))},selectNode:function(a){this.impl.selectNode( e(a))},selectNodeContents:function(a){this.impl.selectNodeContents(e(a))},compar eBoundaryPoints:function(a,b){return this.impl.compareBoundaryPoints(a,d(b))},ex tractContents:function(){return f(this.impl.extractContents())},cloneContents:fu nction(){return f(this.impl.cloneContents())},insertNode:function(a){this.impl.i nsertNode(e(a))},surroundContents:function(a){this.impl.surroundContents(e(a))}, cloneRange:function(){return f(this.impl.cloneRange())},isPointInRange:function( a,b){return this.impl.isPointInRange(e(a),b)},comparePoint:function(a,b){return this.impl.comparePoint(e(a),b)},intersectsNode:function(a){return this.impl.inte rsectsNode(e(a))}},g.prototype.createContextualFragment&&(b.prototype.createCont extualFragment=function(a){return f(this.impl.createContextualFragment(a))}),c(w indow.Range,b,document.createRange()),a.wrappers.Range=b}(window.ShadowDOMPolyfi ll),function(a){"use strict";var b=a.GetElementsByInterface,c=a.ParentNodeInterf ace,d=a.SelectorsInterface,e=a.mixin,f=a.registerObject,g=f(document.createDocum entFragment());e(g.prototype,c),e(g.prototype,d),e(g.prototype,b);var h=f(docume nt.createTextNode("")),i=f(document.createComment(""));a.wrappers.Comment=i,a.wr appers.DocumentFragment=g,a.wrappers.Text=h}(window.ShadowDOMPolyfill),function( a){"use strict";function b(a){var b=i(a.impl.ownerDocument.createDocumentFragmen t());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=Ob ject.create(c.prototype),f(b.prototype,{get innerHTML(){return e(this)},set inne rHTML(a){h(this,a),this.invalidateShadowRenderer()},get olderShadowRoot(){return k.get(this)||null},get host(){return j.get(this)||null},invalidateShadowRendere r:function(){return j.get(this).invalidateShadowRenderer()},elementFromPoint:fun ction(a,b){return d(this,this.ownerDocument,a,b)},getElementById:function(a){ret urn this.querySelector("#"+a)}}),a.wrappers.ShadowRoot=b}(window.ShadowDOMPolyfi ll),function(a){"use strict";function b(a){a.previousSibling_=a.previousSibling, a.nextSibling_=a.nextSibling,a.parentNode_=a.parentNode}function c(a,c,e){var f= F(a),g=F(c),h=e?F(e):null;if(d(c),b(c),e)a.firstChild===e&&(a.firstChild_=e),e.p reviousSibling_=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.parentNode;if(d ){var e=G(d);b(a),a.previousSibling&&(a.previousSibling.nextSibling_=a),a.nextSi bling&&(a.nextSibling.previousSibling_=a),e.lastChild===a&&(e.lastChild_=a),e.fi rstChild===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,[])}functi on g(a){return H.get(a)}function h(a){for(var b=[],c=0,d=a.firstChild;d;d=d.next Sibling)b[c++]=d;return b}function i(a,b,c){for(var d=a.firstChild;d;d=d.nextSib ling)if(b(d)){if(c(d)===!1)return}else i(d,b,c)}function j(a,b){var c=b.getAttri bute("select");if(!c)return!0;if(c=c.trim(),!c)return!0;if(!(a instanceof z))ret urn!1;if(!L.test(c))return!1;if(":"===c[0]&&!M.test(c))return!1;try{return a.mat ches(c)}catch(d){return!1}}function 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){for(;a;a=a.parentNode)if(a instanceof D)return a;re turn 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.invalidateAttrib utes(),this.associateNode(a)}function r(a){return a instanceof A}function s(a){r eturn a instanceof A}function t(a){return a instanceof B}function u(a){return a instanceof B}function v(a){return a.shadowRoot}function w(a){for(var b=[],c=a.sh adowRoot;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.wrappers.HTMLContentElement,B=a.wrappers.HTMLShadowE lement,C=a.wrappers.Node,D=a.wrappers.ShadowRoot,E=(a.assert,a.mixin,a.oneOf),F= a.unwrap,G=a.wrap,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","indeterminate","nth-child","nth-last-child","nth-of-type","nth-last -of-type","first-child","last-child","first-of-type","last-of-type","only-of-typ e"].join("|")+")"),N=E(window,["requestAnimationFrame","mozRequestAnimationFrame ","webkitRequestAnimationFrame","setTimeout"]),O=[],P=new ArraySplice;P.equals=f unction(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=th is.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);f or(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={rend er:function(a){if(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.dir ty=!1}},invalidate:function(){if(!this.dirty){if(this.dirty=!0,O.push(this),y)re turn;y=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.renderShadowInsertionPoint(a,b,c):this.renderAsAnyDomTree(a,b,c,d)},renderA sAnyDomTree:function(a,b,c,d){if(b=b.append(c),v(c)){var e=m(c);b.skip=!e.dirty, e.render(b)}else for(var f=c.firstChild;f;f=f.nextSibling)this.renderNode(a,b,f, d)},renderInsertionPoint:function(a,b,c,d){var e=g(c);if(e.length){this.associat eNode(c);for(var f=0;f<e.length;f++){var h=e[f];r(h)&&d?this.renderInsertionPoin t(a,b,h,d):this.renderAsAnyDomTree(a,b,h,d)}}else this.renderFallbackContent(a,b ,c);this.associateNode(c.parentNode)},renderShadowInsertionPoint:function(a,b,c) {var d=a.olderShadowRoot;if(d){x(d,c),this.associateNode(c.parentNode);for(var e =d.firstChild;e;e=e.nextSibling)this.renderNode(d,b,e,!0)}else this.renderFallba ckContent(a,b,c)},renderFallbackContent:function(a,b,c){this.associateNode(c),th is.associateNode(c.parentNode);for(var d=c.firstChild;d;d=d.nextSibling)this.ren derAsAnyDomTree(a,b,d,!1)},invalidateAttributes:function(){this.attributes=Objec t.create(null)},updateDependentAttributes:function(a){if(a){var b=this.attribute s;/\.\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 th is.attributes[a]},distribute:function(a,b){var c=this;i(a,s,function(a){f(a),c.u pdateDependentAttributes(a.getAttribute("select"));for(var d=0;d<b.length;d++){v ar 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.olderShadowRoot;if(k){b=k,x(b,j);continue}break}break}},associateNode:fu nction(a){a.impl.polymerShadowRenderer_=this}},C.prototype.invalidateShadowRende rer=function(){var a=this.impl.polymerShadowRenderer_;return a?(a.invalidate(),! 0):!1},A.prototype.getDistributedNodes=function(){return k(),g(this)},B.prototyp e.nodeIsInserted_=A.prototype.nodeIsInserted_=function(){this.invalidateShadowRe nderer();var a,b=n(this);b&&(a=o(b)),this.impl.polymerShadowRenderer_=a,a&&a.inv alidate()},a.eventParentsTable=I,a.getRendererForHost=m,a.getShadowTrees=w,a.ins ertionParentTable=J,a.renderAllPending=k,a.visual={insertBefore:c,remove:d}}(win dow.ShadowDOMPolyfill),function(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.prot otype),e(i.prototype,{get form(){return h(g(this).form)}}),f(window[b],i,documen t.createElement(b.slice(4,-7))),a.wrappers[b]=i}}var c=a.wrappers.HTMLElement,d= a.assert,e=a.mixin,f=a.registerWrapper,g=a.unwrap,h=a.wrap,i=["HTMLButtonElement ","HTMLFieldSetElement","HTMLInputElement","HTMLKeygenElement","HTMLLabelElement ","HTMLLegendElement","HTMLObjectElement","HTMLOutputElement","HTMLSelectElement ","HTMLTextAreaElement"];i.forEach(b)}(window.ShadowDOMPolyfill),function(a){"us e strict";function b(a){k.call(this,a)}function c(a){var c=document[a];b.prototy pe[a]=function(){return v(c.apply(this.impl,arguments))}}function d(a,b){z.call( b.impl,u(a)),e(a,b)}function e(a,b){a.shadowRoot&&b.adoptNode(a.shadowRoot),a in stanceof 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.implementation[b];a.prototype[b]=function(){return v(c.app ly(this.impl,arguments))}}function i(a,b){var c=document.implementation[b];a.pro totype[b]=function(){return c.apply(this.impl,arguments)}}var j=a.GetElementsByI nterface,k=a.wrappers.Node,l=a.ParentNodeInterface,m=a.SelectorsInterface,n=a.wr appers.ShadowRoot,o=a.defineWrapGetter,p=a.elementFromPoint,q=a.forwardMethodsTo Wrapper,r=a.matchesName,s=a.mixin,t=a.registerWrapper,u=a.unwrap,v=a.wrap,w=a.re wrap,x=a.wrapEventTargetMethods,y=(a.wrapNodeList,new WeakMap);b.prototype=Objec t.create(k.prototype),o(b,"documentElement"),o(b,"body"),o(b,"head"),["createCom ment","createDocumentFragment","createElement","createElementNS","createEvent"," createEventNS","createRange","createTextNode","getElementById"].forEach(c);var z =document.adoptNode,A=document.importNode;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)},importNode:function(a,b){var c=v(A.call( this.impl,u(a),!1));if(b)for(var d=a.firstChild;d;d=d.nextSibling)c.appendChild( this.importNode(d,!0));return c}}),document.register){var B=document.register;b. prototype.register=function(b,c){function d(a){return a?(this.impl=a,void 0):c.e xtends?document.createElement(c.extends,b):document.createElement(b)}var e=c.pro totype;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");fo r(var i=Object.create(f),j=h.length-1;j>=0;j--)i=Object.create(i);["createdCallb ack","enteredViewCallback","leftViewCallback","attributeChangedCallback"].forEac h(function(a){var b=e[a];b&&(i[a]=function(){v(this)instanceof d||w(this),b.appl y(v(this),arguments)})});var k={prototype:i};c.extends&&(k.extends=c.extends),d. prototype=e,d.prototype.constructor=d,a.constructorTable.set(i,d),a.nativeProtot ypeTable.set(e,i);B.call(u(this),b,k);return d},q([window.HTMLDocument||window.D ocument],["register"])}q([window.HTMLBodyElement,window.HTMLDocument||window.Doc ument,window.HTMLHeadElement,window.HTMLHtmlElement],["appendChild","compareDocu mentPosition","contains","getElementsByClassName","getElementsByTagName","getEle mentsByTagNameNS","insertBefore","querySelector","querySelectorAll","removeChild ","replaceChild",r]),q([window.HTMLDocument||window.Document],["adoptNode","impo rtNode","contains","createComment","createDocumentFragment","createElement","cre ateElementNS","createEvent","createEventNS","createRange","createTextNode","elem entFromPoint","getElementById"]),s(b.prototype,j),s(b.prototype,l),s(b.prototype ,m),s(b.prototype,{get implementation(){var a=y.get(this);return a?a:(a=new g(u( this).implementation),y.set(this,a),a)}}),t(window.Document,b,document.implement ation.createHTMLDocument("")),window.HTMLDocument&&t(window.HTMLDocument,b),x([w indow.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElemen t]),h(g,"createDocumentType"),h(g,"createDocument"),h(g,"createHTMLDocument"),i( g,"hasFeature"),t(window.DOMImplementation,g),q([window.DOMImplementation],["cre ateDocumentType","createDocument","createHTMLDocument","hasFeature"]),a.adoptNod eNoRemove=d,a.wrappers.DOMImplementation=g,a.wrappers.Document=b}(window.ShadowD OMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappe rs.EventTarget,d=a.mixin,e=a.registerWrapper,f=a.unwrap,g=a.unwrapIfNeeded,h=a.w rap,i=a.renderAllPending,j=window.Window;b.prototype=Object.create(c.prototype); var k=window.getComputedStyle;j.prototype.getComputedStyle=function(a,b){return i(),k.call(this||window,g(a),b)
31 },delete window.getComputedStyle,["addEventListener","removeEventListener","disp atchEvent"].forEach(function(a){j.prototype[a]=function(){var b=h(this||window); return b[a].apply(b,arguments)},delete window[a]}),d(b.prototype,{getComputedSty le:function(a,b){return k.call(f(this),g(a),b)}}),e(j,b),a.wrappers.Window=b}(wi ndow.ShadowDOMPolyfill),function(a){"use strict";function b(a){var b=c[a],d=wind ow[b];if(d){var e=document.createElement(a),f=e.constructor;window[b]=f}}var c=( a.isWrapperFor,{a:"HTMLAnchorElement",applet:"HTMLAppletElement",area:"HTMLAreaE lement",br:"HTMLBRElement",base:"HTMLBaseElement",body:"HTMLBodyElement",button: "HTMLButtonElement",dl:"HTMLDListElement",datalist:"HTMLDataListElement",data:"H TMLDataElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",embed:"HTMLEmbed Element",fieldset:"HTMLFieldSetElement",font:"HTMLFontElement",form:"HTMLFormEle ment",frame:"HTMLFrameElement",frameset:"HTMLFrameSetElement",hr:"HTMLHRElement" ,head:"HTMLHeadElement",h1:"HTMLHeadingElement",html:"HTMLHtmlElement",iframe:"H TMLIFrameElement",input:"HTMLInputElement",li:"HTMLLIElement",label:"HTMLLabelEl ement",legend:"HTMLLegendElement",link:"HTMLLinkElement",map:"HTMLMapElement",ma rquee:"HTMLMarqueeElement",menu:"HTMLMenuElement",menuitem:"HTMLMenuItemElement" ,meta:"HTMLMetaElement",meter:"HTMLMeterElement",del:"HTMLModElement",ol:"HTMLOL istElement",object:"HTMLObjectElement",optgroup:"HTMLOptGroupElement",option:"HT MLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTML ParamElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteEl ement",script:"HTMLScriptElement",select:"HTMLSelectElement",source:"HTMLSourceE lement",span:"HTMLSpanElement",style:"HTMLStyleElement",time:"HTMLTimeElement",c aption:"HTMLTableCaptionElement",col:"HTMLTableColElement",table:"HTMLTableEleme nt",tr:"HTMLTableRowElement",thead:"HTMLTableSectionElement",tbody:"HTMLTableSec tionElement",textarea:"HTMLTextAreaElement",track:"HTMLTrackElement",title:"HTML TitleElement",ul:"HTMLUListElement",video:"HTMLVideoElement"});Object.keys(c).fo rEach(b),Object.getOwnPropertyNames(a.wrappers).forEach(function(b){window[b]=a. wrappers[b]}),a.knownElements=c}(window.ShadowDOMPolyfill),function(){window.wra p=ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=ShadowDOMPolyfill.unwrapIfNeeded, Object.defineProperty(Element.prototype,"webkitShadowRoot",Object.getOwnProperty Descriptor(Element.prototype,"shadowRoot"));var a=Element.prototype.createShadow Root;Element.prototype.createShadowRoot=function(){var b=a.call(this);return Cus tomElements.watchShadow(this),b},Element.prototype.webkitCreateShadowRoot=Elemen t.prototype.createShadowRoot}(),function(a){function b(a,b){var c="";return Arra y.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.textConte nt=a,b}function d(a){var b=c(a);document.head.appendChild(b);var d=b.sheet.cssRu les;return b.parentNode.removeChild(b),d}function e(a){for(var b=0,c=[];b<a.leng th;b++)c.push(a[b].cssText);return c.join("\n\n")}function f(a){a&&g().appendChi ld(document.createTextNode(a))}function g(){return h||(h=document.createElement( "style"),h.setAttribute("ShadowCSSShim",""),h.shadowCssShim=!0),h}var h,i={stric tStyling:!1,registry:{},shimStyling:function(a,b,d){var e=this.isTypeExtension(d ),g=this.registerDefinition(a,b,d);this.strictStyling&&this.applyScopeToContent( a,b);var h=this.stylesToShimmedCssText(g.rootStyles,g.scopeStyles,b,e);g.shimmed Style=c(h),a&&(a.shimmedStyle=g.shimmedStyle);for(var i,j=0,k=g.rootStyles.lengt h;k>j&&(i=g.rootStyles[j]);j++)i.parentNode.removeChild(i);f(h)},stylesToShimmed CssText:function(a,b,c,d){c=c||"",this.insertPolyfillDirectives(a),this.insertPo lyfillRules(a);var e=this.shimAtHost(b,c,d)+this.shimScoping(b,c,d);return e+=th is.extractPolyfillUnscopedRules(a)},registerDefinition:function(a,b,c){var d=thi s.registry[b]={root:a,name:b,extendsName:c},e=a?a.querySelectorAll("style"):[];e =e?Array.prototype.slice.call(e,0):[],d.rootStyles=e,d.scopeStyles=d.rootStyles; var f=this.registry[d.extendsName];return!f||a&&!a.querySelector("shadow")||(d.s copeStyles=f.scopeStyles.concat(d.scopeStyles)),d},isTypeExtension:function(a){r eturn a&&a.indexOf("-")<0},applyScopeToContent:function(a,b){a&&(Array.prototype .forEach.call(a.querySelectorAll("*"),function(a){a.setAttribute(b,"")}),Array.p rototype.forEach.call(a.querySelectorAll("template"),function(a){this.applyScope ToContent(a.content,b)},this))},insertPolyfillDirectives:function(a){a&&Array.pr ototype.forEach.call(a,function(a){a.textContent=this.insertPolyfillDirectivesIn CssText(a.textContent)},this)},insertPolyfillDirectivesInCssText:function(a){ret urn a.replace(o,function(a,b){return b.slice(0,-2)+"{"})},insertPolyfillRules:fu nction(a){a&&Array.prototype.forEach.call(a,function(a){a.textContent=this.inser tPolyfillRulesInCssText(a.textContent)},this)},insertPolyfillRulesInCssText:func tion(a){return a.replace(p,function(a,b){return b.slice(0,-1)})},extractPolyfill UnscopedRules:function(a){var b="";return a&&Array.prototype.forEach.call(a,func tion(a){b+=this.extractPolyfillUnscopedRulesFromCssText(a.textContent)+"\n\n"},t his),b},extractPolyfillUnscopedRulesFromCssText:function(a){for(var b,c="";b=q.e xec(a);)c+=b[1].slice(0,-1)+"\n\n";return c},shimAtHost:function(a,b,c){return a ?this.convertAtHostStyles(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(this.findAtHostRules(d(g),this.makeScopeMatcher(c,f)))},scopeHostCss:functi on(a,b,c){var d=this;return a.replace(k,function(a,e,f){return d.scopeHostSelect or(e,b,c)+" "+f+"\n "})},scopeHostSelector:function(a,b,c){var d=[],e=a.spli t(","),f="[is="+b+"]";return e.forEach(function(a){a=a.trim(),a.match(l)?a=a.rep lace(l,c?f+"$1$3":b+"$1$3"):a.match(m)&&(a=c?f+a:b+a),d.push(a)},this),d.join(", ")},findAtHostRules:function(a,b){return Array.prototype.filter.call(a,this.isH ostRule.bind(this,b))},isHostRule:function(a,b){return b.selectorText&&b.selecto rText.match(a)||b.cssRules&&this.findAtHostRules(b.cssRules,a).length||b.type==C SSRule.WEBKIT_KEYFRAMES_RULE},shimScoping:function(a,b,c){return a?this.convertS copedStyles(a,b,c):void 0},convertScopedStyles:function(a,c,e){var f=b(a).replac e(j,"");f=this.insertPolyfillHostInCssText(f),f=this.convertColonHost(f),f=this. convertPseudos(f),f=this.convertParts(f),f=this.convertCombinators(f);var g=d(f) ;return c&&(f=this.scopeRules(g,c,e)),f},convertPseudos:function(a){return a.rep lace(r," [pseudo=$1]")},convertParts:function(a){return a.replace(s," [part=$1]" )},convertColonHost:function(a){return a.replace(u,function(a,b,c,d){if(b=y,c){f or(var e,f=c.split(","),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})},convertCombinators:function(a){return a.replace(/\^\^/g," ").repla ce(/\^/g," ")},scopeRules:function(a,b,c){var d="";return Array.prototype.forEac h.call(a,function(a){a.selectorText&&a.style&&a.style.cssText?(d+=this.scopeSele ctor(a.selectorText,b,c,this.strictStyling)+" {\n ",d+=this.propertiesFrom Rule(a)+"\n}\n\n"):a.media?(d+="@media "+a.media.mediaText+" {\n",d+=this.scopeR ules(a.cssRules,b,c),d+="\n}\n\n"):a.cssText&&(d+=a.cssText+"\n\n")},this),d},sc opeSelector: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&&!a.match(y)?this.applyStri ctSelectorScope(a,b):this.applySimpleSelectorScope(a,b,c)),e.push(a)},this),e.jo in(", ")},selectorNeedsScoping: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},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.indexOf(e)<0&&(a=b.repl ace(/([^:]*)(:*)(.*)/,"$1"+e+"$2$3")),a}).join(a)}),d},insertPolyfillHostInCssTe xt:function(a){return 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=/\:h ost/gim,y=t+"-no-combinator",z=new RegExp(t,"gim");if(window.ShadowDOMPolyfill){ f("style { display: none !important; }\n");var A=wrap(document),B=A.querySelecto r("head");B.insertBefore(g(),B.childNodes[0]),document.addEventListener("DOMCont entLoaded",function(){window.HTMLImports&&(HTMLImports.importer.preloadSelectors +=", link[rel=stylesheet]:not([nopolyfill])",HTMLImports.parser.parseGeneric=fun ction(a){if(!a.shadowCssShim){var b=a;if(!a.hasAttribute("nopolyfill")){a.__reso urce&&(b=A.createElement("style"),b.textContent=a.__resource,a.ownerDocument===A &&a.parentNode.removeChild(a));var c=[b];b.textContent=i.stylesToShimmedCssText( c,c),b.shadowCssShim=!0}b.parentNode!==B&&B.appendChild(b)}})})}a.ShadowCSS=i}(w indow.Platform)):!function(){window.templateContent=window.templateContent||func tion(a){return a.content},window.wrap=window.unwrap=function(a){return a};var a= Element.prototype.webkitCreateShadowRoot;Element.prototype.webkitCreateShadowRoo t=function(){var b=this.webkitShadowRoot,c=a.call(this);return c.olderShadowRoot =b,c.host=this,CustomElements.watchShadow(this),c},Object.defineProperties(Eleme nt.prototype,{shadowRoot:{get:function(){return this.webkitShadowRoot}},createSh adowRoot:{value:function(){return this.webkitCreateShadowRoot()}}}),window.templ ateContent=function(a){if(window.HTMLTemplateElement&&HTMLTemplateElement.bootst rap&&HTMLTemplateElement.bootstrap(a),!a.content&&!a._content){for(var b=documen t.createDocumentFragment();a.firstChild;)b.appendChild(a.firstChild);a._content= b}return a.content||a._content}}(),function(a){function b(a){for(var b=a||{},d=1 ;d<arguments.length;d++){var e=arguments[d];try{for(var f in e)c(f,e,b)}catch(g) {}}return b}function c(a,b,c){var e=d(b,a);Object.defineProperty(c,a,e)}function d(a,b){if(a){var c=Object.getOwnPropertyDescriptor(a,b);return c||d(Object.getP rototypeOf(a),b)}}Function.prototype.bind||(Function.prototype.bind=function(a){ var b=this,c=Array.prototype.slice.call(arguments,1);return function(){var d=c.s lice();return d.push.apply(d,arguments),b.apply(a,d)}}),a.mixin=b}(window.Platfo rm),function(a){"use strict";function b(a,b,c){var d="string"==typeof a?document .createElement(a):a.cloneNode(!0);if(d.innerHTML=b,c)for(var e in c)d.setAttribu te(e,c[e]);return d}var c=DOMTokenList.prototype.add,d=DOMTokenList.prototype.re move;DOMTokenList.prototype.add=function(){for(var a=0;a<arguments.length;a++)c. call(this,arguments[a])},DOMTokenList.prototype.remove=function(){for(var a=0;a< arguments.length;a++)d.call(this,arguments[a])},DOMTokenList.prototype.toggle=fu nction(a,b){1==arguments.length&&(b=!this.contains(a)),b?this.add(a):this.remove (a)},DOMTokenList.prototype.switch=function(a,b){a&&this.remove(a),b&&this.add(b )};var e=function(){return Array.prototype.slice.call(this)},f=window.NamedNodeM ap||window.MozNamedAttrMap||{};if(NodeList.prototype.array=e,f.prototype.array=e ,HTMLCollection.prototype.array=e,!window.performance){var g=Date.now();window.p erformance={now:function(){return Date.now()-g}}}window.requestAnimationFrame||( window.requestAnimationFrame=function(){var a=window.webkitRequestAnimationFrame ||window.mozRequestAnimationFrame;return a?function(b){return a(function(){b(per formance.now())})}:function(a){return window.setTimeout(a,1e3/60)}}()),window.ca ncelAnimationFrame||(window.cancelAnimationFrame=function(){return window.webkit CancelAnimationFrame||window.mozCancelAnimationFrame||function(a){clearTimeout(a )}}());var h=document.createElement("template"),i=document.createElement("base") ;i.href=document.baseURI,h.content.ownerDocument.appendChild(i);var j=function(a ,b){window.addEventListener("WebComponentsReady",function(){window.Polymer!==j?P olymer(a,b):console.warn('You tried to use polymer without loading it first. To load polymer, <link rel="import" href="components/polymer/plymer.html">')})};win dow.Polymer=j,a.createDOM=b}(window.Platform),window.templateContent=window.temp lateContent||function(a){return a.content},function(a){a=a||(window.Inspector={} );var b;window.sinspect=function(a,d){b||(b=window.open("","ShadowDOM Inspector" ,null,!0),b.document.write(c),b.api={shadowize:shadowize}),f(a||wrap(document.bo dy),d)};var c=["<!DOCTYPE html>","<html>"," <head>"," <title>ShadowDOM Inspe ctor</title>"," <style>"," body {"," }"," pre {",' font : 9pt "Courier New", monospace;'," line-height: 1.5em;"," }"," tag {"," color: purple;"," }"," ul {"," margin: 0;"," padding: 0;"," list-style: none;"," }"," li {"," display: inline-block;"," background-color: #f1f1f1;"," paddin g: 4px 6px;"," border-radius: 4px;"," margin-right: 4px;"," }"," </style>"," </head>"," <body>",' <ul id="crumbs">'," </ul>",' <div id="tree"></div>'," </body>","</html>"].join("\n"),d=[],e=function(){var a=b.document,c=a.querySelector("#crumbs");c.textContent="";for(var e,g=0;e=d[g] ;g++){var h=a.createElement("a");h.href="#",h.textContent=e.localName,h.idx=g,h. onclick=function(a){for(var b;d.length>this.idx;)b=d.pop();f(b.shadow||b,b),a.pr eventDefault()},c.appendChild(a.createElement("li")).appendChild(h)}},f=function (a,c){var f=b.document;k=[];var g=c||a;d.push(g),e(),f.body.querySelector("#tree ").innerHTML="<pre>"+j(a,a.childNodes)+"</pre>"},g=Array.prototype.forEach.call. bind(Array.prototype.forEach),h={STYLE:1,SCRIPT:1,"#comment":1,TEMPLATE:1},i=fun ction(a){return h[a.nodeName]},j=function(a,b,c){if(i(a))return"";var d=c||"";if (a.localName||11==a.nodeType){var e=a.localName||"shadow-root",f=d+l(a);"content "==e&&(b=a.getDistributedNodes()),f+="<br/>";var h=d+"&nbsp;&nbsp;";g(b,function (a){f+=j(a,a.childNodes,h)}),f+=d,{br:1}[e]||(f+="<tag>&lt;/"+e+"&gt;</tag>",f+= "<br/>")}else{var k=a.textContent.trim();f=k?d+'"'+k+'"<br/>':""}return f},k=[], l=function(a){var b="<tag>&lt;",c=a.localName||"shadow-root";return a.webkitShad owRoot||a.shadowRoot?(b+=' <button idx="'+k.length+'" onclick="api.shadowize.cal l(this)">'+c+"</button>",k.push(a)):b+=c||"shadow-root",a.attributes&&g(a.attrib utes,function(a){b+=" "+a.name+(a.value?'="'+a.value+'"':"")}),b+="&gt;</tag>"}; shadowize=function(){var a=Number(this.attributes.idx.value),b=k[a];b?f(b.webkit ShadowRoot||b.shadowRoot,b):(console.log("bad shadowize node"),console.dir(this) )},a.output=j}(window.Inspector),function(){function a(){requestAnimationFrame(f unction(){for(var a,b=document.querySelectorAll(e),f=0,g=b.length;g>f&&(a=b[f]); f++)a.removeAttribute(c),a.setAttribute(d,"");if(b.length){var h=function(){for( var a,c=0,e=b.length;e>c&&(a=b[c]);c++)a.removeAttribute(d);document.body.remove EventListener(i,h,!1)};document.body.addEventListener(i,h,!1)}})}var b=.2,c="unr esolved",d="resolved",e="["+c+"]",f="["+d+"]",g=document.createElement("style"); g.textContent=e+" { opacity: 0; display: block; overflow: hidden; } \n"+f+"{ dis play: block; overflow: hidden;\n-webkit-transition: opacity "+b+"s; transition: opacity "+b+"s; }\n";var h=document.querySelector("head");h.insertBefore(g,h.fir stChild);var i=void 0!==document.documentElement.style.webkitTransition?"webkitT ransitionEnd":"transitionend";window.addEventListener("WebComponentsReady",a)}(P latform),function(a){function b(a){return d(a,i)}function c(a){return d(a,j)}fun ction d(a,b){return"link"===a.localName&&a.getAttribute("rel")===b}function e(a) {return"script"===a.localName}function f(a,b){var c=a;c instanceof Document||(c= document.implementation.createHTMLDocument(i)),c._URL=b;var d=c.createElement("b ase");return d.setAttribute("href",document.baseURI||document.URL),c.head.append Child(d),a instanceof Document||(c.body.innerHTML=a),window.HTMLTemplateElement& &HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(c),c}a||(a=window. HTMLImports={flags:{}});var g,h=a.xhr,i="import",j="stylesheet",k={documents:{}, cache:{},preloadSelectors:["link[rel="+i+"]","element link[rel="+j+"]","template ","script[src]:not([type])",'script[src][type="text/javascript"]'].join(","),loa der:function(a){return g=new l(k.loaded,a),g.cache=k.cache,g},load:function(a,b) {g=k.loader(b),k.preload(a)},preload:function(a){var b=a.querySelectorAll(k.prel oadSelectors);b=this.filterMainDocumentNodes(a,b),b=this.extractTemplateNodes(b) ,g.addNodes(b)},filterMainDocumentNodes:function(a,b){return a===document&&(b=Ar ray.prototype.filter.call(b,function(a){return!e(a)})),b},extractTemplateNodes:f unction(a){var b=[];return a=Array.prototype.filter.call(a,function(a){if("templ ate"===a.localName){if(a.content){var c=a.content.querySelectorAll("link[rel="+j +"]");c.length&&(b=b.concat(Array.prototype.slice.call(c,0)))}return!1}return!0} ),b.length&&(a=a.concat(b)),a},loaded:function(a,d,e){if(b(d)){var g=k.documents [a];g||(g=f(e,a),p.resolvePathsInHTML(g),k.documents[a]=g,k.preload(g)),d.import =g,d.import.href=a,d.import.ownerNode=d,d.content=e=g}d.__resource=e,c(d)&&p.res olvePathsInStylesheet(d)}},l=function(a,b){this.onload=a,this.oncomplete=b,this. inflight=0,this.pending={},this.cache={}};l.prototype={addNodes:function(a){this .inflight+=a.length,q(a,this.require,this),this.checkDone()},require:function(a) {var b=p.nodeUrl(a);b=p.makeAbsUrl(b),a.__nodeUrl=b,this.dedupe(b,a)||this.fetch (b,a)},dedupe:function(a,b){return this.pending[a]?(this.pending[a].push(b),!0): this.cache[a]?(this.onload(a,b,g.cache[a]),this.tail(),!0):(this.pending[a]=[b], !1)},fetch:function(a,b){var c=function(c,d){this.receive(a,b,c,d)}.bind(this);h .load(a,c)},receive:function(a,b,c,d){c||(g.cache[a]=d),g.pending[a].forEach(fun ction(b){c||this.onload(a,b,d),this.tail()},this),g.pending[a]=null},tail:functi on(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this. oncomplete()}};var m=["href","src","action"],n="["+m.join("],[")+"]",o="{{.*}}", p={nodeUrl:function(a){return p.resolveUrl(p.documentURL,p.hrefOrSrc(a))},hrefOr Src:function(a){return a.getAttribute("href")||a.getAttribute("src")},documentUr lFromNode:function(a){return p.getDocumentUrl(a.ownerDocument||a)},getDocumentUr l:function(a){var b=a&&(a._URL||a.impl&&a.impl._URL||a.baseURI||a.URL)||"";retur n b.split("#")[0]},resolveUrl:function(a,b){return this.isAbsUrl(b)?b:this.compr essUrl(this.urlToPath(a)+b)},resolveRelativeUrl:function(a,b){return this.isAbsU rl(b)?b:this.makeDocumentRelPath(this.resolveUrl(a,b))},isAbsUrl:function(a){ret urn/(^data:)|(^http[s]?:)|(^\/)/.test(a)},urlToPath:function(a){var b=a.split("/ ");return b.pop(),b.push(""),b.join("/")},compressUrl:function(a){var b="",c=a.i ndexOf("?");c>-1&&(b=a.substring(c),a=a.substring(c,0));for(var d,e=a.split("/") ,f=0;f<e.length;f++)d=e[f],".."===d&&(e.splice(f-1,2),f-=2);return e.join("/")+b },makeDocumentRelPath:function(a){return p.urlElt.href=a,!p.urlElt.host||p.urlEl t.host===window.location.host&&p.urlElt.protocol===window.location.protocol?this .makeRelPath(p.documentURL,p.urlElt.href):a},makeRelPath:function(a,b){for(var c =a.split("/"),d=b.split("/");c.length&&c[0]===d[0];)c.shift(),d.shift();for(var e=0,f=c.length-1;f>e;e++)d.unshift("..");var g=d.join("/");return g},makeAbsUrl: function(a){return p.urlElt.href=a,p.urlElt.href},resolvePathsInHTML:function(a, b){b=b||p.documentUrlFromNode(a),p.resolveAttributes(a,b),p.resolveStyleElts(a,b );var c=a.querySelectorAll("template");c&&q(c,function(a){a.content&&p.resolvePa thsInHTML(a.content,b)})},resolvePathsInStylesheet:function(a){var b=p.nodeUrl(a );a.__resource=p.resolveCssText(a.__resource,b)},resolveStyleElts:function(a,b){ var c=a.querySelectorAll("style");c&&q(c,function(a){a.textContent=p.resolveCssT ext(a.textContent,b)})},resolveCssText:function(a,b){return a.replace(/url\([^)] *\)/g,function(a){var c=a.replace(/["']/g,"").slice(4,-1);return c=p.resolveRela tiveUrl(b,c),"url("+c+")"})},resolveAttributes:function(a,b){var c=a&&a.querySel ectorAll(n);c&&q(c,function(a){this.resolveNodeAttributes(a,b)},this)},resolveNo deAttributes:function(a,b){m.forEach(function(c){var d=a.attributes[c];if(d&&d.v alue&&d.value.search(o)<0){var e=p.resolveRelativeUrl(b,d.value);d.value=e}})}}; p.documentURL=p.getDocumentUrl(document),p.urlElt=document.createElement("a"),h= h||{async:!0,ok:function(a){return a.status>=200&&a.status<300||304===a.status|| 0===a.status},load:function(b,c,d){var e=new XMLHttpRequest;return(a.flags.debug ||a.flags.bust)&&(b+="?"+Math.random()),e.open("GET",b,h.async),e.addEventListen er("readystatechange",function(){4===e.readyState&&c.call(d,!h.ok(e)&&e,e.respon se||e.responseText,b)}),e.send(),e},loadDocument:function(a,b,c){this.load(a,b,c ).responseType="document"}};var q=Array.prototype.forEach.call.bind(Array.protot ype.forEach);Object.defineProperty(document,"_currentScript",{get:function(){ret urn HTMLImports.currentScript||document.currentScript},writeable:!0,configurable :!0}),a.path=p,a.xhr=h,a.importer=k,a.getDocumentUrl=p.getDocumentUrl,a.IMPORT_L INK_TYPE=i}(window.HTMLImports),function(a){function b(a){return"link"===a.local Name&&a.getAttribute("rel")===f}function c(a){return a.parentNode&&!d(a)&&!e(a)} function d(a){return a.ownerDocument===document||a.ownerDocument.impl===document }function e(a){return a.parentNode&&"element"===a.parentNode.localName}{var f="i mport",g={selectors:["link[rel="+f+"]","link[rel=stylesheet]","style","script:no t([type])",'script[type="text/javascript"]'],map:{link:"parseLink",script:"parse Script",style:"parseGeneric"},parse:function(a){if(!a.__importParsed){a.__import Parsed=!0;for(var b,c=a.querySelectorAll(g.selectors),d=a.scripts?a.scripts.leng th:0,e=0;e<c.length&&(b=c[e]);e++)g[g.map[b.localName]](b),a.scripts&&d!==a.scri pts.length&&(d=a.scripts.length,c=a.querySelectorAll(g.selectors))}},parseLink:f unction(a){b(a)?a.import&&(g.parse(a.import),a.dispatchEvent(new CustomEvent("lo ad"))):this.parseGeneric(a)},parseGeneric:function(a){c(a)&&document.head.append Child(a)},parseScript:function(b){if(c(b)){var d=(b.__resource||b.textContent).t rim();if(d){var e=b.__nodeUrl;if(!e){var e=a.path.documentUrlFromNode(b),f="["+M ath.floor(1e3*(Math.random()+1))+"]",g=d.match(/Polymer\(['"]([^'"]*)/);f=g&&g[1 ]||f,e+="/"+f+".js"}d+="\n//# sourceURL="+e+"\n",a.currentScript=b,eval.call(win dow,d),a.currentScript=null}}}};Array.prototype.forEach.call.bind(Array.prototyp e.forEach)}a.parser=g}(HTMLImports),function(){function a(){HTMLImports.importer .load(document,function(){HTMLImports.parser.parse(document),HTMLImports.ready=! 0,HTMLImports.readyTime=(new Date).getTime(),document.dispatchEvent(new CustomEv ent("HTMLImportsLoaded",{bubbles:!0}))})}"function"!=typeof window.CustomEvent&& (window.CustomEvent=function(a){var b=document.createEvent("HTMLEvents");return b.initEvent(a,!0,!0),b}),"complete"===document.readyState||"interactive"===docum ent.readyState&&!window.attachEvent?a():window.addEventListener("DOMContentLoade d",a)}(),function(a){function b(a){u.push(a),t||(t=!0,q(d))}function c(a){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(a)||a}function d(){t=!1;var a=u;u=[],a.sort(function(a,b){return a.uid_-b.uid_});var b=!1;a.for Each(function(a){var c=a.takeRecords();e(a),c.length&&(a.callback_(c,a),b=!0)}), b&&d()}function e(a){a.nodes_.forEach(function(b){var c=p.get(b);c&&c.forEach(fu nction(b){b.observer===a&&b.removeTransientObservers()})})}function f(a,b){for(v ar c=a;c;c=c.parentNode){var d=p.get(c);if(d)for(var e=0;e<d.length;e++){var f=d [e],g=f.options;if(c===a||g.subtree){var h=b(g);h&&f.enqueue(h)}}}}function g(a) {this.callback_=a,this.nodes_=[],this.records_=[],this.uid_=++v}function h(a,b){ this.type=a,this.target=b,this.addedNodes=[],this.removedNodes=[],this.previousS ibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespac e=null,this.oldValue=null}function i(a){var b=new h(a.type,a.target);return b.ad dedNodes=a.addedNodes.slice(),b.removedNodes=a.removedNodes.slice(),b.previousSi bling=a.previousSibling,b.nextSibling=a.nextSibling,b.attributeName=a.attributeN ame,b.attributeNamespace=a.attributeNamespace,b.oldValue=a.oldValue,b}function j (a,b){return w=new h(a,b)}function k(a){return x?x:(x=i(w),x.oldValue=a,x)}funct ion l(){w=x=void 0}function m(a){return a===x||a===w}function n(a,b){return a=== b?a:x&&m(a)?x:null}function o(a,b,c){this.observer=a,this.target=b,this.options= c,this.transientObservedNodes=[]}var p=new WeakMap,q=window.msSetImmediate;if(!q ){var r=[],s=String(Math.random());window.addEventListener("message",function(a) {if(a.data===s){var b=r;r=[],b.forEach(function(a){a()})}}),q=function(a){r.push (a),window.postMessage(s,"*")}}var t=!1,u=[],v=0;g.prototype={observe:function(a ,b){if(a=c(a),!b.childList&&!b.attributes&&!b.characterData||b.attributeOldValue &&!b.attributes||b.attributeFilter&&b.attributeFilter.length&&!b.attributes||b.c haracterDataOldValue&&!b.characterData)throw new SyntaxError;var d=p.get(a);d||p .set(a,d=[]);for(var e,f=0;f<d.length;f++)if(d[f].observer===this){e=d[f],e.remo veListeners(),e.options=b;break}e||(e=new o(this,a,b),d.push(e),this.nodes_.push (a)),e.addListeners()},disconnect:function(){this.nodes_.forEach(function(a){for (var b=p.get(a),c=0;c<b.length;c++){var d=b[c];if(d.observer===this){d.removeLis teners(),b.splice(c,1);break}}},this),this.records_=[]},takeRecords:function(){v ar a=this.records_;return this.records_=[],a}};var w,x;o.prototype={enqueue:func tion(a){var c=this.observer.records_,d=c.length;if(c.length>0){var e=c[d-1],f=n( e,a);if(f)return c[d-1]=f,void 0}else b(this.observer);c[d]=a},addListeners:func tion(){this.addListeners_(this.target)},addListeners_:function(a){var b=this.opt ions;b.attributes&&a.addEventListener("DOMAttrModified",this,!0),b.characterData &&a.addEventListener("DOMCharacterDataModified",this,!0),b.childList&&a.addEvent Listener("DOMNodeInserted",this,!0),(b.childList||b.subtree)&&a.addEventListener ("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(thi s.target)},removeListeners_:function(a){var b=this.options;b.attributes&&a.remov eEventListener("DOMAttrModified",this,!0),b.characterData&&a.removeEventListener ("DOMCharacterDataModified",this,!0),b.childList&&a.removeEventListener("DOMNode Inserted",this,!0),(b.childList||b.subtree)&&a.removeEventListener("DOMNodeRemov ed",this,!0)},addTransientObserver:function(a){if(a!==this.target){this.addListe ners_(a),this.transientObservedNodes.push(a);var b=p.get(a);b||p.set(a,b=[]),b.p ush(this)}},removeTransientObservers:function(){var a=this.transientObservedNode s;this.transientObservedNodes=[],a.forEach(function(a){this.removeListeners_(a); for(var b=p.get(a),c=0;c<b.length;c++)if(b[c]===this){b.splice(c,1);break}},this )},handleEvent:function(a){switch(a.stopImmediatePropagation(),a.type){case"DOMA ttrModified":var b=a.attrName,c=a.relatedNode.namespaceURI,d=a.target,e=new j("a ttributes",d);e.attributeName=b,e.attributeNamespace=c;var g=a.attrChange===Muta tionEvent.ADDITION?null:a.prevValue;f(d,function(a){return!a.attributes||a.attri buteFilter&&a.attributeFilter.length&&-1===a.attributeFilter.indexOf(b)&&-1===a. attributeFilter.indexOf(c)?void 0:a.attributeOldValue?k(g):e});break;case"DOMCha racterDataModified":var d=a.target,e=j("characterData",d),g=a.prevValue;f(d,func tion(a){return a.characterData?a.characterDataOldValue?k(g):e:void 0});break;cas e"DOMNodeRemoved":this.addTransientObserver(a.target);case"DOMNodeInserted":var h,i,d=a.relatedNode,m=a.target;"DOMNodeInserted"===a.type?(h=[m],i=[]):(h=[],i=[ m]);var n=m.previousSibling,o=m.nextSibling,e=j("childList",d);e.addedNodes=h,e. removedNodes=i,e.previousSibling=n,e.nextSibling=o,f(d,function(a){return a.chil dList?e:void 0})}l()}},a.JsMutationObserver=g,!a.MutationObserver&&a.WebKitMutat ionObserver&&(a.MutationObserver=a.WebKitMutationObserver),a.MutationObserver||( a.MutationObserver=g)}(this),window.CustomElements=window.CustomElements||{flags :{}},function(a){function b(a,c,d){var e=a.firstElementChild;if(!e)for(e=a.first Child;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.nextSibling;for(;e;)c(e,d)!==!0&&b( e,c,d),e=e.nextElementSibling;return null}function c(a,b){for(var c=a.shadowRoot ;c;)d(c,b),c=c.olderShadowRoot}function d(a,d){b(a,function(a){return d(a)?!0:(c (a,d),void 0)}),c(a,d)}function e(a){return h(a)?(i(a),!0):(l(a),void 0)}functio n f(a){d(a,function(a){return e(a)?!0:void 0})}function g(a){return e(a)||f(a)}f unction h(b){if(!b.__upgraded__&&b.nodeType===Node.ELEMENT_NODE){var c=b.getAttr ibute("is")||b.localName,d=a.registry[c];if(d)return y.dom&&console.group("upgra de:",b.localName),a.upgrade(b),y.dom&&console.groupEnd(),!0}}function i(a){l(a), q(a)&&d(a,function(a){l(a)})}function j(a){if(B.push(a),!A){A=!0;var b=window.Pl atform&&window.Platform.endOfMicrotask||setTimeout;b(k)}}function k(){A=!1;for(v ar a,b=B,c=0,d=b.length;d>c&&(a=b[c]);c++)a();B=[]}function l(a){z?j(function(){ m(a)}):m(a)}function m(a){(a.enteredViewCallback||a.__upgraded__&&y.dom)&&(y.dom &&console.group("inserted:",a.localName),q(a)&&(a.__inserted=(a.__inserted||0)+1 ,a.__inserted<1&&(a.__inserted=1),a.__inserted>1?y.dom&&console.warn("inserted:" ,a.localName,"insert/remove count:",a.__inserted):a.enteredViewCallback&&(y.dom& &console.log("inserted:",a.localName),a.enteredViewCallback())),y.dom&&console.g roupEnd())}function n(a){o(a),d(a,function(a){o(a)})}function o(a){z?j(function( ){p(a)}):p(a)}function p(a){(a.leftViewCallback||a.__upgraded__&&y.dom)&&(y.dom& &console.log("removed:",a.localName),q(a)||(a.__inserted=(a.__inserted||0)-1,a._ _inserted>0&&(a.__inserted=0),a.__inserted<0?y.dom&&console.warn("removed:",a.lo calName,"insert/remove count:",a.__inserted):a.leftViewCallback&&a.leftViewCallb ack()))}function q(a){for(var b=a,c=window.ShadowDOMPolyfill&&window.ShadowDOMPo lyfill.wrapIfNeeded(document)||document;b;){if(b==c)return!0;b=b.parentNode||b.h ost}}function r(a){if(a.shadowRoot&&!a.shadowRoot.__watched){y.dom&&console.log( "watching shadow-root for: ",a.localName);for(var b=a.shadowRoot;b;)s(b),b=b.old erShadowRoot}}function s(a){a.__watched||(v(a),a.__watched=!0)}function t(a){if( y.dom){var b=a[0];if(b&&"childList"===b.type&&b.addedNodes&&b.addedNodes){for(va r c=b.addedNodes[0];c&&c!==document&&!c.host;)c=c.parentNode;var d=c&&(c.URL||c. _URL||c.host&&c.host.localName)||"";d=d.split("/?").shift().split("/").pop()}con sole.group("mutations (%d) [%s]",a.length,d||"")}a.forEach(function(a){"childLis t"===a.type&&(D(a.addedNodes,function(a){a.localName&&g(a)}),D(a.removedNodes,fu nction(a){a.localName&&n(a)}))}),y.dom&&console.groupEnd()}function u(){t(C.take Records()),k()}function v(a){C.observe(a,{childList:!0,subtree:!0})}function w(a ){v(a)}function x(a){y.dom&&console.group("upgradeDocument: ",(a.URL||a._URL||"" ).split("/").pop()),g(a),y.dom&&console.groupEnd()}var y=window.logFlags||{},z=! window.MutationObserver||window.MutationObserver===window.JsMutationObserver;a.h asPolyfillMutations=z;var A=!1,B=[],C=new MutationObserver(t),D=Array.prototype. forEach.call.bind(Array.prototype.forEach);a.watchShadow=r,a.upgradeAll=g,a.upgr adeSubtree=f,a.observeDocument=w,a.upgradeDocument=x,a.takeRecords=u}(window.Cus tomElements),function(a){function b(b,f){var g=f||{};if(!b)throw new Error("docu ment.register: first argument `name` must not be empty");if(b.indexOf("-")<0)thr ow new Error("document.register: first argument ('name') must contain a dash ('- '). Argument provided was '"+String(b)+"'.");
32 if(m(b))throw new Error("DuplicateDefinitionError: a type with name '"+String(b) +"' is already registered");if(!g.prototype)throw new Error("Options missing req uired prototype property");return g.name=b.toLowerCase(),g.lifecycle=g.lifecycle ||{},g.ancestry=c(g.extends),d(g),e(g),k(g.prototype),n(g.name,g),g.ctor=o(g),g. ctor.prototype=g.prototype,g.prototype.constructor=g.ctor,a.ready&&a.upgradeAll( document),g.ctor}function c(a){var b=m(a);return b?c(b.extends).concat([b]):[]}f unction d(a){for(var b,c=a.extends,d=0;b=a.ancestry[d];d++)c=b.is&&b.tag;a.tag=c ||a.name,c&&(a.is=a.name)}function e(a){if(!Object.__proto__){var b=HTMLElement. prototype;if(a.is){var c=document.createElement(a.tag);b=Object.getPrototypeOf(c )}for(var d,e=a.prototype;e&&e!==b;){var d=Object.getPrototypeOf(e);e.__proto__= d,e=d}}a.native=b}function f(a){return g(x(a.tag),a)}function g(b,c){return c.is &&b.setAttribute("is",c.is),b.removeAttribute("unresolved"),h(b,c),b.__upgraded_ _=!0,a.upgradeSubtree(b),j(b),b}function h(a,b){Object.__proto__?a.__proto__=b.p rototype:(i(a,b.prototype,b.native),a.__proto__=b.prototype)}function i(a,b,c){f or(var d={},e=b;e!==c&&e!==HTMLUnknownElement.prototype;){for(var f,g=Object.get OwnPropertyNames(e),h=0;f=g[h];h++)d[f]||(Object.defineProperty(a,f,Object.getOw nPropertyDescriptor(e,f)),d[f]=1);e=Object.getPrototypeOf(e)}}function j(a){a.cr eatedCallback&&a.createdCallback()}function k(a){if(!a.setAttribute._polyfilled) {var b=a.setAttribute;a.setAttribute=function(a,c){l.call(this,a,c,b)};var c=a.r emoveAttribute;a.removeAttribute=function(a){l.call(this,a,null,c)},a.setAttribu te._polyfilled=!0}}function l(a,b,c){var d=this.getAttribute(a);c.apply(this,arg uments);var e=this.getAttribute(a);this.attributeChangedCallback&&e!==d&&this.at tributeChangedCallback(a,d,e)}function m(a){return a?w[a.toLowerCase()]:void 0}f unction n(a,b){w[a]=b}function o(a){return function(){return f(a)}}function p(a, b){var c=m(b||a);return c?new c.ctor:x(a)}function q(a){if(!a.__upgraded__&&a.no deType===Node.ELEMENT_NODE){var b=a.getAttribute("is")||a.localName,c=m(b);retur n c&&g(a,c)}}function r(b){var c=y.call(this,b);return a.upgradeAll(c),c}a||(a=w indow.CustomElements={flags:{}});var s=a.flags,t=Boolean(document.register),u=!s .register&&t;if(u){var v=function(){};a.registry={},a.upgradeElement=v,a.watchSh adow=v,a.upgrade=v,a.upgradeAll=v,a.upgradeSubtree=v,a.observeDocument=v,a.upgra deDocument=v,a.takeRecords=v}else{var w={},x=document.createElement.bind(documen t),y=Node.prototype.cloneNode;document.register=b,document.createElement=p,Node. prototype.cloneNode=r,a.registry=w,a.upgrade=q}a.hasNative=t,a.useNative=u}(wind ow.CustomElements),function(){function a(a){return"link"===a.localName&&a.getAtt ribute("rel")===b}var b=window.HTMLImports?HTMLImports.IMPORT_LINK_TYPE:"none",c ={selectors:["link[rel="+b+"]"],map:{link:"parseLink"},parse:function(a){if(!a._ _parsed){a.__parsed=!0;var b=a.querySelectorAll(c.selectors);d(b,function(a){c[c .map[a.localName]](a)}),CustomElements.upgradeDocument(a),CustomElements.observe Document(a)}},parseLink:function(b){a(b)&&this.parseImport(b)},parseImport:funct ion(a){a.content&&c.parse(a.content)}},d=Array.prototype.forEach.call.bind(Array .prototype.forEach);CustomElements.parser=c}(),function(a){function b(){CustomEl ements.parser.parse(document),CustomElements.upgradeDocument(document);var a=win dow.Platform&&Platform.endOfMicrotask?Platform.endOfMicrotask:setTimeout;a(funct ion(){CustomElements.ready=!0,CustomElements.readyTime=Date.now(),window.HTMLImp orts&&(CustomElements.elapsed=CustomElements.readyTime-HTMLImports.readyTime),do cument.body.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})} if("function"!=typeof window.CustomEvent&&(window.CustomEvent=function(a){var b= document.createEvent("HTMLEvents");return b.initEvent(a,!0,!0),b}),"complete"=== document.readyState||a.flags.eager)b();else if("interactive"!==document.readySta te||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var c=win dow.HTMLImports?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(c ,b)}else b()}(window.CustomElements),function(){var a=document.createElement("st yle");a.textContent="element {display: none !important;} /* injected by platform .js */";var b=document.querySelector("head");if(b.insertBefore(a,b.firstChild),w indow.ShadowDOMPolyfill){var c=["upgradeAll","upgradeSubtree","observeDocument", "upgradeDocument"],d={};c.forEach(function(a){d[a]=CustomElements[a]}),c.forEach (function(a){CustomElements[a]=function(b){return d[a](wrap(b))}})}}(),function( a){function b(a){f.textContent=d++,e.push(a)}function c(){for(;e.length;)e.shift ()()}var d=0,e=[],f=document.createTextNode("");new(window.MutationObserver||JsM utationObserver)(c).observe(f,{characterData:!0}),a.endOfMicrotask=b}(Platform), function(a){a=a||{},a.external=a.external||{};var b={shadow:function(a){return a ?a.shadowRoot||a.webkitShadowRoot:void 0},canTarget:function(a){return a&&Boolea n(a.elementFromPoint)},targetingShadow:function(a){var b=this.shadow(a);return t his.canTarget(b)?b:void 0},olderShadow:function(a){var b=a.olderShadowRoot;if(!b ){var c=a.querySelector("shadow");c&&(b=c.olderShadowRoot)}return b},allShadows: function(a){for(var b=[],c=this.shadow(a);c;)b.push(c),c=this.olderShadow(c);ret urn b},searchRoot:function(a,b,c){if(a){var d,e,f=a.elementFromPoint(b,c);for(e= this.targetingShadow(f);e;){if(d=e.elementFromPoint(b,c)){var g=this.targetingSh adow(d);return this.searchRoot(g,b,c)||d}e=this.olderShadow(e)}return f}},owner: function(a){for(var b=a;b.parentNode;)b=b.parentNode;return b},findTarget:functi on(a){var b=a.clientX,c=a.clientY,d=this.owner(a.target);return d.elementFromPoi nt(b,c)||(d=document),this.searchRoot(d,b,c)}};a.targetFinding=b,a.findTarget=b. findTarget.bind(b),window.PointerEventsPolyfill=a}(window.PointerEventsPolyfill) ,function(){function a(a){return"body ^^ "+b(a)}function b(a){return'[touch-acti on="'+a+'"]'}function c(a){return"{ -ms-touch-action: "+a+"; touch-action: "+a+" ; touch-action-delay: none; }"}var d=["none","auto","pan-x","pan-y",{rule:"pan-x pan-y",selectors:["pan-x pan-y","pan-y pan-x"]}],e="";d.forEach(function(d){Str ing(d)===d?(e+=b(d)+c(d)+"\n",e+=a(d)+c(d)+"\n"):(e+=d.selectors.map(b)+c(d.rule )+"\n",e+=d.selectors.map(a)+c(d.rule)+"\n")});var f=document.createElement("sty le");f.textContent=e,document.head.appendChild(f)}(),function(a){function b(a,e) {e=e||{};var f=e.buttons;if(void 0===f)switch(e.which){case 1:f=1;break;case 2:f =4;break;case 3:f=2;break;default:f=0}var i;if(c)i=new MouseEvent(a,e);else{i=do cument.createEvent("MouseEvent");for(var j,k={},l=0;l<g.length;l++)j=g[l],k[j]=e [j]||h[l];i.initMouseEvent(a,k.bubbles,k.cancelable,k.view,k.detail,k.screenX,k. screenY,k.clientX,k.clientY,k.ctrlKey,k.altKey,k.shiftKey,k.metaKey,k.button,k.r elatedTarget)}i.__proto__=b.prototype,d||Object.defineProperty(i,"buttons",{get: function(){return f},enumerable:!0});var m=0;return m=e.pressure?e.pressure:f?.5 :0,Object.defineProperties(i,{pointerId:{value:e.pointerId||0,enumerable:!0},wid th:{value:e.width||0,enumerable:!0},height:{value:e.height||0,enumerable:!0},pre ssure:{value:m,enumerable:!0},tiltX:{value:e.tiltX||0,enumerable:!0},tiltY:{valu e:e.tiltY||0,enumerable:!0},pointerType:{value:e.pointerType||"",enumerable:!0}, hwTimestamp:{value:e.hwTimestamp||0,enumerable:!0},isPrimary:{value:e.isPrimary| |!1,enumerable:!0}}),i}var c=!1,d=!1;try{var e=new MouseEvent("click",{buttons:1 });c=!0,d=1===e.buttons}catch(f){}var g=["bubbles","cancelable","view","detail", "screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey", "button","relatedTarget"],h=[!1,!1,null,null,0,0,0,0,!1,!1,!1,!1,0,null];b.proto type=Object.create(MouseEvent.prototype),a.PointerEvent||(a.PointerEvent=b)}(win dow),function(a){function b(){if(c){var a=new Map;return a.pointers=d,a}this.key s=[],this.values=[]}var c=window.Map&&window.Map.prototype.forEach,d=function(){ return this.size};b.prototype={set:function(a,b){var c=this.keys.indexOf(a);c>-1 ?this.values[c]=b:(this.keys.push(a),this.values.push(b))},has:function(a){retur n this.keys.indexOf(a)>-1},"delete":function(a){var b=this.keys.indexOf(a);b>-1& &(this.keys.splice(b,1),this.values.splice(b,1))},get:function(a){var b=this.key s.indexOf(a);return this.values[b]},clear:function(){this.keys.length=0,this.val ues.length=0},forEach:function(a,b){this.values.forEach(function(c,d){a.call(b,c ,this.keys[d],this)},this)},pointers:function(){return this.keys.length}},a.Poin terMap=b}(window.PointerEventsPolyfill),function(a){var b=["bubbles","cancelable ","view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","sh iftKey","metaKey","button","relatedTarget","buttons","pointerId","width","height ","pressure","tiltX","tiltY","pointerType","hwTimestamp","isPrimary","type","tar get","currentTarget","which"],c=[!1,!1,null,null,0,0,0,0,!1,!1,!1,!1,0,null,void 0,0,0,0,0,0,0,"",0,!1,"",null,null,0],d={targets:new WeakMap,handledEvents:new WeakMap,pointermap:new a.PointerMap,eventMap:{},eventSources:{},eventSourceList: [],registerSource:function(a,b){var c=b,d=c.events;d&&(d.forEach(function(a){c[a ]&&(this.eventMap[a]=c[a].bind(c))},this),this.eventSources[a]=c,this.eventSourc eList.push(c))},register:function(a){for(var b,c=this.eventSourceList.length,d=0 ;c>d&&(b=this.eventSourceList[d]);d++)b.register.call(b,a)},unregister:function( a){for(var b,c=this.eventSourceList.length,d=0;c>d&&(b=this.eventSourceList[d]); d++)b.unregister.call(b,a)},contains:a.external.contains||function(a,b){return a .contains(b)},down:function(a){this.fireEvent("pointerdown",a)},move:function(a) {this.fireEvent("pointermove",a)},up:function(a){this.fireEvent("pointerup",a)}, enter:function(a){a.bubbles=!1,this.fireEvent("pointerenter",a)},leave:function( a){a.bubbles=!1,this.fireEvent("pointerleave",a)},over:function(a){a.bubbles=!0, this.fireEvent("pointerover",a)},out:function(a){a.bubbles=!0,this.fireEvent("po interout",a)},cancel:function(a){this.fireEvent("pointercancel",a)},leaveOut:fun ction(a){this.contains(a.target,a.relatedTarget)||this.leave(a),this.out(a)},ent erOver:function(a){this.contains(a.target,a.relatedTarget)||this.enter(a),this.o ver(a)},eventHandler:function(a){if(!this.handledEvents.get(a)){var b=a.type,c=t his.eventMap&&this.eventMap[b];c&&c(a),this.handledEvents.set(a,!0)}},listen:fun ction(a,b){b.forEach(function(b){this.addEvent(a,b)},this)},unlisten:function(a, b){b.forEach(function(b){this.removeEvent(a,b)},this)},addEvent:a.external.addEv ent||function(a,b){a.addEventListener(b,this.boundHandler)},removeEvent:a.extern al.removeEvent||function(a,b){a.removeEventListener(b,this.boundHandler)},makeEv ent:function(a,b){this.captureInfo&&(b.relatedTarget=null);var c=new PointerEven t(a,b);return b.preventDefault&&(c.preventDefault=b.preventDefault),this.targets .set(c,this.targets.get(b)||b.target),c},fireEvent:function(a,b){var c=this.make Event(a,b);return this.dispatchEvent(c)},cloneEvent:function(a){for(var d,e={},f =0;f<b.length;f++)d=b[f],e[d]=a[d]||c[f];return a.preventDefault&&(e.preventDefa ult=function(){a.preventDefault()}),e},getTarget:function(a){return this.capture Info&&this.captureInfo.id===a.pointerId?this.captureInfo.target:this.targets.get (a)},setCapture:function(a,b){this.captureInfo&&this.releaseCapture(this.capture Info.id),this.captureInfo={id:a,target:b};var c=new PointerEvent("gotpointercapt ure",{bubbles:!0});this.implicitRelease=this.releaseCapture.bind(this,a),documen t.addEventListener("pointerup",this.implicitRelease),document.addEventListener(" pointercancel",this.implicitRelease),this.targets.set(c,b),this.asyncDispatchEve nt(c)},releaseCapture:function(a){if(this.captureInfo&&this.captureInfo.id===a){ var b=new PointerEvent("lostpointercapture",{bubbles:!0}),c=this.captureInfo.tar get;this.captureInfo=null,document.removeEventListener("pointerup",this.implicit Release),document.removeEventListener("pointercancel",this.implicitRelease),this .targets.set(b,c),this.asyncDispatchEvent(b)}},dispatchEvent:a.external.dispatch Event||function(a){var b=this.getTarget(a);return b?b.dispatchEvent(a):void 0},a syncDispatchEvent:function(a){setTimeout(this.dispatchEvent.bind(this,a),0)}};d. boundHandler=d.eventHandler.bind(d),a.dispatcher=d,a.register=d.register.bind(d) ,a.unregister=d.unregister.bind(d)}(window.PointerEventsPolyfill),function(a){fu nction b(a,b,c,d){this.addCallback=a.bind(d),this.removeCallback=b.bind(d),this. changedCallback=c.bind(d),g&&(this.observer=new g(this.mutationWatcher.bind(this )))}var c=Array.prototype.forEach.call.bind(Array.prototype.forEach),d=Array.pro totype.map.call.bind(Array.prototype.map),e=Array.prototype.slice.call.bind(Arra y.prototype.slice),f=Array.prototype.filter.call.bind(Array.prototype.filter),g= window.MutationObserver||window.WebKitMutationObserver,h="[touch-action]",i={sub tree:!0,childList:!0,attributes:!0,attributeOldValue:!0,attributeFilter:["touch- action"]};b.prototype={watchSubtree:function(b){a.targetFinding.canTarget(b)&&th is.observer.observe(b,i)},enableOnSubtree:function(a){this.watchSubtree(a),a===d ocument&&"complete"!==document.readyState?this.installOnLoad():this.installNewSu btree(a)},installNewSubtree:function(a){c(this.findElements(a),this.addElement,t his)},findElements:function(a){return a.querySelectorAll?a.querySelectorAll(h):[ ]},removeElement:function(a){this.removeCallback(a)},addElement:function(a){this .addCallback(a)},elementChanged:function(a,b){this.changedCallback(a,b)},concatL ists:function(a,b){return a.concat(e(b))},installOnLoad:function(){document.addE ventListener("DOMContentLoaded",this.installNewSubtree.bind(this,document))},isE lement:function(a){return a.nodeType===Node.ELEMENT_NODE},flattenMutationTree:fu nction(a){var b=d(a,this.findElements,this);return b.push(f(a,this.isElement)),b .reduce(this.concatLists,[])},mutationWatcher:function(a){a.forEach(this.mutatio nHandler,this)},mutationHandler:function(a){if("childList"===a.type){var b=this. flattenMutationTree(a.addedNodes);b.forEach(this.addElement,this);var c=this.fla ttenMutationTree(a.removedNodes);c.forEach(this.removeElement,this)}else"attribu tes"===a.type&&this.elementChanged(a.target,a.oldValue)}},g||(b.prototype.watchS ubtree=function(){console.warn("PointerEventsPolyfill: MutationObservers not fou nd, touch-action will not be dynamically detected")}),a.Installer=b}(window.Poin terEventsPolyfill),function(a){var b=a.dispatcher,c=b.pointermap,d=25,e={POINTER _ID:1,POINTER_TYPE:"mouse",events:["mousedown","mousemove","mouseup","mouseover" ,"mouseout"],register:function(a){b.listen(a,this.events)},unregister:function(a ){b.unlisten(a,this.events)},lastTouches:[],isEventSimulatedFromTouch:function(a ){for(var b,c=this.lastTouches,e=a.clientX,f=a.clientY,g=0,h=c.length;h>g&&(b=c[ g]);g++){var i=Math.abs(e-b.x),j=Math.abs(f-b.y);if(d>=i&&d>=j)return!0}},prepar eEvent:function(a){var c=b.cloneEvent(a),d=c.preventDefault;return c.preventDefa ult=function(){a.preventDefault(),d()},c.pointerId=this.POINTER_ID,c.isPrimary=! 0,c.pointerType=this.POINTER_TYPE,c},mousedown:function(a){if(!this.isEventSimul atedFromTouch(a)){var d=c.has(this.POINTER_ID);d&&this.cancel(a);var e=this.prep areEvent(a);c.set(this.POINTER_ID,a),b.down(e)}},mousemove:function(a){if(!this. isEventSimulatedFromTouch(a)){var c=this.prepareEvent(a);b.move(c)}},mouseup:fun ction(a){if(!this.isEventSimulatedFromTouch(a)){var d=c.get(this.POINTER_ID);if( d&&d.button===a.button){var e=this.prepareEvent(a);b.up(e),this.cleanupMouse()}} },mouseover:function(a){if(!this.isEventSimulatedFromTouch(a)){var c=this.prepar eEvent(a);b.enterOver(c)}},mouseout:function(a){if(!this.isEventSimulatedFromTou ch(a)){var c=this.prepareEvent(a);b.leaveOut(c)}},cancel:function(a){var c=this. prepareEvent(a);b.cancel(c),this.cleanupMouse()},cleanupMouse:function(){c["dele te"](this.POINTER_ID)}};a.mouseEvents=e}(window.PointerEventsPolyfill),function( a){var b,c=a.dispatcher,d=a.findTarget,e=a.targetFinding.allShadows.bind(a.targe tFinding),f=c.pointermap,g=Array.prototype.map.call.bind(Array.prototype.map),h= 2500,i=200,j="touch-action",k="string"==typeof document.head.style.touchAction,l ={scrollType:new WeakMap,events:["touchstart","touchmove","touchend","touchcance l"],register:function(a){k?c.listen(a,this.events):b.enableOnSubtree(a)},unregis ter:function(a){k&&c.unlisten(a,this.events)},elementAdded:function(a){var b=a.g etAttribute(j),d=this.touchActionToScrollType(b);d&&(this.scrollType.set(a,d),c. listen(a,this.events),e(a).forEach(function(a){this.scrollType.set(a,d),c.listen (a,this.events)},this))},elementRemoved:function(a){this.scrollType["delete"](a) ,c.unlisten(a,this.events),e(a).forEach(function(a){this.scrollType["delete"](a) ,c.unlisten(a,this.events)},this)},elementChanged:function(a,b){var c=a.getAttri bute(j),d=this.touchActionToScrollType(c),f=this.touchActionToScrollType(b);d&&f ?(this.scrollType.set(a,d),e(a).forEach(function(a){this.scrollType.set(a,d)},th is)):f?this.elementRemoved(a):d&&this.elementAdded(a)},scrollTypes:{EMITTER:"non e",XSCROLLER:"pan-x",YSCROLLER:"pan-y",SCROLLER:/^(?:pan-x pan-y)|(?:pan-y pan-x )|auto$/},touchActionToScrollType:function(a){var b=a,c=this.scrollTypes;return" none"===b?"none":b===c.XSCROLLER?"X":b===c.YSCROLLER?"Y":c.SCROLLER.exec(b)?"XY" :void 0},POINTER_TYPE:"touch",firstTouch:null,isPrimaryTouch:function(a){return this.firstTouch===a.identifier},setPrimaryTouch:function(a){(0===f.pointers()||1 ===f.pointers()&&f.has(1))&&(this.firstTouch=a.identifier,this.firstXY={X:a.clie ntX,Y:a.clientY},this.scrolling=!1,this.cancelResetClickCount())},removePrimaryP ointer:function(a){a.isPrimary&&(this.firstTouch=null,this.firstXY=null,this.res etClickCount())},clickCount:0,resetId:null,resetClickCount:function(){var a=func tion(){this.clickCount=0,this.resetId=null}.bind(this);this.resetId=setTimeout(a ,i)},cancelResetClickCount:function(){this.resetId&&clearTimeout(this.resetId)}, touchToPointer:function(a){var b=c.cloneEvent(a);return b.pointerId=a.identifier +2,b.target=d(b),b.bubbles=!0,b.cancelable=!0,b.detail=this.clickCount,b.button= 0,b.buttons=1,b.width=a.webkitRadiusX||a.radiusX||0,b.height=a.webkitRadiusY||a. radiusY||0,b.pressure=a.webkitForce||a.force||.5,b.isPrimary=this.isPrimaryTouch (a),b.pointerType=this.POINTER_TYPE,b},processTouches:function(a,b){var c=a.chan gedTouches,d=g(c,this.touchToPointer,this);d.forEach(function(b){b.preventDefaul t=function(){this.scrolling=!1,this.firstXY=null,a.preventDefault()}},this),d.fo rEach(b,this)},shouldScroll:function(a){if(this.firstXY){var b,c=this.scrollType .get(a.currentTarget);if("none"===c)b=!1;else if("XY"===c)b=!0;else{var d=a.chan gedTouches[0],e=c,f="Y"===c?"X":"Y",g=Math.abs(d["client"+e]-this.firstXY[e]),h= Math.abs(d["client"+f]-this.firstXY[f]);b=g>=h}return this.firstXY=null,b}},find Touch:function(a,b){for(var c,d=0,e=a.length;e>d&&(c=a[d]);d++)if(c.identifier== =b)return!0},vacuumTouches:function(a){var b=a.touches;if(f.pointers()>=b.length ){var c=[];f.forEach(function(a,d){if(1!==d&&!this.findTouch(b,d-2)){var e=a.out ;c.push(this.touchToPointer(e))}},this),c.forEach(this.cancelOut,this)}},touchst art:function(a){this.vacuumTouches(a),this.setPrimaryTouch(a.changedTouches[0]), this.dedupSynthMouse(a),this.scrolling||(this.clickCount++,this.processTouches(a ,this.overDown))},overDown:function(a){f.set(a.pointerId,{target:a.target,out:a, outTarget:a.target});c.over(a),c.down(a)},touchmove:function(a){this.scrolling|| (this.shouldScroll(a)?(this.scrolling=!0,this.touchcancel(a)):(a.preventDefault( ),this.processTouches(a,this.moveOverOut)))},moveOverOut:function(a){var b=a,d=f .get(b.pointerId);if(d){var e=d.out,g=d.outTarget;c.move(b),e&&g!==b.target&&(e. relatedTarget=b.target,b.relatedTarget=g,e.target=g,b.target?(c.leaveOut(e),c.en terOver(b)):(b.target=g,b.relatedTarget=null,this.cancelOut(b))),d.out=b,d.outTa rget=b.target}},touchend:function(a){this.dedupSynthMouse(a),this.processTouches (a,this.upOut)},upOut:function(a){this.scrolling||(c.up(a),c.out(a)),this.cleanU pPointer(a)},touchcancel:function(a){this.processTouches(a,this.cancelOut)},canc elOut:function(a){c.cancel(a),c.out(a),this.cleanUpPointer(a)},cleanUpPointer:fu nction(a){f["delete"](a.pointerId),this.removePrimaryPointer(a)},dedupSynthMouse :function(b){var c=a.mouseEvents.lastTouches,d=b.changedTouches[0];if(this.isPri maryTouch(d)){var e={x:d.clientX,y:d.clientY};c.push(e);var f=function(a,b){var c=a.indexOf(b);c>-1&&a.splice(c,1)}.bind(null,c,e);setTimeout(f,h)}}};k||(b=new a.Installer(l.elementAdded,l.elementRemoved,l.elementChanged,l)),a.touchEvents=l }(window.PointerEventsPolyfill),function(a){var b=a.dispatcher,c=b.pointermap,d= window.MSPointerEvent&&"number"==typeof window.MSPointerEvent.MSPOINTER_TYPE_MOU SE,e={events:["MSPointerDown","MSPointerMove","MSPointerUp","MSPointerOut","MSPo interOver","MSPointerCancel","MSGotPointerCapture","MSLostPointerCapture"],regis ter:function(a){b.listen(a,this.events)},unregister:function(a){b.unlisten(a,thi s.events)},POINTER_TYPES:["","unavailable","touch","pen","mouse"],prepareEvent:f unction(a){var c=a;return d&&(c=b.cloneEvent(a),c.pointerType=this.POINTER_TYPES [a.pointerType]),c},cleanup:function(a){c["delete"](a)},MSPointerDown:function(a ){c.set(a.pointerId,a);var d=this.prepareEvent(a);b.down(d)},MSPointerMove:funct ion(a){var c=this.prepareEvent(a);b.move(c)},MSPointerUp:function(a){var c=this. prepareEvent(a);b.up(c),this.cleanup(a.pointerId)},MSPointerOut:function(a){var c=this.prepareEvent(a);b.leaveOut(c)},MSPointerOver:function(a){var c=this.prepa reEvent(a);b.enterOver(c)},MSPointerCancel:function(a){var c=this.prepareEvent(a );b.cancel(c),this.cleanup(a.pointerId)},MSLostPointerCapture:function(a){var c= b.makeEvent("lostpointercapture",a);b.dispatchEvent(c)},MSGotPointerCapture:func tion(a){var c=b.makeEvent("gotpointercapture",a);b.dispatchEvent(c)}};a.msEvents =e}(window.PointerEventsPolyfill),function(a){var b=a.dispatcher;if(void 0===win dow.navigator.pointerEnabled){if(Object.defineProperty(window.navigator,"pointer Enabled",{value:!0,enumerable:!0}),window.navigator.msPointerEnabled){var c=wind ow.navigator.msMaxTouchPoints;Object.defineProperty(window.navigator,"maxTouchPo ints",{value:c,enumerable:!0}),b.registerSource("ms",a.msEvents)}else b.register Source("mouse",a.mouseEvents),void 0!==window.ontouchstart&&b.registerSource("to uch",a.touchEvents);b.register(document)}}(window.PointerEventsPolyfill),functio n(a){function b(a){if(!e.pointermap.has(a))throw new Error("InvalidPointerId")}v ar c,d,e=a.dispatcher,f=window.navigator;f.msPointerEnabled?(c=function(a){b(a), this.msSetPointerCapture(a)},d=function(a){b(a),this.msReleasePointerCapture(a)} ):(c=function(a){b(a),e.setCapture(a,this)},d=function(a){b(a),e.releaseCapture( a,this)}),window.Element&&!Element.prototype.setPointerCapture&&Object.definePro perties(Element.prototype,{setPointerCapture:{value:c},releasePointerCapture:{va lue:d}})}(window.PointerEventsPolyfill),PointerGestureEvent.prototype.preventTap =function(){this.tapPrevented=!0},function(a){a=a||{},a.utils={LCA:{find:functio n(a,b){if(a===b)return a;if(a.contains){if(a.contains(b))return a;if(b.contains( a))return b}var c=this.depth(a),d=this.depth(b),e=c-d;for(e>0?a=this.walk(a,e):b =this.walk(b,-e);a&&b&&a!==b;)a=this.walk(a,1),b=this.walk(b,1);return a},walk:f unction(a,b){for(var c=0;b>c;c++)a=a.parentNode;return a},depth:function(a){for( var b=0;a;)b++,a=a.parentNode;return b}}},a.findLCA=function(b,c){return a.utils .LCA.find(b,c)},window.PointerGestures=a}(window.PointerGestures),function(a){fu nction b(){this.ids=[],this.pointers=[]}b.prototype={set:function(a,b){var c=thi s.ids.indexOf(a);c>-1?this.pointers[c]=b:(this.ids.push(a),this.pointers.push(b) )},has:function(a){return this.ids.indexOf(a)>-1},"delete":function(a){var b=thi s.ids.indexOf(a);b>-1&&(this.ids.splice(b,1),this.pointers.splice(b,1))},get:fun ction(a){var b=this.ids.indexOf(a);return this.pointers[b]},get size(){return th is.pointers.length},clear:function(){this.ids.length=0,this.pointers.length=0}}, window.Map&&(b=window.Map),a.PointerMap=b}(window.PointerGestures),function(a){v ar b=["bubbles","cancelable","view","detail","screenX","screenY","clientX","clie ntY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget","buttons", "pointerId","width","height","pressure","tiltX","tiltY","pointerType","hwTimesta mp","isPrimary","type","target","currentTarget","screenX","screenY","pageX","pag eY","tapPrevented"],c=[!1,!1,null,null,0,0,0,0,!1,!1,!1,!1,0,null,0,0,0,0,0,0,0, "",0,!1,"",null,null,0,0,0,0],d={handledEvents:new WeakMap,targets:new WeakMap,h andlers:{},recognizers:{},events:{},registerRecognizer:function(a,b){var c=b;thi s.recognizers[a]=c,c.events.forEach(function(a){if(c[a]){this.events[a]=!0;var b =c[a].bind(c);this.addHandler(a,b)}},this)},addHandler:function(a,b){var c=a;thi s.handlers[c]||(this.handlers[c]=[]),this.handlers[c].push(b)},registerTarget:fu nction(a){this.listen(Object.keys(this.events),a)},unregisterTarget:function(a){ this.unlisten(Object.keys(this.events),a)},eventHandler:function(a){if(!this.han dledEvents.get(a)){var b=a.type,c=this.handlers[b];c&&this.makeQueue(c,a),this.h andledEvents.set(a,!0)}},makeQueue:function(a,b){var c=this.cloneEvent(b);setTim eout(this.runQueue.bind(this,a,c),0)},runQueue:function(a,b){this.currentPointer Id=b.pointerId;for(var c,d=0,e=a.length;e>d&&(c=a[d]);d++)c(b);this.currentPoint erId=0},listen:function(a,b){a.forEach(function(a){this.addEvent(a,this.boundHan dler,!1,b)},this)},unlisten:function(a){a.forEach(function(a){this.removeEvent(a ,this.boundHandler,!1,inTarget)},this)},addEvent:function(a,b,c,d){d.addEventLis tener(a,b,c)},removeEvent:function(a,b,c,d){d.removeEventListener(a,b,c)},makeEv ent:function(a,b){return new PointerGestureEvent(a,b)},cloneEvent:function(a){fo r(var d,e={},f=0;f<b.length;f++)d=b[f],e[d]=a[d]||c[f];return e},dispatchEvent:f unction(a,b){var c=b||this.targets.get(a);c&&(c.dispatchEvent(a),a.tapPrevented& &this.preventTap(this.currentPointerId))},asyncDispatchEvent:function(a,b){var c =function(){this.dispatchEvent(a,b)}.bind(this);setTimeout(c,0)},preventTap:func tion(a){var b=this.recognizers.tap;b&&b.preventTap(a)}};d.boundHandler=d.eventHa ndler.bind(d),a.dispatcher=d;var e=[],f=!1;a.register=function(b){if(f){var c=wi ndow.PointerEventsPolyfill;c&&c.register(b),a.dispatcher.registerTarget(b)}else e.push(b)},document.addEventListener("DOMContentLoaded",function(){f=!0,e.push(d ocument),e.forEach(a.register)})}(window.PointerGestures),function(a){var b=a.di spatcher,c={HOLD_DELAY:200,WIGGLE_THRESHOLD:16,events:["pointerdown","pointermov e","pointerup","pointercancel"],heldPointer:null,holdJob:null,pulse:function(){v ar a=Date.now()-this.heldPointer.timeStamp,b=this.held?"holdpulse":"hold";this.f ireHold(b,a),this.held=!0},cancel:function(){clearInterval(this.holdJob),this.he ld&&this.fireHold("release"),this.held=!1,this.heldPointer=null,this.target=null ,this.holdJob=null},pointerdown:function(a){a.isPrimary&&!this.heldPointer&&(thi s.heldPointer=a,this.target=a.target,this.holdJob=setInterval(this.pulse.bind(th is),this.HOLD_DELAY))},pointerup:function(a){this.heldPointer&&this.heldPointer. pointerId===a.pointerId&&this.cancel()},pointercancel:function(){this.cancel()}, pointermove:function(a){if(this.heldPointer&&this.heldPointer.pointerId===a.poin terId){var b=a.clientX-this.heldPointer.clientX,c=a.clientY-this.heldPointer.cli entY;b*b+c*c>this.WIGGLE_THRESHOLD&&this.cancel()}},fireHold:function(a,c){var d ={pointerType:this.heldPointer.pointerType};c&&(d.holdTime=c);var e=b.makeEvent( a,d);b.dispatchEvent(e,this.target),e.tapPrevented&&b.preventTap(this.heldPointe r.pointerId)}};b.registerRecognizer("hold",c)}(window.PointerGestures),function( a){var b=a.dispatcher,c=new a.PointerMap,d={events:["pointerdown","pointermove", "pointerup","pointercancel"],WIGGLE_THRESHOLD:4,clampDir:function(a){return a>0? 1:-1},calcPositionDelta:function(a,b){var c=0,d=0;return a&&b&&(c=b.pageX-a.page X,d=b.pageY-a.pageY),{x:c,y:d}},fireTrack:function(a,c,d){var e=d,f=this.calcPos itionDelta(e.downEvent,c),g=this.calcPositionDelta(e.lastMoveEvent,c);g.x&&(e.xD irection=this.clampDir(g.x)),g.y&&(e.yDirection=this.clampDir(g.y));var h={dx:f. x,dy:f.y,ddx:g.x,ddy:g.y,clientX:c.clientX,clientY:c.clientY,pageX:c.pageX,pageY :c.pageY,screenX:c.screenX,screenY:c.screenY,xDirection:e.xDirection,yDirection: e.yDirection,trackInfo:e.trackInfo,relatedTarget:c.target,pointerType:c.pointerT ype},i=b.makeEvent(a,h);e.lastMoveEvent=c,b.dispatchEvent(i,e.downTarget)},point erdown:function(a){if(a.isPrimary&&("mouse"===a.pointerType?1===a.buttons:!0)){v ar b={downEvent:a,downTarget:a.target,trackInfo:{},lastMoveEvent:null,xDirection :0,yDirection:0,tracking:!1};c.set(a.pointerId,b)}},pointermove:function(a){var b=c.get(a.pointerId);if(b)if(b.tracking)this.fireTrack("track",a,b);else{var d=t his.calcPositionDelta(b.downEvent,a),e=d.x*d.x+d.y*d.y;e>this.WIGGLE_THRESHOLD&& (b.tracking=!0,this.fireTrack("trackstart",b.downEvent,b),this.fireTrack("track" ,a,b))}},pointerup:function(a){var b=c.get(a.pointerId);b&&(b.tracking&&this.fir eTrack("trackend",a,b),c.delete(a.pointerId))},pointercancel:function(a){this.po interup(a)}};b.registerRecognizer("track",d)}(window.PointerGestures),function(a ){var b=a.dispatcher,c={MIN_VELOCITY:.5,MAX_QUEUE:4,moveQueue:[],target:null,poi nterId:null,events:["pointerdown","pointermove","pointerup","pointercancel"],poi nterdown:function(a){a.isPrimary&&!this.pointerId&&(this.pointerId=a.pointerId,t his.target=a.target,this.addMove(a))},pointermove:function(a){a.pointerId===this .pointerId&&this.addMove(a)},pointerup:function(a){a.pointerId===this.pointerId& &this.fireFlick(a),this.cleanup()},pointercancel:function(){this.cleanup()},clea nup:function(){this.moveQueue=[],this.target=null,this.pointerId=null},addMove:f unction(a){this.moveQueue.length>=this.MAX_QUEUE&&this.moveQueue.shift(),this.mo veQueue.push(a)},fireFlick:function(a){for(var c,d,e,f,g,h,i,j=a,k=this.moveQueu e.length,l=0,m=0,n=0,o=0;k>o&&(i=this.moveQueue[o]);o++)c=j.timeStamp-i.timeStam p,d=j.clientX-i.clientX,e=j.clientY-i.clientY,f=d/c,g=e/c,h=Math.sqrt(f*f+g*g),h >n&&(l=f,m=g,n=h);var p=Math.abs(l)>Math.abs(m)?"x":"y",q=this.calcAngle(l,m);if (Math.abs(n)>=this.MIN_VELOCITY){var r=b.makeEvent("flick",{xVelocity:l,yVelocit y:m,velocity:n,angle:q,majorAxis:p,pointerType:a.pointerType});b.dispatchEvent(r ,this.target)}},calcAngle:function(a,b){return 180*Math.atan2(b,a)/Math.PI}};b.r egisterRecognizer("flick",c)}(window.PointerGestures),function(a){var b=a.dispat cher,c=new a.PointerMap,d={events:["pointerdown","pointermove","pointerup","poin tercancel","keyup"],pointerdown:function(a){a.isPrimary&&!a.tapPrevented&&c.set( a.pointerId,{target:a.target,x:a.clientX,y:a.clientY})},pointermove:function(a){ if(a.isPrimary){var b=c.get(a.pointerId);b&&a.tapPrevented&&c.delete(a.pointerId )}},pointerup:function(d){var e=c.get(d.pointerId);if(e&&!d.tapPrevented){var f= a.findLCA(e.target,d.target);if(f){var g=b.makeEvent("tap",{x:d.clientX,y:d.clie ntY,detail:d.detail,pointerType:d.pointerType});b.dispatchEvent(g,f)}}c.delete(d .pointerId)},pointercancel:function(a){c.delete(a.pointerId)},keyup:function(a){ var c=a.keyCode;if(32===c){var d=a.target;d instanceof HTMLInputElement||d insta nceof HTMLTextAreaElement||b.dispatchEvent(b.makeEvent("tap",{x:0,y:0,detail:0,p ointerType:"unavailable"}),d)}},preventTap:function(a){c.delete(a)}};b.registerR ecognizer("tap",d)}(window.PointerGestures),function(){"use strict";function a(a ){for(;a.parentNode;)a=a.parentNode;return"function"==typeof a.getElementById?a: null}function b(a,b,c,d){this.closed=!1,this.node=a,this.property=b,this.model=c ,this.path=Path.get(d),(this.model instanceof PathObserver||this.model instanceo f CompoundPathObserver)&&this.path===l?(this.observer=this.model,this.observer.t arget=this,this.observer.callback=this.valueChanged):this.observer=new PathObser ver(this.model,this.path,this.valueChanged,this),this.valueChanged(this.value)}f unction c(a,c,d,e){this.conditional="?"==c[c.length-1],this.conditional&&(a.remo veAttribute(c),c=c.slice(0,-1)),b.call(this,a,c,d,e)}function d(a){switch(a.type ){case"checkbox":return m;
33 case"radio":case"select-multiple":case"select-one":return"change";default:return "input"}}function e(a,c,e,f){b.call(this,a,c,e,f),this.eventType=d(this.node),th is.boundNodeValueChanged=this.nodeValueChanged.bind(this),this.node.addEventList ener(this.eventType,this.boundNodeValueChanged,!0)}function f(b){if(b.form)retur n j(b.form.elements,function(a){return a!=b&&"INPUT"==a.tagName&&"radio"==a.type &&a.name==b.name});var c=a(b);if(!c)return[];var d=c.querySelectorAll('input[typ e="radio"][name="'+b.name+'"]');return j(d,function(a){return a!=b&&!a.form})}fu nction g(a,b,c){e.call(this,a,"checked",b,c)}function h(a,b,c){e.call(this,a,"va lue",b,c)}function i(a,b,c,d){e.call(this,a,b,c,d)}var j=Array.prototype.filter. call.bind(Array.prototype.filter),k="__proto__"in{}?function(a){return a}:functi on(a){var b=a.__proto__;if(!b)return a;var c=Object.create(b);return Object.getO wnPropertyNames(a).forEach(function(b){Object.defineProperty(c,b,Object.getOwnPr opertyDescriptor(a,b))}),c};"function"!=typeof document.contains&&(Document.prot otype.contains=function(a){return a===this||a.parentNode===this?!0:this.document Element.contains(a)}),Node.prototype.bind=function(a,b,c){console.error("Unhandl ed binding to Node: ",this,a,b,c)},Node.prototype.unbind=function(a){this.bindin gs||(this.bindings={});var b=this.bindings[a];b&&("function"==typeof b.close&&b. close(),this.bindings[a]=void 0)},Node.prototype.unbindAll=function(){if(this.bi ndings){for(var a=Object.keys(this.bindings),b=0;b<a.length;b++){var c=this.bind ings[a[b]];c&&c.close()}this.bindings={}}};var l=Path.get("value");b.prototype={ valueChanged:function(a){this.node[this.property]=this.sanitizeBoundValue(a)},sa nitizeBoundValue:function(a){return void 0==a?"":String(a)},close:function(){thi s.closed||(this.observer.close(),this.observer=void 0,this.node=void 0,this.mode l=void 0,this.closed=!0)},get value(){return this.observer.value},set value(a){t his.observer.setValue(a)},reset:function(){this.observer.reset()}},Text.prototyp e.bind=function(a,c,d){return"textContent"!==a?Node.prototype.bind.call(this,a,c ,d):(this.unbind(a),this.bindings[a]=new b(this,"data",c,d))},c.prototype=k({__p roto__:b.prototype,valueChanged:function(a){return this.conditional?(a?this.node .setAttribute(this.property,""):this.node.removeAttribute(this.property),void 0) :(this.node.setAttribute(this.property,this.sanitizeBoundValue(a)),void 0)}}),El ement.prototype.bind=function(a,b,d){return this.unbind(a),this.bindings[a]=new c(this,a,b,d)};var m;!function(){var a=document.createElement("div"),b=a.appendC hild(document.createElement("input"));b.setAttribute("type","checkbox");var c,d= 0;b.addEventListener("click",function(){d++,c=c||"click"}),b.addEventListener("c hange",function(){d++,c=c||"change"});var e=document.createEvent("MouseEvent");e .initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),b.dispatchEve nt(e),m=1==d?"change":c}(),e.prototype=k({__proto__:b.prototype,nodeValueChanged :function(){this.value=this.node[this.property],this.reset(),this.postUpdateBind ing(),Platform.performMicrotaskCheckpoint()},postUpdateBinding:function(){},clos e:function(){this.closed||(this.node.removeEventListener(this.eventType,this.bou ndNodeValueChanged,!0),b.prototype.close.call(this))}}),g.prototype=k({__proto__ :e.prototype,sanitizeBoundValue:function(a){return Boolean(a)},postUpdateBinding :function(){"INPUT"===this.node.tagName&&"radio"===this.node.type&&f(this.node). forEach(function(a){var b=a.bindings.checked;b&&(b.value=!1)})}}),HTMLInputEleme nt.prototype.bind=function(a,b,c){return"value"!==a&&"checked"!==a?HTMLElement.p rototype.bind.call(this,a,b,c):(this.unbind(a),this.removeAttribute(a),this.bind ings[a]="value"===a?new e(this,"value",b,c):new g(this,b,c))},HTMLTextAreaElemen t.prototype.bind=function(a,b,c){return"value"!==a?HTMLElement.prototype.bind.ca ll(this,a,b,c):(this.unbind(a),this.removeAttribute(a),this.bindings[a]=new e(th is,a,b,c))},h.prototype=k({__proto__:e.prototype,valueChanged:function(a){var b, c,d=this.node.parentNode instanceof HTMLSelectElement?this.node.parentNode:void 0;d&&d.bindings&&d.bindings.value instanceof i&&(b=d.bindings.value,c=d.value),e .prototype.valueChanged.call(this,a),b&&!b.closed&&d.value!==c&&b.nodeValueChang ed()}}),HTMLOptionElement.prototype.bind=function(a,b,c){return"value"!==a?HTMLE lement.prototype.bind.call(this,a,b,c):(this.unbind(a),this.removeAttribute(a),t his.bindings[a]=new h(this,b,c))},i.prototype=k({__proto__:e.prototype,valueChan ged:function(a){function b(){d.node[d.property]=a,d.node[d.property]!=a&&c--&&n( b)}if(this.node[this.property]=a,this.node[this.property]!=a){var c=2,d=this;n(b )}}}),HTMLSelectElement.prototype.bind=function(a,b,c){return"selectedindex"===a &&(a="selectedIndex"),"selectedIndex"!==a&&"value"!==a?HTMLElement.prototype.bin d.call(this,a,b,c):(this.unbind(a),this.removeAttribute(a),this.bindings[a]=new i(this,a,b,c))};var n=function(){function a(a){this.nextRunner=a,this.value=!1,t his.lastValue=this.value,this.scheduled=[],this.scheduledIds=[],this.running=!1, this.observer=new PathObserver(this,"value",this.run,this)}function b(a){var b=a [e];a[e]||(b=d++,a[e]=b),c.schedule(a,b)}a.prototype={schedule:function(a,b){if( !this.scheduledIds[b]){if(this.running)return this.nextRunner.schedule(a,b);this .scheduledIds[b]=!0,this.scheduled.push(a),this.lastValue===this.value&&(this.va lue=!this.value)}},run:function(){this.running=!0;for(var a=0;a<this.scheduled.l ength;a++){var b=this.scheduled[a],c=b[e];this.scheduledIds[c]=!1,"function"==ty peof b?b():b.resolve()}this.scheduled=[],this.scheduledIds=[],this.lastValue=thi s.value,this.running=!1}};var c=new a(new a),d=1,e="__scheduledId__";return b}() }(this),function(a){"use strict";function b(a){if(!a)throw new Error("Assertion failed")}function c(a){for(;a.parentNode;)a=a.parentNode;return"function"==typeo f a.getElementById?a:null}function d(a){return H[a.tagName]&&a.hasAttribute("tem plate")}function e(a){return"TEMPLATE"==a.tagName||d(a)}function f(a){return I&& "TEMPLATE"==a.tagName}function g(a,b){var c=a.querySelectorAll(J);e(a)&&b(a),C(c ,b)}function h(a){function b(a){HTMLTemplateElement.decorate(a)||h(a.content)}g( a,b)}function i(a,b){Object.getOwnPropertyNames(b).forEach(function(c){Object.de fineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))})}function j(a){var b=a.o wnerDocument;if(!b.defaultView)return b;var c=b.templateContentsOwner_;if(!c){fo r(c=b.implementation.createHTMLDocument("");c.lastChild;)c.removeChild(c.lastChi ld);b.templateContentsOwner_=c}return c}function k(a){if(!a.stagingDocument_){va r b=a.ownerDocument;b.stagingDocument_||(b.stagingDocument_=b.implementation.cre ateHTMLDocument(""),b.stagingDocument_.stagingDocument_=b.stagingDocument_),a.st agingDocument_=b.stagingDocument_}return a.stagingDocument_}function l(a){var b= a.ownerDocument.createElement("template");a.parentNode.insertBefore(b,a);for(var c=a.attributes,d=c.length;d-->0;){var e=c[d];G[e.name]&&("template"!==e.name&&b .setAttribute(e.name,e.value),a.removeAttribute(e.name))}return b}function m(a,b ,c){var d=a.content;if(c)return d.appendChild(b),void 0;for(var e;e=b.firstChild ;)d.appendChild(e)}function n(a){"TEMPLATE"===a.tagName?I||(L?a.__proto__=HTMLTe mplateElement.prototype:i(a,HTMLTemplateElement.prototype)):(i(a,HTMLTemplateEle ment.prototype),Object.defineProperty(a,"content",N))}function o(a){a.setModelFn _||(a.setModelFn_=function(){v(a,a.model,a.prepareBindingFn_)}),K(a.setModelFn_) }function p(a,b,c,d){if(a&&a.length){for(var e,f=a.length,g=0,h=0,i=0;f>h;){if(g =a.indexOf("{{",h),i=0>g?-1:a.indexOf("}}",g+2),0>i){if(!e)return;e.push(a.slice (h));break}e=e||[],e.push(a.slice(h,g));var j=a.slice(g+2,i).trim();e.push(Path. get(j));var k=d&&d(j,b,c);e.push(k),h=i+2}return h===f&&e.push(""),e.hasOnePath= 4===e.length,e.isSimplePath=e.hasOnePath&&""==e[0]&&""==e[3],e.combinator=functi on(a){for(var b=e[0],c=1;c<e.length;c+=3){var d=e.hasOnePath?a:a[(c-1)/3];void 0 !==d&&(b+=d),b+=e[c+2]}return b},e}}function q(a,b,c,d,e){var f,g;b.hasOnePath|| (f=new CompoundPathObserver(void 0,void 0,b.combinator)),b.isSimplePath||(g=O);f or(var h=1;h<b.length;h+=3){var i=(b[h],d),j=b[h],k=b[h+1],l=k&&k(d,c);void 0!== l&&(i=l,j=O),b.hasOnePath?b.isSimplePath?(f=i,g=j):f=new PathObserver(i,j,void 0 ,void 0,b.combinator):f.addPath(i,j)}b.hasOnePath||f.start();var m=c.bind(a,f,g) ;e&&e.push(m)}function r(a,b,c,d){for(var e=0;e<a.length;e+=2)q(a[e],a[e+1],b,c, d)}function s(a,c){b(a);for(var d,f=e(a),g=!1,h=!1,i=0;i<a.attributes.length;i++ ){for(var j=a.attributes[i],k=j.name,l=j.value;"_"===k[0];)k=k.substring(1);f&&( k===F?(g=!0,l=l||"{{}}"):(k===D||k===E)&&(h=!0,l=l||"{{}}"));var m=p(l,k,a,c);m& &(d=d||[],d.push(k,m))}return g&&!h&&(d=d||[],d.push(D,p("{{}}",D,a,c))),d}funct ion t(a,b){if(a.nodeType===Node.ELEMENT_NODE)return s(a,b);if(a.nodeType===Node. TEXT_NODE){var c=p(a.data,"textContent",a,b);if(c)return["textContent",c]}}funct ion u(a,b,c,d,e){if(b&&(b.templateRef&&(HTMLTemplateElement.decorate(a,b.templat eRef),d&&a.setBindingDelegate_(d)),b.length&&r(b,a,c,e),b.children))for(var f=0, g=a.firstChild;g;g=g.nextSibling)u(g,b.children[f++],c,d,e)}function v(a,c,d){b( a);var e=t(a,d);e&&r(e,a,c);for(var f=a.firstChild;f;f=f.nextSibling)v(f,c,d)}fu nction w(a,b){var c=b.importNode(a,!1);if(a.isTemplate_)return c;for(var d=a.fir stChild;d;d=d.nextSibling)c.appendChild(w(d,b));return c}function x(a,b){var c=t (a,b);e(a)&&(a.isTemplate_=!0,c=c||[],c.templateRef=a);for(var d=a.firstChild,f= 0;d;d=d.nextSibling,f++){var g=x(d,b);g&&(c=c||[],c.children=c.children||{},c.ch ildren[f]=g)}return c}function y(a,b,c){this.firstNode=a,this.lastNode=b,this.mo del=c}function z(a,b){if(a.firstChild)for(var c=new y(a.firstChild,a.lastChild,b ),d=c.firstNode;d;)d.templateInstance_=c,d=d.nextSibling}function A(a){this.clos ed=!1,this.templateElement_=a,this.terminators=[],this.iteratedValue=void 0,this .arrayObserver=void 0,this.depsChanged=!1,this.hasRepeat=!1,this.repeatModel=voi d 0,this.repeatPath=void 0,this.hasBind=!1,this.bindModel=void 0,this.bindPath=v oid 0,this.hasIf=!1,this.ifModel=void 0,this.ifPath=void 0}var B,C=Array.prototy pe.forEach.call.bind(Array.prototype.forEach);a.Map&&"function"==typeof a.Map.pr ototype.forEach?B=a.Map:(B=function(){this.keys=[],this.values=[]},B.prototype={ set:function(a,b){var c=this.keys.indexOf(a);0>c?(this.keys.push(a),this.values. push(b)):this.values[c]=b},get:function(a){var b=this.keys.indexOf(a);if(!(0>b)) return this.values[b]},"delete":function(a){var b=this.keys.indexOf(a);return 0> b?!1:(this.keys.splice(b,1),this.values.splice(b,1),!0)},forEach:function(a,b){f or(var c=0;c<this.keys.length;c++)a.call(b||this,this.values[c],this.keys[c],thi s)}});"function"!=typeof document.contains&&(Document.prototype.contains=functio n(a){return a===this||a.parentNode===this?!0:this.documentElement.contains(a)}); var D="bind",E="repeat",F="if",G={template:!0,repeat:!0,bind:!0,ref:!0},H={THEAD :!0,TBODY:!0,TFOOT:!0,TH:!0,TR:!0,TD:!0,COLGROUP:!0,COL:!0,CAPTION:!0,OPTION:!0, OPTGROUP:!0},I="undefined"!=typeof HTMLTemplateElement,J="template, "+Object.key s(H).map(function(a){return a.toLowerCase()+"[template]"}).join(", "),K=function (){function a(a){this.nextRunner=a,this.value=!1,this.lastValue=this.value,this. scheduled=[],this.scheduledIds=[],this.running=!1,this.observer=new PathObserver (this,"value",this.run,this)}function b(a){var b=a[e];a[e]||(b=d++,a[e]=b),c.sch edule(a,b)}a.prototype={schedule:function(a,b){if(!this.scheduledIds[b]){if(this .running)return this.nextRunner.schedule(a,b);this.scheduledIds[b]=!0,this.sched uled.push(a),this.lastValue===this.value&&(this.value=!this.value)}},run:functio n(){this.running=!0;for(var a=0;a<this.scheduled.length;a++){var b=this.schedule d[a],c=b[e];this.scheduledIds[c]=!1,"function"==typeof b?b():b.resolve()}this.sc heduled=[],this.scheduledIds=[],this.lastValue=this.value,this.running=!1}};var c=new a(new a),d=1,e="__scheduledId__";return b}();document.addEventListener("DO MContentLoaded",function(){h(document),Platform.performMicrotaskCheckpoint()},!1 ),I||(a.HTMLTemplateElement=function(){throw TypeError("Illegal constructor")}); var L="__proto__"in{};HTMLTemplateElement.decorate=function(a,c){if(a.templateIs Decorated_)return!1;var e=a;e.templateIsDecorated_=!0;var g=f(e),i=g,k=!g,o=!1;i f(!g&&d(e)&&(b(!c),e=l(a),e.templateIsDecorated_=!0,g=f(e),o=!0),!g){n(e);var p= j(e);e.content_=p.createDocumentFragment()}return c?e.instanceRef_=c:k?m(e,a,o): i&&h(e.content),!0},HTMLTemplateElement.bootstrap=h;var M=a.HTMLUnknownElement|| HTMLElement,N={get:function(){return this.content_},enumerable:!0,configurable:! 0};I||(HTMLTemplateElement.prototype=Object.create(M.prototype),Object.definePro perty(HTMLTemplateElement.prototype,"content",N)),i(HTMLTemplateElement.prototyp e,{bind:function(a,b,c){return this.iterator_||(this.iterator_=new A(this)),this .bindings=this.bindings||{},"bind"===a?(this.iterator_.hasBind=!0,this.iterator_ .bindModel=b,this.iterator_.bindPath=c,this.iterator_.depsChanging||(this.iterat or_.depsChanging=!0,K(this.iterator_)),this.bindings.bind=this.iterator_):"repea t"===a?(this.iterator_.hasRepeat=!0,this.iterator_.repeatModel=b,this.iterator_. repeatPath=c,this.iterator_.depsChanging||(this.iterator_.depsChanging=!0,K(this .iterator_)),this.bindings.repeat=this.iterator_):"if"===a?(this.iterator_.hasIf =!0,this.iterator_.ifModel=b,this.iterator_.ifPath=c,this.iterator_.depsChanging ||(this.iterator_.depsChanging=!0,K(this.iterator_)),this.bindings.if=this.itera tor_):HTMLElement.prototype.bind.call(this,a,b,c)},unbind:function(a){if("bind"= ==a){if(!this.iterator_)return;return this.iterator_.hasBind=!1,this.iterator_.b indModel=void 0,this.iterator_.bindPath=void 0,this.iterator_.depsChanging||(thi s.iterator_.depsChanging=!0,K(this.iterator_)),this.bindings.bind=void 0}if("rep eat"===a){if(!this.iterator_)return;return this.iterator_.hasRepeat=!1,this.iter ator_.repeatModel=void 0,this.iterator_.repeatPath=void 0,this.iterator_.depsCha nging||(this.iterator_.depsChanging=!0,K(this.iterator_)),this.bindings.repeat=v oid 0}if("if"===a){if(!this.iterator_)return;return this.iterator_.hasIf=!1,this .iterator_.ifModel=void 0,this.iterator_.ifPath=void 0,this.iterator_.depsChangi ng||(this.iterator_.depsChanging=!0,K(this.iterator_)),this.bindings.if=void 0}r eturn HTMLElement.prototype.unbind.call(this,a)},createInstance:function(a,b){va r c=this.ref.content,d=c.bindingMap_;d||(d=x(c,this.prepareBindingFn_)||[],c.bin dingMap_=d);var e=k(this),f=w(c,e);return u(f,d,a,this.bindingDelegate_,b),z(f,a ),f},get model(){return this.model_},set model(a){this.model_=a,o(this)},get bin dingDelegate(){return this.bindingDelegate_},setBindingDelegate_:function(a){fun ction b(b){var c=a&&a[b];if("function"==typeof c)return function(){return c.appl y(a,arguments)}}this.bindingDelegate_=a,this.prepareBindingFn_=b("prepareBinding "),this.prepareInstanceModelFn_=b("prepareInstanceModel"),this.prepareInstancePo sitionChangedFn_=b("prepareInstancePositionChanged")},set bindingDelegate(a){thi s.setBindingDelegate_(a),o(this)},get ref(){var a,b=this.getAttribute("ref");if( b){var d=c(this);d&&(a=d.getElementById(b))}if(a||(a=this.instanceRef_),!a)retur n this;var e=a.ref;return e?e:a}});var O=Path.get("value");Object.defineProperty (Node.prototype,"templateInstance",{get:function(){var a=this.templateInstance_; return a?a:this.parentNode?this.parentNode.templateInstance:void 0}}),A.prototyp e={resolve:function(){if(this.depsChanging=!1,this.valueObserver&&(this.valueObs erver.close(),this.valueObserver=void 0),!this.hasRepeat&&!this.hasBind)return t his.valueChanged(),void 0;var a=this.hasRepeat===!0,b=a?this.repeatModel:this.bi ndModel,c=a?this.repeatPath:this.bindPath;if(this.hasIf){var d=function(b){var c =b[0],d=b[1];return d?a?c:[c]:void 0};this.valueObserver=new CompoundPathObserve r(this.valueChanged,this,d),this.valueObserver.addPath(b,c),this.valueObserver.a ddPath(this.ifModel,this.ifPath),this.valueObserver.start()}else{var d=this.hasR epeat?void 0:function(a){return[a]};this.valueObserver=new PathObserver(b,c,this .valueChanged,this,d)}this.valueChanged(this.valueObserver.value)},valueChanged: function(a){Array.isArray(a)||(a=void 0);var b=this.iteratedValue;this.unobserve (),this.iteratedValue=a,this.iteratedValue&&(this.arrayObserver=new ArrayObserve r(this.iteratedValue,this.handleSplices,this));var c=ArrayObserver.calculateSpli ces(this.iteratedValue||[],b||[]);c.length&&this.handleSplices(c)},getTerminator At:function(a){if(-1==a)return this.templateElement_;var b=this.terminators[2*a] ;if(b.nodeType!==Node.ELEMENT_NODE||this.templateElement_===b)return b;var c=b.i terator_;return c?c.getTerminatorAt(c.terminators.length/2-1):b},insertInstanceA t:function(a,b,c,d){var e=this.getTerminatorAt(a-1),f=e;b?f=b.lastChild||f:c&&(f =c[c.length-1]||f),this.terminators.splice(2*a,0,f,d);var g=this.templateElement _.parentNode,h=e.nextSibling;if(b)g.insertBefore(b,h);else if(c)for(var i=0;i<c. length;i++)g.insertBefore(c[i],h)},extractInstanceAt:function(a){var b=[],c=this .getTerminatorAt(a-1),d=this.getTerminatorAt(a);b.bound=this.terminators[2*a+1], this.terminators.splice(2*a,2);for(var e=this.templateElement_.parentNode;d!==c; ){var f=c.nextSibling;f==d&&(d=c),e.removeChild(f),b.push(f)}return b},getDelega teFn:function(a){return a=a&&a(this.templateElement_),"function"==typeof a?a:nul l},handleSplices:function(a){if(!this.closed){var b=this.templateElement_;if(!b. parentNode||!b.ownerDocument.defaultView)return this.close(),void 0;void 0===thi s.instanceModelFn_&&(this.instanceModelFn_=this.getDelegateFn(b.prepareInstanceM odelFn_)),void 0===this.instancePositionChangedFn_&&(this.instancePositionChange dFn_=this.getDelegateFn(b.prepareInstancePositionChangedFn_));var c=new B,d=0;a. forEach(function(a){a.removed.forEach(function(b){var e=this.extractInstanceAt(a .index+d);c.set(b,e)},this),d-=a.addedCount},this),a.forEach(function(a){for(var b=a.index;b<a.index+a.addedCount;b++){var d,e=this.iteratedValue[b],f=void 0,g= c.get(e);g?(c.delete(e),d=g.bound):(d=[],this.instanceModelFn_&&(e=this.instance ModelFn_(e)),void 0!==e&&(f=this.templateElement_.createInstance(e,d))),this.ins ertInstanceAt(b,f,g,d)}},this),c.forEach(function(a){this.closeInstanceBindings( a.bound)},this),this.instancePositionChangedFn_&&this.reportInstancesMoved(a)}}, reportInstanceMoved:function(a){var b=this.getTerminatorAt(a-1),c=this.getTermin atorAt(a);if(b!==c){var d=b.nextSibling.templateInstance;this.instancePositionCh angedFn_(d,a)}},reportInstancesMoved:function(a){for(var b=0,c=0,d=0;d<a.length; d++){var e=a[d];if(0!=c)for(;b<e.index;)this.reportInstanceMoved(b),b++;else b=e .index;for(;b<e.index+e.addedCount;)this.reportInstanceMoved(b),b++;c+=e.addedCo unt-e.removed.length}if(0!=c)for(var f=this.terminators.length/2;f>b;)this.repor tInstanceMoved(b),b++},closeInstanceBindings:function(a){for(var b=0;b<a.length; b++)a[b].close()},unobserve:function(){this.arrayObserver&&(this.arrayObserver.c lose(),this.arrayObserver=void 0)},close:function(){if(!this.closed){this.unobse rve();for(var a=1;a<this.terminators.length;a+=2)this.closeInstanceBindings(this .terminators[a]);this.terminators.length=0,this.valueObserver&&this.valueObserve r.close(),this.valueObserver=void 0,this.templateElement_.iterator_=void 0,this. closed=!0}}},HTMLTemplateElement.forAllTemplatesFrom_=g}(this),function(a){"use strict";function b(a,b){if(!a)throw new Error("ASSERT: "+b)}function c(a){return a>=48&&57>=a}function d(a){return 32===a||9===a||11===a||12===a||160===a||a>=57 60&&" ᠎              ".indexOf(String.fromCharCode(a))>0}function e(a){return 1 0===a||13===a||8232===a||8233===a}function f(a){return 36===a||95===a||a>=65&&90 >=a||a>=97&&122>=a}function g(a){return 36===a||95===a||a>=65&&90>=a||a>=97&&122 >=a||a>=48&&57>=a}function h(a){return"this"===a}function i(){for(;Y>X&&d(W.char CodeAt(X));)++X}function j(){var a,b;for(a=X++;Y>X&&(b=W.charCodeAt(X),g(b));)++ X;return W.slice(a,X)}function k(){var a,b,c;return a=X,b=j(),c=1===b.length?S.I dentifier:h(b)?S.Keyword:"null"===b?S.NullLiteral:"true"===b||"false"===b?S.Bool eanLiteral:S.Identifier,{type:c,value:b,range:[a,X]}}function l(){var a,b,c=X,d= W.charCodeAt(X),e=W[X];switch(d){case 46:case 40:case 41:case 59:case 44:case 12 3:case 125:case 91:case 93:case 58:case 63:return++X,{type:S.Punctuator,value:St ring.fromCharCode(d),range:[c,X]};default:if(a=W.charCodeAt(X+1),61===a)switch(d ){case 37:case 38:case 42:case 43:case 45:case 47:case 60:case 62:case 124:retur n X+=2,{type:S.Punctuator,value:String.fromCharCode(d)+String.fromCharCode(a),ra nge:[c,X]};case 33:case 61:return X+=2,61===W.charCodeAt(X)&&++X,{type:S.Punctua tor,value:W.slice(c,X),range:[c,X]}}}return b=W[X+1],e===b&&"&|".indexOf(e)>=0?( X+=2,{type:S.Punctuator,value:e+b,range:[c,X]}):"<>=!+-*%&|^/".indexOf(e)>=0?(++ X,{type:S.Punctuator,value:e,range:[c,X]}):(s({},V.UnexpectedToken,"ILLEGAL"),vo id 0)}function m(){var a,d,e;if(e=W[X],b(c(e.charCodeAt(0))||"."===e,"Numeric li teral must start with a decimal digit or a decimal point"),d=X,a="","."!==e){for (a=W[X++],e=W[X],"0"===a&&e&&c(e.charCodeAt(0))&&s({},V.UnexpectedToken,"ILLEGAL ");c(W.charCodeAt(X));)a+=W[X++];e=W[X]}if("."===e){for(a+=W[X++];c(W.charCodeAt (X));)a+=W[X++];e=W[X]}if("e"===e||"E"===e)if(a+=W[X++],e=W[X],("+"===e||"-"===e )&&(a+=W[X++]),c(W.charCodeAt(X)))for(;c(W.charCodeAt(X));)a+=W[X++];else s({},V .UnexpectedToken,"ILLEGAL");return f(W.charCodeAt(X))&&s({},V.UnexpectedToken,"I LLEGAL"),{type:S.NumericLiteral,value:parseFloat(a),range:[d,X]}}function n(){va r a,c,d,f="",g=!1;for(a=W[X],b("'"===a||'"'===a,"String literal must starts with a quote"),c=X,++X;Y>X;){if(d=W[X++],d===a){a="";break}if("\\"===d)if(d=W[X++],d &&e(d.charCodeAt(0)))"\r"===d&&"\n"===W[X]&&++X;else switch(d){case"n":f+="\n";b reak;case"r":f+="\r";break;case"t":f+=" ";break;case"b":f+="\b";break;case"f":f+ ="\f";break;case"v":f+=" ";break;default:f+=d}else{if(e(d.charCodeAt(0)))break;f +=d}}return""!==a&&s({},V.UnexpectedToken,"ILLEGAL"),{type:S.StringLiteral,value :f,octal:g,range:[c,X]}}function o(a){return a.type===S.Identifier||a.type===S.K eyword||a.type===S.BooleanLiteral||a.type===S.NullLiteral}function p(){var a;ret urn i(),X>=Y?{type:S.EOF,range:[X,X]}:(a=W.charCodeAt(X),40===a||41===a||58===a? l():39===a||34===a?n():f(a)?k():46===a?c(W.charCodeAt(X+1))?m():l():c(a)?m():l() )}function q(){var a;return a=$,X=a.range[1],$=p(),X=a.range[1],a}function r(){v ar a;a=X,$=p(),X=a}function s(a,c){var d,e=Array.prototype.slice.call(arguments, 2),f=c.replace(/%(\d)/g,function(a,c){return b(c<e.length,"Message reference mus t be in range"),e[c]});throw d=new Error(f),d.index=X,d.description=f,d}function t(a){s(a,V.UnexpectedToken,a.value)}function u(a){var b=q();(b.type!==S.Punctua tor||b.value!==a)&&t(b)}function v(a){return $.type===S.Punctuator&&$.value===a} function w(a){return $.type===S.Keyword&&$.value===a}function x(){var a=[];for(u ("[");!v("]");)v(",")?(q(),a.push(null)):(a.push(bb()),v("]")||u(","));return u( "]"),Z.createArrayExpression(a)}function y(){var a;return i(),a=q(),a.type===S.S tringLiteral||a.type===S.NumericLiteral?Z.createLiteral(a):Z.createIdentifier(a. value)}function z(){var a,b;return a=$,i(),(a.type===S.EOF||a.type===S.Punctuato r)&&t(a),b=y(),u(":"),Z.createProperty("init",b,bb())}function A(){var a=[];for( u("{");!v("}");)a.push(z()),v("}")||u(",");return u("}"),Z.createObjectExpressio n(a)}function B(){var a;return u("("),a=bb(),u(")"),a}function C(){var a,b,c;ret urn v("(")?B():(a=$.type,a===S.Identifier?c=Z.createIdentifier(q().value):a===S. StringLiteral||a===S.NumericLiteral?c=Z.createLiteral(q()):a===S.Keyword?w("this ")&&(q(),c=Z.createThisExpression()):a===S.BooleanLiteral?(b=q(),b.value="true"= ==b.value,c=Z.createLiteral(b)):a===S.NullLiteral?(b=q(),b.value=null,c=Z.create Literal(b)):v("[")?c=x():v("{")&&(c=A()),c?c:(t(q()),void 0))}function D(){var a =[];if(u("("),!v(")"))for(;Y>X&&(a.push(bb()),!v(")"));)u(",");return u(")"),a}f unction E(){var a;return a=q(),o(a)||t(a),Z.createIdentifier(a.value)}function F (){return u("."),E()}function G(){var a;return u("["),a=bb(),u("]"),a}function H (){var a,b;for(a=C();v(".")||v("[");)v("[")?(b=G(),a=Z.createMemberExpression("[ ",a,b)):(b=F(),a=Z.createMemberExpression(".",a,b));return a}function I(){var a, b;return $.type!==S.Punctuator&&$.type!==S.Keyword?b=ab():v("+")||v("-")||v("!") ?(a=q(),b=I(),b=Z.createUnaryExpression(a.value,b)):w("delete")||w("void")||w("t ypeof")?s({},V.UnexpectedToken):b=ab(),b}function J(a){var b=0;if(a.type!==S.Pun ctuator&&a.type!==S.Keyword)return 0;switch(a.value){case"||":b=1;break;case"&&" :b=2;break;case"==":case"!=":case"===":case"!==":b=6;break;case"<":case">":case" <=":case">=":case"instanceof":b=7;break;case"in":b=7;break;case"+":case"-":b=9;b reak;case"*":case"/":case"%":b=11}return b}function K(){var a,b,c,d,e,f,g,h;if(g =I(),b=$,c=J(b),0===c)return g;for(b.prec=c,q(),e=I(),d=[g,b,e];(c=J($))>0;){for (;d.length>2&&c<=d[d.length-2].prec;)e=d.pop(),f=d.pop().value,g=d.pop(),a=Z.cre ateBinaryExpression(f,g,e),d.push(a);b=q(),b.prec=c,d.push(b),a=I(),d.push(a)}fo r(h=d.length-1,a=d[h];h>1;)a=Z.createBinaryExpression(d[h-1].value,d[h-2],a),h-= 2;return a}function L(){var a,b,c;return a=K(),v("?")&&(q(),b=L(),u(":"),c=L(),a =Z.createConditionalExpression(a,b,c)),a}function M(){var a,b;return a=q(),a.typ e!==S.Identifier&&t(a),b=v("(")?D():[],Z.createFilter(a.value,b)}function N(){fo r(;v("|");)q(),M()}function O(){i(),r();var a=bb();a&&(","===$.value||"in"==$.va lue&&a.type===U.Identifier?Q(a):(N(),"as"===$.value?P(a):Z.createTopLevel(a))),$ .type!==S.EOF&&t($)}function P(a){q();var b=q().value;Z.createAsExpression(a,b)} function Q(a){var b;","===$.value&&(q(),$.type!==S.Identifier&&t($),b=q().value) ,q();var c=bb();N(),Z.createInExpression(a.name,b,c)}function R(a,b){return Z=b, W=a,X=0,Y=W.length,$=null,_={labelSet:{}},O()}var S,T,U,V,W,X,Y,Z,$,_;S={Boolean Literal:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator :7,StringLiteral:8},T={},T[S.BooleanLiteral]="Boolean",T[S.EOF]="<end>",T[S.Iden tifier]="Identifier",T[S.Keyword]="Keyword",T[S.NullLiteral]="Null",T[S.NumericL iteral]="Numeric",T[S.Punctuator]="Punctuator",T[S.StringLiteral]="String",U={Ar rayExpression:"ArrayExpression",BinaryExpression:"BinaryExpression",CallExpressi on:"CallExpression",ConditionalExpression:"ConditionalExpression",EmptyStatement :"EmptyStatement",ExpressionStatement:"ExpressionStatement",Identifier:"Identifi er",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"Log icalExpression",MemberExpression:"MemberExpression",ObjectExpression:"ObjectExpr ession",Program:"Program",Property:"Property",ThisExpression:"ThisExpression",Un aryExpression:"UnaryExpression"},V={UnexpectedToken:"Unexpected token %0",Unknow nLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared"} ;var ab=H,bb=L;a.esprima={parse:R}}(this),function(a){"use strict";function b(a, b,d,e){var f;try{if(f=c(a),f.scopeIdent&&(d.nodeType!==Node.ELEMENT_NODE||"TEMPL ATE"!==d.tagName||"bind"!==b&&"repeat"!==b))throw Error("as and in can only be u sed within <template bind/repeat>")}catch(g){return console.error("Invalid expre ssion syntax: "+a,g),void 0}return function(a,b){var c=f.getBinding(a,e);return f.scopeIdent&&c&&(b.polymerExpressionScopeIdent_=f.scopeIdent,f.indexIdent&&(b.p olymerExpressionIndexIdent_=f.indexIdent)),c}}function c(a){var b=n[a];if(!b){va r c=new j;esprima.parse(a,c),b=new k(c),n[a]=b}return b}function d(a){this.value =a}function e(a,b,c){this.delegate=a,this.name=b,this.last=c}function f(a,b){thi s.object=a,this.property=b}function g(a,b){this.name=a,this.args=[];for(var c=0; c<b.length;c++)this.args[c]=i(b[c])}function h(){throw Error("Not Implemented")} function i(a){return"function"==typeof a?a:a.valueFn()}function j(){this.express ion=null,this.filters=[],this.deps={},this.depsList=[],this.currentPath=void 0,t his.scopeIdent=void 0,this.indexIdent=void 0}function k(a){if(this.scopeIdent=a. scopeIdent,this.indexIdent=a.indexIdent,!a.expression)throw Error("No expression found.");this.expression=a.expression,i(this.expression),this.paths=a.depsList, this.filters=a.filters}function l(a){return String(a).replace(/[A-Z]/g,function( a){return"-"+a.toLowerCase()})}function m(){}var n=Object.create(null);d.prototy pe={valueFn:function(){var a=this.value;return function(){return a}}},e.prototyp e={getPath:function(){return this.path_||(this.path_=this.last?Path.get(this.las t.getPath()+"."+this.name):Path.get(this.name)),this.path_},valueFn:function(){i f(!this.valueFn_){var a=this.getPath(),b=this.delegate.deps[a];void 0===b&&(b=th is.delegate.deps[a]=this.delegate.depsList.length,this.delegate.depsList.push(a) );var c=this.delegate.depsList;this.valueFn_=function(a){return 1===c.length?a:a [b]}}return this.valueFn_},setValue:function(a,b){return this.getPath().setValue From(a,b)}},f.prototype={valueFn:function(){var a=this.object,b=this.property;re turn function(c){return a(c)[b(c)]}},setValue:function(a,b,c){a=this.object(c);v ar d=this.property(c);return a[d]=b}},g.prototype={transform:function(a,b,c,d,e) {var f=d[this.name];if(f)e=void 0;else if(f=e[this.name],!f)return console.error ("Cannot find filter: "+this.name),void 0;if(c?f=f.toModel:"function"==typeof f. toDOM&&(f=f.toDOM),"function"!=typeof f)return console.error("No "+(c?"toModel": "toDOM")+" found on"+this.name),void 0;for(var g=[a],h=0;h<this.args.length;h++) g[h+1]=i(this.args[h])(b);return f.apply(e,g)}};var o={"+":function(a){return+a} ,"-":function(a){return-a},"!":function(a){return!a}},p={"+":function(a,b){retur n a+b},"-":function(a,b){return a-b},"*":function(a,b){return a*b},"/":function( a,b){return a/b},"%":function(a,b){return a%b},"<":function(a,b){return b>a},">" :function(a,b){return a>b},"<=":function(a,b){return b>=a},">=":function(a,b){re turn a>=b},"==":function(a,b){return a==b},"!=":function(a,b){return a!=b},"===" :function(a,b){return a===b},"!==":function(a,b){return a!==b},"&&":function(a,b ){return a&&b},"||":function(a,b){return a||b}};j.prototype={createUnaryExpressi on:function(a,b){if(!o[a])throw Error("Disallowed operator: "+a);return b=i(b),f unction(c){return o[a](b(c))}},createBinaryExpression:function(a,b,c){if(!p[a])t hrow Error("Disallowed operator: "+a);return b=i(b),c=i(c),function(d){return p[ a](b(d),c(d))}},createConditionalExpression:function(a,b,c){return a=i(a),b=i(b) ,c=i(c),function(d){return a(d)?b(d):c(d)}},createIdentifier:function(a){var b=n ew e(this,a);return b.type="Identifier",b},createMemberExpression:function(a,b,c ){if(b instanceof e){if("."==a)return new e(this,c.name,b);if(c instanceof d&&Pa th.get(c.value).valid)return new e(this,c.value,b)}return new f(i(b),i(c))},crea teLiteral:function(a){return new d(a.value)},createArrayExpression:function(a){f or(var b=0;b<a.length;b++)a[b]=i(a[b]);return function(b){for(var c=[],d=0;d<a.l ength;d++)c.push(a[d](b));return c}},createProperty:function(a,b,c){return{key:b instanceof e?b.name:b.value,value:c}},createObjectExpression:function(a){for(va r b=0;b<a.length;b++)a[b].value=i(a[b].value);return function(b){for(var c={},d= 0;d<a.length;d++)c[a[d].key]=a[d].value(b);return c}},createFilter:function(a,b) {this.filters.push(new g(a,b))},createAsExpression:function(a,b){this.expression =a,this.scopeIdent=b},createInExpression:function(a,b,c){this.expression=c,this. scopeIdent=a,this.indexIdent=b},createTopLevel:function(a){this.expression=a},cr eateThisExpression:h},k.prototype={getBinding:function(a,b){function c(c){return f.getValue(c,b,a)}function d(c){var d;if(1==f.paths.length)d=f.paths[0].getValu eFrom(a);else{d=[];for(var e=0;e<f.paths.length;e++)d[e]=f.paths[e].getValueFrom (a)}f.setValue(a,c,d,b,a)}var e=this.paths;if(!e.length)return{value:this.getVal ue(void 0,b,a)};var f=this;if(1===e.length)return new PathObserver(a,e[0],void 0 ,void 0,c,d);for(var g=new CompoundPathObserver(void 0,void 0,c,d),h=0;h<e.lengt h;h++)g.addPath(a,e[h]);return g.start(),g},getValue:function(a,b,c){for(var d=i (this.expression)(a),e=0;e<this.filters.length;e++)d=this.filters[e].transform(d ,a,!1,b,c);return d},setValue:function(a,b,c,d,e){for(var f=this.filters?this.fi lters.length:0;f-->0;)b=this.filters[f].transform(b,c,!0,d,e);
34 return this.expression.setValue?this.expression.setValue(a,b,c):void 0}},m.proto type={styleObject:function(a){var b=[];for(var c in a)b.push(l(c)+": "+a[c]);ret urn b.join("; ")},tokenList:function(a){var b=[];for(var c in a)a[c]&&b.push(c); return b.join(" ")},prepareInstancePositionChanged:function(a){var b=a.polymerEx pressionIndexIdent_;if(b)return function(a,c){a.model[b]=c}},prepareBinding:func tion(a,c,d){return Path.get(a).valid?void 0:b(a,c,d,this)},prepareInstanceModel: function(a){var b=a.polymerExpressionScopeIdent_;if(b){var c=a.templateInstance? a.templateInstance.model:a.model;return function(a){var d=Object.create(c);retur n d[b]=a,d}}}},a.PolymerExpressions=m}(this),function(a){function b(){e||(e=!0,a .endOfMicrotask(function(){e=!1,logFlags.data&&console.group("Platform.flush()") ,a.performMicrotaskCheckpoint(),logFlags.data&&console.groupEnd()}))}var c=docum ent.createElement("style");c.textContent="template {display: none !important;} / * injected by platform.js */";var d=document.querySelector("head");d.insertBefor e(c,d.firstChild);var e,f=125;if(window.addEventListener("WebComponentsReady",fu nction(){b(),Observer.hasObjectObserve||(a.flushPoll=setInterval(b,f))}),window. CustomElements&&!CustomElements.useNative){var g=Document.prototype.importNode;D ocument.prototype.importNode=function(a,b){var c=g.call(this,a,b);return CustomE lements.upgradeAll(c),c}}a.flush=b}(window.Platform);
35 //# sourceMappingURL=platform.js.map
OLDNEW
« no previous file with comments | « third_party/polymer/platform/build.log ('k') | third_party/polymer/platform/platform.js.map » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698