summaryrefslogtreecommitdiff
path: root/third_party
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2013-07-18 11:57:30 +0100
committerBen Murdoch <benm@google.com>2013-07-18 11:57:30 +0100
commit9ab5563a3196760eb381d102cbb2bc0f7abc6a50 (patch)
tree1c690f8b0c998ba536a0c7aeff34764383c7dff6 /third_party
parent106cdaa9e420b49e5b1ef6941f08dd990128a374 (diff)
downloadchromium_org-9ab5563a3196760eb381d102cbb2bc0f7abc6a50.tar.gz
Merge from Chromium at DEPS revision r212225
This commit was generated by merge_to_master.py. Change-Id: I9b658b6bade7aff6166611a04fb26f4bcf0ca77c
Diffstat (limited to 'third_party')
-rw-r--r--third_party/leveldatabase/env_chromium.cc2
-rw-r--r--third_party/libjingle/README.chromium2
-rw-r--r--third_party/polymer/README.chromium7
-rw-r--r--third_party/polymer/README.md21
-rw-r--r--third_party/polymer/build.log36
-rw-r--r--third_party/polymer/polymer.min.js10
-rw-r--r--third_party/sqlite/src/src/recover.c803
7 files changed, 45 insertions, 836 deletions
diff --git a/third_party/leveldatabase/env_chromium.cc b/third_party/leveldatabase/env_chromium.cc
index 5192c10b1f..0333380fd2 100644
--- a/third_party/leveldatabase/env_chromium.cc
+++ b/third_party/leveldatabase/env_chromium.cc
@@ -14,7 +14,7 @@
#include "base/files/file_path.h"
#include "base/lazy_instance.h"
#include "base/memory/ref_counted.h"
-#include "base/message_loop.h"
+#include "base/message_loop/message_loop.h"
#include "base/metrics/histogram.h"
#include "base/platform_file.h"
#include "base/posix/eintr_wrapper.h"
diff --git a/third_party/libjingle/README.chromium b/third_party/libjingle/README.chromium
index 66cfef53c4..b2a9a14cf0 100644
--- a/third_party/libjingle/README.chromium
+++ b/third_party/libjingle/README.chromium
@@ -1,7 +1,7 @@
Name: libjingle
URL: http://code.google.com/p/libjingle/
Version: unknown
-Revision: 354
+Revision: 374
License: BSD
License File: source/COPYING
Security Critical: yes
diff --git a/third_party/polymer/README.chromium b/third_party/polymer/README.chromium
index 7b783997a0..36a338ba06 100644
--- a/third_party/polymer/README.chromium
+++ b/third_party/polymer/README.chromium
@@ -1,7 +1,7 @@
Name: Polymer
URL: http://www.polymer-project.org
-Version: 0
-Revision: 434cd0b3e8d81699760c75043ab6f7c5676db006
+Version: 0.0.20130711
+Revision: 983a363af92ef42f02d54999ef284b706655d15d
License: BSD
License File: LICENSE
Security Critical: no
@@ -16,5 +16,6 @@ becomes smaller and better over time.
2. A next-generation web application framework built upon these core
technologies called the Polymer.
-This is checked out from polymer stable branch. See build.log and README.md for
+This is downloaded from polymer stable release
+(https://github.com/Polymer/polymer/releases). See build.log and README.md for
how the minified file is generated.
diff --git a/third_party/polymer/README.md b/third_party/polymer/README.md
index 1623552106..2f86540603 100644
--- a/third_party/polymer/README.md
+++ b/third_party/polymer/README.md
@@ -1,15 +1,26 @@
# Polymer
-Build Status: [http://build.chromium.org/p/client.polymer/waterfall](http://build.chromium.org/p/client.polymer/waterfall)
+Build Status:
+[http://build.chromium.org/p/client.polymer/waterfall](http://build.chromium.org/p/client.polymer/waterfall)
## Brief Overview
-For more detailed info goto [http://polymer-project.org/](http://polymer-project.org/).
+For more detailed info goto
+[http://polymer-project.org/](http://polymer-project.org/).
-Polymer is a new type of library for the web, designed to leverage the existing browser infrastructure to provide the encapsulation and extendability currently only available in JS libraries.
+Polymer is a new type of library for the web, designed to leverage the existing
+browser infrastructure to provide the encapsulation and extendability currently
+only available in JS libraries.
-Polymer is based on a set of future technologies, including [Shadow DOM](https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html), [Custom Elements](https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/index.html) and Model Driven Views. Currently these technologies are implemented as polyfills or shims, but as browsers adopt these features natively, the platform code that drives Polymer evacipates, leaving only the value-adds.
+Polymer is based on a set of future technologies, including [Shadow
+DOM](https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html),
+[Custom
+Elements](https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/index.html)
+and Model Driven Views. Currently these technologies are implemented as
+polyfills or shims, but as browsers adopt these features natively, the platform
+code that drives Polymer evacipates, leaving only the value-adds.
## Tools & Testing
-For running tests or building minified files, consult the [tooling information](http://polymer-project.org/tooling-strategy.html).
+For running tests or building minified files, consult the [tooling
+information](http://polymer-project.org/tooling-strategy.html).
diff --git a/third_party/polymer/build.log b/third_party/polymer/build.log
index f0ae67d66b..adf4a45beb 100644
--- a/third_party/polymer/build.log
+++ b/third_party/polymer/build.log
@@ -1,18 +1,18 @@
BUILD LOG
---------
-Build Time: 2013-06-17T12:21:13
+Build Time: 2013-07-11T14:50:28
NODEJS INFORMATION
==================
nodejs: v0.10.4
-chai: 1.6.1
+chai: 1.7.1
grunt: 0.4.1
-grunt-audit: 0.0.0
+grunt-audit: 0.0.1
grunt-contrib-uglify: 0.2.2
grunt-contrib-yuidoc: 0.4.0
-grunt-karma-0.9.1: 0.4.3
-karma: 0.9.2
-karma-chrome-launcher: 0.0.1
+grunt-karma: 0.5.0
+karma: 0.9.3
+karma-chrome-launcher: 0.0.2
karma-coffee-preprocessor: 0.0.1
karma-crbot-reporter: 0.0.3
karma-firefox-launcher: 0.0.2
@@ -21,21 +21,21 @@ karma-mocha: 0.0.1
karma-phantomjs-launcher: 0.0.2
karma-requirejs: 0.0.1
karma-script-launcher: 0.0.1
-mocha: 1.10.0
+mocha: 1.11.0
REPO REVISIONS
==============
-polymer: 24689e70b7ebb122909d4ed17b53a2b2a455a2e5
-platform: 569a80ae565a0ecbe01d3a79128021fdf1caaff7
-ShadowDOM: 7a50b20542a559a0ffccb9e3a9330246a1f9fb5f
-HTMLImports: 7960a892cd4461333809605c3806ba4da699b1f0
-CustomElements: 76bfa07e8bfd5ed75c0c14682a66c40600e6baa0
-PointerEvents: 9bab6b80e74fcbbdb4145286aae264ae54175419
-PointerGestures: d6328b1e65daf111720f76b70f6d469a91a96335
-mdv: aaa18dc0069764ec9f25654c949e4a1071f551f2
+polymer: b3727b3cc08225e27a2f72105d6ea495ff975661
+platform: cd92266d192dbc2b82cf37a477b3a5213989114c
+ShadowDOM: 99775988a711e4093153e0f4d68a4d73814f2a1f
+HTMLImports: 69e86c01bde0e88e2a9d85fd5dec01f454edaf55
+CustomElements: ac5a5aba2296d758580063bce5fe8feb59bcc54a
+PointerEvents: ea792e163c90a7199a036b9026b835de2d7d93fb
+PointerGestures: 39a1434940e01109157161110158f8727a981f42
+mdv: 6691933756030c7653234054db34f23f20fe576a
BUILD HASHES
============
-polymer.min.js: 434cd0b3e8d81699760c75043ab6f7c5676db006
-polymer.native.min.js: 4f966c0f59a909dd3ac28068f1164016551ec179
-polymer.sandbox.min.js: 7444aba9341f62aeb0d89538ee033c77c16cd0e0 \ No newline at end of file
+polymer.min.js: 983a363af92ef42f02d54999ef284b706655d15d
+polymer.native.min.js: 5b47f9ddbe75673975b5b2b25807e9ca88b6d44f
+polymer.sandbox.min.js: dbdfbb0e57423136557f9fe8959709e294d9560c
diff --git a/third_party/polymer/polymer.min.js b/third_party/polymer/polymer.min.js
index 93dc0d2a6a..939910b4ea 100644
--- a/third_party/polymer/polymer.min.js
+++ b/third_party/polymer/polymer.min.js
@@ -25,11 +25,11 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-function PointerGestureEvent(a,b){var c=b||{},d=document.createEvent("Event"),e={bubbles:!0,cancelable:!0};return Object.keys(e).forEach(function(a){a in c&&(e[a]=c[a])}),d.initEvent(a,e.bubbles,e.cancelable),Object.keys(c).forEach(function(a){d[a]=b[a]}),d.preventTap=this.preventTap,d}if(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)}),b.shadow=(b.shadowdom||b.shadow||b.polyfill||!HTMLElement.prototype.webkitCreateShadowRoot)&&"polyfill",a.flags=b}(Platform),"polyfill"===Platform.flags.shadow){var SideTable;"undefined"!=typeof WeakMap&&navigator.userAgent.indexOf("Firefox/")<0?SideTable=WeakMap:function(){var a=Object.defineProperty,b=Object.hasOwnProperty,c=(new Date).getTime()%1e9;SideTable=function(){this.name="__st"+(1e9*Math.random()>>>0)+(c++ +"__")},SideTable.prototype={set:function(b,c){a(b,this.name,{value:c,writable:!0})},get:function(a){return b.call(a,this.name)?a[this.name]:void 0},"delete":function(a){this.set(a,void 0)}}}();var ShadowDOMPolyfill={};!function(a){"use strict";function b(a){if(!a)throw new Error("Assertion failed")}function c(a,b){return Object.getOwnPropertyNames(b).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))}),a}function d(a,b){return Object.getOwnPropertyNames(b).forEach(function(c){switch(c){case"arguments":case"caller":case"length":case"name":case"prototype":case"toString":return}Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))}),a}function e(a){var b=a.__proto__||Object.getPrototypeOf(a),c=z.get(b);if(c)return c;var d=e(b),f=n(d);return k(b,f,a),f}function f(a,b){i(a,b,!0)}function g(a,b){i(b,a,!1)}function h(a){return/^on[a-z]+$/.test(a)}function i(b,c,d){Object.getOwnPropertyNames(b).forEach(function(e){if(!(e in c)){B&&b.__lookupGetter__(e);var f;try{f=Object.getOwnPropertyDescriptor(b,e)}catch(g){f=C}var i,j;if(d&&"function"==typeof f.value)return c[e]=function(){return this.impl[e].apply(this.impl,arguments)},void 0;var k=h(e);i=k?a.getEventHandlerGetter(e):function(){return this.impl[e]},(f.writable||f.set)&&(j=k?a.getEventHandlerSetter(e):function(a){this.impl[e]=a}),Object.defineProperty(c,e,{get:i,set:j,configurable:f.configurable,enumerable:f.enumerable})}})}function j(a,b,c){var e=a.prototype;k(e,b,c),d(b,a)}function k(a,c,d){var e=c.prototype;b(void 0===z.get(a)),z.set(a,c),f(a,e),d&&g(e,d)}function l(a,b){return z.get(b.prototype)===a}function m(a){var b=Object.getPrototypeOf(a),c=e(b),d=n(c);return k(b,d,a),d}function n(a){function b(b){a.call(this,b)}return b.prototype=Object.create(a.prototype),b.prototype.constructor=b,b}function o(a){return a instanceof A.EventTarget||a instanceof A.Event||a instanceof A.DOMImplementation}function p(a){return a instanceof F||a instanceof E||a instanceof G||a instanceof D}function q(a){if(null===a)return null;b(p(a));var c=y.get(a);if(!c){var d=e(a);c=new d(a),y.set(a,c)}return c}function r(a){return null===a?null:(b(o(a)),a.impl)}function s(a){return a&&o(a)?r(a):a}function t(a){return a&&!o(a)?q(a):a}function u(a,c){null!==c&&(b(p(a)),b(void 0===c||o(c)),y.set(a,c))}function v(a,b,c){Object.defineProperty(a.prototype,b,{get:c,configurable:!0,enumerable:!0})}function w(a,b){v(a,b,function(){return q(this.impl[b])})}function x(a,b){a.forEach(function(a){b.forEach(function(b){a.prototype[b]=function(){var a=q(this);return a[b].apply(a,arguments)}})})}var y=new SideTable,z=new SideTable,A=Object.create(null);Object.getOwnPropertyNames(window);var B=/Firefox/.test(navigator.userAgent),C={get:function(){},set:function(){},configurable:!0,enumerable:!0},D=DOMImplementation,E=Event,F=Node,G=Window;a.assert=b,a.defineGetter=v,a.defineWrapGetter=w,a.forwardMethodsToWrapper=x,a.isWrapperFor=l,a.mixin=c,a.registerObject=m,a.registerWrapper=j,a.rewrap=u,a.unwrap=r,a.unwrapIfNeeded=s,a.wrap=q,a.wrapIfNeeded=t,a.wrappers=A}(this.ShadowDOMPolyfill),function(a){"use strict";function b(a){return a instanceof M.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)&&L(b)||null}function f(f,g,h){if(h.length)return h.shift();if(b(f))return j(f)||a.getHostForShadowRoot(f);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(d,e){for(var g=[];d;){for(var i=[],j=e,l=void 0;j;){var n=null;if(i.length){if(c(j)&&(n=h(i),k(l))){var o=i[i.length-1];i.push(o)}}else i.push(j);if(m(j,d))return i[i.length-1];b(j)&&i.pop(),l=j,j=f(j,n,g)}d=b(d)?a.getHostForShadowRoot(d):d.parentNode}}function j(b){return a.insertionParentTable.get(b)}function k(a){return j(a)}function l(a){for(var b;b=a.parentNode;)a=b;return a}function m(a,b){return l(a)===l(b)}function n(a){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 o(b){if(!O.get(b)){O.set(b,!0),n(b.type)||a.renderAllPending();var c=L(b.target),d=L(b);return p(d,c)}}function p(a,b){var c=g(b);return"load"===a.type&&2===c.length&&c[0].target instanceof M.Document&&c.shift(),W.set(a,c),q(a,c)&&r(a,c)&&s(a,c),S.set(a,v.NONE),Q.set(a,null),a.defaultPrevented}function q(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=v.CAPTURING_PHASE,!t(b[d],a,c)))return!1}return!0}function r(a,b){var c=v.AT_TARGET;return t(b[0],a,c)}function s(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=v.AT_TARGET;else{if(!d||U.get(a))continue;c=v.BUBBLING_PHASE}if(!t(b[e],a,c))return}}function t(a,b,c){var d=a.target,e=a.currentTarget,f=N.get(e);if(!f)return!0;if("relatedTarget"in b){var g=K(b),h=L(g.relatedTarget),j=i(e,h);if(j===d)return!0;R.set(b,j)}S.set(b,c);var k=b.type,l=!1;P.set(b,d),Q.set(b,e);for(var m=0;m<f.length;m++){var n=f[m];if(n.removed)l=!0;else if(!(n.type!==k||!n.capture&&c===v.CAPTURING_PHASE||n.capture&&c===v.BUBBLING_PHASE))try{if("function"==typeof n.handler?n.handler.call(e,b):n.handler.handleEvent(b),U.get(b))return!1}catch(o){window.onerror?window.onerror(o.message):console.error(o)}}if(l){var p=f.slice();f.length=0;for(var m=0;m<p.length;m++)p[m].removed||f.push(p[m])}return!T.get(b)}function u(a,b,c){this.type=a,this.handler=b,this.capture=Boolean(c)}function v(a,b){return a instanceof X?(this.impl=a,void 0):L(z(X,"Event",a,b))}function w(a){return a&&a.relatedTarget?Object.create(a,{relatedTarget:{value:K(a.relatedTarget)}}):a}function x(a,b,c){var d=window[a],e=function(b,c){return b instanceof d?(this.impl=b,void 0):L(z(d,a,b,c))};return e.prototype=Object.create(b.prototype),c&&I(e.prototype,c),d&&J(d,e,document.createEvent(a)),e}function y(a,b){return function(){arguments[b]=K(arguments[b]);var c=K(this);c[a].apply(c,arguments)}}function z(a,b,c,d){if(fb)return new a(c,w(d));var e=K(document.createEvent(b)),f=eb[b],g=[c];return Object.keys(f).forEach(function(a){var b=null!=d&&a in d?d[a]:f[a];"relatedTarget"===a&&(b=K(b)),g.push(b)}),e["init"+b].apply(e,g),e}function A(a){return"function"==typeof a?!0:a&&a.handleEvent}function B(a){this.impl=a}function C(b){return b instanceof M.ShadowRoot&&(b=a.getHostForShadowRoot(b)),K(b)}function D(a){H(a,ib)}function E(b,c,d,e){a.renderAllPending();for(var f=L(jb.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 F(a){return function(){var b=V.get(this);return b&&b[a]&&b[a].value||null}}function G(a){var b=a.slice(2);return function(c){var d=V.get(this);d||(d=Object.create(null),V.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 H=a.forwardMethodsToWrapper,I=a.mixin,J=a.registerWrapper,K=a.unwrap,L=a.wrap,M=a.wrappers;new SideTable;var N=new SideTable,O=new SideTable,P=new SideTable,Q=new SideTable,R=new SideTable,S=new SideTable,T=new SideTable,U=new SideTable,V=new SideTable,W=new SideTable;u.prototype={equals:function(a){return this.handler===a.handler&&this.type===a.type&&this.capture===a.capture},get removed(){return null===this.handler},remove:function(){this.handler=null}};var X=window.Event;v.prototype={get target(){return P.get(this)},get currentTarget(){return Q.get(this)},get eventPhase(){return S.get(this)},get path(){var a=new M.NodeList,b=W.get(this);if(b){for(var c=0,d=!1,e=Q.get(this),f=b.length-1,g=0;f>=g;g++)if(d||(d=b[g].currentTarget===e),d){var h=b[g].currentTarget;(g!==f||h instanceof M.Node)&&(a[c++]=h)}a.length=c}return a},stopPropagation:function(){T.set(this,!0)},stopImmediatePropagation:function(){T.set(this,!0),U.set(this,!0)}},J(X,v,document.createEvent("Event"));var Y=x("UIEvent",v),Z=x("CustomEvent",v),$={get relatedTarget(){return R.get(this)||L(K(this).relatedTarget)}},_=I({initMouseEvent:y("initMouseEvent",14)},$),ab=I({initFocusEvent:y("initFocusEvent",5)},$),bb=x("MouseEvent",Y,_),cb=x("FocusEvent",Y,ab),db=x("MutationEvent",v,{initMutationEvent:y("initMutationEvent",3),get relatedNode(){return L(this.impl.relatedNode)}}),eb=Object.create(null),fb=function(){try{new window.MouseEvent("click")}catch(a){return!1}return!0}();if(!fb){var gb=function(a,b,c){if(c){var d=eb[c];b=I(I({},d),b)}eb[a]=b};gb("Event",{bubbles:!1,cancelable:!1}),gb("CustomEvent",{detail:null},"Event"),gb("UIEvent",{view:null,detail:0},"Event"),gb("MouseEvent",{screenX:0,screenY:0,clientX:0,clientY:0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null},"UIEvent"),gb("FocusEvent",{relatedTarget:null},"UIEvent")}var hb=window.EventTarget,ib=["addEventListener","removeEventListener","dispatchEvent"];[Element,Window,Document].forEach(function(a){var b=a.prototype;ib.forEach(function(a){Object.defineProperty(b,a+"_",{value:b[a]})})}),B.prototype={addEventListener:function(a,b,c){if(A(b)){var d=new u(a,b,c),e=N.get(this);if(e){for(var f=0;f<e.length;f++)if(d.equals(e[f]))return}else e=[],N.set(this,e);e.push(d);var g=C(this);g.addEventListener_(a,o,!0)}},removeEventListener:function(a,b,c){c=Boolean(c);var d=N.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=C(this);h.removeEventListener_(a,o,!0)}}},dispatchEvent:function(a){var b=C(this);return b.dispatchEvent_(K(a))}},hb&&J(hb,B);var jb=document.elementFromPoint;a.adjustRelatedTarget=i,a.elementFromPoint=E,a.getEventHandlerGetter=F,a.getEventHandlerSetter=G,a.wrapEventTargetMethods=D,a.wrappers.CustomEvent=Z,a.wrappers.Event=v,a.wrappers.EventTarget=B,a.wrappers.FocusEvent=cb,a.wrappers.MouseEvent=bb,a.wrappers.MutationEvent=db,a.wrappers.UIEvent=Y}(this.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}(this.ShadowDOMPolyfill),function(a){"use strict";function b(a){j(a instanceof f)}function c(a,b,c,d){if(a.nodeType!==f.DOCUMENT_FRAGMENT_NODE)return a.parentNode&&a.parentNode.removeChild(a),a.parentNode_=b,a.previousSibling_=c,a.nextSibling_=d,c&&(c.nextSibling_=a),d&&(d.previousSibling_=a),[a];for(var e,g=[];e=a.firstChild;)a.removeChild(e),g.push(e),e.parentNode_=b;for(var h=0;h<g.length;h++)g[h].previousSibling_=g[h-1]||c,g[h].nextSibling_=g[h+1]||d;return c&&(c.nextSibling_=g[0]),d&&(d.previousSibling_=g[g.length-1]),g}function d(a,b){var c=b.length;if(1===c)return m(b[0]);for(var d=m(a.ownerDocument.createDocumentFragment()),e=0;c>e;e++)d.appendChild(m(b[e]));return d}function e(a){for(var b=a.firstChild;b;){j(b.parentNode===a);var c=b.nextSibling,d=m(b),e=d.parentNode;e&&s.call(e,d),b.previousSibling_=b.nextSibling_=b.parentNode_=null,b=c}a.firstChild_=a.lastChild_=null}function f(a){j(a instanceof o),g.call(this,a),this.parentNode_=void 0,this.firstChild_=void 0,this.lastChild_=void 0,this.nextSibling_=void 0,this.previousSibling_=void 0}var g=a.wrappers.EventTarget,h=a.wrappers.NodeList,i=a.defineWrapGetter,j=a.assert,k=a.mixin,l=a.registerWrapper,m=a.unwrap,n=a.wrap,o=window.Node,p=o.prototype.appendChild,q=o.prototype.insertBefore,r=o.prototype.replaceChild,s=o.prototype.removeChild,t=o.prototype.compareDocumentPosition;f.prototype=Object.create(g.prototype),k(f.prototype,{appendChild:function(a){b(a),this.invalidateShadowRenderer();var e=this.lastChild,f=null,g=c(a,this,e,f);return this.lastChild_=g[g.length-1],e||(this.firstChild_=g[0]),p.call(this.impl,d(this,g)),a},insertBefore:function(a,e){if(!e)return this.appendChild(a);b(a),b(e),j(e.parentNode===this),this.invalidateShadowRenderer();var f=e.previousSibling,g=e,h=c(a,this,f,g);this.firstChild===e&&(this.firstChild_=h[0]);var i=m(e),k=i.parentNode;return k&&q.call(k,d(this,h),i),a},removeChild:function(a){if(b(a),a.parentNode!==this)throw new Error("NotFoundError");this.invalidateShadowRenderer();var c=this.firstChild,d=this.lastChild,e=a.nextSibling,f=a.previousSibling,g=m(a),h=g.parentNode;return h&&s.call(h,g),c===a&&(this.firstChild_=e),d===a&&(this.lastChild_=f),f&&(f.nextSibling_=e),e&&(e.previousSibling_=f),a.previousSibling_=a.nextSibling_=a.parentNode_=null,a},replaceChild:function(a,e){if(b(a),b(e),e.parentNode!==this)throw new Error("NotFoundError");this.invalidateShadowRenderer();var f=e.previousSibling,g=e.nextSibling;g===a&&(g=a.nextSibling);var h=c(a,this,f,g);this.firstChild===e&&(this.firstChild_=h[0]),this.lastChild===e&&(this.lastChild_=h[h.length-1]),e.previousSibling_=null,e.nextSibling_=null,e.parentNode_=null;var i=m(e);return i.parentNode&&r.call(i.parentNode,d(this,h),i),e},hasChildNodes:function(){return null===this.firstChild},get parentNode(){return void 0!==this.parentNode_?this.parentNode_:n(this.impl.parentNode)},get firstChild(){return void 0!==this.firstChild_?this.firstChild_:n(this.impl.firstChild)},get lastChild(){return void 0!==this.lastChild_?this.lastChild_:n(this.impl.lastChild)},get nextSibling(){return void 0!==this.nextSibling_?this.nextSibling_:n(this.impl.nextSibling)},get previousSibling(){return void 0!==this.previousSibling_?this.previousSibling_:n(this.impl.previousSibling)},get parentElement(){for(var a=this.parentNode;a&&a.nodeType!==f.ELEMENT_NODE;)a=a.parentNode;return a},get textContent(){for(var a="",b=this.firstChild;b;b=b.nextSibling)a+=b.textContent;return a},set textContent(a){if(e(this),this.invalidateShadowRenderer(),""!==a){var b=this.impl.ownerDocument.createTextNode(a);this.appendChild(b)}},get childNodes(){for(var a=new h,b=0,c=this.firstChild;c;c=c.nextSibling)a[b++]=c;return a.length=b,a},cloneNode:function(a){if(!this.invalidateShadowRenderer())return n(this.impl.cloneNode(a));var b=n(this.impl.cloneNode(!1));if(a)for(var c=this.firstChild;c;c=c.nextSibling)b.appendChild(c.cloneNode(!0));return b},contains:function(a){if(!a)return!1;if(a===this)return!0;var b=a.parentNode;return b?this.contains(b):!1},compareDocumentPosition:function(a){return t.call(this.impl,m(a))}}),i(f,"ownerDocument"),l(o,f,document.createDocumentFragment()),delete f.prototype.querySelector,delete f.prototype.querySelectorAll,f.prototype=k(Object.create(g.prototype),f.prototype),a.wrappers.Node=f}(this.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}(this.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}},f={get nextElementSibling(){return b(this.nextSibling)},get previousElementSibling(){return c(this.nextSibling)}};a.ChildNodeInterface=f,a.ParentNodeInterface=e}(this.ShadowDOMPolyfill),function(a){"use strict";function b(a){d.call(this,a)}var c=a.ChildNodeInterface,d=a.wrappers.Node,e=a.mixin,f=a.registerWrapper,g=window.CharacterData;b.prototype=Object.create(d.prototype),e(b.prototype,{get textContent(){return this.data},set textContent(a){this.data=a}}),e(b.prototype,c),f(g,b,document.createTextNode("")),a.wrappers.CharacterData=b}(this.ShadowDOMPolyfill),function(a){"use strict";function b(a){e.call(this,a)}var c=a.ChildNodeInterface,d=a.GetElementsByInterface,e=a.wrappers.Node,f=a.ParentNodeInterface,g=a.SelectorsInterface;a.addWrapNodeListMethod;var h=a.mixin,i=a.registerWrapper,j=a.wrappers,k=new SideTable,l=window.Element,m=l.prototype.matches||l.prototype.mozMatchesSelector||l.prototype.msMatchesSelector||l.prototype.webkitMatchesSelector;b.prototype=Object.create(e.prototype),h(b.prototype,{createShadowRoot:function(){var b=new j.ShadowRoot(this);return k.set(this,b),a.getRendererForHost(this),this.invalidateShadowRenderer(!0),b},get shadowRoot(){return k.get(this)||null},setAttribute:function(a,b){this.impl.setAttribute(a,b),this.invalidateShadowRenderer()},matches:function(a){return m.call(this.impl,a)}}),l.prototype.webkitCreateShadowRoot&&(b.prototype.webkitCreateShadowRoot=b.prototype.createShadowRoot),h(b.prototype,c),h(b.prototype,d),h(b.prototype,f),h(b.prototype,g),i(l,b),a.wrappers.Element=b}(this.ShadowDOMPolyfill),function(a){"use strict";function b(a){switch(a){case"&":return"&amp;";case"<":return"&lt;";case'"':return"&quot;"}}function c(a){return a.replace(p,b)}function d(a){switch(a.nodeType){case Node.ELEMENT_NODE:for(var b,d=a.tagName.toLowerCase(),f="<"+d,g=a.attributes,h=0;b=g[h];h++)f+=" "+b.name+'="'+c(b.value)+'"';return f+=">",q[d]?f:f+e(a)+"</"+d+">";case Node.TEXT_NODE:return c(a.nodeValue);case Node.COMMENT_NODE:return"<!--"+c(a.nodeValue)+"-->";default:throw console.error(a),new Error("not implemented")}}function e(a){for(var b="",c=a.firstChild;c;c=c.nextSibling)b+=d(c);return b}function f(a,b,c){var d=c||"div";a.textContent="";var e=n(a.ownerDocument.createElement(d));e.innerHTML=b;for(var f;f=e.firstChild;)a.appendChild(o(f))}function g(a){j.call(this,a)}function h(b){k(g,b,function(){return a.renderAllPending(),this.impl[b]})}function i(b){Object.defineProperty(g.prototype,b,{value:function(){return a.renderAllPending(),this.impl[b].apply(this.impl,arguments)},configurable:!0,enumerable:!0})}var j=a.wrappers.Element,k=a.defineGetter,l=a.mixin,m=a.registerWrapper,n=a.unwrap,o=a.wrap,p=/&|<|"/g,q={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},r=window.HTMLElement;g.prototype=Object.create(j.prototype),l(g.prototype,{get innerHTML(){return e(this)},set innerHTML(a){f(this,a,this.tagName)},get outerHTML(){return d(this)},set outerHTML(a){if(this.invalidateShadowRenderer())throw new Error("not implemented");this.impl.outerHTML=a}}),["clientHeight","clientLeft","clientTop","clientWidth","offsetHeight","offsetLeft","offsetTop","offsetWidth","scrollHeight","scrollLeft","scrollTop","scrollWidth"].forEach(h),["getBoundingClientRect","getClientRects","scrollIntoView"].forEach(i),m(r,g,document.createElement("b")),a.wrappers.HTMLElement=g,a.getInnerHTML=e,a.setInnerHTML=f}(this.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}(this.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a),this.olderShadowRoot_=null}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=window.HTMLShadowElement;b.prototype=Object.create(c.prototype),d(b.prototype,{get olderShadowRoot(){return this.olderShadowRoot_},invalidateShadowRenderer:function(){c.prototype.invalidateShadowRenderer.call(this,!0)}}),f&&e(f,b),a.wrappers.HTMLShadowElement=b}(this.ShadowDOMPolyfill),function(a){"use strict";function b(a){if(!a.defaultView)return a;var b=l.get(a);if(!b){for(b=a.implementation.createHTMLDocument("");b.lastChild;)b.removeChild(b.lastChild);l.set(a,b)}return b}function c(a){for(var c,d=b(a.ownerDocument),e=d.createDocumentFragment();c=a.firstChild;)e.appendChild(c);return e}function d(a){e.call(this,a)}var e=a.wrappers.HTMLElement,f=a.getInnerHTML,g=a.mixin,h=a.registerWrapper,i=a.setInnerHTML,j=a.wrap,k=new SideTable,l=new SideTable,m=window.HTMLTemplateElement;d.prototype=Object.create(e.prototype),g(d.prototype,{get content(){if(m)return j(this.impl.content);var a=k.get(this);return a||(a=c(this),k.set(this,a)),a},get innerHTML(){return f(this.content)},set innerHTML(a){i(this.content,a),this.invalidateShadowRenderer()}}),m&&h(m,d),a.wrappers.HTMLTemplateElement=d}(this.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;a.mixin;var g=a.registerWrapper,h=window.HTMLUnknownElement;b.prototype=Object.create(d.prototype),g(h,b),a.wrappers.HTMLUnknownElement=b}(this.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());e(g.prototype,c),e(g.prototype,d),e(g.prototype,b);var h=f(document.createTextNode("")),i=f(document.createComment(""));a.wrappers.Comment=i,a.wrappers.DocumentFragment=g,a.wrappers.Text=h}(this.ShadowDOMPolyfill),function(a){"use strict";function b(b){var d=i(b.impl.ownerDocument.createDocumentFragment());c.call(this,d),g(d,this);var e=b.shadowRoot;a.nextOlderShadowTreeTable.set(this,e),j.set(this,b)}var c=a.wrappers.DocumentFragment,d=a.elementFromPoint,e=a.getInnerHTML,f=a.mixin,g=a.rewrap,h=a.setInnerHTML,i=a.unwrap,j=new SideTable;b.prototype=Object.create(c.prototype),f(b.prototype,{get innerHTML(){return e(this)},set innerHTML(a){h(this,a),this.invalidateShadowRenderer()},invalidateShadowRenderer:function(){return j.get(this).invalidateShadowRenderer()},elementFromPoint:function(a,b){return d(this,this.ownerDocument,a,b)},getElementById:function(a){return this.querySelector("#"+a)}}),a.wrappers.ShadowRoot=b,a.getHostForShadowRoot=function(a){return j.get(a)}}(this.ShadowDOMPolyfill),function(a){"use strict";function b(a){a.previousSibling_=a.previousSibling,a.nextSibling_=a.nextSibling,a.parentNode_=a.parentNode}function c(a){a.firstChild_=a.firstChild,a.lastChild_=a.lastChild}function d(a){E(a instanceof D);for(var d=a.firstChild;d;d=d.nextSibling)b(d);c(a)}function e(a){var b=G(a);d(a),b.textContent=""}function f(a,c){var e=G(a),f=G(c);f.nodeType===D.DOCUMENT_FRAGMENT_NODE?d(c):(h(c),b(c)),a.lastChild_=a.lastChild,a.lastChild===a.firstChild&&(a.firstChild_=a.firstChild);var g=H(e.lastChild);g&&(g.nextSibling_=g.nextSibling),e.appendChild(f)}function g(a,c){var d=G(a),e=G(c);b(c),c.previousSibling&&(c.previousSibling.nextSibling_=c),c.nextSibling&&(c.nextSibling.previousSibling_=c),a.lastChild===c&&(a.lastChild_=c),a.firstChild===c&&(a.firstChild_=c),d.removeChild(e)}function h(a){var b=G(a),c=b.parentNode;c&&g(H(c),a)}function i(a,b){k(b).push(a),A(a,b);var c=J.get(a);c||J.set(a,c=[]),c.push(b)}function j(a){I.set(a,[])}function k(a){return I.get(a)}function l(a){for(var b=[],c=0,d=a.firstChild;d;d=d.nextSibling)b[c++]=d;return b}function m(a,b,c){for(var d=l(a),e=0;e<d.length;e++){var f=d[e];if(b(f)){if(c(f)===!1)return}else m(f,b,c)}}function n(a,b){var c=!1;return m(a,u,function(a){j(a);for(var d=0;d<b.length;d++){var e=b[d];void 0!==e&&p(e,a)&&(i(e,a),b[d]=void 0,c=!0)}}),c?b.filter(function(a){return void 0!==a}):b}function o(a,b){for(var c=0;c<b.length;c++)if(b[c]in a)return b[c]}function p(a,b){var c=b.getAttribute("select");if(!c)return!0;if(c=c.trim(),!c)return!0;if(a.nodeType!==D.ELEMENT_NODE)return!1;if(!O.test(c))return!1;if(":"===c[0]&&!P.test(c))return!1;try{return a.matches(c)}catch(d){return!1}}function q(){F=null,R.forEach(function(a){a.render()}),R=[]}function r(a){this.host=a,this.dirty=!1,this.associateNode(a)}function s(a){var b=M.get(a);return b||(b=new r(a),M.set(a,b)),b}function t(a){return"content"===a.localName}function u(a){return"content"===a.localName}function v(a){return"shadow"===a.localName}function w(a){return"shadow"===a.localName}function x(a){return!!a.shadowRoot}function y(a){return L.get(a)}function z(a){for(var b=[],c=a.shadowRoot;c;c=L.get(c))b.push(c);return b}function A(a,b){K.set(a,b)}function B(a){new r(a).render()}var C=a.wrappers.HTMLContentElement,D=a.wrappers.Node,E=a.assert;a.mixin;var F,G=a.unwrap,H=a.wrap,I=new SideTable,J=new SideTable,K=new SideTable,L=new SideTable,M=new SideTable,N=new SideTable,O=/^[*.:#[a-zA-Z_|]/,P=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("|")+")"),Q=o(window,["requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","setTimeout"]),R=[];r.prototype={render:function(){if(this.dirty){var a=this.host;this.treeComposition();var b=a.shadowRoot;if(b){this.removeAllChildNodes(this.host);var c=l(b);c.forEach(function(c){this.renderNode(a,b,c,!1)},this),this.dirty=!1}}},invalidate:function(){if(!this.dirty){if(this.dirty=!0,R.push(this),F)return;F=window[Q](q,0)}},renderNode:function(a,b,c,d){if(x(c)){this.appendChild(a,c);var e=s(c);e.dirty=!0,e.render()}else t(c)?this.renderInsertionPoint(a,b,c,d):v(c)?this.renderShadowInsertionPoint(a,b,c):this.renderAsAnyDomTree(a,b,c,d)},renderAsAnyDomTree:function(a,b,c,d){if(this.appendChild(a,c),x(c))B(c);else{var e=c,f=l(e);f.forEach(function(a){this.renderNode(e,b,a,d)},this)}},renderInsertionPoint:function(a,b,c,d){var e=k(c);e.length?(this.removeAllChildNodes(c),e.forEach(function(c){t(c)&&d?this.renderInsertionPoint(a,b,c,d):this.renderAsAnyDomTree(a,b,c,d)},this)):this.renderFallbackContent(a,c),this.remove(c)},renderShadowInsertionPoint:function(a,b,c){var d=y(b);if(d){A(d,c),c.olderShadowRoot_=d,this.remove(c);var e=l(d);e.forEach(function(b){this.renderNode(a,d,b,!0)},this)}else this.renderFallbackContent(a,c)},renderFallbackContent:function(a,b){var c=l(b);c.forEach(function(b){this.appendChild(a,b)},this)},treeComposition:function(){var a=this.host,b=a.shadowRoot,c=[],d=l(a);d.forEach(function(a){if(t(a)){var b=k(a);b&&b.length||(b=l(a)),c.push.apply(c,b)}else c.push(a)});for(var e,f;b;){if(e=void 0,m(b,w,function(a){return e=a,!1}),f=e,c=n(b,c),f){var g=y(b);if(g){b=g,A(b,f);continue}break}break}},appendChild:function(a,b){f(a,b),this.associateNode(b)},remove:function(a){h(a),this.associateNode(a)},removeAllChildNodes:function(a){e(a)},associateNode:function(a){N.set(a,this)}},D.prototype.invalidateShadowRenderer=function(a){var b=N.get(this);if(!b)return!1;var c;return(a||this.shadowRoot||(c=this.parentNode)&&(c.shadowRoot||c instanceof ShadowRoot))&&b.invalidate(),!0},C.prototype.getDistributedNodes=function(){return q(),k(this)},a.eventParentsTable=J,a.getRendererForHost=s,a.getShadowTrees=z,a.nextOlderShadowTreeTable=L,a.renderAllPending=q,a.insertionParentTable=K,a.visual={removeAllChildNodes:e,appendChild:f,removeChild:g}}(this.ShadowDOMPolyfill),function(a){"use strict";function b(a){j.call(this,a)}function c(a){var c=document[a];b.prototype[a]=function(){return t(c.apply(this.impl,arguments))}}function d(a,b){a.shadowRoot&&b.adoptNode(a.shadowRoot),a instanceof m&&e(a,b);for(var c=a.firstChild;c;c=c.nextSibling)d(c,b)}function e(b,c){var d=a.nextOlderShadowTreeTable.get(b);d&&c.adoptNode(d)}function f(a){this.impl=a}function g(a,b){var c=document.implementation[b];a.prototype[b]=function(){return t(c.apply(this.impl,arguments))}}function h(a,b){var c=document.implementation[b];a.prototype[b]=function(){return c.apply(this.impl,arguments)}}var i=a.GetElementsByInterface,j=a.wrappers.Node,k=a.ParentNodeInterface,l=a.SelectorsInterface,m=a.wrappers.ShadowRoot,n=a.defineWrapGetter,o=a.elementFromPoint,p=a.forwardMethodsToWrapper,q=a.mixin,r=a.registerWrapper,s=a.unwrap,t=a.wrap,u=a.wrapEventTargetMethods;a.wrapNodeList;var v=new SideTable;b.prototype=Object.create(j.prototype),n(b,"documentElement"),n(b,"body"),n(b,"head"),["getElementById","createElement","createElementNS","createTextNode","createDocumentFragment","createEvent","createEventNS"].forEach(c);var w=document.adoptNode,x=document.write;q(b.prototype,{adoptNode:function(a){return a.parentNode&&a.parentNode.removeChild(a),w.call(this.impl,s(a)),d(a,this),a},elementFromPoint:function(a,b){return o(this,this,a,b)},write:function(a){for(var b=this.querySelectorAll("*"),c=b[b.length-1];c.nextSibling;)c=c.nextSibling;var d=c.parentNode;d.lastChild_=void 0,c.nextSibling_=void 0,x.call(this.impl,a)}}),p([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement],["appendChild","compareDocumentPosition","getElementsByClassName","getElementsByTagName","getElementsByTagNameNS","insertBefore","querySelector","querySelectorAll","removeChild","replaceChild"]),p([window.HTMLDocument||window.Document],["adoptNode","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createTextNode","elementFromPoint","getElementById","write"]),q(b.prototype,i),q(b.prototype,k),q(b.prototype,l),q(b.prototype,{get implementation(){var a=v.get(this);return a?a:(a=new f(s(this).implementation),v.set(this,a),a)}}),r(window.Document,b,document.implementation.createHTMLDocument("")),window.HTMLDocument&&r(window.HTMLDocument,b),u([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement]),g(f,"createDocumentType"),g(f,"createDocument"),g(f,"createHTMLDocument"),h(f,"hasFeature"),r(window.DOMImplementation,f),p([window.DOMImplementation],["createDocumentType","createDocument","createHTMLDocument","hasFeature"]),a.wrappers.Document=b,a.wrappers.DOMImplementation=f
-}(this.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.unwrap,g=a.unwrapIfNeeded,h=a.wrap,i=window.Window;b.prototype=Object.create(c.prototype);var j=window.getComputedStyle;i.prototype.getComputedStyle=function(a,b){return j.call(this||window,g(a),b)},["addEventListener","removeEventListener","dispatchEvent"].forEach(function(a){i.prototype[a]=function(){var b=h(this||window);return b[a].apply(b,arguments)}}),d(b.prototype,{getComputedStyle:function(a,b){return j.call(f(this),g(a),b)}}),e(i,b),a.wrappers.Window=b}(this.ShadowDOMPolyfill),function(a){"use strict";function b(a){this.impl=a}function c(a){return new b(a)}function d(a){return a.map(c)}function e(a){var b=this;this.impl=new k(function(c){a.call(b,d(c),b)})}var f=a.defineGetter,g=a.defineWrapGetter,h=a.registerWrapper,i=a.unwrapIfNeeded,j=a.wrapNodeList;a.wrappers;var k=window.MutationObserver||window.WebKitMutationObserver;if(k){var l=window.MutationRecord;b.prototype={get addedNodes(){return j(this.impl.addedNodes)},get removedNodes(){return j(this.impl.removedNodes)}},["target","previousSibling","nextSibling"].forEach(function(a){g(b,a)}),["type","attributeName","attributeNamespace","oldValue"].forEach(function(a){f(b,a,function(){return this.impl[a]})}),l&&h(l,b),window.Node,e.prototype={observe:function(a,b){this.impl.observe(i(a),b)},disconnect:function(){this.impl.disconnect()},takeRecords:function(){return d(this.impl.takeRecords())}},a.wrappers.MutationObserver=e,a.wrappers.MutationRecord=b}}(this.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}}a.isWrapperFor;var c={a:"HTMLAnchorElement",applet:"HTMLAppletElement",area:"HTMLAreaElement",audio:"HTMLAudioElement",br:"HTMLBRElement",base:"HTMLBaseElement",body:"HTMLBodyElement",button:"HTMLButtonElement",canvas:"HTMLCanvasElement",dl:"HTMLDListElement",datalist:"HTMLDataListElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",embed:"HTMLEmbedElement",fieldset:"HTMLFieldSetElement",font:"HTMLFontElement",form:"HTMLFormElement",frame:"HTMLFrameElement",frameset:"HTMLFrameSetElement",hr:"HTMLHRElement",head:"HTMLHeadElement",h1:"HTMLHeadingElement",html:"HTMLHtmlElement",iframe:"HTMLIFrameElement",input:"HTMLInputElement",li:"HTMLLIElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",link:"HTMLLinkElement",map:"HTMLMapElement",menu:"HTMLMenuElement",menuitem:"HTMLMenuItemElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",del:"HTMLModElement",ol:"HTMLOListElement",object:"HTMLObjectElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",script:"HTMLScriptElement",select:"HTMLSelectElement",source:"HTMLSourceElement",span:"HTMLSpanElement",style:"HTMLStyleElement",caption:"HTMLTableCaptionElement",col:"HTMLTableColElement",table:"HTMLTableElement",tr:"HTMLTableRowElement",thead:"HTMLTableSectionElement",tbody:"HTMLTableSectionElement",textarea:"HTMLTextAreaElement",title:"HTMLTitleElement",ul:"HTMLUListElement",video:"HTMLVideoElement"};Object.keys(c).forEach(b),Object.getOwnPropertyNames(a.wrappers).forEach(function(b){window[b]=a.wrappers[b]}),a.knownElements=c}(this.ShadowDOMPolyfill),function(){window.wrap=function(a){return a.impl?a:ShadowDOMPolyfill.wrap(a)},window.unwrap=function(a){return a.impl?ShadowDOMPolyfill.unwrap(a):a};var a=window.getComputedStyle;window.getComputedStyle=function(b,c){return a.call(window,wrap(b),c)},Object.defineProperties(HTMLElement.prototype,{webkitShadowRoot:{get:function(){return this.shadowRoot}}}),HTMLElement.prototype.webkitCreateShadowRoot=HTMLElement.prototype.createShadowRoot}()}else{var SideTable;"undefined"!=typeof WeakMap&&navigator.userAgent.indexOf("Firefox/")<0?SideTable=WeakMap:function(){var a=Object.defineProperty,b=Object.hasOwnProperty,c=(new Date).getTime()%1e9;SideTable=function(){this.name="__st"+(1e9*Math.random()>>>0)+(c++ +"__")},SideTable.prototype={set:function(b,c){a(b,this.name,{value:c,writable:!0})},get:function(a){return b.call(a,this.name)?a[this.name]:void 0},"delete":function(a){this.set(a,void 0)}}}(),function(){window.templateContent=window.templateContent||function(a){return a.content},window.wrap=window.unwrap=function(a){return a},Object.defineProperties(HTMLElement.prototype,{shadowRoot:{get:function(){return this.webkitShadowRoot}},createShadowRoot:{value:function(){return this.webkitCreateShadowRoot()}}}),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}}()}if(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;if(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)},NodeList.prototype.forEach=function(a,b){Array.prototype.slice.call(this).forEach(a,b)},HTMLCollection.prototype.forEach=function(a,b){Array.prototype.slice.call(this).forEach(a,b)},!window.performance){var e=Date.now();window.performance={now:function(){return Date.now()-e}}}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)}}()),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+"&nbsp;&nbsp;";g(b,function(a){f+=j(a,a.childNodes,h)}),f+=d,{br:1}[e]||(f+="<tag>&lt;/"+e+"&gt;</tag>",f+="<br/>")}else{var k=a.textContent.trim();f=k?d+'"'+k+'"'+"<br/>":""}return f},k=[],l=function(a){var b="<tag>&lt;",c=a.localName||"shadow-root";return a.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+="&gt;</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(a){"use strict";function b(){function a(a){"splice"===a[0].type&&"splice"===a[1].type&&(b=!0)}if("function"!=typeof Object.observe&&"function"!=typeof Array.observe)return!1;var b=!1,c=[0];return Array.observe(c,a),c[1]=1,c.length=0,Object.deliverChangeRecords(a),b}function c(a){return+a===a>>>0}function d(a){return+a}function e(a){return a===Object(a)}function f(a,b){return a===b?0!==a||1/a===1/b:O(a)&&O(b)?!0:a!==a&&b!==b}function g(a){return"string"!=typeof a?!1:(a=a.replace(/\s/g,""),""==a?!0:"."==a[0]?!1:W.test(a))}function h(a){return""==a.trim()?this:c(a)?(this.push(String(a)),this):(a.split(/\./).filter(function(a){return a}).forEach(function(a){this.push(a)},this),void 0)}function i(a){for(var b=0;X>b&&a.check();)a.report(),b++}function j(a){for(var b in a)return!1;return!0}function k(a){return j(a.added)&&j(a.removed)&&j(a.changed)}function l(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 m(a,b){var c=b||(Array.isArray(a)?[]:{});for(var d in a)c[d]=a[d];return Array.isArray(a)&&(c.length=a.length),c}function n(a){this.callback=a,this.reporting=!0,K&&(this.boundInternalCallback=this.internalCallback.bind(this)),this.valid=!0,o(this),this.connect(),this.sync(!0)}function o(a){Z&&(Y.push(a),n._allObserversCount++)}function p(a){if(Z)for(var b=0;b<Y.length;b++)if(Y[b]===a){Y[b]=void 0,n._allObserversCount--;break}}function q(a,b){this.object=a,n.call(this,b)}function r(a,b){if(!Array.isArray(a))throw Error("Provided object is not an Array");this.object=a,n.call(this,b)}function s(a,b){if(!b.length)return a;if(e(a)){if(L)return v(a,b);var c;return b.walkPropertiesFrom(a,function(a,d,e){e===b.length&&(c=d)}),c}}function t(a,b,c){if(!b.length||!e(a))return!1;var d=!1;return b.walkPropertiesFrom(a,function(a,f,g){e(f)&&g==b.length-1&&(d=!0,f[a]=c)}),d}function u(a){var b="",c="obj",d=a.length;b+="if (obj";for(var e=0;d-1>e;e++){var f='["'+a[e]+'"]';c+=f,b+=" && "+c}return b+=") ",c+='["'+a[d-1]+'"]',b+="return "+c+"; else return undefined;",new Function("obj",b)}function v(a,b){var c=b.toString();return _[c]||(_[c]=u(b)),_[c](a)}function w(b,c,d,f,g){var h=void 0;return c.walkPropertiesFrom(b,function(b,i,j){if(j===c.length)return h=i,void 0;var k=d[j];if(!k||i!==k[0]){if(k)for(var l=0;l<k.length;l++){var m=k[l],n=f.get(m);1==n?(f.delete(m),a.unobserveCount++,Object.unobserve(m,g)):f.set(m,n-1)}if(k=i,e(k)){for(var k=[];e(i);){k.push(i);var n=f.get(i);n?f.set(i,n+1):(f.set(i,1),a.observeCount++,Object.observe(i,g)),i=Object.getPrototypeOf(i)}d[j]=k}}},this),h}function x(a,b,c){if(this.value=void 0,g(b)){var d=new h(b);return d.length?(e(a)&&(this.object=a,this.path=d,K?(this.observed=new Array(d.length),this.observedMap=new Map,this.getPathValue=w):this.getPathValue=s,n.call(this,c)),void 0):(this.value=a,void 0)}}function y(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 z(a,b,c){for(var d={},e={},f=0;f<b.length;f++){var g=b[f];ab[g.type]?(g.name in c||(c[g.name]=g.oldValue),"updated"!=g.type&&("new"!=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 A(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(d[e+j-1]===a[b+k-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}function B(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(bb):(e.push(cb),d=g),b--,c--):f==h?(e.push(eb),b--,d=h):(e.push(db),c--,d=i)}else e.push(eb),b--;else e.push(db),c--;return e.reverse(),e}function C(a,b,c){for(var d=0;c>d;d++)if(a[d]!==b[d])return d;return c}function D(a,b,c){for(var d=a.length,e=b.length,f=0;c>f&&a[--d]===b[--e];)f++;return f}function E(a,b,c){return{index:a,removed:b,addedCount:c}}function F(a,b,c,d,e,f){var g=0,h=0,i=Math.min(c-b,f-e);if(0==b&&0==e&&(g=C(a,d,i)),c==a.length&&f==d.length&&(h=D(a,d,i-g)),b+=g,e+=g,c-=h,f-=h,0==c-b&&0==f-e)return[];if(b==c){for(var j=E(b,[],0);f>e;)j.removed.push(d[e++]);return[j]}if(e==f)return[E(b,[],c-b)];for(var k=B(A(a,b,c,d,e,f)),j=void 0,l=[],m=b,n=e,o=0;o<k.length;o++)switch(k[o]){case bb:j&&(l.push(j),j=void 0),m++,n++;break;case cb:j||(j=E(m,[],0)),j.addedCount++,m++,j.removed.push(d[n]),n++;break;case db:j||(j=E(m,[],0)),j.addedCount++,m++;break;case eb:j||(j=E(m,[],0)),j.removed.push(d[n]),n++}return j&&l.push(j),l}function G(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 H(a,b,c,d){for(var e=E(b,c,d),f=!1,g=0,h=0;h<a.length;h++){var i=a[h];if(i.index+=g,!f){var j=G(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 I(a,b){for(var e=[],f=0;f<b.length;f++){var g=b[f];switch(g.type){case"splice":H(e,g.index,g.removed.slice(),g.addedCount);break;case"new":case"updated":case"deleted":if(!c(g.name))continue;var h=d(g.name);if(0>h)continue;H(e,h,[g.oldValue],1);break;default:console.error("Unexpected record type: "+JSON.stringify(g))}}return e}function J(a,b){var c=[];return I(a,b).forEach(function(b){return 1==b.addedCount&&1==b.removed.length?(b.removed[0]!==a[b.index]&&c.push(b),void 0):(c=c.concat(F(a,b.index,b.index+b.addedCount,b.removed,0,b.removed.length)),void 0)}),c}var K=b(),L=!1;try{var M=new Function("","return true;");L=M()}catch(N){}var O=a.Number.isNaN||function(b){return"number"==typeof b&&a.isNaN(b)},P="__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},Q="[$_a-zA-Z]",R="[$_a-zA-Z0-9]",S=Q+"+"+R+"*",T="(?:[0-9]|[1-9]+[0-9]+)",U="(?:"+S+"|"+T+")",V="(?:"+U+")(?:\\."+U+")*",W=new RegExp("^"+V+"$");h.prototype=P({__proto__:[],toString:function(){return this.join(".")},walkPropertiesFrom:function(a,b,c){for(var d,e=0;e<this.length+1;e++)d=this[e],b.call(c,d,a,e),a=e==this.length||null===a||void 0===a?void 0:a[d]}});var X=1e3;n.prototype={valid:!1,internalCallback:function(a){this.valid&&this.reporting&&this.check(a)&&(this.report(),this.testingResults&&(this.testingResults.anyChanged=!0))},close:function(){this.valid&&(this.disconnect(),this.valid=!1,p(this))},deliver:function(a){this.valid&&(K?(this.testingResults=a,Object.deliverChangeRecords(this.boundInternalCallback),this.testingResults=void 0):i(this))},report:function(){if(this.reporting){this.sync(!1);try{this.callback.apply(void 0,this.reportArgs)}catch(a){n._errorThrownDuringCallback=!0,console.error("Exception caught during observer callback: "+a)}this.reportArgs=void 0}},reset:function(){this.valid&&(K&&(this.reporting=!1,Object.deliverChangeRecords(this.boundInternalCallback),this.reporting=!0),this.sync(!0))}};var Y,Z=!K||a.forceCollectObservers;Z&&(Y=[],n._allObserversCount=0);var $=!1;a.Platform=a.Platform||{},a.Platform.performMicrotaskCheckpoint=function(){if(Z&&!$){$=!0;var a=0,b={};do{a++;var c=Y;Y=[],b.anyChanged=!1;for(var d=0;d<c.length;d++){var e=c[d];e&&e.valid&&(K?e.deliver(b):e.check()&&(b.anyChanged=!0,e.report()),Y.push(e))}}while(X>a&&b.anyChanged);n._allObserversCount=Y.length,$=!1}},Z&&(a.Platform.clearObservers=function(){Y=[]}),q.prototype=P({__proto__:n.prototype,connect:function(){K&&Object.observe(this.object,this.boundInternalCallback)},sync:function(){K||(this.oldObject=m(this.object))},check:function(a){var b,c;if(K){if(!a)return!1;c={},b=z(this.object,a,c)}else c=this.oldObject,b=l(this.object,this.oldObject);return k(b)?!1:(this.reportArgs=[b.added||{},b.removed||{},b.changed||{}],this.reportArgs.push(function(a){return c[a]}),!0)},disconnect:function(){K?this.object&&Object.unobserve(this.object,this.boundInternalCallback):this.oldObject=void 0,this.object=void 0}}),r.prototype=P({__proto__:q.prototype,connect:function(){K&&Array.observe(this.object,this.boundInternalCallback)},sync:function(){K||(this.oldObject=this.object.slice())},check:function(a){var b;if(K){if(!a)return!1;b=J(this.object,a)}else b=F(this.object,0,this.object.length,this.oldObject,0,this.oldObject.length);return b&&b.length?(this.reportArgs=[b],!0):!1}}),r.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)})};var _={};x.prototype=P({__proto__:n.prototype,connect:function(){},disconnect:function(){this.object=void 0,this.value=void 0,this.sync(!0)},check:function(){return this.value=this.getPathValue(this.object,this.path,this.observed,this.observedMap,this.boundInternalCallback),f(this.value,this.oldValue)?!1:(this.reportArgs=[this.value,this.oldValue],!0)},sync:function(a){a&&(this.value=this.getPathValue(this.object,this.path,this.observed,this.observedMap,this.boundInternalCallback)),this.oldValue=this.value}}),x.getValueAtPath=function(a,b){if(!g(b))return void 0;var c=new h(b);return s(a,c)},x.setValueAtPath=function(a,b,c){if(g(b)){var d=new h(b);t(a,d,c)}};var ab={"new":!0,updated:!0,deleted:!0};x.defineProperty=function(a,b,c){var d=c.object,e=new h(c.path),f=y(a,b),g=new x(d,c.path,function(a,b){f&&f("updated",b)});return Object.defineProperty(a,b,{get:function(){return s(d,e)},set:function(a){t(d,e,a)},configurable:!0}),{close:function(){f&&g.deliver(),g.close(),delete a[b]}}};var bb=0,cb=1,db=2,eb=3;a.Observer=n,a.Observer.hasObjectObserve=K,a.ArrayObserver=r,a.ArrayObserver.calculateSplices=function(a,b){return F(a,0,a.length,b,0,b.length)},a.ObjectObserver=q,a.PathObserver=x}(this),function(a){"use strict";function b(a){if(!a)throw new Error("Assertion failed")}function c(a){for(;a.parentNode;)a=a.parentNode;return"function"==typeof a.getElementById?a:null}function d(a){return a.ownerDocument.contains(a)}function e(a,b,c){console.error("Unhandled binding to Node: ",this,a,b,c)}function f(){}function g(){}function h(a,b,c){this.model=a,this.path=b,this.changed=c,this.observer=new PathObserver(this.model,this.path,this.changed),this.changed(this.observer.value)}function i(a){return function(b){a.data=void 0==b?"":String(b)}}function j(a,b,c){if("textContent"!==a)return Node.prototype.bind.call(this,a,b,c);this.unbind("textContent");var d=new h(b,c,i(this));ab.set(this,d)}function k(a){if("textContent"!=a)return Node.prototype.unbind.call(this,a);var b=ab.get(this);b&&(b.dispose(),ab.delete(this))}function l(){this.unbind("textContent"),Node.prototype.unbindAll.call(this)}function m(a,b,c){return c?function(c){c?a.setAttribute(b,""):a.removeAttribute(b)}:function(c){a.setAttribute(b,String(void 0===c?"":c))}}function n(){this.bindingMap=Object.create(null)}function o(a,b,c){var d=bb.get(this);d||(d=new n,bb.set(this,d)),d.add(this,a,b,c)}function p(a){var b=bb.get(this);b&&b.remove(a)}function q(){var a=bb.get(this);a&&(bb.delete(this),a.removeAll(),Node.prototype.unbindAll.call(this))}function r(a){switch(a.type){case"checkbox":return cb;case"radio":case"select-multiple":case"select-one":return"change";default:return"input"}}function s(a,b,c,d){this.element=a,this.valueProperty=b,this.boundValueChanged=this.valueChanged.bind(this),this.boundUpdateBinding=this.updateBinding.bind(this),this.binding=new h(c,d,this.boundValueChanged),this.element.addEventListener(r(this.element),this.boundUpdateBinding,!0)}function t(a,b,c){s.call(this,a,"value",b,c)}function u(a){if(!d(a))return[];if(a.form)return Z(a.form.elements,function(b){return b!=a&&"INPUT"==b.tagName&&"radio"==b.type&&b.name==a.name});var b=a.ownerDocument.querySelectorAll('input[type="radio"][name="'+a.name+'"]');return Z(b,function(b){return b!=a&&!b.form})}function v(a,b,c){s.call(this,a,"checked",b,c)}function w(a,b,c){switch(this.tagName+"."+a.toLowerCase()){case"INPUT.value":case"TEXTAREA.value":this.unbind("value"),this.removeAttribute("value"),db.set(this,new t(this,b,c));break;case"INPUT.checked":this.unbind("checked"),this.removeAttribute("checked"),eb.set(this,new v(this,b,c));break;case"SELECT.selectedindex":this.unbind("selectedindex"),this.removeAttribute("selectedindex"),db.set(this,new z(this,b,c));break;default:return Element.prototype.bind.call(this,a,b,c)}}function x(a){switch(this.tagName+"."+a.toLowerCase()){case"INPUT.value":case"TEXTAREA.value":var b=db.get(this);b&&(b.unbind(),db.delete(this));break;case"INPUT.checked":var c=eb.get(this);c&&(c.unbind(),eb.delete(this));break;case"SELECT.selectedindex":var b=db.get(this);b&&(b.unbind(),db.delete(this));break;default:return Element.prototype.unbind.call(this,a)}}function y(){switch(this.tagName){case"INPUT":this.unbind("checked");case"TEXTAREA":this.unbind("value");break;case"SELECT":this.unbind("selectedindex")}Element.prototype.unbindAll.call(this)}function z(a,b,c){s.call(this,a,"selectedIndex",b,c)}function A(a){return lb[a.tagName]&&a.hasAttribute("template")}function B(a){return"TEMPLATE"==a.tagName||A(a)}function C(a){return mb&&"TEMPLATE"==a.tagName}function D(a,b){var c=a.querySelectorAll(nb);B(a)&&b(a),Y(c,b)}function E(a){function b(a){HTMLTemplateElement.decorate(a)||E(a.content)}D(a,b)}function F(a,b){Object.getOwnPropertyNames(b).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))})}function G(a){if(!a.defaultView)return a;var b=rb.get(a);if(!b){for(b=a.implementation.createHTMLDocument("");b.lastChild;)b.removeChild(b.lastChild);rb.set(a,b)}return b}function H(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];kb[e.name]&&("template"!==e.name&&b.setAttribute(e.name,e.value),a.removeAttribute(e.name))}return b}function I(a,b,c){var d=a.content;if(c)return d.appendChild(b),void 0;for(var e;e=b.firstChild;)d.appendChild(e)}function J(a){"TEMPLATE"===a.tagName?mb||(pb?a.__proto__=HTMLTemplateElement.prototype:F(a,HTMLTemplateElement.prototype)):(F(a,HTMLTemplateElement.prototype),Object.defineProperty(a,"content",ub))}function K(a){var b=xb.get(a);b||(b=function(){Q(a,a.model,a.bindingDelegate)},xb.set(a,b)),ob(b)}function L(a,b){this.type=a,this.value=b}function M(a){for(var b=[],c=a.length,d=0,e=0;c>e;){if(d=a.indexOf("{{",e),0>d){b.push(new L(yb,a.slice(e)));break}if(d>0&&d>e&&b.push(new L(yb,a.slice(e,d))),e=d+2,d=a.indexOf("}}",e),0>d){var f=a.slice(e-2),g=b[b.length-1];g&&g.type==yb?g.value+=f:b.push(new L(yb,f));break}var h=a.slice(e,d).trim();b.push(new L(zb,h)),e=d+2}return b}function N(a,b,c,d,e){var f,g=e&&e[ib];g&&"function"==typeof g&&(f=g(c,d,b,a),f&&(c=f,d="value")),a.bind(b,c,d)}function O(a,b,c,d,e){var f=M(c);if(f.length&&(1!=f.length||f[0].type!=yb)){if(1==f.length&&f[0].type==zb)return N(a,b,d,f[0].value,e),void 0;for(var g=new V,h=0;h<f.length;h++){var i=f[h];i.type==zb&&N(g,h,d,i.value,e)}g.combinator=function(a){for(var b="",c=0;c<f.length;c++){var d=f[c];if(d.type===yb)b+=d.value;else{var e=a[c];void 0!==e&&(b+=e)}}return b},a.bind(b,g,"value")}}function P(a,c,d){b(a);for(var e={},f=0;f<a.attributes.length;f++){var g=a.attributes[f];e[g.name]=g.value}B(a)&&(""===e[fb]&&(e[fb]="{{}}"),""===e[gb]&&(e[gb]="{{}}"),void 0!==e[hb]&&void 0===e[fb]&&void 0===e[gb]&&(e[fb]="{{}}")),Object.keys(e).forEach(function(b){O(a,b,e[b],c,d)})}function Q(a,c,d){b(a),a.nodeType===Node.ELEMENT_NODE?P(a,c,d):a.nodeType===Node.TEXT_NODE&&O(a,"textContent",a.data,c,d);for(var e=a.firstChild;e;e=e.nextSibling)Q(e,c,d)}function R(a){if(Ab.delete(a),B(a)){var b=Bb.get(a);b&&(b.abandon(),Bb.delete(a))}a.unbindAll();for(var c=a.firstChild;c;c=c.nextSibling)R(c)}function S(a,b){var c=a.cloneNode(!1);B(c)&&(HTMLTemplateElement.decorate(c,a),b&&wb.set(c,b));for(var d=a.firstChild;d;d=d.nextSibling)c.appendChild(S(d,b));return c}function T(a,b,c){this.firstNode=a,this.lastNode=b,this.model=c}function U(a,b){if(a.firstChild)for(var c=new T(a.firstChild,a.lastChild,b),d=c.firstNode;d;)Ab.set(d,c),d=d.nextSibling}function V(a){this.bindings={},this.values={},this.value=void 0,this.size=0,this.combinator_=a,this.boundResolve=this.resolve.bind(this),this.disposed=!1}function W(a){this.templateElement_=a,this.terminators=[],this.iteratedValue=void 0,this.arrayObserver=void 0,this.boundHandleSplices=this.handleSplices.bind(this),this.inputs=new V(this.resolveInputs.bind(this))}var X,Y=Array.prototype.forEach.call.bind(Array.prototype.forEach),Z=Array.prototype.filter.call.bind(Array.prototype.filter);a.Map&&"function"==typeof a.Map.prototype.forEach?X=a.Map:(X=function(){this.keys=[],this.values=[]},X.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);return 0>b?void 0: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)}});var $="__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};"function"!=typeof document.contains&&(Document.prototype.contains=function(a){return a===this||a.parentNode===this?!0:this.documentElement.contains(a)});var _;"undefined"!=typeof WeakMap&&navigator.userAgent.indexOf("Firefox/")<0?_=WeakMap:function(){var a=Object.defineProperty,b=Object.hasOwnProperty,c=(new Date).getTime()%1e9;_=function(){this.name="__st"+(1e9*Math.random()>>>0)+(c++ +"__")},_.prototype={set:function(b,c){a(b,this.name,{value:c,writable:!0})},get:function(a){return b.call(a,this.name)?a[this.name]:void 0},"delete":function(a){this.set(a,void 0)}}}(),Node.prototype.bind=e,Node.prototype.unbind=f,Node.prototype.unbindAll=g;var ab=new _;h.prototype={dispose:function(){this.model&&"function"==typeof this.model.dispose&&this.model.dispose(),this.observer.close()},set value(a){PathObserver.setValueAtPath(this.model,this.path,a)},reset:function(){this.observer.reset()}},Text.prototype.bind=j,Text.prototype.unbind=k,Text.prototype.unbindAll=l;var bb=new _;n.prototype={add:function(a,b,c,d){a.removeAttribute(b);var e="?"==b[b.length-1];e&&(b=b.slice(0,-1)),this.remove(b);var f=new h(c,d,m(a,b,e));this.bindingMap[b]=f},remove:function(a){var b=this.bindingMap[a];b&&(b.dispose(),delete this.bindingMap[a])},removeAll:function(){Object.keys(this.bindingMap).forEach(function(a){this.remove(a)},this)}},Element.prototype.bind=o,Element.prototype.unbind=p,Element.prototype.unbindAll=q;var cb,db=new _,eb=new _;!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),cb=1==d?"change":c}(),s.prototype={valueChanged:function(a){this.element[this.valueProperty]=this.produceElementValue(a)},updateBinding:function(){this.binding.value=this.element[this.valueProperty],this.binding.reset(),this.postUpdateBinding&&this.postUpdateBinding(),Platform.performMicrotaskCheckpoint()},unbind:function(){this.binding.dispose(),this.element.removeEventListener(r(this.element),this.boundUpdateBinding,!0)}},t.prototype=$({__proto__:s.prototype,produceElementValue:function(a){return String(null==a?"":a)}}),v.prototype=$({__proto__:s.prototype,produceElementValue:function(a){return Boolean(a)},postUpdateBinding:function(){"INPUT"===this.element.tagName&&"radio"===this.element.type&&u(this.element).forEach(function(a){var b=eb.get(a);b&&(b.binding.value=!1)})}}),HTMLInputElement.prototype.bind=w,HTMLInputElement.prototype.unbind=x,HTMLInputElement.prototype.unbindAll=y,z.prototype=$({__proto__:s.prototype,valueChanged:function(a){function b(){a>d.element.length&&c--?ob(b):d.element[d.valueProperty]=a}var a=this.produceElementValue(a);if(a<=this.element.length)return this.element[this.valueProperty]=a,void 0;var c=2,d=this;ob(b)},produceElementValue:function(a){return Number(a)}}),HTMLSelectElement.prototype.bind=w,HTMLSelectElement.prototype.unbind=x,HTMLSelectElement.prototype.unbindAll=y,HTMLTextAreaElement.prototype.bind=w,HTMLTextAreaElement.prototype.unbind=x,HTMLTextAreaElement.prototype.unbindAll=y;var fb="bind",gb="repeat",hb="if",ib="getBinding",jb="getInstanceModel",kb={template:!0,repeat:!0,bind:!0,ref:!0},lb={THEAD:!0,TBODY:!0,TFOOT:!0,TH:!0,TR:!0,TD:!0,COLGROUP:!0,COL:!0,CAPTION:!0,OPTION:!0,OPTGROUP:!0},mb="undefined"!=typeof HTMLTemplateElement,nb="template, "+Object.keys(lb).map(function(a){return a.toLowerCase()+"[template]"}).join(", "),ob=function(){function a(){var a=this;this.value=!1;var b=this.value,e=[],f=!1;this.schedule=function(c){return e.indexOf(c)>=0?!0:f?!1:(e.push(c),b===a.value&&(a.value=!a.value),!0)},new PathObserver(this,"value",function(){f=!0;for(var g=0;g<e.length;g++){var h=e[g];e[g]=void 0,h()}e=[],b=a.value,c=d,d=a,f=!1})}function b(a){c.schedule(a)||d.schedule(a)}var c,d;return c=new a,d=new a,b}();document.addEventListener("DOMContentLoaded",function(){E(document),Platform.performMicrotaskCheckpoint()},!1),mb||(a.HTMLTemplateElement=function(){throw TypeError("Illegal constructor")});var pb="__proto__"in{},qb=new _,rb=new _,sb=new _;HTMLTemplateElement.decorate=function(a,c){if(a.templateIsDecorated_)return!1;var d=a,e=C(d),f=e,g=!e,h=!1;if(!e&&A(d)&&(b(!c),d=H(a),e=C(d),h=!0),d.templateIsDecorated_=!0,!e){J(d);
-var i=G(d.ownerDocument);qb.set(d,i.createDocumentFragment())}return c?sb.set(d,c):g?I(d,a,h):f&&E(d.content),!0},HTMLTemplateElement.bootstrap=E;var tb=a.HTMLUnknownElement||HTMLElement,ub={get:function(){return qb.get(this)},enumerable:!0,configurable:!0};mb||(HTMLTemplateElement.prototype=Object.create(tb.prototype),Object.defineProperty(HTMLTemplateElement.prototype,"content",ub));var vb=new _,wb=new _,xb=new _;F(HTMLTemplateElement.prototype,{bind:function(a,b,c){switch(a){case fb:case gb:case hb:var d=Bb.get(this);d||(d=new W(this),Bb.set(this,d)),d.inputs.bind(a,b,c||"");break;default:return Element.prototype.bind.call(this,a,b,c)}},unbind:function(a,b,c){switch(a){case fb:case gb:case hb:var d=Bb.get(this);if(!d)break;d.inputs.unbind(a);break;default:return Element.prototype.unbind.call(this,a,b,c)}},unbindAll:function(){this.unbind(fb),this.unbind(gb),this.unbind(hb),Element.prototype.unbindAll.call(this)},createInstance:function(a,b){var c=S(this.ref.content,b);return"function"==typeof HTMLTemplateElement.__instanceCreated&&HTMLTemplateElement.__instanceCreated(c),Q(c,a,b),U(c,a),c},get model(){return vb.get(this)},set model(a){vb.set(this,a),K(this)},get bindingDelegate(){return wb.get(this)},set bindingDelegate(a){wb.set(this,a),K(this)},get ref(){var a,b=this.getAttribute("ref");if(b){var d=c(this);d&&(a=d.getElementById(b))}if(a||(a=sb.get(this)),!a)return this;var e=a.ref;return e?e:a}});var yb=0,zb=1,Ab=new _;Object.defineProperty(Node.prototype,"templateInstance",{get:function(){var a=Ab.get(this);return a?a:this.parentNode?this.parentNode.templateInstance:void 0}}),V.prototype={set combinator(a){this.combinator_=a,this.scheduleResolve()},bind:function(a,b,c){this.unbind(a),this.size++,this.bindings[a]=new h(b,c,function(b){this.values[a]=b,this.scheduleResolve()}.bind(this))},unbind:function(a,b){this.bindings[a]&&(this.size--,this.bindings[a].dispose(),delete this.bindings[a],delete this.values[a],b||this.scheduleResolve())},scheduleResolve:function(){ob(this.boundResolve)},resolve:function(){if(!this.disposed){if(!this.combinator_)throw Error("CompoundBinding attempted to resolve without a combinator");this.value=this.combinator_(this.values)}},dispose:function(){Object.keys(this.bindings).forEach(function(a){this.unbind(a,!0)},this),this.disposed=!0,this.value=void 0}},W.prototype={resolveInputs:function(a){hb in a&&!a[hb]?this.valueChanged(void 0):gb in a?this.valueChanged(a[gb]):fb in a||hb in a?this.valueChanged([a[fb]]):this.valueChanged(void 0)},valueChanged:function(a){Array.isArray(a)||(a=void 0);var b=this.iteratedValue;this.unobserve(),this.iteratedValue=a,this.iteratedValue&&(this.arrayObserver=new ArrayObserver(this.iteratedValue,this.boundHandleSplices));var c=ArrayObserver.calculateSplices(this.iteratedValue||[],b||[]);c.length&&this.handleSplices(c),this.inputs.size||(Bb.delete(this),this.abandon())},getTerminatorAt:function(a){if(-1==a)return this.templateElement_;var b=this.terminators[a];if(b.nodeType!==Node.ELEMENT_NODE||this.templateElement_===b)return b;var c=Bb.get(b);return c?c.getTerminatorAt(c.terminators.length-1):b},insertInstanceAt:function(a,b){var c=this.getTerminatorAt(a-1),d=b[b.length-1]||c;this.terminators.splice(a,0,d);for(var e=this.templateElement_.parentNode,f=c.nextSibling,g=0;g<b.length;g++)e.insertBefore(b[g],f)},extractInstanceAt:function(a){var b=[],c=this.getTerminatorAt(a-1),d=this.getTerminatorAt(a);this.terminators.splice(a,1);for(var e=this.templateElement_.parentNode;d!==c;){var f=c.nextSibling;f==d&&(d=c),e.removeChild(f),b.push(f)}return b},getInstanceModel:function(a,b,c){var d=c&&c[jb];return d&&"function"==typeof d?d(a,b):b},getInstanceNodes:function(a,b,c){var d=c.get(a);if(d)return c.delete(a),d;d=[];for(var e=this.templateElement_.createInstance(a,b);e.firstChild;)d.push(e.removeChild(e.firstChild));return d},handleSplices:function(a){var b=this.templateElement_;if(!b.parentNode||!b.ownerDocument.defaultView)return this.abandon(),Bb.delete(this),void 0;var c=b.bindingDelegate,d=new X,e=0;a.forEach(function(a){a.removed.forEach(function(b){var c=this.extractInstanceAt(a.index+e,c);d.set(b,c)},this),e-=a.addedCount},this),a.forEach(function(a){for(var e=a.index;e<a.index+a.addedCount;e++){var f=this.getInstanceModel(b,this.iteratedValue[e],c),g=this.getInstanceNodes(f,c,d);this.insertInstanceAt(e,g)}},this),d.forEach(function(a){for(var b=0;b<a.length;b++)R(a[b])})},unobserve:function(){this.arrayObserver&&(this.arrayObserver.close(),this.arrayObserver=void 0)},abandon:function(){this.unobserve(),this.terminators.length=0,Object.defineProperty(this.inputs,"value",{configurable:!0,writable:!0,value:void 0}),this.inputs.dispose()}};var Bb=new _;a.CompoundBinding=V,HTMLTemplateElement.forAllTemplatesFrom_=D,HTMLTemplateElement.bindAllMustachesFrom_=Q,HTMLTemplateElement.parseAndBind_=O}(this),function(a,b){"use strict";"function"==typeof define&&define.amd?define(["exports"],b):"undefined"!=typeof exports?b(exports):b(a.esprima={})}(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(;bb>ab&&d(_.charCodeAt(ab));)++ab}function j(){var a,b;for(a=ab++;bb>ab&&(b=_.charCodeAt(ab),g(b));)++ab;return _.slice(a,ab)}function k(){var a,b,c;return a=ab,b=j(),c=1===b.length?X.Identifier:h(b)?X.Keyword:"null"===b?X.NullLiteral:"true"===b||"false"===b?X.BooleanLiteral:X.Identifier,{type:c,value:b,range:[a,ab]}}function l(){var a,b,c,d,e=ab,f=_.charCodeAt(ab),g=_[ab];switch(f){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++ab,{type:X.Punctuator,value:String.fromCharCode(f),range:[e,ab]};default:if(a=_.charCodeAt(ab+1),61===a)switch(f){case 37:case 38:case 42:case 43:case 45:case 47:case 60:case 62:case 94:case 124:return ab+=2,{type:X.Punctuator,value:String.fromCharCode(f)+String.fromCharCode(a),range:[e,ab]};case 33:case 61:return ab+=2,61===_.charCodeAt(ab)&&++ab,{type:X.Punctuator,value:_.slice(e,ab),range:[e,ab]}}}return b=_[ab+1],c=_[ab+2],d=_[ab+3],">"===g&&">"===b&&">"===c&&"="===d?(ab+=4,{type:X.Punctuator,value:">>>=",range:[e,ab]}):">"===g&&">"===b&&">"===c?(ab+=3,{type:X.Punctuator,value:">>>",range:[e,ab]}):"<"===g&&"<"===b&&"="===c?(ab+=3,{type:X.Punctuator,value:"<<=",range:[e,ab]}):">"===g&&">"===b&&"="===c?(ab+=3,{type:X.Punctuator,value:">>=",range:[e,ab]}):g===b&&"+-<>&|".indexOf(g)>=0?(ab+=2,{type:X.Punctuator,value:g+b,range:[e,ab]}):"<>=!+-*%&|^/".indexOf(g)>=0?(++ab,{type:X.Punctuator,value:g,range:[e,ab]}):(s({},$.UnexpectedToken,"ILLEGAL"),void 0)}function m(){var a,d,e;if(e=_[ab],b(c(e.charCodeAt(0))||"."===e,"Numeric literal must start with a decimal digit or a decimal point"),d=ab,a="","."!==e){for(a=_[ab++],e=_[ab],"0"===a&&e&&c(e.charCodeAt(0))&&s({},$.UnexpectedToken,"ILLEGAL");c(_.charCodeAt(ab));)a+=_[ab++];e=_[ab]}if("."===e){for(a+=_[ab++];c(_.charCodeAt(ab));)a+=_[ab++];e=_[ab]}if("e"===e||"E"===e)if(a+=_[ab++],e=_[ab],("+"===e||"-"===e)&&(a+=_[ab++]),c(_.charCodeAt(ab)))for(;c(_.charCodeAt(ab));)a+=_[ab++];else s({},$.UnexpectedToken,"ILLEGAL");return f(_.charCodeAt(ab))&&s({},$.UnexpectedToken,"ILLEGAL"),{type:X.NumericLiteral,value:parseFloat(a),range:[d,ab]}}function n(){var a,c,d,f="",g=!1;for(a=_[ab],b("'"===a||'"'===a,"String literal must starts with a quote"),c=ab,++ab;bb>ab;){if(d=_[ab++],d===a){a="";break}if("\\"===d)if(d=_[ab++],d&&e(d.charCodeAt(0)))"\r"===d&&"\n"===_[ab]&&++ab;else switch(d){case"n":f+="\n";break;case"r":f+="\r";break;case"t":f+=" ";break;case"b":f+="\b";break;case"f":f+="\f";break;case"v":f+=" ";break;default:f+=d}else{if(e(d.charCodeAt(0)))break;f+=d}}return""!==a&&s({},$.UnexpectedToken,"ILLEGAL"),{type:X.StringLiteral,value:f,octal:g,range:[c,ab]}}function o(a){return a.type===X.Identifier||a.type===X.Keyword||a.type===X.BooleanLiteral||a.type===X.NullLiteral}function p(){var a;return i(),ab>=bb?{type:X.EOF,range:[ab,ab]}:(a=_.charCodeAt(ab),40===a||41===a||58===a?l():39===a||34===a?n():f(a)?k():46===a?c(_.charCodeAt(ab+1))?m():l():c(a)?m():l())}function q(){var a;return a=db,ab=a.range[1],db=p(),ab=a.range[1],a}function r(){var a;a=ab,db=p(),ab=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=ab,d.description=f,d}function t(a){s(a,$.UnexpectedToken,a.value)}function u(a){var b=q();(b.type!==X.Punctuator||b.value!==a)&&t(b)}function v(a){return db.type===X.Punctuator&&db.value===a}function w(a){return db.type===X.Keyword&&db.value===a}function x(){return 59===_.charCodeAt(ab)?(q(),void 0):(i(),v(";")?(q(),void 0):(db.type===X.EOF||v("}")||t(db),void 0))}function y(){var a=[];for(u("[");!v("]");)v(",")?(q(),a.push(null)):(a.push(O()),v("]")||u(","));return u("]"),cb.createArrayExpression(a)}function z(){var a;return i(),a=q(),a.type===X.StringLiteral||a.type===X.NumericLiteral?cb.createLiteral(a):cb.createIdentifier(a.value)}function A(){var a,b;return a=db,i(),(a.type===X.EOF||a.type===X.Punctuator)&&t(a),b=z(),u(":"),cb.createProperty("init",b,O())}function B(){var a=[];for(u("{");!v("}");)a.push(A()),v("}")||u(",");return u("}"),cb.createObjectExpression(a)}function C(){var a;return u("("),a=P(),u(")"),a}function D(){var a,b,c;return v("(")?C():(a=db.type,a===X.Identifier?c=cb.createIdentifier(q().value):a===X.StringLiteral||a===X.NumericLiteral?c=cb.createLiteral(q()):a===X.Keyword?w("this")&&(q(),c=cb.createThisExpression()):a===X.BooleanLiteral?(b=q(),b.value="true"===b.value,c=cb.createLiteral(b)):a===X.NullLiteral?(b=q(),b.value=null,c=cb.createLiteral(b)):v("[")?c=y():v("{")&&(c=B()),c?c:(t(q()),void 0))}function E(){var a=[];if(u("("),!v(")"))for(;bb>ab&&(a.push(O()),!v(")"));)u(",");return u(")"),a}function F(){var a;return a=q(),o(a)||t(a),cb.createIdentifier(a.value)}function G(){return u("."),F()}function H(){var a;return u("["),a=P(),u("]"),a}function I(){var a,b,c;for(a=D();v(".")||v("[")||v("(");)v("(")?(b=E(),a=cb.createCallExpression(a,b)):v("[")?(c=H(),a=cb.createMemberExpression("[",a,c)):(c=G(),a=cb.createMemberExpression(".",a,c));return a}function J(){var a;return a=I(),db.type===X.Punctuator&&(v("++")||v("--"))&&s({},$.UnexpectedToken),a}function K(){var a,b;return db.type!==X.Punctuator&&db.type!==X.Keyword?b=J():v("++")||v("--")?s({},$.UnexpectedToken):v("+")||v("-")||v("~")||v("!")?(a=q(),b=K(),b=cb.createUnaryExpression(a.value,b)):w("delete")||w("void")||w("typeof")?s({},$.UnexpectedToken):b=J(),b}function L(a,b){var c=0;if(a.type!==X.Punctuator&&a.type!==X.Keyword)return 0;switch(a.value){case"||":c=1;break;case"&&":c=2;break;case"|":c=3;break;case"^":c=4;break;case"&":c=5;break;case"==":case"!=":case"===":case"!==":c=6;break;case"<":case">":case"<=":case">=":case"instanceof":c=7;break;case"in":c=b?7:0;break;case"<<":case">>":case">>>":c=8;break;case"+":case"-":c=9;break;case"*":case"/":case"%":c=11}return c}function M(){var a,b,c,d,e,f,g,h,i;if(d=eb.allowIn,eb.allowIn=!0,h=K(),b=db,c=L(b,d),0===c)return h;for(b.prec=c,q(),f=K(),e=[h,b,f];(c=L(db,d))>0;){for(;e.length>2&&c<=e[e.length-2].prec;)f=e.pop(),g=e.pop().value,h=e.pop(),a=cb.createBinaryExpression(g,h,f),e.push(a);b=q(),b.prec=c,e.push(b),a=K(),e.push(a)}for(eb.allowIn=d,i=e.length-1,a=e[i];i>1;)a=cb.createBinaryExpression(e[i-1].value,e[i-2],a),i-=2;return a}function N(){var a,b,c,d;return a=M(),v("?")&&(q(),b=eb.allowIn,eb.allowIn=!0,c=O(),eb.allowIn=b,u(":"),d=O(),a=cb.createConditionalExpression(a,c,d)),a}function O(){var a,b,c;return a=db,c=b=N()}function P(){var a;return a=O()}function Q(){return u(";"),cb.createEmptyStatement()}function R(){var a=P();return x(),cb.createExpressionStatement(a)}function S(){var a,b,c,d=db.type;if(d===X.EOF&&t(db),i(),d===X.Punctuator)switch(db.value){case";":return Q();case"(":return R()}return a=P(),a.type===Z.Identifier&&v(":")?(q(),c="$"+a.name,Object.prototype.hasOwnProperty.call(eb.labelSet,c)&&s({},$.Redeclaration,"Label",a.name),eb.labelSet[c]=!0,b=S(),delete eb.labelSet[c],cb.createLabeledStatement(a,b)):(x(),cb.createExpressionStatement(a))}function T(){return db.type===X.Keyword?S():db.type!==X.EOF?S():void 0}function U(){for(var a,b=[];bb>ab&&(a=T(),"undefined"!=typeof a);)b.push(a);return b}function V(){var a;return i(),r(),a=U(),cb.createProgram(a)}function W(a,b){var c;return c=String,"string"==typeof a||a instanceof String||(a=c(a)),cb=b,_=a,ab=0,bb=_.length,db=null,eb={allowIn:!0,labelSet:{}},bb>0&&"undefined"==typeof _[0]&&a instanceof String&&(_=a.valueOf()),V()}var X,Y,Z,$,_,ab,bb,cb,db,eb;X={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8},Y={},Y[X.BooleanLiteral]="Boolean",Y[X.EOF]="<end>",Y[X.Identifier]="Identifier",Y[X.Keyword]="Keyword",Y[X.NullLiteral]="Null",Y[X.NumericLiteral]="Numeric",Y[X.Punctuator]="Punctuator",Y[X.StringLiteral]="String",Z={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"},$={UnexpectedToken:"Unexpected token %0",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared"},a.parse=W}),function(a){"use strict";function b(a,b,d,e){if(e.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===e.tagName&&("bind"===d||"repeat"===d)){var f,g,h=b.match(r);if(h?(f=h[1],g=h[2]):(h=b.match(s),h&&(f=h[2],g=h[1])),h){var i;if(g=g.trim(),g.match(q))i=new CompoundBinding(function(a){return a.path}),i.bind("path",a,g);else try{i=c(a,g)}catch(j){console.error("Invalid expression syntax: "+g,j)}if(i)return t.set(e,f),i}}}function c(a,b){try{var c=new f;if(esprima.parse(b,c),!c.statements.length&&!c.labeledStatements.length)return;if(!c.labeledStatements.length&&c.statements.length>1)throw Error("Multiple unlabelled statements are not allowed.");var e=c.labeledStatements.length?d(c.labeledStatements):e=c.statements[0],g=[];for(var h in c.deps)g.push(h);if(!g.length)return{value:e({})};for(var i=new CompoundBinding(e),j=0;j<g.length;j++)i.bind(g[j],a,g[j]);return i}catch(k){console.error("Invalid expression syntax: "+b,k)}}function d(a){return function(b){for(var c=[],d=0;d<a.length;d++)a[d].body(b)&&c.push(a[d].label);return c.join(" ")}}function e(a,b,c){this.deps=a,this.name=b,this.last=c}function f(){this.statements=[],this.labeledStatements=[],this.deps={},this.currentPath=void 0}function g(){throw Error("Not Implemented")}function h(){}var i;"undefined"!=typeof WeakMap&&navigator.userAgent.indexOf("Firefox/")<0?i=WeakMap:function(){var a=Object.defineProperty,b=Object.hasOwnProperty,c=(new Date).getTime()%1e9;i=function(){this.name="__st"+(1e9*Math.random()>>>0)+(c++ +"__")},i.prototype={set:function(b,c){a(b,this.name,{value:c,writable:!0})},get:function(a){return b.call(a,this.name)?a[this.name]:void 0},"delete":function(a){this.set(a,void 0)}}}();var j="[$_a-zA-Z]",k="[$_a-zA-Z0-9]",l=j+"+"+k+"*",m="("+l+")",n="(?:[0-9]|[1-9]+[0-9]+)",o="(?:"+l+"|"+n+")",p="(?:"+o+")(?:\\."+o+")*",q=new RegExp("^"+p+"$"),r=new RegExp("^"+m+"\\s* in (.*)$"),s=new RegExp("^(.*) as \\s*"+m+"$"),t=new i;e.prototype={getPath:function(){return this.last?this.last.getPath()+"."+this.name:this.name},valueFn:function(){var a=this.getPath();return this.deps[a]=!0,function(b){return b[a]}}};var u={"+":function(a){return+a},"-":function(a){return-a},"!":function(a){return!a}},v={"+":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}};f.prototype={getFn:function(a){return a instanceof e?a.valueFn():a},createProgram:function(){},createExpressionStatement:function(a){return this.statements.push(a),a},createLabeledStatement:function(a,b){return this.labeledStatements.push({label:a.getPath(),body:b instanceof e?b.valueFn():b}),b},createUnaryExpression:function(a,b){if(!u[a])throw Error("Disallowed operator: "+a);return b=this.getFn(b),function(c){return u[a](b(c))}},createBinaryExpression:function(a,b,c){if(!v[a])throw Error("Disallowed operator: "+a);return b=this.getFn(b),c=this.getFn(c),function(d){return v[a](b(d),c(d))}},createConditionalExpression:function(a,b,c){return a=this.getFn(a),b=this.getFn(b),c=this.getFn(c),function(d){return a(d)?b(d):c(d)}},createIdentifier:function(a){var b=new e(this.deps,a);return b.type="Identifier",b},createMemberExpression:function(a,b,c){return new e(this.deps,c.name,b)},createLiteral:function(a){return function(){return a.value}},createArrayExpression:function(a){for(var b=0;b<a.length;b++)a[b]=this.getFn(a[b]);return function(b){for(var c=[],d=0;d<a.length;d++)c.push(a[d](b));return c}},createProperty:function(a,b,c){return{key:b instanceof e?b.getPath():b(),value:c}},createObjectExpression:function(a){for(var b=0;b<a.length;b++)a[b].value=this.getFn(a[b].value);return function(b){for(var c={},d=0;d<a.length;d++)c[a[d].key]=a[d].value(b);return c}},createCallExpression:g,createEmptyStatement:g,createThisExpression:g},h.prototype={getBinding:function(a,d,e,f){return d=d.trim(),d&&!d.match(q)?b(a,d,e,f)||c(a,d,e,f):void 0},getInstanceModel:function(a,b){var c=t.get(a);if(!c)return b;var d=a.templateInstance?a.templateInstance.model:a.model,e=Object.create(d);return e[c]=b,e}},a.ExpressionSyntax=h}(this),function(a){function b(){logFlags.data&&console.group("Model.dirtyCheck()"),c(),logFlags.data&&console.groupEnd()}function c(){Platform.performMicrotaskCheckpoint()}var d=document.createElement("style");d.textContent="template {display: none;} /* injected by platform.js */";var e=document.querySelector("head");e.insertBefore(d,e.firstChild),HTMLTemplateElement.__instanceCreated=function(a){document.adoptNode(a),CustomElements.upgradeAll(a)};var f=125;window.addEventListener("WebComponentsReady",function(){b(),Observer.hasObjectObserve||setInterval(c,f)}),a.flush=b,window.dirtyCheck=b}(window.Platform),function(a){function b(a){return d(a,i)}function c(a){return d(a,j)}function d(a,b){return"link"===a.localName&&a.getAttribute("rel")===b}function e(a){return"script"===a.localName}function f(a,b){var c=document.implementation.createHTMLDocument(i);c._URL=b;var d=c.createElement("base");return d.setAttribute("href",document.baseURI),c.head.appendChild(d),c.body.innerHTML=a,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(c),c}a||(a=window.HTMLImports={flags:{}});var g,h=a.xhr,i="import",j="stylesheet",k={documents:{},cache:{},preloadSelectors:["link[rel="+i+"]","element link[rel="+j+"]","template","script[src]"].join(","),loader:function(a){return g=new l(k.loaded,a),g.cache=k.cache,g},load:function(a,b){g=k.loader(b),k.preload(a)},preload:function(a){var b=a.querySelectorAll(k.preloadSelectors);b=this.filterMainDocumentNodes(a,b),b=this.extractTemplateNodes(b),g.addNodes(b)},filterMainDocumentNodes:function(a,b){return a===document&&(b=Array.prototype.filter.call(b,function(a){return!e(a)})),b},extractTemplateNodes:function(a){var b=[];return a=Array.prototype.filter.call(a,function(a){if("template"===a.localName){if(a.content){var c=a.content.querySelectorAll("link[rel="+j+"]");c.length&&(b=b.concat(Array.prototype.slice.call(c,0)))}return!1}return!0}),b.length&&(a=a.concat(b)),a},loaded:function(a,d,e){if(b(d)){var g=k.documents[a];g||(g=f(e,a),p.resolvePathsInHTML(g.body),k.documents[a]=g,k.preload(g)),d.import={href:a,ownerNode:d,content:g},d.content=e=g}d.__resource=e,c(d)&&p.resolvePathsInStylesheet(d)}},l=function(a,b){this.onload=a,this.oncomplete=b,this.inflight=0,this.pending={},this.cache={}};l.prototype={addNodes:function(a){this.inflight+=a.length,q(a,this.require,this),this.checkDone()},require:function(a){var b=p.nodeUrl(a);a.__nodeUrl=b,this.dedupe(b,a)||this.fetch(b,a)},dedupe:function(a,b){return this.pending[a]?(this.pending[a].push(b),!0):this.cache[a]?(this.onload(a,b,g.cache[a]),this.tail(),!0):(this.pending[a]=[b],!1)},fetch:function(a,b){var c=function(c,d){this.receive(a,b,c,d)}.bind(this);h.load(a,c)},receive:function(a,b,c,d){c||(g.cache[a]=d),g.pending[a].forEach(function(b){c||this.onload(a,b,d),this.tail()},this),g.pending[a]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}};var m=["href","src","action"],n="["+m.join("],[")+"]",o="{{.*}}",p={nodeUrl:function(a){return p.resolveUrl(p.getDocumentUrl(document),p.hrefOrSrc(a))},hrefOrSrc:function(a){return a.getAttribute("href")||a.getAttribute("src")},documentUrlFromNode:function(a){return p.getDocumentUrl(a.ownerDocument)},getDocumentUrl:function(a){var b=a&&(a._URL||a.impl&&a.impl._URL||a.baseURI||a.URL)||"";return b.split("#")[0]},resolveUrl:function(a,b,c){if(this.isAbsUrl(b))return b;var d=this.compressUrl(this.urlToPath(a)+b);return c&&(d=p.makeRelPath(p.getDocumentUrl(document),d)),d},isAbsUrl:function(a){return/(^data:)|(^http[s]?:)|(^\/)/.test(a)},urlToPath:function(a){var b=a.split("/");return b.pop(),b.push(""),b.join("/")},compressUrl:function(a){for(var b,c=a.split("/"),d=0;d<c.length;d++)b=c[d],".."===b&&(c.splice(d-1,2),d-=2);return c.join("/")},makeRelPath:function(a,b){var c,d;for(c=this.compressUrl(a).split("/"),d=this.compressUrl(b).split("/");c.length&&c[0]===d[0];)c.shift(),d.shift();for(var e=0,f=c.length-1;f>e;e++)d.unshift("..");var g=d.join("/");return g},resolvePathsInHTML:function(a,b){b=b||p.documentUrlFromNode(a),p.resolveAttributes(a,b),p.resolveStyleElts(a,b);var c=a.querySelectorAll("template");c&&q(c,function(a){a.content&&p.resolvePathsInHTML(a.content,b)})},resolvePathsInStylesheet:function(a){var b=p.nodeUrl(a);a.__resource=p.resolveCssText(a.__resource,b)},resolveStyleElts:function(a,b){var c=a.querySelectorAll("style");c&&q(c,function(a){a.textContent=p.resolveCssText(a.textContent,b)})},resolveCssText:function(a,b){return a.replace(/url\([^)]*\)/g,function(a){var c=a.replace(/["']/g,"").slice(4,-1);return c=p.resolveUrl(b,c,!0),"url("+c+")"})},resolveAttributes:function(a,b){var c=a&&a.querySelectorAll(n);c&&q(c,function(a){this.resolveNodeAttributes(a,b)},this)},resolveNodeAttributes:function(a,b){m.forEach(function(c){var d=a.attributes[c];if(d&&d.value&&d.value.search(o)<0){var e=p.resolveUrl(b,d.value,!0);d.value=e}})}};h=h||{async:!0,ok:function(a){return a.status>=200&&a.status<300||304===a.status||0===a.status},load:function(b,c,d){var e=new XMLHttpRequest;(a.flags.debug||a.flags.bust)&&(b+="?"+Math.random()),e.open("GET",b,h.async),e.addEventListener("readystatechange",function(){4===e.readyState&&c.call(d,!h.ok(e)&&e,e.response,b)}),e.send()}};var q=Array.prototype.forEach.call.bind(Array.prototype.forEach);a.xhr=h,a.importer=k,a.getDocumentUrl=p.getDocumentUrl,a.IMPORT_LINK_TYPE=i}(window.HTMLImports),function(a){function b(a){return"link"===a.localName&&a.getAttribute("rel")===f}function c(a){return a.parentNode&&!d(a)&&!e(a)}function d(a){return a.ownerDocument===document||a.ownerDocument.impl===document}function e(a){return a.parentNode&&"element"===a.parentNode.localName}var f="import",g={selectors:["link[rel="+f+"]","link[rel=stylesheet]","style","script"],map:{link:"parseLink",script:"parseScript",style:"parseGeneric"},parse:function(a){if(!a.__importParsed){a.__importParsed=!0;var b=a.querySelectorAll(g.selectors);h(b,function(a){g[g.map[a.localName]](a)})}},parseLink:function(a){b(a)?a.content&&g.parse(a.content):this.parseGeneric(a)},parseGeneric:function(a){c(a)&&document.head.appendChild(a)},parseScript:function(a){if(c(a)){var b=a.__resource||a.textContent;b&&(b+="\n//# sourceURL="+(a.__nodeUrl||"inline["+Math.floor(1e3*(Math.random()+1))+"]")+"\n",eval.call(window,b))}}},h=Array.prototype.forEach.call.bind(Array.prototype.forEach);a.parser=g}(HTMLImports),function(){function a(){HTMLImports.importer.load(document,function(){HTMLImports.parser.parse(document),HTMLImports.readyTime=(new Date).getTime(),document.dispatchEvent(new CustomEvent("HTMLImportsLoaded",{bubbles:!0}))})}"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(a){var b=document.createEvent("HTMLEvents");return b.initEvent(a,!0,!0),b}),"complete"===document.readyState||"interactive"===document.readyState?a():window.addEventListener("DOMContentLoaded",a)}(),function(a){function b(a){u.push(a),t||(t=!0,q(d))}function c(a){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(a)||a}function d(){t=!1;var a=u;u=[],a.sort(function(a,b){return a.uid_-b.uid_});var b=!1;a.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 SideTable,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 c[d-1]=f,void 0}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}(this),!window.MutationObserver&&(window.MutationObserver=window.WebKitMutationObserver||window.JsMutationObserver,!MutationObserver))throw new Error("no mutation observer support");!function(a){function b(b,f){var g=f||{};if(!b)throw new Error("Name argument must not be empty");if(g.name=b,!g.prototype)throw new Error("Options missing required prototype property");return g.lifecycle=g.lifecycle||{},g.ancestry=c(g.extends),d(g),e(g),k(g.prototype),m(b,g),g.ctor=n(g),g.ctor.prototype=g.prototype,g.prototype.constructor=g.ctor,a.ready&&a.upgradeAll(document),g.ctor}function c(a){var b=s[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)}}a.native=b}function f(a){return g(t(a.tag),a)}function g(b,c){return c.is&&b.setAttribute("is",c.is),h(b,c),b.__upgraded__=!0,a.upgradeSubtree(b),j(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!==HTMLUnknownElement.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.readyCallback&&a.readyCallback()}function k(a){var b=a.setAttribute;a.setAttribute=function(a,c){l.call(this,a,c,b)};var c=a.removeAttribute;a.removeAttribute=function(a,b){l.call(this,a,b,c)}}function l(a,b,c){var d=this.getAttribute(a);c.apply(this,arguments),this.attributeChangedCallback&&this.getAttribute(a)!==d&&this.attributeChangedCallback(a,d)}function m(a,b){s[a]=b}function n(a){return function(){return f(a)}}function o(a){var b=s[a];return b?new b.ctor:t(a)}function p(a){if(!a.__upgraded__&&a.nodeType===Node.ELEMENT_NODE){var b=a.getAttribute("is")||a.localName,c=s[b];return c&&g(a,c)}}function q(b){var c=u.call(this,b);
-return a.upgradeAll(c),c}if(a||(a=window.CustomElements={flags:{}}),a.hasNative=(document.webkitRegister||document.register)&&"native"===a.flags.register,a.hasNative){document.register=document.register||document.webkitRegister;var r=function(){};a.registry={},a.upgradeElement=r}else{var s={},t=document.createElement.bind(document),u=Node.prototype.cloneNode;document.register=b,document.createElement=o,Node.prototype.cloneNode=q,a.registry=s,a.upgrade=p}}(window.CustomElements),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,d){b(a,function(a){return d(a)?!0:(a.webkitShadowRoot&&c(a.webkitShadowRoot,d),void 0)}),a.webkitShadowRoot&&c(a.webkitShadowRoot,d)}function d(a){return g(a)?(h(a),!0):(i(a),void 0)}function e(a){c(a,function(a){return d(a)?!0:void 0})}function f(a){return d(a)||e(a)}function g(b){if(!b.__upgraded__&&b.nodeType===Node.ELEMENT_NODE){var c=b.getAttribute("is")||b.localName,d=a.registry[c];if(d)return logFlags.dom&&console.group("upgrade:",b.localName),a.upgrade(b),logFlags.dom&&console.groupEnd(),!0}}function h(a){i(a),l(a)&&c(a,function(a){i(a)})}function i(a){(a.insertedCallback||a.__upgraded__&&logFlags.dom)&&(logFlags.dom&&console.group("inserted:",a.localName),l(a)&&(a.__inserted=(a.__inserted||0)+1,a.__inserted<1&&(a.__inserted=1),a.__inserted>1?logFlags.dom&&console.warn("inserted:",a.localName,"insert/remove count:",a.__inserted):a.insertedCallback&&(logFlags.dom&&console.log("inserted:",a.localName),a.insertedCallback())),logFlags.dom&&console.groupEnd())}function j(a){k(a),c(a,function(a){k(a)})}function k(a){(a.removedCallback||a.__upgraded__&&logFlags.dom)&&(logFlags.dom&&console.log("removed:",a.localName),l(a)||(a.__inserted=(a.__inserted||0)-1,a.__inserted>0&&(a.__inserted=0),a.__inserted<0?logFlags.dom&&console.warn("removed:",a.localName,"insert/remove count:",a.__inserted):a.removedCallback&&a.removedCallback()))}function l(a){for(var b=a;b;){if(b==a.ownerDocument)return!0;b=b.parentNode||b.host}}function m(a){a.webkitShadowRoot&&!a.webkitShadowRoot.__watched&&(logFlags.dom&&console.log("watching shadow-root for: ",a.localName),r(a.webkitShadowRoot),a.webkitShadowRoot.__watched=!0)}function n(a){m(a),c(a,function(){m(a)})}function o(a){switch(a.localName){case"style":case"script":case"template":case void 0:return!0}}function p(a){if(logFlags.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&&(v(a.addedNodes,function(a){o(a)||f(a)}),v(a.removedNodes,function(a){o(a)||j(a)}))}),logFlags.dom&&console.groupEnd()}function q(){p(u.takeRecords())}function r(a){u.observe(a,{childList:!0,subtree:!0})}function s(a){r(a)}function t(a){logFlags.dom&&console.group("upgradeDocument: ",(a.URL||a._URL||"").split("/").pop()),f(a),logFlags.dom&&console.groupEnd()}var u=new MutationObserver(p),v=Array.prototype.forEach.call.bind(Array.prototype.forEach);a.watchShadow=m,a.watchAllShadows=n,a.upgradeAll=f,a.upgradeSubtree=e,a.observeDocument=s,a.upgradeDocument=t,a.takeRecords=q}(window.CustomElements),function(){function parseElementElement(a){var b={name:"","extends":null};takeAttributes(a,b);var c=HTMLElement.prototype;if(b.extends){var d=document.createElement(b.extends);c=d.__proto__||Object.getPrototypeOf(d)}b.prototype=Object.create(c),a.options=b;var e=a.querySelector("script,scripts");e&&executeComponentScript(e.textContent,a,b.name);var f=document.register(b.name,b);a.ctor=f;var g=a.getAttribute("constructor");g&&(window[g]=f)}function takeAttributes(a,b){for(var c in b){var d=a.attributes[c];d&&(b[c]=d.value)}}function executeComponentScript(inScript,inContext,inName){context=inContext;var owner=context.ownerDocument,url=owner._URL||owner.URL||owner.impl&&(owner.impl._URL||owner.impl.URL),match=url.match(/.*\/([^.]*)[.]?.*$/);if(match){var name=match[1];url+=name!=inName?":"+inName:""}var code="__componentScript('"+inName+"', function(){"+inScript+"});"+"\n//# sourceURL="+url+"\n";eval(code)}function mixin(a,b){a=a||{};try{Object.getOwnPropertyNames(b).forEach(function(c){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)})}catch(c){}return a}var HTMLElementElement=function(a){return a.register=HTMLElementElement.prototype.register,parseElementElement(a),a};HTMLElementElement.prototype={register:function(a){a&&(this.options.lifecycle=a.lifecycle,a.prototype&&mixin(this.options.prototype,a.prototype))}};var context;window.__componentScript=function(a,b){b.call(context)},window.HTMLElementElement=HTMLElementElement}(),function(){function a(a){return"link"===a.localName&&a.getAttribute("rel")===b}var b=window.HTMLImports?HTMLImports.IMPORT_LINK_TYPE:"none",c={selectors:["link[rel="+b+"]","element"],map:{link:"parseLink",element:"parseElement"},parse:function(a){if(!a.__parsed){a.__parsed=!0;var b=a.querySelectorAll(c.selectors);d(b,function(a){c[c.map[a.localName]](a)}),CustomElements.upgradeDocument(a),CustomElements.observeDocument(a)}},parseLink:function(b){a(b)&&this.parseImport(b)},parseImport:function(a){a.content&&c.parse(a.content)},parseElement:function(a){new HTMLElementElement(a)}},d=Array.prototype.forEach.call.bind(Array.prototype.forEach);CustomElements.parser=c}(),function(){function a(){setTimeout(function(){CustomElements.parser.parse(document),CustomElements.upgradeDocument(document),CustomElements.ready=!0,CustomElements.readyTime=(new Date).getTime(),window.HTMLImports&&(CustomElements.elapsed=CustomElements.readyTime-HTMLImports.readyTime),document.body.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))},0)}if("function"!=typeof window.CustomEvent&&(window.CustomEvent=function(a){var b=document.createEvent("HTMLEvents");return b.initEvent(a,!0,!0),b}),"complete"===document.readyState)a();else{var b=window.HTMLImports?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(b,a)}}(),function(){function a(){}var b=document.createElement("style");b.textContent="element {display: none;} /* injected by platform.js */";var c=document.querySelector("head");if(c.insertBefore(b,c.firstChild),window.ShadowDOMPolyfill){CustomElements.watchShadow=a,CustomElements.watchAllShadows=a;var d=["upgradeAll","upgradeSubtree","observeDocument","upgradeDocument"],e={};d.forEach(function(a){e[a]=CustomElements[a]}),d.forEach(function(a){CustomElements[a]=function(b){return e[a](wrap(b))}})}}(),function(a){a=a||{};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},searchRoot:function(a,b,c){if(a){var d,e,f,g=a.elementFromPoint(b,c);for(e=this.targetingShadow(g);e;){if(d=e.elementFromPoint(b,c)){var h=this.targetingShadow(d);return this.searchRoot(h,b,c)||d}f=e.querySelector("shadow"),e=f&&f.olderShadowRoot}return g}},findTarget:function(a){var b=a.clientX,c=a.clientY;return this.searchRoot(document,b,c)}};a.targetFinding=b,a.findTarget=b.findTarget.bind(b),window.PointerEventsPolyfill=a}(window.PointerEventsPolyfill),function(){function a(a){return'[touch-action="'+a+'"]'}function b(a){return"{ -ms-touch-action: "+a+"; touch-action: "+a+"; }"}var c=["none","pan-x","pan-y",{rule:"pan-x pan-y",selectors:["scroll","pan-x pan-y","pan-y pan-x"]}],d="";c.forEach(function(c){d+=String(c)===c?a(c)+b(c):c.selectors.map(a)+b(c.rule)});var e=document.createElement("style");e.textContent=d;var f=document.querySelector("head");f.insertBefore(e,f.firstChild)}(),function(a){function b(a,b){var b=b||{},e=b.buttons;if(void 0===e)switch(b.which){case 1:e=1;break;case 2:e=4;break;case 3:e=2;break;default:e=0}var f;if(c)f=new MouseEvent(a,b);else{f=document.createEvent("MouseEvent");var g={bubbles:!1,cancelable:!1,view:null,detail:null,screenX:0,screenY:0,clientX:0,clientY:0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null};Object.keys(g).forEach(function(a){a in b&&(g[a]=b[a])}),f.initMouseEvent(a,g.bubbles,g.cancelable,g.view,g.detail,g.screenX,g.screenY,g.clientX,g.clientY,g.ctrlKey,g.altKey,g.shiftKey,g.metaKey,g.button,g.relatedTarget)}d||Object.defineProperty(f,"buttons",{get:function(){return e},enumerable:!0});var h=0;return h=b.pressure?b.pressure:e?.5:0,Object.defineProperties(f,{pointerId:{value:b.pointerId||0,enumerable:!0},width:{value:b.width||0,enumerable:!0},height:{value:b.height||0,enumerable:!0},pressure:{value:h,enumerable:!0},tiltX:{value:b.tiltX||0,enumerable:!0},tiltY:{value:b.tiltY||0,enumerable:!0},pointerType:{value:b.pointerType||"",enumerable:!0},hwTimestamp:{value:b.hwTimestamp||0,enumerable:!0},isPrimary:{value:b.isPrimary||!1,enumerable:!0}}),f}var c=!1,d=!1;try{var e=new MouseEvent("click",{buttons:1});c=!0,d=1===e.buttons}catch(f){}a.PointerEvent=b}(window),function(a){function b(){this.ids=[],this.pointers=[]}b.prototype={set:function(a,b){var c=this.ids.indexOf(a);c>-1?this.pointers[c]=b:(this.ids.push(a),this.pointers.push(b))},has:function(a){return this.ids.indexOf(a)>-1},"delete":function(a){var b=this.ids.indexOf(a);b>-1&&(this.ids.splice(b,1),this.pointers.splice(b,1))},get:function(a){var b=this.ids.indexOf(a);return this.pointers[b]},get size(){return this.pointers.length},clear:function(){this.ids.length=0,this.pointers.length=0}},a.PointerMap=b}(window.PointerEventsPolyfill),function(a){var b;if("undefined"!=typeof WeakMap&&navigator.userAgent.indexOf("Firefox/")<0)b=WeakMap;else{var c=Object.defineProperty,d=Object.hasOwnProperty,e=(new Date).getTime()%1e9;b=function(){this.name="__st"+(1e9*Math.random()>>>0)+(e++ +"__")},b.prototype={set:function(a,b){c(a,this.name,{value:b,writable:!0})},get:function(a){return d.call(a,this.name)?a[this.name]:void 0},"delete":function(a){this.set(a,void 0)}}}a.SideTable=b}(window.PointerEventsPolyfill),function(a){var b={targets:new a.SideTable,handledEvents:new a.SideTable,scrollType:new a.SideTable,pointermap:new a.PointerMap,events:[],eventMap:{},eventSources:{},registerSource:function(a,b){var c=b,d=c.events;d&&(this.events=this.events.concat(d),d.forEach(function(a){c[a]&&(this.eventMap[a]=c[a].bind(c))},this),this.eventSources[a]=c)},registerTarget:function(a,b){this.scrollType.set(a,b||"none"),this.listen(this.events,a,this.boundHandler)},unregisterTarget:function(a){this.scrollType.set(a,null),this.unlisten(this.events,a,this.boundHandler)},down:function(a){this.fireEvent("pointerdown",a)},move:function(a){this.fireEvent("pointermove",a)},up:function(a){this.fireEvent("pointerup",a)},enter:function(a){a.bubbles=!1,this.fireEvent("pointerenter",a)},leave:function(a){a.bubbles=!1,this.fireEvent("pointerleave",a)},over:function(a){a.bubbles=!0,this.fireEvent("pointerover",a)},out:function(a){a.bubbles=!0,this.fireEvent("pointerout",a)},cancel:function(a){this.fireEvent("pointercancel",a)},leaveOut:function(a){a.target.contains(a.relatedTarget)||this.leave(a),this.out(a)},enterOver:function(a){a.target.contains(a.relatedTarget)||this.enter(a),this.over(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,c){a.forEach(function(a){this.addEvent(a,c,!1,b)},this)},unlisten:function(a,b,c){a.forEach(function(a){this.removeEvent(a,c,!1,b)},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){var c=new PointerEvent(a,b);return 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){var b={};for(var c in a)b[c]=a[c];return b},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:function(a){var b=this.getTarget(a);return b?b.dispatchEvent(a):void 0},asyncDispatchEvent:function(a){setTimeout(this.dispatchEvent.bind(this,a),0)}};b.boundHandler=b.eventHandler.bind(b),a.dispatcher=b}(window.PointerEventsPolyfill),function(a){var b=a.dispatcher,c=Array.prototype.forEach.call.bind(Array.prototype.forEach),d=Array.prototype.map.call.bind(Array.prototype.map),e={ATTRIB:"touch-action",SELECTOR:"[touch-action]",EMITTER:"none",XSCROLLER:"pan-x",YSCROLLER:"pan-y",SCROLLER:/^(?:pan-x pan-y)|(?:pan-y pan-x)|scroll$/,OBSERVER_INIT:{subtree:!0,childList:!0,attributes:!0,attributeFilter:["touch-action"]},watchSubtree:function(b){a.targetFinding.canTarget(b)&&h.observe(b,this.OBSERVER_INIT)},enableOnSubtree:function(a){var b=a||document;this.watchSubtree(a),b===document&&"complete"!==document.readyState?this.installOnLoad():this.installNewSubtree(b)},installNewSubtree:function(a){c(this.findElements(a),this.addElement,this)},findElements:function(a){var b=a||document;return b.querySelectorAll?b.querySelectorAll(this.SELECTOR):[]},touchActionToScrollType:function(a){var b=a;return b===this.EMITTER?"none":b===this.XSCROLLER?"X":b===this.YSCROLLER?"Y":this.SCROLLER.exec(b)?"XY":void 0},removeElement:function(c){b.unregisterTarget(c);var d=a.targetFinding.shadow(c);d&&b.unregisterTarget(d)},addElement:function(c){var d=c.getAttribute&&c.getAttribute(this.ATTRIB),e=this.touchActionToScrollType(d);if(e){b.registerTarget(c,e);var f=a.targetFinding.shadow(c);f&&b.registerTarget(f,e)}},elementChanged:function(a){this.removeElement(a),this.addElement(a)},concatLists:function(a,b){for(var c,d=0,e=b.length;e>d&&(c=b[d]);d++)a.push(c);return a},installOnLoad:function(){document.addEventListener("DOMContentLoaded",this.installNewSubtree.bind(this,document))},flattenMutationTree:function(a){var b=d(a,this.findElements,this);return b.push(a),b.reduce(this.concatLists,[])},mutationWatcher:function(a){a.forEach(this.mutationHandler,this)},mutationHandler:function(a){var b=a;if("childList"===b.type){var c=this.flattenMutationTree(b.addedNodes);c.forEach(this.addElement,this);var d=this.flattenMutationTree(b.removedNodes);d.forEach(this.removeElement,this)}else"attributes"===b.type&&this.elementChanged(b.target)}},f=e.mutationWatcher.bind(e);a.installer=e,a.register=e.enableOnSubtree.bind(e),a.setTouchAction=function(a,c){var d=this.touchActionToScrollType(c);d?b.registerTarget(a,d):b.unregisterTarget(a)}.bind(e);var g=window.MutationObserver||window.WebKitMutationObserver;if(g)var h=new g(f);else e.watchSubtree=function(){console.warn("PointerEventsPolyfill: MutationObservers not found, touch-action will not be dynamically detected")}}(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"],global:["mousedown","mouseup","mouseover","mouseout"],lastTouches:[],mouseHandler:b.eventHandler.bind(b),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);return 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);if(d&&(this.cancel(a),d=!1),!d){var e=this.prepareEvent(a);c.set(this.POINTER_ID,a),b.down(e),b.listen(this.global,document,this.mouseHandler)}}},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),b.unlisten(this.global,document,this.mouseHandler)}};b.listen(["mousemove"],document,b.boundHandler),a.mouseEvents=e}(window.PointerEventsPolyfill),function(a){var b=a.dispatcher,c=a.findTarget,d=b.pointermap,e=b.scrollType,f=Array.prototype.map.call.bind(Array.prototype.map),g=2500,h={events:["touchstart","touchmove","touchend","touchcancel"],POINTER_TYPE:"touch",firstTouch:null,isPrimaryTouch:function(a){return this.firstTouch===a.identifier},setPrimaryTouch:function(a){null===this.firstTouch&&(this.firstTouch=a.identifier,this.firstXY={X:a.clientX,Y:a.clientY},this.scrolling=!1)},removePrimaryTouch:function(a){this.isPrimaryTouch(a)&&(this.firstTouch=null,this.firstXY=null)},touchToPointer:function(a){var d=b.cloneEvent(a);return d.pointerId=a.identifier+2,d.target=c(d),d.bubbles=!0,d.cancelable=!0,d.button=0,d.buttons=1,d.width=a.webkitRadiusX||a.radiusX,d.height=a.webkitRadiusY||a.radiusY,d.pressure=a.webkitForce||a.force,d.isPrimary=this.isPrimaryTouch(a),d.pointerType=this.POINTER_TYPE,d},processTouches:function(a,b){var c=a.changedTouches,d=f(c,this.touchToPointer,this);d.forEach(b,this)},shouldScroll:function(a){if(this.firstXY){var b,c=e.get(a.currentTarget);if("none"===c)b=!1;else if("XY"===c)b=!0;else{var d=a.changedTouches[0],f=c,g="Y"===c?"X":"Y",h=Math.abs(d["client"+f]-this.firstXY[f]),i=Math.abs(d["client"+g]-this.firstXY[g]);b=h>=i}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(d.size>=b.length){var c=[];d.ids.forEach(function(a){if(1!==a&&!this.findTouch(b,a-2)){var e=d.get(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.processTouches(a,this.overDown)},overDown:function(a){d.set(a.pointerId,{target:a.target,out:a,outTarget:a.target}),b.over(a),b.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 c=a,e=d.get(c.pointerId);if(e){var f=e.out,g=e.outTarget;b.move(c),f&&g!==c.target&&(f.relatedTarget=c.target,c.relatedTarget=g,f.target=g,c.target?(b.leaveOut(f),b.enterOver(c)):(c.target=g,c.relatedTarget=null,this.cancelOut(c))),e.out=c,e.outTarget=c.target}},touchend:function(a){this.dedupSynthMouse(a),this.processTouches(a,this.upOut)},upOut:function(a){this.scrolling||(b.up(a),b.out(a)),this.cleanUpPointer(a)},touchcancel:function(a){this.processTouches(a,this.cancelOut)},cancelOut:function(a){b.cancel(a),b.out(a),this.cleanUpPointer(a)},cleanUpPointer:function(a){d.delete(a.pointerId),this.removePrimaryTouch(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,g)}}};a.touchEvents=h}(window.PointerEventsPolyfill),function(a){var b=a.dispatcher,c=b.pointermap,d={events:["MSPointerDown","MSPointerMove","MSPointerUp","MSPointerOut","MSPointerOver","MSPointerCancel","MSGotPointerCapture","MSLostPointerCapture"],POINTER_TYPES:["","unavailable","touch","pen","mouse"],prepareEvent:function(a){var c=b.cloneEvent(a);return 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=d}(window.PointerEventsPolyfill),function(a){var b=a.dispatcher,c=a.installer;if(void 0===window.navigator.pointerEnabled){if(window.navigator.msPointerEnabled){var d=window.navigator.msMaxTouchPoints;Object.defineProperty(window.navigator,"maxTouchPoints",{value:d,enumerable:!0}),b.registerSource("ms",a.msEvents),b.registerTarget(document)}else b.registerSource("mouse",a.mouseEvents),void 0!==window.ontouchstart&&b.registerSource("touch",a.touchEvents),c.enableOnSubtree(document);Object.defineProperty(window.navigator,"pointerEnabled",{value:!0,enumerable:!0})}}(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)}),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){var b;if("undefined"!=typeof WeakMap&&navigator.userAgent.indexOf("Firefox/")<0)b=WeakMap;else{var c=Object.defineProperty,d=Object.hasOwnProperty,e=(new Date).getTime()%1e9;b=function(){this.name="__st"+(1e9*Math.random()>>>0)+(e++ +"__")},b.prototype={set:function(a,b){c(a,this.name,{value:b,writable:!0})},get:function(a){return d.call(a,this.name)?a[this.name]:void 0},"delete":function(a){this.set(a,void 0)}}}a.SideTable=b}(window.PointerGestures),function(a){function b(){this.ids=[],this.pointers=[]}b.prototype={set:function(a,b){var c=this.ids.indexOf(a);c>-1?this.pointers[c]=b:(this.ids.push(a),this.pointers.push(b))},has:function(a){return this.ids.indexOf(a)>-1},"delete":function(a){var b=this.ids.indexOf(a);b>-1&&(this.ids.splice(b,1),this.pointers.splice(b,1))},get:function(a){var b=this.ids.indexOf(a);return this.pointers[b]},get size(){return this.pointers.length},clear:function(){this.ids.length=0,this.pointers.length=0}},window.Map&&(b=window.Map),a.PointerMap=b}(window.PointerGestures),function(a){var b={handledEvents:new a.SideTable,targets:new a.SideTable,handlers:{},recognizers:{},events:["pointerdown","pointermove","pointerup","pointerover","pointerout","pointercancel"],registerRecognizer:function(a,b){var c=b;this.recognizers[a]=c,this.events.forEach(function(a){if(c[a]){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(this.events,a)},unregisterTarget:function(a){this.unlisten(this.events,a)},eventHandler:function(a){if(!this.handledEvents.get(a)){var b,c=a.type;(b=this.handlers[c])&&this.makeQueue(b,a),this.handledEvents.set(a,!0)}},makeQueue:function(a,b){var c=this.cloneEvent(b);setTimeout(this.runQueue.bind(this,a,c),0)},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){var b={};for(var c in a)b[c]=a[c];return b},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){var c=function(){this.dispatchEvent(a,b)}.bind(this);setTimeout(c,0)},preventTap:function(a){var b=this.recognizers.tap;b&&b.preventTap(a)}};b.boundHandler=b.eventHandler.bind(b),a.dispatcher=b,a.register=function(b){var c=window.PointerEventsPolyfill;c&&c.register(b),a.dispatcher.registerTarget(b)},b.registerTarget(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};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,pointerType:c.pointerType};"trackend"===a&&(h._releaseTarget=c.target);var 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={events:["pointerdown","pointermove","pointerup","pointercancel"],pointerdown:function(a){a.isPrimary&&!a.tapPrevented&&c.set(a.pointerId,{target:a.target,x:a.clientX,y:a.clientY})},pointermove:function(a){if(a.isPrimary){var b=c.get(a.pointerId);b&&a.tapPrevented&&c.delete(a.pointerId)}},pointerup:function(d){var e=c.get(d.pointerId);if(e&&!d.tapPrevented){var f=a.findLCA(e.target,d.target);if(f){var g=b.makeEvent("tap",{x:d.clientX,y:d.clientY,pointerType:d.pointerType});b.dispatchEvent(g,f)}}c.delete(d.pointerId)},pointercancel:function(a){c.delete(a.pointerId)},preventTap:function(a){c.delete(a)}};b.registerRecognizer("tap",d)}(window.PointerGestures),window.Polymer||(window.Polymer={}),function(){var a=Array.prototype.forEach.call.bind(Array.prototype.forEach);window.forEach=a}(),function(a){function b(a){var c=b.caller,f=c.nom;f||(f=e.call(this,c)),f||console.warn("called super() on a method not installed declaratively (has no .nom property)"),"_super"in c||d(c,f,Object.getPrototypeOf(this));var g=c._super;if(g){var h=g[f];return"_super"in h||d(h,f,g),h.apply(this,a||[])}}function c(a,b,c){for(var d=a;d&&(!d.hasOwnProperty(b)||d[b]==c);)d=Object.getPrototypeOf(d);return d}function d(a,b,d){a._super=c(d,b,a),a._super&&(a._super[b]._nom=b)}function e(a){console.group("nameInThis");for(var b=this;b&&b!==HTMLElement.prototype;){for(var c,d=Object.getOwnPropertyNames(b),e=0,f=d.length;f>e&&(c=d[e]);e++){console.log(c);var g=Object.getOwnPropertyDescriptor(b,c);if(g.value==a)return c}b=Object.getPrototypeOf(b)}console.groupEnd("nameInThis")}a.$super=b}(Polymer),function(a){function b(b,e){if(b!=window){if(!(b&&b instanceof HTMLElement))throw"First argument to Polymer.register must be an HTMLElement";var f=Platform.mixin({},a.base,e);f.elementElement=b,a.addResolvePath(f,b),f.installTemplate=function(){this.super(),d.call(this,b)},f.installTemplate.nom="installTemplate",f.readyCallback=c,f.insertedCallback=g,f.removedCallback=h,f.attributeChangedCallback=i,j(f),a.parseHostEvents(b.attributes,f),a.publishAttributes(b,f),a.installSheets(b),a.shimStyling(b),b.register({prototype:f}),logFlags.comps&&console.log("Polymer: element registered"+b.options.name)
-}}function c(){this.installTemplate(),f.call(this)}function d(a){var b=a.querySelector("template");if(b){var c=this.webkitCreateShadowRoot();return c.applyAuthorStyles=this.applyAuthorStyles,CustomElements.watchShadow(this),c.host=this,c.appendChild(b.createInstance(this,Polymer.expressionSyntax)),e.call(this,c),c}}function e(b){CustomElements.takeRecords(),a.marshalNodeReferences.call(this,b);var c=a.accumulateEvents(b);a.bindAccumulatedLocalEvents.call(this,b,c),PointerGestures.register(b),PointerEventsPolyfill.setTouchAction(b,this.getAttribute("touch-action"))}function f(){a.observeProperties.call(this),a.installInstanceAttributes.call(this),a.takeAttributes.call(this);var b=a.accumulateHostEvents.call(this);a.bindAccumulatedHostEvents.call(this,b),this.asyncUnbindAll(),this.ready&&this.ready()}function g(){this.cancelUnbindAll(!0),this.inserted&&this.inserted()}function h(){this.asyncUnbindAll(),this.removed&&this.removed()}function i(){this.attributeChanged&&this.attributeChanged.apply(this,arguments)}function j(a){Object.getOwnPropertyNames(a).forEach(function(b){var c=Object.getOwnPropertyDescriptor(a,b);"function"==typeof c.value&&(c.value.nom=b)})}function k(a,b){for(var c=a;c&&c!=this;){var d=Array.prototype.indexOf.call(b,c);if(d>=0)return d;c=c.parentNode}}window.logFlags||{},a.register=b,a.findDistributedTarget=k,a.instanceReady=f}(Polymer),function(a){var b=window.logFlags||{},c={"super":Polymer.$super,isPolymerElement:!0,bind:function(){Polymer.bind.apply(this,arguments)},unbind:function(){Polymer.unbind.apply(this,arguments)},unbindAll:function(){Polymer.unbindAll.apply(this,arguments)},cancelUnbindAll:function(){Polymer.cancelUnbindAll.apply(this,arguments)},asyncUnbindAll:function(){Polymer.asyncUnbindAll.apply(this,arguments)},job:function(){return Polymer.job.apply(this,arguments)},asyncMethod:function(a,b,c){Platform.flush();var d=b&&b.length?b:[b],e=function(){(this[a]||a).apply(this,d)}.bind(this);return c?window.setTimeout(e,c):requestAnimationFrame(e)},dispatch:function(a,b){this[a]&&this[a].apply(this,b)},fire:function(a,c,d){var e=d||this;return b.events&&console.log("[%s]: sending [%s]",e.localName,a),e.dispatchEvent(new CustomEvent(a,{bubbles:!0,detail:c})),c},asyncFire:function(){this.asyncMethod("fire",arguments)},classFollows:function(a,b,c){b&&b.classList.remove(c),a&&a.classList.add(c)}};c.send=c.fire,c.asend=c.asyncFire,a.base=c}(window.Polymer),function(){function a(a,b,c,e){var f=d(a,b,!0);f[c.toLowerCase()]=e}function b(a,b,c){var e=d(a,b),f=c.toLowerCase();return e&&e[f]?(e[f].close(),e[f]=null,!0):void 0}function c(a,c){var e=d(a,c);e&&Object.keys(e).forEach(function(d){b(a,c,d)})}function d(a,b,c){var d=e.get(a);return c&&(d||e.set(a,d={}),d[b]||(d[b]={})),d&&d[b]}var e=new SideTable;Polymer.registerObserver=a,Polymer.unregisterObserver=b,Polymer.unregisterObserversOfType=c}(),function(){function a(a,c,d,e){b.bind&&console.log("[%s]: bindProperties: [%s] to [%s].[%s]",d.localName||"object",e,a.localName,c);var f=PathObserver.getValueAtPath(d,e);return(null===f||void 0===f)&&PathObserver.setValueAtPath(d,e,a[c]),PathObserver.defineProperty(a,c,{object:d,path:e})}var b=window.logFlags||{};Polymer.bindProperties=a}(),function(){function a(a,b,c){var d=r.get(a);d||r.set(a,d={}),d[b.toLowerCase()]=c}function b(a,b){var c=r.get(a);c&&delete c[b.toLowerCase()]}function c(c){var d=c.prototype,e=d.bind,f=d.unbind;d.bind=function(b,c,d){e.apply(this,arguments),a(this,b,d)},d.unbind=function(a){f.apply(this,arguments),b(this,a)}}function d(a){return a&&r.get(a)||s}function e(a,b){return d(a)[b.toLowerCase()]}function f(b,c,d){var e=Polymer.propertyForAttribute.call(this,b);e?(a(this,e,d),Polymer.registerObserver(this,"binding",e,Polymer.bindProperties(this,e,c,d))):HTMLElement.prototype.bind.apply(this,arguments)}function g(a){Polymer.unregisterObserver(this,"binding",a)||HTMLElement.prototype.unbind.apply(this,arguments)}function h(){l(this)||(Polymer.unregisterObserversOfType(this,"property"),HTMLElement.prototype.unbindAll.apply(this,arguments),i(this.webkitShadowRoot,!0),k(this))}function i(a,b){j(a,b,function(a){a.unbindAll&&a.unbindAll()})}function j(a,b,c){if(a){c(a),b&&a.olderShadowRoot&&j(a.olderShadowRoot,b,c);for(var d=a.firstChild;d;d=d.nextSibling)j(d,b,c)}}function k(a){t.set(a,!0)}function l(a){return t.get(a)}function m(){l(this)||(p.bind&&console.log("asyncUnbindAll",this.localName),u.set(this,this.job(u.get(this),this.unbindAll)))}function n(a){if(l(this))return p.bind&&console.warn(this.localName,"is unbound, cannot cancel unbindAll"),void 0;p.bind&&console.log("cancelUnbindAll",this.localName);var b=u.get(this);b&&(b.stop(),u.set(this,null)),a||j(this.webkitShadowRoot,!0,function(a){a.cancelUnbindAll&&a.cancelUnbindAll()})}function o(a,b){var c=document.createElement("template");return c.innerHTML=a,c.createInstance(b,q)}var p=window.logFlags||{},q=new ExpressionSyntax,r=new SideTable;[Node,Element,Text,HTMLInputElement].forEach(c);var s={},t=new SideTable,u=new SideTable,v=/\{\{([^{}]*)}}/;Polymer.bind=f,Polymer.unbind=g,Polymer.unbindAll=h,Polymer.getBinding=e,Polymer.asyncUnbindAll=m,Polymer.cancelUnbindAll=n,Polymer.isElementUnbound=l,Polymer.unbindNodeTree=i,Polymer.parseAndBindHTML=o,Polymer.bindPattern=v,Polymer.expressionSyntax=q}(),function(){function a(a,d){b(a,d),c(a,d)}function b(a,b){var c={},d=a.getAttribute(j);if(d){var e=d.split(d.indexOf(",")>=0?",":" ");e.forEach(function(a){a=a.trim(),a&&(c[a]=null)})}var f=a.options.prototype;Object.keys(c).forEach(function(a){a in b||a in f||(b[a]=c[a])});var g=b[k];g&&(Object.keys(g).forEach(function(a){b[a]=g[a]}),c=Platform.mixin(c,g)),b[i]=Platform.mixin({},f[i],c)}function c(a,b){for(var d,e=a.options.prototype,f=a.attributes,g=b.instanceAttributes=Object.create(e.instanceAttributes||null),h=0,i=f.length;i>h&&(d=f[h]);h++)c.blackList[d.name]||"on-"!==d.name.slice(0,3)&&(g[d.name]=d.value)}function d(){var a=this.instanceAttributes;Object.keys(a).forEach(function(b){this.setAttribute(b,a[b])},this)}function e(){forEach(this.attributes,function(a){var b=f.call(this,a.name);if(b){if(a.value.search(h)>=0)return;var c=this[b],d=g(a.value,c);d!==c&&(this[b]=d)}},this)}function f(a){var b=Object.keys(this[i]);return b[b.map(l).indexOf(a.toLowerCase())]}function g(a,b){var c=typeof b;return b instanceof Date&&(c="date"),m[c](a,b)}var h=Polymer.bindPattern,i="__published",j="attributes",k="publish";c.blackList={name:1,"extends":1,constructor:1},c.blackList[j]=1;var l=String.prototype.toLowerCase.call.bind(String.prototype.toLowerCase),m={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 String(b)===a?b:a},object:function(a,b){if(!b)return a;try{return JSON.parse(a.replace(/'/g,'"'))}catch(c){return a}}};Polymer.takeAttributes=e,Polymer.publishAttributes=a,Polymer.propertyForAttribute=f,Polymer.installInstanceAttributes=d}(),Polymer.marshalNodeReferences=function(a){var b=this.$=this.$||{};if(a){var c=a.querySelectorAll("[id]");forEach(c,function(a){b[a.id]=a})}},function(){function a(a,b,c){var d=c.bind(this);for(var e in b)j.events&&console.log('[%s] bindAccumulatedEvents: addEventListener("%s", listen)',a.localName||"root",e),a.addEventListener(e,d)}function b(b){a.call(this,this,b,f)}function c(b,c){a.call(this,b,c,d)}function d(a){if(!a.cancelBubble){if(a.on=k+a.type,j.events&&console.group("[%s]: listenLocal [%s]",this.localName,a.on),!a.path||window.ShadowDOMPolyfill)e(a);else{var b=null;Array.prototype.some.call(a.path,function(c){return c===this?!0:(b=b===this?b:v(c),b&&h.call(b,c,a)?!0:void 0)},this)}j.events&&console.groupEnd()}}function e(a){j.events&&console.log("event.path() not supported for",a.type);for(var b=a.target,c=null;b&&b!=this;){if(c=c===this?c:v(b),c&&h.call(c,b,a))return;b=b.parentNode}}function f(a){a.cancelBubble||(j.events&&console.group("[%s]: listenHost [%s]",this.localName,a.type),i.call(this,this,a),j.events&&console.groupEnd())}function g(a){var b=x.get(a);return b||(b=[],x.set(a,b)),b}function h(a,b){if(a.attributes){var c=g(b);if(c.indexOf(a)<0){c.push(a);var d=a.getAttribute(b.on);d&&(j.events&&console.log("[%s] found handler name [%s]",this.localName,d),w(this,d,[b,b.detail,a]))}}return b.cancelBubble}function i(a,b){var c=y.call(a,b.type);return c&&(j.events&&console.log("[%s] found host handler name [%s]",a.localName,c),w(a,c,[b,b.detail,a])),b.cancelBubble}var j=window.logFlags||{},k="on-",l=function(a,b){b.eventDelegates=m(a)},m=function(a){var b={};if(a)for(var c,d=0;c=a[d];d++)c.name.slice(0,k.length)==k&&(b[c.name.slice(k.length)]=c.value);return b},n=function(a,b){var c=b||{};return o(a,c),r(a,c),s(a,c),c},o=function(a,b){var c=a.attributes;if(c)for(var d,e=0;d=c[e];e++)d.name.slice(0,k.length)===k&&q(d.name.slice(k.length),b)},p={webkitanimationstart:"webkitAnimationStart",webkitanimationend:"webkitAnimationEnd",webkittransitionend:"webkitTransitionEnd",domfocusout:"DOMFocusOut",domfocusin:"DOMFocusIn"},q=function(a,b){var c=p[a]||a;b[c]=1},r=function(a,b){for(var c,d=a.childNodes,e=0;c=d[e];e++)n(c,b)},s=function(a,b){if("template"==a.localName){var c=t(a);c&&r(c,b)}},t=function(a){return a.ref?a.ref.content:a.content},u=function(a){for(var b=a||{},c=this.__proto__;c&&c!==HTMLElement.prototype;){if(c.hasOwnProperty("eventDelegates"))for(var d in c.eventDelegates)q(d,b);c=c.__proto__}return b},v=function(a){for(var b=a;b.parentNode&&"shadow-root"!==b.localName;)b=b.parentNode;return b.host},w=function(a,b,c){a&&(j.events&&console.group("[%s] dispatch [%s]",a.localName,b),a.dispatch(b,c),j.events&&console.groupEnd())},x=new SideTable("handledList"),y=function(a){for(var b=this;b;){if(b.hasOwnProperty("eventDelegates")){var c=b.eventDelegates[a]||b.eventDelegates[a.toLowerCase()];if(c)return c}b=b.__proto__}};Polymer.parseHostEvents=l,Polymer.accumulateEvents=n,Polymer.accumulateHostEvents=u,Polymer.bindAccumulatedHostEvents=b,Polymer.bindAccumulatedLocalEvents=c}(),function(){function a(){for(var a in this)b.call(this,a)}function b(a){if(c.call(this,a)){e.observe&&console.log("["+this.localName+"] watching ["+a+"]");var b=new PathObserver(this,a,function(b,c){e.data&&console.log("[%s#%s] watch: [%s] now [%s] was [%s]",this.localName,this.node.id||"",a,this[a],c),d.call(this,a,c)}.bind(this));Polymer.registerObserver(this,"property",a,b)}}function c(a){return"_"!=a[0]&&!(a in Object.prototype)&&Boolean(this[a+f])}function d(a,b){var c=a+f;this[c]&&this[c](b)}var e=window.logFlags||{},f="Changed";Polymer.observeProperties=a}(),function(){function a(a){b(a),c(a)}function b(a){var b=h(a,t,function(a){return!a.hasAttribute(x)}),c=n(a);if(c){var d="";b.forEach(function(a){a.parentNode.removeChild(a),d+=k(a)+"\n"}),d&&c.insertBefore(j(d),c.firstChild)}}function c(a){l(g(a,v),p.head)}function d(a,b){b.controllerStyle||(b.controllerStyle=g(b,w));var c=b.controllerStyle,d=i(a);d&&!e(d,a,w)&&(Polymer.shimPolyfillDirectives([c],a.localName),l(c,d))}function e(a,b,c){return a.querySelector("style["+u+"="+b.localName+"-"+c+"]")}function f(a,b){var c="",d="["+x+"="+b+"]",e=function(a){return m(a,d)},f=h(a,t,e);f.forEach(function(a){a.parentNode.removeChild(a),c+=k(a)+"\n\n"});var g=h(a,s,e);return g.forEach(function(a){a.parentNode.removeChild(a),c+=a.textContent+"\n\n"}),c}function g(a,b){var c=f(a,b);if(c){var d=j(c);return d.setAttribute(u,a.options.name+"-"+b),d}}function h(a,b,c){var d=o(a.querySelectorAll(b)),e=n(a);if(e){var f=o(e.querySelectorAll(b));d=d.concat(f)}return d.filter(c)}function i(a){for(var b=a;b.parentNode;)b=b.parentNode;return b==p?p.head:b}function j(a){var b=document.createElement("style");return b.textContent=a,b}function k(a){return a&&a.__resource||""}function l(a,b){if(a){var c=a.cloneNode(!0);c.textContent=a.textContent,b.appendChild(c)}}function m(a,b){return r?r.call(a,b):void 0}function n(a){var b=a.querySelector("template");return b&&templateContent(b)}function o(a){return Array.prototype.slice.call(a||[],0)}window.logFlags||{};var p=wrap(document),q=HTMLElement.prototype,r=q.matches||q.matchesSelector||q.webkitMatchesSelector||q.mozMatchesSelector,s="style",t="[rel=stylesheet]",u="element",v="global",w="controller",x="polymer-scope";Polymer.installSheets=a,Polymer.installControllerStyles=d}(),function(){var a=Array.prototype.forEach.call.bind(Array.prototype.forEach),b=Array.prototype.concat.call.bind(Array.prototype.concat),c=Array.prototype.slice.call.bind(Array.prototype.slice),d={hostRuleRe:/@host[^{]*{(([^}]*?{[^{]*?}[\s\S]*?)+)}/gim,selectorRe:/([^{]*)({[\s\S]*?})/gim,hostElementRe:/(.*)((?:\*)|(?:\:scope))(.*)/,hostFixableRe:/^[.\[:]/,cssCommentRe:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,cssPolyfillCommentRe:/\/\*\s*@polyfill ([^*]*\*+([^/*][^*]*\*+)*\/)([^{]*?){/gim,cssPseudoRe:/::(x-[^\s{,(]*)/gim,selectorReSuffix:"([>\\s~+[.,{:][\\s\\S]*)?$",hostRe:/@host/gim,cache:{},shimStyling:function(a){if(window.ShadowDOMPolyfill&&a){var b=a.options.name;d.cacheDefinition(a),d.shimPolyfillDirectives(a.styles,b),Polymer.strictPolyfillStyling&&d.applyScopeToContent(a.templateContent,b),d.applyShimming(d.stylesForElement(a),b)}},shimShadowDOMStyling:function(a,b){window.ShadowDOMPolyfill&&(d.shimPolyfillDirectives(a,b),d.applyShimming(a,b))},applyShimming:function(a,b){var c=this.shimAtHost(a,b);c+=this.shimScoping(a,b),this.addCssToDocument(c)},cacheDefinition:function(a){var b=a.options.name,e=a.querySelector("template"),f=e&&templateContent(e),g=f&&f.querySelectorAll("style");a.styles=g?c(g):[],a.templateContent=f,d.cache[b]=a},applyScopeToContent:function(b,c){b&&(a(b.querySelectorAll("*"),function(a){a.setAttribute(c,"")}),a(b.querySelectorAll("template"),function(a){this.applyScopeToContent(templateContent(a),c)},this))},stylesForElement:function(a){var d=a.styles,e=a.templateContent&&a.templateContent.querySelector("shadow");if(e||null===a.templateContent){var f=this.findExtendee(a.options.name);if(f){var g=this.stylesForElement(f);d=b(c(g),c(d))}}return d},findExtendee:function(a){var b=this.cache[a];return b&&this.cache[b.options.extends]},shimPolyfillDirectives:function(b,c){window.ShadowDOMPolyfill&&b&&a(b,function(a){a.textContent=this.convertPolyfillDirectives(a.textContent,c)},this)},shimAtHost:function(a,b){return a?this.convertAtHostStyles(a,b):void 0},shimScoping:function(a,b){return a?this.convertScopedStyles(a,b):void 0},convertPolyfillDirectives:function(a,b){for(var c,d,e="",f=0;c=this.cssPolyfillCommentRe.exec(a);)e+=a.substring(f,c.index),d=c[1].slice(0,-2).replace(this.hostRe,b),e+=this.scopeSelector(d,b)+"{",f=this.cssPolyfillCommentRe.lastIndex;return e+=a.substring(f,a.length)},findAtHostRules:function(a,b){return Array.prototype.filter.call(a,this.isHostRule.bind(this,b))},isHostRule:function(a,b){return b.selectorText&&b.selectorText.match(a)||b.cssRules&&this.findAtHostRules(b.cssRules,a).length||b.type==CSSRule.WEBKIT_KEYFRAMES_RULE},convertAtHostStyles:function(a,b){for(var c,d=this.stylesToCssText(a),e="",f=0;c=this.hostRuleRe.exec(d);)e+=d.substring(f,c.index),e+=this.scopeHostCss(c[1],b),f=this.hostRuleRe.lastIndex;e+=d.substring(f,d.length);var g=new RegExp("^"+b+this.selectorReSuffix,"m"),d=this.rulesToCss(this.findAtHostRules(this.cssToRules(e),g));return d},scopeHostCss:function(a,b){for(var c,d="";c=this.selectorRe.exec(a);)d+=this.scopeHostSelector(c[1],b)+" "+c[2]+"\n ";return d},scopeHostSelector:function(a,b){var c=[],d=a.split(","),e="[is="+b+"]";return d.forEach(function(a){a=a.trim(),a.match(this.hostElementRe)?a=a.replace(this.hostElementRe,b+"$1$3, "+e+"$1$3"):a.match(this.hostFixableRe)&&(a=b+a+", "+e+a),c.push(a)},this),c.join(", ")},convertScopedStyles:function(b,c){a(b,function(a){a.parentNode&&a.parentNode.removeChild(a)});var d=this.stylesToCssText(b).replace(this.hostRuleRe,"");d=this.convertPseudos(d);var e=this.cssToRules(d);return d=this.scopeRules(e,c)},convertPseudos:function(a){return a.replace(this.cssPseudoRe," [pseudo=$1]")},scopeRules:function(b,c){var d="";return a(b,function(a){a.selectorText&&a.style&&a.style.cssText?(d+=this.scopeSelector(a.selectorText,c,Polymer.strictPolyfillStyling)+" {\n ",d+=this.propertiesFromRule(a)+"\n}\n\n"):a.media?(d+="@media "+a.media.mediaText+" {\n",d+=this.scopeRules(a.cssRules,c),d+="\n}\n\n"):a.cssText&&(d+=a.cssText+"\n\n")},this),d},propertiesFromRule:function(a){var b=a.style.cssText;return a.style.content&&!a.style.content.match(/['"]+/)&&(b="content: '"+a.style.content+"';\n"+a.style.cssText.replace(/content:[^;]*;/g,"")),b},selectorNeedsScoping:function(a,b){var c="("+b+"|\\[is="+b+"\\])",d=new RegExp("^"+c+this.selectorReSuffix,"m");return!a.match(d)},scopeSelector:function(a,b,c){var d=[],e=a.split(",");return e.forEach(function(a){a=a.trim(),this.selectorNeedsScoping(a,b)&&(a=c?this.applyStrictSelectorScope(a,b):this.applySimpleSelectorScope(a,b)),d.push(a)},this),d.join(", ")},applySimpleSelectorScope:function(a,b){return b+" "+a+", "+"[is="+b+"] "+a},applyStrictSelectorScope:function(a,b){var c=[" ",">","+","~"],d=a,e="["+b+"]";return c.forEach(function(a){var b=d.split(a);d=b.map(function(a){var b=a.trim();return b&&c.indexOf(b)<0&&b.indexOf(e)<0&&(a=b.replace(/([^:]*)(:*)(.*)/,"$1"+e+"$2$3")),a}).join(a)}),d},stylesToCssText:function(b,c){var d="";return a(b,function(a){d+=a.textContent+"\n\n"}),c||(d=this.stripCssComments(d)),d},stripCssComments:function(a){return a.replace(this.cssCommentRe,"")},cssToRules:function(a){var b=document.createElement("style");b.textContent=a,document.head.appendChild(b);var c=b.sheet.cssRules;return b.parentNode.removeChild(b),c},rulesToCss:function(a){for(var b=0,c=[];b<a.length;b++)c.push(a[b].cssText);return c.join("\n\n")},addCssToDocument:function(a){a&&this.getSheet().appendChild(document.createTextNode(a))},getSheet:function(){return this.sheet||(this.sheet=document.createElement("style"),this.sheet.setAttribute("polymer-polyfill","")),this.sheet},addSheetToDocument:function(){this.addCssToDocument("style { display: none !important; }\n");var a=document.querySelector("head");a.insertBefore(this.getSheet(),a.childNodes[0])}};window.ShadowDOMPolyfill&&d.addSheetToDocument(),Polymer.shimStyling=d.shimStyling,Polymer.shimShadowDOMStyling=d.shimShadowDOMStyling,Polymer.shimPolyfillDirectives=d.shimPolyfillDirectives.bind(d),Polymer.strictPolyfillStyling=!1}(window),function(){function a(a,b){var d=c(b);a.resolvePath=function(a){return d+a}}function b(a){if(a){var b=a.split("/");return b.pop(),b.push(""),b.join("/")}return""}function c(a){return b(HTMLImports.getDocumentUrl(a.ownerDocument))}Polymer.addResolvePath=a}(),function(){function a(a,c,d){var e=a||new b(this);return e.stop(),e.go(c,d),e}var b=function(a){this.context=a};b.prototype={go:function(a,b){this.callback=a,this.handle=setTimeout(function(){this.handle=null,a.call(this.context)}.bind(this),b)},stop:function(){this.handle&&(clearTimeout(this.handle),this.handle=null)},complete:function(){this.handle&&(this.stop(),this.callback.call(this.context))}},Polymer.job=a}(),function(){var a=document.createElement("style");a.textContent="body {opacity: 0;}";var b=document.querySelector("head");b.insertBefore(a,b.firstChild),window.addEventListener("WebComponentsReady",function(){document.body.style.webkitTransition="opacity 0.3s",document.body.style.opacity=1})}();
+function PointerGestureEvent(a,b){var c=b||{},d=document.createEvent("Event"),e={bubbles:!0,cancelable:!0};return Object.keys(e).forEach(function(a){a in c&&(e[a]=c[a])}),d.initEvent(a,e.bubbles,e.cancelable),Object.keys(c).forEach(function(a){d[a]=b[a]}),d.preventTap=this.preventTap,d}if(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)}),b.shadow=(b.shadowdom||b.shadow||b.polyfill||!HTMLElement.prototype.webkitCreateShadowRoot)&&"polyfill",a.flags=b}(Platform),"polyfill"===Platform.flags.shadow){var SideTable;"undefined"!=typeof WeakMap&&navigator.userAgent.indexOf("Firefox/")<0?SideTable=WeakMap:function(){var a=Object.defineProperty,b=Object.hasOwnProperty,c=(new Date).getTime()%1e9;SideTable=function(){this.name="__st"+(1e9*Math.random()>>>0)+(c++ +"__")},SideTable.prototype={set:function(b,c){a(b,this.name,{value:c,writable:!0})},get:function(a){return b.call(a,this.name)?a[this.name]:void 0},"delete":function(a){this.set(a,void 0)}}}();var ShadowDOMPolyfill={};!function(a){"use strict";function b(a){if(!a)throw new Error("Assertion failed")}function c(a,b){return Object.getOwnPropertyNames(b).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))}),a}function d(a,b){return Object.getOwnPropertyNames(b).forEach(function(c){switch(c){case"arguments":case"caller":case"length":case"name":case"prototype":case"toString":return}Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))}),a}function e(a){var b=a.__proto__||Object.getPrototypeOf(a),c=z.get(b);if(c)return c;var d=e(b),f=n(d);return k(b,f,a),f}function f(a,b){i(a,b,!0)}function g(a,b){i(b,a,!1)}function h(a){return/^on[a-z]+$/.test(a)}function i(b,c,d){Object.getOwnPropertyNames(b).forEach(function(e){if(!(e in c)){B&&b.__lookupGetter__(e);var f;try{f=Object.getOwnPropertyDescriptor(b,e)}catch(g){f=C}var i,j;if(d&&"function"==typeof f.value)return c[e]=function(){return this.impl[e].apply(this.impl,arguments)},void 0;var k=h(e);i=k?a.getEventHandlerGetter(e):function(){return this.impl[e]},(f.writable||f.set)&&(j=k?a.getEventHandlerSetter(e):function(a){this.impl[e]=a}),Object.defineProperty(c,e,{get:i,set:j,configurable:f.configurable,enumerable:f.enumerable})}})}function j(a,b,c){var e=a.prototype;k(e,b,c),d(b,a)}function k(a,c,d){var e=c.prototype;b(void 0===z.get(a)),z.set(a,c),f(a,e),d&&g(e,d)}function l(a,b){return z.get(b.prototype)===a}function m(a){var b=Object.getPrototypeOf(a),c=e(b),d=n(c);return k(b,d,a),d}function n(a){function b(b){a.call(this,b)}return b.prototype=Object.create(a.prototype),b.prototype.constructor=b,b}function o(a){return a instanceof A.EventTarget||a instanceof A.Event||a instanceof A.DOMImplementation}function p(a){return a instanceof F||a instanceof E||a instanceof G||a instanceof D}function q(a){if(null===a)return null;b(p(a));var c=y.get(a);if(!c){var d=e(a);c=new d(a),y.set(a,c)}return c}function r(a){return null===a?null:(b(o(a)),a.impl)}function s(a){return a&&o(a)?r(a):a}function t(a){return a&&!o(a)?q(a):a}function u(a,c){null!==c&&(b(p(a)),b(void 0===c||o(c)),y.set(a,c))}function v(a,b,c){Object.defineProperty(a.prototype,b,{get:c,configurable:!0,enumerable:!0})}function w(a,b){v(a,b,function(){return q(this.impl[b])})}function x(a,b){a.forEach(function(a){b.forEach(function(b){a.prototype[b]=function(){var a=q(this);return a[b].apply(a,arguments)}})})}var y=new SideTable,z=new SideTable,A=Object.create(null);Object.getOwnPropertyNames(window);var B=/Firefox/.test(navigator.userAgent),C={get:function(){},set:function(){},configurable:!0,enumerable:!0},D=DOMImplementation,E=Event,F=Node,G=Window;a.assert=b,a.defineGetter=v,a.defineWrapGetter=w,a.forwardMethodsToWrapper=x,a.isWrapperFor=l,a.mixin=c,a.registerObject=m,a.registerWrapper=j,a.rewrap=u,a.unwrap=r,a.unwrapIfNeeded=s,a.wrap=q,a.wrapIfNeeded=t,a.wrappers=A}(this.ShadowDOMPolyfill),function(a){"use strict";function b(a){return a instanceof N.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)&&M(b)||null}function f(f,g,h){if(h.length)return h.shift();if(b(f))return j(f)||a.getHostForShadowRoot(f);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(d,e){for(var g=[];d;){for(var i=[],j=e,l=void 0;j;){var n=null;if(i.length){if(c(j)&&(n=h(i),k(l))){var o=i[i.length-1];i.push(o)}}else i.push(j);if(m(j,d))return i[i.length-1];b(j)&&i.pop(),l=j,j=f(j,n,g)}d=b(d)?a.getHostForShadowRoot(d):d.parentNode}}function j(b){return a.insertionParentTable.get(b)}function k(a){return j(a)}function l(a){for(var b;b=a.parentNode;)a=b;return a}function m(a,b){return l(a)===l(b)}function n(b,c){if(b===c)return!0;if(b instanceof N.ShadowRoot){var d=a.getHostForShadowRoot(b);return d?n(l(d),c):!1}return!1}function o(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 p(b){if(!P.get(b)){P.set(b,!0),o(b.type)||a.renderAllPending();var c=M(b.target),d=M(b);return q(d,c)}}function q(a,b){var c=g(b);return"load"===a.type&&2===c.length&&c[0].target instanceof N.Document&&c.shift(),X.set(a,c),r(a,c)&&s(a,c)&&t(a,c),T.set(a,w.NONE),R.set(a,null),a.defaultPrevented}function r(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=w.CAPTURING_PHASE,!u(b[d],a,c)))return!1}return!0}function s(a,b){var c=w.AT_TARGET;return u(b[0],a,c)}function t(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=w.AT_TARGET;else{if(!d||V.get(a))continue;c=w.BUBBLING_PHASE}if(!u(b[e],a,c))return}}function u(a,b,c){var d=a.target,e=a.currentTarget,f=O.get(e);if(!f)return!0;if("relatedTarget"in b){var g=L(b),h=M(g.relatedTarget),j=i(e,h);if(j===d)return!0;S.set(b,j)}T.set(b,c);var k=b.type,l=!1;Q.set(b,d),R.set(b,e);for(var m=0;m<f.length;m++){var n=f[m];if(n.removed)l=!0;else if(!(n.type!==k||!n.capture&&c===w.CAPTURING_PHASE||n.capture&&c===w.BUBBLING_PHASE))try{if("function"==typeof n.handler?n.handler.call(e,b):n.handler.handleEvent(b),V.get(b))return!1}catch(o){window.onerror?window.onerror(o.message):console.error(o)}}if(l){var p=f.slice();f.length=0;for(var m=0;m<p.length;m++)p[m].removed||f.push(p[m])}return!U.get(b)}function v(a,b,c){this.type=a,this.handler=b,this.capture=Boolean(c)}function w(a,b){return a instanceof Y?(this.impl=a,void 0):M(A(Y,"Event",a,b))}function x(a){return a&&a.relatedTarget?Object.create(a,{relatedTarget:{value:L(a.relatedTarget)}}):a}function y(a,b,c){var d=window[a],e=function(b,c){return b instanceof d?(this.impl=b,void 0):M(A(d,a,b,c))};return e.prototype=Object.create(b.prototype),c&&J(e.prototype,c),d&&(d.prototype["init"+a]?K(d,e,document.createEvent(a)):K(d,e,new d("temp"))),e}function z(a,b){return function(){arguments[b]=L(arguments[b]);var c=L(this);c[a].apply(c,arguments)}}function A(a,b,c,d){if(gb)return new a(c,x(d));var e=L(document.createEvent(b)),f=fb[b],g=[c];return Object.keys(f).forEach(function(a){var b=null!=d&&a in d?d[a]:f[a];"relatedTarget"===a&&(b=L(b)),g.push(b)}),e["init"+b].apply(e,g),e}function B(a){return"function"==typeof a?!0:a&&a.handleEvent}function C(a){this.impl=a}function D(b){return b instanceof N.ShadowRoot&&(b=a.getHostForShadowRoot(b)),L(b)}function E(a){I(a,jb)}function F(b,c,d,e){a.renderAllPending();for(var f=M(kb.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 G(a){return function(){var b=W.get(this);return b&&b[a]&&b[a].value||null}}function H(a){var b=a.slice(2);return function(c){var d=W.get(this);d||(d=Object.create(null),W.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 I=a.forwardMethodsToWrapper,J=a.mixin,K=a.registerWrapper,L=a.unwrap,M=a.wrap,N=a.wrappers;new SideTable;var O=new SideTable,P=new SideTable,Q=new SideTable,R=new SideTable,S=new SideTable,T=new SideTable,U=new SideTable,V=new SideTable,W=new SideTable,X=new SideTable;v.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 Y=window.Event;w.prototype={get target(){return Q.get(this)},get currentTarget(){return R.get(this)},get eventPhase(){return T.get(this)},get path(){var a=new N.NodeList,b=X.get(this);if(b){for(var c=0,d=b.length-1,e=l(R.get(this)),f=0;d>=f;f++){var g=b[f].currentTarget,h=l(g);n(e,h)&&(f!==d||g instanceof N.Node)&&(a[c++]=g)}a.length=c}return a},stopPropagation:function(){U.set(this,!0)},stopImmediatePropagation:function(){U.set(this,!0),V.set(this,!0)}},K(Y,w,document.createEvent("Event"));var Z=y("UIEvent",w),$=y("CustomEvent",w),_={get relatedTarget(){return S.get(this)||M(L(this).relatedTarget)}},ab=J({initMouseEvent:z("initMouseEvent",14)},_),bb=J({initFocusEvent:z("initFocusEvent",5)},_),cb=y("MouseEvent",Z,ab),db=y("FocusEvent",Z,bb),eb=y("MutationEvent",w,{initMutationEvent:z("initMutationEvent",3),get relatedNode(){return M(this.impl.relatedNode)}}),fb=Object.create(null),gb=function(){try{new window.MouseEvent("click")}catch(a){return!1}return!0}();if(!gb){var hb=function(a,b,c){if(c){var d=fb[c];b=J(J({},d),b)}fb[a]=b};hb("Event",{bubbles:!1,cancelable:!1}),hb("CustomEvent",{detail:null},"Event"),hb("UIEvent",{view:null,detail:0},"Event"),hb("MouseEvent",{screenX:0,screenY:0,clientX:0,clientY:0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null},"UIEvent"),hb("FocusEvent",{relatedTarget:null},"UIEvent")}var ib=window.EventTarget,jb=["addEventListener","removeEventListener","dispatchEvent"];[Node,Window].forEach(function(a){var b=a.prototype;jb.forEach(function(a){Object.defineProperty(b,a+"_",{value:b[a]})})}),C.prototype={addEventListener:function(a,b,c){if(B(b)){var d=new v(a,b,c),e=O.get(this);if(e){for(var f=0;f<e.length;f++)if(d.equals(e[f]))return}else e=[],O.set(this,e);e.push(d);var g=D(this);g.addEventListener_(a,p,!0)}},removeEventListener:function(a,b,c){c=Boolean(c);var d=O.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,p,!0)}}},dispatchEvent:function(a){var b=D(this);return b.dispatchEvent_(L(a))}},ib&&K(ib,C);var kb=document.elementFromPoint;a.adjustRelatedTarget=i,a.elementFromPoint=F,a.getEventHandlerGetter=G,a.getEventHandlerSetter=H,a.wrapEventTargetMethods=E,a.wrappers.CustomEvent=$,a.wrappers.Event=w,a.wrappers.EventTarget=C,a.wrappers.FocusEvent=db,a.wrappers.MouseEvent=cb,a.wrappers.MutationEvent=eb,a.wrappers.UIEvent=Z}(this.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}(this.ShadowDOMPolyfill),function(a){"use strict";function b(a){j(a instanceof f)}function c(a,b,c,d){if(a.nodeType!==f.DOCUMENT_FRAGMENT_NODE)return a.parentNode&&a.parentNode.removeChild(a),a.parentNode_=b,a.previousSibling_=c,a.nextSibling_=d,c&&(c.nextSibling_=a),d&&(d.previousSibling_=a),[a];for(var e,g=[];e=a.firstChild;)a.removeChild(e),g.push(e),e.parentNode_=b;for(var h=0;h<g.length;h++)g[h].previousSibling_=g[h-1]||c,g[h].nextSibling_=g[h+1]||d;return c&&(c.nextSibling_=g[0]),d&&(d.previousSibling_=g[g.length-1]),g}function d(a,b){var c=b.length;if(1===c)return m(b[0]);for(var d=m(a.ownerDocument.createDocumentFragment()),e=0;c>e;e++)d.appendChild(m(b[e]));return d}function e(a){for(var b=a.firstChild;b;){j(b.parentNode===a);var c=b.nextSibling,d=m(b),e=d.parentNode;e&&s.call(e,d),b.previousSibling_=b.nextSibling_=b.parentNode_=null,b=c}a.firstChild_=a.lastChild_=null}function f(a){j(a instanceof o),g.call(this,a),this.parentNode_=void 0,this.firstChild_=void 0,this.lastChild_=void 0,this.nextSibling_=void 0,this.previousSibling_=void 0}var g=a.wrappers.EventTarget,h=a.wrappers.NodeList,i=a.defineWrapGetter,j=a.assert,k=a.mixin,l=a.registerWrapper,m=a.unwrap,n=a.wrap,o=window.Node,p=o.prototype.appendChild,q=o.prototype.insertBefore,r=o.prototype.replaceChild,s=o.prototype.removeChild,t=o.prototype.compareDocumentPosition;f.prototype=Object.create(g.prototype),k(f.prototype,{appendChild:function(a){b(a),this.invalidateShadowRenderer();var e=this.lastChild,f=null,g=c(a,this,e,f);return this.lastChild_=g[g.length-1],e||(this.firstChild_=g[0]),p.call(this.impl,d(this,g)),a},insertBefore:function(a,e){if(!e)return this.appendChild(a);b(a),b(e),j(e.parentNode===this),this.invalidateShadowRenderer();var f=e.previousSibling,g=e,h=c(a,this,f,g);this.firstChild===e&&(this.firstChild_=h[0]);var i=m(e),k=i.parentNode;return k&&q.call(k,d(this,h),i),a},removeChild:function(a){if(b(a),a.parentNode!==this)throw new Error("NotFoundError");this.invalidateShadowRenderer();var c=this.firstChild,d=this.lastChild,e=a.nextSibling,f=a.previousSibling,g=m(a),h=g.parentNode;return h&&s.call(h,g),c===a&&(this.firstChild_=e),d===a&&(this.lastChild_=f),f&&(f.nextSibling_=e),e&&(e.previousSibling_=f),a.previousSibling_=a.nextSibling_=a.parentNode_=null,a},replaceChild:function(a,e){if(b(a),b(e),e.parentNode!==this)throw new Error("NotFoundError");this.invalidateShadowRenderer();var f=e.previousSibling,g=e.nextSibling;g===a&&(g=a.nextSibling);var h=c(a,this,f,g);this.firstChild===e&&(this.firstChild_=h[0]),this.lastChild===e&&(this.lastChild_=h[h.length-1]),e.previousSibling_=null,e.nextSibling_=null,e.parentNode_=null;var i=m(e);return i.parentNode&&r.call(i.parentNode,d(this,h),i),e},hasChildNodes:function(){return null===this.firstChild},get parentNode(){return void 0!==this.parentNode_?this.parentNode_:n(this.impl.parentNode)},get firstChild(){return void 0!==this.firstChild_?this.firstChild_:n(this.impl.firstChild)},get lastChild(){return void 0!==this.lastChild_?this.lastChild_:n(this.impl.lastChild)},get nextSibling(){return void 0!==this.nextSibling_?this.nextSibling_:n(this.impl.nextSibling)},get previousSibling(){return void 0!==this.previousSibling_?this.previousSibling_:n(this.impl.previousSibling)},get parentElement(){for(var a=this.parentNode;a&&a.nodeType!==f.ELEMENT_NODE;)a=a.parentNode;return a},get textContent(){for(var a="",b=this.firstChild;b;b=b.nextSibling)a+=b.textContent;return a},set textContent(a){if(e(this),this.invalidateShadowRenderer(),""!==a){var b=this.impl.ownerDocument.createTextNode(a);this.appendChild(b)}},get childNodes(){for(var a=new h,b=0,c=this.firstChild;c;c=c.nextSibling)a[b++]=c;return a.length=b,a},cloneNode:function(a){if(!this.invalidateShadowRenderer())return n(this.impl.cloneNode(a));var b=n(this.impl.cloneNode(!1));if(a)for(var c=this.firstChild;c;c=c.nextSibling)b.appendChild(c.cloneNode(!0));return b},contains:function(a){if(!a)return!1;if(a===this)return!0;var b=a.parentNode;return b?this.contains(b):!1},compareDocumentPosition:function(a){return t.call(this.impl,m(a))}}),i(f,"ownerDocument"),l(o,f,document.createDocumentFragment()),delete f.prototype.querySelector,delete f.prototype.querySelectorAll,f.prototype=k(Object.create(g.prototype),f.prototype),a.wrappers.Node=f}(this.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}(this.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}},f={get nextElementSibling(){return b(this.nextSibling)},get previousElementSibling(){return c(this.nextSibling)}};a.ChildNodeInterface=f,a.ParentNodeInterface=e}(this.ShadowDOMPolyfill),function(a){"use strict";function b(a){d.call(this,a)}var c=a.ChildNodeInterface,d=a.wrappers.Node,e=a.mixin,f=a.registerWrapper,g=window.CharacterData;b.prototype=Object.create(d.prototype),e(b.prototype,{get textContent(){return this.data},set textContent(a){this.data=a}}),e(b.prototype,c),f(g,b,document.createTextNode("")),a.wrappers.CharacterData=b}(this.ShadowDOMPolyfill),function(a){"use strict";function b(a){e.call(this,a)}var c=a.ChildNodeInterface,d=a.GetElementsByInterface,e=a.wrappers.Node,f=a.ParentNodeInterface,g=a.SelectorsInterface;a.addWrapNodeListMethod;var h=a.mixin,i=a.registerWrapper,j=a.wrappers,k=new SideTable,l=window.Element,m=l.prototype.matches||l.prototype.mozMatchesSelector||l.prototype.msMatchesSelector||l.prototype.webkitMatchesSelector;b.prototype=Object.create(e.prototype),h(b.prototype,{createShadowRoot:function(){var b=new j.ShadowRoot(this);return k.set(this,b),a.getRendererForHost(this),this.invalidateShadowRenderer(!0),b},get shadowRoot(){return k.get(this)||null},setAttribute:function(a,b){this.impl.setAttribute(a,b),this.invalidateShadowRenderer()},matches:function(a){return m.call(this.impl,a)}}),l.prototype.webkitCreateShadowRoot&&(b.prototype.webkitCreateShadowRoot=b.prototype.createShadowRoot),h(b.prototype,c),h(b.prototype,d),h(b.prototype,f),h(b.prototype,g),i(l,b),a.wrappers.Element=b}(this.ShadowDOMPolyfill),function(a){"use strict";function b(a){switch(a){case"&":return"&amp;";case"<":return"&lt;";case'"':return"&quot;"}}function c(a){return a.replace(p,b)}function d(a){switch(a.nodeType){case Node.ELEMENT_NODE:for(var b,d=a.tagName.toLowerCase(),f="<"+d,g=a.attributes,h=0;b=g[h];h++)f+=" "+b.name+'="'+c(b.value)+'"';return f+=">",q[d]?f:f+e(a)+"</"+d+">";case Node.TEXT_NODE:return c(a.nodeValue);case Node.COMMENT_NODE:return"<!--"+c(a.nodeValue)+"-->";default:throw console.error(a),new Error("not implemented")}}function e(a){for(var b="",c=a.firstChild;c;c=c.nextSibling)b+=d(c);return b}function f(a,b,c){var d=c||"div";a.textContent="";var e=n(a.ownerDocument.createElement(d));e.innerHTML=b;for(var f;f=e.firstChild;)a.appendChild(o(f))}function g(a){j.call(this,a)}function h(b){k(g,b,function(){return a.renderAllPending(),this.impl[b]})}function i(b){Object.defineProperty(g.prototype,b,{value:function(){return a.renderAllPending(),this.impl[b].apply(this.impl,arguments)},configurable:!0,enumerable:!0})}var j=a.wrappers.Element,k=a.defineGetter,l=a.mixin,m=a.registerWrapper,n=a.unwrap,o=a.wrap,p=/&|<|"/g,q={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},r=window.HTMLElement;g.prototype=Object.create(j.prototype),l(g.prototype,{get innerHTML(){return e(this)},set innerHTML(a){f(this,a,this.tagName)},get outerHTML(){return d(this)},set outerHTML(a){if(this.invalidateShadowRenderer())throw new Error("not implemented");this.impl.outerHTML=a}}),["clientHeight","clientLeft","clientTop","clientWidth","offsetHeight","offsetLeft","offsetTop","offsetWidth","scrollHeight","scrollLeft","scrollTop","scrollWidth"].forEach(h),["getBoundingClientRect","getClientRects","scrollIntoView"].forEach(i),m(r,g,document.createElement("b")),a.wrappers.HTMLElement=g,a.getInnerHTML=e,a.setInnerHTML=f}(this.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}(this.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a),this.olderShadowRoot_=null}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=window.HTMLShadowElement;b.prototype=Object.create(c.prototype),d(b.prototype,{get olderShadowRoot(){return this.olderShadowRoot_},invalidateShadowRenderer:function(){c.prototype.invalidateShadowRenderer.call(this,!0)}}),f&&e(f,b),a.wrappers.HTMLShadowElement=b}(this.ShadowDOMPolyfill),function(a){"use strict";function b(a){if(!a.defaultView)return a;var b=l.get(a);if(!b){for(b=a.implementation.createHTMLDocument("");b.lastChild;)b.removeChild(b.lastChild);l.set(a,b)}return b}function c(a){for(var c,d=b(a.ownerDocument),e=d.createDocumentFragment();c=a.firstChild;)e.appendChild(c);return e}function d(a){e.call(this,a)}var e=a.wrappers.HTMLElement,f=a.getInnerHTML,g=a.mixin,h=a.registerWrapper,i=a.setInnerHTML,j=a.wrap,k=new SideTable,l=new SideTable,m=window.HTMLTemplateElement;d.prototype=Object.create(e.prototype),g(d.prototype,{get content(){if(m)return j(this.impl.content);var a=k.get(this);return a||(a=c(this),k.set(this,a)),a},get innerHTML(){return f(this.content)},set innerHTML(a){i(this.content,a),this.invalidateShadowRenderer()}}),m&&h(m,d),a.wrappers.HTMLTemplateElement=d}(this.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;a.mixin;var g=a.registerWrapper,h=window.HTMLUnknownElement;b.prototype=Object.create(d.prototype),g(h,b),a.wrappers.HTMLUnknownElement=b}(this.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());e(g.prototype,c),e(g.prototype,d),e(g.prototype,b);var h=f(document.createTextNode("")),i=f(document.createComment(""));a.wrappers.Comment=i,a.wrappers.DocumentFragment=g,a.wrappers.Text=h}(this.ShadowDOMPolyfill),function(a){"use strict";function b(b){var d=i(b.impl.ownerDocument.createDocumentFragment());c.call(this,d),g(d,this);var e=b.shadowRoot;a.nextOlderShadowTreeTable.set(this,e),j.set(this,b)}var c=a.wrappers.DocumentFragment,d=a.elementFromPoint,e=a.getInnerHTML,f=a.mixin,g=a.rewrap,h=a.setInnerHTML,i=a.unwrap,j=new SideTable;b.prototype=Object.create(c.prototype),f(b.prototype,{get innerHTML(){return e(this)},set innerHTML(a){h(this,a),this.invalidateShadowRenderer()},invalidateShadowRenderer:function(){return j.get(this).invalidateShadowRenderer()},elementFromPoint:function(a,b){return d(this,this.ownerDocument,a,b)},getElementById:function(a){return this.querySelector("#"+a)}}),a.wrappers.ShadowRoot=b,a.getHostForShadowRoot=function(a){return j.get(a)}}(this.ShadowDOMPolyfill),function(a){"use strict";function b(a){a.previousSibling_=a.previousSibling,a.nextSibling_=a.nextSibling,a.parentNode_=a.parentNode}function c(a){a.firstChild_=a.firstChild,a.lastChild_=a.lastChild}function d(a){E(a instanceof D);for(var d=a.firstChild;d;d=d.nextSibling)b(d);c(a)}function e(a){var b=G(a);d(a),b.textContent=""}function f(a,c){var e=G(a),f=G(c);f.nodeType===D.DOCUMENT_FRAGMENT_NODE?d(c):(h(c),b(c)),a.lastChild_=a.lastChild,a.lastChild===a.firstChild&&(a.firstChild_=a.firstChild);var g=H(e.lastChild);g&&(g.nextSibling_=g.nextSibling),e.appendChild(f)}function g(a,c){var d=G(a),e=G(c);b(c),c.previousSibling&&(c.previousSibling.nextSibling_=c),c.nextSibling&&(c.nextSibling.previousSibling_=c),a.lastChild===c&&(a.lastChild_=c),a.firstChild===c&&(a.firstChild_=c),d.removeChild(e)}function h(a){var b=G(a),c=b.parentNode;c&&g(H(c),a)}function i(a,b){k(b).push(a),A(a,b);var c=J.get(a);c||J.set(a,c=[]),c.push(b)}function j(a){I.set(a,[])}function k(a){return I.get(a)}function l(a){for(var b=[],c=0,d=a.firstChild;d;d=d.nextSibling)b[c++]=d;return b}function m(a,b,c){for(var d=l(a),e=0;e<d.length;e++){var f=d[e];if(b(f)){if(c(f)===!1)return}else m(f,b,c)}}function n(a,b){var c=!1;return m(a,u,function(a){j(a);for(var d=0;d<b.length;d++){var e=b[d];void 0!==e&&p(e,a)&&(i(e,a),b[d]=void 0,c=!0)}}),c?b.filter(function(a){return void 0!==a}):b}function o(a,b){for(var c=0;c<b.length;c++)if(b[c]in a)return b[c]}function p(a,b){var c=b.getAttribute("select");if(!c)return!0;if(c=c.trim(),!c)return!0;if(a.nodeType!==D.ELEMENT_NODE)return!1;if(!O.test(c))return!1;if(":"===c[0]&&!P.test(c))return!1;try{return a.matches(c)}catch(d){return!1}}function q(){F=null,R.forEach(function(a){a.render()}),R=[]}function r(a){this.host=a,this.dirty=!1,this.associateNode(a)}function s(a){var b=M.get(a);return b||(b=new r(a),M.set(a,b)),b}function t(a){return"content"===a.localName}function u(a){return"content"===a.localName}function v(a){return"shadow"===a.localName}function w(a){return"shadow"===a.localName}function x(a){return!!a.shadowRoot}function y(a){return L.get(a)}function z(a){for(var b=[],c=a.shadowRoot;c;c=L.get(c))b.push(c);return b}function A(a,b){K.set(a,b)}function B(a){new r(a).render()}var C=a.wrappers.HTMLContentElement,D=a.wrappers.Node,E=a.assert;a.mixin;var F,G=a.unwrap,H=a.wrap,I=new SideTable,J=new SideTable,K=new SideTable,L=new SideTable,M=new SideTable,N=new SideTable,O=/^[*.:#[a-zA-Z_|]/,P=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("|")+")"),Q=o(window,["requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","setTimeout"]),R=[];r.prototype={render:function(){if(this.dirty){var a=this.host;this.treeComposition();var b=a.shadowRoot;if(b){this.removeAllChildNodes(this.host);var c=l(b);c.forEach(function(c){this.renderNode(a,b,c,!1)},this),this.dirty=!1}}},invalidate:function(){if(!this.dirty){if(this.dirty=!0,R.push(this),F)return;F=window[Q](q,0)}},renderNode:function(a,b,c,d){if(x(c)){this.appendChild(a,c);var e=s(c);e.dirty=!0,e.render()}else t(c)?this.renderInsertionPoint(a,b,c,d):v(c)?this.renderShadowInsertionPoint(a,b,c):this.renderAsAnyDomTree(a,b,c,d)},renderAsAnyDomTree:function(a,b,c,d){if(this.appendChild(a,c),x(c))B(c);else{var e=c,f=l(e);f.forEach(function(a){this.renderNode(e,b,a,d)},this)}},renderInsertionPoint:function(a,b,c,d){var e=k(c);e.length?(this.removeAllChildNodes(c),e.forEach(function(c){t(c)&&d?this.renderInsertionPoint(a,b,c,d):this.renderAsAnyDomTree(a,b,c,d)},this)):this.renderFallbackContent(a,c),this.remove(c)},renderShadowInsertionPoint:function(a,b,c){var d=y(b);if(d){A(d,c),c.olderShadowRoot_=d,this.remove(c);var e=l(d);e.forEach(function(b){this.renderNode(a,d,b,!0)},this)}else this.renderFallbackContent(a,c)},renderFallbackContent:function(a,b){var c=l(b);c.forEach(function(b){this.appendChild(a,b)},this)},treeComposition:function(){var a=this.host,b=a.shadowRoot,c=[],d=l(a);d.forEach(function(a){if(t(a)){var b=k(a);b&&b.length||(b=l(a)),c.push.apply(c,b)}else c.push(a)});for(var e,f;b;){if(e=void 0,m(b,w,function(a){return e=a,!1}),f=e,c=n(b,c),f){var g=y(b);if(g){b=g,A(b,f);continue}break}break}},appendChild:function(a,b){f(a,b),this.associateNode(b)},remove:function(a){h(a),this.associateNode(a)},removeAllChildNodes:function(a){e(a)},associateNode:function(a){N.set(a,this)}},D.prototype.invalidateShadowRenderer=function(a){var b=N.get(this);if(!b)return!1;var c;return(a||this.shadowRoot||(c=this.parentNode)&&(c.shadowRoot||c instanceof ShadowRoot))&&b.invalidate(),!0},C.prototype.getDistributedNodes=function(){return q(),k(this)},a.eventParentsTable=J,a.getRendererForHost=s,a.getShadowTrees=z,a.nextOlderShadowTreeTable=L,a.renderAllPending=q,a.insertionParentTable=K,a.visual={removeAllChildNodes:e,appendChild:f,removeChild:g}}(this.ShadowDOMPolyfill),function(a){"use strict";function b(a){j.call(this,a)}function c(a){var c=document[a];b.prototype[a]=function(){return t(c.apply(this.impl,arguments))}}function d(a,b){a.shadowRoot&&b.adoptNode(a.shadowRoot),a instanceof m&&e(a,b);for(var c=a.firstChild;c;c=c.nextSibling)d(c,b)}function e(b,c){var d=a.nextOlderShadowTreeTable.get(b);d&&c.adoptNode(d)}function f(a){this.impl=a}function g(a,b){var c=document.implementation[b];a.prototype[b]=function(){return t(c.apply(this.impl,arguments))}}function h(a,b){var c=document.implementation[b];a.prototype[b]=function(){return c.apply(this.impl,arguments)}}var i=a.GetElementsByInterface,j=a.wrappers.Node,k=a.ParentNodeInterface,l=a.SelectorsInterface,m=a.wrappers.ShadowRoot,n=a.defineWrapGetter,o=a.elementFromPoint,p=a.forwardMethodsToWrapper,q=a.mixin,r=a.registerWrapper,s=a.unwrap,t=a.wrap,u=a.wrapEventTargetMethods;a.wrapNodeList;var v=new SideTable;b.prototype=Object.create(j.prototype),n(b,"documentElement"),n(b,"body"),n(b,"head"),["getElementById","createElement","createElementNS","createTextNode","createDocumentFragment","createEvent","createEventNS"].forEach(c);var w=document.adoptNode,x=document.write;q(b.prototype,{adoptNode:function(a){return a.parentNode&&a.parentNode.removeChild(a),w.call(this.impl,s(a)),d(a,this),a},elementFromPoint:function(a,b){return o(this,this,a,b)},write:function(a){for(var b=this.querySelectorAll("*"),c=b[b.length-1];c.nextSibling;)c=c.nextSibling;var d=c.parentNode;d.lastChild_=void 0,c.nextSibling_=void 0,x.call(this.impl,a)}}),p([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement],["appendChild","compareDocumentPosition","getElementsByClassName","getElementsByTagName","getElementsByTagNameNS","insertBefore","querySelector","querySelectorAll","removeChild","replaceChild"]),p([window.HTMLDocument||window.Document],["adoptNode","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createTextNode","elementFromPoint","getElementById","write"]),q(b.prototype,i),q(b.prototype,k),q(b.prototype,l),q(b.prototype,{get implementation(){var a=v.get(this);return a?a:(a=new f(s(this).implementation),v.set(this,a),a)}}),r(window.Document,b,document.implementation.createHTMLDocument("")),window.HTMLDocument&&r(window.HTMLDocument,b),u([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement]),g(f,"createDocumentType"),g(f,"createDocument"),g(f,"createHTMLDocument"),h(f,"hasFeature"),r(window.DOMImplementation,f),p([window.DOMImplementation],["createDocumentType","createDocument","createHTMLDocument","hasFeature"]),a.wrappers.Document=b,a.wrappers.DOMImplementation=f
+}(this.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.unwrap,g=a.unwrapIfNeeded,h=a.wrap,i=window.Window;b.prototype=Object.create(c.prototype);var j=window.getComputedStyle;i.prototype.getComputedStyle=function(a,b){return j.call(this||window,g(a),b)},["addEventListener","removeEventListener","dispatchEvent"].forEach(function(a){i.prototype[a]=function(){var b=h(this||window);return b[a].apply(b,arguments)}}),d(b.prototype,{getComputedStyle:function(a,b){return j.call(f(this),g(a),b)}}),e(i,b),a.wrappers.Window=b}(this.ShadowDOMPolyfill),function(a){"use strict";function b(a){this.impl=a}function c(a){return new b(a)}function d(a){return a.map(c)}function e(a){var b=this;this.impl=new k(function(c){a.call(b,d(c),b)})}var f=a.defineGetter,g=a.defineWrapGetter,h=a.registerWrapper,i=a.unwrapIfNeeded,j=a.wrapNodeList;a.wrappers;var k=window.MutationObserver||window.WebKitMutationObserver;if(k){var l=window.MutationRecord;b.prototype={get addedNodes(){return j(this.impl.addedNodes)},get removedNodes(){return j(this.impl.removedNodes)}},["target","previousSibling","nextSibling"].forEach(function(a){g(b,a)}),["type","attributeName","attributeNamespace","oldValue"].forEach(function(a){f(b,a,function(){return this.impl[a]})}),l&&h(l,b),window.Node,e.prototype={observe:function(a,b){this.impl.observe(i(a),b)},disconnect:function(){this.impl.disconnect()},takeRecords:function(){return d(this.impl.takeRecords())}},a.wrappers.MutationObserver=e,a.wrappers.MutationRecord=b}}(this.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}}a.isWrapperFor;var c={a:"HTMLAnchorElement",applet:"HTMLAppletElement",area:"HTMLAreaElement",audio:"HTMLAudioElement",br:"HTMLBRElement",base:"HTMLBaseElement",body:"HTMLBodyElement",button:"HTMLButtonElement",canvas:"HTMLCanvasElement",dl:"HTMLDListElement",datalist:"HTMLDataListElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",embed:"HTMLEmbedElement",fieldset:"HTMLFieldSetElement",font:"HTMLFontElement",form:"HTMLFormElement",frame:"HTMLFrameElement",frameset:"HTMLFrameSetElement",hr:"HTMLHRElement",head:"HTMLHeadElement",h1:"HTMLHeadingElement",html:"HTMLHtmlElement",iframe:"HTMLIFrameElement",input:"HTMLInputElement",li:"HTMLLIElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",link:"HTMLLinkElement",map:"HTMLMapElement",menu:"HTMLMenuElement",menuitem:"HTMLMenuItemElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",del:"HTMLModElement",ol:"HTMLOListElement",object:"HTMLObjectElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",script:"HTMLScriptElement",select:"HTMLSelectElement",source:"HTMLSourceElement",span:"HTMLSpanElement",style:"HTMLStyleElement",caption:"HTMLTableCaptionElement",col:"HTMLTableColElement",table:"HTMLTableElement",tr:"HTMLTableRowElement",thead:"HTMLTableSectionElement",tbody:"HTMLTableSectionElement",textarea:"HTMLTextAreaElement",title:"HTMLTitleElement",ul:"HTMLUListElement",video:"HTMLVideoElement"};Object.keys(c).forEach(b),Object.getOwnPropertyNames(a.wrappers).forEach(function(b){window[b]=a.wrappers[b]}),a.knownElements=c}(this.ShadowDOMPolyfill),function(){window.wrap=function(a){return a.impl?a:ShadowDOMPolyfill.wrap(a)},window.unwrap=function(a){return a.impl?ShadowDOMPolyfill.unwrap(a):a};var a=window.getComputedStyle;window.getComputedStyle=function(b,c){return a.call(window,wrap(b),c)},Object.defineProperties(HTMLElement.prototype,{webkitShadowRoot:{get:function(){return this.shadowRoot}}}),HTMLElement.prototype.webkitCreateShadowRoot=HTMLElement.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(m,"")),c}function c(a){var b=document.createElement("style");b.textContent=a,document.head.appendChild(b);var c=b.sheet.cssRules;return b.parentNode.removeChild(b),c}function d(a){for(var b=0,c=[];b<a.length;b++)c.push(a[b].cssText);return c.join("\n\n")}function e(a){a&&f().appendChild(document.createTextNode(a))}function f(){return g||(g=document.createElement("style"),g.setAttribute("ShadowCSSShim","")),g}var g,h={strictStyling:!1,registry:{},shimStyling:function(a,b,c){if(a){var d=this.registerDefinition(a,b,c);this.strictStyling&&this.applyScopeToContent(a,b),this.shimPolyfillDirectives(d.rootStyles,b),this.applyShimming(d.scopeStyles,b)}},shimShadowDOMStyling:function(a,b){this.shimPolyfillDirectives(a,b),this.applyShimming(a,b)},registerDefinition:function(a,b,c){var d=this.registry[b]={root:a,name:b,extendsName:c},e=a.querySelectorAll("style");e=e?Array.prototype.slice.call(e,0):[],d.rootStyles=e,d.scopeStyles=d.rootStyles;var f=this.registry[d.extendsName];return f&&(d.scopeStyles=d.scopeStyles.concat(f.scopeStyles)),d},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))},shimPolyfillDirectives:function(a,b){a&&Array.prototype.forEach.call(a,function(a){a.textContent=this.convertPolyfillDirectives(a.textContent,b)},this)},convertPolyfillDirectives:function(a,b){for(var c,d,e="",f=0;c=n.exec(a);)e+=a.substring(f,c.index),d=c[1].slice(0,-2).replace(q,b),e+=this.scopeSelector(d,b)+"{",f=n.lastIndex;return e+=a.substring(f,a.length)},applyShimming:function(a,b){var c=this.shimAtHost(a,b);c+=this.shimScoping(a,b),e(c)},shimAtHost:function(a,b){return a?this.convertAtHostStyles(a,b):void 0},convertAtHostStyles:function(a,e){for(var f,g=b(a),h="",j=0;f=i.exec(g);)h+=g.substring(j,f.index),h+=this.scopeHostCss(f[1],e),j=i.lastIndex;h+=g.substring(j,g.length);var k=new RegExp("^"+e+p,"m"),g=d(this.findAtHostRules(c(h),k));return g},scopeHostCss:function(a,b){for(var c,d="";c=j.exec(a);)d+=this.scopeHostSelector(c[1],b)+" "+c[2]+"\n ";return d},scopeHostSelector:function(a,b){var c=[],d=a.split(","),e="[is="+b+"]";return d.forEach(function(a){a=a.trim(),a.match(k)?a=a.replace(k,b+"$1$3, "+e+"$1$3"):a.match(l)&&(a=b+a+", "+e+a),c.push(a)},this),c.join(", ")},findAtHostRules:function(a,b){return Array.prototype.filter.call(a,this.isHostRule.bind(this,b))},isHostRule:function(a,b){return b.selectorText&&b.selectorText.match(a)||b.cssRules&&this.findAtHostRules(b.cssRules,a).length||b.type==CSSRule.WEBKIT_KEYFRAMES_RULE},shimScoping:function(a,b){return a?this.convertScopedStyles(a,b):void 0},convertScopedStyles:function(a,d){Array.prototype.forEach.call(a,function(a){a.parentNode&&a.parentNode.removeChild(a)});var e=b(a).replace(i,"");e=this.convertPseudos(e);var f=c(e);return e=this.scopeRules(f,d)},convertPseudos:function(a){return a.replace(o," [pseudo=$1]")},scopeRules:function(a,b){var c="";return 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.media?(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?this.applyStrictSelectorScope(a,b):this.applySimpleSelectorScope(a,b)),d.push(a)},this),d.join(", ")},selectorNeedsScoping:function(a,b){var c="("+b+"|\\[is="+b+"\\])",d=new RegExp("^"+c+p,"m");return!a.match(d)},applySimpleSelectorScope:function(a,b){return b+" "+a+", "+"[is="+b+"] "+a},applyStrictSelectorScope:function(a,b){var c=[" ",">","+","~"],d=a,e="["+b+"]";return c.forEach(function(a){var b=d.split(a);d=b.map(function(a){var b=a.trim();return b&&c.indexOf(b)<0&&b.indexOf(e)<0&&(a=b.replace(/([^:]*)(:*)(.*)/,"$1"+e+"$2$3")),a}).join(a)}),d},propertiesFromRule:function(a){var b=a.style.cssText;return a.style.content&&!a.style.content.match(/['"]+/)&&(b="content: '"+a.style.content+"';\n"+a.style.cssText.replace(/content:[^;]*;/g,"")),b}},i=/@host[^{]*{(([^}]*?{[^{]*?}[\s\S]*?)+)}/gim,j=/([^{]*)({[\s\S]*?})/gim,k=/(.*)((?:\*)|(?:\:scope))(.*)/,l=/^[.\[:]/,m=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,n=/\/\*\s*@polyfill ([^*]*\*+([^/*][^*]*\*+)*\/)([^{]*?){/gim,o=/::(x-[^\s{,(]*)/gim,p="([>\\s~+[.,{:][\\s\\S]*)?$",q=/@host/gim;if(window.ShadowDOMPolyfill){e("style { display: none !important; }\n");var r=document.querySelector("head");r.insertBefore(f(),r.childNodes[0])}a.ShadowCSS=h}(window.Platform)}else{var SideTable;"undefined"!=typeof WeakMap&&navigator.userAgent.indexOf("Firefox/")<0?SideTable=WeakMap:function(){var a=Object.defineProperty,b=Object.hasOwnProperty,c=(new Date).getTime()%1e9;SideTable=function(){this.name="__st"+(1e9*Math.random()>>>0)+(c++ +"__")},SideTable.prototype={set:function(b,c){a(b,this.name,{value:c,writable:!0})},get:function(a){return b.call(a,this.name)?a[this.name]:void 0},"delete":function(a){this.set(a,void 0)}}}(),function(){window.templateContent=window.templateContent||function(a){return a.content},window.wrap=window.unwrap=function(a){return a},Object.defineProperties(HTMLElement.prototype,{shadowRoot:{get:function(){return this.webkitShadowRoot}},createShadowRoot:{value:function(){return this.webkitCreateShadowRoot()}}}),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}}()}if(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||{};NodeList.prototype.array=e,f.prototype.array=e,HTMLCollection.prototype.array=e;var g=function(a,b){e.call(this).forEach(a,b)};if(NodeList.prototype.forEach=g,f.prototype.forEach=g,HTMLCollection.prototype.forEach=g,!window.performance){var h=Date.now();window.performance={now:function(){return Date.now()-h}}}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)}}()),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+"&nbsp;&nbsp;";g(b,function(a){f+=j(a,a.childNodes,h)}),f+=d,{br:1}[e]||(f+="<tag>&lt;/"+e+"&gt;</tag>",f+="<br/>")}else{var k=a.textContent.trim();f=k?d+'"'+k+'"'+"<br/>":""}return f},k=[],l=function(a){var b="<tag>&lt;",c=a.localName||"shadow-root";return a.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+="&gt;</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(a){"use strict";function b(){function a(a){"splice"===a[0].type&&"splice"===a[1].type&&(b=!0)}if("function"!=typeof Object.observe||"function"!=typeof Array.observe)return!1;var b=!1,c=[0];return Array.observe(c,a),c[1]=1,c.length=0,Object.deliverChangeRecords(a),b}function c(a){return+a===a>>>0}function d(a){return+a}function e(a){return a===Object(a)}function f(a,b){return a===b?0!==a||1/a===1/b:K(a)&&K(b)?!0:a!==a&&b!==b}function g(a){return"string"!=typeof a?!1:(a=a.replace(/\s/g,""),""==a?!0:"."==a[0]?!1:S.test(a))}function h(a){var b=T[a];if(b)return b;if(g(a)){var b=new i(a);return T[a]=b,b}}function i(a){return""==a.trim()?this:c(a)?(this.push(String(a)),this):(a.split(/\./).filter(function(a){return a}).forEach(function(a){this.push(a)},this),H&&this.length&&(this.getValueFrom=this.compiledGetValueFromFn()),void 0)}function j(a){for(var b=0;U>b&&a.check();)a.report(),b++}function k(a){for(var b in a)return!1;return!0}function l(a){return k(a.added)&&k(a.removed)&&k(a.changed)}function m(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 n(a,b){var c=b||(Array.isArray(a)?[]:{});for(var d in a)c[d]=a[d];return Array.isArray(a)&&(c.length=a.length),c}function o(a,b,c,d){this.object=a,this.callback=b,this.target=c,this.token=d,this.reporting=!0,G&&(this.boundInternalCallback=this.internalCallback.bind(this)),this.valid=!0,p(this),this.connect(),this.sync(!0)}function p(a){W&&(V.push(a),o._allObserversCount++)}function q(a,b,c,d){o.call(this,a,b,c,d)}function r(a,b,c,d){if(!Array.isArray(a))throw Error("Provided object is not an Array");o.call(this,a,b,c,d)}function s(a){this.arr=[],this.callback=a,this.isObserved=!0}function t(a,b,c,d,f){this.value=void 0;var g=h(b);return g?g.length?(e(a)&&(this.path=g,o.call(this,a,c,d,f)),void 0):(this.value=a,void 0):void 0}function u(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 v(a,b,c){for(var d={},e={},f=0;f<b.length;f++){var g=b[f];_[g.type]?(g.name in c||(c[g.name]=g.oldValue),"updated"!=g.type&&("new"!=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 w(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(d[e+j-1]===a[b+k-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}function x(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(ab):(e.push(bb),d=g),b--,c--):f==h?(e.push(db),b--,d=h):(e.push(cb),c--,d=i)}else e.push(db),b--;else e.push(cb),c--;return e.reverse(),e}function y(a,b,c){for(var d=0;c>d;d++)if(a[d]!==b[d])return d;return c}function z(a,b,c){for(var d=a.length,e=b.length,f=0;c>f&&a[--d]===b[--e];)f++;return f}function A(a,b,c){return{index:a,removed:b,addedCount:c}}function B(a,b,c,d,e,f){var g=0,h=0,i=Math.min(c-b,f-e);if(0==b&&0==e&&(g=y(a,d,i)),c==a.length&&f==d.length&&(h=z(a,d,i-g)),b+=g,e+=g,c-=h,f-=h,0==c-b&&0==f-e)return[];if(b==c){for(var j=A(b,[],0);f>e;)j.removed.push(d[e++]);return[j]}if(e==f)return[A(b,[],c-b)];for(var k=x(w(a,b,c,d,e,f)),j=void 0,l=[],m=b,n=e,o=0;o<k.length;o++)switch(k[o]){case ab:j&&(l.push(j),j=void 0),m++,n++;break;case bb:j||(j=A(m,[],0)),j.addedCount++,m++,j.removed.push(d[n]),n++;break;case cb:j||(j=A(m,[],0)),j.addedCount++,m++;break;case db:j||(j=A(m,[],0)),j.removed.push(d[n]),n++}return j&&l.push(j),l}function C(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 D(a,b,c,d){for(var e=A(b,c,d),f=!1,g=0,h=0;h<a.length;h++){var i=a[h];if(i.index+=g,!f){var j=C(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 E(a,b){for(var e=[],f=0;f<b.length;f++){var g=b[f];switch(g.type){case"splice":D(e,g.index,g.removed.slice(),g.addedCount);break;case"new":case"updated":case"deleted":if(!c(g.name))continue;var h=d(g.name);if(0>h)continue;D(e,h,[g.oldValue],1);break;default:console.error("Unexpected record type: "+JSON.stringify(g))}}return e}function F(a,b){var c=[];return E(a,b).forEach(function(b){return 1==b.addedCount&&1==b.removed.length?(b.removed[0]!==a[b.index]&&c.push(b),void 0):(c=c.concat(B(a,b.index,b.index+b.addedCount,b.removed,0,b.removed.length)),void 0)}),c}var G=b(),H=!1;try{var I=new Function("","return true;");H=I()}catch(J){}var K=a.Number.isNaN||function(b){return"number"==typeof b&&a.isNaN(b)},L="__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},M="[$_a-zA-Z]",N="[$_a-zA-Z0-9]",O=M+"+"+N+"*",P="(?:[0-9]|[1-9]+[0-9]+)",Q="(?:"+O+"|"+P+")",R="(?:"+Q+")(?:\\."+Q+")*",S=new RegExp("^"+R+"$"),T={};i.prototype=L({__proto__:[],toString:function(){return this.join(".")},getValueFrom:function(a){for(var b=0;b<this.length;b++){if(void 0===a||null===a)return;a=a[this[b]]}return a},getValueFromObserved:function(a,b){b.reset();for(var c=0;c<this.length;c++){if(void 0===a||null===a)return b.cleanup(),void 0;b.observe(a),a=a[this[c]]}return a},compiledGetValueFromFn:function(){var a=this.map(function(a){return c(a)?'["'+a+'"]':"."+a}),b="",d="obj";b+="if (obj !== null && obj !== undefined";for(var e=0;e<this.length-1;e++)this[e],d+=a[e],b+=" &&\n "+d+" !== null && "+d+" !== undefined";return b+=")\n",d+=a[e],b+=" return "+d+";\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(void 0===a||null===a)return!1;a=a[this[c]]}return void 0===a||null===a?!1:(a[this[this.length-1]]=b,!0)}});var U=1e3;o.prototype={valid:!1,internalCallback:function(a){this.valid&&this.reporting&&this.check(a)&&(this.report(),this.testingResults&&(this.testingResults.anyChanged=!0))},close:function(){this.valid&&("function"==typeof this.object.unobserved&&this.object.unobserved(),this.disconnect(),this.object=void 0,this.valid=!1)},deliver:function(a){this.valid&&(G?(this.testingResults=a,Object.deliverChangeRecords(this.boundInternalCallback),this.testingResults=void 0):j(this))},report:function(){if(this.reporting){this.sync(!1),this.reportArgs.push(this.token);try{this.callback.apply(this.target,this.reportArgs)}catch(a){o._errorThrownDuringCallback=!0,console.error("Exception caught during observer callback: "+a)}this.reportArgs=void 0}},reset:function(){this.valid&&(G&&(this.reporting=!1,Object.deliverChangeRecords(this.boundInternalCallback),this.reporting=!0),this.sync(!0))}};var V,W=!G||a.forceCollectObservers;o._allObserversCount=0,W&&(V=[]);var X=!1,Y="function"==typeof Object.deliverAllChangeRecords;a.Platform=a.Platform||{},a.Platform.performMicrotaskCheckpoint=function(){if(!X){if(Y)return Object.deliverAllChangeRecords(),void 0;if(W){X=!0;var a=0,b={};do{a++;var c=V;V=[],b.anyChanged=!1;for(var d=0;d<c.length;d++){var e=c[d];e.valid&&(G?e.deliver(b):e.check()&&(b.anyChanged=!0,e.report()),V.push(e))}}while(U>a&&b.anyChanged);o._allObserversCount=V.length,X=!1}}},W&&(a.Platform.clearObservers=function(){V=[]}),q.prototype=L({__proto__:o.prototype,connect:function(){G&&Object.observe(this.object,this.boundInternalCallback)},sync:function(){G||(this.oldObject=n(this.object))},check:function(a){var b,c;if(G){if(!a)return!1;c={},b=v(this.object,a,c)}else c=this.oldObject,b=m(this.object,this.oldObject);return l(b)?!1:(this.reportArgs=[b.added||{},b.removed||{},b.changed||{}],this.reportArgs.push(function(a){return c[a]}),!0)},disconnect:function(){G?this.object&&Object.unobserve(this.object,this.boundInternalCallback):this.oldObject=void 0}}),r.prototype=L({__proto__:q.prototype,connect:function(){G&&Array.observe(this.object,this.boundInternalCallback)},sync:function(){G||(this.oldObject=this.object.slice())},check:function(a){var b;if(G){if(!a)return!1;b=F(this.object,a)}else b=B(this.object,0,this.object.length,this.oldObject,0,this.oldObject.length);return b&&b.length?(this.reportArgs=[b],!0):!1}}),r.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)})};var Z=Object.getPrototypeOf({}),$=Object.getPrototypeOf([]);s.prototype={reset:function(){this.isObserved=!this.isObserved},observe:function(a){if(e(a)&&a!==Z&&a!==$){var b=this.arr.indexOf(a);b>=0&&this.arr[b+1]===this.isObserved||(0>b&&(b=this.arr.length,this.arr[b]=a,Object.observe(a,this.callback)),this.arr[b+1]=this.isObserved,this.observe(Object.getPrototypeOf(a)))}},cleanup:function(){for(var a=0,b=0,c=this.isObserved;b<this.arr.length;){var d=this.arr[b];this.arr[b+1]==c?(b>a&&(this.arr[a]=d,this.arr[a+1]=c),a+=2):Object.unobserve(d,this.callback),b+=2}this.arr.length=a}},t.prototype=L({__proto__:o.prototype,connect:function(){G&&(this.observedSet=new s(this.boundInternalCallback))},disconnect:function(){this.value=void 0,G&&(this.observedSet.reset(),this.observedSet.cleanup(),this.observedSet=void 0)},check:function(){return this.value=G?this.path.getValueFromObserved(this.object,this.observedSet):this.path.getValueFrom(this.object),f(this.value,this.oldValue)?!1:(this.reportArgs=[this.value,this.oldValue],!0)},sync:function(a){a&&(this.value=G?this.path.getValueFromObserved(this.object,this.observedSet):this.path.getValueFrom(this.object)),this.oldValue=this.value}}),t.getValueAtPath=function(a,b){var c=h(b);return c?c.getValueFrom(a):void 0},t.setValueAtPath=function(a,b,c){var d=h(b);d&&d.setValueFrom(a,c)};var _={"new":!0,updated:!0,deleted:!0};t.defineProperty=function(a,b,c){var d=c.object,e=h(c.path),f=u(a,b),g=new t(d,c.path,function(a,b){f&&f("updated",b)});return Object.defineProperty(a,b,{get:function(){return e.getValueFrom(d)},set:function(a){e.setValueFrom(d,a)},configurable:!0}),{close:function(){var c=e.getValueFrom(d);f&&g.deliver(),g.close(),Object.defineProperty(a,b,{value:c,writable:!0,configurable:!0})}}};var ab=0,bb=1,cb=2,db=3;a.Observer=o,a.Observer.hasObjectObserve=G,a.ArrayObserver=r,a.ArrayObserver.calculateSplices=function(a,b){return B(a,0,a.length,b,0,b.length)},a.ObjectObserver=q,a.PathObserver=t,a.Path=i}(this),function(a){"use strict";function b(a){if(!a)throw new Error("Assertion failed")}function c(a){for(;a.parentNode;)a=a.parentNode;return"function"==typeof a.getElementById?a:null}function d(a){return a.ownerDocument.contains(a)}function e(a,b,c,d){this.closed=!1,this.node=a,this.property=b,this.model=c,this.path=d,this.observer=new PathObserver(c,d,this.boundValueChanged,this),this.boundValueChanged(this.value)}function f(a,b,c,d){this.conditional="?"==b[b.length-1],this.conditional&&(a.removeAttribute(b),b=b.slice(0,-1)),e.call(this,a,b,c,d)}function g(a){switch(a.type){case"checkbox":return T;case"radio":case"select-multiple":case"select-one":return"change";default:return"input"}}function h(a,b,c,d){e.call(this,a,b,c,d),this.eventType=g(this.node),this.boundNodeValueToModel=this.nodeValueChanged.bind(this),this.node.addEventListener(this.eventType,this.boundNodeValueToModel,!0)}function i(a){if(!d(a))return[];if(a.form)return Q(a.form.elements,function(b){return b!=a&&"INPUT"==b.tagName&&"radio"==b.type&&b.name==a.name});var b=a.ownerDocument.querySelectorAll('input[type="radio"][name="'+a.name+'"]');return Q(b,function(b){return b!=a&&!b.form})}function j(a,b,c){h.call(this,a,"checked",b,c)}function k(a,b,c){h.call(this,a,"selectedIndex",b,c)}function l(a){return $[a.tagName]&&a.hasAttribute("template")}function m(a){return"TEMPLATE"==a.tagName||l(a)}function n(a){return _&&"TEMPLATE"==a.tagName}function o(a,b){var c=a.querySelectorAll(ab);m(a)&&b(a),P(c,b)}function p(a){function b(a){HTMLTemplateElement.decorate(a)||p(a.content)}o(a,b)}function q(a,b){Object.getOwnPropertyNames(b).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))})}function r(a){if(!a.defaultView)return a;var b=eb.get(a);if(!b){for(b=a.implementation.createHTMLDocument("");b.lastChild;)b.removeChild(b.lastChild);eb.set(a,b)}return b}function s(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];Z[e.name]&&("template"!==e.name&&b.setAttribute(e.name,e.value),a.removeAttribute(e.name))}return b}function t(a,b,c){var d=a.content;if(c)return d.appendChild(b),void 0;for(var e;e=b.firstChild;)d.appendChild(e)}function u(a){"TEMPLATE"===a.tagName?_||(cb?a.__proto__=HTMLTemplateElement.prototype:q(a,HTMLTemplateElement.prototype)):(q(a,HTMLTemplateElement.prototype),Object.defineProperty(a,"content",ib))}function v(a){var b=lb.get(a);b||(b=function(){H(a,a.model,a.bindingDelegate)},lb.set(a,b)),bb(b)}function w(a,b,c,d){this.closed=!1,this.node=a,this.property=b,this.model=c,this.path=d,this.node.inputs.bind(this.property,c,d||"")}function x(a){return 3==a.length&&0==a[0].length&&0==a[2].length}function y(a){if(a&&a.length){for(var b,c=a.length,d=0,e=0,f=0;c>e;){if(d=a.indexOf("{{",e),f=0>d?-1:a.indexOf("}}",d+2),0>f){if(!b)return;b.push(a.slice(e));break}b=b||[],b.push(a.slice(e,d)),b.push(a.slice(d+2,f).trim()),e=f+2}return e===c&&b.push(""),b}}function z(a,b,c,d,e){var f,g=e&&e[X];return g&&"function"==typeof g&&(f=g(c,d,b,a),f&&(c=f,d="value")),a.bind(b,c,d)}function A(a,b,c,d,e){for(var f=0;f<a.length;f+=2){var g=C(b,a[f],a[f+1],c,d);e&&e.push(g)}}function B(a){return function(b){for(var c="",d=0,e=!0;d<a.length;d++,e=!e)if(e)c+=a[d];else{var f=b[d];void 0!==f&&(c+=f)}return c}}function C(a,b,c,d,e){if(x(c))return z(a,b,d,c[1],e);c.combinator=c.combinator||B(c);var f=new M(c.combinator);f.scheduled=!0;for(var g=1;g<c.length;g+=2)z(f,g,d,c[g],e);return f.resolve(),a.bind(b,f,"value")}function D(a){b(a);for(var c,d=m(a),e=!1,f=!1,g=0;g<a.attributes.length;g++){var h=a.attributes[g],i=h.name,j=h.value;d&&(i===W?e=!0:(i===U||i===V)&&(f=!0,j=j||"{{}}"));var k=y(j);k&&(c=c||[],c.push(i,k))}return e&&!f&&(c=c||[],c.push(U,y("{{}}"))),c}function E(a){if(a.nodeType===Node.ELEMENT_NODE)return D(a);if(a.nodeType===Node.TEXT_NODE){var b=y(a.data);if(b)return["textContent",b]}}function F(a){this.node=a}function G(a,b,c,d,e){if(b&&(b.templateRef&&(HTMLTemplateElement.decorate(a,b.templateRef),d&&kb.set(a,d),e&&e.push(new F(a))),b.length&&A(b,a,c,d,e),b.children))for(var f=0,g=a.firstChild;g;g=g.nextSibling)G(g,b.children[f++],c,d,e)}function H(a,c,d){b(a);var e=E(a);e&&A(e,a,c,d);for(var f=a.firstChild;f;f=f.nextSibling)H(f,c,d)}function I(a,b){var c=a.cloneNode(!1);if(m(c))return c;for(var d=a.firstChild;d;d=d.nextSibling)c.appendChild(I(d,b));return c}function J(a){var b=E(a);m(a)&&(b=b||[],b.templateRef=a,b.hasSubTemplate=!0);for(var c=a.firstChild,d=0;c;c=c.nextSibling,d++){var e=J(c);e&&(b=b||[],b.children=b.children||[],b.children[d]=e,e.hasSubTemplate&&(b.hasSubTemplate=!0))}return b}function K(a,b,c){this.firstNode=a,this.lastNode=b,this.model=c}function L(a,b){if(a.firstChild)for(var c=new K(a.firstChild,a.lastChild,b),d=c.firstNode;d;)mb.set(d,c),d=d.nextSibling}function M(a){this.observers={},this.values={},this.value=void 0,this.size=0,this.combinator_=a,this.closed=!1,this.scheduled=!1}function N(a){this.closed=!1,this.templateElement_=a,this.terminators=[],this.iteratedValue=void 0,this.arrayObserver=void 0,this.inputs=new M(this.resolveInputs.bind(this))}var O,P=Array.prototype.forEach.call.bind(Array.prototype.forEach),Q=Array.prototype.filter.call.bind(Array.prototype.filter);a.Map&&"function"==typeof a.Map.prototype.forEach?O=a.Map:(O=function(){this.keys=[],this.values=[]},O.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);return 0>b?void 0: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)}});var R="__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};"function"!=typeof document.contains&&(Document.prototype.contains=function(a){return a===this||a.parentNode===this?!0:this.documentElement.contains(a)});var S;"undefined"!=typeof WeakMap&&navigator.userAgent.indexOf("Firefox/")<0?S=WeakMap:function(){var a=Object.defineProperty,b=Object.hasOwnProperty,c=(new Date).getTime()%1e9;
+S=function(){this.name="__st"+(1e9*Math.random()>>>0)+(c++ +"__")},S.prototype={set:function(b,c){a(b,this.name,{value:c,writable:!0})},get:function(a){return b.call(a,this.name)?a[this.name]:void 0},"delete":function(a){this.set(a,void 0)}}}(),Node.prototype.bind=function(a,b,c){this.bindings=this.bindings||{};var d=this.bindings[a];return d&&d.close(),d=this.createBinding(a,b,c),this.bindings[a]=d,d?d:(console.error("Unhandled binding to Node: ",this,a,b,c),void 0)},Node.prototype.createBinding=function(){},Node.prototype.unbind=function(a){if(this.bindings){var b=this.bindings[a];b&&(b.close(),delete this.bindings[a])}},Node.prototype.unbindAll=function(){if(this.bindings){for(var a=Object.keys(this.bindings),b=0;b<a.length;b++){var c=this.bindings[a[b]];c&&c.close()}this.bindings={}}},e.prototype={boundValueChanged:function(a){this.node[this.property]=this.sanitizeBoundValue(a)},sanitizeBoundValue:function(a){return void 0==a?"":String(a)},close:function(){this.closed||(this.observer.close(),this.observer=void 0,this.node=void 0,this.model=void 0,this.closed=!0)},get value(){return this.observer.value},set value(a){PathObserver.setValueAtPath(this.model,this.path,a)},reset:function(){this.observer.reset()}},Text.prototype.createBinding=function(a,b,c){return"textContent"===a?new e(this,"data",b,c):Node.prototype.createBinding.call(this,a,b,c)},f.prototype=R({__proto__:e.prototype,boundValueChanged:function(a){return this.conditional?(a?this.node.setAttribute(this.property,""):this.node.removeAttribute(this.property),void 0):(this.node.setAttribute(this.property,this.sanitizeBoundValue(a)),void 0)}}),Element.prototype.createBinding=function(a,b,c){return new f(this,a,b,c)};var T;!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),T=1==d?"change":c}(),h.prototype=R({__proto__:e.prototype,nodeValueChanged:function(){this.value=this.node[this.property],this.reset(),this.postUpdateBinding(),Platform.performMicrotaskCheckpoint()},postUpdateBinding:function(){},close:function(){this.closed||(this.node.removeEventListener(this.eventType,this.boundNodeValueToModel,!0),e.prototype.close.call(this))}}),j.prototype=R({__proto__:h.prototype,sanitizeBoundValue:function(a){return Boolean(a)},postUpdateBinding:function(){"INPUT"===this.node.tagName&&"radio"===this.node.type&&i(this.node).forEach(function(a){var b=a.bindings.checked;b&&(b.value=!1)})}}),HTMLInputElement.prototype.createBinding=function(a,b,c){return"value"===a?(this.removeAttribute(a),new h(this,"value",b,c)):"checked"===a?(this.removeAttribute(a),new j(this,b,c)):HTMLElement.prototype.createBinding.call(this,a,b,c)},HTMLTextAreaElement.prototype.createBinding=function(a,b,c){return"value"===a?(this.removeAttribute(a),new h(this,a,b,c)):HTMLElement.prototype.createBinding.call(this,a,b,c)},k.prototype=R({__proto__:h.prototype,boundValueChanged:function(a){function b(){c>e.node.length&&d--?bb(b):e.node[e.property]=c}var c=Number(a);if(c<=this.node.length)return this.node[this.property]=c,void 0;var d=2,e=this;bb(b)}}),HTMLSelectElement.prototype.createBinding=function(a,b,c){return"selectedindex"===a.toLowerCase()?(this.removeAttribute(a),new k(this,b,c)):HTMLElement.prototype.createBinding.call(this,a,b,c)};var U="bind",V="repeat",W="if",X="getBinding",Y="getInstanceModel",Z={template:!0,repeat:!0,bind:!0,ref:!0},$={THEAD:!0,TBODY:!0,TFOOT:!0,TH:!0,TR:!0,TD:!0,COLGROUP:!0,COL:!0,CAPTION:!0,OPTION:!0,OPTGROUP:!0},_="undefined"!=typeof HTMLTemplateElement,ab="template, "+Object.keys($).map(function(a){return a.toLowerCase()+"[template]"}).join(", "),bb=function(){function a(a){this.nextRunner=a,this.value=!1,this.lastValue=this.value,this.scheduled=[],this.scheduledIds=[],this.running=!1,this.observer=new PathObserver(this,"value",this.run,this)}function b(a){var b=a[e];a[e]||(b=d++,a[e]=b),c.schedule(a,b)}a.prototype={schedule:function(a,b){if(!this.scheduledIds[b]){if(this.running)return this.nextRunner.schedule(a,b);this.scheduledIds[b]=!0,this.scheduled.push(a),this.lastValue===this.value&&(this.value=!this.value)}},run:function(){this.running=!0;for(var a=0;a<this.scheduled.length;a++){var b=this.scheduled[a],c=b[e];this.scheduledIds[c]=!1,"function"==typeof b?b():b.resolve()}this.scheduled=[],this.scheduledIds=[],this.lastValue=this.value,this.running=!1}};var c=new a(new a),d=1,e="__scheduledId__";return b}();document.addEventListener("DOMContentLoaded",function(){p(document),Platform.performMicrotaskCheckpoint()},!1),_||(a.HTMLTemplateElement=function(){throw TypeError("Illegal constructor")});var cb="__proto__"in{},db=new S,eb=new S,fb=new S,gb=new S;HTMLTemplateElement.decorate=function(a,c){if(a.templateIsDecorated_)return!1;var d=a;d.templateIsDecorated_=!0;var e=n(d),f=e,g=!e,h=!1;if(!e&&l(d)&&(b(!c),d=s(a),d.templateIsDecorated_=!0,e=n(d),h=!0),!e){u(d);var i=r(d.ownerDocument);db.set(d,i.createDocumentFragment())}return c?fb.set(d,c):g?t(d,a,h):f&&p(d.content),!0},HTMLTemplateElement.bootstrap=p;var hb=a.HTMLUnknownElement||HTMLElement,ib={get:function(){return db.get(this)},enumerable:!0,configurable:!0};_||(HTMLTemplateElement.prototype=Object.create(hb.prototype),Object.defineProperty(HTMLTemplateElement.prototype,"content",ib));var jb=new S,kb=new S,lb=new S;w.prototype=R({__proto__:e.prototype,get value(){},boundValueChanged:function(){},close:function(){this.closed||(this.node.inputs.unbind(this.property),this.node=void 0,this.model=void 0,this.closed=!0)}}),q(HTMLTemplateElement.prototype,{createBinding:function(a,b,c){if(a===U||a===V||a===W){var d=nb.get(this);return d||(d=new N(this),nb.set(this,d)),new w(d,a,b,c||"")}return HTMLElement.prototype.createBinding.call(this,a,b,c)},createInstance:function(a,b,c){var d=this.ref.content,e=gb.get(d);e||(e=J(d)||[],gb.set(d,e));var f=e.hasSubTemplate?I(d):d.cloneNode(!0);return G(f,e,a,b,c),L(f,a),f},get model(){return jb.get(this)},set model(a){jb.set(this,a),v(this)},get bindingDelegate(){return kb.get(this)},set bindingDelegate(a){kb.set(this,a),v(this)},get ref(){var a,b=this.getAttribute("ref");if(b){var d=c(this);d&&(a=d.getElementById(b))}if(a||(a=fb.get(this)),!a)return this;var e=a.ref;return e?e:a}}),F.prototype={close:function(){var a=nb.get(this.node);a&&a.close()}};var mb=new S;Object.defineProperty(Node.prototype,"templateInstance",{get:function(){var a=mb.get(this);return a?a:this.parentNode?this.parentNode.templateInstance:void 0}}),M.prototype={set combinator(a){this.combinator_=a,this.scheduleResolve()},pathValueChanged:function(a,b,c){this.values[c]=a,this.scheduleResolve()},bind:function(a,b,c){this.unbind(a),this.size++;var d=new PathObserver(b,c,this.pathValueChanged,this,a);this.observers[a]=d,this.pathValueChanged(d.value,void 0,a)},unbind:function(a,b){this.observers[a]&&(this.size--,this.observers[a].close(),delete this.observers[a],delete this.values[a],b||this.scheduleResolve())},scheduleResolve:function(){this.scheduled||(this.scheduled=!0,bb(this))},resolve:function(){if(!this.closed){if(!this.combinator_)throw Error("CompoundBinding attempted to resolve without a combinator");this.value=this.combinator_(this.values),this.scheduled=!1}},unobserved:function(){this.close()},close:function(){this.closed||(Object.keys(this.observers).forEach(function(a){this.unbind(a,!0)},this),this.closed=!0,this.value=void 0)}},N.prototype={resolveInputs:function(a){this.closed||(W in a&&!a[W]?this.valueChanged(void 0):V in a?this.valueChanged(a[V]):U in a||W in a?this.valueChanged([a[U]]):this.valueChanged(void 0))},valueChanged:function(a){Array.isArray(a)||(a=void 0);var b=this.iteratedValue;this.unobserve(),this.iteratedValue=a,this.iteratedValue&&(this.arrayObserver=new ArrayObserver(this.iteratedValue,this.handleSplices,this));var c=ArrayObserver.calculateSplices(this.iteratedValue||[],b||[]);c.length&&this.handleSplices(c),this.inputs.size||(nb.delete(this),this.close())},getTerminatorAt:function(a){if(-1==a)return this.templateElement_;var b=this.terminators[2*a];if(b.nodeType!==Node.ELEMENT_NODE||this.templateElement_===b)return b;var c=nb.get(b);return c?c.getTerminatorAt(c.terminators.length/2-1):b},insertInstanceAt:function(a,b,c,d){var e=this.getTerminatorAt(a-1),f=b?b.lastChild||e:c[c.length-1]||e;this.terminators.splice(2*a,0,f,d);var g=this.templateElement_.parentNode,h=e.nextSibling;if(b)return g.insertBefore(b,h),void 0;for(var i=0;i<c.length;i++)g.insertBefore(c[i],h)},extractInstanceAt:function(a){var b=[],c=this.getTerminatorAt(a-1),d=this.getTerminatorAt(a);b.bound=this.terminators[2*a+1],this.terminators.splice(2*a,2);for(var e=this.templateElement_.parentNode;d!==c;){var f=c.nextSibling;f==d&&(d=c),e.removeChild(f),b.push(f)}return b},getInstanceModel:function(a,b,c){var d=c&&c[Y];return d&&"function"==typeof d?d(a,b):b},handleSplices:function(a){if(!this.closed){var b=this.templateElement_;if(!b.parentNode||!b.ownerDocument.defaultView)return this.close(),nb.delete(this),void 0;var c=b.bindingDelegate,d=new O,e=0;a.forEach(function(a){a.removed.forEach(function(b){var c=this.extractInstanceAt(a.index+e);d.set(b,c)},this),e-=a.addedCount},this),a.forEach(function(a){for(var e=a.index;e<a.index+a.addedCount;e++){var f,g=this.iteratedValue[e],h=void 0,i=d.get(g);if(i)d.delete(g),f=i.bound;else{f=[];var j=this.getInstanceModel(b,g,c);h=this.templateElement_.createInstance(j,c,f)}this.insertInstanceAt(e,h,i,f)}},this),d.forEach(function(a){for(var b=a.bound,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=1;a<this.terminators.length;a+=2)for(var b=this.terminators[a],c=0;c<b.length;c++)b[c].close();this.terminators.length=0,this.inputs.close(),this.closed=!0}}};var nb=new S;a.CompoundBinding=M,HTMLTemplateElement.forAllTemplatesFrom_=o}(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(;bb>ab&&d(_.charCodeAt(ab));)++ab}function j(){var a,b;for(a=ab++;bb>ab&&(b=_.charCodeAt(ab),g(b));)++ab;return _.slice(a,ab)}function k(){var a,b,c;return a=ab,b=j(),c=1===b.length?X.Identifier:h(b)?X.Keyword:"null"===b?X.NullLiteral:"true"===b||"false"===b?X.BooleanLiteral:X.Identifier,{type:c,value:b,range:[a,ab]}}function l(){var a,b,c,d,e=ab,f=_.charCodeAt(ab),g=_[ab];switch(f){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++ab,{type:X.Punctuator,value:String.fromCharCode(f),range:[e,ab]};default:if(a=_.charCodeAt(ab+1),61===a)switch(f){case 37:case 38:case 42:case 43:case 45:case 47:case 60:case 62:case 94:case 124:return ab+=2,{type:X.Punctuator,value:String.fromCharCode(f)+String.fromCharCode(a),range:[e,ab]};case 33:case 61:return ab+=2,61===_.charCodeAt(ab)&&++ab,{type:X.Punctuator,value:_.slice(e,ab),range:[e,ab]}}}return b=_[ab+1],c=_[ab+2],d=_[ab+3],">"===g&&">"===b&&">"===c&&"="===d?(ab+=4,{type:X.Punctuator,value:">>>=",range:[e,ab]}):">"===g&&">"===b&&">"===c?(ab+=3,{type:X.Punctuator,value:">>>",range:[e,ab]}):"<"===g&&"<"===b&&"="===c?(ab+=3,{type:X.Punctuator,value:"<<=",range:[e,ab]}):">"===g&&">"===b&&"="===c?(ab+=3,{type:X.Punctuator,value:">>=",range:[e,ab]}):g===b&&"+-<>&|".indexOf(g)>=0?(ab+=2,{type:X.Punctuator,value:g+b,range:[e,ab]}):"<>=!+-*%&|^/".indexOf(g)>=0?(++ab,{type:X.Punctuator,value:g,range:[e,ab]}):(s({},$.UnexpectedToken,"ILLEGAL"),void 0)}function m(){var a,d,e;if(e=_[ab],b(c(e.charCodeAt(0))||"."===e,"Numeric literal must start with a decimal digit or a decimal point"),d=ab,a="","."!==e){for(a=_[ab++],e=_[ab],"0"===a&&e&&c(e.charCodeAt(0))&&s({},$.UnexpectedToken,"ILLEGAL");c(_.charCodeAt(ab));)a+=_[ab++];e=_[ab]}if("."===e){for(a+=_[ab++];c(_.charCodeAt(ab));)a+=_[ab++];e=_[ab]}if("e"===e||"E"===e)if(a+=_[ab++],e=_[ab],("+"===e||"-"===e)&&(a+=_[ab++]),c(_.charCodeAt(ab)))for(;c(_.charCodeAt(ab));)a+=_[ab++];else s({},$.UnexpectedToken,"ILLEGAL");return f(_.charCodeAt(ab))&&s({},$.UnexpectedToken,"ILLEGAL"),{type:X.NumericLiteral,value:parseFloat(a),range:[d,ab]}}function n(){var a,c,d,f="",g=!1;for(a=_[ab],b("'"===a||'"'===a,"String literal must starts with a quote"),c=ab,++ab;bb>ab;){if(d=_[ab++],d===a){a="";break}if("\\"===d)if(d=_[ab++],d&&e(d.charCodeAt(0)))"\r"===d&&"\n"===_[ab]&&++ab;else switch(d){case"n":f+="\n";break;case"r":f+="\r";break;case"t":f+=" ";break;case"b":f+="\b";break;case"f":f+="\f";break;case"v":f+=" ";break;default:f+=d}else{if(e(d.charCodeAt(0)))break;f+=d}}return""!==a&&s({},$.UnexpectedToken,"ILLEGAL"),{type:X.StringLiteral,value:f,octal:g,range:[c,ab]}}function o(a){return a.type===X.Identifier||a.type===X.Keyword||a.type===X.BooleanLiteral||a.type===X.NullLiteral}function p(){var a;return i(),ab>=bb?{type:X.EOF,range:[ab,ab]}:(a=_.charCodeAt(ab),40===a||41===a||58===a?l():39===a||34===a?n():f(a)?k():46===a?c(_.charCodeAt(ab+1))?m():l():c(a)?m():l())}function q(){var a;return a=db,ab=a.range[1],db=p(),ab=a.range[1],a}function r(){var a;a=ab,db=p(),ab=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=ab,d.description=f,d}function t(a){s(a,$.UnexpectedToken,a.value)}function u(a){var b=q();(b.type!==X.Punctuator||b.value!==a)&&t(b)}function v(a){return db.type===X.Punctuator&&db.value===a}function w(a){return db.type===X.Keyword&&db.value===a}function x(){return 59===_.charCodeAt(ab)?(q(),void 0):(i(),v(";")?(q(),void 0):(db.type===X.EOF||v("}")||t(db),void 0))}function y(){var a=[];for(u("[");!v("]");)v(",")?(q(),a.push(null)):(a.push(O()),v("]")||u(","));return u("]"),cb.createArrayExpression(a)}function z(){var a;return i(),a=q(),a.type===X.StringLiteral||a.type===X.NumericLiteral?cb.createLiteral(a):cb.createIdentifier(a.value)}function A(){var a,b;return a=db,i(),(a.type===X.EOF||a.type===X.Punctuator)&&t(a),b=z(),u(":"),cb.createProperty("init",b,O())}function B(){var a=[];for(u("{");!v("}");)a.push(A()),v("}")||u(",");return u("}"),cb.createObjectExpression(a)}function C(){var a;return u("("),a=P(),u(")"),a}function D(){var a,b,c;return v("(")?C():(a=db.type,a===X.Identifier?c=cb.createIdentifier(q().value):a===X.StringLiteral||a===X.NumericLiteral?c=cb.createLiteral(q()):a===X.Keyword?w("this")&&(q(),c=cb.createThisExpression()):a===X.BooleanLiteral?(b=q(),b.value="true"===b.value,c=cb.createLiteral(b)):a===X.NullLiteral?(b=q(),b.value=null,c=cb.createLiteral(b)):v("[")?c=y():v("{")&&(c=B()),c?c:(t(q()),void 0))}function E(){var a=[];if(u("("),!v(")"))for(;bb>ab&&(a.push(O()),!v(")"));)u(",");return u(")"),a}function F(){var a;return a=q(),o(a)||t(a),cb.createIdentifier(a.value)}function G(){return u("."),F()}function H(){var a;return u("["),a=P(),u("]"),a}function I(){var a,b,c;for(a=D();v(".")||v("[")||v("(");)v("(")?(b=E(),a=cb.createCallExpression(a,b)):v("[")?(c=H(),a=cb.createMemberExpression("[",a,c)):(c=G(),a=cb.createMemberExpression(".",a,c));return a}function J(){var a;return a=I(),db.type===X.Punctuator&&(v("++")||v("--"))&&s({},$.UnexpectedToken),a}function K(){var a,b;return db.type!==X.Punctuator&&db.type!==X.Keyword?b=J():v("++")||v("--")?s({},$.UnexpectedToken):v("+")||v("-")||v("~")||v("!")?(a=q(),b=K(),b=cb.createUnaryExpression(a.value,b)):w("delete")||w("void")||w("typeof")?s({},$.UnexpectedToken):b=J(),b}function L(a,b){var c=0;if(a.type!==X.Punctuator&&a.type!==X.Keyword)return 0;switch(a.value){case"||":c=1;break;case"&&":c=2;break;case"|":c=3;break;case"^":c=4;break;case"&":c=5;break;case"==":case"!=":case"===":case"!==":c=6;break;case"<":case">":case"<=":case">=":case"instanceof":c=7;break;case"in":c=b?7:0;break;case"<<":case">>":case">>>":c=8;break;case"+":case"-":c=9;break;case"*":case"/":case"%":c=11}return c}function M(){var a,b,c,d,e,f,g,h,i;if(d=eb.allowIn,eb.allowIn=!0,h=K(),b=db,c=L(b,d),0===c)return h;for(b.prec=c,q(),f=K(),e=[h,b,f];(c=L(db,d))>0;){for(;e.length>2&&c<=e[e.length-2].prec;)f=e.pop(),g=e.pop().value,h=e.pop(),a=cb.createBinaryExpression(g,h,f),e.push(a);b=q(),b.prec=c,e.push(b),a=K(),e.push(a)}for(eb.allowIn=d,i=e.length-1,a=e[i];i>1;)a=cb.createBinaryExpression(e[i-1].value,e[i-2],a),i-=2;return a}function N(){var a,b,c,d;return a=M(),v("?")&&(q(),b=eb.allowIn,eb.allowIn=!0,c=O(),eb.allowIn=b,u(":"),d=O(),a=cb.createConditionalExpression(a,c,d)),a}function O(){var a,b,c;return a=db,c=b=N()}function P(){var a;return a=O()}function Q(){return u(";"),cb.createEmptyStatement()}function R(){var a=P();return x(),cb.createExpressionStatement(a)}function S(){var a,b,c,d=db.type;if(d===X.EOF&&t(db),i(),d===X.Punctuator)switch(db.value){case";":return Q();case"(":return R()}return a=P(),a.type===Z.Identifier&&v(":")?(q(),c="$"+a.name,Object.prototype.hasOwnProperty.call(eb.labelSet,c)&&s({},$.Redeclaration,"Label",a.name),eb.labelSet[c]=!0,b=S(),delete eb.labelSet[c],cb.createLabeledStatement(a,b)):(x(),cb.createExpressionStatement(a))}function T(){return db.type===X.Keyword?S():db.type!==X.EOF?S():void 0}function U(){for(var a,b=[];bb>ab&&(a=T(),"undefined"!=typeof a);)b.push(a);return b}function V(){var a;return i(),r(),a=U(),cb.createProgram(a)}function W(a,b){var c;return c=String,"string"==typeof a||a instanceof String||(a=c(a)),cb=b,_=a,ab=0,bb=_.length,db=null,eb={allowIn:!0,labelSet:{}},bb>0&&"undefined"==typeof _[0]&&a instanceof String&&(_=a.valueOf()),V()}var X,Y,Z,$,_,ab,bb,cb,db,eb;X={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8},Y={},Y[X.BooleanLiteral]="Boolean",Y[X.EOF]="<end>",Y[X.Identifier]="Identifier",Y[X.Keyword]="Keyword",Y[X.NullLiteral]="Null",Y[X.NumericLiteral]="Numeric",Y[X.Punctuator]="Punctuator",Y[X.StringLiteral]="String",Z={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"},$={UnexpectedToken:"Unexpected token %0",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared"},a.esprima={parse:W}}(this),function(a){"use strict";function b(a,b,d,e){if(e.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===e.tagName&&("bind"===d||"repeat"===d)){var f,g,h=b.match(r);if(h?(f=h[1],g=h[2]):(h=b.match(s),h&&(f=h[2],g=h[1])),h){var i;if(g=g.trim(),g.match(q))i=new CompoundBinding(function(a){return a.path}),i.bind("path",a,g);else try{i=c(a,g)}catch(j){console.error("Invalid expression syntax: "+g,j)}if(i)return t.set(e,f),i}}}function c(a,b){try{var c=new f;if(esprima.parse(b,c),!c.statements.length&&!c.labeledStatements.length)return;if(!c.labeledStatements.length&&c.statements.length>1)throw Error("Multiple unlabelled statements are not allowed.");var e=c.labeledStatements.length?d(c.labeledStatements):e=c.statements[0],g=[];for(var h in c.deps)g.push(h);if(!g.length)return{value:e({})};for(var i=new CompoundBinding(e),j=0;j<g.length;j++)i.bind(g[j],a,g[j]);return i}catch(k){console.error("Invalid expression syntax: "+b,k)}}function d(a){return function(b){for(var c=[],d=0;d<a.length;d++)a[d].body(b)&&c.push(a[d].label);return c.join(" ")}}function e(a,b,c){this.deps=a,this.name=b,this.last=c}function f(){this.statements=[],this.labeledStatements=[],this.deps={},this.currentPath=void 0}function g(){throw Error("Not Implemented")}function h(){}var i;"undefined"!=typeof WeakMap&&navigator.userAgent.indexOf("Firefox/")<0?i=WeakMap:function(){var a=Object.defineProperty,b=Object.hasOwnProperty,c=(new Date).getTime()%1e9;i=function(){this.name="__st"+(1e9*Math.random()>>>0)+(c++ +"__")},i.prototype={set:function(b,c){a(b,this.name,{value:c,writable:!0})},get:function(a){return b.call(a,this.name)?a[this.name]:void 0},"delete":function(a){this.set(a,void 0)}}}();var j="[$_a-zA-Z]",k="[$_a-zA-Z0-9]",l=j+"+"+k+"*",m="("+l+")",n="(?:[0-9]|[1-9]+[0-9]+)",o="(?:"+l+"|"+n+")",p="(?:"+o+")(?:\\."+o+")*",q=new RegExp("^"+p+"$"),r=new RegExp("^"+m+"\\s* in (.*)$"),s=new RegExp("^(.*) as \\s*"+m+"$"),t=new i;e.prototype={getPath:function(){return this.last?this.last.getPath()+"."+this.name:this.name},valueFn:function(){var a=this.getPath();return this.deps[a]=!0,function(b){return b[a]}}};var u={"+":function(a){return+a},"-":function(a){return-a},"!":function(a){return!a}},v={"+":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}};f.prototype={getFn:function(a){return a instanceof e?a.valueFn():a},createProgram:function(){},createExpressionStatement:function(a){return this.statements.push(a),a},createLabeledStatement:function(a,b){return this.labeledStatements.push({label:a.getPath(),body:b instanceof e?b.valueFn():b}),b},createUnaryExpression:function(a,b){if(!u[a])throw Error("Disallowed operator: "+a);return b=this.getFn(b),function(c){return u[a](b(c))}},createBinaryExpression:function(a,b,c){if(!v[a])throw Error("Disallowed operator: "+a);return b=this.getFn(b),c=this.getFn(c),function(d){return v[a](b(d),c(d))}},createConditionalExpression:function(a,b,c){return a=this.getFn(a),b=this.getFn(b),c=this.getFn(c),function(d){return a(d)?b(d):c(d)}},createIdentifier:function(a){var b=new e(this.deps,a);return b.type="Identifier",b},createMemberExpression:function(a,b,c){return new e(this.deps,c.name,b)},createLiteral:function(a){return function(){return a.value}},createArrayExpression:function(a){for(var b=0;b<a.length;b++)a[b]=this.getFn(a[b]);return function(b){for(var c=[],d=0;d<a.length;d++)c.push(a[d](b));return c}},createProperty:function(a,b,c){return{key:b instanceof e?b.getPath():b(),value:c}},createObjectExpression:function(a){for(var b=0;b<a.length;b++)a[b].value=this.getFn(a[b].value);return function(b){for(var c={},d=0;d<a.length;d++)c[a[d].key]=a[d].value(b);return c}},createCallExpression:g,createEmptyStatement:g,createThisExpression:g},h.prototype={getBinding:function(a,d,e,f){return d=d.trim(),d&&!d.match(q)?b(a,d,e,f)||c(a,d,e,f):void 0},getInstanceModel:function(a,b){var c=t.get(a);if(!c)return b;var d=a.templateInstance?a.templateInstance.model:a.model,e=Object.create(d);return e[c]=b,e}},a.ExpressionSyntax=h}(this),function(a){function b(){logFlags.data&&console.group("Model.dirtyCheck()"),c(),logFlags.data&&console.groupEnd()}function c(){Platform.performMicrotaskCheckpoint()}var d=document.createElement("style");d.textContent="template {display: none !important;} /* injected by platform.js */";var e=document.querySelector("head");e.insertBefore(d,e.firstChild),HTMLTemplateElement.__instanceCreated=function(a){document.adoptNode(a),CustomElements.upgradeAll(a)};var f=125;window.addEventListener("WebComponentsReady",function(){b(),Observer.hasObjectObserve||setInterval(c,f)}),a.flush=b,window.dirtyCheck=b}(window.Platform),function(a){function b(a){return d(a,i)}function c(a){return d(a,j)}function d(a,b){return"link"===a.localName&&a.getAttribute("rel")===b}function e(a){return"script"===a.localName}function f(a,b){var c=a;c instanceof Document||(c=document.implementation.createHTMLDocument(i),c.body.innerHTML=a),c._URL=b;var d=c.createElement("base");return d.setAttribute("href",document.baseURI),c.head.appendChild(d),window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(c),c}a||(a=window.HTMLImports={flags:{}});var g,h=a.xhr,i="import",j="stylesheet",k={documents:{},cache:{},preloadSelectors:["link[rel="+i+"]","element link[rel="+j+"]","template","script[src]:not([type])",'script[src][type="text/javascript"]'].join(","),loader:function(a){return g=new l(k.loaded,a),g.cache=k.cache,g},load:function(a,b){g=k.loader(b),k.preload(a)},preload:function(a){var b=a.querySelectorAll(k.preloadSelectors);b=this.filterMainDocumentNodes(a,b),b=this.extractTemplateNodes(b),g.addNodes(b)},filterMainDocumentNodes:function(a,b){return a===document&&(b=Array.prototype.filter.call(b,function(a){return!e(a)})),b},extractTemplateNodes:function(a){var b=[];return a=Array.prototype.filter.call(a,function(a){if("template"===a.localName){if(a.content){var c=a.content.querySelectorAll("link[rel="+j+"]");c.length&&(b=b.concat(Array.prototype.slice.call(c,0)))}return!1}return!0}),b.length&&(a=a.concat(b)),a},loaded:function(a,d,e){if(b(d)){var g=k.documents[a];g||(g=f(e,a),p.resolvePathsInHTML(g),k.documents[a]=g,k.preload(g)),d.import={href:a,ownerNode:d,content:g},d.content=e=g}d.__resource=e,c(d)&&p.resolvePathsInStylesheet(d)}},l=function(a,b){this.onload=a,this.oncomplete=b,this.inflight=0,this.pending={},this.cache={}};l.prototype={addNodes:function(a){this.inflight+=a.length,q(a,this.require,this),this.checkDone()},require:function(a){var b=p.nodeUrl(a);a.__nodeUrl=b,this.dedupe(b,a)||this.fetch(b,a)},dedupe:function(a,b){return this.pending[a]?(this.pending[a].push(b),!0):this.cache[a]?(this.onload(a,b,g.cache[a]),this.tail(),!0):(this.pending[a]=[b],!1)},fetch:function(a,b){var c=function(c,d){this.receive(a,b,c,d)}.bind(this);h.load(a,c)},receive:function(a,b,c,d){c||(g.cache[a]=d),g.pending[a].forEach(function(b){c||this.onload(a,b,d),this.tail()},this),g.pending[a]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}};var m=["href","src","action"],n="["+m.join("],[")+"]",o="{{.*}}",p={nodeUrl:function(a){return p.resolveUrl(p.getDocumentUrl(document),p.hrefOrSrc(a))},hrefOrSrc:function(a){return a.getAttribute("href")||a.getAttribute("src")},documentUrlFromNode:function(a){return p.getDocumentUrl(a.ownerDocument||a)},getDocumentUrl:function(a){var b=a&&(a._URL||a.impl&&a.impl._URL||a.baseURI||a.URL)||"";return b.split("#")[0]},resolveUrl:function(a,b,c){if(this.isAbsUrl(b))return b;var d=this.compressUrl(this.urlToPath(a)+b);return c&&(d=p.makeRelPath(p.getDocumentUrl(document),d)),d},isAbsUrl:function(a){return/(^data:)|(^http[s]?:)|(^\/)/.test(a)},urlToPath:function(a){var b=a.split("/");return b.pop(),b.push(""),b.join("/")},compressUrl:function(a){for(var b,c=a.split("/"),d=0;d<c.length;d++)b=c[d],".."===b&&(c.splice(d-1,2),d-=2);return c.join("/")},makeRelPath:function(a,b){var c,d;for(c=this.compressUrl(a).split("/"),d=this.compressUrl(b).split("/");c.length&&c[0]===d[0];)c.shift(),d.shift();for(var e=0,f=c.length-1;f>e;e++)d.unshift("..");var g=d.join("/");return g},resolvePathsInHTML:function(a,b){b=b||p.documentUrlFromNode(a),p.resolveAttributes(a,b),p.resolveStyleElts(a,b);var c=a.querySelectorAll("template");c&&q(c,function(a){a.content&&p.resolvePathsInHTML(a.content,b)})},resolvePathsInStylesheet:function(a){var b=p.nodeUrl(a);a.__resource=p.resolveCssText(a.__resource,b)},resolveStyleElts:function(a,b){var c=a.querySelectorAll("style");c&&q(c,function(a){a.textContent=p.resolveCssText(a.textContent,b)})},resolveCssText:function(a,b){return a.replace(/url\([^)]*\)/g,function(a){var c=a.replace(/["']/g,"").slice(4,-1);return c=p.resolveUrl(b,c,!0),"url("+c+")"})},resolveAttributes:function(a,b){var c=a&&a.querySelectorAll(n);c&&q(c,function(a){this.resolveNodeAttributes(a,b)},this)},resolveNodeAttributes:function(a,b){m.forEach(function(c){var d=a.attributes[c];if(d&&d.value&&d.value.search(o)<0){var e=p.resolveUrl(b,d.value,!0);d.value=e}})}};h=h||{async:!0,ok:function(a){return a.status>=200&&a.status<300||304===a.status||0===a.status},load:function(b,c,d){var e=new XMLHttpRequest;return(a.flags.debug||a.flags.bust)&&(b+="?"+Math.random()),e.open("GET",b,h.async),e.addEventListener("readystatechange",function(){4===e.readyState&&c.call(d,!h.ok(e)&&e,e.response,b)}),e.send(),e},loadDocument:function(a,b,c){this.load(a,b,c).responseType="document"}};var q=Array.prototype.forEach.call.bind(Array.prototype.forEach);a.path=p,a.xhr=h,a.importer=k,a.getDocumentUrl=p.getDocumentUrl,a.IMPORT_LINK_TYPE=i}(window.HTMLImports),function(a){function b(a){return"link"===a.localName&&a.getAttribute("rel")===f}function c(a){return a.parentNode&&!d(a)&&!e(a)}function d(a){return a.ownerDocument===document||a.ownerDocument.impl===document}function e(a){return a.parentNode&&"element"===a.parentNode.localName}var f="import",g={selectors:["link[rel="+f+"]","link[rel=stylesheet]","style","script:not([type])",'script[type="text/javascript"]'],map:{link:"parseLink",script:"parseScript",style:"parseGeneric"},parse:function(a){if(!a.__importParsed){a.__importParsed=!0;var b=a.querySelectorAll(g.selectors);h(b,function(a){g[g.map[a.localName]](a)})}},parseLink:function(a){b(a)?a.content&&g.parse(a.content):this.parseGeneric(a)},parseGeneric:function(a){c(a)&&document.head.appendChild(a)},parseScript:function(b){if(c(b)){var d=(b.__resource||b.textContent).trim();if(d){var e=b.__nodeUrl;if(!e){var e=a.path.documentUrlFromNode(b),f="["+Math.floor(1e3*(Math.random()+1))+"]",g=d.match(/Polymer\(['"]([^'"]*)/);f=g&&g[1]||f,e+="/"+f+".js"}d+="\n//# sourceURL="+e+"\n",eval.call(window,d)}}}},h=Array.prototype.forEach.call.bind(Array.prototype.forEach);a.parser=g}(HTMLImports),function(){function a(){HTMLImports.importer.load(document,function(){HTMLImports.parser.parse(document),HTMLImports.readyTime=(new Date).getTime(),document.dispatchEvent(new CustomEvent("HTMLImportsLoaded",{bubbles:!0}))})}"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(a){var b=document.createEvent("HTMLEvents");return b.initEvent(a,!0,!0),b}),"complete"===document.readyState?a():window.addEventListener("DOMContentLoaded",a)}(),function(a){function b(a){u.push(a),t||(t=!0,q(d))}function c(a){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(a)||a}function d(){t=!1;var a=u;u=[],a.sort(function(a,b){return a.uid_-b.uid_});var b=!1;a.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 SideTable,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 c[d-1]=f,void 0}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}(this),!window.MutationObserver&&(window.MutationObserver=window.WebKitMutationObserver||window.JsMutationObserver,!MutationObserver))throw new Error("no mutation observer support");!function(a){function b(b,f){var g=f||{};if(!b)throw new Error("Name argument must not be empty");if(g.name=b,!g.prototype)throw new Error("Options missing required prototype property");return g.lifecycle=g.lifecycle||{},g.ancestry=c(g.extends),d(g),e(g),k(g.prototype),m(b,g),g.ctor=n(g),g.ctor.prototype=g.prototype,g.prototype.constructor=g.ctor,a.ready&&a.upgradeAll(document),g.ctor}function c(a){var b=s[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)}}a.native=b}function f(a){return g(t(a.tag),a)}function g(b,c){return c.is&&b.setAttribute("is",c.is),h(b,c),b.__upgraded__=!0,a.upgradeSubtree(b),j(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!==HTMLUnknownElement.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.readyCallback&&a.readyCallback()}function k(a){var b=a.setAttribute;a.setAttribute=function(a,c){l.call(this,a,c,b)};var c=a.removeAttribute;a.removeAttribute=function(a,b){l.call(this,a,b,c)}}function l(a,b,c){var d=this.getAttribute(a);c.apply(this,arguments),this.attributeChangedCallback&&this.getAttribute(a)!==d&&this.attributeChangedCallback(a,d)}function m(a,b){s[a]=b}function n(a){return function(){return f(a)}}function o(a){var b=s[a];return b?new b.ctor:t(a)}function p(a){if(!a.__upgraded__&&a.nodeType===Node.ELEMENT_NODE){var b=a.getAttribute("is")||a.localName,c=s[b];return c&&g(a,c)}}function q(b){var c=u.call(this,b);return a.upgradeAll(c),c}if(a||(a=window.CustomElements={flags:{}}),a.hasNative=(document.webkitRegister||document.register)&&"native"===a.flags.register,a.hasNative){document.register=document.register||document.webkitRegister;var r=function(){};a.registry={},a.upgradeElement=r}else{var s={},t=document.createElement.bind(document),u=Node.prototype.cloneNode;document.register=b,document.createElement=o,Node.prototype.cloneNode=q,a.registry=s,a.upgrade=p}}(window.CustomElements),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,d){b(a,function(a){return d(a)?!0:(a.webkitShadowRoot&&c(a.webkitShadowRoot,d),void 0)}),a.webkitShadowRoot&&c(a.webkitShadowRoot,d)}function d(a){return g(a)?(h(a),!0):(i(a),void 0)}function e(a){c(a,function(a){return d(a)?!0:void 0})}function f(a){return d(a)||e(a)}function g(b){if(!b.__upgraded__&&b.nodeType===Node.ELEMENT_NODE){var c=b.getAttribute("is")||b.localName,d=a.registry[c];if(d)return logFlags.dom&&console.group("upgrade:",b.localName),a.upgrade(b),logFlags.dom&&console.groupEnd(),!0}}function h(a){i(a),l(a)&&c(a,function(a){i(a)})}function i(a){(a.insertedCallback||a.__upgraded__&&logFlags.dom)&&(logFlags.dom&&console.group("inserted:",a.localName),l(a)&&(a.__inserted=(a.__inserted||0)+1,a.__inserted<1&&(a.__inserted=1),a.__inserted>1?logFlags.dom&&console.warn("inserted:",a.localName,"insert/remove count:",a.__inserted):a.insertedCallback&&(logFlags.dom&&console.log("inserted:",a.localName),a.insertedCallback())),logFlags.dom&&console.groupEnd())}function j(a){k(a),c(a,function(a){k(a)})}function k(a){(a.removedCallback||a.__upgraded__&&logFlags.dom)&&(logFlags.dom&&console.log("removed:",a.localName),l(a)||(a.__inserted=(a.__inserted||0)-1,a.__inserted>0&&(a.__inserted=0),a.__inserted<0?logFlags.dom&&console.warn("removed:",a.localName,"insert/remove count:",a.__inserted):a.removedCallback&&a.removedCallback()))}function l(a){for(var b=a;b;){if(b==a.ownerDocument)return!0;b=b.parentNode||b.host}}function m(a){a.webkitShadowRoot&&!a.webkitShadowRoot.__watched&&(logFlags.dom&&console.log("watching shadow-root for: ",a.localName),r(a.webkitShadowRoot),a.webkitShadowRoot.__watched=!0)}function n(a){m(a),c(a,function(){m(a)})}function o(a){switch(a.localName){case"style":case"script":case"template":case void 0:return!0}}function p(a){if(logFlags.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&&(v(a.addedNodes,function(a){o(a)||f(a)}),v(a.removedNodes,function(a){o(a)||j(a)}))}),logFlags.dom&&console.groupEnd()}function q(){p(u.takeRecords())}function r(a){u.observe(a,{childList:!0,subtree:!0})}function s(a){r(a)}function t(a){logFlags.dom&&console.group("upgradeDocument: ",(a.URL||a._URL||"").split("/").pop()),f(a),logFlags.dom&&console.groupEnd()}var u=new MutationObserver(p),v=Array.prototype.forEach.call.bind(Array.prototype.forEach);a.watchShadow=m,a.watchAllShadows=n,a.upgradeAll=f,a.upgradeSubtree=e,a.observeDocument=s,a.upgradeDocument=t,a.takeRecords=q}(window.CustomElements),function(){function parseElementElement(a){var b={name:"","extends":null};takeAttributes(a,b);var c=HTMLElement.prototype;if(b.extends){var d=document.createElement(b.extends);c=d.__proto__||Object.getPrototypeOf(d)}b.prototype=Object.create(c),a.options=b;var e=a.querySelector('script:not([type]),script[type="text/javascript"],scripts');e&&executeComponentScript(e.textContent,a,b.name);var f=document.register(b.name,b);a.ctor=f;var g=a.getAttribute("constructor");g&&(window[g]=f)}function takeAttributes(a,b){for(var c in b){var d=a.attributes[c];d&&(b[c]=d.value)}}function executeComponentScript(inScript,inContext,inName){context=inContext;var owner=context.ownerDocument,url=owner._URL||owner.URL||owner.impl&&(owner.impl._URL||owner.impl.URL),match=url.match(/.*\/([^.]*)[.]?.*$/);if(match){var name=match[1];url+=name!=inName?":"+inName:""}var code="__componentScript('"+inName+"', function(){"+inScript+"});"+"\n//# sourceURL="+url+"\n";eval(code)}function mixin(a,b){a=a||{};try{Object.getOwnPropertyNames(b).forEach(function(c){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)})}catch(c){}return a}var HTMLElementElement=function(a){return a.register=HTMLElementElement.prototype.register,parseElementElement(a),a};HTMLElementElement.prototype={register:function(a){a&&(this.options.lifecycle=a.lifecycle,a.prototype&&mixin(this.options.prototype,a.prototype))}};var context;window.__componentScript=function(a,b){b.call(context)},window.HTMLElementElement=HTMLElementElement}(),function(){function a(a){return"link"===a.localName&&a.getAttribute("rel")===b}var b=window.HTMLImports?HTMLImports.IMPORT_LINK_TYPE:"none",c={selectors:["link[rel="+b+"]","element"],map:{link:"parseLink",element:"parseElement"},parse:function(a){if(!a.__parsed){a.__parsed=!0;var b=a.querySelectorAll(c.selectors);d(b,function(a){c[c.map[a.localName]](a)}),CustomElements.upgradeDocument(a),CustomElements.observeDocument(a)}},parseLink:function(b){a(b)&&this.parseImport(b)},parseImport:function(a){a.content&&c.parse(a.content)},parseElement:function(a){new HTMLElementElement(a)}},d=Array.prototype.forEach.call.bind(Array.prototype.forEach);CustomElements.parser=c}(),function(){function a(){setTimeout(function(){CustomElements.parser.parse(document),CustomElements.upgradeDocument(document),CustomElements.ready=!0,CustomElements.readyTime=Date.now(),window.HTMLImports&&(CustomElements.elapsed=CustomElements.readyTime-HTMLImports.readyTime),document.body.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))},0)}if("function"!=typeof window.CustomEvent&&(window.CustomEvent=function(a){var b=document.createEvent("HTMLEvents");return b.initEvent(a,!0,!0),b}),"complete"===document.readyState)a();else{var b=window.HTMLImports?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(b,a)}}(),function(){function a(){}var b=document.createElement("style");b.textContent="element {display: none !important;} /* injected by platform.js */";var c=document.querySelector("head");if(c.insertBefore(b,c.firstChild),window.ShadowDOMPolyfill){CustomElements.watchShadow=a,CustomElements.watchAllShadows=a;var d=["upgradeAll","upgradeSubtree","observeDocument","upgradeDocument"],e={};d.forEach(function(a){e[a]=CustomElements[a]}),d.forEach(function(a){CustomElements[a]=function(b){return e[a](wrap(b))}})}}(),function(a){a=a||{};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},findTarget:function(a){var b=a.clientX,c=a.clientY,d=this.owner(a.target);return d.elementFromPoint(b,c)||(d=document),this.searchRoot(document,b,c)}};a.targetFinding=b,a.findTarget=b.findTarget.bind(b),window.PointerEventsPolyfill=a}(window.PointerEventsPolyfill),function(){function a(a){return'[touch-action="'+a+'"]'}function b(a){return"{ -ms-touch-action: "+a+"; touch-action: "+a+"; }"}var c=["none","auto","pan-x","pan-y",{rule:"pan-x pan-y",selectors:["pan-x pan-y","pan-y pan-x"]}],d="";c.forEach(function(c){d+=String(c)===c?a(c)+b(c):c.selectors.map(a)+b(c.rule)});var e=document.createElement("style");e.textContent=d;var f=document.querySelector("head");f.insertBefore(e,f.firstChild)}(),function(a){function b(a,b){var b=b||{},e=b.buttons;if(void 0===e)switch(b.which){case 1:e=1;break;case 2:e=4;break;case 3:e=2;break;default:e=0}var f;if(c)f=new MouseEvent(a,b);else{f=document.createEvent("MouseEvent");var g={bubbles:!1,cancelable:!1,view:null,detail:null,screenX:0,screenY:0,clientX:0,clientY:0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null};Object.keys(g).forEach(function(a){a in b&&(g[a]=b[a])}),f.initMouseEvent(a,g.bubbles,g.cancelable,g.view,g.detail,g.screenX,g.screenY,g.clientX,g.clientY,g.ctrlKey,g.altKey,g.shiftKey,g.metaKey,g.button,g.relatedTarget)}d||Object.defineProperty(f,"buttons",{get:function(){return e},enumerable:!0});var h=0;return h=b.pressure?b.pressure:e?.5:0,Object.defineProperties(f,{pointerId:{value:b.pointerId||0,enumerable:!0},width:{value:b.width||0,enumerable:!0},height:{value:b.height||0,enumerable:!0},pressure:{value:h,enumerable:!0},tiltX:{value:b.tiltX||0,enumerable:!0},tiltY:{value:b.tiltY||0,enumerable:!0},pointerType:{value:b.pointerType||"",enumerable:!0},hwTimestamp:{value:b.hwTimestamp||0,enumerable:!0},isPrimary:{value:b.isPrimary||!1,enumerable:!0}}),f}var c=!1,d=!1;try{var e=new MouseEvent("click",{buttons:1});c=!0,d=1===e.buttons}catch(f){}a.PointerEvent||(a.PointerEvent=b)}(window),function(a){function b(){this.ids=[],this.pointers=[]}b.prototype={set:function(a,b){var c=this.ids.indexOf(a);c>-1?this.pointers[c]=b:(this.ids.push(a),this.pointers.push(b))},has:function(a){return this.ids.indexOf(a)>-1},"delete":function(a){var b=this.ids.indexOf(a);b>-1&&(this.ids.splice(b,1),this.pointers.splice(b,1))},get:function(a){var b=this.ids.indexOf(a);return this.pointers[b]},get size(){return this.pointers.length},clear:function(){this.ids.length=0,this.pointers.length=0},forEach:function(a,b){this.ids.forEach(function(c,d){a.call(b,c,this.pointers[d],this)},this)}},a.PointerMap=window.Map&&Map.prototype.forEach?Map:b}(window.PointerEventsPolyfill),function(a){var b;if("undefined"!=typeof WeakMap&&navigator.userAgent.indexOf("Firefox/")<0)b=WeakMap;else{var c=Object.defineProperty,d=Object.hasOwnProperty,e=(new Date).getTime()%1e9;b=function(){this.name="__st"+(1e9*Math.random()>>>0)+(e++ +"__")},b.prototype={set:function(a,b){c(a,this.name,{value:b,writable:!0})},get:function(a){return d.call(a,this.name)?a[this.name]:void 0},"delete":function(a){this.set(a,void 0)}}}a.SideTable=b}(window.PointerEventsPolyfill),function(a){var b={targets:new a.SideTable,handledEvents:new a.SideTable,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)},down:function(a){this.fireEvent("pointerdown",a)},move:function(a){this.fireEvent("pointermove",a)},up:function(a){this.fireEvent("pointerup",a)},enter:function(a){a.bubbles=!1,this.fireEvent("pointerenter",a)},leave:function(a){a.bubbles=!1,this.fireEvent("pointerleave",a)},over:function(a){a.bubbles=!0,this.fireEvent("pointerover",a)},out:function(a){a.bubbles=!0,this.fireEvent("pointerout",a)},cancel:function(a){this.fireEvent("pointercancel",a)},leaveOut:function(a){a.target.contains(a.relatedTarget)||this.leave(a),this.out(a)},enterOver:function(a){a.target.contains(a.relatedTarget)||this.enter(a),this.over(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:function(a,b){a.addEventListener(b,this.boundHandler)},removeEvent:function(a,b){a.removeEventListener(b,this.boundHandler)},makeEvent:function(a,b){var c=new PointerEvent(a,b);return 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){var b={};for(var c in a)b[c]=a[c];return b},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:function(a){var b=this.getTarget(a);return b?b.dispatchEvent(a):void 0},asyncDispatchEvent:function(a){setTimeout(this.dispatchEvent.bind(this,a),0)}};b.boundHandler=b.eventHandler.bind(b),a.dispatcher=b,a.register=b.register.bind(b),a.unregister=b.unregister.bind(b)}(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("DOMContentLoaded",this.installNewSubtree.bind(this,document))},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);return 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="touch-action",j="string"==typeof document.head.style.touchAction,k={scrollType:new a.SideTable,events:["touchstart","touchmove","touchend","touchcancel"],register:function(a){j?c.listen(a,this.events):b.enableOnSubtree(a)},unregister:function(a){j&&c.unlisten(a,this.events)},elementAdded:function(a){var b=a.getAttribute(i),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(i),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){null===this.firstTouch&&(this.firstTouch=a.identifier,this.firstXY={X:a.clientX,Y:a.clientY},this.scrolling=!1)},removePrimaryTouch:function(a){this.isPrimaryTouch(a)&&(this.firstTouch=null,this.firstXY=null)},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.button=0,b.buttons=1,b.width=a.webkitRadiusX||a.radiusX||0,b.height=a.webkitRadiusY||a.radiusY||0,b.pressure=a.webkitForce||a.force||.5,b.isPrimary=this.isPrimaryTouch(a),b.pointerType=this.POINTER_TYPE,b},processTouches:function(a,b){var c=a.changedTouches,d=g(c,this.touchToPointer,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.size>=b.length){var c=[];f.forEach(function(a,d){if(1!==a&&!this.findTouch(b,a-2)){var e=d.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.processTouches(a,this.overDown)},overDown:function(a){f.set(a.pointerId,{target:a.target,out:a,outTarget:a.target}),c.over(a),c.down(a)},touchmove:function(a){this.scrolling||(this.shouldScroll(a)?(this.scrolling=!0,this.touchcancel(a)):(a.preventDefault(),this.processTouches(a,this.moveOverOut)))},moveOverOut:function(a){var b=a,d=f.get(b.pointerId);if(d){var e=d.out,g=d.outTarget;c.move(b),e&&g!==b.target&&(e.relatedTarget=b.target,b.relatedTarget=g,e.target=g,b.target?(c.leaveOut(e),c.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)),this.cleanUpPointer(a)},touchcancel:function(a){this.processTouches(a,this.cancelOut)},cancelOut:function(a){c.cancel(a),c.out(a),this.cleanUpPointer(a)},cleanUpPointer:function(a){f.delete(a.pointerId),this.removePrimaryTouch(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)}}};j||(b=new a.Installer(k.elementAdded,k.elementRemoved,k.elementChanged,k)),a.touchEvents=k}(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)}),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){var b;if("undefined"!=typeof WeakMap&&navigator.userAgent.indexOf("Firefox/")<0)b=WeakMap;else{var c=Object.defineProperty,d=Object.hasOwnProperty,e=(new Date).getTime()%1e9;b=function(){this.name="__st"+(1e9*Math.random()>>>0)+(e++ +"__")},b.prototype={set:function(a,b){c(a,this.name,{value:b,writable:!0})},get:function(a){return d.call(a,this.name)?a[this.name]:void 0},"delete":function(a){this.set(a,void 0)}}}a.SideTable=b}(window.PointerGestures),function(a){function b(){this.ids=[],this.pointers=[]}b.prototype={set:function(a,b){var c=this.ids.indexOf(a);c>-1?this.pointers[c]=b:(this.ids.push(a),this.pointers.push(b))},has:function(a){return this.ids.indexOf(a)>-1},"delete":function(a){var b=this.ids.indexOf(a);b>-1&&(this.ids.splice(b,1),this.pointers.splice(b,1))},get:function(a){var b=this.ids.indexOf(a);return this.pointers[b]},get size(){return this.pointers.length},clear:function(){this.ids.length=0,this.pointers.length=0}},window.Map&&(b=window.Map),a.PointerMap=b}(window.PointerGestures),function(a){var b={handledEvents:new a.SideTable,targets:new a.SideTable,handlers:{},recognizers:{},events:["pointerdown","pointermove","pointerup","pointerover","pointerout","pointercancel"],registerRecognizer:function(a,b){var c=b;this.recognizers[a]=c,this.events.forEach(function(a){if(c[a]){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(this.events,a)},unregisterTarget:function(a){this.unlisten(this.events,a)},eventHandler:function(a){if(!this.handledEvents.get(a)){var b,c=a.type;(b=this.handlers[c])&&this.makeQueue(b,a),this.handledEvents.set(a,!0)}},makeQueue:function(a,b){var c=this.cloneEvent(b);setTimeout(this.runQueue.bind(this,a,c),0)},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){var b={};for(var c in a)b[c]=a[c];return b},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){var c=function(){this.dispatchEvent(a,b)}.bind(this);setTimeout(c,0)},preventTap:function(a){var b=this.recognizers.tap;b&&b.preventTap(a)}};b.boundHandler=b.eventHandler.bind(b),a.dispatcher=b,a.register=function(b){var c=window.PointerEventsPolyfill;c&&c.register(b),a.dispatcher.registerTarget(b)},b.registerTarget(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};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,pointerType:c.pointerType};"trackend"===a&&(h._releaseTarget=c.target);var 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={events:["pointerdown","pointermove","pointerup","pointercancel"],pointerdown:function(a){a.isPrimary&&!a.tapPrevented&&c.set(a.pointerId,{target:a.target,x:a.clientX,y:a.clientY})},pointermove:function(a){if(a.isPrimary){var b=c.get(a.pointerId);b&&a.tapPrevented&&c.delete(a.pointerId)}},pointerup:function(d){var e=c.get(d.pointerId);if(e&&!d.tapPrevented){var f=a.findLCA(e.target,d.target);if(f){var g=b.makeEvent("tap",{x:d.clientX,y:d.clientY,pointerType:d.pointerType});b.dispatchEvent(g,f)}}c.delete(d.pointerId)},pointercancel:function(a){c.delete(a.pointerId)},preventTap:function(a){c.delete(a)}};b.registerRecognizer("tap",d)}(window.PointerGestures),Polymer={},function(){var a=document.createElement("style");a.textContent="body {opacity: 0;}";var b=document.querySelector("head");b.insertBefore(a,b.firstChild),window.addEventListener("WebComponentsReady",function(){document.body.style.webkitTransition="opacity 0.3s",document.body.style.opacity=1})}(Polymer),function(a){var b=Array.prototype.forEach.call.bind(Array.prototype.forEach),c=Array.prototype.concat.call.bind(Array.prototype.concat),d=Array.prototype.slice.call.bind(Array.prototype.slice),e={hostRuleRe:/@host[^{]*{(([^}]*?{[^{]*?}[\s\S]*?)+)}/gim,selectorRe:/([^{]*)({[\s\S]*?})/gim,hostElementRe:/(.*)((?:\*)|(?:\:scope))(.*)/,hostFixableRe:/^[.\[:]/,cssCommentRe:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,cssPolyfillCommentRe:/\/\*\s*@polyfill ([^*]*\*+([^/*][^*]*\*+)*\/)([^{]*?){/gim,cssPseudoRe:/::(x-[^\s{,(]*)/gim,selectorReSuffix:"([>\\s~+[.,{:][\\s\\S]*)?$",hostRe:/@host/gim,cache:{},shimStyling:function(a){if(window.ShadowDOMPolyfill&&a){var b=a.getAttribute("name");e.cacheDefinition(a),e.shimPolyfillDirectives(a.styles,b),Polymer.strictPolyfillStyling&&e.applyScopeToContent(a.templateContent(),b),e.applyShimming(e.stylesForElement(a),b)}},shimShadowDOMStyling:function(a,b){window.ShadowDOMPolyfill&&(e.shimPolyfillDirectives(a,b),e.applyShimming(a,b))},applyShimming:function(a,b){var c=this.shimAtHost(a,b);c+=this.shimScoping(a,b),this.addCssToDocument(c)},cacheDefinition:function(a){var b=a.getAttribute("name"),c=a.templateContent(),f=c&&c.querySelectorAll("style");a.styles=f?d(f):[],e.cache[b]=a},applyScopeToContent:function(a,c){a&&(b(a.querySelectorAll("*"),function(a){a.setAttribute(c,"")}),b(a.querySelectorAll("template"),function(a){this.applyScopeToContent(templateContent(a),c)},this))},stylesForElement:function(a){var b=a.styles,e=a.templateContent(),f=e&&e.querySelector("shadow");if(f||null===e){var g=this.findExtendee(a.getAttribute("name"));if(g){var h=this.stylesForElement(g);b=c(d(h),d(b))}}return b},findExtendee:function(a){var b=this.cache[a];return b&&this.cache[b.getAttribute("extends")]},shimPolyfillDirectives:function(a,c){window.ShadowDOMPolyfill&&a&&b(a,function(a){a.textContent=this.convertPolyfillDirectives(a.textContent,c)},this)},shimAtHost:function(a,b){return a?this.convertAtHostStyles(a,b):void 0},shimScoping:function(a,b){return a?this.convertScopedStyles(a,b):void 0},convertPolyfillDirectives:function(a,b){for(var c,d,e="",f=0;c=this.cssPolyfillCommentRe.exec(a);)e+=a.substring(f,c.index),d=c[1].slice(0,-2).replace(this.hostRe,b),e+=this.scopeSelector(d,b)+"{",f=this.cssPolyfillCommentRe.lastIndex;return e+=a.substring(f,a.length)},findAtHostRules:function(a,b){return Array.prototype.filter.call(a,this.isHostRule.bind(this,b))},isHostRule:function(a,b){return b.selectorText&&b.selectorText.match(a)||b.cssRules&&this.findAtHostRules(b.cssRules,a).length||b.type==CSSRule.WEBKIT_KEYFRAMES_RULE},convertAtHostStyles:function(a,b){for(var c,d=this.stylesToCssText(a),e="",f=0;c=this.hostRuleRe.exec(d);)e+=d.substring(f,c.index),e+=this.scopeHostCss(c[1],b),f=this.hostRuleRe.lastIndex;e+=d.substring(f,d.length);var g=new RegExp("^"+b+this.selectorReSuffix,"m"),d=this.rulesToCss(this.findAtHostRules(this.cssToRules(e),g));return d},scopeHostCss:function(a,b){for(var c,d="";c=this.selectorRe.exec(a);)d+=this.scopeHostSelector(c[1],b)+" "+c[2]+"\n ";return d},scopeHostSelector:function(a,b){var c=[],d=a.split(","),e="[is="+b+"]";return d.forEach(function(a){a=a.trim(),a.match(this.hostElementRe)?a=a.replace(this.hostElementRe,b+"$1$3, "+e+"$1$3"):a.match(this.hostFixableRe)&&(a=b+a+", "+e+a),c.push(a)},this),c.join(", ")},convertScopedStyles:function(a,c){b(a,function(a){a.parentNode&&a.parentNode.removeChild(a)});var d=this.stylesToCssText(a).replace(this.hostRuleRe,"");d=this.convertPseudos(d);var e=this.cssToRules(d);return d=this.scopeRules(e,c)},convertPseudos:function(a){return a.replace(this.cssPseudoRe," [pseudo=$1]")},scopeRules:function(a,c){var d="";return b(a,function(a){a.selectorText&&a.style&&a.style.cssText?(d+=this.scopeSelector(a.selectorText,c,Polymer.strictPolyfillStyling)+" {\n ",d+=this.propertiesFromRule(a)+"\n}\n\n"):a.media?(d+="@media "+a.media.mediaText+" {\n",d+=this.scopeRules(a.cssRules,c),d+="\n}\n\n"):a.cssText&&(d+=a.cssText+"\n\n")},this),d},propertiesFromRule:function(a){var b=a.style.cssText;return a.style.content&&!a.style.content.match(/['"]+/)&&(b="content: '"+a.style.content+"';\n"+a.style.cssText.replace(/content:[^;]*;/g,"")),b},selectorNeedsScoping:function(a,b){var c="("+b+"|\\[is="+b+"\\])",d=new RegExp("^"+c+this.selectorReSuffix,"m");return!a.match(d)},scopeSelector:function(a,b,c){var d=[],e=a.split(",");return e.forEach(function(a){a=a.trim(),this.selectorNeedsScoping(a,b)&&(a=c?this.applyStrictSelectorScope(a,b):this.applySimpleSelectorScope(a,b)),d.push(a)},this),d.join(", ")},applySimpleSelectorScope:function(a,b){return b+" "+a+", "+"[is="+b+"] "+a},applyStrictSelectorScope:function(a,b){var c=[" ",">","+","~"],d=a,e="["+b+"]";return c.forEach(function(a){var b=d.split(a);d=b.map(function(a){var b=a.trim();return b&&c.indexOf(b)<0&&b.indexOf(e)<0&&(a=b.replace(/([^:]*)(:*)(.*)/,"$1"+e+"$2$3")),a}).join(a)}),d},stylesToCssText:function(a,c){var d="";return b(a,function(a){d+=a.textContent+"\n\n"}),c||(d=this.stripCssComments(d)),d},stripCssComments:function(a){return a.replace(this.cssCommentRe,"")},cssToRules:function(a){var b=document.createElement("style");b.textContent=a,document.head.appendChild(b);var c=b.sheet.cssRules;return b.parentNode.removeChild(b),c},rulesToCss:function(a){for(var b=0,c=[];b<a.length;b++)c.push(a[b].cssText);return c.join("\n\n")},addCssToDocument:function(a){a&&this.getSheet().appendChild(document.createTextNode(a))},getSheet:function(){return this.sheet||(this.sheet=document.createElement("style"),this.sheet.setAttribute("polymer-polyfill","")),this.sheet},addSheetToDocument:function(){this.addCssToDocument("style { display: none !important; }\n");var a=document.querySelector("head");a.insertBefore(this.getSheet(),a.childNodes[0])}};window.ShadowDOMPolyfill&&e.addSheetToDocument(),a.shimStyling=e.shimStyling,a.shimShadowDOMStyling=e.shimShadowDOMStyling,a.shimPolyfillDirectives=e.shimPolyfillDirectives.bind(e),a.strictPolyfillStyling=!1}(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&&(a[c].nom=c))}),a}a.extend=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)},HTMLImports.importer.preloadSelectors+=", polymer-element link[rel=stylesheet]"}(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 String(b)===a?b:a},object:function(a,b){if(!b)return a;try{return JSON.parse(a.replace(/'/g,'"'))}catch(c){return a}}};a.deserializeValue=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};c.prototype={go:function(a,b){this.callback=a,this.handle=setTimeout(this.complete.bind(this),b)},stop:function(){this.handle&&(clearTimeout(this.handle),this.handle=null)},complete:function(){this.handle&&(this.stop(),this.callback.call(this.context))}},a.job=b}(Polymer),function(a){function b(a){var c=b.caller,f=c.nom;"_super"in c||(f||(f=e.call(this,c)),f||console.warn("called super() on a method not installed declaratively (has no .nom property)"),d(c,f,Object.getPrototypeOf(this)));var g=c._super;if(g){var h=g[f];return"_super"in h||d(h,f,g),h.apply(this,a||[])}}function c(a,b,c){for(;a&&(!a.hasOwnProperty(b)||a[b]===c);)a=Object.getPrototypeOf(a);return 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){console.warn("nameInThis called");for(var b=this;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(g.value==a)return c}b=b.__proto__}}a.super=b}(Polymer),function(a){var b={};b.declaration={},b.instance={},a.api=b}(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);return c?setTimeout(d,c):requestAnimationFrame(d)},fire:function(a,b,c,d){var e=c||this;return e.dispatchEvent(new CustomEvent(a,{bubbles:void 0!==d?!1:!0,detail:b})),b},asyncFire:function(){this.asyncMethod("fire",arguments)},classFollows:function(a,b,c){b&&b.classList.remove(c),a&&a.classList.add(c)}};b.asyncMethod=b.async,a.api.instance.utils=b}(Polymer),function(a){function b(a,b){b.cancelBubble||(b.on=i+b.type,h.events&&console.group("[%s]: listenLocal [%s]",a.localName,b.on),!b.path||window.ShadowDOMPolyfill?d(a,b):c(a,b),h.events&&console.groupEnd())}function c(a,b){var c=null;Array.prototype.some.call(b.path,function(d){return d===a?!0:(c=c===a?c:e(d),c&&f(c,d,b)?!0:void 0)},this)}function d(a,b){h.events&&console.log("event.path() not supported for",b.type);for(var c=b.target,d=null;c&&c!=a;){if(d=d===a?d:e(c),d&&f(d,c,b))return!0;c=c.parentNode}}function e(a){for(;a.parentNode;)a=a.parentNode;return a.host}function f(a,b,c){var d=b.getAttribute&&b.getAttribute(c.on);return d&&g(b,c)&&(h.events&&console.log("[%s] found handler name [%s]",a.localName,d),a.dispatchMethod(b,d,[c,c.detail,b])),c.cancelBubble}function g(a,b){var c=l.get(b);return c||l.set(b,c=[]),c.indexOf(a)<0?(c.push(a),!0):void 0}var h=window.logFlags||{},i="on-",j="eventDelegates",k={EVENT_PREFIX:i,DELEGATES:j,addHostListeners:function(){var a=this[j];h.events&&Object.keys(a).length>0&&console.log("[%s] addHostListeners:",this.localName,a),this.addNodeListeners(this,a,this.hostEventListener)},addInstanceListeners:function(a,b){var c=b.delegates;c&&(h.events&&Object.keys(c).length>0&&console.log("[%s:root] addInstanceListeners:",this.localName,c),this.addNodeListeners(a,c,this.instanceEventListener))},addNodeListeners:function(a,b,c){var d;for(var e in b)d||(d=c.bind(this)),a.addEventListener(e,d)},hostEventListener:function(a){if(!a.cancelBubble){h.events&&console.group("[%s]: hostEventListener(%s)",this.localName,a.type);var b=this.findEventDelegate(a);b&&(h.events&&console.log("[%s] found host handler name [%s]",this.localName,b),this.dispatchMethod(this,b,[a,a.detail,this])),h.events&&console.groupEnd()}},findEventDelegate:function(a){return this[j][a.type]},dispatchMethod:function(a,b,c){if(a){h.events&&console.group("[%s] dispatch [%s]",a.localName,b);var d=this[b];d&&d[c?"apply":"call"](this,c),h.events&&console.groupEnd()}},instanceEventListener:function(a){b(this,a)}},l=new SideTable("handledList");a.api.instance.events=k}(Polymer),function(a){function b(a,b){var c=this[a]||a;"function"==typeof c&&c.apply(this,b)}function c(a,b,c,d){h.bind&&console.log(n,c.localName||"object",d,a.localName,b);var e=PathObserver.getValueAtPath(c,d);return(null===e||void 0===e)&&PathObserver.setValueAtPath(c,d,a[b]),PathObserver.defineProperty(a,b,{object:c,path:d})}function d(a,b,c){var d=g(a);d[b]=c}function e(a,b){var c=g(a);return c&&c[b]?(c[b].close(),c[b]=null,!0):void 0}function f(a){var b=g(a);Object.keys(b).forEach(function(a){b[a].close(),b[a]=null})}function g(a){var b=k.get(a);return b||k.set(a,b={}),b}var h=window.logFlags||{},i="Changed",j={observeProperties:function(){for(var a,b=this.getCustomPropertyNames(),c=0,d=b.length;d>c&&(a=b[c]);c++)this.observeProperty(a)},getCustomPropertyNames:function(){return this.customPropertyNames},observeProperty:function(a){if(this.shouldObserveProperty(a)){h.watch&&console.log(l,this.localName,a);var b=function(b,c){h.watch&&console.log(m,this.localName,this.id||"",a,this[a],c),this.dispatchPropertyChange(a,c)}.bind(this),c=new PathObserver(this,a,b);d(this,a,c)}},bindProperty:function(a,b,d){return c(this,a,b,d)},unbindProperty:function(a,b){return e(this,a,b)},unbindAllProperties:function(){f(this)},shouldObserveProperty:function(a){return Boolean(this[a+i])},dispatchPropertyChange:function(a,c){b.call(this,a+i,[c])}},k=new SideTable,l="[%s] watching [%s]",m="[%s#%s] watch: [%s] now [%s] was [%s]",n="[%s]: bindProperties: [%s] to [%s].[%s]";a.api.instance.properties=j}(Polymer),function(a){var b="__published",c="__instance_attributes",d={PUBLISHED:b,INSTANCE_ATTRIBUTES:c,copyInstanceAttributes:function(){var a=this[c];for(var b in a)this.setAttribute(b,a[b])},takeAttributes:function(){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.search(a.bindPattern)>=0)return;var d=this[b],c=this.deserializeValue(c,d);c!==d&&(this[b]=c)}},propertyForAttribute:function(a){var c=Object.keys(this[b]);return c[c.map(e).indexOf(a.toLowerCase())]},deserializeValue:function(b,c){return a.deserializeValue(b,c)}},e=String.prototype.toLowerCase.call.bind(String.prototype.toLowerCase);a.api.instance.attributes=d}(Polymer),function(a){function b(a){d(a,c)}function c(a){a.unbindAll()}function d(a,b){if(a){b(a);for(var c=a.firstChild;c;c=c.nextSibling)d(c,b)}}var e=window.logFlags||0,f=new ExpressionSyntax,g={instanceTemplate:function(a){return a.createInstance(this,f)},createBinding:function(a,b,c){var d=this.propertyForAttribute(a);if(d){var e=this.bindProperty(d,b,c);return e.path=c,e}return this.super(arguments)},asyncUnbindAll:function(){this._unbound||(e.unbind&&console.log("[%s] asyncUnbindAll",this.localName),this._unbindAllJob=this.job(this._unbindAllJob,this.unbindAll,0))},unbindAll:function(){this._unbound||(this.unbindAllProperties(),this.super(),b(this.shadowRoot),this._unbound=!0)},cancelUnbindAll:function(a){return this._unbound?(e.unbind&&console.warn("[%s] already unbound, cannot cancel unbindAll",this.localName),void 0):(e.unbind&&console.log("[%s] cancelUnbindAll",this.localName),this._unbindAllJob&&(this._unbindAllJob=this._unbindAllJob.stop()),a||d(this.shadowRoot,function(a){a.cancelUnbindAll&&a.cancelUnbindAll()}),void 0)},insertedCallback:function(){this.cancelUnbindAll(!0),this.inserted&&this.inserted()},removedCallback:function(){this.asyncUnbindAll(),this.removed&&this.removed()}},h=/\{\{([^{}]*)}}/;a.bindPattern=h,a.api.instance.mdv=g}(Polymer),function(a){function b(a){return a.hasOwnProperty("PolymerBase")}function c(){}var d={PolymerBase:!0,job:Polymer.job,"super":Polymer.super,ready:function(){},readyCallback:function(){this.observeProperties(),this.copyInstanceAttributes(),this.takeAttributes(),this.addHostListeners(),this.parseElements(this.__proto__),this.asyncUnbindAll(),this.ready()},parseElements:function(a){a&&a.element&&(this.parseElements(a.__proto__),a.parseElement.call(this,a.element))},parseElement:function(a){this.shadowFromTemplate(this.fetchTemplate(a))},fetchTemplate:function(a){return a.querySelector("template")},shadowFromTemplate:function(a){if(a){var b=this.shadowRoot,c=this.createShadowRoot();c.olderShadowRoot=b,c.applyAuthorStyles=this.applyAuthorStyles,c.resetStyleInheritance=this.resetStyleInheritance,c.host=this;var d=this.instanceTemplate(a);return c.appendChild(d),this.shadowRootReady(c,a),CustomElements.watchShadow(this),c}},shadowRootReady:function(a,b){this.marshalNodeReferences(a),this.addInstanceListeners(a,b),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(){this.attributeChanged&&this.attributeChanged.apply(this,arguments)}};c.prototype=d,d.constructor=c,a.Base=c,a.isBase=b,a.api.instance.base=d}(Polymer),function(a){window.logFlags||{};var b="element",c="controller",d={STYLE_SCOPE_ATTRIBUTE:b,installControllerStyles:function(){var a=this.findStyleController();if(a&&!this.scopeHasElementStyle(a,c)){for(var b=Object.getPrototypeOf(this),d="";b&&b.element;)d+=b.element.cssTextForScope(c),b=Object.getPrototypeOf(b);if(d){var e=this.element.cssTextToScopeStyle(d,c);window.ShadowDOMPolyfill&&Platform.ShadowCSS.shimPolyfillDirectives([e],this.localName),Polymer.applyStyleToScope(e,a)}}},scopeHasElementStyle:function(a,c){var d=b+"="+this.localName+"-"+c;return a.querySelector("style["+d+"]")},findStyleController:function(){if(window.ShadowDOMPolyfill)return wrap(document.head);for(var a=this;a.parentNode;)a=a.parentNode;return a===document?document.head:a}};a.api.instance.styles=d}(Polymer),function(a){var b={addResolvePathApi:function(){var a=this.elementPath();this.prototype.resolvePath=function(b){return a+b}},elementPath:function(){return this.urlToPath(HTMLImports.getDocumentUrl(this.ownerDocument))},urlToPath:function(a){if(a){var b=a.split("/");return b.pop(),b.push(""),b.join("/")}return""}};a.api.declaration.path=b}(Polymer),function(a){function b(a,b){if(a){var d=c(a.textContent),e=a.getAttribute(g);e&&d.setAttribute(g,e),b.appendChild(d)}}function c(a){var b=document.createElement("style");return b.textContent=a,b}function d(a){return a&&a.__resource||""}function e(a,b){return n?n.call(a,b):void 0}window.logFlags||{};var f=a.api.instance.styles,g=f.STYLE_SCOPE_ATTRIBUTE,h="style",i="[rel=stylesheet]",j="global",k="polymer-scope",l={installSheets:function(){this.cacheSheets(),this.installLocalSheets(),this.installGlobalStyles()},cacheSheets:function(){this.sheets=this.findNodes(i),this.sheets.forEach(function(a){a.parentNode&&a.parentNode.removeChild(a)})},installLocalSheets:function(){var a=this.sheets.filter(function(a){return!a.hasAttribute(k)}),b=this.templateContent();if(b){var e="";a.forEach(function(a){e+=d(a)+"\n"}),e&&b.insertBefore(c(e),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(j);b(a,document.head)},cssTextForScope:function(a){var b="",c="["+k+"="+a+"]",f=function(a){return e(a,c)},g=this.sheets.filter(f);g.forEach(function(a){b+=d(a)+"\n\n"});var i=this.findNodes(h,f);return i.forEach(function(a){a.parentNode.removeChild(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 d=c(a);return d.setAttribute(g,this.getAttribute("name")+"-"+b),d}}},m=HTMLElement.prototype,n=m.matches||m.matchesSelector||m.webkitMatchesSelector||m.mozMatchesSelector;a.api.declaration.styles=l,a.applyStyleToScope=b}(Polymer),function(a){function b(a){return a.slice(0,k)==g}function c(a){return a.slice(k)}function d(a){return a.ref?a.ref.content:a.content}var e=a.api.instance.events,f=e.DELEGATES,g=e.EVENT_PREFIX,h=window.logFlags||{},i={inheritDelegates:function(a){this.inheritObject(a,f)},parseHostEvents:function(){var a=this.prototype[f];this.addAttributeDelegates(a)},addAttributeDelegates:function(a){for(var d,e=0;d=this.attributes[e];e++)b(d.name)&&(a[c(d.name)]=d.value)},parseLocalEvents:function(){this.querySelectorAll("template").forEach(function(a){a.delegates={},this.accumulateTemplatedEvents(a,a.delegates),h.events&&console.log("[%s] parseLocalEvents:",this.attributes.name.value,a.delegates)},this)},accumulateTemplatedEvents:function(a,b){if("template"===a.localName){var c=d(a);c&&this.accumulateChildEvents(c,b)}},accumulateChildEvents:function(a,b){a.childNodes.forEach(function(a){this.accumulateEvents(a,b)},this)},accumulateEvents:function(a,b){return this.accumulateAttributeEvents(a,b),this.accumulateChildEvents(a,b),this.accumulateTemplatedEvents(a,b),b},accumulateAttributeEvents:function(a,d){a.attributes&&a.attributes.forEach(function(a){b(a.name)&&this.accumulateEvent(c(a.name),d)},this)},accumulateEvent:function(a,b){a=j[a]||a,b[a]=b[a]||1}},j={webkitanimationstart:"webkitAnimationStart",webkitanimationend:"webkitAnimationEnd",webkittransitionend:"webkitTransitionEnd",domfocusout:"DOMFocusOut",domfocusin:"DOMFocusIn"},k=g.length;i.event_translations=j,a.api.declaration.events=i}(Polymer),function(a){var b=[],c={cacheProperties:function(){this.prototype.customPropertyNames=this.getCustomPropertyNames(this.prototype)},getCustomPropertyNames:function(c){for(var d,e={};c&&!a.isBase(c);){for(var f,g=Object.getOwnPropertyNames(c),h=0,i=g.length;i>h&&(f=g[h]);h++)e[f]=!0,d=!0;c=c.__proto__}return d?Object.keys(e):b}};a.api.declaration.properties=c}(Polymer),function(a){var b=a.api.instance.attributes,c=b.PUBLISHED,d=b.INSTANCE_ATTRIBUTES,e="publish",f="attributes",g={inheritAttributesObjects:function(a){this.inheritObject(a,c),this.inheritObject(a,d)},parseAttributes:function(){this.publishAttributes(this.prototype),this.publishProperties(this.prototype),this.accumulateInstanceAttributes()},publishAttributes:function(a){var b=a[c],d=this.getAttribute(f);if(d){var e=d.split(d.indexOf(",")>=0?",":" ");e.forEach(function(a){a=a.trim(),!a||a in b||(b[a]=null)})}Object.keys(b).forEach(function(c){c in a||(a[c]=b[c])})},publishProperties:function(a){this.publishPublish(a)},publishPublish:function(a){if(a.hasOwnProperty(e)){var b=a[e];b&&(Object.keys(b).forEach(function(c){a[c]=b[c]}),Platform.mixin(a[c],b))}},accumulateInstanceAttributes:function(){var a=this.prototype[d];this.attributes.forEach(function(b){this.isInstanceAttribute(b.name)&&(a[b.name]=b.value)},this)},isInstanceAttribute:function(a){return!this.blackList[a]&&"on-"!==a.slice(0,3)},blackList:{name:1,"extends":1,constructor:1}};g.blackList[f]=1,a.api.declaration.attributes=g}(Polymer),function(a){function b(a,b){f[a]=b}function c(a){return Object.create(HTMLElement.getPrototypeForTag(a))}var d=Polymer.extend,e=a.api.declaration,f={},g=c();d(g,{readyCallback:function(){var a=this.getAttribute("name"),b=this.getAttribute("extends");this.prototype=this.generateCustomPrototype(a,b),this.prototype.element=this,this.addResolvePathApi(),this.desugar(),window.ShadowDOMPolyfill&&Platform.ShadowCSS.shimStyling(this.templateContent(),a,b),this.register(a),this.publishConstructor()},desugar:function(){this.parseAttributes(),this.parseHostEvents(),this.parseLocalEvents(),this.installSheets(),this.prototype.registerCallback&&this.prototype.registerCallback(this),this.cacheProperties()},generateCustomPrototype:function(a,b){var c=this.generateBasePrototype(b);return this.addNamedApi(c,a)},generateBasePrototype:function(a){var b=c(a);return this.ensureBaseApi(b)},ensureBaseApi:function(b){return b.PolymerBase||(Object.keys(a.api.instance).forEach(function(c){d(b,a.api.instance[c])}),b=Object.create(b)),this.inheritAttributesObjects(b),this.inheritDelegates(b),b},addNamedApi:function(a,b){return d(a,f[b])},inheritObject:function(a,b){a[b]=d({},a.__proto__[b])},register:function(a){this.ctor=document.register(a,{prototype:this.prototype}),this.prototype.constructor=this.ctor,HTMLElement.register(a,this.prototype)},publishConstructor:function(){var a=this.getAttribute("constructor");a&&(window[a]=this.ctor)}}),Object.keys(e).forEach(function(a){d(g,e[a])}),document.register("polymer-element",{prototype:g}),d(b,window.Polymer),window.Polymer=b}(Polymer);
/*
//@ sourceMappingURL=polymer.min.js.map
*/ \ No newline at end of file
diff --git a/third_party/sqlite/src/src/recover.c b/third_party/sqlite/src/src/recover.c
deleted file mode 100644
index 6678fea7bb..0000000000
--- a/third_party/sqlite/src/src/recover.c
+++ /dev/null
@@ -1,803 +0,0 @@
-/*
-** 2012 Jan 11
-**
-** The author disclaims copyright to this source code. In place of
-** a legal notice, here is a blessing:
-**
-** May you do good and not evil.
-** May you find forgiveness for yourself and forgive others.
-** May you share freely, never taking more than you give.
-*/
-/* TODO(shess): THIS MODULE IS STILL EXPERIMENTAL. DO NOT USE IT. */
-/* Implements a virtual table "recover" which can be used to recover
- * data from a corrupt table. The table is walked manually, with
- * corrupt items skipped. Additionally, any errors while reading will
- * be skipped.
- *
- * Given a table with this definition:
- *
- * CREATE TABLE Stuff (
- * name TEXT PRIMARY KEY,
- * value TEXT NOT NULL
- * );
- *
- * to recover the data from teh table, you could do something like:
- *
- * -- Attach another database, the original is not trustworthy.
- * ATTACH DATABASE '/tmp/db.db' AS rdb;
- * -- Create a new version of the table.
- * CREATE TABLE rdb.Stuff (
- * name TEXT PRIMARY KEY,
- * value TEXT NOT NULL
- * );
- * -- This will read the original table's data.
- * CREATE VIRTUAL TABLE temp.recover_Stuff using recover(
- * main.Stuff,
- * name TEXT STRICT NOT NULL, -- only real TEXT data allowed
- * value TEXT STRICT NOT NULL
- * );
- * -- Corruption means the UNIQUE constraint may no longer hold for
- * -- Stuff, so either OR REPLACE or OR IGNORE must be used.
- * INSERT OR REPLACE INTO rdb.Stuff (rowid, name, value )
- * SELECT rowid, name, value FROM temp.recover_Stuff;
- * DROP TABLE temp.recover_Stuff;
- * DETACH DATABASE rdb;
- * -- Move db.db to replace original db in filesystem.
- *
- *
- * Usage
- *
- * Given the goal of dealing with corruption, it would not be safe to
- * create a recovery table in the database being recovered. So
- * recovery tables must be created in the temp database. They are not
- * appropriate to persist, in any case. [As a bonus, sqlite_master
- * tables can be recovered. Perhaps more cute than useful, though.]
- *
- * The parameters are a specifier for the table to read, and a column
- * definition for each bit of data stored in that table. The named
- * table must be convertable to a root page number by reading the
- * sqlite_master table. Bare table names are assumed to be in
- * database 0 ("main"), other databases can be specified in db.table
- * fashion.
- *
- * Column definitions are similar to BUT NOT THE SAME AS those
- * provided to CREATE statements:
- * column-def: column-name [type-name [STRICT] [NOT NULL]]
- * type-name: (ANY|ROWID|INTEGER|FLOAT|NUMERIC|TEXT|BLOB)
- *
- * Only those exact type names are accepted, there is no type
- * intuition. The only constraints accepted are STRICT (see below)
- * and NOT NULL. Anything unexpected will cause the create to fail.
- *
- * ANY is a convenience to indicate that manifest typing is desired.
- * It is equivalent to not specifying a type at all. The results for
- * such columns will have the type of the data's storage. The exposed
- * schema will contain no type for that column.
- *
- * ROWID is used for columns representing aliases to the rowid
- * (INTEGER PRIMARY KEY, with or without AUTOINCREMENT), to make the
- * concept explicit. Such columns are actually stored as NULL, so
- * they cannot be simply ignored. The exposed schema will be INTEGER
- * for that column.
- *
- * NOT NULL causes rows with a NULL in that column to be skipped. It
- * also adds NOT NULL to the column in the exposed schema. If the
- * table has ever had columns added using ALTER TABLE, then those
- * columns implicitly contain NULL for rows which have not been
- * updated. [Workaround using COALESCE() in your SELECT statement.]
- *
- * The created table is read-only, with no indices. Any SELECT will
- * be a full-table scan, returning each valid row read from the
- * storage of the backing table. The rowid will be the rowid of the
- * row from the backing table. "Valid" means:
- * - The cell metadata for the row is well-formed. Mainly this means that
- * the cell header info describes a payload of the size indicated by
- * the cell's payload size.
- * - The cell does not run off the page.
- * - The cell does not overlap any other cell on the page.
- * - The cell contains doesn't contain too many columns.
- * - The types of the serialized data match the indicated types (see below).
- *
- *
- * Type affinity versus type storage.
- *
- * http://www.sqlite.org/datatype3.html describes SQLite's type
- * affinity system. The system provides for automated coercion of
- * types in certain cases, transparently enough that many developers
- * do not realize that it is happening. Importantly, it implies that
- * the raw data stored in the database may not have the obvious type.
- *
- * Differences between the stored data types and the expected data
- * types may be a signal of corruption. This module makes some
- * allowances for automatic coercion. It is important to be concious
- * of the difference between the schema exposed by the module, and the
- * data types read from storage. The following table describes how
- * the module interprets things:
- *
- * type schema data STRICT
- * ---- ------ ---- ------
- * ANY <none> any any
- * ROWID INTEGER n/a n/a
- * INTEGER INTEGER integer integer
- * FLOAT FLOAT integer or float float
- * NUMERIC NUMERIC integer, float, or text integer or float
- * TEXT TEXT text or blob text
- * BLOB BLOB blob blob
- *
- * type is the type provided to the recover module, schema is the
- * schema exposed by the module, data is the acceptable types of data
- * decoded from storage, and STRICT is a modification of that.
- *
- * A very loose recovery system might use ANY for all columns, then
- * use the appropriate sqlite3_column_*() calls to coerce to expected
- * types. This doesn't provide much protection if a page from a
- * different table with the same column count is linked into an
- * inappropriate btree.
- *
- * A very tight recovery system might use STRICT to enforce typing on
- * all columns, preferring to skip rows which are valid at the storage
- * level but don't contain the right types. Note that FLOAT STRICT is
- * almost certainly not appropriate, since integral values are
- * transparently stored as integers, when that is more efficient.
- *
- * Another option is to use ANY for all columns and inspect each
- * result manually (using sqlite3_column_*). This should only be
- * necessary in cases where developers have used manifest typing (test
- * to make sure before you decide that you aren't using manifest
- * typing!).
- *
- *
- * Caveats
- *
- * Leaf pages not referenced by interior nodes will not be found.
- *
- * Leaf pages referenced from interior nodes of other tables will not
- * be resolved.
- *
- * Rows referencing invalid overflow pages will be skipped.
- *
- * SQlite rows have a header which describes how to interpret the rest
- * of the payload. The header can be valid in cases where the rest of
- * the record is actually corrupt (in the sense that the data is not
- * the intended data). This can especially happen WRT overflow pages,
- * as lack of atomic updates between pages is the primary form of
- * corruption I have seen in the wild.
- */
-/* TODO(shess): It might be useful to allow DEFAULT in types to
- * specify what to do for NULL when an ALTER TABLE case comes up.
- * Unfortunately, simply adding it to the exposed schema and using
- * sqlite3_result_null() does not cause the default to be generate.
- * Handling it ourselves seems hard, unfortunately.
- */
-
-#include <assert.h>
-#include <ctype.h>
-#include <stdio.h>
-#include <string.h>
-
-/* Internal things that are used:
- * u32, u64, i64 types.
- * Btree, Pager, and DbPage structs.
- * DbPage.pData, .pPager, and .pgno
- * sqlite3 struct.
- * sqlite3BtreePager() and sqlite3BtreeGetPageSize()
- * sqlite3PagerAcquire() and sqlite3PagerUnref()
- * getVarint32() and getVarint().
- */
-#include "sqliteInt.h"
-
-/* For debugging. */
-#if 0
-#define FNENTRY() fprintf(stderr, "In %s\n", __FUNCTION__)
-#else
-#define FNENTRY()
-#endif
-
-/* Generic constants and helper functions. */
-
-/* Accepted types are specified by a mask. */
-#define MASK_ROWID (1<<0)
-#define MASK_INTEGER (1<<1)
-#define MASK_FLOAT (1<<2)
-#define MASK_TEXT (1<<3)
-#define MASK_BLOB (1<<4)
-#define MASK_NULL (1<<5)
-
-/* TODO(shess): In the future, these will be used more often. For
- * now, just pretend they're useful.
- */
-
-/* True if iSerialType refers to a blob. */
-static int SerialTypeIsBlob(u64 iSerialType){
- assert( iSerialType>=12 );
- return (iSerialType%2)==0;
-}
-
-/* Returns true if the serialized type represented by iSerialType is
- * compatible with the given type mask.
- */
-static int SerialTypeIsCompatible(u64 iSerialType, unsigned char mask){
- switch( iSerialType ){
- case 0 : return (mask&MASK_NULL)!=0;
- case 1 : return (mask&MASK_INTEGER)!=0;
- case 2 : return (mask&MASK_INTEGER)!=0;
- case 3 : return (mask&MASK_INTEGER)!=0;
- case 4 : return (mask&MASK_INTEGER)!=0;
- case 5 : return (mask&MASK_INTEGER)!=0;
- case 6 : return (mask&MASK_INTEGER)!=0;
- case 7 : return (mask&MASK_FLOAT)!=0;
- case 8 : return (mask&MASK_INTEGER)!=0;
- case 9 : return (mask&MASK_INTEGER)!=0;
- case 10 : assert( !"RESERVED TYPE"); return 0;
- case 11 : assert( !"RESERVED TYPE"); return 0;
- }
- return (mask&(SerialTypeIsBlob(iSerialType) ? MASK_BLOB : MASK_TEXT));
-}
-
-/* Versions of strdup() with return values appropriate for
- * sqlite3_free(). malloc.c has sqlite3DbStrDup()/NDup(), but those
- * need sqlite3DbFree(), which seems intrusive.
- */
-static char *sqlite3_strndup(const char *z, unsigned n){
- if( z==NULL ){
- return NULL;
- }
-
- char *zNew = sqlite3_malloc(n+1);
- if( zNew!=NULL ){
- memcpy(zNew, z, n);
- zNew[n] = '\0';
- }
- return zNew;
-}
-static char *sqlite3_strdup(const char *z){
- if( z==NULL ){
- return NULL;
- }
- return sqlite3_strndup(z, strlen(z));
-}
-
-/* Fetch the page number of zTable in zDb from sqlite_master in zDb,
- * and put it in *piRootPage.
- */
-static int getRootPage(sqlite3 *db, const char *zDb, const char *zTable,
- unsigned *piRootPage){
- if( strcmp(zTable, "sqlite_master")==0 ){
- *piRootPage = 1;
- return SQLITE_OK;
- }
-
- char *zSql = sqlite3_mprintf("SELECT rootpage FROM %s.sqlite_master "
- "WHERE type = 'table' AND tbl_name = %Q",
- zDb, zTable);
- if( !zSql ){
- return SQLITE_NOMEM;
- }
-
- sqlite3_stmt *pStmt = 0;
- int rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);
- sqlite3_free(zSql);
- if( rc!=SQLITE_OK ){
- return rc;
- }
-
- /* Require a result. */
- rc = sqlite3_step(pStmt);
- if( rc==SQLITE_DONE ){
- rc = SQLITE_CORRUPT;
- }else if( rc==SQLITE_ROW ){
- *piRootPage = sqlite3_column_int(pStmt, 0);
-
- /* Require only one result. */
- rc = sqlite3_step(pStmt);
- if( rc==SQLITE_DONE ){
- rc = SQLITE_OK;
- }else if( rc==SQLITE_ROW ){
- rc = SQLITE_CORRUPT;
- }
- }
- sqlite3_finalize(pStmt);
- return rc;
-}
-
-typedef struct Recover Recover;
-struct Recover {
- sqlite3_vtab base;
- sqlite3 *db; /* Host database connection */
- char *zDb; /* Database containing target table */
- char *zTable; /* Target table */
- int nCols; /* Number of columns in target table */
- unsigned char *pTypes; /* Types of columns in target table */
-};
-
-/* Internal helper for deleting the module. */
-static void recoverRelease(Recover *pRecover){
- sqlite3_free(pRecover->zDb);
- sqlite3_free(pRecover->zTable);
- sqlite3_free(pRecover->pTypes);
- memset(pRecover, 0xA5, sizeof(*pRecover));
- sqlite3_free(pRecover);
-}
-
-/* Helper function for initializing the module. Forward-declared so
- * recoverCreate() and recoverConnect() can see it.
- */
-static int recoverInit(
- sqlite3 *, void *, int, const char *const*, sqlite3_vtab **, char **
-);
-
-static int recoverCreate(
- sqlite3 *db,
- void *pAux,
- int argc, const char *const*argv,
- sqlite3_vtab **ppVtab,
- char **pzErr
-){
- FNENTRY();
- return recoverInit(db, pAux, argc, argv, ppVtab, pzErr);
-}
-
-/* This should never be called. */
-static int recoverConnect(
- sqlite3 *db,
- void *pAux,
- int argc, const char *const*argv,
- sqlite3_vtab **ppVtab,
- char **pzErr
-){
- FNENTRY();
- return recoverInit(db, pAux, argc, argv, ppVtab, pzErr);
-}
-
-/* No indices supported. */
-static int recoverBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){
- FNENTRY();
- return SQLITE_OK;
-}
-
-/* Logically, this should never be called. */
-static int recoverDisconnect(sqlite3_vtab *pVtab){
- FNENTRY();
- recoverRelease((Recover*)pVtab);
- return SQLITE_OK;
-}
-
-static int recoverDestroy(sqlite3_vtab *pVtab){
- FNENTRY();
- recoverRelease((Recover*)pVtab);
- return SQLITE_OK;
-}
-
-typedef struct RecoverCursor RecoverCursor;
-struct RecoverCursor {
- sqlite3_vtab_cursor base;
- i64 iRowid; /* TODO(shess): Implement for real. */
- int bEOF;
-};
-
-static int recoverOpen(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor){
- FNENTRY();
-
- Recover *pRecover = (Recover*)pVTab;
-
- unsigned iRootPage = 0;
- int rc = getRootPage(pRecover->db, pRecover->zDb, pRecover->zTable,
- &iRootPage);
- if( rc!=SQLITE_OK ){
- return rc;
- }
-
- /* TODO(shess): Implement some real stuff in here. */
-
- RecoverCursor *pCursor = sqlite3_malloc(sizeof(RecoverCursor));
- if( !pCursor ){
- return SQLITE_NOMEM;
- }
- memset(pCursor, 0, sizeof(*pCursor));
- pCursor->base.pVtab = pVTab;
- pCursor->iRowid = 0;
-
- *ppCursor = (sqlite3_vtab_cursor*)pCursor;
- return SQLITE_OK;
-}
-
-static int recoverClose(sqlite3_vtab_cursor *cur){
- FNENTRY();
- RecoverCursor *pCursor = (RecoverCursor*)cur;
- memset(pCursor, 0xA5, sizeof(*pCursor));
- sqlite3_free(cur);
- return SQLITE_OK;
-}
-
-/* TODO(shess): Some data for purposes of mocking things. Will go
- * away.
- */
-static struct {
- u64 iColType;
- const char *zTypeName;
-} gMockData[] = {
- { 0, "NULL"},
- { 1, "INTEGER"},
- { 7, "FLOAT"},
- { 13, "TEXT"},
- { 12, "BLOB"},
-};
-
-static int recoverNext(sqlite3_vtab_cursor *pVtabCursor){
- FNENTRY();
- RecoverCursor *pCursor = (RecoverCursor*)pVtabCursor;
- Recover *pRecover = (Recover*)pCursor->base.pVtab;
-
- /* iRowid is 1-base, gMockData is 0-based. */
- while( pCursor->iRowid<ArraySize(gMockData) ){
- pCursor->iRowid++;
- if( SerialTypeIsCompatible(gMockData[pCursor->iRowid-1].iColType,
- pRecover->pTypes[pRecover->nCols-1]) ){
- return SQLITE_OK;
- }
- }
- pCursor->bEOF = 1;
- return SQLITE_OK;
-}
-
-static int recoverFilter(
- sqlite3_vtab_cursor *pVtabCursor,
- int idxNum, const char *idxStr,
- int argc, sqlite3_value **argv
-){
- FNENTRY();
- return recoverNext(pVtabCursor);
-}
-
-static int recoverEof(sqlite3_vtab_cursor *pVtabCursor){
- FNENTRY();
- RecoverCursor *pCursor = (RecoverCursor*)pVtabCursor;
- return pCursor->bEOF;
-}
-
-static int recoverColumn(sqlite3_vtab_cursor *cur, sqlite3_context *ctx, int i){
- FNENTRY();
- RecoverCursor *pCursor = (RecoverCursor*)cur;
- Recover *pRecover = (Recover*)pCursor->base.pVtab;
-
- if( i>=pRecover->nCols ){
- return SQLITE_ERROR;
- }
-
- /* ROWID alias. */
- if( (pRecover->pTypes[i]&MASK_ROWID) ){
- sqlite3_result_int64(ctx, pCursor->iRowid);
- return SQLITE_OK;
- }
-
- /* TODO(shess): Replace this with real code. */
- if( pCursor->iRowid<1 || pCursor->iRowid>ArraySize(gMockData)+1 ){
- return SQLITE_ERROR;
- }
- if( i==pRecover->nCols-2 ){
- sqlite3_result_text(ctx, gMockData[pCursor->iRowid-1].zTypeName, -1,
- SQLITE_STATIC);
- }else if( i==pRecover->nCols-1 ){
- switch( gMockData[pCursor->iRowid-1].iColType ){
- case 0 : sqlite3_result_null(ctx); break;
- case 1 : sqlite3_result_int(ctx, 17); break;
- case 7 : sqlite3_result_double(ctx, 3.1415927); break;
- case 13 :
- sqlite3_result_text(ctx, "This is text", -1, SQLITE_STATIC);
- break;
- case 12 :
- sqlite3_result_blob(ctx, "This is a blob", 14, SQLITE_STATIC);
- break;
- }
- }
- return SQLITE_OK;
-}
-
-static int recoverRowid(sqlite3_vtab_cursor *pVtabCursor, sqlite_int64 *pRowid){
- FNENTRY();
- RecoverCursor *pCursor = (RecoverCursor*)pVtabCursor;
- *pRowid = pCursor->iRowid;
- return SQLITE_OK;
-}
-
-static sqlite3_module recoverModule = {
- 0, /* iVersion */
- recoverCreate, /* xCreate - create a table */
- recoverConnect, /* xConnect - connect to an existing table */
- recoverBestIndex, /* xBestIndex - Determine search strategy */
- recoverDisconnect, /* xDisconnect - Disconnect from a table */
- recoverDestroy, /* xDestroy - Drop a table */
- recoverOpen, /* xOpen - open a cursor */
- recoverClose, /* xClose - close a cursor */
- recoverFilter, /* xFilter - configure scan constraints */
- recoverNext, /* xNext - advance a cursor */
- recoverEof, /* xEof */
- recoverColumn, /* xColumn - read data */
- recoverRowid, /* xRowid - read data */
- 0, /* xUpdate - write data */
- 0, /* xBegin - begin transaction */
- 0, /* xSync - sync transaction */
- 0, /* xCommit - commit transaction */
- 0, /* xRollback - rollback transaction */
- 0, /* xFindFunction - function overloading */
- 0, /* xRename - rename the table */
-};
-
-int recoverVtableInit(sqlite3 *db){
- return sqlite3_create_module_v2(db, "recover", &recoverModule, NULL, 0);
-}
-
-/* This section of code is for parsing the create input and
- * initializing the module.
- */
-
-/* Find the next word in zText and place the endpoints in pzWord*.
- * Returns true if the word is non-empty. "Word" is defined as
- * alphanumeric plus '_' at this time.
- */
-static int findWord(const char *zText,
- const char **pzWordStart, const char **pzWordEnd){
- while( isspace(*zText) ){
- zText++;
- }
- *pzWordStart = zText;
- while( isalnum(*zText) || *zText=='_' ){
- zText++;
- }
- int r = zText>*pzWordStart; /* In case pzWordStart==pzWordEnd */
- *pzWordEnd = zText;
- return r;
-}
-
-/* Return true if the next word in zText is zWord, also setting
- * *pzContinue to the character after the word.
- */
-static int expectWord(const char *zText, const char *zWord,
- const char **pzContinue){
- const char *zWordStart, *zWordEnd;
- if( findWord(zText, &zWordStart, &zWordEnd) &&
- strncasecmp(zWord, zWordStart, zWordEnd - zWordStart)==0 ){
- *pzContinue = zWordEnd;
- return 1;
- }
- return 0;
-}
-
-/* Parse the name and type information out of parameter. In case of
- * success, *pzNameStart/End contain the name of the column,
- * *pzTypeStart/End contain the top-level type, and *pTypeMask has the
- * type mask to use for the column.
- */
-static int findNameAndType(const char *parameter,
- const char **pzNameStart, const char **pzNameEnd,
- const char **pzTypeStart, const char **pzTypeEnd,
- unsigned char *pTypeMask){
- if( !findWord(parameter, pzNameStart, pzNameEnd) ){
- return SQLITE_MISUSE;
- }
-
- /* Manifest typing, accept any storage type. */
- if( !findWord(*pzNameEnd, pzTypeStart, pzTypeEnd) ){
- *pzTypeEnd = *pzTypeStart = "";
- *pTypeMask = MASK_INTEGER | MASK_FLOAT | MASK_BLOB | MASK_TEXT | MASK_NULL;
- return SQLITE_OK;
- }
-
- /* strictMask is used for STRICT, strictMask|otherMask if STRICT is
- * not supplied. zReplace provides an alternate type to expose to
- * the caller.
- */
- static struct {
- const char *zName;
- unsigned char strictMask;
- unsigned char otherMask;
- const char *zReplace;
- } kTypeInfo[] = {
- { "ANY",
- MASK_INTEGER | MASK_FLOAT | MASK_BLOB | MASK_TEXT | MASK_NULL,
- 0, "",
- },
- { "ROWID", MASK_INTEGER | MASK_ROWID, 0, "INTEGER", },
- { "INTEGER", MASK_INTEGER | MASK_NULL, 0, NULL, },
- { "FLOAT", MASK_FLOAT | MASK_NULL, MASK_INTEGER, NULL, },
- { "NUMERIC", MASK_INTEGER | MASK_FLOAT | MASK_NULL, MASK_TEXT, NULL, },
- { "TEXT", MASK_TEXT | MASK_NULL, MASK_BLOB, NULL, },
- { "BLOB", MASK_BLOB | MASK_NULL, 0, NULL, },
- };
-
- unsigned i, nNameLen = *pzTypeEnd - *pzTypeStart;
- for( i=0; i<ArraySize(kTypeInfo); ++i ){
- if( strncasecmp(kTypeInfo[i].zName, *pzTypeStart, nNameLen)==0 ){
- break;
- }
- }
- if( i==ArraySize(kTypeInfo) ){
- return SQLITE_MISUSE;
- }
-
- const char *zEnd = *pzTypeEnd;
- int bStrict = 0;
- if( expectWord(zEnd, "STRICT", &zEnd) ){
- /* TODO(shess): Ick. But I don't want another single-purpose
- * flag, either.
- */
- if( kTypeInfo[i].zReplace && !kTypeInfo[i].zReplace[0] ){
- return SQLITE_MISUSE;
- }
- bStrict = 1;
- }
-
- int bNotNull = 0;
- if( expectWord(zEnd, "NOT", &zEnd) ){
- if( expectWord(zEnd, "NULL", &zEnd) ){
- bNotNull = 1;
- }else{
- /* Anything other than NULL after NOT is an error. */
- return SQLITE_MISUSE;
- }
- }
-
- /* Anything else is an error. */
- const char *zDummy;
- if( findWord(zEnd, &zDummy, &zDummy) ){
- return SQLITE_MISUSE;
- }
-
- *pTypeMask = kTypeInfo[i].strictMask;
- if( !bStrict ){
- *pTypeMask |= kTypeInfo[i].otherMask;
- }
- if( bNotNull ){
- *pTypeMask &= ~MASK_NULL;
- }
- if( kTypeInfo[i].zReplace ){
- *pzTypeStart = kTypeInfo[i].zReplace;
- *pzTypeEnd = *pzTypeStart + strlen(*pzTypeStart);
- }
- return SQLITE_OK;
-}
-
-/* Parse the arguments, placing type masks in *pTypes and the exposed
- * schema in *pzCreateSql (for sqlite3_declare_vtab).
- */
-static int ParseColumnsAndGenerateCreate(int nCols, const char *const *pCols,
- char **pzCreateSql,
- unsigned char *pTypes,
- char **pzErr){
- char *zCreateSql = sqlite3_mprintf("CREATE TABLE x(");
- if( !zCreateSql ){
- return SQLITE_NOMEM;
- }
-
- unsigned i;
- for( i=0; i<nCols; i++ ){
- const char *zNameStart, *zNameEnd;
- const char *zTypeStart, *zTypeEnd;
- int rc = findNameAndType(pCols[i],
- &zNameStart, &zNameEnd,
- &zTypeStart, &zTypeEnd,
- &pTypes[i]);
- if( rc!=SQLITE_OK ){
- *pzErr = sqlite3_mprintf("unable to parse column %d", i);
- sqlite3_free(zCreateSql);
- return rc;
- }
-
- const char *zNotNull = "";
- if( !(pTypes[i]&MASK_NULL) ){
- zNotNull = " NOT NULL";
- }
-
- /* Add name and type to the create statement. */
- const char *zSep = (i < nCols - 1 ? ", " : ")");
- zCreateSql = sqlite3_mprintf("%z%.*s %.*s%s%s",
- zCreateSql,
- zNameEnd - zNameStart, zNameStart,
- zTypeEnd - zTypeStart, zTypeStart,
- zNotNull, zSep);
- if( !zCreateSql ){
- return SQLITE_NOMEM;
- }
- }
-
- *pzCreateSql = zCreateSql;
- return SQLITE_OK;
-}
-
-/* Helper function for initializing the module. */
-/* TODO(shess): Since connect isn't supported, could inline into
- * recoverCreate().
- */
-/* TODO(shess): Explore cases where it would make sense to set *pzErr. */
-static int recoverInit(
- sqlite3 *db, /* Database connection */
- void *pAux, /* unused */
- int argc, const char *const*argv, /* Parameters to CREATE TABLE statement */
- sqlite3_vtab **ppVtab, /* OUT: New virtual table */
- char **pzErr /* OUT: Error message, if any */
-){
- /* argv[0] module name
- * argv[1] db name for virtual table
- * argv[2] virtual table name
- * argv[3] backing table name
- * argv[4] columns
- */
- const int kTypeCol = 4;
- int nCols = argc - kTypeCol;
-
- /* Require to be in the temp database. */
- if( strcasecmp(argv[1], "temp")!=0 ){
- *pzErr = sqlite3_mprintf("recover table must be in temp database");
- return SQLITE_MISUSE;
- }
-
- /* Need the backing table and at least one column. */
- if( nCols<1 ){
- *pzErr = sqlite3_mprintf("no columns specified");
- return SQLITE_MISUSE;
- }
-
- Recover *pRecover = sqlite3_malloc(sizeof(Recover));
- if( !pRecover ){
- return SQLITE_NOMEM;
- }
- memset(pRecover, 0, sizeof(*pRecover));
- pRecover->base.pModule = &recoverModule;
- pRecover->db = db;
-
- /* Parse out db.table, assuming main if no dot. */
- char *zDot = strchr(argv[3], '.');
- if( !zDot ){
- pRecover->zDb = sqlite3_strdup(db->aDb[0].zName);
- pRecover->zTable = sqlite3_strdup(argv[3]);
- }else if( zDot>argv[3] && zDot[1]!='\0' ){
- pRecover->zDb = sqlite3_strndup(argv[3], zDot - argv[3]);
- pRecover->zTable = sqlite3_strdup(zDot + 1);
- }else{
- /* ".table" or "db." not allowed. */
- *pzErr = sqlite3_mprintf("ill-formed table specifier");
- recoverRelease(pRecover);
- return SQLITE_ERROR;
- }
-
- pRecover->nCols = nCols;
- pRecover->pTypes = sqlite3_malloc(pRecover->nCols);
- if( !pRecover->zDb || !pRecover->zTable || !pRecover->pTypes ){
- recoverRelease(pRecover);
- return SQLITE_NOMEM;
- }
-
- /* Require the backing table to exist. */
- /* TODO(shess): Be more pedantic about the form of the descriptor
- * string. This already fails for poorly-formed strings, simply
- * because there won't be a root page, but it would make more sense
- * to be explicit.
- */
- unsigned iRootPage;
- int rc = getRootPage(pRecover->db, pRecover->zDb, pRecover->zTable,
- &iRootPage);
- if( rc!=SQLITE_OK ){
- *pzErr = sqlite3_mprintf("unable to find backing table");
- recoverRelease(pRecover);
- return rc;
- }
-
- /* Parse the column definitions. */
- char *zCreateSql;
- rc = ParseColumnsAndGenerateCreate(nCols, argv + kTypeCol,
- &zCreateSql, pRecover->pTypes, pzErr);
- if( rc!=SQLITE_OK ){
- recoverRelease(pRecover);
- return rc;
- }
-
- rc = sqlite3_declare_vtab(db, zCreateSql);
- sqlite3_free(zCreateSql);
- if( rc!=SQLITE_OK ){
- recoverRelease(pRecover);
- return rc;
- }
-
- *ppVtab = (sqlite3_vtab *)pRecover;
- return SQLITE_OK;
-}