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

Side by Side Diff: dart/pkg/polymer/lib/src/js/polymer/polymer.js

Issue 336013003: Version 1.5.0-dev.4.14 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /** 1 /**
2 * @license 2 * @license
3 * Copyright (c) 2012-2014 The Polymer Authors. All rights reserved. 3 * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
4 * 4 * This code may only be used under the BSD style license found at http://polyme r.github.io/LICENSE.txt
5 * Redistribution and use in source and binary forms, with or without 5 * The complete set of authors may be found at http://polymer.github.io/AUTHORS. txt
6 * modification, are permitted provided that the following conditions are 6 * The complete set of contributors may be found at http://polymer.github.io/CON TRIBUTORS.txt
7 * met: 7 * Code distributed by Google as part of the polymer project is also
8 * 8 * subject to an additional IP rights grant found at http://polymer.github.io/PA TENTS.txt
9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * * Redistributions in binary form must reproduce the above
12 * copyright notice, this list of conditions and the following disclaimer
13 * in the documentation and/or other materials provided with the
14 * distribution.
15 * * Neither the name of Google Inc. nor the names of its
16 * contributors may be used to endorse or promote products derived from
17 * this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */ 9 */
31 // @version: 0.2.2-40bde06 10 // @version: 0.3.1-604ba08
32 Polymer={},"function"==typeof window.Polymer&&(Polymer={}),function(a){function b(a,b){return a&&b&&Object.getOwnPropertyNames(b).forEach(function(c){var d=Obje ct.getOwnPropertyDescriptor(b,c);d&&(Object.defineProperty(a,c,d),"function"==ty peof d.value&&(d.value.nom=c))}),a}a.extend=b}(Polymer),function(a){function b(a ,b,d){return a?a.stop():a=new c(this),a.go(b,d),a}var c=function(a){this.context =a,this.boundComplete=this.complete.bind(this)};c.prototype={go:function(a,b){th is.callback=a;var c;b?(c=setTimeout(this.boundComplete,b),this.handle=function() {clearTimeout(c)}):(c=requestAnimationFrame(this.boundComplete),this.handle=func tion(){cancelAnimationFrame(c)})},stop:function(){this.handle&&(this.handle(),th is.handle=null)},complete:function(){this.handle&&(this.stop(),this.callback.cal l(this.context))}},a.job=b}(Polymer),function(){var a={};HTMLElement.register=fu nction(b,c){a[b]=c},HTMLElement.getPrototypeForTag=function(b){var c=b?a[b]:HTML Element.prototype;return c||Object.getPrototypeOf(document.createElement(b))};va r b=Event.prototype.stopPropagation;Event.prototype.stopPropagation=function(){t his.cancelBubble=!0,b.apply(this,arguments)}}(Polymer),function(a){function b(a) {var c=b.caller,g=c.nom,h=c._super;if(h||(g||(g=c.nom=e.call(this,c)),g||console .warn("called super() on a method not installed declaratively (has no .nom prope rty)"),h=d(c,g,f(this))),h){var i=h[g];return i._super||d(i,g,h),i.apply(this,a| |[])}}function c(a,b,c){for(;a;){if(a[b]!==c&&a[b])return a;a=f(a)}}function d(a ,b,d){return a._super=c(d,b,a),a._super&&(a._super[b].nom=b),a._super}function e (a){for(var b=this.__proto__;b&&b!==HTMLElement.prototype;){for(var c,d=Object.g etOwnPropertyNames(b),e=0,f=d.length;f>e&&(c=d[e]);e++){var g=Object.getOwnPrope rtyDescriptor(b,c);if("function"==typeof g.value&&g.value===a)return c}b=b.__pro to__}}function f(a){return a.__proto__}a.super=b}(Polymer),function(a){function b(a,b){var d=typeof b;return b instanceof Date&&(d="date"),c[d](a,b)}var c={stri ng:function(a){return a},date:function(a){return new Date(Date.parse(a)||Date.no w())},"boolean":function(a){return""===a?!0:"false"===a?!1:!!a},number:function( a){var b=parseFloat(a);return 0===b&&(b=parseInt(a)),isNaN(b)?a:b},object:functi on(a,b){if(null===b)return a;try{return JSON.parse(a.replace(/'/g,'"'))}catch(c) {return a}},"function":function(a,b){return b}};a.deserializeValue=b}(Polymer),f unction(a){var b=a.extend,c={};c.declaration={},c.instance={},c.publish=function (a,c){for(var d in a)b(c,a[d])},a.api=c}(Polymer),function(a){var b={async:funct ion(a,b,c){Platform.flush(),b=b&&b.length?b:[b];var d=function(){(this[a]||a).ap ply(this,b)}.bind(this),e=c?setTimeout(d,c):requestAnimationFrame(d);return c?e: ~e},cancelAsync:function(a){0>a?cancelAnimationFrame(~a):clearTimeout(a)},fire:f unction(a,b,c,d,e){var f=c||this,b=b||{},g=new CustomEvent(a,{bubbles:void 0!==d ?d:!0,cancelable:void 0!==e?e:!0,detail:b});return f.dispatchEvent(g),g},asyncFi re:function(){this.async("fire",arguments)},classFollows:function(a,b,c){b&&b.cl assList.remove(c),a&&a.classList.add(c)}},c=function(){},d={};b.asyncMethod=b.as ync,a.api.instance.utils=b,a.nop=c,a.nob=d}(Polymer),function(a){var b=window.lo gFlags||{},c="on-",d={EVENT_PREFIX:c,addHostListeners:function(){var a=this.even tDelegates;b.events&&Object.keys(a).length>0&&console.log("[%s] addHostListeners :",this.localName,a);var d,e,f=this;for(var g in a)e=c+g,(d=PolymerExpressions.p repareEventBinding(Path.get(a[g]),e,{resolveEventHandler:function(a,b){var c=b.g etValueFrom(f);return c?c.bind(f):void 0}}))(this,this,!1)},dispatchMethod:funct ion(a,c,d){if(a){b.events&&console.group("[%s] dispatch [%s]",a.localName,c);var e="function"==typeof c?c:a[c];e&&e[d?"apply":"call"](a,d),b.events&&console.gro upEnd(),Platform.flush()}}};a.api.instance.events=d}(Polymer),function(a){var b= {copyInstanceAttributes:function(){var a=this._instanceAttributes;for(var b in a )this.hasAttribute(b)||this.setAttribute(b,a[b])},takeAttributes:function(){if(t his._publishLC)for(var a,b=0,c=this.attributes,d=c.length;(a=c[b])&&d>b;b++)this .attributeToProperty(a.name,a.value)},attributeToProperty:function(b,c){var b=th is.propertyForAttribute(b);if(b){if(c&&c.search(a.bindPattern)>=0)return;var d=t his[b],c=this.deserializeValue(c,d);c!==d&&(this[b]=c)}},propertyForAttribute:fu nction(a){var b=this._publishLC&&this._publishLC[a];return b},deserializeValue:f unction(b,c){return a.deserializeValue(b,c)},serializeValue:function(a,b){return "boolean"===b?a?"":void 0:"object"!==b&&"function"!==b&&void 0!==a?a:void 0},ref lectPropertyToAttribute:function(a){var b=typeof this[a],c=this.serializeValue(t his[a],b);void 0!==c?this.setAttribute(a,c):"boolean"===b&&this.removeAttribute( a)}};a.api.instance.attributes=b}(Polymer),function(a){function b(a,b,d){c.bind& &console.log(e,inB.localName||"object",inPath,a.localName,b);var f=d.discardChan ges();return(null===f||void 0===f)&&d.setValue(a[b]),Observer.defineComputedProp erty(a,b,d)}var c=window.logFlags||{},d={observeProperties:function(){var a=this ._observeNames,b=this._publishNames;if(a&&a.length||b&&b.length){var c=this._pro pertyObserver=new CompoundObserver;this.registerObservers([c]);for(var d,e=0,f=a .length;f>e&&(d=a[e]);e++){c.addPath(this,d);var g=Object.getOwnPropertyDescript or(this.__proto__,d);g&&g.value&&this.observeArrayValue(d,g.value,null)}for(var d,e=0,f=b.length;f>e&&(d=b[e]);e++)this.observe&&void 0!==this.observe[d]||c.add Path(this,d);c.open(this.notifyPropertyChanges,this)}},notifyPropertyChanges:fun ction(a,b,c){var d,e,f={};for(var g in b)d=c[2*g+1],void 0!==this.publish[d]&&th is.reflectPropertyToAttribute(d),e=this.observe[d],e&&(this.observeArrayValue(d, a[g],b[g]),f[e]||(f[e]=!0,this.invokeMethod(e,[b[g],a[g],arguments])))},observeA rrayValue:function(a,b,d){var e=this.observe[a];if(e&&(Array.isArray(d)&&(c.obse rve&&console.log("[%s] observeArrayValue: unregister observer [%s]",this.localNa me,a),this.closeNamedObserver(a+"__array")),Array.isArray(b))){c.observe&&consol e.log("[%s] observeArrayValue: register observer [%s]",this.localName,a,b);var f =new ArrayObserver(b);f.open(function(a,b){this.invokeMethod(e,[b])},this),this. registerNamedObserver(a+"__array",f)}},bindProperty:function(a,c){return b(this, a,c)},invokeMethod:function(a,b){var c=this[a]||a;"function"==typeof c&&c.apply( this,b)},registerObservers:function(a){this._observers.push(a)},closeObservers:f unction(){for(var a=0,b=this._observers.length;b>a;a++)this.closeObserverArray(t his._observers[a]);this._observers=[]},closeObserverArray:function(a){for(var b, c=0,d=a.length;d>c;c++)b=a[c],b&&b.close&&b.close()},registerNamedObserver:funct ion(a,b){var c=this._namedObservers||(this._namedObservers={});c[a]=b},closeName dObserver:function(a){var b=this._namedObservers;return b&&b[a]?(b[a].close(),b[ a]=null,!0):void 0},closeNamedObservers:function(){if(this._namedObservers){for( var a,b,c=Object.keys(this._namedObservers),d=0,e=c.length;e>d&&(a=c[d]);d++)b=t his._namedObservers[a],b.close();this._namedObservers={}}}},e="[%s]: bindPropert ies: [%s] to [%s].[%s]";a.api.instance.properties=d}(Polymer),function(a){functi on b(a){for(;a.parentNode;){if(a.lightDomController)return a;a=a.parentNode}retu rn a.host}var c=window.logFlags||0,d=(a.api.instance.events,new PolymerExpressio ns);d.resolveEventHandler=function(a,c,d){var e=b(d);if(e){var f=c.getValueFrom( e);if(f)return f.bind(e)}};var e={syntax:d,instanceTemplate:function(a){var b=a. createInstance(this,this.syntax);return this.registerObservers(b.bindings_),b},b ind:function(a,b){var c=this.propertyForAttribute(a);if(c){var d=this.bindProper ty(c,b);return this.reflectPropertyToAttribute(c),Platform.enableBindingsReflect ion&&(d.path=b.path_,this.bindings_=this.bindings_||{},this.bindings_[a]=d),d}re turn this.mixinSuper(arguments)},asyncUnbindAll:function(){this._unbound||(c.unb ind&&console.log("[%s] asyncUnbindAll",this.localName),this._unbindAllJob=this.j ob(this._unbindAllJob,this.unbindAll,0))},unbindAll:function(){this._unbound||(t his.closeObservers(),this.closeNamedObservers(),this._unbound=!0)},cancelUnbindA ll:function(){return this._unbound?void(c.unbind&&console.warn("[%s] already unb ound, cannot cancel unbindAll",this.localName)):(c.unbind&&console.log("[%s] can celUnbindAll",this.localName),void(this._unbindAllJob&&(this._unbindAllJob=this. _unbindAllJob.stop())))}},f=/\{\{([^{}]*)}}/;a.bindPattern=f,a.api.instance.mdv= e}(Polymer),function(a){function b(a){return a.hasOwnProperty("PolymerBase")}fun ction c(){}var d={PolymerBase:!0,job:function(a,b,c){if("string"!=typeof a)retur n Polymer.job.call(this,a,b,c);var d="___"+a;this[d]=Polymer.job.call(this,this[ d],b,c)},"super":Polymer.super,created:function(){},ready:function(){},createdCa llback:function(){this.templateInstance&&this.templateInstance.model&&console.wa rn("Attributes on "+this.localName+" were data bound prior to Polymer upgrading the element. This may result in incorrect binding types."),this.created(),this.p repareElement()},prepareElement:function(){this._elementPrepared=!0,this.shadowR oots={},this._observers=[],this.observeProperties(),this.copyInstanceAttributes( ),this.takeAttributes(),this.addHostListeners(),this.parseDeclarations(this.__pr oto__),this.removeAttribute("unresolved"),this.ready()},attachedCallback:functio n(){this.cancelUnbindAll(),this.attached&&this.attached(),this.enteredView&&this .enteredView(),this.hasBeenAttached||(this.hasBeenAttached=!0,this.domReady&&thi s.async("domReady"))},detachedCallback:function(){this.preventDispose||this.asyn cUnbindAll(),this.detached&&this.detached(),this.leftView&&this.leftView()},ente redViewCallback:function(){this.attachedCallback()},leftViewCallback:function(){ this.detachedCallback()},enteredDocumentCallback:function(){this.attachedCallbac k()},leftDocumentCallback:function(){this.detachedCallback()},parseDeclarations: function(a){a&&a.element&&(this.parseDeclarations(a.__proto__),a.parseDeclaratio n.call(this,a.element))},parseDeclaration:function(a){var b=this.fetchTemplate(a );if(b){var c=this.shadowFromTemplate(b);this.shadowRoots[a.name]=c}},fetchTempl ate:function(a){return a.querySelector("template")},shadowFromTemplate:function( a){if(a){var b=this.createShadowRoot(),c=this.instanceTemplate(a);return b.appen dChild(c),this.shadowRootReady(b,a),b}},lightFromTemplate:function(a,b){if(a){th is.lightDomController=!0;var c=this.instanceTemplate(a);return b?this.insertBefo re(c,b):this.appendChild(c),this.shadowRootReady(this),c}},shadowRootReady:funct ion(a){this.marshalNodeReferences(a),PointerGestures.register(a)},marshalNodeRef erences:function(a){var b=this.$=this.$||{};if(a)for(var c,d=a.querySelectorAll( "[id]"),e=0,f=d.length;f>e&&(c=d[e]);e++)b[c.id]=c},attributeChangedCallback:fun ction(a){"class"!==a&&"style"!==a&&this.attributeToProperty(a,this.getAttribute( a)),this.attributeChanged&&this.attributeChanged.apply(this,arguments)},onMutati on:function(a,b){var c=new MutationObserver(function(a){b.call(this,c,a),c.disco nnect()}.bind(this));c.observe(a,{childList:!0,subtree:!0})}};c.prototype=d,d.co nstructor=c,a.Base=c,a.isBase=b,a.api.instance.base=d}(Polymer),function(a){func tion b(a){return a.__proto__}function c(a,b){var c="",d=!1;b&&(c=b.localName,d=b .hasAttribute("is"));var e=Platform.ShadowCSS.makeScopeSelector(c,d);return Plat form.ShadowCSS.shimCssText(a,e)}var d=(window.logFlags||{},"element"),e="control ler",f={STYLE_SCOPE_ATTRIBUTE:d,installControllerStyles:function(){var a=this.fi ndStyleScope();if(a&&!this.scopeHasNamedStyle(a,this.localName)){for(var c=b(thi s),d="";c&&c.element;)d+=c.element.cssTextForScope(e),c=b(c);d&&this.installScop eCssText(d,a)}},installScopeStyle:function(a,b,c){var c=c||this.findStyleScope() ,b=b||"";if(c&&!this.scopeHasNamedStyle(c,this.localName+b)){var d="";if(a insta nceof Array)for(var e,f=0,g=a.length;g>f&&(e=a[f]);f++)d+=e.textContent+"\n\n";e lse d=a.textContent;this.installScopeCssText(d,c,b)}},installScopeCssText:functi on(a,b,d){if(b=b||this.findStyleScope(),d=d||"",b){window.ShadowDOMPolyfill&&(a= c(a,b.host));var f=this.element.cssTextToScopeStyle(a,e);Polymer.applyStyleToSco pe(f,b),b._scopeStyles[this.localName+d]=!0}},findStyleScope:function(a){for(var b=a||this;b.parentNode;)b=b.parentNode;return b},scopeHasNamedStyle:function(a, b){return a._scopeStyles=a._scopeStyles||{},a._scopeStyles[b]}};a.api.instance.s tyles=f}(Polymer),function(a){function b(a,b){if(1===arguments.length&&"string"! =typeof arguments[0]){b=a;var c=document._currentScript;if(a=c&&c.parentNode&&c. parentNode.getAttribute?c.parentNode.getAttribute("name"):"",!a)throw"Element na me could not be inferred."}if(f[a])throw"Already registered (Polymer) prototype for element "+a;e(a,b),d(a)}function c(a,b){h[a]=b}function d(a){h[a]&&(h[a].reg isterWhenReady(),delete h[a])}function e(a,b){return i[a]=b||{}}function f(a){re turn i[a]}var g=a.extend,h=(a.api,{}),i={};a.getRegisteredPrototype=f,a.waitingF orPrototype=c,window.Polymer=b,g(Polymer,a);var j=Platform.deliverDeclarations() ;if(j)for(var k,l=0,m=j.length;m>l&&(k=j[l]);l++)b.apply(null,k)}(Polymer),funct ion(a){var b={resolveElementPaths:function(a){Platform.urlResolver.resolveDom(a) },addResolvePathApi:function(){var a=this.getAttribute("assetpath")||"",b=new UR L(a,this.ownerDocument.baseURI);this.prototype.resolvePath=function(a,c){var d=n ew URL(a,c||b);return d.href}}};a.api.declaration.path=b}(Polymer),function(a){f unction b(a,b){var c=new URL(a.getAttribute("href"),b).href;return"@import '"+c+ "';"}function c(a,b){if(a){b===document&&(b=document.head),window.ShadowDOMPolyf ill&&(b=document.head);var c=d(a.textContent),e=a.getAttribute(h);e&&c.setAttrib ute(h,e);var f=b.firstElementChild;if(b===document.head){var g="style["+h+"]",i= document.head.querySelectorAll(g);i.length&&(f=i[i.length-1].nextElementSibling) }b.insertBefore(c,f)}}function d(a,b){b=b||document,b=b.createElement?b:b.ownerD ocument;var c=b.createElement("style");return c.textContent=a,c}function e(a){re turn a&&a.__resource||""}function f(a,b){return p?p.call(a,b):void 0}var g=(wind ow.logFlags||{},a.api.instance.styles),h=g.STYLE_SCOPE_ATTRIBUTE,i="style",j="@i mport",k="link[rel=stylesheet]",l="global",m="polymer-scope",n={loadStyles:funct ion(a){var b=this.templateContent();b&&this.convertSheetsToStyles(b);var c=this. findLoadableStyles(b);c.length?Platform.styleResolver.loadStyles(c,a):a&&a()},co nvertSheetsToStyles:function(a){for(var c,e,f=a.querySelectorAll(k),g=0,h=f.leng th;h>g&&(c=f[g]);g++)e=d(b(c,this.ownerDocument.baseURI),this.ownerDocument),thi s.copySheetAttributes(e,c),c.parentNode.replaceChild(e,c)},copySheetAttributes:f unction(a,b){for(var c,d=0,e=b.attributes,f=e.length;(c=e[d])&&f>d;d++)"rel"!==c .name&&"href"!==c.name&&a.setAttribute(c.name,c.value)},findLoadableStyles:funct ion(a){var b=[];if(a)for(var c,d=a.querySelectorAll(i),e=0,f=d.length;f>e&&(c=d[ e]);e++)c.textContent.match(j)&&b.push(c);return b},installSheets:function(){thi s.cacheSheets(),this.cacheStyles(),this.installLocalSheets(),this.installGlobalS tyles()},cacheSheets:function(){this.sheets=this.findNodes(k),this.sheets.forEac h(function(a){a.parentNode&&a.parentNode.removeChild(a)})},cacheStyles:function( ){this.styles=this.findNodes(i+"["+m+"]"),this.styles.forEach(function(a){a.pare ntNode&&a.parentNode.removeChild(a)})},installLocalSheets:function(){var a=this. sheets.filter(function(a){return!a.hasAttribute(m)}),b=this.templateContent();if (b){var c="";if(a.forEach(function(a){c+=e(a)+"\n"}),c){var f=d(c,this.ownerDocu ment);b.insertBefore(f,b.firstChild)}}},findNodes:function(a,b){var c=this.query SelectorAll(a).array(),d=this.templateContent();if(d){var e=d.querySelectorAll(a ).array();c=c.concat(e)}return b?c.filter(b):c},templateContent:function(){var a =this.querySelector("template");return a&&templateContent(a)},installGlobalStyle s:function(){var a=this.styleForScope(l);c(a,document.head)},cssTextForScope:fun ction(a){var b="",c="["+m+"="+a+"]",d=function(a){return f(a,c)},g=this.sheets.f ilter(d);g.forEach(function(a){b+=e(a)+"\n\n"});var h=this.styles.filter(d);retu rn h.forEach(function(a){b+=a.textContent+"\n\n"}),b},styleForScope:function(a){ var b=this.cssTextForScope(a);return this.cssTextToScopeStyle(b,a)},cssTextToSco peStyle:function(a,b){if(a){var c=d(a);return c.setAttribute(h,this.getAttribute ("name")+"-"+b),c}}},o=HTMLElement.prototype,p=o.matches||o.matchesSelector||o.w ebkitMatchesSelector||o.mozMatchesSelector;a.api.declaration.styles=n,a.applySty leToScope=c}(Polymer),function(a){var b=(window.logFlags||{},a.api.instance.even ts),c=b.EVENT_PREFIX,d={parseHostEvents:function(){var a=this.prototype.eventDel egates;this.addAttributeDelegates(a)},addAttributeDelegates:function(a){for(var b,c=0;b=this.attributes[c];c++)this.hasEventPrefix(b.name)&&(a[this.removeEventP refix(b.name)]=b.value.replace("{{","").replace("}}","").trim())},hasEventPrefix :function(a){return a&&"o"===a[0]&&"n"===a[1]&&"-"===a[2]},removeEventPrefix:fun ction(a){return a.slice(e)}},e=c.length;a.api.declaration.events=d}(Polymer),fun ction(a){var b={inferObservers:function(a){var b,c=a.observe;for(var d in a)"Cha nged"===d.slice(-7)&&(c||(c=a.observe={}),b=d.slice(0,-7),c[b]=c[b]||d)},explode Observers:function(a){var b=a.observe;if(b){var c={};for(var d in b)for(var e,f= d.split(" "),g=0;e=f[g];g++)c[e]=b[d];a.observe=c}},optimizePropertyMaps:functio n(a){if(a.observe){var b=a._observeNames=[];for(var c in a.observe)for(var d,e=c .split(" "),f=0;d=e[f];f++)b.push(d)}if(a.publish){var b=a._publishNames=[];for( var c in a.publish)b.push(c)}},publishProperties:function(a,b){var c=a.publish;c &&(this.requireProperties(c,a,b),a._publishLC=this.lowerCaseMap(c))},requireProp erties:function(a,b,c){for(var d in a)void 0===b[d]&&void 0===c[d]&&(b[d]=a[d])} ,lowerCaseMap:function(a){var b={};for(var c in a)b[c.toLowerCase()]=c;return b} };a.api.declaration.properties=b}(Polymer),function(a){var b="attributes",c=/\s| ,/,d={inheritAttributesObjects:function(a){this.inheritObject(a,"publishLC"),thi s.inheritObject(a,"_instanceAttributes")},publishAttributes:function(a,d){var e= this.getAttribute(b);if(e)for(var f,g=a.publish||(a.publish={}),h=e.split(c),i=0 ,j=h.length;j>i;i++)f=h[i].trim(),f&&void 0===g[f]&&void 0===d[f]&&(g[f]=null)}, accumulateInstanceAttributes:function(){for(var a,b=this.prototype._instanceAttr ibutes,c=this.attributes,d=0,e=c.length;e>d&&(a=c[d]);d++)this.isInstanceAttribu te(a.name)&&(b[a.name]=a.value)},isInstanceAttribute:function(a){return!this.bla ckList[a]&&"on-"!==a.slice(0,3)},blackList:{name:1,"extends":1,constructor:1,nos cript:1,assetpath:1,"cache-csstext":1}};d.blackList[b]=1,a.api.declaration.attri butes=d}(Polymer),function(a){function b(a){if(!Object.__proto__){var b=Object.g etPrototypeOf(a);a.__proto__=b,d(b)&&(b.__proto__=Object.getPrototypeOf(b))}}var c=a.api,d=a.isBase,e=a.extend,f={register:function(a,b){this.buildPrototype(a,b ),this.registerPrototype(a,b),this.publishConstructor()},buildPrototype:function (b,c){var d=a.getRegisteredPrototype(b),e=this.generateBasePrototype(c);this.des ugarBeforeChaining(d,e),this.prototype=this.chainPrototypes(d,e),this.desugarAft erChaining(b,c)},desugarBeforeChaining:function(a,b){a.element=this,this.publish Attributes(a,b),this.publishProperties(a,b),this.inferObservers(a),this.explodeO bservers(a)},chainPrototypes:function(a,c){this.inheritMetaData(a,c);var d=this. chainObject(a,c);return b(d),d},inheritMetaData:function(a,b){this.inheritObject ("observe",a,b),this.inheritObject("publish",a,b),this.inheritObject("_publishLC ",a,b),this.inheritObject("_instanceAttributes",a,b),this.inheritObject("eventDe legates",a,b)},desugarAfterChaining:function(a,b){this.optimizePropertyMaps(this .prototype),this.installSheets(),this.resolveElementPaths(this),this.accumulateI nstanceAttributes(),this.parseHostEvents(),this.addResolvePathApi(),window.Shado wDOMPolyfill&&Platform.ShadowCSS.shimStyling(this.templateContent(),a,b),this.pr ototype.registerCallback&&this.prototype.registerCallback(this)},publishConstruc tor:function(){var a=this.getAttribute("constructor");a&&(window[a]=this.ctor)}, generateBasePrototype:function(a){var b=this.findBasePrototype(a);if(!b){var b=H TMLElement.getPrototypeForTag(a);b=this.ensureBaseApi(b),g[a]=b}return b},findBa sePrototype:function(a){return g[a]},ensureBaseApi:function(a){if(a.PolymerBase) return a;var b=Object.create(a);return c.publish(c.instance,b),this.mixinMethod( b,a,c.instance.mdv,"bind"),b},mixinMethod:function(a,b,c,d){var e=function(a){re turn b[d].apply(this,a)};a[d]=function(){return this.mixinSuper=e,c[d].apply(thi s,arguments)}},inheritObject:function(a,b,c){var d=b[a]||{};b[a]=this.chainObjec t(d,c[a])},registerPrototype:function(a,b){var c={prototype:this.prototype},d=th is.findTypeExtension(b);d&&(c.extends=d),HTMLElement.register(a,this.prototype), this.ctor=document.registerElement(a,c)},findTypeExtension:function(a){if(a&&a.i ndexOf("-")<0)return a;var b=this.findBasePrototype(a);return b.element?this.fin dTypeExtension(b.element.extends):void 0}},g={};f.chainObject=Object.__proto__?f unction(a,b){return a&&b&&a!==b&&(a.__proto__=b),a}:function(a,b){if(a&&b&&a!==b ){var c=Object.create(b);a=e(c,a)}return a},c.declaration.prototype=f}(Polymer), function(a){function b(a){return document.contains(a)?g:f}function c(){return f. length?f[0]:g[0]}function d(a){e.waitToReady=!0,CustomElements.ready=!1,HTMLImpo rts.whenImportsReady(function(){e.addReadyCallback(a),e.waitToReady=!1,e.check() })}var e={wait:function(a,b,c){return-1===this.indexOf(a)&&(this.add(a),a.__chec k=b,a.__go=c),0!==this.indexOf(a)},add:function(a){b(a).push(a)},indexOf:functio n(a){var c=b(a).indexOf(a);return c>=0&&document.contains(a)&&(c+=HTMLImports.us eNative||HTMLImports.ready?f.length:1e9),c},go:function(a){var b=this.remove(a); b&&(b.__go.call(b),b.__check=b.__go=null,this.check())},remove:function(a){var c =this.indexOf(a);if(0===c)return b(a).shift()},check:function(){var a=this.nextE lement();return a&&a.__check.call(a),this.canReady()?(this.ready(),!0):void 0},n extElement:function(){return c()},canReady:function(){return!this.waitToReady&&t his.isEmpty()},isEmpty:function(){return!f.length&&!g.length},ready:function(){i f(CustomElements.ready===!1&&(CustomElements.upgradeDocumentTree(document),Custo mElements.ready=!0),h)for(var a;h.length;)(a=h.shift())()},addReadyCallback:func tion(a){a&&h.push(a)},waitToReady:!0},f=[],g=[],h=[];document.addEventListener(" WebComponentsReady",function(){CustomElements.ready=!1}),a.queue=e,a.whenPolymer Ready=d}(Polymer),function(a){function b(a,b){a?(document.head.appendChild(a),d( b)):b&&b()}function c(a,c){if(a&&a.length){for(var d,e,f=document.createDocument Fragment(),g=0,h=a.length;h>g&&(d=a[g]);g++)e=document.createElement("link"),e.r el="import",e.href=d,f.appendChild(e);b(f,c)}else c&&c()}var d=a.whenPolymerRead y;a.import=c,a.importElements=b}(Polymer),function(a){function b(a){return Boole an(HTMLElement.getPrototypeForTag(a))}function c(a){return a&&a.indexOf("-")>=0} var d=a.extend,e=a.api,f=a.queue,g=a.whenPolymerReady,h=a.getRegisteredPrototype ,i=a.waitingForPrototype,j=d(Object.create(HTMLElement.prototype),{createdCallba ck:function(){this.getAttribute("name")&&this.init()},init:function(){this.name= this.getAttribute("name"),this.extends=this.getAttribute("extends"),this.loadRes ources(),this.registerWhenReady()},registerWhenReady:function(){this.registered| |this.waitingForPrototype(this.name)||this.waitingForQueue()||this.waitingForRes ources()||f.go(this)},_register:function(){c(this.extends)&&!b(this.extends)&&co nsole.warn("%s is attempting to extend %s, an unregistered element or one that w as not registered with Polymer.",this.name,this.extends),this.register(this.name ,this.extends),this.registered=!0},waitingForPrototype:function(a){return h(a)?v oid 0:(i(a,this),this.handleNoScript(a),!0)},handleNoScript:function(a){if(this. hasAttribute("noscript")&&!this.noscript)if(this.noscript=!0,window.CustomElemen ts&&!CustomElements.useNative)Polymer(a);else{var b=document.createElement("scri pt");b.textContent="Polymer('"+a+"');",this.appendChild(b)}},waitingForResources :function(){return this._needsResources},waitingForQueue:function(){return f.wai t(this,this.registerWhenReady,this._register)},loadResources:function(){this._ne edsResources=!0,this.loadStyles(function(){this._needsResources=!1,this.register WhenReady()}.bind(this))}});e.publish(e.declaration,j),a.getRegisteredPrototype= h,g(function(){document.body.removeAttribute("unresolved"),document.dispatchEven t(new CustomEvent("polymer-ready",{bubbles:!0}))}),document.registerElement("pol ymer-element",{prototype:j})}(Polymer); 11 window.PolymerGestures={},function(a){var b={shadow:function(a){return a?a.shado wRoot||a.webkitShadowRoot:void 0},canTarget:function(a){return a&&Boolean(a.elem entFromPoint)},targetingShadow:function(a){var b=this.shadow(a);return this.canT arget(b)?b:void 0},olderShadow:function(a){var b=a.olderShadowRoot;if(!b){var c= a.querySelector("shadow");c&&(b=c.olderShadowRoot)}return b},allShadows:function (a){for(var b=[],c=this.shadow(a);c;)b.push(c),c=this.olderShadow(c);return b},s earchRoot:function(a,b,c){if(a){var d,e,f=a.elementFromPoint(b,c);for(e=this.tar getingShadow(f);e;){if(d=e.elementFromPoint(b,c)){var g=this.targetingShadow(d); return this.searchRoot(g,b,c)||d}e=this.olderShadow(e)}return f}},owner:function (a){if(!a)return document;for(var b=a;b.parentNode;)b=b.parentNode;return b.node Type!=Node.DOCUMENT_NODE&&b.nodeType!=Node.DOCUMENT_FRAGMENT_NODE&&(b=document), b},findTarget:function(a){var b=a.clientX,c=a.clientY,d=this.owner(a.target);ret urn d.elementFromPoint(b,c)||(d=document),this.searchRoot(d,b,c)},LCA:function(a ,b){if(a===b)return a;if(a&&!b)return a;if(b&&!a)return b;if(!b&&!a)return docum ent;if(a.contains&&a.contains(b))return a;if(b.contains&&b.contains(a))return b; var c=this.depth(a),d=this.depth(b),e=c-d;for(e>0?a=this.walk(a,e):b=this.walk(b ,-e);a&&b&&a!==b;)a=this.walk(a,1),b=this.walk(b,1);return a},walk:function(a,b) {for(var c=0;a&&b>c;c++)a=a.parentNode||a.host;return a},depth:function(a){for(v ar b=0;a;)b++,a=a.parentNode||a.host;return b},deepContains:function(a,b){var c= this.LCA(a,b);return c===a},insideNode:function(a,b,c){var d=a.getBoundingClient Rect();return d.left<=b&&b<=d.right&&d.top<=c&&c<=d.bottom}};a.targetFinding=b,a .findTarget=b.findTarget.bind(b),a.deepContains=b.deepContains.bind(b),a.insideN ode=b.insideNode}(window.PolymerGestures),function(){function a(a){return"body / deep/ "+b(a)}function b(a){return'[touch-action="'+a+'"]'}function c(a){return"{ -ms-touch-action: "+a+"; touch-action: "+a+";}"}var d=["none","auto","pan-x","p an-y",{rule:"pan-x pan-y",selectors:["pan-x pan-y","pan-y pan-x"]}],e="",f=(docu ment.head,"string"==typeof document.head.style.touchAction),g=!window.ShadowDOMP olyfill&&document.head.createShadowRoot;if(f){d.forEach(function(d){String(d)=== d?(e+=b(d)+c(d)+"\n",g&&(e+=a(d)+c(d)+"\n")):(e+=d.selectors.map(b)+c(d.rule)+"\ n",g&&(e+=d.selectors.map(a)+c(d.rule)+"\n"))});var h=document.createElement("st yle");h.textContent=e,document.head.appendChild(h)}}(),function(a){var b=["bubbl es","cancelable","view","detail","screenX","screenY","clientX","clientY","ctrlKe y","altKey","shiftKey","metaKey","button","relatedTarget","pageX","pageY"],c=[!1 ,!1,null,null,0,0,0,0,!1,!1,!1,!1,0,null,0,0],d=function(){return function(){}}, e={preventTap:d,makeBaseEvent:function(a,b){var c=document.createEvent("Event"); return c.initEvent(a,b.bubbles||!1,b.cancelable||!1),c.preventTap=e.preventTap(c ),c},makeGestureEvent:function(a,b){b=b||Object.create(null);for(var c,d=this.ma keBaseEvent(a,b),e=0,f=Object.keys(b);e<f.length;e++)c=f[e],d[c]=b[c];return d}, makePointerEvent:function(a,d){d=d||Object.create(null);for(var e,f=this.makeBas eEvent(a,d),g=0;g<b.length;g++)e=b[g],f[e]=d[e]||c[g];f.buttons=d.buttons||0;var h=0;return h=d.pressure?d.pressure:f.buttons?.5:0,f.x=f.clientX,f.y=f.clientY,f .pointerId=d.pointerId||0,f.width=d.width||0,f.height=d.height||0,f.pressure=h,f .tiltX=d.tiltX||0,f.tiltY=d.tiltY||0,f.pointerType=d.pointerType||"",f.hwTimesta mp=d.hwTimestamp||0,f.isPrimary=d.isPrimary||!1,f}};a.eventFactory=e}(window.Pol ymerGestures),function(a){function b(){if(c){var a=new Map;return a.pointers=d,a }this.keys=[],this.values=[]}var c=window.Map&&window.Map.prototype.forEach,d=fu nction(){return this.size};b.prototype={set:function(a,b){var c=this.keys.indexO f(a);c>-1?this.values[c]=b:(this.keys.push(a),this.values.push(b))},has:function (a){return this.keys.indexOf(a)>-1},"delete":function(a){var b=this.keys.indexOf (a);b>-1&&(this.keys.splice(b,1),this.values.splice(b,1))},get:function(a){var b =this.keys.indexOf(a);return this.values[b]},clear:function(){this.keys.length=0 ,this.values.length=0},forEach:function(a,b){this.values.forEach(function(c,d){a .call(b,c,this.keys[d],this)},this)},pointers:function(){return this.keys.length }},a.PointerMap=b}(window.PolymerGestures),function(a){var b=["bubbles","cancela ble","view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey", "shiftKey","metaKey","button","relatedTarget","buttons","pointerId","width","hei ght","pressure","tiltX","tiltY","pointerType","hwTimestamp","isPrimary","type"," target","currentTarget","which","pageX","pageY","timeStamp","preventTap","tapPre vented"],c=[!1,!1,null,null,0,0,0,0,!1,!1,!1,!1,0,null,0,0,0,0,0,0,0,"",0,!1,"", null,null,0,0,0,0,function(){},!1],d="undefined"!=typeof SVGElementInstance,e=wi ndow.ShadowDOMPolyfill&&ShadowDOMPolyfill.wrapIfNeeded||function(a){return a},f= a.eventFactory,g={pointermap:new a.PointerMap,eventMap:Object.create(null),event Sources:Object.create(null),eventSourceList:[],gestures:[],gestureQueue:[],regis terSource:function(a,b){var c=b,d=c.events;d&&(d.forEach(function(a){c[a]&&(this .eventMap[a]=c[a].bind(c))},this),this.eventSources[a]=c,this.eventSourceList.pu sh(c))},registerGesture:function(a,b){this.gestures.push(b)},register:function(a ){if(!window.ShadowDOMPolyfill||a===document)for(var b,c=this.eventSourceList.le ngth,d=0;c>d&&(b=this.eventSourceList[d]);d++)b.register.call(b,a)},unregister:f unction(a){for(var b,c=this.eventSourceList.length,d=0;c>d&&(b=this.eventSourceL ist[d]);d++)b.unregister.call(b,a)},down:function(a){this.fireEvent("down",a)},m ove:function(a){a.type="move",this.fillGestureQueue(a)},up:function(a){this.fire Event("up",a)},cancel:function(a){a.tapPrevented=!0,this.fireEvent("up",a)},even tHandler:function(a){if(!a._handledByPG){var b=a.type,c=this.eventMap&&this.even tMap[b];c&&c(a),a._handledByPG=!0}},listen:function(a,b){b.forEach(function(b){t his.addEvent(a,b)},this)},unlisten:function(a,b){b.forEach(function(b){this.remo veEvent(a,b)},this)},addEvent:function(a,b){window.ShadowDOMPolyfill?a.addEventL istener_(b,this.boundHandler):a.addEventListener(b,this.boundHandler)},removeEve nt:function(a,b){window.ShadowDOMPolyfill?a.removeEventListener_(b,this.boundHan dler):a.removeEventListener(b,this.boundHandler)},makeEvent:function(a,b){var c= f.makePointerEvent(a,b);return c.preventDefault=b.preventDefault,c.tapPrevented= b.tapPrevented,c._target=c._target||b.target,c},fireEvent:function(a,b){var c=th is.makeEvent(a,b);return this.dispatchEvent(c)},cloneEvent:function(a){for(var f ,g=Object.create(null),h=0;h<b.length;h++)f=b[h],g[f]=a[f]||c[h],("target"===f|| "relatedTarget"===f)&&(d&&g[f]instanceof SVGElementInstance&&(g[f]=g[f].correspo ndingUseElement),g[f]=e(g[f]));return g.preventDefault=a.preventDefault,g},dispa tchEvent:function(a){var b=a._target;if(b){b.dispatchEvent(a);var c=this.cloneEv ent(a);c.target=b,this.fillGestureQueue(c)}},gestureTrigger:function(){for(var a ,b=0;b<this.gestureQueue.length;b++){a=this.gestureQueue[b];for(var c,d=0;d<this .gestures.length;d++)c=this.gestures[d],c.events.indexOf(a.type)>=0&&c[a.type].c all(c,a)}this.gestureQueue.length=0},fillGestureQueue:function(a){this.gestureQu eue.length||requestAnimationFrame(this.boundGestureTrigger),this.gestureQueue.pu sh(a)}};g.boundHandler=g.eventHandler.bind(g),g.boundGestureTrigger=g.gestureTri gger.bind(g),a.dispatcher=g,a.register=g.register.bind(g),a.unregister=g.unregis ter.bind(g)}(window.PolymerGestures),function(a){function b(a,b,c,d){this.addCal lback=a.bind(d),this.removeCallback=b.bind(d),this.changedCallback=c.bind(d),g&& (this.observer=new g(this.mutationWatcher.bind(this)))}var c=Array.prototype.for Each.call.bind(Array.prototype.forEach),d=Array.prototype.map.call.bind(Array.pr ototype.map),e=Array.prototype.slice.call.bind(Array.prototype.slice),f=Array.pr ototype.filter.call.bind(Array.prototype.filter),g=window.MutationObserver||wind ow.WebKitMutationObserver,h="[touch-action]",i={subtree:!0,childList:!0,attribut es:!0,attributeOldValue:!0,attributeFilter:["touch-action"]};b.prototype={watchS ubtree:function(b){a.targetFinding.canTarget(b)&&this.observer.observe(b,i)},ena bleOnSubtree:function(a){this.watchSubtree(a),a===document&&"complete"!==documen t.readyState?this.installOnLoad():this.installNewSubtree(a)},installNewSubtree:f unction(a){c(this.findElements(a),this.addElement,this)},findElements:function(a ){return a.querySelectorAll?a.querySelectorAll(h):[]},removeElement:function(a){ this.removeCallback(a)},addElement:function(a){this.addCallback(a)},elementChang ed:function(a,b){this.changedCallback(a,b)},concatLists:function(a,b){return a.c oncat(e(b))},installOnLoad:function(){document.addEventListener("readystatechang e",function(){"complete"===document.readyState&&this.installNewSubtree(document) }.bind(this))},isElement:function(a){return a.nodeType===Node.ELEMENT_NODE},flat tenMutationTree:function(a){var b=d(a,this.findElements,this);return b.push(f(a, this.isElement)),b.reduce(this.concatLists,[])},mutationWatcher:function(a){a.fo rEach(this.mutationHandler,this)},mutationHandler:function(a){if("childList"===a .type){var b=this.flattenMutationTree(a.addedNodes);b.forEach(this.addElement,th is);var c=this.flattenMutationTree(a.removedNodes);c.forEach(this.removeElement, this)}else"attributes"===a.type&&this.elementChanged(a.target,a.oldValue)}},g||( b.prototype.watchSubtree=function(){console.warn("PolymerGestures: MutationObser vers not found, touch-action will not be dynamically detected")}),a.Installer=b} (window.PolymerGestures),function(a){var b=a.dispatcher,c=b.pointermap,d=25,e=[0 ,1,4,2],f=!1;try{f=1===new MouseEvent("test",{buttons:1}).buttons}catch(g){}var h={POINTER_ID:1,POINTER_TYPE:"mouse",events:["mousedown","mousemove","mouseup"], register:function(a){b.listen(a,this.events)},unregister:function(a){b.unlisten( a,this.events)},lastTouches:[],isEventSimulatedFromTouch:function(a){for(var b,c =this.lastTouches,e=a.clientX,f=a.clientY,g=0,h=c.length;h>g&&(b=c[g]);g++){var i=Math.abs(e-b.x),j=Math.abs(f-b.y);if(d>=i&&d>=j)return!0}},prepareEvent:functi on(a){var c=b.cloneEvent(a);return c.pointerId=this.POINTER_ID,c.isPrimary=!0,c. pointerType=this.POINTER_TYPE,f||(c.buttons=e[c.which]||0),c},mousedown:function (a){if(!this.isEventSimulatedFromTouch(a)){var d=c.has(this.POINTER_ID);d&&this. mouseup(a);var e=this.prepareEvent(a);c.set(this.POINTER_ID,e.target),b.down(e)} },mousemove:function(a){if(!this.isEventSimulatedFromTouch(a)){var d=this.prepar eEvent(a);d.target=c.get(this.POINTER_ID),b.move(d)}},mouseup:function(a){if(!th is.isEventSimulatedFromTouch(a)){var d=this.prepareEvent(a);d.relatedTarget=d.ta rget,d.target=c.get(this.POINTER_ID),b.up(d),this.cleanupMouse()}},cleanupMouse: function(){c["delete"](this.POINTER_ID)}};a.mouseEvents=h}(window.PolymerGesture s),function(a){var b,c=a.dispatcher,d=a.targetFinding.allShadows.bind(a.targetFi nding),e=c.pointermap,f=(Array.prototype.map.call.bind(Array.prototype.map),2500 ),g=200,h="touch-action",i="string"==typeof document.head.style.touchAction,j={e vents:["touchstart","touchmove","touchend","touchcancel"],register:function(a){i ?c.listen(a,this.events):b.enableOnSubtree(a)},unregister:function(a){i&&c.unlis ten(a,this.events)},elementAdded:function(a){var b=a.getAttribute(h),e=this.touc hActionToScrollType(b);e&&(a._scrollType=e,c.listen(a,this.events),d(a).forEach( function(a){a._scrollType=e,c.listen(a,this.events)},this))},elementRemoved:func tion(a){a._scrollType=void 0,c.unlisten(a,this.events),d(a).forEach(function(a){ a._scrollType=void 0,c.unlisten(a,this.events)},this)},elementChanged:function(a ,b){var c=a.getAttribute(h),e=this.touchActionToScrollType(c),f=this.touchAction ToScrollType(b);e&&f?(a._scrollType=e,d(a).forEach(function(a){a._scrollType=e}, this)):f?this.elementRemoved(a):e&&this.elementAdded(a)},scrollTypes:{EMITTER:"n one",XSCROLLER:"pan-x",YSCROLLER:"pan-y",SCROLLER:/^(?:pan-x pan-y)|(?:pan-y pan -x)|auto$/},touchActionToScrollType:function(a){var b=a,c=this.scrollTypes;retur n"none"===b?"none":b===c.XSCROLLER?"X":b===c.YSCROLLER?"Y":c.SCROLLER.exec(b)?"X Y":void 0},POINTER_TYPE:"touch",firstTouch:null,isPrimaryTouch:function(a){retur n this.firstTouch===a.identifier},setPrimaryTouch:function(a){(0===e.pointers()| |1===e.pointers()&&e.has(1))&&(this.firstTouch=a.identifier,this.firstXY={X:a.cl ientX,Y:a.clientY},this.scrolling=!1,this.cancelResetClickCount())},removePrimar yPointer:function(a){a.isPrimary&&(this.firstTouch=null,this.firstXY=null,this.r esetClickCount())},clickCount:0,resetId:null,resetClickCount:function(){var a=fu nction(){this.clickCount=0,this.resetId=null}.bind(this);this.resetId=setTimeout (a,g)},cancelResetClickCount:function(){this.resetId&&clearTimeout(this.resetId) },typeToButtons:function(a){var b=0;return("touchstart"===a||"touchmove"===a)&&( b=1),b},findTarget:function(b,c){return"touchstart"===this.currentTouchEvent.typ e?a.findTarget(b):e.get(c)},touchToPointer:function(a){var b=this.currentTouchEv ent,d=c.cloneEvent(a),e=d.pointerId=a.identifier+2;d.target=this.findTarget(a,e) ,d.bubbles=!0,d.cancelable=!0,d.detail=this.clickCount,d.buttons=this.typeToButt ons(b.type),d.width=a.webkitRadiusX||a.radiusX||0,d.height=a.webkitRadiusY||a.ra diusY||0,d.pressure=a.webkitForce||a.force||.5,d.isPrimary=this.isPrimaryTouch(a ),d.pointerType=this.POINTER_TYPE;var f=this;return d.preventDefault=function(){ f.scrolling=!1,f.firstXY=null,b.preventDefault()},d},processTouches:function(a,b ){var c=a.changedTouches;this.currentTouchEvent=a;for(var d,e=0;e<c.length;e++)d =c[e],b.call(this,this.touchToPointer(d))},shouldScroll:function(a){if(this.firs tXY){var b,c=a.currentTarget._scrollType;if("none"===c)b=!1;else if("XY"===c)b=! 0;else{var d=a.changedTouches[0],e=c,f="Y"===c?"X":"Y",g=Math.abs(d["client"+e]- this.firstXY[e]),h=Math.abs(d["client"+f]-this.firstXY[f]);b=g>=h}return this.fi rstXY=null,b}},findTouch:function(a,b){for(var c,d=0,e=a.length;e>d&&(c=a[d]);d+ +)if(c.identifier===b)return!0},vacuumTouches:function(a){var b=a.touches;if(e.p ointers()>=b.length){var c=[];e.forEach(function(a,d){if(1!==d&&!this.findTouch( b,d-2)){var e=a.out;c.push(e)}},this),c.forEach(this.cancelOut,this)}},touchstar t:function(a){this.vacuumTouches(a),this.setPrimaryTouch(a.changedTouches[0]),th is.dedupSynthMouse(a),this.scrolling||(this.clickCount++,this.processTouches(a,t his.down))},down:function(a){e.set(a.pointerId,a.target);c.down(a)},touchmove:fu nction(a){i?this.processTouches(a,this.move):this.scrolling||(this.shouldScroll( a)?(this.scrolling=!0,this.touchcancel(a)):(a.preventDefault(),this.processTouch es(a,this.move)))},move:function(a){var b=e.get(a.pointerId);b&&c.move(a)},touch end:function(a){this.dedupSynthMouse(a),this.processTouches(a,this.up)},up:funct ion(b){this.scrolling||(b.relatedTarget=a.findTarget(b),c.up(b)),this.cleanUpPoi nter(b)},cancel:function(b){b.relatedTarget=a.findTarget(b),c.cancel(b),this.cle anUpPointer(b)},touchcancel:function(a){this.processTouches(a,this.cancel)},clea nUpPointer:function(a){e["delete"](a.pointerId),this.removePrimaryPointer(a)},de dupSynthMouse:function(b){var c=a.mouseEvents.lastTouches,d=b.changedTouches[0]; if(this.isPrimaryTouch(d)){var e={x:d.clientX,y:d.clientY};c.push(e);var g=funct ion(a,b){var c=a.indexOf(b);c>-1&&a.splice(c,1)}.bind(null,c,e);setTimeout(g,f)} }};i||(b=new a.Installer(j.elementAdded,j.elementRemoved,j.elementChanged,j)),a. touchEvents=j}(window.PolymerGestures),function(a){var b=a.dispatcher,c=b.pointe rmap,d=window.MSPointerEvent&&"number"==typeof window.MSPointerEvent.MSPOINTER_T YPE_MOUSE,e={events:["MSPointerDown","MSPointerMove","MSPointerUp","MSPointerCan cel"],register:function(a){b.listen(a,this.events)},unregister:function(a){b.unl isten(a,this.events)},POINTER_TYPES:["","unavailable","touch","pen","mouse"],pre pareEvent:function(a){var c=a;return d&&(c=b.cloneEvent(a),c.pointerType=this.PO INTER_TYPES[a.pointerType]),c},cleanup:function(a){c["delete"](a)},MSPointerDown :function(a){var d=this.prepareEvent(a);c.set(a.pointerId,d.target),b.down(d)},M SPointerMove:function(a){var d=this.prepareEvent(a);d.target=c.get(d.pointerId), b.move(d)},MSPointerUp:function(a){var d=this.prepareEvent(a);d.relatedTarget=d. target,d.target=c.get(d.pointerId),b.up(d),this.cleanup(a.pointerId)},MSPointerC ancel:function(a){var d=this.prepareEvent(a);d.relatedTarget=d.target,d.target=c .get(d.pointerId),b.cancel(d),this.cleanup(a.pointerId)}};a.msEvents=e}(window.P olymerGestures),function(a){var b=a.dispatcher,c=b.pointermap,d={events:["pointe rdown","pointermove","pointerup","pointercancel"],prepareEvent:function(a){retur n b.cloneEvent(a)},register:function(a){b.listen(a,this.events)},unregister:func tion(a){b.unlisten(a,this.events)},cleanup:function(a){c["delete"](a)},pointerdo wn:function(a){var d=this.prepareEvent(a);c.set(d.pointerId,d.target),b.down(d)} ,pointermove:function(a){var d=this.prepareEvent(a);d.target=c.get(d.pointerId), b.move(d)},pointerup:function(a){var d=this.prepareEvent(a);d.relatedTarget=d.ta rget,d.target=c.get(d.pointerId),b.up(d),this.cleanup(a.pointerId)},pointercance l:function(a){var d=this.prepareEvent(a);d.relatedTarget=d.target,d.target=c.get (d.pointerId),b.cancel(d),this.cleanup(a.pointerId)}};a.pointerEvents=d}(window. PolymerGestures),function(a){var b=a.dispatcher;window.PointerEvent?b.registerSo urce("pointer",a.pointerEvents):window.navigator.msPointerEnabled?b.registerSour ce("ms",a.msEvents):(b.registerSource("mouse",a.mouseEvents),void 0!==window.ont ouchstart&&b.registerSource("touch",a.touchEvents)),b.register(document)}(window .PolymerGestures),function(a){var b=a.dispatcher,c=a.eventFactory,d=new a.Pointe rMap,e={events:["down","move","up"],WIGGLE_THRESHOLD:4,clampDir:function(a){retu rn a>0?1:-1},calcPositionDelta:function(a,b){var c=0,d=0;return a&&b&&(c=b.pageX -a.pageX,d=b.pageY-a.pageY),{x:c,y:d}},fireTrack:function(a,b,d){var e=d,f=this. calcPositionDelta(e.downEvent,b),g=this.calcPositionDelta(e.lastMoveEvent,b);g.x &&(e.xDirection=this.clampDir(g.x)),g.y&&(e.yDirection=this.clampDir(g.y));var h =c.makeGestureEvent(a,{bubbles:!0,cancelable:!0,dx:f.x,dy:f.y,ddx:g.x,ddy:g.y,x: b.x,y:b.y,clientX:b.clientX,clientY:b.clientY,pageX:b.pageX,pageY:b.pageY,screen X:b.screenX,screenY:b.screenY,xDirection:e.xDirection,yDirection:e.yDirection,tr ackInfo:e.trackInfo,relatedTarget:b.relatedTarget,pointerType:b.pointerType,poin terId:b.pointerId});e.downTarget.dispatchEvent(h)},down:function(a){if(a.isPrima ry&&("mouse"===a.pointerType?1===a.buttons:!0)){var b={downEvent:a,downTarget:a. target,trackInfo:{},lastMoveEvent:null,xDirection:0,yDirection:0,tracking:!1};d. set(a.pointerId,b)}},move:function(a){var b=d.get(a.pointerId);if(b){if(b.tracki ng)this.fireTrack("track",a,b);else{var c=this.calcPositionDelta(b.downEvent,a), e=c.x*c.x+c.y*c.y;e>this.WIGGLE_THRESHOLD&&(b.tracking=!0,this.fireTrack("tracks tart",b.downEvent,b),this.fireTrack("track",a,b))}b.lastMoveEvent=a}},up:functio n(a){var b=d.get(a.pointerId);b&&(b.tracking&&this.fireTrack("trackend",a,b),d.d elete(a.pointerId))}};b.registerGesture("track",e)}(window.PolymerGestures),func tion(a){var b=a.dispatcher,c=a.eventFactory,d={HOLD_DELAY:200,WIGGLE_THRESHOLD:1 6,events:["down","move","up"],heldPointer:null,holdJob:null,pulse:function(){var a=Date.now()-this.heldPointer.timeStamp,b=this.held?"holdpulse":"hold";this.fir eHold(b,a),this.held=!0},cancel:function(){clearInterval(this.holdJob),this.held &&this.fireHold("release"),this.held=!1,this.heldPointer=null,this.target=null,t his.holdJob=null},down:function(a){a.isPrimary&&!this.heldPointer&&(this.heldPoi nter=a,this.target=a.target,this.holdJob=setInterval(this.pulse.bind(this),this. HOLD_DELAY))},up:function(a){this.heldPointer&&this.heldPointer.pointerId===a.po interId&&this.cancel()},move:function(a){if(this.heldPointer&&this.heldPointer.p ointerId===a.pointerId){var b=a.clientX-this.heldPointer.clientX,c=a.clientY-thi s.heldPointer.clientY;b*b+c*c>this.WIGGLE_THRESHOLD&&this.cancel()}},fireHold:fu nction(a,b){var d={bubbles:!0,cancelable:!0,pointerType:this.heldPointer.pointer Type,pointerId:this.heldPointer.pointerId,x:this.heldPointer.clientX,y:this.held Pointer.clientY};b&&(d.holdTime=b);var e=c.makeGestureEvent(a,d);this.target.dis patchEvent(e)}};b.registerGesture("hold",d)}(window.PolymerGestures),function(a) {var b=a.dispatcher,c=a.eventFactory,d=new a.PointerMap,e={events:["down","up"], down:function(a){a.isPrimary&&!a.tapPrevented&&d.set(a.pointerId,{target:a.targe t,buttons:a.buttons,x:a.clientX,y:a.clientY})},shouldTap:function(a,b){return"mo use"===a.pointerType?1===b.buttons:!a.tapPrevented},up:function(b){var e=d.get(b .pointerId);if(e&&this.shouldTap(b,e)){var f=a.targetFinding.LCA(e.target,b.rela tedTarget);if(f){var g=c.makeGestureEvent("tap",{bubbles:!0,cancelable:!0,x:b.cl ientX,y:b.clientY,detail:b.detail,pointerType:b.pointerType,pointerId:b.pointerI d,altKey:b.altKey,ctrlKey:b.ctrlKey,metaKey:b.metaKey,shiftKey:b.shiftKey});f.di spatchEvent(g)}}d.delete(b.pointerId)}};c.preventTap=function(a){return function (){a.tapPrevented=!0,d.delete(a.pointerId)}},b.registerGesture("tap",e)}(window. PolymerGestures),function(a){"use strict";function b(a,b){if(!a)throw new Error( "ASSERT: "+b)}function c(a){return a>=48&&57>=a}function d(a){return 32===a||9== =a||11===a||12===a||160===a||a>=5760&&"\u1680\u180e\u2000\u2001\u2002\u2003\u200 4\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\ufeff".indexOf(String.fr omCharCode(a))>0}function e(a){return 10===a||13===a||8232===a||8233===a}functio n f(a){return 36===a||95===a||a>=65&&90>=a||a>=97&&122>=a}function g(a){return 3 6===a||95===a||a>=65&&90>=a||a>=97&&122>=a||a>=48&&57>=a}function h(a){return"th is"===a}function i(){for(;Y>X&&d(W.charCodeAt(X));)++X}function j(){var a,b;for( a=X++;Y>X&&(b=W.charCodeAt(X),g(b));)++X;return W.slice(a,X)}function k(){var a, b,c;return a=X,b=j(),c=1===b.length?S.Identifier:h(b)?S.Keyword:"null"===b?S.Nul lLiteral:"true"===b||"false"===b?S.BooleanLiteral:S.Identifier,{type:c,value:b,r ange:[a,X]}}function l(){var a,b,c=X,d=W.charCodeAt(X),e=W[X];switch(d){case 46: case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 6 3:return++X,{type:S.Punctuator,value:String.fromCharCode(d),range:[c,X]};default :if(a=W.charCodeAt(X+1),61===a)switch(d){case 37:case 38:case 42:case 43:case 45 :case 47:case 60:case 62:case 124:return X+=2,{type:S.Punctuator,value:String.fr omCharCode(d)+String.fromCharCode(a),range:[c,X]};case 33:case 61:return X+=2,61 ===W.charCodeAt(X)&&++X,{type:S.Punctuator,value:W.slice(c,X),range:[c,X]}}}retu rn b=W[X+1],e===b&&"&|".indexOf(e)>=0?(X+=2,{type:S.Punctuator,value:e+b,range:[ c,X]}):"<>=!+-*%&|^/".indexOf(e)>=0?(++X,{type:S.Punctuator,value:e,range:[c,X]} ):void s({},V.UnexpectedToken,"ILLEGAL")}function m(){var a,d,e;if(e=W[X],b(c(e. charCodeAt(0))||"."===e,"Numeric literal must start with a decimal digit or a de cimal point"),d=X,a="","."!==e){for(a=W[X++],e=W[X],"0"===a&&e&&c(e.charCodeAt(0 ))&&s({},V.UnexpectedToken,"ILLEGAL");c(W.charCodeAt(X));)a+=W[X++];e=W[X]}if(". "===e){for(a+=W[X++];c(W.charCodeAt(X));)a+=W[X++];e=W[X]}if("e"===e||"E"===e)if (a+=W[X++],e=W[X],("+"===e||"-"===e)&&(a+=W[X++]),c(W.charCodeAt(X)))for(;c(W.ch arCodeAt(X));)a+=W[X++];else s({},V.UnexpectedToken,"ILLEGAL");return f(W.charCo deAt(X))&&s({},V.UnexpectedToken,"ILLEGAL"),{type:S.NumericLiteral,value:parseFl oat(a),range:[d,X]}}function n(){var a,c,d,f="",g=!1;for(a=W[X],b("'"===a||'"'== =a,"String literal must starts with a quote"),c=X,++X;Y>X;){if(d=W[X++],d===a){a ="";break}if("\\"===d)if(d=W[X++],d&&e(d.charCodeAt(0)))"\r"===d&&"\n"===W[X]&&+ +X;else switch(d){case"n":f+="\n";break;case"r":f+="\r";break;case"t":f+=" ";break;case"b":f+="\b";break;case"f":f+="\f";break;case"v":f+=" ";break;default :f+=d}else{if(e(d.charCodeAt(0)))break;f+=d}}return""!==a&&s({},V.UnexpectedToke n,"ILLEGAL"),{type:S.StringLiteral,value:f,octal:g,range:[c,X]}}function o(a){re turn a.type===S.Identifier||a.type===S.Keyword||a.type===S.BooleanLiteral||a.typ e===S.NullLiteral}function p(){var a;return i(),X>=Y?{type:S.EOF,range:[X,X]}:(a =W.charCodeAt(X),40===a||41===a||58===a?l():39===a||34===a?n():f(a)?k():46===a?c (W.charCodeAt(X+1))?m():l():c(a)?m():l())}function q(){var a;return a=$,X=a.rang e[1],$=p(),X=a.range[1],a}function r(){var a;a=X,$=p(),X=a}function s(a,c){var d ,e=Array.prototype.slice.call(arguments,2),f=c.replace(/%(\d)/g,function(a,c){re turn b(c<e.length,"Message reference must be in range"),e[c]});throw d=new Error (f),d.index=X,d.description=f,d}function t(a){s(a,V.UnexpectedToken,a.value)}fun ction u(a){var b=q();(b.type!==S.Punctuator||b.value!==a)&&t(b)}function v(a){re turn $.type===S.Punctuator&&$.value===a}function w(a){return $.type===S.Keyword& &$.value===a}function x(){var a=[];for(u("[");!v("]");)v(",")?(q(),a.push(null)) :(a.push(bb()),v("]")||u(","));return u("]"),Z.createArrayExpression(a)}function y(){var a;return i(),a=q(),a.type===S.StringLiteral||a.type===S.NumericLiteral? Z.createLiteral(a):Z.createIdentifier(a.value)}function z(){var a,b;return a=$,i (),(a.type===S.EOF||a.type===S.Punctuator)&&t(a),b=y(),u(":"),Z.createProperty(" init",b,bb())}function A(){var a=[];for(u("{");!v("}");)a.push(z()),v("}")||u(", ");return u("}"),Z.createObjectExpression(a)}function B(){var a;return u("("),a= bb(),u(")"),a}function C(){var a,b,c;return v("(")?B():(a=$.type,a===S.Identifie r?c=Z.createIdentifier(q().value):a===S.StringLiteral||a===S.NumericLiteral?c=Z. createLiteral(q()):a===S.Keyword?w("this")&&(q(),c=Z.createThisExpression()):a== =S.BooleanLiteral?(b=q(),b.value="true"===b.value,c=Z.createLiteral(b)):a===S.Nu llLiteral?(b=q(),b.value=null,c=Z.createLiteral(b)):v("[")?c=x():v("{")&&(c=A()) ,c?c:void t(q()))}function D(){var a=[];if(u("("),!v(")"))for(;Y>X&&(a.push(bb() ),!v(")"));)u(",");return u(")"),a}function E(){var a;return a=q(),o(a)||t(a),Z. createIdentifier(a.value)}function F(){return u("."),E()}function G(){var a;retu rn u("["),a=bb(),u("]"),a}function H(){var a,b;for(a=C();v(".")||v("[");)v("[")? (b=G(),a=Z.createMemberExpression("[",a,b)):(b=F(),a=Z.createMemberExpression(". ",a,b));return a}function I(){var a,b;return $.type!==S.Punctuator&&$.type!==S.K eyword?b=ab():v("+")||v("-")||v("!")?(a=q(),b=I(),b=Z.createUnaryExpression(a.va lue,b)):w("delete")||w("void")||w("typeof")?s({},V.UnexpectedToken):b=ab(),b}fun ction J(a){var b=0;if(a.type!==S.Punctuator&&a.type!==S.Keyword)return 0;switch( a.value){case"||":b=1;break;case"&&":b=2;break;case"==":case"!=":case"===":case" !==":b=6;break;case"<":case">":case"<=":case">=":case"instanceof":b=7;break;case "in":b=7;break;case"+":case"-":b=9;break;case"*":case"/":case"%":b=11}return b}f unction K(){var a,b,c,d,e,f,g,h;if(g=I(),b=$,c=J(b),0===c)return g;for(b.prec=c, q(),e=I(),d=[g,b,e];(c=J($))>0;){for(;d.length>2&&c<=d[d.length-2].prec;)e=d.pop (),f=d.pop().value,g=d.pop(),a=Z.createBinaryExpression(f,g,e),d.push(a);b=q(),b .prec=c,d.push(b),a=I(),d.push(a)}for(h=d.length-1,a=d[h];h>1;)a=Z.createBinaryE xpression(d[h-1].value,d[h-2],a),h-=2;return a}function L(){var a,b,c;return a=K (),v("?")&&(q(),b=L(),u(":"),c=L(),a=Z.createConditionalExpression(a,b,c)),a}fun ction M(){var a,b;return a=q(),a.type!==S.Identifier&&t(a),b=v("(")?D():[],Z.cre ateFilter(a.value,b)}function N(){for(;v("|");)q(),M()}function O(){i(),r();var a=bb();a&&(","===$.value||"in"==$.value&&a.type===U.Identifier?Q(a):(N(),"as"=== $.value?P(a):Z.createTopLevel(a))),$.type!==S.EOF&&t($)}function P(a){q();var b= q().value;Z.createAsExpression(a,b)}function Q(a){var b;","===$.value&&(q(),$.ty pe!==S.Identifier&&t($),b=q().value),q();var c=bb();N(),Z.createInExpression(a.n ame,b,c)}function R(a,b){return Z=b,W=a,X=0,Y=W.length,$=null,_={labelSet:{}},O( )}var S,T,U,V,W,X,Y,Z,$,_;S={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullL iteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8},T={},T[S.BooleanLiteral] ="Boolean",T[S.EOF]="<end>",T[S.Identifier]="Identifier",T[S.Keyword]="Keyword", T[S.NullLiteral]="Null",T[S.NumericLiteral]="Numeric",T[S.Punctuator]="Punctuato r",T[S.StringLiteral]="String",U={ArrayExpression:"ArrayExpression",BinaryExpres sion:"BinaryExpression",CallExpression:"CallExpression",ConditionalExpression:"C onditionalExpression",EmptyStatement:"EmptyStatement",ExpressionStatement:"Expre ssionStatement",Identifier:"Identifier",Literal:"Literal",LabeledStatement:"Labe ledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpr ession",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property ",ThisExpression:"ThisExpression",UnaryExpression:"UnaryExpression"},V={Unexpect edToken:"Unexpected token %0",UnknownLabel:"Undefined label '%0'",Redeclaration: "%0 '%1' has already been declared"};var ab=H,bb=L;a.esprima={parse:R}}(this),fu nction(a){"use strict";function b(a,b,d,e){var f;try{if(f=c(a),f.scopeIdent&&(d. nodeType!==Node.ELEMENT_NODE||"TEMPLATE"!==d.tagName||"bind"!==b&&"repeat"!==b)) throw Error("as and in can only be used within <template bind/repeat>")}catch(g) {return void console.error("Invalid expression syntax: "+a,g)}return function(a, b,c){var d=f.getBinding(a,e,c);return f.scopeIdent&&d&&(b.polymerExpressionScope Ident_=f.scopeIdent,f.indexIdent&&(b.polymerExpressionIndexIdent_=f.indexIdent)) ,d}}function c(a){var b=q[a];if(!b){var c=new j;esprima.parse(a,c),b=new l(c),q[ a]=b}return b}function d(a){this.value=a,this.valueFn_=void 0}function e(a){this .name=a,this.path=Path.get(a)}function f(a,b,c){this.dynamicDeps="function"==typ eof a||a.dynamicDeps||"["==c&&!(b instanceof d),"["==c&&b instanceof d&&Path.get (b.value).valid&&(c=".",b=new e(b.value)),this.simplePath=!this.dynamicDeps&&b i nstanceof e&&(a instanceof f||a instanceof e),this.object=this.simplePath?a:i(a) ,this.property="."==c?b:i(b)}function g(a,b){this.name=a,this.args=[];for(var c= 0;c<b.length;c++)this.args[c]=i(b[c])}function h(){throw Error("Not Implemented" )}function i(a){return"function"==typeof a?a:a.valueFn()}function j(){this.expre ssion=null,this.filters=[],this.deps={},this.currentPath=void 0,this.scopeIdent= void 0,this.indexIdent=void 0,this.dynamicDeps=!1}function k(a){this.value_=a}fu nction l(a){if(this.scopeIdent=a.scopeIdent,this.indexIdent=a.indexIdent,!a.expr ession)throw Error("No expression found.");this.expression=a.expression,i(this.e xpression),this.filters=a.filters,this.dynamicDeps=a.dynamicDeps}function m(a){r eturn String(a).replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()})}functio n n(a,b){for(;a[t]&&!Object.prototype.hasOwnProperty.call(a,b);)a=a[t];return a} function o(a){switch(a){case"":return!1;case"false":case"null":case"true":return !0}return isNaN(Number(a))?!1:!0}function p(){}var q=Object.create(null);d.proto type={valueFn:function(){if(!this.valueFn_){var a=this.value;this.valueFn_=funct ion(){return a}}return this.valueFn_}},e.prototype={valueFn:function(){if(!this. valueFn_){var a=(this.name,this.path);this.valueFn_=function(b,c){return c&&c.ad dPath(b,a),a.getValueFrom(b)}}return this.valueFn_},setValue:function(a,b){retur n 1==this.path.length,a=n(a,this.path[0]),this.path.setValueFrom(a,b)}},f.protot ype={get fullPath(){if(!this.fullPath_){var a=this.object instanceof e?this.obje ct.name:this.object.fullPath;this.fullPath_=Path.get(a+"."+this.property.name)}r eturn this.fullPath_},valueFn:function(){if(!this.valueFn_){var a=this.object;if (this.simplePath){var b=this.fullPath;this.valueFn_=function(a,c){return c&&c.ad dPath(a,b),b.getValueFrom(a)}}else if(this.property instanceof e){var b=Path.get (this.property.name);this.valueFn_=function(c,d){var e=a(c,d);return d&&d.addPat h(e,b),b.getValueFrom(e)}}else{var c=this.property;this.valueFn_=function(b,d){v ar e=a(b,d),f=c(b,d);return d&&d.addPath(e,f),e?e[f]:void 0}}}return this.valueF n_},setValue:function(a,b){if(this.simplePath)return this.fullPath.setValueFrom( a,b),b;var c=this.object(a),d=this.property instanceof e?this.property.name:this .property(a);return c[d]=b}},g.prototype={transform:function(a,b,c,d,e){var f=c[ this.name],g=d;if(f)g=void 0;else if(f=g[this.name],!f)return void console.error ("Cannot find filter: "+this.name);if(b?f=f.toModel:"function"==typeof f.toDOM&& (f=f.toDOM),"function"!=typeof f)return void console.error("No "+(b?"toModel":"t oDOM")+" found on"+this.name);
12 for(var h=[a],j=0;j<this.args.length;j++)h[j+1]=i(this.args[j])(d,e);return f.ap ply(g,h)}};var r={"+":function(a){return+a},"-":function(a){return-a},"!":functi on(a){return!a}},s={"+":function(a,b){return a+b},"-":function(a,b){return a-b}, "*":function(a,b){return a*b},"/":function(a,b){return a/b},"%":function(a,b){re turn a%b},"<":function(a,b){return b>a},">":function(a,b){return a>b},"<=":funct ion(a,b){return b>=a},">=":function(a,b){return a>=b},"==":function(a,b){return a==b},"!=":function(a,b){return a!=b},"===":function(a,b){return a===b},"!==":fu nction(a,b){return a!==b},"&&":function(a,b){return a&&b},"||":function(a,b){ret urn a||b}};j.prototype={createUnaryExpression:function(a,b){if(!r[a])throw Error ("Disallowed operator: "+a);return b=i(b),function(c,d){return r[a](b(c,d))}},cr eateBinaryExpression:function(a,b,c){if(!s[a])throw Error("Disallowed operator: "+a);return b=i(b),c=i(c),function(d,e){return s[a](b(d,e),c(d,e))}},createCondi tionalExpression:function(a,b,c){return a=i(a),b=i(b),c=i(c),function(d,e){retur n a(d,e)?b(d,e):c(d,e)}},createIdentifier:function(a){var b=new e(a);return b.ty pe="Identifier",b},createMemberExpression:function(a,b,c){var d=new f(b,c,a);ret urn d.dynamicDeps&&(this.dynamicDeps=!0),d},createLiteral:function(a){return new d(a.value)},createArrayExpression:function(a){for(var b=0;b<a.length;b++)a[b]=i (a[b]);return function(b,c){for(var d=[],e=0;e<a.length;e++)d.push(a[e](b,c));re turn d}},createProperty:function(a,b,c){return{key:b instanceof e?b.name:b.value ,value:c}},createObjectExpression:function(a){for(var b=0;b<a.length;b++)a[b].va lue=i(a[b].value);return function(b,c){for(var d={},e=0;e<a.length;e++)d[a[e].ke y]=a[e].value(b,c);return d}},createFilter:function(a,b){this.filters.push(new g (a,b))},createAsExpression:function(a,b){this.expression=a,this.scopeIdent=b},cr eateInExpression:function(a,b,c){this.expression=c,this.scopeIdent=a,this.indexI dent=b},createTopLevel:function(a){this.expression=a},createThisExpression:h},k. prototype={open:function(){return this.value_},discardChanges:function(){return this.value_},deliver:function(){},close:function(){}},l.prototype={getBinding:fu nction(a,b,c){function d(){if(h)return h=!1,g;i.dynamicDeps&&f.startReset();var c=i.getValue(a,i.dynamicDeps?f:void 0,b);return i.dynamicDeps&&f.finishReset(),c }function e(c){return i.setValue(a,c,b),c}if(c)return this.getValue(a,void 0,b); var f=new CompoundObserver,g=this.getValue(a,f,b),h=!0,i=this;return new Observe rTransform(f,d,e,!0)},getValue:function(a,b,c){for(var d=i(this.expression)(a,b) ,e=0;e<this.filters.length;e++)d=this.filters[e].transform(d,!1,c,a,b);return d} ,setValue:function(a,b,c){for(var d=this.filters?this.filters.length:0;d-->0;)b= this.filters[d].transform(b,!0,c,a);return this.expression.setValue?this.express ion.setValue(a,b):void 0}};var t="@"+Math.random().toString(36).slice(2);p.proto type={styleObject:function(a){var b=[];for(var c in a)b.push(m(c)+": "+a[c]);ret urn b.join("; ")},tokenList:function(a){var b=[];for(var c in a)a[c]&&b.push(c); return b.join(" ")},prepareInstancePositionChanged:function(a){var b=a.polymerEx pressionIndexIdent_;if(b)return function(a,c){a.model[b]=c}},prepareBinding:func tion(a,c,d){var e=Path.get(a);{if(o(a)||!e.valid)return b(a,c,d,this);if(1==e.le ngth)return function(a,b,c){if(c)return e.getValueFrom(a);var d=n(a,e[0]);return new PathObserver(d,e)}}},prepareInstanceModel:function(a){var b=a.polymerExpres sionScopeIdent_;if(b){var c=a.templateInstance?a.templateInstance.model:a.model, d=a.polymerExpressionIndexIdent_;return function(a){var e=Object.create(c);retur n e[b]=a,e[d]=void 0,e[t]=c,e}}}},a.PolymerExpressions=p,a.exposeGetExpression&& (a.getExpression_=c)}(this),Polymer={version:"0.3.1-604ba08"},"function"==typeof window.Polymer&&(Polymer={}),function(a){function b(a,b){return a&&b&&Object.ge tOwnPropertyNames(b).forEach(function(c){var d=Object.getOwnPropertyDescriptor(b ,c);d&&(Object.defineProperty(a,c,d),"function"==typeof d.value&&(d.value.nom=c) )}),a}a.extend=b}(Polymer),function(a){function b(a,b,d){return a?a.stop():a=new c(this),a.go(b,d),a}var c=function(a){this.context=a,this.boundComplete=this.co mplete.bind(this)};c.prototype={go:function(a,b){this.callback=a;var c;b?(c=setT imeout(this.boundComplete,b),this.handle=function(){clearTimeout(c)}):(c=request AnimationFrame(this.boundComplete),this.handle=function(){cancelAnimationFrame(c )})},stop:function(){this.handle&&(this.handle(),this.handle=null)},complete:fun ction(){this.handle&&(this.stop(),this.callback.call(this.context))}},a.job=b}(P olymer),function(){var a={};HTMLElement.register=function(b,c){a[b]=c},HTMLEleme nt.getPrototypeForTag=function(b){var c=b?a[b]:HTMLElement.prototype;return c||O bject.getPrototypeOf(document.createElement(b))};var b=Event.prototype.stopPropa gation;Event.prototype.stopPropagation=function(){this.cancelBubble=!0,b.apply(t his,arguments)}}(Polymer),function(a){function b(a){var e=b.caller,g=e.nom,h=e._ super;h||(g||(g=e.nom=c.call(this,e)),g||console.warn("called super() on a metho d not installed declaratively (has no .nom property)"),h=d(e,g,f(this)));var i=h [g];return i?(i._super||d(i,g,h),i.apply(this,a||[])):void 0}function c(a){for(v ar b=this.__proto__;b&&b!==HTMLElement.prototype;){for(var c,d=Object.getOwnProp ertyNames(b),e=0,f=d.length;f>e&&(c=d[e]);e++){var g=Object.getOwnPropertyDescri ptor(b,c);if("function"==typeof g.value&&g.value===a)return c}b=b.__proto__}}fun ction d(a,b,c){var d=e(c,b,a);return d[b]&&(d[b].nom=b),a._super=d}function e(a, b,c){for(;a;){if(a[b]!==c&&a[b])return a;a=f(a)}return Object}function f(a){retu rn a.__proto__}a.super=b}(Polymer),function(a){function b(a,b){var d=typeof b;re turn b instanceof Date&&(d="date"),c[d](a,b)}var c={string:function(a){return a} ,date:function(a){return new Date(Date.parse(a)||Date.now())},"boolean":function (a){return""===a?!0:"false"===a?!1:!!a},number:function(a){var b=parseFloat(a);r eturn 0===b&&(b=parseInt(a)),isNaN(b)?a:b},object:function(a,b){if(null===b)retu rn a;try{return JSON.parse(a.replace(/'/g,'"'))}catch(c){return a}},"function":f unction(a,b){return b}};a.deserializeValue=b}(Polymer),function(a){var b=a.exten d,c={};c.declaration={},c.instance={},c.publish=function(a,c){for(var d in a)b(c ,a[d])},a.api=c}(Polymer),function(a){var b={async:function(a,b,c){Platform.flus h(),b=b&&b.length?b:[b];var d=function(){(this[a]||a).apply(this,b)}.bind(this), e=c?setTimeout(d,c):requestAnimationFrame(d);return c?e:~e},cancelAsync:function (a){0>a?cancelAnimationFrame(~a):clearTimeout(a)},fire:function(a,b,c,d,e){var f =c||this,b=b||{},g=new CustomEvent(a,{bubbles:void 0!==d?d:!0,cancelable:void 0! ==e?e:!0,detail:b});return f.dispatchEvent(g),g},asyncFire:function(){this.async ("fire",arguments)},classFollows:function(a,b,c){b&&b.classList.remove(c),a&&a.c lassList.add(c)}},c=function(){},d={};b.asyncMethod=b.async,a.api.instance.utils =b,a.nop=c,a.nob=d}(Polymer),function(a){var b=window.logFlags||{},c="on-",d={EV ENT_PREFIX:c,addHostListeners:function(){var a=this.eventDelegates;b.events&&Obj ect.keys(a).length>0&&console.log("[%s] addHostListeners:",this.localName,a);for (var c in a){var d=a[c];this.addEventListener(c,this.element.getEventHandler(thi s,this,d))}},dispatchMethod:function(a,c,d){if(a){b.events&&console.group("[%s] dispatch [%s]",a.localName,c);var e="function"==typeof c?c:a[c];e&&e[d?"apply":" call"](a,d),b.events&&console.groupEnd(),Platform.flush()}}};a.api.instance.even ts=d}(Polymer),function(a){var b={copyInstanceAttributes:function(){var a=this._ instanceAttributes;for(var b in a)this.hasAttribute(b)||this.setAttribute(b,a[b] )},takeAttributes:function(){if(this._publishLC)for(var a,b=0,c=this.attributes, d=c.length;(a=c[b])&&d>b;b++)this.attributeToProperty(a.name,a.value)},attribute ToProperty:function(b,c){var b=this.propertyForAttribute(b);if(b){if(c&&c.search (a.bindPattern)>=0)return;var d=this[b],c=this.deserializeValue(c,d);c!==d&&(thi s[b]=c)}},propertyForAttribute:function(a){var b=this._publishLC&&this._publishL C[a];return b},deserializeValue:function(b,c){return a.deserializeValue(b,c)},se rializeValue:function(a,b){return"boolean"===b?a?"":void 0:"object"!==b&&"functi on"!==b&&void 0!==a?a:void 0},reflectPropertyToAttribute:function(a){var b=typeo f this[a],c=this.serializeValue(this[a],b);void 0!==c?this.setAttribute(a,c):"bo olean"===b&&this.removeAttribute(a)}};a.api.instance.attributes=b}(Polymer),func tion(a){function b(a,b,d){return Observer.bindToInstance(a,b,d,c)}function c(a,b ){return void 0===b&&null===a?b:null===b||void 0===b?a:b}var d=window.logFlags|| {},e={createPropertyObserver:function(){var a=this._observeNames;if(a&&a.length) {var b=this._propertyObserver=new CompoundObserver(!0);this.registerObservers([b ]);for(var c,d=0,e=a.length;e>d&&(c=a[d]);d++)b.addPath(this,c),this.observeArra yValue(c,this[c],null)}},openPropertyObserver:function(){this._propertyObserver& &this._propertyObserver.open(this.notifyPropertyChanges,this)},notifyPropertyCha nges:function(a,b,c){var d,e,f={};for(var g in b)if(d=c[2*g+1],e=this.observe[d] ){var h=b[g],i=a[g];this.observeArrayValue(d,i,h),f[e]||(void 0!==h&&null!==h||v oid 0!==i&&null!==i)&&(f[e]=!0,this.invokeMethod(e,[h,i,arguments]))}},deliverCh anges:function(){this._propertyObserver&&this._propertyObserver.deliver()},prope rtyChanged_:function(a){this.reflect[a]&&this.reflectPropertyToAttribute(a)},obs erveArrayValue:function(a,b,c){var e=this.observe[a];if(e&&(Array.isArray(c)&&(d .observe&&console.log("[%s] observeArrayValue: unregister observer [%s]",this.lo calName,a),this.closeNamedObserver(a+"__array")),Array.isArray(b))){d.observe&&c onsole.log("[%s] observeArrayValue: register observer [%s]",this.localName,a,b); var f=new ArrayObserver(b);f.open(function(a,b){this.invokeMethod(e,[b])},this), this.registerNamedObserver(a+"__array",f)}},bindProperty:function(a,c,d){return d?void(this[a]=c):b(this,a,c)},invokeMethod:function(a,b){var c=this[a]||a;"func tion"==typeof c&&c.apply(this,b)},registerObservers:function(a){this._observers= this._observers||[],this._observers.push(a)},closeObservers:function(){if(this._ observers){for(var a=0,b=this._observers.length;b>a;a++)this.closeObserverArray( this._observers[a]);this._observers=[]}},closeObserverArray:function(a){for(var b,c=0,d=a.length;d>c;c++)b=a[c],b&&b.close&&b.close()},registerNamedObserver:fun ction(a,b){var c=this._namedObservers||(this._namedObservers={});c[a]=b},closeNa medObserver:function(a){var b=this._namedObservers;return b&&b[a]?(b[a].close(), b[a]=null,!0):void 0},closeNamedObservers:function(){if(this._namedObservers){fo r(var a in this._namedObservers)this.closeNamedObserver(a);this._namedObservers= {}}}};a.api.instance.properties=e}(Polymer),function(a){var b=window.logFlags||0 ,c={instanceTemplate:function(a){var b=this.syntax||!a.bindingDelegate&&this.ele ment.syntax,c=a.createInstance(this,b);return this.registerObservers(c.bindings_ ),c},bind:function(a,b,c){var d=this.propertyForAttribute(a);if(d){var e=this.bi ndProperty(d,b,c);return Platform.enableBindingsReflection&&e&&(e.path=b.path_,t his._recordBinding(d,e)),this.reflect[d]&&this.reflectPropertyToAttribute(d),e}r eturn this.mixinSuper(arguments)},bindFinished:function(){this.makeElementReady( )},_recordBinding:function(a,b){this.bindings_=this.bindings_||{},this.bindings_ [a]=b},asyncUnbindAll:function(){this._unbound||(b.unbind&&console.log("[%s] asy ncUnbindAll",this.localName),this._unbindAllJob=this.job(this._unbindAllJob,this .unbindAll,0))},unbindAll:function(){this._unbound||(this.closeObservers(),this. closeNamedObservers(),this._unbound=!0)},cancelUnbindAll:function(){return this. _unbound?void(b.unbind&&console.warn("[%s] already unbound, cannot cancel unbind All",this.localName)):(b.unbind&&console.log("[%s] cancelUnbindAll",this.localNa me),void(this._unbindAllJob&&(this._unbindAllJob=this._unbindAllJob.stop())))}}, d=/\{\{([^{}]*)}}/;a.bindPattern=d,a.api.instance.mdv=c}(Polymer),function(a){fu nction b(a){return a.hasOwnProperty("PolymerBase")}function c(){}var d={PolymerB ase:!0,job:function(a,b,c){if("string"!=typeof a)return Polymer.job.call(this,a, b,c);var d="___"+a;this[d]=Polymer.job.call(this,this[d],b,c)},"super":Polymer.s uper,created:function(){},ready:function(){},createdCallback:function(){this.tem plateInstance&&this.templateInstance.model&&console.warn("Attributes on "+this.l ocalName+" were data bound prior to Polymer upgrading the element. This may resu lt in incorrect binding types."),this.created(),this.prepareElement(),(!this.own erDocument.isStagingDocument||window.ShadowDOMPolyfill)&&this.makeElementReady() },prepareElement:function(){return this._elementPrepared?void console.warn("Elem ent already prepared",this.localName):(this._elementPrepared=!0,this.shadowRoots ={},this.createPropertyObserver(),this.openPropertyObserver(),this.copyInstanceA ttributes(),this.takeAttributes(),void this.addHostListeners())},makeElementRead y:function(){this._readied||(this._readied=!0,this.parseDeclarations(this.__prot o__),this.removeAttribute("unresolved"),this.ready())},attachedCallback:function (){this.cancelUnbindAll(),this.attached&&this.attached(),this.enteredView&&this. enteredView(),this.hasBeenAttached||(this.hasBeenAttached=!0,this.domReady&&this .async("domReady"))},detachedCallback:function(){this.preventDispose||this.async UnbindAll(),this.detached&&this.detached(),this.leftView&&this.leftView()},enter edViewCallback:function(){this.attachedCallback()},leftViewCallback:function(){t his.detachedCallback()},enteredDocumentCallback:function(){this.attachedCallback ()},leftDocumentCallback:function(){this.detachedCallback()},parseDeclarations:f unction(a){a&&a.element&&(this.parseDeclarations(a.__proto__),a.parseDeclaration .call(this,a.element))},parseDeclaration:function(a){var b=this.fetchTemplate(a) ;if(b){var c=this.shadowFromTemplate(b);this.shadowRoots[a.name]=c}},fetchTempla te:function(a){return a.querySelector("template")},shadowFromTemplate:function(a ){if(a){var b=this.createShadowRoot(),c=this.instanceTemplate(a);return b.append Child(c),this.shadowRootReady(b,a),b}},lightFromTemplate:function(a,b){if(a){thi s.eventController=this;var c=this.instanceTemplate(a);return b?this.insertBefore (c,b):this.appendChild(c),this.shadowRootReady(this),c}},shadowRootReady:functio n(a){this.marshalNodeReferences(a),PolymerGestures.register(a)},marshalNodeRefer ences:function(a){var b=this.$=this.$||{};if(a)for(var c,d=a.querySelectorAll("[ id]"),e=0,f=d.length;f>e&&(c=d[e]);e++)b[c.id]=c},attributeChangedCallback:funct ion(a){"class"!==a&&"style"!==a&&this.attributeToProperty(a,this.getAttribute(a) ),this.attributeChanged&&this.attributeChanged.apply(this,arguments)},onMutation :function(a,b){var c=new MutationObserver(function(a){b.call(this,c,a),c.disconn ect()}.bind(this));c.observe(a,{childList:!0,subtree:!0})}};c.prototype=d,d.cons tructor=c,a.Base=c,a.isBase=b,a.api.instance.base=d}(Polymer),function(a){functi on b(a){return a.__proto__}function c(a,b){var c="",d=!1;b&&(c=b.localName,d=b.h asAttribute("is"));var e=Platform.ShadowCSS.makeScopeSelector(c,d);return Platfo rm.ShadowCSS.shimCssText(a,e)}var d=(window.logFlags||{},"element"),e="controlle r",f={STYLE_SCOPE_ATTRIBUTE:d,installControllerStyles:function(){var a=this.find StyleScope();if(a&&!this.scopeHasNamedStyle(a,this.localName)){for(var c=b(this) ,d="";c&&c.element;)d+=c.element.cssTextForScope(e),c=b(c);d&&this.installScopeC ssText(d,a)}},installScopeStyle:function(a,b,c){var c=c||this.findStyleScope(),b =b||"";if(c&&!this.scopeHasNamedStyle(c,this.localName+b)){var d="";if(a instanc eof Array)for(var e,f=0,g=a.length;g>f&&(e=a[f]);f++)d+=e.textContent+"\n\n";els e d=a.textContent;this.installScopeCssText(d,c,b)}},installScopeCssText:function (a,b,d){if(b=b||this.findStyleScope(),d=d||"",b){window.ShadowDOMPolyfill&&(a=c( a,b.host));var f=this.element.cssTextToScopeStyle(a,e);Polymer.applyStyleToScope (f,b),b._scopeStyles[this.localName+d]=!0}},findStyleScope:function(a){for(var b =a||this;b.parentNode;)b=b.parentNode;return b},scopeHasNamedStyle:function(a,b) {return a._scopeStyles=a._scopeStyles||{},a._scopeStyles[b]}};a.api.instance.sty les=f}(Polymer),function(a){function b(a,b){if(1===arguments.length&&"string"!=t ypeof arguments[0]){b=a;var c=document._currentScript;if(a=c&&c.parentNode&&c.pa rentNode.getAttribute?c.parentNode.getAttribute("name"):"",!a)throw"Element name could not be inferred."}if(f[a])throw"Already registered (Polymer) prototype fo r element "+a;e(a,b),d(a)}function c(a,b){h[a]=b}function d(a){h[a]&&(h[a].regis terWhenReady(),delete h[a])}function e(a,b){return i[a]=b||{}}function f(a){retu rn i[a]}var g=a.extend,h=(a.api,{}),i={};a.getRegisteredPrototype=f,a.waitingFor Prototype=c,window.Polymer=b,g(Polymer,a);var j=Platform.deliverDeclarations();i f(j)for(var k,l=0,m=j.length;m>l&&(k=j[l]);l++)b.apply(null,k)}(Polymer),functio n(a){var b={resolveElementPaths:function(a){Platform.urlResolver.resolveDom(a)}, addResolvePathApi:function(){var a=this.getAttribute("assetpath")||"",b=new URL( a,this.ownerDocument.baseURI);this.prototype.resolvePath=function(a,c){var d=new URL(a,c||b);return d.href}}};a.api.declaration.path=b}(Polymer),function(a){fun ction b(a,b){var c=new URL(a.getAttribute("href"),b).href;return"@import '"+c+"' ;"}function c(a,b){if(a){b===document&&(b=document.head),window.ShadowDOMPolyfil l&&(b=document.head);var c=d(a.textContent),e=a.getAttribute(h);e&&c.setAttribut e(h,e);var f=b.firstElementChild;if(b===document.head){var g="style["+h+"]",i=do cument.head.querySelectorAll(g);i.length&&(f=i[i.length-1].nextElementSibling)}b .insertBefore(c,f)}}function d(a,b){b=b||document,b=b.createElement?b:b.ownerDoc ument;var c=b.createElement("style");return c.textContent=a,c}function e(a){retu rn a&&a.__resource||""}function f(a,b){return p?p.call(a,b):void 0}var g=(window .logFlags||{},a.api.instance.styles),h=g.STYLE_SCOPE_ATTRIBUTE,i="style",j="@imp ort",k="link[rel=stylesheet]",l="global",m="polymer-scope",n={loadStyles:functio n(a){var b=this.fetchTemplate(),c=b&&this.templateContent();if(c){this.convertSh eetsToStyles(c);var d=this.findLoadableStyles(c);if(d.length){var e=b.ownerDocum ent.baseURI;return Platform.styleResolver.loadStyles(d,e,a)}}a&&a()},convertShee tsToStyles:function(a){for(var c,e,f=a.querySelectorAll(k),g=0,h=f.length;h>g&&( c=f[g]);g++)e=d(b(c,this.ownerDocument.baseURI),this.ownerDocument),this.copyShe etAttributes(e,c),c.parentNode.replaceChild(e,c)},copySheetAttributes:function(a ,b){for(var c,d=0,e=b.attributes,f=e.length;(c=e[d])&&f>d;d++)"rel"!==c.name&&"h ref"!==c.name&&a.setAttribute(c.name,c.value)},findLoadableStyles:function(a){va r b=[];if(a)for(var c,d=a.querySelectorAll(i),e=0,f=d.length;f>e&&(c=d[e]);e++)c .textContent.match(j)&&b.push(c);return b},installSheets:function(){this.cacheSh eets(),this.cacheStyles(),this.installLocalSheets(),this.installGlobalStyles()}, cacheSheets:function(){this.sheets=this.findNodes(k),this.sheets.forEach(functio n(a){a.parentNode&&a.parentNode.removeChild(a)})},cacheStyles:function(){this.st yles=this.findNodes(i+"["+m+"]"),this.styles.forEach(function(a){a.parentNode&&a .parentNode.removeChild(a)})},installLocalSheets:function(){var a=this.sheets.fi lter(function(a){return!a.hasAttribute(m)}),b=this.templateContent();if(b){var c ="";if(a.forEach(function(a){c+=e(a)+"\n"}),c){var f=d(c,this.ownerDocument);b.i nsertBefore(f,b.firstChild)}}},findNodes:function(a,b){var c=this.querySelectorA ll(a).array(),d=this.templateContent();if(d){var e=d.querySelectorAll(a).array() ;c=c.concat(e)}return b?c.filter(b):c},installGlobalStyles:function(){var a=this .styleForScope(l);c(a,document.head)},cssTextForScope:function(a){var b="",c="[" +m+"="+a+"]",d=function(a){return f(a,c)},g=this.sheets.filter(d);g.forEach(func tion(a){b+=e(a)+"\n\n"});var h=this.styles.filter(d);return h.forEach(function(a ){b+=a.textContent+"\n\n"}),b},styleForScope:function(a){var b=this.cssTextForSc ope(a);return this.cssTextToScopeStyle(b,a)},cssTextToScopeStyle:function(a,b){i f(a){var c=d(a);return c.setAttribute(h,this.getAttribute("name")+"-"+b),c}}},o= HTMLElement.prototype,p=o.matches||o.matchesSelector||o.webkitMatchesSelector||o .mozMatchesSelector;a.api.declaration.styles=n,a.applyStyleToScope=c}(Polymer),f unction(a){var b=(window.logFlags||{},a.api.instance.events),c=b.EVENT_PREFIX,d= {};["webkitAnimationStart","webkitAnimationEnd","webkitTransitionEnd","DOMFocusO ut","DOMFocusIn","DOMMouseScroll"].forEach(function(a){d[a.toLowerCase()]=a});va r e={parseHostEvents:function(){var a=this.prototype.eventDelegates;this.addAttr ibuteDelegates(a)},addAttributeDelegates:function(a){for(var b,c=0;b=this.attrib utes[c];c++)this.hasEventPrefix(b.name)&&(a[this.removeEventPrefix(b.name)]=b.va lue.replace("{{","").replace("}}","").trim())},hasEventPrefix:function(a){return a&&"o"===a[0]&&"n"===a[1]&&"-"===a[2]},removeEventPrefix:function(a){return a.s lice(f)},findController:function(a){for(;a.parentNode;){if(a.eventController)ret urn a.eventController;a=a.parentNode}return a.host},getEventHandler:function(a,b ,c){var d=this;return function(e){a&&a.PolymerBase||(a=d.findController(b));var f=[e,e.detail,e.currentTarget];a.dispatchMethod(a,c,f)}},prepareEventBinding:fun ction(a,b){if(this.hasEventPrefix(b)){var c=this.removeEventPrefix(b);c=d[c]||c; var e=this;return function(b,d,f){function g(){return"{{ "+a+" }}"}var h=e.getEv entHandler(void 0,d,a);return d.addEventListener(c,h),f?void 0:{open:g,discardCh anges:g,close:function(){d.removeEventListener(c,h)}}}}}},f=c.length;a.api.decla ration.events=e}(Polymer),function(a){var b={inferObservers:function(a){var b,c= a.observe;for(var d in a)"Changed"===d.slice(-7)&&(c||(c=a.observe={}),b=d.slice (0,-7),c[b]=c[b]||d)},explodeObservers:function(a){var b=a.observe;if(b){var c={ };for(var d in b)for(var e,f=d.split(" "),g=0;e=f[g];g++)c[e]=b[d];a.observe=c}} ,optimizePropertyMaps:function(a){if(a.observe){var b=a._observeNames=[];for(var c in a.observe)for(var d,e=c.split(" "),f=0;d=e[f];f++)b.push(d)}if(a.publish){ var b=a._publishNames=[];for(var c in a.publish)b.push(c)}},publishProperties:fu nction(a,b){var c=a.publish;c&&(this.requireProperties(c,a,b),a._publishLC=this. lowerCaseMap(c))},requireProperties:function(a,b){b.reflect=b.reflect||{};for(va r c in a){var d=a[c],e=this.reflectHintForDescriptor(d);void 0===b.reflect[c]&&v oid 0!==e&&(b.reflect[c]=e),void 0===b[c]&&(b[c]=this.valueForDescriptor(d))}},v alueForDescriptor:function(a){var b="object"==typeof a&&a?a.value:a;return void 0!==b?b:null},reflectHintForDescriptor:function(a){return"object"==typeof a&&a&& void 0!==a.reflect?a.reflect:void 0},lowerCaseMap:function(a){var b={};for(var c in a)b[c.toLowerCase()]=c;return b},createPropertyAccessors:function(a){var b=a ._publishNames;if(b&&b.length)for(var c,d=0,e=b.length;e>d&&(c=b[d]);d++)Observe r.createBindablePrototypeAccessor(a,c)}};a.api.declaration.properties=b}(Polymer ),function(a){var b="attributes",c=/\s|,/,d={inheritAttributesObjects:function(a ){this.inheritObject(a,"publishLC"),this.inheritObject(a,"_instanceAttributes")} ,publishAttributes:function(a,d){var e=this.getAttribute(b);if(e)for(var f,g=a.p ublish||(a.publish={}),h=e.split(c),i=0,j=h.length;j>i;i++)f=h[i].trim(),f&&void 0===g[f]&&void 0===d[f]&&(g[f]=Polymer.nob)},accumulateInstanceAttributes:funct ion(){for(var a,b=this.prototype._instanceAttributes,c=this.attributes,d=0,e=c.l ength;e>d&&(a=c[d]);d++)this.isInstanceAttribute(a.name)&&(b[a.name]=a.value)},i sInstanceAttribute:function(a){return!this.blackList[a]&&"on-"!==a.slice(0,3)},b lackList:{name:1,"extends":1,constructor:1,noscript:1,assetpath:1,"cache-csstext ":1}};d.blackList[b]=1,a.api.declaration.attributes=d}(Polymer),function(a){var b=a.api.declaration.events,c=new PolymerExpressions,d=c.prepareBinding;c.prepare Binding=function(a,e,f){return b.prepareEventBinding(a,e,f)||d.call(c,a,e,f)};va r e={syntax:c,fetchTemplate:function(){return this.querySelector("template")},te mplateContent:function(){var a=this.fetchTemplate();return a&&Platform.templateC ontent(a)},installBindingDelegate:function(a){a&&(a.bindingDelegate=this.syntax) }};a.api.declaration.mdv=e}(Polymer),function(a){function b(a){if(!Object.__prot o__){var b=Object.getPrototypeOf(a);a.__proto__=b,d(b)&&(b.__proto__=Object.getP rototypeOf(b))}}var c=a.api,d=a.isBase,e=a.extend,f={register:function(a,b){this .buildPrototype(a,b),this.registerPrototype(a,b),this.publishConstructor()},buil dPrototype:function(b,c){var d=a.getRegisteredPrototype(b),e=this.generateBasePr ototype(c);this.desugarBeforeChaining(d,e),this.prototype=this.chainPrototypes(d ,e),this.desugarAfterChaining(b,c)},desugarBeforeChaining:function(a,b){a.elemen t=this,this.publishAttributes(a,b),this.publishProperties(a,b),this.inferObserve rs(a),this.explodeObservers(a)},chainPrototypes:function(a,c){this.inheritMetaDa ta(a,c);var d=this.chainObject(a,c);return b(d),d},inheritMetaData:function(a,b) {this.inheritObject("observe",a,b),this.inheritObject("publish",a,b),this.inheri tObject("reflect",a,b),this.inheritObject("_publishLC",a,b),this.inheritObject(" _instanceAttributes",a,b),this.inheritObject("eventDelegates",a,b)},desugarAfter Chaining:function(a,b){this.optimizePropertyMaps(this.prototype),this.createProp ertyAccessors(this.prototype),this.installBindingDelegate(this.fetchTemplate()), this.installSheets(),this.resolveElementPaths(this),this.accumulateInstanceAttri butes(),this.parseHostEvents(),this.addResolvePathApi(),window.ShadowDOMPolyfill &&Platform.ShadowCSS.shimStyling(this.templateContent(),a,b),this.prototype.regi sterCallback&&this.prototype.registerCallback(this)},publishConstructor:function (){var a=this.getAttribute("constructor");a&&(window[a]=this.ctor)},generateBase Prototype:function(a){var b=this.findBasePrototype(a);if(!b){var b=HTMLElement.g etPrototypeForTag(a);b=this.ensureBaseApi(b),g[a]=b}return b},findBasePrototype: function(a){return g[a]},ensureBaseApi:function(a){if(a.PolymerBase)return a;var b=Object.create(a);return c.publish(c.instance,b),this.mixinMethod(b,a,c.instan ce.mdv,"bind"),b},mixinMethod:function(a,b,c,d){var e=function(a){return b[d].ap ply(this,a)};a[d]=function(){return this.mixinSuper=e,c[d].apply(this,arguments) }},inheritObject:function(a,b,c){var d=b[a]||{};b[a]=this.chainObject(d,c[a])},r egisterPrototype:function(a,b){var c={prototype:this.prototype},d=this.findTypeE xtension(b);d&&(c.extends=d),HTMLElement.register(a,this.prototype),this.ctor=do cument.registerElement(a,c)},findTypeExtension:function(a){if(a&&a.indexOf("-")< 0)return a;var b=this.findBasePrototype(a);return b.element?this.findTypeExtensi on(b.element.extends):void 0}},g={};f.chainObject=Object.__proto__?function(a,b) {return a&&b&&a!==b&&(a.__proto__=b),a}:function(a,b){if(a&&b&&a!==b){var c=Obje ct.create(b);a=e(c,a)}return a},c.declaration.prototype=f}(Polymer),function(a){ function b(a){return document.contains(a)?h:g}function c(){return g.length?g[0]: h[0]}function d(a){e.waitToReady=!0,CustomElements.ready=!1,HTMLImports.whenImpo rtsReady(function(){e.addReadyCallback(a),e.waitToReady=!1,e.check()})}var e={wa it:function(a,b,c){var d=-1===this.indexOf(a)&&-1===f.indexOf(a);return d&&(this .add(a),a.__check=b,a.__go=c),0!==this.indexOf(a)},add:function(a){b(a).push(a)} ,indexOf:function(a){var c=b(a).indexOf(a);return c>=0&&document.contains(a)&&(c +=HTMLImports.useNative||HTMLImports.ready?g.length:1e9),c},go:function(a){var b =this.remove(a);b&&(this.addToFlushQueue(b),this.check())},remove:function(a){va r c=this.indexOf(a);if(0===c)return b(a).shift()},check:function(){var a=this.ne xtElement();return a&&a.__check.call(a),this.canReady()?(this.ready(),!0):void 0 },nextElement:function(){return c()},canReady:function(){return!this.waitToReady &&this.isEmpty()},isEmpty:function(){return!g.length&&!h.length},addToFlushQueue :function(a){f.push(a)},flush:function(){for(var a;f.length;)a=f.shift(),a.__go. call(a),a.__check=a.__go=null},ready:function(){this.flush(),CustomElements.read y===!1&&(CustomElements.upgradeDocumentTree(document),CustomElements.ready=!0),P latform.flush(),requestAnimationFrame(this.flushReadyCallbacks)},addReadyCallbac k:function(a){a&&i.push(a)},flushReadyCallbacks:function(){if(i)for(var a;i.leng th;)(a=i.shift())()},waitToReady:!0},f=[],g=[],h=[],i=[];document.addEventListen er("WebComponentsReady",function(){CustomElements.ready=!1}),a.queue=e,a.whenPol ymerReady=d}(Polymer),function(a){function b(a,b){a?(document.head.appendChild(a ),d(b)):b&&b()}function c(a,c){if(a&&a.length){for(var d,e,f=document.createDocu mentFragment(),g=0,h=a.length;h>g&&(d=a[g]);g++)e=document.createElement("link") ,e.rel="import",e.href=d,f.appendChild(e);b(f,c)}else c&&c()}var d=a.whenPolymer Ready;a.import=c,a.importElements=b}(Polymer),function(a){function b(a){return B oolean(HTMLElement.getPrototypeForTag(a))}function c(a){return a&&a.indexOf("-") >=0}var d=a.extend,e=a.api,f=a.queue,g=a.whenPolymerReady,h=a.getRegisteredProto type,i=a.waitingForPrototype,j=d(Object.create(HTMLElement.prototype),{createdCa llback:function(){this.getAttribute("name")&&this.init()},init:function(){this.n ame=this.getAttribute("name"),this.extends=this.getAttribute("extends"),this.loa dResources(),this.registerWhenReady()},registerWhenReady:function(){this.registe red||this.waitingForPrototype(this.name)||this.waitingForQueue()||this.waitingFo rResources()||f.go(this)},_register:function(){c(this.extends)&&!b(this.extends) &&console.warn("%s is attempting to extend %s, an unregistered element or one th at was not registered with Polymer.",this.name,this.extends),this.register(this. name,this.extends),this.registered=!0},waitingForPrototype:function(a){return h( a)?void 0:(i(a,this),this.handleNoScript(a),!0)},handleNoScript:function(a){if(t his.hasAttribute("noscript")&&!this.noscript)if(this.noscript=!0,window.CustomEl ements&&!CustomElements.useNative)Polymer(a);else{var b=document.createElement(" script");b.textContent="Polymer('"+a+"');",this.appendChild(b)}},waitingForResou rces:function(){return this._needsResources},waitingForQueue:function(){return f .wait(this,this.registerWhenReady,this._register)},loadResources:function(){this ._needsResources=!0,this.loadStyles(function(){this._needsResources=!1,this.regi sterWhenReady()}.bind(this))}});e.publish(e.declaration,j),g(function(){document .body.removeAttribute("unresolved"),document.dispatchEvent(new CustomEvent("poly mer-ready",{bubbles:!0}))}),document.registerElement("polymer-element",{prototyp e:j})}(Polymer),function(){var a=document.createElement("polymer-element");a.set Attribute("name","auto-binding"),a.setAttribute("extends","template"),a.init(),P olymer("auto-binding",{createdCallback:function(){this.syntax=this.bindingDelega te=this.makeSyntax(),Polymer.whenPolymerReady(function(){this.model=this,this.se tAttribute("bind",""),this.async(function(){this.marshalNodeReferences(this.pare ntNode),this.fire("template-bound")})}.bind(this))},makeSyntax:function(){var a= Object.create(Polymer.api.declaration.events),b=this;a.findController=function() {return b.model};var c=new PolymerExpressions,d=c.prepareBinding;return c.prepar eBinding=function(b,e,f){return a.prepareEventBinding(b,e,f)||d.call(c,b,e,f)},c }})}();
33 //# sourceMappingURL=polymer.js.map 13 //# sourceMappingURL=polymer.js.map
OLDNEW
« no previous file with comments | « dart/pkg/polymer/lib/src/js/polymer/polymer.html ('k') | dart/pkg/polymer/lib/src/js/polymer/polymer-body.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698