3 Copyright 2013 The Polymer Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style
5 license that can be found in the LICENSE file.
9 <title>app-widgets
</title>
12 * Copyright (c) 2012-2014 The Polymer Authors. All rights reserved.
14 * Redistribution and use in source and binary forms, with or without
15 * modification, are permitted provided that the following conditions are
18 * * Redistributions of source code must retain the above copyright
19 * notice, this list of conditions and the following disclaimer.
20 * * Redistributions in binary form must reproduce the above
21 * copyright notice, this list of conditions and the following disclaimer
22 * in the documentation and/or other materials provided with the
24 * * Neither the name of Google Inc. nor the names of its
25 * contributors may be used to endorse or promote products derived from
26 * this software without specific prior written permission.
28 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40 // @version: 0.2.1-59f745d
41 function PointerGestureEvent(a
,b
){var c
=b
||{},d
=document
.createEvent("Event"),e
={bubbles
:Boolean(c
.bubbles
)===c
.bubbles
||!0,cancelable
:Boolean(c
.cancelable
)===c
.cancelable
||!0};d
.initEvent(a
,e
.bubbles
,e
.cancelable
);for(var f
,g
=Object
.keys(c
),h
=0;h
<g
.length
;h
++)f
=g
[h
],d
[f
]=c
[f
];return d
.preventTap
=this.preventTap
,d
}"undefined"==typeof WeakMap
&&!function(){var a
=Object
.defineProperty
,b
=Date
.now()%1e9
,c=function(){this.name
="__st"+(1e9
*Math
.random()>>>0)+(b
++ +"__")};c
.prototype={set:function(b
,c
){var d
=b
[this.name
];d
&&d
[0]===b
?d
[1]=c
:a(b
,this.name
,{value
:[b
,c
],writable
:!0})},get:function(a
){var b
;return(b
=a
[this.name
])&&b
[0]===a
?b
[1]:void 0},"delete":function(a
){this.set(a
,void 0)}},window
.WeakMap
=c
}(),function(global
){"use strict";function detectObjectObserve(){function a(a
){b
=a
}if("function"!=typeof Object
.observe
||"function"!=typeof Array
.observe
)return!1;var b
=[],c
={},d
=[];return Object
.observe(c
,a
),Array
.observe(d
,a
),c
.id
=1,c
.id
=2,delete c
.id
,d
.push(1,2),d
.length
=0,Object
.deliverChangeRecords(a
),5!==b
.length
?!1:"add"!=b
[0].type
||"update"!=b
[1].type
||"delete"!=b
[2].type
||"splice"!=b
[3].type
||"splice"!=b
[4].type
?!1:(Object
.unobserve(c
,a
),Array
.unobserve(d
,a
),!0)}function detectEval(){if(global
.document
&&"securityPolicy"in global
.document
&&!global
.document
.securityPolicy
.allowsEval
)return!1;try{var a
=new Function("","return true;");return a()}catch(b
){return!1}}function isIndex(a
){return+a
===a
>>>0}function toNumber(a
){return+a
}function isObject(a
){return a
===Object(a
)}function areSameValue(a
,b
){return a
===b
?0!==a
||1/a===1/b
:numberIsNaN(a
)&&numberIsNaN(b
)?!0:a
!==a
&&b
!==b
}function isPathValid(a
){return"string"!=typeof a
?!1:(a
=a
.trim(),""==a
?!0:"."==a
[0]?!1:pathRegExp
.test(a
))}function Path(a
,b
){if(b
!==constructorIsPrivate
)throw Error("Use Path.get to retrieve path objects");return""==a
.trim()?this:isIndex(a
)?(this.push(a
),this):(a
.split(/\s*\.\s*/).filter(function(a
){return a
}).forEach(function(a
){this.push(a
)},this),void(hasEval
&&this.length
&&(this.getValueFrom
=this.compiledGetValueFromFn())))}function getPath(a
){if(a
instanceof Path
)return a
;null==a
&&(a
=""),"string"!=typeof a
&&(a
=String(a
));var b
=pathCache
[a
];if(b
)return b
;if(!isPathValid(a
))return invalidPath
;var b
=new Path(a
,constructorIsPrivate
);return pathCache
[a
]=b
,b
}function dirtyCheck(a
){for(var b
=0;MAX_DIRTY_CHECK_CYCLES
>b
&&a
.check_();)b
++;return global
.testingExposeCycleCount
&&(global
.dirtyCheckCycleCount
=b
),b
>0}function objectIsEmpty(a
){for(var b
in a
)return!1;return!0}function diffIsEmpty(a
){return objectIsEmpty(a
.added
)&&objectIsEmpty(a
.removed
)&&objectIsEmpty(a
.changed
)}function diffObjectFromOldObject(a
,b
){var c
={},d
={},e
={};for(var f
in b
){var g
=a
[f
];(void 0===g
||g
!==b
[f
])&&(f
in a
?g
!==b
[f
]&&(e
[f
]=g
):d
[f
]=void 0)}for(var f
in a
)f
in b
||(c
[f
]=a
[f
]);return Array
.isArray(a
)&&a
.length
!==b
.length
&&(e
.length
=a
.length
),{added
:c
,removed
:d
,changed
:e
}}function runEOMTasks(){if(!eomTasks
.length
)return!1;for(var a
=0;a
<eomTasks
.length
;a
++)eomTasks
[a
]();return eomTasks
.length
=0,!0}function newObservedObject(){function a(a
){b
&&b
.state_
===OPENED
&&!d
&&b
.check_(a
)}var b
,c
,d
=!1,e
=!0;return{open:function(c
){if(b
)throw Error("ObservedObject in use");e
||Object
.deliverChangeRecords(a
),b
=c
,e
=!1},observe:function(b
,d
){c
=b
,d
?Array
.observe(c
,a
):Object
.observe(c
,a
)},deliver:function(b
){d
=b
,Object
.deliverChangeRecords(a
),d
=!1},close:function(){b
=void 0,Object
.unobserve(c
,a
),observedObjectCache
.push(this)}}}function getObservedObject(a
,b
,c
){var d
=observedObjectCache
.pop()||newObservedObject();return d
.open(a
),d
.observe(b
,c
),d
}function newObservedSet(){function a(b
){if(b
){var c
=i
.indexOf(b
);c
>=0?(i
[c
]=void 0,h
.push(b
)):h
.indexOf(b
)<0&&(h
.push(b
),Object
.observe(b
,e
)),a(Object
.getPrototypeOf(b
))}}function b(){var b
=i
===emptyArray
?[]:i
;i
=h
,h
=b
;var c
;for(var d
in f
)c
=f
[d
],c
&&c
.state_
==OPENED
&&c
.iterateObjects_(a
);for(var g
=0;g
<i
.length
;g
++){var j
=i
[g
];j
&&Object
.unobserve(j
,e
)}i
.length
=0}function c(){k
=!1,j
&&b()}function d(){k
||(j
=!0,k
=!0,runEOM(c
))}function e(){b();var a
;for(var c
in f
)a
=f
[c
],a
&&a
.state_
==OPENED
&&a
.check_()}var f
=[],g
=0,h
=[],i
=emptyArray
,j
=!1,k
=!1,l
={object
:void 0,objects
:h
,open:function(b
){f
[b
.id_
]=b
,g
++,b
.iterateObjects_(a
)},close:function(a
){if(f
[a
.id_
]=void 0,g
--,g
)return void d();j
=!1;for(var b
=0;b
<h
.length
;b
++)Object
.unobserve(h
[b
],e
),Observer
.unobservedCount
++;f
.length
=0,h
.length
=0,observedSetCache
.push(this)},reset
:d
};return l
}function getObservedSet(a
,b
){return lastObservedSet
&&lastObservedSet
.object
===b
||(lastObservedSet
=observedSetCache
.pop()||newObservedSet(),lastObservedSet
.object
=b
),lastObservedSet
.open(a
),lastObservedSet
}function Observer(){this.state_
=UNOPENED
,this.callback_
=void 0,this.target_
=void 0,this.directObserver_
=void 0,this.value_
=void 0,this.id_
=nextObserverId
++}function addToAll(a
){Observer
._allObserversCount
++,collectObservers
&&allObservers
.push(a
)}function removeFromAll(){Observer
._allObserversCount
--}function ObjectObserver(a
){Observer
.call(this),this.value_
=a
,this.oldObject_
=void 0}function ArrayObserver(a
){if(!Array
.isArray(a
))throw Error("Provided object is not an Array");ObjectObserver
.call(this,a
)}function PathObserver(a
,b
){Observer
.call(this),this.object_
=a
,this.path_
=b
instanceof Path
?b
:getPath(b
),this.directObserver_
=void 0}function CompoundObserver(){Observer
.call(this),this.value_
=[],this.directObserver_
=void 0,this.observed_
=[]}function identFn(a
){return a
}function ObserverTransform(a
,b
,c
,d
){this.callback_
=void 0,this.target_
=void 0,this.value_
=void 0,this.observable_
=a
,this.getValueFn_
=b
||identFn
,this.setValueFn_
=c
||identFn
,this.dontPassThroughSet_
=d
}function notifyFunction(a
,b
){if("function"==typeof Object
.observe
){var c
=Object
.getNotifier(a
);return function(d
,e
){var f
={object
:a
,type
:d
,name
:b
};2===arguments
.length
&&(f
.oldValue
=e
),c
.notify(f
)}}}function diffObjectFromChangeRecords(a
,b
,c
){for(var d
={},e
={},f
=0;f
<b
.length
;f
++){var g
=b
[f
];expectedRecordTypes
[g
.type
]?(g
.name
in c
||(c
[g
.name
]=g
.oldValue
),"update"!=g
.type
&&("add"!=g
.type
?g
.name
in d
?(delete d
[g
.name
],delete c
[g
.name
]):e
[g
.name
]=!0:g
.name
in e
?delete e
[g
.name
]:d
[g
.name
]=!0)):(console
.error("Unknown changeRecord type: "+g
.type
),console
.error(g
))}for(var h
in d
)d
[h
]=a
[h
];for(var h
in e
)e
[h
]=void 0;var i
={};for(var h
in c
)if(!(h
in d
||h
in e
)){var j
=a
[h
];c
[h
]!==j
&&(i
[h
]=j
)}return{added
:d
,removed
:e
,changed
:i
}}function newSplice(a
,b
,c
){return{index
:a
,removed
:b
,addedCount
:c
}}function ArraySplice(){}function calcSplices(a
,b
,c
,d
,e
,f
){return arraySplice
.calcSplices(a
,b
,c
,d
,e
,f
)}function intersect(a
,b
,c
,d
){return c
>b
||a
>d
?-1:b
==c
||d
==a
?0:c
>a
?d
>b
?b
-c
:d
-c
:b
>d
?d
-a
:b
-a
}function mergeSplice(a
,b
,c
,d
){for(var e
=newSplice(b
,c
,d
),f
=!1,g
=0,h
=0;h
<a
.length
;h
++){var i
=a
[h
];if(i
.index
+=g
,!f
){var j
=intersect(e
.index
,e
.index
+e
.removed
.length
,i
.index
,i
.index
+i
.addedCount
);if(j
>=0){a
.splice(h
,1),h
--,g
-=i
.addedCount
-i
.removed
.length
,e
.addedCount
+=i
.addedCount
-j
;var k
=e
.removed
.length
+i
.removed
.length
-j
;if(e
.addedCount
||k
){var c
=i
.removed
;if(e
.index
<i
.index
){var l
=e
.removed
.slice(0,i
.index
-e
.index
);Array
.prototype.push
.apply(l
,c
),c
=l
}if(e
.index
+e
.removed
.length
>i
.index
+i
.addedCount
){var m
=e
.removed
.slice(i
.index
+i
.addedCount
-e
.index
);Array
.prototype.push
.apply(c
,m
)}e
.removed
=c
,i
.index
<e
.index
&&(e
.index
=i
.index
)}else f
=!0}else if(e
.index
<i
.index
){f
=!0,a
.splice(h
,0,e
),h
++;var n
=e
.addedCount
-e
.removed
.length
;i
.index
+=n
,g
+=n
}}}f
||a
.push(e
)}function createInitialSplices(a
,b
){for(var c
=[],d
=0;d
<b
.length
;d
++){var e
=b
[d
];switch(e
.type
){case"splice":mergeSplice(c
,e
.index
,e
.removed
.slice(),e
.addedCount
);break;case"add":case"update":case"delete":if(!isIndex(e
.name
))continue;var f
=toNumber(e
.name
);if(0>f
)continue;mergeSplice(c
,f
,[e
.oldValue
],1);break;default:console
.error("Unexpected record type: "+JSON
.stringify(e
))}}return c
}function projectArraySplices(a
,b
){var c
=[];return createInitialSplices(a
,b
).forEach(function(b
){return 1==b
.addedCount
&&1==b
.removed
.length
?void(b
.removed
[0]!==a
[b
.index
]&&c
.push(b
)):void(c
=c
.concat(calcSplices(a
,b
.index
,b
.index
+b
.addedCount
,b
.removed
,0,b
.removed
.length
)))}),c
}var hasObserve
=detectObjectObserve(),hasEval
=detectEval(),numberIsNaN
=global
.Number
.isNaN
||function(a
){return"number"==typeof a
&&global
.isNaN(a
)},createObject
="__proto__"in{}?function(a
){return a
}:function(a
){var b
=a
.__proto__
;if(!b
)return a
;var c
=Object
.create(b
);return Object
.getOwnPropertyNames(a
).forEach(function(b
){Object
.defineProperty(c
,b
,Object
.getOwnPropertyDescriptor(a
,b
))}),c
},identStart
="[$_a-zA-Z]",identPart
="[$_a-zA-Z0-9]",ident
=identStart
+"+"+identPart
+"*",elementIndex
="(?:[0-9]|[1-9]+[0-9]+)",identOrElementIndex
="(?:"+ident
+"|"+elementIndex
+")",path
="(?:"+identOrElementIndex
+")(?:\\s*\\.\\s*"+identOrElementIndex
+")*",pathRegExp
=new RegExp("^"+path
+"$"),constructorIsPrivate
={},pathCache
={};Path
.get=getPath
,Path
.prototype=createObject({__proto__
:[],valid
:!0,toString:function(){return this.join(".")},getValueFrom:function(a
){for(var b
=0;b
<this.length
;b
++){if(null==a
)return;a
=a
[this[b
]]}return a
},iterateObjects:function(a
,b
){for(var c
=0;c
<this.length
;c
++){if(c
&&(a
=a
[this[c
-1]]),!isObject(a
))return;b(a
)}},compiledGetValueFromFn:function(){var a
=this.map(function(a
){return isIndex(a
)?'["'+a
+'"]':"."+a
}),b
="",c
="obj";b
+="if (obj != null";for(var d
=0;d
<this.length
-1;d
++){{this[d
]}c
+=a
[d
],b
+=" &&\n "+c
+" != null"}return b
+=")\n",c
+=a
[d
],b
+=" return "+c
+";\nelse\n return undefined;",new Function("obj",b
)},setValueFrom:function(a
,b
){if(!this.length
)return!1;for(var c
=0;c
<this.length
-1;c
++){if(!isObject(a
))return!1;a
=a
[this[c
]]}return isObject(a
)?(a
[this[c
]]=b
,!0):!1}});var invalidPath
=new Path("",constructorIsPrivate
);invalidPath
.valid
=!1,invalidPath
.getValueFrom
=invalidPath
.setValueFrom=function(){};var MAX_DIRTY_CHECK_CYCLES
=1e3
,eomTasks
=[],runEOM
=hasObserve
?function(){var a
={pingPong
:!0},b
=!1;return Object
.observe(a
,function(){runEOMTasks(),b
=!1}),function(c
){eomTasks
.push(c
),b
||(b
=!0,a
.pingPong
=!a
.pingPong
)}}():function(){return function(a
){eomTasks
.push(a
)}}(),observedObjectCache
=[],emptyArray
=[],observedSetCache
=[],lastObservedSet
,UNOPENED
=0,OPENED
=1,CLOSED
=2,RESETTING
=3,nextObserverId
=1;Observer
.prototype={open:function(a
,b
){if(this.state_
!=UNOPENED
)throw Error("Observer has already been opened.");return addToAll(this),this.callback_
=a
,this.target_
=b
,this.state_
=OPENED
,this.connect_(),this.value_
},close:function(){this.state_
==OPENED
&&(removeFromAll(this),this.state_
=CLOSED
,this.disconnect_(),this.value_
=void 0,this.callback_
=void 0,this.target_
=void 0)},deliver:function(){this.state_
==OPENED
&&dirtyCheck(this)},report_:function(a
){try{this.callback_
.apply(this.target_
,a
)}catch(b
){Observer
._errorThrownDuringCallback
=!0,console
.error("Exception caught during observer callback: "+(b
.stack
||b
))}},discardChanges:function(){return this.check_(void 0,!0),this.value_
}};var collectObservers
=!hasObserve
,allObservers
;Observer
._allObserversCount
=0,collectObservers
&&(allObservers
=[]);var runningMicrotaskCheckpoint
=!1,hasDebugForceFullDelivery
=hasObserve
&&function(){try{return eval("%RunMicrotasks()"),!0}catch(ex
){return!1}}();global
.Platform
=global
.Platform
||{},global
.Platform
.performMicrotaskCheckpoint=function(){if(!runningMicrotaskCheckpoint
){if(hasDebugForceFullDelivery
)return void eval("%RunMicrotasks()");if(collectObservers
){runningMicrotaskCheckpoint
=!0;var cycles
=0,anyChanged
,toCheck
;do{cycles
++,toCheck
=allObservers
,allObservers
=[],anyChanged
=!1;for(var i
=0;i
<toCheck
.length
;i
++){var observer
=toCheck
[i
];observer
.state_
==OPENED
&&(observer
.check_()&&(anyChanged
=!0),allObservers
.push(observer
))}runEOMTasks()&&(anyChanged
=!0)}while(MAX_DIRTY_CHECK_CYCLES
>cycles
&&anyChanged
);global
.testingExposeCycleCount
&&(global
.dirtyCheckCycleCount
=cycles
),runningMicrotaskCheckpoint
=!1}}},collectObservers
&&(global
.Platform
.clearObservers=function(){allObservers
=[]}),ObjectObserver
.prototype=createObject({__proto__
:Observer
.prototype,arrayObserve
:!1,connect_:function(){hasObserve
?this.directObserver_
=getObservedObject(this,this.value_
,this.arrayObserve
):this.oldObject_
=this.copyObject(this.value_
)},copyObject:function(a
){var b
=Array
.isArray(a
)?[]:{};for(var c
in a
)b
[c
]=a
[c
];return Array
.isArray(a
)&&(b
.length
=a
.length
),b
},check_:function(a
){var b
,c
;if(hasObserve
){if(!a
)return!1;c
={},b
=diffObjectFromChangeRecords(this.value_
,a
,c
)}else c
=this.oldObject_
,b
=diffObjectFromOldObject(this.value_
,this.oldObject_
);return diffIsEmpty(b
)?!1:(hasObserve
||(this.oldObject_
=this.copyObject(this.value_
)),this.report_([b
.added
||{},b
.removed
||{},b
.changed
||{},function(a
){return c
[a
]}]),!0)},disconnect_:function(){hasObserve
?(this.directObserver_
.close(),this.directObserver_
=void 0):this.oldObject_
=void 0},deliver:function(){this.state_
==OPENED
&&(hasObserve
?this.directObserver_
.deliver(!1):dirtyCheck(this))},discardChanges:function(){return this.directObserver_
?this.directObserver_
.deliver(!0):this.oldObject_
=this.copyObject(this.value_
),this.value_
}}),ArrayObserver
.prototype=createObject({__proto__
:ObjectObserver
.prototype,arrayObserve
:!0,copyObject:function(a
){return a
.slice()},check_:function(a
){var b
;if(hasObserve
){if(!a
)return!1;b
=projectArraySplices(this.value_
,a
)}else b
=calcSplices(this.value_
,0,this.value_
.length
,this.oldObject_
,0,this.oldObject_
.length
);return b
&&b
.length
?(hasObserve
||(this.oldObject_
=this.copyObject(this.value_
)),this.report_([b
]),!0):!1}}),ArrayObserver
.applySplices=function(a
,b
,c
){c
.forEach(function(c
){for(var d
=[c
.index
,c
.removed
.length
],e
=c
.index
;e
<c
.index
+c
.addedCount
;)d
.push(b
[e
]),e
++;Array
.prototype.splice
.apply(a
,d
)})},PathObserver
.prototype=createObject({__proto__
:Observer
.prototype,connect_:function(){hasObserve
&&(this.directObserver_
=getObservedSet(this,this.object_
)),this.check_(void 0,!0)},disconnect_:function(){this.value_
=void 0,this.directObserver_
&&(this.directObserver_
.close(this),this.directObserver_
=void 0)},iterateObjects_:function(a
){this.path_
.iterateObjects(this.object_
,a
)},check_:function(a
,b
){var c
=this.value_
;return this.value_
=this.path_
.getValueFrom(this.object_
),b
||areSameValue(this.value_
,c
)?!1:(this.report_([this.value_
,c
]),!0)},setValue:function(a
){this.path_
&&this.path_
.setValueFrom(this.object_
,a
)}});var observerSentinel
={};CompoundObserver
.prototype=createObject({__proto__
:Observer
.prototype,connect_:function(){if(this.check_(void 0,!0),hasObserve
){for(var a
,b
=!1,c
=0;c
<this.observed_
.length
;c
+=2)if(a
=this.observed_
[c
],a
!==observerSentinel
){b
=!0;break}return this.directObserver_
?b
?void this.directObserver_
.reset():(this.directObserver_
.close(),void(this.directObserver_
=void 0)):void(b
&&(this.directObserver_
=getObservedSet(this,a
)))}},closeObservers_:function(){for(var a
=0;a
<this.observed_
.length
;a
+=2)this.observed_
[a
]===observerSentinel
&&this.observed_
[a
+1].close();this.observed_
.length
=0},disconnect_:function(){this.value_
=void 0,this.directObserver_
&&(this.directObserver_
.close(this),this.directObserver_
=void 0),this.closeObservers_()},addPath:function(a
,b
){if(this.state_
!=UNOPENED
&&this.state_
!=RESETTING
)throw Error("Cannot add paths once started.");this.observed_
.push(a
,b
instanceof Path
?b
:getPath(b
))},addObserver:function(a
){if(this.state_
!=UNOPENED
&&this.state_
!=RESETTING
)throw Error("Cannot add observers once started.");a
.open(this.deliver
,this),this.observed_
.push(observerSentinel
,a
)},startReset:function(){if(this.state_
!=OPENED
)throw Error("Can only reset while open");this.state_
=RESETTING
,this.closeObservers_()},finishReset:function(){if(this.state_
!=RESETTING
)throw Error("Can only finishReset after startReset");return this.state_
=OPENED
,this.connect_(),this.value_
},iterateObjects_:function(a
){for(var b
,c
=0;c
<this.observed_
.length
;c
+=2)b
=this.observed_
[c
],b
!==observerSentinel
&&this.observed_
[c
+1].iterateObjects(b
,a
)},check_:function(a
,b
){for(var c
,d
=0;d
<this.observed_
.length
;d
+=2){var e
=this.observed_
[d
+1],f
=this.observed_
[d
],g
=f
===observerSentinel
?e
.discardChanges():e
.getValueFrom(f
);b
?this.value_
[d
/2]=g:areSameValue(g,this.value_[d/2])||(c
=c
||[],c
[d
/2]=this.value_[d/2],this.value_
[d
/2]=g)}return c?(this.report_([this.value_,c,this.observed_]),!0):!1}}),ObserverTransform.prototype={open:function(a,b){return this.callback_=a,this.target_=b,this.value_=this.getValueFn_(this.observable_.open(this.observedCallback_,this)),this.value_},observedCallback_:function(a){if(a=this.getValueFn_(a),!areSameValue(a,this.value_)){var b=this.value_;this.value_=a,this.callback_.call(this.target_,this.value_,b)}},discardChanges:function(){return this.value_=this.getValueFn_(this.observable_.discardChanges()),this.value_},deliver:function(){return this.observable_.deliver()},setValue:function(a){return a=this.setValueFn_(a),!this.dontPassThroughSet_&&this.observable_.setValue?this.observable_.setValue(a):void 0},close:function(){this.observable_&&this.observable_.close(),this.callback_=void 0,this.target_=void 0,this.observable_=void 0,this.value_=void 0,this.getValueFn_=void 0,this.setValueFn_=void 0}};var expectedRecordTypes={add:!0,update:!0,"delete":!0};Observer.defineComputedProperty=function(a,b,c){var d=notifyFunction(a,b),e=c.open(function(a,b){e=a,d&&d("update",b)});return Object.defineProperty(a,b,{get:function(){return c.deliver(),e},set:function(a){return c.setValue(a),a},configurable:!0}),{close:function(){c.close(),Object.defineProperty(a,b,{value:e,writable:!0,configurable:!0})}}};var EDIT_LEAVE=0,EDIT_UPDATE=1,EDIT_ADD=2,EDIT_DELETE=3;ArraySplice.prototype={calcEditDistances:function(a,b,c,d,e,f){for(var g=f-e+1,h=c-b+1,i=new Array(g),j=0;g>j;j++)i[j]=new Array(h),i[j][0]=j;for(var k=0;h>k;k++)i[0][k]=k;for(var j=1;g>j;j++)for(var k=1;h>k;k++)if(this.equals(a[b+k-1],d[e+j-1]))i[j][k]=i[j-1][k-1];else{var l=i[j-1][k]+1,m=i[j][k-1]+1;i[j][k]=m>l?l:m}return i},spliceOperationsFromEditDistances:function(a){for(var b=a.length-1,c=a[0].length-1,d=a[b][c],e=[];b>0||c>0;)if(0!=b)if(0!=c){var f,g=a[b-1][c-1],h=a[b-1][c],i=a[b][c-1];f=i>h?g>h?h:g:g>i?i:g,f==g?(g==d?e.push(EDIT_LEAVE):(e.push(EDIT_UPDATE),d=g),b--,c--):f==h?(e.push(EDIT_DELETE),b--,d=h):(e.push(EDIT_ADD),c--,d=i)}else e.push(EDIT_DELETE),b--;else e.push(EDIT_ADD),c--;return e.reverse(),e},calcSplices:function(a,b,c,d,e,f){var g=0,h=0,i=Math.min(c-b,f-e);if(0==b&&0==e&&(g=this.sharedPrefix(a,d,i)),c==a.length&&f==d.length&&(h=this.sharedSuffix(a,d,i-g)),b+=g,e+=g,c-=h,f-=h,c-b==0&&f-e==0)return[];if(b==c){for(var j=newSplice(b,[],0);f>e;)j.removed.push(d[e++]);return[j]}if(e==f)return[newSplice(b,[],c-b)];for(var k=this.spliceOperationsFromEditDistances(this.calcEditDistances(a,b,c,d,e,f)),j=void 0,l=[],m=b,n=e,o=0;o<k.length;o++)switch(k[o]){case EDIT_LEAVE:j&&(l.push(j),j=void 0),m++,n++;break;case EDIT_UPDATE:j||(j=newSplice(m,[],0)),j.addedCount++,m++,j.removed.push(d[n]),n++;break;case EDIT_ADD:j||(j=newSplice(m,[],0)),j.addedCount++,m++;break;case EDIT_DELETE:j||(j=newSplice(m,[],0)),j.removed.push(d[n]),n++}return j&&l.push(j),l},sharedPrefix:function(a,b,c){for(var d=0;c>d;d++)if(!this.equals(a[d],b[d]))return d;return c},sharedSuffix:function(a,b,c){for(var d=a.length,e=b.length,f=0;c>f&&this.equals(a[--d],b[--e]);)f++;return f},calculateSplices:function(a,b){return this.calcSplices(a,0,a.length,b,0,b.length)},equals:function(a,b){return a===b}};var arraySplice=new ArraySplice;global.Observer=Observer,global.Observer.runEOM_=runEOM,global.Observer.hasObjectObserve=hasObserve,global.ArrayObserver=ArrayObserver,global.ArrayObserver.calculateSplices=function(a,b){return arraySplice.calculateSplices(a,b)},global.ArraySplice=ArraySplice,global.ObjectObserver=ObjectObserver,global.PathObserver=PathObserver,global.CompoundObserver=CompoundObserver,global.Path=Path,global.ObserverTransform=ObserverTransform}("undefined"!=typeof global&&global&&"undefined"!=typeof module&&module?global:this||window),window.Platform=window.Platform||{},window.logFlags=window.logFlags||{},function(a){var b=a.flags||{};location.search.slice(1).split("&").forEach(function(a){a=a.split("="),a[0]&&(b[a[0]]=a[1]||!0)});var c=document.currentScript||document.querySelector('script[src*="platform.js"]');if(c)for(var d,e=c.attributes,f=0;f<e.length;f++)d=e[f],"src"!==d.name&&(b[d.name]=d.value||!0);b.log&&b.log.split(",").forEach(function(a){window.logFlags[a]=!0}),b.shadow=b.shadow||b.shadowdom||b.polyfill,b.shadow="native"===b.shadow?!1:b.shadow||!HTMLElement.prototype.createShadowRoot,b.register&&(window.CustomElements=window.CustomElements||{flags:{}},window.CustomElements.flags.register=b.register),b.imports&&(window.HTMLImports=window.HTMLImports||{flags:{}},window.HTMLImports.flags.imports=b.imports),a.flags=b}(Platform),Platform.flags.shadow?(window.ShadowDOMPolyfill={},function(a){"use strict";function b(a){if(!a)throw new Error("Assertion failed")}function c(a,b){return L(b).forEach(function(c){K(a,c,M(b,c))}),a}function d(a,b){return L(b).forEach(function(c){switch(c){case"arguments":case"caller":case"length":case"name":case"prototype":case"toString":return}K(a,c,M(b,c))}),a}function e(a,b){for(var c=0;c<b.length;c++)if(b[c]in a)return b[c]}function f(a){var b=a.__proto__||Object.getPrototypeOf(a),c=E.get(b);if(c)return c;var d=f(b),e=t(d);return q(b,e,a),e}function g(a,b){o(a,b,!0)}function h(a,b){o(b,a,!1)}function i(a){return/^on
[a
-z
]+$/.test(a)}function j(a){return/^\w
[a
-zA
-Z_0
-9]*$/.test(a)}function k(a){return H&&j(a)?new Function("return this.impl."+a):function(){return this.impl[a]}}function l(a){return H&&j(a)?new Function("v","this.impl."+a+" = v"):function(b){this.impl[a]=b}}function m(a){return H&&j(a)?new Function("return this.impl."+a+".apply(this.impl, arguments)"):function(){return this.impl[a].apply(this.impl,arguments)}}function n(a,b){try{return Object.getOwnPropertyDescriptor(a,b)}catch(c){return O}}function o(b,c,d){for(var e=L(b),f=0;f<e.length;f++){var g=e[f];if("polymerBlackList_"!==g&&!(g in c||b.polymerBlackList_&&b.polymerBlackList_[g])){N&&b.__lookupGetter__(g);var h,j,o=n(b,g);if(d&&"function"==typeof o.value)c[g]=m(g);else{var p=i(g);h=p?a.getEventHandlerGetter(g):k(g),(o.writable||o.set)&&(j=p?a.getEventHandlerSetter(g):l(g)),K(c,g,{get:h,set:j,configurable:o.configurable,enumerable:o.enumerable})}}}}function p(a,b,c){var e=a.prototype;q(e,b,c),d(b,a)}function q(a,c,d){var e=c.prototype;b(void 0===E.get(a)),E.set(a,c),F.set(e,a),g(a,e),d&&h(e,d),K(e,"constructor",{value:c,configurable:!0,enumerable:!1,writable:!0}),c.prototype=e}function r(a,b){return E.get(b.prototype)===a}function s(a){var b=Object.getPrototypeOf(a),c=f(b),d=t(c);return q(b,d,a),d}function t(a){function b(b){a.call(this,b)}var c=Object.create(a.prototype);return c.constructor=b,b.prototype=c,b}function u(a){return a instanceof G.EventTarget||a instanceof G.Event||a instanceof G.Range||a instanceof G.DOMImplementation||a instanceof G.CanvasRenderingContext2D||G.WebGLRenderingContext&&a instanceof G.WebGLRenderingContext}function v(a){return Q&&a instanceof Q||a instanceof S||a instanceof R||a instanceof T||a instanceof U||a instanceof P||a instanceof V||W&&a instanceof W||X&&a instanceof X}function w(a){return null===a?null:(b(v(a)),a.polymerWrapper_||(a.polymerWrapper_=new(f(a))(a)))}function x(a){return null===a?null:(b(u(a)),a.impl)}function y(a){return a&&u(a)?x(a):a}function z(a){return a&&!u(a)?w(a):a}function A(a,c){null!==c&&(b(v(a)),b(void 0===c||u(c)),a.polymerWrapper_=c)}function B(a,b,c){K(a.prototype,b,{get:c,configurable:!0,enumerable:!0})}function C(a,b){B(a,b,function(){return w(this.impl[b])})}function D(a,b){a.forEach(function(a){b.forEach(function(b){a.prototype[b]=function(){var a=z(this);return a[b].apply(a,arguments)}})})}var E=new WeakMap,F=new WeakMap,G=Object.create(null),H=!("securityPolicy"in document)||document.securityPolicy.allowsEval;if(H)try{var I=new Function("","return true;");H=I()}catch(J){H=!1}var K=Object.defineProperty,L=Object.getOwnPropertyNames,M=Object.getOwnPropertyDescriptor;L(window);var N=/Firefox
/.test(navigator
.userAgent
),O
={get:function(){},set:function(){},configurable
:!0,enumerable
:!0},P
=window
.DOMImplementation
,Q
=window
.EventTarget
,R
=window
.Event
,S
=window
.Node
,T
=window
.Window
,U
=window
.Range
,V
=window
.CanvasRenderingContext2D
,W
=window
.WebGLRenderingContext
,X
=window
.SVGElementInstance
;a
.assert
=b
,a
.constructorTable
=E
,a
.defineGetter
=B
,a
.defineWrapGetter
=C
,a
.forwardMethodsToWrapper
=D
,a
.isWrapper
=u
,a
.isWrapperFor
=r
,a
.mixin
=c
,a
.nativePrototypeTable
=F
,a
.oneOf
=e
,a
.registerObject
=s
,a
.registerWrapper
=p
,a
.rewrap
=A
,a
.unwrap
=x
,a
.unwrapIfNeeded
=y
,a
.wrap
=w
,a
.wrapIfNeeded
=z
,a
.wrappers
=G
}(window
.ShadowDOMPolyfill
),function(a
){"use strict";function b(){g
=!1;var a
=f
.slice(0);f
=[];for(var b
=0;b
<a
.length
;b
++)a
[b
]()}function c(a
){f
.push(a
),g
||(g
=!0,d(b
,0))}var d
,e
=window
.MutationObserver
,f
=[],g
=!1;if(e
){var h
=1,i
=new e(b
),j
=document
.createTextNode(h
);i
.observe(j
,{characterData
:!0}),d=function(){h
=(h
+1)%2,j
.data
=h
}}else d
=window
.setImmediate
||window
.setTimeout
;a
.setEndOfMicrotask
=c
}(window
.ShadowDOMPolyfill
),function(a
){"use strict";function b(){p
||(k(c
),p
=!0)}function c(){p
=!1;do for(var a
=o
.slice(),b
=!1,c
=0;c
<a
.length
;c
++){var d
=a
[c
],e
=d
.takeRecords();f(d
),e
.length
&&(d
.callback_(e
,d
),b
=!0)}while(b
)}function d(a
,b
){this.type
=a
,this.target
=b
,this.addedNodes
=new m
.NodeList
,this.removedNodes
=new m
.NodeList
,this.previousSibling
=null,this.nextSibling
=null,this.attributeName
=null,this.attributeNamespace
=null,this.oldValue
=null}function e(a
,b
){for(;a
;a
=a
.parentNode
){var c
=n
.get(a
);if(c
)for(var d
=0;d
<c
.length
;d
++){var e
=c
[d
];e
.options
.subtree
&&e
.addTransientObserver(b
)}}}function f(a
){for(var b
=0;b
<a
.nodes_
.length
;b
++){var c
=a
.nodes_
[b
],d
=n
.get(c
);if(!d
)return;for(var e
=0;e
<d
.length
;e
++){var f
=d
[e
];f
.observer
===a
&&f
.removeTransientObservers()}}}function g(a
,c
,e
){for(var f
=Object
.create(null),g
=Object
.create(null),h
=a
;h
;h
=h
.parentNode
){var i
=n
.get(h
);if(i
)for(var j
=0;j
<i
.length
;j
++){var k
=i
[j
],l
=k
.options
;if((h
===a
||l
.subtree
)&&!("attributes"===c
&&!l
.attributes
||"attributes"===c
&&l
.attributeFilter
&&(null!==e
.namespace||-1===l
.attributeFilter
.indexOf(e
.name
))||"characterData"===c
&&!l
.characterData
||"childList"===c
&&!l
.childList
)){var m
=k
.observer
;f
[m
.uid_
]=m
,("attributes"===c
&&l
.attributeOldValue
||"characterData"===c
&&l
.characterDataOldValue
)&&(g
[m
.uid_
]=e
.oldValue
)}}}var o
=!1;for(var p
in f
){var m
=f
[p
],q
=new d(c
,a
);"name"in e
&&"namespace"in e
&&(q
.attributeName
=e
.name
,q
.attributeNamespace
=e
.namespace),e
.addedNodes
&&(q
.addedNodes
=e
.addedNodes
),e
.removedNodes
&&(q
.removedNodes
=e
.removedNodes
),e
.previousSibling
&&(q
.previousSibling
=e
.previousSibling
),e
.nextSibling
&&(q
.nextSibling
=e
.nextSibling
),void 0!==g
[p
]&&(q
.oldValue
=g
[p
]),m
.records_
.push(q
),o
=!0}o
&&b()}function h(a
){if(this.childList
=!!a
.childList
,this.subtree
=!!a
.subtree
,this.attributes
="attributes"in a
||!("attributeOldValue"in a
||"attributeFilter"in a
)?!!a
.attributes
:!0,this.characterData
="characterDataOldValue"in a
&&!("characterData"in a
)?!0:!!a
.characterData
,!this.attributes
&&(a
.attributeOldValue
||"attributeFilter"in a
)||!this.characterData
&&a
.characterDataOldValue
)throw new TypeError
;if(this.characterData
=!!a
.characterData
,this.attributeOldValue
=!!a
.attributeOldValue
,this.characterDataOldValue
=!!a
.characterDataOldValue
,"attributeFilter"in a
){if(null==a
.attributeFilter
||"object"!=typeof a
.attributeFilter
)throw new TypeError
;this.attributeFilter
=q
.call(a
.attributeFilter
)}else this.attributeFilter
=null}function i(a
){this.callback_
=a
,this.nodes_
=[],this.records_
=[],this.uid_
=++r
,o
.push(this)}function j(a
,b
,c
){this.observer
=a
,this.target
=b
,this.options
=c
,this.transientObservedNodes
=[]}var k
=a
.setEndOfMicrotask
,l
=a
.wrapIfNeeded
,m
=a
.wrappers
,n
=new WeakMap
,o
=[],p
=!1,q
=Array
.prototype.slice
,r
=0;i
.prototype={observe:function(a
,b
){a
=l(a
);var c
,d
=new h(b
),e
=n
.get(a
);e
||n
.set(a
,e
=[]);for(var f
=0;f
<e
.length
;f
++)e
[f
].observer
===this&&(c
=e
[f
],c
.removeTransientObservers(),c
.options
=d
);c
||(c
=new j(this,a
,d
),e
.push(c
),this.nodes_
.push(a
))},disconnect:function(){this.nodes_
.forEach(function(a
){for(var b
=n
.get(a
),c
=0;c
<b
.length
;c
++){var d
=b
[c
];if(d
.observer
===this){b
.splice(c
,1);break}}},this),this.records_
=[]},takeRecords:function(){var a
=this.records_
;return this.records_
=[],a
}},j
.prototype={addTransientObserver:function(a
){if(a
!==this.target
){this.transientObservedNodes
.push(a
);var b
=n
.get(a
);b
||n
.set(a
,b
=[]),b
.push(this)}},removeTransientObservers:function(){var a
=this.transientObservedNodes
;this.transientObservedNodes
=[];for(var b
=0;b
<a
.length
;b
++)for(var c
=a
[b
],d
=n
.get(c
),e
=0;e
<d
.length
;e
++)if(d
[e
]===this){d
.splice(e
,1);break}}},a
.enqueueMutation
=g
,a
.registerTransientObservers
=e
,a
.wrappers
.MutationObserver
=i
,a
.wrappers
.MutationRecord
=d
}(window
.ShadowDOMPolyfill
),function(a
){"use strict";function b(a
,b
){this.root
=a
,this.parent
=b
}function c(a
,b
){if(a
.treeScope_
!==b
){a
.treeScope_
=b
;for(var d
=a
.shadowRoot
;d
;d
=d
.olderShadowRoot
)d
.treeScope_
.parent
=b
;for(var e
=a
.firstChild
;e
;e
=e
.nextSibling
)c(e
,b
)}}function d(a
){if(a
.treeScope_
)return a
.treeScope_
;var c
,e
=a
.parentNode
;return c
=e
?d(e
):new b(a
,null),a
.treeScope_
=c
}b
.prototype={get renderer(){return this.root
instanceof a
.wrappers
.ShadowRoot
?a
.getRendererForHost(this.root
.host
):null},contains:function(a
){for(;a
;a
=a
.parent
)if(a
===this)return!0;return!1}},a
.TreeScope
=b
,a
.getTreeScope
=d
,a
.setTreeScope
=c
}(window
.ShadowDOMPolyfill
),function(a
){"use strict";function b(a
){return a
instanceof Q
.ShadowRoot
}function c(a
){var b
=a
.localName
;return"content"===b
||"shadow"===b
}function d(a
){return!!a
.shadowRoot
}function e(a
){var b
;return a
.parentNode
||(b
=a
.defaultView
)&&P(b
)||null}function f(f
,g
,h
){if(h
.length
)return h
.shift();if(b(f
))return j(f
)||f
.host
;var i
=a
.eventParentsTable
.get(f
);if(i
){for(var k
=1;k
<i
.length
;k
++)h
[k
-1]=i
[k
];return i
[0]}if(g
&&c(f
)){var l
=f
.parentNode
;if(l
&&d(l
))for(var m
=a
.getShadowTrees(l
),n
=j(g
),k
=0;k
<m
.length
;k
++)if(m
[k
].contains(n
))return n
}return e(f
)}function g(a
){for(var d
=[],e
=a
,g
=[],i
=[];e
;){var j
=null;if(c(e
)){j
=h(d
);var k
=d
[d
.length
-1]||e
;d
.push(k
)}else d
.length
||d
.push(e
);var l
=d
[d
.length
-1];g
.push({target
:l
,currentTarget
:e
}),b(e
)&&d
.pop(),e
=f(e
,j
,i
)}return g
}function h(a
){for(var b
=a
.length
-1;b
>=0;b
--)if(!c(a
[b
]))return a
[b
];return null}function i(a
,d
){for(var e
=[];a
;){for(var g
=[],i
=d
,j
=void 0;i
;){var m
=null;if(g
.length
){if(c(i
)&&(m
=h(g
),k(j
))){var n
=g
[g
.length
-1];g
.push(n
)}}else g
.push(i
);if(l(i
,a
))return g
[g
.length
-1];b(i
)&&g
.pop(),j
=i
,i
=f(i
,m
,e
)}a
=b(a
)?a
.host
:a
.parentNode
}}function j(b
){return a
.insertionParentTable
.get(b
)}function k(a
){return j(a
)}function l(a
,b
){return L(a
)===L(b
)}function m(a
){S
.get(a
)||(S
.set(a
,!0),o(P(a
),P(a
.target
)))}function n(a
){switch(a
.type
){case"beforeunload":case"load":case"unload":return!0}return!1}function o(b
,c
){if(T
.get(b
))throw new Error("InvalidStateError");T
.set(b
,!0),a
.renderAllPending();var d
=g(c
);return 2===d
.length
&&d
[0].target
instanceof Q
.Document
&&n(b
)&&d
.shift(),_
.set(b
,d
),p(b
,d
)&&q(b
,d
)&&r(b
,d
),X
.set(b
,u
.NONE
),V
.delete(b
,null),T
.delete(b
),b
.defaultPrevented
}function p(a
,b
){for(var c
,d
=b
.length
-1;d
>0;d
--){var e
=b
[d
].target
,f
=b
[d
].currentTarget
;if(e
!==f
&&(c
=u
.CAPTURING_PHASE
,!s(b
[d
],a
,c
)))return!1}return!0}function q(a
,b
){var c
=u
.AT_TARGET
;return s(b
[0],a
,c
)}function r(a
,b
){for(var c
,d
=a
.bubbles
,e
=1;e
<b
.length
;e
++){var f
=b
[e
].target
,g
=b
[e
].currentTarget
;if(f
===g
)c
=u
.AT_TARGET
;else{if(!d
||Z
.get(a
))continue;c
=u
.BUBBLING_PHASE
}if(!s(b
[e
],a
,c
))return}}function s(a
,b
,c
){var d
=a
.target
,e
=a
.currentTarget
,f
=R
.get(e
);if(!f
)return!0;if("relatedTarget"in b
){var g
=O(b
),h
=g
.relatedTarget
;if(h
&&h
instanceof Object
&&h
.addEventListener
){var j
=P(h
),k
=i(e
,j
);if(k
===d
)return!0;W
.set(b
,k
)}}X
.set(b
,c
);var l
=b
.type
,m
=!1;U
.set(b
,d
),V
.set(b
,e
);for(var n
=0;n
<f
.length
;n
++){var o
=f
[n
];if(o
.removed
)m
=!0;else if(!(o
.type
!==l
||!o
.capture
&&c
===u
.CAPTURING_PHASE
||o
.capture
&&c
===u
.BUBBLING_PHASE
))try{if("function"==typeof o
.handler
?o
.handler
.call(e
,b
):o
.handler
.handleEvent(b
),Z
.get(b
))return!1}catch(p
){window
.onerror
?window
.onerror(p
.message
):console
.error(p
,p
.stack
)}}if(m
){var q
=f
.slice();f
.length
=0;for(var n
=0;n
<q
.length
;n
++)q
[n
].removed
||f
.push(q
[n
])}return!Y
.get(b
)}function t(a
,b
,c
){this.type
=a
,this.handler
=b
,this.capture
=Boolean(c
)}function u(a
,b
){if(!(a
instanceof ab
))return P(y(ab
,"Event",a
,b
));var c
=a
;return lb
||"beforeunload"!==c
.type
?void(this.impl
=c
):new z(c
)}function v(a
){return a
&&a
.relatedTarget
?Object
.create(a
,{relatedTarget
:{value
:O(a
.relatedTarget
)}}):a
42 }function w(a
,b
,c
){var d
=window
[a
],e=function(b
,c
){return b
instanceof d
?void(this.impl
=b
):P(y(d
,a
,b
,c
))};if(e
.prototype=Object
.create(b
.prototype),c
&&M(e
.prototype,c
),d
)try{N(d
,e
,new d("temp"))}catch(f
){N(d
,e
,document
.createEvent(a
))}return e
}function x(a
,b
){return function(){arguments
[b
]=O(arguments
[b
]);var c
=O(this);c
[a
].apply(c
,arguments
)}}function y(a
,b
,c
,d
){if(jb
)return new a(c
,v(d
));var e
=O(document
.createEvent(b
)),f
=ib
[b
],g
=[c
];return Object
.keys(f
).forEach(function(a
){var b
=null!=d
&&a
in d
?d
[a
]:f
[a
];"relatedTarget"===a
&&(b
=O(b
)),g
.push(b
)}),e
["init"+b
].apply(e
,g
),e
}function z(a
){u
.call(this,a
)}function A(a
){return"function"==typeof a
?!0:a
&&a
.handleEvent
}function B(a
){switch(a
){case"DOMAttrModified":case"DOMAttributeNameChanged":case"DOMCharacterDataModified":case"DOMElementNameChanged":case"DOMNodeInserted":case"DOMNodeInsertedIntoDocument":case"DOMNodeRemoved":case"DOMNodeRemovedFromDocument":case"DOMSubtreeModified":return!0}return!1}function C(a
){this.impl
=a
}function D(a
){return a
instanceof Q
.ShadowRoot
&&(a
=a
.host
),O(a
)}function E(a
,b
){var c
=R
.get(a
);if(c
)for(var d
=0;d
<c
.length
;d
++)if(!c
[d
].removed
&&c
[d
].type
===b
)return!0;return!1}function F(a
,b
){for(var c
=O(a
);c
;c
=c
.parentNode
)if(E(P(c
),b
))return!0;return!1}function G(a
){K(a
,nb
)}function H(b
,c
,d
,e
){a
.renderAllPending();for(var f
=P(ob
.call(c
.impl
,d
,e
)),h
=g(f
,this),i
=0;i
<h
.length
;i
++){var j
=h
[i
];if(j
.currentTarget
===b
)return j
.target
}return null}function I(a
){return function(){var b
=$.get(this);return b
&&b
[a
]&&b
[a
].value
||null}}function J(a
){var b
=a
.slice(2);return function(c
){var d
=$.get(this);d
||(d
=Object
.create(null),$.set(this,d
));var e
=d
[a
];if(e
&&this.removeEventListener(b
,e
.wrapped
,!1),"function"==typeof c
){var f=function(b
){var d
=c
.call(this,b
);d
===!1?b
.preventDefault():"onbeforeunload"===a
&&"string"==typeof d
&&(b
.returnValue
=d
)};this.addEventListener(b
,f
,!1),d
[a
]={value
:c
,wrapped
:f
}}}}var K
=a
.forwardMethodsToWrapper
,L
=a
.getTreeScope
,M
=a
.mixin
,N
=a
.registerWrapper
,O
=a
.unwrap
,P
=a
.wrap
,Q
=a
.wrappers
,R
=(new WeakMap
,new WeakMap
),S
=new WeakMap
,T
=new WeakMap
,U
=new WeakMap
,V
=new WeakMap
,W
=new WeakMap
,X
=new WeakMap
,Y
=new WeakMap
,Z
=new WeakMap
,$=new WeakMap
,_
=new WeakMap
;t
.prototype={equals:function(a
){return this.handler
===a
.handler
&&this.type
===a
.type
&&this.capture
===a
.capture
},get removed(){return null===this.handler
},remove:function(){this.handler
=null}};var ab
=window
.Event
;ab
.prototype.polymerBlackList_
={returnValue
:!0,keyLocation
:!0},u
.prototype={get target(){return U
.get(this)},get currentTarget(){return V
.get(this)},get eventPhase(){return X
.get(this)},get path(){var a
=new Q
.NodeList
,b
=_
.get(this);if(b
){for(var c
=0,d
=b
.length
-1,e
=L(V
.get(this)),f
=0;d
>=f
;f
++){var g
=b
[f
].currentTarget
,h
=L(g
);h
.contains(e
)&&(f
!==d
||g
instanceof Q
.Node
)&&(a
[c
++]=g
)}a
.length
=c
}return a
},stopPropagation:function(){Y
.set(this,!0)},stopImmediatePropagation:function(){Y
.set(this,!0),Z
.set(this,!0)}},N(ab
,u
,document
.createEvent("Event"));var bb
=w("UIEvent",u
),cb
=w("CustomEvent",u
),db
={get relatedTarget(){return W
.get(this)||P(O(this).relatedTarget
)}},eb
=M({initMouseEvent
:x("initMouseEvent",14)},db
),fb
=M({initFocusEvent
:x("initFocusEvent",5)},db
),gb
=w("MouseEvent",bb
,eb
),hb
=w("FocusEvent",bb
,fb
),ib
=Object
.create(null),jb=function(){try{new window
.FocusEvent("focus")}catch(a
){return!1}return!0}();if(!jb
){var kb=function(a
,b
,c
){if(c
){var d
=ib
[c
];b
=M(M({},d
),b
)}ib
[a
]=b
};kb("Event",{bubbles
:!1,cancelable
:!1}),kb("CustomEvent",{detail
:null},"Event"),kb("UIEvent",{view
:null,detail
:0},"Event"),kb("MouseEvent",{screenX
:0,screenY
:0,clientX
:0,clientY
:0,ctrlKey
:!1,altKey
:!1,shiftKey
:!1,metaKey
:!1,button
:0,relatedTarget
:null},"UIEvent"),kb("FocusEvent",{relatedTarget
:null},"UIEvent")}var lb
=window
.BeforeUnloadEvent
;z
.prototype=Object
.create(u
.prototype),M(z
.prototype,{get returnValue(){return this.impl
.returnValue
},set returnValue(a
){this.impl
.returnValue
=a
}}),lb
&&N(lb
,z
);var mb
=window
.EventTarget
,nb
=["addEventListener","removeEventListener","dispatchEvent"];[Node
,Window
].forEach(function(a
){var b
=a
.prototype;nb
.forEach(function(a
){Object
.defineProperty(b
,a
+"_",{value
:b
[a
]})})}),C
.prototype={addEventListener:function(a
,b
,c
){if(A(b
)&&!B(a
)){var d
=new t(a
,b
,c
),e
=R
.get(this);if(e
){for(var f
=0;f
<e
.length
;f
++)if(d
.equals(e
[f
]))return}else e
=[],R
.set(this,e
);e
.push(d
);var g
=D(this);g
.addEventListener_(a
,m
,!0)}},removeEventListener:function(a
,b
,c
){c
=Boolean(c
);var d
=R
.get(this);if(d
){for(var e
=0,f
=!1,g
=0;g
<d
.length
;g
++)d
[g
].type
===a
&&d
[g
].capture
===c
&&(e
++,d
[g
].handler
===b
&&(f
=!0,d
[g
].remove()));if(f
&&1===e
){var h
=D(this);h
.removeEventListener_(a
,m
,!0)}}},dispatchEvent:function(b
){var c
=O(b
),d
=c
.type
;S
.set(c
,!1),a
.renderAllPending();var e
;F(this,d
)||(e=function(){},this.addEventListener(d
,e
,!0));try{return O(this).dispatchEvent_(c
)}finally{e
&&this.removeEventListener(d
,e
,!0)}}},mb
&&N(mb
,C
);var ob
=document
.elementFromPoint
;a
.adjustRelatedTarget
=i
,a
.elementFromPoint
=H
,a
.getEventHandlerGetter
=I
,a
.getEventHandlerSetter
=J
,a
.wrapEventTargetMethods
=G
,a
.wrappers
.BeforeUnloadEvent
=z
,a
.wrappers
.CustomEvent
=cb
,a
.wrappers
.Event
=u
,a
.wrappers
.EventTarget
=C
,a
.wrappers
.FocusEvent
=hb
,a
.wrappers
.MouseEvent
=gb
,a
.wrappers
.UIEvent
=bb
}(window
.ShadowDOMPolyfill
),function(a
){"use strict";function b(a
,b
){Object
.defineProperty(a
,b
,{enumerable
:!1})}function c(){this.length
=0,b(this,"length")}function d(a
){if(null==a
)return a
;for(var b
=new c
,d
=0,e
=a
.length
;e
>d
;d
++)b
[d
]=f(a
[d
]);return b
.length
=e
,b
}function e(a
,b
){a
.prototype[b
]=function(){return d(this.impl
[b
].apply(this.impl
,arguments
))}}var f
=a
.wrap
;c
.prototype={item:function(a
){return this[a
]}},b(c
.prototype,"item"),a
.wrappers
.NodeList
=c
,a
.addWrapNodeListMethod
=e
,a
.wrapNodeList
=d
}(window
.ShadowDOMPolyfill
),function(a
){"use strict";a
.wrapHTMLCollection
=a
.wrapNodeList
,a
.wrappers
.HTMLCollection
=a
.wrappers
.NodeList
}(window
.ShadowDOMPolyfill
),function(a
){"use strict";function b(a
){A(a
instanceof w
)}function c(a
){var b
=new y
;return b
[0]=a
,b
.length
=1,b
}function d(a
,b
,c
){C(b
,"childList",{removedNodes
:c
,previousSibling
:a
.previousSibling
,nextSibling
:a
.nextSibling
})}function e(a
,b
){C(a
,"childList",{removedNodes
:b
})}function f(a
,b
,d
,e
){if(a
instanceof DocumentFragment
){var f
=h(a
);N
=!0;for(var g
=f
.length
-1;g
>=0;g
--)a
.removeChild(f
[g
]),f
[g
].parentNode_
=b
;N
=!1;for(var g
=0;g
<f
.length
;g
++)f
[g
].previousSibling_
=f
[g
-1]||d
,f
[g
].nextSibling_
=f
[g
+1]||e
;return d
&&(d
.nextSibling_
=f
[0]),e
&&(e
.previousSibling_
=f
[f
.length
-1]),f
}var f
=c(a
),i
=a
.parentNode
;return i
&&i
.removeChild(a
),a
.parentNode_
=b
,a
.previousSibling_
=d
,a
.nextSibling_
=e
,d
&&(d
.nextSibling_
=a
),e
&&(e
.previousSibling_
=a
),f
}function g(a
){if(a
instanceof DocumentFragment
)return h(a
);var b
=c(a
),e
=a
.parentNode
;return e
&&d(a
,e
,b
),b
}function h(a
){for(var b
=new y
,c
=0,d
=a
.firstChild
;d
;d
=d
.nextSibling
)b
[c
++]=d
;return b
.length
=c
,e(a
,b
),b
}function i(a
){return a
}function j(a
,b
){I(a
,b
),a
.nodeIsInserted_()}function k(a
,b
){for(var c
=D(b
),d
=0;d
<a
.length
;d
++)j(a
[d
],c
)}function l(a
){I(a
,new z(a
,null))}function m(a
){for(var b
=0;b
<a
.length
;b
++)l(a
[b
])}function n(a
,b
){var c
=a
.nodeType
===w
.DOCUMENT_NODE
?a
:a
.ownerDocument
;c
!==b
.ownerDocument
&&c
.adoptNode(b
)}function o(b
,c
){if(c
.length
){var d
=b
.ownerDocument
;if(d
!==c
[0].ownerDocument
)for(var e
=0;e
<c
.length
;e
++)a
.adoptNodeNoRemove(c
[e
],d
)}}function p(a
,b
){o(a
,b
);var c
=b
.length
;if(1===c
)return J(b
[0]);for(var d
=J(a
.ownerDocument
.createDocumentFragment()),e
=0;c
>e
;e
++)d
.appendChild(J(b
[e
]));return d
}function q(a
){if(void 0!==a
.firstChild_
)for(var b
=a
.firstChild_
;b
;){var c
=b
;b
=b
.nextSibling_
,c
.parentNode_
=c
.previousSibling_
=c
.nextSibling_
=void 0}a
.firstChild_
=a
.lastChild_
=void 0}function r(a
){if(a
.invalidateShadowRenderer()){for(var b
=a
.firstChild
;b
;){A(b
.parentNode
===a
);var c
=b
.nextSibling
,d
=J(b
),e
=d
.parentNode
;e
&&U
.call(e
,d
),b
.previousSibling_
=b
.nextSibling_
=b
.parentNode_
=null,b
=c
}a
.firstChild_
=a
.lastChild_
=null}else for(var c
,f
=J(a
),g
=f
.firstChild
;g
;)c
=g
.nextSibling
,U
.call(f
,g
),g
=c
}function s(a
){var b
=a
.parentNode
;return b
&&b
.invalidateShadowRenderer()}function t(a
){for(var b
,c
=0;c
<a
.length
;c
++)b
=a
[c
],b
.parentNode
.removeChild(b
)}function u(a
,b
,c
){var d
;if(d
=K(c
?O
.call(c
,a
.impl
,!1):P
.call(a
.impl
,!1)),b
){for(var e
=a
.firstChild
;e
;e
=e
.nextSibling
)d
.appendChild(u(e
,!0,c
));if(a
instanceof M
.HTMLTemplateElement
)for(var f
=d
.content
,e
=a
.content
.firstChild
;e
;e
=e
.nextSibling
)f
.appendChild(u(e
,!0,c
))}return d
}function v(a
,b
){if(!b
||D(a
)!==D(b
))return!1;for(var c
=b
;c
;c
=c
.parentNode
)if(c
===a
)return!0;return!1}function w(a
){A(a
instanceof Q
),x
.call(this,a
),this.parentNode_
=void 0,this.firstChild_
=void 0,this.lastChild_
=void 0,this.nextSibling_
=void 0,this.previousSibling_
=void 0,this.treeScope_
=void 0}var x
=a
.wrappers
.EventTarget
,y
=a
.wrappers
.NodeList
,z
=a
.TreeScope
,A
=a
.assert
,B
=a
.defineWrapGetter
,C
=a
.enqueueMutation
,D
=a
.getTreeScope
,E
=a
.isWrapper
,F
=a
.mixin
,G
=a
.registerTransientObservers
,H
=a
.registerWrapper
,I
=a
.setTreeScope
,J
=a
.unwrap
,K
=a
.wrap
,L
=a
.wrapIfNeeded
,M
=a
.wrappers
,N
=!1,O
=document
.importNode
,P
=window
.Node
.prototype.cloneNode
,Q
=window
.Node
,R
=window
.DocumentFragment
,S
=(Q
.prototype.appendChild
,Q
.prototype.compareDocumentPosition
),T
=Q
.prototype.insertBefore
,U
=Q
.prototype.removeChild
,V
=Q
.prototype.replaceChild
,W
=/Trident/.test(navigator
.userAgent
),X
=W
?function(a
,b
){try{U
.call(a
,b
)}catch(c
){if(!(a
instanceof R
))throw c
}}:function(a
,b
){U
.call(a
,b
)};w
.prototype=Object
.create(x
.prototype),F(w
.prototype,{appendChild:function(a
){return this.insertBefore(a
,null)},insertBefore:function(a
,c
){b(a
);var d
;c
?E(c
)?d
=J(c
):(d
=c
,c
=K(d
)):(c
=null,d
=null),c
&&A(c
.parentNode
===this);var e
,h
=c
?c
.previousSibling
:this.lastChild
,i
=!this.invalidateShadowRenderer()&&!s(a
);if(e
=i
?g(a
):f(a
,this,h
,c
),i
)n(this,a
),q(this),T
.call(this.impl
,J(a
),d
);else{h
||(this.firstChild_
=e
[0]),c
||(this.lastChild_
=e
[e
.length
-1]);var j
=d
?d
.parentNode
:this.impl
;j
?T
.call(j
,p(this,e
),d
):o(this,e
)}return C(this,"childList",{addedNodes
:e
,nextSibling
:c
,previousSibling
:h
}),k(e
,this),a
},removeChild:function(a
){if(b(a
),a
.parentNode
!==this){for(var d
=!1,e
=(this.childNodes
,this.firstChild
);e
;e
=e
.nextSibling
)if(e
===a
){d
=!0;break}if(!d
)throw new Error("NotFoundError")}var f
=J(a
),g
=a
.nextSibling
,h
=a
.previousSibling
;if(this.invalidateShadowRenderer()){var i
=this.firstChild
,j
=this.lastChild
,k
=f
.parentNode
;k
&&X(k
,f
),i
===a
&&(this.firstChild_
=g
),j
===a
&&(this.lastChild_
=h
),h
&&(h
.nextSibling_
=g
),g
&&(g
.previousSibling_
=h
),a
.previousSibling_
=a
.nextSibling_
=a
.parentNode_
=void 0}else q(this),X(this.impl
,f
);return N
||C(this,"childList",{removedNodes
:c(a
),nextSibling
:g
,previousSibling
:h
}),G(this,a
),a
},replaceChild:function(a
,d
){b(a
);var e
;if(E(d
)?e
=J(d
):(e
=d
,d
=K(e
)),d
.parentNode
!==this)throw new Error("NotFoundError");var h
,i
=d
.nextSibling
,j
=d
.previousSibling
,m
=!this.invalidateShadowRenderer()&&!s(a
);return m
?h
=g(a
):(i
===a
&&(i
=a
.nextSibling
),h
=f(a
,this,j
,i
)),m
?(n(this,a
),q(this),V
.call(this.impl
,J(a
),e
)):(this.firstChild
===d
&&(this.firstChild_
=h
[0]),this.lastChild
===d
&&(this.lastChild_
=h
[h
.length
-1]),d
.previousSibling_
=d
.nextSibling_
=d
.parentNode_
=void 0,e
.parentNode
&&V
.call(e
.parentNode
,p(this,h
),e
)),C(this,"childList",{addedNodes
:h
,removedNodes
:c(d
),nextSibling
:i
,previousSibling
:j
}),l(d
),k(h
,this),d
},nodeIsInserted_:function(){for(var a
=this.firstChild
;a
;a
=a
.nextSibling
)a
.nodeIsInserted_()},hasChildNodes:function(){return null!==this.firstChild
},get parentNode(){return void 0!==this.parentNode_
?this.parentNode_
:K(this.impl
.parentNode
)},get firstChild(){return void 0!==this.firstChild_
?this.firstChild_
:K(this.impl
.firstChild
)},get lastChild(){return void 0!==this.lastChild_
?this.lastChild_
:K(this.impl
.lastChild
)},get nextSibling(){return void 0!==this.nextSibling_
?this.nextSibling_
:K(this.impl
.nextSibling
)},get previousSibling(){return void 0!==this.previousSibling_
?this.previousSibling_
:K(this.impl
.previousSibling
)},get parentElement(){for(var a
=this.parentNode
;a
&&a
.nodeType
!==w
.ELEMENT_NODE
;)a
=a
.parentNode
;return a
},get textContent(){for(var a
="",b
=this.firstChild
;b
;b
=b
.nextSibling
)b
.nodeType
!=w
.COMMENT_NODE
&&(a
+=b
.textContent
);return a
},set textContent(a
){var b
=i(this.childNodes
);if(this.invalidateShadowRenderer()){if(r(this),""!==a
){var c
=this.impl
.ownerDocument
.createTextNode(a
);this.appendChild(c
)}}else q(this),this.impl
.textContent
=a
;var d
=i(this.childNodes
);C(this,"childList",{addedNodes
:d
,removedNodes
:b
}),m(b
),k(d
,this)},get childNodes(){for(var a
=new y
,b
=0,c
=this.firstChild
;c
;c
=c
.nextSibling
)a
[b
++]=c
;return a
.length
=b
,a
},cloneNode:function(a
){return u(this,a
)},contains:function(a
){return v(this,L(a
))},compareDocumentPosition:function(a
){return S
.call(this.impl
,J(a
))},normalize:function(){for(var a
,b
,c
=i(this.childNodes
),d
=[],e
="",f
=0;f
<c
.length
;f
++)b
=c
[f
],b
.nodeType
===w
.TEXT_NODE
?a
||b
.data
.length
?a
?(e
+=b
.data
,d
.push(b
)):a
=b
:this.removeNode(b
):(a
&&d
.length
&&(a
.data
+=e
,cleanUpNodes(d
)),d
=[],e
="",a
=null,b
.childNodes
.length
&&b
.normalize());a
&&d
.length
&&(a
.data
+=e
,t(d
))}}),B(w
,"ownerDocument"),H(Q
,w
,document
.createDocumentFragment()),delete w
.prototype.querySelector
,delete w
.prototype.querySelectorAll
,w
.prototype=F(Object
.create(x
.prototype),w
.prototype),a
.cloneNode
=u
,a
.nodeWasAdded
=j
,a
.nodeWasRemoved
=l
,a
.nodesWereAdded
=k
,a
.nodesWereRemoved
=m
,a
.snapshotNodeList
=i
,a
.wrappers
.Node
=w
}(window
.ShadowDOMPolyfill
),function(a
){"use strict";function b(a
,c
){for(var d
,e
=a
.firstElementChild
;e
;){if(e
.matches(c
))return e
;if(d
=b(e
,c
))return d
;e
=e
.nextElementSibling
}return null}function c(a
,b
,d
){for(var e
=a
.firstElementChild
;e
;)e
.matches(b
)&&(d
[d
.length
++]=e
),c(e
,b
,d
),e
=e
.nextElementSibling
;return d
}var d
={querySelector:function(a
){return b(this,a
)},querySelectorAll:function(a
){return c(this,a
,new NodeList
)}},e
={getElementsByTagName:function(a
){return this.querySelectorAll(a
)},getElementsByClassName:function(a
){return this.querySelectorAll("."+a
)},getElementsByTagNameNS:function(a
,b
){if("*"===a
)return this.getElementsByTagName(b
);for(var c
=new NodeList
,d
=this.getElementsByTagName(b
),e
=0,f
=0;e
<d
.length
;e
++)d
[e
].namespaceURI
===a
&&(c
[f
++]=d
[e
]);return c
.length
=f
,c
}};a
.GetElementsByInterface
=e
,a
.SelectorsInterface
=d
}(window
.ShadowDOMPolyfill
),function(a
){"use strict";function b(a
){for(;a
&&a
.nodeType
!==Node
.ELEMENT_NODE
;)a
=a
.nextSibling
;return a
}function c(a
){for(;a
&&a
.nodeType
!==Node
.ELEMENT_NODE
;)a
=a
.previousSibling
;return a
}var d
=a
.wrappers
.NodeList
,e
={get firstElementChild(){return b(this.firstChild
)},get lastElementChild(){return c(this.lastChild
)},get childElementCount(){for(var a
=0,b
=this.firstElementChild
;b
;b
=b
.nextElementSibling
)a
++;return a
},get children(){for(var a
=new d
,b
=0,c
=this.firstElementChild
;c
;c
=c
.nextElementSibling
)a
[b
++]=c
;return a
.length
=b
,a
},remove:function(){var a
=this.parentNode
;a
&&a
.removeChild(this)}},f
={get nextElementSibling(){return b(this.nextSibling
)},get previousElementSibling(){return c(this.previousSibling
)}};a
.ChildNodeInterface
=f
,a
.ParentNodeInterface
=e
}(window
.ShadowDOMPolyfill
),function(a
){"use strict";function b(a
){d
.call(this,a
)}var c
=a
.ChildNodeInterface
,d
=a
.wrappers
.Node
,e
=a
.enqueueMutation
,f
=a
.mixin
,g
=a
.registerWrapper
,h
=window
.CharacterData
;b
.prototype=Object
.create(d
.prototype),f(b
.prototype,{get textContent(){return this.data
},set textContent(a
){this.data
=a
},get data(){return this.impl
.data
},set data(a
){var b
=this.impl
.data
;e(this,"characterData",{oldValue
:b
}),this.impl
.data
=a
}}),f(b
.prototype,c
),g(h
,b
,document
.createTextNode("")),a
.wrappers
.CharacterData
=b
}(window
.ShadowDOMPolyfill
),function(a
){"use strict";function b(a
){return a
>>>0}function c(a
){d
.call(this,a
)}var d
=a
.wrappers
.CharacterData
,e
=(a
.enqueueMutation
,a
.mixin
),f
=a
.registerWrapper
,g
=window
.Text
;c
.prototype=Object
.create(d
.prototype),e(c
.prototype,{splitText:function(a
){a
=b(a
);var c
=this.data
;if(a
>c
.length
)throw new Error("IndexSizeError");var d
=c
.slice(0,a
),e
=c
.slice(a
);this.data
=d
;var f
=this.ownerDocument
.createTextNode(e
);return this.parentNode
&&this.parentNode
.insertBefore(f
,this.nextSibling
),f
}}),f(g
,c
,document
.createTextNode("")),a
.wrappers
.Text
=c
}(window
.ShadowDOMPolyfill
),function(a
){"use strict";function b(b
,c
){var d
=b
.parentNode
;if(d
&&d
.shadowRoot
){var e
=a
.getRendererForHost(d
);e
.dependsOnAttribute(c
)&&e
.invalidate()}}function c(a
,b
,c
){k(a
,"attributes",{name
:b
,namespace:null,oldValue
:c
})}function d(a
){h
.call(this,a
)}function e(a
,c
,d
){var e
=d
||c
;Object
.defineProperty(a
,c
,{get:function(){return this.impl
[c
]},set:function(a
){this.impl
[c
]=a
,b(this,e
)},configurable
:!0,enumerable
:!0})}var f
=a
.ChildNodeInterface
,g
=a
.GetElementsByInterface
,h
=a
.wrappers
.Node
,i
=a
.ParentNodeInterface
,j
=a
.SelectorsInterface
,k
=(a
.addWrapNodeListMethod
,a
.enqueueMutation
),l
=a
.mixin
,m
=(a
.oneOf
,a
.registerWrapper
),n
=a
.wrappers
,o
=window
.Element
,p
=["matches","mozMatchesSelector","msMatchesSelector","webkitMatchesSelector"].filter(function(a
){return o
.prototype[a
]}),q
=p
[0],r
=o
.prototype[q
];d
.prototype=Object
.create(h
.prototype),l(d
.prototype,{createShadowRoot:function(){var b
=new n
.ShadowRoot(this);this.impl
.polymerShadowRoot_
=b
;var c
=a
.getRendererForHost(this);return c
.invalidate(),b
},get shadowRoot(){return this.impl
.polymerShadowRoot_
||null},setAttribute:function(a
,d
){var e
=this.impl
.getAttribute(a
);this.impl
.setAttribute(a
,d
),c(this,a
,e
),b(this,a
)},removeAttribute:function(a
){var d
=this.impl
.getAttribute(a
);this.impl
.removeAttribute(a
),c(this,a
,d
),b(this,a
)},matches:function(a
){return r
.call(this.impl
,a
)}}),p
.forEach(function(a
){"matches"!==a
&&(d
.prototype[a
]=function(a
){return this.matches(a
)})}),o
.prototype.webkitCreateShadowRoot
&&(d
.prototype.webkitCreateShadowRoot
=d
.prototype.createShadowRoot
),e(d
.prototype,"id"),e(d
.prototype,"className","class"),l(d
.prototype,f
),l(d
.prototype,g
),l(d
.prototype,i
),l(d
.prototype,j
),m(o
,d
,document
.createElementNS(null,"x")),a
.matchesNames
=p
,a
.wrappers
.Element
=d
}(window
.ShadowDOMPolyfill
),function(a
){"use strict";function b(a
){switch(a
){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case"Â ":return" "}}function c(a
){return a
.replace(z
,b
)}function d(a
){return a
.replace(A
,b
)}function e(a
){for(var b
={},c
=0;c
<a
.length
;c
++)b
[a
[c
]]=!0;return b
}function f(a
,b
){switch(a
.nodeType
){case Node
.ELEMENT_NODE
:for(var e
,f
=a
.tagName
.toLowerCase(),h
="<"+f
,i
=a
.attributes
,j
=0;e
=i
[j
];j
++)h
+=" "+e
.name
+'="'+c(e
.value
)+'"';return h
+=">",B
[f
]?h
:h
+g(a
)+"</"+f
+">";case Node
.TEXT_NODE
:var k
=a
.data
;return b
&&C
[b
.localName
]?k
:d(k
);case Node
.COMMENT_NODE
:return"<!--"+a
.data
+"-->";default:throw console
.error(a
),new Error("not implemented")}}function g(a
){a
instanceof y
.HTMLTemplateElement
&&(a
=a
.content
);for(var b
="",c
=a
.firstChild
;c
;c
=c
.nextSibling
)b
+=f(c
,a
);return b
}function h(a
,b
,c
){var d
=c
||"div";a
.textContent
="";var e
=w(a
.ownerDocument
.createElement(d
));e
.innerHTML
=b
;for(var f
;f
=e
.firstChild
;)a
.appendChild(x(f
))}function i(a
){o
.call(this,a
)}function j(a
,b
){var c
=w(a
.cloneNode(!1));c
.innerHTML
=b
;for(var d
,e
=w(document
.createDocumentFragment());d
=c
.firstChild
;)e
.appendChild(d
);return x(e
)}function k(b
){return function(){return a
.renderAllPending(),this.impl
[b
]}}function l(a
){p(i
,a
,k(a
))}function m(b
){Object
.defineProperty(i
.prototype,b
,{get:k(b
),set:function(c
){a
.renderAllPending(),this.impl
[b
]=c
},configurable
:!0,enumerable
:!0})}function n(b
){Object
.defineProperty(i
.prototype,b
,{value:function(){return a
.renderAllPending(),this.impl
[b
].apply(this.impl
,arguments
)},configurable
:!0,enumerable
:!0})}var o
=a
.wrappers
.Element
,p
=a
.defineGetter
,q
=a
.enqueueMutation
,r
=a
.mixin
,s
=a
.nodesWereAdded
,t
=a
.nodesWereRemoved
,u
=a
.registerWrapper
,v
=a
.snapshotNodeList
,w
=a
.unwrap
,x
=a
.wrap
,y
=a
.wrappers
,z
=/[&\u00A0"]/g,A=/[&\u00A0<>]/g,B=e(["area
","base
","br
","col
","command
","embed
","hr
","img
","input
","keygen
","link
","meta
","param
","source
","track
","wbr
"]),C=e(["style
","script
","xmp
","iframe
","noembed
","noframes
","plaintext
","noscript
"]),D=/MSIE/.test(navigator.userAgent),E=window.HTMLElement,F=window.HTMLTemplateElement;i.prototype=Object.create(o.prototype),r(i.prototype,{get innerHTML(){return g(this)},set innerHTML(a){if(D&&C[this.localName])return void(this.textContent=a);var b=v(this.childNodes);this.invalidateShadowRenderer()?this instanceof y.HTMLTemplateElement?h(this.content,a):h(this,a,this.tagName):!F&&this instanceof y.HTMLTemplateElement?h(this.content,a):this.impl.innerHTML=a;var c=v(this.childNodes);q(this,"childList
",{addedNodes:c,removedNodes:b}),t(b),s(c,this)},get outerHTML(){return f(this,this.parentNode)},set outerHTML(a){var b=this.parentNode;if(b){b.invalidateShadowRenderer();var c=j(b,a);b.replaceChild(c,this)}},insertAdjacentHTML:function(a,b){var c,d;switch(String(a).toLowerCase()){case"beforebegin
":c=this.parentNode,d=this;break;case"afterend
":c=this.parentNode,d=this.nextSibling;break;case"afterbegin
":c=this,d=this.firstChild;break;case"beforeend
":c=this,d=null;break;default:return}var e=j(c,b);c.insertBefore(e,d)}}),["clientHeight
","clientLeft
","clientTop
","clientWidth
","offsetHeight
","offsetLeft
","offsetTop
","offsetWidth
","scrollHeight
","scrollWidth
"].forEach(l),["scrollLeft
","scrollTop
"].forEach(m),["getBoundingClientRect
","getClientRects
","scrollIntoView
"].forEach(n),u(E,i,document.createElement("b
")),a.wrappers.HTMLElement=i,a.getInnerHTML=g,a.setInnerHTML=h}(window.ShadowDOMPolyfill),function(a){"use strict
";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=a.wrap,g=window.HTMLCanvasElement;b.prototype=Object.create(c.prototype),d(b.prototype,{getContext:function(){var a=this.impl.getContext.apply(this.impl,arguments);return a&&f(a)}}),e(g,b,document.createElement("canvas
")),a.wrappers.HTMLCanvasElement=b}(window.ShadowDOMPolyfill),function(a){"use strict
";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=window.HTMLContentElement;b.prototype=Object.create(c.prototype),d(b.prototype,{get select(){return this.getAttribute("select
")},set select(a){this.setAttribute("select
",a)},setAttribute:function(a,b){c.prototype.setAttribute.call(this,a,b),"select
"===String(a).toLowerCase()&&this.invalidateShadowRenderer(!0)}}),f&&e(f,b),a.wrappers.HTMLContentElement=b}(window.ShadowDOMPolyfill),function(a){"use strict
";function b(a){d.call(this,a)}function c(a,b){if(!(this instanceof c))throw new TypeError("DOM object
constructor cannot be called as a
function.");var e=f(document.createElement("img
"));d.call(this,e),g(e,this),void 0!==a&&(e.width=a),void 0!==b&&(e.height=b)}var d=a.wrappers.HTMLElement,e=a.registerWrapper,f=a.unwrap,g=a.rewrap,h=window.HTMLImageElement;b.prototype=Object.create(d.prototype),e(h,b,document.createElement("img
")),c.prototype=b.prototype,a.wrappers.HTMLImageElement=b,a.wrappers.Image=c}(window.ShadowDOMPolyfill),function(a){"use strict
";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=window.HTMLShadowElement;b.prototype=Object.create(c.prototype),d(b.prototype,{}),f&&e(f,b),a.wrappers.HTMLShadowElement=b}(window.ShadowDOMPolyfill),function(a){"use strict
";function b(a){if(!a.defaultView)return a;var b=k.get(a);if(!b){for(b=a.implementation.createHTMLDocument("");b.lastChild;)b.removeChild(b.lastChild);k.set(a,b)}return b}function c(a){for(var c,d=b(a.ownerDocument),e=h(d.createDocumentFragment());c=a.firstChild;)e.appendChild(c);return e}function d(a){if(e.call(this,a),!l){var b=c(a);j.set(this,i(b))}}var e=a.wrappers.HTMLElement,f=a.mixin,g=a.registerWrapper,h=a.unwrap,i=a.wrap,j=new WeakMap,k=new WeakMap,l=window.HTMLTemplateElement;d.prototype=Object.create(e.prototype),f(d.prototype,{get content(){return l?i(this.impl.content):j.get(this)}}),l&&g(l,d),a.wrappers.HTMLTemplateElement=d}(window.ShadowDOMPolyfill),function(a){"use strict
";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.registerWrapper,e=window.HTMLMediaElement;b.prototype=Object.create(c.prototype),d(e,b,document.createElement("audio
")),a.wrappers.HTMLMediaElement=b}(window.ShadowDOMPolyfill),function(a){"use strict
";function b(a){d.call(this,a)}function c(a){if(!(this instanceof c))throw new TypeError("DOM object
constructor cannot be called as a
function.");var b=f(document.createElement("audio
"));d.call(this,b),g(b,this),b.setAttribute("preload
","auto
"),void 0!==a&&b.setAttribute("src
",a)}var d=a.wrappers.HTMLMediaElement,e=a.registerWrapper,f=a.unwrap,g=a.rewrap,h=window.HTMLAudioElement;b.prototype=Object.create(d.prototype),e(h,b,document.createElement("audio
")),c.prototype=b.prototype,a.wrappers.HTMLAudioElement=b,a.wrappers.Audio=c}(window.ShadowDOMPolyfill),function(a){"use strict
";function b(a){return a.replace(/\s+/g," ").trim()}function c(a){e.call(this,a)}function d(a,b,c,f){if(!(this instanceof d))throw new TypeError("DOM object
constructor cannot be called as a
function.");var g=i(document.createElement("option
"));e.call(this,g),h(g,this),void 0!==a&&(g.text=a),void 0!==b&&g.setAttribute("value
",b),c===!0&&g.setAttribute("selected
",""),g.selected=f===!0}var e=a.wrappers.HTMLElement,f=a.mixin,g=a.registerWrapper,h=a.rewrap,i=a.unwrap,j=a.wrap,k=window.HTMLOptionElement;c.prototype=Object.create(e.prototype),f(c.prototype,{get text(){return b(this.textContent)},set text(a){this.textContent=b(String(a))},get form(){return j(i(this).form)}}),g(k,c,document.createElement("option
")),d.prototype=c.prototype,a.wrappers.HTMLOptionElement=c,a.wrappers.Option=d}(window.ShadowDOMPolyfill),function(a){"use strict
";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=a.unwrap,g=a.wrap,h=window.HTMLSelectElement;b.prototype=Object.create(c.prototype),d(b.prototype,{add:function(a,b){"object
"==typeof b&&(b=f(b)),f(this).add(f(a),b)},remove:function(a){return void 0===a?void c.prototype.remove.call(this):("object
"==typeof a&&(a=f(a)),void f(this).remove(a))},get form(){return g(f(this).form)}}),e(h,b,document.createElement("select
")),a.wrappers.HTMLSelectElement=b}(window.ShadowDOMPolyfill),function(a){"use strict
";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=a.unwrap,g=a.wrap,h=a.wrapHTMLCollection,i=window.HTMLTableElement;b.prototype=Object.create(c.prototype),d(b.prototype,{get caption(){return g(f(this).caption)},createCaption:function(){return g(f(this).createCaption())},get tHead(){return g(f(this).tHead)},createTHead:function(){return g(f(this).createTHead())},createTFoot:function(){return g(f(this).createTFoot())},get tFoot(){return g(f(this).tFoot)},get tBodies(){return h(f(this).tBodies)},createTBody:function(){return g(f(this).createTBody())},get rows(){return h(f(this).rows)},insertRow:function(a){return g(f(this).insertRow(a))}}),e(i,b,document.createElement("table
")),a.wrappers.HTMLTableElement=b}(window.ShadowDOMPolyfill),function(a){"use strict
";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=a.wrapHTMLCollection,g=a.unwrap,h=a.wrap,i=window.HTMLTableSectionElement;b.prototype=Object.create(c.prototype),d(b.prototype,{get rows(){return f(g(this).rows)},insertRow:function(a){return h(g(this).insertRow(a))}}),e(i,b,document.createElement("thead
")),a.wrappers.HTMLTableSectionElement=b}(window.ShadowDOMPolyfill),function(a){"use strict
";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=a.wrapHTMLCollection,g=a.unwrap,h=a.wrap,i=window.HTMLTableRowElement;b.prototype=Object.create(c.prototype),d(b.prototype,{get cells(){return f(g(this).cells)},insertCell:function(a){return h(g(this).insertCell(a))}}),e(i,b,document.createElement("tr
")),a.wrappers.HTMLTableRowElement=b}(window.ShadowDOMPolyfill),function(a){"use strict
";function b(a){switch(a.localName){case"content
":return new c(a);case"shadow
":return new e(a);case"template
":return new f(a)}d.call(this,a)}var c=a.wrappers.HTMLContentElement,d=a.wrappers.HTMLElement,e=a.wrappers.HTMLShadowElement,f=a.wrappers.HTMLTemplateElement,g=(a.mixin,a.registerWrapper),h=window.HTMLUnknownElement;b.prototype=Object.create(d.prototype),g(h,b),a.wrappers.HTMLUnknownElement=b}(window.ShadowDOMPolyfill),function(a){"use strict
";var b=a.registerObject,c="http
://www.w3.org/2000/svg",d=document.createElementNS(c,"title"),e=b(d),f=Object.getPrototypeOf(e.prototype).constructor;a.wrappers.SVGElement=f}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){m.call(this,a)}var c=a.mixin,d=a.registerWrapper,e=a.unwrap,f=a.wrap,g=window.SVGUseElement,h="http://www.w3.org/2000/svg",i=f(document.createElementNS(h,"g")),j=document.createElementNS(h,"use"),k=i.constructor,l=Object.getPrototypeOf(k.prototype),m=l.constructor;b.prototype=Object.create(l),"instanceRoot"in j&&c(b.prototype,{get instanceRoot(){return f(e(this).instanceRoot)},get animatedInstanceRoot(){return f(e(this).animatedInstanceRoot)}}),d(g,b,j),a.wrappers.SVGUseElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.EventTarget,d=a.mixin,e=a.registerWrapper,f=a.wrap,g=window.SVGElementInstance;g&&(b.prototype=Object.create(c.prototype),d(b.prototype,{get correspondingElement(){return f(this.impl.correspondingElement)},get correspondingUseElement(){return f(this.impl.correspondingUseElement)},get parentNode(){return f(this.impl.parentNode)},get childNodes(){throw new Error("Not implemented")},get firstChild(){return f(this.impl.firstChild)},get lastChild(){return f(this.impl.lastChild)},get previousSibling(){return f(this.impl.previousSibling)},get nextSibling(){return f(this.impl.nextSibling)}}),e(g,b),a.wrappers.SVGElementInstance=b)}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){this.impl=a}var c=a.mixin,d=a.registerWrapper,e=a.unwrap,f=a.unwrapIfNeeded,g=a.wrap,h=window.CanvasRenderingContext2D;c(b.prototype,{get canvas(){return g(this.impl.canvas)},drawImage:function(){arguments[0]=f(arguments[0]),this.impl.drawImage.apply(this.impl,arguments)},createPattern:function(){return arguments[0]=e(arguments[0]),this.impl.createPattern.apply(this.impl,arguments)}}),d(h,b,document.createElement("canvas").getContext("2d")),a.wrappers.CanvasRenderingContext2D=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){this.impl=a}var c=a.mixin,d=a.registerWrapper,e=a.unwrapIfNeeded,f=a.wrap,g=window.WebGLRenderingContext;if(g){c(b.prototype,{get canvas(){return f(this.impl.canvas)},texImage2D:function(){arguments[5]=e(arguments[5]),this.impl.texImage2D.apply(this.impl,arguments)},texSubImage2D:function(){arguments[6]=e(arguments[6]),this.impl.texSubImage2D.apply(this.impl,arguments)}});var h=/WebKit/.test(navigator.userAgent)?{drawingBufferHeight:null,drawingBufferWidth:null}:{};d(g,b,h),a.wrappers.WebGLRenderingContext=b}}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){this.impl=a}var c=a.registerWrapper,d=a.unwrap,e=a.unwrapIfNeeded,f=a.wrap,g=window.Range;b.prototype={get startContainer(){return f(this.impl.startContainer)},get endContainer(){return f(this.impl.endContainer)},get commonAncestorContainer(){return f(this.impl.commonAncestorContainer)},setStart:function(a,b){this.impl.setStart(e(a),b)},setEnd:function(a,b){this.impl.setEnd(e(a),b)},setStartBefore:function(a){this.impl.setStartBefore(e(a))},setStartAfter:function(a){this.impl.setStartAfter(e(a))},setEndBefore:function(a){this.impl.setEndBefore(e(a))},setEndAfter:function(a){this.impl.setEndAfter(e(a))},selectNode:function(a){this.impl.selectNode(e(a))},selectNodeContents:function(a){this.impl.selectNodeContents(e(a))},compareBoundaryPoints:function(a,b){return this.impl.compareBoundaryPoints(a,d(b))},extractContents:function(){return f(this.impl.extractContents())},cloneContents:function(){return f(this.impl.cloneContents())},insertNode:function(a){this.impl.insertNode(e(a))},surroundContents:function(a){this.impl.surroundContents(e(a))},cloneRange:function(){return f(this.impl.cloneRange())},isPointInRange:function(a,b){return this.impl.isPointInRange(e(a),b)},comparePoint:function(a,b){return this.impl.comparePoint(e(a),b)},intersectsNode:function(a){return this.impl.intersectsNode(e(a))},toString:function(){return this.impl.toString()}},g.prototype.createContextualFragment&&(b.prototype.createContextualFragment=function(a){return f(this.impl.createContextualFragment(a))}),c(window.Range,b,document.createRange()),a.wrappers.Range=b}(window.ShadowDOMPolyfill),function(a){"use strict";var b=a.GetElementsByInterface,c=a.ParentNodeInterface,d=a.SelectorsInterface,e=a.mixin,f=a.registerObject,g=f(document.createDocumentFragment());
43 e(g
.prototype,c
),e(g
.prototype,d
),e(g
.prototype,b
);var h
=f(document
.createComment(""));a
.wrappers
.Comment
=h
,a
.wrappers
.DocumentFragment
=g
}(window
.ShadowDOMPolyfill
),function(a
){"use strict";function b(a
){var b
=k(a
.impl
.ownerDocument
.createDocumentFragment());c
.call(this,b
),i(b
,this),this.treeScope_
=new d(this,g(a
));var e
=a
.shadowRoot
;m
.set(this,e
),l
.set(this,a
)}var c
=a
.wrappers
.DocumentFragment
,d
=a
.TreeScope
,e
=a
.elementFromPoint
,f
=a
.getInnerHTML
,g
=a
.getTreeScope
,h
=a
.mixin
,i
=a
.rewrap
,j
=a
.setInnerHTML
,k
=a
.unwrap
,l
=new WeakMap
,m
=new WeakMap
,n
=/[ \t\n\r\f]/;b
.prototype=Object
.create(c
.prototype),h(b
.prototype,{get innerHTML(){return f(this)},set innerHTML(a
){j(this,a
),this.invalidateShadowRenderer()},get olderShadowRoot(){return m
.get(this)||null},get host(){return l
.get(this)||null},invalidateShadowRenderer:function(){return l
.get(this).invalidateShadowRenderer()},elementFromPoint:function(a
,b
){return e(this,this.ownerDocument
,a
,b
)},getElementById:function(a
){return n
.test(a
)?null:this.querySelector('[id="'+a
+'"]')}}),a
.wrappers
.ShadowRoot
=b
}(window
.ShadowDOMPolyfill
),function(a
){"use strict";function b(a
){a
.previousSibling_
=a
.previousSibling
,a
.nextSibling_
=a
.nextSibling
,a
.parentNode_
=a
.parentNode
}function c(a
,c
,e
){var f
=G(a
),g
=G(c
),h
=e
?G(e
):null;if(d(c
),b(c
),e
)a
.firstChild
===e
&&(a
.firstChild_
=e
),e
.previousSibling_
=e
.previousSibling
;else{a
.lastChild_
=a
.lastChild
,a
.lastChild
===a
.firstChild
&&(a
.firstChild_
=a
.firstChild
);var i
=H(f
.lastChild
);i
&&(i
.nextSibling_
=i
.nextSibling
)}f
.insertBefore(g
,h
)}function d(a
){var c
=G(a
),d
=c
.parentNode
;if(d
){var e
=H(d
);b(a
),a
.previousSibling
&&(a
.previousSibling
.nextSibling_
=a
),a
.nextSibling
&&(a
.nextSibling
.previousSibling_
=a
),e
.lastChild
===a
&&(e
.lastChild_
=a
),e
.firstChild
===a
&&(e
.firstChild_
=a
),d
.removeChild(c
)}}function e(a
,b
){g(b
).push(a
),x(a
,b
);var c
=J
.get(a
);c
||J
.set(a
,c
=[]),c
.push(b
)}function f(a
){I
.set(a
,[])}function g(a
){var b
=I
.get(a
);return b
||I
.set(a
,b
=[]),b
}function h(a
){for(var b
=[],c
=0,d
=a
.firstChild
;d
;d
=d
.nextSibling
)b
[c
++]=d
;return b
}function i(a
,b
,c
){for(var d
=a
.firstChild
;d
;d
=d
.nextSibling
)if(b(d
)){if(c(d
)===!1)return}else i(d
,b
,c
)}function j(a
,b
){var c
=b
.getAttribute("select");if(!c
)return!0;if(c
=c
.trim(),!c
)return!0;if(!(a
instanceof z
))return!1;if("*"===c
||c
===a
.localName
)return!0;if(!M
.test(c
))return!1;if(":"===c
[0]&&!N
.test(c
))return!1;try{return a
.matches(c
)}catch(d
){return!1}}function k(){for(var a
=0;a
<P
.length
;a
++){var b
=P
[a
],c
=b
.parentRenderer
;c
&&c
.dirty
||b
.render()}P
=[]}function l(){y
=null,k()}function m(a
){var b
=L
.get(a
);return b
||(b
=new q(a
),L
.set(a
,b
)),b
}function n(a
){var b
=E(a
).root
;return b
instanceof D
?b
:null}function o(a
){return m(a
.host
)}function p(a
){this.skip
=!1,this.node
=a
,this.childNodes
=[]}function q(a
){this.host
=a
,this.dirty
=!1,this.invalidateAttributes(),this.associateNode(a
)}function r(a
){return a
instanceof A
}function s(a
){return a
instanceof A
}function t(a
){return a
instanceof B
}function u(a
){return a
instanceof B
}function v(a
){return a
.shadowRoot
}function w(a
){for(var b
=[],c
=a
.shadowRoot
;c
;c
=c
.olderShadowRoot
)b
.push(c
);return b
}function x(a
,b
){K
.set(a
,b
)}var y
,z
=a
.wrappers
.Element
,A
=a
.wrappers
.HTMLContentElement
,B
=a
.wrappers
.HTMLShadowElement
,C
=a
.wrappers
.Node
,D
=a
.wrappers
.ShadowRoot
,E
=(a
.assert
,a
.getTreeScope
),F
=(a
.mixin
,a
.oneOf
),G
=a
.unwrap
,H
=a
.wrap
,I
=new WeakMap
,J
=new WeakMap
,K
=new WeakMap
,L
=new WeakMap
,M
=/^[*.:#[a-zA-Z_|]/,N
=new RegExp("^:("+["link","visited","target","enabled","disabled","checked","indeterminate","nth-child","nth-last-child","nth-of-type","nth-last-of-type","first-child","last-child","first-of-type","last-of-type","only-of-type"].join("|")+")"),O
=F(window
,["requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","setTimeout"]),P
=[],Q
=new ArraySplice
;Q
.equals=function(a
,b
){return G(a
.node
)===b
},p
.prototype={append:function(a
){var b
=new p(a
);return this.childNodes
.push(b
),b
},sync:function(a
){if(!this.skip
){for(var b
=this.node
,e
=this.childNodes
,f
=h(G(b
)),g
=a
||new WeakMap
,i
=Q
.calculateSplices(e
,f
),j
=0,k
=0,l
=0,m
=0;m
<i
.length
;m
++){for(var n
=i
[m
];l
<n
.index
;l
++)k
++,e
[j
++].sync(g
);for(var o
=n
.removed
.length
,p
=0;o
>p
;p
++){var q
=H(f
[k
++]);g
.get(q
)||d(q
)}for(var r
=n
.addedCount
,s
=f
[k
]&&H(f
[k
]),p
=0;r
>p
;p
++){var t
=e
[j
++],u
=t
.node
;c(b
,u
,s
),g
.set(u
,!0),t
.sync(g
)}l
+=r
}for(var m
=l
;m
<e
.length
;m
++)e
[m
].sync(g
)}}},q
.prototype={render:function(a
){if(this.dirty
){this.invalidateAttributes(),this.treeComposition();var b
=this.host
,c
=b
.shadowRoot
;this.associateNode(b
);for(var d
=!e
,e
=a
||new p(b
),f
=c
.firstChild
;f
;f
=f
.nextSibling
)this.renderNode(c
,e
,f
,!1);d
&&e
.sync(),this.dirty
=!1}},get parentRenderer(){return E(this.host
).renderer
},invalidate:function(){if(!this.dirty
){if(this.dirty
=!0,P
.push(this),y
)return;y
=window
[O
](l
,0)}},renderNode:function(a
,b
,c
,d
){if(v(c
)){b
=b
.append(c
);var e
=m(c
);e
.dirty
=!0,e
.render(b
)}else r(c
)?this.renderInsertionPoint(a
,b
,c
,d
):t(c
)?this.renderShadowInsertionPoint(a
,b
,c
):this.renderAsAnyDomTree(a
,b
,c
,d
)},renderAsAnyDomTree:function(a
,b
,c
,d
){if(b
=b
.append(c
),v(c
)){var e
=m(c
);b
.skip
=!e
.dirty
,e
.render(b
)}else for(var f
=c
.firstChild
;f
;f
=f
.nextSibling
)this.renderNode(a
,b
,f
,d
)},renderInsertionPoint:function(a
,b
,c
,d
){var e
=g(c
);if(e
.length
){this.associateNode(c
);for(var f
=0;f
<e
.length
;f
++){var h
=e
[f
];r(h
)&&d
?this.renderInsertionPoint(a
,b
,h
,d
):this.renderAsAnyDomTree(a
,b
,h
,d
)}}else this.renderFallbackContent(a
,b
,c
);this.associateNode(c
.parentNode
)},renderShadowInsertionPoint:function(a
,b
,c
){var d
=a
.olderShadowRoot
;if(d
){x(d
,c
),this.associateNode(c
.parentNode
);for(var e
=d
.firstChild
;e
;e
=e
.nextSibling
)this.renderNode(d
,b
,e
,!0)}else this.renderFallbackContent(a
,b
,c
)},renderFallbackContent:function(a
,b
,c
){this.associateNode(c
),this.associateNode(c
.parentNode
);for(var d
=c
.firstChild
;d
;d
=d
.nextSibling
)this.renderAsAnyDomTree(a
,b
,d
,!1)},invalidateAttributes:function(){this.attributes
=Object
.create(null)},updateDependentAttributes:function(a
){if(a
){var b
=this.attributes
;/\.\w+/.test(a
)&&(b
["class"]=!0),/#\w+/.test(a
)&&(b
.id
=!0),a
.replace(/\[\s*([^\s=\|~\]]+)/g,function(a
,c
){b
[c
]=!0})}},dependsOnAttribute:function(a
){return this.attributes
[a
]},distribute:function(a
,b
){var c
=this;i(a
,s
,function(a
){f(a
),c
.updateDependentAttributes(a
.getAttribute("select"));for(var d
=0;d
<b
.length
;d
++){var g
=b
[d
];void 0!==g
&&j(g
,a
)&&(e(g
,a
),b
[d
]=void 0)}})},treeComposition:function(){for(var a
=this.host
,b
=a
.shadowRoot
,c
=[],d
=a
.firstChild
;d
;d
=d
.nextSibling
)if(r(d
)){var e
=g(d
);e
&&e
.length
||(e
=h(d
)),c
.push
.apply(c
,e
)}else c
.push(d
);for(var f
,j
;b
;){if(f
=void 0,i(b
,u
,function(a
){return f
=a
,!1}),j
=f
,this.distribute(b
,c
),j
){var k
=b
.olderShadowRoot
;if(k
){b
=k
,x(b
,j
);continue}break}break}},associateNode:function(a
){a
.impl
.polymerShadowRenderer_
=this}},C
.prototype.invalidateShadowRenderer=function(){var a
=this.impl
.polymerShadowRenderer_
;return a
?(a
.invalidate(),!0):!1},A
.prototype.getDistributedNodes=function(){return k(),g(this)},B
.prototype.nodeIsInserted_
=A
.prototype.nodeIsInserted_=function(){this.invalidateShadowRenderer();var a
,b
=n(this);b
&&(a
=o(b
)),this.impl
.polymerShadowRenderer_
=a
,a
&&a
.invalidate()},a
.eventParentsTable
=J
,a
.getRendererForHost
=m
,a
.getShadowTrees
=w
,a
.insertionParentTable
=K
,a
.renderAllPending
=k
,a
.visual
={insertBefore
:c
,remove
:d
}}(window
.ShadowDOMPolyfill
),function(a
){"use strict";function b(b
){if(window
[b
]){d(!a
.wrappers
[b
]);var i=function(a
){c
.call(this,a
)};i
.prototype=Object
.create(c
.prototype),e(i
.prototype,{get form(){return h(g(this).form
)}}),f(window
[b
],i
,document
.createElement(b
.slice(4,-7))),a
.wrappers
[b
]=i
}}var c
=a
.wrappers
.HTMLElement
,d
=a
.assert
,e
=a
.mixin
,f
=a
.registerWrapper
,g
=a
.unwrap
,h
=a
.wrap
,i
=["HTMLButtonElement","HTMLFieldSetElement","HTMLInputElement","HTMLKeygenElement","HTMLLabelElement","HTMLLegendElement","HTMLObjectElement","HTMLOutputElement","HTMLTextAreaElement"];i
.forEach(b
)}(window
.ShadowDOMPolyfill
),function(a
){"use strict";function b(a
){this.impl
=a
}{var c
=a
.registerWrapper
,d
=a
.unwrap
,e
=a
.unwrapIfNeeded
,f
=a
.wrap
;window
.Selection
}b
.prototype={get anchorNode(){return f(this.impl
.anchorNode
)},get focusNode(){return f(this.impl
.focusNode
)},addRange:function(a
){this.impl
.addRange(d(a
))},collapse:function(a
,b
){this.impl
.collapse(e(a
),b
)},containsNode:function(a
,b
){return this.impl
.containsNode(e(a
),b
)},extend:function(a
,b
){this.impl
.extend(e(a
),b
)},getRangeAt:function(a
){return f(this.impl
.getRangeAt(a
))},removeRange:function(a
){this.impl
.removeRange(d(a
))},selectAllChildren:function(a
){this.impl
.selectAllChildren(e(a
))},toString:function(){return this.impl
.toString()}},c(window
.Selection
,b
,window
.getSelection()),a
.wrappers
.Selection
=b
}(window
.ShadowDOMPolyfill
),function(a
){"use strict";function b(a
){k
.call(this,a
),this.treeScope_
=new p(this,null)}function c(a
){var c
=document
[a
];b
.prototype[a
]=function(){return A(c
.apply(this.impl
,arguments
))}}function d(a
,b
){D
.call(b
.impl
,z(a
)),e(a
,b
)}function e(a
,b
){a
.shadowRoot
&&b
.adoptNode(a
.shadowRoot
),a
instanceof o
&&f(a
,b
);for(var c
=a
.firstChild
;c
;c
=c
.nextSibling
)e(c
,b
)}function f(a
,b
){var c
=a
.olderShadowRoot
;c
&&b
.adoptNode(c
)}function g(a
){this.impl
=a
}function h(a
,b
){var c
=document
.implementation
[b
];a
.prototype[b
]=function(){return A(c
.apply(this.impl
,arguments
))}}function i(a
,b
){var c
=document
.implementation
[b
];a
.prototype[b
]=function(){return c
.apply(this.impl
,arguments
)}}var j
=a
.GetElementsByInterface
,k
=a
.wrappers
.Node
,l
=a
.ParentNodeInterface
,m
=a
.wrappers
.Selection
,n
=a
.SelectorsInterface
,o
=a
.wrappers
.ShadowRoot
,p
=a
.TreeScope
,q
=a
.cloneNode
,r
=a
.defineWrapGetter
,s
=a
.elementFromPoint
,t
=a
.forwardMethodsToWrapper
,u
=a
.matchesNames
,v
=a
.mixin
,w
=a
.registerWrapper
,x
=a
.renderAllPending
,y
=a
.rewrap
,z
=a
.unwrap
,A
=a
.wrap
,B
=a
.wrapEventTargetMethods
,C
=(a
.wrapNodeList
,new WeakMap
);b
.prototype=Object
.create(k
.prototype),r(b
,"documentElement"),r(b
,"body"),r(b
,"head"),["createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode","getElementById"].forEach(c
);var D
=document
.adoptNode
,E
=document
.getSelection
;if(v(b
.prototype,{adoptNode:function(a
){return a
.parentNode
&&a
.parentNode
.removeChild(a
),d(a
,this),a
},elementFromPoint:function(a
,b
){return s(this,this,a
,b
)},importNode:function(a
,b
){return q(a
,b
,this.impl
)},getSelection:function(){return x(),new m(E
.call(z(this)))}}),document
.registerElement
){var F
=document
.registerElement
;b
.prototype.registerElement=function(b
,c
){function d(a
){return a
?void(this.impl
=a
):c
.extends?document
.createElement(c
.extends,b
):document
.createElement(b
)}var e
=c
.prototype;if(a
.nativePrototypeTable
.get(e
))throw new Error("NotSupportedError");for(var f
,g
=Object
.getPrototypeOf(e
),h
=[];g
&&!(f
=a
.nativePrototypeTable
.get(g
));)h
.push(g
),g
=Object
.getPrototypeOf(g
);if(!f
)throw new Error("NotSupportedError");for(var i
=Object
.create(f
),j
=h
.length
-1;j
>=0;j
--)i
=Object
.create(i
);["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"].forEach(function(a
){var b
=e
[a
];b
&&(i
[a
]=function(){A(this)instanceof d
||y(this),b
.apply(A(this),arguments
)})});var k
={prototype:i
};c
.extends&&(k
.extends=c
.extends),d
.prototype=e
,d
.prototype.constructor=d
,a
.constructorTable
.set(i
,d
),a
.nativePrototypeTable
.set(e
,i
);F
.call(z(this),b
,k
);return d
},t([window
.HTMLDocument
||window
.Document
],["registerElement"])}t([window
.HTMLBodyElement
,window
.HTMLDocument
||window
.Document
,window
.HTMLHeadElement
,window
.HTMLHtmlElement
],["appendChild","compareDocumentPosition","contains","getElementsByClassName","getElementsByTagName","getElementsByTagNameNS","insertBefore","querySelector","querySelectorAll","removeChild","replaceChild"].concat(u
)),t([window
.HTMLDocument
||window
.Document
],["adoptNode","importNode","contains","createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode","elementFromPoint","getElementById","getSelection"]),v(b
.prototype,j
),v(b
.prototype,l
),v(b
.prototype,n
),v(b
.prototype,{get implementation(){var a
=C
.get(this);return a
?a
:(a
=new g(z(this).implementation
),C
.set(this,a
),a
)}}),w(window
.Document
,b
,document
.implementation
.createHTMLDocument("")),window
.HTMLDocument
&&w(window
.HTMLDocument
,b
),B([window
.HTMLBodyElement
,window
.HTMLDocument
||window
.Document
,window
.HTMLHeadElement
]),h(g
,"createDocumentType"),h(g
,"createDocument"),h(g
,"createHTMLDocument"),i(g
,"hasFeature"),w(window
.DOMImplementation
,g
),t([window
.DOMImplementation
],["createDocumentType","createDocument","createHTMLDocument","hasFeature"]),a
.adoptNodeNoRemove
=d
,a
.wrappers
.DOMImplementation
=g
,a
.wrappers
.Document
=b
}(window
.ShadowDOMPolyfill
),function(a
){"use strict";function b(a
){c
.call(this,a
)}var c
=a
.wrappers
.EventTarget
,d
=a
.wrappers
.Selection
,e
=a
.mixin
,f
=a
.registerWrapper
,g
=a
.renderAllPending
,h
=a
.unwrap
,i
=a
.unwrapIfNeeded
,j
=a
.wrap
,k
=window
.Window
,l
=window
.getComputedStyle
,m
=window
.getSelection
;b
.prototype=Object
.create(c
.prototype),k
.prototype.getComputedStyle=function(a
,b
){return j(this||window
).getComputedStyle(i(a
),b
)},k
.prototype.getSelection=function(){return j(this||window
).getSelection()},delete window
.getComputedStyle
,delete window
.getSelection
,["addEventListener","removeEventListener","dispatchEvent"].forEach(function(a
){k
.prototype[a
]=function(){var b
=j(this||window
);return b
[a
].apply(b
,arguments
)},delete window
[a
]}),e(b
.prototype,{getComputedStyle:function(a
,b
){return g(),l
.call(h(this),i(a
),b
)},getSelection:function(){return g(),new d(m
.call(h(this)))}}),f(k
,b
),a
.wrappers
.Window
=b
}(window
.ShadowDOMPolyfill
),function(a
){"use strict";var b
=a
.unwrap
,c
=window
.DataTransfer
||window
.Clipboard
,d
=c
.prototype.setDragImage
;c
.prototype.setDragImage=function(a
,c
,e
){d
.call(this,b(a
),c
,e
)}}(window
.ShadowDOMPolyfill
),function(a
){"use strict";function b(a
){var b
=c
[a
],d
=window
[b
];if(d
){var e
=document
.createElement(a
),f
=e
.constructor;window
[b
]=f
}}var c
=(a
.isWrapperFor
,{a
:"HTMLAnchorElement",area
:"HTMLAreaElement",audio
:"HTMLAudioElement",base
:"HTMLBaseElement",body
:"HTMLBodyElement",br
:"HTMLBRElement",button
:"HTMLButtonElement",canvas
:"HTMLCanvasElement",caption
:"HTMLTableCaptionElement",col
:"HTMLTableColElement",content
:"HTMLContentElement",data
:"HTMLDataElement",datalist
:"HTMLDataListElement",del
:"HTMLModElement",dir
:"HTMLDirectoryElement",div
:"HTMLDivElement",dl
:"HTMLDListElement",embed
:"HTMLEmbedElement",fieldset
:"HTMLFieldSetElement",font
:"HTMLFontElement",form
:"HTMLFormElement",frame
:"HTMLFrameElement",frameset
:"HTMLFrameSetElement",h1
:"HTMLHeadingElement",head
:"HTMLHeadElement",hr
:"HTMLHRElement",html
:"HTMLHtmlElement",iframe
:"HTMLIFrameElement",img
:"HTMLImageElement",input
:"HTMLInputElement",keygen
:"HTMLKeygenElement",label
:"HTMLLabelElement",legend
:"HTMLLegendElement",li
:"HTMLLIElement",link
:"HTMLLinkElement",map
:"HTMLMapElement",marquee
:"HTMLMarqueeElement",menu
:"HTMLMenuElement",menuitem
:"HTMLMenuItemElement",meta
:"HTMLMetaElement",meter
:"HTMLMeterElement",object
:"HTMLObjectElement",ol
:"HTMLOListElement",optgroup
:"HTMLOptGroupElement",option
:"HTMLOptionElement",output
:"HTMLOutputElement",p
:"HTMLParagraphElement",param
:"HTMLParamElement",pre
:"HTMLPreElement",progress
:"HTMLProgressElement",q
:"HTMLQuoteElement",script
:"HTMLScriptElement",select
:"HTMLSelectElement",shadow
:"HTMLShadowElement",source
:"HTMLSourceElement",span
:"HTMLSpanElement",style
:"HTMLStyleElement",table
:"HTMLTableElement",tbody
:"HTMLTableSectionElement",template
:"HTMLTemplateElement",textarea
:"HTMLTextAreaElement",thead
:"HTMLTableSectionElement",time
:"HTMLTimeElement",title
:"HTMLTitleElement",tr
:"HTMLTableRowElement",track
:"HTMLTrackElement",ul
:"HTMLUListElement",video
:"HTMLVideoElement"});Object
.keys(c
).forEach(b
),Object
.getOwnPropertyNames(a
.wrappers
).forEach(function(b
){window
[b
]=a
.wrappers
[b
]})}(window
.ShadowDOMPolyfill
),function(){window
.wrap
=ShadowDOMPolyfill
.wrapIfNeeded
,window
.unwrap
=ShadowDOMPolyfill
.unwrapIfNeeded
,Object
.defineProperty(Element
.prototype,"webkitShadowRoot",Object
.getOwnPropertyDescriptor(Element
.prototype,"shadowRoot"));var a
=Element
.prototype.createShadowRoot
;Element
.prototype.createShadowRoot=function(){var b
=a
.call(this);return CustomElements
.watchShadow(this),b
},Element
.prototype.webkitCreateShadowRoot
=Element
.prototype.createShadowRoot
}(),function(a
){function b(a
,b
){var c
="";return Array
.prototype.forEach
.call(a
,function(a
){c
+=a
.textContent
+"\n\n"}),b
||(c
=c
.replace(l
,"")),c
}function c(a
){var b
=document
.createElement("style");return b
.textContent
=a
,b
}function d(a
){var b
=c(a
);document
.head
.appendChild(b
);var d
=[];if(b
.sheet
)try{d
=b
.sheet
.cssRules
}catch(e
){}else console
.warn("sheet not found",b
);return b
.parentNode
.removeChild(b
),d
}function e(){v
.initialized
=!0,document
.body
.appendChild(v
);var a
=v
.contentDocument
,b
=a
.createElement("base");b
.href
=document
.baseURI
,a
.head
.appendChild(b
)}function f(a
){v
.initialized
||e(),document
.body
.appendChild(v
),a(v
.contentDocument
),document
.body
.removeChild(v
)}function g(a
,b
){if(b
){var e
;if(a
.match("@import")&&x
){var g
=c(a
);f(function(a
){a
.head
.appendChild(g
.impl
),e
=g
.sheet
.cssRules
,b(e
)})}else e
=d(a
),b(e
)}}function h(a
){a
&&j().appendChild(document
.createTextNode(a
))}function i(a
,b
){var d
=c(a
);d
.setAttribute(b
,""),d
.setAttribute(z
,""),document
.head
.appendChild(d
)}function j(){return w
||(w
=document
.createElement("style"),w
.setAttribute(z
,""),w
[z
]=!0),w
}var k
={strictStyling
:!1,registry
:{},shimStyling:function(a
,c
,d
){var e
=this.prepareRoot(a
,c
,d
),f
=this.isTypeExtension(d
),g
=this.makeScopeSelector(c
,f
),h
=b(e
,!0);h
=this.scopeCssText(h
,g
),a
&&(a
.shimmedStyle
=h
),this.addCssToDocument(h
,c
)},shimStyle:function(a
,b
){return this.shimCssText(a
.textContent
,b
)},shimCssText:function(a
,b
){return a
=this.insertDirectives(a
),this.scopeCssText(a
,b
)},makeScopeSelector:function(a
,b
){return a
?b
?"[is="+a
+"]":a
:""},isTypeExtension:function(a
){return a
&&a
.indexOf("-")<0},prepareRoot:function(a
,b
,c
){var d
=this.registerRoot(a
,b
,c
);return this.replaceTextInStyles(d
.rootStyles
,this.insertDirectives
),this.removeStyles(a
,d
.rootStyles
),this.strictStyling
&&this.applyScopeToContent(a
,b
),d
.scopeStyles
},removeStyles:function(a
,b
){for(var c
,d
=0,e
=b
.length
;e
>d
&&(c
=b
[d
]);d
++)c
.parentNode
.removeChild(c
)},registerRoot:function(a
,b
,c
){var d
=this.registry
[b
]={root
:a
,name
:b
,extendsName
:c
},e
=this.findStyles(a
);d
.rootStyles
=e
,d
.scopeStyles
=d
.rootStyles
;var f
=this.registry
[d
.extendsName
];return!f
||a
&&!a
.querySelector("shadow")||(d
.scopeStyles
=f
.scopeStyles
.concat(d
.scopeStyles
)),d
},findStyles:function(a
){if(!a
)return[];var b
=a
.querySelectorAll("style");return Array
.prototype.filter
.call(b
,function(a
){return!a
.hasAttribute(A
)})},applyScopeToContent:function(a
,b
){a
&&(Array
.prototype.forEach
.call(a
.querySelectorAll("*"),function(a
){a
.setAttribute(b
,"")}),Array
.prototype.forEach
.call(a
.querySelectorAll("template"),function(a
){this.applyScopeToContent(a
.content
,b
)},this))},insertDirectives:function(a
){return a
=this.insertPolyfillDirectivesInCssText(a
),this.insertPolyfillRulesInCssText(a
)},insertPolyfillDirectivesInCssText:function(a
){return a
=a
.replace(m
,function(a
,b
){return b
.slice(0,-2)+"{"}),a
.replace(n
,function(a
,b
){return b
+" {"})},insertPolyfillRulesInCssText:function(a
){return a
=a
.replace(o
,function(a
,b
){return b
.slice(0,-1)}),a
.replace(p
,function(a
,b
,c
,d
){var e
=a
.replace(b
,"").replace(c
,"");return d
+e
})},scopeCssText:function(a
,b
){var c
=this.extractUnscopedRulesFromCssText(a
);if(a
=this.insertPolyfillHostInCssText(a
),a
=this.convertColonHost(a
),a
=this.convertColonAncestor(a
),a
=this.convertCombinators(a
),b
){var a
,d
=this;g(a
,function(c
){a
=d
.scopeRules(c
,b
)})}return a
=a
+"\n"+c
,a
.trim()},extractUnscopedRulesFromCssText:function(a
){for(var b
,c
="";b
=q
.exec(a
);)c
+=b
[1].slice(0,-1)+"\n\n";for(;b
=r
.exec(a
);)c
+=b
[0].replace(b
[2],"").replace(b
[1],b
[3])+"\n\n";return c
},convertColonHost:function(a
){return this.convertColonRule(a
,cssColonHostRe
,this.colonHostPartReplacer
)},convertColonAncestor:function(a
){return this.convertColonRule(a
,cssColonAncestorRe
,this.colonAncestorPartReplacer
)},convertColonRule:function(a
,b
,c
){return a
.replace(b
,function(a
,b
,d
,e
){if(b
=polyfillHostNoCombinator
,d
){for(var f
,g
=d
.split(","),h
=[],i
=0,j
=g
.length
;j
>i
&&(f
=g
[i
]);i
++)f
=f
.trim(),h
.push(c(b
,f
,e
));return h
.join(",")}return b
+e
})},colonAncestorPartReplacer:function(a
,b
,c
){return b
.match(s
)?this.colonHostPartReplacer(a
,b
,c
):a
+b
+c
+", "+b
+" "+a
+c
},colonHostPartReplacer:function(a
,b
,c
){return a
+b
.replace(s
,"")+c
},convertCombinators:function(a
){for(var b
=0;b
<combinatorsRe
.length
;b
++)a
=a
.replace(combinatorsRe
[b
]," ");return a
},scopeRules:function(a
,b
){var c
="";return a
&&Array
.prototype.forEach
.call(a
,function(a
){a
.selectorText
&&a
.style
&&a
.style
.cssText
?(c
+=this.scopeSelector(a
.selectorText
,b
,this.strictStyling
)+" {\n ",c
+=this.propertiesFromRule(a
)+"\n}\n\n"):a
.type
===CSSRule
.MEDIA_RULE
?(c
+="@media "+a
.media
.mediaText
+" {\n",c
+=this.scopeRules(a
.cssRules
,b
),c
+="\n}\n\n"):a
.cssText
&&(c
+=a
.cssText
+"\n\n")},this),c
},scopeSelector:function(a
,b
,c
){var d
=[],e
=a
.split(",");return e
.forEach(function(a
){a
=a
.trim(),this.selectorNeedsScoping(a
,b
)&&(a
=c
&&!a
.match(polyfillHostNoCombinator
)?this.applyStrictSelectorScope(a
,b
):this.applySimpleSelectorScope(a
,b
)),d
.push(a
)},this),d
.join(", ")},selectorNeedsScoping:function(a
,b
){var c
=this.makeScopeMatcher(b
);return!a
.match(c
)},makeScopeMatcher:function(a
){return a
=a
.replace(/\[/g,"\\[").replace(/\[/g,"\\]"),new RegExp("^("+a
+")"+selectorReSuffix
,"m")},applySimpleSelectorScope:function(a
,b
){return a
.match(polyfillHostRe
)?(a
=a
.replace(polyfillHostNoCombinator
,b
),a
.replace(polyfillHostRe
,b
+" ")):b
+" "+a
},applyStrictSelectorScope:function(a
,b
){b
=b
.replace(/\[is=([^\]]*)\]/g,"$1");var c
=[" ",">","+","~"],d
=a
,e
="["+b
+"]";return c
.forEach(function(a
){var b
=d
.split(a
);d
=b
.map(function(a
){var b
=a
.trim().replace(polyfillHostRe
,"");return b
&&c
.indexOf(b
)<0&&b
.indexOf(e
)<0&&(a
=b
.replace(/([^:]*)(:*)(.*)/,"$1"+e
+"$2$3")),a
}).join(a
)}),d
},insertPolyfillHostInCssText:function(a
){return a
.replace(hostRe
,s
).replace(colonHostRe
,s
).replace(colonAncestorRe
,t
)},propertiesFromRule:function(a
){return a
.style
.content
&&!a
.style
.content
.match(/['"]+/)?a
.style
.cssText
.replace(/content:[^;]*;/g,"content: '"+a
.style
.content
+"';"):a
.style
.cssText
},replaceTextInStyles:function(a
,b
){a
&&b
&&(a
instanceof Array
||(a
=[a
]),Array
.prototype.forEach
.call(a
,function(a
){a
.textContent
=b
.call(this,a
.textContent
)},this))},addCssToDocument:function(a
,b
){a
.match("@import")?i(a
,b
):h(a
)}},l
=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,m=/\/\*\s*@polyfill ([^*]*\*+([^/*][^*]*\*+)*\/)([^{]*?){/gim,n=/polyfill-next-selector[^}]*content\:[\s]*'([^']*)'[^}]*}([^{]*?){/gim,o=/\/\*\s@polyfill-rule([^*]*\*+([^/*][^*]*\*+)*)\//gim,p=/(polyfill-rule)[^}]*(content\:[\s]*'([^']*)'[^;]*;)[^}]*}/gim,q=/\/\*\s@polyfill-unscoped-rule([^*]*\*+([^/*][^*]*\*+)*)\//gim,r=/(polyfill-unscoped-rule)[^}]*(content\:[\s]*'([^']*)'[^;]*;)[^}]*}/gim,s="-shadowcsshost",t="-shadowcssancestor",u=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)";cssColonHostRe=new RegExp("("+s+u,"gim"),cssColonAncestorRe=new RegExp("("+t+u,"gim"),selectorReSuffix="([>\\s~+[.,{:][\\s\\S]*)?$",hostRe=/@host/gim,colonHostRe=/\:host/gim,colonAncestorRe=/\:ancestor/gim,polyfillHostNoCombinator=s+"-no-combinator",polyfillHostRe=new RegExp(s,"gim"),polyfillAncestorRe=new RegExp(t,"gim"),combinatorsRe=[/\^\^/g,/\^/g,/\/shadow\//g,/\/shadow-deep\//g];var v=document.createElement("iframe");v.style.display="none";var w,x=navigator.userAgent.match("Chrome"),y="shim-shadowdom",z="shim-shadowdom-css",A="no-shim";if(window.ShadowDOMPolyfill){h("style { display: none !important; }\n");var B=wrap(document),C=B.querySelector("head");C.insertBefore(j(),C.childNodes[0]),document.addEventListener("DOMContentLoaded",function(){var b=a.urlResolver;if(window.HTMLImports&&!HTMLImports.useNative){var c="link[rel=stylesheet]["+y+"]",d="style["+y+"]";HTMLImports.importer.documentPreloadSelectors+=","+c,HTMLImports.importer.importsPreloadSelectors+=","+c,HTMLImports.parser.documentSelectors=[HTMLImports.parser.documentSelectors,c,d].join(",");var e=HTMLImports.parser.parseGeneric;HTMLImports.parser.parseGeneric=function(a){if(!a[z]){var c=a.__importElement||a;if(!c.hasAttribute(y))return void e.call(this,a);a.__resource?(c=a.ownerDocument.createElement("style"),c.textContent=b.resolveCssText(a.__resource,a.href)):b.resolveStyle(c),c.textContent=k.shimStyle(c),c.removeAttribute(y,""),c.setAttribute(z,""),c[z]=!0,c.parentNode!==C&&(a.parentNode===C?C.replaceChild(c,a):C.appendChild(c)),c.__importParsed=!0,this.markParsingComplete(a)}};var f=HTMLImports.parser.hasResource;HTMLImports.parser.hasResource=function(a){return"link"===a.localName&&"stylesheet"===a.rel&&a.hasAttribute(y)?a.__resource:f.call(this,a)}}})}a.ShadowCSS=k}(window.Platform)):!function(){window.templateContent=window.templateContent||function(a){return a.content},window.wrap=window.unwrap=function(a){return a},addEventListener("DOMContentLoaded",function(){if(CustomElements.useNative===!1){var a=Element.prototype.createShadowRoot;Element.prototype.createShadowRoot=function(){var b=a.call(this);return CustomElements.watchShadow(this),b}}}),window.templateContent=function(a){if(window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(a),!a.content&&!a._content){for(var b=document.createDocumentFragment();a.firstChild;)b.appendChild(a.firstChild);a._content=b}return a.content||a._content}}(),function(a){"use strict";function b(a){return void 0!==m[a]}function c(){h.call(this),this._isInvalid=!0}function d(a){return""==a&&c.call(this),a.toLowerCase()}function e(a){var b=a.charCodeAt(0);return b>32&&127>b&&-1==[34,35,60,62,63,96].indexOf(b)?a:encodeURIComponent(a)}function f(a){var b=a.charCodeAt(0);return b>32&&127>b&&-1==[34,35,60,62,96].indexOf(b)?a:encodeURIComponent(a)}function g(a,g,h){function i(a){t.push(a)}var j=g||"scheme start",k=0,l="",r=!1,s=!1,t=[];a:for(;(a[k-1]!=o||0==k)&&!this._isInvalid;){var u=a[k];switch(j){case"scheme start":if(!u||!p.test(u)){if(g){i("Invalid scheme.");break a}l="",j="no scheme";continue}l+=u.toLowerCase(),j="scheme";break;case"scheme":if(u&&q.test(u))l+=u.toLowerCase();else{if(":"!=u){if(g){if(o==u)break a;i("Code point not allowed in scheme: "+u);break a}l="",k=0,j="no scheme";continue}if(this._scheme=l,l="",g)break a;b(this._scheme)&&(this._isRelative=!0),j="file"==this._scheme?"relative":this._isRelative&&h&&h._scheme==this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"==u?(query="?",j="query"):"#"==u?(this._fragment="#",j="fragment"):o!=u&&" "!=u&&"\n"!=u&&"\r"!=u&&(this._schemeData+=e(u));break;case"no scheme":if(h&&b(h._scheme)){j="relative";continue}i("Missing scheme."),c.call(this);break;case"relative or authority":if("/"!=u||"/"!=a[k+1]){i("Expected /, got: "+u),j="relative";continue}j="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!=this._scheme&&(this._scheme=h._scheme),o==u){this._host=h._host,this._port=h._port,this._path=h._path.slice(),this._query=h._query;break a}if("/"==u||"\\"==u)"\\"==u&&i("\\ is an invalid code point."),j="relative slash";else if("?"==u)this._host=h._host,this._port=h._port,this._path=h._path.slice(),this._query="?",j="query";else{if("#"!=u){var v=a[k+1],w=a[k+2];("file"!=this._scheme||!p.test(u)||":"!=v&&"|"!=v||o!=w&&"/"!=w&&"\\"!=w&&"?"!=w&&"#"!=w)&&(this._host=h._host,this._port=h._port,this._path=h._path.slice(),this._path.pop()),j="relative path";continue}this._host=h._host,this._port=h._port,this._path=h._path.slice(),this._query=h._query,this._fragment="#",j="fragment"}break;case"relative slash":if("/"!=u&&"\\"!=u){"file"!=this._scheme&&(this._host=h._host,this._port=h._port),j="relative path";continue}"\\"==u&&i("\\ is an invalid code point."),j="file"==this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=u){i("Expected '/', got: "+u),j="authority ignore slashes";continue}j="authority second slash";break;case"authority second slash":if(j="authority ignore slashes","/"!=u){i("Expected '/', got: "+u);continue}break;case"authority ignore slashes":if("/"!=u&&"\\"!=u){j="authority";continue}i("Expected authority, got: "+u);break;case"authority":if("@"==u){r&&(i("@ already seen."),l+="%40"),r=!0;for(var x=0;x<l.length;x++){var y=l[x];if(" "!=y&&"\n"!=y&&"\r"!=y)if(":"!=y||null!==this._password){var z=e(y);null!==this._password?this._password+=z:this._username+=z}else this._password="";else i("Invalid whitespace in authority.")}l=""}else{if(o==u||"/"==u||"\\"==u||"?"==u||"#"==u){k-=l.length,l="",j="host";continue}l+=u}break;case"file host":if(o==u||"/"==u||"\\"==u||"?"==u||"#"==u){2!=l.length||!p.test(l[0])||":"!=l[1]&&"|"!=l[1]?0==l.length?j="relative path start":(this._host=d.call(this,l),l="",j="relative path start"):j="relative path";continue}" "==u||"\n"==u||"\r"==u?i("Invalid whitespace in file host."):l+=u;break;case"host":case"hostname":if(":"!=u||s){if(o==u||"/"==u||"\\"==u||"?"==u||"#"==u){if(this._host=d.call(this,l),l="",j="relative path start",g)break a;continue}" "!=u&&"\n"!=u&&"\r"!=u?("["==u?s=!0:"]"==u&&(s=!1),l+=u):i("Invalid code point in host/hostname: "+u)}else if(this._host=d.call(this,l),l="",j="port","hostname"==g)break a;break;case"port":if(/[0-9]/.test(u))l+=u;else{if(o==u||"/"==u||"\\"==u||"?"==u||"#"==u||g){if(""!=l){var A=parseInt(l,10);A!=m[this._scheme]&&(this._port=A+""),l=""}if(g)break a;j="relative path start";continue}" "==u||"\n"==u||"\r"==u?i("Invalid code point in port: "+u):c.call(this)}break;case"relative path start":if("\\"==u&&i("'\\' not allowed in path."),j="relative path","/"!=u&&"\\"!=u)continue;break;case"relative path":if(o!=u&&"/"!=u&&"\\"!=u&&(g||"?"!=u&&"#"!=u))" "!=u&&"\n"!=u&&"\r"!=u&&(l+=e(u));else{"\\"==u&&i("\\ not allowed in relative path.");var B;(B=n[l.toLowerCase()])&&(l=B),".."==l?(this._path.pop(),"/"!=u&&"\\"!=u&&this._path.push("")):"."==l&&"/"!=u&&"\\"!=u?this._path.push(""):"."!=l&&("file"==this._scheme&&0==this._path.length&&2==l.length&&p.test(l[0])&&"|"==l[1]&&(l=l[0]+":"),this._path.push(l)),l="","?"==u?(this._query="?",j="query"):"#"==u&&(this._fragment="#",j="fragment")}break;case"query":g||"#"!=u?o!=u&&" "!=u&&"\n"!=u&&"\r"!=u&&(this._query+=f(u)):(this._fragment="#",j="fragment");break;case"fragment":o!=u&&" "!=u&&"\n"!=u&&"\r"!=u&&(this._fragment+=u)}k++}}function h(){this._scheme="",this._schemeData="",this._username="",this._password=null,this._host="",this._port="",this._path=[],this._query="",this._fragment="",this._isInvalid=!1,this._isRelative=!1}function i(a,b){void 0===b||b instanceof i||(b=new i(String(b))),this._url=a,h.call(this);var c=a.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g,"");g.call(this,c,null,b)}var j=!1;if(!a.forceJURL)try{var k=new URL("b","http://a");j="http://a/b"===k.href}catch(l){}if(!j){var m=Object.create(null);m.ftp=21,m.file=0,m.gopher=70,m.http=80,m.https=443,m.ws=80,m.wss=443;var n=Object.create(null);n["%2e"]=".",n[".%2e"]="..",n["%2e."]="..",n["%2e%2e"]="..";var o=void 0,p=/[a-zA-Z]/,q=/[a-zA-Z0-9\+\-\.]/;i.prototype={get href(){if(this._isInvalid)return this._url;var a="";return(""!=this._username||null!=this._password)&&(a=this._username+(null!=this._password?":"+this._password:"")+"@"),this.protocol+(this._isRelative?"//"+a+this.host:"")+this.pathname+this._query+this._fragment},set href(a){h.call(this),g.call(this,a)},get protocol(){return this._scheme+":"},set protocol(a){this._isInvalid||g.call(this,a+":","scheme start")},get host(){return this._isInvalid?"":this._port?this._host+":"+this._port:this._host},set host(a){!this._isInvalid&&this._isRelative&&g.call(this,a,"host")},get hostname(){return this._host},set hostname(a){!this._isInvalid&&this._isRelative&&g.call(this,a,"hostname")},get port(){return this._port},set port(a){!this._isInvalid&&this._isRelative&&g.call(this,a,"port")},get pathname(){return this._isInvalid?"":this._isRelative?"/"+this._path.join("/"):this._schemeData},set pathname(a){!this._isInvalid&&this._isRelative&&(this._path=[],g.call(this,a,"relative path start"))},get search(){return this._isInvalid||!this._query||"?"==this._query?"":this._query},set search(a){!this._isInvalid&&this._isRelative&&(this._query="?","?"==a[0]&&(a=a.slice(1)),g.call(this,a,"query"))},get hash(){return this._isInvalid||!this._fragment||"#"==this._fragment?"":this._fragment
44 },set hash(a
){this._isInvalid
||(this._fragment
="#","#"==a
[0]&&(a
=a
.slice(1)),g
.call(this,a
,"fragment"))}},a
.URL
=i
}}(window
),function(a
){function b(a
){for(var b
=a
||{},d
=1;d
<arguments
.length
;d
++){var e
=arguments
[d
];try{for(var f
in e
)c(f
,e
,b
)}catch(g
){}}return b
}function c(a
,b
,c
){var e
=d(b
,a
);Object
.defineProperty(c
,a
,e
)}function d(a
,b
){if(a
){var c
=Object
.getOwnPropertyDescriptor(a
,b
);return c
||d(Object
.getPrototypeOf(a
),b
)}}Function
.prototype.bind
||(Function
.prototype.bind=function(a
){var b
=this,c
=Array
.prototype.slice
.call(arguments
,1);return function(){var d
=c
.slice();return d
.push
.apply(d
,arguments
),b
.apply(a
,d
)}}),a
.mixin
=b
}(window
.Platform
),function(a
){"use strict";function b(a
,b
,c
){var d
="string"==typeof a
?document
.createElement(a
):a
.cloneNode(!0);if(d
.innerHTML
=b
,c
)for(var e
in c
)d
.setAttribute(e
,c
[e
]);return d
}var c
=DOMTokenList
.prototype.add
,d
=DOMTokenList
.prototype.remove
;DOMTokenList
.prototype.add=function(){for(var a
=0;a
<arguments
.length
;a
++)c
.call(this,arguments
[a
])},DOMTokenList
.prototype.remove=function(){for(var a
=0;a
<arguments
.length
;a
++)d
.call(this,arguments
[a
])},DOMTokenList
.prototype.toggle=function(a
,b
){1==arguments
.length
&&(b
=!this.contains(a
)),b
?this.add(a
):this.remove(a
)},DOMTokenList
.prototype.switch=function(a
,b
){a
&&this.remove(a
),b
&&this.add(b
)};var e=function(){return Array
.prototype.slice
.call(this)},f
=window
.NamedNodeMap
||window
.MozNamedAttrMap
||{};if(NodeList
.prototype.array
=e
,f
.prototype.array
=e
,HTMLCollection
.prototype.array
=e
,!window
.performance
){var g
=Date
.now();window
.performance
={now:function(){return Date
.now()-g
}}}window
.requestAnimationFrame
||(window
.requestAnimationFrame=function(){var a
=window
.webkitRequestAnimationFrame
||window
.mozRequestAnimationFrame
;return a
?function(b
){return a(function(){b(performance
.now())})}:function(a
){return window
.setTimeout(a
,1e3
/60)}}()),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(){return window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(a){clearTimeout(a)}}());var h=[],i=function(){h.push(arguments)};window.Polymer=i,a.deliverDeclarations=function(){return a.deliverDeclarations=function(){throw"Possible attempt to load Polymer twice"},h},window.addEventListener("DOMContentLoaded",function(){window.Polymer===i&&(window.Polymer=function(){console.error('You tried to use polymer without loading it first. To load polymer, <link rel="import" href="components/polymer/polymer.html">')})}),a.createDOM=b}(window.Platform),window.templateContent=window.templateContent||function(a){return a.content},function(a){a=a||(window.Inspector={});var b;window.sinspect=function(a,d){b||(b=window.open("","ShadowDOM Inspector",null,!0),b.document.write(c),b.api={shadowize:shadowize}),f(a||wrap(document.body),d)};var c=["<!DOCTYPE html>","<html>"," <head>"," <title>ShadowDOM Inspector</title
>"," <style
>"," body
{"," }"," pre
{",' font: 9pt "Courier New
", monospace;'," line
-height
: 1.5em
;"," }"," tag
{"," color
: purple
;"," }"," ul
{"," margin
: 0;"," padding
: 0;"," list
-style
: none
;"," }"," li
{"," display
: inline
-block
;"," background
-color
: #f1f1f1
;"," padding
: 4px
6px
;"," border
-radius
: 4px
;"," margin
-right
: 4px
;"," }"," </style>"," </head
>"," <body
>",' <ul id="crumbs
">'," </ul>",' <div id="tree"></div>'," </body>","</html>"].join("\n"),d=[],e=function(){var a=b.document,c=a.querySelector("#crumbs");c.textContent="";for(var e,g=0;e=d[g];g++){var h=a.createElement("a");h.href="#",h.textContent=e.localName,h.idx=g,h.onclick=function(a){for(var b;d.length>this.idx;)b=d.pop();f(b.shadow||b,b),a.preventDefault()},c.appendChild(a.createElement("li")).appendChild(h)}},f=function(a,c){var f=b.document;k=[];var g=c||a;d.push(g),e(),f.body.querySelector("#tree").innerHTML="<pre>"+j(a,a.childNodes)+"</pre>"},g=Array.prototype.forEach.call.bind(Array.prototype.forEach),h={STYLE:1,SCRIPT:1,"#comment":1,TEMPLATE:1},i=function(a){return h[a.nodeName]},j=function(a,b,c){if(i(a))return"";var d=c||"";if(a.localName||11==a.nodeType){var e=a.localName||"shadow-root",f=d+l(a);"content"==e&&(b=a.getDistributedNodes()),f+="<br/>";var h=d+" ";g(b,function(a){f+=j(a,a.childNodes,h)}),f+=d,{br:1}[e]||(f+="<tag></"+e+"></tag>",f+="<br/>")}else{var k=a.textContent.trim();f=k?d+'"'+k+'"<br
/>':""}return f},k=[],l=function(a){var b="<tag><",c=a.localName||"shadow-root";return a.webkitShadowRoot||a.shadowRoot?(b+=' <button idx
="'+k.length+'" onclick
="api.shadowize.call(this)">'+c+"</button>",k.push(a)):b+=c||"shadow-root",a.attributes&&g(a.attributes,function(a){b+=" "+a.name+(a.value?'="'+a.value+'"':"")}),b+="></tag>"};shadowize=function(){var a=Number(this.attributes.idx.value),b=k[a];b?f(b.webkitShadowRoot||b.shadowRoot,b):(console.log("bad shadowize node"),console.dir(this))},a.output=j}(window.Inspector),function(){var a=document.createElement("style");a.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; } \n";var b=document.querySelector("head");b.insertBefore(a,b.firstChild)}(Platform),function(a){function b(a,b){return b=b||[],b.map||(b=[b]),a.apply(this,b.map(d))}function c(a,c,d){var e;switch(arguments.length){case 0:return;case 1:e=null;break;case 2:e=c.apply(this);break;default:e=b(d,c)}f[a]=e}function d(a){return f[a]}function e(a,c){HTMLImports.whenImportsReady(function(){b(c,a)})}var f={};a.marshal=d,a.module=c,a.using=e}(window),function(a){function b(a){f.textContent=d++,e.push(a)}function c(){for(;e.length;)e.shift()()}var d=0,e=[],f=document.createTextNode("");new(window.MutationObserver||JsMutationObserver)(c).observe(f,{characterData:!0}),a.endOfMicrotask=b}(Platform),function(a){function b(a,b,d){return a.replace(d,function(a,d,e,f){var g=e.replace(/["']/g
,"");return g
=c(b
,g
),d
+"'"+g
+"'"+f
})}function c(a
,b
){var c
=new URL(b
,a
);return d(c
.href
)}function d(a
){var b
=document
.baseURI
,c
=new URL(a
,b
);return c
.host
===b
.host
&&c
.port
===b
.port
&&c
.protocol
===b
.protocol
?e(b
.pathname
,c
.pathname
):a
}function e(a
,b
){for(var c
=a
.split("/"),d
=b
.split("/");c
.length
&&c
[0]===d
[0];)c
.shift(),d
.shift();for(var e
=0,f
=c
.length
-1;f
>e
;e
++)d
.unshift("..");return d
.join("/")}var f
={resolveDom:function(a
,b
){b
=b
||a
.ownerDocument
.baseURI
,this.resolveAttributes(a
,b
),this.resolveStyles(a
,b
);var c
=a
.querySelectorAll("template");if(c
)for(var d
,e
=0,f
=c
.length
;f
>e
&&(d
=c
[e
]);e
++)d
.content
&&this.resolveDom(d
.content
,b
)},resolveTemplate:function(a
){this.resolveDom(a
.content
,a
.ownerDocument
.baseURI
)},resolveStyles:function(a
,b
){var c
=a
.querySelectorAll("style");if(c
)for(var d
,e
=0,f
=c
.length
;f
>e
&&(d
=c
[e
]);e
++)this.resolveStyle(d
,b
)},resolveStyle:function(a
,b
){b
=b
||a
.ownerDocument
.baseURI
,a
.textContent
=this.resolveCssText(a
.textContent
,b
)},resolveCssText:function(a
,c
){return a
=b(a
,c
,g
),b(a
,c
,h
)},resolveAttributes:function(a
,b
){a
.hasAttributes
&&a
.hasAttributes()&&this.resolveElementAttributes(a
,b
);var c
=a
&&a
.querySelectorAll(j
);if(c
)for(var d
,e
=0,f
=c
.length
;f
>e
&&(d
=c
[e
]);e
++)this.resolveElementAttributes(d
,b
)},resolveElementAttributes:function(a
,b
){b
=b
||a
.ownerDocument
.baseURI
,i
.forEach(function(d
){var e
=a
.attributes
[d
];if(e
&&e
.value
&&e
.value
.search(k
)<0){var f
=c(b
,e
.value
);e
.value
=f
}})}},g
=/(url
\()([^)]*)(\))/g,h=/(@import[\s
]+(?!url
\())([^;]*)(;)/g,i=["href","src","action"],j="["+i.join("],[")+"]",k="{{.*}}";a.urlResolver=f}(Platform),function(a){function b(a){u.push(a),t||(t=!0,q(d))}function c(a){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(a)||a}function d(){t=!1;var a=u;u=[],a.sort(function(a,b){return a.uid_-b.uid_});var b=!1;a.forEach(function(a){var c=a.takeRecords();e(a),c.length&&(a.callback_(c,a),b=!0)}),b&&d()}function e(a){a.nodes_.forEach(function(b){var c=p.get(b);c&&c.forEach(function(b){b.observer===a&&b.removeTransientObservers()})})}function f(a,b){for(var c=a;c;c=c.parentNode){var d=p.get(c);if(d)for(var e=0;e<d.length;e++){var f=d[e],g=f.options;if(c===a||g.subtree){var h=b(g);h&&f.enqueue(h)}}}}function g(a){this.callback_=a,this.nodes_=[],this.records_=[],this.uid_=++v}function h(a,b){this.type=a,this.target=b,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function i(a){var b=new h(a.type,a.target);return b.addedNodes=a.addedNodes.slice(),b.removedNodes=a.removedNodes.slice(),b.previousSibling=a.previousSibling,b.nextSibling=a.nextSibling,b.attributeName=a.attributeName,b.attributeNamespace=a.attributeNamespace,b.oldValue=a.oldValue,b}function j(a,b){return w=new h(a,b)}function k(a){return x?x:(x=i(w),x.oldValue=a,x)}function l(){w=x=void 0}function m(a){return a===x||a===w}function n(a,b){return a===b?a:x&&m(a)?x:null}function o(a,b,c){this.observer=a,this.target=b,this.options=c,this.transientObservedNodes=[]}var p=new WeakMap,q=window.msSetImmediate;if(!q){var r=[],s=String(Math.random());window.addEventListener("message",function(a){if(a.data===s){var b=r;r=[],b.forEach(function(a){a()})}}),q=function(a){r.push(a),window.postMessage(s,"*")}}var t=!1,u=[],v=0;g.prototype={observe:function(a,b){if(a=c(a),!b.childList&&!b.attributes&&!b.characterData||b.attributeOldValue&&!b.attributes||b.attributeFilter&&b.attributeFilter.length&&!b.attributes||b.characterDataOldValue&&!b.characterData)throw new SyntaxError;var d=p.get(a);d||p.set(a,d=[]);for(var e,f=0;f<d.length;f++)if(d[f].observer===this){e=d[f],e.removeListeners(),e.options=b;break}e||(e=new o(this,a,b),d.push(e),this.nodes_.push(a)),e.addListeners()},disconnect:function(){this.nodes_.forEach(function(a){for(var b=p.get(a),c=0;c<b.length;c++){var d=b[c];if(d.observer===this){d.removeListeners(),b.splice(c,1);break}}},this),this.records_=[]},takeRecords:function(){var a=this.records_;return this.records_=[],a}};var w,x;o.prototype={enqueue:function(a){var c=this.observer.records_,d=c.length;if(c.length>0){var e=c[d-1],f=n(e,a);if(f)return void(c[d-1]=f)}else b(this.observer);c[d]=a},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(a){var b=this.options;b.attributes&&a.addEventListener("DOMAttrModified",this,!0),b.characterData&&a.addEventListener("DOMCharacterDataModified",this,!0),b.childList&&a.addEventListener("DOMNodeInserted",this,!0),(b.childList||b.subtree)&&a.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(a){var b=this.options;b.attributes&&a.removeEventListener("DOMAttrModified",this,!0),b.characterData&&a.removeEventListener("DOMCharacterDataModified",this,!0),b.childList&&a.removeEventListener("DOMNodeInserted",this,!0),(b.childList||b.subtree)&&a.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(a){if(a!==this.target){this.addListeners_(a),this.transientObservedNodes.push(a);var b=p.get(a);b||p.set(a,b=[]),b.push(this)}},removeTransientObservers:function(){var a=this.transientObservedNodes;this.transientObservedNodes=[],a.forEach(function(a){this.removeListeners_(a);for(var b=p.get(a),c=0;c<b.length;c++)if(b[c]===this){b.splice(c,1);break}},this)},handleEvent:function(a){switch(a.stopImmediatePropagation(),a.type){case"DOMAttrModified":var b=a.attrName,c=a.relatedNode.namespaceURI,d=a.target,e=new j("attributes",d);e.attributeName=b,e.attributeNamespace=c;var g=a.attrChange===MutationEvent.ADDITION?null:a.prevValue;f(d,function(a){return!a.attributes||a.attributeFilter&&a.attributeFilter.length&&-1===a.attributeFilter.indexOf(b)&&-1===a.attributeFilter.indexOf(c)?void 0:a.attributeOldValue?k(g):e});break;case"DOMCharacterDataModified":var d=a.target,e=j("characterData",d),g=a.prevValue;f(d,function(a){return a.characterData?a.characterDataOldValue?k(g):e:void 0});break;case"DOMNodeRemoved":this.addTransientObserver(a.target);case"DOMNodeInserted":var h,i,d=a.relatedNode,m=a.target;"DOMNodeInserted"===a.type?(h=[m],i=[]):(h=[],i=[m]);var n=m.previousSibling,o=m.nextSibling,e=j("childList",d);e.addedNodes=h,e.removedNodes=i,e.previousSibling=n,e.nextSibling=o,f(d,function(a){return a.childList?e:void 0})}l()}},a.JsMutationObserver=g,a.MutationObserver||(a.MutationObserver=g)}(this),window.HTMLImports=window.HTMLImports||{flags:{}},function(a){var b=(a.path,a.xhr),c=a.flags,d=function(a,b){this.cache={},this.onload=a,this.oncomplete=b,this.inflight=0,this.pending={}};d.prototype={addNodes:function(a){this.inflight+=a.length;for(var b,c=0,d=a.length;d>c&&(b=a[c]);c++)this.require(b);this.checkDone()},addNode:function(a){this.inflight++,this.require(a),this.checkDone()},require:function(a){var b=a.src||a.href;a.__nodeUrl=b,this.dedupe(b,a)||this.fetch(b,a)},dedupe:function(a,b){if(this.pending[a])return this.pending[a].push(b),!0;return this.cache[a]?(this.onload(a,b,this.cache[a]),this.tail(),!0):(this.pending[a]=[b],!1)},fetch:function(a,d){if(c.load&&console.log("fetch",a,d),a.match(/^data
:/)){var e=a.split(","),f=e[0],g=e[1];g=f.indexOf(";base64")>-1?atob(g):decodeURIComponent(g),setTimeout(function(){this.receive(a,d,null,g)}.bind(this),0)}else{var h=function(b,c){this.receive(a,d,b,c)}.bind(this);b.load(a,h)}},receive:function(a,b,c,d){this.cache[a]=d;for(var e,f=this.pending[a],g=0,h=f.length;h>g&&(e=f[g]);g++)this.onload(a,e,d),this.tail();this.pending[a]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},b=b||{async:!0,ok:function(a){return a.status>=200&&a.status<300||304===a.status||0===a.status},load:function(c,d,e){var f=new XMLHttpRequest;return(a.flags.debug||a.flags.bust)&&(c+="?"+Math.random()),f.open("GET",c,b.async),f.addEventListener("readystatechange",function(){4===f.readyState&&d.call(e,!b.ok(f)&&f,f.response||f.responseText,c)}),f.send(),f},loadDocument:function(a,b,c){this.load(a,b,c).responseType="document"}},a.xhr=b,a.Loader=d}(window.HTMLImports),function(a){function b(a){return"link"===a.localName&&a.rel===g}function c(a){var b,c=d(a);try{b=btoa(c)}catch(e){b=btoa(unescape(encodeURIComponent(c))),console.warn("Script contained non-latin characters that were forced to latin. Some characters may be wrong.",a)}return"data:text/javascript
;base64
,"+b}function d(a){return a.textContent+e(a)}function e(a){var b=a.__nodeUrl;if(!b){b=a.ownerDocument.baseURI;var c="["+Math.floor(1e3*(Math.random()+1))+"]",d=a.textContent.match(/Polymer\(['"]([^'"]*)/);c=d&&d[1]||c,b+="/"+c+".js"}return"\n//# sourceURL="+b+"\n"}function f(a){var b=a.ownerDocument.createElement("style");return b.textContent=a.textContent,n.resolveUrlsInStyle(b),b}var g="import",h=a.flags,i=/Trident/.test(navigator.userAgent),j=window.ShadowDOMPolyfill?window.ShadowDOMPolyfill.wrapIfNeeded(document):document,k={documentSelectors:"link[rel="+g+"]",importsSelectors:["link[rel="+g+"]","link[rel=stylesheet]","style","script:not([type])",'script
[type
="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},parseNext:function(){var a=this.nextToParse();a&&this.parse(a)},parse:function(a){if(this.isParsed(a))return void(h.parse&&console.log("[%s] is already parsed",a.localName));var b=this[this.map[a.localName]];b&&(this.markParsing(a),b.call(this,a))},markParsing:function(a){h.parse&&console.log("parsing",a),this.parsingElement=a},markParsingComplete:function(a){a.__importParsed=!0,a.__importElement&&(a.__importElement.__importParsed=!0),this.parsingElement=null,h.parse&&console.log("completed",a),this.parseNext()},parseImport:function(a){if(a.import.__importParsed=!0,HTMLImports.__importsParsingHook&&HTMLImports.__importsParsingHook(a),a.dispatchEvent(a.__resource?new CustomEvent("load",{bubbles:!1}):new CustomEvent("error",{bubbles:!1})),a.__pending)for(var b;a.__pending.length;)b=a.__pending.shift(),b&&b({target:a});this.markParsingComplete(a)},parseLink:function(a){b(a)?this.parseImport(a):(a.href=a.href,this.parseGeneric(a))},parseStyle:function(a){var b=a;a=f(a),a.__importElement=b,this.parseGeneric(a)},parseGeneric:function(a){this.trackElement(a),document.head.appendChild(a)},trackElement:function(a,b){var c=this,d=function(d){b&&b(d),c.markParsingComplete(a)};if(a.addEventListener("load",d),a.addEventListener("error",d),i&&"style"===a.localName){var e=!1;if(-1==a.textContent.indexOf("@import"))e=!0;else if(a.sheet){e=!0;for(var f,g=a.sheet.cssRules,h=g?g.length:0,j=0;h>j&&(f=g[j]);j++)f.type===CSSRule.IMPORT_RULE&&(e=e&&Boolean(f.styleSheet))}e&&a.dispatchEvent(new CustomEvent("load",{bubbles:!1}))}},parseScript:function(b){var d=document.createElement("script");d.__importElement=b,d.src=b.src?b.src:c(b),a.currentScript=b,this.trackElement(d,function(){d.parentNode.removeChild(d),a.currentScript=null}),document.head.appendChild(d)},nextToParse:function(){return!this.parsingElement&&this.nextToParseInDoc(j)},nextToParseInDoc:function(a,c){for(var d,e=a.querySelectorAll(this.parseSelectorsForNode(a)),f=0,g=e.length;g>f&&(d=e[f]);f++)if(!this.isParsed(d))return this.hasResource(d)?b(d)?this.nextToParseInDoc(d.import,d):d:void 0;return c},parseSelectorsForNode:function(a){var b=a.ownerDocument||a;return b===j?this.documentSelectors:this.importsSelectors},isParsed:function(a){return a.__importParsed},hasResource:function(a){return b(a)&&!a.import?!1:!0}},l=/(url\()([^)]*)(\))/g,m=/(@import[\s]+(?!url\())([^;]*)(;)/g,n={resolveUrlsInStyle:function(a){var b=a.ownerDocument,c=b.createElement("a");return a.textContent=this.resolveUrlsInCssText(a.textContent,c),a},resolveUrlsInCssText:function(a,b){var c=this.replaceUrls(a,b,l);return c=this.replaceUrls(c,b,m)},replaceUrls:function(a,b,c){return a.replace(c,function(a,c,d,e){var f=d.replace(/["']/g
,"");return b
.href
=f
,f
=b
.href
,c
+"'"+f
+"'"+e
})}};a
.parser
=k
,a
.path
=n
,a
.isIE
=i
}(HTMLImports
),function(a
){function b(a
){return c(a
,m
)}function c(a
,b
){return"link"===a
.localName
&&a
.getAttribute("rel")===b
}function d(a
,b
){var c
=a
;c
instanceof Document
||(c
=document
.implementation
.createHTMLDocument(m
)),c
._URL
=b
;var d
=c
.createElement("base");d
.setAttribute("href",b
),c
.baseURI
||(c
.baseURI
=b
);var e
=c
.createElement("meta");return e
.setAttribute("charset","utf-8"),c
.head
.appendChild(e
),c
.head
.appendChild(d
),a
instanceof Document
||(c
.body
.innerHTML
=a
),window
.HTMLTemplateElement
&&HTMLTemplateElement
.bootstrap
&&HTMLTemplateElement
.bootstrap(c
),c
}function e(a
,b
){b
=b
||n
,g(function(){h(a
,b
)},b
)}function f(a
){return"complete"===a
.readyState
||a
.readyState
===u
}function g(a
,b
){if(f(b
))a
&&a();else{var c=function(){("complete"===b
.readyState
||b
.readyState
===u
)&&(b
.removeEventListener(v
,c
),g(a
,b
))};b
.addEventListener(v
,c
)}}function h(a
,b
){function c(){f
==g
&&requestAnimationFrame(a
)}function d(){f
++,c()}var e
=b
.querySelectorAll("link[rel=import]"),f
=0,g
=e
.length
;if(g
)for(var h
,j
=0;g
>j
&&(h
=e
[j
]);j
++)i(h
)?d
.call(h
):(h
.addEventListener("load",d
),h
.addEventListener("error",d
));else c()}function i(a
){return k
?a
.import&&"loading"!==a
.import.readyState
:a
.__importParsed
}var j
="import"in document
.createElement("link"),k
=j
,l
=a
.flags
,m
="import",n
=window
.ShadowDOMPolyfill
?ShadowDOMPolyfill
.wrapIfNeeded(document
):document
;if(k
)var o
={};else var p
=(a
.xhr
,a
.Loader
),q
=a
.parser
,o
={documents
:{},documentPreloadSelectors
:"link[rel="+m
+"]",importsPreloadSelectors
:["link[rel="+m
+"]"].join(","),loadNode:function(a
){r
.addNode(a
)},loadSubtree:function(a
){var b
=this.marshalNodes(a
);r
.addNodes(b
)},marshalNodes:function(a
){return a
.querySelectorAll(this.loadSelectorsForNode(a
))},loadSelectorsForNode:function(a
){var b
=a
.ownerDocument
||a
;return b
===n
?this.documentPreloadSelectors
:this.importsPreloadSelectors
},loaded:function(a
,c
,e
){if(l
.load
&&console
.log("loaded",a
,c
),c
.__resource
=e
,b(c
)){var f
=this.documents
[a
];f
||(f
=d(e
,a
),f
.__importLink
=c
,this.bootDocument(f
),this.documents
[a
]=f
),c
.import=f
}q
.parseNext()},bootDocument:function(a
){this.loadSubtree(a
),this.observe(a
),q
.parseNext()},loadedAll:function(){q
.parseNext()}},r
=new p(o
.loaded
.bind(o
),o
.loadedAll
.bind(o
));var s
={get:function(){return HTMLImports
.currentScript
||document
.currentScript
},configurable
:!0};if(Object
.defineProperty(document
,"_currentScript",s
),Object
.defineProperty(n
,"_currentScript",s
),!document
.baseURI
){var t
={get:function(){return window
.location
.href
},configurable
:!0};Object
.defineProperty(document
,"baseURI",t
),Object
.defineProperty(n
,"baseURI",t
)}var u
=HTMLImports
.isIE
?"complete":"interactive",v
="readystatechange";a
.hasNative
=j
,a
.useNative
=k
,a
.importer
=o
,a
.whenImportsReady
=e
,a
.IMPORT_LINK_TYPE
=m
,a
.isImportLoaded
=i
,a
.importLoader
=r
}(window
.HTMLImports
),function(a
){function b(a
){for(var b
,d
=0,e
=a
.length
;e
>d
&&(b
=a
[d
]);d
++)"childList"===b
.type
&&b
.addedNodes
.length
&&c(b
.addedNodes
)}function c(a
){for(var b
,e
=0,g
=a
.length
;g
>e
&&(b
=a
[e
]);e
++)d(b
)&&f
.loadNode(b
),b
.children
&&b
.children
.length
&&c(b
.children
)}function d(a
){return 1===a
.nodeType
&&g
.call(a
,f
.loadSelectorsForNode(a
))}function e(a
){h
.observe(a
,{childList
:!0,subtree
:!0})}var f
=(a
.IMPORT_LINK_TYPE
,a
.importer
),g
=HTMLElement
.prototype.matches
||HTMLElement
.prototype.matchesSelector
||HTMLElement
.prototype.webkitMatchesSelector
||HTMLElement
.prototype.mozMatchesSelector
||HTMLElement
.prototype.msMatchesSelector
,h
=new MutationObserver(b
);a
.observe
=e
,f
.observe
=e
}(HTMLImports
),function(){function a(){HTMLImports
.importer
.bootDocument(b
)}"function"!=typeof window
.CustomEvent
&&(window
.CustomEvent=function(a
,b
){var c
=document
.createEvent("HTMLEvents");return c
.initEvent(a
,b
.bubbles
===!1?!1:!0,b
.cancelable
===!1?!1:!0,b
.detail
),c
});var b
=window
.ShadowDOMPolyfill
?window
.ShadowDOMPolyfill
.wrapIfNeeded(document
):document
;HTMLImports
.whenImportsReady(function(){HTMLImports
.ready
=!0,HTMLImports
.readyTime
=(new Date
).getTime(),b
.dispatchEvent(new CustomEvent("HTMLImportsLoaded",{bubbles
:!0}))}),HTMLImports
.useNative
||("complete"===document
.readyState
||"interactive"===document
.readyState
&&!window
.attachEvent
?a():document
.addEventListener("DOMContentLoaded",a
))}(),window
.CustomElements
=window
.CustomElements
||{flags
:{}},function(a
){function b(a
,c
,d
){var e
=a
.firstElementChild
;if(!e
)for(e
=a
.firstChild
;e
&&e
.nodeType
!==Node
.ELEMENT_NODE
;)e
=e
.nextSibling
;for(;e
;)c(e
,d
)!==!0&&b(e
,c
,d
),e
=e
.nextElementSibling
;return null}function c(a
,b
){for(var c
=a
.shadowRoot
;c
;)d(c
,b
),c
=c
.olderShadowRoot
}function d(a
,d
){b(a
,function(a
){return d(a
)?!0:void c(a
,d
)}),c(a
,d
)}function e(a
){return h(a
)?(i(a
),!0):void l(a
)}function f(a
){d(a
,function(a
){return e(a
)?!0:void 0})}function g(a
){return e(a
)||f(a
)}function h(b
){if(!b
.__upgraded__
&&b
.nodeType
===Node
.ELEMENT_NODE
){var c
=b
.getAttribute("is")||b
.localName
,d
=a
.registry
[c
];if(d
)return A
.dom
&&console
.group("upgrade:",b
.localName
),a
.upgrade(b
),A
.dom
&&console
.groupEnd(),!0}}function i(a
){l(a
),r(a
)&&d(a
,function(a
){l(a
)})}function j(a
){if(E
.push(a
),!D
){D
=!0;var b
=window
.Platform
&&window
.Platform
.endOfMicrotask
||setTimeout
;b(k
)}}function k(){D
=!1;for(var a
,b
=E
,c
=0,d
=b
.length
;d
>c
&&(a
=b
[c
]);c
++)a();E
=[]}function l(a
){C
?j(function(){m(a
)}):m(a
)}function m(a
){(a
.attachedCallback
||a
.detachedCallback
||a
.__upgraded__
&&A
.dom
)&&(A
.dom
&&console
.group("inserted:",a
.localName
),r(a
)&&(a
.__inserted
=(a
.__inserted
||0)+1,a
.__inserted
<1&&(a
.__inserted
=1),a
.__inserted
>1?A
.dom
&&console
.warn("inserted:",a
.localName
,"insert/remove count:",a
.__inserted
):a
.attachedCallback
&&(A
.dom
&&console
.log("inserted:",a
.localName
),a
.attachedCallback())),A
.dom
&&console
.groupEnd())}function n(a
){o(a
),d(a
,function(a
){o(a
)})}function o(a
){C
?j(function(){p(a
)}):p(a
)}function p(a
){(a
.attachedCallback
||a
.detachedCallback
||a
.__upgraded__
&&A
.dom
)&&(A
.dom
&&console
.group("removed:",a
.localName
),r(a
)||(a
.__inserted
=(a
.__inserted
||0)-1,a
.__inserted
>0&&(a
.__inserted
=0),a
.__inserted
<0?A
.dom
&&console
.warn("removed:",a
.localName
,"insert/remove count:",a
.__inserted
):a
.detachedCallback
&&a
.detachedCallback()),A
.dom
&&console
.groupEnd())}function q(a
){return window
.ShadowDOMPolyfill
?ShadowDOMPolyfill
.wrapIfNeeded(a
):a
}function r(a
){for(var b
=a
,c
=q(document
);b
;){if(b
==c
)return!0;b
=b
.parentNode
||b
.host
}}function s(a
){if(a
.shadowRoot
&&!a
.shadowRoot
.__watched
){A
.dom
&&console
.log("watching shadow-root for: ",a
.localName
);for(var b
=a
.shadowRoot
;b
;)t(b
),b
=b
.olderShadowRoot
}}function t(a
){a
.__watched
||(w(a
),a
.__watched
=!0)}function u(a
){if(A
.dom
){var b
=a
[0];if(b
&&"childList"===b
.type
&&b
.addedNodes
&&b
.addedNodes
){for(var c
=b
.addedNodes
[0];c
&&c
!==document
&&!c
.host
;)c
=c
.parentNode
;var d
=c
&&(c
.URL
||c
._URL
||c
.host
&&c
.host
.localName
)||"";d
=d
.split("/?").shift().split("/").pop()}console
.group("mutations (%d) [%s]",a
.length
,d
||"")}a
.forEach(function(a
){"childList"===a
.type
&&(G(a
.addedNodes
,function(a
){a
.localName
&&g(a
)}),G(a
.removedNodes
,function(a
){a
.localName
&&n(a
)}))}),A
.dom
&&console
.groupEnd()}function v(){u(F
.takeRecords()),k()}function w(a
){F
.observe(a
,{childList
:!0,subtree
:!0})}function x(a
){w(a
)}function y(a
){A
.dom
&&console
.group("upgradeDocument: ",a
.baseURI
.split("/").pop()),g(a
),A
.dom
&&console
.groupEnd()}function z(a
){a
=q(a
);for(var b
,c
=a
.querySelectorAll("link[rel="+B
+"]"),d
=0,e
=c
.length
;e
>d
&&(b
=c
[d
]);d
++)b
.import&&b
.import.__parsed
&&z(b
.import);y(a
)}var A
=window
.logFlags
||{},B
=window
.HTMLImports
?HTMLImports
.IMPORT_LINK_TYPE
:"none",C
=!window
.MutationObserver
||window
.MutationObserver
===window
.JsMutationObserver
;a
.hasPolyfillMutations
=C
;var D
=!1,E
=[],F
=new MutationObserver(u
),G
=Array
.prototype.forEach
.call
.bind(Array
.prototype.forEach
);a
.IMPORT_LINK_TYPE
=B
,a
.watchShadow
=s
,a
.upgradeDocumentTree
=z
,a
.upgradeAll
=g
,a
.upgradeSubtree
=f
,a
.insertedNode
=i
,a
.observeDocument
=x
,a
.upgradeDocument
=y
,a
.takeRecords
=v
}(window
.CustomElements
),function(a
){function b(b
,f
){var g
=f
||{};if(!b
)throw new Error("document.registerElement: first argument `name` must not be empty");if(b
.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(b
)+"'.");if(m(b
))throw new Error("DuplicateDefinitionError: a type with name '"+String(b
)+"' is already registered");if(!g
.prototype)throw new Error("Options missing required prototype property");return g
.__name
=b
.toLowerCase(),g
.lifecycle
=g
.lifecycle
||{},g
.ancestry
=c(g
.extends),d(g
),e(g
),k(g
.prototype),n(g
.__name
,g
),g
.ctor
=o(g
),g
.ctor
.prototype=g
.prototype,g
.prototype.constructor=g
.ctor
,a
.ready
&&a
.upgradeDocumentTree(document
),g
.ctor
}function c(a
){var b
=m(a
);return b
?c(b
.extends).concat([b
]):[]}function d(a
){for(var b
,c
=a
.extends,d
=0;b
=a
.ancestry
[d
];d
++)c
=b
.is
&&b
.tag
;a
.tag
=c
||a
.__name
,c
&&(a
.is
=a
.__name
)}function e(a
){if(!Object
.__proto__
){var b
=HTMLElement
.prototype;if(a
.is
){var c
=document
.createElement(a
.tag
);b
=Object
.getPrototypeOf(c
)}for(var d
,e
=a
.prototype;e
&&e
!==b
;){var d
=Object
.getPrototypeOf(e
);e
.__proto__
=d
,e
=d
}}a
.native=b
}function f(a
){return g(z(a
.tag
),a
)}function g(b
,c
){return c
.is
&&b
.setAttribute("is",c
.is
),b
.removeAttribute("unresolved"),h(b
,c
),b
.__upgraded__
=!0,j(b
),a
.insertedNode(b
),a
.upgradeSubtree(b
),b
}function h(a
,b
){Object
.__proto__
?a
.__proto__
=b
.prototype:(i(a
,b
.prototype,b
.native),a
.__proto__
=b
.prototype)}function i(a
,b
,c
){for(var d
={},e
=b
;e
!==c
&&e
!==HTMLElement
.prototype;){for(var f
,g
=Object
.getOwnPropertyNames(e
),h
=0;f
=g
[h
];h
++)d
[f
]||(Object
.defineProperty(a
,f
,Object
.getOwnPropertyDescriptor(e
,f
)),d
[f
]=1);e
=Object
.getPrototypeOf(e
)}}function j(a
){a
.createdCallback
&&a
.createdCallback()}function k(a
){if(!a
.setAttribute
._polyfilled
){var b
=a
.setAttribute
;a
.setAttribute=function(a
,c
){l
.call(this,a
,c
,b
)};var c
=a
.removeAttribute
;a
.removeAttribute=function(a
){l
.call(this,a
,null,c
)},a
.setAttribute
._polyfilled
=!0}}function l(a
,b
,c
){var d
=this.getAttribute(a
);c
.apply(this,arguments
);var e
=this.getAttribute(a
);this.attributeChangedCallback
&&e
!==d
&&this.attributeChangedCallback(a
,d
,e
)}function m(a
){return a
?x
[a
.toLowerCase()]:void 0}function n(a
,b
){x
[a
]=b
}function o(a
){return function(){return f(a
)}}function p(a
,b
,c
){return a
===y
?q(b
,c
):A(a
,b
)}function q(a
,b
){var c
=m(b
||a
);if(c
){if(a
==c
.tag
&&b
==c
.is
)return new c
.ctor
;if(!b
&&!c
.is
)return new c
.ctor
}if(b
){var d
=q(a
);return d
.setAttribute("is",b
),d
}var d
=z(a
);return a
.indexOf("-")>=0&&h(d
,HTMLElement
),d
}function r(a
){if(!a
.__upgraded__
&&a
.nodeType
===Node
.ELEMENT_NODE
){var b
=a
.getAttribute("is"),c
=m(b
||a
.localName
);if(c
){if(b
&&c
.tag
==a
.localName
)return g(a
,c
);if(!b
&&!c
.extends)return g(a
,c
)}}}function s(b
){var c
=B
.call(this,b
);return a
.upgradeAll(c
),c
}a
||(a
=window
.CustomElements
={flags
:{}});var t
=a
.flags
,u
=Boolean(document
.registerElement
),v
=!t
.register
&&u
&&!window
.ShadowDOMPolyfill
;if(v
){var w=function(){};a
.registry
={},a
.upgradeElement
=w
,a
.watchShadow
=w
,a
.upgrade
=w
,a
.upgradeAll
=w
,a
.upgradeSubtree
=w
,a
.observeDocument
=w
,a
.upgradeDocument
=w
,a
.upgradeDocumentTree
=w
,a
.takeRecords
=w
}else{var x
={},y
="http://www.w3.org/1999/xhtml",z
=document
.createElement
.bind(document
),A
=document
.createElementNS
.bind(document
),B
=Node
.prototype.cloneNode
;document
.registerElement
=b
,document
.createElement
=q
,document
.createElementNS
=p
,Node
.prototype.cloneNode
=s
,a
.registry
=x
,a
.upgrade
=r
}var C
;C
=Object
.__proto__
||v
?function(a
,b
){return a
instanceof b
}:function(a
,b
){for(var c
=a
;c
;){if(c
===b
.prototype)return!0;c
=c
.__proto__
}return!1},a
.instanceof=C
,document
.register
=document
.registerElement
,a
.hasNative
=u
,a
.useNative
=v
}(window
.CustomElements
),function(a
){function b(a
){return"link"===a
.localName
&&a
.getAttribute("rel")===c
}var c
=a
.IMPORT_LINK_TYPE
,d
={selectors
:["link[rel="+c
+"]"],map
:{link
:"parseLink"},parse:function(a
){if(!a
.__parsed
){a
.__parsed
=!0;var b
=a
.querySelectorAll(d
.selectors
);e(b
,function(a
){d
[d
.map
[a
.localName
]](a
)}),CustomElements
.upgradeDocument(a
),CustomElements
.observeDocument(a
)}},parseLink:function(a
){b(a
)&&this.parseImport(a
)},parseImport:function(a
){a
.import&&d
.parse(a
.import)}},e
=Array
.prototype.forEach
.call
.bind(Array
.prototype.forEach
);a
.parser
=d
,a
.IMPORT_LINK_TYPE
=c
}(window
.CustomElements
),function(a
){function b(){CustomElements
.parser
.parse(document
),CustomElements
.upgradeDocument(document
);var a
=window
.Platform
&&Platform
.endOfMicrotask
?Platform
.endOfMicrotask
:setTimeout
;a(function(){CustomElements
.ready
=!0,CustomElements
.readyTime
=Date
.now(),window
.HTMLImports
&&(CustomElements
.elapsed
=CustomElements
.readyTime
-HTMLImports
.readyTime
),document
.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles
:!0})),window
.HTMLImports
&&(HTMLImports
.__importsParsingHook=function(a
){CustomElements
.parser
.parse(a
.import)})})}if("function"!=typeof window
.CustomEvent
&&(window
.CustomEvent=function(a
){var b
=document
.createEvent("HTMLEvents");return b
.initEvent(a
,!0,!0),b
}),"complete"===document
.readyState
||a
.flags
.eager
)b();else if("interactive"!==document
.readyState
||window
.attachEvent
||window
.HTMLImports
&&!window
.HTMLImports
.ready
){var c
=window
.HTMLImports
&&!HTMLImports
.ready
?"HTMLImportsLoaded":"DOMContentLoaded";window
.addEventListener(c
,b
)}else b()}(window
.CustomElements
),function(){if(window
.ShadowDOMPolyfill
){var a
=["upgradeAll","upgradeSubtree","observeDocument","upgradeDocument"],b
={};a
.forEach(function(a
){b
[a
]=CustomElements
[a
]}),a
.forEach(function(a
){CustomElements
[a
]=function(c
){return b
[a
](wrap(c
))}})}}(),function(a
){function b(a
){this.regex
=a
}var c
=a
.endOfMicrotask
;b
.prototype={extractUrls:function(a
,b
){for(var c
,d
,e
=[];c
=this.regex
.exec(a
);)d
=new URL(c
[1],b
),e
.push({matched
:c
[0],url
:d
.href
});return e
},process:function(a
,b
,c
){var d
=this.extractUrls(a
,b
);this.fetch(d
,{},c
)},fetch:function(a
,b
,d
){var e
=a
.length
;if(!e
)return d(b
);for(var f
,g
,h
,i=function(){0===--e
&&d(b
)},j=function(a
,c
){var d
=c
.match
,e
=d
.url
;if(a
)return b
[e
]="",i();var f
=c
.response
||c
.responseText
;b
[e
]=f
,this.fetch(this.extractUrls(f
,e
),b
,i
)},k
=0;e
>k
;k
++)f
=a
[k
],h
=f
.url
,b
[h
]?c(i
):(g
=this.xhr(h
,j
,this),g
.match
=f
,b
[h
]=g
)},xhr:function(a
,b
,c
){var d
=new XMLHttpRequest
;return d
.open("GET",a
,!0),d
.send(),d
.onload=function(){b
.call(c
,null,d
)},d
.onerror=function(){b
.call(c
,null,d
)},d
}},a
.Loader
=b
}(window
.Platform
),function(a
){function b(){this.loader
=new d(this.regex
)}var c
=a
.urlResolver
,d
=a
.Loader
;b
.prototype={regex
:/@import\s
+(?:url
)?["'\(]*([^'"\)]*)['"\)]*;/g,resolve:function(a,b,c){var d=function(d){c(this.flatten(a,b,d))}.bind(this);this.loader.process(a,b,d)},resolveNode:function(a,b){var c=a.textContent,d=a.ownerDocument.baseURI,e=function(c){a.textContent=c,b(a)
45 };this.resolve(c,d,e)},flatten:function(a,b,d){for(var e,f,g,h=this.loader.extractUrls(a,b),i=0;i<h.length;i++)e=h[i],f=e.url,g=c.resolveCssText(d[f],f),g=this.flatten(g,f,d),a=a.replace(e.matched,g);return a},loadStyles:function(a,b){function c(){e++,e===f&&b&&b()}for(var d,e=0,f=a.length,g=0;f>g&&(d=a[g]);g++)this.resolveNode(d,c)}};var e=new b;a.styleResolver=e}(window.Platform),function(a){a=a||{},a.external=a.external||{};var b={shadow:function(a){return a?a.shadowRoot||a.webkitShadowRoot:void 0},canTarget:function(a){return a&&Boolean(a.elementFromPoint)},targetingShadow:function(a){var b=this.shadow(a);return this.canTarget(b)?b:void 0},olderShadow:function(a){var b=a.olderShadowRoot;if(!b){var c=a.querySelector("shadow");c&&(b=c.olderShadowRoot)}return b},allShadows:function(a){for(var b=[],c=this.shadow(a);c;)b.push(c),c=this.olderShadow(c);return b},searchRoot:function(a,b,c){if(a){var d,e,f=a.elementFromPoint(b,c);for(e=this.targetingShadow(f);e;){if(d=e.elementFromPoint(b,c)){var g=this.targetingShadow(d);return this.searchRoot(g,b,c)||d}e=this.olderShadow(e)}return f}},owner:function(a){for(var b=a;b.parentNode;)b=b.parentNode;return b.nodeType!=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);return d.elementFromPoint(b,c)||(d=document),this.searchRoot(d,b,c)}};a.targetFinding=b,a.findTarget=b.findTarget.bind(b),window.PointerEventsPolyfill=a}(window.PointerEventsPolyfill),function(){function a(a){return"body /shadow-deep/ "+b(a)}function b(a){return'[touch
-action
="'+a+'"]'}function c(a){return"{ -ms-touch-action: "+a+"; touch-action: "+a+"; touch-action-delay: none; }"}var d=["none","auto","pan-x","pan-y",{rule:"pan-x pan-y",selectors:["pan-x pan-y","pan-y pan-x"]}],e="",f=(document.head,window.PointerEvent||window.MSPointerEvent),g=!window.ShadowDOMPolyfill&&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("style");h.textContent=e,document.head.appendChild(h)}}(),function(a){function b(a,e){e=e||{};var f=e.buttons;if(!d&&!f&&"touch"!==a)switch(e.which){case 1:f=1;break;case 2:f=4;break;case 3:f=2;break;default:f=0}var i;if(c)i=new MouseEvent(a,e);else{i=document.createEvent("MouseEvent");for(var j,k={},l=0;l<g.length;l++)j=g[l],k[j]=e[j]||h[l];i.initMouseEvent(a,k.bubbles,k.cancelable,k.view,k.detail,k.screenX,k.screenY,k.clientX,k.clientY,k.ctrlKey,k.altKey,k.shiftKey,k.metaKey,k.button,k.relatedTarget)}i.__proto__=b.prototype,d||Object.defineProperty(i,"buttons",{get:function(){return f},enumerable:!0});var m=0;return m=e.pressure?e.pressure:f?.5:0,Object.defineProperties(i,{pointerId:{value:e.pointerId||0,enumerable:!0},width:{value:e.width||0,enumerable:!0},height:{value:e.height||0,enumerable:!0},pressure:{value:m,enumerable:!0},tiltX:{value:e.tiltX||0,enumerable:!0},tiltY:{value:e.tiltY||0,enumerable:!0},pointerType:{value:e.pointerType||"",enumerable:!0},hwTimestamp:{value:e.hwTimestamp||0,enumerable:!0},isPrimary:{value:e.isPrimary||!1,enumerable:!0}}),i}var c=!1,d=!1;try{var e=new MouseEvent("click",{buttons:1});c=!0,d=1===e.buttons,e=null}catch(f){}var g=["bubbles","cancelable","view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget"],h=[!1,!1,null,null,0,0,0,0,!1,!1,!1,!1,0,null];b.prototype=Object.create(MouseEvent.prototype),a.PointerEvent||(a.PointerEvent=b)}(window),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=function(){return this.size};b.prototype={set:function(a,b){var c=this.keys.indexOf(a);c>-1?this.values[c]=b:(this.keys.push(a),this.values.push(b))},has:function(a){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.PointerEventsPolyfill),function(a){var b=["bubbles","cancelable","view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget","buttons","pointerId","width","height","pressure","tiltX","tiltY","pointerType","hwTimestamp","isPrimary","type","target","currentTarget","which"],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],d="undefined"!=typeof SVGElementInstance,e={targets:new WeakMap,handledEvents:new WeakMap,pointermap:new a.PointerMap,eventMap:{},eventSources:{},eventSourceList:[],registerSource:function(a,b){var c=b,d=c.events;d&&(d.forEach(function(a){c[a]&&(this.eventMap[a]=c[a].bind(c))},this),this.eventSources[a]=c,this.eventSourceList.push(c))},register:function(a){for(var b,c=this.eventSourceList.length,d=0;c>d&&(b=this.eventSourceList[d]);d++)b.register.call(b,a)},unregister:function(a){for(var b,c=this.eventSourceList.length,d=0;c>d&&(b=this.eventSourceList[d]);d++)b.unregister.call(b,a)},contains:a.external.contains||function(a,b){return a.contains(b)},down:function(a){a.bubbles=!0,this.fireEvent("pointerdown",a)},move:function(a){a.bubbles=!0,this.fireEvent("pointermove",a)},up:function(a){a.bubbles=!0,this.fireEvent("pointerup",a)},enter:function(a){a.bubbles=!1,this.fireEvent("pointerenter",a)},leave:function(a){a.bubbles=!1,this.fireEvent("pointerleave",a)},over:function(a){a.bubbles=!0,this.fireEvent("pointerover",a)},out:function(a){a.bubbles=!0,this.fireEvent("pointerout",a)},cancel:function(a){a.bubbles=!0,this.fireEvent("pointercancel",a)},leaveOut:function(a){this.out(a),this.contains(a.target,a.relatedTarget)||this.leave(a)},enterOver:function(a){this.over(a),this.contains(a.target,a.relatedTarget)||this.enter(a)},eventHandler:function(a){if(!this.handledEvents.get(a)){var b=a.type,c=this.eventMap&&this.eventMap[b];c&&c(a),this.handledEvents.set(a,!0)}},listen:function(a,b){b.forEach(function(b){this.addEvent(a,b)},this)},unlisten:function(a,b){b.forEach(function(b){this.removeEvent(a,b)},this)},addEvent:a.external.addEvent||function(a,b){a.addEventListener(b,this.boundHandler)},removeEvent:a.external.removeEvent||function(a,b){a.removeEventListener(b,this.boundHandler)},makeEvent:function(a,b){this.captureInfo&&(b.relatedTarget=null);var c=new PointerEvent(a,b);return b.preventDefault&&(c.preventDefault=b.preventDefault),this.targets.set(c,this.targets.get(b)||b.target),c},fireEvent:function(a,b){var c=this.makeEvent(a,b);return this.dispatchEvent(c)},cloneEvent:function(a){for(var e,f={},g=0;g<b.length;g++)e=b[g],f[e]=a[e]||c[g],!d||"target"!==e&&"relatedTarget"!==e||f[e]instanceof SVGElementInstance&&(f[e]=f[e].correspondingUseElement);return a.preventDefault&&(f.preventDefault=function(){a.preventDefault()}),f},getTarget:function(a){return this.captureInfo&&this.captureInfo.id===a.pointerId?this.captureInfo.target:this.targets.get(a)},setCapture:function(a,b){this.captureInfo&&this.releaseCapture(this.captureInfo.id),this.captureInfo={id:a,target:b};var c=new PointerEvent("gotpointercapture",{bubbles:!0});this.implicitRelease=this.releaseCapture.bind(this,a),document.addEventListener("pointerup",this.implicitRelease),document.addEventListener("pointercancel",this.implicitRelease),this.targets.set(c,b),this.asyncDispatchEvent(c)},releaseCapture:function(a){if(this.captureInfo&&this.captureInfo.id===a){var b=new PointerEvent("lostpointercapture",{bubbles:!0}),c=this.captureInfo.target;this.captureInfo=null,document.removeEventListener("pointerup",this.implicitRelease),document.removeEventListener("pointercancel",this.implicitRelease),this.targets.set(b,c),this.asyncDispatchEvent(b)}},dispatchEvent:a.external.dispatchEvent||function(a){var b=this.getTarget(a);return b?b.dispatchEvent(a):void 0},asyncDispatchEvent:function(a){requestAnimationFrame(this.dispatchEvent.bind(this,a))}};e.boundHandler=e.eventHandler.bind(e),a.dispatcher=e,a.register=e.register.bind(e),a.unregister=e.unregister.bind(e)}(window.PointerEventsPolyfill),function(a){function b(a,b,c,d){this.addCallback=a.bind(d),this.removeCallback=b.bind(d),this.changedCallback=c.bind(d),g&&(this.observer=new g(this.mutationWatcher.bind(this)))}var c=Array.prototype.forEach.call.bind(Array.prototype.forEach),d=Array.prototype.map.call.bind(Array.prototype.map),e=Array.prototype.slice.call.bind(Array.prototype.slice),f=Array.prototype.filter.call.bind(Array.prototype.filter),g=window.MutationObserver||window.WebKitMutationObserver,h="[touch-action]",i={subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0,attributeFilter:["touch-action"]};b.prototype={watchSubtree:function(b){a.targetFinding.canTarget(b)&&this.observer.observe(b,i)},enableOnSubtree:function(a){this.watchSubtree(a),a===document&&"complete"!==document.readyState?this.installOnLoad():this.installNewSubtree(a)},installNewSubtree:function(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)},elementChanged:function(a,b){this.changedCallback(a,b)},concatLists:function(a,b){return a.concat(e(b))},installOnLoad:function(){document.addEventListener("readystatechange",function(){"complete"===document.readyState&&this.installNewSubtree(document)}.bind(this))},isElement:function(a){return a.nodeType===Node.ELEMENT_NODE},flattenMutationTree:function(a){var b=d(a,this.findElements,this);return b.push(f(a,this.isElement)),b.reduce(this.concatLists,[])},mutationWatcher:function(a){a.forEach(this.mutationHandler,this)},mutationHandler:function(a){if("childList"===a.type){var b=this.flattenMutationTree(a.addedNodes);b.forEach(this.addElement,this);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("PointerEventsPolyfill: MutationObservers not found, touch-action will not be dynamically detected")}),a.Installer=b}(window.PointerEventsPolyfill),function(a){var b=a.dispatcher,c=b.pointermap,d=25,e={POINTER_ID:1,POINTER_TYPE:"mouse",events:["mousedown","mousemove","mouseup","mouseover","mouseout"],register:function(a){b.listen(a,this.events)},unregister:function(a){b.unlisten(a,this.events)},lastTouches:[],isEventSimulatedFromTouch:function(a){for(var b,c=this.lastTouches,e=a.clientX,f=a.clientY,g=0,h=c.length;h>g&&(b=c[g]);g++){var i=Math.abs(e-b.x),j=Math.abs(f-b.y);if(d>=i&&d>=j)return!0}},prepareEvent:function(a){var c=b.cloneEvent(a),d=c.preventDefault;return c.preventDefault=function(){a.preventDefault(),d()},c.pointerId=this.POINTER_ID,c.isPrimary=!0,c.pointerType=this.POINTER_TYPE,c},mousedown:function(a){if(!this.isEventSimulatedFromTouch(a)){var d=c.has(this.POINTER_ID);d&&this.cancel(a);var e=this.prepareEvent(a);c.set(this.POINTER_ID,a),b.down(e)}},mousemove:function(a){if(!this.isEventSimulatedFromTouch(a)){var c=this.prepareEvent(a);b.move(c)}},mouseup:function(a){if(!this.isEventSimulatedFromTouch(a)){var d=c.get(this.POINTER_ID);if(d&&d.button===a.button){var e=this.prepareEvent(a);b.up(e),this.cleanupMouse()}}},mouseover:function(a){if(!this.isEventSimulatedFromTouch(a)){var c=this.prepareEvent(a);b.enterOver(c)}},mouseout:function(a){if(!this.isEventSimulatedFromTouch(a)){var c=this.prepareEvent(a);b.leaveOut(c)}},cancel:function(a){var c=this.prepareEvent(a);b.cancel(c),this.cleanupMouse()},cleanupMouse:function(){c["delete"](this.POINTER_ID)}};a.mouseEvents=e}(window.PointerEventsPolyfill),function(a){var b,c=a.dispatcher,d=a.findTarget,e=a.targetFinding.allShadows.bind(a.targetFinding),f=c.pointermap,g=Array.prototype.map.call.bind(Array.prototype.map),h=2500,i=200,j="touch-action",k=!1,l={scrollType:new WeakMap,events:["touchstart","touchmove","touchend","touchcancel"],register:function(a){k?c.listen(a,this.events):b.enableOnSubtree(a)},unregister:function(a){k&&c.unlisten(a,this.events)},elementAdded:function(a){var b=a.getAttribute(j),d=this.touchActionToScrollType(b);d&&(this.scrollType.set(a,d),c.listen(a,this.events),e(a).forEach(function(a){this.scrollType.set(a,d),c.listen(a,this.events)},this))},elementRemoved:function(a){this.scrollType["delete"](a),c.unlisten(a,this.events),e(a).forEach(function(a){this.scrollType["delete"](a),c.unlisten(a,this.events)},this)},elementChanged:function(a,b){var c=a.getAttribute(j),d=this.touchActionToScrollType(c),f=this.touchActionToScrollType(b);d&&f?(this.scrollType.set(a,d),e(a).forEach(function(a){this.scrollType.set(a,d)},this)):f?this.elementRemoved(a):d&&this.elementAdded(a)},scrollTypes:{EMITTER:"none",XSCROLLER:"pan-x",YSCROLLER:"pan-y",SCROLLER:/^(?:pan-x pan-y)|(?:pan-y pan-x)|auto$/},touchActionToScrollType:function(a){var b=a,c=this.scrollTypes;return"none"===b?"none":b===c.XSCROLLER?"X":b===c.YSCROLLER?"Y":c.SCROLLER.exec(b)?"XY":void 0},POINTER_TYPE:"touch",firstTouch:null,isPrimaryTouch:function(a){return this.firstTouch===a.identifier},setPrimaryTouch:function(a){(0===f.pointers()||1===f.pointers()&&f.has(1))&&(this.firstTouch=a.identifier,this.firstXY={X:a.clientX,Y:a.clientY},this.scrolling=!1,this.cancelResetClickCount())},removePrimaryPointer:function(a){a.isPrimary&&(this.firstTouch=null,this.firstXY=null,this.resetClickCount())},clickCount:0,resetId:null,resetClickCount:function(){var a=function(){this.clickCount=0,this.resetId=null}.bind(this);this.resetId=setTimeout(a,i)},cancelResetClickCount:function(){this.resetId&&clearTimeout(this.resetId)},typeToButtons:function(a){var b=0;return("touchstart"===a||"touchmove"===a)&&(b=1),b},touchToPointer:function(a){var b=c.cloneEvent(a);return b.pointerId=a.identifier+2,b.target=d(b),b.bubbles=!0,b.cancelable=!0,b.detail=this.clickCount,b.button=0,b.buttons=this.typeToButtons(this.currentTouchEvent),b.width=a.webkitRadiusX||a.radiusX||0,b.height=a.webkitRadiusY||a.radiusY||0,b.pressure=a.webkitForce||a.force||.5,b.isPrimary=this.isPrimaryTouch(a),b.pointerType=this.POINTER_TYPE,b},processTouches:function(a,b){var c=a.changedTouches;this.currentTouchEvent=a.type;var d=g(c,this.touchToPointer,this);d.forEach(function(b){b.preventDefault=function(){this.scrolling=!1,this.firstXY=null,a.preventDefault()}},this),d.forEach(b,this)},shouldScroll:function(a){if(this.firstXY){var b,c=this.scrollType.get(a.currentTarget);if("none"===c)b=!1;else if("XY"===c)b=!0;else{var d=a.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.firstXY=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(f.pointers()>=b.length){var c=[];f.forEach(function(a,d){if(1!==d&&!this.findTouch(b,d-2)){var e=a.out;c.push(this.touchToPointer(e))}},this),c.forEach(this.cancelOut,this)}},touchstart:function(a){this.vacuumTouches(a),this.setPrimaryTouch(a.changedTouches[0]),this.dedupSynthMouse(a),this.scrolling||(this.clickCount++,this.processTouches(a,this.overDown))},overDown:function(a){f.set(a.pointerId,{target:a.target,out:a,outTarget:a.target});c.over(a),c.enter(a),c.down(a)},touchmove:function(a){this.scrolling||(this.shouldScroll(a)?(this.scrolling=!0,this.touchcancel(a)):(a.preventDefault(),this.processTouches(a,this.moveOverOut)))},moveOverOut:function(a){var b=a,d=f.get(b.pointerId);if(d){var e=d.out,g=d.outTarget;c.move(b),e&&g!==b.target&&(e.relatedTarget=b.target,b.relatedTarget=g,e.target=g,b.target?(c.leaveOut(e),c.enterOver(b)):(b.target=g,b.relatedTarget=null,this.cancelOut(b))),d.out=b,d.outTarget=b.target}},touchend:function(a){this.dedupSynthMouse(a),this.processTouches(a,this.upOut)},upOut:function(a){this.scrolling||(c.up(a),c.out(a),c.leave(a)),this.cleanUpPointer(a)},touchcancel:function(a){this.processTouches(a,this.cancelOut)},cancelOut:function(a){c.cancel(a),c.out(a),c.leave(a),this.cleanUpPointer(a)},cleanUpPointer:function(a){f["delete"](a.pointerId),this.removePrimaryPointer(a)},dedupSynthMouse: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 f=function(a,b){var c=a.indexOf(b);c>-1&&a.splice(c,1)}.bind(null,c,e);setTimeout(f,h)}}};k||(b=new a.Installer(l.elementAdded,l.elementRemoved,l.elementChanged,l)),a.touchEvents=l}(window.PointerEventsPolyfill),function(a){var b=a.dispatcher,c=b.pointermap,d=window.MSPointerEvent&&"number"==typeof window.MSPointerEvent.MSPOINTER_TYPE_MOUSE,e={events:["MSPointerDown","MSPointerMove","MSPointerUp","MSPointerOut","MSPointerOver","MSPointerCancel","MSGotPointerCapture","MSLostPointerCapture"],register:function(a){b.listen(a,this.events)},unregister:function(a){b.unlisten(a,this.events)},POINTER_TYPES:["","unavailable","touch","pen","mouse"],prepareEvent:function(a){var c=a;return d&&(c=b.cloneEvent(a),c.pointerType=this.POINTER_TYPES[a.pointerType]),c},cleanup:function(a){c["delete"](a)},MSPointerDown:function(a){c.set(a.pointerId,a);var d=this.prepareEvent(a);b.down(d)},MSPointerMove:function(a){var c=this.prepareEvent(a);b.move(c)},MSPointerUp:function(a){var c=this.prepareEvent(a);b.up(c),this.cleanup(a.pointerId)},MSPointerOut:function(a){var c=this.prepareEvent(a);b.leaveOut(c)},MSPointerOver:function(a){var c=this.prepareEvent(a);b.enterOver(c)},MSPointerCancel:function(a){var c=this.prepareEvent(a);b.cancel(c),this.cleanup(a.pointerId)},MSLostPointerCapture:function(a){var c=b.makeEvent("lostpointercapture",a);b.dispatchEvent(c)},MSGotPointerCapture:function(a){var c=b.makeEvent("gotpointercapture",a);b.dispatchEvent(c)}};a.msEvents=e}(window.PointerEventsPolyfill),function(a){var b=a.dispatcher;if(void 0===window.navigator.pointerEnabled){if(Object.defineProperty(window.navigator,"pointerEnabled",{value:!0,enumerable:!0}),window.navigator.msPointerEnabled){var c=window.navigator.msMaxTouchPoints;Object.defineProperty(window.navigator,"maxTouchPoints",{value:c,enumerable:!0}),b.registerSource("ms",a.msEvents)}else b.registerSource("mouse",a.mouseEvents),void 0!==window.ontouchstart&&b.registerSource("touch",a.touchEvents);b.register(document)}}(window.PointerEventsPolyfill),function(a){function b(a){if(!e.pointermap.has(a))throw new Error("InvalidPointerId")}var c,d,e=a.dispatcher,f=window.navigator;f.msPointerEnabled?(c=function(a){b(a),this.msSetPointerCapture(a)},d=function(a){b(a),this.msReleasePointerCapture(a)}):(c=function(a){b(a),e.setCapture(a,this)},d=function(a){b(a),e.releaseCapture(a,this)}),window.Element&&!Element.prototype.setPointerCapture&&Object.defineProperties(Element.prototype,{setPointerCapture:{value:c},releasePointerCapture:{value:d}})}(window.PointerEventsPolyfill),PointerGestureEvent.prototype.preventTap=function(){this.tapPrevented=!0},function(a){a=a||{},a.utils={LCA:{find:function(a,b){if(a===b)return a;if(a.contains){if(a.contains(b))return a;if(b.contains(a))return b}var c=this.depth(a),d=this.depth(b),e=c-d;for(e>0?a=this.walk(a,e):b=this.walk(b,-e);a&&b&&a!==b;)a=this.walk(a,1),b=this.walk(b,1);return a},walk:function(a,b){for(var c=0;b>c;c++)a=a.parentNode;return a},depth:function(a){for(var b=0;a;)b++,a=a.parentNode;return b}}},a.findLCA=function(b,c){return a.utils.LCA.find(b,c)},window.PointerGestures=a}(window.PointerGestures),function(a){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=function(){return this.size};b.prototype={set:function(a,b){var c=this.keys.indexOf(a);c>-1?this.values[c]=b:(this.keys.push(a),this.values.push(b))},has:function(a){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.PointerGestures),function(a){var b=["bubbles","cancelable","view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget","buttons","pointerId","width","height","pressure","tiltX","tiltY","pointerType","hwTimestamp","isPrimary","type","target","currentTarget","screenX","screenY","pageX","pageY","tapPrevented"],c=[!1,!1,null,null,0,0,0,0,!1,!1,!1,!1,0,null,0,0,0,0,0,0,0,"",0,!1,"",null,null,0,0,0,0],d={handledEvents:new WeakMap,targets:new WeakMap,handlers:{},recognizers:{},events:{},registerRecognizer:function(a,b){var c=b;this.recognizers[a]=c,c.events.forEach(function(a){if(c[a]){this.events[a]=!0;var b=c[a].bind(c);this.addHandler(a,b)}},this)},addHandler:function(a,b){var c=a;this.handlers[c]||(this.handlers[c]=[]),this.handlers[c].push(b)},registerTarget:function(a){this.listen(Object.keys(this.events),a)},unregisterTarget:function(a){this.unlisten(Object.keys(this.events),a)},eventHandler:function(a){if(!this.handledEvents.get(a)){var b=a.type,c=this.handlers[b];c&&this.makeQueue(c,a),this.handledEvents.set(a,!0)}},makeQueue:function(a,b){var c=this.cloneEvent(b);requestAnimationFrame(this.runQueue.bind(this,a,c))},runQueue:function(a,b){this.currentPointerId=b.pointerId;for(var c,d=0,e=a.length;e>d&&(c=a[d]);d++)c(b);this.currentPointerId=0},listen:function(a,b){a.forEach(function(a){this.addEvent(a,this.boundHandler,!1,b)},this)},unlisten:function(a){a.forEach(function(a){this.removeEvent(a,this.boundHandler,!1,inTarget)},this)},addEvent:function(a,b,c,d){d.addEventListener(a,b,c)},removeEvent:function(a,b,c,d){d.removeEventListener(a,b,c)},makeEvent:function(a,b){return new PointerGestureEvent(a,b)},cloneEvent:function(a){for(var d,e={},f=0;f<b.length;f++)d=b[f],e[d]=a[d]||c[f];return e},dispatchEvent:function(a,b){var c=b||this.targets.get(a);c&&(c.dispatchEvent(a),a.tapPrevented&&this.preventTap(this.currentPointerId))},asyncDispatchEvent:function(a,b){requestAnimationFrame(this.dispatchEvent.bind(this,a,b))},preventTap:function(a){var b=this.recognizers.tap;b&&b.preventTap(a)}};d.boundHandler=d.eventHandler.bind(d),d.registerQueue=[],d.immediateRegister=!1,a.dispatcher=d,a.register=function(b){if(d.immediateRegister){var c=window.PointerEventsPolyfill;c&&c.register(b),a.dispatcher.registerTarget(b)}else d.registerQueue.push(b)},a.register(document)}(window.PointerGestures),function(a){var b=a.dispatcher,c={HOLD_DELAY:200,WIGGLE_THRESHOLD:16,events:["pointerdown","pointermove","pointerup","pointercancel"],heldPointer:null,holdJob:null,pulse:function(){var a=Date.now()-this.heldPointer.timeStamp,b=this.held?"holdpulse":"hold";this.fireHold(b,a),this.held=!0},cancel:function(){clearInterval(this.holdJob),this.held&&this.fireHold("release"),this.held=!1,this.heldPointer=null,this.target=null,this.holdJob=null},pointerdown:function(a){a.isPrimary&&!this.heldPointer&&(this.heldPointer=a,this.target=a.target,this.holdJob=setInterval(this.pulse.bind(this),this.HOLD_DELAY))},pointerup:function(a){this.heldPointer&&this.heldPointer.pointerId===a.pointerId&&this.cancel()},pointercancel:function(){this.cancel()},pointermove:function(a){if(this.heldPointer&&this.heldPointer.pointerId===a.pointerId){var b=a.clientX-this.heldPointer.clientX,c=a.clientY-this.heldPointer.clientY;b*b+c*c>this.WIGGLE_THRESHOLD&&this.cancel()}},fireHold:function(a,c){var d={pointerType:this.heldPointer.pointerType,clientX:this.heldPointer.clientX,clientY:this.heldPointer.clientY};c&&(d.holdTime=c);var e=b.makeEvent(a,d);b.dispatchEvent(e,this.target),e.tapPrevented&&b.preventTap(this.heldPointer.pointerId)}};b.registerRecognizer("hold",c)}(window.PointerGestures),function(a){var b=a.dispatcher,c=new a.PointerMap,d={events:["pointerdown","pointermove","pointerup","pointercancel"],WIGGLE_THRESHOLD:4,clampDir:function(a){return a>0?1:-1},calcPositionDelta:function(a,b){var c=0,d=0;return a&&b&&(c=b.pageX-a.pageX,d=b.pageY-a.pageY),{x:c,y:d}},fireTrack:function(a,c,d){var e=d,f=this.calcPositionDelta(e.downEvent,c),g=this.calcPositionDelta(e.lastMoveEvent,c);g.x&&(e.xDirection=this.clampDir(g.x)),g.y&&(e.yDirection=this.clampDir(g.y));var h={dx:f.x,dy:f.y,ddx:g.x,ddy:g.y,clientX:c.clientX,clientY:c.clientY,pageX:c.pageX,pageY:c.pageY,screenX:c.screenX,screenY:c.screenY,xDirection:e.xDirection,yDirection:e.yDirection,trackInfo:e.trackInfo,relatedTarget:c.target,pointerType:c.pointerType},i=b.makeEvent(a,h);e.lastMoveEvent=c,b.dispatchEvent(i,e.downTarget)},pointerdown:function(a){if(a.isPrimary&&("mouse"===a.pointerType?1===a.buttons:!0)){var b={downEvent:a,downTarget:a.target,trackInfo:{},lastMoveEvent:null,xDirection:0,yDirection:0,tracking:!1};c.set(a.pointerId,b)}},pointermove:function(a){var b=c.get(a.pointerId);if(b)if(b.tracking)this.fireTrack("track",a,b);else{var d=this.calcPositionDelta(b.downEvent,a),e=d.x*d.x+d.y*d.y;e>this.WIGGLE_THRESHOLD&&(b.tracking=!0,this.fireTrack("trackstart",b.downEvent,b),this.fireTrack("track",a,b))}},pointerup:function(a){var b=c.get(a.pointerId);b&&(b.tracking&&this.fireTrack("trackend",a,b),c.delete(a.pointerId))},pointercancel:function(a){this.pointerup(a)}};b.registerRecognizer("track",d)}(window.PointerGestures),function(a){var b=a.dispatcher,c={MIN_VELOCITY:.5,MAX_QUEUE:4,moveQueue:[],target:null,pointerId:null,events:["pointerdown","pointermove","pointerup","pointercancel"],pointerdown:function(a){a.isPrimary&&!this.pointerId&&(this.pointerId=a.pointerId,this.target=a.target,this.addMove(a))},pointermove:function(a){a.pointerId===this.pointerId&&this.addMove(a)},pointerup:function(a){a.pointerId===this.pointerId&&this.fireFlick(a),this.cleanup()},pointercancel:function(){this.cleanup()},cleanup:function(){this.moveQueue=[],this.target=null,this.pointerId=null},addMove:function(a){this.moveQueue.length>=this.MAX_QUEUE&&this.moveQueue.shift(),this.moveQueue.push(a)},fireFlick:function(a){for(var c,d,e,f,g,h,i,j=a,k=this.moveQueue.length,l=0,m=0,n=0,o=0;k>o&&(i=this.moveQueue[o]);o++)c=j.timeStamp-i.timeStamp,d=j.clientX-i.clientX,e=j.clientY-i.clientY,f=d/c,g=e/c,h=Math.sqrt(f*f+g*g),h>n&&(l=f,m=g,n=h);var p=Math.abs(l)>Math.abs(m)?"x":"y",q=this.calcAngle(l,m);if(Math.abs(n)>=this.MIN_VELOCITY){var r=b.makeEvent("flick",{xVelocity:l,yVelocity:m,velocity:n,angle:q,majorAxis:p,pointerType:a.pointerType});b.dispatchEvent(r,this.target)}},calcAngle:function(a,b){return 180*Math.atan2(b,a)/Math.PI}};b.registerRecognizer("flick",c)}(window.PointerGestures),function(a){var b=a.dispatcher,c=new a.PointerMap,d=180/Math.PI,e={events:["pointerdown","pointermove","pointerup","pointercancel"],reference:{},pointerdown:function(b){if(c.set(b.pointerId,b),2==c.pointers()){var d=this.calcChord(),e=this.calcAngle(d);this.reference={angle:e,diameter:d.diameter,target:a.findLCA(d.a.target,d.b.target)}}},pointerup:function(a){c.delete(a.pointerId)},pointermove:function(a){c.has(a.pointerId)&&(c.set(a.pointerId,a),c.pointers()>1&&this.calcPinchRotate())},pointercancel:function(a){this.pointerup(a)},dispatchPinch:function(a,c){var d=a/this.reference.diameter,e=b.makeEvent("pinch",{scale:d,centerX:c.center.x,centerY:c.center.y});b.dispatchEvent(e,this.reference.target)},dispatchRotate:function(a,c){var d=Math.round((a-this.reference.angle)%360),e=b.makeEvent("rotate",{angle:d,centerX:c.center.x,centerY:c.center.y});b.dispatchEvent(e,this.reference.target)},calcPinchRotate:function(){var a=this.calcChord(),b=a.diameter,c=this.calcAngle(a);b!=this.reference.diameter&&this.dispatchPinch(b,a),c!=this.reference.angle&&this.dispatchRotate(c,a)},calcChord:function(){var a=[];c.forEach(function(b){a.push(b)});for(var b,d,e,f=0,g={a:a[0],b:a[1]},h=0;h<a.length;h++)for(var i=a[h],j=h+1;j<a.length;j++){var k=a[j];b=Math.abs(i.clientX-k.clientX),d=Math.abs(i.clientY-k.clientY),e=b+d,e>f&&(f=e,g={a:i,b:k})}return b=Math.abs(g.a.clientX+g.b.clientX)/2,d=Math.abs(g.a.clientY+g.b.clientY)/2,g.center={x:b,y:d},g.diameter=f,g},calcAngle:function(a){var b=a.a.clientX-a.b.clientX,c=a.a.clientY-a.b.clientY;return(360+Math.atan2(c,b)*d)%360}};b.registerRecognizer("pinch",e)}(window.PointerGestures),function(a){var b=a.dispatcher,c=new a.PointerMap,d={events:["pointerdown","pointermove","pointerup","pointercancel","keyup"],pointerdown:function(a){a.isPrimary&&!a.tapPrevented&&c.set(a.pointerId,{target:a.target,buttons:a.buttons,x:a.clientX,y:a.clientY})},pointermove:function(a){if(a.isPrimary){var b=c.get(a.pointerId);b&&a.tapPrevented&&c.delete(a.pointerId)}},shouldTap:function(a,b){return a.tapPrevented?void 0:"mouse"===a.pointerType?1===b.buttons:!0},pointerup:function(d){var e=c.get(d.pointerId);if(e&&this.shouldTap(d,e)){var f=a.findLCA(e.target,d.target);if(f){var g=b.makeEvent("tap",{x:d.clientX,y:d.clientY,detail:d.detail,pointerType:d.pointerType});b.dispatchEvent(g,f)}}c.delete(d.pointerId)},pointercancel:function(a){c.delete(a.pointerId)},keyup:function(a){var c=a.keyCode;if(32===c){var d=a.target;d instanceof HTMLInputElement||d instanceof HTMLTextAreaElement||b.dispatchEvent(b.makeEvent("tap",{x:0,y:0,detail:0,pointerType:"unavailable"}),d)}},preventTap:function(a){c.delete(a)}};b.registerRecognizer("tap",d)}(window.PointerGestures),function(a){function b(){c.immediateRegister=!0;var b=c.registerQueue;b.forEach(a.register),b.length=0}var c=a.dispatcher;"complete"===document.readyState?b():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&b()})}(window.PointerGestures),function(){"use strict";function a(a){for(;a.parentNode;)a=a.parentNode;return"function"==typeof a.getElementById?a:null}function b(a,b,c){var d=a.bindings_;return d||(d=a.bindings_={}),d[b]&&c[b].close(),d[b]=c}function c(a,b,c){return c}function d(a){return null==a?"":a}function e(a,b){a.data=d(b)}function f(a){return function(b){return e(a,b)}}function g(a,b,c,e){return c?void(e?a.setAttribute(b,""):a.removeAttribute(b)):void a.setAttribute(b,d(e))}function h(a,b,c){return function(d){g(a,b,c,d)}}function i(a){switch(a.type){case"checkbox":return u;case"radio":case"select-multiple":case"select-one":return"change";case"range":if(/Trident|MSIE/.test(navigator.userAgent))return"change";default:return"input"}}function j(a,b,c,e){a[b]=(e||d)(c)}function k(a,b,c){return function(d){return j(a,b,d,c)}}function l(){}function m(a,b,c,d){function e(){c.setValue(a[b]),c.discardChanges(),(d||l)(a),Platform.performMicrotaskCheckpoint()}var f=i(a);return a.addEventListener(f,e),{close:function(){a.removeEventListener(f,e),c.close()},observable_:c}}function n(a){return Boolean(a)}function o(b){if(b.form)return s(b.form.elements,function(a){return a!=b&&"INPUT"==a.tagName&&"radio"==a.type&&a.name==b.name});var c=a(b);if(!c)return[];var d=c.querySelectorAll('input
[type
="radio"][name
="'+b.name+'"]');return s(d,function(a){return a!=b&&!a.form})}function p(a){"INPUT"===a.tagName&&"radio"===a.type&&o(a).forEach(function(a){var b=a.bindings_.checked;b&&b.observable_.setValue(!1)})}function q(a,b){var c,e,f,g=a.parentNode;g instanceof HTMLSelectElement&&g.bindings_&&g.bindings_.value&&(c=g,e=c.bindings_.value,f=c.value),a.value=d(b),c&&c.value!=f&&(e.observable_.setValue(c.value),e.observable_.discardChanges(),Platform.performMicrotaskCheckpoint())}function r(a){return function(b){q(a,b)}}var s=Array.prototype.filter.call.bind(Array.prototype.filter);Node.prototype.bind=function(a,b){console.error("Unhandled binding to Node: ",this,a,b)};var t=c;Object.defineProperty(Platform,"enableBindingsReflection",{get:function(){return t===b},set:function(a){return t=a?b:c,a},configurable:!0}),Text.prototype.bind=function(a,b,c){if("textContent"!==a)return Node.prototype.bind.call(this,a,b,c);
46 if(c)return e(this,b);var d=b;return e(this,d.open(f(this))),t(this,a,d)},Element.prototype.bind=function(a,b,c){var d="?"==a[a.length-1];if(d&&(this.removeAttribute(a),a=a.slice(0,-1)),c)return g(this,a,d,b);var e=b;return g(this,a,d,e.open(h(this,a,d))),t(this,a,e)};var u;!function(){var a=document.createElement("div"),b=a.appendChild(document.createElement("input"));b.setAttribute("type","checkbox");var c,d=0;b.addEventListener("click",function(){d++,c=c||"click"}),b.addEventListener("change",function(){d++,c=c||"change"});var e=document.createEvent("MouseEvent");e.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),b.dispatchEvent(e),u=1==d?"change":c}(),HTMLInputElement.prototype.bind=function(a,c,e){if("value"!==a&&"checked"!==a)return HTMLElement.prototype.bind.call(this,a,c,e);this.removeAttribute(a);var f="checked"==a?n:d,g="checked"==a?p:l;if(e)return j(this,a,c,f);var h=c,i=m(this,a,h,g);return j(this,a,h.open(k(this,a,f)),f),b(this,a,i)},HTMLTextAreaElement.prototype.bind=function(a,b,c){if("value"!==a)return HTMLElement.prototype.bind.call(this,a,b,c);if(this.removeAttribute("value"),c)return j(this,"value",b);var e=b,f=m(this,"value",e);return j(this,"value",e.open(k(this,"value",d))),t(this,a,f)},HTMLOptionElement.prototype.bind=function(a,b,c){if("value"!==a)return HTMLElement.prototype.bind.call(this,a,b,c);if(this.removeAttribute("value"),c)return q(this,b);var d=b,e=m(this,"value",d);return q(this,d.open(r(this))),t(this,a,e)},HTMLSelectElement.prototype.bind=function(a,c,d){if("selectedindex"===a&&(a="selectedIndex"),"selectedIndex"!==a&&"value"!==a)return HTMLElement.prototype.bind.call(this,a,c,d);if(this.removeAttribute(a),d)return j(this,a,c);var e=c,f=m(this,a,e);return j(this,a,e.open(k(this,a))),b(this,a,f)}}(this),function(a){"use strict";function b(a){if(!a)throw new Error("Assertion failed")}function c(a){for(var b;b=a.parentNode;)a=b;return a}function d(a,b){if(b){for(var d,e="#"+b;!d&&(a=c(a),a.protoContent_?d=a.protoContent_.querySelector(e):a.getElementById&&(d=a.getElementById(b)),!d&&a.templateCreator_);)a=a.templateCreator_;return d}}function e(a){return"template"==a.tagName&&"http://www.w3.org/2000/svg"==a.namespaceURI}function f(a){return"TEMPLATE"==a.tagName&&"http://www.w3.org/1999/xhtml"==a.namespaceURI}function g(a){return Boolean(J[a.tagName]&&a.hasAttribute("template"))}function h(a){return void 0===a.isTemplate_&&(a.isTemplate_="TEMPLATE"==a.tagName||g(a)),a.isTemplate_}function i(a,b){var c=a.querySelectorAll(L);h(a)&&b(a),E(c,b)}function j(a){function b(a){HTMLTemplateElement.decorate(a)||j(a.content)}i(a,b)}function k(a,b){Object.getOwnPropertyNames(b).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))})}function l(a){var b=a.ownerDocument;if(!b.defaultView)return b;var c=b.templateContentsOwner_;if(!c){for(c=b.implementation.createHTMLDocument("");c.lastChild;)c.removeChild(c.lastChild);b.templateContentsOwner_=c}return c}function m(a){if(!a.stagingDocument_){var b=a.ownerDocument;if(!b.stagingDocument_){b.stagingDocument_=b.implementation.createHTMLDocument("");var c=b.stagingDocument_.createElement("base");c.href=document.baseURI,b.stagingDocument_.head.appendChild(c),b.stagingDocument_.stagingDocument_=b.stagingDocument_}a.stagingDocument_=b.stagingDocument_}return a.stagingDocument_}function n(a){var b=a.ownerDocument.createElement("template");a.parentNode.insertBefore(b,a);for(var c=a.attributes,d=c.length;d-->0;){var e=c[d];I[e.name]&&("template"!==e.name&&b.setAttribute(e.name,e.value),a.removeAttribute(e.name))}return b}function o(a){var b=a.ownerDocument.createElement("template");a.parentNode.insertBefore(b,a);for(var c=a.attributes,d=c.length;d-->0;){var e=c[d];b.setAttribute(e.name,e.value),a.removeAttribute(e.name)}return a.parentNode.removeChild(a),b}function p(a,b,c){var d=a.content;if(c)return void d.appendChild(b);for(var e;e=b.firstChild;)d.appendChild(e)}function q(a){N?a.__proto__=HTMLTemplateElement.prototype:k(a,HTMLTemplateElement.prototype)}function r(a){a.setModelFn_||(a.setModelFn_=function(){a.setModelFnScheduled_=!1;var b=z(a,a.delegate_&&a.delegate_.prepareBinding);w(a,b,a.model_)}),a.setModelFnScheduled_||(a.setModelFnScheduled_=!0,Observer.runEOM_(a.setModelFn_))}function s(a,b,c,d){if(a&&a.length){for(var e,f=a.length,g=0,h=0,i=0,j=!0;f>h;){var g=a.indexOf("{{",h),k=a.indexOf("[[",h),l=!1,m="}}";if(k>=0&&(0>g||g>k)&&(g=k,l=!0,m="]]"),i=0>g?-1:a.indexOf(m,g+2),0>i){if(!e)return;e.push(a.slice(h));break}e=e||[],e.push(a.slice(h,g));var n=a.slice(g+2,i).trim();e.push(l),j=j&&l,e.push(Path.get(n));var o=d&&d(n,b,c);e.push(o),h=i+2}return h===f&&e.push(""),e.hasOnePath=5===e.length,e.isSimplePath=e.hasOnePath&&""==e[0]&&""==e[4],e.onlyOneTime=j,e.combinator=function(a){for(var b=e[0],c=1;c<e.length;c+=4){var d=e.hasOnePath?a:a[(c-1)/4];void 0!==d&&(b+=d),b+=e[c+3]}return b},e}}function t(a,b,c,d){if(b.hasOnePath){var e=b[3],f=e?e(d,c,!0):b[2].getValueFrom(d);return b.isSimplePath?f:b.combinator(f)}for(var g=[],h=1;h<b.length;h+=4){var e=b[h+2];g[(h-1)/4]=e?e(d,c):b[h+1].getValueFrom(d)}return b.combinator(g)}function u(a,b,c,d){var e=b[3],f=e?e(d,c,!1):new PathObserver(d,b[2]);return b.isSimplePath?f:new ObserverTransform(f,b.combinator)}function v(a,b,c,d){if(b.onlyOneTime)return t(a,b,c,d);if(b.hasOnePath)return u(a,b,c,d);for(var e=new CompoundObserver,f=1;f<b.length;f+=4){var g=b[f],h=b[f+2];if(h){var i=h(d,c,g);g?e.addPath(i):e.addObserver(i)}else{var j=b[f+1];g?e.addPath(j.getValueFrom(d)):e.addPath(d,j)}}return new ObserverTransform(e,b.combinator)}function w(a,b,c,d){for(var e=0;e<b.length;e+=2){var f=b[e],g=b[e+1],h=v(f,g,a,c),i=a.bind(f,h,g.onlyOneTime);i&&d&&d.push(i)}if(b.isTemplate){a.model_=c;var j=a.processBindingDirectives_(b);d&&j&&d.push(j)}}function x(a,b,c){var d=a.getAttribute(b);return s(""==d?"{{}}":d,b,a,c)}function y(a,c){b(a);for(var d=[],e=0;e<a.attributes.length;e++){for(var f=a.attributes[e],g=f.name,i=f.value;"_"===g[0];)g=g.substring(1);if(!h(a)||g!==H&&g!==F&&g!==G){var j=s(i,g,a,c);j&&d.push(g,j)}}return h(a)&&(d.isTemplate=!0,d.if=x(a,H,c),d.bind=x(a,F,c),d.repeat=x(a,G,c),!d.if||d.bind||d.repeat||(d.bind=s("{{}}",F,a,c))),d}function z(a,b){if(a.nodeType===Node.ELEMENT_NODE)return y(a,b);if(a.nodeType===Node.TEXT_NODE){var c=s(a.data,"textContent",a,b);if(c)return["textContent",c]}return[]}function A(a,b,c,d,e,f,g){for(var h=b.appendChild(c.importNode(a,!1)),i=0,j=a.firstChild;j;j=j.nextSibling)A(j,h,c,d.children[i++],e,f,g);return d.isTemplate&&(HTMLTemplateElement.decorate(h,a),f&&h.setDelegate_(f)),w(h,d,e,g),h}function B(a,b){var c=z(a,b);c.children={};for(var d=0,e=a.firstChild;e;e=e.nextSibling)c.children[d++]=B(e,b);return c}function C(a){this.closed=!1,this.templateElement_=a,this.instances=[],this.deps=void 0,this.iteratedValue=[],this.presentValue=void 0,this.arrayObserver=void 0}var D,E=Array.prototype.forEach.call.bind(Array.prototype.forEach);a.Map&&"function"==typeof a.Map.prototype.forEach?D=a.Map:(D=function(){this.keys=[],this.values=[]},D.prototype={set:function(a,b){var c=this.keys.indexOf(a);0>c?(this.keys.push(a),this.values.push(b)):this.values[c]=b},get:function(a){var b=this.keys.indexOf(a);if(!(0>b))return this.values[b]},"delete":function(a){var b=this.keys.indexOf(a);return 0>b?!1:(this.keys.splice(b,1),this.values.splice(b,1),!0)},forEach:function(a,b){for(var c=0;c<this.keys.length;c++)a.call(b||this,this.values[c],this.keys[c],this)}});"function"!=typeof document.contains&&(Document.prototype.contains=function(a){return a===this||a.parentNode===this?!0:this.documentElement.contains(a)});var F="bind",G="repeat",H="if",I={template:!0,repeat:!0,bind:!0,ref:!0},J={THEAD:!0,TBODY:!0,TFOOT:!0,TH:!0,TR:!0,TD:!0,COLGROUP:!0,COL:!0,CAPTION:!0,OPTION:!0,OPTGROUP:!0},K="undefined"!=typeof HTMLTemplateElement;K&&!function(){var a=document.createElement("template"),b=a.content.ownerDocument,c=b.appendChild(b.createElement("html")),d=c.appendChild(b.createElement("head")),e=b.createElement("base");e.href=document.baseURI,d.appendChild(e)}();var L="template, "+Object.keys(J).map(function(a){return a.toLowerCase()+"[template]"}).join(", ");document.addEventListener("DOMContentLoaded",function(){j(document),Platform.performMicrotaskCheckpoint()},!1),K||(a.HTMLTemplateElement=function(){throw TypeError("Illegal constructor")});var M,N="__proto__"in{};"function"==typeof MutationObserver&&(M=new MutationObserver(function(a){for(var b=0;b<a.length;b++)a[b].target.refChanged_()})),HTMLTemplateElement.decorate=function(a,c){if(a.templateIsDecorated_)return!1;var d=a;d.templateIsDecorated_=!0;var h=f(d)&&K,i=h,k=!h,m=!1;if(h||(g(d)?(b(!c),d=n(a),d.templateIsDecorated_=!0,h=K,m=!0):e(d)&&(d=o(a),d.templateIsDecorated_=!0,h=K)),!h){q(d);var r=l(d);d.content_=r.createDocumentFragment()}return c?d.instanceRef_=c:k?p(d,a,m):i&&j(d.content),!0},HTMLTemplateElement.bootstrap=j;var O=a.HTMLUnknownElement||HTMLElement,P={get:function(){return this.content_},enumerable:!0,configurable:!0};K||(HTMLTemplateElement.prototype=Object.create(O.prototype),Object.defineProperty(HTMLTemplateElement.prototype,"content",P)),k(HTMLTemplateElement.prototype,{bind:function(a,b,c){if("ref"!=a)return Element.prototype.bind.call(this,a,b,c);var d=this,e=c?b:b.open(function(a){d.setAttribute("ref",a),d.refChanged_()});return this.setAttribute("ref",e),this.refChanged_(),c?void 0:(this.bindings_?this.bindings_.ref=b:this.bindings_={ref:b},b)},processBindingDirectives_:function(a){return this.iterator_&&this.iterator_.closeDeps(),a.if||a.bind||a.repeat?(this.iterator_||(this.iterator_=new C(this)),this.iterator_.updateDependencies(a,this.model_),M&&M.observe(this,{attributes:!0,attributeFilter:["ref"]}),this.iterator_):void(this.iterator_&&(this.iterator_.close(),this.iterator_=void 0))},createInstance:function(a,b,c){b&&(c=this.newDelegate_(b)),this.refContent_||(this.refContent_=this.ref_.content);var d=this.refContent_;if(null===d.firstChild)return Q;var e=this.bindingMap_;e&&e.content===d||(e=B(d,c&&c.prepareBinding)||[],e.content=d,this.bindingMap_=e);var f=m(this),g=f.createDocumentFragment();g.templateCreator_=this,g.protoContent_=d,g.bindings_=[],g.terminator_=null;for(var h=g.templateInstance_={firstNode:null,lastNode:null,model:a},i=0,j=!1,k=d.firstChild;k;k=k.nextSibling){null===k.nextSibling&&(j=!0);var l=A(k,g,f,e.children[i++],a,c,g.bindings_);l.templateInstance_=h,j&&(g.terminator_=l)}return h.firstNode=g.firstChild,h.lastNode=g.lastChild,g.templateCreator_=void 0,g.protoContent_=void 0,g},get model(){return this.model_},set model(a){this.model_=a,r(this)},get bindingDelegate(){return this.delegate_&&this.delegate_.raw},refChanged_:function(){this.iterator_&&this.refContent_!==this.ref_.content&&(this.refContent_=void 0,this.iterator_.valueChanged(),this.iterator_.updateIteratedValue())},clear:function(){this.model_=void 0,this.delegate_=void 0,this.bindings_&&this.bindings_.ref&&this.bindings_.ref.close(),this.refContent_=void 0,this.iterator_&&(this.iterator_.valueChanged(),this.iterator_.close(),this.iterator_=void 0)},setDelegate_:function(a){this.delegate_=a,this.bindingMap_=void 0,this.iterator_&&(this.iterator_.instancePositionChangedFn_=void 0,this.iterator_.instanceModelFn_=void 0)},newDelegate_:function(a){function b(b){var c=a&&a[b];if("function"==typeof c)return function(){return c.apply(a,arguments)}}return a?{raw:a,prepareBinding:b("prepareBinding"),prepareInstanceModel:b("prepareInstanceModel"),prepareInstancePositionChanged:b("prepareInstancePositionChanged")}:{}},set bindingDelegate(a){if(this.delegate_)throw Error("Template must be cleared before a new bindingDelegate can be assigned");this.setDelegate_(this.newDelegate_(a))},get ref_(){var a=d(this,this.getAttribute("ref"));if(a||(a=this.instanceRef_),!a)return this;var b=a.ref_;return b?b:a}}),Object.defineProperty(Node.prototype,"templateInstance",{get:function(){var a=this.templateInstance_;return a?a:this.parentNode?this.parentNode.templateInstance:void 0}});var Q=document.createDocumentFragment();Q.bindings_=[],Q.terminator_=null,C.prototype={closeDeps:function(){var a=this.deps;a&&(a.ifOneTime===!1&&a.ifValue.close(),a.oneTime===!1&&a.value.close())},updateDependencies:function(a,b){this.closeDeps();var c=this.deps={},d=this.templateElement_;if(a.if){if(c.hasIf=!0,c.ifOneTime=a.if.onlyOneTime,c.ifValue=v(H,a.if,d,b),c.ifOneTime&&!c.ifValue)return void this.updateIteratedValue();c.ifOneTime||c.ifValue.open(this.updateIteratedValue,this)}a.repeat?(c.repeat=!0,c.oneTime=a.repeat.onlyOneTime,c.value=v(G,a.repeat,d,b)):(c.repeat=!1,c.oneTime=a.bind.onlyOneTime,c.value=v(F,a.bind,d,b)),c.oneTime||c.value.open(this.updateIteratedValue,this),this.updateIteratedValue()},updateIteratedValue:function(){if(this.deps.hasIf){var a=this.deps.ifValue;if(this.deps.ifOneTime||(a=a.discardChanges()),!a)return void this.valueChanged()}var b=this.deps.value;this.deps.oneTime||(b=b.discardChanges()),this.deps.repeat||(b=[b]);var c=this.deps.repeat&&!this.deps.oneTime&&Array.isArray(b);this.valueChanged(b,c)},valueChanged:function(a,b){Array.isArray(a)||(a=[]),a!==this.iteratedValue&&(this.unobserve(),this.presentValue=a,b&&(this.arrayObserver=new ArrayObserver(this.presentValue),this.arrayObserver.open(this.handleSplices,this)),this.handleSplices(ArrayObserver.calculateSplices(this.presentValue,this.iteratedValue)))},getLastInstanceNode:function(a){if(-1==a)return this.templateElement_;var b=this.instances[a],c=b.terminator_;if(!c)return this.getLastInstanceNode(a-1);if(c.nodeType!==Node.ELEMENT_NODE||this.templateElement_===c)return c;var d=c.iterator_;return d?d.getLastTemplateNode():c},getLastTemplateNode:function(){return this.getLastInstanceNode(this.instances.length-1)},insertInstanceAt:function(a,b){var c=this.getLastInstanceNode(a-1),d=this.templateElement_.parentNode;this.instances.splice(a,0,b),d.insertBefore(b,c.nextSibling)},extractInstanceAt:function(a){for(var b=this.getLastInstanceNode(a-1),c=this.getLastInstanceNode(a),d=this.templateElement_.parentNode,e=this.instances.splice(a,1)[0];c!==b;){var f=b.nextSibling;f==c&&(c=b),e.appendChild(d.removeChild(f))}return e},getDelegateFn:function(a){return a=a&&a(this.templateElement_),"function"==typeof a?a:null},handleSplices:function(a){if(!this.closed&&a.length){var b=this.templateElement_;if(!b.parentNode)return void this.close();ArrayObserver.applySplices(this.iteratedValue,this.presentValue,a);var c=b.delegate_;void 0===this.instanceModelFn_&&(this.instanceModelFn_=this.getDelegateFn(c&&c.prepareInstanceModel)),void 0===this.instancePositionChangedFn_&&(this.instancePositionChangedFn_=this.getDelegateFn(c&&c.prepareInstancePositionChanged));for(var d=new D,e=0,f=0;f<a.length;f++){for(var g=a[f],h=g.removed,i=0;i<h.length;i++){var j=h[i],k=this.extractInstanceAt(g.index+e);k!==Q&&d.set(j,k)}e-=g.addedCount}for(var f=0;f<a.length;f++)for(var g=a[f],l=g.index;l<g.index+g.addedCount;l++){var j=this.iteratedValue[l],k=d.get(j);k?d.delete(j):(this.instanceModelFn_&&(j=this.instanceModelFn_(j)),k=void 0===j?Q:b.createInstance(j,void 0,c)),this.insertInstanceAt(l,k)}d.forEach(function(a){this.closeInstanceBindings(a)},this),this.instancePositionChangedFn_&&this.reportInstancesMoved(a)}},reportInstanceMoved:function(a){var b=this.instances[a];b!==Q&&this.instancePositionChangedFn_(b.templateInstance_,a)},reportInstancesMoved:function(a){for(var b=0,c=0,d=0;d<a.length;d++){var e=a[d];if(0!=c)for(;b<e.index;)this.reportInstanceMoved(b),b++;else b=e.index;for(;b<e.index+e.addedCount;)this.reportInstanceMoved(b),b++;c+=e.addedCount-e.removed.length}if(0!=c)for(var f=this.instances.length;f>b;)this.reportInstanceMoved(b),b++},closeInstanceBindings:function(a){for(var b=a.bindings_,c=0;c<b.length;c++)b[c].close()},unobserve:function(){this.arrayObserver&&(this.arrayObserver.close(),this.arrayObserver=void 0)},close:function(){if(!this.closed){this.unobserve();for(var a=0;a<this.instances.length;a++)this.closeInstanceBindings(this.instances[a]);this.instances.length=0,this.closeDeps(),this.templateElement_.iterator_=void 0,this.closed=!0}}},HTMLTemplateElement.forAllTemplatesFrom_=i}(this),function(a){"use strict";function b(a,b){if(!a)throw new Error("ASSERT: "+b)}function c(a){return a>=48&&57>=a}function d(a){return 32===a||9===a||11===a||12===a||160===a||a>=5760&&"áš€á Žâ€€â€â€‚         âŸã€€ï»¿".indexOf(String.fromCharCode(a))>0}function e(a){return 10===a||13===a||8232===a||8233===a}function f(a){return 36===a||95===a||a>=65&&90>=a||a>=97&&122>=a}function g(a){return 36===a||95===a||a>=65&&90>=a||a>=97&&122>=a||a>=48&&57>=a}function h(a){return"this"===a}function i(){for(;Y>X&&d(W.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.NullLiteral:"true"===b||"false"===b?S.BooleanLiteral:S.Identifier,{type:c,value:b,range:[a,X]}}function l(){var a,b,c=X,d=W.charCodeAt(X),e=W[X];switch(d){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63: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.fromCharCode(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]}}}return b=W[X+1],e===b&&"&|".indexOf(e)>=0?(X+=2,{type:S.Punctuator,value:e+b,range:[c,X]}):"<>=!+-*%&|^/".indexOf(e)>=0?(++X,{type:S.Punctuator,value:e,range:[c,X]}):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 decimal point"),d=X,a="","."!==e){for(a=W[X++],e=W[X],"0"===a&&e&&c(e.charCodeAt(0))&&s({},V.UnexpectedToken,"ILLEGAL");c(W.charCodeAt(X));)a+=W[X++];e=W[X]}if("."===e){for(a+=W[X++];c(W.charCodeAt(X));)a+=W[X++];e=W[X]}if("e"===e||"E"===e)if(a+=W[X++],e=W[X],("+"===e||"-"===e)&&(a+=W[X++]),c(W.charCodeAt(X)))for(;c(W.charCodeAt(X));)a+=W[X++];else s({},V.UnexpectedToken,"ILLEGAL");return f(W.charCodeAt(X))&&s({},V.UnexpectedToken,"ILLEGAL"),{type:S.NumericLiteral,value:parseFloat(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+="\v";break;default:f+=d}else{if(e(d.charCodeAt(0)))break;f+=d}}return""!==a&&s({},V.UnexpectedToken,"ILLEGAL"),{type:S.StringLiteral,value:f,octal:g,range:[c,X]}}function o(a){return a.type===S.Identifier||a.type===S.Keyword||a.type===S.BooleanLiteral||a.type===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.range[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){return 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)}function u(a){var b=q();(b.type!==S.Punctuator||b.value!==a)&&t(b)}function v(a){return $.type===S.Punctuator&&$.value===a}function w(a){return $.type===S.Keyword&&$.value===a}function x(){var a=[];for(u("[");!v("]");)v(",")?(q(),a.push(null)):(a.push(bb()),v("]")||u(","));return u("]"),Z.createArrayExpression(a)}function y(){var a;return i(),a=q(),a.type===S.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.Identifier?c=Z.createIdentifier(q().value):a===S.StringLiteral||a===S.NumericLiteral?c=Z.createLiteral(q()):a===S.Keyword?w("this")&&(q(),c=Z.createThisExpression()):a===S.BooleanLiteral?(b=q(),b.value="true"===b.value,c=Z.createLiteral(b)):a===S.NullLiteral?(b=q(),b.value=null,c=Z.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;return u("["),a=bb(),u("]"),a}function H(){var a,b;for(a=C();v(".")||v("[");)v("[")?(b=G(),a=Z.createMemberExpression("[",a,b)):(b=F(),a=Z.createMemberExpression(".",a,b));return a}function I(){var a,b;return $.type!==S.Punctuator&&$.type!==S.Keyword?b=ab():v("+")||v("-")||v("!")?(a=q(),b=I(),b=Z.createUnaryExpression(a.value,b)):w("delete")||w("void")||w("typeof")?s({},V.UnexpectedToken):b=ab(),b}function 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}function K(){var a,b,c,d,e,f,g,h;if(g=I(),b=$,c=J(b),0===c)return g;for(b.prec=c,q(),e=I(),d=[g,b,e];(c=J($))>0;){for(;d.length>2&&c<=d[d.length-2].prec;)e=d.pop(),f=d.pop().value,g=d.pop(),a=Z.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.createBinaryExpression(d[h-1].value,d[h-2],a),h-=2;return a}function L(){var a,b,c;return a=K(),v("?")&&(q(),b=L(),u(":"),c=L(),a=Z.createConditionalExpression(a,b,c)),a}function M(){var a,b;return a=q(),a.type!==S.Identifier&&t(a),b=v("(")?D():[],Z.createFilter(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(),$.type!==S.Identifier&&t($),b=q().value),q();var c=bb();N(),Z.createInExpression(a.name,b,c)}function R(a,b){return Z=b,W=a,X=0,Y=W.length,$=null,_={labelSet:{}},O()}var S,T,U,V,W,X,Y,Z,$,_;S={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8},T={},T[S.BooleanLiteral]="Boolean",T[S.EOF]="<end>",T[S.Identifier]="Identifier",T[S.Keyword]="Keyword",T[S.NullLiteral]="Null",T[S.NumericLiteral]="Numeric",T[S.Punctuator]="Punctuator",T[S.StringLiteral]="String",U={ArrayExpression:"ArrayExpression",BinaryExpression:"BinaryExpression",CallExpression:"CallExpression",ConditionalExpression:"ConditionalExpression",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",Identifier:"Identifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ThisExpression:"ThisExpression",UnaryExpression:"UnaryExpression"},V={UnexpectedToken:"Unexpected token %0",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared"};var ab=H,bb=L;a.esprima={parse:R}}(this),function(a){"use strict";function b(a,b,d,e){var f;try{if(f=c(a),f.scopeIdent&&(d.nodeType!==Node.ELEMENT_NODE||"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.polymerExpressionScopeIdent_=f.scopeIdent,f.indexIdent&&(b.polymerExpressionIndexIdent_=f.indexIdent)),d}}function c(a){var b=s[a];if(!b){var c=new j;esprima.parse(a,c),b=new l(c),s[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){"["==c&&b instanceof d&&Path.get(b.value).valid&&(c=".",b=new e(b.value)),this.dynamicDeps="function"==typeof a||a.dynamic,this.dynamic="function"==typeof b||b.dynamic||"["==c,this.simplePath=!this.dynamic&&!this.dynamicDeps&&b instanceof 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.expression=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}function l(a){if(this.scopeIdent=a.scopeIdent,this.indexIdent=a.indexIdent,!a.expression)throw Error("No expression found.");this.expression=a.expression,i(this.expression),this.filters=a.filters,this.dynamicDeps=a.dynamicDeps}function m(a){return String(a).replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()})}function n(a){return"o"===a[0]&&"n"===a[1]&&"-"===a[2]}function o(a,b){for(;a[w]&&!Object.prototype.hasOwnProperty.call(a,b);)a=a[w];return a}function p(a,b){if(0==b.length)return void 0;if(1==b.length)return o(a,b[0]);for(var c=0;null!=a&&c<b.length-1;c++)a=a[b[c]];return a}function q(a,b,c){var d=b.substring(3);return d=v[d]||d,function(b,e,f){function g(){return"{{ "+a+" }}"}var h,i,j;return j="function"==typeof c.resolveEventHandler?function(d){h=h||c.resolveEventHandler(b,a,e),h(d,d.detail,d.currentTarget),Platform&&"function"==typeof Platform.flush&&Platform.flush()}:function(c){h=h||a.getValueFrom(b),i=i||p(b,a,e),h.apply(i,[c,c.detail,c.currentTarget]),Platform&&"function"==typeof Platform.flush&&Platform.flush()},e.addEventListener(d,j),f?void 0:{open:g,discardChanges:g,close:function(){e.removeEventListener(d,j)}}}}function r(){}var s=Object.create(null);d.prototype={valueFn:function(){if(!this.valueFn_){var a=this.value;this.valueFn_=function(){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.addPath(b,a),a.getValueFrom(b)}}return this.valueFn_},setValue:function(a,b){return 1==this.path.length,a=o(a,this.path[0]),this.path.setValueFrom(a,b)}},f.prototype={get fullPath(){if(!this.fullPath_){var a=this.object instanceof e?this.object.name:this.object.fullPath;this.fullPath_=Path.get(a+"."+this.property.name)}return 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.addPath(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.addPath(e,b),b.getValueFrom(e)}}else{var c=this.property;this.valueFn_=function(b,d){var e=a(b,d),f=c(b,d);return d&&d.addPath(e,f),e?e[f]:void 0}}}return this.valueFn_},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":"toDOM")+" found on"+this.name);for(var h=[a],j=0;j<this.args.length;j++)h[j+1]=i(this.args[j])(d,e);return f.apply(g,h)}};var t={"+":function(a){return+a},"-":function(a){return-a},"!":function(a){return!a}},u={"+":function(a,b){return a+b},"-":function(a,b){return a-b},"*":function(a,b){return a*b},"/":function(a,b){return a/b},"%":function(a,b){return a%b},"<":function(a,b){return b>a},">":function(a,b){return a>b},"<=":function(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},"!==":function(a,b){return a!==b},"&&":function(a,b){return a&&b},"||":function(a,b){return a||b}};j.prototype={createUnaryExpression:function(a,b){if(!t[a])throw Error("Disallowed operator: "+a);return b=i(b),function(c,d){return t[a](b(c,d))}},createBinaryExpression:function(a,b,c){if(!u[a])throw Error("Disallowed operator: "+a);return b=i(b),c=i(c),function(d,e){return u[a](b(d,e),c(d,e))}},createConditionalExpression:function(a,b,c){return a=i(a),b=i(b),c=i(c),function(d,e){return a(d,e)?b(d,e):c(d,e)}},createIdentifier:function(a){var b=new e(a);return b.type="Identifier",b},createMemberExpression:function(a,b,c){var d=new f(b,c,a);return 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));return 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].value=i(a[b].value);return function(b,c){for(var d={},e=0;e<a.length;e++)d[a[e].key]=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},createInExpression:function(a,b,c){this.expression=c,this.scopeIdent=a,this.indexIdent=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:function(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 ObserverTransform(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.expression.setValue(a,b):void 0}};var v={};["webkitAnimationStart","webkitAnimationEnd","webkitTransitionEnd","DOMFocusOut","DOMFocusIn","DOMMouseScroll"].forEach(function(a){v[a.toLowerCase()]=a});var w="@"+Math.random().toString(36).slice(2);r.prototype={styleObject:function(a){var b=[];for(var c in a)b.push(m(c)+": "+a[c]);return 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.polymerExpressionIndexIdent_;if(b)return function(a,c){a.model[b]=c}},prepareBinding:function(a,c,d){var e=Path.get(a);if(n(c))return e.valid?q(e,c,this):void console.error("on-* bindings must be simple path expressions");{if(!e.valid)return b(a,c,d,this);if(1==e.length)return function(a,b,c){if(c)return e.getValueFrom(a);var d=o(a,e[0]);return new PathObserver(d,e)}}},prepareInstanceModel:function(a){var b=a.polymerExpressionScopeIdent_;if(b){var c=a.templateInstance?a.templateInstance.model:a.model,d=a.polymerExpressionIndexIdent_;return function(a){var e=Object.create(c);return e[b]=a,e[d]=void 0,e[w]=c,e}}}},a.PolymerExpressions=r,a.exposeGetExpression&&(a.getExpression_=c),a.PolymerExpressions.prepareEventBinding=q}(this),function(a){function b(){e||(e=!0,a.endOfMicrotask(function(){e=!1,logFlags.data&&console.group("Platform.flush()"),a.performMicrotaskCheckpoint(),logFlags.data&&console.groupEnd()}))}var c=document.createElement("style");
47 c.textContent="template {display: none !important;} /* injected by platform.js */";var d=document.querySelector("head");d.insertBefore(c,d.firstChild);var e,f=125;if(window.addEventListener("WebComponentsReady",function(){b(),Observer.hasObjectObserve||(a.flushPoll=setInterval(b,f))}),window.CustomElements&&!CustomElements.useNative){var g=Document.prototype.importNode;Document.prototype.importNode=function(a,b){var c=g.call(this,a,b);return CustomElements.upgradeAll(c),c}}a.flush=b}(window.Platform);
48 //# sourceMappingURL=platform.js.map</script>
49 <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
57 Copyright 2013 The Polymer Authors. All rights reserved.
58 Use of this source code is governed by a BSD-style
59 license that can be found in the LICENSE file.
63 * Copyright (c) 2012-2014 The Polymer Authors. All rights reserved.
65 * Redistribution and use in source and binary forms, with or without
66 * modification, are permitted provided that the following conditions are
69 * * Redistributions of source code must retain the above copyright
70 * notice, this list of conditions and the following disclaimer.
71 * * Redistributions in binary form must reproduce the above
72 * copyright notice, this list of conditions and the following disclaimer
73 * in the documentation and/or other materials provided with the
75 * * Neither the name of Google Inc. nor the names of its
76 * contributors may be used to endorse or promote products derived from
77 * this software without specific prior written permission.
79 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
80 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
81 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
82 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
83 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
84 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
85 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
86 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
87 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
88 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
89 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
91 // @version: 0.2.1-c690632
92 Polymer={},"function"==typeof window.Polymer&&(Polymer={}),function(a){function b(a,b){return a&&b&&Object.getOwnPropertyNames(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.complete.bind(this)};c.prototype={go:function(a,b){this.callback=a;var c;b?(c=setTimeout(this.boundComplete,b),this.handle=function(){clearTimeout(c)}):(c=requestAnimationFrame(this.boundComplete),this.handle=function(){cancelAnimationFrame(c)})},stop:function(){this.handle&&(this.handle(),this.handle=null)},complete:function(){this.handle&&(this.stop(),this.callback.call(this.context))}},a.job=b}(Polymer),function(){var a={};HTMLElement.register=function(b,c){a[b]=c},HTMLElement.getPrototypeForTag=function(b){var c=b?a[b]:HTMLElement.prototype;return c||Object.getPrototypeOf(document.createElement(b))};var b=Event.prototype.stopPropagation;Event.prototype.stopPropagation=function(){this.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 property)"),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.getOwnPropertyNames(b),e=0,f=d.length;f>e&&(c=d[e]);e++){var g=Object.getOwnPropertyDescriptor(b,c);if("function"==typeof g.value&&g.value===a)return c}b=b.__proto__}}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={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);return 0===b&&(b=parseInt(a)),isNaN(b)?a:b},object:function(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
),function(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:function(a
,b
,c
){Platform
.flush(),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
.classList
.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
={EVENT_PREFIX
:c
,addHostListeners:function(){var a
=this.eventDelegates
;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
.prepareEventBinding(Path
.get(a
[g
]),e
,{resolveEventHandler:function(a
,b
){var c
=b
.getValueFrom(f
);return c
?c
.bind(f
):void 0}}))(this,this,!1)},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
.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(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
)},attributeToProperty: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
&&(this[b
]=c
)}},propertyForAttribute:function(a
){var b
=this._publishLC
&&this._publishLC
[a
];return b
},deserializeValue:function(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},reflectPropertyToAttribute:function(a
){var b
=typeof this[a
],c
=this.serializeValue(this[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
.discardChanges();return(null===f
||void 0===f
)&&d
.setValue(a
[b
]),Observer
.defineComputedProperty(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._propertyObserver
=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
.getOwnPropertyDescriptor(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
.addPath(this,d
);c
.open(this.notifyPropertyChanges
,this)}},notifyPropertyChanges:function(a
,b
,c
){var d
,e
,f
={};for(var g
in b
)d
=c
[2*g
+1],void 0!==this.publish
[d
]&&this.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
])))},observeArrayValue:function(a
,b
,d
){var e
=this.observe
[a
];if(e
&&(Array
.isArray(d
)&&(c
.observe
&&console
.log("[%s] observeArrayValue: unregister observer [%s]",this.localName
,a
),this.closeNamedObserver(a
+"__array")),Array
.isArray(b
))){c
.observe
&&console
.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:function(){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:function(a
,b
){var c
=this._namedObservers
||(this._namedObservers
={});c
[a
]=b
},closeNamedObserver: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
=this._namedObservers
[a
],b
.close();this._namedObservers
={}}}},e
="[%s]: bindProperties: [%s] to [%s].[%s]";a
.api
.instance
.properties
=d
}(Polymer
),function(a
){function b(a
){for(;a
.parentNode
;){if(a
.lightDomController
)return a
;a
=a
.parentNode
}return a
.host
}var c
=window
.logFlags
||0,d
=(a
.api
.instance
.events
,new PolymerExpressions
);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
},bind:function(a
,b
){this._elementPrepared
||this.prepareElement();var c
=this.propertyForAttribute(a
);if(c
){var d
=this.bindProperty(c
,b
);return this.reflectPropertyToAttribute(c
),Platform
.enableBindingsReflection
&&(d
.path
=b
.path_
,this.bindings_
=this.bindings_
||{},this.bindings_
[a
]=d
),d
}return this.mixinSuper(arguments
)},asyncUnbindAll:function(){this._unbound
||(c
.unbind
&&console
.log("[%s] asyncUnbindAll",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(c
.unbind
&&console
.warn("[%s] already unbound, cannot cancel unbindAll",this.localName
)):(c
.unbind
&&console
.log("[%s] cancelUnbindAll",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")}function c(){}var d=0,e={PolymerBase:!0,job:Polymer.job,"super":Polymer.super,created:function(){},ready:function(){},createdCallback:function(){this.created(),(this.ownerDocument.defaultView||this.alwaysPrepare||d>0)&&this.prepareElement()},prepareElement:function(){this._elementPrepared=!0,this.shadowRoots={},this._observers=[],this.observeProperties(),this.copyInstanceAttributes(),this.takeAttributes(),this.addHostListeners(),d++,this.parseDeclarations(this.__proto__),d--,this.removeAttribute("unresolved"),this.ready()},attachedCallback:function(){this._elementPrepared||this.prepareElement(),this.cancelUnbindAll(!0),this.attached&&this.attached(),this.enteredView&&this.enteredView(),this.hasBeenAttached||(this.hasBeenAttached=!0,this.domReady&&this.async("domReady"))},detachedCallback:function(){this.preventDispose||this.asyncUnbindAll(),this.detached&&this.detached(),this.leftView&&this.leftView()},enteredViewCallback:function(){this.attachedCallback()},leftViewCallback:function(){this.detachedCallback()},enteredDocumentCallback:function(){this.attachedCallback()},leftDocumentCallback:function(){this.detachedCallback()},parseDeclarations:function(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}},fetchTemplate:function(a){return a.querySelector("template")},shadowFromTemplate:function(a){if(a){var b=this.createShadowRoot();b.resetStyleInheritance=this.resetStyleInheritance;var c=this.instanceTemplate(a);return b.appendChild(c),this.shadowRootReady(b,a),b}},lightFromTemplate:function(a){if(a){this.lightDomController=!0;var b=this.instanceTemplate(a);return this.appendChild(b),this.shadowRootReady(this,a),b}},shadowRootReady:function(a){this.marshalNodeReferences(a),PointerGestures.register(a)},marshalNodeReferences: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:function(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.disconnect()}.bind(this));c.observe(a,{childList:!0,subtree:!0})}};c.prototype=e,e.constructor=c,a.Base=c,a.isBase=b,a.api.instance.base=e}(Polymer),function(a){function 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 Platform.ShadowCSS.shimCssText(a,e)}var d=(window.logFlags||{},"element"),e="controller",f={STYLE_SCOPE_ATTRIBUTE:d,installControllerStyles:function(){var a=this.findStyleScope();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.installScopeCssText(d,a)}},installScopeStyle:function(a,b,c){var c=this.findStyleScope(c),b=b||"";if(c&&!this.scopeHasNamedStyle(c,this.localName+b)){var d="";if(a instanceof Array)for(var e,f=0,g=a.length;g>f&&(e=a[f]);f++)d+=e.textContent+"\n\n";else 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.styles=f}(Polymer),function(a){function b(a,b){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].registerWhenReady(),delete h[a])}function e(a,b){return i[a]=b||{}}function f(a){return i[a]}var g=a.extend,h=(a.api,{}),i={};a.getRegisteredPrototype=f,a.waitingForPrototype=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),function(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){function 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.ShadowDOMPolyfill&&(b=document.head);var c=d(a.textContent),e=a.getAttribute(h);e&&c.setAttribute(h,e),b.appendChild(c)}}function d(a,b){b=b||document,b=b.createElement?b:b.ownerDocument;var c=b.createElement("style");return c.textContent=a,c}function e(a){return 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="@import",k="link[rel=stylesheet]",l="global",m="polymer-scope",n={loadStyles:function(a){var b=this.templateContent();b&&this.convertSheetsToStyles(b);var c=this.findLoadableStyles(b);c.length?Platform.styleResolver.loadStyles(c,a):a&&a()},convertSheetsToStyles: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.copySheetAttributes(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&&"href"!==c.name&&a.setAttribute(c.name,c.value)},findLoadableStyles:function(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(){this.cacheSheets(),this.cacheStyles(),this.installLocalSheets(),this.installGlobalStyles()},cacheSheets:function(){this.sheets=this.findNodes(k),this.sheets.forEach(function(a){a.parentNode&&a.parentNode.removeChild(a)})},cacheStyles:function(){this.styles=this.findNodes(i+"["+m+"]"),this.styles.forEach(function(a){a.parentNode&&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.ownerDocument);b.insertBefore(f,b.firstChild)}}},findNodes:function(a,b){var c=this.querySelectorAll(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)},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(function(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.cssTextForScope(a);return this.cssTextToScopeStyle(b,a)},cssTextToScopeStyle: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.webkitMatchesSelector||o.mozMatchesSelector;a.api.declaration.styles=n,a.applyStyleToScope=c}(Polymer),function(a){var b=(window.logFlags||{},a.api.instance.events),c=b.EVENT_PREFIX,d={parseHostEvents:function(){var a=this.prototype.eventDelegates;this.addAttributeDelegates(a)},addAttributeDelegates:function(a){for(var b,c=0;b=this.attributes[c];c++)this.hasEventPrefix(b.name)&&(a[this.removeEventPrefix(b.name)]=b.value.replace("{{","").replace("}}","").trim())},hasEventPrefix:function(a){return a&&"o"===a[0]&&"n"===a[1]&&"-"===a[2]},removeEventPrefix:function(a){return a.slice(e)}},e=c.length;a.api.declaration.events=d}(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:function(a,b){var c=a.publish;c&&(this.requireProperties(c,a,b),a._publishLC=this.lowerCaseMap(c))},requireProperties: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"),this.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._instanceAttributes
,c
=this.attributes
,d
=0,e
=c
.length
;e
>d
&&(a
=c
[d
]);d
++)this.isInstanceAttribute(a
.name
)&&(b
[a
.name
]=a
.value
)},isInstanceAttribute:function(a
){return!this.blackList
[a
]&&"on-"!==a
.slice(0,3)},blackList
:{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
){function b(a
){if(!Object
.__proto__
){var b
=Object
.getPrototypeOf(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.desugarBeforeChaining(d
,e
),this.prototype=this.chainPrototypes(d
,e
),this.desugarAfterChaining(b
,c
)},desugarBeforeChaining:function(a
,b
){a
.element
=this,this.publishAttributes(a
,b
),this.publishProperties(a
,b
),this.inferObservers(a
),this.explodeObservers(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("eventDelegates",a
,b
)},desugarAfterChaining:function(a
,b
){this.optimizePropertyMaps(this.prototype),this.installSheets(),this.resolveElementPaths(this),this.accumulateInstanceAttributes(),this.parseHostEvents(),this.addResolvePathApi(),window
.ShadowDOMPolyfill
&&Platform
.ShadowCSS
.shimStyling(this.templateContent(),a
,b
),this.prototype.registerCallback
&&this.prototype.registerCallback(this)},publishConstructor:function(){var a
=this.getAttribute("constructor");a
&&(window
[a
]=this.ctor
)},generateBasePrototype:function(a
){var b
=this.findBasePrototype(a
);if(!b
){var b
=HTMLElement
.getPrototypeForTag(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
.instance
.mdv
,"bind"),b
},mixinMethod:function(a
,b
,c
,d
){var e=function(a
){return b
[d
].apply(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
])},registerPrototype:function(a
,b
){var c
={prototype:this.prototype},d
=this.findTypeExtension(b
);d
&&(c
.extends=d
),HTMLElement
.register(a
,this.prototype),this.ctor
=document
.registerElement(a
,c
)},findTypeExtension:function(a
){if(a
&&a
.indexOf("-")<0)return a
;var b
=this.findBasePrototype(a
);return b
.element
?this.findTypeExtension(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
=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,HTMLImports
.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
.__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
?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.nextElement();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!f
.length
&&!g
.length
},ready:function(){if(CustomElements
.ready
===!1&&(CustomElements
.upgradeDocumentTree(document
),CustomElements
.ready
=!0),h
)for(var a
;h
.length
;)(a
=h
.shift())()},addReadyCallback:function(a
){a
&&h
.push(a
)},waitToReady
:!0},f
=[],g
=[],h
=[];document
.addEventListener("WebComponentsReady",function(){CustomElements
.ready
=!1}),a
.queue
=e
,a
.whenPolymerReady
=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
.createDocumentFragment(),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
.whenPolymerReady
;a
.import=c
,a
.importElements
=b
}(Polymer
),function(a
){function b(a
){return Boolean(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),{createdCallback:function(){this.getAttribute("name")&&this.init()},init:function(){this.name
=this.getAttribute("name"),this.extends=this.getAttribute("extends"),this.loadResources(),this.registerWhenReady()},registerWhenReady:function(){this.registered
||this.waitingForPrototype(this.name
)||this.waitingForQueue()||this.waitingForResources()||f
.go(this)},_register:function(){c(this.extends)&&!b(this.extends)&&console
.warn("%s is attempting to extend %s, an unregistered element or one that 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(this.hasAttribute("noscript")&&!this.noscript
)if(this.noscript
=!0,window
.CustomElements
&&!CustomElements
.useNative
)Polymer(a
);else{var b
=document
.createElement("script");b
.textContent
="Polymer('"+a
+"');",this.appendChild(b
)}},waitingForResources: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.registerWhenReady()}.bind(this))}});e
.publish(e
.declaration
,j
),a
.getRegisteredPrototype
=h
,g(function(){document
.body
.removeAttribute("unresolved"),document
.dispatchEvent(new CustomEvent("polymer-ready",{bubbles
:!0}))}),document
.registerElement("polymer-element",{prototype:j
})}(Polymer
);
93 //# sourceMappingURL=polymer.js.map</script>
94 <!-- <link rel
="import" href
="../polymer-dev/polymer.html"> -->
101 function sign(number
) {
109 function Animator(delegate
) {
110 this.delegate
= delegate
;
111 this.startTimeStamp
= 0;
112 this.request_
= null;
115 Animator
.prototype.scheduleAnimation = function() {
118 this.request_
= requestAnimationFrame(this.onAnimation_
.bind(this));
121 Animator
.prototype.startAnimation = function() {
122 this.startTimeStamp
= 0;
123 this.scheduleAnimation();
126 Animator
.prototype.stopAnimation = function() {
127 cancelAnimationFrame(this.request_
);
128 this.startTimeStamp
= 0;
129 this.request_
= null;
132 Animator
.prototype.onAnimation_ = function(timeStamp
) {
133 this.request_
= null;
134 if (!this.startTimeStamp
)
135 this.startTimeStamp
= timeStamp
;
136 if (this.delegate
.onAnimation(timeStamp
))
137 this.scheduleAnimation();
140 function VelocityTracker() {
141 this.recentTouchMoves_
= [];
146 VelocityTracker
.kTimeWindow
= 50;
148 VelocityTracker
.prototype.pruneHistory_ = function(timeStamp
) {
149 for (var i
= 0; i
< this.recentTouchMoves_
.length
; ++i
) {
150 if (this.recentTouchMoves_
[i
].timeStamp
> timeStamp
- VelocityTracker
.kTimeWindow
) {
151 this.recentTouchMoves_
= this.recentTouchMoves_
.slice(i
);
155 // All touchmoves are old.
156 this.recentTouchMoves_
= [];
159 VelocityTracker
.prototype.update_ = function(e
) {
160 this.pruneHistory_(e
.timeStamp
);
161 this.recentTouchMoves_
.push(e
);
163 var oldestTouchMove
= this.recentTouchMoves_
[0];
165 var deltaX
= e
.changedTouches
[0].clientX
- oldestTouchMove
.changedTouches
[0].clientX
;
166 var deltaY
= e
.changedTouches
[0].clientY
- oldestTouchMove
.changedTouches
[0].clientY
;
167 var deltaT
= e
.timeStamp
- oldestTouchMove
.timeStamp
;
170 this.velocityX
= deltaX
/ deltaT
;
171 this.velocityY
= deltaY
/ deltaT
;
178 VelocityTracker
.prototype.onTouchStart = function(e
) {
179 this.recentTouchMoves_
.push(e
);
184 VelocityTracker
.prototype.onTouchMove = function(e
) {
188 VelocityTracker
.prototype.onTouchEnd = function(e
) {
190 this.recentTouchMoves_
= [];
193 function LinearTimingFunction() {
196 LinearTimingFunction
.prototype.scaleTime = function(fraction
) {
200 function CubicBezierTimingFunction(spec
) {
202 for (var ii
= 0; ii
<= 100; ii
+= 1) {
205 3 * i
* (1 - i
) * (1 - i
) * spec
[0] +
206 3 * i
* i
* (1 - i
) * spec
[2] + i
* i
* i
,
207 3 * i
* (1 - i
) * (1 - i
) * spec
[1] +
208 3 * i
* i
* (1 - i
) * spec
[3] + i
* i
* i
213 CubicBezierTimingFunction
.prototype.scaleTime = function(fraction
) {
215 while (fst
!== 100 && fraction
> this.map
[fst
][0]) {
218 if (fraction
=== this.map
[fst
][0] || fst
=== 0) {
219 return this.map
[fst
][1];
221 var yDiff
= this.map
[fst
][1] - this.map
[fst
- 1][1];
222 var xDiff
= this.map
[fst
][0] - this.map
[fst
- 1][0];
223 var p
= (fraction
- this.map
[fst
- 1][0]) / xDiff
;
224 return this.map
[fst
- 1][1] + p
* yDiff
;
227 var presetTimingFunctions
= {
228 'linear': new LinearTimingFunction(),
229 'ease': new CubicBezierTimingFunction([0.25, 0.1, 0.25, 1.0]),
230 'ease-in': new CubicBezierTimingFunction([0.42, 0, 1.0, 1.0]),
231 'ease-out': new CubicBezierTimingFunction([0, 0, 0.58, 1.0]),
232 'ease-in-out': new CubicBezierTimingFunction([0.42, 0, 0.58, 1.0]),
235 function DrawerController(options
) {
236 this.velocityTracker
= new VelocityTracker();
237 this.animator
= new Animator(this);
239 this.target
= options
.target
;
240 this.left
= options
.left
;
241 this.right
= options
.right
;
242 this.position
= options
.position
;
244 this.width
= this.right
- this.left
;
245 this.curve
= presetTimingFunctions
[options
.curve
|| 'linear'];
247 this.willOpenCallback
= options
.willOpen
;
248 this.didCloseCallback
= options
.didClose
;
249 this.animateCallback
= options
.onAnimate
;
251 this.state
= DrawerController
.kClosed
;
253 this.defaultAnimationSpeed
= (this.right
- this.left
) / DrawerController
.kBaseSettleDurationMS
;
255 this.onTouchMove
= this.onTouchMove
.bind(this);
256 this.onTouchEnd
= this.onTouchEnd
.bind(this);
258 this.target
.addEventListener('touchstart', this.onTouchStart
.bind(this));
261 DrawerController
.kOpened
= 'opened';
262 DrawerController
.kClosed
= 'closed';
263 DrawerController
.kOpening
= 'opening';
264 DrawerController
.kClosing
= 'closing';
265 DrawerController
.kDragging
= 'dragging';
266 DrawerController
.kFlinging
= 'flinging';
268 DrawerController
.kBaseSettleDurationMS
= 246;
269 DrawerController
.kMaxSettleDurationMS
= 600;
271 DrawerController
.kMinFlingVelocity
= 0.4; // Matches Android framework.
272 DrawerController
.kTouchSlop
= 5; // Matches Android framework.
273 DrawerController
.kTouchSlopSquare
= DrawerController
.kTouchSlop
* DrawerController
.kTouchSlop
;
275 DrawerController
.prototype.restrictToCurrent = function(offset
) {
276 return Math
.max(this.left
, Math
.min(this.position
, offset
));
279 DrawerController
.prototype.restrictToBounds = function(offset
) {
280 return Math
.max(this.left
, Math
.min(this.right
, offset
));
283 DrawerController
.prototype.onTouchStart = function(e
) {
284 this.velocityTracker
.onTouchStart(e
);
286 var touchX
= e
.changedTouches
[0].clientX
;
287 var touchY
= e
.changedTouches
[0].clientY
;
289 if (this.state
!= DrawerController
.kOpened
) {
290 if (touchX
!= this.restrictToCurrent(touchX
))
292 this.state
= DrawerController
.kDragging
;
295 this.animator
.stopAnimation();
296 this.target
.addEventListener('touchmove', this.onTouchMove
);
297 this.target
.addEventListener('touchend', this.onTouchEnd
);
298 // TODO(abarth): Handle touchcancel.
300 this.startX
= touchX
;
301 this.startY
= touchY
;
302 this.startPosition
= this.position
;
303 this.touchBaseX
= Math
.min(touchX
, this.startPosition
);
306 DrawerController
.prototype.onTouchMove = function(e
) {
307 this.velocityTracker
.onTouchMove(e
);
309 if (this.state
== DrawerController
.kOpened
) {
310 var deltaX
= e
.changedTouches
[0].clientX
- this.startX
;
311 var deltaY
= e
.changedTouches
[0].clientY
- this.startY
;
313 if (deltaX
* deltaX
+ deltaY
* deltaY
< DrawerController
.kTouchSlopSquare
) {
318 if (Math
.abs(deltaY
) > Math
.abs(deltaX
)) {
319 this.target
.removeEventListener('touchmove', this.onTouchMove
);
320 this.target
.removeEventListener('touchend', this.onTouchEnd
);
324 this.state
= DrawerController
.kDragging
;
328 var touchDeltaX
= e
.changedTouches
[0].clientX
- this.touchBaseX
;
329 this.position
= this.restrictToBounds(this.startPosition
+ touchDeltaX
);
330 this.animator
.scheduleAnimation();
333 DrawerController
.prototype.onTouchEnd = function(e
) {
334 this.velocityTracker
.onTouchEnd(e
);
335 this.target
.removeEventListener('touchmove', this.onTouchMove
);
336 this.target
.removeEventListener('touchend', this.onTouchEnd
);
338 var velocityX
= this.velocityTracker
.velocityX
;
339 if (Math
.abs(velocityX
) > DrawerController
.kMinFlingVelocity
) {
340 this.fling(velocityX
);
341 } else if (this.isOpen()) {
348 DrawerController
.prototype.openFraction = function() {
349 var width
= this.right
- this.left
;
350 var offset
= this.position
- this.left
;
351 return offset
/ width
;
354 DrawerController
.prototype.isOpen = function() {
355 return this.openFraction() >= 0.5;
358 DrawerController
.prototype.isOpening = function() {
359 return this.state
== DrawerController
.kOpening
||
360 (this.state
== DrawerController
.kFlinging
&& this.animationVelocityX
> 0);
363 DrawerController
.prototype.isClosing = function() {
364 return this.state
== DrawerController
.kClosing
||
365 (this.state
== DrawerController
.kFlinging
&& this.animationVelocityX
< 0);
368 DrawerController
.prototype.toggle = function() {
375 DrawerController
.prototype.open = function() {
377 this.willOpenCallback
.call(this.target
);
379 this.animator
.stopAnimation();
380 this.animationDuration
= 400;
381 this.state
= DrawerController
.kOpening
;
385 DrawerController
.prototype.close = function() {
386 this.animator
.stopAnimation();
387 this.animationDuration
= 400;
388 this.state
= DrawerController
.kClosing
;
392 DrawerController
.prototype.fling = function(velocityX
) {
393 this.animator
.stopAnimation();
394 this.animationVelocityX
= velocityX
;
395 this.state
= DrawerController
.kFlinging
;
399 DrawerController
.prototype.animate = function() {
400 this.positionAnimationBase
= this.position
;
401 this.animator
.startAnimation();
404 DrawerController
.prototype.targetPosition = function(deltaT
) {
405 if (this.state
== DrawerController
.kFlinging
)
406 return this.positionAnimationBase
+ this.animationVelocityX
* deltaT
;
407 var targetFraction
= this.curve
.scaleTime(deltaT
/ this.animationDuration
);
408 var animationWidth
= this.state
== DrawerController
.kOpening
?
409 this.width
- this.positionAnimationBase
: -this.positionAnimationBase
;
410 return this.positionAnimationBase
+ targetFraction
* animationWidth
;
413 DrawerController
.prototype.onAnimation = function(timeStamp
) {
414 if (this.state
== DrawerController
.kDragging
) {
415 this.animateCallback
.call(this.target
, this.position
);
419 var deltaT
= timeStamp
- this.animator
.startTimeStamp
;
420 var targetPosition
= this.targetPosition(deltaT
);
421 this.position
= this.restrictToBounds(targetPosition
);
423 this.animateCallback
.call(this.target
, this.position
);
425 if (targetPosition
<= this.left
&& this.isClosing()) {
426 this.state
= DrawerController
.kClosed
;
427 this.didCloseCallback
.call(this.target
);
430 if (targetPosition
>= this.right
&& this.isOpening()) {
431 this.state
= DrawerController
.kOpened
;
439 function DismissController(options
) {
440 this.velocityTracker
= new VelocityTracker();
441 this.animator
= new Animator(this);
443 this.target
= options
.target
;
444 this.moveCallback
= options
.onMove
;
445 this.dismissCallback
= options
.onDismiss
;
446 this.curve
= presetTimingFunctions
[options
.curve
|| 'linear'];
450 this.state
= DismissController
.kInitial
;
452 this.target
.addEventListener('touchstart', this.onTouchStart
.bind(this));
453 this.target
.addEventListener('touchmove', this.onTouchMove
.bind(this));
454 this.target
.addEventListener('touchend', this.onTouchEnd
.bind(this));
455 // TODO(abarth): Handle touchcancel.
458 DismissController
.kInitial
= 'initial';
459 DismissController
.kDragging
= 'dragging';
460 DismissController
.kSettling
= 'settling';
461 DismissController
.kFlinging
= 'flinging';
462 DismissController
.kDismissed
= 'dismissed';
464 DismissController
.prototype.onTouchStart = function(e
) {
465 this.velocityTracker
.onTouchStart(e
);
467 this.state
= DismissController
.kInitial
;
468 this.animator
.stopAnimation();
470 this.startX
= e
.changedTouches
[0].clientX
;
471 this.startY
= e
.changedTouches
[0].clientY
;
472 this.startPosition
= this.position
;
475 DismissController
.prototype.onTouchMove = function(e
) {
476 this.velocityTracker
.onTouchMove(e
);
478 if (this.state
== DismissController
.kInitial
) {
479 var deltaX
= e
.changedTouches
[0].clientX
- this.startX
;
480 var deltaY
= e
.changedTouches
[0].clientY
- this.startY
;
482 if (deltaX
* deltaX
+ deltaY
* deltaY
< DrawerController
.kTouchSlopSquare
) {
487 if (Math
.abs(deltaY
) > Math
.abs(deltaX
)) {
488 this.settleToClosestPosition();
492 this.state
= DismissController
.kDragging
;
493 this.width
= this.target
.offsetWidth
;
496 if (this.state
== DismissController
.kDragging
) {
498 var deltaX
= e
.changedTouches
[0].clientX
- this.startX
;
499 this.position
= this.startPosition
+ deltaX
;
500 this.animator
.scheduleAnimation();
504 DismissController
.prototype.onTouchEnd = function(e
) {
505 this.velocityTracker
.onTouchEnd(e
);
507 if (this.state
== DismissController
.kDragging
) {
508 var velocityX
= this.velocityTracker
.velocityX
;
509 if (Math
.abs(velocityX
) > DrawerController
.kMinFlingVelocity
) {
510 this.fling(velocityX
);
513 this.settleToClosestPosition();
517 DismissController
.prototype.settleToClosestPosition = function() {
518 var fraction
= this.position
/ this.width
;
520 this.settle(this.width
);
521 else if (fraction
< -0.5)
522 this.settle(-this.width
);
527 DismissController
.prototype.fling = function(velocityX
) {
528 this.animator
.stopAnimation();
529 this.animationVelocityX
= velocityX
;
530 this.basePosition
= this.position
;
531 this.state
= DismissController
.kFlinging
;
532 this.targetPosition
= velocityX
< 0 ? -this.width
: this.width
;
533 this.animator
.startAnimation();
536 DismissController
.prototype.settle = function(targetPosition
) {
537 this.animator
.stopAnimation();
538 this.animationDuration
= DrawerController
.kBaseSettleDurationMS
;
539 this.state
= DismissController
.kSettling
;
540 this.basePosition
= this.position
;
541 this.targetPosition
= targetPosition
;
542 this.animator
.startAnimation();
545 DismissController
.prototype.computeTargetPosition = function(deltaT
) {
546 var approximateTargetPosition
= 0;
547 var movingLeftward
= false;
549 if (this.state
== DismissController
.kSettling
) {
550 var targetFraction
= this.curve
.scaleTime(deltaT
/ this.animationDuration
);
551 var animationWidth
= this.targetPosition
- this.basePosition
;
552 approximateTargetPosition
= this.basePosition
+ targetFraction
* animationWidth
;
553 movingLeftward
= animationWidth
< 0;
554 } else if (this.state
== DismissController
.kFlinging
) {
555 approximateTargetPosition
= this.basePosition
+ this.animationVelocityX
* deltaT
;
556 movingLeftward
= this.animationVelocityX
< 0;
559 var lowerBound
= -this.width
;
560 var upperBound
= this.width
;
561 if (movingLeftward
&& this.targetPosition
== 0)
563 else if (!movingLeftward
&& this.targetPosition
== 0)
566 return Math
.max(lowerBound
, Math
.min(upperBound
, approximateTargetPosition
));
569 DismissController
.prototype.onAnimation = function(timeStamp
) {
570 if (this.state
== DismissController
.kDragging
) {
571 this.moveCallback
.call(this.target
, this.position
);
575 var deltaT
= timeStamp
- this.animator
.startTimeStamp
;
577 this.position
= this.computeTargetPosition(deltaT
);
578 this.moveCallback
.call(this.target
, this.position
);
580 if (this.position
!= this.targetPosition
)
583 if (this.targetPosition
== 0) {
584 this.state
= DismissController
.kInitial
;
588 this.state
= DismissController
.kDismissed
;
589 this.dismissCallback
.call(this.target
, this.targetPosition
< 0 ? 'left' : 'right');
593 function ScrollAreaToolbarController(options
) {
594 this.animator
= new Animator(this);
596 this.moveCallback
= options
.onMove
;
597 this.target
= options
.target
;
598 this.scrollArea
= options
.scrollArea
;
600 this.scrollArea
.addEventListener("scroll", this.onScroll
.bind(this));
602 this.previousScrollTop
= 0;
605 ScrollAreaToolbarController
.prototype.restrictToBounds = function(position
) {
606 return Math
.min(Math
.max(position
, 0), this.height
);
609 ScrollAreaToolbarController
.prototype.onScroll = function(e
) {
611 this.height
= this.target
.offsetHeight
;
613 var scrollTop
= this.scrollArea
.scrollTop
;
614 var scrollDelta
= scrollTop
- this.scrollBase
;
615 var scrollDeltaFromPrevious
= scrollTop
- this.previousScrollTop
;
616 this.previousScrollTop
= scrollTop
;
617 this.position
= this.restrictToBounds(scrollDelta
, 0);
619 if (sign(scrollDelta
) != sign(scrollDeltaFromPrevious
))
620 this.scrollBase
= scrollTop
- this.position
;
622 this.animator
.scheduleAnimation();
625 ScrollAreaToolbarController
.prototype.onAnimation = function(timeStamp
) {
626 this.moveCallback
.call(this.target
, this.position
);
630 exports
.DrawerController
= DrawerController
;
631 exports
.DismissController
= DismissController
;
632 exports
.ScrollAreaToolbarController
= ScrollAreaToolbarController
;
644 background-color: red;
647 <polymer-element name=
"app-frame" assetpath=
"/">
652 flex-direction: column;
653 background-color: white;
662 Polymer('app-frame', {
666 <polymer-element name=
"app-column" assetpath=
"/">
673 flex-direction: column;
677 :host([scrollable]) {
684 Polymer('app-column', {
688 <polymer-element name=
"app-drawer" attributes=
"active" assetpath=
"/">
698 background-color: white;
699 -webkit-transform: translate3d(
0,
0,
0);
709 background-color: black;
710 -webkit-transform: translate3d(
0,
0,
0);
713 <div id=
"mask" on-tap=
"{{ toggle }}"></div>
719 Polymer('app-drawer', {
722 this.controller
.toggle();
724 enteredView: function() {
725 var content
= this.$.content
;
726 var mask
= this.$.mask
;
727 this.controller
= new DrawerController({
732 curve
: 'ease-in-out',
733 willOpen: function() {
734 mask
.style
.display
= 'block';
735 content
.style
.display
= 'block';
738 didClose: function() {
739 mask
.style
.display
= 'none';
740 content
.style
.display
= 'none';
743 onAnimate: function(position
) {
744 // FIXME: We should animate the opacity from zero, but that triggers http://crbug.com/328106
745 mask
.style
.opacity
= ((position
+ 1) / 300) * 0.2;
746 content
.style
.WebkitTransform
= 'translate3d(' + (position
- 300) + 'px,0,0)';
753 <polymer-element name=
"app-dismissable-item" assetpath=
"/">
758 -webkit-transform: translate3d(
0,
0,
0);
765 Polymer('app-dismissable-item', {
766 enteredView: function() {
767 this.controller
= new DismissController({
769 curve
: 'ease-in-out',
770 onMove: function(position
) {
771 var width
= this.offsetWidth
;
772 this.style
.opacity
= (width
- Math
.abs(position
)) / width
;
773 this.style
.WebkitTransform
= 'translate3d(' + position
+ 'px,0,0)';
775 onDismiss: function(direction
) {
783 <polymer-element name=
"app-scrollarea-toolbar" attributes=
"location for" assetpath=
"/">
791 -webkit-transform: translate3d(
0,
0,
0);
798 function findParentTreeScope(node
) {
799 while(node
.parentNode
)
800 node
= node
.parentNode
;
804 Polymer('app-scrollarea-toolbar', {
807 enteredView: function() {
808 if (this.location
== 'top')
811 this.style
.bottom
= 0;
813 var scrollArea
= findParentTreeScope(this).getElementById(this['for']);
815 this.controller
= new ScrollAreaToolbarController({
817 scrollArea
: scrollArea
,
818 onMove: function(position
) {
819 var translateY
= this.location
== 'top' ? -position
: position
;
820 this.style
.WebkitTransform
= 'translate3d(0,' + translateY
+'px,0)';
829 Copyright 2013 The Polymer Authors. All rights reserved.
830 Use of this source code is governed by a BSD-style
831 license that can be found in the LICENSE file.
835 * @module Polymer Elements
840 * The polymer-selection element is used to manage selection state. It has no
841 * visual appearance and is typically used in conjuneciton with another element.
842 * For example, <a href="polymer-selector.html">polymer-selector</a>
843 * use a polymer-selection to manage selection.
845 * To mark an item as selected, call the select(item) method on
846 * polymer-selection. Notice that the item itself is an argument to this method.
847 * The polymer-selection element manages selection state for any given set of
848 * items. When an item is selected, the `polymer-select` event is fired.
849 * The attribute "multi" indicates if multiple items can be selected at once.
853 * <polymer-element name="selection-example">
856 * ::-webkit-distributed(> .selected) {
858 * font-style: italic;
861 * <ul on-tap="{{itemTapAction}}">
862 * <content></content>
864 * <polymer-selection id="selection" multi on-polymer-select="{{selectAction}}"></polymer-selection>
867 * Polymer('selection-example', {
868 * itemTapAction: function(e) {
869 * this.$.selection.select(e.target);
871 * selectAction: function(e, detail) {
872 * detail.item.classList.toggle('selected', detail.isSelected);
878 * <selection-example>
882 * </selection-example>
884 * @class polymer-selection
887 * Fired when an item's selection state is changed. This event is fired both
888 * when an item is selected or deselected. The `isSelected` detail property
889 * contains the selection state.
891 * @event polymer-select
892 * @param {Object} detail
893 * @param {boolean} detail.isSelected true for selection and false for deselection
894 * @param {Object} detail.item the item element
899 <polymer-element name="polymer-selection" attributes="multi" assetpath="bower_components/polymer-selection/">
903 display: none !important;
908 Polymer('polymer-selection', {
910 * If true, multiple selections are allowed.
924 * Retrieves the selected item(s).
925 * @method getSelection
926 * @returns Returns the selected item(s). If the multi property is true,
927 * getSelection will return an array, otherwise it will return
928 * the selected item or undefined if there is no selection.
930 getSelection: function() {
931 return this.multi ? this.selection : this.selection[0];
934 * Indicates if a given item is selected.
936 * @param {any} item The item whose selection state should be checked.
937 * @returns Returns true if `item` is selected.
939 isSelected: function(item) {
940 return this.selection.indexOf(item) >= 0;
942 setItemSelected: function(item, isSelected) {
943 if (item !== undefined && item !== null) {
945 this.selection.push(item);
947 var i = this.selection.indexOf(item);
949 this.selection.splice(i, 1);
952 this.fire("polymer-select", {isSelected: isSelected, item: item});
956 * Set the selection state for a given `item`. If the multi property
957 * is true, then the selected state of `item` will be toggled; otherwise
958 * the `item` will be selected.
960 * @param {any} item: The item to select.
962 select: function(item) {
965 } else if (this.getSelection() !== item) {
966 this.setItemSelected(this.getSelection(), false);
967 this.setItemSelected(item, true);
971 * Toggles the selection state for `item`.
973 * @param {any} item: The item to toggle.
975 toggle: function(item) {
976 this.setItemSelected(item, !this.isSelected(item));
983 Copyright 2013 The Polymer Authors. All rights reserved.
984 Use of this source code is governed by a BSD-style
985 license that can be found in the LICENSE file.
989 * @module Polymer Elements
992 * polymer-selector is used to manage a list of elements that can be selected.
993 * The attribute "selected" indicates which item element is being selected.
994 * The attribute "multi" indicates if multiple items can be selected at once.
995 * Tapping on the item element would fire "polymer-activate" event. Use
996 * "polymer-select" event to listen for selection changes.
1000 * <polymer-selector selected="0">
1004 * </polymer-selector>
1006 * polymer-selector is not styled. So one needs to use "polymer-selected" CSS
1007 * class to style the selected element.
1010 * .item.polymer-selected {
1015 * <polymer-selector>
1016 * <div class="item">Item 1</div>
1017 * <div class="item">Item 2</div>
1018 * <div class="item">Item 3</div>
1019 * </polymer-selector>
1021 * @class polymer-selector
1024 * Fired when an item's selection state is changed. This event is fired both
1025 * when an item is selected or deselected. The `isSelected` detail property
1026 * contains the selection state.
1028 * @event polymer-select
1029 * @param {Object} detail
1030 * @param {boolean} detail.isSelected true for selection and false for deselection
1031 * @param {Object} detail.item the item element
1034 * Fired when an item element is tapped.
1036 * @event polymer-activate
1037 * @param {Object} detail
1038 * @param {Object} detail.item the item element
1044 <polymer-element name="polymer-selector" attributes="selected multi valueattr selectedClass selectedProperty selectedItem selectedModel selectedIndex notap target itemsSelector activateEvent" assetpath="bower_components/polymer-selector/">
1046 <polymer-selection id="selection" multi="{{multi}}" on-polymer-select="{{selectionSelect}}"></polymer-selection>
1047 <content id="items" select="*"></content>
1050 Polymer('polymer-selector', {
1052 * Gets or sets the selected element. Default to use the index
1053 * of the item element.
1055 * If you want a specific attribute value of the element to be
1056 * used instead of index, set "valueattr" to that attribute name.
1060 * <polymer-selector valueattr="label" selected="foo">
1061 * <div label="foo"></div>
1062 * <div label="bar"></div>
1063 * <div label="zot"></div>
1064 * </polymer-selector>
1066 * In multi-selection this should be an array of values.
1070 * <polymer-selector id="selector" valueattr="label" multi>
1071 * <div label="foo"></div>
1072 * <div label="bar"></div>
1073 * <div label="zot"></div>
1074 * </polymer-selector>
1076 * this.$.selector.selected = ['foo', 'zot'];
1078 * @attribute selected
1084 * If true, multiple selections are allowed.
1092 * Specifies the attribute to be used for "selected" attribute.
1094 * @attribute valueattr
1100 * Specifies the CSS class to be used to add to the selected element.
1102 * @attribute selectedClass
1104 * @default 'polymer-selected'
1106 selectedClass: 'polymer-selected',
1108 * Specifies the property to be used to set on the selected element
1109 * to indicate its active state.
1111 * @attribute selectedProperty
1115 selectedProperty: 'active',
1117 * Returns the currently selected element. In multi-selection this returns
1118 * an array of selected elements.
1120 * @attribute selectedItem
1126 * In single selection, this returns the model associated with the
1129 * @attribute selectedModel
1133 selectedModel: null,
1135 * In single selection, this returns the selected index.
1137 * @attribute selectedIndex
1143 * The target element that contains items. If this is not set
1144 * polymer-selector is the container.
1152 * This can be used to query nodes from the target node to be used for
1153 * selection items. Note this only works if the 'target' property is set.
1157 * <polymer-selector target="{{$.myForm}}" itemsSelector="input[type=radio]"></polymer-selector>
1158 * <form id="myForm">
1159 * <label><input type="radio" name="color" value="red"> Red</label> <br>
1160 * <label><input type="radio" name="color" value="green"> Green</label> <br>
1161 * <label><input type="radio" name="color" value="blue"> Blue</label> <br>
1162 * <p>color = {{color}}</p>
1165 * @attribute itemSelector
1171 * The event that would be fired from the item element to indicate
1172 * it is being selected.
1174 * @attribute activateEvent
1178 activateEvent: 'tap',
1181 this.activateListener = this.activateHandler.bind(this);
1182 this.observer = new MutationObserver(this.updateSelected.bind(this));
1188 var nodes = this.target !== this ? (this.itemsSelector ?
1189 this.target.querySelectorAll(this.itemsSelector) :
1190 this.target.children) : this.$.items.getDistributedNodes();
1191 return Array.prototype.filter.call(nodes || [], function(n) {
1192 return n && n.localName !== 'template';
1195 targetChanged: function(old) {
1197 this.removeListener(old);
1198 this.observer.disconnect();
1201 this.addListener(this.target);
1202 this.observer.observe(this.target, {childList: true});
1205 addListener: function(node) {
1206 node.addEventListener(this.activateEvent, this.activateListener);
1208 removeListener: function(node) {
1209 node.removeEventListener(this.activateEvent, this.activateListener);
1212 return this.$.selection.getSelection();
1214 selectedChanged: function() {
1215 this.updateSelected();
1217 updateSelected: function() {
1218 this.validateSelected();
1220 this.clearSelection();
1221 this.selected && this.selected.forEach(function(s) {
1222 this.valueToSelection(s);
1225 this.valueToSelection(this.selected);
1228 validateSelected: function() {
1229 // convert to an array for multi-selection
1230 if (this.multi && !Array.isArray(this.selected) &&
1231 this.selected !== null && this.selected !== undefined) {
1232 this.selected = [this.selected];
1235 clearSelection: function() {
1237 this.selection.slice().forEach(function(s) {
1238 this.$.selection.setItemSelected(s, false);
1241 this.$.selection.setItemSelected(this.selection, false);
1243 this.selectedItem = null;
1244 this.$.selection.clear();
1246 valueToSelection: function(value) {
1247 var item = (value === null || value === undefined) ?
1248 null : this.items[this.valueToIndex(value)];
1249 this.$.selection.select(item);
1251 updateSelectedItem: function() {
1252 this.selectedItem = this.selection;
1254 selectedItemChanged: function() {
1255 if (this.selectedItem) {
1256 var t = this.selectedItem.templateInstance;
1257 this.selectedModel = t ? t.model : undefined;
1259 this.selectedModel = null;
1261 this.selectedIndex = this.selectedItem ?
1262 parseInt(this.valueToIndex(this.selected)) : -1;
1264 valueToIndex: function(value) {
1265 // find an item with value == value and return it's index
1266 for (var i=0, items=this.items, c; (c=items[i]); i++) {
1267 if (this.valueForNode(c) == value) {
1271 // if no item found, the value itself is probably the index
1274 valueForNode: function(node) {
1275 return node[this.valueattr] || node.getAttribute(this.valueattr);
1277 // events fired from <polymer-selection> object
1278 selectionSelect: function(e, detail) {
1279 this.updateSelectedItem();
1281 this.applySelection(detail.item, detail.isSelected)
1284 applySelection: function(item, isSelected) {
1285 if (this.selectedClass) {
1286 item.classList.toggle(this.selectedClass, isSelected);
1288 if (this.selectedProperty) {
1289 item[this.selectedProperty] = isSelected;
1292 // event fired from host
1293 activateHandler: function(e) {
1295 var i = this.findDistributedTarget(e.target, this.items);
1297 var item = this.items[i];
1298 var s = this.valueForNode(item) || i;
1300 if (this.selected) {
1301 this.addRemoveSelected(s);
1303 this.selected = [s];
1308 this.asyncFire('polymer-activate', {item: item});
1312 addRemoveSelected: function(value) {
1313 var i = this.selected.indexOf(value);
1315 this.selected.splice(i, 1);
1317 this.selected.push(value);
1319 this.valueToSelection(value);
1321 findDistributedTarget: function(target, nodes) {
1322 // find first ancestor of target (including itself) that
1323 // is in nodes, if any
1324 while (target && target != this) {
1325 var i = Array.prototype.indexOf.call(nodes, target);
1329 target = target.parentNode;
1337 Copyright 2013 The Polymer Authors. All rights reserved.
1338 Use of this source code is governed by a BSD-style
1339 license that can be found in the LICENSE file.
1343 <polymer-element name="polymer-ui-theme-aware" attributes="theme" assetpath="bower_components/polymer-ui-theme-aware/">
1346 validateTheme: function() {
1347 var theme = this.theme;
1348 var defaultTheme = this.defaultTheme;
1351 while (p && !theme) {
1352 theme = p.getAttribute && p.getAttribute('theme');
1353 defaultTheme = defaultTheme || p.defaultTheme;
1354 p = p.parentNode || p.host;
1357 this.activeTheme = this.theme || theme || defaultTheme;
1360 Polymer('polymer-ui-theme-aware', {
1363 validateTheme: PolymerUI.validateTheme,
1364 enteredView: function() {
1365 this.validateTheme();
1367 themeChanged: function() {
1368 this.activeTheme = this.theme;
1370 activeThemeChanged: function(old) {
1371 this.classList.switch(old, this.activeTheme);
1378 Copyright 2013 The Polymer Authors. All rights reserved.
1379 Use of this source code is governed by a BSD-style
1380 license that can be found in the LICENSE file.
1384 * @module Polymer UI Elements
1387 * polymer-ui-menu is a polymer-selector with theme propagation. It styles to look like
1388 * a menu and should be used in conjunction with polymer-ui-menu-item.
1392 * <polymer-ui-menu selected="0">
1393 * <polymer-ui-menu-item icon="settings" label="Settings"></polymer-ui-menu-item>
1394 * <polymer-ui-menu-item icon="dialog" label="Dialog"></polymer-ui-menu-item>
1395 * <polymer-ui-menu-item icon="search" label="Search"></polymer-ui-menu-item>
1396 * </polymer-ui-menu>
1398 * The "selectedItem" property returns the currently selected item.
1402 * <polymer-ui-menu selected="0" selectedItem="{{item}}">
1403 * <polymer-ui-menu-item icon="settings" label="Settings"></polymer-ui-menu-item>
1404 * <polymer-ui-menu-item icon="dialog" label="Dialog"></polymer-ui-menu-item>
1405 * <polymer-ui-menu-item icon="search" label="Search"></polymer-ui-menu-item>
1406 * </polymer-ui-menu>
1408 * <div>selected label: {{item.label}}</div>
1410 * The event "polymer-select" can also be used to listen for selection change.
1414 * <polymer-ui-menu selected="0" on-polymer-select="{{selectAction}}">
1415 * <polymer-ui-menu-item icon="settings" label="Settings"></polymer-ui-menu-item>
1416 * <polymer-ui-menu-item icon="dialog" label="Dialog"></polymer-ui-menu-item>
1417 * <polymer-ui-menu-item icon="search" label="Search"></polymer-ui-menu-item>
1418 * </polymer-ui-menu>
1422 * selectAction: function(e, detail) {
1423 * if (detail.isSelected) {
1424 * var selectedItem = detail.item;
1429 * @class polymer-ui-menu
1430 * @extends polymer-selector
1437 <polymer-element name="polymer-ui-menu" extends="polymer-selector" attributes="theme" on-polymer-select="{{selectionChange}}" assetpath="bower_components/polymer-ui-menu/">
1440 Copyright 2013 The Polymer Authors. All rights reserved.
1441 Use of this source code is governed by a BSD-style
1442 license that can be found in the LICENSE file.
1448 box-sizing: border-box;
1449 -moz-box-sizing: border-box;
1455 :host(.polymer-ui-light-theme:host) {
1459 :host(.polymer-ui-dark-theme:host) {
1460 background: -webkit-linear-gradient(-60deg, #3d3d3d, #353535);
1461 background: -moz-linear-gradient(-60deg, #3d3d3d, #353535);
1462 background: -ms-linear-gradient(-60deg, #3d3d3d, #353535);
1469 Polymer('polymer-ui-menu', {
1471 validateTheme: PolymerUI.validateTheme,
1472 enteredView: function() {
1473 this.validateTheme();
1475 themeChanged: function() {
1476 this.activeTheme = this.theme;
1478 activeThemeChanged: function(old) {
1479 this.classList.switch(old, this.activeTheme);
1481 selectionChange: function(e, detail) {
1482 if (detail.isSelected) {
1483 var i = detail.item;
1484 // find nested selected item
1485 while (i.selectedItem) {
1488 this.selectedItem = i;
1496 Copyright 2013 The Polymer Authors. All rights reserved.
1497 Use of this source code is governed by a BSD-style
1498 license that can be found in the LICENSE file.
1503 * Polymer UI Elements
1505 * @module Polymer UI Elements
1508 * polymer-ui-icon is a 24x24 glyph expressed as a background-image.
1512 * <polymer-ui-icon src="star.png"></polymer-ui-icon>
1514 * Optionally can use other size like 32x32 by setting the attribute "size" to "32":
1516 * <polymer-ui-icon src="big_star.png" size="32"></polymer-ui-icon>
1518 * Polymer includes an icon set. The property "icon" can be used
1519 * to specify which icon to use.
1523 * <polymer-ui-icon icon="menu"></polymer-ui-icon>
1525 * @class polymer-ui-icon
1531 <polymer-element name="polymer-ui-icon" extends="polymer-ui-theme-aware" attributes="src size index icon" assetpath="bower_components/polymer-ui-icon/">
1534 Copyright 2013 The Polymer Authors. All rights reserved.
1535 Use of this source code is governed by a BSD-style
1536 license that can be found in the LICENSE file.
1540 display: inline-block;
1541 vertical-align: middle;
1543 background-repeat: no-repeat;
1546 :host(.polymer-ui-dark-icon:host, .polymer-ui-light-theme:host) {
1547 background-position: -24px 0;
1550 :host(.polymer-ui-light-icon:host, .polymer-ui-dark-theme:host) {
1551 background-position: -72px 0;
1554 :host(.polymer-ui-icons:host) {
1555 background-image: url(bower_components/polymer-ui-icon/bower_components/polymer-ui-icon/action-icons.png);
1604 icons.forEach(function(name, i) {
1609 Polymer('polymer-ui-icon', {
1611 * The URL of an image for the icon.
1619 * Specifies the size of the icon.
1627 * Specifies the icon from the Polymer icon set.
1640 sizeChanged: function() {
1641 this.style.width = this.style.height = this.size + 'px';
1643 iconChanged: function() {
1644 this.index = this.icon in icons ? icons[this.icon] : -1;
1646 indexChanged: function() {
1647 this.classList.add('polymer-ui-icons');
1648 this.by = -this.size * this.index;
1651 srcChanged: function() {
1652 this.classList.remove('polymer-ui-icons');
1653 this.style.backgroundImage = 'url(' + this.src + ')';
1656 activeThemeChanged: function(old) {
1657 this.super(arguments);
1658 this.style.backgroundPosition = '';
1659 this.bx = calcThemeOffset(this.activeTheme, this);
1662 updateIcon: function() {
1664 this.style.backgroundPosition = 'center';
1665 this.style.backgroundSize = this.size + 'px ' + this.size + 'px';
1667 this.style.backgroundPosition = (this.bx + 'px') + ' ' + (this.by + 'px');
1671 // memoize offset because getComputedStyle is expensive
1673 function calcThemeOffset(theme, node) {
1674 if (themes[theme] === undefined) {
1675 var bp = getComputedStyle(node).backgroundPosition.split(' ');
1676 // support 4 value syntax (https://code.google.com/p/chromium/issues/detail?id=310977)
1677 var l = bp.length === 4 ? bp[1] : bp[0];
1678 var offset = parseFloat(l);
1679 themes[theme] = offset;
1681 return themes[theme];
1688 Copyright 2013 The Toolkitchen Authors. All rights reserved.
1689 Use of this source code is governed by a BSD-style
1690 license that can be found in the LICENSE file.
1694 * @module Polymer UI Elements
1697 * polymer-ui-menu-item is styled to look like a menu item. It should be used
1698 * in conjunction with polymer-ui-menu or polymer-ui-sibebar-menu.
1702 * <polymer-ui-menu-item icon="settings" label="Settings"></polymer-ui-menu-item>
1704 * @class polymer-ui-menu-item
1707 * The URL of an image for the icon.
1714 * Specifies the icon from the Polymer icon set.
1721 * Specifies the label for the menu item.
1728 * Specifies the URL of the link it goes to when tapped on.
1732 * <polymer-ui-menu-item icon="favorite" label="Favorite" href="http://www.polymer-project.org/"></polymer-ui-menu-item>
1734 * If you want more control on the link, e.g. specify the target for where to
1735 * open the linked document, you can put <a> directly inside the menu-item.
1739 * <polymer-ui-menu-item icon="favorite" label="Favorite">
1740 * <a href="http://www.polymer-project.org/" target="_self"></a>
1741 * </polymer-ui-menu-item>
1752 <polymer-element name="polymer-ui-menu-item" extends="polymer-ui-theme-aware" attributes="src label icon item href" assetpath="bower_components/polymer-ui-menu-item/">
1755 Copyright 2013 The Toolkitchen Authors. All rights reserved.
1756 Use of this source code is governed by a BSD-style
1757 license that can be found in the LICENSE file.
1763 box-sizing: border-box;
1764 -moz-box-sizing: border-box;
1769 border: 1px solid transparent;
1771 white-space: nowrap;
1776 :host(:hover:host) {
1780 :host(.polymer-selected:host, [active]:host) {
1784 :host(.polymer-ui-light-theme.polymer-selected:host, .polymer-ui-light-theme[active]:host) {
1785 background: #f2f2f2;
1786 border: 1px solid rgba(0, 0, 0, 0.15);
1789 :host(.polymer-ui-dark-theme:host) {
1793 :host(.polymer-ui-dark-theme:hover:host) {
1794 color: rgba(255, 255, 255, 0.9);
1797 :host(.polymer-ui-dark-theme.polymer-selected:host, .polymer-ui-dark-theme[active]:host) {
1798 background-color: #000;
1799 border: 1px solid rgba(255, 255, 255, 0.2);
1800 color: rgba(255, 255, 255, 0.9);
1803 :host([active].no-active-bg:host) {
1804 background-color: transparent;
1805 border: 1px solid transparent;
1808 /* icon and label */
1809 polymer-ui-icon:not([showing]) {
1810 display: none !important;
1818 vertical-align: middle;
1819 padding-right: 20px;
1822 /*@polyfill :host #label > a, #link */
1823 ::content > a, #link {
1836 <polymer-ui-icon src="{{src}}" icon="{{icon}}" showing?="{{icon || src}}"></polymer-ui-icon>
1837 <span id="label">{{label}}<content></content></span>
1838 <a id="link" href="{{href}}" hidden?="{{!href}}"></a>
1841 Polymer('polymer-ui-menu-item', {
1843 // calc item's offset middle pos instead of using offsetTop/Height
1844 // directly which requires to wait for submenu's collapsing transition to
1845 // complete first before it can return the correct pos.
1846 getOffsetMiddle: function() {
1847 var p = this.parentNode;
1849 var i = Array.prototype.indexOf.call(p.items, this);
1850 var h = this.getItemHeight();
1851 return i * h + h/2 + p.items[0].offsetTop;
1854 getItemHeight: function() {
1855 return this.offsetHeight;
1862 Copyright 2013 The Polymer Authors. All rights reserved.
1863 Use of this source code is governed by a BSD-style
1864 license that can be found in the LICENSE file.
1868 * @module Polymer Elements
1871 * polymer-media-query can be used to data bind to a CSS media query.
1872 * The "query" property is a bare CSS media query.
1873 * The "queryMatches" property will be a boolean representing if the page matches that media query.
1875 * polymer-media-query uses media query listeners to dynamically update the "queryMatches" property.
1876 * A "polymer-mediachange" event also fires when queryMatches changes.
1880 * <polymer-media-query query="max-width: 640px" queryMatches="{{phoneScreen}}"></polymer-media-query>
1882 * @class polymer-media-query
1887 <polymer-element name="polymer-media-query" attributes="query queryMatches" assetpath="bower_components/polymer-media-query/">
1897 Polymer('polymer-media-query', {
1899 * The Boolean return value of the media query
1900 * @attribute queryMatches
1904 queryMatches: false,
1906 * The CSS media query to evaulate
1913 this._mqHandler = this.queryHandler.bind(this);
1916 queryChanged: function() {
1918 this._mq.removeListener(this._mqHandler);
1920 var query = this.query;
1921 if (query[0] !== '(') {
1922 query = '(' + this.query + ')';
1924 this._mq = window.matchMedia(query);
1925 this._mq.addListener(this._mqHandler);
1926 this.queryHandler(this._mq);
1928 queryHandler: function(mq) {
1929 this.queryMatches = mq.matches;
1930 this.asyncFire('polymer-mediachange', mq);
1937 Copyright 2013 The Polymer Authors. All rights reserved.
1938 Use of this source code is governed by a BSD-style
1939 license that can be found in the LICENSE file.
1943 * @module Polymer Elements
1946 * polymer-flex-layout provides a helper to use CSS3 Flexible Boxes. By putting
1947 * polymer-flex-layout inside an element it makes the element a flex
1948 * container. Use 'flex' attribute to make the flex item flexible.
1953 * <polymer-flex-layout></polymer-flex-layout>
1955 * <div flex>Main</div>
1959 * ---------------------------------
1960 * |-------------------------------|
1961 * ||Left| Main |Right||
1962 * |-------------------------------|
1963 * ---------------------------------
1966 * <polymer-flex-layout vertical></polymer-flex-layout>
1968 * <div flex>Body</div>
1988 * @class polymer-flex-layout
1991 * If true, flex items are aligned vertically.
1993 * @attribute vertical
1998 * Defines the default for how flex items are laid out along the cross axis on
1999 * the current line. Possible values are 'start', 'center' and 'end'.
2006 * Defines how flex items are laid out along the main axis on the current line.
2007 * Possible values are 'start', 'center' and 'end'.
2009 * @attribute justify
2014 * If true, polymer-flex-layout is the flex container.
2018 * <polymer-flex-layout isContainer>
2020 * <div flex>Main</div>
2022 * </polymer-flex-layout>
2024 * ---------------------------------
2025 * |-------------------------------|
2026 * ||Left| Main |Right||
2027 * |-------------------------------|
2028 * ---------------------------------
2030 * @attribute isContainer
2037 <polymer-element name="polymer-flex-layout" attributes="vertical align justify isContainer" assetpath="bower_components/polymer-flex-layout/">
2039 <style polymer-scope="controller">/*
2040 Copyright 2013 The Polymer Authors. All rights reserved.
2041 Use of this source code is governed by a BSD-style
2042 license that can be found in the LICENSE file.
2044 .flexbox, [flexbox], [h-flexbox], [v-flexbox] {
2045 display: -webkit-box !important;
2046 display: -ms-flexbox !important;
2047 display: -moz-flex !important;
2048 display: -webkit-flex !important;
2049 display: flex !important;
2052 .flexbox.row, [flexbox], [h-flexbox] {
2053 -webkit-box-orient: horizontal;
2054 -ms-flex-direction: row;
2055 -moz-flex-direction: row;
2056 -webkit-flex-direction: row;
2057 flex-direction: row;
2060 .flexbox.column, [v-flexbox] {
2061 -webkit-box-orient: vertical;
2062 -ms-flex-direction: column;
2063 -moz-flex-direction: column;
2064 -webkit-flex-direction: column;
2065 flex-direction: column;
2068 .flex, [flex], [fit] {
2069 -webkit-box-flex: 1;
2076 ::-webkit-distributed(.flex),
2077 ::-webkit-distributed([flex]),
2078 ::-webkit-distributed([fit]) {
2079 -webkit-box-flex: 1;
2086 .flexbox.align-start {
2087 -webkit-box-align: start;
2088 -ms-flex-align: start;
2089 -moz-align-items: flex-start;
2090 -webkit-align-items: flex-start;
2091 align-items: flex-start;
2094 .flexbox.align-end {
2095 -webkit-box-align: end;
2096 -ms-flex-align: end;
2097 -moz-align-items: flex-end;
2098 -webkit-align-items: flex-end;
2099 align-items: flex-end;
2102 .flexbox.align-center {
2103 -webkit-box-align: center;
2104 -ms-flex-align: center;
2105 -moz-align-items: center;
2106 -webkit-align-items: center;
2107 align-items: center;
2110 .flexbox.justify-start {
2111 -webkit-box-pack: start;
2112 -ms-flex-pack: start;
2113 -moz-justify-content: flex-start;
2114 -webkit-justify-content: flex-start;
2115 justify-content: flex-start;
2118 .flexbox.justify-end {
2119 -webkit-box-pack: end;
2121 -moz-justify-content: flex-end;
2122 -webkit-justify-content: flex-end;
2123 justify-content: flex-end;
2126 .flexbox.justify-center {
2127 -webkit-box-pack: center;
2128 -ms-flex-pack: center;
2129 -moz-justify-content: center;
2130 -webkit-justify-content: center;
2131 justify-content: center;
2134 .flexbox.justify-between {
2135 -webkit-box-pack: justify;
2136 -ms-flex-pack: justify;
2137 -moz-justify-content: space-between;
2138 -webkit-justify-content: space-between;
2139 justify-content: space-between;
2142 :host(.flexbox:host, [flexbox]:host, [h-flexbox]:host, [v-flexbox]:host) {
2143 display: -webkit-box !important;
2144 display: -ms-flexbox !important;
2145 display: -moz-flex !important;
2146 display: -webkit-flex !important;
2147 display: flex !important;
2150 :host(.flexbox.row:host, [flexbox]:host, [h-flexbox]:host) {
2151 -webkit-box-orient: horizontal;
2152 -ms-flex-direction: row;
2153 -moz-flex-direction: row;
2154 -webkit-flex-direction: row;
2155 flex-direction: row;
2158 :host(.flexbox.column:host, [v-flexbox]:host) {
2159 -webkit-box-orient: vertical;
2160 -ms-flex-direction: column;
2161 -moz-flex-direction: column;
2162 -webkit-flex-direction: column;
2163 flex-direction: column;
2166 :host(.flexbox.align-start:host) {
2167 -webkit-box-align: start;
2168 -ms-flex-align: start;
2169 -moz-align-items: flex-start;
2170 -webkit-align-items: flex-start;
2171 align-items: flex-start;
2174 :host(.flexbox.align-end:host) {
2175 -webkit-box-align: end;
2176 -ms-flex-align: end;
2177 -moz-align-items: flex-end;
2178 -webkit-align-items: flex-end;
2179 align-items: flex-end;
2182 :host(.flexbox.align-center:host) {
2183 -webkit-box-align: center;
2184 -ms-flex-align: center;
2185 -moz-align-items: center;
2186 -webkit-align-items: center;
2187 align-items: center;
2190 :host(.flexbox.justify-start:host) {
2191 -webkit-box-pack: start;
2192 -ms-flex-pack: start;
2193 -moz-justify-content: flex-start;
2194 -webkit-justify-content: flex-start;
2195 justify-content: flex-start;
2198 :host(.flexbox.justify-end:host) {
2199 -webkit-box-pack: end;
2201 -moz-justify-content: flex-end;
2202 -webkit-justify-content: flex-end;
2203 justify-content: flex-end;
2206 :host(.flexbox.justify-center:host) {
2207 -webkit-box-pack: center;
2208 -ms-flex-pack: center;
2209 -moz-justify-content: center;
2210 -webkit-justify-content: center;
2211 justify-content: center;
2214 :host(.flexbox.justify-between:host) {
2215 -webkit-box-pack: justify;
2216 -ms-flex-pack: justify;
2217 -moz-justify-content: space-between;
2218 -webkit-justify-content: space-between;
2219 justify-content: space-between;
2223 Copyright 2013 The Polymer Authors. All rights reserved.
2224 Use of this source code is governed by a BSD-style
2225 license that can be found in the LICENSE file.
2227 .flexbox, [flexbox], [h-flexbox], [v-flexbox] {
2228 display: -webkit-box !important;
2229 display: -ms-flexbox !important;
2230 display: -moz-flex !important;
2231 display: -webkit-flex !important;
2232 display: flex !important;
2235 .flexbox.row, [flexbox], [h-flexbox] {
2236 -webkit-box-orient: horizontal;
2237 -ms-flex-direction: row;
2238 -moz-flex-direction: row;
2239 -webkit-flex-direction: row;
2240 flex-direction: row;
2243 .flexbox.column, [v-flexbox] {
2244 -webkit-box-orient: vertical;
2245 -ms-flex-direction: column;
2246 -moz-flex-direction: column;
2247 -webkit-flex-direction: column;
2248 flex-direction: column;
2251 .flex, [flex], [fit] {
2252 -webkit-box-flex: 1;
2259 ::-webkit-distributed(.flex),
2260 ::-webkit-distributed([flex]),
2261 ::-webkit-distributed([fit]) {
2262 -webkit-box-flex: 1;
2269 .flexbox.align-start {
2270 -webkit-box-align: start;
2271 -ms-flex-align: start;
2272 -moz-align-items: flex-start;
2273 -webkit-align-items: flex-start;
2274 align-items: flex-start;
2277 .flexbox.align-end {
2278 -webkit-box-align: end;
2279 -ms-flex-align: end;
2280 -moz-align-items: flex-end;
2281 -webkit-align-items: flex-end;
2282 align-items: flex-end;
2285 .flexbox.align-center {
2286 -webkit-box-align: center;
2287 -ms-flex-align: center;
2288 -moz-align-items: center;
2289 -webkit-align-items: center;
2290 align-items: center;
2293 .flexbox.justify-start {
2294 -webkit-box-pack: start;
2295 -ms-flex-pack: start;
2296 -moz-justify-content: flex-start;
2297 -webkit-justify-content: flex-start;
2298 justify-content: flex-start;
2301 .flexbox.justify-end {
2302 -webkit-box-pack: end;
2304 -moz-justify-content: flex-end;
2305 -webkit-justify-content: flex-end;
2306 justify-content: flex-end;
2309 .flexbox.justify-center {
2310 -webkit-box-pack: center;
2311 -ms-flex-pack: center;
2312 -moz-justify-content: center;
2313 -webkit-justify-content: center;
2314 justify-content: center;
2317 .flexbox.justify-between {
2318 -webkit-box-pack: justify;
2319 -ms-flex-pack: justify;
2320 -moz-justify-content: space-between;
2321 -webkit-justify-content: space-between;
2322 justify-content: space-between;
2325 :host(.flexbox:host, [flexbox]:host, [h-flexbox]:host, [v-flexbox]:host) {
2326 display: -webkit-box !important;
2327 display: -ms-flexbox !important;
2328 display: -moz-flex !important;
2329 display: -webkit-flex !important;
2330 display: flex !important;
2333 :host(.flexbox.row:host, [flexbox]:host, [h-flexbox]:host) {
2334 -webkit-box-orient: horizontal;
2335 -ms-flex-direction: row;
2336 -moz-flex-direction: row;
2337 -webkit-flex-direction: row;
2338 flex-direction: row;
2341 :host(.flexbox.column:host, [v-flexbox]:host) {
2342 -webkit-box-orient: vertical;
2343 -ms-flex-direction: column;
2344 -moz-flex-direction: column;
2345 -webkit-flex-direction: column;
2346 flex-direction: column;
2349 :host(.flexbox.align-start:host) {
2350 -webkit-box-align: start;
2351 -ms-flex-align: start;
2352 -moz-align-items: flex-start;
2353 -webkit-align-items: flex-start;
2354 align-items: flex-start;
2357 :host(.flexbox.align-end:host) {
2358 -webkit-box-align: end;
2359 -ms-flex-align: end;
2360 -moz-align-items: flex-end;
2361 -webkit-align-items: flex-end;
2362 align-items: flex-end;
2365 :host(.flexbox.align-center:host) {
2366 -webkit-box-align: center;
2367 -ms-flex-align: center;
2368 -moz-align-items: center;
2369 -webkit-align-items: center;
2370 align-items: center;
2373 :host(.flexbox.justify-start:host) {
2374 -webkit-box-pack: start;
2375 -ms-flex-pack: start;
2376 -moz-justify-content: flex-start;
2377 -webkit-justify-content: flex-start;
2378 justify-content: flex-start;
2381 :host(.flexbox.justify-end:host) {
2382 -webkit-box-pack: end;
2384 -moz-justify-content: flex-end;
2385 -webkit-justify-content: flex-end;
2386 justify-content: flex-end;
2389 :host(.flexbox.justify-center:host) {
2390 -webkit-box-pack: center;
2391 -ms-flex-pack: center;
2392 -moz-justify-content: center;
2393 -webkit-justify-content: center;
2394 justify-content: center;
2397 :host(.flexbox.justify-between:host) {
2398 -webkit-box-pack: justify;
2399 -ms-flex-pack: justify;
2400 -moz-justify-content: space-between;
2401 -webkit-justify-content: space-between;
2402 justify-content: space-between;
2408 Polymer('polymer-flex-layout', {
2411 layoutContainer: null,
2412 enteredView: function() {
2413 this.installControllerStyles();
2414 this.layoutContainer = this.isContainer ?
2415 this : (this.parentNode.host || this.parentNode);
2416 this.verticalChanged();
2417 this.alignChanged();
2418 this.justifyChanged();
2420 leftView: function() {
2421 this.layoutContainer = null;
2423 layoutContainerChanged: function(old) {
2425 old.classList.remove('flexbox');
2427 this.style.display = this.layoutContainer === this ? '' : 'none';
2428 if (this.layoutContainer) {
2429 this.layoutContainer.classList.add('flexbox');
2432 switchContainerClass: function(prefix, old, name) {
2433 if (this.layoutContainer && name) {
2434 this.layoutContainer.classList.switch(
2435 prefix + old, prefix + name);
2438 verticalChanged: function() {
2439 if (this.layoutContainer) {
2440 this.layoutContainer.classList.toggle('column', this.vertical);
2443 alignChanged: function(old) {
2444 this.switchContainerClass('align-', old, this.align);
2446 justifyChanged: function(old) {
2447 this.switchContainerClass('justify-', old, this.justify);
2454 Copyright 2013 The Polymer Authors. All rights reserved.
2455 Use of this source code is governed by a BSD-style
2456 license that can be found in the LICENSE file.
2461 * @module Polymer UI Elements
2464 * polymer-ui-toolbar is a horizontal bar containing elements that can perform actions.
2468 * <polymer-ui-toolbar>
2469 * <polymer-ui-icon-button src="menu.png" on-click="{{menuAction}}"></polymer-ui-icon-button>
2470 * <div flex>Title</div>
2471 * <polymer-ui-icon-button src="more.png" on-click="{{moreAction}}"></polymer-ui-icon-button>
2472 * </polymer-ui-toolbar>
2474 * polymer-ui-toolbar can adopt to smaller screen size. If the attribute "responsive" is set
2475 * and the screen size is less than the responsiveWidth (default to 800px), the toolbar will
2476 * be moved to the bottom of the page.
2480 * <polymer-ui-toolbar>
2481 * <polymer-ui-icon-button icon="menu"></polymer-ui-icon-button>
2482 * <div flex>Title</div>
2483 * <polymer-ui-toolbar responsive>
2484 * <polymer-ui-icon-button icon="add"></polymer-ui-icon-button>
2485 * <polymer-ui-icon-button icon="trash"></polymer-ui-icon-button>
2486 * <polymer-ui-icon-button icon="search"></polymer-ui-icon-button>
2487 * </polymer-ui-toolbar>
2488 * </polymer-ui-toolbar>
2490 * @class polymer-ui-toolbar
2498 <polymer-element name="polymer-ui-toolbar" extends="polymer-ui-theme-aware" attributes="responsiveWidth" assetpath="bower_components/polymer-ui-toolbar/">
2501 Copyright 2013 The Polymer Authors. All rights reserved.
2502 Use of this source code is governed by a BSD-style
2503 license that can be found in the LICENSE file.
2509 box-sizing: border-box;
2510 -moz-box-sizing: border-box;
2512 border-bottom: 1px solid rgba(0, 0, 0, 0.15);
2516 font-family: 'Helvetica Neue Medium', 'HelveticaNeue-Medium', Helvetica, sans-serif;
2520 :host(.polymer-ui-light-theme:host) {
2521 background: #f2f2f2 -webkit-linear-gradient(top, rgba(197,197,197,0), rgba(197,197,197,0.15));
2522 background: #f2f2f2 -moz-linear-gradient(top, rgba(197,197,197,0), rgba(197,197,197,0.15));
2523 background: #f2f2f2 -ms-linear-gradient(top, rgba(197,197,197,0), rgba(197,197,197,0.15));
2527 :host(.polymer-ui-dark-theme:host) {
2528 background: #444444 none;
2532 :host(.narrow-layout[responsive]:host) {
2539 border-top: 1px solid rgba(0, 0, 0, 0.28);
2542 /* TODO(sorvell): use of !important due to inability to
2543 naturally win over an :host style */
2544 /*@polyfill :host > polymer-ui-icon-button */
2545 ::content > polymer-ui-icon-button {
2546 margin: 0px 8px 0 8px !important;
2549 /*@polyfill :host > polymer-ui-menu-button */
2550 ::content > polymer-ui-menu-button {
2551 margin: 0px 8px 0 8px !important;
2554 /*@polyfill :host > polymer-ui-toolbar */
2555 ::content > polymer-ui-toolbar {
2559 /*@polyfill :host > polymer-ui-toolbar:not(.narrow-layout) */
2560 ::content > polymer-ui-toolbar:not(.narrow-layout) {
2562 background: transparent none;
2565 <polymer-flex-layout align="center"></polymer-flex-layout>
2566 <polymer-media-query query="max-width: {{responsiveWidth}}" querymatches="{{queryMatches}}"></polymer-media-query>
2570 Polymer('polymer-ui-toolbar', {
2571 responsiveWidth: '800px',
2572 queryMatches: false,
2573 defaultTheme: 'polymer-ui-light-theme',
2574 queryMatchesChanged: function() {
2575 this.classList.toggle('narrow-layout', this.queryMatches);
2582 Copyright 2013 The Polymer Authors. All rights reserved.
2583 Use of this source code is governed by a BSD-style
2584 license that can be found in the LICENSE file.
2588 * @module Polymer UI Elements
2591 * polymer-ui-icon-button enables you to place an image centered in a button.
2595 * <polymer-ui-icon-button src="star.png"></polymer-ui-icon-button>
2597 * Polymer includes an icon set. The property "icon" can be used
2598 * to specify which icon to use.
2602 * <polymer-ui-icon-button icon="menu"></polymer-ui-icon-button>
2604 * @class polymer-ui-icon-button
2610 <polymer-element name="polymer-ui-icon-button" extends="polymer-ui-theme-aware" attributes="src index icon active" assetpath="bower_components/polymer-ui-icon-button/">
2613 Copyright 2013 The Polymer Authors. All rights reserved.
2614 Use of this source code is governed by a BSD-style
2615 license that can be found in the LICENSE file.
2618 display: inline-block;
2619 box-sizing: border-box;
2620 -moz-box-sizing: border-box;
2623 background-image: none;
2627 vertical-align: middle;
2631 :host(.outline:host) {
2632 box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
2635 :host(:hover:host) {
2636 box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.1);
2639 :host(.selected:host) {
2640 background-color: rgba(0, 0, 0, 0.05);
2641 box-shadow: inset 0 1px 0 0 rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.12);
2644 :host(:active:host, .selected:active:host) {
2645 background-color: rgba(0, 0, 0, 0.05);
2646 box-shadow: inset 0 1px 0 0 rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.12);
2649 :host(.polymer-ui-dark-theme.outline:host) {
2650 background-color: rgba(200, 200, 200, 0.05);
2651 box-shadow: 0 0 0 1px rgba(200, 200, 200, 0.1);
2654 :host(.polymer-ui-dark-theme:hover:host) {
2655 background-color: rgba(200, 200, 200, 0.05);
2656 box-shadow: 0 1px 0 0 rgba(200, 200, 200, 0.12), 0 0 0 1px rgba(200, 200, 200, 0.1);
2659 :host(.polymer-ui-dark-theme.selected:host) {
2660 background-color: rgba(220, 220, 220, 0.05);
2661 box-shadow: inset 0 1px 0 0 rgba(200, 200, 200, 0.05), 0 0 0 1px rgba(200, 200, 200, 0.12);
2664 :host(.polymer-ui-dark-theme:active:host, .polymer-ui-dark-theme.selected:active:host) {
2665 background-color: rgba(200, 200, 200, 0.05);
2666 box-shadow: inset 0 1px 0 0 rgba(200, 200, 200, 0.1), 0 0 0 1px rgba(200, 200, 200, 0.12);
2670 display: block !important;
2672 <polymer-ui-icon src="{{src}}" index="{{index}}" icon="{{icon}}"><content></content></polymer-ui-icon>
2675 Polymer('polymer-ui-icon-button', {
2677 * The URL of an image for the icon.
2685 * If true, border is placed around the button to indicate
2694 * Specifies the icon from the Polymer icon set.
2702 * If a theme is applied that includes an icon set, the index of the
2710 activeChanged: function() {
2711 // TODO(sjmiles): sugar this common case
2712 this.classList.toggle('selected', this.active);
2720 background-color: white;
2721 border-bottom: 1px solid lightgray;
2724 background-color: darkgrey;
2728 <body class="polymer-ui-body-text" unresolved="">
2730 <polymer-ui-toolbar theme="polymer-ui-light-theme">
2731 <polymer-ui-icon-button icon="menu" id="menu-button"></polymer-ui-icon-button>
2732 <div flex="">Demo app</div>
2733 <polymer-ui-icon-button icon="refresh"></polymer-ui-icon-button>
2734 <polymer-ui-icon-button icon="add"></polymer-ui-icon-button>
2735 </polymer-ui-toolbar>
2737 <app-column id="messages" scrollable="">
2738 <app-dismissable-item class="message">Lorem ipsum 1</app-dismissable-item>
2739 <app-dismissable-item class="message">Lorem ipsum 2</app-dismissable-item>
2740 <app-dismissable-item class="message">Lorem ipsum 3</app-dismissable-item>
2741 <app-dismissable-item class="message">Lorem ipsum 4</app-dismissable-item>
2742 <app-dismissable-item class="message">Lorem ipsum 5</app-dismissable-item>
2743 <app-dismissable-item class="message">Lorem ipsum 6</app-dismissable-item>
2744 <app-dismissable-item class="message">Lorem ipsum 7</app-dismissable-item>
2745 <app-dismissable-item class="message">Lorem ipsum 8</app-dismissable-item>
2746 <app-dismissable-item class="message">Lorem ipsum 9</app-dismissable-item>
2747 <app-dismissable-item class="message">Lorem ipsum 10</app-dismissable-item>
2748 <app-dismissable-item class="message">Lorem ipsum 11</app-dismissable-item>
2749 <app-dismissable-item class="message">Lorem ipsum 12</app-dismissable-item>
2750 <app-dismissable-item class="message">Lorem ipsum 13</app-dismissable-item>
2751 <app-dismissable-item class="message">Lorem ipsum 14</app-dismissable-item>
2752 <app-dismissable-item class="message">Lorem ipsum 15</app-dismissable-item>
2753 <app-dismissable-item class="message">Lorem ipsum 16</app-dismissable-item>
2754 <app-dismissable-item class="message">Lorem ipsum 17</app-dismissable-item>
2755 <app-dismissable-item class="message">Lorem ipsum 18</app-dismissable-item>
2757 <app-scrollarea-toolbar for="messages">
2758 <polymer-ui-toolbar theme="polymer-ui-dark-theme">
2759 <polymer-ui-icon-button icon="add" flex=""></polymer-ui-icon-button>
2760 <polymer-ui-icon-button icon="sort" flex=""></polymer-ui-icon-button>
2761 <polymer-ui-icon-button icon="gplus" flex=""></polymer-ui-icon-button>
2762 </polymer-ui-toolbar>
2763 </app-scrollarea-toolbar>
2764 <app-scrollarea-toolbar for="messages" location="bottom">
2765 <polymer-ui-toolbar theme="polymer-ui-dark-theme">
2766 <polymer-ui-icon-button icon="add" flex=""></polymer-ui-icon-button>
2767 <polymer-ui-icon-button icon="sort" flex=""></polymer-ui-icon-button>
2768 <polymer-ui-icon-button icon="gplus" flex=""></polymer-ui-icon-button>
2769 </polymer-ui-toolbar>
2770 </app-scrollarea-toolbar>
2771 <app-drawer id="nav-drawer">
2772 <polymer-ui-menu selected="0" theme="polymer-ui-light-theme" active="false">
2773 <polymer-ui-menu-item icon="settings" label="Settings"></polymer-ui-menu-item>
2774 <polymer-ui-menu-item icon="dialog" label="AAAAA"></polymer-ui-menu-item>
2775 <polymer-ui-menu-item icon="dialog" label="BBBBB"></polymer-ui-menu-item>
2776 <polymer-ui-menu-item icon="dialog" label="CCCCC"></polymer-ui-menu-item>
2777 <polymer-ui-menu-item icon="dialog" label="DDDDD"></polymer-ui-menu-item>
2778 <polymer-ui-menu-item icon="dialog" label="EEEEE"></polymer-ui-menu-item>
2779 <polymer-ui-menu-item icon="dialog" label="FFFFF"></polymer-ui-menu-item>
2780 <polymer-ui-menu-item icon="dialog" label="GGGGG"></polymer-ui-menu-item>
2781 <polymer-ui-menu-item icon="dialog" label="HHHHH"></polymer-ui-menu-item>
2782 <polymer-ui-menu-item icon="dialog" label="IIIII"></polymer-ui-menu-item>
2783 <polymer-ui-menu-item icon="dialog" label="JJJJJ"></polymer-ui-menu-item>
2784 <polymer-ui-menu-item icon="dialog" label="KKKKK"></polymer-ui-menu-item>
2785 <polymer-ui-menu-item icon="dialog" label="LLLLL"></polymer-ui-menu-item>
2786 <polymer-ui-menu-item icon="dialog" label="MMMMM"></polymer-ui-menu-item>
2787 <polymer-ui-menu-item icon="dialog" label="NNNNN"></polymer-ui-menu-item>
2788 <polymer-ui-menu-item icon="dialog" label="OOOOO"></polymer-ui-menu-item>
2789 <polymer-ui-menu-item icon="dialog" label="PPPPP"></polymer-ui-menu-item>
2790 <polymer-ui-menu-item icon="dialog" label="QQQQQ"></polymer-ui-menu-item>
2791 <polymer-ui-menu-item icon="dialog" label="RRRRR"></polymer-ui-menu-item>
2792 <polymer-ui-menu-item icon="dialog" label="SSSSS"></polymer-ui-menu-item>
2793 <polymer-ui-menu-item icon="dialog" label="TTTTT"></polymer-ui-menu-item>
2794 <polymer-ui-menu-item icon="dialog" label="UUUUU"></polymer-ui-menu-item>
2795 <polymer-ui-menu-item icon="dialog" label="VVVVV"></polymer-ui-menu-item>
2796 <polymer-ui-menu-item icon="dialog" label="WWWWW"></polymer-ui-menu-item>
2797 <polymer-ui-menu-item icon="dialog" label="XXXXX"></polymer-ui-menu-item>
2798 <polymer-ui-menu-item icon="dialog" label="YYYYY"></polymer-ui-menu-item>
2799 <polymer-ui-menu-item icon="dialog" label="ZZZZZ"></polymer-ui-menu-item>
2800 <polymer-ui-menu-item icon="search" label="Search"></polymer-ui-menu-item>
2806 // document.addEventListener('WebComponentsReady', function() {
2807 document.getElementById('menu-button').addEventListener('click', function() {
2808 document.getElementById('nav-drawer').toggle();