text: !function(){function e(){document.body.removeAttribute("unresolved")}window.WebComponents?addEventListener("WebComponentsReady",e):"interactive"===document.readyState||"complete"===document.readyState?e():addEventListener("DOMContentLoaded",e)}(),window.Polymer={Settings:function(){for(var e,t=window.Polymer||{},r=location.search.slice(1).split("&"),o=0;o<r.length&&(e=r[o]);o++)e=e.split("="),e[0]&&(t[e[0]]=e[1]||!0);var i="shadow"===t.dom,n=Boolean(Element.prototype.createShadowRoot),a=n&&!window.ShadowDOMPolyfill,s=i&&n,u=Boolean("import"in document.createElement("link")),c=u,h=!window.CustomElements||window.CustomElements.useNative;return{wantShadow:i,hasShadow:n,nativeShadow:a,useShadow:s,useNativeShadow:s&&a,useNativeImports:c,useNativeCustomElements:h}}()},function(){var e=window.Polymer;window.Polymer=function(e){"function"==typeof e&&(e=e.prototype),e||(e={});var r=t(e);e=r.prototype;var o={prototype:e};return e.extends&&(o.extends=e.extends),Polymer.telemetry._registrate(e),document.registerElement(e.is,o),r};var t=function(e){var t=Polymer.Base;return e.extends&&(t=Polymer.Base._getExtendedPrototype(e.extends)),e=Polymer.Base.chainObject(e,t),e.registerCallback(),e.constructor};if(window.Polymer=Polymer,e)for(var r in e)Polymer[r]=e[r];Polymer.Class=t}(),Polymer.telemetry={registrations:[],_regLog:function(e){console.log("["+e.is+"]: registered")},_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,get:function(){return(document._currentScript||document.currentScript).ownerDocument}}),Polymer.RenderStatus={_ready:!1,_callbacks:[],whenReady:function(e){this._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.RenderStatus._makeReady()})},_afterNextRenderQueue:[],_waitingNextRender:!1,afterNextRender:function(e,t,r){this._watchNextRender(),this._afterNextRenderQueue.push([e,t,r])},_watchNextRender:function(){if(!this._waitingNextRender){this._waitingNextRender=!0;var e=function(){Polymer.RenderStatus._flushNextRender()};this._ready?requestAnimationFrame(e):this.whenReady(e)}},_flushNextRender:function(){var e=this;setTimeout(function(){e._flushRenderCallbacks(e._afterNextRenderQueue),e._afterNextRenderQueue=[],e._waitingNextRender=!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(function(){Polymer.RenderStatus._catchFirstRender()}):Polymer.RenderStatus._catchFirstRender(),Polymer.ImportStatus=Polymer.RenderStatus,Polymer.ImportStatus.whenLoaded=Polymer.ImportStatus.whenReady,Polymer.Base={__isPolymerInstance__:!0,_addFeature:function(e){this.extend(this,e)},registerCallback:function(){this._desugarBehaviors(),this._doBehavior("beforeRegister"),this._registerFeatures(),this._doBehavior("registered")},createdCallback:function(){Polymer.telemetry.instanceCount++,this.root=this,this._doBehavior("created"),this._initFeatures()},attachedCallback:function(){var e=this;Polymer.RenderStatus.whenReady(function(){e.isAttached=!0,e._doBehavior("attached")})},detachedCallback:function(){this.isAttached=!1,this._doBehavior("detached")},attributeChangedCallback:function(e,t,r){this._attributeChangedImpl(e),this._doBehavior("attributeChanged",[e,t,r])},_attributeChangedImpl:function(e){this._setAttributeToProperty(this,e)},extend:function(e,t){if(e&&t)for(var r,o=Object.getOwnPropertyNames(t),i=0;i<o.length&&(r=o[i]);i++)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 o=Object.getOwnPropertyDescriptor(t,e);o&&Object.defineProperty(r,e,o)},_log:console.log.apply.bind(console.log,console),_warn:console.warn.apply.bind(console.warn,console),_error:console.error.apply.bind(console.error,console),_logf:function(){return this._logPrefix.concat([this.is]).concat(Array.prototype.slice.call(arguments,0))}},Polymer.Base._logPrefix=function(){return window.chrome||/firefox/i.test(navigator.userAgent)?["%c[%s::%s]:","font-weight: bold; background-color:#EEEE00;"]:["[%s::%s]:"]}(),Polymer.Base.chainObject=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(Polymer.Base,HTMLElement.prototype),window.CustomElements?Polymer.instanceof=CustomElements.instanceof:Polymer.instanceof=function(e,t){return e instanceof t},Polymer.isInstance=function(e){return Boolean(e&&e.__isPolymerInstance__)},Polymer.telemetry.instanceCount=0,function(){function e(){if(n)for(var e,t=document._currentScript||document.currentScript,r=t&&t.ownerDocument||document,o=r.querySelectorAll("dom-module"),i=o.length-1;i>=0&&(e=o[i]);i--){if(e.__upgraded__)return;CustomElements.upgrade(e)}}var t={},r={},o=function(e){return t[e]||r[e.toLowerCase()]},i=function(){return document.createElement("dom-module")};i.prototype=Object.create(HTMLElement.prototype),Polymer.Base.extend(i.prototype,{constructor:i,createdCallback:function(){this.register()},register:function(e){var e=e||this.id||this.getAttribute("name")||this.getAttribute("is");e&&(this.id=e,t[e]=this,r[e.toLowerCase()]=this)},import:function(t,r){if(t){var i=o(t);return i||(e(),i=o(t)),i&&r&&(i=i.querySelector(r)),i}}});var n=window.CustomElements&&!CustomElements.useNative;document.registerElement("dom-module",i)}(),Polymer.Base._addFeature({_prepIs:function(){if(!this.is){var e=(document._currentScript||document.currentScript).parentNode;if("dom-module"===e.localName){var t=e.id||e.getAttribute("name")||e.getAttribute("is");this.is=t}}this.is&&(this.is=this.is.toLowerCase())}}),Polymer.Base._addFeature({behaviors:[],_desugarBehaviors:function(){this.behaviors.length&&(this.behaviors=this._desugarSomeBehaviors(this.behaviors))},_desugarSomeBehaviors:function(e){e=this._flattenBehaviorsList(e);for(var t=e.length-1;t>=0;t--)this._mixinBehavior(e[t]);return e},_flattenBehaviorsList:function(e){for(var t=[],r=0;r<e.length;r++){var o=e[r];o instanceof Array?t=t.concat(this._flattenBehaviorsList(o)):o?t.push(o):this._warn(this._logf("_flattenBehaviorsList","behavior is null, check for missing or 404 import"))}return t},_mixinBehavior:function(e){for(var t,r=Object.getOwnPropertyNames(e),o=0;o<r.length&&(t=r[o]);o++)Polymer.Base._behaviorProperties[t]||this.hasOwnProperty(t)||this.copyOwnProperty(t,e,this)},_prepBehaviors:function(){this._prepFlattenedBehaviors(this.behaviors)},_prepFlattenedBehaviors:function(e){for(var t=0,r=e.length;t<r;t++)this._prepBehavior(e[t]);this._prepBehavior(this)},_doBehavior:function(e,t){for(var r=0;r<this.behaviors.length;r++)this._invokeBehavior(this.behaviors[r],e,t);this._invokeBehavior(this,e,t)},_invokeBehavior:function(e,t,r){var o=e[t];o&&o.apply(this,r||Polymer.nar)},_marshalBehaviors:function(){for(var e=0;e<this.behaviors.length;e++)this._marshalBehavior(this.behaviors[e]);this._marshalBehavior(this)}}),Polymer.Base._behaviorProperties={hostAttributes:!0,registered:!0,properties:!0,observers:!0,listeners:!0,created:!0,attached:!0,detached:!0,attributeChanged:!0,ready:!0},Polymer.Base._addFeature({_getExtendedPrototype:function(e){return this._getExtendedNativePrototype(e)},_nativePrototypes:{},_getExtendedNativePrototype:function(e){var t=this._nativePrototypes[e];if(!t){var r=this.getNativePrototype(e);t=this.extend(Object.create(r),Polymer.Base),this._nativePrototypes[e]=t}return t},getNativePrototype:function(e){return Object.getPrototypeOf(document.createElement(e))}}),Polymer.Base._addFeature({_prepConstructor:function(){this._factoryArgs=this.extends?[this.extends,this.is]:[this.is];var e=function(){return this._factory(arguments)};this.hasOwnProperty("extends")&&(e.extends=this.extends),Object.defineProperty(this,"constructor",{value:e,writable:!0,configurable:!0}),e.prototype=this},_factory:function(e){var t=document.createElement.apply(document,this._factoryArgs);return this.factoryImpl&&this.factoryImpl.apply(t,e),t}}),Polymer.nob=Object.create(null),Polymer.Base._addFeature({properties:{},getPropertyInfo:function(e){var t=this._getPropertyInfo(e,this.properties);if(!t)for(var r=0;r<this.behaviors.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"function"==typeof r&&(r=t[e]={type:r}),r&&(r.defined=!0),r},_prepPropertyInfo:function(){this._propertyInfo={};for(var e=0;e<this.behaviors.length;e++)this._addPropertyInfo(this._propertyInfo,this.behaviors[e].properties);this._addPropertyInfo(this._propertyInfo,this.properties),this._addPropertyInfo(this._propertyInfo,this._propertyEffects)},_addPropertyInfo:function(e,t){if(t){var r,o;for(var i in t)r=e[i],o=t[i],("_"!==i[0]||o.readOnly)&&(e[i]?(r.type||(r.type=o.type),r.readOnly||(r.readOnly=o.readOnly)):e[i]={type:"function"==typeof o?o:o.type,readOnly:o.readOnly,attribute:Polymer.CaseMap.camelToDashCase(i)})}}}),Polymer.CaseMap={_caseMap:{},dashToCamelCase:function(e){var t=Polymer.CaseMap._caseMap[e];return t||(e.indexOf("-")<0?Polymer.CaseMap._caseMap[e]=e:Polymer.CaseMap._caseMap[e]=e.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()}))},camelToDashCase:function(e){var t=Polymer.CaseMap._caseMap[e];return t||(Polymer.CaseMap._caseMap[e]=e.replace(/([a-z][A-Z])/g,function(e){return e[0]+"-"+e[1].toLowerCase()}))}},Polymer.Base._addFeature({_addHostAttributes:function(e){this._aggregatedAttributes||(this._aggregatedAttributes={}),e&&this.mixin(this._aggregatedAttributes,e)},_marshalHostAttributes:function(){this._aggregatedAttributes&&this._applyAttributes(this,this._aggregatedAttributes)},_applyAttributes:function(e,t){for(var r in t)if(!this.hasAttribute(r)&&"class"!==r){var o=t[r];this.serializeValueToAttribute(o,r,this)}},_marshalAttributes:function(){this._takeAttributesToModel(this)},_takeAttributesToModel:function(e){if(this.hasAttributes())for(var t in this._propertyInfo){var r=this._propertyInfo[t];this.hasAttribute(r.attribute)&&this._setAttributeToProperty(e,r.attribute,t,r)}},_setAttributeToProperty:function(e,t,r,o){if(!this._serializing){var r=r||Polymer.CaseMap.dashToCamelCase(t);if((o=o||this._propertyInfo&&this._propertyInfo[r])&&!o.readOnly){var i=this.getAttribute(t);e[r]=this.deserialize(i,o.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 o=this.serialize(e);r=r||this,void 0===o?r.removeAttribute(t):r.setAttribute(t,o)},deserialize: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.parse(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;if(e)try{return JSON.stringify(e)}catch(e){return""}default:return null!=e?e:void 0}}}),Polymer.Base._addFeature({_setupDebouncers:function(){this._debouncers={}},debounce:function(e,t,r){return this._debouncers[e]=Polymer.Debounce.call(this,this._debouncers[e],t,r)},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.version="1.2.3",Polymer.Base._addFeature({_registerFeatures:function(){this._prepIs(),this._prepBehaviors(),this._prepConstructor(),this._prepPropertyInfo()},_prepBehavior:function(e){this._addHostAttributes(e.hostAttributes)},_marshalBehavior:function(e){},_initFeatures:function(){this._marshalHostAttributes(),this._setupDebouncers(),this._marshalBehaviors()}});
  Polymer.Base._addFeature({_prepTemplate:function(){void 0===this._template&&(this._template=Polymer.DomModule.import(this.is,"template")),this._template&&this._template.hasAttribute("is")&&this._warn(this._logf("_prepTemplate","top-level Polymer template must not be a type-extension, found",this._template,"Move inside simple <template>.")),this._template&&!this._template.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(this._template)},_stampTemplate:function(){this._template&&(this.root=this.instanceTemplate(this._template))},instanceTemplate:function(e){return document.importNode(e._content||e.content,!0)}}),function(){var e=Polymer.Base.attachedCallback;Polymer.Base._addFeature({_hostStack:[],ready:function(){},_registerHost:function(e){this.dataHost=e=e||Polymer.Base._hostStack[Polymer.Base._hostStack.length-1],e&&e._clients&&e._clients.push(this)},_beginHosting:function(){Polymer.Base._hostStack.push(this),this._clients||(this._clients=[])},_endHosting:function(){Polymer.Base._hostStack.pop()},_tryReady:function(){this._canReady()&&this._ready()},_canReady:function(){return!this.dataHost||this.dataHost._clientsReadied},_ready:function(){this._beforeClientsReady(),this._template&&(this._setupRoot(),this._readyClients()),this._clientsReadied=!0,this._clients=null,this._afterClientsReady(),this._readySelf()},_readyClients:function(){this._beginDistribute();var e=this._clients;if(e)for(var t,o=0,n=e.length;o<n&&(t=e[o]);o++)t._ready();this._finishDistribute()},_readySelf:function(){this._doBehavior("ready"),this._readied=!0,this._attachedPending&&(this._attachedPending=!1,this.attachedCallback())},_beforeClientsReady:function(){},_afterClientsReady:function(){},_beforeAttached:function(){},attachedCallback:function(){this._readied?(this._beforeAttached(),e.call(this)):this._attachedPending=!0}})}(),Polymer.ArraySplice=function(){function e(e,t,o){return{index:e,removed:t,addedCount:o}}function t(){}return t.prototype={calcEditDistances:function(e,t,o,n,i,r){for(var s=r-i+1,h=o-t+1,d=new Array(s),a=0;a<s;a++)d[a]=new Array(h),d[a][0]=a;for(var l=0;l<h;l++)d[0][l]=l;for(var a=1;a<s;a++)for(var l=1;l<h;l++)if(this.equals(e[t+l-1],n[i+a-1]))d[a][l]=d[a-1][l-1];else{var u=d[a-1][l]+1,c=d[a][l-1]+1;d[a][l]=u<c?u:c}return d},spliceOperationsFromEditDistances:function(e){for(var t=e.length-1,o=e[0].length-1,n=e[t][o],i=[];t>0||o>0;)if(0!=t)if(0!=o){var r,s=e[t-1][o-1],h=e[t-1][o],d=e[t][o-1];r=h<d?h<s?h:s:d<s?d:s,r==s?(s==n?i.push(0):(i.push(1),n=s),t--,o--):r==h?(i.push(3),t--,n=h):(i.push(2),o--,n=d)}else i.push(3),t--;else i.push(2),o--;return i.reverse(),i},calcSplices:function(t,o,n,i,r,s){var h=0,d=0,a=Math.min(n-o,s-r);if(0==o&&0==r&&(h=this.sharedPrefix(t,i,a)),n==t.length&&s==i.length&&(d=this.sharedSuffix(t,i,a-h)),o+=h,r+=h,n-=d,s-=d,n-o==0&&s-r==0)return[];if(o==n){for(var l=e(o,[],0);r<s;)l.removed.push(i[r++]);return[l]}if(r==s)return[e(o,[],n-o)];for(var u=this.spliceOperationsFromEditDistances(this.calcEditDistances(t,o,n,i,r,s)),l=void 0,c=[],f=o,_=r,p=0;p<u.length;p++)switch(u[p]){case 0:l&&(c.push(l),l=void 0),f++,_++;break;case 1:l||(l=e(f,[],0)),l.addedCount++,f++,l.removed.push(i[_]),_++;break;case 2:l||(l=e(f,[],0)),l.addedCount++,f++;break;case 3:l||(l=e(f,[],0)),l.removed.push(i[_]),_++}return l&&c.push(l),c},sharedPrefix:function(e,t,o){for(var n=0;n<o;n++)if(!this.equals(e[n],t[n]))return n;return o},sharedSuffix:function(e,t,o){for(var n=e.length,i=t.length,r=0;r<o&&this.equals(e[--n],t[--i]);)r++;return r},calculateSplices:function(e,t){return this.calcSplices(e,0,e.length,t,0,t.length)},equals:function(e,t){return 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){return t.replace(h,e)}function n(e){for(var t={},o=0;o<e.length;o++)t[e[o]]=!0;return t}function i(e,n,i){switch(e.nodeType){case Node.ELEMENT_NODE:for(var s,h=e.localName,l="<"+h,u=e.attributes,c=0;s=u[c];c++)l+=" "+s.name+'="'+t(s.value)+'"';return l+=">",d[h]?l:l+r(e,i)+"</"+h+">";case Node.TEXT_NODE:var f=e.data;return n&&a[n.localName]?f:o(f);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);var o="",n=Polymer.dom(e).childNodes;n=t?e._composedChildren:n;for(var r,s=0,h=n.length;s<h&&(r=n[s]);s++)o+=i(r,e,t);return o}var s=/[&\u00A0"]/g,h=/[&\u00A0<>]/g,d=n(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),a=n(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);return{getInnerHTML:r}}(),Polymer.DomApi=function(){"use strict";function e(e,t){return e=e||document,e.__domApi||(e.__domApi=new C(e,t)),e.__domApi}function t(e){return Boolean(e.__domApi)}function o(e){var t=e._lightChildren;return t||e.childNodes}function n(e){return e._composedChildren||(e._composedChildren=a(e)),e._composedChildren}function i(e,t,o){var i=n(e),r=o?i.indexOf(o):-1;if(t.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(var h=n(t),d=0;d<h.length;d++)s(h[d],e,i,r+d);t._composedChildren=null}else s(t,e,i,r)}function r(e){return e.__patched?e._composedParent:e.parentNode}function s(e,t,o,n){e._composedParent=t,o.splice(n>=0?n:o.length,0,e)}function h(e,t){if(t._composedParent=null,e){var o=n(e),i=o.indexOf(t);i>=0&&o.splice(i,1)}}function d(e){if(!e._lightChildren){for(var t,o=a(e),n=0,i=o.length;n<i&&(t=o[n]);n++)t._lightParent=t._lightParent||e;e._lightChildren=o}}function a(e){for(var t=[],o=0,n=e.firstChild;n;n=n.nextSibling)t[o++]=n;return t}function l(e){for(var t=[],o=0,n=e.firstElementChild;n;n=n.nextElementSibling)t[o++]=n;return t}function u(e){for(var t=e.length,o=new Array(t),n=0;n<t;n++)o[n]=e[n];return o}function c(e){return Boolean(e&&e._insertionPoints.length)}var f=Polymer.Settings,_=Polymer.domInnerHTML.getInnerHTML,p=Element.prototype.insertBefore,m=Element.prototype.removeChild,v=Element.prototype.appendChild,y=Element.prototype.cloneNode,b=Document.prototype.importNode,g=f.hasShadow&&!f.nativeShadow,N=window.wrap?window.wrap:function(e){return e},C=function(e){this.node=g?N(e):e,this.patch&&this.patch()};if(C.prototype={flush:function(){Polymer.dom.flush()},deepContains:function(e){if(this.node.contains(e))return!0;for(var t=e,o=N(document);t&&t!==o&&t!==this.node;)t=Polymer.dom(t).parentNode||t.host;return t===this.node},_lazyDistribute:function(e){e.shadyRoot&&e.shadyRoot._distributionClean&&(e.shadyRoot._distributionClean=!1,Polymer.dom.addDebouncer(e.debounce("_distribute",e._distributeContent)))},appendChild:function(e){return this._addNode(e)},insertBefore:function(e,t){return this._addNode(e,t)},_addNode:function(e,t){this._removeNodeFromParent(e);var o,n=this.getOwnerRoot();if(n&&(o=this._maybeAddInsertionPoint(e,this.node)),this._nodeHasLogicalChildren(this.node)){if(t){var r=this.childNodes,s=r.indexOf(t);if(s<0)throw Error("The ref_node to be inserted before is not a child of this node")}this._addLogicalInfo(e,this.node,s)}if(this._addNodeToHost(e),!this._maybeDistribute(e,this.node)&&!this._tryRemoveUndistributedNode(e)){t&&(t=t.localName===D?this._firstComposedNode(t):t);var h=this.node._isShadyRoot?this.node.host:this.node;i(h,e,t),t?p.call(h,e,t):v.call(h,e)}return o&&this._updateInsertionPoints(n.host),this.notifyObserver(),e},removeChild:function(t){if(e(t).parentNode!==this.node&&console.warn("The node to be removed is not a child of this node",t),this._removeNodeFromHost(t),!this._maybeDistribute(t,this.node)){var o=this.node._isShadyRoot?this.node.host:this.node;o===t.parentNode&&(h(o,t),m.call(o,t))}return this.notifyObserver(),t},replaceChild:function(e,t){return this.insertBefore(e,t),this.removeChild(t),e},_hasCachedOwnerRoot:function(e){return Boolean(void 0!==e._ownerShadyRoot)},getOwnerRoot:function(){return this._ownerShadyRootForNode(this.node)},_ownerShadyRootForNode:function(e){if(e){if(void 0===e._ownerShadyRoot){var t;if(e._isShadyRoot)t=e;else{var o=Polymer.dom(e).parentNode;t=o?o._isShadyRoot?o:this._ownerShadyRootForNode(o):null}e._ownerShadyRoot=t}return e._ownerShadyRoot}},_maybeDistribute:function(e,t){var o=e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&!e.__noContent&&Polymer.dom(e).querySelector(D),n=o&&Polymer.dom(o).parentNode.nodeType!==Node.DOCUMENT_FRAGMENT_NODE,i=o||e.localName===D;if(i){var r=this._ownerShadyRootForNode(t);if(r){var s=r.host;this._lazyDistribute(s)}}var h=this._parentNeedsDistribution(t);return h&&this._lazyDistribute(t),h||i&&!n},_maybeAddInsertionPoint:function(t,o){var n;if(t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE||t.__noContent)t.localName===D&&(d(o),d(t),n=!0);else for(var i,r,s,h=e(t).querySelectorAll(D),a=0;a<h.length&&(i=h[a]);a++)r=e(i).parentNode,r===t&&(r=o),s=this._maybeAddInsertionPoint(i,r),n=n||s;return n},_tryRemoveUndistributedNode:function(e){if(this.node.shadyRoot){var t=r(e);return t&&m.call(t,e),!0}},_updateInsertionPoints:function(t){for(var o,n=t.shadyRoot._insertionPoints=e(t.shadyRoot).querySelectorAll(D),i=0;i<n.length;i++)o=n[i],d(o),d(e(o).parentNode)},_nodeHasLogicalChildren:function(e){return Boolean(void 0!==e._lightChildren)},_parentNeedsDistribution:function(e){return e&&e.shadyRoot&&c(e.shadyRoot)},_removeNodeFromParent:function(o){var n=o._lightParent||o.parentNode;n&&t(n)&&e(n).notifyObserver(),this._removeNodeFromHost(o,!0)},_removeNodeFromHost:function(t,o){var n,i,s=t._lightParent;s&&(e(t)._distributeParent(),i=this._ownerShadyRootForNode(t),i&&(i.host._elementRemove(t),n=this._removeDistributedChildren(i,t)),this._removeLogicalInfo(t,s)),this._removeOwnerShadyRoot(t),i&&n?(this._updateInsertionPoints(i.host),this._lazyDistribute(i.host)):o&&h(r(t),t)},_removeDistributedChildren:function(t,o){for(var n,i=t._insertionPoints,r=0;r<i.length;r++){var s=i[r];if(this._contains(o,s))for(var d=e(s).getDistributedNodes(),a=0;a<d.length;a++){n=!0;var l=d[a],u=l.parentNode;u&&(h(u,l),m.call(u,l))}}return n},_contains:function(t,o){for(;o;){if(o==t)return!0;o=e(o).parentNode}},_addNodeToHost:function(e){var t=this.getOwnerRoot();t&&t.host._elementAdd(e)},_addLogicalInfo:function(t,o,n){var i=e(o).childNodes;if(n=void 0===n?i.length:n,t.nodeType===Node.DOCUMENT_FRAGMENT_NODE)for(var r,s=a(t),h=0;h<s.length&&(r=s[h]);h++)i.splice(n++,0,r),r._lightParent=o;else i.splice(n,0,t),t._lightParent=o},_removeLogicalInfo:function(t,o){var n=e(o).childNodes,i=n.indexOf(t);if(i<0||o!==t._lightParent)throw Error("The node to be removed is not a child of this node");n.splice(i,1),t._lightParent=null},_removeOwnerShadyRoot:function(t){if(this._hasCachedOwnerRoot(t))for(var o,n=e(t).childNodes,i=0,r=n.length;i<r&&(o=n[i]);i++)this._removeOwnerShadyRoot(o);t._ownerShadyRoot=void 0},_firstComposedNode:function(t){for(var o,n,i=e(t).getDistributedNodes(),r=0,s=i.length;r<s&&(o=i[r]);r++)if(n=e(o).getDestinationInsertionPoints(),n[n.length-1]===t)return o},querySelector:function(e){return this.querySelectorAll(e)[0]},querySelectorAll:function(e){return this._query(function(t){return A.call(t,e)},this.node)},_query:function(t,o){o=o||this.node;var n=[];return this._queryElements(e(o).childNodes,t,n),n},_queryElements:function(e,t,o){for(var n,i=0,r=e.length;i<r&&(n=e[i]);i++)n.nodeType===Node.ELEMENT_NODE&&this._queryElement(n,t,o)},_queryElement:function(t,o,n){o(t)&&n.push(t),this._queryElements(e(t).childNodes,o,n)},getDestinationInsertionPoints:function(){return this.node._destinationInsertionPoints||[]},getDistributedNodes:function(){return this.node._distributedNodes||[]},queryDistributedElements:function(e){for(var t,o=this.getEffectiveChildNodes(),n=[],i=0,r=o.length;i<r&&(t=o[i]);i++)t.nodeType===Node.ELEMENT_NODE&&A.call(t,e)&&n.push(t);return n},getEffectiveChildNodes:function(){for(var t,o=[],n=this.childNodes,i=0,r=n.length;i<r&&(t=n[i]);i++)if(t.localName===D)for(var s=e(t).getDistributedNodes(),h=0;h<s.length;h++)o.push(s[h]);else o.push(t);return o},_clear:function(){for(;this.childNodes.length;)this.removeChild(this.childNodes[0])},setAttribute:function(e,t){this.node.setAttribute(e,t),this._distributeParent()},removeAttribute:function(e){this.node.removeAttribute(e),this._distributeParent()},_distributeParent:function(){this._parentNeedsDistribution(this.parentNode)&&this._lazyDistribute(this.parentNode)},cloneNode:function(t){var o=y.call(this.node,!1);if(t)for(var n,i=this.childNodes,r=e(o),s=0;s<i.length;s++)n=e(i[s]).cloneNode(!0),r.appendChild(n);return o},importNode:function(t,o){var n=this.node instanceof Document?this.node:this.node.ownerDocument,i=b.call(n,t,!1);if(o)for(var r,s=e(t).childNodes,h=e(i),d=0;d<s.length;d++)r=e(n).importNode(s[d],!0),h.appendChild(r);return i},observeNodes:function(e){if(e)return this.observer||(this.observer=this.node.localName===D?new C.DistributedNodesObserver(this):new C.EffectiveNodesObserver(this)),this.observer.addListener(e)},unobserveNodes:function(e){this.observer&&this.observer.removeListener(e)},notifyObserver:function(){this.observer&&this.observer.notify()}},f.useShadow){var P=function(e){C.prototype[e]=function(){return this.node[e].apply(this.node,arguments)}};!function(e){for(var t=0;t<e.length;t++)P(e[t])}(["cloneNode","appendChild","insertBefore","removeChild","replaceChild"]),C.prototype.querySelectorAll=function(e){return u(this.node.querySelectorAll(e))},C.prototype.getOwnerRoot=function(){for(var e=this.node;e;){if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host)return e;e=e.parentNode}},C.prototype.importNode=function(e,t){return(this.node instanceof Document?this.node:this.node.ownerDocument).importNode(e,t)},C.prototype.getDestinationInsertionPoints=function(){var e=this.node.getDestinationInsertionPoints&&this.node.getDestinationInsertionPoints();return e?u(e):[]},C.prototype.getDistributedNodes=function(){var e=this.node.getDistributedNodes&&this.node.getDistributedNodes();return e?u(e):[]},C.prototype._distributeParent=function(){},Object.defineProperties(C.prototype,{childNodes:{get:function(){return a(this.node)},configurable:!0},children:{get:function(){return l(this.node)},configurable:!0},textContent:{get:function(){return this.node.textContent},set:function(e){return this.node.textContent=e},configurable:!0},innerHTML:{get:function(){return this.node.innerHTML},set:function(e){return this.node.innerHTML=e},configurable:!0}});var E=function(e){Object.defineProperty(C.prototype,e,{get:function(){return this.node[e]},configurable:!0})};!function(e){for(var t=0;t<e.length;t++)E(e[t])}(["parentNode","firstChild","lastChild","nextSibling","previousSibling","firstElementChild","lastElementChild","nextElementSibling","previousElementSibling"])}else Object.defineProperties(C.prototype,{childNodes:{get:function(){var e=o(this.node);return Array.isArray(e)?e:a(this.node)},configurable:!0},children:{get:function(){return Array.prototype.filter.call(this.childNodes,function(e){return e.nodeType===Node.ELEMENT_NODE})},configurable:!0},parentNode:{get:function(){return this.node._lightParent||r(this.node)},configurable:!0},firstChild:{get:function(){return this.childNodes[0]},configurable:!0},lastChild:{get:function(){var e=this.childNodes;return e[e.length-1]},configurable:!0},nextSibling:{get:function(){var t=this.parentNode&&e(this.parentNode).childNodes;if(t)return t[Array.prototype.indexOf.call(t,this.node)+1]},configurable:!0},previousSibling:{get:function(){var t=this.parentNode&&e(this.parentNode).childNodes;if(t)return t[Array.prototype.indexOf.call(t,this.node)-1]},configurable:!0},firstElementChild:{get:function(){return this.children[0]},configurable:!0},lastElementChild:{get:function(){var e=this.children;return e[e.length-1]},configurable:!0},nextElementSibling:{get:function(){var t=this.parentNode&&e(this.parentNode).children;if(t)return t[Array.prototype.indexOf.call(t,this.node)+1]},configurable:!0},previousElementSibling:{get:function(){var t=this.parentNode&&e(this.parentNode).children;if(t)return t[Array.prototype.indexOf.call(t,this.node)-1]},configurable:!0},textContent:{get:function(){var e=this.node.nodeType;if(e===Node.TEXT_NODE||e===Node.COMMENT_NODE)return this.node.textContent;for(var t,o=[],n=0,i=this.childNodes;t=i[n];n++)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},innerHTML:{get:function(){var e=this.node.nodeType;return e===Node.TEXT_NODE||e===Node.COMMENT_NODE?null:_(this.node)},set:function(e){var t=this.node.nodeType;if(t!==Node.TEXT_NODE||t!==Node.COMMENT_NODE){this._clear();var o=document.createElement("div");o.innerHTML=e;for(var n=a(o),i=0;i<n.length;i++)this.appendChild(n[i])}},configurable:!0}}),C.prototype._getComposedInnerHTML=function(){return _(this.node,!0)};var D="content";Polymer.dom=function(t,o){return t instanceof Event?Polymer.EventApi.factory(t):e(t,o)};var R=Element.prototype,A=R.matches||R.matchesSelector||R.mozMatchesSelector||R.msMatchesSelector||R.oMatchesSelector||R.webkitMatchesSelector;return{getLightChildren:o,getComposedParent:r,getComposedChildren:n,removeFromComposedParent:h,saveLightChildrenIfNeeded:d,matchesSelector:A,hasInsertionPoint:c,ctor:C,factory:e,hasDomApi:t,arrayCopy:u,arrayCopyChildNodes:a,arrayCopyChildren:l,wrap:N}}(),Polymer.Base.extend(Polymer.dom,{_flushGuard:0,_FLUSH_MAX:100,_needsTakeRecords:!Polymer.Settings.useNativeCustomElements,_debouncers:[],_staticFlushList:[],_finishDebouncer:null,flush:function(){for(this._flushGuard=0,this._prepareFlush();this._debouncers.length&&this._flushGuard<this._FLUSH_MAX;){for(var e=0;e<this._debouncers.length;e++)this._debouncers[e].complete();this._finishDebouncer&&this._finishDebouncer.complete(),this._prepareFlush(),this._flushGuard++}this._flushGuard>=this._FLUSH_MAX&&console.warn("Polymer.dom.flush aborted. Flush may not be complete.")},_prepareFlush:function(){this._needsTakeRecords&&CustomElements.takeRecords();for(var e=0;e<this._staticFlushList.length;e++)this._staticFlushList[e]()},addStaticFlush:function(e){this._staticFlushList.push(e)},removeStaticFlush:function(e){var t=this._staticFlushList.indexOf(e);t>=0&&this._staticFlushList.splice(t,1)},addDebouncer:function(e){this._debouncers.push(e),this._finishDebouncer=Polymer.Debounce(this._finishDebouncer,this._finishFlush)},_finishFlush:function(){Polymer.dom._debouncers=[]}}),Polymer.EventApi=function(){"use strict";var e=Polymer.DomApi.ctor,t=Polymer.Settings;return e.Event=function(e){this.event=e},t.useShadow?e.Event.prototype={get rootTarget(){return this.event.path[0]},get localTarget(){return this.event.target},get path(){return this.event.path}}:e.Event.prototype={get rootTarget(){return this.event.target},get localTarget(){for(var e=this.event.currentTarget,t=e&&Polymer.dom(e).getOwnerRoot(),o=this.path,n=0;n<o.length;n++)if(Polymer.dom(o[n]).getOwnerRoot()===t)return o[n]},get path(){if(!this.event._path){for(var e=[],t=this.rootTarget;t;)e.push(t),t=Polymer.dom(t).parentNode||t.host;e.push(window),this.event._path=e}return this.event._path}},{factory:function(t){return t.__eventApi||(t.__eventApi=new e.Event(t)),t.__eventApi}}}(),function(){"use strict";var e=Polymer.DomApi.ctor;Object.defineProperty(e.prototype,"classList",{get:function(){return this._classList||(this._classList=new e.ClassList(this)),this._classList},configurable:!0}),e.ClassList=function(e){this.domApi=e,this.node=e.node},e.ClassList.prototype={add:function(){this.node.classList.add.apply(this.node.classList,arguments),this.domApi._distributeParent()},remove:function(){this.node.classList.remove.apply(this.node.classList,arguments),this.domApi._distributeParent()},toggle:function(){this.node.classList.toggle.apply(this.node.classList,arguments),this.domApi._distributeParent()},contains:function(){return this.node.classList.contains.apply(this.node.classList,arguments)}}}(),function(){"use strict";var e=Polymer.DomApi.ctor,t=Polymer.Settings;Polymer.DomApi.hasDomApi;if(e.EffectiveNodesObserver=function(e){this.domApi=e,this.node=this.domApi.node,this._listeners=[]},e.EffectiveNodesObserver.prototype={addListener:function(e){this._isSetup||(this._setup(),this._isSetup=!0);var t={fn:e,_nodes:[]};return this._listeners.push(t),this._scheduleNotify(),t},removeListener:function(e){var t=this._listeners.indexOf(e);t>=0&&(this._listeners.splice(t,1),e._nodes=[]),this._hasListeners()||(this._cleanup(),this._isSetup=!1)},_setup:function(){this._observeContentElements(this.domApi.childNodes)},_cleanup:function(){this._unobserveContentElements(this.domApi.childNodes)},_hasListeners:function(){return Boolean(this._listeners.length)},_scheduleNotify:function(){this._debouncer&&this._debouncer.stop(),this._debouncer=Polymer.Debounce(this._debouncer,this._notify),this._debouncer.context=this,Polymer.dom.addDebouncer(this._debouncer)},notify:function(){this._hasListeners()&&this._scheduleNotify()},_notify:function(e){this._beforeCallListeners(),this._callListeners()},_beforeCallListeners:function(){this._updateContentElements()},_updateContentElements:function(){this._observeContentElements(this.domApi.childNodes)},_observeContentElements:function(e){for(var t,o=0;o<e.length&&(t=e[o]);o++)this._isContent(t)&&(t.__observeNodesMap=t.__observeNodesMap||new WeakMap,t.__observeNodesMap.has(this)||t.__observeNodesMap.set(this,this._observeContent(t)))},_observeContent:function(e){var t=this,o=Polymer.dom(e).observeNodes(function(){t._scheduleNotify()});return o._avoidChangeCalculation=!0,o},_unobserveContentElements:function(e){for(var t,o,n=0;n<e.length&&(t=e[n]);n++)this._isContent(t)&&(o=t.__observeNodesMap.get(this))&&(Polymer.dom(t).unobserveNodes(o),t.__observeNodesMap.delete(this))},_isContent:function(e){return"content"===e.localName},_callListeners:function(){for(var e,t=this._listeners,o=this._getEffectiveNodes(),n=0;n<t.length&&(e=t[n]);n++){var i=this._generateListenerInfo(e,o);(i||e._alwaysNotify)&&this._callListener(e,i)}},_getEffectiveNodes:function(){return this.domApi.getEffectiveChildNodes()},_generateListenerInfo:function(e,t){if(e._avoidChangeCalculation)return!0;for(var o,n=e._nodes,i={target:this.node,addedNodes:[],removedNodes:[]},r=Polymer.ArraySplice.calculateSplices(t,n),s=0;s<r.length&&(o=r[s]);s++)for(var h,d=0;d<o.removed.length&&(h=o.removed[d]);d++)i.removedNodes.push(h);for(var o,s=0;s<r.length&&(o=r[s]);s++)for(var d=o.index;d<o.index+o.addedCount;d++)i.addedNodes.push(t[d]);return e._nodes=t,i.addedNodes.length||i.removedNodes.length?i:void 0},_callListener:function(e,t){return e.fn.call(this.node,t)},enableShadowAttributeTracking:function(){}},t.useShadow){var o=e.EffectiveNodesObserver.prototype._setup,n=e.EffectiveNodesObserver.prototype._cleanup;e.EffectiveNodesObserver.prototype._beforeCallListeners;Polymer.Base.extend(e.EffectiveNodesObserver.prototype,{_setup:function(){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._boundFlush),this._observer.observe(this.node,{childList:!0})}o.call(this)},_cleanup:function(){this._observer.disconnect(),this._observer=null,this._mutationHandler=null,Polymer.dom.removeStaticFlush(this._boundFlush),n.call(this)},_flush:function(){this._observer&&this._mutationHandler(this._observer.takeRecords())},enableShadowAttributeTracking:function(){if(this._observer){this._makeContentListenersAlwaysNotify(),this._observer.disconnect(),this._observer.observe(this.node,{childList:!0,attributes:!0,subtree:!0});var e=this.domApi.getOwnerRoot(),t=e&&e.host;t&&Polymer.dom(t).observer&&Polymer.dom(t).observer.enableShadowAttributeTracking()}},_makeContentListenersAlwaysNotify:function(){for(var e,t=0;t<this._listeners.length;t++)e=this._listeners[t],e._alwaysNotify=e._isContentListener}})}}(),function(){"use strict";var e=Polymer.DomApi.ctor,t=Polymer.Settings;e.DistributedNodesObserver=function(t){e.EffectiveNodesObserver.call(this,t)},e.DistributedNodesObserver.prototype=Object.create(e.EffectiveNodesObserver.prototype),Polymer.Base.extend(e.DistributedNodesObserver.prototype,{_setup:function(){},_cleanup:function(){},_beforeCallListeners:function(){},_getEffectiveNodes:function(){return this.domApi.getDistributedNodes()}}),t.useShadow&&Polymer.Base.extend(e.DistributedNodesObserver.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._isContentListener=!0,this._hasAttrSelect()&&Polymer.dom(t).observer.enableShadowAttributeTracking()}}},_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._destinationInsertionPoints;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 n=t[o]._destinationInsertionPoints;n&&n.splice(n.indexOf(e)+1,n.length)}}function o(e,t){var o=e._lightParent;o&&o.shadyRoot&&v(o.shadyRoot)&&o.shadyRoot._distributionClean&&(o.shadyRoot._distributionClean=!1,t.shadyRoot._dirtyRoots.push(o))}function n(e,t){var o=t._destinationInsertionPoints;return o&&o[o.length-1]===e}function i(e){return"content"==e.localName}function r(e,t,o){var n=b(t);n!==e&&g(n,t),s(t),N.call(e,t,o||null),t._composedParent=e}function s(e){var t=b(e);t&&(e._composedParent=null,C.call(t,e))}function h(e,t){for(var o=0;o<t.length;o++)t[o]._composedParent=e}function d(e){for(;e&&a(e);)e=e.domHost;return e}function a(e){for(var t,o=Polymer.dom(e).children,n=0;n<o.length;n++)if(t=o[n],"content"===t.localName)return e.domHost}function l(e){for(var t,o=0;o<e._insertionPoints.length;o++)t=e._insertionPoints[o],f(t)&&Polymer.dom(t).notifyObserver()}function u(e){f(e)&&Polymer.dom(e).notifyObserver()}function c(e){if(P&&e)for(var t=0;t<e.length;t++)CustomElements.upgrade(e[t])}var f=Polymer.DomApi.hasDomApi;Polymer.Base._addFeature({_prepShady:function(){this._useContent=this._useContent||Boolean(this._template)},_poolContent:function(){this._useContent&&_(this)},_setupRoot:function(){this._useContent&&(this._createLocalRoot(),this.dataHost||c(this._lightChildren))},_createLocalRoot:function(){this.shadyRoot=this.root,this.shadyRoot._distributionClean=!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"):[];_(this.shadyRoot);for(var t,o=0;o<e.length;o++)t=e[o],_(t),_(t.parentNode);this.shadyRoot.host=this},get domHost(){var e=Polymer.dom(this).getOwnerRoot();return e&&e.host},distributeContent:function(e){if(this.shadyRoot){var t=Polymer.dom(this);e&&t._updateInsertionPoints(this);var o=d(this);t._lazyDistribute(o)}},_distributeContent:function(){this._useContent&&!this.shadyRoot._distributionClean&&(this._beginDistribute(),this._distributeDirtyRoots(),this._finishDistribute())},_beginDistribute:function(){this._useContent&&v(this.shadyRoot)&&(this._resetDistribution(),this._distributePool(this.shadyRoot,this._collectPool()))},_distributeDirtyRoots:function(){for(var e,t=this.shadyRoot._dirtyRoots,o=0,n=t.length;o<n&&(e=t[o]);o++)e._distributeContent();this.shadyRoot._dirtyRoots=[]},_finishDistribute:function(){if(this._useContent){if(this.shadyRoot._distributionClean=!0,v(this.shadyRoot))this._composeTree(),l(this.shadyRoot);else if(this.shadyRoot._hasDistributed){var e=this._composeNode(this);this._updateChildNodes(this,e)}else this.textContent="",this._composedChildren=null,this.appendChild(this.shadyRoot);this.shadyRoot._hasDistributed||u(this),this.shadyRoot._hasDistributed=!0}},elementMatches:function(e,t){return t=t||this,m.call(t,e)},_resetDistribution:function(){for(var e=p(this),o=0;o<e.length;o++){var n=e[o];n._destinationInsertionPoints&&(n._destinationInsertionPoints=void 0),i(n)&&t(n)}for(var r=this.shadyRoot,s=r._insertionPoints,h=0;h<s.length;h++)s[h]._distributedNodes=[]},_collectPool:function(){for(var e=[],t=p(this),o=0;o<t.length;o++){var n=t[o];i(n)?e.push.apply(e,n._distributedNodes):e.push(n)}return e},_distributePool:function(e,t){for(var n,i=e._insertionPoints,r=0,s=i.length;r<s&&(n=i[r]);r++)this._distributeInsertionPoint(n,t),o(n,this)},_distributeInsertionPoint:function(t,o){for(var n,i=!1,r=0,s=o.length;r<s;r++)(n=o[r])&&this._matchesContentSelect(n,t)&&(e(n,t),o[r]=void 0,i=!0);if(!i)for(var h=p(t),d=0;d<h.length;d++)e(h[d],t)},_composeTree:function(){this._updateChildNodes(this,this._composeNode(this));for(var e,t,o=this.shadyRoot._insertionPoints,n=0,i=o.length;n<i&&(e=o[n]);n++)t=e._lightParent||e.parentNode,t._useContent||t===this||t===this.shadyRoot||this._updateChildNodes(t,this._composeNode(t))},_composeNode:function(e){for(var t=[],o=p(e.shadyRoot||e),r=0;r<o.length;r++){var s=o[r];if(i(s))for(var h=s._distributedNodes,d=0;d<h.length;d++){var a=h[d];n(s,a)&&t.push(a)}else t.push(s)}return t},_updateChildNodes:function(e,t){for(var o,n=y(e),i=Polymer.ArraySplice.calculateSplices(t,n),d=0,a=0;d<i.length&&(o=i[d]);d++){for(var l,u=0;u<o.removed.length&&(l=o.removed[u]);u++)b(l)===e&&s(l),n.splice(o.index+a,1);a-=o.addedCount}for(var o,c,d=0;d<i.length&&(o=i[d]);d++){c=n[o.index];for(var l,u=o.index;u<o.index+o.addedCount;u++)l=t[u],r(e,l,c),n.splice(u,0,l)}h(e,t)},_matchesContentSelect:function(e,t){var o=t.getAttribute("select");return!o||(!(o=o.trim())||e instanceof Element&&(!!/^(:not\()?[*.#[a-zA-Z_|]/.test(o)&&this.elementMatches(o,e)))},_elementAdd:function(){},_elementRemove:function(){}});var _=Polymer.DomApi.saveLightChildrenIfNeeded,p=Polymer.DomApi.getLightChildren,m=Polymer.DomApi.matchesSelector,v=Polymer.DomApi.hasInsertionPoint,y=Polymer.DomApi.getComposedChildren,b=Polymer.DomApi.getComposedParent,g=Polymer.DomApi.removeFromComposedParent,N=Element.prototype.insertBefore,C=Element.prototype.removeChild,P=window.CustomElements&&!CustomElements.useNative}(),Polymer.Settings.useShadow&&Polymer.Base._addFeature({_poolContent:function(){},_beginDistribute:function(){},distributeContent:function(){},_distributeContent:function(){},_finishDistribute:function(){},_createLocalRoot:function(){this.createShadowRoot(),this.shadowRoot.appendChild(this.root),this.root=this.shadowRoot}}),Polymer.DomModule=document.createElement("dom-module"),Polymer.Base._addFeature({_registerFeatures:function(){this._prepIs(),this._prepBehaviors(),this._prepConstructor(),this._prepTemplate(),this._prepShady(),this._prepPropertyInfo()},_prepBehavior:function(e){this._addHostAttributes(e.hostAttributes)},_initFeatures:function(){this._registerHost(),this._template&&(this._poolContent(),this._beginHosting(),this._stampTemplate(),this._endHosting()),this._marshalHostAttributes(),this._setupDebouncers(),this._marshalBehaviors(),this._tryReady()},_marshalBehavior:function(e){}});
  Polymer.nar=[],Polymer.Annotations={parseAnnotations:function(t){var e=[],n=t._content||t.content;return this._parseNodeAnnotations(n,e,t.hasAttribute("strip-whitespace")),e},_parseNodeAnnotations:function(t,e,n){return t.nodeType===Node.TEXT_NODE?this._parseTextNodeAnnotation(t,e):this._parseElementAnnotations(t,e,n)},_bindingRegex:/([^{[]*)(\{\{|\[\[)(?!\}\}|\]\])(.+?)(?:\]\]|\}\})/g,_parseBindings:function(t){for(var e,n,r=this._bindingRegex,s=[];null!==(e=r.exec(t));){e[1]&&s.push({literal:e[1]});var i=e[2][0],o=e[3].trim(),a=!1;"!"==o[0]&&(a=!0,o=o.substring(1).trim());var l,h,c;"{"==i&&(c=o.indexOf("::"))>0&&(h=o.substring(c+2),o=o.substring(0,c),l=!0),s.push({compoundIndex:s.length,value:o,mode:i,negate:a,event:h,customEvent:l}),n=r.lastIndex}if(n&&n<t.length){var u=t.substring(n);u&&s.push({literal:u})}if(s.length)return s},_literalFromParts:function(t){for(var e="",n=0;n<t.length;n++){e+=t[n].literal||""}return e},_parseTextNodeAnnotation:function(t,e){var n=this._parseBindings(t.textContent);if(n){t.textContent=this._literalFromParts(n)||" ";var r={bindings:[{kind:"text",name:"textContent",parts:n,isCompound:1!==n.length}]};return e.push(r),r}},_parseElementAnnotations:function(t,e,n){var r={bindings:[],events:[]};return"content"===t.localName&&(e._hasContent=!0),this._parseChildNodesAnnotations(t,r,e,n),t.attributes&&(this._parseNodeAttributeAnnotations(t,r,e),this.prepElement&&this.prepElement(t)),(r.bindings.length||r.events.length||r.id)&&e.push(r),r},_parseChildNodesAnnotations:function(t,e,n,r){if(t.firstChild)for(var s=t.firstChild,i=0;s;){var o=s.nextSibling;if("template"!==s.localName||s.hasAttribute("preserve-content")||this._parseTemplate(s,i,n,e),s.nodeType===Node.TEXT_NODE){for(var a=o;a&&a.nodeType===Node.TEXT_NODE;)s.textContent+=a.textContent,o=a.nextSibling,t.removeChild(a),a=o;r&&!s.textContent.trim()&&(t.removeChild(s),i--)}if(s.parentNode){var l=this._parseNodeAnnotations(s,n,r);l&&(l.parent=e,l.index=i)}s=o,i++}},_parseTemplate:function(t,e,n,r){var s=document.createDocumentFragment();s._notes=this.parseAnnotations(t),s.appendChild(t.content),n.push({bindings:Polymer.nar,events:Polymer.nar,templateContent:s,parent:r,index:e})},_parseNodeAttributeAnnotations:function(t,e){for(var n,r=Array.prototype.slice.call(t.attributes),s=r.length-1;n=r[s];s--){var i,o=n.name,a=n.value;"on-"===o.slice(0,3)?(t.removeAttribute(o),e.events.push({name:o.slice(3),value:a})):(i=this._parseNodeAttributeAnnotation(t,o,a))?e.bindings.push(i):"id"===o&&(e.id=a)}},_parseNodeAttributeAnnotation:function(t,e,n){var r=this._parseBindings(n);if(r){var s=e,i="property";"$"==e[e.length-1]&&(e=e.slice(0,-1),i="attribute");var o=this._literalFromParts(r);return o&&"attribute"==i&&t.setAttribute(e,o),"input"==t.localName&&"value"==e&&t.setAttribute(s,""),t.removeAttribute(s),"property"===i&&(e=Polymer.CaseMap.dashToCamelCase(e)),{kind:i,name:e,parts:r,literal:o,isCompound:1!==r.length}}},_localSubTree:function(t,e){return t===e?t.childNodes:t._lightChildren||t.childNodes},findAnnotatedNode:function(t,e){var n=e.parent&&Polymer.Annotations.findAnnotatedNode(t,e.parent);return n?Polymer.Annotations._localSubTree(n,t)[e.index]:t}},function(){function t(t,e){return t.replace(a,function(t,r,s,i){return r+"'"+n(s.replace(/["']/g,""),e)+"'"+i})}function e(e,r){for(var s in l)for(var i,o,a,c=l[s],u=0,f=c.length;u<f&&(i=c[u]);u++)"*"!==s&&e.localName!==s||(o=e.attributes[i],(a=o&&o.value)&&a.search(h)<0&&(o.value="style"===i?t(a,r):n(a,r)))}function n(t,e){if(t&&"#"===t[0])return t;var n=s(e);return n.href=t,n.href||t}function r(t,e){return i||(i=document.implementation.createHTMLDocument("temp"),o=i.createElement("base"),i.head.appendChild(o)),o.href=e,n(t,i)}function s(t){return t.__urlResolver||(t.__urlResolver=t.createElement("a"))}var i,o,a=/(url\()([^)]*)(\))/g,l={"*":["href","src","style","url"],form:["action"]},h=/\{\{|\[\[/;Polymer.ResolveUrl={resolveCss:t,resolveAttrs:e,resolveUrl:r}}(),Polymer.Base._addFeature({_prepAnnotations:function(){if(this._template){var t=this;Polymer.Annotations.prepElement=function(e){t._prepElement(e)},this._template._content&&this._template._content._notes?this._notes=this._template._content._notes:this._notes=Polymer.Annotations.parseAnnotations(this._template),this._processAnnotations(this._notes),Polymer.Annotations.prepElement=null}else this._notes=[]},_processAnnotations:function(t){for(var e=0;e<t.length;e++){for(var n=t[e],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];o.literal||(o.signature=this._parseMethod(o.value),o.signature||(o.model=this._modelForPath(o.value)))}if(n.templateContent){this._processAnnotations(n.templateContent._notes);var a=n.templateContent._parentProps=this._discoverTemplateParentProps(n.templateContent._notes),l=[];for(var h in a)l.push({index:n.index,kind:"property",name:"_parent_"+h,parts:[{mode:"{",model:h,value:h}]});n.bindings=n.bindings.concat(l)}}},_discoverTemplateParentProps:function(t){for(var e,n={},r=0;r<t.length&&(e=t[r]);r++){for(var s,i=0,o=e.bindings;i<o.length&&(s=o[i]);i++)for(var a,l=0,h=s.parts;l<h.length&&(a=h[l]);l++)if(a.signature)for(var c=a.signature.args,u=0;u<c.length;u++)n[c[u].model]=!0;else n[a.model]=!0;if(e.templateContent){var f=e.templateContent._parentProps;Polymer.Base.mixin(n,f)}}return n},_prepElement:function(t){Polymer.ResolveUrl.resolveAttrs(t,this._template.ownerDocument)},_findAnnotatedNode:Polymer.Annotations.findAnnotatedNode,_marshalAnnotationReferences:function(){this._template&&(this._marshalIdNodes(),this._marshalAnnotatedNodes(),this._marshalAnnotatedListeners())},_configureAnnotationReferences:function(t){for(var e=this._notes,n=this._nodes,r=0;r<e.length;r++){var s=e[r],i=n[r];this._configureTemplateContent(s,i),this._configureCompoundBindings(s,i)}},_configureTemplateContent:function(t,e){t.templateContent&&(e._content=t.templateContent)},_configureCompoundBindings:function(t,e){for(var n=t.bindings,r=0;r<n.length;r++){var s=n[r];if(s.isCompound){for(var i=e.__compoundStorage__||(e.__compoundStorage__={}),o=s.parts,a=new Array(o.length),l=0;l<o.length;l++)a[l]=o[l].literal;var h=s.name;i[h]=a,s.literal&&"property"==s.kind&&(e._configValue?e._configValue(h,s.literal):e[h]=s.literal)}}},_marshalIdNodes:function(){this.$={};for(var t,e=0,n=this._notes.length;e<n&&(t=this._notes[e]);e++)t.id&&(this.$[t.id]=this._findAnnotatedNode(this.root,t))},_marshalAnnotatedNodes:function(){if(this._notes&&this._notes.length){for(var t=new Array(this._notes.length),e=0;e<this._notes.length;e++)t[e]=this._findAnnotatedNode(this.root,this._notes[e]);this._nodes=t}},_marshalAnnotatedListeners:function(){for(var t,e=0,n=this._notes.length;e<n&&(t=this._notes[e]);e++)if(t.events&&t.events.length)for(var r,s=this._findAnnotatedNode(this.root,t),i=0,o=t.events;i<o.length&&(r=o[i]);i++)this.listen(s,r.name,r.value)}}),Polymer.Base._addFeature({listeners:{},_listenListeners:function(t){var e,n,r;for(r in t)r.indexOf(".")<0?(e=this,n=r):(n=r.split("."),e=this.$[n[0]],n=n[1]),this.listen(e,n,t[r])},listen:function(t,e,n){var r=this._recallEventHandler(this,e,t,n);r||(r=this._createEventHandler(t,e,n)),r._listening||(this._listen(t,e,r),r._listening=!0)},_boundListenerKey:function(t,e){return t+":"+e},_recordEventHandler:function(t,e,n,r,s){var i=t.__boundListeners;i||(i=t.__boundListeners=new WeakMap);var o=i.get(n);o||(o={},i.set(n,o)),o[this._boundListenerKey(e,r)]=s},_recallEventHandler:function(t,e,n,r){var s=t.__boundListeners;if(s){var i=s.get(n);if(i){return i[this._boundListenerKey(e,r)]}}},_createEventHandler:function(t,e,n){var r=this,s=function(t){r[n]?r[n](t,t.detail):r._warn(r._logf("_createEventHandler","listener method `"+n+"` not defined"))};return s._listening=!1,this._recordEventHandler(r,e,t,n,s),s},unlisten:function(t,e,n){var r=this._recallEventHandler(this,e,t,n);r&&(this._unlisten(t,e,r),r._listening=!1)},_listen:function(t,e,n){t.addEventListener(e,n)},_unlisten:function(t,e,n){t.removeEventListener(e,n)}}),function(){"use strict";function t(t){for(var e,n=0;n<f.length;n++)e=f[n],t?document.addEventListener(e,m,!0):document.removeEventListener(e,m,!0)}function e(){if(!d){y.mouse.mouseIgnoreJob||t(!0);var e=function(){t(),y.mouse.target=null,y.mouse.mouseIgnoreJob=null};y.mouse.mouseIgnoreJob=Polymer.Debounce(y.mouse.mouseIgnoreJob,e,u)}}function n(t){var e=t.type;if(-1===f.indexOf(e))return!1;if("mousemove"===e){var n=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!_&&(n=p[t.which]||0),Boolean(1&n)}return 0===(void 0===t.button?0:t.button)}function r(t){if("click"===t.type){if(0===t.detail)return!0;var e=v.findOriginalTarget(t),n=e.getBoundingClientRect(),r=t.pageX,s=t.pageY;return!(r>=n.left&&r<=n.right&&s>=n.top&&s<=n.bottom)}return!1}function s(t){for(var e,n=Polymer.dom(t).path,r="auto",s=0;s<n.length;s++)if(e=n[s],e[c]){r=e[c];break}return r}function i(t,e,n){t.movefn=e,t.upfn=n,document.addEventListener("mousemove",e),document.addEventListener("mouseup",n)}function o(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn)}var a=Polymer.DomApi.wrap,l="string"==typeof document.head.style.touchAction,h="__polymerGesturesHandled",c="__polymerGesturesTouchAction",u=2500,f=["mousedown","mousemove","mouseup","click"],p=[0,1,4,2],_=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}(),d=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/),m=function(t){if(t[h]={skip:!0},"click"===t.type){for(var e=Polymer.dom(t).path,n=0;n<e.length;n++)if(e[n]===y.mouse.target)return;t.preventDefault(),t.stopPropagation()}},y={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}},v={gestures:{},recognizers:[],deepTargetFind:function(t,e){for(var n=document.elementFromPoint(t,e),r=n;r&&r.shadowRoot;)(r=r.shadowRoot.elementFromPoint(t,e))&&(n=r);return n},findOriginalTarget:function(t){return t.path?t.path[0]:t.target},handleNative:function(t){var n,r=t.type,s=a(t.currentTarget),i=s.__polymerGestures;if(i){var o=i[r];if(o){if(!t[h]&&(t[h]={},"touch"===r.slice(0,5))){var c=t.changedTouches[0];if("touchstart"===r&&1===t.touches.length&&(y.touch.id=c.identifier),y.touch.id!==c.identifier)return;l||"touchstart"!==r&&"touchmove"!==r||v.handleTouchAction(t),"touchend"===r&&(y.mouse.target=Polymer.dom(t).rootTarget,e())}if(n=t[h],!n.skip){for(var u,f=v.recognizers,p=0;p<f.length;p++)u=f[p],o[u.name]&&!n[u.name]&&u.flow&&u.flow.start.indexOf(t.type)>-1&&u.reset&&u.reset();for(var u,p=0;p<f.length;p++)u=f[p],o[u.name]&&!n[u.name]&&(n[u.name]=!0,u[r](t))}}}},handleTouchAction:function(t){var e=t.changedTouches[0],n=t.type;if("touchstart"===n)y.touch.x=e.clientX,y.touch.y=e.clientY,y.touch.scrollDecided=!1;else if("touchmove"===n){if(y.touch.scrollDecided)return;y.touch.scrollDecided=!0;var r=s(t),i=!1,o=Math.abs(y.touch.x-e.clientX),a=Math.abs(y.touch.y-e.clientY);t.cancelable&&("none"===r?i=!0:"pan-x"===r?i=a>o:"pan-y"===r&&(i=o>a)),i?t.preventDefault():v.prevent("track")}},add:function(t,e,n){t=a(t);var r=this.gestures[e],s=r.deps,i=r.name,o=t.__polymerGestures;o||(t.__polymerGestures=o={});for(var l,h,c=0;c<s.length;c++)l=s[c],d&&f.indexOf(l)>-1||(h=o[l],h||(o[l]=h={_count:0}),0===h._count&&t.addEventListener(l,this.handleNative),h[i]=(h[i]||0)+1,h._count=(h._count||0)+1);t.addEventListener(e,n),r.touchAction&&this.setTouchAction(t,r.touchAction)},remove:function(t,e,n){t=a(t);var r=this.gestures[e],s=r.deps,i=r.name,o=t.__polymerGestures;if(o)for(var l,h,c=0;c<s.length;c++)l=s[c],(h=o[l])&&h[i]&&(h[i]=(h[i]||1)-1,h._count=(h._count||1)-1,0===h._count&&t.removeEventListener(l,this.handleNative));t.removeEventListener(e,n)},register:function(t){this.recognizers.push(t);for(var e=0;e<t.emits.length;e++)this.gestures[t.emits[e]]=t},findRecognizerByEvent:function(t){for(var e,n=0;n<this.recognizers.length;n++){e=this.recognizers[n];for(var r=0;r<e.emits.length;r++)if(e.emits[r]===t)return e}return null},setTouchAction:function(t,e){l&&(t.style.touchAction=e),t[c]=e},fire:function(t,e,n){if(Polymer.Base.fire(e,n,{node:t,bubbles:!0,cancelable:!0}).defaultPrevented){var r=n.sourceEvent;r&&r.preventDefault&&r.preventDefault()}},prevent:function(t){var e=this.findRecognizerByEvent(t);e.info&&(e.info.prevent=!0)}};v.register({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:function(){},upfn:function(){}},reset:function(){o(this.info)},mousedown:function(t){if(n(t)){var e=v.findOriginalTarget(t),r=this,s=function(t){n(t)||(r.fire("up",e,t),o(r.info))},a=function(t){n(t)&&r.fire("up",e,t),o(r.info)};i(this.info,s,a),this.fire("down",e,t)}},touchstart:function(t){this.fire("down",v.findOriginalTarget(t),t.changedTouches[0])},touchend:function(t){this.fire("up",v.findOriginalTarget(t),t.changedTouches[0])},fire:function(t,e,n){v.fire(e,t,{x:n.clientX,y:n.clientY,sourceEvent:n,prevent:function(t){return v.prevent(t)}})}}),v.register({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove:function(t){this.moves.length>2&&this.moves.shift(),this.moves.push(t)},movefn:function(){},upfn:function(){},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(t,e){if(this.info.prevent)return!1;if(this.info.started)return!0;var n=Math.abs(this.info.x-t),r=Math.abs(this.info.y-e);return n>=5||r>=5},mousedown:function(t){if(n(t)){var e=v.findOriginalTarget(t),r=this,s=function(t){var s=t.clientX,i=t.clientY;r.hasMovedEnough(s,i)&&(r.info.state=r.info.started?"mouseup"===t.type?"end":"track":"start",r.info.addMove({x:s,y:i}),n(t)||(r.info.state="end",o(r.info)),r.fire(e,t),r.info.started=!0)},a=function(t){r.info.started&&(v.prevent("tap"),s(t)),o(r.info)};i(this.info,s,a),this.info.x=t.clientX,this.info.y=t.clientY}},touchstart:function(t){var e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove:function(t){var e=v.findOriginalTarget(t),n=t.changedTouches[0],r=n.clientX,s=n.clientY;this.hasMovedEnough(r,s)&&(this.info.addMove({x:r,y:s}),this.fire(e,n),this.info.state="track",this.info.started=!0)},touchend:function(t){var e=v.findOriginalTarget(t),n=t.changedTouches[0];this.info.started&&(v.prevent("tap"),this.info.state="end",this.info.addMove({x:n.clientX,y:n.clientY}),this.fire(e,n))},fire:function(t,e){var n,r=this.info.moves[this.info.moves.length-2],s=this.info.moves[this.info.moves.length-1],i=s.x-this.info.x,o=s.y-this.info.y,a=0;return r&&(n=s.x-r.x,a=s.y-r.y),v.fire(t,"track",{state:this.info.state,x:e.clientX,y:e.clientY,dx:i,dy:o,ddx:n,ddy:a,sourceEvent:e,hover:function(){return v.deepTargetFind(e.clientX,e.clientY)}})}}),v.register({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},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(t){this.info.x=t.clientX,this.info.y=t.clientY},mousedown:function(t){n(t)&&this.save(t)},click:function(t){n(t)&&this.forward(t)},touchstart:function(t){this.save(t.changedTouches[0])},touchend:function(t){this.forward(t.changedTouches[0])},forward:function(t){var e=Math.abs(t.clientX-this.info.x),n=Math.abs(t.clientY-this.info.y),s=v.findOriginalTarget(t);(isNaN(e)||isNaN(n)||e<=25&&n<=25||r(t))&&(this.info.prevent||v.fire(s,"tap",{x:t.clientX,y:t.clientY,sourceEvent:t}))}});var P={x:"pan-x",y:"pan-y",none:"none",all:"auto"};Polymer.Base._addFeature({_listen:function(t,e,n){v.gestures[e]?v.add(t,e,n):t.addEventListener(e,n)},_unlisten:function(t,e,n){v.gestures[e]?v.remove(t,e,n):t.removeEventListener(e,n)},setScrollDirection:function(t,e){e=e||this,v.setTouchAction(e,P[t]||"auto")}}),Polymer.Gestures=v}(),Polymer.Async={_currVal:0,_lastVal:0,_callbacks:[],_twiddleContent:0,_twiddle:document.createTextNode(""),run:function(t,e){return e>0?~setTimeout(t,e):(this._twiddle.textContent=this._twiddleContent++,this._callbacks.push(t),this._currVal++)},cancel:function(t){if(t<0)clearTimeout(~t);else{var e=t-this._lastVal;if(e>=0){if(!this._callbacks[e])throw"invalid async handle: "+t;this._callbacks[e]=null}}},_atEndOfMicrotask:function(){for(var t=this._callbacks.length,e=0;e<t;e++){var n=this._callbacks[e];if(n)try{n()}catch(t){throw e++,this._callbacks.splice(0,e),this._lastVal+=e,this._twiddle.textContent=this._twiddleContent++,t}}this._callbacks.splice(0,t),this._lastVal+=t}},new window.MutationObserver(function(){Polymer.Async._atEndOfMicrotask()}).observe(Polymer.Async._twiddle,{characterData:!0}),Polymer.Debounce=function(){function t(t,e,r){return t?t.stop():t=new n(this),t.go(e,r),t}var e=Polymer.Async,n=function(t){this.context=t;var e=this;this.boundComplete=function(){e.complete()}};return n.prototype={go:function(t,n){var r;this.finish=function(){e.cancel(r)},r=e.run(this.boundComplete,n),this.callback=t},stop:function(){this.finish&&(this.finish(),this.finish=null)},complete:function(){this.finish&&(this.stop(),this.callback.call(this.context))}},t}(),Polymer.Base._addFeature({$$:function(t){return Polymer.dom(this.root).querySelector(t)},toggleClass:function(t,e,n){n=n||this,1==arguments.length&&(e=!n.classList.contains(t)),e?Polymer.dom(n).classList.add(t):Polymer.dom(n).classList.remove(t)},toggleAttribute:function(t,e,n){n=n||this,1==arguments.length&&(e=!n.hasAttribute(t)),e?Polymer.dom(n).setAttribute(t,""):Polymer.dom(n).removeAttribute(t)},classFollows:function(t,e,n){n&&Polymer.dom(n).classList.remove(t),e&&Polymer.dom(e).classList.add(t)},attributeFollows:function(t,e,n){n&&Polymer.dom(n).removeAttribute(t),e&&Polymer.dom(e).setAttribute(t,"")},getEffectiveChildNodes:function(){return Polymer.dom(this).getEffectiveChildNodes()},getEffectiveChildren:function(){return Polymer.dom(this).getEffectiveChildNodes().filter(function(t){return t.nodeType===Node.ELEMENT_NODE})},getEffectiveTextContent:function(){for(var t,e=this.getEffectiveChildNodes(),n=[],r=0;t=e[r];r++)t.nodeType!==Node.COMMENT_NODE&&n.push(Polymer.dom(t).textContent);return n.join("")},queryEffectiveChildren:function(t){var e=Polymer.dom(this).queryDistributedElements(t);return e&&e[0]},queryAllEffectiveChildren:function(t){return Polymer.dom(this).queryDistributedElements(t)},getContentChildNodes:function(t){var e=Polymer.dom(this.root).querySelector(t||"content");return e?Polymer.dom(e).getDistributedNodes():[]},getContentChildren:function(t){return this.getContentChildNodes(t).filter(function(t){return t.nodeType===Node.ELEMENT_NODE})},fire:function(t,e,n){n=n||Polymer.nob;var r=n.node||this,e=null===e||void 0===e?{}:e,s=void 0===n.bubbles||n.bubbles,i=Boolean(n.cancelable),o=n._useCache,a=this._getEvent(t,s,i,o);return a.detail=e,o&&(this.__eventCache[t]=null),r.dispatchEvent(a),o&&(this.__eventCache[t]=a),a},__eventCache:{},_getEvent:function(t,e,n,r){var s=r&&this.__eventCache[t];return s&&s.bubbles==e&&s.cancelable==n||(s=new Event(t,{bubbles:Boolean(e),cancelable:n})),s},async:function(t,e){var n=this;return Polymer.Async.run(function(){t.call(n)},e)},cancelAsync:function(t){Polymer.Async.cancel(t)},arrayDelete:function(t,e){var n;if(Array.isArray(t)){if((n=t.indexOf(e))>=0)return t.splice(n,1)}else{if((n=this._get(t).indexOf(e))>=0)return this.splice(t,n,1)}},transform:function(t,e){e=e||this,e.style.webkitTransform=t,e.style.transform=t},translate3d:function(t,e,n,r){r=r||this,this.transform("translate3d("+t+","+e+","+n+")",r)},importHref:function(t,e,n){var r=document.createElement("link");r.rel="import",r.href=t;var s=this;return e&&(r.onload=function(t){return e.call(s,t)}),n&&(r.onerror=function(t){return n.call(s,t)}),document.head.appendChild(r),r},create:function(t,e){var n=document.createElement(t);if(e)for(var r in e)n[r]=e[r];return n},isLightDescendant:function(t){return this!==t&&this.contains(t)&&Polymer.dom(this).getOwnerRoot()===Polymer.dom(t).getOwnerRoot()},isLocalDescendant:function(t){return this.root===Polymer.dom(t).getOwnerRoot()}}),Polymer.Bind={_dataEventCache:{},prepareModel:function(t){Polymer.Base.mixin(t,this._modelApi)},_modelApi:{_notifyChange:function(t,e,n){n=void 0===n?this[t]:n,e=e||Polymer.CaseMap.camelToDashCase(t)+"-changed",this.fire(e,{value:n},{bubbles:!1,cancelable:!1,_useCache:!0})},_propertySetter:function(t,e,n,r){var s=this.__data__[t];return s===e||s!==s&&e!==e||(this.__data__[t]=e,"object"==typeof e&&this._clearPath(t),this._propertyChanged&&this._propertyChanged(t,e,s),n&&this._effectEffects(t,e,n,s,r)),s},__setProperty:function(t,e,n,r){r=r||this;var s=r._propertyEffects&&r._propertyEffects[t];s?r._propertySetter(t,e,s,n):r[t]=e},_effectEffects:function(t,e,n,r,s){for(var i,o=0,a=n.length;o<a&&(i=n[o]);o++)i.fn.call(this,t,e,i.effect,r,s)},_clearPath:function(t){for(var e in this.__data__)0===e.indexOf(t+".")&&(this.__data__[e]=void 0)}},ensurePropertyEffects:function(t,e){t._propertyEffects||(t._propertyEffects={});var n=t._propertyEffects[e];return n||(n=t._propertyEffects[e]=[]),n},addPropertyEffect:function(t,e,n,r){var s=this.ensurePropertyEffects(t,e),i={kind:n,effect:r,fn:Polymer.Bind["_"+n+"Effect"]};return s.push(i),i},createBindings:function(t){var e=t._propertyEffects;if(e)for(var n in e){var r=e[n];r.sort(this._sortPropertyEffects),this._createAccessors(t,n,r)}},_sortPropertyEffects:function(){var t={compute:0,annotation:1,computedAnnotation:2,reflect:3,notify:4,observer:5,complexObserver:6,function:7};return function(e,n){return t[e.kind]-t[n.kind]}}(),_createAccessors:function(t,e,n){var r={get:function(){return this.__data__[e]}},s=function(t){this._propertySetter(e,t,n)},i=t.getPropertyInfo&&t.getPropertyInfo(e);i&&i.readOnly?i.computed||(t["_set"+this.upper(e)]=s):r.set=s,Object.defineProperty(t,e,r)},upper:function(t){return t[0].toUpperCase()+t.substring(1)},_addAnnotatedListener:function(t,e,n,r,s){t._bindListeners||(t._bindListeners=[]);var i=this._notedListenerFactory(n,r,this._isStructured(r)),o=s||Polymer.CaseMap.camelToDashCase(n)+"-changed";t._bindListeners.push({index:e,property:n,path:r,changedFn:i,event:o})},_isStructured:function(t){return t.indexOf(".")>0},_isEventBogus:function(t,e){return t.path&&t.path[0]!==e},_notedListenerFactory:function(t,e,n){return function(r,s,i){i?this._notifyPath(this._fixPath(e,t,i),s):(s=r[t],n?this.__data__[e]!=s&&this.set(e,s):this[e]=s)}},prepareInstance:function(t){t.__data__=Object.create(null)},setupBindListeners:function(t){for(var e,n=t._bindListeners,r=0,s=n.length;r<s&&(e=n[r]);r++){var i=t._nodes[e.index];this._addNotifyListener(i,t,e.event,e.changedFn)}},_addNotifyListener:function(t,e,n,r){t.addEventListener(n,function(t){return e._notifyListener(r,t)})}},Polymer.Base.extend(Polymer.Bind,{_shouldAddListener:function(t){return t.name&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode&&!t.parts[0].negate},_annotationEffect:function(t,e,n){t!=n.value&&(e=this._get(n.value),this.__data__[n.value]=e);var r=n.negate?!e:e;if(!n.customEvent||this._nodes[n.index][n.name]!==r)return this._applyEffectValue(n,r)},_reflectEffect:function(t,e,n){this.reflectPropertyToAttribute(t,n.attribute,e)},_notifyEffect:function(t,e,n,r,s){s||this._notifyChange(t,n.event,e)},_functionEffect:function(t,e,n,r,s){n.call(this,t,e,r,s)},_observerEffect:function(t,e,n,r){var s=this[n.method];s?s.call(this,e,r):this._warn(this._logf("_observerEffect","observer method `"+n.method+"` not defined"))},_complexObserverEffect:function(t,e,n){var r=this[n.method];if(r){var s=Polymer.Bind._marshalArgs(this.__data__,n,t,e);s&&r.apply(this,s)}else this._warn(this._logf("_complexObserverEffect","observer method `"+n.method+"` not defined"))},_computeEffect:function(t,e,n){var r=Polymer.Bind._marshalArgs(this.__data__,n,t,e);if(r){var s=this[n.method];s?this.__setProperty(n.name,s.apply(this,r)):this._warn(this._logf("_computeEffect","compute method `"+n.method+"` not defined"))}},_annotatedComputationEffect:function(t,e,n){var r=this._rootDataHost||this,s=r[n.method];if(s){var i=Polymer.Bind._marshalArgs(this.__data__,n,t,e);if(i){var o=s.apply(r,i);n.negate&&(o=!o),this._applyEffectValue(n,o)}}else r._warn(r._logf("_annotatedComputationEffect","compute method `"+n.method+"` not defined"))},_marshalArgs:function(t,e,n,r){for(var s=[],i=e.args,o=0,a=i.length;o<a;o++){var l,h=i[o],c=h.name;if(l=h.literal?h.value:h.structured?Polymer.Base._get(c,t):t[c],i.length>1&&void 0===l)return;if(h.wildcard){var u=0===c.indexOf(n+"."),f=0===e.trigger.name.indexOf(c)&&!u;s[o]={path:f?n:c,value:f?r:l,base:l}}else s[o]=l}return s}}),Polymer.Base._addFeature({_addPropertyEffect:function(t,e,n){var r=Polymer.Bind.addPropertyEffect(this,t,e,n);r.pathFn=this["_"+r.kind+"PathEffect"]},_prepEffects:function(){Polymer.Bind.prepareModel(this),this._addAnnotationEffects(this._notes)},_prepBindings:function(){Polymer.Bind.createBindings(this)},_addPropertyEffects:function(t){if(t)for(var e in t){var n=t[e];n.observer&&this._addObserverEffect(e,n.observer),n.computed&&(n.readOnly=!0,this._addComputedEffect(e,n.computed)),n.notify&&this._addPropertyEffect(e,"notify",{event:Polymer.CaseMap.camelToDashCase(e)+"-changed"}),n.reflectToAttribute&&this._addPropertyEffect(e,"reflect",{attribute:Polymer.CaseMap.camelToDashCase(e)}),n.readOnly&&Polymer.Bind.ensurePropertyEffects(this,e)}},_addComputedEffect:function(t,e){for(var n,r=this._parseMethod(e),s=0;s<r.args.length&&(n=r.args[s]);s++)this._addPropertyEffect(n.model,"compute",{method:r.method,args:r.args,trigger:n,name:t})},_addObserverEffect:function(t,e){this._addPropertyEffect(t,"observer",{method:e,property:t})},_addComplexObserverEffects:function(t){if(t)for(var e,n=0;n<t.length&&(e=t[n]);n++)this._addComplexObserverEffect(e)},_addComplexObserverEffect:function(t){for(var e,n=this._parseMethod(t),r=0;r<n.args.length&&(e=n.args[r]);r++)this._addPropertyEffect(e.model,"complexObserver",{method:n.method,args:n.args,trigger:e})},_addAnnotationEffects:function(t){for(var e,n=0;n<t.length&&(e=t[n]);n++)for(var r,s=e.bindings,i=0;i<s.length&&(r=s[i]);i++)this._addAnnotationEffect(r,n)},_addAnnotationEffect:function(t,e){Polymer.Bind._shouldAddListener(t)&&Polymer.Bind._addAnnotatedListener(this,e,t.name,t.parts[0].value,t.parts[0].event);for(var n=0;n<t.parts.length;n++){var r=t.parts[n];r.signature?this._addAnnotatedComputationEffect(t,r,e):r.literal||this._addPropertyEffect(r.model,"annotation",{kind:t.kind,index:e,name:t.name,value:r.value,isCompound:t.isCompound,compoundIndex:r.compoundIndex,event:r.event,customEvent:r.customEvent,negate:r.negate})}},_addAnnotatedComputationEffect:function(t,e,n){var r=e.signature;if(r.static)this.__addAnnotatedComputationEffect("__static__",n,t,e,null);else for(var s,i=0;i<r.args.length&&(s=r.args[i]);i++)s.literal||this.__addAnnotatedComputationEffect(s.model,n,t,e,s)},__addAnnotatedComputationEffect:function(t,e,n,r,s){this._addPropertyEffect(t,"annotatedComputation",{index:e,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})},_parseMethod:function(t){var e=t.match(/([^\s]+)\((.*)\)/);if(e){var n={method:e[1],static:!0};if(e[2].trim()){var r=e[2].replace(/\\,/g,"&comma;").split(",");return this._parseArgs(r,n)}return n.args=Polymer.nar,n}},_parseArgs:function(t,e){return e.args=t.map(function(t){var n=this._parseArg(t);return n.literal||(e.static=!1),n},this),e},_parseArg:function(t){var e=t.trim().replace(/&comma;/g,",").replace(/\\(.)/g,"$1"),n={name:e,model:this._modelForPath(e)},r=e[0];switch("-"===r&&(r=e[1]),r>="0"&&r<="9"&&(r="#"),r){case"'":case'"':n.value=e.slice(1,-1),n.literal=!0;break;case"#":n.value=Number(e),n.literal=!0}return n.literal||(n.structured=e.indexOf(".")>0,n.structured&&(n.wildcard=".*"==e.slice(-2),n.wildcard&&(n.name=e.slice(0,-2)))),n},_marshalInstanceEffects:function(){Polymer.Bind.prepareInstance(this),this._bindListeners&&Polymer.Bind.setupBindListeners(this)},_applyEffectValue:function(t,e){var n=this._nodes[t.index],r=t.name;if(t.isCompound){var s=n.__compoundStorage__[r];s[t.compoundIndex]=e,e=s.join("")}if("attribute"==t.kind)this.serializeValueToAttribute(e,r,n);else{"className"===r&&(e=this._scopeElementClass(n,e)),("textContent"===r||"input"==n.localName&&"value"==r)&&(e=void 0==e?"":e);var i;n._propertyInfo&&(i=n._propertyInfo[r])&&i.readOnly||this.__setProperty(r,e,!0,n)}},_executeStaticEffects:function(){this._propertyEffects&&this._propertyEffects.__static__&&this._effectEffects("__static__",null,this._propertyEffects.__static__)}}),Polymer.Base._addFeature({_setupConfigure:function(t){if(this._config={},this._handlers=[],t)for(var e in t)void 0!==t[e]&&(this._config[e]=t[e])},_marshalAttributes:function(){this._takeAttributesToModel(this._config)},_attributeChangedImpl:function(t){var e=this._clientsReadied?this:this._config;this._setAttributeToProperty(e,t)},_configValue:function(t,e){var n=this._propertyInfo[t];n&&n.readOnly||(this._config[t]=e)},_beforeClientsReady:function(){this._configure()},_configure:function(){this._configureAnnotationReferences(),this._aboveConfig=this.mixin({},this._config);for(var t={},e=0;e<this.behaviors.length;e++)this._configureProperties(this.behaviors[e].properties,t);this._configureProperties(this.properties,t),this.mixin(t,this._aboveConfig),this._config=t,this._clients&&this._clients.length&&this._distributeConfig(this._config)},_configureProperties:function(t,e){for(var n in t){var r=t[n];if(void 0!==r.value){var s=r.value;"function"==typeof s&&(s=s.call(this,this._config)),e[n]=s}}},_distributeConfig:function(t){var e=this._propertyEffects;if(e)for(var n in t){var r=e[n];if(r)for(var s,i=0,o=r.length;i<o&&(s=r[i]);i++)if("annotation"===s.kind&&!s.isCompound){var a=this._nodes[s.effect.index];if(a._configValue){var l=n===s.effect.value?t[n]:this._get(s.effect.value,t);a._configValue(s.effect.name,l)}}}},_afterClientsReady:function(){this._executeStaticEffects(),this._applyConfig(this._config,this._aboveConfig),this._flushHandlers()},_applyConfig:function(t,e){for(var n in t)void 0===this[n]&&this.__setProperty(n,t[n],n in e)},_notifyListener:function(t,e){if(!Polymer.Bind._isEventBogus(e,e.target)){var n,r;if(e.detail&&(n=e.detail.value,r=e.detail.path),this._clientsReadied)return t.call(this,e.target,n,r);this._queueHandler([t,e.target,n,r])}},_queueHandler:function(t){this._handlers.push(t)},_flushHandlers:function(){for(var t,e=this._handlers,n=0,r=e.length;n<r&&(t=e[n]);n++)t[0].call(this,t[1],t[2],t[3]);this._handlers=[]}}),function(){"use strict";Polymer.Base._addFeature({notifyPath:function(t,e,n){var r={};this._get(t,this,r),this._notifyPath(r.path,e,n)},_notifyPath:function(t,e,n){var r=this._propertySetter(t,e);if(r!==e&&(r===r||e===e))return this._pathEffector(t,e),n||this._notifyPathUp(t,e),!0},_getPathParts:function(t){if(Array.isArray(t)){for(var e=[],n=0;n<t.length;n++)for(var r=t[n].toString().split("."),s=0;s<r.length;s++)e.push(r[s]);return e}return t.toString().split(".")},set:function(t,e,n){var r,s=n||this,i=this._getPathParts(t),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=Polymer.Collection.get(r).getItem(l):(s=s[l],r&&parseInt(l,10)==l&&(i[a]=Polymer.Collection.get(r).getKey(s))),!s)return;r=Array.isArray(s)?s:null}if(r){var h=Polymer.Collection.get(r);if("#"==o[0]){var c=o,u=h.getItem(c);o=r.indexOf(u),h.setItem(c,e)}else if(parseInt(o,10)==o){var u=s[o],c=h.getKey(u);i[a]=c,h.setItem(c,e)}}s[o]=e,n||this._notifyPath(i.join("."),e)}else s[t]=e},get:function(t,e){return this._get(t,e)},_get:function(t,e,n){for(var r,s=e||this,i=this._getPathParts(t),o=0;o<i.length;o++){if(!s)return;var a=i[o]
  ;r&&"#"==a[0]?s=Polymer.Collection.get(r).getItem(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:function(t,e){var n=this._modelForPath(t),r=this._propertyEffects&&this._propertyEffects[n];if(r)for(var s,i=0;i<r.length&&(s=r[i]);i++){var o=s.pathFn;o&&o.call(this,t,e,s.effect)}this._boundPaths&&this._notifyBoundPaths(t,e)},_annotationPathEffect:function(t,e,n){if(n.value===t||0===n.value.indexOf(t+"."))Polymer.Bind._annotationEffect.call(this,t,e,n);else if(0===t.indexOf(n.value+".")&&!n.negate){var r=this._nodes[n.index];if(r&&r._notifyPath){var s=this._fixPath(n.name,n.value,t);r._notifyPath(s,e,!0)}}},_complexObserverPathEffect:function(t,e,n){this._pathMatchesEffect(t,n)&&Polymer.Bind._complexObserverEffect.call(this,t,e,n)},_computePathEffect:function(t,e,n){this._pathMatchesEffect(t,n)&&Polymer.Bind._computeEffect.call(this,t,e,n)},_annotatedComputationPathEffect:function(t,e,n){this._pathMatchesEffect(t,n)&&Polymer.Bind._annotatedComputationEffect.call(this,t,e,n)},_pathMatchesEffect:function(t,e){var n=e.trigger.name;return n==t||0===n.indexOf(t+".")||e.trigger.wildcard&&0===t.indexOf(n)},linkPaths:function(t,e){this._boundPaths=this._boundPaths||{},e?this._boundPaths[t]=e:this.unlinkPaths(t)},unlinkPaths:function(t){this._boundPaths&&delete this._boundPaths[t]},_notifyBoundPaths:function(t,e){for(var n in this._boundPaths){var r=this._boundPaths[n];0==t.indexOf(n+".")?this._notifyPath(this._fixPath(r,n,t),e):0==t.indexOf(r+".")&&this._notifyPath(this._fixPath(n,r,t),e)}},_fixPath:function(t,e,n){return t+n.slice(e.length)},_notifyPathUp:function(t,e){var n=this._modelForPath(t),r=Polymer.CaseMap.camelToDashCase(n),s=r+this._EVENT_CHANGED;this.fire(s,{path:t,value:e},{bubbles:!1,_useCache:!0})},_modelForPath:function(t){var e=t.indexOf(".");return e<0?t:t.slice(0,e)},_EVENT_CHANGED:"-changed",notifySplices:function(t,e){var n={},r=this._get(t,this,n);this._notifySplices(r,n.path,e)},_notifySplices:function(t,e,n){var r={keySplices:Polymer.Collection.applySplices(t,n),indexSplices:n};t.hasOwnProperty("splices")||Object.defineProperty(t,"splices",{configurable:!0,writable:!0}),t.splices=r,this._notifyPath(e+".splices",r),this._notifyPath(e+".length",t.length),r.keySplices=null,r.indexSplices=null},_notifySplice:function(t,e,n,r,s){this._notifySplices(t,e,[{index:n,addedCount:r,removed:s,object:t,type:"splice"}])},push:function(t){var e={},n=this._get(t,this,e),r=Array.prototype.slice.call(arguments,1),s=n.length,i=n.push.apply(n,r);return r.length&&this._notifySplice(n,e.path,s,r.length,[]),i},pop:function(t){var e={},n=this._get(t,this,e),r=Boolean(n.length),s=Array.prototype.slice.call(arguments,1),i=n.pop.apply(n,s);return r&&this._notifySplice(n,e.path,n.length,0,[i]),i},splice:function(t,e,n){var r={},s=this._get(t,this,r);(e=e<0?s.length-Math.floor(-e):Math.floor(e))||(e=0);var i=Array.prototype.slice.call(arguments,1),o=s.splice.apply(s,i),a=Math.max(i.length-2,0);return(a||o.length)&&this._notifySplice(s,r.path,e,a,o),o},shift:function(t){var e={},n=this._get(t,this,e),r=Boolean(n.length),s=Array.prototype.slice.call(arguments,1),i=n.shift.apply(n,s);return r&&this._notifySplice(n,e.path,0,0,[i]),i},unshift:function(t){var e={},n=this._get(t,this,e),r=Array.prototype.slice.call(arguments,1),s=n.unshift.apply(n,r);return r.length&&this._notifySplice(n,e.path,0,r.length,[]),s},prepareModelNotifyPath:function(t){this.mixin(t,{fire:Polymer.Base.fire,_getEvent:Polymer.Base._getEvent,__eventCache:Polymer.Base.__eventCache,notifyPath:Polymer.Base.notifyPath,_get:Polymer.Base._get,_EVENT_CHANGED:Polymer.Base._EVENT_CHANGED,_notifyPath:Polymer.Base._notifyPath,_notifyPathUp:Polymer.Base._notifyPathUp,_pathEffector:Polymer.Base._pathEffector,_annotationPathEffect:Polymer.Base._annotationPathEffect,_complexObserverPathEffect:Polymer.Base._complexObserverPathEffect,_annotatedComputationPathEffect:Polymer.Base._annotatedComputationPathEffect,_computePathEffect:Polymer.Base._computePathEffect,_modelForPath:Polymer.Base._modelForPath,_pathMatchesEffect:Polymer.Base._pathMatchesEffect,_notifyBoundPaths:Polymer.Base._notifyBoundPaths,_getPathParts:Polymer.Base._getPathParts})}})}(),Polymer.Base._addFeature({resolveUrl:function(t){var e=Polymer.DomModule.import(this.is),n="";if(e){var r=e.getAttribute("assetpath")||"";n=Polymer.ResolveUrl.resolveUrl(r,e.ownerDocument.baseURI)}return Polymer.ResolveUrl.resolveUrl(t,n)}}),Polymer.CssParse=function(){return{parse:function(t){return t=this._clean(t),this._parseCss(this._lex(t),t)},_clean:function(t){return t.replace(this._rx.comments,"").replace(this._rx.port,"")},_lex:function(t){for(var e={start:0,end:t.length},n=e,r=0,s=t.length;r<s;r++)switch(t[r]){case this.OPEN_BRACE:n.rules||(n.rules=[]);var i=n;n={start:r+1,parent:i,previous:i.rules[i.rules.length-1]},i.rules.push(n);break;case this.CLOSE_BRACE:n.end=r+1,n=n.parent||e}return e},_parseCss:function(t,e){var n=e.substring(t.start,t.end-1);if(t.parsedCssText=t.cssText=n.trim(),t.parent){var r=t.previous?t.previous.end:t.parent.start;n=e.substring(r,t.start-1),n=this._expandUnicodeEscapes(n),n=n.replace(this._rx.multipleSpaces," "),n=n.substring(n.lastIndexOf(";")+1);var s=t.parsedSelector=t.selector=n.trim();t.atRule=0===s.indexOf(this.AT_START),t.atRule?0===s.indexOf(this.MEDIA_START)?t.type=this.types.MEDIA_RULE:s.match(this._rx.keyframesRule)&&(t.type=this.types.KEYFRAMES_RULE):0===s.indexOf(this.VAR_START)?t.type=this.types.MIXIN_RULE:t.type=this.types.STYLE_RULE}var i=t.rules;if(i)for(var o,a=0,l=i.length;a<l&&(o=i[a]);a++)this._parseCss(o,e);return t},_expandUnicodeEscapes:function(t){return t.replace(/\\([0-9a-f]{1,6})\s/gi,function(){for(var t=arguments[1],e=6-t.length;e--;)t="0"+t;return"\\"+t})},stringify:function(t,e,n){n=n||"";var r="";if(t.cssText||t.rules){var s=t.rules;if(!s||!e&&this._hasMixinRules(s))r=e?t.cssText:this.removeCustomProps(t.cssText),(r=r.trim())&&(r="  "+r+"\n");else for(var i,o=0,a=s.length;o<a&&(i=s[o]);o++)r=this.stringify(i,e,r)}return r&&(t.selector&&(n+=t.selector+" "+this.OPEN_BRACE+"\n"),n+=r,t.selector&&(n+=this.CLOSE_BRACE+"\n\n")),n},_hasMixinRules:function(t){return 0===t[0].selector.indexOf(this.VAR_START)},removeCustomProps:function(t){return t=this.removeCustomPropAssignment(t),this.removeCustomPropApply(t)},removeCustomPropAssignment:function(t){return t.replace(this._rx.customProp,"").replace(this._rx.mixinProp,"")},removeCustomPropApply:function(t){return t.replace(this._rx.mixinApply,"").replace(this._rx.varApply,"")},types:{STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE: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/,multipleSpaces:/\s+/g},VAR_START:"--",MEDIA_START:"@media",AT_START:"@"}}(),Polymer.StyleUtil=function(){return{MODULE_STYLES_SELECTOR:"style, link[rel=import][type~=css], template",INCLUDE_ATTR:"include",toCssText:function(t,e,n){return"string"==typeof t&&(t=this.parser.parse(t)),e&&this.forEachStyleRule(t,e),this.parser.stringify(t,n)},forRulesInStyles:function(t,e){if(t)for(var n,r=0,s=t.length;r<s&&(n=t[r]);r++)this.forEachStyleRule(this.rulesForStyle(n),e)},rulesForStyle:function(t){return!t.__cssRules&&t.textContent&&(t.__cssRules=this.parser.parse(t.textContent)),t.__cssRules},clearStyleRules:function(t){t.__cssRules=null},forEachStyleRule:function(t,e){if(t){var n=(t.parsedSelector,!1);t.type===this.ruleTypes.STYLE_RULE?e(t):t.type!==this.ruleTypes.KEYFRAMES_RULE&&t.type!==this.ruleTypes.MIXIN_RULE||(n=!0);var r=t.rules;if(r&&!n)for(var s,i=0,o=r.length;i<o&&(s=r[i]);i++)this.forEachStyleRule(s,e)}},applyCss:function(t,e,n,r){var s=document.createElement("style");if(e&&s.setAttribute("scope",e),s.textContent=t,n=n||document.head,!r){var i=n.querySelectorAll("style[scope]");r=i[i.length-1]}return n.insertBefore(s,r&&r.nextSibling||n.firstChild),s},cssFromModules:function(t,e){for(var n=t.trim().split(" "),r="",s=0;s<n.length;s++)r+=this.cssFromModule(n[s],e);return r},cssFromModule:function(t,e){var n=Polymer.DomModule.import(t);return n&&!n._cssText&&(n._cssText=this.cssFromElement(n)),!n&&e&&console.warn("Could not find style data in module named",t),n&&n._cssText||""},cssFromElement:function(t){for(var e,n="",r=t.content||t,s=Polymer.DomApi.arrayCopy(r.querySelectorAll(this.MODULE_STYLES_SELECTOR)),i=0;i<s.length;i++)if(e=s[i],"template"===e.localName)n+=this.cssFromElement(e);else if("style"===e.localName){var o=e.getAttribute(this.INCLUDE_ATTR);o&&(n+=this.cssFromModules(o,!0)),e=e.__appliedElement||e,e.parentNode.removeChild(e),n+=this.resolveCss(e.textContent,t.ownerDocument)}else e.import&&e.import.body&&(n+=this.resolveCss(e.import.body.textContent,e.import));return n},resolveCss:Polymer.ResolveUrl.resolveCss,parser:Polymer.CssParse,ruleTypes:Polymer.CssParse.types}}(),Polymer.StyleTransformer=function(){var t=Polymer.Settings.useNativeShadow,e=Polymer.StyleUtil,n={dom:function(t,e,n,r){this._transformDom(t,e||"",n,r)},_transformDom:function(t,e,n,r){t.setAttribute&&this.element(t,e,n,r);for(var s=Polymer.dom(t).childNodes,i=0;i<s.length;i++)this._transformDom(s[i],e,n,r)},element:function(t,e,n,s){if(n)s?t.removeAttribute(r):t.setAttribute(r,e);else if(e)if(t.classList)s?(t.classList.remove(r),t.classList.remove(e)):(t.classList.add(r),t.classList.add(e));else if(t.getAttribute){var i=t.getAttribute(v);s?i&&t.setAttribute(v,i.replace(r,"").replace(e,"")):t.setAttribute(v,i+(i?" ":"")+r+" "+e)}},elementStyles:function(n,r){for(var s,i=n._styles,o="",a=0,l=i.length;a<l&&(s=i[a]);a++){var h=e.rulesForStyle(s);o+=t?e.toCssText(h,r):this.css(h,n.is,n.extends,r,n._scopeCssViaAttr)+"\n\n"}return o.trim()},css:function(t,n,r,s,i){var o=this._calcHostScope(n,r);n=this._calcElementScope(n,i);var a=this;return e.toCssText(t,function(t){t.isScoped||(a.rule(t,n,o),t.isScoped=!0),s&&s(t,n,o)})},_calcElementScope:function(t,e){return t?e?d+t+m:_+t:""},_calcHostScope:function(t,e){return e?"[is="+t+"]":t},rule:function(t,e,n){this._transformRule(t,this._transformComplexSelector,e,n)},_transformRule:function(t,e,n,r){for(var s,o=t.selector.split(i),a=0,l=o.length;a<l&&(s=o[a]);a++)o[a]=e.call(this,s,n,r);t.selector=t.transformedSelector=o.join(i)},_transformComplexSelector:function(t,e,n){var r=!1,s=!1,a=this;return t=t.replace(o,function(t,i,o){if(r)o=o.replace(p," ");else{var l=a._transformCompoundSelector(o,i,e,n);r=r||l.stop,s=s||l.hostContext,i=l.combinator,o=l.value}return i+o}),s&&(t=t.replace(u,function(t,e,r,s){return e+r+" "+n+s+i+" "+e+n+r+s})),t},_transformCompoundSelector:function(t,e,n,r){var s=t.search(p),i=!1;t.indexOf(c)>=0?i=!0:t.indexOf(a)>=0?(t=t.replace(h,function(t,e,n){return r+n}),t=t.replace(a,r)):0!==s&&(t=n?this._transformSimpleSelector(t,n):t),t.indexOf(f)>=0&&(e="");var o;return s>=0&&(t=t.replace(p," "),o=!0),{value:t,combinator:e,stop:o,hostContext:i}},_transformSimpleSelector:function(t,e){var n=t.split(y);return n[0]+=e,n.join(y)},documentRule:function(e){e.selector=e.parsedSelector,this.normalizeRootSelector(e),t||this._transformRule(e,this._transformDocumentSelector)},normalizeRootSelector:function(t){t.selector===l&&(t.selector="body")},_transformDocumentSelector:function(t){return t.match(p)?this._transformComplexSelector(t,s):this._transformSimpleSelector(t.trim(),s)},SCOPE_NAME:"style-scope"},r=n.SCOPE_NAME,s=":not(["+r+"]):not(."+r+")",i=",",o=/(^|[\s>+~]+)([^\s>+~]+)/g,a=":host",l=":root",h=/(\:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/g,c=":host-context",u=/(.*)(?:\:host-context)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))(.*)/,f="::content",p=/\:\:content|\:\:shadow|\/deep\//,_=".",d="["+r+"~=",m="]",y=":",v="class";return n}(),Polymer.StyleExtends=function(){var t=Polymer.StyleUtil;return{hasExtends:function(t){return Boolean(t.match(this.rx.EXTEND))},transform:function(e){var n=t.rulesForStyle(e),r=this;return t.forEachStyleRule(n,function(t){r._mapRule(t);if(t.parent)for(var e;e=r.rx.EXTEND.exec(t.cssText);){var n=e[1],s=r._findExtendor(n,t);s&&r._extendRule(t,s)}t.cssText=t.cssText.replace(r.rx.EXTEND,"")}),t.toCssText(n,function(t){t.selector.match(r.rx.STRIP)&&(t.cssText="")},!0)},_mapRule:function(t){if(t.parent){for(var e,n=t.parent.map||(t.parent.map={}),r=t.selector.split(","),s=0;s<r.length;s++)e=r[s],n[e.trim()]=t;return n}},_findExtendor:function(t,e){return e.parent&&e.parent.map&&e.parent.map[t]||this._findExtendor(t,e.parent)},_extendRule:function(t,e){t.parent!==e.parent&&this._cloneAndAddRuleToParent(e,t.parent),t.extends=t.extends||[],t.extends.push(e),e.selector=e.selector.replace(this.rx.STRIP,""),e.selector=(e.selector&&e.selector+",\n")+t.selector,e.extends&&e.extends.forEach(function(e){this._extendRule(t,e)},this)},_cloneAndAddRuleToParent:function(t,e){t=Object.create(t),t.parent=e,t.extends&&(t.extends=t.extends.slice()),e.rules.push(t)},rx:{EXTEND:/@extends\(([^)]*)\)\s*?;/gim,STRIP:/%[^,]*$/}}}(),function(){var t=Polymer.Base._prepElement,e=Polymer.Settings.useNativeShadow,n=Polymer.StyleUtil,r=Polymer.StyleTransformer,s=Polymer.StyleExtends;Polymer.Base._addFeature({_prepElement:function(e){this._encapsulateStyle&&r.element(e,this.is,this._scopeCssViaAttr),t.call(this,e)},_prepStyles:function(){if(void 0===this._encapsulateStyle&&(this._encapsulateStyle=!e&&Boolean(this._template)),this._template){this._styles=this._collectStyles();var t=r.elementStyles(this);if(t){var s=n.applyCss(t,this.is,e?this._template.content:null);e||(this._scopeStyle=s)}}else this._styles=[]},_collectStyles:function(){var t=[],e="",r=this.styleModules;if(r)for(var i,o=0,a=r.length;o<a&&(i=r[o]);o++)e+=n.cssFromModule(i);e+=n.cssFromModule(this.is);var l=this._template&&this._template.parentNode;if(!this._template||l&&l.id.toLowerCase()===this.is||(e+=n.cssFromElement(this._template)),e){var h=document.createElement("style");h.textContent=e,s.hasExtends(h.textContent)&&(e=s.transform(h)),t.push(h)}return t},_elementAdd:function(t){this._encapsulateStyle&&(t.__styleScoped?t.__styleScoped=!1:r.dom(t,this.is,this._scopeCssViaAttr))},_elementRemove:function(t){this._encapsulateStyle&&r.dom(t,this.is,this._scopeCssViaAttr,!0)},scopeSubtree:function(t,n){if(!e){var r=this,s=function(t){if(t.nodeType===Node.ELEMENT_NODE){t.className=r._scopeElementClass(t,t.className);for(var e,n=t.querySelectorAll("*"),s=0;s<n.length&&(e=n[s]);s++)e.className=r._scopeElementClass(e,e.className)}};if(s(t),n){var i=new MutationObserver(function(t){for(var e,n=0;n<t.length&&(e=t[n]);n++)if(e.addedNodes)for(var r=0;r<e.addedNodes.length;r++)s(e.addedNodes[r])});return i.observe(t,{childList:!0,subtree:!0}),i}}}})}(),Polymer.StyleProperties=function(){"use strict";function t(t,e){var n=parseInt(t/32),r=1<<t%32;e[n]=(e[n]||0)|r}var e=Polymer.Settings.useNativeShadow,n=Polymer.DomApi.matchesSelector,r=Polymer.StyleUtil,s=Polymer.StyleTransformer;return{decorateStyles:function(t){var e=this,n={};r.forRulesInStyles(t,function(t){e.decorateRule(t),e.collectPropertiesInCssText(t.propertyInfo.cssText,n)});var s=[];for(var i in n)s.push(i);return s},decorateRule:function(t){if(t.propertyInfo)return t.propertyInfo;var e={},n={};return this.collectProperties(t,n)&&(e.properties=n,t.rules=null),e.cssText=this.collectCssText(t),t.propertyInfo=e,e},collectProperties:function(t,e){var n=t.propertyInfo;if(!n){for(var r,s,i=this.rx.VAR_ASSIGN,o=t.parsedCssText;r=i.exec(o);)e[r[1]]=(r[2]||r[3]).trim(),s=!0;return s}if(n.properties)return Polymer.Base.mixin(e,n.properties),!0},collectCssText:function(t){var e="",n=t.parsedCssText;n=n.replace(this.rx.BRACKETED,"").replace(this.rx.VAR_ASSIGN,"");for(var r,s=n.split(";"),i=0;i<s.length;i++)r=s[i],(r.match(this.rx.MIXIN_MATCH)||r.match(this.rx.VAR_MATCH))&&(e+=r+";\n");return e},collectPropertiesInCssText:function(t,e){for(var n;n=this.rx.VAR_CAPTURE.exec(t);){e[n[1]]=!0;var r=n[2];r&&r.match(this.rx.IS_VAR)&&(e[r]=!0)}},reify:function(t){for(var e,n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++)e=n[r],t[e]=this.valueForProperty(t[e],t)},valueForProperty:function(t,e){if(t)if(t.indexOf(";")>=0)t=this.valueForProperties(t,e);else{var n=this,r=function(t,r,s,i){return r+(n.valueForProperty(e[s],e)||(e[i]?n.valueForProperty(e[i],e):i)||"")};t=t.replace(this.rx.VAR_MATCH,r)}return t&&t.trim()||""},valueForProperties:function(t,e){for(var n,r,s=t.split(";"),i=0;i<s.length;i++)if(n=s[i]){if(r=n.match(this.rx.MIXIN_MATCH))n=this.valueForProperty(e[r[1]],e);else{var o=n.split(":");o[1]&&(o[1]=o[1].trim(),o[1]=this.valueForProperty(o[1],e)||o[1]),n=o.join(":")}s[i]=n&&n.lastIndexOf(";")===n.length-1?n.slice(0,-1):n||""}return s.filter(function(t){return t}).join(";")},applyProperties:function(t,e){var n="";t.propertyInfo||this.decorateRule(t),t.propertyInfo.cssText&&(n=this.valueForProperties(t.propertyInfo.cssText,e)),t.cssText=n},propertyDataFromStyles:function(e,s){var i={},o=this,a=[],l=0;return r.forRulesInStyles(e,function(e){e.propertyInfo||o.decorateRule(e),s&&e.propertyInfo.properties&&n.call(s,e.transformedSelector||e.parsedSelector)&&(o.collectProperties(e,i),t(l,a)),l++}),{properties:i,key:a}},scopePropertiesFromStyles:function(t){return t._scopeStyleProperties||(t._scopeStyleProperties=this.selectedPropertiesFromStyles(t,this.SCOPE_SELECTORS)),t._scopeStyleProperties},hostPropertiesFromStyles:function(t){return t._hostStyleProperties||(t._hostStyleProperties=this.selectedPropertiesFromStyles(t,this.HOST_SELECTORS)),t._hostStyleProperties},selectedPropertiesFromStyles:function(t,e){var n={},s=this;return r.forRulesInStyles(t,function(t){t.propertyInfo||s.decorateRule(t);for(var r=0;r<e.length;r++)if(t.parsedSelector===e[r])return void s.collectProperties(t,n)}),n},transformStyles:function(t,n,r){var i=this,o=s._calcHostScope(t.is,t.extends),a=t.extends?"\\"+o.slice(0,-1)+"\\]":o,l=new RegExp(this.rx.HOST_PREFIX+a+this.rx.HOST_SUFFIX);return s.elementStyles(t,function(s){i.applyProperties(s,n),s.cssText&&!e&&i._scopeSelector(s,l,o,t._scopeCssViaAttr,r)})},_scopeSelector:function(t,e,n,r,i){t.transformedSelector=t.transformedSelector||t.selector;for(var o,a=t.transformedSelector,l=r?"["+s.SCOPE_NAME+"~="+i+"]":"."+i,h=a.split(","),c=0,u=h.length;c<u&&(o=h[c]);c++)h[c]=o.match(e)?o.replace(n,n+l):l+" "+o;t.selector=h.join(",")},applyElementScopeSelector:function(t,e,n,r){var i=r?t.getAttribute(s.SCOPE_NAME):t.className,o=n?i.replace(n,e):(i?i+" ":"")+this.XSCOPE_NAME+" "+e;i!==o&&(r?t.setAttribute(s.SCOPE_NAME,o):t.className=o)},applyElementStyle:function(t,n,s,i){var o=i?i.textContent||"":this.transformStyles(t,n,s),a=t._customStyle;return a&&!e&&a!==i&&--a._useCount<=0&&a.parentNode&&a.parentNode.removeChild(a),!e&&i&&i.parentNode||(e&&t._customStyle?(t._customStyle.textContent=o,i=t._customStyle):o&&(i=r.applyCss(o,s,e?t.root:null,t._scopeStyle))),i&&(i._useCount=i._useCount||0,t._customStyle!=i&&i._useCount++,t._customStyle=i),i},mixinCustomStyle:function(t,e){var n;for(var r in e)((n=e[r])||0===n)&&(t[r]=n)},rx:{VAR_ASSIGN:/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:([^;{]*)|{([^}]*)})(?:(?=[;\s}])|$)/gi,MIXIN_MATCH:/(?:^|\W+)@apply[\s]*\(([^)]*)\)/i,VAR_MATCH:/(^|\W+)var\([\s]*([^,)]*)[\s]*,?[\s]*((?:[^,)]*)|(?:[^;]*\([^;)]*\)))[\s]*?\)/gi,VAR_CAPTURE:/\([\s]*(--[^,\s)]*)(?:,[\s]*(--[^,\s)]*))?(?:\)|,)/gi,IS_VAR:/^--/,BRACKETED:/\{[^}]*\}/g,HOST_PREFIX:"(?:^|[^.#[:])",HOST_SUFFIX:"($|[.:[\\s>+~])"},HOST_SELECTORS:[":host"],SCOPE_SELECTORS:[":root"],XSCOPE_NAME:"x-scope"}}(),function(){Polymer.StyleCache=function(){this.cache={}},Polymer.StyleCache.prototype={MAX:100,store:function(t,e,n,r){e.keyValues=n,e.styles=r;var s=this.cache[t]=this.cache[t]||[];s.push(e),s.length>this.MAX&&s.shift()},retrieve:function(t,e,n){var r=this.cache[t];if(r)for(var s,i=r.length-1;i>=0;i--)if(s=r[i],n===s.styles&&this._objectsEqual(e,s.keyValues))return s},clear:function(){this.cache={}},_objectsEqual:function(t,e){var n,r;for(var s in t)if(n=t[s],r=e[s],!("object"==typeof n&&n?this._objectsStrictlyEqual(n,r):n===r))return!1;return!Array.isArray(t)||t.length===e.length},_objectsStrictlyEqual:function(t,e){return this._objectsEqual(t,e)&&this._objectsEqual(e,t)}}}(),Polymer.StyleDefaults=function(){var t=Polymer.StyleProperties;Polymer.StyleUtil;return{_styles:[],_properties:null,customStyle:{},_styleCache:new(0,Polymer.StyleCache),addStyle:function(t){this._styles.push(t),this._properties=null},get _styleProperties(){return this._properties||(t.decorateStyles(this._styles),this._styles._scopeStyleProperties=null,this._properties=t.scopePropertiesFromStyles(this._styles),t.mixinCustomStyle(this._properties,this.customStyle),t.reify(this._properties)),this._properties},_needsStyleProperties:function(){},_computeStyleProperties:function(){return this._styleProperties},updateStyles:function(t){this._properties=null,t&&Polymer.Base.mixin(this.customStyle,t),this._styleCache.clear();for(var e,n=0;n<this._styles.length;n++)e=this._styles[n],e=e.__importElement||e,e._apply()}}}(),function(){"use strict";var t=Polymer.Base.serializeValueToAttribute,e=Polymer.StyleProperties,n=Polymer.StyleTransformer,r=(Polymer.StyleUtil,Polymer.StyleDefaults),s=Polymer.Settings.useNativeShadow;Polymer.Base._addFeature({_prepStyleProperties:function(){this._ownStylePropertyNames=this._styles?e.decorateStyles(this._styles):null},customStyle:null,getComputedStyleValue:function(t){return this._styleProperties&&this._styleProperties[t]||getComputedStyle(this).getPropertyValue(t)},_setupStyleProperties:function(){this.customStyle={}},_needsStyleProperties:function(){return Boolean(this._ownStylePropertyNames&&this._ownStylePropertyNames.length)},_beforeAttached:function(){!this._scopeSelector&&this._needsStyleProperties()&&this._updateStyleProperties()},_findStyleHost:function(){for(var t,e=this;t=Polymer.dom(e).getOwnerRoot();){if(Polymer.isInstance(t.host))return t.host;e=t.host}return r},_updateStyleProperties:function(){var t,n=this._findStyleHost();n._styleCache||(n._styleCache=new Polymer.StyleCache);var r=e.propertyDataFromStyles(n._styles,this);r.key.customStyle=this.customStyle,t=n._styleCache.retrieve(this.is,r.key,this._styles);var o=Boolean(t);o?this._styleProperties=t._styleProperties:this._computeStyleProperties(r.properties),this._computeOwnStyleProperties(),o||(t=i.retrieve(this.is,this._ownStyleProperties,this._styles));var a=Boolean(t)&&!o,l=this._applyStyleProperties(t);o||(l=l&&s?l.cloneNode(!0):l,t={style:l,_scopeSelector:this._scopeSelector,_styleProperties:this._styleProperties},r.key.customStyle={},this.mixin(r.key.customStyle,this.customStyle),n._styleCache.store(this.is,t,r.key,this._styles),a||i.store(this.is,Object.create(t),this._ownStyleProperties,this._styles))},_computeStyleProperties:function(t){var n=this._findStyleHost();n._styleProperties||n._computeStyleProperties();var r=Object.create(n._styleProperties);this.mixin(r,e.hostPropertiesFromStyles(this._styles)),t=t||e.propertyDataFromStyles(n._styles,this).properties,this.mixin(r,t),this.mixin(r,e.scopePropertiesFromStyles(this._styles)),e.mixinCustomStyle(r,this.customStyle),e.reify(r),this._styleProperties=r},_computeOwnStyleProperties:function(){for(var t,e={},n=0;n<this._ownStylePropertyNames.length;n++)t=this._ownStylePropertyNames[n],e[t]=this._styleProperties[t];this._ownStyleProperties=e},_scopeCount:0,_applyStyleProperties:function(t){var n=this._scopeSelector;this._scopeSelector=t?t._scopeSelector:this.is+"-"+this.__proto__._scopeCount++;var r=e.applyElementStyle(this,this._styleProperties,this._scopeSelector,t&&t.style);return s||e.applyElementScopeSelector(this,this._scopeSelector,n,this._scopeCssViaAttr),r},serializeValueToAttribute:function(e,n,r){if(r=r||this,"class"===n&&!s){var i=r===this?this.domHost||this.dataHost:this;i&&(e=i._scopeElementClass(r,e))}r=this.shadyRoot&&this.shadyRoot._hasDistributed?Polymer.dom(r):r,t.call(this,e,n,r)},_scopeElementClass:function(t,e){return s||this._scopeCssViaAttr||(e+=(e?" ":"")+o+" "+this.is+(t._scopeSelector?" "+a+" "+t._scopeSelector:"")),e},updateStyles:function(t){this.isAttached&&(t&&this.mixin(this.customStyle,t),this._needsStyleProperties()?this._updateStyleProperties():this._styleProperties=null,this._styleCache&&this._styleCache.clear(),this._updateRootStyles())},_updateRootStyles:function(t){t=t||this.root;for(var e,n=Polymer.dom(t)._query(function(t){return t.shadyRoot||t.shadowRoot}),r=0,s=n.length;r<s&&(e=n[r]);r++)e.updateStyles&&e.updateStyles()}}),Polymer.updateStyles=function(t){r.updateStyles(t),Polymer.Base._updateRootStyles(document)};var i=new Polymer.StyleCache;Polymer.customStyleCache=i;var o=n.SCOPE_NAME,a=e.XSCOPE_NAME}(),Polymer.Base._addFeature({_registerFeatures:function(){this._prepIs(),this._prepConstructor(),this._prepTemplate(),this._prepStyles(),this._prepStyleProperties(),this._prepAnnotations(),this._prepEffects(),this._prepBehaviors(),this._prepPropertyInfo(),this._prepBindings(),this._prepShady()},_prepBehavior:function(t){this._addPropertyEffects(t.properties),this._addComplexObserverEffects(t.observers),this._addHostAttributes(t.hostAttributes)},_initFeatures:function(){this._setupConfigure(),this._setupStyleProperties(),this._setupDebouncers(),this._registerHost(),this._template&&(this._poolContent(),this._beginHosting(),this._stampTemplate(),this._endHosting(),this._marshalAnnotationReferences()),this._marshalInstanceEffects(),this._marshalBehaviors(),this._marshalHostAttributes(),this._marshalAttributes(),this._tryReady()},_marshalBehavior:function(t){t.listeners&&this._listenListeners(t.listeners)}}),function(){var t=(Polymer.Settings.useNativeShadow,Polymer.StyleProperties),e=Polymer.StyleUtil,n=Polymer.CssParse,r=Polymer.StyleDefaults,s=Polymer.StyleTransformer;Polymer({is:"custom-style",extends:"style",_template:null,properties:{include:String},ready:function(){this._tryApply()},attached:function(){this._tryApply()},_tryApply:function(){if(!this._appliesToDocument&&this.parentNode&&"dom-module"!==this.parentNode.localName){this._appliesToDocument=!0;var t=this.__appliedElement||this;if(r.addStyle(t),t.textContent||this.include)this._apply(!0);else{var e=this,n=new MutationObserver(function(){n.disconnect(),e._apply(!0)});n.observe(t,{childList:!0})}}},_apply:function(t){function n(){i._applyCustomProperties(r)}var r=this.__appliedElement||this;if(this.include&&(r.textContent=e.cssFromModules(this.include,!0)+r.textContent),r.textContent){e.forEachStyleRule(e.rulesForStyle(r),function(t){s.documentRule(t)});var i=this;this._pendingApplyProperties&&(cancelAnimationFrame(this._pendingApplyProperties),this._pendingApplyProperties=null),t?this._pendingApplyProperties=requestAnimationFrame(n):n()}},_applyCustomProperties:function(r){this._computeStyleProperties();var s=this._styleProperties,i=e.rulesForStyle(r);r.textContent=e.toCssText(i,function(e){var r=e.cssText=e.parsedCssText;e.propertyInfo&&e.propertyInfo.cssText&&(r=n.removeCustomPropAssignment(r),e.cssText=t.valueForProperties(r,s))})}})}(),Polymer.Templatizer={properties:{__hideTemplateChildren__:{observer:"_showHideChildren"}},_instanceProps:Polymer.nob,_parentPropPrefix:"_parent_",templatize:function(t){if(this._templatized=t,t._content||(t._content=t.content),t._content._ctor)return this.ctor=t._content._ctor,void this._prepParentProperties(this.ctor.prototype,t);var e=Object.create(Polymer.Base);this._customPrepAnnotations(e,t),this._prepParentProperties(e,t),e._prepEffects(),this._customPrepEffects(e),e._prepBehaviors(),e._prepPropertyInfo(),e._prepBindings(),e._notifyPathUp=this._notifyPathUpImpl,e._scopeElementClass=this._scopeElementClassImpl,e.listen=this._listenImpl,e._showHideChildren=this._showHideChildrenImpl;var n=this._constructorImpl,r=function(t,e){n.call(this,t,e)};r.prototype=e,e.constructor=r,t._content._ctor=r,this.ctor=r},_getRootDataHost:function(){return this.dataHost&&this.dataHost._rootDataHost||this.dataHost},_showHideChildrenImpl:function(t){for(var e=this._children,n=0;n<e.length;n++){var r=e[n];Boolean(t)!=Boolean(r.__hideTemplateChildren__)&&(r.nodeType===Node.TEXT_NODE?t?(r.__polymerTextContent__=r.textContent,r.textContent=""):r.textContent=r.__polymerTextContent__:r.style&&(t?(r.__polymerDisplay__=r.style.display,r.style.display="none"):r.style.display=r.__polymerDisplay__)),r.__hideTemplateChildren__=t}},_debounceTemplate:function(t){Polymer.dom.addDebouncer(this.debounce("_debounceTemplate",t))},_flushTemplates:function(t){Polymer.dom.flush()},_customPrepEffects:function(t){var e=t._parentProps;for(var n in e)t._addPropertyEffect(n,"function",this._createHostPropEffector(n));for(var n in this._instanceProps)t._addPropertyEffect(n,"function",this._createInstancePropEffector(n))},_customPrepAnnotations:function(t,e){t._template=e;var n=e._content;if(!n._notes){var r=t._rootDataHost;r&&(Polymer.Annotations.prepElement=function(){r._prepElement()}),n._notes=Polymer.Annotations.parseAnnotations(e),Polymer.Annotations.prepElement=null,this._processAnnotations(n._notes)}t._notes=n._notes,t._parentProps=n._parentProps},_prepParentProperties:function(t,e){var n=this._parentProps=t._parentProps;if(this._forwardParentProp&&n){var r,s=t._parentPropProto;if(!s){for(r in this._instanceProps)delete n[r];s=t._parentPropProto=Object.create(null),e!=this&&(Polymer.Bind.prepareModel(s),Polymer.Base.prepareModelNotifyPath(s));for(r in n){var i=this._parentPropPrefix+r,o=[{kind:"function",effect:this._createForwardPropEffector(r),fn:Polymer.Bind._functionEffect},{kind:"notify",fn:Polymer.Bind._notifyEffect,effect:{event:Polymer.CaseMap.camelToDashCase(i)+"-changed"}}];Polymer.Bind._createAccessors(s,i,o)}}var a=this;e!=this&&(Polymer.Bind.prepareInstance(e),e._forwardParentProp=function(t,e){a._forwardParentProp(t,e)}),this._extendTemplate(e,s),e._pathEffector=function(t,e,n){return a._pathEffectorImpl(t,e,n)}}},_createForwardPropEffector:function(t){return function(e,n){this._forwardParentProp(t,n)}},_createHostPropEffector:function(t){var e=this._parentPropPrefix;return function(n,r){this.dataHost._templatized[e+t]=r}},_createInstancePropEffector:function(t){return function(e,n,r,s){s||this.dataHost._forwardInstanceProp(this,t,n)}},_extendTemplate:function(t,e){for(var n,r=Object.getOwnPropertyNames(e),s=0;s<r.length&&(n=r[s]);s++){var i=t[n],o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o),void 0!==i&&t._propertySetter(n,i)}},_showHideChildren:function(t){},_forwardInstancePath:function(t,e,n){},_forwardInstanceProp:function(t,e,n){},_notifyPathUpImpl:function(t,e){var n=this.dataHost,r=t.indexOf("."),s=r<0?t:t.slice(0,r);n._forwardInstancePath.call(n,this,t,e),s in n._parentProps&&n._templatized.notifyPath(n._parentPropPrefix+t,e)},_pathEffectorImpl:function(t,e,n){if(this._forwardParentPath&&0===t.indexOf(this._parentPropPrefix)){var r=t.substring(this._parentPropPrefix.length);this._modelForPath(r)in this._parentProps&&this._forwardParentPath(r,e)}Polymer.Base._pathEffector.call(this._templatized,t,e,n)},_constructorImpl:function(t,e){this._rootDataHost=e._getRootDataHost(),this._setupConfigure(t),this._registerHost(e),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._children=n,e.__hideTemplateChildren__&&this._showHideChildren(!0),this._tryReady()},_listenImpl:function(t,e,n){var r=this,s=this._rootDataHost,i=s._createEventHandler(t,e,n),o=function(t){t.model=r,i(t)};s._listen(t,e,o)},_scopeElementClassImpl:function(t,e){var n=this._rootDataHost;if(n)return n._scopeElementClass(t,e)},stamp:function(t){if(t=t||{},
  this._parentProps){var e=this._templatized;for(var n in this._parentProps)t[n]=e[this._parentPropPrefix+n]}return new this.ctor(t,this)},modelForElement:function(t){for(var e;t;)if(e=t._templateInstance){if(e.dataHost==this)return e;t=e.dataHost}else t=t.parentNode}},Polymer({is:"dom-template",extends:"template",_template:null,behaviors:[Polymer.Templatizer],ready:function(){this.templatize(this)}}),Polymer._collections=new WeakMap,Polymer.Collection=function(t){Polymer._collections.set(t,this),this.userArray=t,this.store=t.slice(),this.initMap()},Polymer.Collection.prototype={constructor:Polymer.Collection,initMap:function(){for(var t=this.omap=new WeakMap,e=this.pmap={},n=this.store,r=0;r<n.length;r++){var s=n[r];s&&"object"==typeof s?t.set(s,r):e[s]=r}},add:function(t){var e=this.store.push(t)-1;return t&&"object"==typeof t?this.omap.set(t,e):this.pmap[t]=e,"#"+e},removeKey:function(t){t=this._parseKey(t),this._removeFromMap(this.store[t]),delete this.store[t]},_removeFromMap:function(t){t&&"object"==typeof t?this.omap.delete(t):delete this.pmap[t]},remove:function(t){var e=this.getKey(t);return this.removeKey(e),e},getKey:function(t){var e;if(void 0!=(e=t&&"object"==typeof t?this.omap.get(t):this.pmap[t]))return"#"+e},getKeys:function(){return Object.keys(this.store).map(function(t){return"#"+t})},_parseKey:function(t){if("#"==t[0])return t.slice(1);throw new Error("unexpected key "+t)},setItem:function(t,e){t=this._parseKey(t);var n=this.store[t];n&&this._removeFromMap(n),e&&"object"==typeof e?this.omap.set(e,t):this.pmap[e]=t,this.store[t]=e},getItem:function(t){return t=this._parseKey(t),this.store[t]},getItems:function(){var t=[],e=this.store;for(var n in e)t.push(e[n]);return t},_applySplices:function(t){for(var e,n,r={},s=0;s<t.length&&(n=t[s]);s++){n.addedKeys=[];for(var i=0;i<n.removed.length;i++)e=this.getKey(n.removed[i]),r[e]=r[e]?null:-1;for(var i=0;i<n.addedCount;i++){var o=this.userArray[n.index+i];e=this.getKey(o),e=void 0===e?this.add(o):e,r[e]=r[e]?null:1,n.addedKeys.push(e)}}var a=[],l=[];for(var e in r)r[e]<0&&(this.removeKey(e),a.push(e)),r[e]>0&&l.push(e);return[{removed:a,added:l}]}},Polymer.Collection.get=function(t){return Polymer._collections.get(t)||new Polymer.Collection(t)},Polymer.Collection.applySplices=function(t,e){var n=Polymer._collections.get(t);return n?n._applySplices(e):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:String,observer:"_observeChanged"},delay:Number,initialCount:{type:Number,observer:"_initializeChunking"},targetFramerate:{type:Number,value:20},_targetFrameTime:{computed:"_computeFrameTime(targetFramerate)"}},behaviors:[Polymer.Templatizer],observers:["_itemsChanged(items.*)"],created:function(){this._instances=[],this._pool=[],this._limit=1/0;var t=this;this._boundRenderChunk=function(){t._renderChunk()}},detached:function(){for(var t=0;t<this._instances.length;t++)this._detachInstance(t)},attached:function(){for(var t=Polymer.dom(Polymer.dom(this).parentNode),e=0;e<this._instances.length;e++)this._attachInstance(e,t)},ready:function(){this._instanceProps={__key__:!0},this._instanceProps[this.as]=!0,this._instanceProps[this.indexAs]=!0,this.ctor||this.templatize(this)},_sortChanged:function(t){var e=this._getRootDataHost();this._sortFn=t&&("function"==typeof t?t:function(){return e[t].apply(e,arguments)}),this._needFullRefresh=!0,this.items&&this._debounceTemplate(this._render)},_filterChanged:function(t){var e=this._getRootDataHost();this._filterFn=t&&("function"==typeof t?t:function(){return e[t].apply(e,arguments)}),this._needFullRefresh=!0,this.items&&this._debounceTemplate(this._render)},_computeFrameTime:function(t){return Math.ceil(1e3/t)},_initializeChunking:function(){this.initialCount&&(this._limit=this.initialCount,this._chunkCount=this.initialCount,this._lastChunkTime=performance.now())},_tryRenderChunk:function(){this.items&&this._limit<this.items.length&&this.debounce("renderChunk",this._requestRenderChunk)},_requestRenderChunk:function(){requestAnimationFrame(this._boundRenderChunk)},_renderChunk:function(){var t=performance.now(),e=this._targetFrameTime/(t-this._lastChunkTime);this._chunkCount=Math.round(this._chunkCount*e)||1,this._limit+=this._chunkCount,this._lastChunkTime=t,this._debounceTemplate(this._render)},_observeChanged:function(){this._observePaths=this.observe&&this.observe.replace(".*",".").split(" ")},_itemsChanged:function(t){if("items"==t.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.collection=null,this._keySplices=[],this._indexSplices=[],this._needFullRefresh=!0,this._initializeChunking(),this._debounceTemplate(this._render);else if("items.splices"==t.path)this._keySplices=this._keySplices.concat(t.value.keySplices),this._indexSplices=this._indexSplices.concat(t.value.indexSplices),this._debounceTemplate(this._render);else{var e=t.path.slice(6);this._forwardItemPath(e,t.value),this._checkObservedPaths(e)}},_checkObservedPaths:function(t){if(this._observePaths){t=t.substring(t.indexOf(".")+1);for(var e=this._observePaths,n=0;n<e.length;n++)if(0===t.indexOf(e[n]))return this._needFullRefresh=!0,void(this.delay?this.debounce("render",this._render,this.delay):this._debounceTemplate(this._render))}},render:function(){this._needFullRefresh=!0,this._debounceTemplate(this._render),this._flushTemplates()},_render:function(){this.collection;this._needFullRefresh?(this._applyFullRefresh(),this._needFullRefresh=!1):this._keySplices.length&&(this._sortFn?this._applySplicesUserSort(this._keySplices):this._filterFn?this._applyFullRefresh():this._applySplicesArrayOrder(this._indexSplices)),this._keySplices=[],this._indexSplices=[];for(var t=this._keyToInstIdx={},e=this._instances.length-1;e>=0;e--){var n=this._instances[e];n.isPlaceholder&&e<this._limit?n=this._insertInstance(e,n.__key__):!n.isPlaceholder&&e>=this._limit&&(n=this._downgradeInstance(e,n.__key__)),t[n.__key__]=e,n.isPlaceholder||n.__setProperty(this.indexAs,e,!0)}this._pool.length=0,this.fire("dom-change"),this._tryRenderChunk()},_applyFullRefresh:function(){var t,e=this.collection;if(this._sortFn)t=e?e.getKeys():[];else{t=[];var n=this.items;if(n)for(var r=0;r<n.length;r++)t.push(e.getKey(n[r]))}var s=this;this._filterFn&&(t=t.filter(function(t){return s._filterFn(e.getItem(t))})),this._sortFn&&t.sort(function(t,n){return s._sortFn(e.getItem(t),e.getItem(n))});for(var r=0;r<t.length;r++){var i=t[r],o=this._instances[r];o?(o.__key__=i,!o.isPlaceholder&&r<this._limit&&o.__setProperty(this.as,e.getItem(i),!0)):r<this._limit?this._insertInstance(r,i):this._insertPlaceholder(r,i)}for(var a=this._instances.length-1;a>=r;a--)this._detachAndRemoveInstance(a)},_numericSort:function(t,e){return t-e},_applySplicesUserSort:function(t){for(var e,n=this.collection,r=(this._instances,{}),s=0;s<t.length&&(e=t[s]);s++){for(var i=0;i<e.removed.length;i++){var o=e.removed[i];r[o]=r[o]?null:-1}for(var i=0;i<e.added.length;i++){var o=e.added[i];r[o]=r[o]?null:1}}var a=[],l=[];for(var o in r)-1===r[o]&&a.push(this._keyToInstIdx[o]),1===r[o]&&l.push(o);if(a.length){a.sort(this._numericSort);for(var s=a.length-1;s>=0;s--){var h=a[s];void 0!==h&&this._detachAndRemoveInstance(h)}}var c=this;if(l.length){this._filterFn&&(l=l.filter(function(t){return c._filterFn(n.getItem(t))})),l.sort(function(t,e){return c._sortFn(n.getItem(t),n.getItem(e))});for(var u=0,s=0;s<l.length;s++)u=this._insertRowUserSort(u,l[s])}},_insertRowUserSort:function(t,e){for(var n=this.collection,r=n.getItem(e),s=this._instances.length-1,i=-1;t<=s;){var o=t+s>>1,a=this._instances[o].__key__,l=this._sortFn(n.getItem(a),r);if(l<0)t=o+1;else{if(!(l>0)){i=o;break}s=o-1}}return i<0&&(i=s+1),this._insertPlaceholder(i,e),i},_applySplicesArrayOrder:function(t){for(var e,n=(this.collection,0);n<t.length&&(e=t[n]);n++){for(var r=0;r<e.removed.length;r++)this._detachAndRemoveInstance(e.index);for(var r=0;r<e.addedKeys.length;r++)this._insertPlaceholder(e.index+r,e.addedKeys[r])}},_detachInstance:function(t){var e=this._instances[t];if(!e.isPlaceholder){for(var n=0;n<e._children.length;n++){var r=e._children[n];Polymer.dom(e.root).appendChild(r)}return e}},_attachInstance:function(t,e){var n=this._instances[t];n.isPlaceholder||e.insertBefore(n.root,this)},_detachAndRemoveInstance:function(t){var e=this._detachInstance(t);e&&this._pool.push(e),this._instances.splice(t,1)},_insertPlaceholder:function(t,e){this._instances.splice(t,0,{isPlaceholder:!0,__key__:e})},_stampInstance:function(t,e){var n={__key__:e};return n[this.as]=this.collection.getItem(e),n[this.indexAs]=t,this.stamp(n)},_insertInstance:function(t,e){var n=this._pool.pop();n?(n.__setProperty(this.as,this.collection.getItem(e),!0),n.__setProperty("__key__",e,!0)):n=this._stampInstance(t,e);var r=this._instances[t+1],s=r&&!r.isPlaceholder?r._children[0]:this,i=Polymer.dom(this).parentNode;return Polymer.dom(i).insertBefore(n.root,s),this._instances[t]=n,n},_downgradeInstance:function(t,e){var n=this._detachInstance(t);return n&&this._pool.push(n),n={isPlaceholder:!0,__key__:e},this._instances[t]=n,n},_showHideChildren:function(t){for(var e=0;e<this._instances.length;e++)this._instances[e]._showHideChildren(t)},_forwardInstanceProp:function(t,e,n){if(e==this.as){var r;r=this._sortFn||this._filterFn?this.items.indexOf(this.collection.getItem(t.__key__)):t[this.indexAs],this.set("items."+r,n)}},_forwardInstancePath:function(t,e,n){0===e.indexOf(this.as+".")&&this._notifyPath("items."+t.__key__+"."+e.slice(this.as.length+1),n)},_forwardParentProp:function(t,e){for(var n,r=this._instances,s=0;s<r.length&&(n=r[s]);s++)n.isPlaceholder||n.__setProperty(t,e,!0)},_forwardParentPath:function(t,e){for(var n,r=this._instances,s=0;s<r.length&&(n=r[s]);s++)n.isPlaceholder||n._notifyPath(t,e,!0)},_forwardItemPath:function(t,e){if(this._keyToInstIdx){var n=t.indexOf("."),r=t.substring(0,n<0?t.length:n),s=this._keyToInstIdx[r],i=this._instances[s];i&&!i.isPlaceholder&&(n>=0?(t=this.as+"."+t.substring(n+1),i._notifyPath(t,e,!0)):i.__setProperty(this.as,e,!0))}},itemForElement:function(t){var e=this.modelForElement(t);return e&&e[this.as]},keyForElement:function(t){var e=this.modelForElement(t);return e&&e.__key__},indexForElement:function(t){var e=this.modelForElement(t);return e&&e[this.indexAs]}}),Polymer({is:"array-selector",_template:null,properties:{items:{type:Array,observer:"clearSelection"},multi:{type:Boolean,value:!1,observer:"clearSelection"},selected:{type:Object,notify:!0},selectedItem:{type:Object,notify:!0},toggle:{type:Boolean,value:!1}},clearSelection:function(){if(Array.isArray(this.selected))for(var t=0;t<this.selected.length;t++)this.unlinkPaths("selected."+t);else this.unlinkPaths("selected"),this.unlinkPaths("selectedItem");this.multi?this.selected&&!this.selected.length||(this.selected=[],this._selectedColl=Polymer.Collection.get(this.selected)):(this.selected=null,this._selectedColl=null),this.selectedItem=null},isSelected:function(t){return this.multi?void 0!==this._selectedColl.getKey(t):this.selected==t},deselect:function(t){if(this.multi){if(this.isSelected(t)){var e=this._selectedColl.getKey(t);this.arrayDelete("selected",t),this.unlinkPaths("selected."+e)}}else this.selected=null,this.selectedItem=null,this.unlinkPaths("selected"),this.unlinkPaths("selectedItem")},select:function(t){var e=Polymer.Collection.get(this.items),n=e.getKey(t);if(this.multi)if(this.isSelected(t))this.toggle&&this.deselect(t);else{this.push("selected",t);var r=this._selectedColl.getKey(t);this.linkPaths("selected."+r,"items."+n)}else this.toggle&&t==this.selected?this.deselect():(this.selected=t,this.selectedItem=t,this.linkPaths("selected","items."+n),this.linkPaths("selectedItem","items."+n))}}),Polymer({is:"dom-if",extends:"template",_template:null,properties:{if:{type:Boolean,value:!1,observer:"_queueRender"},restamp:{type:Boolean,value:!1,observer:"_queueRender"}},behaviors:[Polymer.Templatizer],_queueRender:function(){this._debounceTemplate(this._render)},detached:function(){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&&(this.fire("dom-change"),this._lastIf=this.if)},_ensureInstance:function(){if(!this._instance){var t=Polymer.dom(this).parentNode;if(t){var e=Polymer.dom(t);this._instance=this.stamp();var n=this._instance.root;e.insertBefore(n,this)}}},_teardownInstance:function(){if(this._instance){var t=this._instance._children;if(t)for(var e,n=Polymer.dom(Polymer.dom(t[0]).parentNode),r=0;r<t.length&&(e=t[r]);r++)n.removeChild(e);this._instance=null}},_showHideChildren:function(){var t=this.__hideTemplateChildren__||!this.if;this._instance&&this._instance._showHideChildren(t)},_forwardParentProp:function(t,e){this._instance&&(this._instance[t]=e)},_forwardParentPath:function(t,e){this._instance&&this._instance._notifyPath(t,e,!0)}}),Polymer({is:"dom-bind",extends:"template",_template:null,created:function(){var t=this;Polymer.RenderStatus.whenReady(function(){t._markImportsReady()})},_ensureReady:function(){this._readied||this._readySelf()},_markImportsReady:function(){this._importsReady=!0,this._ensureReady()},_registerFeatures:function(){this._prepConstructor()},_insertChildren:function(){Polymer.dom(Polymer.dom(this).parentNode).insertBefore(this.root,this)},_removeChildren:function(){if(this._children)for(var t=0;t<this._children.length;t++)this.root.appendChild(this._children[t])},_initFeatures:function(){},_scopeElementClass:function(t,e){return this.dataHost?this.dataHost._scopeElementClass(t,e):e},_prepConfigure:function(){var t={};for(var e in this._propertyEffects)t[e]=this[e];var n=this._setupConfigure;this._setupConfigure=function(){n.call(this,t)}},attached:function(){this._importsReady&&this.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=Polymer.DomApi.arrayCopyChildNodes(this.root)),this._insertChildren(),this.fire("dom-change")}});
  Polymer({is:"iron-localstorage",properties:{name:{type:String,value:""},value:{type:Object,notify:!0},useRaw:{type:Boolean,value:!1},autoSaveDisabled:{type:Boolean,value:!1},errorMessage:{type:String,notify:!0},_loaded:{type:Boolean,value:!1}},observers:["_debounceReload(name,useRaw)","_trySaveValue(autoSaveDisabled)","_trySaveValue(value.*)"],ready:function(){this._boundHandleStorage=this._handleStorage.bind(this)},attached:function(){window.addEventListener("storage",this._boundHandleStorage)},detached:function(){window.removeEventListener("storage",this._boundHandleStorage)},_handleStorage:function(e){e.key==this.name&&this._load(!0)},_trySaveValue:function(){this._doNotSave||this._loaded&&!this.autoSaveDisabled&&this.debounce("save",this.save)},_debounceReload:function(){this.debounce("reload",this.reload)},reload:function(){this._loaded=!1,this._load()},_load:function(e){var a=window.localStorage.getItem(this.name);if(null===a)this._loaded=!0,this._doNotSave=!0,this.value=null,this._doNotSave=!1,this.fire("iron-localstorage-load-empty",{externalChange:e});else{if(!this.useRaw)try{a=JSON.parse(a)}catch(e){this.errorMessage="Could not parse local storage value",console.error("could not parse local storage value",a),a=null}this._loaded=!0,this._doNotSave=!0,this.value=a,this._doNotSave=!1,this.fire("iron-localstorage-load",{externalChange:e})}},save:function(){var e=this.useRaw?this.value:JSON.stringify(this.value);try{null===this.value?window.localStorage.removeItem(this.name):window.localStorage.setItem(this.name,e)}catch(e){this.errorMessage=e.message,console.error("localStorage could not be saved. Safari incoginito mode?",e)}}});
  !function(){"use strict";Polymer({is:"td-model",hostAttributes:{hidden:!0},properties:{items:{type:Array,notify:!0},filter:{type:String}},_initializeDefaultTodos:function(){this.items=[]},newItem:function(t){(t=String(t).trim())&&this.push("items",{title:t,completed:!1})},getCompletedCount:function(){return this.items?this.items.filter(this.filters.completed).length:0},getActiveCount:function(){return this.items?this.items.length-this.getCompletedCount(this.items):0},matchesFilter:function(t,e){var i=this.filters[e];return!i||i(t)},destroyItem:function(t){var e=this.items.indexOf(t);e>-1&&this.splice("items",e,1)},clearCompletedItems:function(){this.items=this.items.filter(this.filters.active)},setItemsCompleted:function(t){for(var e=0;e<this.items.length;++e)this.set(["items",e,"completed"],t)},filters:{active:function(t){return!t.completed},completed:function(t){return t.completed}}})}();
  !function(t){function e(t,e,r,i){var n,o=0,s=0,h=0,r=(r||"(").toString(),i=(i||")").toString();for(n=0;n<t.length;n++){var a=t[n];if(a.indexOf(r,o)>a.indexOf(i,o)||~a.indexOf(r,o)&&!~a.indexOf(i,o)||!~a.indexOf(r,o)&&~a.indexOf(i,o)){if(s=a.indexOf(r,o),h=a.indexOf(i,o),~s&&!~h||!~s&&~h){t=[t.slice(0,(n||1)+1).join(e)].concat(t.slice((n||1)+1))}o=(h>s?h:s)+1,n=0}else o=0}return t}function r(t,e){for(var r,n=0,o="";r=t.substr(n).match(/[^\w\d\- %@&]*\*[^\w\d\- %@&]*/);)n=r.index+r[0].length,r[0]=r[0].replace(/^\*/,"([_.()!\\ %@&a-zA-Z0-9-]+)"),o+=t.substr(0,r.index)+r[0];t=o+=t.substr(n);var s,h,a=t.match(/:([^\/]+)/gi);if(a){h=a.length;for(var c=0;c<h;c++)s=a[c],t="::"===s.slice(0,2)?s.slice(1):t.replace(s,i(s,e))}return t}function i(t,e,r){r=t;for(var i in e)if(e.hasOwnProperty(i)&&(r=e[i](t))!==t)break;return r===t?"([._a-zA-Z0-9-%()]+)":r}function n(t,e,r){if(!t.length)return r();var i=0;!function n(){e(t[i],function(e){e||!1===e?(r(e),r=function(){}):(i+=1,i===t.length?r():n())})}()}function o(t){for(var e=[],r=0,i=t.length;r<i;r++)e=e.concat(t[r]);return e}function h(t,e){for(var r=0;r<t.length;r+=1)if(!1===e(t[r],r,t))return}function a(){return""===c.hash||"#"===c.hash}var c=document.location,u={mode:"modern",hash:c.hash,history:!1,check:function(){var t=c.hash;t!=this.hash&&(this.hash=t,this.onHashChanged())},fire:function(){"modern"===this.mode?!0===this.history?window.onpopstate():window.onhashchange():this.onHashChanged()},init:function(t,e){function r(t){for(var e=0,r=f.listeners.length;e<r;e++)f.listeners[e](t)}var i=this;if(this.history=e,f.listeners||(f.listeners=[]),"onhashchange"in window&&(void 0===document.documentMode||document.documentMode>7))!0===this.history?setTimeout(function(){window.onpopstate=r},500):window.onhashchange=r,this.mode="modern";else{var n=document.createElement("iframe");n.id="state-frame",n.style.display="none",document.body.appendChild(n),this.writeFrame(""),"onpropertychange"in document&&"attachEvent"in document&&document.attachEvent("onpropertychange",function(){"location"===event.propertyName&&i.check()}),window.setInterval(function(){i.check()},50),this.onHashChanged=r,this.mode="legacy"}return f.listeners.push(t),this.mode},destroy:function(t){if(f&&f.listeners)for(var e=f.listeners,r=e.length-1;r>=0;r--)e[r]===t&&e.splice(r,1)},setHash:function(t){return"legacy"===this.mode&&this.writeFrame(t),!0===this.history?(window.history.pushState({},document.title,t),this.fire()):c.hash="/"===t[0]?t:"/"+t,this},writeFrame:function(t){var e=document.getElementById("state-frame"),r=e.contentDocument||e.contentWindow.document;r.open(),r.write("<script>_hash = '"+t+"'; onload = parent.listener.syncHash;<script>"),r.close()},syncHash:function(){var t=this._hash;return t!=c.hash&&(c.hash=t),this},onHashChanged:function(){}},f=t.Router=function(t){if(!(this instanceof f))return new f(t);this.params={},this.routes={},this.methods=["on","once","after","before"],this.scope=[],this._methods={},this._insert=this.insert,this.insert=this.insertEx,this.historySupport=null!=(null!=window.history?window.history.pushState:null),this.configure(),this.mount(t||{})};f.prototype.init=function(t){var e,r=this;return this.handler=function(t){var e=t&&t.newURL||window.location.hash,i=!0===r.history?r.getPath():e.replace(/.*#/,"");r.dispatch("on","/"===i.charAt(0)?i:"/"+i)},u.init(this.handler,this.history),!1===this.history?a()&&t?c.hash=t:a()||r.dispatch("on","/"+c.hash.replace(/^(#\/|#|\/)/,"")):(this.convert_hash_in_init?(e=a()&&t?t:a()?null:c.hash.replace(/^#/,""))&&window.history.replaceState({},document.title,e):e=this.getPath(),(e||!0===this.run_in_init)&&this.handler()),this},f.prototype.explode=function(){var t=!0===this.history?this.getPath():c.hash;return"/"===t.charAt(1)&&(t=t.slice(1)),t.slice(1,t.length).split("/")},f.prototype.setRoute=function(t,e,r){var i=this.explode();return"number"==typeof t&&"string"==typeof e?i[t]=e:"string"==typeof r?i.splice(t,e,s):i=[t],u.setHash(i.join("/")),i},f.prototype.insertEx=function(t,e,r,i){return"once"===t&&(t="on",r=function(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}(r)),this._insert(t,e,r,i)},f.prototype.getRoute=function(t){var e=t;if("number"==typeof t)e=this.explode()[t];else if("string"==typeof t){var r=this.explode();e=r.indexOf(t)}else e=this.explode();return e},f.prototype.destroy=function(){return u.destroy(this.handler),this},f.prototype.getPath=function(){var t=window.location.pathname;return"/"!==t.substr(0,1)&&(t="/"+t),t};var l=/\?.*/;f.prototype.configure=function(t){t=t||{};for(var e=0;e<this.methods.length;e++)this._methods[this.methods[e]]=!0;return this.recurse=t.recurse||this.recurse||!1,this.async=t.async||!1,this.delimiter=t.delimiter||"/",this.strict=void 0===t.strict||t.strict,this.notfound=t.notfound,this.resource=t.resource,this.history=t.html5history&&this.historySupport||!1,this.run_in_init=!0===this.history&&!1!==t.run_handler_in_init,this.convert_hash_in_init=!0===this.history&&!1!==t.convert_hash_in_init,this.every={after:t.after||null,before:t.before||null,on:t.on||null},this},f.prototype.param=function(t,e){":"!==t[0]&&(t=":"+t);var r=new RegExp(t,"g");return this.params[t]=function(t){return t.replace(r,e.source||e)},this},f.prototype.on=f.prototype.route=function(t,r,i){var n=this;return!i&&"function"==typeof r&&(i=r,r=t,t="on"),Array.isArray(r)?r.forEach(function(e){n.on(t,e,i)}):(r.source&&(r=r.source.replace(/\\\//gi,"/")),Array.isArray(t)?t.forEach(function(t){n.on(t.toLowerCase(),r,i)}):(r=r.split(new RegExp(this.delimiter)),r=e(r,this.delimiter),this.insert(t,this.scope.concat(r),i),void 0))},f.prototype.path=function(t,r){var i=this.scope.length;t.source&&(t=t.source.replace(/\\\//gi,"/")),t=t.split(new RegExp(this.delimiter)),t=e(t,this.delimiter),this.scope=this.scope.concat(t),r.call(this,this),this.scope.splice(i,t.length)},f.prototype.dispatch=function(t,e,r){function i(){o.last=s.after,o.invoke(o.runlist(s),o,r)}var n,o=this,s=this.traverse(t,e.replace(l,""),this.routes,""),h=this._invoked;return this._invoked=!0,s&&0!==s.length?("forward"===this.recurse&&(s=s.reverse()),(n=this.every&&this.every.after?[this.every.after].concat(this.last):[this.last])&&n.length>0&&h?(this.async?this.invoke(n,this,i):(this.invoke(n,this),i()),!0):(i(),!0)):(this.last=[],"function"==typeof this.notfound&&this.invoke([this.notfound],{method:t,path:e},r),!1)},f.prototype.invoke=function(t,e,r){var i,o=this;this.async?(i=function(r,o){if(Array.isArray(r))return n(r,i,o);"function"==typeof r&&r.apply(e,(t.captures||[]).concat(o))},n(t,i,function(){r&&r.apply(e,arguments)})):(i=function(r){return Array.isArray(r)?h(r,i):"function"==typeof r?r.apply(e,t.captures||[]):void("string"==typeof r&&o.resource&&o.resource[r].apply(e,t.captures||[]))},h(t,i))},f.prototype.traverse=function(t,e,r,i,n){function o(t){function e(t){for(var r=t.length-1;r>=0;r--)Array.isArray(t[r])?(e(t[r]),0===t[r].length&&t.splice(r,1)):n(t[r])||t.splice(r,1)}function r(t){for(var e=[],i=0;i<t.length;i++)e[i]=Array.isArray(t[i])?r(t[i]):t[i];return e}if(!n)return t;var i=r(t);return i.matched=t.matched,i.captures=t.captures,i.after=t.after.filter(n),e(i),i}var s,h,a,c,u=[];if(e===this.delimiter&&r[t])return c=[[r.before,r[t]].filter(Boolean)],c.after=[r.after].filter(Boolean),c.matched=!0,c.captures=[],o(c);for(var f in r)if(r.hasOwnProperty(f)&&(!this._methods[f]||this._methods[f]&&"object"==typeof r[f]&&!Array.isArray(r[f]))){if(s=h=i+this.delimiter+f,this.strict||(h+="["+this.delimiter+"]?"),a=e.match(new RegExp("^"+h)),!a)continue;if(a[0]&&a[0]==e&&r[f][t])return c=[[r[f].before,r[f][t]].filter(Boolean)],c.after=[r[f].after].filter(Boolean),c.matched=!0,c.captures=a.slice(1),this.recurse&&r===this.routes&&(c.push([r.before,r.on].filter(Boolean)),c.after=c.after.concat([r.after].filter(Boolean))),o(c);if(c=this.traverse(t,e,r[f],s),c.matched)return c.length>0&&(u=u.concat(c)),this.recurse&&(u.push([r[f].before,r[f].on].filter(Boolean)),c.after=c.after.concat([r[f].after].filter(Boolean)),r===this.routes&&(u.push([r.before,r.on].filter(Boolean)),c.after=c.after.concat([r.after].filter(Boolean)))),u.matched=!0,u.captures=c.captures,u.after=c.after,o(u)}return!1},f.prototype.insert=function(t,e,i,n){var o,s,h,a;if(e=e.filter(function(t){return t&&t.length>0}),n=n||this.routes,a=e.shift(),/\:|\*/.test(a)&&!/\\d|\\w/.test(a)&&(a=r(a,this.params)),e.length>0)return n[a]=n[a]||{},this.insert(t,e,i,n[a]);if(a||e.length||n!==this.routes){if(o=typeof n[a],s=Array.isArray(n[a]),n[a]&&!s&&"object"==o)switch(typeof n[a][t]){case"function":return void(n[a][t]=[n[a][t],i]);case"object":return void n[a][t].push(i);case"undefined":return void(n[a][t]=i)}else if("undefined"==o)return h={},h[t]=i,n[a]=h,void 0;throw new Error("Invalid route context: "+o)}switch(typeof n[t]){case"function":return void(n[t]=[n[t],i]);case"object":return void n[t].push(i);case"undefined":return void(n[t]=i)}},f.prototype.extend=function(t){var e,r=this,i=t.length;for(e=0;e<i;e++)!function(t){r._methods[t]=!0,r[t]=function(){var e=1===arguments.length?[t,""]:[t];r.on.apply(r,e.concat(Array.prototype.slice.call(arguments)))}}(t[e])},f.prototype.runlist=function(t){var e=this.every&&this.every.before?[this.every.before].concat(o(t)):o(t);return this.every&&this.every.on&&e.push(this.every.on),e.captures=t.captures,e.source=t.source,e},f.prototype.mount=function(t,r){if(t&&"object"==typeof t&&!Array.isArray(t)){var i=this;r=r||[],Array.isArray(r)||(r=r.split(i.delimiter));for(var n in t)t.hasOwnProperty(n)&&function(r,n){var o=r,s=r.split(i.delimiter),h=typeof t[r],a=""===s[0]||!i._methods[s[0]],c=a?"on":o;a&&(o=o.slice((o.match(new RegExp("^"+i.delimiter))||[""])[0].length),s.shift()),a&&"object"===h&&!Array.isArray(t[r])?(n=n.concat(s),i.mount(t[r],n)):(a&&(n=n.concat(o.split(i.delimiter)),n=e(n,i.delimiter)),i.insert(c,n,t[r]))}(n,r.slice(0))}}}("object"==typeof exports?exports:window);
  Polymer({is:"flatiron-director",properties:{autoHash:{type:Boolean,value:!1},route:{type:String,value:"",notify:!0}},observers:["_routeChanged(route)"],_routingIsReady:!1,ready:function(){this._router.on(/(.*)/,function(t){this.route=t}.bind(this)),this.route=this._router.getRoute()?this._router.getRoute().join(this._router.delimiter):"",this._routingIsReady=!0},_routeChanged:function(){this.autoHash&&this._routingIsReady&&(window.location.hash=this.route?this.route:""),this.fire("director-route",this.route)},get _router(){return window.FlatironDirectorPolymer||(window.FlatironDirectorPolymer=new Router,window.FlatironDirectorPolymer.init()),window.FlatironDirectorPolymer}});
  Polymer.IronSelection=function(e){this.selection=[],this.selectCallback=e},Polymer.IronSelection.prototype={get:function(){return this.multi?this.selection.slice():this.selection[0]},clear:function(e){this.selection.slice().forEach(function(t){(!e||e.indexOf(t)<0)&&this.setItemSelected(t,!1)},this)},isSelected:function(e){return this.selection.indexOf(e)>=0},setItemSelected:function(e,t){if(null!=e){if(t)this.selection.push(e);else{var i=this.selection.indexOf(e);i>=0&&this.selection.splice(i,1)}this.selectCallback&&this.selectCallback(e,t)}},select:function(e){this.multi?this.toggle(e):this.get()!==e&&(this.setItemSelected(this.get(),!1),this.setItemSelected(e,!0))},toggle:function(e){this.setItemSelected(e,!this.isSelected(e))}};
  Polymer.IronSelectableBehavior={properties:{attrForSelected:{type:String,value:null},selected:{type:String,notify:!0},selectedItem:{type:Object,readOnly:!0,notify:!0},activateEvent:{type:String,value:"tap",observer:"_activateEventChanged"},selectable:String,selectedClass:{type:String,value:"iron-selected"},selectedAttribute:{type:String,value:null},items:{type:Array,readOnly:!0,value:function(){return[]}},_excludedLocalNames:{type:Object,value:function(){return{template:1}}}},observers:["_updateSelected(attrForSelected, selected)"],created:function(){this._bindFilterItem=this._filterItem.bind(this),this._selection=new Polymer.IronSelection(this._applySelection.bind(this))},attached:function(){this._observer=this._observeItems(this),this._updateItems(),this._shouldUpdateSelection||this._updateSelected(this.attrForSelected,this.selected),this._addListener(this.activateEvent)},detached:function(){this._observer&&Polymer.dom(this).unobserveNodes(this._observer),this._removeListener(this.activateEvent)},indexOf:function(e){return this.items.indexOf(e)},select:function(e){this.selected=e},selectPrevious:function(){var e=this.items.length,t=(Number(this._valueToIndex(this.selected))-1+e)%e;this.selected=this._indexToValue(t)},selectNext:function(){var e=(Number(this._valueToIndex(this.selected))+1)%this.items.length;this.selected=this._indexToValue(e)},get _shouldUpdateSelection(){return null!=this.selected},_addListener:function(e){this.listen(this,e,"_activateHandler")},_removeListener:function(e){this.unlisten(this,e,"_activateHandler")},_activateEventChanged:function(e,t){this._removeListener(t),this._addListener(e)},_updateItems:function(){var e=Polymer.dom(this).queryDistributedElements(this.selectable||"*");e=Array.prototype.filter.call(e,this._bindFilterItem),this._setItems(e)},_updateSelected:function(){this._selectSelected(this.selected)},_selectSelected:function(e){this._selection.select(this._valueToItem(this.selected))},_filterItem:function(e){return!this._excludedLocalNames[e.localName]},_valueToItem:function(e){return null==e?null:this.items[this._valueToIndex(e)]},_valueToIndex:function(e){if(!this.attrForSelected)return Number(e);for(var t,i=0;t=this.items[i];i++)if(this._valueForItem(t)==e)return i},_indexToValue:function(e){if(!this.attrForSelected)return e;var t=this.items[e];return t?this._valueForItem(t):void 0},_valueForItem:function(e){return e[this.attrForSelected]||e.getAttribute(this.attrForSelected)},_applySelection:function(e,t){this.selectedClass&&this.toggleClass(this.selectedClass,t,e),this.selectedAttribute&&this.toggleAttribute(this.selectedAttribute,t,e),this._selectionChange(),this.fire("iron-"+(t?"select":"deselect"),{item:e})},_selectionChange:function(){this._setSelectedItem(this._selection.get())},_observeItems:function(e){return Polymer.dom(e).observeNodes(function(e){this.fire("iron-items-changed",e,{bubbles:!1,cancelable:!1}),this._updateItems(),this._shouldUpdateSelection&&this._updateSelected()})},_activateHandler:function(e){for(var t=e.target,i=this.items;t&&t!=this;){var s=i.indexOf(t);if(s>=0){var n=this._indexToValue(s);return void this._itemActivate(n,t)}t=t.parentNode}},_itemActivate:function(e,t){this.fire("iron-activate",{selected:e,item:t},{cancelable:!0}).defaultPrevented||this.select(e)}};
  Polymer.IronMultiSelectableBehaviorImpl={properties:{multi:{type:Boolean,value:!1,observer:"multiChanged"},selectedValues:{type:Array,notify:!0},selectedItems:{type:Array,readOnly:!0,notify:!0}},observers:["_updateSelected(attrForSelected, selectedValues)"],select:function(e){this.multi?this.selectedValues?this._toggleSelected(e):this.selectedValues=[e]:this.selected=e},multiChanged:function(e){this._selection.multi=e},get _shouldUpdateSelection(){return null!=this.selected||null!=this.selectedValues&&this.selectedValues.length},_updateSelected:function(){this.multi?this._selectMulti(this.selectedValues):this._selectSelected(this.selected)},_selectMulti:function(e){if(this._selection.clear(),e)for(var t=0;t<e.length;t++)this._selection.setItemSelected(this._valueToItem(e[t]),!0)},_selectionChange:function(){var e=this._selection.get();this.multi?this._setSelectedItems(e):(this._setSelectedItems([e]),this._setSelectedItem(e))},_toggleSelected:function(e){var t=this.selectedValues.indexOf(e),l=t<0;l?this.push("selectedValues",e):this.splice("selectedValues",t,1),this._selection.setItemSelected(this._valueToItem(e),l)}},Polymer.IronMultiSelectableBehavior=[Polymer.IronSelectableBehavior,Polymer.IronMultiSelectableBehaviorImpl];
  Polymer({is:"iron-selector",behaviors:[Polymer.IronMultiSelectableBehavior]});
  !function(){"use strict";Polymer({is:"td-input",extends:"input",listeners:{keyup:"_keyupAction",keypress:"_keypressAction"},_keypressAction:function(e,t,i){13===e.keyCode&&this.fire("td-input-commit")},_keyupAction:function(e,t,i){27===e.keyCode&&this.fire("td-input-cancel")}})}();
  !function(){"use strict";Polymer({is:"td-item",extends:"li",properties:{editing:{type:Boolean,value:!1},item:{type:Object,value:function(){return{}}}},observers:["setHostClass(item.completed, editing)"],setHostClass:function(t,i){this.toggleClass("completed",t),this.toggleClass("editing",i)},_onBlur:function(){this._commitAction(),this.editing=!1},_editAction:function(){this.editing=!0,this._editingValue=this.item.title,this.async(function(){this.querySelector("#edit").focus()})},_commitAction:function(){this.editing&&(this.editing=!1,this.set("item.title",this._editingValue.trim()),""===this.item.title&&this._destroyAction())},_cancelAction:function(){this.editing=!1},_destroyAction:function(){this.fire("td-destroy-item",this.item)}})}();
  !function(){"use strict";Polymer({is:"td-todos",properties:{items:{type:Array},model:{type:Object},modelId:{type:String},route:{type:String},allCompleted:{type:Boolean,computed:"_computeAllCompleted(anyCompleted, activeCount)"},activeCount:{type:Number,computed:"_computeActiveCount(items, items.*)"},anyCompleted:{type:Boolean,computed:"_computeAnyCompleted(items, items.*)"}},attached:function(){this.model=document.querySelector("#"+this.modelId)},_computeLinkClass:function(t,e){return t===e?"selected":""},_computeAnyCompleted:function(t){return!!this.model&&this.model.getCompletedCount()>0},_computeActiveCount:function(t){return this.model?this.model.getActiveCount():0},_computeAllCompleted:function(t,e){return t&&!e},_computeItemsLeft:function(t){return t<2?"item":"items"},matchesFilter:function(t){return function(e,o,n){return!!this.model&&this.model.matchesFilter(e,t)}.bind(this)},addTodoAction:function(){this.model.newItem(this.$["new-todo"].value),this.$["new-todo"].value=""},cancelAddTodoAction:function(){this.$["new-todo"].value=""},destroyItemAction:function(t,e){this.model.destroyItem(e)},toggleAllCompletedAction:function(t){this.model.setItemsCompleted(t.target.checked)},clearCompletedAction:function(){this.model.clearCompletedItems()}})}();