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

Side by Side Diff: appengine/isolate/ui/build/elements.html

Issue 2991153002: Add stub for new polymer-based Isolate UI (Closed)
Patch Set: Address feedback Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « appengine/isolate/ui/bower.json ('k') | appengine/isolate/ui/build/js/js.js » ('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 <!DOCTYPE html><html><head><meta charset="UTF-8"> </head><body><div hidden="" by -vulcanize=""><script>!function(){function e(){document.body.removeAttribute("un resolved")}window.WebComponents?addEventListener("WebComponentsReady",e):"intera ctive"===document.readyState||"complete"===document.readyState?e():addEventListe ner("DOMContentLoaded",e)}(),window.Polymer={Settings:function(){var e=window.Po lymer||{};if(!e.noUrlSettings)for(var t,r=location.search.slice(1).split("&"),i= 0;i<r.length&&(t=r[i]);i++)t=t.split("="),t[0]&&(e[t[0]]=t[1]||!0);return e.want Shadow="shadow"===e.dom,e.hasShadow=Boolean(Element.prototype.createShadowRoot), e.nativeShadow=e.hasShadow&&!window.ShadowDOMPolyfill,e.useShadow=e.wantShadow&& e.hasShadow,e.hasNativeImports=Boolean("import"in document.createElement("link") ),e.useNativeImports=e.hasNativeImports,e.useNativeCustomElements=!window.Custom Elements||window.CustomElements.useNative,e.useNativeShadow=e.useShadow&&e.nativ eShadow,e.usePolyfillProto=!e.useNativeCustomElements&&!Object.__proto__,e.hasNa tiveCSSProperties=!navigator.userAgent.match("AppleWebKit/601")&&window.CSS&&CSS .supports&&CSS.supports("box-shadow","0 0 0 var(--foo)"),e.useNativeCSSPropertie s=e.hasNativeCSSProperties&&e.lazyRegister&&e.useNativeCSSProperties,e.isIE=navi gator.userAgent.match("Trident"),e}()},function(){var e=window.Polymer;window.Po lymer=function(e){"function"==typeof e&&(e=e.prototype),e||(e={}),e=t(e);var r=e ===e.constructor.prototype?e.constructor:null,i={prototype:e};e.extends&&(i.exte nds=e.extends),Polymer.telemetry._registrate(e);var o=document.registerElement(e .is,i);return r||o};var t=function(e){var t=Polymer.Base;return e.extends&&(t=Po lymer.Base._getExtendedPrototype(e.extends)),e=Polymer.Base.chainObject(e,t),e.r egisterCallback(),e};if(e)for(var r in e)Polymer[r]=e[r];Polymer.Class=function( e){return e.factoryImpl||(e.factoryImpl=function(){}),t(e).constructor}}(),Polym er.telemetry={registrations:[],_regLog:function(e){console.log("["+e.is+"]: regi stered")},_registrate:function(e){this.registrations.push(e),Polymer.log&&this._ regLog(e)},dumpRegistrations:function(){this.registrations.forEach(this._regLog) }},Object.defineProperty(window,"currentImport",{enumerable:!0,configurable:!0,g et:function(){return(document._currentScript||document.currentScript||{}).ownerD ocument}}),Polymer.RenderStatus={_ready:!1,_callbacks:[],whenReady:function(e){t his._ready?e():this._callbacks.push(e)},_makeReady:function(){this._ready=!0;for (var e=0;e<this._callbacks.length;e++)this._callbacks[e]();this._callbacks=[]},_ catchFirstRender:function(){requestAnimationFrame(function(){Polymer.RenderStatu s._makeReady()})},_afterNextRenderQueue:[],_waitingNextRender:!1,afterNextRender :function(e,t,r){this._watchNextRender(),this._afterNextRenderQueue.push([e,t,r] )},hasRendered:function(){return this._ready},_watchNextRender:function(){if(!th is._waitingNextRender){this._waitingNextRender=!0;var e=function(){Polymer.Rende rStatus._flushNextRender()};this._ready?requestAnimationFrame(e):this.whenReady( e)}},_flushNextRender:function(){var e=this;setTimeout(function(){e._flushRender Callbacks(e._afterNextRenderQueue),e._afterNextRenderQueue=[],e._waitingNextRend er=!1})},_flushRenderCallbacks:function(e){for(var t,r=0;r<e.length;r++)t=e[r],t [1].apply(t[0],t[2]||Polymer.nar)}},window.HTMLImports?HTMLImports.whenReady(fun ction(){Polymer.RenderStatus._catchFirstRender()}):Polymer.RenderStatus._catchFi rstRender(),Polymer.ImportStatus=Polymer.RenderStatus,Polymer.ImportStatus.whenL oaded=Polymer.ImportStatus.whenReady,function(){"use strict";var e=Polymer.Setti ngs;Polymer.Base={__isPolymerInstance__:!0,_addFeature:function(e){this.mixin(th is,e)},registerCallback:function(){if("max"===e.lazyRegister)this.beforeRegister &&this.beforeRegister();else{this._desugarBehaviors();for(var t,r=0;r<this.behav iors.length;r++)t=this.behaviors[r],t.beforeRegister&&t.beforeRegister.call(this );this.beforeRegister&&this.beforeRegister()}this._registerFeatures(),e.lazyRegi ster||this.ensureRegisterFinished()},createdCallback:function(){if(e.disableUpgr adeEnabled){if(this.hasAttribute("disable-upgrade"))return this._propertySetter= t,this._configValue=null,void(this.__data__={});this.__hasInitialized=!0}this.__ initialize()},__initialize:function(){this.__hasRegisterFinished||this._ensureRe gisterFinished(this.__proto__),Polymer.telemetry.instanceCount++,this.root=this; for(var e,t=0;t<this.behaviors.length;t++)e=this.behaviors[t],e.created&&e.creat ed.call(this);this.created&&this.created(),this._initFeatures()},ensureRegisterF inished:function(){this._ensureRegisterFinished(this)},_ensureRegisterFinished:f unction(t){if(t.__hasRegisterFinished!==t.is||!t.is){if("max"===e.lazyRegister){ t._desugarBehaviors();for(var r,i=0;i<t.behaviors.length;i++)r=t.behaviors[i],r. beforeRegister&&r.beforeRegister.call(t)}t.__hasRegisterFinished=t.is,t._finishR egisterFeatures&&t._finishRegisterFeatures();for(var o,s=0;s<t.behaviors.length; s++)o=t.behaviors[s],o.registered&&o.registered.call(t);t.registered&&t.register ed(),e.usePolyfillProto&&t!==this&&t.extend(this,t)}},attachedCallback:function( ){var e=this;Polymer.RenderStatus.whenReady(function(){e.isAttached=!0;for(var t ,r=0;r<e.behaviors.length;r++)t=e.behaviors[r],t.attached&&t.attached.call(e);e. attached&&e.attached()})},detachedCallback:function(){var e=this;Polymer.RenderS tatus.whenReady(function(){e.isAttached=!1;for(var t,r=0;r<e.behaviors.length;r+ +)t=e.behaviors[r],t.detached&&t.detached.call(e);e.detached&&e.detached()})},at tributeChangedCallback:function(e,t,r){this._attributeChangedImpl(e);for(var i,o =0;o<this.behaviors.length;o++)i=this.behaviors[o],i.attributeChanged&&i.attribu teChanged.call(this,e,t,r);this.attributeChanged&&this.attributeChanged(e,t,r)}, _attributeChangedImpl:function(e){this._setAttributeToProperty(this,e)},extend:f unction(e,t){if(e&&t)for(var r,i=Object.getOwnPropertyNames(t),o=0;o<i.length&&( r=i[o]);o++)this.copyOwnProperty(r,t,e);return e||t},mixin:function(e,t){for(var r in t)e[r]=t[r];return e},copyOwnProperty:function(e,t,r){var i=Object.getOwnP ropertyDescriptor(t,e);i&&Object.defineProperty(r,e,i)},_logger:function(e,t){sw itch(1===t.length&&Array.isArray(t[0])&&(t=t[0]),e){case"log":case"warn":case"er ror":console[e].apply(console,t)}},_log:function(){var e=Array.prototype.slice.c all(arguments,0);this._logger("log",e)},_warn:function(){var e=Array.prototype.s lice.call(arguments,0);this._logger("warn",e)},_error:function(){var e=Array.pro totype.slice.call(arguments,0);this._logger("error",e)},_logf:function(){return this._logPrefix.concat(this.is).concat(Array.prototype.slice.call(arguments,0))} },Polymer.Base._logPrefix=function(){var e=window.chrome&&!/edge/i.test(navigato r.userAgent)||/firefox/i.test(navigator.userAgent);return e?["%c[%s::%s]:","font -weight: bold; background-color:#EEEE00;"]:["[%s::%s]:"]}(),Polymer.Base.chainOb ject=function(e,t){return e&&t&&e!==t&&(Object.__proto__||(e=Polymer.Base.extend (Object.create(t),e)),e.__proto__=t),e},Polymer.Base=Polymer.Base.chainObject(Po lymer.Base,HTMLElement.prototype),Polymer.BaseDescriptors={};var t;if(e.disableU pgradeEnabled){t=function(e,t){this.__data__[e]=t};var r=Polymer.Base.attributeC hangedCallback;Polymer.Base.attributeChangedCallback=function(e,t,i){this.__hasI nitialized||"disable-upgrade"!==e||(this.__hasInitialized=!0,this._propertySette r=Polymer.Bind._modelApi._propertySetter,this._configValue=Polymer.Base._configV alue,this.__initialize()),r.call(this,e,t,i)}}window.CustomElements?Polymer.inst anceof=CustomElements.instanceof:Polymer.instanceof=function(e,t){return e insta nceof t},Polymer.isInstance=function(e){return Boolean(e&&e.__isPolymerInstance_ _)},Polymer.telemetry.instanceCount=0}(),function(){function e(){if(s)for(var e, t=document._currentScript||document.currentScript,r=t&&t.ownerDocument||document ,i=r.querySelectorAll("dom-module"),o=i.length-1;o>=0&&(e=i[o]);o--){if(e.__upgr aded__)return;CustomElements.upgrade(e)}}var t={},r={},i=function(e){return t[e] ||r[e.toLowerCase()]},o=function(){return document.createElement("dom-module")}; o.prototype=Object.create(HTMLElement.prototype),Polymer.Base.mixin(o.prototype, {createdCallback:function(){this.register()},register:function(e){e=e||this.id|| this.getAttribute("name")||this.getAttribute("is"),e&&(this.id=e,t[e]=this,r[e.t oLowerCase()]=this)},import:function(t,r){if(t){var o=i(t);return o||(e(),o=i(t) ),o&&r&&(o=o.querySelector(r)),o}}}),Object.defineProperty(o.prototype,"construc tor",{value:o,configurable:!0,writable:!0});var s=window.CustomElements&&!Custom Elements.useNative;document.registerElement("dom-module",o)}(),Polymer.Base._add Feature({_prepIs:function(){if(!this.is){var e=(document._currentScript||documen t.currentScript).parentNode;if("dom-module"===e.localName){var t=e.id||e.getAttr ibute("name")||e.getAttribute("is");this.is=t}}this.is&&(this.is=this.is.toLower Case())}}),Polymer.Base._addFeature({behaviors:[],_desugarBehaviors:function(){t his.behaviors.length&&(this.behaviors=this._desugarSomeBehaviors(this.behaviors) )},_desugarSomeBehaviors:function(e){var t=[];e=this._flattenBehaviorsList(e);fo r(var r=e.length-1;r>=0;r--){var i=e[r];t.indexOf(i)===-1&&(this._mixinBehavior( i),t.unshift(i))}return t},_flattenBehaviorsList:function(e){for(var t=[],r=0;r< e.length;r++){var i=e[r];i instanceof Array?t=t.concat(this._flattenBehaviorsLis t(i)):i?t.push(i):this._warn(this._logf("_flattenBehaviorsList","behavior is nul l, check for missing or 404 import"))}return t},_mixinBehavior:function(e){for(v ar t,r=Object.getOwnPropertyNames(e),i=e._noAccessors,o=0;o<r.length&&(t=r[o]);o ++)Polymer.Base._behaviorProperties[t]||this.hasOwnProperty(t)||(i?this[t]=e[t]: this.copyOwnProperty(t,e,this))},_prepBehaviors:function(){this._prepFlattenedBe haviors(this.behaviors)},_prepFlattenedBehaviors:function(e){for(var t=0,r=e.len gth;t<r;t++)this._prepBehavior(e[t]);this._prepBehavior(this)},_marshalBehaviors :function(){for(var e=0;e<this.behaviors.length;e++)this._marshalBehavior(this.b ehaviors[e]);this._marshalBehavior(this)}}),Polymer.Base._behaviorProperties={ho stAttributes:!0,beforeRegister:!0,registered:!0,properties:!0,observers:!0,liste ners:!0,created:!0,attached:!0,detached:!0,attributeChanged:!0,ready:!0,_noAcces sors:!0},Polymer.Base._addFeature({_getExtendedPrototype:function(e){return this ._getExtendedNativePrototype(e)},_nativePrototypes:{},_getExtendedNativePrototyp e:function(e){var t=this._nativePrototypes[e];if(!t){t=Object.create(this.getNat ivePrototype(e));for(var r,i=Object.getOwnPropertyNames(Polymer.Base),o=0;o<i.le ngth&&(r=i[o]);o++)Polymer.BaseDescriptors[r]||(t[r]=Polymer.Base[r]);Object.def ineProperties(t,Polymer.BaseDescriptors),this._nativePrototypes[e]=t}return t},g etNativePrototype:function(e){return Object.getPrototypeOf(document.createElemen t(e))}}),Polymer.Base._addFeature({_prepConstructor:function(){this._factoryArgs =this.extends?[this.extends,this.is]:[this.is];var e=function(){return this._fac tory(arguments)};this.hasOwnProperty("extends")&&(e.extends=this.extends),Object .defineProperty(this,"constructor",{value:e,writable:!0,configurable:!0}),e.prot otype=this},_factory:function(e){var t=document.createElement.apply(document,thi s._factoryArgs);return this.factoryImpl&&this.factoryImpl.apply(t,e),t}}),Polyme r.nob=Object.create(null),Polymer.Base._addFeature({getPropertyInfo:function(e){ var t=this._getPropertyInfo(e,this.properties);if(!t)for(var r=0;r<this.behavior s.length;r++)if(t=this._getPropertyInfo(e,this.behaviors[r].properties))return t ;return t||Polymer.nob},_getPropertyInfo:function(e,t){var r=t&&t[e];return"func tion"==typeof r&&(r=t[e]={type:r}),r&&(r.defined=!0),r},_prepPropertyInfo:functi on(){this._propertyInfo={};for(var e=0;e<this.behaviors.length;e++)this._addProp ertyInfo(this._propertyInfo,this.behaviors[e].properties);this._addPropertyInfo( this._propertyInfo,this.properties),this._addPropertyInfo(this._propertyInfo,thi s._propertyEffects)},_addPropertyInfo:function(e,t){if(t){var r,i;for(var o in t )r=e[o],i=t[o],("_"!==o[0]||i.readOnly)&&(e[o]?(r.type||(r.type=i.type),r.readOn ly||(r.readOnly=i.readOnly)):e[o]={type:"function"==typeof i?i:i.type,readOnly:i .readOnly,attribute:Polymer.CaseMap.camelToDashCase(o)})}}}),function(){var e={c onfigurable:!0,writable:!0,enumerable:!0,value:{}};Polymer.BaseDescriptors.prope rties=e,Object.defineProperty(Polymer.Base,"properties",e)}(),Polymer.CaseMap={_ caseMap:{},_rx:{dashToCamel:/-[a-z]/g,camelToDash:/([A-Z])/g},dashToCamelCase:fu nction(e){return this._caseMap[e]||(this._caseMap[e]=e.indexOf("-")<0?e:e.replac e(this._rx.dashToCamel,function(e){return e[1].toUpperCase()}))},camelToDashCase :function(e){return this._caseMap[e]||(this._caseMap[e]=e.replace(this._rx.camel ToDash,"-$1").toLowerCase())}},Polymer.Base._addFeature({_addHostAttributes:func tion(e){this._aggregatedAttributes||(this._aggregatedAttributes={}),e&&this.mixi n(this._aggregatedAttributes,e)},_marshalHostAttributes:function(){this._aggrega tedAttributes&&this._applyAttributes(this,this._aggregatedAttributes)},_applyAtt ributes:function(e,t){for(var r in t)if(!this.hasAttribute(r)&&"class"!==r){var i=t[r];this.serializeValueToAttribute(i,r,this)}},_marshalAttributes:function(){ this._takeAttributesToModel(this)},_takeAttributesToModel:function(e){if(this.ha sAttributes())for(var t in this._propertyInfo){var r=this._propertyInfo[t];this. hasAttribute(r.attribute)&&this._setAttributeToProperty(e,r.attribute,t,r)}},_se tAttributeToProperty:function(e,t,r,i){if(!this._serializing&&(r=r||Polymer.Case Map.dashToCamelCase(t),i=i||this._propertyInfo&&this._propertyInfo[r],i&&!i.read Only)){var o=this.getAttribute(t);e[r]=this.deserialize(o,i.type)}},_serializing :!1,reflectPropertyToAttribute:function(e,t,r){this._serializing=!0,r=void 0===r ?this[e]:r,this.serializeValueToAttribute(r,t||Polymer.CaseMap.camelToDashCase(e )),this._serializing=!1},serializeValueToAttribute:function(e,t,r){var i=this.se rialize(e);r=r||this,void 0===i?r.removeAttribute(t):r.setAttribute(t,i)},deseri alize:function(e,t){switch(t){case Number:e=Number(e);break;case Boolean:e=null! =e;break;case Object:try{e=JSON.parse(e)}catch(e){}break;case Array:try{e=JSON.p arse(e)}catch(t){e=null,console.warn("Polymer::Attributes: couldn`t decode Array as JSON")}break;case Date:e=new Date(e);break;case String:}return e},serialize: function(e){switch(typeof e){case"boolean":return e?"":void 0;case"object":if(e instanceof Date)return e.toString();if(e)try{return JSON.stringify(e)}catch(e){r eturn""}default:return null!=e?e:void 0}}}),Polymer.version="1.9.3",Polymer.Base ._addFeature({_registerFeatures:function(){this._prepIs(),this._prepBehaviors(), this._prepConstructor(),this._prepPropertyInfo()},_prepBehavior:function(e){this ._addHostAttributes(e.hostAttributes)},_marshalBehavior:function(e){},_initFeatu res:function(){this._marshalHostAttributes(),this._marshalBehaviors()}})</script ><script>!function(){function e(e,t){return e.replace(a,function(e,i,n,r){return i+"'"+o(n.replace(/["']/g,""),t)+"'"+r})}function t(t,i){for(var n in l)for(var r,s,d,a=l[n],h=0,c=a.length;h<c&&(r=a[h]);h++)"*"!==n&&t.localName!==n||(s=t.at tributes[r],d=s&&s.value,d&&d.search(u)<0&&(s.value="style"===r?e(d,i):o(d,i)))} function o(e,t){if(e&&h.test(e))return e;var o=n(t);return o.href=e,o.href||e}fu nction i(e,t){return s||(s=document.implementation.createHTMLDocument("temp"),d= s.createElement("base"),s.head.appendChild(d)),d.href=t,o(e,s)}function n(e){ret urn e.body.__urlResolver||(e.body.__urlResolver=e.createElement("a"))}function r (e){return e.substring(0,e.lastIndexOf("/")+1)}var s,d,a=/(url\()([^)]*)(\))/g,l ={"*":["href","src","style","url"],form:["action"]},h=/(^\/)|(^#)|(^[\w-\d]*:)/, u=/\{\{|\[\[/;Polymer.ResolveUrl={resolveCss:e,resolveAttrs:t,resolveUrl:i,pathF romUrl:r},Polymer.rootPath=Polymer.Settings.rootPath||r(document.baseURI||window .location.href)}(),Polymer.Base._addFeature({_prepTemplate:function(){var e;if(v oid 0===this._template&&(e=Polymer.DomModule.import(this.is),this._template=e&&e .querySelector("template")),e){var t=e.getAttribute("assetpath")||"",o=Polymer.R esolveUrl.resolveUrl(t,e.ownerDocument.baseURI);this._importPath=Polymer.Resolve Url.pathFromUrl(o)}else this._importPath="";this._template&&this._template.hasAt tribute("is")&&this._warn(this._logf("_prepTemplate","top-level Polymer template must not be a type-extension, found",this._template,"Move inside simple <templa te>.")),this._template&&!this._template.content&&window.HTMLTemplateElement&&HTM LTemplateElement.decorate&&HTMLTemplateElement.decorate(this._template)},_stampT emplate:function(){this._template&&(this.root=this.instanceTemplate(this._templa te))},instanceTemplate:function(e){var t=document.importNode(e._content||e.conte nt,!0);return t}}),function(){var e=Polymer.Base.attachedCallback,t=Polymer.Base .detachedCallback;Polymer.Base._addFeature({_hostStack:[],ready:function(){},_re gisterHost:function(e){this.dataHost=e=e||Polymer.Base._hostStack[Polymer.Base._ hostStack.length-1],e&&e._clients&&e._clients.push(this),this._clients=null,this ._clientsReadied=!1},_beginHosting:function(){Polymer.Base._hostStack.push(this) ,this._clients||(this._clients=[])},_endHosting:function(){Polymer.Base._hostSta ck.pop()},_tryReady:function(){this._readied=!1,this._canReady()&&this._ready()} ,_canReady:function(){return!this.dataHost||this.dataHost._clientsReadied},_read y:function(){this._beforeClientsReady(),this._template&&(this._setupRoot(),this. _readyClients()),this._clientsReadied=!0,this._clients=null,this._afterClientsRe ady(),this._readySelf()},_readyClients:function(){this._beginDistribute();var e= this._clients;if(e)for(var t,o=0,i=e.length;o<i&&(t=e[o]);o++)t._ready();this._f inishDistribute()},_readySelf:function(){for(var e,t=0;t<this.behaviors.length;t ++)e=this.behaviors[t],e.ready&&e.ready.call(this);this.ready&&this.ready(),this ._readied=!0,this._attachedPending&&(this._attachedPending=!1,this.attachedCallb ack())},_beforeClientsReady:function(){},_afterClientsReady:function(){},_before Attached:function(){},attachedCallback:function(){this._readied?(this._beforeAtt ached(),e.call(this)):this._attachedPending=!0},detachedCallback:function(){this ._readied?t.call(this):this._attachedPending=!1}})}(),Polymer.ArraySplice=functi on(){function e(e,t,o){return{index:e,removed:t,addedCount:o}}function t(){}var o=0,i=1,n=2,r=3;return t.prototype={calcEditDistances:function(e,t,o,i,n,r){for( var s=r-n+1,d=o-t+1,a=new Array(s),l=0;l<s;l++)a[l]=new Array(d),a[l][0]=l;for(v ar h=0;h<d;h++)a[0][h]=h;for(l=1;l<s;l++)for(h=1;h<d;h++)if(this.equals(e[t+h-1] ,i[n+l-1]))a[l][h]=a[l-1][h-1];else{var u=a[l-1][h]+1,c=a[l][h-1]+1;a[l][h]=u<c? u:c}return a},spliceOperationsFromEditDistances:function(e){for(var t=e.length-1 ,s=e[0].length-1,d=e[t][s],a=[];t>0||s>0;)if(0!=t)if(0!=s){var l,h=e[t-1][s-1],u =e[t-1][s],c=e[t][s-1];l=u<c?u<h?u:h:c<h?c:h,l==h?(h==d?a.push(o):(a.push(i),d=h ),t--,s--):l==u?(a.push(r),t--,d=u):(a.push(n),s--,d=c)}else a.push(r),t--;else a.push(n),s--;return a.reverse(),a},calcSplices:function(t,s,d,a,l,h){var u=0,c= 0,_=Math.min(d-s,h-l);if(0==s&&0==l&&(u=this.sharedPrefix(t,a,_)),d==t.length&&h ==a.length&&(c=this.sharedSuffix(t,a,_-u)),s+=u,l+=u,d-=c,h-=c,d-s==0&&h-l==0)re turn[];if(s==d){for(var f=e(s,[],0);l<h;)f.removed.push(a[l++]);return[f]}if(l== h)return[e(s,[],d-s)];var m=this.spliceOperationsFromEditDistances(this.calcEdit Distances(t,s,d,a,l,h));f=void 0;for(var p=[],v=s,g=l,b=0;b<m.length;b++)switch( m[b]){case o:f&&(p.push(f),f=void 0),v++,g++;break;case i:f||(f=e(v,[],0)),f.add edCount++,v++,f.removed.push(a[g]),g++;break;case n:f||(f=e(v,[],0)),f.addedCoun t++,v++;break;case r:f||(f=e(v,[],0)),f.removed.push(a[g]),g++}return f&&p.push( f),p},sharedPrefix:function(e,t,o){for(var i=0;i<o;i++)if(!this.equals(e[i],t[i] ))return i;return o},sharedSuffix:function(e,t,o){for(var i=e.length,n=t.length, r=0;r<o&&this.equals(e[--i],t[--n]);)r++;return r},calculateSplices:function(e,t ){return this.calcSplices(e,0,e.length,t,0,t.length)},equals:function(e,t){retur n e===t}},new t}(),Polymer.domInnerHTML=function(){function e(e){switch(e){case" &":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot; ";case" ":return"&nbsp;"}}function t(t){return t.replace(s,e)}function o(t){retu rn t.replace(d,e)}function i(e){for(var t={},o=0;o<e.length;o++)t[e[o]]=!0;retur n t}function n(e,i,n){switch(e.nodeType){case Node.ELEMENT_NODE:for(var s,d=e.lo calName,h="<"+d,u=e.attributes,c=0;s=u[c];c++)h+=" "+s.name+'="'+t(s.value)+'"'; return h+=">",a[d]?h:h+r(e,n)+"</"+d+">";case Node.TEXT_NODE:var _=e.data;return i&&l[i.localName]?_:o(_);case Node.COMMENT_NODE:return"\x3c!--"+e.data+"--\x3e" ;default:throw console.error(e),new Error("not implemented")}}function r(e,t){e instanceof HTMLTemplateElement&&(e=e.content);for(var o,i="",r=Polymer.dom(e).ch ildNodes,s=0,d=r.length;s<d&&(o=r[s]);s++)i+=n(o,e,t);return i}var s=/[&\u00A0"] /g,d=/[&\u00A0<>]/g,a=i(["area","base","br","col","command","embed","hr","img"," input","keygen","link","meta","param","source","track","wbr"]),l=i(["style","scr ipt","xmp","iframe","noembed","noframes","plaintext","noscript"]);return{getInne rHTML:r}}(),function(){"use strict";var e=Element.prototype.insertBefore,t=Eleme nt.prototype.appendChild,o=Element.prototype.removeChild;Polymer.TreeApi={arrayC opyChildNodes:function(e){for(var t=[],o=0,i=e.firstChild;i;i=i.nextSibling)t[o+ +]=i;return t},arrayCopyChildren:function(e){for(var t=[],o=0,i=e.firstElementCh ild;i;i=i.nextElementSibling)t[o++]=i;return t},arrayCopy:function(e){for(var t= e.length,o=new Array(t),i=0;i<t;i++)o[i]=e[i];return o}},Polymer.TreeApi.Logical ={hasParentNode:function(e){return Boolean(e.__dom&&e.__dom.parentNode)},hasChil dNodes:function(e){return Boolean(e.__dom&&void 0!==e.__dom.childNodes)},getChil dNodes:function(e){return this.hasChildNodes(e)?this._getChildNodes(e):e.childNo des},_getChildNodes:function(e){if(!e.__dom.childNodes){e.__dom.childNodes=[];fo r(var t=e.__dom.firstChild;t;t=t.__dom.nextSibling)e.__dom.childNodes.push(t)}re turn e.__dom.childNodes},getParentNode:function(e){return e.__dom&&void 0!==e.__ dom.parentNode?e.__dom.parentNode:e.parentNode},getFirstChild:function(e){return e.__dom&&void 0!==e.__dom.firstChild?e.__dom.firstChild:e.firstChild},getLastCh ild:function(e){return e.__dom&&void 0!==e.__dom.lastChild?e.__dom.lastChild:e.l astChild},getNextSibling:function(e){return e.__dom&&void 0!==e.__dom.nextSiblin g?e.__dom.nextSibling:e.nextSibling},getPreviousSibling:function(e){return e.__d om&&void 0!==e.__dom.previousSibling?e.__dom.previousSibling:e.previousSibling}, getFirstElementChild:function(e){return e.__dom&&void 0!==e.__dom.firstChild?thi s._getFirstElementChild(e):e.firstElementChild},_getFirstElementChild:function(e ){for(var t=e.__dom.firstChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.__dom.next Sibling;return t},getLastElementChild:function(e){return e.__dom&&void 0!==e.__d om.lastChild?this._getLastElementChild(e):e.lastElementChild},_getLastElementChi ld:function(e){for(var t=e.__dom.lastChild;t&&t.nodeType!==Node.ELEMENT_NODE;)t= t.__dom.previousSibling;return t},getNextElementSibling:function(e){return e.__d om&&void 0!==e.__dom.nextSibling?this._getNextElementSibling(e):e.nextElementSib ling},_getNextElementSibling:function(e){for(var t=e.__dom.nextSibling;t&&t.node Type!==Node.ELEMENT_NODE;)t=t.__dom.nextSibling;return t},getPreviousElementSibl ing:function(e){return e.__dom&&void 0!==e.__dom.previousSibling?this._getPrevio usElementSibling(e):e.previousElementSibling},_getPreviousElementSibling:functio n(e){for(var t=e.__dom.previousSibling;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.__ dom.previousSibling;return t},saveChildNodes:function(e){if(!this.hasChildNodes( e)){e.__dom=e.__dom||{},e.__dom.firstChild=e.firstChild,e.__dom.lastChild=e.last Child,e.__dom.childNodes=[];for(var t=e.firstChild;t;t=t.nextSibling)t.__dom=t._ _dom||{},t.__dom.parentNode=e,e.__dom.childNodes.push(t),t.__dom.nextSibling=t.n extSibling,t.__dom.previousSibling=t.previousSibling}},recordInsertBefore:functi on(e,t,o){if(t.__dom.childNodes=null,e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)fo r(var i=e.firstChild;i;i=i.nextSibling)this._linkNode(i,t,o);else this._linkNode (e,t,o)},_linkNode:function(e,t,o){e.__dom=e.__dom||{},t.__dom=t.__dom||{},o&&(o .__dom=o.__dom||{}),e.__dom.previousSibling=o?o.__dom.previousSibling:t.__dom.la stChild,e.__dom.previousSibling&&(e.__dom.previousSibling.__dom.nextSibling=e),e .__dom.nextSibling=o||null,e.__dom.nextSibling&&(e.__dom.nextSibling.__dom.previ ousSibling=e),e.__dom.parentNode=t,o?o===t.__dom.firstChild&&(t.__dom.firstChild =e):(t.__dom.lastChild=e,t.__dom.firstChild||(t.__dom.firstChild=e)),t.__dom.chi ldNodes=null},recordRemoveChild:function(e,t){e.__dom=e.__dom||{},t.__dom=t.__do m||{},e===t.__dom.firstChild&&(t.__dom.firstChild=e.__dom.nextSibling),e===t.__d om.lastChild&&(t.__dom.lastChild=e.__dom.previousSibling);var o=e.__dom.previous Sibling,i=e.__dom.nextSibling;o&&(o.__dom.nextSibling=i),i&&(i.__dom.previousSib ling=o),e.__dom.parentNode=e.__dom.previousSibling=e.__dom.nextSibling=void 0,t. __dom.childNodes=null}},Polymer.TreeApi.Composed={getChildNodes:function(e){retu rn Polymer.TreeApi.arrayCopyChildNodes(e)},getParentNode:function(e){return e.pa rentNode},clearChildNodes:function(e){e.textContent=""},insertBefore:function(t, o,i){return e.call(t,o,i||null)},appendChild:function(e,o){return t.call(e,o)},r emoveChild:function(e,t){return o.call(e,t)}}}(),Polymer.DomApi=function(){"use strict";var e=Polymer.Settings,t=Polymer.TreeApi,o=function(e){this.node=i?o.wra p(e):e},i=e.hasShadow&&!e.nativeShadow;o.wrap=window.wrap?window.wrap:function(e ){return e},o.prototype={flush:function(){Polymer.dom.flush()},deepContains:func tion(e){if(this.node.contains(e))return!0;for(var t=e,o=e.ownerDocument;t&&t!==o &&t!==this.node;)t=Polymer.dom(t).parentNode||t.host;return t===this.node},query DistributedElements:function(e){for(var t,i=this.getEffectiveChildNodes(),n=[],r =0,s=i.length;r<s&&(t=i[r]);r++)t.nodeType===Node.ELEMENT_NODE&&o.matchesSelecto r.call(t,e)&&n.push(t);return n},getEffectiveChildNodes:function(){for(var e,t=[ ],o=this.childNodes,i=0,s=o.length;i<s&&(e=o[i]);i++)if(e.localName===n)for(var d=r(e).getDistributedNodes(),a=0;a<d.length;a++)t.push(d[a]);else t.push(e);retu rn t},observeNodes:function(e){if(e)return this.observer||(this.observer=this.no de.localName===n?new o.DistributedNodesObserver(this):new o.EffectiveNodesObserv er(this)),this.observer.addListener(e)},unobserveNodes:function(e){this.observer &&this.observer.removeListener(e)},notifyObserver:function(){this.observer&&this .observer.notify()},_query:function(e,o,i){o=o||this.node;var n=[];return this._ queryElements(t.Logical.getChildNodes(o),e,i,n),n},_queryElements:function(e,t,o ,i){for(var n,r=0,s=e.length;r<s&&(n=e[r]);r++)if(n.nodeType===Node.ELEMENT_NODE &&this._queryElement(n,t,o,i))return!0},_queryElement:function(e,o,i,n){var r=o( e);return r&&n.push(e),i&&i(r)?r:void this._queryElements(t.Logical.getChildNode s(e),o,i,n)}};var n=o.CONTENT="content",r=o.factory=function(e){return e=e||docu ment,e.__domApi||(e.__domApi=new o.ctor(e)),e.__domApi};o.hasApi=function(e){ret urn Boolean(e.__domApi)},o.ctor=o,Polymer.dom=function(e,t){return e instanceof Event?Polymer.EventApi.factory(e):o.factory(e,t)};var s=Element.prototype;return o.matchesSelector=s.matches||s.matchesSelector||s.mozMatchesSelector||s.msMatch esSelector||s.oMatchesSelector||s.webkitMatchesSelector,o}(),function(){"use str ict";var e=Polymer.Settings,t=Polymer.DomApi,o=t.factory,i=Polymer.TreeApi,n=Pol ymer.domInnerHTML.getInnerHTML,r=t.CONTENT;if(!e.useShadow){var s=Element.protot ype.cloneNode,d=Document.prototype.importNode;Polymer.Base.mixin(t.prototype,{_l azyDistribute:function(e){e.shadyRoot&&e.shadyRoot._distributionClean&&(e.shadyR oot._distributionClean=!1,Polymer.dom.addDebouncer(e.debounce("_distribute",e._d istributeContent)))},appendChild:function(e){return this.insertBefore(e)},insert Before:function(e,n){if(n&&i.Logical.getParentNode(n)!==this.node)throw Error("T he ref_node to be inserted before is not a child of this node");if(e.nodeType!== Node.DOCUMENT_FRAGMENT_NODE){var s=i.Logical.getParentNode(e);s?(t.hasApi(s)&&o( s).notifyObserver(),this._removeNode(e)):this._removeOwnerShadyRoot(e)}if(!this. _addNode(e,n)){n&&(n=n.localName===r?this._firstComposedNode(n):n);var d=this.no de._isShadyRoot?this.node.host:this.node;n?i.Composed.insertBefore(d,e,n):i.Comp osed.appendChild(d,e)}return this.notifyObserver(),e},_addNode:function(e,t){var o=this.getOwnerRoot();if(o){var n=this._maybeAddInsertionPoint(e,this.node);o._ invalidInsertionPoints||(o._invalidInsertionPoints=n),this._addNodeToHost(o.host ,e)}i.Logical.hasChildNodes(this.node)&&i.Logical.recordInsertBefore(e,this.node ,t);var r=this._maybeDistribute(e)||this.node.shadyRoot;if(r)if(e.nodeType===Nod e.DOCUMENT_FRAGMENT_NODE)for(;e.firstChild;)i.Composed.removeChild(e,e.firstChil d);else{var s=i.Composed.getParentNode(e);s&&i.Composed.removeChild(s,e)}return r},removeChild:function(e){if(i.Logical.getParentNode(e)!==this.node)throw Error ("The node to be removed is not a child of this node: "+e);if(!this._removeNode( e)){var t=this.node._isShadyRoot?this.node.host:this.node,o=i.Composed.getParent Node(e);t===o&&i.Composed.removeChild(t,e)}return this.notifyObserver(),e},_remo veNode:function(e){var t,n=i.Logical.hasParentNode(e)&&i.Logical.getParentNode(e ),r=this._ownerShadyRootForNode(e);return n&&(t=o(e)._maybeDistributeParent(),i. Logical.recordRemoveChild(e,n),r&&this._removeDistributedChildren(r,e)&&(r._inva lidInsertionPoints=!0,this._lazyDistribute(r.host))),this._removeOwnerShadyRoot( e),r&&this._removeNodeFromHost(r.host,e),t},replaceChild:function(e,t){return th is.insertBefore(e,t),this.removeChild(t),e},_hasCachedOwnerRoot:function(e){retu rn Boolean(void 0!==e._ownerShadyRoot)},getOwnerRoot:function(){return this._own erShadyRootForNode(this.node)},_ownerShadyRootForNode:function(e){if(e){var t=e. _ownerShadyRoot;if(void 0===t){if(e._isShadyRoot)t=e;else{var o=i.Logical.getPar entNode(e);t=o?o._isShadyRoot?o:this._ownerShadyRootForNode(o):null}(t||document .documentElement.contains(e))&&(e._ownerShadyRoot=t)}return t}},_maybeDistribute :function(e){var t=e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&!e.__noContent&&o(e ).querySelector(r),n=t&&i.Logical.getParentNode(t).nodeType!==Node.DOCUMENT_FRAG MENT_NODE,s=t||e.localName===r;if(s){var d=this.getOwnerRoot();d&&this._lazyDist ribute(d.host)}var a=this._nodeNeedsDistribution(this.node);return a&&this._lazy Distribute(this.node),a||s&&!n},_maybeAddInsertionPoint:function(e,t){var n;if(e .nodeType!==Node.DOCUMENT_FRAGMENT_NODE||e.__noContent)e.localName===r&&(i.Logic al.saveChildNodes(t),i.Logical.saveChildNodes(e),n=!0);else for(var s,d,a,l=o(e) .querySelectorAll(r),h=0;h<l.length&&(s=l[h]);h++)d=i.Logical.getParentNode(s),d ===e&&(d=t),a=this._maybeAddInsertionPoint(s,d),n=n||a;return n},_updateInsertio nPoints:function(e){for(var t,n=e.shadyRoot._insertionPoints=o(e.shadyRoot).quer ySelectorAll(r),s=0;s<n.length;s++)t=n[s],i.Logical.saveChildNodes(t),i.Logical. saveChildNodes(i.Logical.getParentNode(t))},_nodeNeedsDistribution:function(e){r eturn e&&e.shadyRoot&&t.hasInsertionPoint(e.shadyRoot)},_addNodeToHost:function( e,t){e._elementAdd&&e._elementAdd(t)},_removeNodeFromHost:function(e,t){e._eleme ntRemove&&e._elementRemove(t)},_removeDistributedChildren:function(e,t){for(var n,r=e._insertionPoints,s=0;s<r.length;s++){var d=r[s];if(this._contains(t,d))for (var a=o(d).getDistributedNodes(),l=0;l<a.length;l++){n=!0;var h=a[l],u=i.Compos ed.getParentNode(h);u&&i.Composed.removeChild(u,h)}}return n},_contains:function (e,t){for(;t;){if(t==e)return!0;t=i.Logical.getParentNode(t)}},_removeOwnerShady Root:function(e){if(this._hasCachedOwnerRoot(e))for(var t,o=i.Logical.getChildNo des(e),n=0,r=o.length;n<r&&(t=o[n]);n++)this._removeOwnerShadyRoot(t);e._ownerSh adyRoot=void 0},_firstComposedNode:function(e){for(var t,i,n=o(e).getDistributed Nodes(),r=0,s=n.length;r<s&&(t=n[r]);r++)if(i=o(t).getDestinationInsertionPoints (),i[i.length-1]===e)return t},querySelector:function(e){var o=this._query(funct ion(o){return t.matchesSelector.call(o,e)},this.node,function(e){return Boolean( e)})[0];return o||null},querySelectorAll:function(e){return this._query(function (o){return t.matchesSelector.call(o,e)},this.node)},getDestinationInsertionPoint s:function(){return this.node._destinationInsertionPoints||[]},getDistributedNod es:function(){return this.node._distributedNodes||[]},_clear:function(){for(;thi s.childNodes.length;)this.removeChild(this.childNodes[0])},setAttribute:function (e,t){this.node.setAttribute(e,t),this._maybeDistributeParent()},removeAttribute :function(e){this.node.removeAttribute(e),this._maybeDistributeParent()},_maybeD istributeParent:function(){if(this._nodeNeedsDistribution(this.parentNode))retur n this._lazyDistribute(this.parentNode),!0},cloneNode:function(e){var t=s.call(t his.node,!1);if(e)for(var i,n=this.childNodes,r=o(t),d=0;d<n.length;d++)i=o(n[d] ).cloneNode(!0),r.appendChild(i);return t},importNode:function(e,t){var n=this.n ode instanceof Document?this.node:this.node.ownerDocument,r=d.call(n,e,!1);if(t) for(var s,a=i.Logical.getChildNodes(e),l=o(r),h=0;h<a.length;h++)s=o(n).importNo de(a[h],!0),l.appendChild(s);return r},_getComposedInnerHTML:function(){return n (this.node,!0)}}),Object.defineProperties(t.prototype,{activeElement:{get:functi on(){var e=document.activeElement;if(!e)return null;var t=!!this.node._isShadyRo ot;if(this.node!==document){if(!t)return null;if(this.node.host===e||!this.node. host.contains(e))return null}for(var i=o(e).getOwnerRoot();i&&i!==this.node;)e=i .host,i=o(e).getOwnerRoot();return this.node===document?i?null:e:i===this.node?e :null},configurable:!0},childNodes:{get:function(){var e=i.Logical.getChildNodes (this.node);return Array.isArray(e)?e:i.arrayCopyChildNodes(this.node)},configur able:!0},children:{get:function(){return i.Logical.hasChildNodes(this.node)?Arra y.prototype.filter.call(this.childNodes,function(e){return e.nodeType===Node.ELE MENT_NODE}):i.arrayCopyChildren(this.node)},configurable:!0},parentNode:{get:fun ction(){return i.Logical.getParentNode(this.node)},configurable:!0},firstChild:{ get:function(){return i.Logical.getFirstChild(this.node)},configurable:!0},lastC hild:{get:function(){return i.Logical.getLastChild(this.node)},configurable:!0}, nextSibling:{get:function(){return i.Logical.getNextSibling(this.node)},configur able:!0},previousSibling:{get:function(){return i.Logical.getPreviousSibling(thi s.node)},configurable:!0},firstElementChild:{get:function(){return i.Logical.get FirstElementChild(this.node)},configurable:!0},lastElementChild:{get:function(){ return i.Logical.getLastElementChild(this.node)},configurable:!0},nextElementSib ling:{get:function(){return i.Logical.getNextElementSibling(this.node)},configur able:!0},previousElementSibling:{get:function(){return i.Logical.getPreviousElem entSibling(this.node)},configurable:!0},textContent:{get:function(){var e=this.n ode.nodeType;if(e===Node.TEXT_NODE||e===Node.COMMENT_NODE)return this.node.textC ontent;for(var t,o=[],i=0,n=this.childNodes;t=n[i];i++)t.nodeType!==Node.COMMENT _NODE&&o.push(t.textContent);return o.join("")},set:function(e){var t=this.node. nodeType;t===Node.TEXT_NODE||t===Node.COMMENT_NODE?this.node.textContent=e:(this ._clear(),e&&this.appendChild(document.createTextNode(e)))},configurable:!0},inn erHTML:{get:function(){var e=this.node.nodeType;return e===Node.TEXT_NODE||e===N ode.COMMENT_NODE?null:n(this.node)},set:function(e){var t=this.node.nodeType;if( t!==Node.TEXT_NODE||t!==Node.COMMENT_NODE){this._clear();var o=document.createEl ement("div");o.innerHTML=e;for(var n=i.arrayCopyChildNodes(o),r=0;r<n.length;r++ )this.appendChild(n[r])}},configurable:!0}}),t.hasInsertionPoint=function(e){ret urn Boolean(e&&e._insertionPoints.length)}}}(),function(){"use strict";var e=Pol ymer.Settings,t=Polymer.TreeApi,o=Polymer.DomApi;if(e.useShadow){Polymer.Base.mi xin(o.prototype,{querySelectorAll:function(e){return t.arrayCopy(this.node.query SelectorAll(e))},getOwnerRoot:function(){for(var e=this.node;e;){if(e.nodeType== =Node.DOCUMENT_FRAGMENT_NODE&&e.host)return e;e=e.parentNode}},importNode:functi on(e,t){var o=this.node instanceof Document?this.node:this.node.ownerDocument;re turn o.importNode(e,t)},getDestinationInsertionPoints:function(){var e=this.node .getDestinationInsertionPoints&&this.node.getDestinationInsertionPoints();return e?t.arrayCopy(e):[]},getDistributedNodes:function(){var e=this.node.getDistribu tedNodes&&this.node.getDistributedNodes();return e?t.arrayCopy(e):[]}}),Object.d efineProperties(o.prototype,{activeElement:{get:function(){var e=o.wrap(this.nod e),t=e.activeElement;return e.contains(t)?t:null},configurable:!0},childNodes:{g et:function(){return t.arrayCopyChildNodes(this.node)},configurable:!0},children :{get:function(){return t.arrayCopyChildren(this.node)},configurable:!0},textCon tent:{get:function(){return this.node.textContent},set:function(e){return this.n ode.textContent=e},configurable:!0},innerHTML:{get:function(){return this.node.i nnerHTML},set:function(e){return this.node.innerHTML=e},configurable:!0}});var i =function(e){for(var t=0;t<e.length;t++)n(e[t])},n=function(e){o.prototype[e]=fu nction(){return this.node[e].apply(this.node,arguments)}};i(["cloneNode","append Child","insertBefore","removeChild","replaceChild","setAttribute","removeAttribu te","querySelector"]);var r=function(e){for(var t=0;t<e.length;t++)s(e[t])},s=fu nction(e){Object.defineProperty(o.prototype,e,{get:function(){return this.node[e ]},configurable:!0})};r(["parentNode","firstChild","lastChild","nextSibling","pr eviousSibling","firstElementChild","lastElementChild","nextElementSibling","prev iousElementSibling"])}}(),Polymer.Base.mixin(Polymer.dom,{_flushGuard:0,_FLUSH_M AX:100,_needsTakeRecords:!Polymer.Settings.useNativeCustomElements,_debouncers:[ ],_staticFlushList:[],_finishDebouncer:null,flush:function(){for(this._flushGuar d=0,this._prepareFlush();this._debouncers.length&&this._flushGuard<this._FLUSH_M AX;){for(;this._debouncers.length;)this._debouncers.shift().complete();this._fin ishDebouncer&&this._finishDebouncer.complete(),this._prepareFlush(),this._flushG uard++}this._flushGuard>=this._FLUSH_MAX&&console.warn("Polymer.dom.flush aborte d. Flush may not be complete.")},_prepareFlush:function(){this._needsTakeRecords &&CustomElements.takeRecords();for(var e=0;e<this._staticFlushList.length;e++)th is._staticFlushList[e]()},addStaticFlush:function(e){this._staticFlushList.push( e)},removeStaticFlush:function(e){var t=this._staticFlushList.indexOf(e);t>=0&&t his._staticFlushList.splice(t,1)},addDebouncer:function(e){this._debouncers.push (e),this._finishDebouncer=Polymer.Debounce(this._finishDebouncer,this._finishFlu sh)},_finishFlush:function(){Polymer.dom._debouncers=[]}}),Polymer.EventApi=func tion(){"use strict";var e=Polymer.DomApi.ctor,t=Polymer.Settings;e.Event=functio n(e){this.event=e},t.useShadow?e.Event.prototype={get rootTarget(){return this.e vent.path[0]},get localTarget(){return this.event.target},get path(){var e=this. event.path;return Array.isArray(e)||(e=Array.prototype.slice.call(e)),e}}:e.Even t.prototype={get rootTarget(){return this.event.target},get localTarget(){for(va r e=this.event.currentTarget,t=e&&Polymer.dom(e).getOwnerRoot(),o=this.path,i=0; i<o.length;i++)if(Polymer.dom(o[i]).getOwnerRoot()===t)return o[i]},get path(){i f(!this.event._path){for(var e=[],t=this.rootTarget;t;){e.push(t);var o=Polymer. dom(t).getDestinationInsertionPoints();if(o.length){for(var i=0;i<o.length-1;i++ )e.push(o[i]);t=o[o.length-1]}else t=Polymer.dom(t).parentNode||t.host}e.push(wi ndow),this.event._path=e}return this.event._path}};var o=function(t){return t.__ eventApi||(t.__eventApi=new e.Event(t)),t.__eventApi};return{factory:o}}(),funct ion(){"use strict";var e=Polymer.DomApi.ctor,t=Polymer.Settings.useShadow;Object .defineProperty(e.prototype,"classList",{get:function(){return this._classList|| (this._classList=new e.ClassList(this)),this._classList},configurable:!0}),e.Cla ssList=function(e){this.domApi=e,this.node=e.node},e.ClassList.prototype={add:fu nction(){this.node.classList.add.apply(this.node.classList,arguments),this._dist ributeParent()},remove:function(){this.node.classList.remove.apply(this.node.cla ssList,arguments),this._distributeParent()},toggle:function(){this.node.classLis t.toggle.apply(this.node.classList,arguments),this._distributeParent()},_distrib uteParent:function(){t||this.domApi._maybeDistributeParent()},contains:function( ){return this.node.classList.contains.apply(this.node.classList,arguments)}}}(), function(){"use strict";var e=Polymer.DomApi.ctor,t=Polymer.Settings;if(e.Effect iveNodesObserver=function(e){this.domApi=e,this.node=this.domApi.node,this._list eners=[]},e.EffectiveNodesObserver.prototype={addListener:function(e){this._isSe tup||(this._setup(),this._isSetup=!0);var t={fn:e,_nodes:[]};return this._listen ers.push(t),this._scheduleNotify(),t},removeListener:function(e){var t=this._lis teners.indexOf(e);t>=0&&(this._listeners.splice(t,1),e._nodes=[]),this._hasListe ners()||(this._cleanup(),this._isSetup=!1)},_setup:function(){this._observeConte ntElements(this.domApi.childNodes)},_cleanup:function(){this._unobserveContentEl ements(this.domApi.childNodes)},_hasListeners:function(){return Boolean(this._li steners.length)},_scheduleNotify:function(){this._debouncer&&this._debouncer.sto p(),this._debouncer=Polymer.Debounce(this._debouncer,this._notify),this._debounc er.context=this,Polymer.dom.addDebouncer(this._debouncer)},notify:function(){thi s._hasListeners()&&this._scheduleNotify()},_notify:function(){this._beforeCallLi steners(),this._callListeners()},_beforeCallListeners:function(){this._updateCon tentElements()},_updateContentElements:function(){this._observeContentElements(t his.domApi.childNodes)},_observeContentElements:function(e){for(var t,o=0;o<e.le ngth&&(t=e[o]);o++)this._isContent(t)&&(t.__observeNodesMap=t.__observeNodesMap| |new WeakMap,t.__observeNodesMap.has(this)||t.__observeNodesMap.set(this,this._o bserveContent(t)))},_observeContent:function(e){var t=this,o=Polymer.dom(e).obse rveNodes(function(){t._scheduleNotify()});return o._avoidChangeCalculation=!0,o} ,_unobserveContentElements:function(e){for(var t,o,i=0;i<e.length&&(t=e[i]);i++) this._isContent(t)&&(o=t.__observeNodesMap.get(this),o&&(Polymer.dom(t).unobserv eNodes(o),t.__observeNodesMap.delete(this)))},_isContent:function(e){return"cont ent"===e.localName},_callListeners:function(){for(var e,t=this._listeners,o=this ._getEffectiveNodes(),i=0;i<t.length&&(e=t[i]);i++){var n=this._generateListener Info(e,o);(n||e._alwaysNotify)&&this._callListener(e,n)}},_getEffectiveNodes:fun ction(){return this.domApi.getEffectiveChildNodes()},_generateListenerInfo:funct ion(e,t){if(e._avoidChangeCalculation)return!0;for(var o,i=e._nodes,n={target:th is.node,addedNodes:[],removedNodes:[]},r=Polymer.ArraySplice.calculateSplices(t, i),s=0;s<r.length&&(o=r[s]);s++)for(var d,a=0;a<o.removed.length&&(d=o.removed[a ]);a++)n.removedNodes.push(d);for(s=0,o;s<r.length&&(o=r[s]);s++)for(a=o.index;a <o.index+o.addedCount;a++)n.addedNodes.push(t[a]);return e._nodes=t,n.addedNodes .length||n.removedNodes.length?n:void 0},_callListener:function(e,t){return e.fn .call(this.node,t)},enableShadowAttributeTracking:function(){}},t.useShadow){var o=e.EffectiveNodesObserver.prototype._setup,i=e.EffectiveNodesObserver.prototyp e._cleanup;Polymer.Base.mixin(e.EffectiveNodesObserver.prototype,{_setup:functio n(){if(!this._observer){var e=this;this._mutationHandler=function(t){t&&t.length &&e._scheduleNotify()},this._observer=new MutationObserver(this._mutationHandler ),this._boundFlush=function(){e._flush()},Polymer.dom.addStaticFlush(this._bound Flush),this._observer.observe(this.node,{childList:!0})}o.call(this)},_cleanup:f unction(){this._observer.disconnect(),this._observer=null,this._mutationHandler= null,Polymer.dom.removeStaticFlush(this._boundFlush),i.call(this)},_flush:functi on(){this._observer&&this._mutationHandler(this._observer.takeRecords())},enable ShadowAttributeTracking:function(){if(this._observer){this._makeContentListeners AlwaysNotify(),this._observer.disconnect(),this._observer.observe(this.node,{chi ldList:!0,attributes:!0,subtree:!0});var e=this.domApi.getOwnerRoot(),t=e&&e.hos t;t&&Polymer.dom(t).observer&&Polymer.dom(t).observer.enableShadowAttributeTrack ing()}},_makeContentListenersAlwaysNotify:function(){for(var e,t=0;t<this._liste ners.length;t++)e=this._listeners[t],e._alwaysNotify=e._isContentListener}})}}() ,function(){"use strict";var e=Polymer.DomApi.ctor,t=Polymer.Settings;e.Distribu tedNodesObserver=function(t){e.EffectiveNodesObserver.call(this,t)},e.Distribute dNodesObserver.prototype=Object.create(e.EffectiveNodesObserver.prototype),Polym er.Base.mixin(e.DistributedNodesObserver.prototype,{_setup:function(){},_cleanup :function(){},_beforeCallListeners:function(){},_getEffectiveNodes:function(){re turn this.domApi.getDistributedNodes()}}),t.useShadow&&Polymer.Base.mixin(e.Dist ributedNodesObserver.prototype,{_setup:function(){if(!this._observer){var e=this .domApi.getOwnerRoot(),t=e&&e.host;if(t){var o=this;this._observer=Polymer.dom(t ).observeNodes(function(){o._scheduleNotify()}),this._observer._isContentListene r=!0,this._hasAttrSelect()&&Polymer.dom(t).observer.enableShadowAttributeTrackin g()}}},_hasAttrSelect:function(){var e=this.node.getAttribute("select");return e &&e.match(/[[.]+/)},_cleanup:function(){var e=this.domApi.getOwnerRoot(),t=e&&e. host;t&&Polymer.dom(t).unobserveNodes(this._observer),this._observer=null}})}(), function(){function e(e,t){t._distributedNodes.push(e);var o=e._destinationInser tionPoints;o?o.push(t):e._destinationInsertionPoints=[t]}function t(e){var t=e._ distributedNodes;if(t)for(var o=0;o<t.length;o++){var i=t[o]._destinationInserti onPoints;i&&i.splice(i.indexOf(e)+1,i.length)}}function o(e,t){var o=u.Logical.g etParentNode(e);o&&o.shadyRoot&&h.hasInsertionPoint(o.shadyRoot)&&o.shadyRoot._d istributionClean&&(o.shadyRoot._distributionClean=!1,t.shadyRoot._dirtyRoots.pus h(o))}function i(e,t){var o=t._destinationInsertionPoints;return o&&o[o.length-1 ]===e}function n(e){return"content"==e.localName}function r(e){for(;e&&s(e);)e=e .domHost;return e}function s(e){for(var t,o=u.Logical.getChildNodes(e),i=0;i<o.l ength;i++)if(t=o[i],t.localName&&"content"===t.localName)return e.domHost}functi on d(e){for(var t,o=0;o<e._insertionPoints.length;o++)t=e._insertionPoints[o],h. hasApi(t)&&Polymer.dom(t).notifyObserver()}function a(e){h.hasApi(e)&&Polymer.do m(e).notifyObserver()}function l(e){if(_&&e)for(var t=0;t<e.length;t++)CustomEle ments.upgrade(e[t])}var h=Polymer.DomApi,u=Polymer.TreeApi;Polymer.Base._addFeat ure({_prepShady:function(){this._useContent=this._useContent||Boolean(this._temp late)},_setupShady:function(){this.shadyRoot=null,this.__domApi||(this.__domApi= null),this.__dom||(this.__dom=null),this._ownerShadyRoot||(this._ownerShadyRoot= void 0)},_poolContent:function(){
2 this._useContent&&u.Logical.saveChildNodes(this)},_setupRoot:function(){this._us eContent&&(this._createLocalRoot(),this.dataHost||l(u.Logical.getChildNodes(this )))},_createLocalRoot:function(){this.shadyRoot=this.root,this.shadyRoot._distri butionClean=!1,this.shadyRoot._hasDistributed=!1,this.shadyRoot._isShadyRoot=!0, this.shadyRoot._dirtyRoots=[];var e=this.shadyRoot._insertionPoints=!this._notes ||this._notes._hasContent?this.shadyRoot.querySelectorAll("content"):[];u.Logica l.saveChildNodes(this.shadyRoot);for(var t,o=0;o<e.length;o++)t=e[o],u.Logical.s aveChildNodes(t),u.Logical.saveChildNodes(t.parentNode);this.shadyRoot.host=this },distributeContent:function(e){if(this.shadyRoot){this.shadyRoot._invalidInsert ionPoints=this.shadyRoot._invalidInsertionPoints||e;var t=r(this);Polymer.dom(th is)._lazyDistribute(t)}},_distributeContent:function(){this._useContent&&!this.s hadyRoot._distributionClean&&(this.shadyRoot._invalidInsertionPoints&&(Polymer.d om(this)._updateInsertionPoints(this),this.shadyRoot._invalidInsertionPoints=!1) ,this._beginDistribute(),this._distributeDirtyRoots(),this._finishDistribute())} ,_beginDistribute:function(){this._useContent&&h.hasInsertionPoint(this.shadyRoo t)&&(this._resetDistribution(),this._distributePool(this.shadyRoot,this._collect Pool()))},_distributeDirtyRoots:function(){for(var e,t=this.shadyRoot._dirtyRoot s,o=0,i=t.length;o<i&&(e=t[o]);o++)e._distributeContent();this.shadyRoot._dirtyR oots=[]},_finishDistribute:function(){if(this._useContent){if(this.shadyRoot._di stributionClean=!0,h.hasInsertionPoint(this.shadyRoot))this._composeTree(),d(thi s.shadyRoot);else if(this.shadyRoot._hasDistributed){var e=this._composeNode(thi s);this._updateChildNodes(this,e)}else u.Composed.clearChildNodes(this),this.app endChild(this.shadyRoot);this.shadyRoot._hasDistributed||a(this),this.shadyRoot. _hasDistributed=!0}},elementMatches:function(e,t){return t=t||this,h.matchesSele ctor.call(t,e)},_resetDistribution:function(){for(var e=u.Logical.getChildNodes( this),o=0;o<e.length;o++){var i=e[o];i._destinationInsertionPoints&&(i._destinat ionInsertionPoints=void 0),n(i)&&t(i)}for(var r=this.shadyRoot,s=r._insertionPoi nts,d=0;d<s.length;d++)s[d]._distributedNodes=[]},_collectPool:function(){for(va r e=[],t=u.Logical.getChildNodes(this),o=0;o<t.length;o++){var i=t[o];n(i)?e.pus h.apply(e,i._distributedNodes):e.push(i)}return e},_distributePool:function(e,t) {for(var i,n=e._insertionPoints,r=0,s=n.length;r<s&&(i=n[r]);r++)this._distribut eInsertionPoint(i,t),o(i,this)},_distributeInsertionPoint:function(t,o){for(var i,n=!1,r=0,s=o.length;r<s;r++)i=o[r],i&&this._matchesContentSelect(i,t)&&(e(i,t) ,o[r]=void 0,n=!0);if(!n)for(var d=u.Logical.getChildNodes(t),a=0;a<d.length;a++ )e(d[a],t)},_composeTree:function(){this._updateChildNodes(this,this._composeNod e(this));for(var e,t,o=this.shadyRoot._insertionPoints,i=0,n=o.length;i<n&&(e=o[ i]);i++)t=u.Logical.getParentNode(e),t._useContent||t===this||t===this.shadyRoot ||this._updateChildNodes(t,this._composeNode(t))},_composeNode:function(e){for(v ar t=[],o=u.Logical.getChildNodes(e.shadyRoot||e),r=0;r<o.length;r++){var s=o[r] ;if(n(s))for(var d=s._distributedNodes,a=0;a<d.length;a++){var l=d[a];i(s,l)&&t. push(l)}else t.push(s)}return t},_updateChildNodes:function(e,t){for(var o,i=u.C omposed.getChildNodes(e),n=Polymer.ArraySplice.calculateSplices(t,i),r=0,s=0;r<n .length&&(o=n[r]);r++){for(var d,a=0;a<o.removed.length&&(d=o.removed[a]);a++)u. Composed.getParentNode(d)===e&&u.Composed.removeChild(e,d),i.splice(o.index+s,1) ;s-=o.addedCount}for(var o,l,r=0;r<n.length&&(o=n[r]);r++)for(l=i[o.index],a=o.i ndex,d;a<o.index+o.addedCount;a++)d=t[a],u.Composed.insertBefore(e,d,l),i.splice (a,0,d)},_matchesContentSelect:function(e,t){var o=t.getAttribute("select");if(! o)return!0;if(o=o.trim(),!o)return!0;if(!(e instanceof Element))return!1;var i=/ ^(:not\()?[*.#[a-zA-Z_|]/;return!!i.test(o)&&this.elementMatches(o,e)},_elementA dd:function(){},_elementRemove:function(){}});var c={get:function(){var e=Polyme r.dom(this).getOwnerRoot();return e&&e.host},configurable:!0};Object.definePrope rty(Polymer.Base,"domHost",c),Polymer.BaseDescriptors.domHost=c;var _=window.Cus tomElements&&!CustomElements.useNative}(),Polymer.Settings.useShadow&&Polymer.Ba se._addFeature({_poolContent:function(){},_beginDistribute:function(){},distribu teContent:function(){},_distributeContent:function(){},_finishDistribute:functio n(){},_createLocalRoot:function(){this.createShadowRoot(),this.shadowRoot.append Child(this.root),this.root=this.shadowRoot}}),Polymer.Async={_currVal:0,_lastVal :0,_callbacks:[],_twiddleContent:0,_twiddle:document.createTextNode(""),run:func tion(e,t){return t>0?~setTimeout(e,t):(this._twiddle.textContent=this._twiddleCo ntent++,this._callbacks.push(e),this._currVal++)},cancel:function(e){if(e<0)clea rTimeout(~e);else{var t=e-this._lastVal;if(t>=0){if(!this._callbacks[t])throw"in valid async handle: "+e;this._callbacks[t]=null}}},_atEndOfMicrotask:function(){ for(var e=this._callbacks.length,t=0;t<e;t++){var o=this._callbacks[t];if(o)try{ o()}catch(e){throw t++,this._callbacks.splice(0,t),this._lastVal+=t,this._twiddl e.textContent=this._twiddleContent++,e}}this._callbacks.splice(0,e),this._lastVa l+=e}},new window.MutationObserver(function(){Polymer.Async._atEndOfMicrotask()} ).observe(Polymer.Async._twiddle,{characterData:!0}),Polymer.Debounce=function() {function e(e,t,i){return e?e.stop():e=new o(this),e.go(t,i),e}var t=Polymer.Asy nc,o=function(e){this.context=e;var t=this;this.boundComplete=function(){t.compl ete()}};return o.prototype={go:function(e,o){var i;this.finish=function(){t.canc el(i)},i=t.run(this.boundComplete,o),this.callback=e},stop:function(){this.finis h&&(this.finish(),this.finish=null,this.callback=null)},complete:function(){if(t his.finish){var e=this.callback;this.stop(),e.call(this.context)}}},e}(),Polymer .Base._addFeature({_setupDebouncers:function(){this._debouncers={}},debounce:fun ction(e,t,o){return this._debouncers[e]=Polymer.Debounce.call(this,this._debounc ers[e],t,o)},isDebouncerActive:function(e){var t=this._debouncers[e];return!(!t| |!t.finish)},flushDebouncer:function(e){var t=this._debouncers[e];t&&t.complete( )},cancelDebouncer:function(e){var t=this._debouncers[e];t&&t.stop()}}),Polymer. DomModule=document.createElement("dom-module"),Polymer.Base._addFeature({_regist erFeatures:function(){this._prepIs(),this._prepBehaviors(),this._prepConstructor (),this._prepTemplate(),this._prepShady(),this._prepPropertyInfo()},_prepBehavio r:function(e){this._addHostAttributes(e.hostAttributes)},_initFeatures:function( ){this._registerHost(),this._template&&(this._poolContent(),this._beginHosting() ,this._stampTemplate(),this._endHosting()),this._marshalHostAttributes(),this._s etupDebouncers(),this._marshalBehaviors(),this._tryReady()},_marshalBehavior:fun ction(e){}})</script><script>!function(){Polymer.nar=[];var e=Polymer.Settings.d isableUpgradeEnabled;Polymer.Annotations={parseAnnotations:function(e,t){var n=[ ],r=e._content||e.content;return this._parseNodeAnnotations(r,n,t||e.hasAttribut e("strip-whitespace")),n},_parseNodeAnnotations:function(e,t,n){return e.nodeTyp e===Node.TEXT_NODE?this._parseTextNodeAnnotation(e,t):this._parseElementAnnotati ons(e,t,n)},_bindingRegex:function(){var e="(?:[a-zA-Z_$][\\w.:$\\-*]*)",t="(?:[ -+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)",n="(?:'(?:[^'\\\\]|\\\\.)*')",r='(?:" (?:[^"\\\\]|\\\\.)*")',s="(?:"+n+"|"+r+")",i="(?:"+e+"|"+t+"|"+s+"\\s*)",o="(?:" +i+"(?:,\\s*"+i+")*)",a="(?:\\(\\s*(?:"+o+"?)\\)\\s*)",l="("+e+"\\s*"+a+"?)",c=" (\\[\\[|{{)\\s*",h="(?:]]|}})",u="(?:(!)\\s*)?",f=c+u+l+h;return new RegExp(f,"g ")}(),_parseBindings:function(e){for(var t,n=this._bindingRegex,r=[],s=0;null!== (t=n.exec(e));){t.index>s&&r.push({literal:e.slice(s,t.index)});var i,o,a,l=t[1] [0],c=Boolean(t[2]),h=t[3].trim();"{"==l&&(a=h.indexOf("::"))>0&&(o=h.substring( a+2),h=h.substring(0,a),i=!0),r.push({compoundIndex:r.length,value:h,mode:l,nega te:c,event:o,customEvent:i}),s=n.lastIndex}if(s&&s<e.length){var u=e.substring(s );u&&r.push({literal:u})}if(r.length)return r},_literalFromParts:function(e){for (var t="",n=0;n<e.length;n++){var r=e[n].literal;t+=r||""}return t},_parseTextNo deAnnotation:function(e,t){var n=this._parseBindings(e.textContent);if(n){e.text Content=this._literalFromParts(n)||" ";var r={bindings:[{kind:"text",name:"textC ontent",parts:n,isCompound:1!==n.length}]};return t.push(r),r}},_parseElementAnn otations:function(e,t,n){var r={bindings:[],events:[]};return"content"===e.local Name&&(t._hasContent=!0),this._parseChildNodesAnnotations(e,r,t,n),e.attributes& &(this._parseNodeAttributeAnnotations(e,r,t),this.prepElement&&this.prepElement( e)),(r.bindings.length||r.events.length||r.id)&&t.push(r),r},_parseChildNodesAnn otations:function(e,t,n,r){if(e.firstChild)for(var s=e.firstChild,i=0;s;){var o= s.nextSibling;if("template"!==s.localName||s.hasAttribute("preserve-content")||t his._parseTemplate(s,i,n,t,r),"slot"==s.localName&&(s=this._replaceSlotWithConte nt(s)),s.nodeType===Node.TEXT_NODE){for(var a=o;a&&a.nodeType===Node.TEXT_NODE;) s.textContent+=a.textContent,o=a.nextSibling,e.removeChild(a),a=o;r&&!s.textCont ent.trim()&&(e.removeChild(s),i--)}if(s.parentNode){var l=this._parseNodeAnnotat ions(s,n,r);l&&(l.parent=t,l.index=i)}s=o,i++}},_replaceSlotWithContent:function (e){for(var t=e.ownerDocument.createElement("content");e.firstChild;)t.appendChi ld(e.firstChild);for(var n=e.attributes,r=0;r<n.length;r++){var s=n[r];t.setAttr ibute(s.name,s.value)}var i=e.getAttribute("name");return i&&t.setAttribute("sel ect","[slot='"+i+"']"),e.parentNode.replaceChild(t,e),t},_parseTemplate:function (e,t,n,r,s){var i=document.createDocumentFragment();i._notes=this.parseAnnotatio ns(e,s),i.appendChild(e.content),n.push({bindings:Polymer.nar,events:Polymer.nar ,templateContent:i,parent:r,index:t})},_parseNodeAttributeAnnotations:function(e ,t){for(var n,r=Array.prototype.slice.call(e.attributes),s=r.length-1;n=r[s];s-- ){var i,o=n.name,a=n.value;"on-"===o.slice(0,3)?(e.removeAttribute(o),t.events.p ush({name:o.slice(3),value:a})):(i=this._parseNodeAttributeAnnotation(e,o,a))?t. bindings.push(i):"id"===o&&(t.id=a)}},_parseNodeAttributeAnnotation:function(t,n ,r){var s=this._parseBindings(r);if(s){var i=n,o="property";"$"==n[n.length-1]&& (n=n.slice(0,-1),o="attribute");var a=this._literalFromParts(s);a&&"attribute"== o&&t.setAttribute(n,a),"input"===t.localName&&"value"===i&&t.setAttribute(i,""), e&&"disable-upgrade$"===i&&t.setAttribute(n,""),t.removeAttribute(i);var l=Polym er.CaseMap.dashToCamelCase(n);return"property"===o&&(n=l),{kind:o,name:n,propert yName:l,parts:s,literal:a,isCompound:1!==s.length}}},findAnnotatedNode:function( e,t){var n=t.parent&&Polymer.Annotations.findAnnotatedNode(e,t.parent);if(!n)ret urn e;for(var r=n.firstChild,s=0;r;r=r.nextSibling)if(t.index===s++)return r}}}( ),Polymer.Path={root:function(e){var t=e.indexOf(".");return t===-1?e:e.slice(0, t)},isDeep:function(e){return e.indexOf(".")!==-1},isAncestor:function(e,t){retu rn 0===e.indexOf(t+".")},isDescendant:function(e,t){return 0===t.indexOf(e+".")} ,translate:function(e,t,n){return t+n.slice(e.length)},matches:function(e,t,n){r eturn e===n||this.isAncestor(e,n)||Boolean(t)&&this.isDescendant(e,n)}},Polymer. Base._addFeature({_prepAnnotations:function(){if(this._template){var e=this;Poly mer.Annotations.prepElement=function(t){e._prepElement(t)},this._template._conte nt&&this._template._content._notes?this._notes=this._template._content._notes:(t his._notes=Polymer.Annotations.parseAnnotations(this._template),this._processAnn otations(this._notes)),Polymer.Annotations.prepElement=null}else this._notes=[]} ,_processAnnotations:function(e){for(var t=0;t<e.length;t++){for(var n=e[t],r=0; r<n.bindings.length;r++)for(var s=n.bindings[r],i=0;i<s.parts.length;i++){var o= s.parts[i];if(!o.literal){var a=this._parseMethod(o.value);a?o.signature=a:o.mod el=Polymer.Path.root(o.value)}}if(n.templateContent){this._processAnnotations(n. templateContent._notes);var l=n.templateContent._parentProps=this._discoverTempl ateParentProps(n.templateContent._notes),c=[];for(var h in l){var u="_parent_"+h ;c.push({index:n.index,kind:"property",name:u,propertyName:u,parts:[{mode:"{",mo del:h,value:h}]})}n.bindings=n.bindings.concat(c)}}},_discoverTemplateParentProp s:function(e){for(var t,n={},r=0;r<e.length&&(t=e[r]);r++){for(var s,i=0,o=t.bin dings;i<o.length&&(s=o[i]);i++)for(var a,l=0,c=s.parts;l<c.length&&(a=c[l]);l++) if(a.signature){for(var h=a.signature.args,u=0;u<h.length;u++){var f=h[u].model; f&&(n[f]=!0)}a.signature.dynamicFn&&(n[a.signature.method]=!0)}else a.model&&(n[ a.model]=!0);if(t.templateContent){var p=t.templateContent._parentProps;Polymer. Base.mixin(n,p)}}return n},_prepElement:function(e){Polymer.ResolveUrl.resolveAt trs(e,this._template.ownerDocument)},_findAnnotatedNode:Polymer.Annotations.find AnnotatedNode,_marshalAnnotationReferences:function(){this._template&&(this._mar shalIdNodes(),this._marshalAnnotatedNodes(),this._marshalAnnotatedListeners())}, _configureAnnotationReferences:function(){for(var e=this._notes,t=this._nodes,n= 0;n<e.length;n++){var r=e[n],s=t[n];this._configureTemplateContent(r,s),this._co nfigureCompoundBindings(r,s)}},_configureTemplateContent:function(e,t){e.templat eContent&&(t._content=e.templateContent)},_configureCompoundBindings:function(e, t){for(var n=e.bindings,r=0;r<n.length;r++){var s=n[r];if(s.isCompound){for(var i=t.__compoundStorage__||(t.__compoundStorage__={}),o=s.parts,a=new Array(o.leng th),l=0;l<o.length;l++)a[l]=o[l].literal;var c=s.name;i[c]=a,s.literal&&"propert y"==s.kind&&(t._configValue?t._configValue(c,s.literal):t[c]=s.literal)}}},_mars halIdNodes:function(){this.$={};for(var e,t=0,n=this._notes.length;t<n&&(e=this. _notes[t]);t++)e.id&&(this.$[e.id]=this._findAnnotatedNode(this.root,e))},_marsh alAnnotatedNodes:function(){if(this._notes&&this._notes.length){for(var e=new Ar ray(this._notes.length),t=0;t<this._notes.length;t++)e[t]=this._findAnnotatedNod e(this.root,this._notes[t]);this._nodes=e}},_marshalAnnotatedListeners:function( ){for(var e,t=0,n=this._notes.length;t<n&&(e=this._notes[t]);t++)if(e.events&&e. events.length)for(var r,s=this._findAnnotatedNode(this.root,e),i=0,o=e.events;i< o.length&&(r=o[i]);i++)this.listen(s,r.name,r.value)}}),Polymer.Base._addFeature ({listeners:{},_listenListeners:function(e){var t,n,r;for(r in e)r.indexOf(".")< 0?(t=this,n=r):(n=r.split("."),t=this.$[n[0]],n=n[1]),this.listen(t,n,e[r])},lis ten:function(e,t,n){var r=this._recallEventHandler(this,t,e,n);r||(r=this._creat eEventHandler(e,t,n)),r._listening||(this._listen(e,t,r),r._listening=!0)},_boun dListenerKey:function(e,t){return e+":"+t},_recordEventHandler:function(e,t,n,r, s){var i=e.__boundListeners;i||(i=e.__boundListeners=new WeakMap);var o=i.get(n) ;o||(o={},Polymer.Settings.isIE&&n==window||i.set(n,o));var a=this._boundListene rKey(t,r);o[a]=s},_recallEventHandler:function(e,t,n,r){var s=e.__boundListeners ;if(s){var i=s.get(n);if(i){var o=this._boundListenerKey(t,r);return i[o]}}},_cr eateEventHandler:function(e,t,n){var r=this,s=function(e){r[n]?r[n](e,e.detail): r._warn(r._logf("_createEventHandler","listener method `"+n+"` not defined"))};r eturn s._listening=!1,this._recordEventHandler(r,t,e,n,s),s},unlisten:function(e ,t,n){var r=this._recallEventHandler(this,t,e,n);r&&(this._unlisten(e,t,r),r._li stening=!1)},_listen:function(e,t,n){e.addEventListener(t,n)},_unlisten:function (e,t,n){e.removeEventListener(t,n)}}),function(){"use strict";function e(e){for( var t,n=P?["click"]:m,r=0;r<n.length;r++)t=n[r],e?document.addEventListener(t,S, !0):document.removeEventListener(t,S,!0)}function t(t){E.mouse.mouseIgnoreJob||e (!0);var n=function(){e(),E.mouse.target=null,E.mouse.mouseIgnoreJob=null};E.mou se.target=Polymer.dom(t).rootTarget,E.mouse.mouseIgnoreJob=Polymer.Debounce(E.mo use.mouseIgnoreJob,n,_)}function n(e){var t=e.type;if(m.indexOf(t)===-1)return!1 ;if("mousemove"===t){var n=void 0===e.buttons?1:e.buttons;return e instanceof wi ndow.MouseEvent&&!v&&(n=y[e.which]||0),Boolean(1&n)}var r=void 0===e.button?0:e. button;return 0===r}function r(e){if("click"===e.type){if(0===e.detail)return!0; var t=C.findOriginalTarget(e),n=t.getBoundingClientRect(),r=e.pageX,s=e.pageY;re turn!(r>=n.left&&r<=n.right&&s>=n.top&&s<=n.bottom)}return!1}function s(e){for(v ar t,n=Polymer.dom(e).path,r="auto",s=0;s<n.length;s++)if(t=n[s],t[u]){r=t[u];br eak}return r}function i(e,t,n){e.movefn=t,e.upfn=n,document.addEventListener("mo usemove",t),document.addEventListener("mouseup",n)}function o(e){document.remove EventListener("mousemove",e.movefn),document.removeEventListener("mouseup",e.upf n),e.movefn=null,e.upfn=null}var a=Polymer.DomApi.wrap,l="string"==typeof docume nt.head.style.touchAction,c="__polymerGestures",h="__polymerGesturesHandled",u=" __polymerGesturesTouchAction",f=25,p=5,d=2,_=2500,m=["mousedown","mousemove","mo useup","click"],y=[0,1,4,2],v=function(){try{return 1===new MouseEvent("test",{b uttons:1}).buttons}catch(e){return!1}}(),g=!1;!function(){try{var e=Object.defin eProperty({},"passive",{get:function(){g=!0}});window.addEventListener("test",nu ll,e),window.removeEventListener("test",null,e)}catch(e){}}();var P=navigator.us erAgent.match(/iP(?:[oa]d|hone)|Android/),S=function(e){var t=e.sourceCapabiliti es;if((!t||t.firesTouchEvents)&&(e[h]={skip:!0},"click"===e.type)){for(var n=Pol ymer.dom(e).path,r=0;r<n.length;r++)if(n[r]===E.mouse.target)return;e.preventDef ault(),e.stopPropagation()}},E={mouse:{target:null,mouseIgnoreJob:null},touch:{x :0,y:0,id:-1,scrollDecided:!1}};document.addEventListener("touchend",t,!!g&&{pas sive:!0});var C={gestures:{},recognizers:[],deepTargetFind:function(e,t){for(var n=document.elementFromPoint(e,t),r=n;r&&r.shadowRoot;)r=r.shadowRoot.elementFro mPoint(e,t),r&&(n=r);return n},findOriginalTarget:function(e){return e.path?e.pa th[0]:e.target},handleNative:function(e){var t,n=e.type,r=a(e.currentTarget),s=r [c];if(s){var i=s[n];if(i){if(!e[h]&&(e[h]={},"touch"===n.slice(0,5))){var o=e.c hangedTouches[0];if("touchstart"===n&&1===e.touches.length&&(E.touch.id=o.identi fier),E.touch.id!==o.identifier)return;l||"touchstart"!==n&&"touchmove"!==n||C.h andleTouchAction(e)}if(t=e[h],!t.skip){for(var u,f=C.recognizers,p=0;p<f.length; p++)u=f[p],i[u.name]&&!t[u.name]&&u.flow&&u.flow.start.indexOf(e.type)>-1&&u.res et&&u.reset();for(p=0,u;p<f.length;p++)u=f[p],i[u.name]&&!t[u.name]&&(t[u.name]= !0,u[n](e))}}}},handleTouchAction:function(e){var t=e.changedTouches[0],n=e.type ;if("touchstart"===n)E.touch.x=t.clientX,E.touch.y=t.clientY,E.touch.scrollDecid ed=!1;else if("touchmove"===n){if(E.touch.scrollDecided)return;E.touch.scrollDec ided=!0;var r=s(e),i=!1,o=Math.abs(E.touch.x-t.clientX),a=Math.abs(E.touch.y-t.c lientY);e.cancelable&&("none"===r?i=!0:"pan-x"===r?i=a>o:"pan-y"===r&&(i=o>a)),i ?e.preventDefault():C.prevent("track")}},add:function(e,t,n){e=a(e);var r=this.g estures[t],s=r.deps,i=r.name,o=e[c];o||(e[c]=o={});for(var l,h,u=0;u<s.length;u+ +)l=s[u],P&&m.indexOf(l)>-1&&"click"!==l||(h=o[l],h||(o[l]=h={_count:0}),0===h._ count&&e.addEventListener(l,this.handleNative),h[i]=(h[i]||0)+1,h._count=(h._cou nt||0)+1);e.addEventListener(t,n),r.touchAction&&this.setTouchAction(e,r.touchAc tion)},remove:function(e,t,n){e=a(e);var r=this.gestures[t],s=r.deps,i=r.name,o= e[c];if(o)for(var l,h,u=0;u<s.length;u++)l=s[u],h=o[l],h&&h[i]&&(h[i]=(h[i]||1)- 1,h._count=(h._count||1)-1,0===h._count&&e.removeEventListener(l,this.handleNati ve));e.removeEventListener(t,n)},register:function(e){this.recognizers.push(e);f or(var t=0;t<e.emits.length;t++)this.gestures[e.emits[t]]=e},findRecognizerByEve nt:function(e){for(var t,n=0;n<this.recognizers.length;n++){t=this.recognizers[n ];for(var r,s=0;s<t.emits.length;s++)if(r=t.emits[s],r===e)return t}return null} ,setTouchAction:function(e,t){l&&(e.style.touchAction=t),e[u]=t},fire:function(e ,t,n){var r=Polymer.Base.fire(t,n,{node:e,bubbles:!0,cancelable:!0});if(r.defaul tPrevented){var s=n.preventer||n.sourceEvent;s&&s.preventDefault&&s.preventDefau lt()}},prevent:function(e){var t=this.findRecognizerByEvent(e);t.info&&(t.info.p revent=!0)},resetMouseCanceller:function(){E.mouse.mouseIgnoreJob&&E.mouse.mouse IgnoreJob.complete()}};C.register({name:"downup",deps:["mousedown","touchstart", "touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},e mits:["down","up"],info:{movefn:null,upfn:null},reset:function(){o(this.info)},m ousedown:function(e){if(n(e)){var t=C.findOriginalTarget(e),r=this,s=function(e) {n(e)||(r.fire("up",t,e),o(r.info))},a=function(e){n(e)&&r.fire("up",t,e),o(r.in fo)};i(this.info,s,a),this.fire("down",t,e)}},touchstart:function(e){this.fire(" down",C.findOriginalTarget(e),e.changedTouches[0],e)},touchend:function(e){this. fire("up",C.findOriginalTarget(e),e.changedTouches[0],e)},fire:function(e,t,n,r) {C.fire(t,e,{x:n.clientX,y:n.clientY,sourceEvent:n,preventer:r,prevent:function( e){return C.prevent(e)}})}}),C.register({name:"track",touchAction:"none",deps:[" mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchs tart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",s tarted:!1,moves:[],addMove:function(e){this.moves.length>d&&this.moves.shift(),t his.moves.push(e)},movefn:null,upfn:null,prevent:!1},reset:function(){this.info. state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y= 0,this.info.prevent=!1,o(this.info)},hasMovedEnough:function(e,t){if(this.info.p revent)return!1;if(this.info.started)return!0;var n=Math.abs(this.info.x-e),r=Ma th.abs(this.info.y-t);return n>=p||r>=p},mousedown:function(e){if(n(e)){var t=C. findOriginalTarget(e),r=this,s=function(e){var s=e.clientX,i=e.clientY;r.hasMove dEnough(s,i)&&(r.info.state=r.info.started?"mouseup"===e.type?"end":"track":"sta rt","start"===r.info.state&&C.prevent("tap"),r.info.addMove({x:s,y:i}),n(e)||(r. info.state="end",o(r.info)),r.fire(t,e),r.info.started=!0)},a=function(e){r.info .started&&s(e),o(r.info)};i(this.info,s,a),this.info.x=e.clientX,this.info.y=e.c lientY}},touchstart:function(e){var t=e.changedTouches[0];this.info.x=t.clientX, this.info.y=t.clientY},touchmove:function(e){var t=C.findOriginalTarget(e),n=e.c hangedTouches[0],r=n.clientX,s=n.clientY;this.hasMovedEnough(r,s)&&("start"===th is.info.state&&C.prevent("tap"),this.info.addMove({x:r,y:s}),this.fire(t,n),this .info.state="track",this.info.started=!0)},touchend:function(e){var t=C.findOrig inalTarget(e),n=e.changedTouches[0];this.info.started&&(this.info.state="end",th is.info.addMove({x:n.clientX,y:n.clientY}),this.fire(t,n,e))},fire:function(e,t, n){var r,s=this.info.moves[this.info.moves.length-2],i=this.info.moves[this.info .moves.length-1],o=i.x-this.info.x,a=i.y-this.info.y,l=0;return s&&(r=i.x-s.x,l= i.y-s.y),C.fire(e,"track",{state:this.info.state,x:t.clientX,y:t.clientY,dx:o,dy :a,ddx:r,ddy:l,sourceEvent:t,preventer:n,hover:function(){return C.deepTargetFin d(t.clientX,t.clientY)}})}}),C.register({name:"tap",deps:["mousedown","click","t ouchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touc hend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset:function(){this.info.x =NaN,this.info.y=NaN,this.info.prevent=!1},save:function(e){this.info.x=e.client X,this.info.y=e.clientY},mousedown:function(e){n(e)&&this.save(e)},click:functio n(e){n(e)&&this.forward(e)},touchstart:function(e){this.save(e.changedTouches[0] ,e)},touchend:function(e){this.forward(e.changedTouches[0],e)},forward:function( e,t){var n=Math.abs(e.clientX-this.info.x),s=Math.abs(e.clientY-this.info.y),i=C .findOriginalTarget(e);(isNaN(n)||isNaN(s)||n<=f&&s<=f||r(e))&&(this.info.preven t||C.fire(i,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:t}))}});var b ={x:"pan-x",y:"pan-y",none:"none",all:"auto"};Polymer.Base._addFeature({_setupGe stures:function(){this.__polymerGestures=null},_listen:function(e,t,n){C.gesture s[t]?C.add(e,t,n):e.addEventListener(t,n)},_unlisten:function(e,t,n){C.gestures[ t]?C.remove(e,t,n):e.removeEventListener(t,n)},setScrollDirection:function(e,t){ t=t||this,C.setTouchAction(t,b[e]||"auto")}}),Polymer.Gestures=C}(),function(){" use strict";if(Polymer.Base._addFeature({$$:function(e){return Polymer.dom(this. root).querySelector(e)},toggleClass:function(e,t,n){n=n||this,1==arguments.lengt h&&(t=!n.classList.contains(e)),t?Polymer.dom(n).classList.add(e):Polymer.dom(n) .classList.remove(e)},toggleAttribute:function(e,t,n){n=n||this,1==arguments.len gth&&(t=!n.hasAttribute(e)),t?Polymer.dom(n).setAttribute(e,""):Polymer.dom(n).r emoveAttribute(e)},classFollows:function(e,t,n){n&&Polymer.dom(n).classList.remo ve(e),t&&Polymer.dom(t).classList.add(e)},attributeFollows:function(e,t,n){n&&Po lymer.dom(n).removeAttribute(e),t&&Polymer.dom(t).setAttribute(e,"")},getEffecti veChildNodes:function(){return Polymer.dom(this).getEffectiveChildNodes()},getEf fectiveChildren:function(){var e=Polymer.dom(this).getEffectiveChildNodes();retu rn e.filter(function(e){return e.nodeType===Node.ELEMENT_NODE})},getEffectiveTex tContent:function(){for(var e,t=this.getEffectiveChildNodes(),n=[],r=0;e=t[r];r+ +)e.nodeType!==Node.COMMENT_NODE&&n.push(Polymer.dom(e).textContent);return n.jo in("")},queryEffectiveChildren:function(e){var t=Polymer.dom(this).queryDistribu tedElements(e);return t&&t[0]},queryAllEffectiveChildren:function(e){return Poly mer.dom(this).queryDistributedElements(e)},getContentChildNodes:function(e){var t=Polymer.dom(this.root).querySelector(e||"content");return t?Polymer.dom(t).get DistributedNodes():[]},getContentChildren:function(e){return this.getContentChil dNodes(e).filter(function(e){return e.nodeType===Node.ELEMENT_NODE})},fire:funct ion(e,t,n){n=n||Polymer.nob;var r=n.node||this;t=null===t||void 0===t?{}:t;var s =void 0===n.bubbles||n.bubbles,i=Boolean(n.cancelable),o=n._useCache,a=this._get Event(e,s,i,o);return a.detail=t,o&&(this.__eventCache[e]=null),r.dispatchEvent( a),o&&(this.__eventCache[e]=a),a},__eventCache:{},_getEvent:function(e,t,n,r){va r s=r&&this.__eventCache[e];return s&&s.bubbles==t&&s.cancelable==n||(s=new Even t(e,{bubbles:Boolean(t),cancelable:n})),s},async:function(e,t){var n=this;return Polymer.Async.run(function(){e.call(n)},t)},cancelAsync:function(e){Polymer.Asy nc.cancel(e)},arrayDelete:function(e,t){var n;if(Array.isArray(e)){if(n=e.indexO f(t),n>=0)return e.splice(n,1)}else{var r=this._get(e);if(n=r.indexOf(t),n>=0)re turn this.splice(e,n,1)}},transform:function(e,t){t=t||this,t.style.webkitTransf orm=e,t.style.transform=e},translate3d:function(e,t,n,r){r=r||this,this.transfor m("translate3d("+e+","+t+","+n+")",r)},importHref:function(e,t,n,r){var s=docume nt.createElement("link");s.rel="import",s.href=e;var i=Polymer.Base.importHref.i mported=Polymer.Base.importHref.imported||{},o=i[s.href],a=o||s,l=this,c=functio n(e){return e.target.__firedLoad=!0,e.target.removeEventListener("load",c),e.tar get.removeEventListener("error",h),t.call(l,e)},h=function(e){return e.target.__ firedError=!0,e.target.removeEventListener("load",c),e.target.removeEventListene r("error",h),n.call(l,e)};return t&&a.addEventListener("load",c),n&&a.addEventLi stener("error",h),o?(o.__firedLoad&&o.dispatchEvent(new Event("load")),o.__fired Error&&o.dispatchEvent(new Event("error"))):(i[s.href]=s,r=Boolean(r),r&&s.setAt tribute("async",""),document.head.appendChild(s)),a},create:function(e,t){var n= document.createElement(e);if(t)for(var r in t)n[r]=t[r];return n},isLightDescend ant:function(e){return this!==e&&this.contains(e)&&Polymer.dom(this).getOwnerRoo t()===Polymer.dom(e).getOwnerRoot()},isLocalDescendant:function(e){return this.r oot===Polymer.dom(e).getOwnerRoot()}}),!Polymer.Settings.useNativeCustomElements ){var e=Polymer.Base.importHref;Polymer.Base.importHref=function(t,n,r,s){Custom Elements.ready=!1;var i=function(e){if(CustomElements.upgradeDocumentTree(docume nt),CustomElements.ready=!0,n)return n.call(this,e)};return e.call(this,t,i,r,s) }}}(),Polymer.Bind={prepareModel:function(e){Polymer.Base.mixin(e,this._modelApi )},_modelApi:{_notifyChange:function(e,t,n){n=void 0===n?this[e]:n,t=t||Polymer. CaseMap.camelToDashCase(e)+"-changed",this.fire(t,{value:n},{bubbles:!1,cancelab le:!1,_useCache:Polymer.Settings.eventDataCache||!Polymer.Settings.isIE})},_prop ertySetter:function(e,t,n,r){var s=this.__data__[e];return s===t||s!==s&&t!==t|| (this.__data__[e]=t,"object"==typeof t&&this._clearPath(e),this._propertyChanged &&this._propertyChanged(e,t,s),n&&this._effectEffects(e,t,n,s,r)),s},__setProper ty:function(e,t,n,r){r=r||this;var s=r._propertyEffects&&r._propertyEffects[e];s ?r._propertySetter(e,t,s,n):r[e]!==t&&(r[e]=t)},_effectEffects:function(e,t,n,r, s){for(var i,o=0,a=n.length;o<a&&(i=n[o]);o++)i.fn.call(this,e,this[e],i.effect, r,s)},_clearPath:function(e){for(var t in this.__data__)Polymer.Path.isDescendan t(e,t)&&(this.__data__[t]=void 0)}},ensurePropertyEffects:function(e,t){e._prope rtyEffects||(e._propertyEffects={});var n=e._propertyEffects[t];return n||(n=e._ propertyEffects[t]=[]),n},addPropertyEffect:function(e,t,n,r){var s=this.ensureP ropertyEffects(e,t),i={kind:n,effect:r,fn:Polymer.Bind["_"+n+"Effect"]};return s .push(i),i},createBindings:function(e){var t=e._propertyEffects;if(t)for(var n i n t){var r=t[n];r.sort(this._sortPropertyEffects),this._createAccessors(e,n,r)}} ,_sortPropertyEffects:function(){var e={compute:0,annotation:1,annotatedComputat ion:2,reflect:3,notify:4,observer:5,complexObserver:6,function:7};return functio n(t,n){return e[t.kind]-e[n.kind]}}(),_createAccessors:function(e,t,n){var r={ge t:function(){return this.__data__[t]}},s=function(e){this._propertySetter(t,e,n) },i=e.getPropertyInfo&&e.getPropertyInfo(t);i&&i.readOnly?i.computed||(e["_set"+ this.upper(t)]=s):r.set=s,Object.defineProperty(e,t,r)},upper:function(e){return e[0].toUpperCase()+e.substring(1)},_addAnnotatedListener:function(e,t,n,r,s,i){ e._bindListeners||(e._bindListeners=[]);var o=this._notedListenerFactory(n,r,Pol ymer.Path.isDeep(r),i),a=s||Polymer.CaseMap.camelToDashCase(n)+"-changed";e._bin dListeners.push({index:t,property:n,path:r,changedFn:o,event:a})},_isEventBogus: function(e,t){return e.path&&e.path[0]!==t},_notedListenerFactory:function(e,t,n ,r){return function(s,i,o){if(o){var a=Polymer.Path.translate(e,t,o);this._notif yPath(a,i)}else i=s[e],r&&(i=!i),n?this.__data__[t]!=i&&this.set(t,i):this[t]=i} },prepareInstance:function(e){e.__data__=Object.create(null)},setupBindListeners :function(e){for(var t,n=e._bindListeners,r=0,s=n.length;r<s&&(t=n[r]);r++){var i=e._nodes[t.index];this._addNotifyListener(i,e,t.event,t.changedFn)}},_addNotif yListener:function(e,t,n,r){e.addEventListener(n,function(e){return t._notifyLis tener(r,e)})}},Polymer.Base.mixin(Polymer.Bind,{_shouldAddListener:function(e){r eturn e.name&&"attribute"!=e.kind&&"text"!=e.kind&&!e.isCompound&&"{"===e.parts[ 0].mode},_annotationEffect:function(e,t,n){e!=n.value&&(t=this._get(n.value),thi s.__data__[n.value]=t),this._applyEffectValue(n,t)},_reflectEffect:function(e,t, n){this.reflectPropertyToAttribute(e,n.attribute,t)},_notifyEffect:function(e,t, n,r,s){s||this._notifyChange(e,n.event,t)},_functionEffect:function(e,t,n,r,s){n .call(this,e,t,r,s)},_observerEffect:function(e,t,n,r){var s=this[n.method];s?s. call(this,t,r):this._warn(this._logf("_observerEffect","observer method `"+n.met hod+"` not defined"))},_complexObserverEffect:function(e,t,n){var r=this[n.metho d];if(r){var s=Polymer.Bind._marshalArgs(this.__data__,n,e,t);s&&r.apply(this,s) }else n.dynamicFn||this._warn(this._logf("_complexObserverEffect","observer meth od `"+n.method+"` not defined"))},_computeEffect:function(e,t,n){var r=this[n.me thod];if(r){var s=Polymer.Bind._marshalArgs(this.__data__,n,e,t);if(s){var i=r.a pply(this,s);this.__setProperty(n.name,i)}}else n.dynamicFn||this._warn(this._lo gf("_computeEffect","compute method `"+n.method+"` not defined"))},_annotatedCom putationEffect:function(e,t,n){var r=this._rootDataHost||this,s=r[n.method];if(s ){var i=Polymer.Bind._marshalArgs(this.__data__,n,e,t);if(i){var o=s.apply(r,i); this._applyEffectValue(n,o)}}else n.dynamicFn||r._warn(r._logf("_annotatedComput ationEffect","compute method `"+n.method+"` not defined"))},_marshalArgs:functio n(e,t,n,r){for(var s=[],i=t.args,o=i.length>1||t.dynamicFn,a=0,l=i.length;a<l;a+ +){var c,h=i[a],u=h.name;if(h.literal?c=h.value:n===u?c=r:(c=e[u],void 0===c&&h. structured&&(c=Polymer.Base._get(u,e))),o&&void 0===c)return;if(h.wildcard){var f=Polymer.Path.isAncestor(n,u);s[a]={path:f?n:u,value:f?r:c,base:c}}else s[a]=c} return s}}),Polymer.Base._addFeature({_addPropertyEffect:function(e,t,n){var r=P olymer.Bind.addPropertyEffect(this,e,t,n);r.pathFn=this["_"+r.kind+"PathEffect"] },_prepEffects:function(){Polymer.Bind.prepareModel(this),this._addAnnotationEff ects(this._notes)},_prepBindings:function(){Polymer.Bind.createBindings(this)},_ addPropertyEffects:function(e){if(e)for(var t in e){var n=e[t];if(n.observer&&th is._addObserverEffect(t,n.observer),n.computed&&(n.readOnly=!0,this._addComputed Effect(t,n.computed)),n.notify&&this._addPropertyEffect(t,"notify",{event:Polyme r.CaseMap.camelToDashCase(t)+"-changed"}),n.reflectToAttribute){var r=Polymer.Ca seMap.camelToDashCase(t);"-"===r[0]?this._warn(this._logf("_addPropertyEffects", "Property "+t+" cannot be reflected to attribute "+r+' because "-" is not a vali d starting attribute name. Use a lowercase first letter for the property instead .')):this._addPropertyEffect(t,"reflect",{attribute:r})}n.readOnly&&Polymer.Bind .ensurePropertyEffects(this,t)}},_addComputedEffect:function(e,t){for(var n,r=th is._parseMethod(t),s=r.dynamicFn,i=0;i<r.args.length&&(n=r.args[i]);i++)this._ad dPropertyEffect(n.model,"compute",{method:r.method,args:r.args,trigger:n,name:e, dynamicFn:s});s&&this._addPropertyEffect(r.method,"compute",{method:r.method,arg s:r.args,trigger:null,name:e,dynamicFn:s})},_addObserverEffect:function(e,t){thi s._addPropertyEffect(e,"observer",{method:t,property:e})},_addComplexObserverEff ects:function(e){if(e)for(var t,n=0;n<e.length&&(t=e[n]);n++)this._addComplexObs erverEffect(t)},_addComplexObserverEffect:function(e){var t=this._parseMethod(e) ;if(!t)throw new Error("Malformed observer expression '"+e+"'");for(var n,r=t.dy namicFn,s=0;s<t.args.length&&(n=t.args[s]);s++)this._addPropertyEffect(n.model," complexObserver",{method:t.method,args:t.args,trigger:n,dynamicFn:r});r&&this._a ddPropertyEffect(t.method,"complexObserver",{method:t.method,args:t.args,trigger :null,dynamicFn:r})},_addAnnotationEffects:function(e){for(var t,n=0;n<e.length& &(t=e[n]);n++)for(var r,s=t.bindings,i=0;i<s.length&&(r=s[i]);i++)this._addAnnot ationEffect(r,n)},_addAnnotationEffect:function(e,t){Polymer.Bind._shouldAddList ener(e)&&Polymer.Bind._addAnnotatedListener(this,t,e.name,e.parts[0].value,e.par ts[0].event,e.parts[0].negate);for(var n=0;n<e.parts.length;n++){var r=e.parts[n ];r.signature?this._addAnnotatedComputationEffect(e,r,t):r.literal||("attribute" ===e.kind&&"-"===e.name[0]?this._warn(this._logf("_addAnnotationEffect","Cannot set attribute "+e.name+' because "-" is not a valid attribute starting character ')):this._addPropertyEffect(r.model,"annotation",{kind:e.kind,index:t,name:e.nam e,propertyName:e.propertyName,value:r.value,isCompound:e.isCompound,compoundInde x:r.compoundIndex,event:r.event,customEvent:r.customEvent,negate:r.negate}))}},_ addAnnotatedComputationEffect:function(e,t,n){var r=t.signature;if(r.static)this .__addAnnotatedComputationEffect("__static__",n,e,t,null);else{for(var s,i=0;i<r .args.length&&(s=r.args[i]);i++)s.literal||this.__addAnnotatedComputationEffect( s.model,n,e,t,s);r.dynamicFn&&this.__addAnnotatedComputationEffect(r.method,n,e, t,null)}},__addAnnotatedComputationEffect:function(e,t,n,r,s){this._addPropertyE ffect(e,"annotatedComputation",{index:t,isCompound:n.isCompound,compoundIndex:r. compoundIndex,kind:n.kind,name:n.name,negate:r.negate,method:r.signature.method, args:r.signature.args,trigger:s,dynamicFn:r.signature.dynamicFn})},_parseMethod: function(e){var t=e.match(/([^\s]+?)\(([\s\S]*)\)/);if(t){var n={method:t[1],sta tic:!0};if(this.getPropertyInfo(n.method)!==Polymer.nob&&(n.static=!1,n.dynamicF n=!0),t[2].trim()){var r=t[2].replace(/\\,/g,"&comma;").split(",");return this._ parseArgs(r,n)}return n.args=Polymer.nar,n}},_parseArgs:function(e,t){return t.a rgs=e.map(function(e){var n=this._parseArg(e);return n.literal||(t.static=!1),n} ,this),t},_parseArg:function(e){var t=e.trim().replace(/&comma;/g,",").replace(/ \\(.)/g,"$1"),n={name:t},r=t[0];switch("-"===r&&(r=t[1]),r>="0"&&r<="9"&&(r="#") ,r){case"'":case'"':n.value=t.slice(1,-1),n.literal=!0;break;case"#":n.value=Num ber(t),n.literal=!0}return n.literal||(n.model=Polymer.Path.root(t),n.structured =Polymer.Path.isDeep(t),n.structured&&(n.wildcard=".*"==t.slice(-2),n.wildcard&& (n.name=t.slice(0,-2)))),n},_marshalInstanceEffects:function(){Polymer.Bind.prep areInstance(this),this._bindListeners&&Polymer.Bind.setupBindListeners(this)},_a pplyEffectValue:function(e,t){var n=this._nodes[e.index],r=e.name;if(t=this._com puteFinalAnnotationValue(n,r,t,e),"attribute"==e.kind)this.serializeValueToAttri bute(t,r,n);else{var s=n._propertyInfo&&n._propertyInfo[r];if(s&&s.readOnly)retu rn;this.__setProperty(r,t,Polymer.Settings.suppressBindingNotifications,n)}},_co mputeFinalAnnotationValue:function(e,t,n,r){if(r.negate&&(n=!n),r.isCompound){va r s=e.__compoundStorage__[t];s[r.compoundIndex]=n,n=s.join("")}return"attribute" !==r.kind&&("className"===t&&(n=this._scopeElementClass(e,n)),("textContent"===t ||"input"==e.localName&&"value"==t)&&(n=void 0==n?"":n)),n},_executeStaticEffect s:function(){this._propertyEffects&&this._propertyEffects.__static__&&this._effe ctEffects("__static__",null,this._propertyEffects.__static__)}}),function(){var e=Polymer.Settings.usePolyfillProto,t=Boolean(Object.getOwnPropertyDescriptor(do cument.documentElement,"properties"));Polymer.Base._addFeature({_setupConfigure: function(e){if(this._config={},this._handlers=[],this._aboveConfig=null,e)for(va r t in e)void 0!==e[t]&&(this._config[t]=e[t])},_marshalAttributes:function(){th is._takeAttributesToModel(this._config)},_attributeChangedImpl:function(e){var t =this._clientsReadied?this:this._config;this._setAttributeToProperty(t,e)},_conf igValue:function(e,t){var n=this._propertyInfo[e];n&&n.readOnly||(this._config[e ]=t)},_beforeClientsReady:function(){this._configure()},_configure:function(){th is._configureAnnotationReferences(),this._configureInstanceProperties(),this._ab oveConfig=this.mixin({},this._config);for(var e={},n=0;n<this.behaviors.length;n ++)this._configureProperties(this.behaviors[n].properties,e);this._configureProp erties(t?this.__proto__.properties:this.properties,e),this.mixin(e,this._aboveCo nfig),this._config=e,this._clients&&this._clients.length&&this._distributeConfig (this._config)},_configureInstanceProperties:function(){for(var t in this._prope rtyEffects)!e&&this.hasOwnProperty(t)&&(this._configValue(t,this[t]),delete this [t])},_configureProperties:function(e,t){for(var n in e){var r=e[n];if(void 0!== r.value){var s=r.value;"function"==typeof s&&(s=s.call(this,this._config)),
3 t[n]=s}}},_distributeConfig:function(e){var t=this._propertyEffects;if(t)for(var n in e){var r=t[n];if(r)for(var s,i=0,o=r.length;i<o&&(s=r[i]);i++)if("annotati on"===s.kind){var a=this._nodes[s.effect.index],l=s.effect.propertyName,c="attri bute"==s.effect.kind,h=a._propertyEffects&&a._propertyEffects[l];if(a._configVal ue&&(h||!c)){var u=n===s.effect.value?e[n]:this._get(s.effect.value,e);u=this._c omputeFinalAnnotationValue(a,l,u,s.effect),c&&(u=a.deserialize(this.serialize(u) ,a._propertyInfo[l].type)),a._configValue(l,u)}}}},_afterClientsReady:function() {this.importPath=this._importPath,this.rootPath=Polymer.rootPath,this._executeSt aticEffects(),this._applyConfig(this._config,this._aboveConfig),this._flushHandl ers()},_applyConfig:function(e,t){for(var n in e)void 0===this[n]&&this.__setPro perty(n,e[n],n in t)},_notifyListener:function(e,t){if(!Polymer.Bind._isEventBog us(t,t.target)){var n,r;if(t.detail&&(n=t.detail.value,r=t.detail.path),this._cl ientsReadied)return e.call(this,t.target,n,r);this._queueHandler([e,t.target,n,r ])}},_queueHandler:function(e){this._handlers.push(e)},_flushHandlers:function() {for(var e,t=this._handlers,n=0,r=t.length;n<r&&(e=t[n]);n++)e[0].call(this,e[1] ,e[2],e[3]);this._handlers=[]}})}(),function(){"use strict";var e=Polymer.Path;P olymer.Base._addFeature({notifyPath:function(e,t,n){var r={},s=this._get(e,this, r);1===arguments.length&&(t=s),r.path&&this._notifyPath(r.path,t,n)},_notifyPath :function(e,t,n){var r=this._propertySetter(e,t);if(r!==t&&(r===r||t===t))return this._pathEffector(e,t),n||this._notifyPathUp(e,t),!0},_getPathParts:function(e ){if(Array.isArray(e)){for(var t=[],n=0;n<e.length;n++)for(var r=e[n].toString() .split("."),s=0;s<r.length;s++)t.push(r[s]);return t}return e.toString().split(" .")},set:function(e,t,n){var r,s=n||this,i=this._getPathParts(e),o=i[i.length-1] ;if(i.length>1){for(var a=0;a<i.length-1;a++){var l=i[a];if(r&&"#"==l[0]?s=Polym er.Collection.get(r).getItem(l):(s=s[l],r&&parseInt(l,10)==l&&(i[a]=Polymer.Coll ection.get(r).getKey(s))),!s)return;r=Array.isArray(s)?s:null}if(r){var c,h,u=Po lymer.Collection.get(r);"#"==o[0]?(h=o,c=u.getItem(h),o=r.indexOf(c),u.setItem(h ,t)):parseInt(o,10)==o&&(c=s[o],h=u.getKey(c),i[a]=h,u.setItem(h,t))}s[o]=t,n||t his._notifyPath(i.join("."),t)}else s[e]=t},get:function(e,t){return this._get(e ,t)},_get:function(e,t,n){for(var r,s=t||this,i=this._getPathParts(e),o=0;o<i.le ngth;o++){if(!s)return;var a=i[o];r&&"#"==a[0]?s=Polymer.Collection.get(r).getIt em(a):(s=s[a],n&&r&&parseInt(a,10)==a&&(i[o]=Polymer.Collection.get(r).getKey(s) )),r=Array.isArray(s)?s:null}return n&&(n.path=i.join(".")),s},_pathEffector:fun ction(t,n){var r=e.root(t),s=this._propertyEffects&&this._propertyEffects[r];if( s)for(var i,o=0;o<s.length&&(i=s[o]);o++){var a=i.pathFn;a&&a.call(this,t,n,i.ef fect)}this._boundPaths&&this._notifyBoundPaths(t,n)},_annotationPathEffect:funct ion(t,n,r){if(e.matches(r.value,!1,t))Polymer.Bind._annotationEffect.call(this,t ,n,r);else if(!r.negate&&e.isDescendant(r.value,t)){var s=this._nodes[r.index];i f(s&&s._notifyPath){var i=e.translate(r.value,r.name,t);s._notifyPath(i,n,!0)}}} ,_complexObserverPathEffect:function(t,n,r){e.matches(r.trigger.name,r.trigger.w ildcard,t)&&Polymer.Bind._complexObserverEffect.call(this,t,n,r)},_computePathEf fect:function(t,n,r){e.matches(r.trigger.name,r.trigger.wildcard,t)&&Polymer.Bin d._computeEffect.call(this,t,n,r)},_annotatedComputationPathEffect:function(t,n, r){e.matches(r.trigger.name,r.trigger.wildcard,t)&&Polymer.Bind._annotatedComput ationEffect.call(this,t,n,r)},linkPaths:function(e,t){this._boundPaths=this._bou ndPaths||{},t?this._boundPaths[e]=t:this.unlinkPaths(e)},unlinkPaths:function(e) {this._boundPaths&&delete this._boundPaths[e]},_notifyBoundPaths:function(t,n){f or(var r in this._boundPaths){var s=this._boundPaths[r];e.isDescendant(r,t)?this ._notifyPath(e.translate(r,s,t),n):e.isDescendant(s,t)&&this._notifyPath(e.trans late(s,r,t),n)}},_notifyPathUp:function(t,n){var r=e.root(t),s=Polymer.CaseMap.c amelToDashCase(r),i=s+this._EVENT_CHANGED;this.fire(i,{path:t,value:n},{bubbles: !1,_useCache:Polymer.Settings.eventDataCache||!Polymer.Settings.isIE})},_EVENT_C HANGED:"-changed",notifySplices:function(e,t){var n={},r=this._get(e,this,n);thi s._notifySplices(r,n.path,t)},_notifySplices:function(e,t,n){var r={keySplices:P olymer.Collection.applySplices(e,n),indexSplices:n},s=t+".splices";this._notifyP ath(s,r),this._notifyPath(t+".length",e.length),this.__data__[s]={keySplices:nul l,indexSplices:null}},_notifySplice:function(e,t,n,r,s){this._notifySplices(e,t, [{index:n,addedCount:r,removed:s,object:e,type:"splice"}])},push:function(e){var t={},n=this._get(e,this,t),r=Array.prototype.slice.call(arguments,1),s=n.length ,i=n.push.apply(n,r);return r.length&&this._notifySplice(n,t.path,s,r.length,[]) ,i},pop:function(e){var t={},n=this._get(e,this,t),r=Boolean(n.length),s=Array.p rototype.slice.call(arguments,1),i=n.pop.apply(n,s);return r&&this._notifySplice (n,t.path,n.length,0,[i]),i},splice:function(e,t){var n={},r=this._get(e,this,n) ;t=t<0?r.length-Math.floor(-t):Math.floor(t),t||(t=0);var s=Array.prototype.slic e.call(arguments,1),i=r.splice.apply(r,s),o=Math.max(s.length-2,0);return(o||i.l ength)&&this._notifySplice(r,n.path,t,o,i),i},shift:function(e){var t={},n=this. _get(e,this,t),r=Boolean(n.length),s=Array.prototype.slice.call(arguments,1),i=n .shift.apply(n,s);return r&&this._notifySplice(n,t.path,0,0,[i]),i},unshift:func tion(e){var t={},n=this._get(e,this,t),r=Array.prototype.slice.call(arguments,1) ,s=n.unshift.apply(n,r);return r.length&&this._notifySplice(n,t.path,0,r.length, []),s},prepareModelNotifyPath:function(e){this.mixin(e,{fire:Polymer.Base.fire,_ getEvent:Polymer.Base._getEvent,__eventCache:Polymer.Base.__eventCache,notifyPat h:Polymer.Base.notifyPath,_get:Polymer.Base._get,_EVENT_CHANGED:Polymer.Base._EV ENT_CHANGED,_notifyPath:Polymer.Base._notifyPath,_notifyPathUp:Polymer.Base._not ifyPathUp,_pathEffector:Polymer.Base._pathEffector,_annotationPathEffect:Polymer .Base._annotationPathEffect,_complexObserverPathEffect:Polymer.Base._complexObse rverPathEffect,_annotatedComputationPathEffect:Polymer.Base._annotatedComputatio nPathEffect,_computePathEffect:Polymer.Base._computePathEffect,_notifyBoundPaths :Polymer.Base._notifyBoundPaths,_getPathParts:Polymer.Base._getPathParts})}})}() ,Polymer.Base._addFeature({resolveUrl:function(e){return Polymer.ResolveUrl.reso lveUrl(e,this._importPath)}}),Polymer.CssParse=function(){return{parse:function( e){return e=this._clean(e),this._parseCss(this._lex(e),e)},_clean:function(e){re turn e.replace(this._rx.comments,"").replace(this._rx.port,"")},_lex:function(e) {for(var t={start:0,end:e.length},n=t,r=0,s=e.length;r<s;r++)switch(e[r]){case t his.OPEN_BRACE:n.rules||(n.rules=[]);var i=n,o=i.rules[i.rules.length-1];n={star t:r+1,parent:i,previous:o},i.rules.push(n);break;case this.CLOSE_BRACE:n.end=r+1 ,n=n.parent||t}return t},_parseCss:function(e,t){var n=t.substring(e.start,e.end -1);if(e.parsedCssText=e.cssText=n.trim(),e.parent){var r=e.previous?e.previous. end:e.parent.start;n=t.substring(r,e.start-1),n=this._expandUnicodeEscapes(n),n= n.replace(this._rx.multipleSpaces," "),n=n.substring(n.lastIndexOf(";")+1);var s =e.parsedSelector=e.selector=n.trim();e.atRule=0===s.indexOf(this.AT_START),e.at Rule?0===s.indexOf(this.MEDIA_START)?e.type=this.types.MEDIA_RULE:s.match(this._ rx.keyframesRule)&&(e.type=this.types.KEYFRAMES_RULE,e.keyframesName=e.selector. split(this._rx.multipleSpaces).pop()):0===s.indexOf(this.VAR_START)?e.type=this. types.MIXIN_RULE:e.type=this.types.STYLE_RULE}var i=e.rules;if(i)for(var o,a=0,l =i.length;a<l&&(o=i[a]);a++)this._parseCss(o,t);return e},_expandUnicodeEscapes: function(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,function(){for(var e=argume nts[1],t=6-e.length;t--;)e="0"+e;return"\\"+e})},stringify:function(e,t,n){n=n|| "";var r="";if(e.cssText||e.rules){var s=e.rules;if(s&&!this._hasMixinRules(s))f or(var i,o=0,a=s.length;o<a&&(i=s[o]);o++)r=this.stringify(i,t,r);else r=t?e.css Text:this.removeCustomProps(e.cssText),r=r.trim(),r&&(r=" "+r+"\n")}return r&&( e.selector&&(n+=e.selector+" "+this.OPEN_BRACE+"\n"),n+=r,e.selector&&(n+=this.C LOSE_BRACE+"\n\n")),n},_hasMixinRules:function(e){return 0===e[0].selector.index Of(this.VAR_START)},removeCustomProps:function(e){return e=this.removeCustomProp Assignment(e),this.removeCustomPropApply(e)},removeCustomPropAssignment:function (e){return e.replace(this._rx.customProp,"").replace(this._rx.mixinProp,"")},rem oveCustomPropApply:function(e){return e.replace(this._rx.mixinApply,"").replace( this._rx.varApply,"")},types:{STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_R ULE:1e3},OPEN_BRACE:"{",CLOSE_BRACE:"}",_rx:{comments:/\/\*[^*]*\*+([^\/*][^*]*\ *+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};] *?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n] |$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?: [^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpa ces:/\s+/g},VAR_START:"--",MEDIA_START:"@media",AT_START:"@"}}(),Polymer.StyleUt il=function(){var e=Polymer.Settings;return{NATIVE_VARIABLES:Polymer.Settings.us eNativeCSSProperties,MODULE_STYLES_SELECTOR:"style, link[rel=import][type~=css], template",INCLUDE_ATTR:"include",toCssText:function(e,t){return"string"==typeof e&&(e=this.parser.parse(e)),t&&this.forEachRule(e,t),this.parser.stringify(e,th is.NATIVE_VARIABLES)},forRulesInStyles:function(e,t,n){if(e)for(var r,s=0,i=e.le ngth;s<i&&(r=e[s]);s++)this.forEachRuleInStyle(r,t,n)},forActiveRulesInStyles:fu nction(e,t,n){if(e)for(var r,s=0,i=e.length;s<i&&(r=e[s]);s++)this.forEachRuleIn Style(r,t,n,!0)},rulesForStyle:function(e){return!e.__cssRules&&e.textContent&&( e.__cssRules=this.parser.parse(e.textContent)),e.__cssRules},isKeyframesSelector :function(e){return e.parent&&e.parent.type===this.ruleTypes.KEYFRAMES_RULE},for EachRuleInStyle:function(e,t,n,r){var s,i,o=this.rulesForStyle(e);t&&(s=function (n){t(n,e)}),n&&(i=function(t){n(t,e)}),this.forEachRule(o,s,i,r)},forEachRule:f unction(e,t,n,r){if(e){var s=!1;if(r&&e.type===this.ruleTypes.MEDIA_RULE){var i= e.selector.match(this.rx.MEDIA_MATCH);i&&(window.matchMedia(i[1]).matches||(s=!0 ))}e.type===this.ruleTypes.STYLE_RULE?t(e):n&&e.type===this.ruleTypes.KEYFRAMES_ RULE?n(e):e.type===this.ruleTypes.MIXIN_RULE&&(s=!0);var o=e.rules;if(o&&!s)for( var a,l=0,c=o.length;l<c&&(a=o[l]);l++)this.forEachRule(a,t,n,r)}},applyCss:func tion(e,t,n,r){var s=this.createScopeStyle(e,t);return this.applyStyle(s,n,r)},ap plyStyle:function(e,t,n){t=t||document.head;var r=n&&n.nextSibling||t.firstChild ;return this.__lastHeadApplyNode=e,t.insertBefore(e,r)},createScopeStyle:functio n(e,t){var n=document.createElement("style");return t&&n.setAttribute("scope",t) ,n.textContent=e,n},__lastHeadApplyNode:null,applyStylePlaceHolder:function(e){v ar t=document.createComment(" Shady DOM styles for "+e+" "),n=this.__lastHeadApp lyNode?this.__lastHeadApplyNode.nextSibling:null,r=document.head;return r.insert Before(t,n||r.firstChild),this.__lastHeadApplyNode=t,t},cssFromModules:function( e,t){for(var n=e.trim().split(" "),r="",s=0;s<n.length;s++)r+=this.cssFromModule (n[s],t);return r},cssFromModule:function(e,t){var n=Polymer.DomModule.import(e) ;return n&&!n._cssText&&(n._cssText=this.cssFromElement(n)),!n&&t&&console.warn( "Could not find style data in module named",e),n&&n._cssText||""},cssFromElement :function(e){for(var t,n="",r=e.content||e,s=Polymer.TreeApi.arrayCopy(r.querySe lectorAll(this.MODULE_STYLES_SELECTOR)),i=0;i<s.length;i++)if(t=s[i],"template"= ==t.localName)t.hasAttribute("preserve-content")||(n+=this.cssFromElement(t));el se if("style"===t.localName){var o=t.getAttribute(this.INCLUDE_ATTR);o&&(n+=this .cssFromModules(o,!0)),t=t.__appliedElement||t,t.parentNode.removeChild(t),n+=th is.resolveCss(t.textContent,e.ownerDocument)}else t.import&&t.import.body&&(n+=t his.resolveCss(t.import.body.textContent,t.import));return n},styleIncludesToTem plate:function(e){for(var t,n=e.content.querySelectorAll("style[include]"),r=0;r <n.length;r++)t=n[r],t.parentNode.insertBefore(this._includesToFragment(t.getAtt ribute("include")),t)},_includesToFragment:function(e){for(var t=e.trim().split( " "),n=document.createDocumentFragment(),r=0;r<t.length;r++){var s=Polymer.DomMo dule.import(t[r],"template");s&&this._addStylesToFragment(n,s.content)}return n} ,_addStylesToFragment:function(e,t){for(var n,r=t.querySelectorAll("style"),s=0; s<r.length;s++){n=r[s];var i=n.getAttribute("include");i&&e.appendChild(this._in cludesToFragment(i)),n.textContent&&e.appendChild(n.cloneNode(!0))}},isTargetedB uild:function(t){return e.useNativeShadow?"shadow"===t:"shady"===t},cssBuildType ForModule:function(e){var t=Polymer.DomModule.import(e);if(t)return this.getCssB uildType(t)},getCssBuildType:function(e){return e.getAttribute("css-build")},_fi ndMatchingParen:function(e,t){for(var n=0,r=t,s=e.length;r<s;r++)switch(e[r]){ca se"(":n++;break;case")":if(0===--n)return r}return-1},processVariableAndFallback :function(e,t){var n=e.indexOf("var(");if(n===-1)return t(e,"","","");var r=this ._findMatchingParen(e,n+3),s=e.substring(n+4,r),i=e.substring(0,n),o=this.proces sVariableAndFallback(e.substring(r+1),t),a=s.indexOf(",");if(a===-1)return t(i,s .trim(),"",o);var l=s.substring(0,a).trim(),c=s.substring(a+1).trim();return t(i ,l,c,o)},rx:{VAR_ASSIGN:/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:([^;{]*)|{([^}]*)}) (?:(?=[;\s}])|$)/gi,MIXIN_MATCH:/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,VAR_CONSU MED:/(--[\w-]+)\s*([:,;)]|$)/gi,ANIMATION_MATCH:/(animation\s*:)|(animation-name \s*:)/,MEDIA_MATCH:/@media[^(]*(\([^)]*\))/,IS_VAR:/^--/,BRACKETED:/\{[^}]*\}/g, HOST_PREFIX:"(?:^|[^.#[:])",HOST_SUFFIX:"($|[.:[\\s>+~])"},resolveCss:Polymer.Re solveUrl.resolveCss,parser:Polymer.CssParse,ruleTypes:Polymer.CssParse.types}}() ,Polymer.StyleTransformer=function(){var e=Polymer.StyleUtil,t=Polymer.Settings, n={dom:function(e,t,n,r){this._transformDom(e,t||"",n,r)},_transformDom:function (e,t,n,r){e.setAttribute&&this.element(e,t,n,r);for(var s=Polymer.dom(e).childNo des,i=0;i<s.length;i++)this._transformDom(s[i],t,n,r)},element:function(e,t,n,s) {if(n)s?e.removeAttribute(r):e.setAttribute(r,t);else if(t)if(e.classList)s?(e.c lassList.remove(r),e.classList.remove(t)):(e.classList.add(r),e.classList.add(t) );else if(e.getAttribute){var i=e.getAttribute(g);s?i&&e.setAttribute(g,i.replac e(r,"").replace(t,"")):e.setAttribute(g,(i?i+" ":"")+r+" "+t)}},elementStyles:fu nction(n,r){var s,i=n._styles,o="",a=n.__cssBuild,l=t.useNativeShadow||"shady"== =a;if(l){var h=this;s=function(e){e.selector=h._slottedToContent(e.selector),e.s elector=e.selector.replace(c,":host > *"),r&&r(e)}}for(var u,f=0,p=i.length;f<p& &(u=i[f]);f++){var d=e.rulesForStyle(u);o+=l?e.toCssText(d,s):this.css(d,n.is,n. extends,r,n._scopeCssViaAttr)+"\n\n"}return o.trim()},css:function(t,n,r,s,i){va r o=this._calcHostScope(n,r);n=this._calcElementScope(n,i);var a=this;return e.t oCssText(t,function(e){e.isScoped||(a.rule(e,n,o),e.isScoped=!0),s&&s(e,n,o)})}, _calcElementScope:function(e,t){return e?t?m+e+y:_+e:""},_calcHostScope:function (e,t){return t?"[is="+e+"]":e},rule:function(e,t,n){this._transformRule(e,this._ transformComplexSelector,t,n)},_transformRule:function(e,t,n,r){e.selector=e.tra nsformedSelector=this._transformRuleCss(e,t,n,r)},_transformRuleCss:function(t,n ,r,s){var o=t.selector.split(i);if(!e.isKeyframesSelector(t))for(var a,l=0,c=o.l ength;l<c&&(a=o[l]);l++)o[l]=n.call(this,a,r,s);return o.join(i)},_transformComp lexSelector:function(e,t,n){var r=!1,s=!1,a=this;return e=e.trim(),e=this._slott edToContent(e),e=e.replace(c,":host > *"),e=e.replace(P,l+" $1"),e=e.replace(o,f unction(e,i,o){if(r)o=o.replace(d," ");else{var l=a._transformCompoundSelector(o ,i,t,n);r=r||l.stop,s=s||l.hostContext,i=l.combinator,o=l.value}return i+o}),s&& (e=e.replace(f,function(e,t,r,s){return t+r+" "+n+s+i+" "+t+n+r+s})),e},_transfo rmCompoundSelector:function(e,t,n,r){var s=e.search(d),i=!1;e.indexOf(u)>=0?i=!0 :e.indexOf(l)>=0?e=this._transformHostSelector(e,r):0!==s&&(e=n?this._transformS impleSelector(e,n):e),e.indexOf(p)>=0&&(t="");var o;return s>=0&&(e=e.replace(d, " "),o=!0),{value:e,combinator:t,stop:o,hostContext:i}},_transformSimpleSelector :function(e,t){var n=e.split(v);return n[0]+=t,n.join(v)},_transformHostSelector :function(e,t){var n=e.match(h),r=n&&n[2].trim()||"";if(r){if(r[0].match(a))retu rn e.replace(h,function(e,n,r){return t+r});var s=r.split(a)[0];return s===t?r:S }return e.replace(l,t)},documentRule:function(e){e.selector=e.parsedSelector,thi s.normalizeRootSelector(e),t.useNativeShadow||this._transformRule(e,this._transf ormDocumentSelector)},normalizeRootSelector:function(e){e.selector=e.selector.re place(c,"html");var t=e.selector.split(i);t=t.filter(function(e){return!e.match( C)}),e.selector=t.join(i)},_transformDocumentSelector:function(e){return e.match (d)?this._transformComplexSelector(e,s):this._transformSimpleSelector(e.trim(),s )},_slottedToContent:function(e){return e.replace(E,p+"> $1")},SCOPE_NAME:"style -scope"},r=n.SCOPE_NAME,s=":not(["+r+"]):not(."+r+")",i=",",o=/(^|[\s>+~]+)((?:\ [.+?\]|[^\s>+~=\[])+)/g,a=/[[.:#*]/,l=":host",c=":root",h=/(:host)(?:\(((?:\([^) (]*\)|[^)(]*)+?)\))/,u=":host-context",f=/(.*)(?::host-context)(?:\(((?:\([^)(]* \)|[^)(]*)+?)\))(.*)/,p="::content",d=/::content|::shadow|\/deep\//,_=".",m="["+ r+"~=",y="]",v=":",g="class",P=new RegExp("^("+p+")"),S="should_not_match",E=/(? :::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/g,C=/:host(?:\s*>\s*\*)?/;return n} (),Polymer.StyleExtends=function(){var e=Polymer.StyleUtil;return{hasExtends:fun ction(e){return Boolean(e.match(this.rx.EXTEND))},transform:function(t){var n=e. rulesForStyle(t),r=this;return e.forEachRule(n,function(e){if(r._mapRuleOntoPare nt(e),e.parent)for(var t;t=r.rx.EXTEND.exec(e.cssText);){var n=t[1],s=r._findExt endor(n,e);s&&r._extendRule(e,s)}e.cssText=e.cssText.replace(r.rx.EXTEND,"")}),e .toCssText(n,function(e){e.selector.match(r.rx.STRIP)&&(e.cssText="")},!0)},_map RuleOntoParent:function(e){if(e.parent){for(var t,n=e.parent.map||(e.parent.map= {}),r=e.selector.split(","),s=0;s<r.length;s++)t=r[s],n[t.trim()]=e;return n}},_ findExtendor:function(e,t){return t.parent&&t.parent.map&&t.parent.map[e]||this. _findExtendor(e,t.parent)},_extendRule:function(e,t){e.parent!==t.parent&&this._ cloneAndAddRuleToParent(t,e.parent),e.extends=e.extends||[],e.extends.push(t),t. selector=t.selector.replace(this.rx.STRIP,""),t.selector=(t.selector&&t.selector +",\n")+e.selector,t.extends&&t.extends.forEach(function(t){this._extendRule(e,t )},this)},_cloneAndAddRuleToParent:function(e,t){e=Object.create(e),e.parent=t,e .extends&&(e.extends=e.extends.slice()),t.rules.push(e)},rx:{EXTEND:/@extends\(( [^)]*)\)\s*?;/gim,STRIP:/%[^,]*$/}}}(),Polymer.ApplyShim=function(){"use strict" ;function e(e,t){e=e.trim(),m[e]={properties:t,dependants:{}}}function t(e){retu rn e=e.trim(),m[e]}function n(e,t){var n=d.exec(t);return n&&(t=n[1]?y._getIniti alValueForProperty(e):"apply-shim-inherit"),t}function r(e){for(var t,r,s,i,o=e. split(";"),a={},l=0;l<o.length;l++)s=o[l],s&&(i=s.split(":"),i.length>1&&(t=i[0] .trim(),r=n(t,i.slice(1).join(":")),a[t]=r));return a}function s(e){var t=y.__cu rrentElementProto,n=t&&t.is;for(var r in e.dependants)r!==n&&(e.dependants[r].__ applyShimInvalid=!0)}function i(n,i,o,a){if(o&&c.processVariableAndFallback(o,fu nction(e,n){n&&t(n)&&(a="@apply "+n+";")}),!a)return n;var h=l(a),u=n.slice(0,n. indexOf("--")),f=r(h),p=f,d=t(i),m=d&&d.properties;m?(p=Object.create(m),p=Polym er.Base.mixin(p,f)):e(i,p);var y,v,g=[],P=!1;for(y in p)v=f[y],void 0===v&&(v="i nitial"),!m||y in m||(P=!0),g.push(i+_+y+": "+v);return P&&s(d),d&&(d.properties =p),o&&(u=n+";"+u),u+g.join("; ")+";"}function o(e,t,n){return"var("+t+",var("+n +"))"}function a(n,r){n=n.replace(p,"");var s=[],i=t(n);if(i||(e(n,{}),i=t(n)),i ){var o=y.__currentElementProto;o&&(i.dependants[o.is]=o);var a,l,c;for(a in i.p roperties)c=r&&r[a],l=[a,": var(",n,_,a],c&&l.push(",",c),l.push(")"),s.push(l.j oin(""))}return s.join("; ")}function l(e){for(var t;t=h.exec(e);){var n=t[0],s= t[1],i=t.index,o=i+n.indexOf("@apply"),l=i+n.length,c=e.slice(0,o),u=e.slice(l), f=r(c),p=a(s,f);e=[c,p,u].join(""),h.lastIndex=i+p.length}return e}var c=Polymer .StyleUtil,h=c.rx.MIXIN_MATCH,u=c.rx.VAR_ASSIGN,f=/var\(\s*(--[^,]*),\s*(--[^)]* )\)/g,p=/;\s*/m,d=/^\s*(initial)|(inherit)\s*$/,_="_-_",m={},y={_measureElement: null,_map:m,_separator:_,transform:function(e,t){this.__currentElementProto=t,c. forRulesInStyles(e,this._boundFindDefinitions),c.forRulesInStyles(e,this._boundF indApplications),t&&(t.__applyShimInvalid=!1),this.__currentElementProto=null},_ findDefinitions:function(e){var t=e.parsedCssText;t=t.replace(f,o),t=t.replace(u ,i),e.cssText=t,":root"===e.selector&&(e.selector=":host > *")},_findApplication s:function(e){e.cssText=l(e.cssText)},transformRule:function(e){this._findDefini tions(e),this._findApplications(e)},_getInitialValueForProperty:function(e){retu rn this._measureElement||(this._measureElement=document.createElement("meta"),th is._measureElement.style.all="initial",document.head.appendChild(this._measureEl ement)),window.getComputedStyle(this._measureElement).getPropertyValue(e)}};retu rn y._boundTransformRule=y.transformRule.bind(y),y._boundFindDefinitions=y._find Definitions.bind(y),y._boundFindApplications=y._findApplications.bind(y),y}(),fu nction(){var e=Polymer.Base._prepElement,t=Polymer.Settings.useNativeShadow,n=Po lymer.StyleUtil,r=Polymer.StyleTransformer,s=Polymer.StyleExtends,i=Polymer.Appl yShim,o=Polymer.Settings;Polymer.Base._addFeature({_prepElement:function(t){this ._encapsulateStyle&&"shady"!==this.__cssBuild&&r.element(t,this.is,this._scopeCs sViaAttr),e.call(this,t)},_prepStyles:function(){void 0===this._encapsulateStyle &&(this._encapsulateStyle=!t),t||(this._scopeStyle=n.applyStylePlaceHolder(this. is)),this.__cssBuild=n.cssBuildTypeForModule(this.is)},_prepShimStyles:function( ){if(this._template){var e=n.isTargetedBuild(this.__cssBuild);if(o.useNativeCSSP roperties&&"shadow"===this.__cssBuild&&e)return void(o.preserveStyleIncludes&&n. styleIncludesToTemplate(this._template));this._styles=this._styles||this._collec tStyles(),o.useNativeCSSProperties&&!this.__cssBuild&&i.transform(this._styles,t his);var s=o.useNativeCSSProperties&&e?this._styles.length&&this._styles[0].text Content.trim():r.elementStyles(this);this._prepStyleProperties(),!this._needsSty leProperties()&&s&&n.applyCss(s,this.is,t?this._template.content:null,this._scop eStyle)}else this._styles=[]},_collectStyles:function(){var e=[],t="",r=this.sty leModules;if(r)for(var i,o=0,a=r.length;o<a&&(i=r[o]);o++)t+=n.cssFromModule(i); t+=n.cssFromModule(this.is);var l=this._template&&this._template.parentNode;if(! this._template||l&&l.id.toLowerCase()===this.is||(t+=n.cssFromElement(this._temp late)),t){var c=document.createElement("style");c.textContent=t,s.hasExtends(c.t extContent)&&(t=s.transform(c)),e.push(c)}return e},_elementAdd:function(e){this ._encapsulateStyle&&(e.__styleScoped?e.__styleScoped=!1:r.dom(e,this.is,this._sc opeCssViaAttr))},_elementRemove:function(e){this._encapsulateStyle&&r.dom(e,this .is,this._scopeCssViaAttr,!0)},scopeSubtree:function(e,n){if(!t){var r=this,s=fu nction(e){if(e.nodeType===Node.ELEMENT_NODE){var t=e.getAttribute("class");e.set Attribute("class",r._scopeElementClass(e,t));for(var n,s=e.querySelectorAll("*") ,i=0;i<s.length&&(n=s[i]);i++)t=n.getAttribute("class"),n.setAttribute("class",r ._scopeElementClass(n,t))}};if(s(e),n){var i=new MutationObserver(function(e){fo r(var t,n=0;n<e.length&&(t=e[n]);n++)if(t.addedNodes)for(var r=0;r<t.addedNodes. length;r++)s(t.addedNodes[r])});return i.observe(e,{childList:!0,subtree:!0}),i} }}})}(),Polymer.StyleProperties=function(){"use strict";function e(e,t){var n=pa rseInt(e/32),r=1<<e%32;t[n]=(t[n]||0)|r}var t=Polymer.DomApi.matchesSelector,n=P olymer.StyleUtil,r=Polymer.StyleTransformer,s=navigator.userAgent.match("Trident "),i=Polymer.Settings;return{decorateStyles:function(e,t){var s=this,i={},o=[],a =0,l=r._calcHostScope(t.is,t.extends);n.forRulesInStyles(e,function(e,r){s.decor ateRule(e),e.index=a++,s.whenHostOrRootRule(t,e,r,function(r){if(e.parent.type== =n.ruleTypes.MEDIA_RULE&&(t.__notStyleScopeCacheable=!0),r.isHost){var s=r.selec tor.split(" ").some(function(e){return 0===e.indexOf(l)&&e.length!==l.length});t .__notStyleScopeCacheable=t.__notStyleScopeCacheable||s}}),s.collectPropertiesIn CssText(e.propertyInfo.cssText,i)},function(e){o.push(e)}),e._keyframes=o;var c= [];for(var h in i)c.push(h);return c},decorateRule:function(e){if(e.propertyInfo )return e.propertyInfo;var t={},n={},r=this.collectProperties(e,n);return r&&(t. properties=n,e.rules=null),t.cssText=this.collectCssText(e),e.propertyInfo=t,t}, collectProperties:function(e,t){var n=e.propertyInfo;if(!n){for(var r,s,i,o=this .rx.VAR_ASSIGN,a=e.parsedCssText;r=o.exec(a);)s=(r[2]||r[3]).trim(),"inherit"!== s&&(t[r[1].trim()]=s),i=!0;return i}if(n.properties)return Polymer.Base.mixin(t, n.properties),!0},collectCssText:function(e){return this.collectConsumingCssText (e.parsedCssText)},collectConsumingCssText:function(e){return e.replace(this.rx. BRACKETED,"").replace(this.rx.VAR_ASSIGN,"")},collectPropertiesInCssText:functio n(e,t){for(var n;n=this.rx.VAR_CONSUMED.exec(e);){var r=n[1];":"!==n[2]&&(t[r]=! 0)}},reify:function(e){for(var t,n=Object.getOwnPropertyNames(e),r=0;r<n.length; r++)t=n[r],e[t]=this.valueForProperty(e[t],e)},valueForProperty:function(e,t){if (e)if(e.indexOf(";")>=0)e=this.valueForProperties(e,t);else{var r=this,s=functio n(e,n,s,i){var o=r.valueForProperty(t[n],t);return o&&"initial"!==o?"apply-shim- inherit"===o&&(o="inherit"):o=r.valueForProperty(t[s]||s,t)||s,e+(o||"")+i};e=n. processVariableAndFallback(e,s)}return e&&e.trim()||""},valueForProperties:funct ion(e,t){for(var n,r,s=e.split(";"),i=0;i<s.length;i++)if(n=s[i]){if(this.rx.MIX IN_MATCH.lastIndex=0,r=this.rx.MIXIN_MATCH.exec(n))n=this.valueForProperty(t[r[1 ]],t);else{var o=n.indexOf(":");if(o!==-1){var a=n.substring(o);a=a.trim(),a=thi s.valueForProperty(a,t)||a,n=n.substring(0,o)+a}}s[i]=n&&n.lastIndexOf(";")===n. length-1?n.slice(0,-1):n||""}return s.join(";")},applyProperties:function(e,t){v ar n="";e.propertyInfo||this.decorateRule(e),e.propertyInfo.cssText&&(n=this.val ueForProperties(e.propertyInfo.cssText,t)),e.cssText=n},applyKeyframeTransforms: function(e,t){var n=e.cssText,r=e.cssText;if(null==e.hasAnimations&&(e.hasAnimat ions=this.rx.ANIMATION_MATCH.test(n)),e.hasAnimations){var s;if(null==e.keyframe NamesToTransform){e.keyframeNamesToTransform=[];for(var i in t)s=t[i],r=s(n),n!= =r&&(n=r,e.keyframeNamesToTransform.push(i))}else{for(var o=0;o<e.keyframeNamesT oTransform.length;++o)s=t[e.keyframeNamesToTransform[o]],n=s(n);r=n}}e.cssText=r },propertyDataFromStyles:function(r,s){var i={},o=this,a=[];return n.forActiveRu lesInStyles(r,function(n){n.propertyInfo||o.decorateRule(n);var r=n.transformedS elector||n.parsedSelector;s&&n.propertyInfo.properties&&r&&t.call(s,r)&&(o.colle ctProperties(n,i),e(n.index,a))}),{properties:i,key:a}},_rootSelector:/:root|:ho st\s*>\s*\*/,_checkRoot:function(e,t){return Boolean(t.match(this._rootSelector) )||"html"===e&&t.indexOf("html")>-1},whenHostOrRootRule:function(e,t,n,s){if(t.p ropertyInfo||self.decorateRule(t),t.propertyInfo.properties){var o=e.is?r._calcH ostScope(e.is,e.extends):"html",a=t.parsedSelector,l=this._checkRoot(o,a),c=!l&& 0===a.indexOf(":host"),h=e.__cssBuild||n.__cssBuild;if("shady"===h&&(l=a===o+" > *."+o||a.indexOf("html")>-1,c=!l&&0===a.indexOf(o)),l||c){var u=o;c&&(i.useNati veShadow&&!t.transformedSelector&&(t.transformedSelector=r._transformRuleCss(t,r ._transformComplexSelector,e.is,o)),u=t.transformedSelector||t.parsedSelector),l &&"html"===o&&(u=t.transformedSelector||t.parsedSelector),s({selector:u,isHost:c ,isRoot:l})}}},hostAndRootPropertiesForScope:function(e){var r={},s={},i=this;re turn n.forActiveRulesInStyles(e._styles,function(n,o){i.whenHostOrRootRule(e,n,o ,function(o){var a=e._element||e;t.call(a,o.selector)&&(o.isHost?i.collectProper ties(n,r):i.collectProperties(n,s))})}),{rootProps:s,hostProps:r}},transformStyl es:function(e,t,n){var s=this,o=r._calcHostScope(e.is,e.extends),a=e.extends?"\\ "+o.slice(0,-1)+"\\]":o,l=new RegExp(this.rx.HOST_PREFIX+a+this.rx.HOST_SUFFIX), c=this._elementKeyframeTransforms(e,n);return r.elementStyles(e,function(r){s.ap plyProperties(r,t),i.useNativeShadow||Polymer.StyleUtil.isKeyframesSelector(r)|| !r.cssText||(s.applyKeyframeTransforms(r,c),s._scopeSelector(r,l,o,e._scopeCssVi aAttr,n))})},_elementKeyframeTransforms:function(e,t){var n=e._styles._keyframes ,r={};if(!i.useNativeShadow&&n)for(var s=0,o=n[s];s<n.length;o=n[++s])this._scop eKeyframes(o,t),r[o.keyframesName]=this._keyframesRuleTransformer(o);return r},_ keyframesRuleTransformer:function(e){return function(t){return t.replace(e.keyfr amesNameRx,e.transformedKeyframesName)}},_scopeKeyframes:function(e,t){e.keyfram esNameRx=new RegExp(e.keyframesName,"g"),e.transformedKeyframesName=e.keyframesN ame+"-"+t,e.transformedSelector=e.transformedSelector||e.selector,e.selector=e.t ransformedSelector.replace(e.keyframesName,e.transformedKeyframesName)},_scopeSe lector:function(e,t,n,s,i){e.transformedSelector=e.transformedSelector||e.select or;for(var o,a=e.transformedSelector,l=s?"["+r.SCOPE_NAME+"~="+i+"]":"."+i,c=a.s plit(","),h=0,u=c.length;h<u&&(o=c[h]);h++)c[h]=o.match(t)?o.replace(n,l):l+" "+ o;e.selector=c.join(",")},applyElementScopeSelector:function(e,t,n,s){var i=s?e. getAttribute(r.SCOPE_NAME):e.getAttribute("class")||"",o=n?i.replace(n,t):(i?i+" ":"")+this.XSCOPE_NAME+" "+t;i!==o&&(s?e.setAttribute(r.SCOPE_NAME,o):e.setAttr ibute("class",o))},applyElementStyle:function(e,t,r,o){var a=o?o.textContent||"" :this.transformStyles(e,t,r),l=e._customStyle;return l&&!i.useNativeShadow&&l!== o&&(l._useCount--,l._useCount<=0&&l.parentNode&&l.parentNode.removeChild(l)),i.u seNativeShadow?e._customStyle?(e._customStyle.textContent=a,o=e._customStyle):a& &(o=n.applyCss(a,r,e.root,e._scopeStyle)):o?o.parentNode||(s&&a.indexOf("@media" )>-1&&(o.textContent=a),n.applyStyle(o,null,e._scopeStyle)):a&&(o=n.applyCss(a,r ,null,e._scopeStyle)),o&&(o._useCount=o._useCount||0,e._customStyle!=o&&o._useCo unt++,e._customStyle=o),o},mixinCustomStyle:function(e,t){var n;for(var r in t)n =t[r],(n||0===n)&&(e[r]=n)},updateNativeStyleProperties:function(e,t){var n=e.__ customStyleProperties;if(n)for(var r=0;r<n.length;r++)e.style.removeProperty(n[r ]);var s=[];for(var i in t)null!==t[i]&&(e.style.setProperty(i,t[i]),s.push(i)); e.__customStyleProperties=s},rx:n.rx,XSCOPE_NAME:"x-scope"}}(),function(){Polyme r.StyleCache=function(){this.cache={}},Polymer.StyleCache.prototype={MAX:100,sto re:function(e,t,n,r){t.keyValues=n,t.styles=r;var s=this.cache[e]=this.cache[e]| |[];s.push(t),s.length>this.MAX&&s.shift()},retrieve:function(e,t,n){var r=this. cache[e];if(r)for(var s,i=r.length-1;i>=0;i--)if(s=r[i],n===s.styles&&this._obje ctsEqual(t,s.keyValues))return s},clear:function(){this.cache={}},_objectsEqual: function(e,t){var n,r;for(var s in e)if(n=e[s],r=t[s],!("object"==typeof n&&n?th is._objectsStrictlyEqual(n,r):n===r))return!1;return!Array.isArray(e)||e.length= ==t.length},_objectsStrictlyEqual:function(e,t){return this._objectsEqual(e,t)&& this._objectsEqual(t,e)}}}(),Polymer.StyleDefaults=function(){var e=Polymer.Styl eProperties,t=Polymer.StyleCache,n=Polymer.Settings.useNativeCSSProperties,r={_s tyles:[],_properties:null,customStyle:{},_styleCache:new t,_element:Polymer.DomA pi.wrap(document.documentElement),addStyle:function(e){this._styles.push(e),this ._properties=null},get _styleProperties(){return this._properties||(e.decorateSt yles(this._styles,this),this._styles._scopeStyleProperties=null,this._properties =e.hostAndRootPropertiesForScope(this).rootProps,e.mixinCustomStyle(this._proper ties,this.customStyle),e.reify(this._properties)),this._properties},hasStyleProp erties:function(){return Boolean(this._properties)},_needsStyleProperties:functi on(){},_computeStyleProperties:function(){return this._styleProperties},updateSt yles:function(t){
4 this._properties=null,t&&Polymer.Base.mixin(this.customStyle,t),this._styleCache .clear();for(var r,s=0;s<this._styles.length;s++)r=this._styles[s],r=r.__importE lement||r,r._apply();n&&e.updateNativeStyleProperties(document.documentElement,t his.customStyle)}};return r}(),function(){"use strict";var e=Polymer.Base.serial izeValueToAttribute,t=Polymer.StyleProperties,n=Polymer.StyleTransformer,r=Polym er.StyleDefaults,s=Polymer.Settings.useNativeShadow,i=Polymer.Settings.useNative CSSProperties;Polymer.Base._addFeature({_prepStyleProperties:function(){i||(this ._ownStylePropertyNames=this._styles&&this._styles.length?t.decorateStyles(this. _styles,this):null)},customStyle:null,getComputedStyleValue:function(e){return i ||this._styleProperties||this._computeStyleProperties(),!i&&this._stylePropertie s&&this._styleProperties[e]||getComputedStyle(this).getPropertyValue(e)},_setupS tyleProperties:function(){this.customStyle={},this._styleCache=null,this._styleP roperties=null,this._scopeSelector=null,this._ownStyleProperties=null,this._cust omStyle=null},_needsStyleProperties:function(){return Boolean(!i&&this._ownStyle PropertyNames&&this._ownStylePropertyNames.length)},_validateApplyShim:function( ){if(this.__applyShimInvalid){Polymer.ApplyShim.transform(this._styles,this.__pr oto__);var e=n.elementStyles(this);if(s){var t=this._template.content.querySelec tor("style");t&&(t.textContent=e)}else{var r=this._scopeStyle&&this._scopeStyle. nextSibling;r&&(r.textContent=e)}}},_beforeAttached:function(){this._scopeSelect or&&!this.__stylePropertiesInvalid||!this._needsStyleProperties()||(this.__style PropertiesInvalid=!1,this._updateStyleProperties())},_findStyleHost:function(){f or(var e,t=this;e=Polymer.dom(t).getOwnerRoot();){if(Polymer.isInstance(e.host)) return e.host;t=e.host}return r},_updateStyleProperties:function(){var e,n=this. _findStyleHost();n._styleProperties||n._computeStyleProperties(),n._styleCache|| (n._styleCache=new Polymer.StyleCache);var r=t.propertyDataFromStyles(n._styles, this),i=!this.__notStyleScopeCacheable;i&&(r.key.customStyle=this.customStyle,e= n._styleCache.retrieve(this.is,r.key,this._styles));var a=Boolean(e);a?this._sty leProperties=e._styleProperties:this._computeStyleProperties(r.properties),this. _computeOwnStyleProperties(),a||(e=o.retrieve(this.is,this._ownStyleProperties,t his._styles));var l=Boolean(e)&&!a,c=this._applyStyleProperties(e);a||(c=c&&s?c. cloneNode(!0):c,e={style:c,_scopeSelector:this._scopeSelector,_styleProperties:t his._styleProperties},i&&(r.key.customStyle={},this.mixin(r.key.customStyle,this .customStyle),n._styleCache.store(this.is,e,r.key,this._styles)),l||o.store(this .is,Object.create(e),this._ownStyleProperties,this._styles))},_computeStylePrope rties:function(e){var n=this._findStyleHost();n._styleProperties||n._computeStyl eProperties();var r=Object.create(n._styleProperties),s=t.hostAndRootPropertiesF orScope(this);this.mixin(r,s.hostProps),e=e||t.propertyDataFromStyles(n._styles, this).properties,this.mixin(r,e),this.mixin(r,s.rootProps),t.mixinCustomStyle(r, this.customStyle),t.reify(r),this._styleProperties=r},_computeOwnStyleProperties :function(){for(var e,t={},n=0;n<this._ownStylePropertyNames.length;n++)e=this._ ownStylePropertyNames[n],t[e]=this._styleProperties[e];this._ownStyleProperties= t},_scopeCount:0,_applyStyleProperties:function(e){var n=this._scopeSelector;thi s._scopeSelector=e?e._scopeSelector:this.is+"-"+this.__proto__._scopeCount++;var r=t.applyElementStyle(this,this._styleProperties,this._scopeSelector,e&&e.style );return s||t.applyElementScopeSelector(this,this._scopeSelector,n,this._scopeCs sViaAttr),r},serializeValueToAttribute:function(t,n,r){if(r=r||this,"class"===n& &!s){var i=r===this?this.domHost||this.dataHost:this;i&&(t=i._scopeElementClass( r,t))}r=this.shadyRoot&&this.shadyRoot._hasDistributed?Polymer.dom(r):r,e.call(t his,t,n,r)},_scopeElementClass:function(e,t){return s||this._scopeCssViaAttr||(t =(t?t+" ":"")+a+" "+this.is+(e._scopeSelector?" "+l+" "+e._scopeSelector:"")),t} ,updateStyles:function(e){e&&this.mixin(this.customStyle,e),i?t.updateNativeStyl eProperties(this,this.customStyle):(this.isAttached?this._needsStyleProperties() ?this._updateStyleProperties():this._styleProperties=null:this.__styleProperties Invalid=!0,this._styleCache&&this._styleCache.clear(),this._updateRootStyles())} ,_updateRootStyles:function(e){e=e||this.root;for(var t,n=Polymer.dom(e)._query( function(e){return e.shadyRoot||e.shadowRoot}),r=0,s=n.length;r<s&&(t=n[r]);r++) t.updateStyles&&t.updateStyles()}}),Polymer.updateStyles=function(e){r.updateSty les(e),Polymer.Base._updateRootStyles(document)};var o=new Polymer.StyleCache;Po lymer.customStyleCache=o;var a=n.SCOPE_NAME,l=t.XSCOPE_NAME}(),Polymer.Base._add Feature({_registerFeatures:function(){this._prepIs(),this.factoryImpl&&this._pre pConstructor(),this._prepStyles()},_finishRegisterFeatures:function(){this._prep Template(),this._prepShimStyles(),this._prepAnnotations(),this._prepEffects(),th is._prepBehaviors(),this._prepPropertyInfo(),this._prepBindings(),this._prepShad y()},_prepBehavior:function(e){this._addPropertyEffects(e.properties),this._addC omplexObserverEffects(e.observers),this._addHostAttributes(e.hostAttributes)},_i nitFeatures:function(){this._setupGestures(),this._setupConfigure(this.__data__) ,this._setupStyleProperties(),this._setupDebouncers(),this._setupShady(),this._r egisterHost(),this._template&&(this._validateApplyShim(),this._poolContent(),thi s._beginHosting(),this._stampTemplate(),this._endHosting(),this._marshalAnnotati onReferences()),this._marshalInstanceEffects(),this._marshalBehaviors(),this._ma rshalHostAttributes(),this._marshalAttributes(),this._tryReady()},_marshalBehavi or:function(e){e.listeners&&this._listenListeners(e.listeners)}}),function(){var e,t=Polymer.StyleProperties,n=Polymer.StyleUtil,r=Polymer.CssParse,s=Polymer.St yleDefaults,i=Polymer.StyleTransformer,o=Polymer.ApplyShim,a=Polymer.Debounce,l= Polymer.Settings;Polymer({is:"custom-style",extends:"style",_template:null,prope rties:{include:String},ready:function(){this.__appliedElement=this.__appliedElem ent||this,this.__cssBuild=n.getCssBuildType(this),this.__appliedElement!==this&& (this.__appliedElement.__cssBuild=this.__cssBuild),this._tryApply()},attached:fu nction(){this._tryApply()},_tryApply:function(){if(!this._appliesToDocument&&thi s.parentNode&&"dom-module"!==this.parentNode.localName){this._appliesToDocument= !0;var e=this.__appliedElement;if(l.useNativeCSSProperties||(this.__needsUpdateS tyles=s.hasStyleProperties(),s.addStyle(e)),e.textContent||this.include)this._ap ply(!0);else{var t=this,n=new MutationObserver(function(){n.disconnect(),t._appl y(!0)});n.observe(e,{childList:!0})}}},_updateStyles:function(){Polymer.updateSt yles()},_apply:function(e){var t=this.__appliedElement;if(this.include&&(t.textC ontent=n.cssFromModules(this.include,!0)+t.textContent),t.textContent){var r=thi s.__cssBuild,s=n.isTargetedBuild(r);if(!l.useNativeCSSProperties||!s){var a=n.ru lesForStyle(t);if(s||(n.forEachRule(a,function(e){i.documentRule(e)}),l.useNativ eCSSProperties&&!r&&o.transform([t])),l.useNativeCSSProperties)t.textContent=n.t oCssText(a);else{var c=this,h=function(){c._flushCustomProperties()};e?Polymer.R enderStatus.whenReady(h):h()}}}},_flushCustomProperties:function(){this.__needsU pdateStyles?(this.__needsUpdateStyles=!1,e=a(e,this._updateStyles)):this._applyC ustomProperties()},_applyCustomProperties:function(){var e=this.__appliedElement ;this._computeStyleProperties();var s=this._styleProperties,i=n.rulesForStyle(e) ;i&&(e.textContent=n.toCssText(i,function(e){var n=e.cssText=e.parsedCssText;e.p ropertyInfo&&e.propertyInfo.cssText&&(n=r.removeCustomPropAssignment(n),e.cssTex t=t.valueForProperties(n,s))}))}})}(),Polymer.Templatizer={properties:{__hideTem plateChildren__:{observer:"_showHideChildren"}},_instanceProps:Polymer.nob,_pare ntPropPrefix:"_parent_",templatize:function(e){if(this._templatized=e,e._content ||(e._content=e.content),e._content._ctor)return this.ctor=e._content._ctor,void this._prepParentProperties(this.ctor.prototype,e);var t=Object.create(Polymer.B ase);this._customPrepAnnotations(t,e),this._prepParentProperties(t,e),t._prepEff ects(),this._customPrepEffects(t),t._prepBehaviors(),t._prepPropertyInfo(),t._pr epBindings(),t._notifyPathUp=this._notifyPathUpImpl,t._scopeElementClass=this._s copeElementClassImpl,t.listen=this._listenImpl,t._showHideChildren=this._showHid eChildrenImpl,t.__setPropertyOrig=this.__setProperty,t.__setProperty=this.__setP ropertyImpl;var n=this._constructorImpl,r=function(e,t){n.call(this,e,t)};r.prot otype=t,t.constructor=r,e._content._ctor=r,this.ctor=r},_getRootDataHost:functio n(){return this.dataHost&&this.dataHost._rootDataHost||this.dataHost},_showHideC hildrenImpl:function(e){for(var t=this._children,n=0;n<t.length;n++){var r=t[n]; Boolean(e)!=Boolean(r.__hideTemplateChildren__)&&(r.nodeType===Node.TEXT_NODE?e? (r.__polymerTextContent__=r.textContent,r.textContent=""):r.textContent=r.__poly merTextContent__:r.style&&(e?(r.__polymerDisplay__=r.style.display,r.style.displ ay="none"):r.style.display=r.__polymerDisplay__)),r.__hideTemplateChildren__=e}} ,__setPropertyImpl:function(e,t,n,r){r&&r.__hideTemplateChildren__&&"textContent "==e&&(e="__polymerTextContent__"),this.__setPropertyOrig(e,t,n,r)},_debounceTem plate:function(e){Polymer.dom.addDebouncer(this.debounce("_debounceTemplate",e)) },_flushTemplates:function(){Polymer.dom.flush()},_customPrepEffects:function(e) {var t=e._parentProps;for(var n in t)e._addPropertyEffect(n,"function",this._cre ateHostPropEffector(n));for(n in this._instanceProps)e._addPropertyEffect(n,"fun ction",this._createInstancePropEffector(n))},_customPrepAnnotations:function(e,t ){e._template=t;var n=t._content;if(!n._notes){var r=e._rootDataHost;r&&(Polymer .Annotations.prepElement=function(){r._prepElement()}),n._notes=Polymer.Annotati ons.parseAnnotations(t),Polymer.Annotations.prepElement=null,this._processAnnota tions(n._notes)}e._notes=n._notes,e._parentProps=n._parentProps},_prepParentProp erties:function(e,t){var n=this._parentProps=e._parentProps;if(this._forwardPare ntProp&&n){var r,s=e._parentPropProto;if(!s){for(r in this._instanceProps)delete n[r];s=e._parentPropProto=Object.create(null),t!=this&&(Polymer.Bind.prepareMod el(s),Polymer.Base.prepareModelNotifyPath(s));for(r in n){var i=this._parentProp Prefix+r,o=[{kind:"function",effect:this._createForwardPropEffector(r),fn:Polyme r.Bind._functionEffect},{kind:"notify",fn:Polymer.Bind._notifyEffect,effect:{eve nt:Polymer.CaseMap.camelToDashCase(i)+"-changed"}}];s._propertyEffects=s._proper tyEffects||{},s._propertyEffects[i]=o,Polymer.Bind._createAccessors(s,i,o)}}var a=this;t!=this&&(Polymer.Bind.prepareInstance(t),t._forwardParentProp=function(e ,t){a._forwardParentProp(e,t)}),this._extendTemplate(t,s),t._pathEffector=functi on(e,t,n){return a._pathEffectorImpl(e,t,n)}}},_createForwardPropEffector:functi on(e){return function(t,n){this._forwardParentProp(e,n)}},_createHostPropEffecto r:function(e){var t=this._parentPropPrefix;return function(n,r){this.dataHost._t emplatized[t+e]=r}},_createInstancePropEffector:function(e){return function(t,n, r,s){s||this.dataHost._forwardInstanceProp(this,e,n)}},_extendTemplate:function( e,t){var n=Object.getOwnPropertyNames(t);t._propertySetter&&(e._propertySetter=t ._propertySetter);for(var r,s=0;s<n.length&&(r=n[s]);s++){var i=e[r];if(i&&"_pro pertyEffects"==r){var o=Polymer.Base.mixin({},i);e._propertyEffects=Polymer.Base .mixin(o,t._propertyEffects)}else{var a=Object.getOwnPropertyDescriptor(t,r);Obj ect.defineProperty(e,r,a),void 0!==i&&e._propertySetter(r,i)}}},_showHideChildre n:function(e){},_forwardInstancePath:function(e,t,n){},_forwardInstanceProp:func tion(e,t,n){},_notifyPathUpImpl:function(e,t){var n=this.dataHost,r=Polymer.Path .root(e);n._forwardInstancePath.call(n,this,e,t),r in n._parentProps&&n._templat ized._notifyPath(n._parentPropPrefix+e,t)},_pathEffectorImpl:function(e,t,n){if( this._forwardParentPath&&0===e.indexOf(this._parentPropPrefix)){var r=e.substrin g(this._parentPropPrefix.length),s=Polymer.Path.root(r);s in this._parentProps&& this._forwardParentPath(r,t)}Polymer.Base._pathEffector.call(this._templatized,e ,t,n)},_constructorImpl:function(e,t){this._rootDataHost=t._getRootDataHost(),th is._setupConfigure(e),this._registerHost(t),this._beginHosting(),this.root=this. instanceTemplate(this._template),this.root.__noContent=!this._notes._hasContent, this.root.__styleScoped=!0,this._endHosting(),this._marshalAnnotatedNodes(),this ._marshalInstanceEffects(),this._marshalAnnotatedListeners();for(var n=[],r=this .root.firstChild;r;r=r.nextSibling)n.push(r),r._templateInstance=this;this._chil dren=n,t.__hideTemplateChildren__&&this._showHideChildren(!0),this._tryReady()}, _listenImpl:function(e,t,n){var r=this,s=this._rootDataHost,i=s._createEventHand ler(e,t,n),o=function(e){e.model=r,i(e)};s._listen(e,t,o)},_scopeElementClassImp l:function(e,t){var n=this._rootDataHost;return n?n._scopeElementClass(e,t):t},s tamp:function(e){if(e=e||{},this._parentProps){var t=this._templatized;for(var n in this._parentProps)void 0===e[n]&&(e[n]=t[this._parentPropPrefix+n])}return n ew this.ctor(e,this)},modelForElement:function(e){for(var t;e;)if(t=e._templateI nstance){if(t.dataHost==this)return t;e=t.dataHost}else e=e.parentNode}},Polymer ({is:"dom-template",extends:"template",_template:null,behaviors:[Polymer.Templat izer],ready:function(){this.templatize(this)}}),Polymer._collections=new WeakMap ,Polymer.Collection=function(e){Polymer._collections.set(e,this),this.userArray= e,this.store=e.slice(),this.initMap()},Polymer.Collection.prototype={constructor :Polymer.Collection,initMap:function(){for(var e=this.omap=new WeakMap,t=this.pm ap={},n=this.store,r=0;r<n.length;r++){var s=n[r];s&&"object"==typeof s?e.set(s, r):t[s]=r}},add:function(e){var t=this.store.push(e)-1;return e&&"object"==typeo f e?this.omap.set(e,t):this.pmap[e]=t,"#"+t},removeKey:function(e){(e=this._pars eKey(e))&&(this._removeFromMap(this.store[e]),delete this.store[e])},_removeFrom Map:function(e){e&&"object"==typeof e?this.omap.delete(e):delete this.pmap[e]},r emove:function(e){var t=this.getKey(e);return this.removeKey(t),t},getKey:functi on(e){var t;if(t=e&&"object"==typeof e?this.omap.get(e):this.pmap[e],void 0!=t)r eturn"#"+t},getKeys:function(){return Object.keys(this.store).map(function(e){re turn"#"+e})},_parseKey:function(e){if(e&&"#"==e[0])return e.slice(1)},setItem:fu nction(e,t){if(e=this._parseKey(e)){var n=this.store[e];n&&this._removeFromMap(n ),t&&"object"==typeof t?this.omap.set(t,e):this.pmap[t]=e,this.store[e]=t}},getI tem:function(e){if(e=this._parseKey(e))return this.store[e]},getItems:function() {var e=[],t=this.store;for(var n in t)e.push(t[n]);return e},_applySplices:funct ion(e){for(var t,n,r={},s=0;s<e.length&&(n=e[s]);s++){n.addedKeys=[];for(var i=0 ;i<n.removed.length;i++)t=this.getKey(n.removed[i]),r[t]=r[t]?null:-1;for(i=0;i< n.addedCount;i++){var o=this.userArray[n.index+i];t=this.getKey(o),t=void 0===t? this.add(o):t,r[t]=r[t]?null:1,n.addedKeys.push(t)}}var a=[],l=[];for(t in r)r[t ]<0&&(this.removeKey(t),a.push(t)),r[t]>0&&l.push(t);return[{removed:a,added:l}] }},Polymer.Collection.get=function(e){return Polymer._collections.get(e)||new Po lymer.Collection(e)},Polymer.Collection.applySplices=function(e,t){var n=Polymer ._collections.get(e);return n?n._applySplices(t):null},Polymer({is:"dom-repeat", extends:"template",_template:null,properties:{items:{type:Array},as:{type:String ,value:"item"},indexAs:{type:String,value:"index"},sort:{type:Function,observer: "_sortChanged"},filter:{type:Function,observer:"_filterChanged"},observe:{type:S tring,observer:"_observeChanged"},delay:Number,renderedItemCount:{type:Number,no tify:!Polymer.Settings.suppressTemplateNotifications,readOnly:!0},initialCount:{ type:Number,observer:"_initializeChunking"},targetFramerate:{type:Number,value:2 0},notifyDomChange:{type:Boolean},_targetFrameTime:{type:Number,computed:"_compu teFrameTime(targetFramerate)"}},behaviors:[Polymer.Templatizer],observers:["_ite msChanged(items.*)"],created:function(){this._instances=[],this._pool=[],this._l imit=1/0;var e=this;this._boundRenderChunk=function(){e._renderChunk()}},detache d:function(){this.__isDetached=!0;for(var e=0;e<this._instances.length;e++)this. _detachInstance(e)},attached:function(){if(this.__isDetached){this.__isDetached= !1;var e,t=Polymer.dom(this).parentNode;t.localName==this.is?(e=t,t=Polymer.dom( t).parentNode):e=this;for(var n=Polymer.dom(t),r=0;r<this._instances.length;r++) this._attachInstance(r,n,e)}},ready:function(){this._instanceProps={__key__:!0}, this._instanceProps[this.as]=!0,this._instanceProps[this.indexAs]=!0,this.ctor|| this.templatize(this)},_sortChanged:function(e){var t=this._getRootDataHost();th is._sortFn=e&&("function"==typeof e?e:function(){return t[e].apply(t,arguments)} ),this._needFullRefresh=!0,this.items&&this._debounceTemplate(this._render)},_fi lterChanged:function(e){var t=this._getRootDataHost();this._filterFn=e&&("functi on"==typeof e?e:function(){return t[e].apply(t,arguments)}),this._needFullRefres h=!0,this.items&&this._debounceTemplate(this._render)},_computeFrameTime:functio n(e){return Math.ceil(1e3/e)},_initializeChunking:function(){this.initialCount&& (this._limit=this.initialCount,this._chunkCount=this.initialCount,this._lastChun kTime=performance.now())},_tryRenderChunk:function(){this.items&&this._limit<thi s.items.length&&this.debounce("renderChunk",this._requestRenderChunk)},_requestR enderChunk:function(){requestAnimationFrame(this._boundRenderChunk)},_renderChun k:function(){var e=performance.now(),t=this._targetFrameTime/(e-this._lastChunkT ime);this._chunkCount=Math.round(this._chunkCount*t)||1,this._limit+=this._chunk Count,this._lastChunkTime=e,this._debounceTemplate(this._render)},_observeChange d:function(){this._observePaths=this.observe&&this.observe.replace(".*",".").spl it(" ")},_itemsChanged:function(e){if("items"==e.path)Array.isArray(this.items)? this.collection=Polymer.Collection.get(this.items):this.items?this._error(this._ logf("dom-repeat","expected array for `items`, found",this.items)):this.collecti on=null,this._keySplices=[],this._indexSplices=[],this._needFullRefresh=!0,this. _initializeChunking(),this._debounceTemplate(this._render);else if("items.splice s"==e.path)this._keySplices=this._keySplices.concat(e.value.keySplices),this._in dexSplices=this._indexSplices.concat(e.value.indexSplices),this._debounceTemplat e(this._render);else{var t=e.path.slice(6);this._forwardItemPath(t,e.value),this ._checkObservedPaths(t)}},_checkObservedPaths:function(e){if(this._observePaths) {e=e.substring(e.indexOf(".")+1);for(var t=this._observePaths,n=0;n<t.length;n++ )if(0===e.indexOf(t[n]))return this._needFullRefresh=!0,void(this.delay?this.deb ounce("render",this._render,this.delay):this._debounceTemplate(this._render))}}, render:function(){this._needFullRefresh=!0,this._debounceTemplate(this._render), this._flushTemplates()},_render:function(){this._needFullRefresh?(this._applyFul lRefresh(),this._needFullRefresh=!1):this._keySplices.length&&(this._sortFn?this ._applySplicesUserSort(this._keySplices):this._filterFn?this._applyFullRefresh() :this._applySplicesArrayOrder(this._indexSplices)),this._keySplices=[],this._ind exSplices=[];for(var e=this._keyToInstIdx={},t=this._instances.length-1;t>=0;t-- ){var n=this._instances[t];n.isPlaceholder&&t<this._limit?n=this._insertInstance (t,n.__key__):!n.isPlaceholder&&t>=this._limit&&(n=this._downgradeInstance(t,n._ _key__)),e[n.__key__]=t,n.isPlaceholder||n.__setProperty(this.indexAs,t,!0)}this ._pool.length=0,this._setRenderedItemCount(this._instances.length),Polymer.Setti ngs.suppressTemplateNotifications&&!this.notifyDomChange||this.fire("dom-change" ),this._tryRenderChunk()},_applyFullRefresh:function(){var e,t=this.collection;i f(this._sortFn)e=t?t.getKeys():[];else{e=[];var n=this.items;if(n)for(var r=0;r< n.length;r++)e.push(t.getKey(n[r]))}var s=this;for(this._filterFn&&(e=e.filter(f unction(e){return s._filterFn(t.getItem(e))})),this._sortFn&&e.sort(function(e,n ){return s._sortFn(t.getItem(e),t.getItem(n))}),r=0;r<e.length;r++){var i=e[r],o =this._instances[r];o?(o.__key__=i,!o.isPlaceholder&&r<this._limit&&o.__setPrope rty(this.as,t.getItem(i),!0)):r<this._limit?this._insertInstance(r,i):this._inse rtPlaceholder(r,i)}for(var a=this._instances.length-1;a>=r;a--)this._detachAndRe moveInstance(a)},_numericSort:function(e,t){return e-t},_applySplicesUserSort:fu nction(e){for(var t,n,r=this.collection,s={},i=0;i<e.length&&(n=e[i]);i++){for(v ar o=0;o<n.removed.length;o++)t=n.removed[o],s[t]=s[t]?null:-1;for(o=0;o<n.added .length;o++)t=n.added[o],s[t]=s[t]?null:1}var a=[],l=[];for(t in s)s[t]===-1&&a. push(this._keyToInstIdx[t]),1===s[t]&&l.push(t);if(a.length)for(a.sort(this._num ericSort),i=a.length-1;i>=0;i--){var c=a[i];void 0!==c&&this._detachAndRemoveIns tance(c)}var h=this;if(l.length){this._filterFn&&(l=l.filter(function(e){return h._filterFn(r.getItem(e))})),l.sort(function(e,t){return h._sortFn(r.getItem(e), r.getItem(t))});var u=0;for(i=0;i<l.length;i++)u=this._insertRowUserSort(u,l[i]) }},_insertRowUserSort:function(e,t){for(var n=this.collection,r=n.getItem(t),s=t his._instances.length-1,i=-1;e<=s;){var o=e+s>>1,a=this._instances[o].__key__,l= this._sortFn(n.getItem(a),r);if(l<0)e=o+1;else{if(!(l>0)){i=o;break}s=o-1}}retur n i<0&&(i=s+1),this._insertPlaceholder(i,t),i},_applySplicesArrayOrder:function( e){for(var t,n=0;n<e.length&&(t=e[n]);n++){for(var r=0;r<t.removed.length;r++)th is._detachAndRemoveInstance(t.index);for(r=0;r<t.addedKeys.length;r++)this._inse rtPlaceholder(t.index+r,t.addedKeys[r])}},_detachInstance:function(e){var t=this ._instances[e];if(!t.isPlaceholder){for(var n=0;n<t._children.length;n++){var r= t._children[n];Polymer.dom(t.root).appendChild(r)}return t}},_attachInstance:fun ction(e,t,n){var r=this._instances[e];r.isPlaceholder||t.insertBefore(r.root,n)} ,_detachAndRemoveInstance:function(e){var t=this._detachInstance(e);t&&this._poo l.push(t),this._instances.splice(e,1)},_insertPlaceholder:function(e,t){this._in stances.splice(e,0,{isPlaceholder:!0,__key__:t})},_stampInstance:function(e,t){v ar n={__key__:t};return n[this.as]=this.collection.getItem(t),n[this.indexAs]=e, this.stamp(n)},_insertInstance:function(e,t){var n=this._pool.pop();n?(n.__setPr operty(this.as,this.collection.getItem(t),!0),n.__setProperty("__key__",t,!0)):n =this._stampInstance(e,t);var r=this._instances[e+1],s=r&&!r.isPlaceholder?r._ch ildren[0]:this,i=Polymer.dom(this).parentNode;return i.localName==this.is&&(s==t his&&(s=i),i=Polymer.dom(i).parentNode),Polymer.dom(i).insertBefore(n.root,s),th is._instances[e]=n,n},_downgradeInstance:function(e,t){var n=this._detachInstanc e(e);return n&&this._pool.push(n),n={isPlaceholder:!0,__key__:t},this._instances [e]=n,n},_showHideChildren:function(e){for(var t=0;t<this._instances.length;t++) this._instances[t].isPlaceholder||this._instances[t]._showHideChildren(e)},_forw ardInstanceProp:function(e,t,n){if(t==this.as){var r;r=this._sortFn||this._filte rFn?this.items.indexOf(this.collection.getItem(e.__key__)):e[this.indexAs],this. set("items."+r,n)}},_forwardInstancePath:function(e,t,n){0===t.indexOf(this.as+" .")&&this._notifyPath("items."+e.__key__+"."+t.slice(this.as.length+1),n)},_forw ardParentProp:function(e,t){for(var n,r=this._instances,s=0;s<r.length&&(n=r[s]) ;s++)n.isPlaceholder||n.__setProperty(e,t,!0)},_forwardParentPath:function(e,t){ for(var n,r=this._instances,s=0;s<r.length&&(n=r[s]);s++)n.isPlaceholder||n._not ifyPath(e,t,!0)},_forwardItemPath:function(e,t){if(this._keyToInstIdx){var n=e.i ndexOf("."),r=e.substring(0,n<0?e.length:n),s=this._keyToInstIdx[r],i=this._inst ances[s];i&&!i.isPlaceholder&&(n>=0?(e=this.as+"."+e.substring(n+1),i._notifyPat h(e,t,!0)):i.__setProperty(this.as,t,!0))}},itemForElement:function(e){var t=thi s.modelForElement(e);return t&&t[this.as]},keyForElement:function(e){var t=this. modelForElement(e);return t&&t.__key__},indexForElement:function(e){var t=this.m odelForElement(e);return t&&t[this.indexAs]}}),Polymer({is:"array-selector",_tem plate:null,properties:{items:{type:Array,observer:"clearSelection"},multi:{type: Boolean,value:!1,observer:"clearSelection"},selected:{type:Object,notify:!0},sel ectedItem:{type:Object,notify:!0},toggle:{type:Boolean,value:!1}},clearSelection :function(){if(Array.isArray(this.selected))for(var e=0;e<this.selected.length;e ++)this.unlinkPaths("selected."+e);else this.unlinkPaths("selected"),this.unlink Paths("selectedItem");this.multi?this.selected&&!this.selected.length||(this.sel ected=[],this._selectedColl=Polymer.Collection.get(this.selected)):(this.selecte d=null,this._selectedColl=null),this.selectedItem=null},isSelected:function(e){r eturn this.multi?void 0!==this._selectedColl.getKey(e):this.selected==e},deselec t:function(e){if(this.multi){if(this.isSelected(e)){var t=this._selectedColl.get Key(e);this.arrayDelete("selected",e),this.unlinkPaths("selected."+t)}}else this .selected=null,this.selectedItem=null,this.unlinkPaths("selected"),this.unlinkPa ths("selectedItem")},select:function(e){var t=Polymer.Collection.get(this.items) ,n=t.getKey(e);if(this.multi)if(this.isSelected(e))this.toggle&&this.deselect(e) ;else{this.push("selected",e);var r=this._selectedColl.getKey(e);this.linkPaths( "selected."+r,"items."+n)}else this.toggle&&e==this.selected?this.deselect():(th is.selected=e,this.selectedItem=e,this.linkPaths("selected","items."+n),this.lin kPaths("selectedItem","items."+n))}}),Polymer({is:"dom-if",extends:"template",_t emplate:null,properties:{if:{type:Boolean,value:!1,observer:"_queueRender"},rest amp:{type:Boolean,value:!1,observer:"_queueRender"},notifyDomChange:{type:Boolea n}},behaviors:[Polymer.Templatizer],_queueRender:function(){this._debounceTempla te(this._render)},detached:function(){var e=this.parentNode;e&&e.localName==this .is&&(e=Polymer.dom(e).parentNode),e&&(e.nodeType!=Node.DOCUMENT_FRAGMENT_NODE|| Polymer.Settings.hasShadow&&e instanceof ShadowRoot)||this._teardownInstance()}, attached:function(){this.if&&this.ctor&&this.async(this._ensureInstance)},render :function(){this._flushTemplates()},_render:function(){this.if?(this.ctor||this. templatize(this),this._ensureInstance(),this._showHideChildren()):this.restamp&& this._teardownInstance(),!this.restamp&&this._instance&&this._showHideChildren() ,this.if!=this._lastIf&&(Polymer.Settings.suppressTemplateNotifications&&!this.n otifyDomChange||this.fire("dom-change"),this._lastIf=this.if)},_ensureInstance:f unction(){var e,t=Polymer.dom(this).parentNode;if(t&&t.localName==this.is?(e=t,t =Polymer.dom(t).parentNode):e=this,t)if(this._instance){var n=this._instance._ch ildren;if(n&&n.length){var r=Polymer.dom(e).previousSibling;if(r!==n[n.length-1] )for(var s,i=0;i<n.length&&(s=n[i]);i++)Polymer.dom(t).insertBefore(s,e)}}else{t his._instance=this.stamp();var o=this._instance.root;Polymer.dom(t).insertBefore (o,e)}},_teardownInstance:function(){if(this._instance){var e=this._instance._ch ildren;if(e&&e.length)for(var t,n=Polymer.dom(Polymer.dom(e[0]).parentNode),r=0; r<e.length&&(t=e[r]);r++)n.removeChild(t);this._instance=null}},_showHideChildre n:function(){var e=this.__hideTemplateChildren__||!this.if;this._instance&&this. _instance._showHideChildren(e)},_forwardParentProp:function(e,t){this._instance& &this._instance.__setProperty(e,t,!0)},_forwardParentPath:function(e,t){this._in stance&&this._instance._notifyPath(e,t,!0)}}),Polymer({is:"dom-bind",properties: {notifyDomChange:{type:Boolean}},extends:"template",_template:null,created:funct ion(){var e=this;Polymer.RenderStatus.whenReady(function(){"loading"==document.r eadyState?document.addEventListener("DOMContentLoaded",function(){e._markImports Ready()}):e._markImportsReady()})},_ensureReady:function(){this._readied||this._ readySelf()},_markImportsReady:function(){this._importsReady=!0,this._ensureRead y()},_registerFeatures:function(){this._prepConstructor()},_insertChildren:funct ion(){var e,t=Polymer.dom(this).parentNode;t.localName==this.is?(e=t,t=Polymer.d om(t).parentNode):e=this,Polymer.dom(t).insertBefore(this.root,e)},_removeChildr en:function(){if(this._children)for(var e=0;e<this._children.length;e++)this.roo t.appendChild(this._children[e])},_initFeatures:function(){},_scopeElementClass: function(e,t){return this.dataHost?this.dataHost._scopeElementClass(e,t):t},_con figureInstanceProperties:function(){},_prepConfigure:function(){var e={};for(var t in this._propertyEffects)e[t]=this[t];var n=this._setupConfigure;this._setupC onfigure=function(){n.call(this,e)}},attached:function(){this._importsReady&&thi s.render()},detached:function(){this._removeChildren()},render:function(){this._ ensureReady(),this._children||(this._template=this,this._prepAnnotations(),this. _prepEffects(),this._prepBehaviors(),this._prepConfigure(),this._prepBindings(), this._prepPropertyInfo(),Polymer.Base._initFeatures.call(this),this._children=Po lymer.TreeApi.arrayCopyChildNodes(this.root)),this._insertChildren(),Polymer.Set tings.suppressTemplateNotifications&&!this.notifyDomChange||this.fire("dom-chang e")}})</script><dom-module id="isolate-index" assetpath="/res/imp/index/"> <temp late> <style>h1{color:purple}</style> <h1>Hello World</h1> <div>{{client_id}}</d iv> </template> <script>Polymer({is:"isolate-index",properties:{client_id:{type: String}}})</script> </dom-module></div></body></html>
OLDNEW
« no previous file with comments | « appengine/isolate/ui/bower.json ('k') | appengine/isolate/ui/build/js/js.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698