100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps
Java asset-managementbuildingdashboarddataplatformdevice-managementedge-computingenergyenergy-managementenergy-monitorfleet-managementfleet-telematicsiotiot-applicationiot-platformmodbusmqttmqtt-brokerota-updaterules-enginesmartcity
Upgraded to Polymer 2
Christian Bauerf0ac4d5a169e
diff --git a/README.md b/README.mdindex 6b254a5a9..8e691eceb 100644--- a/README.md+++ b/README.md@@ -23,6 +23,7 @@ Access the manager UI and API on https://localhost/ with username `admin` and paYou can build the Docker images from source with:```+(cd manager/client/src/main/webapp && bower prune && bower update)./gradlew clean prepareImagedocker build -t openremote/haproxy:latest haproxydocker build -t openremote/letsencrypt:latest letsencrypt@@ -44,6 +45,7 @@ docker push openremote/manager:latestAn instance of the application in developer mode can be started with:```+(cd manager/client/src/main/webapp && bower prune && bower update)./gradlew clean prepareImagedocker-compose -p ordev \-f profile/postgresql_dev.yml \diff --git a/keycloak/theme/account/template.ftl b/keycloak/theme/account/template.ftlindex b20bb91df..7122a298c 100644--- a/keycloak/theme/account/template.ftl+++ b/keycloak/theme/account/template.ftl@@ -19,16 +19,18 @@<script src="/static//js/loader.js"></script><link rel="stylesheet" type="text/css" href="/static/css/loader.css" />+ <link rel="import" href="/static/css/style.html">+ <link rel="import" href="/static/css/theme.html">+ <custom-style>+ <style include="global-style global-theme"></style>+ </custom-style>+<script>document.addEventListener("DOMContentLoaded", function (event) {setTimeout(function() {Promise.all([- load.js("/static/bower_components/webcomponentsjs/webcomponents-lite.min.js"),- load.import("/static/bower_components/iron-flex-layout/iron-flex-layout-classes.html"),+ load.js("/static/bower_components/webcomponentsjs/webcomponents-loader.js"),load.css("/static/bower_components/font-awesome/css/font-awesome.css"),-- load.import("/static/css/style.html"),- load.import("/static/css/theme.html")]).then(function () {console.log("Application resources loaded, starting...");handleLoadComplete();diff --git a/keycloak/theme/login/template.ftl b/keycloak/theme/login/template.ftlindex e0cd2bb1e..bafe42a51 100755--- a/keycloak/theme/login/template.ftl+++ b/keycloak/theme/login/template.ftl@@ -19,16 +19,18 @@<script src="/static/js/loader.js"></script><link rel="stylesheet" type="text/css" href="/static/css/loader.css" />+ <link rel="import" href="/static/css/style.html">+ <link rel="import" href="/static/css/theme.html">+ <custom-style>+ <style include="global-style global-theme"></style>+ </custom-style>+<script>document.addEventListener("DOMContentLoaded", function (event) {setTimeout(function() {Promise.all([- load.js("/static/bower_components/webcomponentsjs/webcomponents-lite.min.js"),- load.import("/static/bower_components/iron-flex-layout/iron-flex-layout-classes.html"),+ load.js("/static/bower_components/webcomponentsjs/webcomponents-loader.js"),load.css("/static/bower_components/font-awesome/css/font-awesome.css"),-- load.import("/static/css/style.html"),- load.import("/static/css/theme.html")]).then(function () {console.log("Application resources loaded, starting...");handleLoadComplete();@@ -37,7 +39,7 @@});</script></head>-<body class="layout vertical loading">+<body class="layout vertical loading" onload="startLoading()"><div class="flex layout vertical center-center">diff --git a/manager/client/.gitignore b/manager/client/.gitignoreindex c3414610b..a8db50290 100644--- a/manager/client/.gitignore+++ b/manager/client/.gitignore@@ -1,2 +1,3 @@src/main/webapp/gwt+src/main/webapp/bower_components/*/.externalToolBuilders/diff --git a/manager/client/src/main/java/org/openremote/manager/client/assets/asset/AssetViewImpl.ui.xml b/manager/client/src/main/java/org/openremote/manager/client/assets/asset/AssetViewImpl.ui.xmlindex 05d9d4bc1..98ea2bdd5 100644--- a/manager/client/src/main/java/org/openremote/manager/client/assets/asset/AssetViewImpl.ui.xml+++ b/manager/client/src/main/java/org/openremote/manager/client/assets/asset/AssetViewImpl.ui.xml@@ -17,9 +17,9 @@}.stringEditor {- min-width: 5em;- width: 100%;- }+ min-width: 5em;+ width: 100%;+ }.numberEditor {min-width: 5em;@@ -29,12 +29,10 @@.booleanEditor {}- .regularAttribute {- border-left: 4px solid;- }-+ .regularAttribute,.highlightAttribute {- border-left: 4px solid;+ border-left-width: 4px;+ border-left-style: solid;}.metaItemValueEditor {diff --git a/manager/client/src/main/webapp/bower.json b/manager/client/src/main/webapp/bower.jsonindex 0118489ef..da73e2a26 100644--- a/manager/client/src/main/webapp/bower.json+++ b/manager/client/src/main/webapp/bower.json@@ -16,7 +16,8 @@"tests"],"dependencies": {- "iron-flex-layout": "~1.3.1",- "font-awesome": "~4.7.0"+ "iron-flex-layout": "^2.0.0",+ "font-awesome": "~4.7.0",+ "polymer": "Polymer/polymer#^2.0.0"}}diff --git a/manager/client/src/main/webapp/bower_components/iron-flex-layout/.bower.json b/manager/client/src/main/webapp/bower_components/iron-flex-layout/.bower.jsonindex 7704bb6bc..a055ff528 100644--- a/manager/client/src/main/webapp/bower_components/iron-flex-layout/.bower.json+++ b/manager/client/src/main/webapp/bower_components/iron-flex-layout/.bower.json@@ -1,6 +1,6 @@{"name": "iron-flex-layout",- "version": "1.3.7",+ "version": "2.0.0","description": "Provide flexbox-based layouts","keywords": ["web-components",@@ -18,27 +18,47 @@"url": "git://github.com/PolymerElements/iron-flex-layout.git"},"dependencies": {- "polymer": "Polymer/polymer#^1.1.0"+ "polymer": "Polymer/polymer#1.9 - 2"},"devDependencies": {- "iron-component-page": "polymerelements/iron-component-page#^1.0.0",- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",- "test-fixture": "PolymerElements/test-fixture#^1.0.0",- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",- "web-component-tester": "^4.0.0"+ "test-fixture": "PolymerElements/test-fixture#^3.0.0-rc.1",+ "web-component-tester": "^6.0.0",+ "webcomponentsjs": "webcomponents/webcomponentsjs#^1.0.0",+ "iron-component-page": "PolymerElements/iron-component-page#1 - 2",+ "iron-demo-helpers": "PolymerElements/iron-demo-helpers#1 - 2"+ },+ "ignore": [],+ "variants": {+ "1.x": {+ "dependencies": {+ "polymer": "Polymer/polymer#^1.9"+ },+ "devDependencies": {+ "test-fixture": "PolymerElements/test-fixture#^1.0.0",+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",+ "web-component-tester": "Polymer/web-component-tester#^4.0.0",+ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",+ "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0"+ },+ "resolutions": {+ "webcomponentsjs": "^0.7"+ }+ }},"pages": {"Flexbox layout guide": "GUIDE.md"},- "ignore": [],+ "resolutions": {+ "webcomponentsjs": "^1.0.0"+ },"homepage": "https://github.com/PolymerElements/iron-flex-layout",- "_release": "1.3.7",+ "_release": "2.0.0","_resolution": {"type": "version",- "tag": "v1.3.7",- "commit": "2a9c084c933e87469824b69f3faadfcba12efbcd"+ "tag": "v2.0.0",+ "commit": "985972fddaae4969f885d8f4451f72d735093946"},"_source": "https://github.com/PolymerElements/iron-flex-layout.git",- "_target": "~1.3.1",+ "_target": "^2.0.0","_originalSource": "iron-flex-layout"}\ No newline at end of filediff --git a/manager/client/src/main/webapp/bower_components/iron-flex-layout/.gitignore b/manager/client/src/main/webapp/bower_components/iron-flex-layout/.gitignoreindex 1eb1fa5e9..2be39e49d 100644--- a/manager/client/src/main/webapp/bower_components/iron-flex-layout/.gitignore+++ b/manager/client/src/main/webapp/bower_components/iron-flex-layout/.gitignore@@ -1,2 +1,2 @@-bower_components-+bower_components*+bower-*.jsondiff --git a/manager/client/src/main/webapp/bower_components/iron-flex-layout/.travis.yml b/manager/client/src/main/webapp/bower_components/iron-flex-layout/.travis.ymlindex 6bd14cba2..25cc5036e 100644--- a/manager/client/src/main/webapp/bower_components/iron-flex-layout/.travis.yml+++ b/manager/client/src/main/webapp/bower_components/iron-flex-layout/.travis.yml@@ -1,16 +1,15 @@language: node_jssudo: requiredbefore_script:- - npm install -g bower polylint web-component-tester- - bower install- - polylint+ - npm install -g polymer-cli+ - polymer install --variantsenv:global:- secure: >-idlCNYtNQ7rLGCSl2NuZ++XZEwofpojkakXhL8m34pCX1ZwhGRprHsvNE7h7tz8SIV+mUjuUT8DaM7rlgZ+bLyw/Hq7G15DdmU5puUsCVibFFBBEhh82lxkdK/Rlfo+ytt0MFsbTJljEoqTSbnL0fSeC0cN/7wf6yEQs/+mTR0I=- secure: >-i/rAHa9rxszmbE+RbQ2b7ln6OYzrcoUssdPk36lNeJk/B1HjBS9cfg1PMwSAw+t6yvAN3I0fbOOl4dlGB1K5T4kAtmcAcC3fbptJL08IvK9K15pz/rMEzIBWLXj9oVJliwBZR2GFH+5zv6aFdEwQxh1leBnHQwmKgl24QX8XGO4=-node_js: '6'+node_js: stableaddons:firefox: latestapt:@@ -18,7 +17,10 @@ addons:- google-chromepackages:- google-chrome-stable+ sauce_connect: truescript:- - xvfb-run wct- - 'if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then wct -s ''default''; fi'+ - xvfb-run polymer test+ - >-+ if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then polymer test -s 'default';+ fidist: trustydiff --git a/manager/client/src/main/webapp/bower_components/iron-flex-layout/GUIDE.md b/manager/client/src/main/webapp/bower_components/iron-flex-layout/GUIDE.mdindex 67a9e3095..e230ce07a 100644--- a/manager/client/src/main/webapp/bower_components/iron-flex-layout/GUIDE.md+++ b/manager/client/src/main/webapp/bower_components/iron-flex-layout/GUIDE.md@@ -126,8 +126,8 @@ main document. (They cannot be applied in the main document without a `custom-st<!-- main document -- apply mixins in a custom-style element --><style is="custom-style">.container {- @apply(--layout-horizontal);- @apply(--layout-wrap);+ @apply --layout-horizontal;+ @apply --layout-wrap;}</style>@@ -153,8 +153,8 @@ main document. (They cannot be applied in the main document without a `custom-st<!-- inside an element -- apply mixins in a standard style element --><style>.container {- @apply(--layout-horizontal);- @apply(--layout-wrap);+ @apply --layout-horizontal;+ @apply --layout-wrap;}</style>@@ -234,7 +234,7 @@ The classes listed here are included in the `iron-flex` module of the `iron-flex```html<style is="custom-style">.container {- @apply(--layout-horizontal);+ @apply --layout-horizontal;}</style>@@ -301,10 +301,10 @@ The classes listed here are included in the `iron-flex` module of the `iron-flex```html<style is="custom-style">.container {- @apply(--layout-horizontal);+ @apply --layout-horizontal;}.flexchild {- @apply(--layout-flex);+ @apply --layout-flex;}</style>@@ -362,10 +362,10 @@ The same rules can be used for children in vertical layouts.```html<style is="custom-style">.container {- @apply(--layout-vertical);+ @apply --layout-vertical;}.flexchild {- @apply(--layout-flex);+ @apply --layout-flex;}</style>@@ -432,16 +432,16 @@ The classes listed here are included in the `iron-flex-factors` module of the `i```html<style is="custom-style">.container {- @apply(--layout-horizontal);+ @apply --layout-horizontal;}.flexchild {- @apply(--layout-flex)+ @apply --layout-flex;}.flex2child {- @apply(--layout-flex-2);+ @apply --layout-flex-2;}.flex3child {- @apply(--layout-flex-3);+ @apply --layout-flex-3;}</style>@@ -567,8 +567,8 @@ by adding the `center` class or applying the `--layout-center` mixin.```html<style is="custom-style">.container {- @apply(--layout-horizontal);- @apply(--layout-center);+ @apply --layout-horizontal;+ @apply --layout-center;}</style>@@ -652,8 +652,8 @@ classes, or by applying the `--layout-start` or `--layout-end` mixins.```html<style is="custom-style">.container {- @apply(--layout-horizontal);- @apply(--layout-start);+ @apply --layout-horizontal;+ @apply --layout-start;}</style>@@ -733,8 +733,8 @@ classes, or by applying the `--layout-start` or `--layout-end` mixins.```html<style is="custom-style">.container {- @apply(--layout-horizontal);- @apply(--layout-end);+ @apply --layout-horizontal;+ @apply --layout-end;}</style>@@ -830,8 +830,8 @@ The classes listed here are included in the `iron-flex-alignment` module of the```html<style is="custom-style">.container {- @apply(--layout-horizontal);- @apply(--layout-center-justified);+ @apply --layout-horizontal;+ @apply --layout-center-justified;}</style>@@ -911,8 +911,8 @@ The classes listed here are included in the `iron-flex-alignment` module of the```html<style is="custom-style">.container {- @apply(--layout-horizontal);- @apply(--layout-justified);+ @apply --layout-horizontal;+ @apply --layout-justified;}</style>@@ -1046,24 +1046,24 @@ Class | Mixin | Result```html<style is="custom-style">.container {- @apply(--layout-horizontal);- @apply(--layout-justified);+ @apply --layout-horizontal;+ @apply --layout-justified;height: 120px;}.container div {- @apply(--layout-flex);+ @apply --layout-flex;}.child1 {- @apply(--layout-self-start);+ @apply --layout-self-start;}.child2 {- @apply(--layout-self-center);+ @apply --layout-self-center;}.child3 {- @apply(--layout-self-end);+ @apply --layout-self-end;}.child4 {- @apply(--layout-self-stretch);+ @apply --layout-self-stretch;}</style><div class="container">@@ -1169,7 +1169,7 @@ The classes listed here are included in the `iron-flex-reverse` module of the `i```html<style is="custom-style">.container {- @apply(--layout-horizontal-reverse);+ @apply --layout-horizontal-reverse;}</style>diff --git a/manager/client/src/main/webapp/bower_components/iron-flex-layout/README.md b/manager/client/src/main/webapp/bower_components/iron-flex-layout/README.mdindex d5aac2fbc..ca54ed333 100644--- a/manager/client/src/main/webapp/bower_components/iron-flex-layout/README.md+++ b/manager/client/src/main/webapp/bower_components/iron-flex-layout/README.md@@ -22,13 +22,14 @@ Sample use:<link rel="import" href="iron-flex-layout-classes.html"><dom-module id="demo-element"><template>- <style is="custom-style" include="iron-flex iron-flex-alignment"></style>+ <custom-style>+ <style is="custom-style" include="iron-flex iron-flex-alignment"></style>+ </custom-style><style>.container, .layout {background-color: #ccc;padding: 4px;}-.container div, .layout div {background-color: white;padding: 12px;@@ -53,15 +54,8 @@ Sample use:1. [Custom CSS mixins](https://github.com/PolymerElements/iron-flex-layout/blob/master/iron-flex-layout.html).The mixin stylesheet includes custom CSS mixins that can be applied inside a CSS rule using the `@apply` function.---Please note that the old [/deep/ layout classes](https://github.com/PolymerElements/iron-flex-layout/tree/master/classes)-are deprecated, and should not be used. To continue using layout properties-directly in markup, please switch to using the new `dom-module`-based-[layout classes](https://github.com/PolymerElements/iron-flex-layout/tree/master/iron-flex-layout-classes.html).-Please note that the new version does not use `/deep/`, and therefore requires you-to import the `dom-modules` in every element that needs to use them.-A complete [guide](https://elements.polymer-project.org/guides/flex-layout) to `<iron-flex-layout>` is available.+## Changes in 2.0+- removed the deprecated `/deep/` classes -- files removed: `classes/iron-flex-layout.html`, `classes/iron-shadow-flex-layout`diff --git a/manager/client/src/main/webapp/bower_components/iron-flex-layout/bower.json b/manager/client/src/main/webapp/bower_components/iron-flex-layout/bower.jsonindex 7b6b1a2cd..3807cb780 100644--- a/manager/client/src/main/webapp/bower_components/iron-flex-layout/bower.json+++ b/manager/client/src/main/webapp/bower_components/iron-flex-layout/bower.json@@ -1,6 +1,6 @@{"name": "iron-flex-layout",- "version": "1.3.7",+ "version": "2.0.0","description": "Provide flexbox-based layouts","keywords": ["web-components",@@ -18,17 +18,37 @@"url": "git://github.com/PolymerElements/iron-flex-layout.git"},"dependencies": {- "polymer": "Polymer/polymer#^1.1.0"+ "polymer": "Polymer/polymer#1.9 - 2"},"devDependencies": {- "iron-component-page": "polymerelements/iron-component-page#^1.0.0",- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",- "test-fixture": "PolymerElements/test-fixture#^1.0.0",- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",- "web-component-tester": "^4.0.0"+ "test-fixture": "PolymerElements/test-fixture#^3.0.0-rc.1",+ "web-component-tester": "^6.0.0",+ "webcomponentsjs": "webcomponents/webcomponentsjs#^1.0.0",+ "iron-component-page": "PolymerElements/iron-component-page#1 - 2",+ "iron-demo-helpers": "PolymerElements/iron-demo-helpers#1 - 2"+ },+ "ignore": [],+ "variants": {+ "1.x": {+ "dependencies": {+ "polymer": "Polymer/polymer#^1.9"+ },+ "devDependencies": {+ "test-fixture": "PolymerElements/test-fixture#^1.0.0",+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",+ "web-component-tester": "Polymer/web-component-tester#^4.0.0",+ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",+ "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0"+ },+ "resolutions": {+ "webcomponentsjs": "^0.7"+ }+ }},"pages": {"Flexbox layout guide": "GUIDE.md"},- "ignore": []+ "resolutions": {+ "webcomponentsjs": "^1.0.0"+ }}diff --git a/manager/client/src/main/webapp/bower_components/iron-flex-layout/classes/iron-flex-layout.html b/manager/client/src/main/webapp/bower_components/iron-flex-layout/classes/iron-flex-layout.htmldeleted file mode 100644index 5fa7ce659..000000000--- a/manager/client/src/main/webapp/bower_components/iron-flex-layout/classes/iron-flex-layout.html+++ /dev/null@@ -1,317 +0,0 @@-<!---@license-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt-Code distributed by Google as part of the polymer project is also-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt--->--<link rel="import" href="iron-shadow-flex-layout.html">--<script>- console.warn('This file is deprecated. Please use `iron-flex-layout/iron-flex-layout-classes.html`, and one of the specific dom-modules instead');-</script>--<style>-- /*******************************- Flex Layout- *******************************/-- .layout.horizontal,- .layout.horizontal-reverse,- .layout.vertical,- .layout.vertical-reverse {- display: -ms-flexbox;- display: -webkit-flex;- display: flex;- }-- .layout.inline {- display: -ms-inline-flexbox;- display: -webkit-inline-flex;- display: inline-flex;- }-- .layout.horizontal {- -ms-flex-direction: row;- -webkit-flex-direction: row;- flex-direction: row;- }-- .layout.horizontal-reverse {- -ms-flex-direction: row-reverse;- -webkit-flex-direction: row-reverse;- flex-direction: row-reverse;- }-- .layout.vertical {- -ms-flex-direction: column;- -webkit-flex-direction: column;- flex-direction: column;- }-- .layout.vertical-reverse {- -ms-flex-direction: column-reverse;- -webkit-flex-direction: column-reverse;- flex-direction: column-reverse;- }-- .layout.wrap {- -ms-flex-wrap: wrap;- -webkit-flex-wrap: wrap;- flex-wrap: wrap;- }-- .layout.no-wrap {- -ms-flex-wrap: nowrap;- -webkit-flex-wrap: nowrap;- flex-wrap: nowrap;- }-- .layout.wrap-reverse {- -ms-flex-wrap: wrap-reverse;- -webkit-flex-wrap: wrap-reverse;- flex-wrap: wrap-reverse;- }-- .flex-auto {- -ms-flex: 1 1 auto;- -webkit-flex: 1 1 auto;- flex: 1 1 auto;- }-- .flex-none {- -ms-flex: none;- -webkit-flex: none;- flex: none;- }-- .flex,- .flex-1 {- -ms-flex: 1;- -webkit-flex: 1;- flex: 1;- }-- .flex-2 {- -ms-flex: 2;- -webkit-flex: 2;- flex: 2;- }-- .flex-3 {- -ms-flex: 3;- -webkit-flex: 3;- flex: 3;- }-- .flex-4 {- -ms-flex: 4;- -webkit-flex: 4;- flex: 4;- }-- .flex-5 {- -ms-flex: 5;- -webkit-flex: 5;- flex: 5;- }-- .flex-6 {- -ms-flex: 6;- -webkit-flex: 6;- flex: 6;- }-- .flex-7 {- -ms-flex: 7;- -webkit-flex: 7;- flex: 7;- }-- .flex-8 {- -ms-flex: 8;- -webkit-flex: 8;- flex: 8;- }-- .flex-9 {- -ms-flex: 9;- -webkit-flex: 9;- flex: 9;- }-- .flex-10 {- -ms-flex: 10;- -webkit-flex: 10;- flex: 10;- }-- .flex-11 {- -ms-flex: 11;- -webkit-flex: 11;- flex: 11;- }-- .flex-12 {- -ms-flex: 12;- -webkit-flex: 12;- flex: 12;- }-- /* alignment in cross axis */-- .layout.start {- -ms-flex-align: start;- -webkit-align-items: flex-start;- align-items: flex-start;- }-- .layout.center,- .layout.center-center {- -ms-flex-align: center;- -webkit-align-items: center;- align-items: center;- }-- .layout.end {- -ms-flex-align: end;- -webkit-align-items: flex-end;- align-items: flex-end;- }-- /* alignment in main axis */-- .layout.start-justified {- -ms-flex-pack: start;- -webkit-justify-content: flex-start;- justify-content: flex-start;- }-- .layout.center-justified,- .layout.center-center {- -ms-flex-pack: center;- -webkit-justify-content: center;- justify-content: center;- }-- .layout.end-justified {- -ms-flex-pack: end;- -webkit-justify-content: flex-end;- justify-content: flex-end;- }-- .layout.around-justified {- -ms-flex-pack: around;- -webkit-justify-content: space-around;- justify-content: space-around;- }-- .layout.justified {- -ms-flex-pack: justify;- -webkit-justify-content: space-between;- justify-content: space-between;- }-- /* self alignment */-- .self-start {- -ms-align-self: flex-start;- -webkit-align-self: flex-start;- align-self: flex-start;- }-- .self-center {- -ms-align-self: center;- -webkit-align-self: center;- align-self: center;- }-- .self-end {- -ms-align-self: flex-end;- -webkit-align-self: flex-end;- align-self: flex-end;- }-- .self-stretch {- -ms-align-self: stretch;- -webkit-align-self: stretch;- align-self: stretch;- }-- /*******************************- Other Layout- *******************************/-- .block {- display: block;- }-- /* IE 10 support for HTML5 hidden attr */- [hidden] {- display: none !important;- }-- .invisible {- visibility: hidden !important;- }-- .relative {- position: relative;- }-- .fit {- position: absolute;- top: 0;- right: 0;- bottom: 0;- left: 0;- }-- body.fullbleed {- margin: 0;- height: 100vh;- }-- .scroll {- -webkit-overflow-scrolling: touch;- overflow: auto;- }-- /* fixed position */-- .fixed-bottom,- .fixed-left,- .fixed-right,- .fixed-top {- position: fixed;- }-- .fixed-top {- top: 0;- left: 0;- right: 0;- }-- .fixed-right {- top: 0;- right: 0;- bottom: 0;- }-- .fixed-bottom {- right: 0;- bottom: 0;- left: 0;- }-- .fixed-left {- top: 0;- bottom: 0;- left: 0;- }--</style>diff --git a/manager/client/src/main/webapp/bower_components/iron-flex-layout/classes/iron-shadow-flex-layout.html b/manager/client/src/main/webapp/bower_components/iron-flex-layout/classes/iron-shadow-flex-layout.htmldeleted file mode 100644index 5dcde1935..000000000--- a/manager/client/src/main/webapp/bower_components/iron-flex-layout/classes/iron-shadow-flex-layout.html+++ /dev/null@@ -1,313 +0,0 @@-<!---@license-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt-Code distributed by Google as part of the polymer project is also-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt--->--<script>- console.warn('This file is deprecated. Please use `iron-flex-layout/iron-flex-layout-classes.html`, and one of the specific dom-modules instead');-</script>--<style>-- /*******************************- Flex Layout- *******************************/-- html /deep/ .layout.horizontal,- html /deep/ .layout.horizontal-reverse,- html /deep/ .layout.vertical,- html /deep/ .layout.vertical-reverse {- display: -ms-flexbox;- display: -webkit-flex;- display: flex;- }-- html /deep/ .layout.inline {- display: -ms-inline-flexbox;- display: -webkit-inline-flex;- display: inline-flex;- }-- html /deep/ .layout.horizontal {- -ms-flex-direction: row;- -webkit-flex-direction: row;- flex-direction: row;- }-- html /deep/ .layout.horizontal-reverse {- -ms-flex-direction: row-reverse;- -webkit-flex-direction: row-reverse;- flex-direction: row-reverse;- }-- html /deep/ .layout.vertical {- -ms-flex-direction: column;- -webkit-flex-direction: column;- flex-direction: column;- }-- html /deep/ .layout.vertical-reverse {- -ms-flex-direction: column-reverse;- -webkit-flex-direction: column-reverse;- flex-direction: column-reverse;- }-- html /deep/ .layout.wrap {- -ms-flex-wrap: wrap;- -webkit-flex-wrap: wrap;- flex-wrap: wrap;- }-- html /deep/ .layout-no-wrap {- -ms-flex-wrap: nowrap;- -webkit-flex-wrap: nowrap;- flex-wrap: nowrap;- }-- html /deep/ .layout.wrap-reverse {- -ms-flex-wrap: wrap-reverse;- -webkit-flex-wrap: wrap-reverse;- flex-wrap: wrap-reverse;- }-- html /deep/ .flex-auto {- -ms-flex: 1 1 auto;- -webkit-flex: 1 1 auto;- flex: 1 1 auto;- }-- html /deep/ .flex-none {- -ms-flex: none;- -webkit-flex: none;- flex: none;- }-- html /deep/ .flex,- html /deep/ .flex-1 {- -ms-flex: 1;- -webkit-flex: 1;- flex: 1;- }-- html /deep/ .flex-2 {- -ms-flex: 2;- -webkit-flex: 2;- flex: 2;- }-- html /deep/ .flex-3 {- -ms-flex: 3;- -webkit-flex: 3;- flex: 3;- }-- html /deep/ .flex-4 {- -ms-flex: 4;- -webkit-flex: 4;- flex: 4;- }-- html /deep/ .flex-5 {- -ms-flex: 5;- -webkit-flex: 5;- flex: 5;- }-- html /deep/ .flex-6 {- -ms-flex: 6;- -webkit-flex: 6;- flex: 6;- }-- html /deep/ .flex-7 {- -ms-flex: 7;- -webkit-flex: 7;- flex: 7;- }-- html /deep/ .flex-8 {- -ms-flex: 8;- -webkit-flex: 8;- flex: 8;- }-- html /deep/ .flex-9 {- -ms-flex: 9;- -webkit-flex: 9;- flex: 9;- }-- html /deep/ .flex-10 {- -ms-flex: 10;- -webkit-flex: 10;- flex: 10;- }-- html /deep/ .flex-11 {- -ms-flex: 11;- -webkit-flex: 11;- flex: 11;- }-- html /deep/ .flex-12 {- -ms-flex: 12;- -webkit-flex: 12;- flex: 12;- }-- /* alignment in cross axis */-- html /deep/ .layout.start {- -ms-flex-align: start;- -webkit-align-items: flex-start;- align-items: flex-start;- }-- html /deep/ .layout.center,- html /deep/ .layout.center-center {- -ms-flex-align: center;- -webkit-align-items: center;- align-items: center;- }-- html /deep/ .layout.end {- -ms-flex-align: end;- -webkit-align-items: flex-end;- align-items: flex-end;- }-- /* alignment in main axis */-- html /deep/ .layout.start-justified {- -ms-flex-pack: start;- -webkit-justify-content: flex-start;- justify-content: flex-start;- }-- html /deep/ .layout.center-justified,- html /deep/ .layout.center-center {- -ms-flex-pack: center;- -webkit-justify-content: center;- justify-content: center;- }-- html /deep/ .layout.end-justified {- -ms-flex-pack: end;- -webkit-justify-content: flex-end;- justify-content: flex-end;- }-- html /deep/ .layout.around-justified {- -ms-flex-pack: around;- -webkit-justify-content: space-around;- justify-content: space-around;- }-- html /deep/ .layout.justified {- -ms-flex-pack: justify;- -webkit-justify-content: space-between;- justify-content: space-between;- }-- /* self alignment */-- html /deep/ .self-start {- -ms-align-self: flex-start;- -webkit-align-self: flex-start;- align-self: flex-start;- }-- html /deep/ .self-center {- -ms-align-self: center;- -webkit-align-self: center;- align-self: center;- }-- html /deep/ .self-end {- -ms-align-self: flex-end;- -webkit-align-self: flex-end;- align-self: flex-end;- }-- html /deep/ .self-stretch {- -ms-align-self: stretch;- -webkit-align-self: stretch;- align-self: stretch;- }-- /*******************************- Other Layout- *******************************/-- html /deep/ .block {- display: block;- }-- /* IE 10 support for HTML5 hidden attr */- html /deep/ [hidden] {- display: none !important;- }-- html /deep/ .invisible {- visibility: hidden !important;- }-- html /deep/ .relative {- position: relative;- }-- html /deep/ .fit {- position: absolute;- top: 0;- right: 0;- bottom: 0;- left: 0;- }-- body.fullbleed {- margin: 0;- height: 100vh;- }-- html /deep/ .scroll {- -webkit-overflow-scrolling: touch;- overflow: auto;- }-- .fixed-bottom,- .fixed-left,- .fixed-right,- .fixed-top {- position: fixed;- }-- html /deep/ .fixed-top {- top: 0;- left: 0;- right: 0;- }-- html /deep/ .fixed-right {- top: 0;- right: 0;- bottom: 0;- }-- html /deep/ .fixed-bottom {- right: 0;- bottom: 0;- left: 0;- }-- html /deep/ .fixed-left {- top: 0;- bottom: 0;- left: 0;- }--</style>diff --git a/manager/client/src/main/webapp/bower_components/iron-flex-layout/demo/index.html b/manager/client/src/main/webapp/bower_components/iron-flex-layout/demo/index.htmlindex 4bc2d4109..887ff3f9e 100644--- a/manager/client/src/main/webapp/bower_components/iron-flex-layout/demo/index.html+++ b/manager/client/src/main/webapp/bower_components/iron-flex-layout/demo/index.html@@ -18,33 +18,32 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN<script src="../../webcomponentsjs/webcomponents-lite.js"></script>- <link rel="import" href="../../paper-styles/demo-pages.html"><link rel="import" href="../../iron-demo-helpers/demo-snippet.html"><link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html"><link rel="import" href="../iron-flex-layout.html">- <style is="custom-style" include="demo-pages-shared-styles">- demo-snippet {- --demo-snippet-demo: {- padding: 0;+ <custom-style>+ <style is="custom-style" include="demo-pages-shared-styles">+ demo-snippet {+ --demo-snippet-demo: {+ padding: 0;+ };}- }- .container {- background-color: #ccc;- padding: 5px;- margin: 0;- }- .container > div {- padding: 15px;- margin: 5px;- background-color: white;- min-height: 20px;- }-- .vertical-section-container {- max-width: 700px- }- </style>++ .container {+ background-color: #ccc;+ padding: 5px;+ margin: 0;+ }++ .container > div {+ padding: 15px;+ margin: 5px;+ background-color: white;+ min-height: 20px;+ }+ </style>+ </custom-style></head><body unresolved class="fullbleed">@@ -52,11 +51,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN<h4>Horizontal and vertical layout</h4><demo-snippet><template>- <style is="custom-style">- .flex {- @apply(--layout-horizontal);- }- </style>+ <custom-style>+ <style is="custom-style">+ .flex {+ @apply --layout-horizontal;+ }+ </style>+ </custom-style><div class="container flex"><div>one</div><div>two</div>@@ -68,14 +69,16 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN<h4>Flexible children</h4><demo-snippet><template>- <style is="custom-style">- .flex-horizontal {- @apply(--layout-horizontal);- }- .flexchild {- @apply(--layout-flex);- }- </style>+ <custom-style>+ <style is="custom-style">+ .flex-horizontal {+ @apply --layout-horizontal;+ }+ .flexchild {+ @apply --layout-flex;+ }+ </style>+ </custom-style><div class="container flex-horizontal"><div>one</div>@@ -88,15 +91,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN<h4>Flexible children in vertical layouts</h4><demo-snippet><template>- <style is="custom-style">- .flex-vertical {- @apply(--layout-vertical);- height: 220px;- }- .flexchild-vertical {- @apply(--layout-flex);- }- </style>+ <custom-style>+ <style is="custom-style">+ .flex-vertical {+ @apply --layout-vertical;+ height: 220px;+ }+ .flexchild-vertical {+ @apply --layout-flex;+ }+ </style>+ </custom-style><div class="container flex-vertical"><div>one</div>@@ -109,20 +114,22 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN<h4>Flex ratios</h4><demo-snippet><template>- <style is="custom-style">- .flex-horizontal-with-ratios {- @apply(--layout-horizontal);- }- .flexchild {- @apply(--layout-flex);- }- .flex2child {- @apply(--layout-flex-2);- }- .flex3child {- @apply(--layout-flex-3);- }- </style>+ <custom-style>+ <style is="custom-style">+ .flex-horizontal-with-ratios {+ @apply --layout-horizontal;+ }+ .flexchild {+ @apply --layout-flex;+ }+ .flex2child {+ @apply --layout-flex-2;+ }+ .flex3child {+ @apply --layout-flex-3;+ }+ </style>+ </custom-style><div class="container flex-horizontal-with-ratios"><div class="flex3child">one</div>@@ -135,12 +142,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN<h4>Cross-axis stretch alignment (default)</h4><demo-snippet><template>- <style is="custom-style">- .flex-stretch-align {- @apply(--layout-horizontal);- height: 120px;- }- </style>+ <custom-style>+ <style is="custom-style">+ .flex-stretch-align {+ @apply --layout-horizontal;+ height: 120px;+ }+ </style>+ </custom-style><div class="container flex-stretch-align"><div>stretch</div>@@ -151,13 +160,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN<h4>Cross-axis center alignment</h4><demo-snippet><template>- <style is="custom-style">- .flex-center-align {- @apply(--layout-horizontal);- @apply(--layout-center);- height: 120px;- }- </style>+ <custom-style>+ <style is="custom-style">+ .flex-center-align {+ @apply --layout-horizontal;+ @apply --layout-center;+ height: 120px;+ }+ </style>+ </custom-style><div class="container flex-center-align"><div>center</div>@@ -168,13 +179,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN<h4>Cross-axis start alignment</h4><demo-snippet><template>- <style is="custom-style">- .flex-start-align {- @apply(--layout-horizontal);- @apply(--layout-start);- height: 120px;- }- </style>+ <custom-style>+ <style is="custom-style">+ .flex-start-align {+ @apply --layout-horizontal;+ @apply --layout-start;+ height: 120px;+ }+ </style>+ </custom-style><div class="container flex-start-align"><div>start</div>@@ -185,13 +198,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN<h4>Cross-axis end alignment</h4><demo-snippet><template>- <style is="custom-style">- .flex-end-align {- @apply(--layout-horizontal);- @apply(--layout-end);- height: 120px;- }- </style>+ <custom-style>+ <style is="custom-style">+ .flex-end-align {+ @apply --layout-horizontal;+ @apply --layout-end;+ height: 120px;+ }+ </style>+ </custom-style><div class="container flex-end-align"><div>end</div>@@ -202,12 +217,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN<h4>Justification, start justified</h4><demo-snippet><template>- <style is="custom-style">- .flex-start-justified {- @apply(--layout-horizontal);- @apply(--layout-start-justified);- }- </style>+ <custom-style>+ <style is="custom-style">+ .flex-start-justified {+ @apply --layout-horizontal;+ @apply --layout-start-justified;+ }+ </style>+ </custom-style><div class="container flex-start-justified"><div>start-justified</div>@@ -218,12 +235,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN<h4>Justification, center justified</h4><demo-snippet><template>- <style is="custom-style">- .flex-center-justified {- @apply(--layout-horizontal);- @apply(--layout-center-justified);- }- </style>+ <custom-style>+ <style is="custom-style">+ .flex-center-justified {+ @apply --layout-horizontal;+ @apply --layout-center-justified;+ }+ </style>+ </custom-style><div class="container flex-center-justified"><div>center-justified</div>@@ -234,12 +253,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN<h4>Justification, end justified</h4><demo-snippet><template>- <style is="custom-style">- .flex-end-justified {- @apply(--layout-horizontal);- @apply(--layout-end-justified);- }- </style>+ <custom-style>+ <style is="custom-style">+ .flex-end-justified {+ @apply --layout-horizontal;+ @apply --layout-end-justified;+ }+ </style>+ </custom-style><div class="container flex-end-justified"><div>end-justified</div>@@ -250,12 +271,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN<h4>Justification, equal space between elements</h4><demo-snippet><template>- <style is="custom-style">- .flex-equal-justified {- @apply(--layout-horizontal);- @apply(--layout-justified);- }- </style>+ <custom-style>+ <style is="custom-style">+ .flex-equal-justified {+ @apply --layout-horizontal;+ @apply --layout-justified;+ }+ </style>+ </custom-style><div class="container flex-equal-justified"><div>justified</div>@@ -268,12 +291,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN<h4>Justification, equal space around each element</h4><demo-snippet><template>- <style is="custom-style">- .flex-equal-around-justified {- @apply(--layout-horizontal);- @apply(--layout-around-justified);- }- </style>+ <custom-style>+ <style is="custom-style">+ .flex-equal-around-justified {+ @apply --layout-horizontal;+ @apply --layout-around-justified;+ }+ </style>+ </custom-style><div class="container flex-equal-around-justified"><div>around-justified</div>@@ -285,28 +310,30 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN<h4>Self alignment</h4><demo-snippet><template>- <style is="custom-style">- .flex-self-align {- @apply(--layout-horizontal);- @apply(--layout-justified);- height: 120px;- }- .flex-self-align div {- @apply(--layout-flex);- }- .child1 {- @apply(--layout-self-start);- }- .child2 {- @apply(--layout-self-center);- }- .child3 {- @apply(--layout-self-end);- }- .child4 {- @apply(--layout-self-stretch);- }- </style>+ <custom-style>+ <style is="custom-style">+ .flex-self-align {+ @apply --layout-horizontal;+ @apply --layout-justified;+ height: 120px;+ }+ .flex-self-align div {+ @apply --layout-flex;+ }+ .child1 {+ @apply --layout-self-start;+ }+ .child2 {+ @apply --layout-self-center;+ }+ .child3 {+ @apply --layout-self-end;+ }+ .child4 {+ @apply --layout-self-stretch;+ }+ </style>+ </custom-style><div class="container flex-self-align"><div class="child1">one</div>@@ -320,13 +347,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN<h4>Wrapping</h4><demo-snippet><template>- <style is="custom-style">- .flex-wrap {- @apply(--layout-horizontal);- @apply(--layout-wrap);- width: 200px;- }- </style>+ <custom-style>+ <style is="custom-style">+ .flex-wrap {+ @apply --layout-horizontal;+ @apply --layout-wrap;+ width: 200px;+ }+ </style>+ </custom-style><div class="container flex-wrap"><div>one</div>@@ -340,11 +369,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN<h4>Reversed layouts</h4><demo-snippet><template>- <style is="custom-style">- .flex-reversed {- @apply(--layout-horizontal-reverse);- }- </style>+ <custom-style>+ <style is="custom-style">+ .flex-reversed {+ @apply --layout-horizontal-reverse;+ }+ </style>+ </custom-style><div class="container flex-reversed"><div>one</div>@@ -358,28 +389,30 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN<h4>General purpose rules</h4><demo-snippet><template>- <style is="custom-style">- .general {- width: 100%;- }- .general > div {- background-color: #ccc;- padding: 4px;- margin: 12px;- }- .block {- @apply(--layout-block);- }- .invisible {- @apply(--layout-invisible);- }- .relative {- @apply(--layout-relative);- }- .fit {- @apply(--layout-fit);- }- </style>+ <custom-style>+ <style is="custom-style">+ .general {+ width: 100%;+ }+ .general > div {+ background-color: #ccc;+ padding: 4px;+ margin: 12px;+ }+ .block {+ @apply --layout-block;+ }+ .invisible {+ @apply --layout-invisible;+ }+ .relative {+ @apply --layout-relative;+ }+ .fit {+ @apply --layout-fit;+ }+ </style>+ </custom-style><div class="general"><div>Before <span>[A Span]</span> After</div>diff --git a/manager/client/src/main/webapp/bower_components/iron-flex-layout/iron-flex-layout-classes.html b/manager/client/src/main/webapp/bower_components/iron-flex-layout/iron-flex-layout-classes.htmlindex 6bf47f8c4..a4e84c1f9 100644--- a/manager/client/src/main/webapp/bower_components/iron-flex-layout/iron-flex-layout-classes.html+++ b/manager/client/src/main/webapp/bower_components/iron-flex-layout/iron-flex-layout-classes.html@@ -370,7 +370,6 @@ The following imports are available:display: block;}- /* IE 10 support for HTML5 hidden attr */[hidden] {display: none !important;}diff --git a/manager/client/src/main/webapp/bower_components/iron-flex-layout/iron-flex-layout.html b/manager/client/src/main/webapp/bower_components/iron-flex-layout/iron-flex-layout.htmlindex a69f46a3c..5050ce853 100644--- a/manager/client/src/main/webapp/bower_components/iron-flex-layout/iron-flex-layout.html+++ b/manager/client/src/main/webapp/bower_components/iron-flex-layout/iron-flex-layout.html@@ -58,361 +58,348 @@ A complete [guide](https://elements.polymer-project.org/guides/flex-layout) to `@pseudoElement iron-flex-layout@demo demo/index.html-->--<style>- /* IE 10 support for HTML5 hidden attr */- [hidden] {- display: none !important;- }-</style>--<style is="custom-style">- :root {-- --layout: {- display: -ms-flexbox;- display: -webkit-flex;- display: flex;- };-- --layout-inline: {- display: -ms-inline-flexbox;- display: -webkit-inline-flex;- display: inline-flex;- };-- --layout-horizontal: {- @apply(--layout);-- -ms-flex-direction: row;- -webkit-flex-direction: row;- flex-direction: row;- };-- --layout-horizontal-reverse: {- @apply(--layout);-- -ms-flex-direction: row-reverse;- -webkit-flex-direction: row-reverse;- flex-direction: row-reverse;- };-- --layout-vertical: {- @apply(--layout);-- -ms-flex-direction: column;- -webkit-flex-direction: column;- flex-direction: column;- };-- --layout-vertical-reverse: {- @apply(--layout);-- -ms-flex-direction: column-reverse;- -webkit-flex-direction: column-reverse;- flex-direction: column-reverse;- };-- --layout-wrap: {- -ms-flex-wrap: wrap;- -webkit-flex-wrap: wrap;- flex-wrap: wrap;- };-- --layout-no-wrap: {- -ms-flex-wrap: nowrap;- -webkit-flex-wrap: nowrap;- flex-wrap: nowrap;- };-- --layout-wrap-reverse: {- -ms-flex-wrap: wrap-reverse;- -webkit-flex-wrap: wrap-reverse;- flex-wrap: wrap-reverse;- };-- --layout-flex-auto: {- -ms-flex: 1 1 auto;- -webkit-flex: 1 1 auto;- flex: 1 1 auto;- };-- --layout-flex-none: {- -ms-flex: none;- -webkit-flex: none;- flex: none;- };-- --layout-flex: {- -ms-flex: 1 1 0.000000001px;- -webkit-flex: 1;- flex: 1;- -webkit-flex-basis: 0.000000001px;- flex-basis: 0.000000001px;- };-- --layout-flex-2: {- -ms-flex: 2;- -webkit-flex: 2;- flex: 2;- };-- --layout-flex-3: {- -ms-flex: 3;- -webkit-flex: 3;- flex: 3;- };-- --layout-flex-4: {- -ms-flex: 4;- -webkit-flex: 4;- flex: 4;- };-- --layout-flex-5: {- -ms-flex: 5;- -webkit-flex: 5;- flex: 5;- };-- --layout-flex-6: {- -ms-flex: 6;- -webkit-flex: 6;- flex: 6;- };-- --layout-flex-7: {- -ms-flex: 7;- -webkit-flex: 7;- flex: 7;- };-- --layout-flex-8: {- -ms-flex: 8;- -webkit-flex: 8;- flex: 8;- };-- --layout-flex-9: {- -ms-flex: 9;- -webkit-flex: 9;- flex: 9;- };-- --layout-flex-10: {- -ms-flex: 10;- -webkit-flex: 10;- flex: 10;- };-- --layout-flex-11: {- -ms-flex: 11;- -webkit-flex: 11;- flex: 11;- };-- --layout-flex-12: {- -ms-flex: 12;- -webkit-flex: 12;- flex: 12;- };-- /* alignment in cross axis */-- --layout-start: {- -ms-flex-align: start;- -webkit-align-items: flex-start;- align-items: flex-start;- };-- --layout-center: {- -ms-flex-align: center;- -webkit-align-items: center;- align-items: center;- };-- --layout-end: {- -ms-flex-align: end;- -webkit-align-items: flex-end;- align-items: flex-end;- };-- --layout-baseline: {- -ms-flex-align: baseline;- -webkit-align-items: baseline;- align-items: baseline;- };-- /* alignment in main axis */-- --layout-start-justified: {- -ms-flex-pack: start;- -webkit-justify-content: flex-start;- justify-content: flex-start;- };-- --layout-center-justified: {- -ms-flex-pack: center;- -webkit-justify-content: center;- justify-content: center;- };-- --layout-end-justified: {- -ms-flex-pack: end;- -webkit-justify-content: flex-end;- justify-content: flex-end;- };-- --layout-around-justified: {- -ms-flex-pack: distribute;- -webkit-justify-content: space-around;- justify-content: space-around;- };-- --layout-justified: {- -ms-flex-pack: justify;- -webkit-justify-content: space-between;- justify-content: space-between;- };-- --layout-center-center: {- @apply(--layout-center);- @apply(--layout-center-justified);- };-- /* self alignment */-- --layout-self-start: {- -ms-align-self: flex-start;- -webkit-align-self: flex-start;- align-self: flex-start;- };-- --layout-self-center: {- -ms-align-self: center;- -webkit-align-self: center;- align-self: center;- };-- --layout-self-end: {- -ms-align-self: flex-end;- -webkit-align-self: flex-end;- align-self: flex-end;- };-- --layout-self-stretch: {- -ms-align-self: stretch;- -webkit-align-self: stretch;- align-self: stretch;- };-- --layout-self-baseline: {- -ms-align-self: baseline;- -webkit-align-self: baseline;- align-self: baseline;- };-- /* multi-line alignment in main axis */-- --layout-start-aligned: {- -ms-flex-line-pack: start; /* IE10 */- -ms-align-content: flex-start;- -webkit-align-content: flex-start;- align-content: flex-start;- };-- --layout-end-aligned: {- -ms-flex-line-pack: end; /* IE10 */- -ms-align-content: flex-end;- -webkit-align-content: flex-end;- align-content: flex-end;- };-- --layout-center-aligned: {- -ms-flex-line-pack: center; /* IE10 */- -ms-align-content: center;- -webkit-align-content: center;- align-content: center;- };-- --layout-between-aligned: {- -ms-flex-line-pack: justify; /* IE10 */- -ms-align-content: space-between;- -webkit-align-content: space-between;- align-content: space-between;- };-- --layout-around-aligned: {- -ms-flex-line-pack: distribute; /* IE10 */- -ms-align-content: space-around;- -webkit-align-content: space-around;- align-content: space-around;- };-- /*******************************- Other Layout- *******************************/-- --layout-block: {- display: block;- };-- --layout-invisible: {- visibility: hidden !important;- };-- --layout-relative: {- position: relative;- };-- --layout-fit: {- position: absolute;- top: 0;- right: 0;- bottom: 0;- left: 0;- };-- --layout-scroll: {- -webkit-overflow-scrolling: touch;- overflow: auto;- };-- --layout-fullbleed: {- margin: 0;- height: 100vh;- };-- /* fixed position */-- --layout-fixed-top: {- position: fixed;- top: 0;- left: 0;- right: 0;- };-- --layout-fixed-right: {- position: fixed;- top: 0;- right: 0;- bottom: 0;- };-- --layout-fixed-bottom: {- position: fixed;- right: 0;- bottom: 0;- left: 0;- };-- --layout-fixed-left: {- position: fixed;- top: 0;- bottom: 0;- left: 0;- };-- }--</style>+<custom-style>+ <style is="custom-style">+ html {++ --layout: {+ display: -ms-flexbox;+ display: -webkit-flex;+ display: flex;+ };++ --layout-inline: {+ display: -ms-inline-flexbox;+ display: -webkit-inline-flex;+ display: inline-flex;+ };++ --layout-horizontal: {+ @apply --layout;++ -ms-flex-direction: row;+ -webkit-flex-direction: row;+ flex-direction: row;+ };++ --layout-horizontal-reverse: {+ @apply --layout;++ -ms-flex-direction: row-reverse;+ -webkit-flex-direction: row-reverse;+ flex-direction: row-reverse;+ };++ --layout-vertical: {+ @apply --layout;++ -ms-flex-direction: column;+ -webkit-flex-direction: column;+ flex-direction: column;+ };++ --layout-vertical-reverse: {+ @apply --layout;++ -ms-flex-direction: column-reverse;+ -webkit-flex-direction: column-reverse;+ flex-direction: column-reverse;+ };++ --layout-wrap: {+ -ms-flex-wrap: wrap;+ -webkit-flex-wrap: wrap;+ flex-wrap: wrap;+ };++ --layout-wrap-reverse: {+ -ms-flex-wrap: wrap-reverse;+ -webkit-flex-wrap: wrap-reverse;+ flex-wrap: wrap-reverse;+ };++ --layout-flex-auto: {+ -ms-flex: 1 1 auto;+ -webkit-flex: 1 1 auto;+ flex: 1 1 auto;+ };++ --layout-flex-none: {+ -ms-flex: none;+ -webkit-flex: none;+ flex: none;+ };++ --layout-flex: {+ -ms-flex: 1 1 0.000000001px;+ -webkit-flex: 1;+ flex: 1;+ -webkit-flex-basis: 0.000000001px;+ flex-basis: 0.000000001px;+ };++ --layout-flex-2: {+ -ms-flex: 2;+ -webkit-flex: 2;+ flex: 2;+ };++ --layout-flex-3: {+ -ms-flex: 3;+ -webkit-flex: 3;+ flex: 3;+ };++ --layout-flex-4: {+ -ms-flex: 4;+ -webkit-flex: 4;+ flex: 4;+ };++ --layout-flex-5: {+ -ms-flex: 5;+ -webkit-flex: 5;+ flex: 5;+ };++ --layout-flex-6: {+ -ms-flex: 6;+ -webkit-flex: 6;+ flex: 6;+ };++ --layout-flex-7: {+ -ms-flex: 7;+ -webkit-flex: 7;+ flex: 7;+ };++ --layout-flex-8: {+ -ms-flex: 8;+ -webkit-flex: 8;+ flex: 8;+ };++ --layout-flex-9: {+ -ms-flex: 9;+ -webkit-flex: 9;+ flex: 9;+ };++ --layout-flex-10: {+ -ms-flex: 10;+ -webkit-flex: 10;+ flex: 10;+ };++ --layout-flex-11: {+ -ms-flex: 11;+ -webkit-flex: 11;+ flex: 11;+ };++ --layout-flex-12: {+ -ms-flex: 12;+ -webkit-flex: 12;+ flex: 12;+ };++ /* alignment in cross axis */++ --layout-start: {+ -ms-flex-align: start;+ -webkit-align-items: flex-start;+ align-items: flex-start;+ };++ --layout-center: {+ -ms-flex-align: center;+ -webkit-align-items: center;+ align-items: center;+ };++ --layout-end: {+ -ms-flex-align: end;+ -webkit-align-items: flex-end;+ align-items: flex-end;+ };++ --layout-baseline: {+ -ms-flex-align: baseline;+ -webkit-align-items: baseline;+ align-items: baseline;+ };++ /* alignment in main axis */++ --layout-start-justified: {+ -ms-flex-pack: start;+ -webkit-justify-content: flex-start;+ justify-content: flex-start;+ };++ --layout-center-justified: {+ -ms-flex-pack: center;+ -webkit-justify-content: center;+ justify-content: center;+ };++ --layout-end-justified: {+ -ms-flex-pack: end;+ -webkit-justify-content: flex-end;+ justify-content: flex-end;+ };++ --layout-around-justified: {+ -ms-flex-pack: distribute;+ -webkit-justify-content: space-around;+ justify-content: space-around;+ };++ --layout-justified: {+ -ms-flex-pack: justify;+ -webkit-justify-content: space-between;+ justify-content: space-between;+ };++ --layout-center-center: {+ @apply --layout-center;+ @apply --layout-center-justified;+ };++ /* self alignment */++ --layout-self-start: {+ -ms-align-self: flex-start;+ -webkit-align-self: flex-start;+ align-self: flex-start;+ };++ --layout-self-center: {+ -ms-align-self: center;+ -webkit-align-self: center;+ align-self: center;+ };++ --layout-self-end: {+ -ms-align-self: flex-end;+ -webkit-align-self: flex-end;+ align-self: flex-end;+ };++ --layout-self-stretch: {+ -ms-align-self: stretch;+ -webkit-align-self: stretch;+ align-self: stretch;+ };++ --layout-self-baseline: {+ -ms-align-self: baseline;+ -webkit-align-self: baseline;+ align-self: baseline;+ };++ /* multi-line alignment in main axis */++ --layout-start-aligned: {+ -ms-flex-line-pack: start; /* IE10 */+ -ms-align-content: flex-start;+ -webkit-align-content: flex-start;+ align-content: flex-start;+ };++ --layout-end-aligned: {+ -ms-flex-line-pack: end; /* IE10 */+ -ms-align-content: flex-end;+ -webkit-align-content: flex-end;+ align-content: flex-end;+ };++ --layout-center-aligned: {+ -ms-flex-line-pack: center; /* IE10 */+ -ms-align-content: center;+ -webkit-align-content: center;+ align-content: center;+ };++ --layout-between-aligned: {+ -ms-flex-line-pack: justify; /* IE10 */+ -ms-align-content: space-between;+ -webkit-align-content: space-between;+ align-content: space-between;+ };++ --layout-around-aligned: {+ -ms-flex-line-pack: distribute; /* IE10 */+ -ms-align-content: space-around;+ -webkit-align-content: space-around;+ align-content: space-around;+ };++ /*******************************+ Other Layout+ *******************************/++ --layout-block: {+ display: block;+ };++ --layout-invisible: {+ visibility: hidden !important;+ };++ --layout-relative: {+ position: relative;+ };++ --layout-fit: {+ position: absolute;+ top: 0;+ right: 0;+ bottom: 0;+ left: 0;+ };++ --layout-scroll: {+ -webkit-overflow-scrolling: touch;+ overflow: auto;+ };++ --layout-fullbleed: {+ margin: 0;+ height: 100vh;+ };++ /* fixed position */++ --layout-fixed-top: {+ position: fixed;+ top: 0;+ left: 0;+ right: 0;+ };++ --layout-fixed-right: {+ position: fixed;+ top: 0;+ right: 0;+ bottom: 0;+ };++ --layout-fixed-bottom: {+ position: fixed;+ right: 0;+ bottom: 0;+ left: 0;+ };++ --layout-fixed-left: {+ position: fixed;+ top: 0;+ bottom: 0;+ left: 0;+ };++ }+ </style>+</custom-style>\ No newline at end of filediff --git a/manager/client/src/main/webapp/bower_components/iron-flex-layout/test/index.html b/manager/client/src/main/webapp/bower_components/iron-flex-layout/test/index.htmlindex 90e12a78c..78d32da2f 100644--- a/manager/client/src/main/webapp/bower_components/iron-flex-layout/test/index.html+++ b/manager/client/src/main/webapp/bower_components/iron-flex-layout/test/index.html@@ -21,9 +21,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN<body><script>WCT.loadSuites([- 'iron-flex-layout.html',+ 'iron-flex-layout.html?wc-shadydom=true&wc-ce=true','iron-flex-layout.html?dom=shadow',- 'iron-flex-layout-classes.html',+ 'iron-flex-layout-classes.html?wc-shadydom=true&wc-ce=true','iron-flex-layout-classes.html?dom=shadow']);</script>diff --git a/manager/client/src/main/webapp/bower_components/iron-flex-layout/test/iron-flex-layout-classes.html b/manager/client/src/main/webapp/bower_components/iron-flex-layout/test/iron-flex-layout-classes.htmlindex 3173b308a..525718ec6 100644--- a/manager/client/src/main/webapp/bower_components/iron-flex-layout/test/iron-flex-layout-classes.html+++ b/manager/client/src/main/webapp/bower_components/iron-flex-layout/test/iron-flex-layout-classes.html@@ -16,45 +16,47 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">- <script src="../../webcomponentsjs/webcomponents.js"></script>+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script><script src="../../web-component-tester/browser.js"></script><link rel="import" href="../iron-flex-layout-classes.html">- <style is="custom-style" include="iron-flex iron-flex-reverse iron-flex-factors iron-flex-alignment iron-positioning">- body {- margin: 0;- padding: 0;- }- .container {- width: 300px;- min-height: 50px;- background-color: #ccc;- }- .container > div {- width: 50px;- min-height: 50px; /* so that it can grow in vertical layouts. */- }- /* IE11 does not calculate flex proportions correctly in a vertical- * layout if the children just have a min-height. For those tests,- * use a fixed height instead. */- .container > div.fixed-height {- min-height: 0;- height: 50px;- }- .container.relative > div {- min-width: 50px;- min-height: 50px;- width: inherit;- }- .container.small { width: 120px; }- .container.tall { height: 300px; }-- #c1 { background-color: #E91E63; }- #c2 { background-color: #03A9F4; }- #c3 { background-color: #CDDC39; }- #c4 { background-color: #03A9F4; }- #c5 { background-color: #E91E63; }- </style>+ <custom-style>+ <style is="custom-style" include="iron-flex iron-flex-reverse iron-flex-factors iron-flex-alignment iron-positioning">+ body {+ margin: 0;+ padding: 0;+ }+ .container {+ width: 300px;+ min-height: 50px;+ background-color: #ccc;+ }+ .container > div {+ width: 50px;+ min-height: 50px; /* so that it can grow in vertical layouts. */+ }+ /* IE11 does not calculate flex proportions correctly in a vertical+ * layout if the children just have a min-height. For those tests,+ * use a fixed height instead. */+ .container > div.fixed-height {+ min-height: 0;+ height: 50px;+ }+ .container.relative > div {+ min-width: 50px;+ min-height: 50px;+ width: inherit;+ }+ .container.small { width: 120px; }+ .container.tall { height: 300px; }++ #c1 { background-color: #E91E63; }+ #c2 { background-color: #03A9F4; }+ #c3 { background-color: #CDDC39; }+ #c4 { background-color: #03A9F4; }+ #c5 { background-color: #E91E63; }+ </style>+ </custom-style></head><body><test-fixture id="basic">@@ -107,10 +109,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN<script>function positionEquals(node, top, bottom, left, right) {var rect = node.getBoundingClientRect();- return rect.top === top && rect.bottom === bottom &&+ return rect.top === top && rect.bottom === bottom &&rect.left === left && rect.right === right;}suite('basic layout', function() {+ suiteSetup(function() {+ // In Polymer 2.0, custom-style is lazy, and won't boot until a+ // Polymer element is used (and these tests don't have a Polymer element).+ if (Polymer.Element) {+ window.ShadyCSS.styleDocument();+ }+ });+var container;setup(function() {diff --git a/manager/client/src/main/webapp/bower_components/iron-flex-layout/test/iron-flex-layout.html b/manager/client/src/main/webapp/bower_components/iron-flex-layout/test/iron-flex-layout.htmlindex f2090878e..f2977309b 100644--- a/manager/client/src/main/webapp/bower_components/iron-flex-layout/test/iron-flex-layout.html+++ b/manager/client/src/main/webapp/bower_components/iron-flex-layout/test/iron-flex-layout.html@@ -16,71 +16,72 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">- <script src="../../webcomponentsjs/webcomponents.js"></script>+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script><script src="../../web-component-tester/browser.js"></script><link rel="import" href="../iron-flex-layout.html">- <style is="custom-style">- body {- margin: 0;- padding: 0;- }- .container {- width: 300px;- min-height: 50px;- background-color: #ccc;- }- .container > div {- width: 50px;- min-height: 50px; /* so that it can grow in vertical layouts. */- }- /* IE11 does not calculate flex proportions correctly in a vertical- * layout if the children just have a min-height. For those tests,- * use a fixed height instead. */- .container > div.fixed-height {- min-height: 0;- height: 50px;- }- .relative { @apply(--layout-relative); }- .container.relative > div {- min-width: 50px;- min-height: 50px;- width: inherit;- }- .container.small { width: 120px; }- .container.tall { height: 300px; }-- #c1 { background-color: #E91E63; }- #c2 { background-color: #03A9F4; }- #c3 { background-color: #CDDC39; }- #c4 { background-color: #03A9F4; }- #c5 { background-color: #E91E63; }-- .horizontal { @apply(--layout-horizontal); }- .horizontal-reverse { @apply(--layout-horizontal-reverse); }- .vertical { @apply(--layout-vertical); }- .vertical-reverse { @apply(--layout-vertical-reverse); }- .wrap { @apply(--layout-wrap); }- .wrap-reverse { @apply(--layout-wrap-reverse); }- .flex { @apply(--layout-flex); }- .flex2 { @apply(--layout-flex-2); }- .flex3 { @apply(--layout-flex-3); }- .center { @apply(--layout-center); }- .start { @apply(--layout-start); }- .end { @apply(--layout-end); }- .start-justified { @apply(--layout-start-justified); }- .center-justified { @apply(--layout-center-justified); }- .end-justified { @apply(--layout-end-justified); }- .justified { @apply(--layout-justified); }- .around-justified { @apply(--layout-around-justified); }- .fit { @apply(--layout-fit); }- .start-aligned { @apply(--layout-start-aligned); }- .end-aligned { @apply(--layout-end-aligned); }- .center-aligned { @apply(--layout-center-aligned); }- .between-aligned { @apply(--layout-between-aligned); }- .around-aligned { @apply(--layout-around-aligned); }-- </style>+ <custom-style>+ <style is="custom-style">+ body {+ margin: 0;+ padding: 0;+ }+ .container {+ width: 300px;+ min-height: 50px;+ background-color: #ccc;+ }+ .container > div {+ width: 50px;+ min-height: 50px; /* so that it can grow in vertical layouts. */+ }+ /* IE11 does not calculate flex proportions correctly in a vertical+ * layout if the children just have a min-height. For those tests,+ * use a fixed height instead. */+ .container > div.fixed-height {+ min-height: 0;+ height: 50px;+ }+ .relative { @apply --layout-relative; }+ .container.relative > div {+ min-width: 50px;+ min-height: 50px;+ width: inherit;+ }+ .container.small { width: 120px; }+ .container.tall { height: 300px; }++ #c1 { background-color: #E91E63; }+ #c2 { background-color: #03A9F4; }+ #c3 { background-color: #CDDC39; }+ #c4 { background-color: #03A9F4; }+ #c5 { background-color: #E91E63; }++ .horizontal { @apply --layout-horizontal; }+ .horizontal-reverse { @apply --layout-horizontal-reverse; }+ .vertical { @apply --layout-vertical; }+ .vertical-reverse { @apply --layout-vertical-reverse; }+ .wrap { @apply --layout-wrap; }+ .wrap-reverse { @apply --layout-wrap-reverse; }+ .flex { @apply --layout-flex; }+ .flex2 { @apply --layout-flex-2; }+ .flex3 { @apply --layout-flex-3; }+ .center { @apply --layout-center; }+ .start { @apply --layout-start; }+ .end { @apply --layout-end; }+ .start-justified { @apply --layout-start-justified; }+ .center-justified { @apply --layout-center-justified; }+ .end-justified { @apply --layout-end-justified; }+ .justified { @apply --layout-justified; }+ .around-justified { @apply --layout-around-justified; }+ .fit { @apply --layout-fit; }+ .start-aligned { @apply --layout-start-aligned; }+ .end-aligned { @apply --layout-end-aligned; }+ .center-aligned { @apply --layout-center-aligned; }+ .between-aligned { @apply --layout-between-aligned; }+ .around-aligned { @apply --layout-around-aligned; }+ </style>+ </custom-style></head><body><test-fixture id="basic">@@ -133,10 +134,19 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN<script>function positionEquals(node, top, bottom, left, right) {var rect = node.getBoundingClientRect();- return rect.top === top && rect.bottom === bottom &&+ return rect.top === top && rect.bottom === bottom &&rect.left === left && rect.right === right;}+suite('basic layout', function() {+ suiteSetup(function() {+ // In Polymer 2.0, custom-style is lazy, and won't boot until a+ // Polymer element is used (and these tests don't have a Polymer element).+ if (Polymer.Element) {+ window.ShadyCSS.styleDocument();+ }+ });+var container;setup(function() {diff --git a/manager/client/src/main/webapp/bower_components/polymer/.bower.json b/manager/client/src/main/webapp/bower_components/polymer/.bower.jsonindex 8fa09709b..3a1ea110f 100644--- a/manager/client/src/main/webapp/bower_components/polymer/.bower.json+++ b/manager/client/src/main/webapp/bower_components/polymer/.bower.json@@ -1,19 +1,14 @@{"name": "polymer",- "version": "1.9.1","main": [- "polymer.html",- "polymer-mini.html",- "polymer-micro.html"+ "polymer.html"],"license": "http://polymer.github.io/LICENSE.txt","ignore": ["/.*","/test/","/util/",- "/explainer/","gulpfile.js",- "PRIMER.md","CONTRIBUTING.md","CHANGELOG.md"],@@ -25,21 +20,26 @@"url": "https://github.com/Polymer/polymer.git"},"dependencies": {- "webcomponentsjs": "^0.7.24"+ "shadycss": "webcomponents/shadycss#^v1.0.0",+ "webcomponentsjs": "^v1.0.2"},"devDependencies": {- "web-component-tester": "*",- "iron-component-page": "polymerElements/iron-component-page#^1.1.6"+ "web-component-tester": "^v6.0.0-prerelease.10",+ "test-fixture": "PolymerElements/test-fixture#3.0.0-rc.1"},"private": true,+ "resolutions": {+ "test-fixture": "3.0.0-rc.1"+ },"homepage": "https://github.com/Polymer/polymer",- "_release": "1.9.1",+ "version": "2.0.2",+ "_release": "2.0.2","_resolution": {"type": "version",- "tag": "v1.9.1",- "commit": "9f3381a3d92c62d64cbf0296f7c967898a30d63d"+ "tag": "v2.0.2",+ "commit": "c90ebdced65c2ee6eeeb4d9a96c2d1b0f48b789e"},- "_source": "git://github.com/Polymer/polymer.git",- "_target": "^1.1.0",+ "_source": "https://github.com/Polymer/polymer.git",+ "_target": "^2.0.0","_originalSource": "Polymer/polymer"}\ No newline at end of filediff --git a/manager/client/src/main/webapp/bower_components/polymer/LICENSE.txt b/manager/client/src/main/webapp/bower_components/polymer/LICENSE.txtindex 95987bac8..87c683b8e 100644--- a/manager/client/src/main/webapp/bower_components/polymer/LICENSE.txt+++ b/manager/client/src/main/webapp/bower_components/polymer/LICENSE.txt@@ -1,4 +1,4 @@-// Copyright (c) 2014 The Polymer Authors. All rights reserved.+// Copyright (c) 2017 The Polymer Authors. All rights reserved.//// Redistribution and use in source and binary forms, with or without// modification, are permitted provided that the following conditions arediff --git a/manager/client/src/main/webapp/bower_components/polymer/bower.json b/manager/client/src/main/webapp/bower_components/polymer/bower.jsonindex c49ba078e..579ba00f7 100644--- a/manager/client/src/main/webapp/bower_components/polymer/bower.json+++ b/manager/client/src/main/webapp/bower_components/polymer/bower.json@@ -1,19 +1,14 @@{"name": "polymer",- "version": "1.9.1","main": [- "polymer.html",- "polymer-mini.html",- "polymer-micro.html"+ "polymer.html"],"license": "http://polymer.github.io/LICENSE.txt","ignore": ["/.*","/test/","/util/",- "/explainer/","gulpfile.js",- "PRIMER.md","CONTRIBUTING.md","CHANGELOG.md"],@@ -25,11 +20,15 @@"url": "https://github.com/Polymer/polymer.git"},"dependencies": {- "webcomponentsjs": "^0.7.24"+ "shadycss": "webcomponents/shadycss#^v1.0.0",+ "webcomponentsjs": "^v1.0.2"},"devDependencies": {- "web-component-tester": "*",- "iron-component-page": "polymerElements/iron-component-page#^1.1.6"+ "web-component-tester": "^v6.0.0-prerelease.10",+ "test-fixture": "PolymerElements/test-fixture#3.0.0-rc.1"},- "private": true+ "private": true,+ "resolutions": {+ "test-fixture": "3.0.0-rc.1"+ }}diff --git a/manager/client/src/main/webapp/bower_components/polymer/build.log b/manager/client/src/main/webapp/bower_components/polymer/build.logdeleted file mode 100644index 2ef7f135c..000000000--- a/manager/client/src/main/webapp/bower_components/polymer/build.log+++ /dev/null@@ -1,608 +0,0 @@-BUILD LOG-----------Build Time: 2017-04-17T16:49:58-0700--NODEJS INFORMATION-==================-nodejs: v7.9.0-accepts: 1.3.3-accessibility-developer-tools: 2.12.0-abbrev: 1.1.0-acorn: 5.0.3-acorn-jsx: 3.0.1-adm-zip: 0.4.7-after: 0.8.2-agent-base: 2.0.1-ajv-keywords: 1.5.1-align-text: 0.1.4-amdefine: 1.0.1-ansi-cyan: 0.1.1-ansi-escapes: 1.4.0-ansi-red: 0.1.1-ansi-regex: 2.1.1-append-field: 0.1.0-ansi-styles: 2.2.1-ansi-wrap: 0.1.0-archiver: 0.14.4-ajv: 4.11.6-archy: 1.0.0-argparse: 1.0.9-arr-flatten: 1.0.1-arr-union: 2.1.0-arr-diff: 2.0.0-array-flatten: 1.1.1-array-slice: 0.2.3-array-union: 1.0.2-array-uniq: 1.0.3-array-unique: 0.2.1-array-differ: 1.0.0-arraybuffer.slice: 0.0.6-arrify: 1.0.1-asap: 2.0.5-asn1: 0.1.11-assertion-error: 1.0.2-async: 0.9.2-asynckit: 0.4.0-aws-sign2: 0.6.0-aws4: 1.6.0-babel-code-frame: 6.22.0-babel-polyfill: 6.23.0-backo2: 1.0.2-babel-runtime: 6.23.0-backoff: 2.5.0-balanced-match: 0.4.2-base64-js: 1.1.2-base64-arraybuffer: 0.1.5-base64id: 1.0.0-bcrypt-pbkdf: 1.0.1-beeper: 1.1.1-binaryextensions: 1.0.1-better-assert: 1.0.2-blob: 0.0.4-bluebird: 2.11.0-body-parser: 1.17.1-boom: 2.10.1-brace-expansion: 1.1.7-braces: 1.8.5-boxen: 0.3.1-buffer-crc32: 0.2.13-buffer-shims: 1.0.0-bufferstreams: 1.1.1-browserstack: 1.5.0-bunyan: 1.8.10-busboy: 0.2.14-bytes: 2.4.0-caller-path: 0.1.0-callsite: 1.0.0-callsites: 0.2.0-camelcase: 1.2.1-assert-plus: 0.1.5-bl: 1.2.0-capture-stack-trace: 1.0.0-caseless: 0.11.0-center-align: 0.1.3-chai: 3.5.0-chalk: 1.1.3-circular-json: 0.3.1-cli-cursor: 1.0.2-cli-width: 2.1.0-cleankill: 1.0.3-clone: 1.0.2-clone-stats: 0.0.1-cliui: 2.1.0-code-point-at: 1.1.0-co: 4.6.0-combined-stream: 1.0.5-commander: 2.3.0-component-bind: 1.0.0-component-inherit: 0.0.3-component-emitter: 1.1.2-concat-map: 0.0.1-concat-stream: 1.6.0-configstore: 2.1.0-content-disposition: 0.5.2-compress-commons: 0.2.9-content-type: 1.0.2-cookie: 0.3.1-cookie-signature: 1.0.6-core-js: 2.4.1-core-util-is: 1.0.2-crc: 3.2.1-crc32-stream: 0.3.4-create-error-class: 3.0.2-cryptiles: 2.0.5-csv: 0.4.6-csv-generate: 0.0.6-csv-parse: 1.2.0-csv-stringify: 0.0.8-ctype: 0.5.3-dashdash: 1.14.1-dateformat: 2.0.0-debug: 2.6.3-debuglog: 1.0.1-decamelize: 1.2.0-deep-eql: 0.1.3-d: 1.0.0-deep-extend: 0.4.1-deep-is: 0.1.3-defaults: 1.0.3-del: 2.2.2-delayed-stream: 1.0.0-deprecated: 0.0.1-destroy: 1.0.4-detect-file: 0.1.0-dezalgo: 1.0.3-depd: 1.1.0-dicer: 0.2.5-diff: 1.4.0-doctrine: 2.0.0-dom5: 1.3.6-domelementtype: 1.3.0-domhandler: 2.3.0-dom-serializer: 0.1.0-domutils: 1.5.1-dot-prop: 3.0.0-dtrace-provider: 0.6.0-duplexer: 0.1.1-duplexer2: 0.0.2-ecc-jsbn: 0.1.1-ee-first: 1.1.1-encodeurl: 1.0.1-end-of-stream: 0.1.5-engine.io: 1.8.3-engine.io-client: 1.8.3-entities: 1.1.1-engine.io-parser: 1.3.2-es5-ext: 0.10.15-error-ex: 1.3.1-es6-iterator: 2.0.1-es6-promise: 2.3.0-es6-map: 0.1.5-es6-symbol: 3.1.1-es6-weak-map: 2.0.2-escape-html: 1.0.3-escape-regexp-component: 1.0.2-escape-string-regexp: 1.0.5-escodegen: 1.8.1-escope: 3.6.0-eslint: 3.19.0-eslint-plugin-html: 1.7.0-espree: 3.4.1-es6-set: 0.1.5-esquery: 1.0.0-esrecurse: 4.1.0-estraverse: 4.2.0-esutils: 2.0.2-etag: 1.8.0-event-emitter: 0.3.5-exit-hook: 1.1.1-expand-brackets: 0.1.5-esprima: 3.1.3-expand-tilde: 1.2.2-expand-range: 1.8.2-extend: 3.0.0-extend-shallow: 1.1.4-express: 4.15.2-extsprintf: 1.2.0-extglob: 0.3.2-fast-levenshtein: 2.0.6-fancy-log: 1.3.0-figures: 1.7.0-file-entry-cache: 2.0.0-filename-regex: 2.0.0-fill-range: 2.2.3-filled-array: 1.1.0-fd-slicer: 1.0.1-finalhandler: 1.0.1-find-index: 0.1.1-findup-sync: 0.4.3-first-chunk-stream: 1.0.0-fined: 1.0.2-flat-cache: 1.2.2-for-in: 1.0.2-flagged-respawn: 0.3.2-for-own: 0.1.5-forever-agent: 0.6.1-form-data: 2.1.4-formatio: 1.1.1-forwarded: 0.1.0-formidable: 1.1.1-freeport: 1.0.5-fresh: 0.5.0-fs-exists-sync: 0.1.0-fs.realpath: 1.0.0-gaze: 0.5.2-generate-function: 2.0.0-generate-object-property: 1.2.0-getpass: 0.1.6-github-url-from-git: 1.5.0-github-url-from-username-repo: 1.0.2-glob: 7.1.1-glob-base: 0.3.0-glob-parent: 2.0.0-glob-stream: 3.1.18-glob-watcher: 0.0.6-glob2base: 0.0.12-global-modules: 0.2.3-global-prefix: 0.1.5-globals: 9.17.0-globby: 5.0.0-globule: 0.1.0-glogg: 1.0.0-graceful-fs: 3.0.11-graceful-readlink: 1.0.1-growl: 1.9.2-gulp: 3.9.1-gulp-audit: 1.0.0-gulp-eslint: 3.0.1-got: 5.7.1-gulp-rename: 1.2.2-gulp-replace: 0.5.4-gulp-util: 3.0.8-gulp-vulcanize: 6.1.0-gulplog: 1.0.0-handle-thing: 1.2.5-har-validator: 2.0.6-has-binary: 0.1.7-has-ansi: 2.0.0-has-color: 0.1.7-has-gulplog: 0.1.0-has-cors: 1.1.0-hawk: 3.1.3-hoek: 2.16.3-homedir-polyfill: 1.0.1-hpack.js: 2.1.6-htmlparser2: 3.9.2-http-deceiver: 1.2.7-http-signature: 0.11.0-http-errors: 1.6.1-https-proxy-agent: 1.0.0-hydrolysis: 1.24.1-iconv-lite: 0.4.15-ignore: 3.2.7-imurmurhash: 0.1.4-indexof: 0.0.1-inflight: 1.0.6-inherits: 2.0.3-ini: 1.3.4-interpret: 1.0.2-ipaddr.js: 1.3.0-is-absolute: 0.2.6-is-arrayish: 0.2.1-is-buffer: 1.1.5-inquirer: 0.12.0-is-equal-shallow: 0.1.3-is-extendable: 0.1.1-is-dotfile: 1.0.2-is-extglob: 1.0.0-is-finite: 1.0.2-is-glob: 2.0.1-is-my-json-valid: 2.16.0-is-npm: 1.0.0-is-fullwidth-code-point: 1.0.0-is-obj: 1.0.1-is-path-cwd: 1.0.0-is-path-in-cwd: 1.0.0-is-path-inside: 1.0.0-is-posix-bracket: 0.1.1-is-primitive: 2.0.0-is-property: 1.0.2-is-number: 2.1.0-is-relative: 0.2.1-is-resolvable: 1.0.0-is-redirect: 1.0.0-is-retry-allowed: 1.1.0-is-stream: 1.1.0-is-typedarray: 1.0.0-is-unc-path: 0.1.2-is-utf8: 0.2.1-is-windows: 0.2.0-isarray: 1.0.0-isexe: 2.0.0-isobject: 2.1.0-isstream: 0.1.2-istextorbinary: 1.0.2-jade: 0.26.3-jju: 1.3.0-jodid25519: 1.0.2-js-tokens: 3.0.1-js-yaml: 3.8.3-jsbn: 0.1.1-json-parse-helpfulerror: 1.0.3-json-schema: 0.2.3-json-stable-stringify: 1.0.1-json-stringify-safe: 5.0.1-jsonify: 0.0.0-jsonpointer: 4.0.1-json3: 3.3.2-jsprim: 1.4.0-keep-alive-agent: 0.0.1-kind-of: 3.1.0-latest-version: 2.0.0-launchpad: 0.5.4-lazypipe: 1.0.1-lazystream: 0.1.0-levn: 0.3.0-liftoff: 2.3.0-lodash: 1.0.2-lodash._basecopy: 3.0.1-lodash._basetostring: 3.0.1-lodash._basevalues: 3.0.0-lodash._getnative: 3.9.1-lodash._isiterateecall: 3.0.9-lodash._reescape: 3.0.0-lodash._reevaluate: 3.0.0-lodash._root: 3.0.1-lodash._reinterpolate: 3.0.0-lodash.assignwith: 4.2.0-lodash.escape: 3.2.0-lodash.isarguments: 3.1.0-lodash.isarray: 3.0.4-lazy-cache: 1.0.4-lodash.isempty: 4.4.0-lodash.isstring: 4.0.1-lodash.keys: 3.1.2-lodash.mapvalues: 4.6.0-lodash.pick: 4.4.0-lodash.restparam: 3.6.1-lodash.template: 3.6.2-lodash.templatesettings: 3.1.1-lodash.isplainobject: 4.0.6-lolex: 1.3.2-lowercase-keys: 1.0.0-lru-cache: 2.7.3-longest: 1.0.1-media-typer: 0.3.0-merge-descriptors: 1.0.1-map-cache: 0.2.2-micromatch: 2.3.11-mime: 1.3.4-mime-db: 1.27.0-mime-types: 2.1.15-methods: 1.1.2-minimalistic-assert: 1.0.0-minimatch: 3.0.3-minimist: 1.2.0-mkdirp: 0.5.1-mocha: 2.5.3-moment: 2.18.1-ms: 0.7.2-multer: 1.3.0-multipipe: 0.1.2-mute-stream: 0.0.5-mv: 2.1.1-nan: 2.6.2-natives: 1.1.0-ncp: 2.0.0-natural-compare: 1.4.0-negotiator: 0.6.1-node-int64: 0.3.3-node-status-codes: 1.0.0-node-uuid: 1.4.8-nodegit-promise: 4.0.0-nopt: 3.0.6-normalize-package-data: 1.0.3-normalize-path: 2.1.1-number-is-nan: 1.0.1-nomnom: 1.8.1-oauth-sign: 0.8.2-object-assign: 4.1.1-object-component: 0.0.3-object.omit: 2.0.1-obuf: 1.1.1-on-finished: 2.3.0-once: 1.4.0-onetime: 1.1.0-optionator: 0.8.2-orchestrator: 0.3.8-ordered-read-streams: 0.1.0-os-homedir: 1.0.2-options: 0.0.6-os-tmpdir: 1.0.2-osenv: 0.1.4-package-json: 2.4.0-parse-filepath: 1.0.1-parse-glob: 3.0.4-parse-json: 2.2.0-parse-passwd: 1.0.0-parse5: 1.5.1-parseqs: 0.0.5-parseuri: 0.0.5-parsejson: 0.0.3-parseurl: 1.3.1-path-is-absolute: 1.0.1-path-parse: 1.0.5-path-posix: 1.0.0-path-is-inside: 1.0.2-path-root: 0.1.1-path-root-regex: 0.1.2-path-to-regexp: 0.1.7-pend: 1.2.0-pify: 2.3.0-pinkie: 2.0.4-pinkie-promise: 2.0.1-plugin-error: 0.1.2-pluralize: 1.2.1-polyclean: 1.3.1-precond: 0.2.3-prelude-ls: 1.1.2-plist: 2.0.1-prepend-http: 1.0.4-preserve: 0.2.0-process-nextick-args: 1.0.7-pretty-hrtime: 1.0.3-promisify-node: 0.4.0-proxy-addr: 1.1.4-pseudomap: 1.0.2-q: 1.5.0-qs: 6.4.0-randomatic: 1.1.6-range-parser: 1.2.0-rc: 1.2.1-read-all-stream: 3.1.0-read-installed: 3.1.5-read-package-json: 1.3.3-readable-stream: 2.2.9-readdir-scoped-modules: 1.0.2-readline2: 1.0.1-rechoir: 0.6.2-regenerator-runtime: 0.10.3-regex-cache: 0.4.3-registry-auth-token: 3.1.2-registry-url: 3.1.0-remove-trailing-separator: 1.0.1-repeat-element: 1.1.2-repeat-string: 1.6.1-repeating: 2.0.1-replace-ext: 0.0.1-raw-body: 2.2.0-progress: 1.1.8-replacestream: 4.0.2-request: 2.79.0-require-uncached: 1.0.3-resolve: 1.3.2-resolve-dir: 0.1.1-resolve-from: 1.0.1-punycode: 1.4.1-restify: 4.3.0-restore-cursor: 1.0.1-right-align: 0.1.3-rimraf: 2.6.1-run-async: 0.1.0-run-sequence: 1.2.2-safe-json-stringify: 1.0.4-samsam: 1.1.2-sauce-connect-launcher: 1.2.1-select-hose: 2.0.0-selenium-standalone: 5.11.2-rx-lite: 3.1.2-semver-diff: 2.1.0-semver: 4.3.6-send: 0.11.1-sequencify: 0.0.7-serve-static: 1.12.1-serve-waterfall: 1.1.1-server-destroy: 1.0.1-setprototypeof: 1.0.3-shelljs: 0.7.7-sigmund: 1.0.1-sinon: 1.17.7-slice-ansi: 0.0.4-slide: 1.1.6-sinon-chai: 2.9.0-socket.io: 1.7.3-sntp: 1.0.9-socket.io-client: 1.7.3-socket.io-parser: 2.3.1-socket.io-adapter: 0.5.0-source-map: 0.2.0-sparkles: 1.0.0-spdy: 3.4.4-spdy-transport: 2.0.18-sshpk: 1.13.0-stacky: 1.3.1-stream-combiner: 0.2.2-stream-consume: 0.1.0-sprintf-js: 1.0.3-stream-transform: 0.1.2-streamsearch: 0.1.2-statuses: 1.3.1-string-width: 1.0.2-string_decoder: 1.0.0-stringstream: 0.0.5-strip-ansi: 3.0.1-strip-bom: 1.0.0-strip-json-comments: 2.0.1-supports-color: 2.0.0-tar-stream: 1.5.2-table: 3.8.3-test-fixture: 3.0.0-rc.1-text-table: 0.2.0-textextensions: 1.0.2-through: 2.3.8-through2: 2.0.3-temp: 0.8.3-time-stamp: 1.0.1-timed-out: 3.1.3-to-array: 0.1.4-to-iso-string: 0.0.2-tough-cookie: 2.3.2-tryit: 1.0.3-tildify: 1.2.0-tweetnacl: 0.14.5-type-check: 0.3.2-type-detect: 1.0.0-type-is: 1.6.15-typedarray: 0.0.6-uglify-js: 2.8.22-uglify-to-browserify: 1.0.2-tunnel-agent: 0.4.3-ultron: 1.0.2-unc-path-regex: 0.1.2-underscore: 1.6.0-unique-stream: 1.0.0-unpipe: 1.0.0-unzip-response: 1.0.2-update-notifier: 0.6.3-underscore.string: 3.0.3-urijs: 1.16.1-url-parse-lax: 1.0.0-util: 0.10.3-util-deprecate: 1.0.2-util-extend: 1.0.3-utils-merge: 1.0.0-uuid: 2.0.3-v8flags: 2.0.12-vargs: 0.1.0-vary: 1.1.1-vasync: 1.6.3-user-home: 1.1.1-vinyl: 0.5.3-verror: 1.9.0-vinyl-fs: 0.3.14-vulcanize: 1.15.4-wbuf: 1.7.2-wct-sauce: 1.8.6-wd: 0.3.12-web-component-tester: 4.3.6-which: 1.2.14-widest-line: 1.0.0-window-size: 0.1.0-wordwrap: 1.0.0-wrappy: 1.0.2-write: 0.2.1-write-file-atomic: 1.3.1-ws: 1.1.2-wtf-8: 1.0.0-xdg-basedir: 2.0.0-wct-local: 2.0.14-xmlbuilder: 8.2.2-xmldom: 0.1.27-xmlhttprequest-ssl: 1.5.3-xtend: 4.0.1-yargs: 3.10.0-yauzl: 2.7.0-yeast: 0.1.2-yallist: 2.1.2-zip-stream: 0.5.2-@types/clone: 0.1.30-@types/chalk: 0.4.31-@types/express: 4.0.35-@types/freeport: 1.0.21-@types/mime: 0.0.29-@types/launchpad: 0.0.4-@types/node: 4.2.4-@types/express-serve-static-core: 4.0.44-@types/parse5: 0.0.31-@types/serve-static: 1.7.31-@types/which: 1.0.28--REPO REVISIONS-==============-polymer-1.x: 6ccc8e0c167aaf62a0685745298a69a7b4a020c0--BUILD HASHES-============-polymer-mini.html: b72f7b995f6537466f79d3ebe3c41bcee64d6149-polymer-micro.html: dcfe618647b4556de6fe157e6108e82cc93bbbdd-polymer.html: 41ec26002f37880b8749651e3650272d02412529\ No newline at end of filediff --git a/manager/client/src/main/webapp/bower_components/polymer/polymer-micro.html b/manager/client/src/main/webapp/bower_components/polymer/polymer-micro.htmldeleted file mode 100644index 564d1a868..000000000--- a/manager/client/src/main/webapp/bower_components/polymer/polymer-micro.html+++ /dev/null@@ -1,820 +0,0 @@-<!---@license-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt-Code distributed by Google as part of the polymer project is also-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt---><script>(function () {-function resolve() {-document.body.removeAttribute('unresolved');-}-if (window.WebComponents) {-addEventListener('WebComponentsReady', resolve);-} else {-if (document.readyState === 'interactive' || document.readyState === 'complete') {-resolve();-} else {-addEventListener('DOMContentLoaded', resolve);-}-}-}());window.Polymer = {-Settings: function () {-var settings = window.Polymer || {};-if (!settings.noUrlSettings) {-var parts = location.search.slice(1).split('&');-for (var i = 0, o; i < parts.length && (o = parts[i]); i++) {-o = o.split('=');-o[0] && (settings[o[0]] = o[1] || true);-}-}-settings.wantShadow = settings.dom === 'shadow';-settings.hasShadow = Boolean(Element.prototype.createShadowRoot);-settings.nativeShadow = settings.hasShadow && !window.ShadowDOMPolyfill;-settings.useShadow = settings.wantShadow && settings.hasShadow;-settings.hasNativeImports = Boolean('import' in document.createElement('link'));-settings.useNativeImports = settings.hasNativeImports;-settings.useNativeCustomElements = !window.CustomElements || window.CustomElements.useNative;-settings.useNativeShadow = settings.useShadow && settings.nativeShadow;-settings.usePolyfillProto = !settings.useNativeCustomElements && !Object.__proto__;-settings.hasNativeCSSProperties = !navigator.userAgent.match('AppleWebKit/601') && window.CSS && CSS.supports && CSS.supports('box-shadow', '0 0 0 var(--foo)');-settings.useNativeCSSProperties = settings.hasNativeCSSProperties && settings.lazyRegister && settings.useNativeCSSProperties;-settings.isIE = navigator.userAgent.match('Trident');-return settings;-}()-};(function () {-var userPolymer = window.Polymer;-window.Polymer = function (prototype) {-if (typeof prototype === 'function') {-prototype = prototype.prototype;-}-if (!prototype) {-prototype = {};-}-prototype = desugar(prototype);-var customCtor = prototype === prototype.constructor.prototype ? prototype.constructor : null;-var options = { prototype: prototype };-if (prototype.extends) {-options.extends = prototype.extends;-}-Polymer.telemetry._registrate(prototype);-var ctor = document.registerElement(prototype.is, options);-return customCtor || ctor;-};-var desugar = function (prototype) {-var base = Polymer.Base;-if (prototype.extends) {-base = Polymer.Base._getExtendedPrototype(prototype.extends);-}-prototype = Polymer.Base.chainObject(prototype, base);-prototype.registerCallback();-return prototype;-};-if (userPolymer) {-for (var i in userPolymer) {-Polymer[i] = userPolymer[i];-}-}-Polymer.Class = function (prototype) {-if (!prototype.factoryImpl) {-prototype.factoryImpl = function () {-};-}-return desugar(prototype).constructor;-};-}());-Polymer.telemetry = {-registrations: [],-_regLog: function (prototype) {-console.log('[' + prototype.is + ']: registered');-},-_registrate: function (prototype) {-this.registrations.push(prototype);-Polymer.log && this._regLog(prototype);-},-dumpRegistrations: function () {-this.registrations.forEach(this._regLog);-}-};Object.defineProperty(window, 'currentImport', {-enumerable: true,-configurable: true,-get: function () {-return (document._currentScript || document.currentScript || {}).ownerDocument;-}-});Polymer.RenderStatus = {-_ready: false,-_callbacks: [],-whenReady: function (cb) {-if (this._ready) {-cb();-} else {-this._callbacks.push(cb);-}-},-_makeReady: function () {-this._ready = true;-for (var i = 0; i < this._callbacks.length; i++) {-this._callbacks[i]();-}-this._callbacks = [];-},-_catchFirstRender: function () {-requestAnimationFrame(function () {-Polymer.RenderStatus._makeReady();-});-},-_afterNextRenderQueue: [],-_waitingNextRender: false,-afterNextRender: function (element, fn, args) {-this._watchNextRender();-this._afterNextRenderQueue.push([-element,-fn,-args-]);-},-hasRendered: function () {-return this._ready;-},-_watchNextRender: function () {-if (!this._waitingNextRender) {-this._waitingNextRender = true;-var fn = function () {-Polymer.RenderStatus._flushNextRender();-};-if (!this._ready) {-this.whenReady(fn);-} else {-requestAnimationFrame(fn);-}-}-},-_flushNextRender: function () {-var self = this;-setTimeout(function () {-self._flushRenderCallbacks(self._afterNextRenderQueue);-self._afterNextRenderQueue = [];-self._waitingNextRender = false;-});-},-_flushRenderCallbacks: function (callbacks) {-for (var i = 0, h; i < callbacks.length; i++) {-h = callbacks[i];-h[1].apply(h[0], h[2] || Polymer.nar);-}-}-};-if (window.HTMLImports) {-HTMLImports.whenReady(function () {-Polymer.RenderStatus._catchFirstRender();-});-} else {-Polymer.RenderStatus._catchFirstRender();-}-Polymer.ImportStatus = Polymer.RenderStatus;-Polymer.ImportStatus.whenLoaded = Polymer.ImportStatus.whenReady;(function () {-'use strict';-var settings = Polymer.Settings;-Polymer.Base = {-__isPolymerInstance__: true,-_addFeature: function (feature) {-this.mixin(this, feature);-},-registerCallback: function () {-if (settings.lazyRegister === 'max') {-if (this.beforeRegister) {-this.beforeRegister();-}-} else {-this._desugarBehaviors();-for (var i = 0, b; i < this.behaviors.length; i++) {-b = this.behaviors[i];-if (b.beforeRegister) {-b.beforeRegister.call(this);-}-}-if (this.beforeRegister) {-this.beforeRegister();-}-}-this._registerFeatures();-if (!settings.lazyRegister) {-this.ensureRegisterFinished();-}-},-createdCallback: function () {-if (settings.disableUpgradeEnabled) {-if (this.hasAttribute('disable-upgrade')) {-this._propertySetter = disableUpgradePropertySetter;-this._configValue = null;-this.__data__ = {};-return;-} else {-this.__hasInitialized = true;-}-}-this.__initialize();-},-__initialize: function () {-if (!this.__hasRegisterFinished) {-this._ensureRegisterFinished(this.__proto__);-}-Polymer.telemetry.instanceCount++;-this.root = this;-for (var i = 0, b; i < this.behaviors.length; i++) {-b = this.behaviors[i];-if (b.created) {-b.created.call(this);-}-}-if (this.created) {-this.created();-}-this._initFeatures();-},-ensureRegisterFinished: function () {-this._ensureRegisterFinished(this);-},-_ensureRegisterFinished: function (proto) {-if (proto.__hasRegisterFinished !== proto.is || !proto.is) {-if (settings.lazyRegister === 'max') {-proto._desugarBehaviors();-for (var i = 0, b; i < proto.behaviors.length; i++) {-b = proto.behaviors[i];-if (b.beforeRegister) {-b.beforeRegister.call(proto);-}-}-}-proto.__hasRegisterFinished = proto.is;-if (proto._finishRegisterFeatures) {-proto._finishRegisterFeatures();-}-for (var j = 0, pb; j < proto.behaviors.length; j++) {-pb = proto.behaviors[j];-if (pb.registered) {-pb.registered.call(proto);-}-}-if (proto.registered) {-proto.registered();-}-if (settings.usePolyfillProto && proto !== this) {-proto.extend(this, proto);-}-}-},-attachedCallback: function () {-var self = this;-Polymer.RenderStatus.whenReady(function () {-self.isAttached = true;-for (var i = 0, b; i < self.behaviors.length; i++) {-b = self.behaviors[i];-if (b.attached) {-b.attached.call(self);-}-}-if (self.attached) {-self.attached();-}-});-},-detachedCallback: function () {-var self = this;-Polymer.RenderStatus.whenReady(function () {-self.isAttached = false;-for (var i = 0, b; i < self.behaviors.length; i++) {-b = self.behaviors[i];-if (b.detached) {-b.detached.call(self);-}-}-if (self.detached) {-self.detached();-}-});-},-attributeChangedCallback: function (name, oldValue, newValue) {-this._attributeChangedImpl(name);-for (var i = 0, b; i < this.behaviors.length; i++) {-b = this.behaviors[i];-if (b.attributeChanged) {-b.attributeChanged.call(this, name, oldValue, newValue);-}-}-if (this.attributeChanged) {-this.attributeChanged(name, oldValue, newValue);-}-},-_attributeChangedImpl: function (name) {-this._setAttributeToProperty(this, name);-},-extend: function (target, source) {-if (target && source) {-var n$ = Object.getOwnPropertyNames(source);-for (var i = 0, n; i < n$.length && (n = n$[i]); i++) {-this.copyOwnProperty(n, source, target);-}-}-return target || source;-},-mixin: function (target, source) {-for (var i in source) {-target[i] = source[i];-}-return target;-},-copyOwnProperty: function (name, source, target) {-var pd = Object.getOwnPropertyDescriptor(source, name);-if (pd) {-Object.defineProperty(target, name, pd);-}-},-_logger: function (level, args) {-if (args.length === 1 && Array.isArray(args[0])) {-args = args[0];-}-switch (level) {-case 'log':-case 'warn':-case 'error':-console[level].apply(console, args);-break;-}-},-_log: function () {-var args = Array.prototype.slice.call(arguments, 0);-this._logger('log', args);-},-_warn: function () {-var args = Array.prototype.slice.call(arguments, 0);-this._logger('warn', args);-},-_error: function () {-var args = Array.prototype.slice.call(arguments, 0);-this._logger('error', args);-},-_logf: function () {-return this._logPrefix.concat(this.is).concat(Array.prototype.slice.call(arguments, 0));-}-};-Polymer.Base._logPrefix = function () {-var color = window.chrome && !/edge/i.test(navigator.userAgent) || /firefox/i.test(navigator.userAgent);-return color ? [-'%c[%s::%s]:',-'font-weight: bold; background-color:#EEEE00;'-] : ['[%s::%s]:'];-}();-Polymer.Base.chainObject = function (object, inherited) {-if (object && inherited && object !== inherited) {-if (!Object.__proto__) {-object = Polymer.Base.extend(Object.create(inherited), object);-}-object.__proto__ = inherited;-}-return object;-};-Polymer.Base = Polymer.Base.chainObject(Polymer.Base, HTMLElement.prototype);-Polymer.BaseDescriptors = {};-var disableUpgradePropertySetter;-if (settings.disableUpgradeEnabled) {-disableUpgradePropertySetter = function (property, value) {-this.__data__[property] = value;-};-var origAttributeChangedCallback = Polymer.Base.attributeChangedCallback;-Polymer.Base.attributeChangedCallback = function (name, oldValue, newValue) {-if (!this.__hasInitialized && name === 'disable-upgrade') {-this.__hasInitialized = true;-this._propertySetter = Polymer.Bind._modelApi._propertySetter;-this._configValue = Polymer.Base._configValue;-this.__initialize();-}-origAttributeChangedCallback.call(this, name, oldValue, newValue);-};-}-if (window.CustomElements) {-Polymer.instanceof = CustomElements.instanceof;-} else {-Polymer.instanceof = function (obj, ctor) {-return obj instanceof ctor;-};-}-Polymer.isInstance = function (obj) {-return Boolean(obj && obj.__isPolymerInstance__);-};-Polymer.telemetry.instanceCount = 0;-}());(function () {-var modules = {};-var lcModules = {};-var findModule = function (id) {-return modules[id] || lcModules[id.toLowerCase()];-};-var DomModule = function () {-return document.createElement('dom-module');-};-DomModule.prototype = Object.create(HTMLElement.prototype);-Polymer.Base.mixin(DomModule.prototype, {-createdCallback: function () {-this.register();-},-register: function (id) {-id = id || this.id || this.getAttribute('name') || this.getAttribute('is');-if (id) {-this.id = id;-modules[id] = this;-lcModules[id.toLowerCase()] = this;-}-},-import: function (id, selector) {-if (id) {-var m = findModule(id);-if (!m) {-forceDomModulesUpgrade();-m = findModule(id);-}-if (m && selector) {-m = m.querySelector(selector);-}-return m;-}-}-});-Object.defineProperty(DomModule.prototype, 'constructor', {-value: DomModule,-configurable: true,-writable: true-});-var cePolyfill = window.CustomElements && !CustomElements.useNative;-document.registerElement('dom-module', DomModule);-function forceDomModulesUpgrade() {-if (cePolyfill) {-var script = document._currentScript || document.currentScript;-var doc = script && script.ownerDocument || document;-var modules = doc.querySelectorAll('dom-module');-for (var i = modules.length - 1, m; i >= 0 && (m = modules[i]); i--) {-if (m.__upgraded__) {-return;-} else {-CustomElements.upgrade(m);-}-}-}-}-}());Polymer.Base._addFeature({-_prepIs: function () {-if (!this.is) {-var module = (document._currentScript || document.currentScript).parentNode;-if (module.localName === 'dom-module') {-var id = module.id || module.getAttribute('name') || module.getAttribute('is');-this.is = id;-}-}-if (this.is) {-this.is = this.is.toLowerCase();-}-}-});Polymer.Base._addFeature({-behaviors: [],-_desugarBehaviors: function () {-if (this.behaviors.length) {-this.behaviors = this._desugarSomeBehaviors(this.behaviors);-}-},-_desugarSomeBehaviors: function (behaviors) {-var behaviorSet = [];-behaviors = this._flattenBehaviorsList(behaviors);-for (var i = behaviors.length - 1; i >= 0; i--) {-var b = behaviors[i];-if (behaviorSet.indexOf(b) === -1) {-this._mixinBehavior(b);-behaviorSet.unshift(b);-}-}-return behaviorSet;-},-_flattenBehaviorsList: function (behaviors) {-var flat = [];-for (var i = 0; i < behaviors.length; i++) {-var b = behaviors[i];-if (b instanceof Array) {-flat = flat.concat(this._flattenBehaviorsList(b));-} else if (b) {-flat.push(b);-} else {-this._warn(this._logf('_flattenBehaviorsList', 'behavior is null, check for missing or 404 import'));-}-}-return flat;-},-_mixinBehavior: function (b) {-var n$ = Object.getOwnPropertyNames(b);-var useAssignment = b._noAccessors;-for (var i = 0, n; i < n$.length && (n = n$[i]); i++) {-if (!Polymer.Base._behaviorProperties[n] && !this.hasOwnProperty(n)) {-if (useAssignment) {-this[n] = b[n];-} else {-this.copyOwnProperty(n, b, this);-}-}-}-},-_prepBehaviors: function () {-this._prepFlattenedBehaviors(this.behaviors);-},-_prepFlattenedBehaviors: function (behaviors) {-for (var i = 0, l = behaviors.length; i < l; i++) {-this._prepBehavior(behaviors[i]);-}-this._prepBehavior(this);-},-_marshalBehaviors: function () {-for (var i = 0; i < this.behaviors.length; i++) {-this._marshalBehavior(this.behaviors[i]);-}-this._marshalBehavior(this);-}-});-Polymer.Base._behaviorProperties = {-hostAttributes: true,-beforeRegister: true,-registered: true,-properties: true,-observers: true,-listeners: true,-created: true,-attached: true,-detached: true,-attributeChanged: true,-ready: true,-_noAccessors: true-};Polymer.Base._addFeature({-_getExtendedPrototype: function (tag) {-return this._getExtendedNativePrototype(tag);-},-_nativePrototypes: {},-_getExtendedNativePrototype: function (tag) {-var p = this._nativePrototypes[tag];-if (!p) {-p = Object.create(this.getNativePrototype(tag));-var p$ = Object.getOwnPropertyNames(Polymer.Base);-for (var i = 0, n; i < p$.length && (n = p$[i]); i++) {-if (!Polymer.BaseDescriptors[n]) {-p[n] = Polymer.Base[n];-}-}-Object.defineProperties(p, Polymer.BaseDescriptors);-this._nativePrototypes[tag] = p;-}-return p;-},-getNativePrototype: function (tag) {-return Object.getPrototypeOf(document.createElement(tag));-}-});Polymer.Base._addFeature({-_prepConstructor: function () {-this._factoryArgs = this.extends ? [-this.extends,-this.is-] : [this.is];-var ctor = function () {-return this._factory(arguments);-};-if (this.hasOwnProperty('extends')) {-ctor.extends = this.extends;-}-Object.defineProperty(this, 'constructor', {-value: ctor,-writable: true,-configurable: true-});-ctor.prototype = this;-},-_factory: function (args) {-var elt = document.createElement.apply(document, this._factoryArgs);-if (this.factoryImpl) {-this.factoryImpl.apply(elt, args);-}-return elt;-}-});Polymer.nob = Object.create(null);-Polymer.Base._addFeature({-getPropertyInfo: function (property) {-var info = this._getPropertyInfo(property, this.properties);-if (!info) {-for (var i = 0; i < this.behaviors.length; i++) {-info = this._getPropertyInfo(property, this.behaviors[i].properties);-if (info) {-return info;-}-}-}-return info || Polymer.nob;-},-_getPropertyInfo: function (property, properties) {-var p = properties && properties[property];-if (typeof p === 'function') {-p = properties[property] = { type: p };-}-if (p) {-p.defined = true;-}-return p;-},-_prepPropertyInfo: function () {-this._propertyInfo = {};-for (var i = 0; i < this.behaviors.length; i++) {-this._addPropertyInfo(this._propertyInfo, this.behaviors[i].properties);-}-this._addPropertyInfo(this._propertyInfo, this.properties);-this._addPropertyInfo(this._propertyInfo, this._propertyEffects);-},-_addPropertyInfo: function (target, source) {-if (source) {-var t, s;-for (var i in source) {-t = target[i];-s = source[i];-if (i[0] === '_' && !s.readOnly) {-continue;-}-if (!target[i]) {-target[i] = {-type: typeof s === 'function' ? s : s.type,-readOnly: s.readOnly,-attribute: Polymer.CaseMap.camelToDashCase(i)-};-} else {-if (!t.type) {-t.type = s.type;-}-if (!t.readOnly) {-t.readOnly = s.readOnly;-}-}-}-}-}-});-(function () {-var propertiesDesc = {-configurable: true,-writable: true,-enumerable: true,-value: {}-};-Polymer.BaseDescriptors.properties = propertiesDesc;-Object.defineProperty(Polymer.Base, 'properties', propertiesDesc);-}());Polymer.CaseMap = {-_caseMap: {},-_rx: {-dashToCamel: /-[a-z]/g,-camelToDash: /([A-Z])/g-},-dashToCamelCase: function (dash) {-return this._caseMap[dash] || (this._caseMap[dash] = dash.indexOf('-') < 0 ? dash : dash.replace(this._rx.dashToCamel, function (m) {-return m[1].toUpperCase();-}));-},-camelToDashCase: function (camel) {-return this._caseMap[camel] || (this._caseMap[camel] = camel.replace(this._rx.camelToDash, '-$1').toLowerCase());-}-};Polymer.Base._addFeature({-_addHostAttributes: function (attributes) {-if (!this._aggregatedAttributes) {-this._aggregatedAttributes = {};-}-if (attributes) {-this.mixin(this._aggregatedAttributes, attributes);-}-},-_marshalHostAttributes: function () {-if (this._aggregatedAttributes) {-this._applyAttributes(this, this._aggregatedAttributes);-}-},-_applyAttributes: function (node, attr$) {-for (var n in attr$) {-if (!this.hasAttribute(n) && n !== 'class') {-var v = attr$[n];-this.serializeValueToAttribute(v, n, this);-}-}-},-_marshalAttributes: function () {-this._takeAttributesToModel(this);-},-_takeAttributesToModel: function (model) {-if (this.hasAttributes()) {-for (var i in this._propertyInfo) {-var info = this._propertyInfo[i];-if (this.hasAttribute(info.attribute)) {-this._setAttributeToProperty(model, info.attribute, i, info);-}-}-}-},-_setAttributeToProperty: function (model, attribute, property, info) {-if (!this._serializing) {-property = property || Polymer.CaseMap.dashToCamelCase(attribute);-info = info || this._propertyInfo && this._propertyInfo[property];-if (info && !info.readOnly) {-var v = this.getAttribute(attribute);-model[property] = this.deserialize(v, info.type);-}-}-},-_serializing: false,-reflectPropertyToAttribute: function (property, attribute, value) {-this._serializing = true;-value = value === undefined ? this[property] : value;-this.serializeValueToAttribute(value, attribute || Polymer.CaseMap.camelToDashCase(property));-this._serializing = false;-},-serializeValueToAttribute: function (value, attribute, node) {-var str = this.serialize(value);-node = node || this;-if (str === undefined) {-node.removeAttribute(attribute);-} else {-node.setAttribute(attribute, str);-}-},-deserialize: function (value, type) {-switch (type) {-case Number:-value = Number(value);-break;-case Boolean:-value = value != null;-break;-case Object:-try {-value = JSON.parse(value);-} catch (x) {-}-break;-case Array:-try {-value = JSON.parse(value);-} catch (x) {-value = null;-console.warn('Polymer::Attributes: couldn`t decode Array as JSON');-}-break;-case Date:-value = new Date(value);-break;-case String:-default:-break;-}-return value;-},-serialize: function (value) {-switch (typeof value) {-case 'boolean':-return value ? '' : undefined;-case 'object':-if (value instanceof Date) {-return value.toString();-} else if (value) {-try {-return JSON.stringify(value);-} catch (x) {-return '';-}-}-default:-return value != null ? value : undefined;-}-}-});Polymer.version = "1.9.1";Polymer.Base._addFeature({-_registerFeatures: function () {-this._prepIs();-this._prepBehaviors();-this._prepConstructor();-this._prepPropertyInfo();-},-_prepBehavior: function (b) {-this._addHostAttributes(b.hostAttributes);-},-_marshalBehavior: function (b) {-},-_initFeatures: function () {-this._marshalHostAttributes();-this._marshalBehaviors();-}-});</script>-----------diff --git a/manager/client/src/main/webapp/bower_components/polymer/polymer-mini.html b/manager/client/src/main/webapp/bower_components/polymer/polymer-mini.htmldeleted file mode 100644index a45d7687b..000000000--- a/manager/client/src/main/webapp/bower_components/polymer/polymer-mini.html+++ /dev/null@@ -1,2238 +0,0 @@-<!---@license-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt-Code distributed by Google as part of the polymer project is also-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt---><link rel="import" href="polymer-micro.html"><script>(function () {-function resolveCss(cssText, ownerDocument) {-return cssText.replace(CSS_URL_RX, function (m, pre, url, post) {-return pre + '\'' + resolve(url.replace(/["']/g, ''), ownerDocument) + '\'' + post;-});-}-function resolveAttrs(element, ownerDocument) {-for (var name in URL_ATTRS) {-var a$ = URL_ATTRS[name];-for (var i = 0, l = a$.length, a, at, v; i < l && (a = a$[i]); i++) {-if (name === '*' || element.localName === name) {-at = element.attributes[a];-v = at && at.value;-if (v && v.search(BINDING_RX) < 0) {-at.value = a === 'style' ? resolveCss(v, ownerDocument) : resolve(v, ownerDocument);-}-}-}-}-}-function resolve(url, ownerDocument) {-if (url && ABS_URL.test(url)) {-return url;-}-var resolver = getUrlResolver(ownerDocument);-resolver.href = url;-return resolver.href || url;-}-var tempDoc;-var tempDocBase;-function resolveUrl(url, baseUri) {-if (!tempDoc) {-tempDoc = document.implementation.createHTMLDocument('temp');-tempDocBase = tempDoc.createElement('base');-tempDoc.head.appendChild(tempDocBase);-}-tempDocBase.href = baseUri;-return resolve(url, tempDoc);-}-function getUrlResolver(ownerDocument) {-return ownerDocument.body.__urlResolver || (ownerDocument.body.__urlResolver = ownerDocument.createElement('a'));-}-function pathFromUrl(url) {-return url.substring(0, url.lastIndexOf('/') + 1);-}-var CSS_URL_RX = /(url\()([^)]*)(\))/g;-var URL_ATTRS = {-'*': [-'href',-'src',-'style',-'url'-],-form: ['action']-};-var ABS_URL = /(^\/)|(^#)|(^[\w-\d]*:)/;-var BINDING_RX = /\{\{|\[\[/;-Polymer.ResolveUrl = {-resolveCss: resolveCss,-resolveAttrs: resolveAttrs,-resolveUrl: resolveUrl,-pathFromUrl: pathFromUrl-};-Polymer.rootPath = Polymer.Settings.rootPath || pathFromUrl(document.baseURI || window.location.href);-}());Polymer.Base._addFeature({-_prepTemplate: function () {-var module;-if (this._template === undefined) {-module = Polymer.DomModule.import(this.is);-this._template = module && module.querySelector('template');-}-if (module) {-var assetPath = module.getAttribute('assetpath') || '';-var importURL = Polymer.ResolveUrl.resolveUrl(assetPath, module.ownerDocument.baseURI);-this._importPath = Polymer.ResolveUrl.pathFromUrl(importURL);-} else {-this._importPath = '';-}-if (this._template && this._template.hasAttribute('is')) {-this._warn(this._logf('_prepTemplate', 'top-level Polymer template ' + 'must not be a type-extension, found', this._template, 'Move inside simple <template>.'));-}-if (this._template && !this._template.content && window.HTMLTemplateElement && HTMLTemplateElement.decorate) {-HTMLTemplateElement.decorate(this._template);-}-},-_stampTemplate: function () {-if (this._template) {-this.root = this.instanceTemplate(this._template);-}-},-instanceTemplate: function (template) {-var dom = document.importNode(template._content || template.content, true);-return dom;-}-});(function () {-var baseAttachedCallback = Polymer.Base.attachedCallback;-Polymer.Base._addFeature({-_hostStack: [],-ready: function () {-},-_registerHost: function (host) {-this.dataHost = host = host || Polymer.Base._hostStack[Polymer.Base._hostStack.length - 1];-if (host && host._clients) {-host._clients.push(this);-}-this._clients = null;-this._clientsReadied = false;-},-_beginHosting: function () {-Polymer.Base._hostStack.push(this);-if (!this._clients) {-this._clients = [];-}-},-_endHosting: function () {-Polymer.Base._hostStack.pop();-},-_tryReady: function () {-this._readied = false;-if (this._canReady()) {-this._ready();-}-},-_canReady: function () {-return !this.dataHost || this.dataHost._clientsReadied;-},-_ready: function () {-this._beforeClientsReady();-if (this._template) {-this._setupRoot();-this._readyClients();-}-this._clientsReadied = true;-this._clients = null;-this._afterClientsReady();-this._readySelf();-},-_readyClients: function () {-this._beginDistribute();-var c$ = this._clients;-if (c$) {-for (var i = 0, l = c$.length, c; i < l && (c = c$[i]); i++) {-c._ready();-}-}-this._finishDistribute();-},-_readySelf: function () {-for (var i = 0, b; i < this.behaviors.length; i++) {-b = this.behaviors[i];-if (b.ready) {-b.ready.call(this);-}-}-if (this.ready) {-this.ready();-}-this._readied = true;-if (this._attachedPending) {-this._attachedPending = false;-this.attachedCallback();-}-},-_beforeClientsReady: function () {-},-_afterClientsReady: function () {-},-_beforeAttached: function () {-},-attachedCallback: function () {-if (this._readied) {-this._beforeAttached();-baseAttachedCallback.call(this);-} else {-this._attachedPending = true;-}-}-});-}());Polymer.ArraySplice = function () {-function newSplice(index, removed, addedCount) {-return {-index: index,-removed: removed,-addedCount: addedCount-};-}-var EDIT_LEAVE = 0;-var EDIT_UPDATE = 1;-var EDIT_ADD = 2;-var EDIT_DELETE = 3;-function ArraySplice() {-}-ArraySplice.prototype = {-calcEditDistances: function (current, currentStart, currentEnd, old, oldStart, oldEnd) {-var rowCount = oldEnd - oldStart + 1;-var columnCount = currentEnd - currentStart + 1;-var distances = new Array(rowCount);-for (var i = 0; i < rowCount; i++) {-distances[i] = new Array(columnCount);-distances[i][0] = i;-}-for (var j = 0; j < columnCount; j++)-distances[0][j] = j;-for (i = 1; i < rowCount; i++) {-for (j = 1; j < columnCount; j++) {-if (this.equals(current[currentStart + j - 1], old[oldStart + i - 1]))-distances[i][j] = distances[i - 1][j - 1];-else {-var north = distances[i - 1][j] + 1;-var west = distances[i][j - 1] + 1;-distances[i][j] = north < west ? north : west;-}-}-}-return distances;-},-spliceOperationsFromEditDistances: function (distances) {-var i = distances.length - 1;-var j = distances[0].length - 1;-var current = distances[i][j];-var edits = [];-while (i > 0 || j > 0) {-if (i == 0) {-edits.push(EDIT_ADD);-j--;-continue;-}-if (j == 0) {-edits.push(EDIT_DELETE);-i--;-continue;-}-var northWest = distances[i - 1][j - 1];-var west = distances[i - 1][j];-var north = distances[i][j - 1];-var min;-if (west < north)-min = west < northWest ? west : northWest;-else-min = north < northWest ? north : northWest;-if (min == northWest) {-if (northWest == current) {-edits.push(EDIT_LEAVE);-} else {-edits.push(EDIT_UPDATE);-current = northWest;-}-i--;-j--;-} else if (min == west) {-edits.push(EDIT_DELETE);-i--;-current = west;-} else {-edits.push(EDIT_ADD);-j--;-current = north;-}-}-edits.reverse();-return edits;-},-calcSplices: function (current, currentStart, currentEnd, old, oldStart, oldEnd) {-var prefixCount = 0;-var suffixCount = 0;-var minLength = Math.min(currentEnd - currentStart, oldEnd - oldStart);-if (currentStart == 0 && oldStart == 0)-prefixCount = this.sharedPrefix(current, old, minLength);-if (currentEnd == current.length && oldEnd == old.length)-suffixCount = this.sharedSuffix(current, old, minLength - prefixCount);-currentStart += prefixCount;-oldStart += prefixCount;-currentEnd -= suffixCount;-oldEnd -= suffixCount;-if (currentEnd - currentStart == 0 && oldEnd - oldStart == 0)-return [];-if (currentStart == currentEnd) {-var splice = newSplice(currentStart, [], 0);-while (oldStart < oldEnd)-splice.removed.push(old[oldStart++]);-return [splice];-} else if (oldStart == oldEnd)-return [newSplice(currentStart, [], currentEnd - currentStart)];-var ops = this.spliceOperationsFromEditDistances(this.calcEditDistances(current, currentStart, currentEnd, old, oldStart, oldEnd));-splice = undefined;-var splices = [];-var index = currentStart;-var oldIndex = oldStart;-for (var i = 0; i < ops.length; i++) {-switch (ops[i]) {-case EDIT_LEAVE:-if (splice) {-splices.push(splice);-splice = undefined;-}-index++;-oldIndex++;-break;-case EDIT_UPDATE:-if (!splice)-splice = newSplice(index, [], 0);-splice.addedCount++;-index++;-splice.removed.push(old[oldIndex]);-oldIndex++;-break;-case EDIT_ADD:-if (!splice)-splice = newSplice(index, [], 0);-splice.addedCount++;-index++;-break;-case EDIT_DELETE:-if (!splice)-splice = newSplice(index, [], 0);-splice.removed.push(old[oldIndex]);-oldIndex++;-break;-}-}-if (splice) {-splices.push(splice);-}-return splices;-},-sharedPrefix: function (current, old, searchLength) {-for (var i = 0; i < searchLength; i++)-if (!this.equals(current[i], old[i]))-return i;-return searchLength;-},-sharedSuffix: function (current, old, searchLength) {-var index1 = current.length;-var index2 = old.length;-var count = 0;-while (count < searchLength && this.equals(current[--index1], old[--index2]))-count++;-return count;-},-calculateSplices: function (current, previous) {-return this.calcSplices(current, 0, current.length, previous, 0, previous.length);-},-equals: function (currentValue, previousValue) {-return currentValue === previousValue;-}-};-return new ArraySplice();-}();Polymer.domInnerHTML = function () {-var escapeAttrRegExp = /[&\u00A0"]/g;-var escapeDataRegExp = /[&\u00A0<>]/g;-function escapeReplace(c) {-switch (c) {-case '&':-return '&';-case '<':-return '<';-case '>':-return '>';-case '"':-return '"';-case '\xA0':-return ' ';-}-}-function escapeAttr(s) {-return s.replace(escapeAttrRegExp, escapeReplace);-}-function escapeData(s) {-return s.replace(escapeDataRegExp, escapeReplace);-}-function makeSet(arr) {-var set = {};-for (var i = 0; i < arr.length; i++) {-set[arr[i]] = true;-}-return set;-}-var voidElements = makeSet([-'area',-'base',-'br',-'col',-'command',-'embed',-'hr',-'img',-'input',-'keygen',-'link',-'meta',-'param',-'source',-'track',-'wbr'-]);-var plaintextParents = makeSet([-'style',-'script',-'xmp',-'iframe',-'noembed',-'noframes',-'plaintext',-'noscript'-]);-function getOuterHTML(node, parentNode, composed) {-switch (node.nodeType) {-case Node.ELEMENT_NODE:-var tagName = node.localName;-var s = '<' + tagName;-var attrs = node.attributes;-for (var i = 0, attr; attr = attrs[i]; i++) {-s += ' ' + attr.name + '="' + escapeAttr(attr.value) + '"';-}-s += '>';-if (voidElements[tagName]) {-return s;-}-return s + getInnerHTML(node, composed) + '</' + tagName + '>';-case Node.TEXT_NODE:-var data = node.data;-if (parentNode && plaintextParents[parentNode.localName]) {-return data;-}-return escapeData(data);-case Node.COMMENT_NODE:-return '<!--' + node.data + '-->';-default:-console.error(node);-throw new Error('not implemented');-}-}-function getInnerHTML(node, composed) {-if (node instanceof HTMLTemplateElement)-node = node.content;-var s = '';-var c$ = Polymer.dom(node).childNodes;-for (var i = 0, l = c$.length, child; i < l && (child = c$[i]); i++) {-s += getOuterHTML(child, node, composed);-}-return s;-}-return { getInnerHTML: getInnerHTML };-}();(function () {-'use strict';-var nativeInsertBefore = Element.prototype.insertBefore;-var nativeAppendChild = Element.prototype.appendChild;-var nativeRemoveChild = Element.prototype.removeChild;-Polymer.TreeApi = {-arrayCopyChildNodes: function (parent) {-var copy = [], i = 0;-for (var n = parent.firstChild; n; n = n.nextSibling) {-copy[i++] = n;-}-return copy;-},-arrayCopyChildren: function (parent) {-var copy = [], i = 0;-for (var n = parent.firstElementChild; n; n = n.nextElementSibling) {-copy[i++] = n;-}-return copy;-},-arrayCopy: function (a$) {-var l = a$.length;-var copy = new Array(l);-for (var i = 0; i < l; i++) {-copy[i] = a$[i];-}-return copy;-}-};-Polymer.TreeApi.Logical = {-hasParentNode: function (node) {-return Boolean(node.__dom && node.__dom.parentNode);-},-hasChildNodes: function (node) {-return Boolean(node.__dom && node.__dom.childNodes !== undefined);-},-getChildNodes: function (node) {-return this.hasChildNodes(node) ? this._getChildNodes(node) : node.childNodes;-},-_getChildNodes: function (node) {-if (!node.__dom.childNodes) {-node.__dom.childNodes = [];-for (var n = node.__dom.firstChild; n; n = n.__dom.nextSibling) {-node.__dom.childNodes.push(n);-}-}-return node.__dom.childNodes;-},-getParentNode: function (node) {-return node.__dom && node.__dom.parentNode !== undefined ? node.__dom.parentNode : node.parentNode;-},-getFirstChild: function (node) {-return node.__dom && node.__dom.firstChild !== undefined ? node.__dom.firstChild : node.firstChild;-},-getLastChild: function (node) {-return node.__dom && node.__dom.lastChild !== undefined ? node.__dom.lastChild : node.lastChild;-},-getNextSibling: function (node) {-return node.__dom && node.__dom.nextSibling !== undefined ? node.__dom.nextSibling : node.nextSibling;-},-getPreviousSibling: function (node) {-return node.__dom && node.__dom.previousSibling !== undefined ? node.__dom.previousSibling : node.previousSibling;-},-getFirstElementChild: function (node) {-return node.__dom && node.__dom.firstChild !== undefined ? this._getFirstElementChild(node) : node.firstElementChild;-},-_getFirstElementChild: function (node) {-var n = node.__dom.firstChild;-while (n && n.nodeType !== Node.ELEMENT_NODE) {-n = n.__dom.nextSibling;-}-return n;-},-getLastElementChild: function (node) {-return node.__dom && node.__dom.lastChild !== undefined ? this._getLastElementChild(node) : node.lastElementChild;-},-_getLastElementChild: function (node) {-var n = node.__dom.lastChild;-while (n && n.nodeType !== Node.ELEMENT_NODE) {-n = n.__dom.previousSibling;-}-return n;-},-getNextElementSibling: function (node) {-return node.__dom && node.__dom.nextSibling !== undefined ? this._getNextElementSibling(node) : node.nextElementSibling;-},-_getNextElementSibling: function (node) {-var n = node.__dom.nextSibling;-while (n && n.nodeType !== Node.ELEMENT_NODE) {-n = n.__dom.nextSibling;-}-return n;-},-getPreviousElementSibling: function (node) {-return node.__dom && node.__dom.previousSibling !== undefined ? this._getPreviousElementSibling(node) : node.previousElementSibling;-},-_getPreviousElementSibling: function (node) {-var n = node.__dom.previousSibling;-while (n && n.nodeType !== Node.ELEMENT_NODE) {-n = n.__dom.previousSibling;-}-return n;-},-saveChildNodes: function (node) {-if (!this.hasChildNodes(node)) {-node.__dom = node.__dom || {};-node.__dom.firstChild = node.firstChild;-node.__dom.lastChild = node.lastChild;-node.__dom.childNodes = [];-for (var n = node.firstChild; n; n = n.nextSibling) {-n.__dom = n.__dom || {};-n.__dom.parentNode = node;-node.__dom.childNodes.push(n);-n.__dom.nextSibling = n.nextSibling;-n.__dom.previousSibling = n.previousSibling;-}-}-},-recordInsertBefore: function (node, container, ref_node) {-container.__dom.childNodes = null;-if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {-for (var n = node.firstChild; n; n = n.nextSibling) {-this._linkNode(n, container, ref_node);-}-} else {-this._linkNode(node, container, ref_node);-}-},-_linkNode: function (node, container, ref_node) {-node.__dom = node.__dom || {};-container.__dom = container.__dom || {};-if (ref_node) {-ref_node.__dom = ref_node.__dom || {};-}-node.__dom.previousSibling = ref_node ? ref_node.__dom.previousSibling : container.__dom.lastChild;-if (node.__dom.previousSibling) {-node.__dom.previousSibling.__dom.nextSibling = node;-}-node.__dom.nextSibling = ref_node || null;-if (node.__dom.nextSibling) {-node.__dom.nextSibling.__dom.previousSibling = node;-}-node.__dom.parentNode = container;-if (ref_node) {-if (ref_node === container.__dom.firstChild) {-container.__dom.firstChild = node;-}-} else {-container.__dom.lastChild = node;-if (!container.__dom.firstChild) {-container.__dom.firstChild = node;-}-}-container.__dom.childNodes = null;-},-recordRemoveChild: function (node, container) {-node.__dom = node.__dom || {};-container.__dom = container.__dom || {};-if (node === container.__dom.firstChild) {-container.__dom.firstChild = node.__dom.nextSibling;-}-if (node === container.__dom.lastChild) {-container.__dom.lastChild = node.__dom.previousSibling;-}-var p = node.__dom.previousSibling;-var n = node.__dom.nextSibling;-if (p) {-p.__dom.nextSibling = n;-}-if (n) {-n.__dom.previousSibling = p;-}-node.__dom.parentNode = node.__dom.previousSibling = node.__dom.nextSibling = undefined;-container.__dom.childNodes = null;-}-};-Polymer.TreeApi.Composed = {-getChildNodes: function (node) {-return Polymer.TreeApi.arrayCopyChildNodes(node);-},-getParentNode: function (node) {-return node.parentNode;-},-clearChildNodes: function (node) {-node.textContent = '';-},-insertBefore: function (parentNode, newChild, refChild) {-return nativeInsertBefore.call(parentNode, newChild, refChild || null);-},-appendChild: function (parentNode, newChild) {-return nativeAppendChild.call(parentNode, newChild);-},-removeChild: function (parentNode, node) {-return nativeRemoveChild.call(parentNode, node);-}-};-}());Polymer.DomApi = function () {-'use strict';-var Settings = Polymer.Settings;-var TreeApi = Polymer.TreeApi;-var DomApi = function (node) {-this.node = needsToWrap ? DomApi.wrap(node) : node;-};-var needsToWrap = Settings.hasShadow && !Settings.nativeShadow;-DomApi.wrap = window.wrap ? window.wrap : function (node) {-return node;-};-DomApi.prototype = {-flush: function () {-Polymer.dom.flush();-},-deepContains: function (node) {-if (this.node.contains(node)) {-return true;-}-var n = node;-var doc = node.ownerDocument;-while (n && n !== doc && n !== this.node) {-n = Polymer.dom(n).parentNode || n.host;-}-return n === this.node;-},-queryDistributedElements: function (selector) {-var c$ = this.getEffectiveChildNodes();-var list = [];-for (var i = 0, l = c$.length, c; i < l && (c = c$[i]); i++) {-if (c.nodeType === Node.ELEMENT_NODE && DomApi.matchesSelector.call(c, selector)) {-list.push(c);-}-}-return list;-},-getEffectiveChildNodes: function () {-var list = [];-var c$ = this.childNodes;-for (var i = 0, l = c$.length, c; i < l && (c = c$[i]); i++) {-if (c.localName === CONTENT) {-var d$ = dom(c).getDistributedNodes();-for (var j = 0; j < d$.length; j++) {-list.push(d$[j]);-}-} else {-list.push(c);-}-}-return list;-},-observeNodes: function (callback) {-if (callback) {-if (!this.observer) {-this.observer = this.node.localName === CONTENT ? new DomApi.DistributedNodesObserver(this) : new DomApi.EffectiveNodesObserver(this);-}-return this.observer.addListener(callback);-}-},-unobserveNodes: function (handle) {-if (this.observer) {-this.observer.removeListener(handle);-}-},-notifyObserver: function () {-if (this.observer) {-this.observer.notify();-}-},-_query: function (matcher, node, halter) {-node = node || this.node;-var list = [];-this._queryElements(TreeApi.Logical.getChildNodes(node), matcher, halter, list);-return list;-},-_queryElements: function (elements, matcher, halter, list) {-for (var i = 0, l = elements.length, c; i < l && (c = elements[i]); i++) {-if (c.nodeType === Node.ELEMENT_NODE) {-if (this._queryElement(c, matcher, halter, list)) {-return true;-}-}-}-},-_queryElement: function (node, matcher, halter, list) {-var result = matcher(node);-if (result) {-list.push(node);-}-if (halter && halter(result)) {-return result;-}-this._queryElements(TreeApi.Logical.getChildNodes(node), matcher, halter, list);-}-};-var CONTENT = DomApi.CONTENT = 'content';-var dom = DomApi.factory = function (node) {-node = node || document;-if (!node.__domApi) {-node.__domApi = new DomApi.ctor(node);-}-return node.__domApi;-};-DomApi.hasApi = function (node) {-return Boolean(node.__domApi);-};-DomApi.ctor = DomApi;-Polymer.dom = function (obj, patch) {-if (obj instanceof Event) {-return Polymer.EventApi.factory(obj);-} else {-return DomApi.factory(obj, patch);-}-};-var p = Element.prototype;-DomApi.matchesSelector = p.matches || p.matchesSelector || p.mozMatchesSelector || p.msMatchesSelector || p.oMatchesSelector || p.webkitMatchesSelector;-return DomApi;-}();(function () {-'use strict';-var Settings = Polymer.Settings;-var DomApi = Polymer.DomApi;-var dom = DomApi.factory;-var TreeApi = Polymer.TreeApi;-var getInnerHTML = Polymer.domInnerHTML.getInnerHTML;-var CONTENT = DomApi.CONTENT;-if (Settings.useShadow) {-return;-}-var nativeCloneNode = Element.prototype.cloneNode;-var nativeImportNode = Document.prototype.importNode;-Polymer.Base.mixin(DomApi.prototype, {-_lazyDistribute: function (host) {-if (host.shadyRoot && host.shadyRoot._distributionClean) {-host.shadyRoot._distributionClean = false;-Polymer.dom.addDebouncer(host.debounce('_distribute', host._distributeContent));-}-},-appendChild: function (node) {-return this.insertBefore(node);-},-insertBefore: function (node, ref_node) {-if (ref_node && TreeApi.Logical.getParentNode(ref_node) !== this.node) {-throw Error('The ref_node to be inserted before is not a child ' + 'of this node');-}-if (node.nodeType !== Node.DOCUMENT_FRAGMENT_NODE) {-var parent = TreeApi.Logical.getParentNode(node);-if (parent) {-if (DomApi.hasApi(parent)) {-dom(parent).notifyObserver();-}-this._removeNode(node);-} else {-this._removeOwnerShadyRoot(node);-}-}-if (!this._addNode(node, ref_node)) {-if (ref_node) {-ref_node = ref_node.localName === CONTENT ? this._firstComposedNode(ref_node) : ref_node;-}-var container = this.node._isShadyRoot ? this.node.host : this.node;-if (ref_node) {-TreeApi.Composed.insertBefore(container, node, ref_node);-} else {-TreeApi.Composed.appendChild(container, node);-}-}-this.notifyObserver();-return node;-},-_addNode: function (node, ref_node) {-var root = this.getOwnerRoot();-if (root) {-var ipAdded = this._maybeAddInsertionPoint(node, this.node);-if (!root._invalidInsertionPoints) {-root._invalidInsertionPoints = ipAdded;-}-this._addNodeToHost(root.host, node);-}-if (TreeApi.Logical.hasChildNodes(this.node)) {-TreeApi.Logical.recordInsertBefore(node, this.node, ref_node);-}-var handled = this._maybeDistribute(node) || this.node.shadyRoot;-if (handled) {-if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {-while (node.firstChild) {-TreeApi.Composed.removeChild(node, node.firstChild);-}-} else {-var parent = TreeApi.Composed.getParentNode(node);-if (parent) {-TreeApi.Composed.removeChild(parent, node);-}-}-}-return handled;-},-removeChild: function (node) {-if (TreeApi.Logical.getParentNode(node) !== this.node) {-throw Error('The node to be removed is not a child of this node: ' + node);-}-if (!this._removeNode(node)) {-var container = this.node._isShadyRoot ? this.node.host : this.node;-var parent = TreeApi.Composed.getParentNode(node);-if (container === parent) {-TreeApi.Composed.removeChild(container, node);-}-}-this.notifyObserver();-return node;-},-_removeNode: function (node) {-var logicalParent = TreeApi.Logical.hasParentNode(node) && TreeApi.Logical.getParentNode(node);-var distributed;-var root = this._ownerShadyRootForNode(node);-if (logicalParent) {-distributed = dom(node)._maybeDistributeParent();-TreeApi.Logical.recordRemoveChild(node, logicalParent);-if (root && this._removeDistributedChildren(root, node)) {-root._invalidInsertionPoints = true;-this._lazyDistribute(root.host);-}-}-this._removeOwnerShadyRoot(node);-if (root) {-this._removeNodeFromHost(root.host, node);-}-return distributed;-},-replaceChild: function (node, ref_node) {-this.insertBefore(node, ref_node);-this.removeChild(ref_node);-return node;-},-_hasCachedOwnerRoot: function (node) {-return Boolean(node._ownerShadyRoot !== undefined);-},-getOwnerRoot: function () {-return this._ownerShadyRootForNode(this.node);-},-_ownerShadyRootForNode: function (node) {-if (!node) {-return;-}-var root = node._ownerShadyRoot;-if (root === undefined) {-if (node._isShadyRoot) {-root = node;-} else {-var parent = TreeApi.Logical.getParentNode(node);-if (parent) {-root = parent._isShadyRoot ? parent : this._ownerShadyRootForNode(parent);-} else {-root = null;-}-}-if (root || document.documentElement.contains(node)) {-node._ownerShadyRoot = root;-}-}-return root;-},-_maybeDistribute: function (node) {-var fragContent = node.nodeType === Node.DOCUMENT_FRAGMENT_NODE && !node.__noContent && dom(node).querySelector(CONTENT);-var wrappedContent = fragContent && TreeApi.Logical.getParentNode(fragContent).nodeType !== Node.DOCUMENT_FRAGMENT_NODE;-var hasContent = fragContent || node.localName === CONTENT;-if (hasContent) {-var root = this.getOwnerRoot();-if (root) {-this._lazyDistribute(root.host);-}-}-var needsDist = this._nodeNeedsDistribution(this.node);-if (needsDist) {-this._lazyDistribute(this.node);-}-return needsDist || hasContent && !wrappedContent;-},-_maybeAddInsertionPoint: function (node, parent) {-var added;-if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE && !node.__noContent) {-var c$ = dom(node).querySelectorAll(CONTENT);-for (var i = 0, n, np, na; i < c$.length && (n = c$[i]); i++) {-np = TreeApi.Logical.getParentNode(n);-if (np === node) {-np = parent;-}-na = this._maybeAddInsertionPoint(n, np);-added = added || na;-}-} else if (node.localName === CONTENT) {-TreeApi.Logical.saveChildNodes(parent);-TreeApi.Logical.saveChildNodes(node);-added = true;-}-return added;-},-_updateInsertionPoints: function (host) {-var i$ = host.shadyRoot._insertionPoints = dom(host.shadyRoot).querySelectorAll(CONTENT);-for (var i = 0, c; i < i$.length; i++) {-c = i$[i];-TreeApi.Logical.saveChildNodes(c);-TreeApi.Logical.saveChildNodes(TreeApi.Logical.getParentNode(c));-}-},-_nodeNeedsDistribution: function (node) {-return node && node.shadyRoot && DomApi.hasInsertionPoint(node.shadyRoot);-},-_addNodeToHost: function (host, node) {-if (host._elementAdd) {-host._elementAdd(node);-}-},-_removeNodeFromHost: function (host, node) {-if (host._elementRemove) {-host._elementRemove(node);-}-},-_removeDistributedChildren: function (root, container) {-var hostNeedsDist;-var ip$ = root._insertionPoints;-for (var i = 0; i < ip$.length; i++) {-var content = ip$[i];-if (this._contains(container, content)) {-var dc$ = dom(content).getDistributedNodes();-for (var j = 0; j < dc$.length; j++) {-hostNeedsDist = true;-var node = dc$[j];-var parent = TreeApi.Composed.getParentNode(node);-if (parent) {-TreeApi.Composed.removeChild(parent, node);-}-}-}-}-return hostNeedsDist;-},-_contains: function (container, node) {-while (node) {-if (node == container) {-return true;-}-node = TreeApi.Logical.getParentNode(node);-}-},-_removeOwnerShadyRoot: function (node) {-if (this._hasCachedOwnerRoot(node)) {-var c$ = TreeApi.Logical.getChildNodes(node);-for (var i = 0, l = c$.length, n; i < l && (n = c$[i]); i++) {-this._removeOwnerShadyRoot(n);-}-}-node._ownerShadyRoot = undefined;-},-_firstComposedNode: function (content) {-var n$ = dom(content).getDistributedNodes();-for (var i = 0, l = n$.length, n, p$; i < l && (n = n$[i]); i++) {-p$ = dom(n).getDestinationInsertionPoints();-if (p$[p$.length - 1] === content) {-return n;-}-}-},-querySelector: function (selector) {-var result = this._query(function (n) {-return DomApi.matchesSelector.call(n, selector);-}, this.node, function (n) {-return Boolean(n);-})[0];-return result || null;-},-querySelectorAll: function (selector) {-return this._query(function (n) {-return DomApi.matchesSelector.call(n, selector);-}, this.node);-},-getDestinationInsertionPoints: function () {-return this.node._destinationInsertionPoints || [];-},-getDistributedNodes: function () {-return this.node._distributedNodes || [];-},-_clear: function () {-while (this.childNodes.length) {-this.removeChild(this.childNodes[0]);-}-},-setAttribute: function (name, value) {-this.node.setAttribute(name, value);-this._maybeDistributeParent();-},-removeAttribute: function (name) {-this.node.removeAttribute(name);-this._maybeDistributeParent();-},-_maybeDistributeParent: function () {-if (this._nodeNeedsDistribution(this.parentNode)) {-this._lazyDistribute(this.parentNode);-return true;-}-},-cloneNode: function (deep) {-var n = nativeCloneNode.call(this.node, false);-if (deep) {-var c$ = this.childNodes;-var d = dom(n);-for (var i = 0, nc; i < c$.length; i++) {-nc = dom(c$[i]).cloneNode(true);-d.appendChild(nc);-}-}-return n;-},-importNode: function (externalNode, deep) {-var doc = this.node instanceof Document ? this.node : this.node.ownerDocument;-var n = nativeImportNode.call(doc, externalNode, false);-if (deep) {-var c$ = TreeApi.Logical.getChildNodes(externalNode);-var d = dom(n);-for (var i = 0, nc; i < c$.length; i++) {-nc = dom(doc).importNode(c$[i], true);-d.appendChild(nc);-}-}-return n;-},-_getComposedInnerHTML: function () {-return getInnerHTML(this.node, true);-}-});-Object.defineProperties(DomApi.prototype, {-activeElement: {-get: function () {-var active = document.activeElement;-if (!active) {-return null;-}-var isShadyRoot = !!this.node._isShadyRoot;-if (this.node !== document) {-if (!isShadyRoot) {-return null;-}-if (this.node.host === active || !this.node.host.contains(active)) {-return null;-}-}-var activeRoot = dom(active).getOwnerRoot();-while (activeRoot && activeRoot !== this.node) {-active = activeRoot.host;-activeRoot = dom(active).getOwnerRoot();-}-if (this.node === document) {-return activeRoot ? null : active;-} else {-return activeRoot === this.node ? active : null;-}-},-configurable: true-},-childNodes: {-get: function () {-var c$ = TreeApi.Logical.getChildNodes(this.node);-return Array.isArray(c$) ? c$ : TreeApi.arrayCopyChildNodes(this.node);-},-configurable: true-},-children: {-get: function () {-if (TreeApi.Logical.hasChildNodes(this.node)) {-return Array.prototype.filter.call(this.childNodes, function (n) {-return n.nodeType === Node.ELEMENT_NODE;-});-} else {-return TreeApi.arrayCopyChildren(this.node);-}-},-configurable: true-},-parentNode: {-get: function () {-return TreeApi.Logical.getParentNode(this.node);-},-configurable: true-},-firstChild: {-get: function () {-return TreeApi.Logical.getFirstChild(this.node);-},-configurable: true-},-lastChild: {-get: function () {-return TreeApi.Logical.getLastChild(this.node);-},-configurable: true-},-nextSibling: {-get: function () {-return TreeApi.Logical.getNextSibling(this.node);-},-configurable: true-},-previousSibling: {-get: function () {-return TreeApi.Logical.getPreviousSibling(this.node);-},-configurable: true-},-firstElementChild: {-get: function () {-return TreeApi.Logical.getFirstElementChild(this.node);-},-configurable: true-},-lastElementChild: {-get: function () {-return TreeApi.Logical.getLastElementChild(this.node);-},-configurable: true-},-nextElementSibling: {-get: function () {-return TreeApi.Logical.getNextElementSibling(this.node);-},-configurable: true-},-previousElementSibling: {-get: function () {-return TreeApi.Logical.getPreviousElementSibling(this.node);-},-configurable: true-},-textContent: {-get: function () {-var nt = this.node.nodeType;-if (nt === Node.TEXT_NODE || nt === Node.COMMENT_NODE) {-return this.node.textContent;-} else {-var tc = [];-for (var i = 0, cn = this.childNodes, c; c = cn[i]; i++) {-if (c.nodeType !== Node.COMMENT_NODE) {-tc.push(c.textContent);-}-}-return tc.join('');-}-},-set: function (text) {-var nt = this.node.nodeType;-if (nt === Node.TEXT_NODE || nt === Node.COMMENT_NODE) {-this.node.textContent = text;-} else {-this._clear();-if (text) {-this.appendChild(document.createTextNode(text));-}-}-},-configurable: true-},-innerHTML: {-get: function () {-var nt = this.node.nodeType;-if (nt === Node.TEXT_NODE || nt === Node.COMMENT_NODE) {-return null;-} else {-return getInnerHTML(this.node);-}-},-set: function (text) {-var nt = this.node.nodeType;-if (nt !== Node.TEXT_NODE || nt !== Node.COMMENT_NODE) {-this._clear();-var d = document.createElement('div');-d.innerHTML = text;-var c$ = TreeApi.arrayCopyChildNodes(d);-for (var i = 0; i < c$.length; i++) {-this.appendChild(c$[i]);-}-}-},-configurable: true-}-});-DomApi.hasInsertionPoint = function (root) {-return Boolean(root && root._insertionPoints.length);-};-}());(function () {-'use strict';-var Settings = Polymer.Settings;-var TreeApi = Polymer.TreeApi;-var DomApi = Polymer.DomApi;-if (!Settings.useShadow) {-return;-}-Polymer.Base.mixin(DomApi.prototype, {-querySelectorAll: function (selector) {-return TreeApi.arrayCopy(this.node.querySelectorAll(selector));-},-getOwnerRoot: function () {-var n = this.node;-while (n) {-if (n.nodeType === Node.DOCUMENT_FRAGMENT_NODE && n.host) {-return n;-}-n = n.parentNode;-}-},-importNode: function (externalNode, deep) {-var doc = this.node instanceof Document ? this.node : this.node.ownerDocument;-return doc.importNode(externalNode, deep);-},-getDestinationInsertionPoints: function () {-var n$ = this.node.getDestinationInsertionPoints && this.node.getDestinationInsertionPoints();-return n$ ? TreeApi.arrayCopy(n$) : [];-},-getDistributedNodes: function () {-var n$ = this.node.getDistributedNodes && this.node.getDistributedNodes();-return n$ ? TreeApi.arrayCopy(n$) : [];-}-});-Object.defineProperties(DomApi.prototype, {-activeElement: {-get: function () {-var node = DomApi.wrap(this.node);-var activeElement = node.activeElement;-return node.contains(activeElement) ? activeElement : null;-},-configurable: true-},-childNodes: {-get: function () {-return TreeApi.arrayCopyChildNodes(this.node);-},-configurable: true-},-children: {-get: function () {-return TreeApi.arrayCopyChildren(this.node);-},-configurable: true-},-textContent: {-get: function () {-return this.node.textContent;-},-set: function (value) {-return this.node.textContent = value;-},-configurable: true-},-innerHTML: {-get: function () {-return this.node.innerHTML;-},-set: function (value) {-return this.node.innerHTML = value;-},-configurable: true-}-});-var forwardMethods = function (m$) {-for (var i = 0; i < m$.length; i++) {-forwardMethod(m$[i]);-}-};-var forwardMethod = function (method) {-DomApi.prototype[method] = function () {-return this.node[method].apply(this.node, arguments);-};-};-forwardMethods([-'cloneNode',-'appendChild',-'insertBefore',-'removeChild',-'replaceChild',-'setAttribute',-'removeAttribute',-'querySelector'-]);-var forwardProperties = function (f$) {-for (var i = 0; i < f$.length; i++) {-forwardProperty(f$[i]);-}-};-var forwardProperty = function (name) {-Object.defineProperty(DomApi.prototype, name, {-get: function () {-return this.node[name];-},-configurable: true-});-};-forwardProperties([-'parentNode',-'firstChild',-'lastChild',-'nextSibling',-'previousSibling',-'firstElementChild',-'lastElementChild',-'nextElementSibling',-'previousElementSibling'-]);-}());Polymer.Base.mixin(Polymer.dom, {-_flushGuard: 0,-_FLUSH_MAX: 100,-_needsTakeRecords: !Polymer.Settings.useNativeCustomElements,-_debouncers: [],-_staticFlushList: [],-_finishDebouncer: null,-flush: function () {-this._flushGuard = 0;-this._prepareFlush();-while (this._debouncers.length && this._flushGuard < this._FLUSH_MAX) {-while (this._debouncers.length) {-this._debouncers.shift().complete();-}-if (this._finishDebouncer) {-this._finishDebouncer.complete();-}-this._prepareFlush();-this._flushGuard++;-}-if (this._flushGuard >= this._FLUSH_MAX) {-console.warn('Polymer.dom.flush aborted. Flush may not be complete.');-}-},-_prepareFlush: function () {-if (this._needsTakeRecords) {-CustomElements.takeRecords();-}-for (var i = 0; i < this._staticFlushList.length; i++) {-this._staticFlushList[i]();-}-},-addStaticFlush: function (fn) {-this._staticFlushList.push(fn);-},-removeStaticFlush: function (fn) {-var i = this._staticFlushList.indexOf(fn);-if (i >= 0) {-this._staticFlushList.splice(i, 1);-}-},-addDebouncer: function (debouncer) {-this._debouncers.push(debouncer);-this._finishDebouncer = Polymer.Debounce(this._finishDebouncer, this._finishFlush);-},-_finishFlush: function () {-Polymer.dom._debouncers = [];-}-});Polymer.EventApi = function () {-'use strict';-var DomApi = Polymer.DomApi.ctor;-var Settings = Polymer.Settings;-DomApi.Event = function (event) {-this.event = event;-};-if (Settings.useShadow) {-DomApi.Event.prototype = {-get rootTarget() {-return this.event.path[0];-},-get localTarget() {-return this.event.target;-},-get path() {-var path = this.event.path;-if (!Array.isArray(path)) {-path = Array.prototype.slice.call(path);-}-return path;-}-};-} else {-DomApi.Event.prototype = {-get rootTarget() {-return this.event.target;-},-get localTarget() {-var current = this.event.currentTarget;-var currentRoot = current && Polymer.dom(current).getOwnerRoot();-var p$ = this.path;-for (var i = 0; i < p$.length; i++) {-if (Polymer.dom(p$[i]).getOwnerRoot() === currentRoot) {-return p$[i];-}-}-},-get path() {-if (!this.event._path) {-var path = [];-var current = this.rootTarget;-while (current) {-path.push(current);-var insertionPoints = Polymer.dom(current).getDestinationInsertionPoints();-if (insertionPoints.length) {-for (var i = 0; i < insertionPoints.length - 1; i++) {-path.push(insertionPoints[i]);-}-current = insertionPoints[insertionPoints.length - 1];-} else {-current = Polymer.dom(current).parentNode || current.host;-}-}-path.push(window);-this.event._path = path;-}-return this.event._path;-}-};-}-var factory = function (event) {-if (!event.__eventApi) {-event.__eventApi = new DomApi.Event(event);-}-return event.__eventApi;-};-return { factory: factory };-}();(function () {-'use strict';-var DomApi = Polymer.DomApi.ctor;-var useShadow = Polymer.Settings.useShadow;-Object.defineProperty(DomApi.prototype, 'classList', {-get: function () {-if (!this._classList) {-this._classList = new DomApi.ClassList(this);-}-return this._classList;-},-configurable: true-});-DomApi.ClassList = function (host) {-this.domApi = host;-this.node = host.node;-};-DomApi.ClassList.prototype = {-add: function () {-this.node.classList.add.apply(this.node.classList, arguments);-this._distributeParent();-},-remove: function () {-this.node.classList.remove.apply(this.node.classList, arguments);-this._distributeParent();-},-toggle: function () {-this.node.classList.toggle.apply(this.node.classList, arguments);-this._distributeParent();-},-_distributeParent: function () {-if (!useShadow) {-this.domApi._maybeDistributeParent();-}-},-contains: function () {-return this.node.classList.contains.apply(this.node.classList, arguments);-}-};-}());(function () {-'use strict';-var DomApi = Polymer.DomApi.ctor;-var Settings = Polymer.Settings;-DomApi.EffectiveNodesObserver = function (domApi) {-this.domApi = domApi;-this.node = this.domApi.node;-this._listeners = [];-};-DomApi.EffectiveNodesObserver.prototype = {-addListener: function (callback) {-if (!this._isSetup) {-this._setup();-this._isSetup = true;-}-var listener = {-fn: callback,-_nodes: []-};-this._listeners.push(listener);-this._scheduleNotify();-return listener;-},-removeListener: function (handle) {-var i = this._listeners.indexOf(handle);-if (i >= 0) {-this._listeners.splice(i, 1);-handle._nodes = [];-}-if (!this._hasListeners()) {-this._cleanup();-this._isSetup = false;-}-},-_setup: function () {-this._observeContentElements(this.domApi.childNodes);-},-_cleanup: function () {-this._unobserveContentElements(this.domApi.childNodes);-},-_hasListeners: function () {-return Boolean(this._listeners.length);-},-_scheduleNotify: function () {-if (this._debouncer) {-this._debouncer.stop();-}-this._debouncer = Polymer.Debounce(this._debouncer, this._notify);-this._debouncer.context = this;-Polymer.dom.addDebouncer(this._debouncer);-},-notify: function () {-if (this._hasListeners()) {-this._scheduleNotify();-}-},-_notify: function () {-this._beforeCallListeners();-this._callListeners();-},-_beforeCallListeners: function () {-this._updateContentElements();-},-_updateContentElements: function () {-this._observeContentElements(this.domApi.childNodes);-},-_observeContentElements: function (elements) {-for (var i = 0, n; i < elements.length && (n = elements[i]); i++) {-if (this._isContent(n)) {-n.__observeNodesMap = n.__observeNodesMap || new WeakMap();-if (!n.__observeNodesMap.has(this)) {-n.__observeNodesMap.set(this, this._observeContent(n));-}-}-}-},-_observeContent: function (content) {-var self = this;-var h = Polymer.dom(content).observeNodes(function () {-self._scheduleNotify();-});-h._avoidChangeCalculation = true;-return h;-},-_unobserveContentElements: function (elements) {-for (var i = 0, n, h; i < elements.length && (n = elements[i]); i++) {-if (this._isContent(n)) {-h = n.__observeNodesMap.get(this);-if (h) {-Polymer.dom(n).unobserveNodes(h);-n.__observeNodesMap.delete(this);-}-}-}-},-_isContent: function (node) {-return node.localName === 'content';-},-_callListeners: function () {-var o$ = this._listeners;-var nodes = this._getEffectiveNodes();-for (var i = 0, o; i < o$.length && (o = o$[i]); i++) {-var info = this._generateListenerInfo(o, nodes);-if (info || o._alwaysNotify) {-this._callListener(o, info);-}-}-},-_getEffectiveNodes: function () {-return this.domApi.getEffectiveChildNodes();-},-_generateListenerInfo: function (listener, newNodes) {-if (listener._avoidChangeCalculation) {-return true;-}-var oldNodes = listener._nodes;-var info = {-target: this.node,-addedNodes: [],-removedNodes: []-};-var splices = Polymer.ArraySplice.calculateSplices(newNodes, oldNodes);-for (var i = 0, s; i < splices.length && (s = splices[i]); i++) {-for (var j = 0, n; j < s.removed.length && (n = s.removed[j]); j++) {-info.removedNodes.push(n);-}-}-for (i = 0, s; i < splices.length && (s = splices[i]); i++) {-for (j = s.index; j < s.index + s.addedCount; j++) {-info.addedNodes.push(newNodes[j]);-}-}-listener._nodes = newNodes;-if (info.addedNodes.length || info.removedNodes.length) {-return info;-}-},-_callListener: function (listener, info) {-return listener.fn.call(this.node, info);-},-enableShadowAttributeTracking: function () {-}-};-if (Settings.useShadow) {-var baseSetup = DomApi.EffectiveNodesObserver.prototype._setup;-var baseCleanup = DomApi.EffectiveNodesObserver.prototype._cleanup;-Polymer.Base.mixin(DomApi.EffectiveNodesObserver.prototype, {-_setup: function () {-if (!this._observer) {-var self = this;-this._mutationHandler = function (mxns) {-if (mxns && mxns.length) {-self._scheduleNotify();-}-};-this._observer = new MutationObserver(this._mutationHandler);-this._boundFlush = function () {-self._flush();-};-Polymer.dom.addStaticFlush(this._boundFlush);-this._observer.observe(this.node, { childList: true });-}-baseSetup.call(this);-},-_cleanup: function () {-this._observer.disconnect();-this._observer = null;-this._mutationHandler = null;-Polymer.dom.removeStaticFlush(this._boundFlush);-baseCleanup.call(this);-},-_flush: function () {-if (this._observer) {-this._mutationHandler(this._observer.takeRecords());-}-},-enableShadowAttributeTracking: function () {-if (this._observer) {-this._makeContentListenersAlwaysNotify();-this._observer.disconnect();-this._observer.observe(this.node, {-childList: true,-attributes: true,-subtree: true-});-var root = this.domApi.getOwnerRoot();-var host = root && root.host;-if (host && Polymer.dom(host).observer) {-Polymer.dom(host).observer.enableShadowAttributeTracking();-}-}-},-_makeContentListenersAlwaysNotify: function () {-for (var i = 0, h; i < this._listeners.length; i++) {-h = this._listeners[i];-h._alwaysNotify = h._isContentListener;-}-}-});-}-}());(function () {-'use strict';-var DomApi = Polymer.DomApi.ctor;-var Settings = Polymer.Settings;-DomApi.DistributedNodesObserver = function (domApi) {-DomApi.EffectiveNodesObserver.call(this, domApi);-};-DomApi.DistributedNodesObserver.prototype = Object.create(DomApi.EffectiveNodesObserver.prototype);-Polymer.Base.mixin(DomApi.DistributedNodesObserver.prototype, {-_setup: function () {-},-_cleanup: function () {-},-_beforeCallListeners: function () {-},-_getEffectiveNodes: function () {-return this.domApi.getDistributedNodes();-}-});-if (Settings.useShadow) {-Polymer.Base.mixin(DomApi.DistributedNodesObserver.prototype, {-_setup: function () {-if (!this._observer) {-var root = this.domApi.getOwnerRoot();-var host = root && root.host;-if (host) {-var self = this;-this._observer = Polymer.dom(host).observeNodes(function () {-self._scheduleNotify();-});-this._observer._isContentListener = true;-if (this._hasAttrSelect()) {-Polymer.dom(host).observer.enableShadowAttributeTracking();-}-}-}-},-_hasAttrSelect: function () {-var select = this.node.getAttribute('select');-return select && select.match(/[[.]+/);-},-_cleanup: function () {-var root = this.domApi.getOwnerRoot();-var host = root && root.host;-if (host) {-Polymer.dom(host).unobserveNodes(this._observer);-}-this._observer = null;-}-});-}-}());(function () {-var DomApi = Polymer.DomApi;-var TreeApi = Polymer.TreeApi;-Polymer.Base._addFeature({-_prepShady: function () {-this._useContent = this._useContent || Boolean(this._template);-},-_setupShady: function () {-this.shadyRoot = null;-if (!this.__domApi) {-this.__domApi = null;-}-if (!this.__dom) {-this.__dom = null;-}-if (!this._ownerShadyRoot) {-this._ownerShadyRoot = undefined;-}-},-_poolContent: function () {-if (this._useContent) {-TreeApi.Logical.saveChildNodes(this);-}-},-_setupRoot: function () {-if (this._useContent) {-this._createLocalRoot();-if (!this.dataHost) {-upgradeLogicalChildren(TreeApi.Logical.getChildNodes(this));-}-}-},-_createLocalRoot: function () {-this.shadyRoot = this.root;-this.shadyRoot._distributionClean = false;-this.shadyRoot._hasDistributed = false;-this.shadyRoot._isShadyRoot = true;-this.shadyRoot._dirtyRoots = [];-var i$ = this.shadyRoot._insertionPoints = !this._notes || this._notes._hasContent ? this.shadyRoot.querySelectorAll('content') : [];-TreeApi.Logical.saveChildNodes(this.shadyRoot);-for (var i = 0, c; i < i$.length; i++) {-c = i$[i];-TreeApi.Logical.saveChildNodes(c);-TreeApi.Logical.saveChildNodes(c.parentNode);-}-this.shadyRoot.host = this;-},-distributeContent: function (updateInsertionPoints) {-if (this.shadyRoot) {-this.shadyRoot._invalidInsertionPoints = this.shadyRoot._invalidInsertionPoints || updateInsertionPoints;-var host = getTopDistributingHost(this);-Polymer.dom(this)._lazyDistribute(host);-}-},-_distributeContent: function () {-if (this._useContent && !this.shadyRoot._distributionClean) {-if (this.shadyRoot._invalidInsertionPoints) {-Polymer.dom(this)._updateInsertionPoints(this);-this.shadyRoot._invalidInsertionPoints = false;-}-this._beginDistribute();-this._distributeDirtyRoots();-this._finishDistribute();-}-},-_beginDistribute: function () {-if (this._useContent && DomApi.hasInsertionPoint(this.shadyRoot)) {-this._resetDistribution();-this._distributePool(this.shadyRoot, this._collectPool());-}-},-_distributeDirtyRoots: function () {-var c$ = this.shadyRoot._dirtyRoots;-for (var i = 0, l = c$.length, c; i < l && (c = c$[i]); i++) {-c._distributeContent();-}-this.shadyRoot._dirtyRoots = [];-},-_finishDistribute: function () {-if (this._useContent) {-this.shadyRoot._distributionClean = true;-if (DomApi.hasInsertionPoint(this.shadyRoot)) {-this._composeTree();-notifyContentObservers(this.shadyRoot);-} else {-if (!this.shadyRoot._hasDistributed) {-TreeApi.Composed.clearChildNodes(this);-this.appendChild(this.shadyRoot);-} else {-var children = this._composeNode(this);-this._updateChildNodes(this, children);-}-}-if (!this.shadyRoot._hasDistributed) {-notifyInitialDistribution(this);-}-this.shadyRoot._hasDistributed = true;-}-},-elementMatches: function (selector, node) {-node = node || this;-return DomApi.matchesSelector.call(node, selector);-},-_resetDistribution: function () {-var children = TreeApi.Logical.getChildNodes(this);-for (var i = 0; i < children.length; i++) {-var child = children[i];-if (child._destinationInsertionPoints) {-child._destinationInsertionPoints = undefined;-}-if (isInsertionPoint(child)) {-clearDistributedDestinationInsertionPoints(child);-}-}-var root = this.shadyRoot;-var p$ = root._insertionPoints;-for (var j = 0; j < p$.length; j++) {-p$[j]._distributedNodes = [];-}-},-_collectPool: function () {-var pool = [];-var children = TreeApi.Logical.getChildNodes(this);-for (var i = 0; i < children.length; i++) {-var child = children[i];-if (isInsertionPoint(child)) {-pool.push.apply(pool, child._distributedNodes);-} else {-pool.push(child);-}-}-return pool;-},-_distributePool: function (node, pool) {-var p$ = node._insertionPoints;-for (var i = 0, l = p$.length, p; i < l && (p = p$[i]); i++) {-this._distributeInsertionPoint(p, pool);-maybeRedistributeParent(p, this);-}-},-_distributeInsertionPoint: function (content, pool) {-var anyDistributed = false;-for (var i = 0, l = pool.length, node; i < l; i++) {-node = pool[i];-if (!node) {-continue;-}-if (this._matchesContentSelect(node, content)) {-distributeNodeInto(node, content);-pool[i] = undefined;-anyDistributed = true;-}-}-if (!anyDistributed) {-var children = TreeApi.Logical.getChildNodes(content);-for (var j = 0; j < children.length; j++) {-distributeNodeInto(children[j], content);-}-}-},-_composeTree: function () {-this._updateChildNodes(this, this._composeNode(this));-var p$ = this.shadyRoot._insertionPoints;-for (var i = 0, l = p$.length, p, parent; i < l && (p = p$[i]); i++) {-parent = TreeApi.Logical.getParentNode(p);-if (!parent._useContent && parent !== this && parent !== this.shadyRoot) {-this._updateChildNodes(parent, this._composeNode(parent));-}-}-},-_composeNode: function (node) {-var children = [];-var c$ = TreeApi.Logical.getChildNodes(node.shadyRoot || node);-for (var i = 0; i < c$.length; i++) {-var child = c$[i];-if (isInsertionPoint(child)) {-var distributedNodes = child._distributedNodes;-for (var j = 0; j < distributedNodes.length; j++) {-var distributedNode = distributedNodes[j];-if (isFinalDestination(child, distributedNode)) {-children.push(distributedNode);-}-}-} else {-children.push(child);-}-}-return children;-},-_updateChildNodes: function (container, children) {-var composed = TreeApi.Composed.getChildNodes(container);-var splices = Polymer.ArraySplice.calculateSplices(children, composed);-for (var i = 0, d = 0, s; i < splices.length && (s = splices[i]); i++) {-for (var j = 0, n; j < s.removed.length && (n = s.removed[j]); j++) {-if (TreeApi.Composed.getParentNode(n) === container) {-TreeApi.Composed.removeChild(container, n);-}-composed.splice(s.index + d, 1);-}-d -= s.addedCount;-}-for (var i = 0, s, next; i < splices.length && (s = splices[i]); i++) {-next = composed[s.index];-for (j = s.index, n; j < s.index + s.addedCount; j++) {-n = children[j];-TreeApi.Composed.insertBefore(container, n, next);-composed.splice(j, 0, n);-}-}-},-_matchesContentSelect: function (node, contentElement) {-var select = contentElement.getAttribute('select');-if (!select) {-return true;-}-select = select.trim();-if (!select) {-return true;-}-if (!(node instanceof Element)) {-return false;-}-var validSelectors = /^(:not\()?[*.#[a-zA-Z_|]/;-if (!validSelectors.test(select)) {-return false;-}-return this.elementMatches(select, node);-},-_elementAdd: function () {-},-_elementRemove: function () {-}-});-var domHostDesc = {-get: function () {-var root = Polymer.dom(this).getOwnerRoot();-return root && root.host;-},-configurable: true-};-Object.defineProperty(Polymer.Base, 'domHost', domHostDesc);-Polymer.BaseDescriptors.domHost = domHostDesc;-function distributeNodeInto(child, insertionPoint) {-insertionPoint._distributedNodes.push(child);-var points = child._destinationInsertionPoints;-if (!points) {-child._destinationInsertionPoints = [insertionPoint];-} else {-points.push(insertionPoint);-}-}-function clearDistributedDestinationInsertionPoints(content) {-var e$ = content._distributedNodes;-if (e$) {-for (var i = 0; i < e$.length; i++) {-var d = e$[i]._destinationInsertionPoints;-if (d) {-d.splice(d.indexOf(content) + 1, d.length);-}-}-}-}-function maybeRedistributeParent(content, host) {-var parent = TreeApi.Logical.getParentNode(content);-if (parent && parent.shadyRoot && DomApi.hasInsertionPoint(parent.shadyRoot) && parent.shadyRoot._distributionClean) {-parent.shadyRoot._distributionClean = false;-host.shadyRoot._dirtyRoots.push(parent);-}-}-function isFinalDestination(insertionPoint, node) {-var points = node._destinationInsertionPoints;-return points && points[points.length - 1] === insertionPoint;-}-function isInsertionPoint(node) {-return node.localName == 'content';-}-function getTopDistributingHost(host) {-while (host && hostNeedsRedistribution(host)) {-host = host.domHost;-}-return host;-}-function hostNeedsRedistribution(host) {-var c$ = TreeApi.Logical.getChildNodes(host);-for (var i = 0, c; i < c$.length; i++) {-c = c$[i];-if (c.localName && c.localName === 'content') {-return host.domHost;-}-}-}-function notifyContentObservers(root) {-for (var i = 0, c; i < root._insertionPoints.length; i++) {-c = root._insertionPoints[i];-if (DomApi.hasApi(c)) {-Polymer.dom(c).notifyObserver();-}-}-}-function notifyInitialDistribution(host) {-if (DomApi.hasApi(host)) {-Polymer.dom(host).notifyObserver();-}-}-var needsUpgrade = window.CustomElements && !CustomElements.useNative;-function upgradeLogicalChildren(children) {-if (needsUpgrade && children) {-for (var i = 0; i < children.length; i++) {-CustomElements.upgrade(children[i]);-}-}-}-}());if (Polymer.Settings.useShadow) {-Polymer.Base._addFeature({-_poolContent: function () {-},-_beginDistribute: function () {-},-distributeContent: function () {-},-_distributeContent: function () {-},-_finishDistribute: function () {-},-_createLocalRoot: function () {-this.createShadowRoot();-this.shadowRoot.appendChild(this.root);-this.root = this.shadowRoot;-}-});-}Polymer.Async = {-_currVal: 0,-_lastVal: 0,-_callbacks: [],-_twiddleContent: 0,-_twiddle: document.createTextNode(''),-run: function (callback, waitTime) {-if (waitTime > 0) {-return ~setTimeout(callback, waitTime);-} else {-this._twiddle.textContent = this._twiddleContent++;-this._callbacks.push(callback);-return this._currVal++;-}-},-cancel: function (handle) {-if (handle < 0) {-clearTimeout(~handle);-} else {-var idx = handle - this._lastVal;-if (idx >= 0) {-if (!this._callbacks[idx]) {-throw 'invalid async handle: ' + handle;-}-this._callbacks[idx] = null;-}-}-},-_atEndOfMicrotask: function () {-var len = this._callbacks.length;-for (var i = 0; i < len; i++) {-var cb = this._callbacks[i];-if (cb) {-try {-cb();-} catch (e) {-i++;-this._callbacks.splice(0, i);-this._lastVal += i;-this._twiddle.textContent = this._twiddleContent++;-throw e;-}-}-}-this._callbacks.splice(0, len);-this._lastVal += len;-}-};-new window.MutationObserver(function () {-Polymer.Async._atEndOfMicrotask();-}).observe(Polymer.Async._twiddle, { characterData: true });Polymer.Debounce = function () {-var Async = Polymer.Async;-var Debouncer = function (context) {-this.context = context;-var self = this;-this.boundComplete = function () {-self.complete();-};-};-Debouncer.prototype = {-go: function (callback, wait) {-var h;-this.finish = function () {-Async.cancel(h);-};-h = Async.run(this.boundComplete, wait);-this.callback = callback;-},-stop: function () {-if (this.finish) {-this.finish();-this.finish = null;-this.callback = null;-}-},-complete: function () {-if (this.finish) {-var callback = this.callback;-this.stop();-callback.call(this.context);-}-}-};-function debounce(debouncer, callback, wait) {-if (debouncer) {-debouncer.stop();-} else {-debouncer = new Debouncer(this);-}-debouncer.go(callback, wait);-return debouncer;-}-return debounce;-}();Polymer.Base._addFeature({-_setupDebouncers: function () {-this._debouncers = {};-},-debounce: function (jobName, callback, wait) {-return this._debouncers[jobName] = Polymer.Debounce.call(this, this._debouncers[jobName], callback, wait);-},-isDebouncerActive: function (jobName) {-var debouncer = this._debouncers[jobName];-return !!(debouncer && debouncer.finish);-},-flushDebouncer: function (jobName) {-var debouncer = this._debouncers[jobName];-if (debouncer) {-debouncer.complete();-}-},-cancelDebouncer: function (jobName) {-var debouncer = this._debouncers[jobName];-if (debouncer) {-debouncer.stop();-}-}-});Polymer.DomModule = document.createElement('dom-module');-Polymer.Base._addFeature({-_registerFeatures: function () {-this._prepIs();-this._prepBehaviors();-this._prepConstructor();-this._prepTemplate();-this._prepShady();-this._prepPropertyInfo();-},-_prepBehavior: function (b) {-this._addHostAttributes(b.hostAttributes);-},-_initFeatures: function () {-this._registerHost();-if (this._template) {-this._poolContent();-this._beginHosting();-this._stampTemplate();-this._endHosting();-}-this._marshalHostAttributes();-this._setupDebouncers();-this._marshalBehaviors();-this._tryReady();-},-_marshalBehavior: function (b) {-}-});</script>------diff --git a/manager/client/src/main/webapp/bower_components/polymer/polymer.html b/manager/client/src/main/webapp/bower_components/polymer/polymer.htmlindex 9a3258746..0331373cd 100644--- a/manager/client/src/main/webapp/bower_components/polymer/polymer.html+++ b/manager/client/src/main/webapp/bower_components/polymer/polymer.html@@ -1,5435 +1,25 @@<!--@license-Copyright (c) 2015 The Polymer Project Authors. All rights reserved.+Copyright (c) 2017 The Polymer Project Authors. All rights reserved.This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txtThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txtThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txtCode distributed by Google as part of the polymer project is alsosubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt---><!---@license-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt-Code distributed by Google as part of the polymer project is also-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt---><link rel="import" href="polymer-mini.html"><script>(function () {-Polymer.nar = [];-var disableUpgradeEnabled = Polymer.Settings.disableUpgradeEnabled;-Polymer.Annotations = {-parseAnnotations: function (template, stripWhiteSpace) {-var list = [];-var content = template._content || template.content;-this._parseNodeAnnotations(content, list, stripWhiteSpace || template.hasAttribute('strip-whitespace'));-return list;-},-_parseNodeAnnotations: function (node, list, stripWhiteSpace) {-return node.nodeType === Node.TEXT_NODE ? this._parseTextNodeAnnotation(node, list) : this._parseElementAnnotations(node, list, stripWhiteSpace);-},-_bindingRegex: function () {-var IDENT = '(?:' + '[a-zA-Z_$][\\w.:$\\-*]*' + ')';-var NUMBER = '(?:' + '[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?' + ')';-var SQUOTE_STRING = '(?:' + '\'(?:[^\'\\\\]|\\\\.)*\'' + ')';-var DQUOTE_STRING = '(?:' + '"(?:[^"\\\\]|\\\\.)*"' + ')';-var STRING = '(?:' + SQUOTE_STRING + '|' + DQUOTE_STRING + ')';-var ARGUMENT = '(?:' + IDENT + '|' + NUMBER + '|' + STRING + '\\s*' + ')';-var ARGUMENTS = '(?:' + ARGUMENT + '(?:,\\s*' + ARGUMENT + ')*' + ')';-var ARGUMENT_LIST = '(?:' + '\\(\\s*' + '(?:' + ARGUMENTS + '?' + ')' + '\\)\\s*' + ')';-var BINDING = '(' + IDENT + '\\s*' + ARGUMENT_LIST + '?' + ')';-var OPEN_BRACKET = '(\\[\\[|{{)' + '\\s*';-var CLOSE_BRACKET = '(?:]]|}})';-var NEGATE = '(?:(!)\\s*)?';-var EXPRESSION = OPEN_BRACKET + NEGATE + BINDING + CLOSE_BRACKET;-return new RegExp(EXPRESSION, 'g');-}(),-_parseBindings: function (text) {-var re = this._bindingRegex;-var parts = [];-var lastIndex = 0;-var m;-while ((m = re.exec(text)) !== null) {-if (m.index > lastIndex) {-parts.push({ literal: text.slice(lastIndex, m.index) });-}-var mode = m[1][0];-var negate = Boolean(m[2]);-var value = m[3].trim();-var customEvent, notifyEvent, colon;-if (mode == '{' && (colon = value.indexOf('::')) > 0) {-notifyEvent = value.substring(colon + 2);-value = value.substring(0, colon);-customEvent = true;-}-parts.push({-compoundIndex: parts.length,-value: value,-mode: mode,-negate: negate,-event: notifyEvent,-customEvent: customEvent-});-lastIndex = re.lastIndex;-}-if (lastIndex && lastIndex < text.length) {-var literal = text.substring(lastIndex);-if (literal) {-parts.push({ literal: literal });-}-}-if (parts.length) {-return parts;-}-},-_literalFromParts: function (parts) {-var s = '';-for (var i = 0; i < parts.length; i++) {-var literal = parts[i].literal;-s += literal || '';-}-return s;-},-_parseTextNodeAnnotation: function (node, list) {-var parts = this._parseBindings(node.textContent);-if (parts) {-node.textContent = this._literalFromParts(parts) || ' ';-var annote = {-bindings: [{-kind: 'text',-name: 'textContent',-parts: parts,-isCompound: parts.length !== 1-}]-};-list.push(annote);-return annote;-}-},-_parseElementAnnotations: function (element, list, stripWhiteSpace) {-var annote = {-bindings: [],-events: []-};-if (element.localName === 'content') {-list._hasContent = true;-}-this._parseChildNodesAnnotations(element, annote, list, stripWhiteSpace);-if (element.attributes) {-this._parseNodeAttributeAnnotations(element, annote, list);-if (this.prepElement) {-this.prepElement(element);-}-}-if (annote.bindings.length || annote.events.length || annote.id) {-list.push(annote);-}-return annote;-},-_parseChildNodesAnnotations: function (root, annote, list, stripWhiteSpace) {-if (root.firstChild) {-var node = root.firstChild;-var i = 0;-while (node) {-var next = node.nextSibling;-if (node.localName === 'template' && !node.hasAttribute('preserve-content')) {-this._parseTemplate(node, i, list, annote, stripWhiteSpace);-}-if (node.localName == 'slot') {-node = this._replaceSlotWithContent(node);-}-if (node.nodeType === Node.TEXT_NODE) {-var n = next;-while (n && n.nodeType === Node.TEXT_NODE) {-node.textContent += n.textContent;-next = n.nextSibling;-root.removeChild(n);-n = next;-}-if (stripWhiteSpace && !node.textContent.trim()) {-root.removeChild(node);-i--;-}-}-if (node.parentNode) {-var childAnnotation = this._parseNodeAnnotations(node, list, stripWhiteSpace);-if (childAnnotation) {-childAnnotation.parent = annote;-childAnnotation.index = i;-}-}-node = next;-i++;-}-}-},-_replaceSlotWithContent: function (slot) {-var content = slot.ownerDocument.createElement('content');-while (slot.firstChild) {-content.appendChild(slot.firstChild);-}-var attrs = slot.attributes;-for (var i = 0; i < attrs.length; i++) {-var attr = attrs[i];-content.setAttribute(attr.name, attr.value);-}-var name = slot.getAttribute('name');-if (name) {-content.setAttribute('select', '[slot=\'' + name + '\']');-}-slot.parentNode.replaceChild(content, slot);-return content;-},-_parseTemplate: function (node, index, list, parent, stripWhiteSpace) {-var content = document.createDocumentFragment();-content._notes = this.parseAnnotations(node, stripWhiteSpace);-content.appendChild(node.content);-list.push({-bindings: Polymer.nar,-events: Polymer.nar,-templateContent: content,-parent: parent,-index: index-});-},-_parseNodeAttributeAnnotations: function (node, annotation) {-var attrs = Array.prototype.slice.call(node.attributes);-for (var i = attrs.length - 1, a; a = attrs[i]; i--) {-var n = a.name;-var v = a.value;-var b;-if (n.slice(0, 3) === 'on-') {-node.removeAttribute(n);-annotation.events.push({-name: n.slice(3),-value: v-});-} else if (b = this._parseNodeAttributeAnnotation(node, n, v)) {-annotation.bindings.push(b);-} else if (n === 'id') {-annotation.id = v;-}-}-},-_parseNodeAttributeAnnotation: function (node, name, value) {-var parts = this._parseBindings(value);-if (parts) {-var origName = name;-var kind = 'property';-if (name[name.length - 1] == '$') {-name = name.slice(0, -1);-kind = 'attribute';-}-var literal = this._literalFromParts(parts);-if (literal && kind == 'attribute') {-node.setAttribute(name, literal);-}-if (node.localName === 'input' && origName === 'value') {-node.setAttribute(origName, '');-}-if (disableUpgradeEnabled && origName === 'disable-upgrade$') {-node.setAttribute(name, '');-}-node.removeAttribute(origName);-var propertyName = Polymer.CaseMap.dashToCamelCase(name);-if (kind === 'property') {-name = propertyName;-}-return {-kind: kind,-name: name,-propertyName: propertyName,-parts: parts,-literal: literal,-isCompound: parts.length !== 1-};-}-},-findAnnotatedNode: function (root, annote) {-var parent = annote.parent && Polymer.Annotations.findAnnotatedNode(root, annote.parent);-if (parent) {-for (var n = parent.firstChild, i = 0; n; n = n.nextSibling) {-if (annote.index === i++) {-return n;-}-}-} else {-return root;-}-}-};-}());Polymer.Path = {-root: function (path) {-var dotIndex = path.indexOf('.');-if (dotIndex === -1) {-return path;-}-return path.slice(0, dotIndex);-},-isDeep: function (path) {-return path.indexOf('.') !== -1;-},-isAncestor: function (base, path) {-return base.indexOf(path + '.') === 0;-},-isDescendant: function (base, path) {-return path.indexOf(base + '.') === 0;-},-translate: function (base, newBase, path) {-return newBase + path.slice(base.length);-},-matches: function (base, wildcard, path) {-return base === path || this.isAncestor(base, path) || Boolean(wildcard) && this.isDescendant(base, path);-}-};Polymer.Base._addFeature({-_prepAnnotations: function () {-if (!this._template) {-this._notes = [];-} else {-var self = this;-Polymer.Annotations.prepElement = function (element) {-self._prepElement(element);-};-if (this._template._content && this._template._content._notes) {-this._notes = this._template._content._notes;-} else {-this._notes = Polymer.Annotations.parseAnnotations(this._template);-this._processAnnotations(this._notes);-}-Polymer.Annotations.prepElement = null;-}-},-_processAnnotations: function (notes) {-for (var i = 0; i < notes.length; i++) {-var note = notes[i];-for (var j = 0; j < note.bindings.length; j++) {-var b = note.bindings[j];-for (var k = 0; k < b.parts.length; k++) {-var p = b.parts[k];-if (!p.literal) {-var signature = this._parseMethod(p.value);-if (signature) {-p.signature = signature;-} else {-p.model = Polymer.Path.root(p.value);-}-}-}-}-if (note.templateContent) {-this._processAnnotations(note.templateContent._notes);-var pp = note.templateContent._parentProps = this._discoverTemplateParentProps(note.templateContent._notes);-var bindings = [];-for (var prop in pp) {-var name = '_parent_' + prop;-bindings.push({-index: note.index,-kind: 'property',-name: name,-propertyName: name,-parts: [{-mode: '{',-model: prop,-value: prop-}]-});-}-note.bindings = note.bindings.concat(bindings);-}-}-},-_discoverTemplateParentProps: function (notes) {-var pp = {};-for (var i = 0, n; i < notes.length && (n = notes[i]); i++) {-for (var j = 0, b$ = n.bindings, b; j < b$.length && (b = b$[j]); j++) {-for (var k = 0, p$ = b.parts, p; k < p$.length && (p = p$[k]); k++) {-if (p.signature) {-var args = p.signature.args;-for (var kk = 0; kk < args.length; kk++) {-var model = args[kk].model;-if (model) {-pp[model] = true;-}-}-if (p.signature.dynamicFn) {-pp[p.signature.method] = true;-}-} else {-if (p.model) {-pp[p.model] = true;-}-}-}-}-if (n.templateContent) {-var tpp = n.templateContent._parentProps;-Polymer.Base.mixin(pp, tpp);-}-}-return pp;-},-_prepElement: function (element) {-Polymer.ResolveUrl.resolveAttrs(element, this._template.ownerDocument);-},-_findAnnotatedNode: Polymer.Annotations.findAnnotatedNode,-_marshalAnnotationReferences: function () {-if (this._template) {-this._marshalIdNodes();-this._marshalAnnotatedNodes();-this._marshalAnnotatedListeners();-}-},-_configureAnnotationReferences: function () {-var notes = this._notes;-var nodes = this._nodes;-for (var i = 0; i < notes.length; i++) {-var note = notes[i];-var node = nodes[i];-this._configureTemplateContent(note, node);-this._configureCompoundBindings(note, node);-}-},-_configureTemplateContent: function (note, node) {-if (note.templateContent) {-node._content = note.templateContent;-}-},-_configureCompoundBindings: function (note, node) {-var bindings = note.bindings;-for (var i = 0; i < bindings.length; i++) {-var binding = bindings[i];-if (binding.isCompound) {-var storage = node.__compoundStorage__ || (node.__compoundStorage__ = {});-var parts = binding.parts;-var literals = new Array(parts.length);-for (var j = 0; j < parts.length; j++) {-literals[j] = parts[j].literal;-}-var name = binding.name;-storage[name] = literals;-if (binding.literal && binding.kind == 'property') {-if (node._configValue) {-node._configValue(name, binding.literal);-} else {-node[name] = binding.literal;-}-}-}-}-},-_marshalIdNodes: function () {-this.$ = {};-for (var i = 0, l = this._notes.length, a; i < l && (a = this._notes[i]); i++) {-if (a.id) {-this.$[a.id] = this._findAnnotatedNode(this.root, a);-}-}-},-_marshalAnnotatedNodes: function () {-if (this._notes && this._notes.length) {-var r = new Array(this._notes.length);-for (var i = 0; i < this._notes.length; i++) {-r[i] = this._findAnnotatedNode(this.root, this._notes[i]);-}-this._nodes = r;-}-},-_marshalAnnotatedListeners: function () {-for (var i = 0, l = this._notes.length, a; i < l && (a = this._notes[i]); i++) {-if (a.events && a.events.length) {-var node = this._findAnnotatedNode(this.root, a);-for (var j = 0, e$ = a.events, e; j < e$.length && (e = e$[j]); j++) {-this.listen(node, e.name, e.value);-}-}-}-}-});Polymer.Base._addFeature({-listeners: {},-_listenListeners: function (listeners) {-var node, name, eventName;-for (eventName in listeners) {-if (eventName.indexOf('.') < 0) {-node = this;-name = eventName;-} else {-name = eventName.split('.');-node = this.$[name[0]];-name = name[1];-}-this.listen(node, name, listeners[eventName]);-}-},-listen: function (node, eventName, methodName) {-var handler = this._recallEventHandler(this, eventName, node, methodName);-if (!handler) {-handler = this._createEventHandler(node, eventName, methodName);-}-if (handler._listening) {-return;-}-this._listen(node, eventName, handler);-handler._listening = true;-},-_boundListenerKey: function (eventName, methodName) {-return eventName + ':' + methodName;-},-_recordEventHandler: function (host, eventName, target, methodName, handler) {-var hbl = host.__boundListeners;-if (!hbl) {-hbl = host.__boundListeners = new WeakMap();-}-var bl = hbl.get(target);-if (!bl) {-bl = {};-if (!Polymer.Settings.isIE || target != window) {-hbl.set(target, bl);-}-}-var key = this._boundListenerKey(eventName, methodName);-bl[key] = handler;-},-_recallEventHandler: function (host, eventName, target, methodName) {-var hbl = host.__boundListeners;-if (!hbl) {-return;-}-var bl = hbl.get(target);-if (!bl) {-return;-}-var key = this._boundListenerKey(eventName, methodName);-return bl[key];-},-_createEventHandler: function (node, eventName, methodName) {-var host = this;-var handler = function (e) {-if (host[methodName]) {-host[methodName](e, e.detail);-} else {-host._warn(host._logf('_createEventHandler', 'listener method `' + methodName + '` not defined'));-}-};-handler._listening = false;-this._recordEventHandler(host, eventName, node, methodName, handler);-return handler;-},-unlisten: function (node, eventName, methodName) {-var handler = this._recallEventHandler(this, eventName, node, methodName);-if (handler) {-this._unlisten(node, eventName, handler);-handler._listening = false;-}-},-_listen: function (node, eventName, handler) {-node.addEventListener(eventName, handler);-},-_unlisten: function (node, eventName, handler) {-node.removeEventListener(eventName, handler);-}-});(function () {-'use strict';-var wrap = Polymer.DomApi.wrap;-var HAS_NATIVE_TA = typeof document.head.style.touchAction === 'string';-var GESTURE_KEY = '__polymerGestures';-var HANDLED_OBJ = '__polymerGesturesHandled';-var TOUCH_ACTION = '__polymerGesturesTouchAction';-var TAP_DISTANCE = 25;-var TRACK_DISTANCE = 5;-var TRACK_LENGTH = 2;-var MOUSE_TIMEOUT = 2500;-var MOUSE_EVENTS = [-'mousedown',-'mousemove',-'mouseup',-'click'-];-var MOUSE_WHICH_TO_BUTTONS = [-0,-1,-4,-2-];-var MOUSE_HAS_BUTTONS = function () {-try {-return new MouseEvent('test', { buttons: 1 }).buttons === 1;-} catch (e) {-return false;-}-}();-var SUPPORTS_PASSIVE = false;-(function () {-try {-var opts = Object.defineProperty({}, 'passive', {-get: function () {-SUPPORTS_PASSIVE = true;-}-});-window.addEventListener('test', null, opts);-window.removeEventListener('test', null, opts);-} catch (e) {-}-}());-var IS_TOUCH_ONLY = navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/);-var mouseCanceller = function (mouseEvent) {-var sc = mouseEvent.sourceCapabilities;-if (sc && !sc.firesTouchEvents) {-return;-}-mouseEvent[HANDLED_OBJ] = { skip: true };-if (mouseEvent.type === 'click') {-var path = Polymer.dom(mouseEvent).path;-for (var i = 0; i < path.length; i++) {-if (path[i] === POINTERSTATE.mouse.target) {-return;-}-}-mouseEvent.preventDefault();-mouseEvent.stopPropagation();-}-};-function setupTeardownMouseCanceller(setup) {-var events = IS_TOUCH_ONLY ? ['click'] : MOUSE_EVENTS;-for (var i = 0, en; i < events.length; i++) {-en = events[i];-if (setup) {-document.addEventListener(en, mouseCanceller, true);-} else {-document.removeEventListener(en, mouseCanceller, true);-}-}-}-function ignoreMouse(ev) {-if (!POINTERSTATE.mouse.mouseIgnoreJob) {-setupTeardownMouseCanceller(true);-}-var unset = function () {-setupTeardownMouseCanceller();-POINTERSTATE.mouse.target = null;-POINTERSTATE.mouse.mouseIgnoreJob = null;-};-POINTERSTATE.mouse.target = Polymer.dom(ev).rootTarget;-POINTERSTATE.mouse.mouseIgnoreJob = Polymer.Debounce(POINTERSTATE.mouse.mouseIgnoreJob, unset, MOUSE_TIMEOUT);-}-function hasLeftMouseButton(ev) {-var type = ev.type;-if (MOUSE_EVENTS.indexOf(type) === -1) {-return false;-}-if (type === 'mousemove') {-var buttons = ev.buttons === undefined ? 1 : ev.buttons;-if (ev instanceof window.MouseEvent && !MOUSE_HAS_BUTTONS) {-buttons = MOUSE_WHICH_TO_BUTTONS[ev.which] || 0;-}-return Boolean(buttons & 1);-} else {-var button = ev.button === undefined ? 0 : ev.button;-return button === 0;-}-}-function isSyntheticClick(ev) {-if (ev.type === 'click') {-if (ev.detail === 0) {-return true;-}-var t = Gestures.findOriginalTarget(ev);-var bcr = t.getBoundingClientRect();-var x = ev.pageX, y = ev.pageY;-return !(x >= bcr.left && x <= bcr.right && (y >= bcr.top && y <= bcr.bottom));-}-return false;-}-var POINTERSTATE = {-mouse: {-target: null,-mouseIgnoreJob: null-},-touch: {-x: 0,-y: 0,-id: -1,-scrollDecided: false-}-};-function firstTouchAction(ev) {-var path = Polymer.dom(ev).path;-var ta = 'auto';-for (var i = 0, n; i < path.length; i++) {-n = path[i];-if (n[TOUCH_ACTION]) {-ta = n[TOUCH_ACTION];-break;-}-}-return ta;-}-function trackDocument(stateObj, movefn, upfn) {-stateObj.movefn = movefn;-stateObj.upfn = upfn;-document.addEventListener('mousemove', movefn);-document.addEventListener('mouseup', upfn);-}-function untrackDocument(stateObj) {-document.removeEventListener('mousemove', stateObj.movefn);-document.removeEventListener('mouseup', stateObj.upfn);-stateObj.movefn = null;-stateObj.upfn = null;-}-document.addEventListener('touchend', ignoreMouse, SUPPORTS_PASSIVE ? { passive: true } : false);-var Gestures = {-gestures: {},-recognizers: [],-deepTargetFind: function (x, y) {-var node = document.elementFromPoint(x, y);-var next = node;-while (next && next.shadowRoot) {-next = next.shadowRoot.elementFromPoint(x, y);-if (next) {-node = next;-}-}-return node;-},-findOriginalTarget: function (ev) {-if (ev.path) {-return ev.path[0];-}-return ev.target;-},-handleNative: function (ev) {-var handled;-var type = ev.type;-var node = wrap(ev.currentTarget);-var gobj = node[GESTURE_KEY];-if (!gobj) {-return;-}-var gs = gobj[type];-if (!gs) {-return;-}-if (!ev[HANDLED_OBJ]) {-ev[HANDLED_OBJ] = {};-if (type.slice(0, 5) === 'touch') {-var t = ev.changedTouches[0];-if (type === 'touchstart') {-if (ev.touches.length === 1) {-POINTERSTATE.touch.id = t.identifier;-}-}-if (POINTERSTATE.touch.id !== t.identifier) {-return;-}-if (!HAS_NATIVE_TA) {-if (type === 'touchstart' || type === 'touchmove') {-Gestures.handleTouchAction(ev);-}-}-}-}-handled = ev[HANDLED_OBJ];-if (handled.skip) {-return;-}-var recognizers = Gestures.recognizers;-for (var i = 0, r; i < recognizers.length; i++) {-r = recognizers[i];-if (gs[r.name] && !handled[r.name]) {-if (r.flow && r.flow.start.indexOf(ev.type) > -1 && r.reset) {-r.reset();-}-}-}-for (i = 0, r; i < recognizers.length; i++) {-r = recognizers[i];-if (gs[r.name] && !handled[r.name]) {-handled[r.name] = true;-r[type](ev);-}-}-},-handleTouchAction: function (ev) {-var t = ev.changedTouches[0];-var type = ev.type;-if (type === 'touchstart') {-POINTERSTATE.touch.x = t.clientX;-POINTERSTATE.touch.y = t.clientY;-POINTERSTATE.touch.scrollDecided = false;-} else if (type === 'touchmove') {-if (POINTERSTATE.touch.scrollDecided) {-return;-}-POINTERSTATE.touch.scrollDecided = true;-var ta = firstTouchAction(ev);-var prevent = false;-var dx = Math.abs(POINTERSTATE.touch.x - t.clientX);-var dy = Math.abs(POINTERSTATE.touch.y - t.clientY);-if (!ev.cancelable) {-} else if (ta === 'none') {-prevent = true;-} else if (ta === 'pan-x') {-prevent = dy > dx;-} else if (ta === 'pan-y') {-prevent = dx > dy;-}-if (prevent) {-ev.preventDefault();-} else {-Gestures.prevent('track');-}-}-},-add: function (node, evType, handler) {-node = wrap(node);-var recognizer = this.gestures[evType];-var deps = recognizer.deps;-var name = recognizer.name;-var gobj = node[GESTURE_KEY];-if (!gobj) {-node[GESTURE_KEY] = gobj = {};-}-for (var i = 0, dep, gd; i < deps.length; i++) {-dep = deps[i];-if (IS_TOUCH_ONLY && MOUSE_EVENTS.indexOf(dep) > -1 && dep !== 'click') {-continue;-}-gd = gobj[dep];-if (!gd) {-gobj[dep] = gd = { _count: 0 };-}-if (gd._count === 0) {-node.addEventListener(dep, this.handleNative);-}-gd[name] = (gd[name] || 0) + 1;-gd._count = (gd._count || 0) + 1;-}-node.addEventListener(evType, handler);-if (recognizer.touchAction) {-this.setTouchAction(node, recognizer.touchAction);-}-},-remove: function (node, evType, handler) {-node = wrap(node);-var recognizer = this.gestures[evType];-var deps = recognizer.deps;-var name = recognizer.name;-var gobj = node[GESTURE_KEY];-if (gobj) {-for (var i = 0, dep, gd; i < deps.length; i++) {-dep = deps[i];-gd = gobj[dep];-if (gd && gd[name]) {-gd[name] = (gd[name] || 1) - 1;-gd._count = (gd._count || 1) - 1;-if (gd._count === 0) {-node.removeEventListener(dep, this.handleNative);-}-}-}-}-node.removeEventListener(evType, handler);-},-register: function (recog) {-this.recognizers.push(recog);-for (var i = 0; i < recog.emits.length; i++) {-this.gestures[recog.emits[i]] = recog;-}-},-findRecognizerByEvent: function (evName) {-for (var i = 0, r; i < this.recognizers.length; i++) {-r = this.recognizers[i];-for (var j = 0, n; j < r.emits.length; j++) {-n = r.emits[j];-if (n === evName) {-return r;-}-}-}-return null;-},-setTouchAction: function (node, value) {-if (HAS_NATIVE_TA) {-node.style.touchAction = value;-}-node[TOUCH_ACTION] = value;-},-fire: function (target, type, detail) {-var ev = Polymer.Base.fire(type, detail, {-node: target,-bubbles: true,-cancelable: true-});-if (ev.defaultPrevented) {-var preventer = detail.preventer || detail.sourceEvent;-if (preventer && preventer.preventDefault) {-preventer.preventDefault();-}-}-},-prevent: function (evName) {-var recognizer = this.findRecognizerByEvent(evName);-if (recognizer.info) {-recognizer.info.prevent = true;-}-},-resetMouseCanceller: function () {-if (POINTERSTATE.mouse.mouseIgnoreJob) {-POINTERSTATE.mouse.mouseIgnoreJob.complete();-}-}-};-Gestures.register({-name: 'downup',-deps: [-'mousedown',-'touchstart',-'touchend'-],-flow: {-start: [-'mousedown',-'touchstart'-],-end: [-'mouseup',-'touchend'-]-},-emits: [-'down',-'up'-],-info: {-movefn: null,-upfn: null-},-reset: function () {-untrackDocument(this.info);-},-mousedown: function (e) {-if (!hasLeftMouseButton(e)) {-return;-}-var t = Gestures.findOriginalTarget(e);-var self = this;-var movefn = function movefn(e) {-if (!hasLeftMouseButton(e)) {-self.fire('up', t, e);-untrackDocument(self.info);-}-};-var upfn = function upfn(e) {-if (hasLeftMouseButton(e)) {-self.fire('up', t, e);-}-untrackDocument(self.info);-};-trackDocument(this.info, movefn, upfn);-this.fire('down', t, e);-},-touchstart: function (e) {-this.fire('down', Gestures.findOriginalTarget(e), e.changedTouches[0], e);-},-touchend: function (e) {-this.fire('up', Gestures.findOriginalTarget(e), e.changedTouches[0], e);-},-fire: function (type, target, event, preventer) {-Gestures.fire(target, type, {-x: event.clientX,-y: event.clientY,-sourceEvent: event,-preventer: preventer,-prevent: function (e) {-return Gestures.prevent(e);-}-});-}-});-Gestures.register({-name: 'track',-touchAction: 'none',-deps: [-'mousedown',-'touchstart',-'touchmove',-'touchend'-],-flow: {-start: [-'mousedown',-'touchstart'-],-end: [-'mouseup',-'touchend'-]-},-emits: ['track'],-info: {-x: 0,-y: 0,-state: 'start',-started: false,-moves: [],-addMove: function (move) {-if (this.moves.length > TRACK_LENGTH) {-this.moves.shift();-}-this.moves.push(move);-},-movefn: null,-upfn: null,-prevent: false-},-reset: function () {-this.info.state = 'start';-this.info.started = false;-this.info.moves = [];-this.info.x = 0;-this.info.y = 0;-this.info.prevent = false;-untrackDocument(this.info);-},-hasMovedEnough: function (x, y) {-if (this.info.prevent) {-return false;-}-if (this.info.started) {-return true;-}-var dx = Math.abs(this.info.x - x);-var dy = Math.abs(this.info.y - y);-return dx >= TRACK_DISTANCE || dy >= TRACK_DISTANCE;-},-mousedown: function (e) {-if (!hasLeftMouseButton(e)) {-return;-}-var t = Gestures.findOriginalTarget(e);-var self = this;-var movefn = function movefn(e) {-var x = e.clientX, y = e.clientY;-if (self.hasMovedEnough(x, y)) {-self.info.state = self.info.started ? e.type === 'mouseup' ? 'end' : 'track' : 'start';-if (self.info.state === 'start') {-Gestures.prevent('tap');-}-self.info.addMove({-x: x,-y: y-});-if (!hasLeftMouseButton(e)) {-self.info.state = 'end';-untrackDocument(self.info);-}-self.fire(t, e);-self.info.started = true;-}-};-var upfn = function upfn(e) {-if (self.info.started) {-movefn(e);-}-untrackDocument(self.info);-};-trackDocument(this.info, movefn, upfn);-this.info.x = e.clientX;-this.info.y = e.clientY;-},-touchstart: function (e) {-var ct = e.changedTouches[0];-this.info.x = ct.clientX;-this.info.y = ct.clientY;-},-touchmove: function (e) {-var t = Gestures.findOriginalTarget(e);-var ct = e.changedTouches[0];-var x = ct.clientX, y = ct.clientY;-if (this.hasMovedEnough(x, y)) {-if (this.info.state === 'start') {-Gestures.prevent('tap');-}-this.info.addMove({-x: x,-y: y-});-this.fire(t, ct);-this.info.state = 'track';-this.info.started = true;-}-},-touchend: function (e) {-var t = Gestures.findOriginalTarget(e);-var ct = e.changedTouches[0];-if (this.info.started) {-this.info.state = 'end';-this.info.addMove({-x: ct.clientX,-y: ct.clientY-});-this.fire(t, ct, e);-}-},-fire: function (target, touch, preventer) {-var secondlast = this.info.moves[this.info.moves.length - 2];-var lastmove = this.info.moves[this.info.moves.length - 1];-var dx = lastmove.x - this.info.x;-var dy = lastmove.y - this.info.y;-var ddx, ddy = 0;-if (secondlast) {-ddx = lastmove.x - secondlast.x;-ddy = lastmove.y - secondlast.y;-}-return Gestures.fire(target, 'track', {-state: this.info.state,-x: touch.clientX,-y: touch.clientY,-dx: dx,-dy: dy,-ddx: ddx,-ddy: ddy,-sourceEvent: touch,-preventer: preventer,-hover: function () {-return Gestures.deepTargetFind(touch.clientX, touch.clientY);-}-});-}-});-Gestures.register({-name: 'tap',-deps: [-'mousedown',-'click',-'touchstart',-'touchend'-],-flow: {-start: [-'mousedown',-'touchstart'-],-end: [-'click',-'touchend'-]-},-emits: ['tap'],-info: {-x: NaN,-y: NaN,-prevent: false-},-reset: function () {-this.info.x = NaN;-this.info.y = NaN;-this.info.prevent = false;-},-save: function (e) {-this.info.x = e.clientX;-this.info.y = e.clientY;-},-mousedown: function (e) {-if (hasLeftMouseButton(e)) {-this.save(e);-}-},-click: function (e) {-if (hasLeftMouseButton(e)) {-this.forward(e);-}-},-touchstart: function (e) {-this.save(e.changedTouches[0], e);-},-touchend: function (e) {-this.forward(e.changedTouches[0], e);-},-forward: function (e, preventer) {-var dx = Math.abs(e.clientX - this.info.x);-var dy = Math.abs(e.clientY - this.info.y);-var t = Gestures.findOriginalTarget(e);-if (isNaN(dx) || isNaN(dy) || dx <= TAP_DISTANCE && dy <= TAP_DISTANCE || isSyntheticClick(e)) {-if (!this.info.prevent) {-Gestures.fire(t, 'tap', {-x: e.clientX,-y: e.clientY,-sourceEvent: e,-preventer: preventer-});-}-}-}-});-var DIRECTION_MAP = {-x: 'pan-x',-y: 'pan-y',-none: 'none',-all: 'auto'-};-Polymer.Base._addFeature({-_setupGestures: function () {-this.__polymerGestures = null;-},-_listen: function (node, eventName, handler) {-if (Gestures.gestures[eventName]) {-Gestures.add(node, eventName, handler);-} else {-node.addEventListener(eventName, handler);-}-},-_unlisten: function (node, eventName, handler) {-if (Gestures.gestures[eventName]) {-Gestures.remove(node, eventName, handler);-} else {-node.removeEventListener(eventName, handler);-}-},-setScrollDirection: function (direction, node) {-node = node || this;-Gestures.setTouchAction(node, DIRECTION_MAP[direction] || 'auto');-}-});-Polymer.Gestures = Gestures;-}());(function () {-'use strict';-Polymer.Base._addFeature({-$$: function (slctr) {-return Polymer.dom(this.root).querySelector(slctr);-},-toggleClass: function (name, bool, node) {-node = node || this;-if (arguments.length == 1) {-bool = !node.classList.contains(name);-}-if (bool) {-Polymer.dom(node).classList.add(name);-} else {-Polymer.dom(node).classList.remove(name);-}-},-toggleAttribute: function (name, bool, node) {-node = node || this;-if (arguments.length == 1) {-bool = !node.hasAttribute(name);-}-if (bool) {-Polymer.dom(node).setAttribute(name, '');-} else {-Polymer.dom(node).removeAttribute(name);-}-},-classFollows: function (name, toElement, fromElement) {-if (fromElement) {-Polymer.dom(fromElement).classList.remove(name);-}-if (toElement) {-Polymer.dom(toElement).classList.add(name);-}-},-attributeFollows: function (name, toElement, fromElement) {-if (fromElement) {-Polymer.dom(fromElement).removeAttribute(name);-}-if (toElement) {-Polymer.dom(toElement).setAttribute(name, '');-}-},-getEffectiveChildNodes: function () {-return Polymer.dom(this).getEffectiveChildNodes();-},-getEffectiveChildren: function () {-var list = Polymer.dom(this).getEffectiveChildNodes();-return list.filter(function (n) {-return n.nodeType === Node.ELEMENT_NODE;-});-},-getEffectiveTextContent: function () {-var cn = this.getEffectiveChildNodes();-var tc = [];-for (var i = 0, c; c = cn[i]; i++) {-if (c.nodeType !== Node.COMMENT_NODE) {-tc.push(Polymer.dom(c).textContent);-}-}-return tc.join('');-},-queryEffectiveChildren: function (slctr) {-var e$ = Polymer.dom(this).queryDistributedElements(slctr);-return e$ && e$[0];-},-queryAllEffectiveChildren: function (slctr) {-return Polymer.dom(this).queryDistributedElements(slctr);-},-getContentChildNodes: function (slctr) {-var content = Polymer.dom(this.root).querySelector(slctr || 'content');-return content ? Polymer.dom(content).getDistributedNodes() : [];-},-getContentChildren: function (slctr) {-return this.getContentChildNodes(slctr).filter(function (n) {-return n.nodeType === Node.ELEMENT_NODE;-});-},-fire: function (type, detail, options) {-options = options || Polymer.nob;-var node = options.node || this;-detail = detail === null || detail === undefined ? {} : detail;-var bubbles = options.bubbles === undefined ? true : options.bubbles;-var cancelable = Boolean(options.cancelable);-var useCache = options._useCache;-var event = this._getEvent(type, bubbles, cancelable, useCache);-event.detail = detail;-if (useCache) {-this.__eventCache[type] = null;-}-node.dispatchEvent(event);-if (useCache) {-this.__eventCache[type] = event;-}-return event;-},-__eventCache: {},-_getEvent: function (type, bubbles, cancelable, useCache) {-var event = useCache && this.__eventCache[type];-if (!event || (event.bubbles != bubbles || event.cancelable != cancelable)) {-event = new Event(type, {-bubbles: Boolean(bubbles),-cancelable: cancelable-});-}-return event;-},-async: function (callback, waitTime) {-var self = this;-return Polymer.Async.run(function () {-callback.call(self);-}, waitTime);-},-cancelAsync: function (handle) {-Polymer.Async.cancel(handle);-},-arrayDelete: function (path, item) {-var index;-if (Array.isArray(path)) {-index = path.indexOf(item);-if (index >= 0) {-return path.splice(index, 1);-}-} else {-var arr = this._get(path);-index = arr.indexOf(item);-if (index >= 0) {-return this.splice(path, index, 1);-}-}-},-transform: function (transform, node) {-node = node || this;-node.style.webkitTransform = transform;-node.style.transform = transform;-},-translate3d: function (x, y, z, node) {-node = node || this;-this.transform('translate3d(' + x + ',' + y + ',' + z + ')', node);-},-importHref: function (href, onload, onerror, optAsync) {-var link = document.createElement('link');-link.rel = 'import';-link.href = href;-var list = Polymer.Base.importHref.imported = Polymer.Base.importHref.imported || {};-var cached = list[link.href];-var imprt = cached || link;-var self = this;-var loadListener = function (e) {-e.target.__firedLoad = true;-e.target.removeEventListener('load', loadListener);-e.target.removeEventListener('error', errorListener);-return onload.call(self, e);-};-var errorListener = function (e) {-e.target.__firedError = true;-e.target.removeEventListener('load', loadListener);-e.target.removeEventListener('error', errorListener);-return onerror.call(self, e);-};-if (onload) {-imprt.addEventListener('load', loadListener);-}-if (onerror) {-imprt.addEventListener('error', errorListener);-}-if (cached) {-if (cached.__firedLoad) {-cached.dispatchEvent(new Event('load'));-}-if (cached.__firedError) {-cached.dispatchEvent(new Event('error'));-}-} else {-list[link.href] = link;-optAsync = Boolean(optAsync);-if (optAsync) {-link.setAttribute('async', '');-}-document.head.appendChild(link);-}-return imprt;-},-create: function (tag, props) {-var elt = document.createElement(tag);-if (props) {-for (var n in props) {-elt[n] = props[n];-}-}-return elt;-},-isLightDescendant: function (node) {-return this !== node && this.contains(node) && Polymer.dom(this).getOwnerRoot() === Polymer.dom(node).getOwnerRoot();-},-isLocalDescendant: function (node) {-return this.root === Polymer.dom(node).getOwnerRoot();-}-});-if (!Polymer.Settings.useNativeCustomElements) {-var importHref = Polymer.Base.importHref;-Polymer.Base.importHref = function (href, onload, onerror, optAsync) {-CustomElements.ready = false;-var loadFn = function (e) {-CustomElements.upgradeDocumentTree(document);-CustomElements.ready = true;-if (onload) {-return onload.call(this, e);-}-};-return importHref.call(this, href, loadFn, onerror, optAsync);-};-}-}());Polymer.Bind = {-prepareModel: function (model) {-Polymer.Base.mixin(model, this._modelApi);-},-_modelApi: {-_notifyChange: function (source, event, value) {-value = value === undefined ? this[source] : value;-event = event || Polymer.CaseMap.camelToDashCase(source) + '-changed';-this.fire(event, { value: value }, {-bubbles: false,-cancelable: false,-_useCache: Polymer.Settings.eventDataCache || !Polymer.Settings.isIE-});-},-_propertySetter: function (property, value, effects, fromAbove) {-var old = this.__data__[property];-if (old !== value && (old === old || value === value)) {-this.__data__[property] = value;-if (typeof value == 'object') {-this._clearPath(property);-}-if (this._propertyChanged) {-this._propertyChanged(property, value, old);-}-if (effects) {-this._effectEffects(property, value, effects, old, fromAbove);-}-}-return old;-},-__setProperty: function (property, value, quiet, node) {-node = node || this;-var effects = node._propertyEffects && node._propertyEffects[property];-if (effects) {-node._propertySetter(property, value, effects, quiet);-} else if (node[property] !== value) {-node[property] = value;-}-},-_effectEffects: function (property, value, effects, old, fromAbove) {-for (var i = 0, l = effects.length, fx; i < l && (fx = effects[i]); i++) {-fx.fn.call(this, property, this[property], fx.effect, old, fromAbove);-}-},-_clearPath: function (path) {-for (var prop in this.__data__) {-if (Polymer.Path.isDescendant(path, prop)) {-this.__data__[prop] = undefined;-}-}-}-},-ensurePropertyEffects: function (model, property) {-if (!model._propertyEffects) {-model._propertyEffects = {};-}-var fx = model._propertyEffects[property];-if (!fx) {-fx = model._propertyEffects[property] = [];-}-return fx;-},-addPropertyEffect: function (model, property, kind, effect) {-var fx = this.ensurePropertyEffects(model, property);-var propEffect = {-kind: kind,-effect: effect,-fn: Polymer.Bind['_' + kind + 'Effect']-};-fx.push(propEffect);-return propEffect;-},-createBindings: function (model) {-var fx$ = model._propertyEffects;-if (fx$) {-for (var n in fx$) {-var fx = fx$[n];-fx.sort(this._sortPropertyEffects);-this._createAccessors(model, n, fx);-}-}-},-_sortPropertyEffects: function () {-var EFFECT_ORDER = {-'compute': 0,-'annotation': 1,-'annotatedComputation': 2,-'reflect': 3,-'notify': 4,-'observer': 5,-'complexObserver': 6,-'function': 7-};-return function (a, b) {-return EFFECT_ORDER[a.kind] - EFFECT_ORDER[b.kind];-};-}(),-_createAccessors: function (model, property, effects) {-var defun = {-get: function () {-return this.__data__[property];-}-};-var setter = function (value) {-this._propertySetter(property, value, effects);-};-var info = model.getPropertyInfo && model.getPropertyInfo(property);-if (info && info.readOnly) {-if (!info.computed) {-model['_set' + this.upper(property)] = setter;-}-} else {-defun.set = setter;-}-Object.defineProperty(model, property, defun);-},-upper: function (name) {-return name[0].toUpperCase() + name.substring(1);-},-_addAnnotatedListener: function (model, index, property, path, event, negated) {-if (!model._bindListeners) {-model._bindListeners = [];-}-var fn = this._notedListenerFactory(property, path, Polymer.Path.isDeep(path), negated);-var eventName = event || Polymer.CaseMap.camelToDashCase(property) + '-changed';-model._bindListeners.push({-index: index,-property: property,-path: path,-changedFn: fn,-event: eventName-});-},-_isEventBogus: function (e, target) {-return e.path && e.path[0] !== target;-},-_notedListenerFactory: function (property, path, isStructured, negated) {-return function (target, value, targetPath) {-if (targetPath) {-var newPath = Polymer.Path.translate(property, path, targetPath);-this._notifyPath(newPath, value);-} else {-value = target[property];-if (negated) {-value = !value;-}-if (!isStructured) {-this[path] = value;-} else {-if (this.__data__[path] != value) {-this.set(path, value);-}-}-}-};-},-prepareInstance: function (inst) {-inst.__data__ = Object.create(null);-},-setupBindListeners: function (inst) {-var b$ = inst._bindListeners;-for (var i = 0, l = b$.length, info; i < l && (info = b$[i]); i++) {-var node = inst._nodes[info.index];-this._addNotifyListener(node, inst, info.event, info.changedFn);-}-},-_addNotifyListener: function (element, context, event, changedFn) {-element.addEventListener(event, function (e) {-return context._notifyListener(changedFn, e);-});-}-};Polymer.Base.mixin(Polymer.Bind, {-_shouldAddListener: function (effect) {-return effect.name && effect.kind != 'attribute' && effect.kind != 'text' && !effect.isCompound && effect.parts[0].mode === '{';-},-_annotationEffect: function (source, value, effect) {-if (source != effect.value) {-value = this._get(effect.value);-this.__data__[effect.value] = value;-}-this._applyEffectValue(effect, value);-},-_reflectEffect: function (source, value, effect) {-this.reflectPropertyToAttribute(source, effect.attribute, value);-},-_notifyEffect: function (source, value, effect, old, fromAbove) {-if (!fromAbove) {-this._notifyChange(source, effect.event, value);-}-},-_functionEffect: function (source, value, fn, old, fromAbove) {-fn.call(this, source, value, old, fromAbove);-},-_observerEffect: function (source, value, effect, old) {-var fn = this[effect.method];-if (fn) {-fn.call(this, value, old);-} else {-this._warn(this._logf('_observerEffect', 'observer method `' + effect.method + '` not defined'));-}-},-_complexObserverEffect: function (source, value, effect) {-var fn = this[effect.method];-if (fn) {-var args = Polymer.Bind._marshalArgs(this.__data__, effect, source, value);-if (args) {-fn.apply(this, args);-}-} else if (effect.dynamicFn) {-} else {-this._warn(this._logf('_complexObserverEffect', 'observer method `' + effect.method + '` not defined'));-}-},-_computeEffect: function (source, value, effect) {-var fn = this[effect.method];-if (fn) {-var args = Polymer.Bind._marshalArgs(this.__data__, effect, source, value);-if (args) {-var computedvalue = fn.apply(this, args);-this.__setProperty(effect.name, computedvalue);-}-} else if (effect.dynamicFn) {-} else {-this._warn(this._logf('_computeEffect', 'compute method `' + effect.method + '` not defined'));-}-},-_annotatedComputationEffect: function (source, value, effect) {-var computedHost = this._rootDataHost || this;-var fn = computedHost[effect.method];-if (fn) {-var args = Polymer.Bind._marshalArgs(this.__data__, effect, source, value);-if (args) {-var computedvalue = fn.apply(computedHost, args);-this._applyEffectValue(effect, computedvalue);-}-} else if (effect.dynamicFn) {-} else {-computedHost._warn(computedHost._logf('_annotatedComputationEffect', 'compute method `' + effect.method + '` not defined'));-}-},-_marshalArgs: function (model, effect, path, value) {-var values = [];-var args = effect.args;-var bailoutEarly = args.length > 1 || effect.dynamicFn;-for (var i = 0, l = args.length; i < l; i++) {-var arg = args[i];-var name = arg.name;-var v;-if (arg.literal) {-v = arg.value;-} else if (path === name) {-v = value;-} else {-v = model[name];-if (v === undefined && arg.structured) {-v = Polymer.Base._get(name, model);-}-}-if (bailoutEarly && v === undefined) {-return;-}-if (arg.wildcard) {-var matches = Polymer.Path.isAncestor(path, name);-values[i] = {-path: matches ? path : name,-value: matches ? value : v,-base: v-};-} else {-values[i] = v;-}-}-return values;-}-});Polymer.Base._addFeature({-_addPropertyEffect: function (property, kind, effect) {-var prop = Polymer.Bind.addPropertyEffect(this, property, kind, effect);-prop.pathFn = this['_' + prop.kind + 'PathEffect'];-},-_prepEffects: function () {-Polymer.Bind.prepareModel(this);-this._addAnnotationEffects(this._notes);-},-_prepBindings: function () {-Polymer.Bind.createBindings(this);-},-_addPropertyEffects: function (properties) {-if (properties) {-for (var p in properties) {-var prop = properties[p];-if (prop.observer) {-this._addObserverEffect(p, prop.observer);-}-if (prop.computed) {-prop.readOnly = true;-this._addComputedEffect(p, prop.computed);-}-if (prop.notify) {-this._addPropertyEffect(p, 'notify', { event: Polymer.CaseMap.camelToDashCase(p) + '-changed' });-}-if (prop.reflectToAttribute) {-var attr = Polymer.CaseMap.camelToDashCase(p);-if (attr[0] === '-') {-this._warn(this._logf('_addPropertyEffects', 'Property ' + p + ' cannot be reflected to attribute ' + attr + ' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'));-} else {-this._addPropertyEffect(p, 'reflect', { attribute: attr });-}-}-if (prop.readOnly) {-Polymer.Bind.ensurePropertyEffects(this, p);-}-}-}-},-_addComputedEffect: function (name, expression) {-var sig = this._parseMethod(expression);-var dynamicFn = sig.dynamicFn;-for (var i = 0, arg; i < sig.args.length && (arg = sig.args[i]); i++) {-this._addPropertyEffect(arg.model, 'compute', {-method: sig.method,-args: sig.args,-trigger: arg,-name: name,-dynamicFn: dynamicFn-});-}-if (dynamicFn) {-this._addPropertyEffect(sig.method, 'compute', {-method: sig.method,-args: sig.args,-trigger: null,-name: name,-dynamicFn: dynamicFn-});-}-},-_addObserverEffect: function (property, observer) {-this._addPropertyEffect(property, 'observer', {-method: observer,-property: property-});-},-_addComplexObserverEffects: function (observers) {-if (observers) {-for (var i = 0, o; i < observers.length && (o = observers[i]); i++) {-this._addComplexObserverEffect(o);-}-}-},-_addComplexObserverEffect: function (observer) {-var sig = this._parseMethod(observer);-if (!sig) {-throw new Error('Malformed observer expression \'' + observer + '\'');-}-var dynamicFn = sig.dynamicFn;-for (var i = 0, arg; i < sig.args.length && (arg = sig.args[i]); i++) {-this._addPropertyEffect(arg.model, 'complexObserver', {-method: sig.method,-args: sig.args,-trigger: arg,-dynamicFn: dynamicFn-});-}-if (dynamicFn) {-this._addPropertyEffect(sig.method, 'complexObserver', {-method: sig.method,-args: sig.args,-trigger: null,-dynamicFn: dynamicFn-});-}-},-_addAnnotationEffects: function (notes) {-for (var i = 0, note; i < notes.length && (note = notes[i]); i++) {-var b$ = note.bindings;-for (var j = 0, binding; j < b$.length && (binding = b$[j]); j++) {-this._addAnnotationEffect(binding, i);-}-}-},-_addAnnotationEffect: function (note, index) {-if (Polymer.Bind._shouldAddListener(note)) {-Polymer.Bind._addAnnotatedListener(this, index, note.name, note.parts[0].value, note.parts[0].event, note.parts[0].negate);-}-for (var i = 0; i < note.parts.length; i++) {-var part = note.parts[i];-if (part.signature) {-this._addAnnotatedComputationEffect(note, part, index);-} else if (!part.literal) {-if (note.kind === 'attribute' && note.name[0] === '-') {-this._warn(this._logf('_addAnnotationEffect', 'Cannot set attribute ' + note.name + ' because "-" is not a valid attribute starting character'));-} else {-this._addPropertyEffect(part.model, 'annotation', {-kind: note.kind,-index: index,-name: note.name,-propertyName: note.propertyName,-value: part.value,-isCompound: note.isCompound,-compoundIndex: part.compoundIndex,-event: part.event,-customEvent: part.customEvent,-negate: part.negate-});-}-}-}-},-_addAnnotatedComputationEffect: function (note, part, index) {-var sig = part.signature;-if (sig.static) {-this.__addAnnotatedComputationEffect('__static__', index, note, part, null);-} else {-for (var i = 0, arg; i < sig.args.length && (arg = sig.args[i]); i++) {-if (!arg.literal) {-this.__addAnnotatedComputationEffect(arg.model, index, note, part, arg);-}-}-if (sig.dynamicFn) {-this.__addAnnotatedComputationEffect(sig.method, index, note, part, null);-}-}-},-__addAnnotatedComputationEffect: function (property, index, note, part, trigger) {-this._addPropertyEffect(property, 'annotatedComputation', {-index: index,-isCompound: note.isCompound,-compoundIndex: part.compoundIndex,-kind: note.kind,-name: note.name,-negate: part.negate,-method: part.signature.method,-args: part.signature.args,-trigger: trigger,-dynamicFn: part.signature.dynamicFn-});-},-_parseMethod: function (expression) {-var m = expression.match(/([^\s]+?)\(([\s\S]*)\)/);-if (m) {-var sig = {-method: m[1],-static: true-};-if (this.getPropertyInfo(sig.method) !== Polymer.nob) {-sig.static = false;-sig.dynamicFn = true;-}-if (m[2].trim()) {-var args = m[2].replace(/\\,/g, ',').split(',');-return this._parseArgs(args, sig);-} else {-sig.args = Polymer.nar;-return sig;-}-}-},-_parseArgs: function (argList, sig) {-sig.args = argList.map(function (rawArg) {-var arg = this._parseArg(rawArg);-if (!arg.literal) {-sig.static = false;-}-return arg;-}, this);-return sig;-},-_parseArg: function (rawArg) {-var arg = rawArg.trim().replace(/,/g, ',').replace(/\\(.)/g, '$1');-var a = { name: arg };-var fc = arg[0];-if (fc === '-') {-fc = arg[1];-}-if (fc >= '0' && fc <= '9') {-fc = '#';-}-switch (fc) {-case '\'':-case '"':-a.value = arg.slice(1, -1);-a.literal = true;-break;-case '#':-a.value = Number(arg);-a.literal = true;-break;-}-if (!a.literal) {-a.model = Polymer.Path.root(arg);-a.structured = Polymer.Path.isDeep(arg);-if (a.structured) {-a.wildcard = arg.slice(-2) == '.*';-if (a.wildcard) {-a.name = arg.slice(0, -2);-}-}-}-return a;-},-_marshalInstanceEffects: function () {-Polymer.Bind.prepareInstance(this);-if (this._bindListeners) {-Polymer.Bind.setupBindListeners(this);-}-},-_applyEffectValue: function (info, value) {-var node = this._nodes[info.index];-var property = info.name;-value = this._computeFinalAnnotationValue(node, property, value, info);-if (info.kind == 'attribute') {-this.serializeValueToAttribute(value, property, node);-} else {-var pinfo = node._propertyInfo && node._propertyInfo[property];-if (pinfo && pinfo.readOnly) {-return;-}-this.__setProperty(property, value, Polymer.Settings.suppressBindingNotifications, node);-}-},-_computeFinalAnnotationValue: function (node, property, value, info) {-if (info.negate) {-value = !value;-}-if (info.isCompound) {-var storage = node.__compoundStorage__[property];-storage[info.compoundIndex] = value;-value = storage.join('');-}-if (info.kind !== 'attribute') {-if (property === 'className') {-value = this._scopeElementClass(node, value);-}-if (property === 'textContent' || node.localName == 'input' && property == 'value') {-value = value == undefined ? '' : value;-}-}-return value;-},-_executeStaticEffects: function () {-if (this._propertyEffects && this._propertyEffects.__static__) {-this._effectEffects('__static__', null, this._propertyEffects.__static__);-}-}-});(function () {-var usePolyfillProto = Polymer.Settings.usePolyfillProto;-var avoidInstanceProperties = Boolean(Object.getOwnPropertyDescriptor(document.documentElement, 'properties'));-Polymer.Base._addFeature({-_setupConfigure: function (initialConfig) {-this._config = {};-this._handlers = [];-this._aboveConfig = null;-if (initialConfig) {-for (var i in initialConfig) {-if (initialConfig[i] !== undefined) {-this._config[i] = initialConfig[i];-}-}-}-},-_marshalAttributes: function () {-this._takeAttributesToModel(this._config);-},-_attributeChangedImpl: function (name) {-var model = this._clientsReadied ? this : this._config;-this._setAttributeToProperty(model, name);-},-_configValue: function (name, value) {-var info = this._propertyInfo[name];-if (!info || !info.readOnly) {-this._config[name] = value;-}-},-_beforeClientsReady: function () {-this._configure();-},-_configure: function () {-this._configureAnnotationReferences();-this._configureInstanceProperties();-this._aboveConfig = this.mixin({}, this._config);-var config = {};-for (var i = 0; i < this.behaviors.length; i++) {-this._configureProperties(this.behaviors[i].properties, config);-}-this._configureProperties(avoidInstanceProperties ? this.__proto__.properties : this.properties, config);-this.mixin(config, this._aboveConfig);-this._config = config;-if (this._clients && this._clients.length) {-this._distributeConfig(this._config);-}-},-_configureInstanceProperties: function () {-for (var i in this._propertyEffects) {-if (!usePolyfillProto && this.hasOwnProperty(i)) {-this._configValue(i, this[i]);-delete this[i];-}-}-},-_configureProperties: function (properties, config) {-for (var i in properties) {-var c = properties[i];-if (c.value !== undefined) {-var value = c.value;-if (typeof value == 'function') {-value = value.call(this, this._config);-}-config[i] = value;-}-}-},-_distributeConfig: function (config) {-var fx$ = this._propertyEffects;-if (fx$) {-for (var p in config) {-var fx = fx$[p];-if (fx) {-for (var i = 0, l = fx.length, x; i < l && (x = fx[i]); i++) {-if (x.kind === 'annotation') {-var node = this._nodes[x.effect.index];-var name = x.effect.propertyName;-var isAttr = x.effect.kind == 'attribute';-var hasEffect = node._propertyEffects && node._propertyEffects[name];-if (node._configValue && (hasEffect || !isAttr)) {-var value = p === x.effect.value ? config[p] : this._get(x.effect.value, config);-value = this._computeFinalAnnotationValue(node, name, value, x.effect);-if (isAttr) {-value = node.deserialize(this.serialize(value), node._propertyInfo[name].type);-}-node._configValue(name, value);-}-}-}-}-}-}-},-_afterClientsReady: function () {-this.importPath = this._importPath;-this.rootPath = Polymer.rootPath;-this._executeStaticEffects();-this._applyConfig(this._config, this._aboveConfig);-this._flushHandlers();-},-_applyConfig: function (config, aboveConfig) {-for (var n in config) {-if (this[n] === undefined) {-this.__setProperty(n, config[n], n in aboveConfig);-}-}-},-_notifyListener: function (fn, e) {-if (!Polymer.Bind._isEventBogus(e, e.target)) {-var value, path;-if (e.detail) {-value = e.detail.value;-path = e.detail.path;-}-if (!this._clientsReadied) {-this._queueHandler([-fn,-e.target,-value,-path-]);-} else {-return fn.call(this, e.target, value, path);-}-}-},-_queueHandler: function (args) {-this._handlers.push(args);-},-_flushHandlers: function () {-var h$ = this._handlers;-for (var i = 0, l = h$.length, h; i < l && (h = h$[i]); i++) {-h[0].call(this, h[1], h[2], h[3]);-}-this._handlers = [];-}-});-}());(function () {-'use strict';-var Path = Polymer.Path;-Polymer.Base._addFeature({-notifyPath: function (path, value, fromAbove) {-var info = {};-var v = this._get(path, this, info);-if (arguments.length === 1) {-value = v;-}-if (info.path) {-this._notifyPath(info.path, value, fromAbove);-}-},-_notifyPath: function (path, value, fromAbove) {-var old = this._propertySetter(path, value);-if (old !== value && (old === old || value === value)) {-this._pathEffector(path, value);-if (!fromAbove) {-this._notifyPathUp(path, value);-}-return true;-}-},-_getPathParts: function (path) {-if (Array.isArray(path)) {-var parts = [];-for (var i = 0; i < path.length; i++) {-var args = path[i].toString().split('.');-for (var j = 0; j < args.length; j++) {-parts.push(args[j]);-}-}-return parts;-} else {-return path.toString().split('.');-}-},-set: function (path, value, root) {-var prop = root || this;-var parts = this._getPathParts(path);-var array;-var last = parts[parts.length - 1];-if (parts.length > 1) {-for (var i = 0; i < parts.length - 1; i++) {-var part = parts[i];-if (array && part[0] == '#') {-prop = Polymer.Collection.get(array).getItem(part);-} else {-prop = prop[part];-if (array && parseInt(part, 10) == part) {-parts[i] = Polymer.Collection.get(array).getKey(prop);-}-}-if (!prop) {-return;-}-array = Array.isArray(prop) ? prop : null;-}-if (array) {-var coll = Polymer.Collection.get(array);-var old, key;-if (last[0] == '#') {-key = last;-old = coll.getItem(key);-last = array.indexOf(old);-coll.setItem(key, value);-} else if (parseInt(last, 10) == last) {-old = prop[last];-key = coll.getKey(old);-parts[i] = key;-coll.setItem(key, value);-}-}-prop[last] = value;-if (!root) {-this._notifyPath(parts.join('.'), value);-}-} else {-prop[path] = value;-}-},-get: function (path, root) {-return this._get(path, root);-},-_get: function (path, root, info) {-var prop = root || this;-var parts = this._getPathParts(path);-var array;-for (var i = 0; i < parts.length; i++) {-if (!prop) {-return;-}-var part = parts[i];-if (array && part[0] == '#') {-prop = Polymer.Collection.get(array).getItem(part);-} else {-prop = prop[part];-if (info && array && parseInt(part, 10) == part) {-parts[i] = Polymer.Collection.get(array).getKey(prop);-}-}-array = Array.isArray(prop) ? prop : null;-}-if (info) {-info.path = parts.join('.');-}-return prop;-},-_pathEffector: function (path, value) {-var model = Path.root(path);-var fx$ = this._propertyEffects && this._propertyEffects[model];-if (fx$) {-for (var i = 0, fx; i < fx$.length && (fx = fx$[i]); i++) {-var fxFn = fx.pathFn;-if (fxFn) {-fxFn.call(this, path, value, fx.effect);-}-}-}-if (this._boundPaths) {-this._notifyBoundPaths(path, value);-}-},-_annotationPathEffect: function (path, value, effect) {-if (Path.matches(effect.value, false, path)) {-Polymer.Bind._annotationEffect.call(this, path, value, effect);-} else if (!effect.negate && Path.isDescendant(effect.value, path)) {-var node = this._nodes[effect.index];-if (node && node._notifyPath) {-var newPath = Path.translate(effect.value, effect.name, path);-node._notifyPath(newPath, value, true);-}-}-},-_complexObserverPathEffect: function (path, value, effect) {-if (Path.matches(effect.trigger.name, effect.trigger.wildcard, path)) {-Polymer.Bind._complexObserverEffect.call(this, path, value, effect);-}-},-_computePathEffect: function (path, value, effect) {-if (Path.matches(effect.trigger.name, effect.trigger.wildcard, path)) {-Polymer.Bind._computeEffect.call(this, path, value, effect);-}-},-_annotatedComputationPathEffect: function (path, value, effect) {-if (Path.matches(effect.trigger.name, effect.trigger.wildcard, path)) {-Polymer.Bind._annotatedComputationEffect.call(this, path, value, effect);-}-},-linkPaths: function (to, from) {-this._boundPaths = this._boundPaths || {};-if (from) {-this._boundPaths[to] = from;-} else {-this.unlinkPaths(to);-}-},-unlinkPaths: function (path) {-if (this._boundPaths) {-delete this._boundPaths[path];-}-},-_notifyBoundPaths: function (path, value) {-for (var a in this._boundPaths) {-var b = this._boundPaths[a];-if (Path.isDescendant(a, path)) {-this._notifyPath(Path.translate(a, b, path), value);-} else if (Path.isDescendant(b, path)) {-this._notifyPath(Path.translate(b, a, path), value);-}-}-},-_notifyPathUp: function (path, value) {-var rootName = Path.root(path);-var dashCaseName = Polymer.CaseMap.camelToDashCase(rootName);-var eventName = dashCaseName + this._EVENT_CHANGED;-this.fire(eventName, {-path: path,-value: value-}, {-bubbles: false,-_useCache: Polymer.Settings.eventDataCache || !Polymer.Settings.isIE-});-},-_EVENT_CHANGED: '-changed',-notifySplices: function (path, splices) {-var info = {};-var array = this._get(path, this, info);-this._notifySplices(array, info.path, splices);-},-_notifySplices: function (array, path, splices) {-var change = {-keySplices: Polymer.Collection.applySplices(array, splices),-indexSplices: splices-};-var splicesPath = path + '.splices';-this._notifyPath(splicesPath, change);-this._notifyPath(path + '.length', array.length);-this.__data__[splicesPath] = {-keySplices: null,-indexSplices: null-};-},-_notifySplice: function (array, path, index, added, removed) {-this._notifySplices(array, path, [{-index: index,-addedCount: added,-removed: removed,-object: array,-type: 'splice'-}]);-},-push: function (path) {-var info = {};-var array = this._get(path, this, info);-var args = Array.prototype.slice.call(arguments, 1);-var len = array.length;-var ret = array.push.apply(array, args);-if (args.length) {-this._notifySplice(array, info.path, len, args.length, []);-}-return ret;-},-pop: function (path) {-var info = {};-var array = this._get(path, this, info);-var hadLength = Boolean(array.length);-var args = Array.prototype.slice.call(arguments, 1);-var ret = array.pop.apply(array, args);-if (hadLength) {-this._notifySplice(array, info.path, array.length, 0, [ret]);-}-return ret;-},-splice: function (path, start) {-var info = {};-var array = this._get(path, this, info);-if (start < 0) {-start = array.length - Math.floor(-start);-} else {-start = Math.floor(start);-}-if (!start) {-start = 0;-}-var args = Array.prototype.slice.call(arguments, 1);-var ret = array.splice.apply(array, args);-var addedCount = Math.max(args.length - 2, 0);-if (addedCount || ret.length) {-this._notifySplice(array, info.path, start, addedCount, ret);-}-return ret;-},-shift: function (path) {-var info = {};-var array = this._get(path, this, info);-var hadLength = Boolean(array.length);-var args = Array.prototype.slice.call(arguments, 1);-var ret = array.shift.apply(array, args);-if (hadLength) {-this._notifySplice(array, info.path, 0, 0, [ret]);-}-return ret;-},-unshift: function (path) {-var info = {};-var array = this._get(path, this, info);-var args = Array.prototype.slice.call(arguments, 1);-var ret = array.unshift.apply(array, args);-if (args.length) {-this._notifySplice(array, info.path, 0, args.length, []);-}-return ret;-},-prepareModelNotifyPath: function (model) {-this.mixin(model, {-fire: Polymer.Base.fire,-_getEvent: Polymer.Base._getEvent,-__eventCache: Polymer.Base.__eventCache,-notifyPath: Polymer.Base.notifyPath,-_get: Polymer.Base._get,-_EVENT_CHANGED: Polymer.Base._EVENT_CHANGED,-_notifyPath: Polymer.Base._notifyPath,-_notifyPathUp: Polymer.Base._notifyPathUp,-_pathEffector: Polymer.Base._pathEffector,-_annotationPathEffect: Polymer.Base._annotationPathEffect,-_complexObserverPathEffect: Polymer.Base._complexObserverPathEffect,-_annotatedComputationPathEffect: Polymer.Base._annotatedComputationPathEffect,-_computePathEffect: Polymer.Base._computePathEffect,-_notifyBoundPaths: Polymer.Base._notifyBoundPaths,-_getPathParts: Polymer.Base._getPathParts-});-}-});-}());Polymer.Base._addFeature({-resolveUrl: function (url) {-return Polymer.ResolveUrl.resolveUrl(url, this._importPath);-}-});Polymer.CssParse = function () {-return {-parse: function (text) {-text = this._clean(text);-return this._parseCss(this._lex(text), text);-},-_clean: function (cssText) {-return cssText.replace(this._rx.comments, '').replace(this._rx.port, '');-},-_lex: function (text) {-var root = {-start: 0,-end: text.length-};-var n = root;-for (var i = 0, l = text.length; i < l; i++) {-switch (text[i]) {-case this.OPEN_BRACE:-if (!n.rules) {-n.rules = [];-}-var p = n;-var previous = p.rules[p.rules.length - 1];-n = {-start: i + 1,-parent: p,-previous: previous-};-p.rules.push(n);-break;-case this.CLOSE_BRACE:-n.end = i + 1;-n = n.parent || root;-break;-}-}-return root;-},-_parseCss: function (node, text) {-var t = text.substring(node.start, node.end - 1);-node.parsedCssText = node.cssText = t.trim();-if (node.parent) {-var ss = node.previous ? node.previous.end : node.parent.start;-t = text.substring(ss, node.start - 1);-t = this._expandUnicodeEscapes(t);-t = t.replace(this._rx.multipleSpaces, ' ');-t = t.substring(t.lastIndexOf(';') + 1);-var s = node.parsedSelector = node.selector = t.trim();-node.atRule = s.indexOf(this.AT_START) === 0;-if (node.atRule) {-if (s.indexOf(this.MEDIA_START) === 0) {-node.type = this.types.MEDIA_RULE;-} else if (s.match(this._rx.keyframesRule)) {-node.type = this.types.KEYFRAMES_RULE;-node.keyframesName = node.selector.split(this._rx.multipleSpaces).pop();-}-} else {-if (s.indexOf(this.VAR_START) === 0) {-node.type = this.types.MIXIN_RULE;-} else {-node.type = this.types.STYLE_RULE;-}-}-}-var r$ = node.rules;-if (r$) {-for (var i = 0, l = r$.length, r; i < l && (r = r$[i]); i++) {-this._parseCss(r, text);-}-}-return node;-},-_expandUnicodeEscapes: function (s) {-return s.replace(/\\([0-9a-f]{1,6})\s/gi, function () {-var code = arguments[1], repeat = 6 - code.length;-while (repeat--) {-code = '0' + code;-}-return '\\' + code;-});-},-stringify: function (node, preserveProperties, text) {-text = text || '';-var cssText = '';-if (node.cssText || node.rules) {-var r$ = node.rules;-if (r$ && !this._hasMixinRules(r$)) {-for (var i = 0, l = r$.length, r; i < l && (r = r$[i]); i++) {-cssText = this.stringify(r, preserveProperties, cssText);-}-} else {-cssText = preserveProperties ? node.cssText : this.removeCustomProps(node.cssText);-cssText = cssText.trim();-if (cssText) {-cssText = ' ' + cssText + '\n';-}-}-}-if (cssText) {-if (node.selector) {-text += node.selector + ' ' + this.OPEN_BRACE + '\n';-}-text += cssText;-if (node.selector) {-text += this.CLOSE_BRACE + '\n\n';-}-}-return text;-},-_hasMixinRules: function (rules) {-return rules[0].selector.indexOf(this.VAR_START) === 0;-},-removeCustomProps: function (cssText) {-cssText = this.removeCustomPropAssignment(cssText);-return this.removeCustomPropApply(cssText);-},-removeCustomPropAssignment: function (cssText) {-return cssText.replace(this._rx.customProp, '').replace(this._rx.mixinProp, '');-},-removeCustomPropApply: function (cssText) {-return cssText.replace(this._rx.mixinApply, '').replace(this._rx.varApply, '');-},-types: {-STYLE_RULE: 1,-KEYFRAMES_RULE: 7,-MEDIA_RULE: 4,-MIXIN_RULE: 1000-},-OPEN_BRACE: '{',-CLOSE_BRACE: '}',-_rx: {-comments: /\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim,-port: /@import[^;]*;/gim,-customProp: /(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,-mixinProp: /(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,-mixinApply: /@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,-varApply: /[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,-keyframesRule: /^@[^\s]*keyframes/,-multipleSpaces: /\s+/g-},-VAR_START: '--',-MEDIA_START: '@media',-AT_START: '@'-};-}();Polymer.StyleUtil = function () {-var settings = Polymer.Settings;-return {-NATIVE_VARIABLES: Polymer.Settings.useNativeCSSProperties,-MODULE_STYLES_SELECTOR: 'style, link[rel=import][type~=css], template',-INCLUDE_ATTR: 'include',-toCssText: function (rules, callback) {-if (typeof rules === 'string') {-rules = this.parser.parse(rules);-}-if (callback) {-this.forEachRule(rules, callback);-}-return this.parser.stringify(rules, this.NATIVE_VARIABLES);-},-forRulesInStyles: function (styles, styleRuleCallback, keyframesRuleCallback) {-if (styles) {-for (var i = 0, l = styles.length, s; i < l && (s = styles[i]); i++) {-this.forEachRuleInStyle(s, styleRuleCallback, keyframesRuleCallback);-}-}-},-forActiveRulesInStyles: function (styles, styleRuleCallback, keyframesRuleCallback) {-if (styles) {-for (var i = 0, l = styles.length, s; i < l && (s = styles[i]); i++) {-this.forEachRuleInStyle(s, styleRuleCallback, keyframesRuleCallback, true);-}-}-},-rulesForStyle: function (style) {-if (!style.__cssRules && style.textContent) {-style.__cssRules = this.parser.parse(style.textContent);-}-return style.__cssRules;-},-isKeyframesSelector: function (rule) {-return rule.parent && rule.parent.type === this.ruleTypes.KEYFRAMES_RULE;-},-forEachRuleInStyle: function (style, styleRuleCallback, keyframesRuleCallback, onlyActiveRules) {-var rules = this.rulesForStyle(style);-var styleCallback, keyframeCallback;-if (styleRuleCallback) {-styleCallback = function (rule) {-styleRuleCallback(rule, style);-};-}-if (keyframesRuleCallback) {-keyframeCallback = function (rule) {-keyframesRuleCallback(rule, style);-};-}-this.forEachRule(rules, styleCallback, keyframeCallback, onlyActiveRules);-},-forEachRule: function (node, styleRuleCallback, keyframesRuleCallback, onlyActiveRules) {-if (!node) {-return;-}-var skipRules = false;-if (onlyActiveRules) {-if (node.type === this.ruleTypes.MEDIA_RULE) {-var matchMedia = node.selector.match(this.rx.MEDIA_MATCH);-if (matchMedia) {-if (!window.matchMedia(matchMedia[1]).matches) {-skipRules = true;-}-}-}-}-if (node.type === this.ruleTypes.STYLE_RULE) {-styleRuleCallback(node);-} else if (keyframesRuleCallback && node.type === this.ruleTypes.KEYFRAMES_RULE) {-keyframesRuleCallback(node);-} else if (node.type === this.ruleTypes.MIXIN_RULE) {-skipRules = true;-}-var r$ = node.rules;-if (r$ && !skipRules) {-for (var i = 0, l = r$.length, r; i < l && (r = r$[i]); i++) {-this.forEachRule(r, styleRuleCallback, keyframesRuleCallback, onlyActiveRules);-}-}-},-applyCss: function (cssText, moniker, target, contextNode) {-var style = this.createScopeStyle(cssText, moniker);-return this.applyStyle(style, target, contextNode);-},-applyStyle: function (style, target, contextNode) {-target = target || document.head;-var after = contextNode && contextNode.nextSibling || target.firstChild;-this.__lastHeadApplyNode = style;-return target.insertBefore(style, after);-},-createScopeStyle: function (cssText, moniker) {-var style = document.createElement('style');-if (moniker) {-style.setAttribute('scope', moniker);-}-style.textContent = cssText;-return style;-},-__lastHeadApplyNode: null,-applyStylePlaceHolder: function (moniker) {-var placeHolder = document.createComment(' Shady DOM styles for ' + moniker + ' ');-var after = this.__lastHeadApplyNode ? this.__lastHeadApplyNode.nextSibling : null;-var scope = document.head;-scope.insertBefore(placeHolder, after || scope.firstChild);-this.__lastHeadApplyNode = placeHolder;-return placeHolder;-},-cssFromModules: function (moduleIds, warnIfNotFound) {-var modules = moduleIds.trim().split(' ');-var cssText = '';-for (var i = 0; i < modules.length; i++) {-cssText += this.cssFromModule(modules[i], warnIfNotFound);-}-return cssText;-},-cssFromModule: function (moduleId, warnIfNotFound) {-var m = Polymer.DomModule.import(moduleId);-if (m && !m._cssText) {-m._cssText = this.cssFromElement(m);-}-if (!m && warnIfNotFound) {-console.warn('Could not find style data in module named', moduleId);-}-return m && m._cssText || '';-},-cssFromElement: function (element) {-var cssText = '';-var content = element.content || element;-var e$ = Polymer.TreeApi.arrayCopy(content.querySelectorAll(this.MODULE_STYLES_SELECTOR));-for (var i = 0, e; i < e$.length; i++) {-e = e$[i];-if (e.localName === 'template') {-if (!e.hasAttribute('preserve-content')) {-cssText += this.cssFromElement(e);-}-} else {-if (e.localName === 'style') {-var include = e.getAttribute(this.INCLUDE_ATTR);-if (include) {-cssText += this.cssFromModules(include, true);-}-e = e.__appliedElement || e;-e.parentNode.removeChild(e);-cssText += this.resolveCss(e.textContent, element.ownerDocument);-} else if (e.import && e.import.body) {-cssText += this.resolveCss(e.import.body.textContent, e.import);-}-}-}-return cssText;-},-styleIncludesToTemplate: function (targetTemplate) {-var styles = targetTemplate.content.querySelectorAll('style[include]');-for (var i = 0, s; i < styles.length; i++) {-s = styles[i];-s.parentNode.insertBefore(this._includesToFragment(s.getAttribute('include')), s);-}-},-_includesToFragment: function (styleIncludes) {-var includeArray = styleIncludes.trim().split(' ');-var frag = document.createDocumentFragment();-for (var i = 0; i < includeArray.length; i++) {-var t = Polymer.DomModule.import(includeArray[i], 'template');-if (t) {-this._addStylesToFragment(frag, t.content);-}-}-return frag;-},-_addStylesToFragment: function (frag, source) {-var s$ = source.querySelectorAll('style');-for (var i = 0, s; i < s$.length; i++) {-s = s$[i];-var include = s.getAttribute('include');-if (include) {-frag.appendChild(this._includesToFragment(include));-}-if (s.textContent) {-frag.appendChild(s.cloneNode(true));-}-}-},-isTargetedBuild: function (buildType) {-return settings.useNativeShadow ? buildType === 'shadow' : buildType === 'shady';-},-cssBuildTypeForModule: function (module) {-var dm = Polymer.DomModule.import(module);-if (dm) {-return this.getCssBuildType(dm);-}-},-getCssBuildType: function (element) {-return element.getAttribute('css-build');-},-_findMatchingParen: function (text, start) {-var level = 0;-for (var i = start, l = text.length; i < l; i++) {-switch (text[i]) {-case '(':-level++;-break;-case ')':-if (--level === 0) {-return i;-}-break;-}-}-return -1;-},-processVariableAndFallback: function (str, callback) {-var start = str.indexOf('var(');-if (start === -1) {-return callback(str, '', '', '');-}-var end = this._findMatchingParen(str, start + 3);-var inner = str.substring(start + 4, end);-var prefix = str.substring(0, start);-var suffix = this.processVariableAndFallback(str.substring(end + 1), callback);-var comma = inner.indexOf(',');-if (comma === -1) {-return callback(prefix, inner.trim(), '', suffix);-}-var value = inner.substring(0, comma).trim();-var fallback = inner.substring(comma + 1).trim();-return callback(prefix, value, fallback, suffix);-},-rx: {-VAR_ASSIGN: /(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:([^;{]*)|{([^}]*)})(?:(?=[;\s}])|$)/gi,-MIXIN_MATCH: /(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,-VAR_CONSUMED: /(--[\w-]+)\s*([:,;)]|$)/gi,-ANIMATION_MATCH: /(animation\s*:)|(animation-name\s*:)/,-MEDIA_MATCH: /@media[^(]*(\([^)]*\))/,-IS_VAR: /^--/,-BRACKETED: /\{[^}]*\}/g,-HOST_PREFIX: '(?:^|[^.#[:])',-HOST_SUFFIX: '($|[.:[\\s>+~])'-},-resolveCss: Polymer.ResolveUrl.resolveCss,-parser: Polymer.CssParse,-ruleTypes: Polymer.CssParse.types-};-}();Polymer.StyleTransformer = function () {-var styleUtil = Polymer.StyleUtil;-var settings = Polymer.Settings;-var api = {-dom: function (node, scope, useAttr, shouldRemoveScope) {-this._transformDom(node, scope || '', useAttr, shouldRemoveScope);-},-_transformDom: function (node, selector, useAttr, shouldRemoveScope) {-if (node.setAttribute) {-this.element(node, selector, useAttr, shouldRemoveScope);-}-var c$ = Polymer.dom(node).childNodes;-for (var i = 0; i < c$.length; i++) {-this._transformDom(c$[i], selector, useAttr, shouldRemoveScope);-}-},-element: function (element, scope, useAttr, shouldRemoveScope) {-if (useAttr) {-if (shouldRemoveScope) {-element.removeAttribute(SCOPE_NAME);-} else {-element.setAttribute(SCOPE_NAME, scope);-}-} else {-if (scope) {-if (element.classList) {-if (shouldRemoveScope) {-element.classList.remove(SCOPE_NAME);-element.classList.remove(scope);-} else {-element.classList.add(SCOPE_NAME);-element.classList.add(scope);-}-} else if (element.getAttribute) {-var c = element.getAttribute(CLASS);-if (shouldRemoveScope) {-if (c) {-element.setAttribute(CLASS, c.replace(SCOPE_NAME, '').replace(scope, ''));-}-} else {-element.setAttribute(CLASS, (c ? c + ' ' : '') + SCOPE_NAME + ' ' + scope);-}-}-}-}-},-elementStyles: function (element, callback) {-var styles = element._styles;-var cssText = '';-var cssBuildType = element.__cssBuild;-var passthrough = settings.useNativeShadow || cssBuildType === 'shady';-var cb;-if (passthrough) {-var self = this;-cb = function (rule) {-rule.selector = self._slottedToContent(rule.selector);-rule.selector = rule.selector.replace(ROOT, ':host > *');-if (callback) {-callback(rule);-}-};-}-for (var i = 0, l = styles.length, s; i < l && (s = styles[i]); i++) {-var rules = styleUtil.rulesForStyle(s);-cssText += passthrough ? styleUtil.toCssText(rules, cb) : this.css(rules, element.is, element.extends, callback, element._scopeCssViaAttr) + '\n\n';-}-return cssText.trim();-},-css: function (rules, scope, ext, callback, useAttr) {-var hostScope = this._calcHostScope(scope, ext);-scope = this._calcElementScope(scope, useAttr);-var self = this;-return styleUtil.toCssText(rules, function (rule) {-if (!rule.isScoped) {-self.rule(rule, scope, hostScope);-rule.isScoped = true;-}-if (callback) {-callback(rule, scope, hostScope);-}-});-},-_calcElementScope: function (scope, useAttr) {-if (scope) {-return useAttr ? CSS_ATTR_PREFIX + scope + CSS_ATTR_SUFFIX : CSS_CLASS_PREFIX + scope;-} else {-return '';-}-},-_calcHostScope: function (scope, ext) {-return ext ? '[is=' + scope + ']' : scope;-},-rule: function (rule, scope, hostScope) {-this._transformRule(rule, this._transformComplexSelector, scope, hostScope);-},-_transformRule: function (rule, transformer, scope, hostScope) {-rule.selector = rule.transformedSelector = this._transformRuleCss(rule, transformer, scope, hostScope);-},-_transformRuleCss: function (rule, transformer, scope, hostScope) {-var p$ = rule.selector.split(COMPLEX_SELECTOR_SEP);-if (!styleUtil.isKeyframesSelector(rule)) {-for (var i = 0, l = p$.length, p; i < l && (p = p$[i]); i++) {-p$[i] = transformer.call(this, p, scope, hostScope);-}-}-return p$.join(COMPLEX_SELECTOR_SEP);-},-_transformComplexSelector: function (selector, scope, hostScope) {-var stop = false;-var hostContext = false;-var self = this;-selector = selector.trim();-selector = this._slottedToContent(selector);-selector = selector.replace(ROOT, ':host > *');-selector = selector.replace(CONTENT_START, HOST + ' $1');-selector = selector.replace(SIMPLE_SELECTOR_SEP, function (m, c, s) {-if (!stop) {-var info = self._transformCompoundSelector(s, c, scope, hostScope);-stop = stop || info.stop;-hostContext = hostContext || info.hostContext;-c = info.combinator;-s = info.value;-} else {-s = s.replace(SCOPE_JUMP, ' ');-}-return c + s;-});-if (hostContext) {-selector = selector.replace(HOST_CONTEXT_PAREN, function (m, pre, paren, post) {-return pre + paren + ' ' + hostScope + post + COMPLEX_SELECTOR_SEP + ' ' + pre + hostScope + paren + post;-});-}-return selector;-},-_transformCompoundSelector: function (selector, combinator, scope, hostScope) {-var jumpIndex = selector.search(SCOPE_JUMP);-var hostContext = false;-if (selector.indexOf(HOST_CONTEXT) >= 0) {-hostContext = true;-} else if (selector.indexOf(HOST) >= 0) {-selector = this._transformHostSelector(selector, hostScope);-} else if (jumpIndex !== 0) {-selector = scope ? this._transformSimpleSelector(selector, scope) : selector;-}-if (selector.indexOf(CONTENT) >= 0) {-combinator = '';-}-var stop;-if (jumpIndex >= 0) {-selector = selector.replace(SCOPE_JUMP, ' ');-stop = true;-}-return {-value: selector,-combinator: combinator,-stop: stop,-hostContext: hostContext-};-},-_transformSimpleSelector: function (selector, scope) {-var p$ = selector.split(PSEUDO_PREFIX);-p$[0] += scope;-return p$.join(PSEUDO_PREFIX);-},-_transformHostSelector: function (selector, hostScope) {-var m = selector.match(HOST_PAREN);-var paren = m && m[2].trim() || '';-if (paren) {-if (!paren[0].match(SIMPLE_SELECTOR_PREFIX)) {-var typeSelector = paren.split(SIMPLE_SELECTOR_PREFIX)[0];-if (typeSelector === hostScope) {-return paren;-} else {-return SELECTOR_NO_MATCH;-}-} else {-return selector.replace(HOST_PAREN, function (m, host, paren) {-return hostScope + paren;-});-}-} else {-return selector.replace(HOST, hostScope);-}-},-documentRule: function (rule) {-rule.selector = rule.parsedSelector;-this.normalizeRootSelector(rule);-if (!settings.useNativeShadow) {-this._transformRule(rule, this._transformDocumentSelector);-}-},-normalizeRootSelector: function (rule) {-rule.selector = rule.selector.replace(ROOT, 'html');-},-_transformDocumentSelector: function (selector) {-return selector.match(SCOPE_JUMP) ? this._transformComplexSelector(selector, SCOPE_DOC_SELECTOR) : this._transformSimpleSelector(selector.trim(), SCOPE_DOC_SELECTOR);-},-_slottedToContent: function (cssText) {-return cssText.replace(SLOTTED_PAREN, CONTENT + '> $1');-},-SCOPE_NAME: 'style-scope'-};-var SCOPE_NAME = api.SCOPE_NAME;-var SCOPE_DOC_SELECTOR = ':not([' + SCOPE_NAME + '])' + ':not(.' + SCOPE_NAME + ')';-var COMPLEX_SELECTOR_SEP = ',';-var SIMPLE_SELECTOR_SEP = /(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=\[])+)/g;-var SIMPLE_SELECTOR_PREFIX = /[[.:#*]/;-var HOST = ':host';-var ROOT = ':root';-var HOST_PAREN = /(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/;-var HOST_CONTEXT = ':host-context';-var HOST_CONTEXT_PAREN = /(.*)(?::host-context)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))(.*)/;-var CONTENT = '::content';-var SCOPE_JUMP = /::content|::shadow|\/deep\//;-var CSS_CLASS_PREFIX = '.';-var CSS_ATTR_PREFIX = '[' + SCOPE_NAME + '~=';-var CSS_ATTR_SUFFIX = ']';-var PSEUDO_PREFIX = ':';-var CLASS = 'class';-var CONTENT_START = new RegExp('^(' + CONTENT + ')');-var SELECTOR_NO_MATCH = 'should_not_match';-var SLOTTED_PAREN = /(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/g;-return api;-}();Polymer.StyleExtends = function () {-var styleUtil = Polymer.StyleUtil;-return {-hasExtends: function (cssText) {-return Boolean(cssText.match(this.rx.EXTEND));-},-transform: function (style) {-var rules = styleUtil.rulesForStyle(style);-var self = this;-styleUtil.forEachRule(rules, function (rule) {-self._mapRuleOntoParent(rule);-if (rule.parent) {-var m;-while (m = self.rx.EXTEND.exec(rule.cssText)) {-var extend = m[1];-var extendor = self._findExtendor(extend, rule);-if (extendor) {-self._extendRule(rule, extendor);-}-}-}-rule.cssText = rule.cssText.replace(self.rx.EXTEND, '');-});-return styleUtil.toCssText(rules, function (rule) {-if (rule.selector.match(self.rx.STRIP)) {-rule.cssText = '';-}-}, true);-},-_mapRuleOntoParent: function (rule) {-if (rule.parent) {-var map = rule.parent.map || (rule.parent.map = {});-var parts = rule.selector.split(',');-for (var i = 0, p; i < parts.length; i++) {-p = parts[i];-map[p.trim()] = rule;-}-return map;-}-},-_findExtendor: function (extend, rule) {-return rule.parent && rule.parent.map && rule.parent.map[extend] || this._findExtendor(extend, rule.parent);-},-_extendRule: function (target, source) {-if (target.parent !== source.parent) {-this._cloneAndAddRuleToParent(source, target.parent);-}-target.extends = target.extends || [];-target.extends.push(source);-source.selector = source.selector.replace(this.rx.STRIP, '');-source.selector = (source.selector && source.selector + ',\n') + target.selector;-if (source.extends) {-source.extends.forEach(function (e) {-this._extendRule(target, e);-}, this);-}-},-_cloneAndAddRuleToParent: function (rule, parent) {-rule = Object.create(rule);-rule.parent = parent;-if (rule.extends) {-rule.extends = rule.extends.slice();-}-parent.rules.push(rule);-},-rx: {-EXTEND: /@extends\(([^)]*)\)\s*?;/gim,-STRIP: /%[^,]*$/-}-};-}();Polymer.ApplyShim = function () {-'use strict';-var styleUtil = Polymer.StyleUtil;-var MIXIN_MATCH = styleUtil.rx.MIXIN_MATCH;-var VAR_ASSIGN = styleUtil.rx.VAR_ASSIGN;-var BAD_VAR = /var\(\s*(--[^,]*),\s*(--[^)]*)\)/g;-var APPLY_NAME_CLEAN = /;\s*/m;-var INITIAL_INHERIT = /^\s*(initial)|(inherit)\s*$/;-var MIXIN_VAR_SEP = '_-_';-var mixinMap = {};-function mapSet(name, props) {-name = name.trim();-mixinMap[name] = {-properties: props,-dependants: {}-};-}-function mapGet(name) {-name = name.trim();-return mixinMap[name];-}-function replaceInitialOrInherit(property, value) {-var match = INITIAL_INHERIT.exec(value);-if (match) {-if (match[1]) {-value = ApplyShim._getInitialValueForProperty(property);-} else {-value = 'apply-shim-inherit';-}-}-return value;-}-function cssTextToMap(text) {-var props = text.split(';');-var property, value;-var out = {};-for (var i = 0, p, sp; i < props.length; i++) {-p = props[i];-if (p) {-sp = p.split(':');-if (sp.length > 1) {-property = sp[0].trim();-value = replaceInitialOrInherit(property, sp.slice(1).join(':'));-out[property] = value;-}-}-}-return out;-}-function invalidateMixinEntry(mixinEntry) {-var currentProto = ApplyShim.__currentElementProto;-var currentElementName = currentProto && currentProto.is;-for (var elementName in mixinEntry.dependants) {-if (elementName !== currentElementName) {-mixinEntry.dependants[elementName].__applyShimInvalid = true;-}-}-}-function produceCssProperties(matchText, propertyName, valueProperty, valueMixin) {-if (valueProperty) {-styleUtil.processVariableAndFallback(valueProperty, function (prefix, value) {-if (value && mapGet(value)) {-valueMixin = '@apply ' + value + ';';-}-});-}-if (!valueMixin) {-return matchText;-}-var mixinAsProperties = consumeCssProperties(valueMixin);-var prefix = matchText.slice(0, matchText.indexOf('--'));-var mixinValues = cssTextToMap(mixinAsProperties);-var combinedProps = mixinValues;-var mixinEntry = mapGet(propertyName);-var oldProps = mixinEntry && mixinEntry.properties;-if (oldProps) {-combinedProps = Object.create(oldProps);-combinedProps = Polymer.Base.mixin(combinedProps, mixinValues);-} else {-mapSet(propertyName, combinedProps);-}-var out = [];-var p, v;-var needToInvalidate = false;-for (p in combinedProps) {-v = mixinValues[p];-if (v === undefined) {-v = 'initial';-}-if (oldProps && !(p in oldProps)) {-needToInvalidate = true;-}-out.push(propertyName + MIXIN_VAR_SEP + p + ': ' + v);-}-if (needToInvalidate) {-invalidateMixinEntry(mixinEntry);-}-if (mixinEntry) {-mixinEntry.properties = combinedProps;-}-if (valueProperty) {-prefix = matchText + ';' + prefix;-}-return prefix + out.join('; ') + ';';-}-function fixVars(matchText, varA, varB) {-return 'var(' + varA + ',' + 'var(' + varB + '))';-}-function atApplyToCssProperties(mixinName, fallbacks) {-mixinName = mixinName.replace(APPLY_NAME_CLEAN, '');-var vars = [];-var mixinEntry = mapGet(mixinName);-if (!mixinEntry) {-mapSet(mixinName, {});-mixinEntry = mapGet(mixinName);-}-if (mixinEntry) {-var currentProto = ApplyShim.__currentElementProto;-if (currentProto) {-mixinEntry.dependants[currentProto.is] = currentProto;-}-var p, parts, f;-for (p in mixinEntry.properties) {-f = fallbacks && fallbacks[p];-parts = [-p,-': var(',-mixinName,-MIXIN_VAR_SEP,-p-];-if (f) {-parts.push(',', f);-}-parts.push(')');-vars.push(parts.join(''));-}-}-return vars.join('; ');-}-function consumeCssProperties(text) {-var m;-while (m = MIXIN_MATCH.exec(text)) {-var matchText = m[0];-var mixinName = m[1];-var idx = m.index;-var applyPos = idx + matchText.indexOf('@apply');-var afterApplyPos = idx + matchText.length;-var textBeforeApply = text.slice(0, applyPos);-var textAfterApply = text.slice(afterApplyPos);-var defaults = cssTextToMap(textBeforeApply);-var replacement = atApplyToCssProperties(mixinName, defaults);-text = [-textBeforeApply,-replacement,-textAfterApply-].join('');-MIXIN_MATCH.lastIndex = idx + replacement.length;-}-return text;-}-var ApplyShim = {-_measureElement: null,-_map: mixinMap,-_separator: MIXIN_VAR_SEP,-transform: function (styles, elementProto) {-this.__currentElementProto = elementProto;-styleUtil.forRulesInStyles(styles, this._boundFindDefinitions);-styleUtil.forRulesInStyles(styles, this._boundFindApplications);-if (elementProto) {-elementProto.__applyShimInvalid = false;-}-this.__currentElementProto = null;-},-_findDefinitions: function (rule) {-var cssText = rule.parsedCssText;-cssText = cssText.replace(BAD_VAR, fixVars);-cssText = cssText.replace(VAR_ASSIGN, produceCssProperties);-rule.cssText = cssText;-if (rule.selector === ':root') {-rule.selector = ':host > *';-}-},-_findApplications: function (rule) {-rule.cssText = consumeCssProperties(rule.cssText);-},-transformRule: function (rule) {-this._findDefinitions(rule);-this._findApplications(rule);-},-_getInitialValueForProperty: function (property) {-if (!this._measureElement) {-this._measureElement = document.createElement('meta');-this._measureElement.style.all = 'initial';-document.head.appendChild(this._measureElement);-}-return window.getComputedStyle(this._measureElement).getPropertyValue(property);-}-};-ApplyShim._boundTransformRule = ApplyShim.transformRule.bind(ApplyShim);-ApplyShim._boundFindDefinitions = ApplyShim._findDefinitions.bind(ApplyShim);-ApplyShim._boundFindApplications = ApplyShim._findApplications.bind(ApplyShim);-return ApplyShim;-}();(function () {-var prepElement = Polymer.Base._prepElement;-var nativeShadow = Polymer.Settings.useNativeShadow;-var styleUtil = Polymer.StyleUtil;-var styleTransformer = Polymer.StyleTransformer;-var styleExtends = Polymer.StyleExtends;-var applyShim = Polymer.ApplyShim;-var settings = Polymer.Settings;-Polymer.Base._addFeature({-_prepElement: function (element) {-if (this._encapsulateStyle && this.__cssBuild !== 'shady') {-styleTransformer.element(element, this.is, this._scopeCssViaAttr);-}-prepElement.call(this, element);-},-_prepStyles: function () {-if (this._encapsulateStyle === undefined) {-this._encapsulateStyle = !nativeShadow;-}-if (!nativeShadow) {-this._scopeStyle = styleUtil.applyStylePlaceHolder(this.is);-}-this.__cssBuild = styleUtil.cssBuildTypeForModule(this.is);-},-_prepShimStyles: function () {-if (this._template) {-var hasTargetedCssBuild = styleUtil.isTargetedBuild(this.__cssBuild);-if (settings.useNativeCSSProperties && this.__cssBuild === 'shadow' && hasTargetedCssBuild) {-if (settings.preserveStyleIncludes) {-styleUtil.styleIncludesToTemplate(this._template);-}-return;-}-this._styles = this._styles || this._collectStyles();-if (settings.useNativeCSSProperties && !this.__cssBuild) {-applyShim.transform(this._styles, this);-}-var cssText = settings.useNativeCSSProperties && hasTargetedCssBuild ? this._styles.length && this._styles[0].textContent.trim() : styleTransformer.elementStyles(this);-this._prepStyleProperties();-if (!this._needsStyleProperties() && cssText) {-styleUtil.applyCss(cssText, this.is, nativeShadow ? this._template.content : null, this._scopeStyle);-}-} else {-this._styles = [];-}-},-_collectStyles: function () {-var styles = [];-var cssText = '', m$ = this.styleModules;-if (m$) {-for (var i = 0, l = m$.length, m; i < l && (m = m$[i]); i++) {-cssText += styleUtil.cssFromModule(m);-}-}-cssText += styleUtil.cssFromModule(this.is);-var p = this._template && this._template.parentNode;-if (this._template && (!p || p.id.toLowerCase() !== this.is)) {-cssText += styleUtil.cssFromElement(this._template);-}-if (cssText) {-var style = document.createElement('style');-style.textContent = cssText;-if (styleExtends.hasExtends(style.textContent)) {-cssText = styleExtends.transform(style);-}-styles.push(style);-}-return styles;-},-_elementAdd: function (node) {-if (this._encapsulateStyle) {-if (node.__styleScoped) {-node.__styleScoped = false;-} else {-styleTransformer.dom(node, this.is, this._scopeCssViaAttr);-}-}-},-_elementRemove: function (node) {-if (this._encapsulateStyle) {-styleTransformer.dom(node, this.is, this._scopeCssViaAttr, true);-}-},-scopeSubtree: function (container, shouldObserve) {-if (nativeShadow) {-return;-}-var self = this;-var scopify = function (node) {-if (node.nodeType === Node.ELEMENT_NODE) {-var className = node.getAttribute('class');-node.setAttribute('class', self._scopeElementClass(node, className));-var n$ = node.querySelectorAll('*');-for (var i = 0, n; i < n$.length && (n = n$[i]); i++) {-className = n.getAttribute('class');-n.setAttribute('class', self._scopeElementClass(n, className));-}-}-};-scopify(container);-if (shouldObserve) {-var mo = new MutationObserver(function (mxns) {-for (var i = 0, m; i < mxns.length && (m = mxns[i]); i++) {-if (m.addedNodes) {-for (var j = 0; j < m.addedNodes.length; j++) {-scopify(m.addedNodes[j]);-}-}-}-});-mo.observe(container, {-childList: true,-subtree: true-});-return mo;-}-}-});-}());Polymer.StyleProperties = function () {-'use strict';-var matchesSelector = Polymer.DomApi.matchesSelector;-var styleUtil = Polymer.StyleUtil;-var styleTransformer = Polymer.StyleTransformer;-var IS_IE = navigator.userAgent.match('Trident');-var settings = Polymer.Settings;-return {-decorateStyles: function (styles, scope) {-var self = this, props = {}, keyframes = [], ruleIndex = 0;-var scopeSelector = styleTransformer._calcHostScope(scope.is, scope.extends);-styleUtil.forRulesInStyles(styles, function (rule, style) {-self.decorateRule(rule);-rule.index = ruleIndex++;-self.whenHostOrRootRule(scope, rule, style, function (info) {-if (rule.parent.type === styleUtil.ruleTypes.MEDIA_RULE) {-scope.__notStyleScopeCacheable = true;-}-if (info.isHost) {-var hostContextOrFunction = info.selector.split(' ').some(function (s) {-return s.indexOf(scopeSelector) === 0 && s.length !== scopeSelector.length;-});-scope.__notStyleScopeCacheable = scope.__notStyleScopeCacheable || hostContextOrFunction;-}-});-self.collectPropertiesInCssText(rule.propertyInfo.cssText, props);-}, function onKeyframesRule(rule) {-keyframes.push(rule);-});-styles._keyframes = keyframes;-var names = [];-for (var i in props) {-names.push(i);-}-return names;-},-decorateRule: function (rule) {-if (rule.propertyInfo) {-return rule.propertyInfo;-}-var info = {}, properties = {};-var hasProperties = this.collectProperties(rule, properties);-if (hasProperties) {-info.properties = properties;-rule.rules = null;-}-info.cssText = this.collectCssText(rule);-rule.propertyInfo = info;-return info;-},-collectProperties: function (rule, properties) {-var info = rule.propertyInfo;-if (info) {-if (info.properties) {-Polymer.Base.mixin(properties, info.properties);-return true;-}-} else {-var m, rx = this.rx.VAR_ASSIGN;-var cssText = rule.parsedCssText;-var value;-var any;-while (m = rx.exec(cssText)) {-value = (m[2] || m[3]).trim();-if (value !== 'inherit') {-properties[m[1].trim()] = value;-}-any = true;-}-return any;-}-},-collectCssText: function (rule) {-return this.collectConsumingCssText(rule.parsedCssText);-},-collectConsumingCssText: function (cssText) {-return cssText.replace(this.rx.BRACKETED, '').replace(this.rx.VAR_ASSIGN, '');-},-collectPropertiesInCssText: function (cssText, props) {-var m;-while (m = this.rx.VAR_CONSUMED.exec(cssText)) {-var name = m[1];-if (m[2] !== ':') {-props[name] = true;-}-}-},-reify: function (props) {-var names = Object.getOwnPropertyNames(props);-for (var i = 0, n; i < names.length; i++) {-n = names[i];-props[n] = this.valueForProperty(props[n], props);-}-},-valueForProperty: function (property, props) {-if (property) {-if (property.indexOf(';') >= 0) {-property = this.valueForProperties(property, props);-} else {-var self = this;-var fn = function (prefix, value, fallback, suffix) {-var propertyValue = self.valueForProperty(props[value], props);-if (!propertyValue || propertyValue === 'initial') {-propertyValue = self.valueForProperty(props[fallback] || fallback, props) || fallback;-} else if (propertyValue === 'apply-shim-inherit') {-propertyValue = 'inherit';-}-return prefix + (propertyValue || '') + suffix;-};-property = styleUtil.processVariableAndFallback(property, fn);-}-}-return property && property.trim() || '';-},-valueForProperties: function (property, props) {-var parts = property.split(';');-for (var i = 0, p, m; i < parts.length; i++) {-if (p = parts[i]) {-this.rx.MIXIN_MATCH.lastIndex = 0;-m = this.rx.MIXIN_MATCH.exec(p);-if (m) {-p = this.valueForProperty(props[m[1]], props);-} else {-var colon = p.indexOf(':');-if (colon !== -1) {-var pp = p.substring(colon);-pp = pp.trim();-pp = this.valueForProperty(pp, props) || pp;-p = p.substring(0, colon) + pp;-}-}-parts[i] = p && p.lastIndexOf(';') === p.length - 1 ? p.slice(0, -1) : p || '';-}-}-return parts.join(';');-},-applyProperties: function (rule, props) {-var output = '';-if (!rule.propertyInfo) {-this.decorateRule(rule);-}-if (rule.propertyInfo.cssText) {-output = this.valueForProperties(rule.propertyInfo.cssText, props);-}-rule.cssText = output;-},-applyKeyframeTransforms: function (rule, keyframeTransforms) {-var input = rule.cssText;-var output = rule.cssText;-if (rule.hasAnimations == null) {-rule.hasAnimations = this.rx.ANIMATION_MATCH.test(input);-}-if (rule.hasAnimations) {-var transform;-if (rule.keyframeNamesToTransform == null) {-rule.keyframeNamesToTransform = [];-for (var keyframe in keyframeTransforms) {-transform = keyframeTransforms[keyframe];-output = transform(input);-if (input !== output) {-input = output;-rule.keyframeNamesToTransform.push(keyframe);-}-}-} else {-for (var i = 0; i < rule.keyframeNamesToTransform.length; ++i) {-transform = keyframeTransforms[rule.keyframeNamesToTransform[i]];-input = transform(input);-}-output = input;-}-}-rule.cssText = output;-},-propertyDataFromStyles: function (styles, element) {-var props = {}, self = this;-var o = [];-styleUtil.forActiveRulesInStyles(styles, function (rule) {-if (!rule.propertyInfo) {-self.decorateRule(rule);-}-var selectorToMatch = rule.transformedSelector || rule.parsedSelector;-if (element && rule.propertyInfo.properties && selectorToMatch) {-if (matchesSelector.call(element, selectorToMatch)) {-self.collectProperties(rule, props);-addToBitMask(rule.index, o);-}-}-});-return {-properties: props,-key: o-};-},-_rootSelector: /:root|:host\s*>\s*\*/,-_checkRoot: function (hostScope, selector) {-return Boolean(selector.match(this._rootSelector)) || hostScope === 'html' && selector.indexOf('html') > -1;-},-whenHostOrRootRule: function (scope, rule, style, callback) {-if (!rule.propertyInfo) {-self.decorateRule(rule);-}-if (!rule.propertyInfo.properties) {-return;-}-var hostScope = scope.is ? styleTransformer._calcHostScope(scope.is, scope.extends) : 'html';-var parsedSelector = rule.parsedSelector;-var isRoot = this._checkRoot(hostScope, parsedSelector);-var isHost = !isRoot && parsedSelector.indexOf(':host') === 0;-var cssBuild = scope.__cssBuild || style.__cssBuild;-if (cssBuild === 'shady') {-isRoot = parsedSelector === hostScope + ' > *.' + hostScope || parsedSelector.indexOf('html') > -1;-isHost = !isRoot && parsedSelector.indexOf(hostScope) === 0;-}-if (!isRoot && !isHost) {-return;-}-var selectorToMatch = hostScope;-if (isHost) {-if (settings.useNativeShadow && !rule.transformedSelector) {-rule.transformedSelector = styleTransformer._transformRuleCss(rule, styleTransformer._transformComplexSelector, scope.is, hostScope);-}-selectorToMatch = rule.transformedSelector || rule.parsedSelector;-}-if (isRoot && hostScope === 'html') {-selectorToMatch = rule.transformedSelector || rule.parsedSelector;-}-callback({-selector: selectorToMatch,-isHost: isHost,-isRoot: isRoot-});-},-hostAndRootPropertiesForScope: function (scope) {-var hostProps = {}, rootProps = {}, self = this;-styleUtil.forActiveRulesInStyles(scope._styles, function (rule, style) {-self.whenHostOrRootRule(scope, rule, style, function (info) {-var element = scope._element || scope;-if (matchesSelector.call(element, info.selector)) {-if (info.isHost) {-self.collectProperties(rule, hostProps);-} else {-self.collectProperties(rule, rootProps);-}-}-});-});-return {-rootProps: rootProps,-hostProps: hostProps-};-},-transformStyles: function (element, properties, scopeSelector) {-var self = this;-var hostSelector = styleTransformer._calcHostScope(element.is, element.extends);-var rxHostSelector = element.extends ? '\\' + hostSelector.slice(0, -1) + '\\]' : hostSelector;-var hostRx = new RegExp(this.rx.HOST_PREFIX + rxHostSelector + this.rx.HOST_SUFFIX);-var keyframeTransforms = this._elementKeyframeTransforms(element, scopeSelector);-return styleTransformer.elementStyles(element, function (rule) {-self.applyProperties(rule, properties);-if (!settings.useNativeShadow && !Polymer.StyleUtil.isKeyframesSelector(rule) && rule.cssText) {-self.applyKeyframeTransforms(rule, keyframeTransforms);-self._scopeSelector(rule, hostRx, hostSelector, element._scopeCssViaAttr, scopeSelector);-}-});-},-_elementKeyframeTransforms: function (element, scopeSelector) {-var keyframesRules = element._styles._keyframes;-var keyframeTransforms = {};-if (!settings.useNativeShadow && keyframesRules) {-for (var i = 0, keyframesRule = keyframesRules[i]; i < keyframesRules.length; keyframesRule = keyframesRules[++i]) {-this._scopeKeyframes(keyframesRule, scopeSelector);-keyframeTransforms[keyframesRule.keyframesName] = this._keyframesRuleTransformer(keyframesRule);-}-}-return keyframeTransforms;-},-_keyframesRuleTransformer: function (keyframesRule) {-return function (cssText) {-return cssText.replace(keyframesRule.keyframesNameRx, keyframesRule.transformedKeyframesName);-};-},-_scopeKeyframes: function (rule, scopeId) {-rule.keyframesNameRx = new RegExp(rule.keyframesName, 'g');-rule.transformedKeyframesName = rule.keyframesName + '-' + scopeId;-rule.transformedSelector = rule.transformedSelector || rule.selector;-rule.selector = rule.transformedSelector.replace(rule.keyframesName, rule.transformedKeyframesName);-},-_scopeSelector: function (rule, hostRx, hostSelector, viaAttr, scopeId) {-rule.transformedSelector = rule.transformedSelector || rule.selector;-var selector = rule.transformedSelector;-var scope = viaAttr ? '[' + styleTransformer.SCOPE_NAME + '~=' + scopeId + ']' : '.' + scopeId;-var parts = selector.split(',');-for (var i = 0, l = parts.length, p; i < l && (p = parts[i]); i++) {-parts[i] = p.match(hostRx) ? p.replace(hostSelector, scope) : scope + ' ' + p;-}-rule.selector = parts.join(',');-},-applyElementScopeSelector: function (element, selector, old, viaAttr) {-var c = viaAttr ? element.getAttribute(styleTransformer.SCOPE_NAME) : element.getAttribute('class') || '';-var v = old ? c.replace(old, selector) : (c ? c + ' ' : '') + this.XSCOPE_NAME + ' ' + selector;-if (c !== v) {-if (viaAttr) {-element.setAttribute(styleTransformer.SCOPE_NAME, v);-} else {-element.setAttribute('class', v);-}-}-},-applyElementStyle: function (element, properties, selector, style) {-var cssText = style ? style.textContent || '' : this.transformStyles(element, properties, selector);-var s = element._customStyle;-if (s && !settings.useNativeShadow && s !== style) {-s._useCount--;-if (s._useCount <= 0 && s.parentNode) {-s.parentNode.removeChild(s);-}-}-if (settings.useNativeShadow) {-if (element._customStyle) {-element._customStyle.textContent = cssText;-style = element._customStyle;-} else if (cssText) {-style = styleUtil.applyCss(cssText, selector, element.root, element._scopeStyle);-}-} else {-if (!style) {-if (cssText) {-style = styleUtil.applyCss(cssText, selector, null, element._scopeStyle);-}-} else if (!style.parentNode) {-if (IS_IE && cssText.indexOf('@media') > -1) {-style.textContent = cssText;-}-styleUtil.applyStyle(style, null, element._scopeStyle);-}-}-if (style) {-style._useCount = style._useCount || 0;-if (element._customStyle != style) {-style._useCount++;-}-element._customStyle = style;-}-return style;-},-mixinCustomStyle: function (props, customStyle) {-var v;-for (var i in customStyle) {-v = customStyle[i];-if (v || v === 0) {-props[i] = v;-}-}-},-updateNativeStyleProperties: function (element, properties) {-var oldPropertyNames = element.__customStyleProperties;-if (oldPropertyNames) {-for (var i = 0; i < oldPropertyNames.length; i++) {-element.style.removeProperty(oldPropertyNames[i]);-}-}-var propertyNames = [];-for (var p in properties) {-if (properties[p] !== null) {-element.style.setProperty(p, properties[p]);-propertyNames.push(p);-}-}-element.__customStyleProperties = propertyNames;-},-rx: styleUtil.rx,-XSCOPE_NAME: 'x-scope'-};-function addToBitMask(n, bits) {-var o = parseInt(n / 32);-var v = 1 << n % 32;-bits[o] = (bits[o] || 0) | v;-}-}();(function () {-Polymer.StyleCache = function () {-this.cache = {};-};-Polymer.StyleCache.prototype = {-MAX: 100,-store: function (is, data, keyValues, keyStyles) {-data.keyValues = keyValues;-data.styles = keyStyles;-var s$ = this.cache[is] = this.cache[is] || [];-s$.push(data);-if (s$.length > this.MAX) {-s$.shift();-}-},-retrieve: function (is, keyValues, keyStyles) {-var cache = this.cache[is];-if (cache) {-for (var i = cache.length - 1, data; i >= 0; i--) {-data = cache[i];-if (keyStyles === data.styles && this._objectsEqual(keyValues, data.keyValues)) {-return data;-}-}-}-},-clear: function () {-this.cache = {};-},-_objectsEqual: function (target, source) {-var t, s;-for (var i in target) {-t = target[i], s = source[i];-if (!(typeof t === 'object' && t ? this._objectsStrictlyEqual(t, s) : t === s)) {-return false;-}-}-if (Array.isArray(target)) {-return target.length === source.length;-}-return true;-},-_objectsStrictlyEqual: function (target, source) {-return this._objectsEqual(target, source) && this._objectsEqual(source, target);-}-};-}());Polymer.StyleDefaults = function () {-var styleProperties = Polymer.StyleProperties;-var StyleCache = Polymer.StyleCache;-var nativeVariables = Polymer.Settings.useNativeCSSProperties;-var api = {-_styles: [],-_properties: null,-customStyle: {},-_styleCache: new StyleCache(),-_element: Polymer.DomApi.wrap(document.documentElement),-addStyle: function (style) {-this._styles.push(style);-this._properties = null;-},-get _styleProperties() {-if (!this._properties) {-styleProperties.decorateStyles(this._styles, this);-this._styles._scopeStyleProperties = null;-this._properties = styleProperties.hostAndRootPropertiesForScope(this).rootProps;-styleProperties.mixinCustomStyle(this._properties, this.customStyle);-styleProperties.reify(this._properties);-}-return this._properties;-},-hasStyleProperties: function () {-return Boolean(this._properties);-},-_needsStyleProperties: function () {-},-_computeStyleProperties: function () {-return this._styleProperties;-},-updateStyles: function (properties) {-this._properties = null;-if (properties) {-Polymer.Base.mixin(this.customStyle, properties);-}-this._styleCache.clear();-for (var i = 0, s; i < this._styles.length; i++) {-s = this._styles[i];-s = s.__importElement || s;-s._apply();-}-if (nativeVariables) {-styleProperties.updateNativeStyleProperties(document.documentElement, this.customStyle);-}-}-};-return api;-}();(function () {-'use strict';-var serializeValueToAttribute = Polymer.Base.serializeValueToAttribute;-var propertyUtils = Polymer.StyleProperties;-var styleTransformer = Polymer.StyleTransformer;-var styleDefaults = Polymer.StyleDefaults;-var nativeShadow = Polymer.Settings.useNativeShadow;-var nativeVariables = Polymer.Settings.useNativeCSSProperties;-Polymer.Base._addFeature({-_prepStyleProperties: function () {-if (!nativeVariables) {-this._ownStylePropertyNames = this._styles && this._styles.length ? propertyUtils.decorateStyles(this._styles, this) : null;-}-},-customStyle: null,-getComputedStyleValue: function (property) {-if (!nativeVariables && !this._styleProperties) {-this._computeStyleProperties();-}-return !nativeVariables && this._styleProperties && this._styleProperties[property] || getComputedStyle(this).getPropertyValue(property);-},-_setupStyleProperties: function () {-this.customStyle = {};-this._styleCache = null;-this._styleProperties = null;-this._scopeSelector = null;-this._ownStyleProperties = null;-this._customStyle = null;-},-_needsStyleProperties: function () {-return Boolean(!nativeVariables && this._ownStylePropertyNames && this._ownStylePropertyNames.length);-},-_validateApplyShim: function () {-if (this.__applyShimInvalid) {-Polymer.ApplyShim.transform(this._styles, this.__proto__);-var cssText = styleTransformer.elementStyles(this);-if (nativeShadow) {-var templateStyle = this._template.content.querySelector('style');-if (templateStyle) {-templateStyle.textContent = cssText;-}-} else {-var shadyStyle = this._scopeStyle && this._scopeStyle.nextSibling;-if (shadyStyle) {-shadyStyle.textContent = cssText;-}-}-}-},-_beforeAttached: function () {-if ((!this._scopeSelector || this.__stylePropertiesInvalid) && this._needsStyleProperties()) {-this.__stylePropertiesInvalid = false;-this._updateStyleProperties();-}-},-_findStyleHost: function () {-var e = this, root;-while (root = Polymer.dom(e).getOwnerRoot()) {-if (Polymer.isInstance(root.host)) {-return root.host;-}-e = root.host;-}-return styleDefaults;-},-_updateStyleProperties: function () {-var info, scope = this._findStyleHost();-if (!scope._styleProperties) {-scope._computeStyleProperties();-}-if (!scope._styleCache) {-scope._styleCache = new Polymer.StyleCache();-}-var scopeData = propertyUtils.propertyDataFromStyles(scope._styles, this);-var scopeCacheable = !this.__notStyleScopeCacheable;-if (scopeCacheable) {-scopeData.key.customStyle = this.customStyle;-info = scope._styleCache.retrieve(this.is, scopeData.key, this._styles);-}-var scopeCached = Boolean(info);-if (scopeCached) {-this._styleProperties = info._styleProperties;-} else {-this._computeStyleProperties(scopeData.properties);-}-this._computeOwnStyleProperties();-if (!scopeCached) {-info = styleCache.retrieve(this.is, this._ownStyleProperties, this._styles);-}-var globalCached = Boolean(info) && !scopeCached;-var style = this._applyStyleProperties(info);-if (!scopeCached) {-style = style && nativeShadow ? style.cloneNode(true) : style;-info = {-style: style,-_scopeSelector: this._scopeSelector,-_styleProperties: this._styleProperties-};-if (scopeCacheable) {-scopeData.key.customStyle = {};-this.mixin(scopeData.key.customStyle, this.customStyle);-scope._styleCache.store(this.is, info, scopeData.key, this._styles);-}-if (!globalCached) {-styleCache.store(this.is, Object.create(info), this._ownStyleProperties, this._styles);-}-}-},-_computeStyleProperties: function (scopeProps) {-var scope = this._findStyleHost();-if (!scope._styleProperties) {-scope._computeStyleProperties();-}-var props = Object.create(scope._styleProperties);-var hostAndRootProps = propertyUtils.hostAndRootPropertiesForScope(this);-this.mixin(props, hostAndRootProps.hostProps);-scopeProps = scopeProps || propertyUtils.propertyDataFromStyles(scope._styles, this).properties;-this.mixin(props, scopeProps);-this.mixin(props, hostAndRootProps.rootProps);-propertyUtils.mixinCustomStyle(props, this.customStyle);-propertyUtils.reify(props);-this._styleProperties = props;-},-_computeOwnStyleProperties: function () {-var props = {};-for (var i = 0, n; i < this._ownStylePropertyNames.length; i++) {-n = this._ownStylePropertyNames[i];-props[n] = this._styleProperties[n];-}-this._ownStyleProperties = props;-},-_scopeCount: 0,-_applyStyleProperties: function (info) {-var oldScopeSelector = this._scopeSelector;-this._scopeSelector = info ? info._scopeSelector : this.is + '-' + this.__proto__._scopeCount++;-var style = propertyUtils.applyElementStyle(this, this._styleProperties, this._scopeSelector, info && info.style);-if (!nativeShadow) {-propertyUtils.applyElementScopeSelector(this, this._scopeSelector, oldScopeSelector, this._scopeCssViaAttr);-}-return style;-},-serializeValueToAttribute: function (value, attribute, node) {-node = node || this;-if (attribute === 'class' && !nativeShadow) {-var host = node === this ? this.domHost || this.dataHost : this;-if (host) {-value = host._scopeElementClass(node, value);-}-}-node = this.shadyRoot && this.shadyRoot._hasDistributed ? Polymer.dom(node) : node;-serializeValueToAttribute.call(this, value, attribute, node);-},-_scopeElementClass: function (element, selector) {-if (!nativeShadow && !this._scopeCssViaAttr) {-selector = (selector ? selector + ' ' : '') + SCOPE_NAME + ' ' + this.is + (element._scopeSelector ? ' ' + XSCOPE_NAME + ' ' + element._scopeSelector : '');-}-return selector;-},-updateStyles: function (properties) {-if (properties) {-this.mixin(this.customStyle, properties);-}-if (nativeVariables) {-propertyUtils.updateNativeStyleProperties(this, this.customStyle);-} else {-if (this.isAttached) {-if (this._needsStyleProperties()) {-this._updateStyleProperties();-} else {-this._styleProperties = null;-}-} else {-this.__stylePropertiesInvalid = true;-}-if (this._styleCache) {-this._styleCache.clear();-}-this._updateRootStyles();-}-},-_updateRootStyles: function (root) {-root = root || this.root;-var c$ = Polymer.dom(root)._query(function (e) {-return e.shadyRoot || e.shadowRoot;-});-for (var i = 0, l = c$.length, c; i < l && (c = c$[i]); i++) {-if (c.updateStyles) {-c.updateStyles();-}-}-}-});-Polymer.updateStyles = function (properties) {-styleDefaults.updateStyles(properties);-Polymer.Base._updateRootStyles(document);-};-var styleCache = new Polymer.StyleCache();-Polymer.customStyleCache = styleCache;-var SCOPE_NAME = styleTransformer.SCOPE_NAME;-var XSCOPE_NAME = propertyUtils.XSCOPE_NAME;-}());Polymer.Base._addFeature({-_registerFeatures: function () {-this._prepIs();-if (this.factoryImpl) {-this._prepConstructor();-}-this._prepStyles();-},-_finishRegisterFeatures: function () {-this._prepTemplate();-this._prepShimStyles();-this._prepAnnotations();-this._prepEffects();-this._prepBehaviors();-this._prepPropertyInfo();-this._prepBindings();-this._prepShady();-},-_prepBehavior: function (b) {-this._addPropertyEffects(b.properties);-this._addComplexObserverEffects(b.observers);-this._addHostAttributes(b.hostAttributes);-},-_initFeatures: function () {-this._setupGestures();-this._setupConfigure(this.__data__);-this._setupStyleProperties();-this._setupDebouncers();-this._setupShady();-this._registerHost();-if (this._template) {-this._validateApplyShim();-this._poolContent();-this._beginHosting();-this._stampTemplate();-this._endHosting();-this._marshalAnnotationReferences();-}-this._marshalInstanceEffects();-this._marshalBehaviors();-this._marshalHostAttributes();-this._marshalAttributes();-this._tryReady();-},-_marshalBehavior: function (b) {-if (b.listeners) {-this._listenListeners(b.listeners);-}-}-});(function () {-var propertyUtils = Polymer.StyleProperties;-var styleUtil = Polymer.StyleUtil;-var cssParse = Polymer.CssParse;-var styleDefaults = Polymer.StyleDefaults;-var styleTransformer = Polymer.StyleTransformer;-var applyShim = Polymer.ApplyShim;-var debounce = Polymer.Debounce;-var settings = Polymer.Settings;-var updateDebouncer;-Polymer({-is: 'custom-style',-extends: 'style',-_template: null,-properties: { include: String },-ready: function () {-this.__appliedElement = this.__appliedElement || this;-this.__cssBuild = styleUtil.getCssBuildType(this);-if (this.__appliedElement !== this) {-this.__appliedElement.__cssBuild = this.__cssBuild;-}-this._tryApply();-},-attached: function () {-this._tryApply();-},-_tryApply: function () {-if (!this._appliesToDocument) {-if (this.parentNode && this.parentNode.localName !== 'dom-module') {-this._appliesToDocument = true;-var e = this.__appliedElement;-if (!settings.useNativeCSSProperties) {-this.__needsUpdateStyles = styleDefaults.hasStyleProperties();-styleDefaults.addStyle(e);-}-if (e.textContent || this.include) {-this._apply(true);-} else {-var self = this;-var observer = new MutationObserver(function () {-observer.disconnect();-self._apply(true);-});-observer.observe(e, { childList: true });-}-}-}-},-_updateStyles: function () {-Polymer.updateStyles();-},-_apply: function (initialApply) {-var e = this.__appliedElement;-if (this.include) {-e.textContent = styleUtil.cssFromModules(this.include, true) + e.textContent;-}-if (!e.textContent) {-return;-}-var buildType = this.__cssBuild;-var targetedBuild = styleUtil.isTargetedBuild(buildType);-if (settings.useNativeCSSProperties && targetedBuild) {-return;-}-var styleRules = styleUtil.rulesForStyle(e);-if (!targetedBuild) {-styleUtil.forEachRule(styleRules, function (rule) {-styleTransformer.documentRule(rule);-});-if (settings.useNativeCSSProperties && !buildType) {-applyShim.transform([e]);-}-}-if (settings.useNativeCSSProperties) {-e.textContent = styleUtil.toCssText(styleRules);-} else {-var self = this;-var fn = function fn() {-self._flushCustomProperties();-};-if (initialApply) {-Polymer.RenderStatus.whenReady(fn);-} else {-fn();-}-}-},-_flushCustomProperties: function () {-if (this.__needsUpdateStyles) {-this.__needsUpdateStyles = false;-updateDebouncer = debounce(updateDebouncer, this._updateStyles);-} else {-this._applyCustomProperties();-}-},-_applyCustomProperties: function () {-var element = this.__appliedElement;-this._computeStyleProperties();-var props = this._styleProperties;-var rules = styleUtil.rulesForStyle(element);-if (!rules) {-return;-}-element.textContent = styleUtil.toCssText(rules, function (rule) {-var css = rule.cssText = rule.parsedCssText;-if (rule.propertyInfo && rule.propertyInfo.cssText) {-css = cssParse.removeCustomPropAssignment(css);-rule.cssText = propertyUtils.valueForProperties(css, props);-}-});-}-});-}());Polymer.Templatizer = {-properties: { __hideTemplateChildren__: { observer: '_showHideChildren' } },-_instanceProps: Polymer.nob,-_parentPropPrefix: '_parent_',-templatize: function (template) {-this._templatized = template;-if (!template._content) {-template._content = template.content;-}-if (template._content._ctor) {-this.ctor = template._content._ctor;-this._prepParentProperties(this.ctor.prototype, template);-return;-}-var archetype = Object.create(Polymer.Base);-this._customPrepAnnotations(archetype, template);-this._prepParentProperties(archetype, template);-archetype._prepEffects();-this._customPrepEffects(archetype);-archetype._prepBehaviors();-archetype._prepPropertyInfo();-archetype._prepBindings();-archetype._notifyPathUp = this._notifyPathUpImpl;-archetype._scopeElementClass = this._scopeElementClassImpl;-archetype.listen = this._listenImpl;-archetype._showHideChildren = this._showHideChildrenImpl;-archetype.__setPropertyOrig = this.__setProperty;-archetype.__setProperty = this.__setPropertyImpl;-var _constructor = this._constructorImpl;-var ctor = function TemplateInstance(model, host) {-_constructor.call(this, model, host);-};-ctor.prototype = archetype;-archetype.constructor = ctor;-template._content._ctor = ctor;-this.ctor = ctor;-},-_getRootDataHost: function () {-return this.dataHost && this.dataHost._rootDataHost || this.dataHost;-},-_showHideChildrenImpl: function (hide) {-var c = this._children;-for (var i = 0; i < c.length; i++) {-var n = c[i];-if (Boolean(hide) != Boolean(n.__hideTemplateChildren__)) {-if (n.nodeType === Node.TEXT_NODE) {-if (hide) {-n.__polymerTextContent__ = n.textContent;-n.textContent = '';-} else {-n.textContent = n.__polymerTextContent__;-}-} else if (n.style) {-if (hide) {-n.__polymerDisplay__ = n.style.display;-n.style.display = 'none';-} else {-n.style.display = n.__polymerDisplay__;-}-}-}-n.__hideTemplateChildren__ = hide;-}-},-__setPropertyImpl: function (property, value, fromAbove, node) {-if (node && node.__hideTemplateChildren__ && property == 'textContent') {-property = '__polymerTextContent__';-}-this.__setPropertyOrig(property, value, fromAbove, node);-},-_debounceTemplate: function (fn) {-Polymer.dom.addDebouncer(this.debounce('_debounceTemplate', fn));-},-_flushTemplates: function () {-Polymer.dom.flush();-},-_customPrepEffects: function (archetype) {-var parentProps = archetype._parentProps;-for (var prop in parentProps) {-archetype._addPropertyEffect(prop, 'function', this._createHostPropEffector(prop));-}-for (prop in this._instanceProps) {-archetype._addPropertyEffect(prop, 'function', this._createInstancePropEffector(prop));-}-},-_customPrepAnnotations: function (archetype, template) {-archetype._template = template;-var c = template._content;-if (!c._notes) {-var rootDataHost = archetype._rootDataHost;-if (rootDataHost) {-Polymer.Annotations.prepElement = function () {-rootDataHost._prepElement();-};-}-c._notes = Polymer.Annotations.parseAnnotations(template);-Polymer.Annotations.prepElement = null;-this._processAnnotations(c._notes);-}-archetype._notes = c._notes;-archetype._parentProps = c._parentProps;-},-_prepParentProperties: function (archetype, template) {-var parentProps = this._parentProps = archetype._parentProps;-if (this._forwardParentProp && parentProps) {-var proto = archetype._parentPropProto;-var prop;-if (!proto) {-for (prop in this._instanceProps) {-delete parentProps[prop];-}-proto = archetype._parentPropProto = Object.create(null);-if (template != this) {-Polymer.Bind.prepareModel(proto);-Polymer.Base.prepareModelNotifyPath(proto);-}-for (prop in parentProps) {-var parentProp = this._parentPropPrefix + prop;-var effects = [-{-kind: 'function',-effect: this._createForwardPropEffector(prop),-fn: Polymer.Bind._functionEffect-},-{-kind: 'notify',-fn: Polymer.Bind._notifyEffect,-effect: { event: Polymer.CaseMap.camelToDashCase(parentProp) + '-changed' }-}-];-proto._propertyEffects = proto._propertyEffects || {};-proto._propertyEffects[parentProp] = effects;-Polymer.Bind._createAccessors(proto, parentProp, effects);-}-}-var self = this;-if (template != this) {-Polymer.Bind.prepareInstance(template);-template._forwardParentProp = function (source, value) {-self._forwardParentProp(source, value);-};-}-this._extendTemplate(template, proto);-template._pathEffector = function (path, value, fromAbove) {-return self._pathEffectorImpl(path, value, fromAbove);-};-}-},-_createForwardPropEffector: function (prop) {-return function (source, value) {-this._forwardParentProp(prop, value);-};-},-_createHostPropEffector: function (prop) {-var prefix = this._parentPropPrefix;-return function (source, value) {-this.dataHost._templatized[prefix + prop] = value;-};-},-_createInstancePropEffector: function (prop) {-return function (source, value, old, fromAbove) {-if (!fromAbove) {-this.dataHost._forwardInstanceProp(this, prop, value);-}-};-},-_extendTemplate: function (template, proto) {-var n$ = Object.getOwnPropertyNames(proto);-if (proto._propertySetter) {-template._propertySetter = proto._propertySetter;-}-for (var i = 0, n; i < n$.length && (n = n$[i]); i++) {-var val = template[n];-if (val && n == '_propertyEffects') {-var pe = Polymer.Base.mixin({}, val);-template._propertyEffects = Polymer.Base.mixin(pe, proto._propertyEffects);-} else {-var pd = Object.getOwnPropertyDescriptor(proto, n);-Object.defineProperty(template, n, pd);-if (val !== undefined) {-template._propertySetter(n, val);-}-}-}-},-_showHideChildren: function (hidden) {-},-_forwardInstancePath: function (inst, path, value) {-},-_forwardInstanceProp: function (inst, prop, value) {-},-_notifyPathUpImpl: function (path, value) {-var dataHost = this.dataHost;-var root = Polymer.Path.root(path);-dataHost._forwardInstancePath.call(dataHost, this, path, value);-if (root in dataHost._parentProps) {-dataHost._templatized._notifyPath(dataHost._parentPropPrefix + path, value);-}-},-_pathEffectorImpl: function (path, value, fromAbove) {-if (this._forwardParentPath) {-if (path.indexOf(this._parentPropPrefix) === 0) {-var subPath = path.substring(this._parentPropPrefix.length);-var model = Polymer.Path.root(subPath);-if (model in this._parentProps) {-this._forwardParentPath(subPath, value);-}-}-}-Polymer.Base._pathEffector.call(this._templatized, path, value, fromAbove);-},-_constructorImpl: function (model, host) {-this._rootDataHost = host._getRootDataHost();-this._setupConfigure(model);-this._registerHost(host);-this._beginHosting();-this.root = this.instanceTemplate(this._template);-this.root.__noContent = !this._notes._hasContent;-this.root.__styleScoped = true;-this._endHosting();-this._marshalAnnotatedNodes();-this._marshalInstanceEffects();-this._marshalAnnotatedListeners();-var children = [];-for (var n = this.root.firstChild; n; n = n.nextSibling) {-children.push(n);-n._templateInstance = this;-}-this._children = children;-if (host.__hideTemplateChildren__) {-this._showHideChildren(true);-}-this._tryReady();-},-_listenImpl: function (node, eventName, methodName) {-var model = this;-var host = this._rootDataHost;-var handler = host._createEventHandler(node, eventName, methodName);-var decorated = function (e) {-e.model = model;-handler(e);-};-host._listen(node, eventName, decorated);-},-_scopeElementClassImpl: function (node, value) {-var host = this._rootDataHost;-if (host) {-return host._scopeElementClass(node, value);-}-return value;-},-stamp: function (model) {-model = model || {};-if (this._parentProps) {-var templatized = this._templatized;-for (var prop in this._parentProps) {-if (model[prop] === undefined) {-model[prop] = templatized[this._parentPropPrefix + prop];-}-}-}-return new this.ctor(model, this);-},-modelForElement: function (el) {-var model;-while (el) {-if (model = el._templateInstance) {-if (model.dataHost != this) {-el = model.dataHost;-} else {-return model;-}-} else {-el = el.parentNode;-}-}-}-};Polymer({-is: 'dom-template',-extends: 'template',-_template: null,-behaviors: [Polymer.Templatizer],-ready: function () {-this.templatize(this);-}-});Polymer._collections = new WeakMap();-Polymer.Collection = function (userArray) {-Polymer._collections.set(userArray, this);-this.userArray = userArray;-this.store = userArray.slice();-this.initMap();-};-Polymer.Collection.prototype = {-constructor: Polymer.Collection,-initMap: function () {-var omap = this.omap = new WeakMap();-var pmap = this.pmap = {};-var s = this.store;-for (var i = 0; i < s.length; i++) {-var item = s[i];-if (item && typeof item == 'object') {-omap.set(item, i);-} else {-pmap[item] = i;-}-}-},-add: function (item) {-var key = this.store.push(item) - 1;-if (item && typeof item == 'object') {-this.omap.set(item, key);-} else {-this.pmap[item] = key;-}-return '#' + key;-},-removeKey: function (key) {-if (key = this._parseKey(key)) {-this._removeFromMap(this.store[key]);-delete this.store[key];-}-},-_removeFromMap: function (item) {-if (item && typeof item == 'object') {-this.omap.delete(item);-} else {-delete this.pmap[item];-}-},-remove: function (item) {-var key = this.getKey(item);-this.removeKey(key);-return key;-},-getKey: function (item) {-var key;-if (item && typeof item == 'object') {-key = this.omap.get(item);-} else {-key = this.pmap[item];-}-if (key != undefined) {-return '#' + key;-}-},-getKeys: function () {-return Object.keys(this.store).map(function (key) {-return '#' + key;-});-},-_parseKey: function (key) {-if (key && key[0] == '#') {-return key.slice(1);-}-},-setItem: function (key, item) {-if (key = this._parseKey(key)) {-var old = this.store[key];-if (old) {-this._removeFromMap(old);-}-if (item && typeof item == 'object') {-this.omap.set(item, key);-} else {-this.pmap[item] = key;-}-this.store[key] = item;-}-},-getItem: function (key) {-if (key = this._parseKey(key)) {-return this.store[key];-}-},-getItems: function () {-var items = [], store = this.store;-for (var key in store) {-items.push(store[key]);-}-return items;-},-_applySplices: function (splices) {-var keyMap = {}, key;-for (var i = 0, s; i < splices.length && (s = splices[i]); i++) {-s.addedKeys = [];-for (var j = 0; j < s.removed.length; j++) {-key = this.getKey(s.removed[j]);-keyMap[key] = keyMap[key] ? null : -1;-}-for (j = 0; j < s.addedCount; j++) {-var item = this.userArray[s.index + j];-key = this.getKey(item);-key = key === undefined ? this.add(item) : key;-keyMap[key] = keyMap[key] ? null : 1;-s.addedKeys.push(key);-}-}-var removed = [];-var added = [];-for (key in keyMap) {-if (keyMap[key] < 0) {-this.removeKey(key);-removed.push(key);-}-if (keyMap[key] > 0) {-added.push(key);-}-}-return [{-removed: removed,-added: added-}];-}-};-Polymer.Collection.get = function (userArray) {-return Polymer._collections.get(userArray) || new Polymer.Collection(userArray);-};-Polymer.Collection.applySplices = function (userArray, splices) {-var coll = Polymer._collections.get(userArray);-return coll ? coll._applySplices(splices) : null;-};Polymer({-is: 'dom-repeat',-extends: 'template',-_template: null,-properties: {-items: { type: Array },-as: {-type: String,-value: 'item'-},-indexAs: {-type: String,-value: 'index'-},-sort: {-type: Function,-observer: '_sortChanged'-},-filter: {-type: Function,-observer: '_filterChanged'-},-observe: {-type: String,-observer: '_observeChanged'-},-delay: Number,-renderedItemCount: {-type: Number,-notify: !Polymer.Settings.suppressTemplateNotifications,-readOnly: true-},-initialCount: {-type: Number,-observer: '_initializeChunking'-},-targetFramerate: {-type: Number,-value: 20-},-notifyDomChange: { type: Boolean },-_targetFrameTime: {-type: Number,-computed: '_computeFrameTime(targetFramerate)'-}-},-behaviors: [Polymer.Templatizer],-observers: ['_itemsChanged(items.*)'],-created: function () {-this._instances = [];-this._pool = [];-this._limit = Infinity;-var self = this;-this._boundRenderChunk = function () {-self._renderChunk();-};-},-detached: function () {-this.__isDetached = true;-for (var i = 0; i < this._instances.length; i++) {-this._detachInstance(i);-}-},-attached: function () {-if (this.__isDetached) {-this.__isDetached = false;-var refNode;-var parentNode = Polymer.dom(this).parentNode;-if (parentNode.localName == this.is) {-refNode = parentNode;-parentNode = Polymer.dom(parentNode).parentNode;-} else {-refNode = this;-}-var parent = Polymer.dom(parentNode);-for (var i = 0; i < this._instances.length; i++) {-this._attachInstance(i, parent, refNode);-}-}-},-ready: function () {-this._instanceProps = { __key__: true };-this._instanceProps[this.as] = true;-this._instanceProps[this.indexAs] = true;-if (!this.ctor) {-this.templatize(this);-}-},-_sortChanged: function (sort) {-var dataHost = this._getRootDataHost();-this._sortFn = sort && (typeof sort == 'function' ? sort : function () {-return dataHost[sort].apply(dataHost, arguments);-});-this._needFullRefresh = true;-if (this.items) {-this._debounceTemplate(this._render);-}-},-_filterChanged: function (filter) {-var dataHost = this._getRootDataHost();-this._filterFn = filter && (typeof filter == 'function' ? filter : function () {-return dataHost[filter].apply(dataHost, arguments);-});-this._needFullRefresh = true;-if (this.items) {-this._debounceTemplate(this._render);-}-},-_computeFrameTime: function (rate) {-return Math.ceil(1000 / rate);-},-_initializeChunking: function () {-if (this.initialCount) {-this._limit = this.initialCount;-this._chunkCount = this.initialCount;-this._lastChunkTime = performance.now();-}-},-_tryRenderChunk: function () {-if (this.items && this._limit < this.items.length) {-this.debounce('renderChunk', this._requestRenderChunk);-}-},-_requestRenderChunk: function () {-requestAnimationFrame(this._boundRenderChunk);-},-_renderChunk: function () {-var currChunkTime = performance.now();-var ratio = this._targetFrameTime / (currChunkTime - this._lastChunkTime);-this._chunkCount = Math.round(this._chunkCount * ratio) || 1;-this._limit += this._chunkCount;-this._lastChunkTime = currChunkTime;-this._debounceTemplate(this._render);-},-_observeChanged: function () {-this._observePaths = this.observe && this.observe.replace('.*', '.').split(' ');-},-_itemsChanged: function (change) {-if (change.path == 'items') {-if (Array.isArray(this.items)) {-this.collection = Polymer.Collection.get(this.items);-} else if (!this.items) {-this.collection = null;-} else {-this._error(this._logf('dom-repeat', 'expected array for `items`,' + ' found', this.items));-}-this._keySplices = [];-this._indexSplices = [];-this._needFullRefresh = true;-this._initializeChunking();-this._debounceTemplate(this._render);-} else if (change.path == 'items.splices') {-this._keySplices = this._keySplices.concat(change.value.keySplices);-this._indexSplices = this._indexSplices.concat(change.value.indexSplices);-this._debounceTemplate(this._render);-} else {-var subpath = change.path.slice(6);-this._forwardItemPath(subpath, change.value);-this._checkObservedPaths(subpath);-}-},-_checkObservedPaths: function (path) {-if (this._observePaths) {-path = path.substring(path.indexOf('.') + 1);-var paths = this._observePaths;-for (var i = 0; i < paths.length; i++) {-if (path.indexOf(paths[i]) === 0) {-this._needFullRefresh = true;-if (this.delay) {-this.debounce('render', this._render, this.delay);-} else {-this._debounceTemplate(this._render);-}-return;-}-}-}-},-render: function () {-this._needFullRefresh = true;-this._debounceTemplate(this._render);-this._flushTemplates();-},-_render: function () {-if (this._needFullRefresh) {-this._applyFullRefresh();-this._needFullRefresh = false;-} else if (this._keySplices.length) {-if (this._sortFn) {-this._applySplicesUserSort(this._keySplices);-} else {-if (this._filterFn) {-this._applyFullRefresh();-} else {-this._applySplicesArrayOrder(this._indexSplices);-}-}-} else {-}-this._keySplices = [];-this._indexSplices = [];-var keyToIdx = this._keyToInstIdx = {};-for (var i = this._instances.length - 1; i >= 0; i--) {-var inst = this._instances[i];-if (inst.isPlaceholder && i < this._limit) {-inst = this._insertInstance(i, inst.__key__);-} else if (!inst.isPlaceholder && i >= this._limit) {-inst = this._downgradeInstance(i, inst.__key__);-}-keyToIdx[inst.__key__] = i;-if (!inst.isPlaceholder) {-inst.__setProperty(this.indexAs, i, true);-}-}-this._pool.length = 0;-this._setRenderedItemCount(this._instances.length);-if (!Polymer.Settings.suppressTemplateNotifications || this.notifyDomChange) {-this.fire('dom-change');-}-this._tryRenderChunk();-},-_applyFullRefresh: function () {-var c = this.collection;-var keys;-if (this._sortFn) {-keys = c ? c.getKeys() : [];-} else {-keys = [];-var items = this.items;-if (items) {-for (var i = 0; i < items.length; i++) {-keys.push(c.getKey(items[i]));-}-}-}-var self = this;-if (this._filterFn) {-keys = keys.filter(function (a) {-return self._filterFn(c.getItem(a));-});-}-if (this._sortFn) {-keys.sort(function (a, b) {-return self._sortFn(c.getItem(a), c.getItem(b));-});-}-for (i = 0; i < keys.length; i++) {-var key = keys[i];-var inst = this._instances[i];-if (inst) {-inst.__key__ = key;-if (!inst.isPlaceholder && i < this._limit) {-inst.__setProperty(this.as, c.getItem(key), true);-}-} else if (i < this._limit) {-this._insertInstance(i, key);-} else {-this._insertPlaceholder(i, key);-}-}-for (var j = this._instances.length - 1; j >= i; j--) {-this._detachAndRemoveInstance(j);-}-},-_numericSort: function (a, b) {-return a - b;-},-_applySplicesUserSort: function (splices) {-var c = this.collection;-var keyMap = {};-var key;-for (var i = 0, s; i < splices.length && (s = splices[i]); i++) {-for (var j = 0; j < s.removed.length; j++) {-key = s.removed[j];-keyMap[key] = keyMap[key] ? null : -1;-}-for (j = 0; j < s.added.length; j++) {-key = s.added[j];-keyMap[key] = keyMap[key] ? null : 1;-}-}-var removedIdxs = [];-var addedKeys = [];-for (key in keyMap) {-if (keyMap[key] === -1) {-removedIdxs.push(this._keyToInstIdx[key]);-}-if (keyMap[key] === 1) {-addedKeys.push(key);-}-}-if (removedIdxs.length) {-removedIdxs.sort(this._numericSort);-for (i = removedIdxs.length - 1; i >= 0; i--) {-var idx = removedIdxs[i];-if (idx !== undefined) {-this._detachAndRemoveInstance(idx);-}-}-}-var self = this;-if (addedKeys.length) {-if (this._filterFn) {-addedKeys = addedKeys.filter(function (a) {-return self._filterFn(c.getItem(a));-});-}-addedKeys.sort(function (a, b) {-return self._sortFn(c.getItem(a), c.getItem(b));-});-var start = 0;-for (i = 0; i < addedKeys.length; i++) {-start = this._insertRowUserSort(start, addedKeys[i]);-}-}-},-_insertRowUserSort: function (start, key) {-var c = this.collection;-var item = c.getItem(key);-var end = this._instances.length - 1;-var idx = -1;-while (start <= end) {-var mid = start + end >> 1;-var midKey = this._instances[mid].__key__;-var cmp = this._sortFn(c.getItem(midKey), item);-if (cmp < 0) {-start = mid + 1;-} else if (cmp > 0) {-end = mid - 1;-} else {-idx = mid;-break;-}-}-if (idx < 0) {-idx = end + 1;-}-this._insertPlaceholder(idx, key);-return idx;-},-_applySplicesArrayOrder: function (splices) {-for (var i = 0, s; i < splices.length && (s = splices[i]); i++) {-for (var j = 0; j < s.removed.length; j++) {-this._detachAndRemoveInstance(s.index);-}-for (j = 0; j < s.addedKeys.length; j++) {-this._insertPlaceholder(s.index + j, s.addedKeys[j]);-}-}-},-_detachInstance: function (idx) {-var inst = this._instances[idx];-if (!inst.isPlaceholder) {-for (var i = 0; i < inst._children.length; i++) {-var el = inst._children[i];-Polymer.dom(inst.root).appendChild(el);-}-return inst;-}-},-_attachInstance: function (idx, parent, refNode) {-var inst = this._instances[idx];-if (!inst.isPlaceholder) {-parent.insertBefore(inst.root, refNode);-}-},-_detachAndRemoveInstance: function (idx) {-var inst = this._detachInstance(idx);-if (inst) {-this._pool.push(inst);-}-this._instances.splice(idx, 1);-},-_insertPlaceholder: function (idx, key) {-this._instances.splice(idx, 0, {-isPlaceholder: true,-__key__: key-});-},-_stampInstance: function (idx, key) {-var model = { __key__: key };-model[this.as] = this.collection.getItem(key);-model[this.indexAs] = idx;-return this.stamp(model);-},-_insertInstance: function (idx, key) {-var inst = this._pool.pop();-if (inst) {-inst.__setProperty(this.as, this.collection.getItem(key), true);-inst.__setProperty('__key__', key, true);-} else {-inst = this._stampInstance(idx, key);-}-var beforeRow = this._instances[idx + 1];-var beforeNode = beforeRow && !beforeRow.isPlaceholder ? beforeRow._children[0] : this;-var parentNode = Polymer.dom(this).parentNode;-if (parentNode.localName == this.is) {-if (beforeNode == this) {-beforeNode = parentNode;-}-parentNode = Polymer.dom(parentNode).parentNode;-}-Polymer.dom(parentNode).insertBefore(inst.root, beforeNode);-this._instances[idx] = inst;-return inst;-},-_downgradeInstance: function (idx, key) {-var inst = this._detachInstance(idx);-if (inst) {-this._pool.push(inst);-}-inst = {-isPlaceholder: true,-__key__: key-};-this._instances[idx] = inst;-return inst;-},-_showHideChildren: function (hidden) {-for (var i = 0; i < this._instances.length; i++) {-if (!this._instances[i].isPlaceholder)-this._instances[i]._showHideChildren(hidden);-}-},-_forwardInstanceProp: function (inst, prop, value) {-if (prop == this.as) {-var idx;-if (this._sortFn || this._filterFn) {-idx = this.items.indexOf(this.collection.getItem(inst.__key__));-} else {-idx = inst[this.indexAs];-}-this.set('items.' + idx, value);-}-},-_forwardInstancePath: function (inst, path, value) {-if (path.indexOf(this.as + '.') === 0) {-this._notifyPath('items.' + inst.__key__ + '.' + path.slice(this.as.length + 1), value);-}-},-_forwardParentProp: function (prop, value) {-var i$ = this._instances;-for (var i = 0, inst; i < i$.length && (inst = i$[i]); i++) {-if (!inst.isPlaceholder) {-inst.__setProperty(prop, value, true);-}-}-},-_forwardParentPath: function (path, value) {-var i$ = this._instances;-for (var i = 0, inst; i < i$.length && (inst = i$[i]); i++) {-if (!inst.isPlaceholder) {-inst._notifyPath(path, value, true);-}-}-},-_forwardItemPath: function (path, value) {-if (this._keyToInstIdx) {-var dot = path.indexOf('.');-var key = path.substring(0, dot < 0 ? path.length : dot);-var idx = this._keyToInstIdx[key];-var inst = this._instances[idx];-if (inst && !inst.isPlaceholder) {-if (dot >= 0) {-path = this.as + '.' + path.substring(dot + 1);-inst._notifyPath(path, value, true);-} else {-inst.__setProperty(this.as, value, true);-}-}-}-},-itemForElement: function (el) {-var instance = this.modelForElement(el);-return instance && instance[this.as];-},-keyForElement: function (el) {-var instance = this.modelForElement(el);-return instance && instance.__key__;-},-indexForElement: function (el) {-var instance = this.modelForElement(el);-return instance && instance[this.indexAs];-}-});Polymer({-is: 'array-selector',-_template: null,-properties: {-items: {-type: Array,-observer: 'clearSelection'-},-multi: {-type: Boolean,-value: false,-observer: 'clearSelection'-},-selected: {-type: Object,-notify: true-},-selectedItem: {-type: Object,-notify: true-},-toggle: {-type: Boolean,-value: false-}-},-clearSelection: function () {-if (Array.isArray(this.selected)) {-for (var i = 0; i < this.selected.length; i++) {-this.unlinkPaths('selected.' + i);-}-} else {-this.unlinkPaths('selected');-this.unlinkPaths('selectedItem');-}-if (this.multi) {-if (!this.selected || this.selected.length) {-this.selected = [];-this._selectedColl = Polymer.Collection.get(this.selected);-}-} else {-this.selected = null;-this._selectedColl = null;-}-this.selectedItem = null;-},-isSelected: function (item) {-if (this.multi) {-return this._selectedColl.getKey(item) !== undefined;-} else {-return this.selected == item;-}-},-deselect: function (item) {-if (this.multi) {-if (this.isSelected(item)) {-var skey = this._selectedColl.getKey(item);-this.arrayDelete('selected', item);-this.unlinkPaths('selected.' + skey);-}-} else {-this.selected = null;-this.selectedItem = null;-this.unlinkPaths('selected');-this.unlinkPaths('selectedItem');-}-},-select: function (item) {-var icol = Polymer.Collection.get(this.items);-var key = icol.getKey(item);-if (this.multi) {-if (this.isSelected(item)) {-if (this.toggle) {-this.deselect(item);-}-} else {-this.push('selected', item);-var skey = this._selectedColl.getKey(item);-this.linkPaths('selected.' + skey, 'items.' + key);-}-} else {-if (this.toggle && item == this.selected) {-this.deselect();-} else {-this.selected = item;-this.selectedItem = item;-this.linkPaths('selected', 'items.' + key);-this.linkPaths('selectedItem', 'items.' + key);-}-}-}-});Polymer({-is: 'dom-if',-extends: 'template',-_template: null,-properties: {-'if': {-type: Boolean,-value: false,-observer: '_queueRender'-},-restamp: {-type: Boolean,-value: false,-observer: '_queueRender'-},-notifyDomChange: { type: Boolean }-},-behaviors: [Polymer.Templatizer],-_queueRender: function () {-this._debounceTemplate(this._render);-},-detached: function () {-var parentNode = this.parentNode;-if (parentNode && parentNode.localName == this.is) {-parentNode = Polymer.dom(parentNode).parentNode;-}-if (!parentNode || parentNode.nodeType == Node.DOCUMENT_FRAGMENT_NODE && (!Polymer.Settings.hasShadow || !(parentNode instanceof ShadowRoot))) {-this._teardownInstance();-}-},-attached: function () {-if (this.if && this.ctor) {-this.async(this._ensureInstance);-}-},-render: function () {-this._flushTemplates();-},-_render: function () {-if (this.if) {-if (!this.ctor) {-this.templatize(this);-}-this._ensureInstance();-this._showHideChildren();-} else if (this.restamp) {-this._teardownInstance();-}-if (!this.restamp && this._instance) {-this._showHideChildren();-}-if (this.if != this._lastIf) {-if (!Polymer.Settings.suppressTemplateNotifications || this.notifyDomChange) {-this.fire('dom-change');-}-this._lastIf = this.if;-}-},-_ensureInstance: function () {-var refNode;-var parentNode = Polymer.dom(this).parentNode;-if (parentNode && parentNode.localName == this.is) {-refNode = parentNode;-parentNode = Polymer.dom(parentNode).parentNode;-} else {-refNode = this;-}-if (parentNode) {-if (!this._instance) {-this._instance = this.stamp();-var root = this._instance.root;-Polymer.dom(parentNode).insertBefore(root, refNode);-} else {-var c$ = this._instance._children;-if (c$ && c$.length) {-var lastChild = Polymer.dom(refNode).previousSibling;-if (lastChild !== c$[c$.length - 1]) {-for (var i = 0, n; i < c$.length && (n = c$[i]); i++) {-Polymer.dom(parentNode).insertBefore(n, refNode);-}-}-}-}-}-},-_teardownInstance: function () {-if (this._instance) {-var c$ = this._instance._children;-if (c$ && c$.length) {-var parent = Polymer.dom(Polymer.dom(c$[0]).parentNode);-for (var i = 0, n; i < c$.length && (n = c$[i]); i++) {-parent.removeChild(n);-}-}-this._instance = null;-}-},-_showHideChildren: function () {-var hidden = this.__hideTemplateChildren__ || !this.if;-if (this._instance) {-this._instance._showHideChildren(hidden);-}-},-_forwardParentProp: function (prop, value) {-if (this._instance) {-this._instance.__setProperty(prop, value, true);-}-},-_forwardParentPath: function (path, value) {-if (this._instance) {-this._instance._notifyPath(path, value, true);-}-}-});Polymer({-is: 'dom-bind',-properties: { notifyDomChange: { type: Boolean } },-extends: 'template',-_template: null,-created: function () {-var self = this;-Polymer.RenderStatus.whenReady(function () {-if (document.readyState == 'loading') {-document.addEventListener('DOMContentLoaded', function () {-self._markImportsReady();-});-} else {-self._markImportsReady();-}-});-},-_ensureReady: function () {-if (!this._readied) {-this._readySelf();-}-},-_markImportsReady: function () {-this._importsReady = true;-this._ensureReady();-},-_registerFeatures: function () {-this._prepConstructor();-},-_insertChildren: function () {-var refNode;-var parentNode = Polymer.dom(this).parentNode;-if (parentNode.localName == this.is) {-refNode = parentNode;-parentNode = Polymer.dom(parentNode).parentNode;-} else {-refNode = this;-}-Polymer.dom(parentNode).insertBefore(this.root, refNode);-},-_removeChildren: function () {-if (this._children) {-for (var i = 0; i < this._children.length; i++) {-this.root.appendChild(this._children[i]);-}-}-},-_initFeatures: function () {-},-_scopeElementClass: function (element, selector) {-if (this.dataHost) {-return this.dataHost._scopeElementClass(element, selector);-} else {-return selector;-}-},-_configureInstanceProperties: function () {-},-_prepConfigure: function () {-var config = {};-for (var prop in this._propertyEffects) {-config[prop] = this[prop];-}-var setupConfigure = this._setupConfigure;-this._setupConfigure = function () {-setupConfigure.call(this, config);-};-},-attached: function () {-if (this._importsReady) {-this.render();-}-},-detached: function () {-this._removeChildren();-},-render: function () {-this._ensureReady();-if (!this._children) {-this._template = this;-this._prepAnnotations();-this._prepEffects();-this._prepBehaviors();-this._prepConfigure();-this._prepBindings();-this._prepPropertyInfo();-Polymer.Base._initFeatures.call(this);-this._children = Polymer.TreeApi.arrayCopyChildNodes(this.root);-}-this._insertChildren();-if (!Polymer.Settings.suppressTemplateNotifications || this.notifyDomChange) {-this.fire('dom-change');-}-}-});</script>---------+-->+<link rel="import" href="lib/legacy/legacy-element-mixin.html">+<link rel="import" href="lib/legacy/polymer-fn.html">+<!-- template elements -->+<link rel="import" href="lib/legacy/templatizer-behavior.html">+<link rel="import" href="lib/elements/dom-bind.html">+<link rel="import" href="lib/elements/dom-repeat.html">+<link rel="import" href="lib/elements/dom-if.html">+<link rel="import" href="lib/elements/array-selector.html">+<!-- custom-style -->+<link rel="import" href="lib/elements/custom-style.html">+<!-- bc behaviors -->+<link rel="import" href="lib/legacy/mutable-data-behavior.html">+<script>+ // bc+ Polymer.Base = Polymer.LegacyElementMixin(HTMLElement).prototype;+</script>diff --git a/manager/client/src/main/webapp/bower_components/webcomponentsjs/.bower.json b/manager/client/src/main/webapp/bower_components/webcomponentsjs/.bower.jsonindex bcc24807f..bf9b12d2c 100644--- a/manager/client/src/main/webapp/bower_components/webcomponentsjs/.bower.json+++ b/manager/client/src/main/webapp/bower_components/webcomponentsjs/.bower.json@@ -1,7 +1,7 @@{"name": "webcomponentsjs",+ "description": "Web components polyfill","main": "webcomponents.js",- "version": "0.7.24","homepage": "http://webcomponents.org","authors": ["The Polymer Authors"@@ -11,20 +11,24 @@"url": "https://github.com/webcomponents/webcomponentsjs.git"},"keywords": [- "webcomponents"+ "webcomponents",+ "web-components",+ "polyfill",+ "shim"],- "license": "BSD",+ "license": "BSD-3-Clause","ignore": [],"devDependencies": {- "web-component-tester": "^4.0.1"+ "web-component-tester": "^v6.0.0"},- "_release": "0.7.24",+ "version": "1.0.11",+ "_release": "1.0.11","_resolution": {"type": "version",- "tag": "v0.7.24",- "commit": "8a2e40557b177e2cca0def2553f84c8269c8f93e"+ "tag": "v1.0.11",+ "commit": "b381fb0ef4da2b0f228f6356a1906721ddec5594"},"_source": "https://github.com/Polymer/webcomponentsjs.git",- "_target": "^0.7.24",+ "_target": "^v1.0.2","_originalSource": "webcomponentsjs"}\ No newline at end of filediff --git a/manager/client/src/main/webapp/bower_components/webcomponentsjs/CustomElements.js b/manager/client/src/main/webapp/bower_components/webcomponentsjs/CustomElements.jsdeleted file mode 100644index dcd9dde6b..000000000--- a/manager/client/src/main/webapp/bower_components/webcomponentsjs/CustomElements.js+++ /dev/null@@ -1,1029 +0,0 @@-/**- * @license- * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.- * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt- * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt- * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt- * Code distributed by Google as part of the polymer project is also- * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt- */-// @version 0.7.24-if (typeof WeakMap === "undefined") {- (function() {- var defineProperty = Object.defineProperty;- var counter = Date.now() % 1e9;- var WeakMap = function() {- this.name = "__st" + (Math.random() * 1e9 >>> 0) + (counter++ + "__");- };- WeakMap.prototype = {- set: function(key, value) {- var entry = key[this.name];- if (entry && entry[0] === key) entry[1] = value; else defineProperty(key, this.name, {- value: [ key, value ],- writable: true- });- return this;- },- get: function(key) {- var entry;- return (entry = key[this.name]) && entry[0] === key ? entry[1] : undefined;- },- "delete": function(key) {- var entry = key[this.name];- if (!entry || entry[0] !== key) return false;- entry[0] = entry[1] = undefined;- return true;- },- has: function(key) {- var entry = key[this.name];- if (!entry) return false;- return entry[0] === key;- }- };- window.WeakMap = WeakMap;- })();-}--(function(global) {- if (global.JsMutationObserver) {- return;- }- var registrationsTable = new WeakMap();- var setImmediate;- if (/Trident|Edge/.test(navigator.userAgent)) {- setImmediate = setTimeout;- } else if (window.setImmediate) {- setImmediate = window.setImmediate;- } else {- var setImmediateQueue = [];- var sentinel = String(Math.random());- window.addEventListener("message", function(e) {- if (e.data === sentinel) {- var queue = setImmediateQueue;- setImmediateQueue = [];- queue.forEach(function(func) {- func();- });- }- });- setImmediate = function(func) {- setImmediateQueue.push(func);- window.postMessage(sentinel, "*");- };- }- var isScheduled = false;- var scheduledObservers = [];- function scheduleCallback(observer) {- scheduledObservers.push(observer);- if (!isScheduled) {- isScheduled = true;- setImmediate(dispatchCallbacks);- }- }- function wrapIfNeeded(node) {- return window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(node) || node;- }- function dispatchCallbacks() {- isScheduled = false;- var observers = scheduledObservers;- scheduledObservers = [];- observers.sort(function(o1, o2) {- return o1.uid_ - o2.uid_;- });- var anyNonEmpty = false;- observers.forEach(function(observer) {- var queue = observer.takeRecords();- removeTransientObserversFor(observer);- if (queue.length) {- observer.callback_(queue, observer);- anyNonEmpty = true;- }- });- if (anyNonEmpty) dispatchCallbacks();- }- function removeTransientObserversFor(observer) {- observer.nodes_.forEach(function(node) {- var registrations = registrationsTable.get(node);- if (!registrations) return;- registrations.forEach(function(registration) {- if (registration.observer === observer) registration.removeTransientObservers();- });- });- }- function forEachAncestorAndObserverEnqueueRecord(target, callback) {- for (var node = target; node; node = node.parentNode) {- var registrations = registrationsTable.get(node);- if (registrations) {- for (var j = 0; j < registrations.length; j++) {- var registration = registrations[j];- var options = registration.options;- if (node !== target && !options.subtree) continue;- var record = callback(options);- if (record) registration.enqueue(record);- }- }- }- }- var uidCounter = 0;- function JsMutationObserver(callback) {- this.callback_ = callback;- this.nodes_ = [];- this.records_ = [];- this.uid_ = ++uidCounter;- }- JsMutationObserver.prototype = {- observe: function(target, options) {- target = wrapIfNeeded(target);- if (!options.childList && !options.attributes && !options.characterData || options.attributeOldValue && !options.attributes || options.attributeFilter && options.attributeFilter.length && !options.attributes || options.characterDataOldValue && !options.characterData) {- throw new SyntaxError();- }- var registrations = registrationsTable.get(target);- if (!registrations) registrationsTable.set(target, registrations = []);- var registration;- for (var i = 0; i < registrations.length; i++) {- if (registrations[i].observer === this) {- registration = registrations[i];- registration.removeListeners();- registration.options = options;- break;- }- }- if (!registration) {- registration = new Registration(this, target, options);- registrations.push(registration);- this.nodes_.push(target);- }- registration.addListeners();- },- disconnect: function() {- this.nodes_.forEach(function(node) {- var registrations = registrationsTable.get(node);- for (var i = 0; i < registrations.length; i++) {- var registration = registrations[i];- if (registration.observer === this) {- registration.removeListeners();- registrations.splice(i, 1);- break;- }- }- }, this);- this.records_ = [];- },- takeRecords: function() {- var copyOfRecords = this.records_;- this.records_ = [];- return copyOfRecords;- }- };- function MutationRecord(type, target) {- this.type = type;- this.target = target;- this.addedNodes = [];- this.removedNodes = [];- this.previousSibling = null;- this.nextSibling = null;- this.attributeName = null;- this.attributeNamespace = null;- this.oldValue = null;- }- function copyMutationRecord(original) {- var record = new MutationRecord(original.type, original.target);- record.addedNodes = original.addedNodes.slice();- record.removedNodes = original.removedNodes.slice();- record.previousSibling = original.previousSibling;- record.nextSibling = original.nextSibling;- record.attributeName = original.attributeName;- record.attributeNamespace = original.attributeNamespace;- record.oldValue = original.oldValue;- return record;- }- var currentRecord, recordWithOldValue;- function getRecord(type, target) {- return currentRecord = new MutationRecord(type, target);- }- function getRecordWithOldValue(oldValue) {- if (recordWithOldValue) return recordWithOldValue;- recordWithOldValue = copyMutationRecord(currentRecord);- recordWithOldValue.oldValue = oldValue;- return recordWithOldValue;- }- function clearRecords() {- currentRecord = recordWithOldValue = undefined;- }- function recordRepresentsCurrentMutation(record) {- return record === recordWithOldValue || record === currentRecord;- }- function selectRecord(lastRecord, newRecord) {- if (lastRecord === newRecord) return lastRecord;- if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord)) return recordWithOldValue;- return null;- }- function Registration(observer, target, options) {- this.observer = observer;- this.target = target;- this.options = options;- this.transientObservedNodes = [];- }- Registration.prototype = {- enqueue: function(record) {- var records = this.observer.records_;- var length = records.length;- if (records.length > 0) {- var lastRecord = records[length - 1];- var recordToReplaceLast = selectRecord(lastRecord, record);- if (recordToReplaceLast) {- records[length - 1] = recordToReplaceLast;- return;- }- } else {- scheduleCallback(this.observer);- }- records[length] = record;- },- addListeners: function() {- this.addListeners_(this.target);- },- addListeners_: function(node) {- var options = this.options;- if (options.attributes) node.addEventListener("DOMAttrModified", this, true);- if (options.characterData) node.addEventListener("DOMCharacterDataModified", this, true);- if (options.childList) node.addEventListener("DOMNodeInserted", this, true);- if (options.childList || options.subtree) node.addEventListener("DOMNodeRemoved", this, true);- },- removeListeners: function() {- this.removeListeners_(this.target);- },- removeListeners_: function(node) {- var options = this.options;- if (options.attributes) node.removeEventListener("DOMAttrModified", this, true);- if (options.characterData) node.removeEventListener("DOMCharacterDataModified", this, true);- if (options.childList) node.removeEventListener("DOMNodeInserted", this, true);- if (options.childList || options.subtree) node.removeEventListener("DOMNodeRemoved", this, true);- },- addTransientObserver: function(node) {- if (node === this.target) return;- this.addListeners_(node);- this.transientObservedNodes.push(node);- var registrations = registrationsTable.get(node);- if (!registrations) registrationsTable.set(node, registrations = []);- registrations.push(this);- },- removeTransientObservers: function() {- var transientObservedNodes = this.transientObservedNodes;- this.transientObservedNodes = [];- transientObservedNodes.forEach(function(node) {- this.removeListeners_(node);- var registrations = registrationsTable.get(node);- for (var i = 0; i < registrations.length; i++) {- if (registrations[i] === this) {- registrations.splice(i, 1);- break;- }- }- }, this);- },- handleEvent: function(e) {- e.stopImmediatePropagation();- switch (e.type) {- case "DOMAttrModified":- var name = e.attrName;- var namespace = e.relatedNode.namespaceURI;- var target = e.target;- var record = new getRecord("attributes", target);- record.attributeName = name;- record.attributeNamespace = namespace;- var oldValue = e.attrChange === MutationEvent.ADDITION ? null : e.prevValue;- forEachAncestorAndObserverEnqueueRecord(target, function(options) {- if (!options.attributes) return;- if (options.attributeFilter && options.attributeFilter.length && options.attributeFilter.indexOf(name) === -1 && options.attributeFilter.indexOf(namespace) === -1) {- return;- }- if (options.attributeOldValue) return getRecordWithOldValue(oldValue);- return record;- });- break;-- case "DOMCharacterDataModified":- var target = e.target;- var record = getRecord("characterData", target);- var oldValue = e.prevValue;- forEachAncestorAndObserverEnqueueRecord(target, function(options) {- if (!options.characterData) return;- if (options.characterDataOldValue) return getRecordWithOldValue(oldValue);- return record;- });- break;-- case "DOMNodeRemoved":- this.addTransientObserver(e.target);-- case "DOMNodeInserted":- var changedNode = e.target;- var addedNodes, removedNodes;- if (e.type === "DOMNodeInserted") {- addedNodes = [ changedNode ];- removedNodes = [];- } else {- addedNodes = [];- removedNodes = [ changedNode ];- }- var previousSibling = changedNode.previousSibling;- var nextSibling = changedNode.nextSibling;- var record = getRecord("childList", e.target.parentNode);- record.addedNodes = addedNodes;- record.removedNodes = removedNodes;- record.previousSibling = previousSibling;- record.nextSibling = nextSibling;- forEachAncestorAndObserverEnqueueRecord(e.relatedNode, function(options) {- if (!options.childList) return;- return record;- });- }- clearRecords();- }- };- global.JsMutationObserver = JsMutationObserver;- if (!global.MutationObserver) {- global.MutationObserver = JsMutationObserver;- JsMutationObserver._isPolyfilled = true;- }-})(self);--(function(scope) {- "use strict";- if (!(window.performance && window.performance.now)) {- var start = Date.now();- window.performance = {- now: function() {- return Date.now() - start;- }- };- }- if (!window.requestAnimationFrame) {- window.requestAnimationFrame = function() {- var nativeRaf = window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame;- return nativeRaf ? function(callback) {- return nativeRaf(function() {- callback(performance.now());- });- } : function(callback) {- return window.setTimeout(callback, 1e3 / 60);- };- }();- }- if (!window.cancelAnimationFrame) {- window.cancelAnimationFrame = function() {- return window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || function(id) {- clearTimeout(id);- };- }();- }- var workingDefaultPrevented = function() {- var e = document.createEvent("Event");- e.initEvent("foo", true, true);- e.preventDefault();- return e.defaultPrevented;- }();- if (!workingDefaultPrevented) {- var origPreventDefault = Event.prototype.preventDefault;- Event.prototype.preventDefault = function() {- if (!this.cancelable) {- return;- }- origPreventDefault.call(this);- Object.defineProperty(this, "defaultPrevented", {- get: function() {- return true;- },- configurable: true- });- };- }- var isIE = /Trident/.test(navigator.userAgent);- if (!window.CustomEvent || isIE && typeof window.CustomEvent !== "function") {- window.CustomEvent = function(inType, params) {- params = params || {};- var e = document.createEvent("CustomEvent");- e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);- return e;- };- window.CustomEvent.prototype = window.Event.prototype;- }- if (!window.Event || isIE && typeof window.Event !== "function") {- var origEvent = window.Event;- window.Event = function(inType, params) {- params = params || {};- var e = document.createEvent("Event");- e.initEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable));- return e;- };- window.Event.prototype = origEvent.prototype;- }-})(window.WebComponents);--window.CustomElements = window.CustomElements || {- flags: {}-};--(function(scope) {- var flags = scope.flags;- var modules = [];- var addModule = function(module) {- modules.push(module);- };- var initializeModules = function() {- modules.forEach(function(module) {- module(scope);- });- };- scope.addModule = addModule;- scope.initializeModules = initializeModules;- scope.hasNative = Boolean(document.registerElement);- scope.isIE = /Trident/.test(navigator.userAgent);- scope.useNative = !flags.register && scope.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || window.HTMLImports.useNative);-})(window.CustomElements);--window.CustomElements.addModule(function(scope) {- var IMPORT_LINK_TYPE = window.HTMLImports ? window.HTMLImports.IMPORT_LINK_TYPE : "none";- function forSubtree(node, cb) {- findAllElements(node, function(e) {- if (cb(e)) {- return true;- }- forRoots(e, cb);- });- forRoots(node, cb);- }- function findAllElements(node, find, data) {- var e = node.firstElementChild;- if (!e) {- e = node.firstChild;- while (e && e.nodeType !== Node.ELEMENT_NODE) {- e = e.nextSibling;- }- }- while (e) {- if (find(e, data) !== true) {- findAllElements(e, find, data);- }- e = e.nextElementSibling;- }- return null;- }- function forRoots(node, cb) {- var root = node.shadowRoot;- while (root) {- forSubtree(root, cb);- root = root.olderShadowRoot;- }- }- function forDocumentTree(doc, cb) {- _forDocumentTree(doc, cb, []);- }- function _forDocumentTree(doc, cb, processingDocuments) {- doc = window.wrap(doc);- if (processingDocuments.indexOf(doc) >= 0) {- return;- }- processingDocuments.push(doc);- var imports = doc.querySelectorAll("link[rel=" + IMPORT_LINK_TYPE + "]");- for (var i = 0, l = imports.length, n; i < l && (n = imports[i]); i++) {- if (n.import) {- _forDocumentTree(n.import, cb, processingDocuments);- }- }- cb(doc);- }- scope.forDocumentTree = forDocumentTree;- scope.forSubtree = forSubtree;-});--window.CustomElements.addModule(function(scope) {- var flags = scope.flags;- var forSubtree = scope.forSubtree;- var forDocumentTree = scope.forDocumentTree;- function addedNode(node, isAttached) {- return added(node, isAttached) || addedSubtree(node, isAttached);- }- function added(node, isAttached) {- if (scope.upgrade(node, isAttached)) {- return true;- }- if (isAttached) {- attached(node);- }- }- function addedSubtree(node, isAttached) {- forSubtree(node, function(e) {- if (added(e, isAttached)) {- return true;- }- });- }- var hasThrottledAttached = window.MutationObserver._isPolyfilled && flags["throttle-attached"];- scope.hasPolyfillMutations = hasThrottledAttached;- scope.hasThrottledAttached = hasThrottledAttached;- var isPendingMutations = false;- var pendingMutations = [];- function deferMutation(fn) {- pendingMutations.push(fn);- if (!isPendingMutations) {- isPendingMutations = true;- setTimeout(takeMutations);- }- }- function takeMutations() {- isPendingMutations = false;- var $p = pendingMutations;- for (var i = 0, l = $p.length, p; i < l && (p = $p[i]); i++) {- p();- }- pendingMutations = [];- }- function attached(element) {- if (hasThrottledAttached) {- deferMutation(function() {- _attached(element);- });- } else {- _attached(element);- }- }- function _attached(element) {- if (element.__upgraded__ && !element.__attached) {- element.__attached = true;- if (element.attachedCallback) {- element.attachedCallback();- }- }- }- function detachedNode(node) {- detached(node);- forSubtree(node, function(e) {- detached(e);- });- }- function detached(element) {- if (hasThrottledAttached) {- deferMutation(function() {- _detached(element);- });- } else {- _detached(element);- }- }- function _detached(element) {- if (element.__upgraded__ && element.__attached) {- element.__attached = false;- if (element.detachedCallback) {- element.detachedCallback();- }- }- }- function inDocument(element) {- var p = element;- var doc = window.wrap(document);- while (p) {- if (p == doc) {- return true;- }- p = p.parentNode || p.nodeType === Node.DOCUMENT_FRAGMENT_NODE && p.host;- }- }- function watchShadow(node) {- if (node.shadowRoot && !node.shadowRoot.__watched) {- flags.dom && console.log("watching shadow-root for: ", node.localName);- var root = node.shadowRoot;- while (root) {- observe(root);- root = root.olderShadowRoot;- }- }- }- function handler(root, mutations) {- if (flags.dom) {- var mx = mutations[0];- if (mx && mx.type === "childList" && mx.addedNodes) {- if (mx.addedNodes) {- var d = mx.addedNodes[0];- while (d && d !== document && !d.host) {- d = d.parentNode;- }- var u = d && (d.URL || d._URL || d.host && d.host.localName) || "";- u = u.split("/?").shift().split("/").pop();- }- }- console.group("mutations (%d) [%s]", mutations.length, u || "");- }- var isAttached = inDocument(root);- mutations.forEach(function(mx) {- if (mx.type === "childList") {- forEach(mx.addedNodes, function(n) {- if (!n.localName) {- return;- }- addedNode(n, isAttached);- });- forEach(mx.removedNodes, function(n) {- if (!n.localName) {- return;- }- detachedNode(n);- });- }- });- flags.dom && console.groupEnd();- }- function takeRecords(node) {- node = window.wrap(node);- if (!node) {- node = window.wrap(document);- }- while (node.parentNode) {- node = node.parentNode;- }- var observer = node.__observer;- if (observer) {- handler(node, observer.takeRecords());- takeMutations();- }- }- var forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);- function observe(inRoot) {- if (inRoot.__observer) {- return;- }- var observer = new MutationObserver(handler.bind(this, inRoot));- observer.observe(inRoot, {- childList: true,- subtree: true- });- inRoot.__observer = observer;- }- function upgradeDocument(doc) {- doc = window.wrap(doc);- flags.dom && console.group("upgradeDocument: ", doc.baseURI.split("/").pop());- var isMainDocument = doc === window.wrap(document);- addedNode(doc, isMainDocument);- observe(doc);- flags.dom && console.groupEnd();- }- function upgradeDocumentTree(doc) {- forDocumentTree(doc, upgradeDocument);- }- var originalCreateShadowRoot = Element.prototype.createShadowRoot;- if (originalCreateShadowRoot) {- Element.prototype.createShadowRoot = function() {- var root = originalCreateShadowRoot.call(this);- window.CustomElements.watchShadow(this);- return root;- };- }- scope.watchShadow = watchShadow;- scope.upgradeDocumentTree = upgradeDocumentTree;- scope.upgradeDocument = upgradeDocument;- scope.upgradeSubtree = addedSubtree;- scope.upgradeAll = addedNode;- scope.attached = attached;- scope.takeRecords = takeRecords;-});--window.CustomElements.addModule(function(scope) {- var flags = scope.flags;- function upgrade(node, isAttached) {- if (node.localName === "template") {- if (window.HTMLTemplateElement && HTMLTemplateElement.decorate) {- HTMLTemplateElement.decorate(node);- }- }- if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) {- var is = node.getAttribute("is");- var definition = scope.getRegisteredDefinition(node.localName) || scope.getRegisteredDefinition(is);- if (definition) {- if (is && definition.tag == node.localName || !is && !definition.extends) {- return upgradeWithDefinition(node, definition, isAttached);- }- }- }- }- function upgradeWithDefinition(element, definition, isAttached) {- flags.upgrade && console.group("upgrade:", element.localName);- if (definition.is) {- element.setAttribute("is", definition.is);- }- implementPrototype(element, definition);- element.__upgraded__ = true;- created(element);- if (isAttached) {- scope.attached(element);- }- scope.upgradeSubtree(element, isAttached);- flags.upgrade && console.groupEnd();- return element;- }- function implementPrototype(element, definition) {- if (Object.__proto__) {- element.__proto__ = definition.prototype;- } else {- customMixin(element, definition.prototype, definition.native);- element.__proto__ = definition.prototype;- }- }- function customMixin(inTarget, inSrc, inNative) {- var used = {};- var p = inSrc;- while (p !== inNative && p !== HTMLElement.prototype) {- var keys = Object.getOwnPropertyNames(p);- for (var i = 0, k; k = keys[i]; i++) {- if (!used[k]) {- Object.defineProperty(inTarget, k, Object.getOwnPropertyDescriptor(p, k));- used[k] = 1;- }- }- p = Object.getPrototypeOf(p);- }- }- function created(element) {- if (element.createdCallback) {- element.createdCallback();- }- }- scope.upgrade = upgrade;- scope.upgradeWithDefinition = upgradeWithDefinition;- scope.implementPrototype = implementPrototype;-});--window.CustomElements.addModule(function(scope) {- var isIE = scope.isIE;- var upgradeDocumentTree = scope.upgradeDocumentTree;- var upgradeAll = scope.upgradeAll;- var upgradeWithDefinition = scope.upgradeWithDefinition;- var implementPrototype = scope.implementPrototype;- var useNative = scope.useNative;- function register(name, options) {- var definition = options || {};- if (!name) {- throw new Error("document.registerElement: first argument `name` must not be empty");- }- if (name.indexOf("-") < 0) {- throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '" + String(name) + "'.");- }- if (isReservedTag(name)) {- throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '" + String(name) + "'. The type name is invalid.");- }- if (getRegisteredDefinition(name)) {- throw new Error("DuplicateDefinitionError: a type with name '" + String(name) + "' is already registered");- }- if (!definition.prototype) {- definition.prototype = Object.create(HTMLElement.prototype);- }- definition.__name = name.toLowerCase();- if (definition.extends) {- definition.extends = definition.extends.toLowerCase();- }- definition.lifecycle = definition.lifecycle || {};- definition.ancestry = ancestry(definition.extends);- resolveTagName(definition);- resolvePrototypeChain(definition);- overrideAttributeApi(definition.prototype);- registerDefinition(definition.__name, definition);- definition.ctor = generateConstructor(definition);- definition.ctor.prototype = definition.prototype;- definition.prototype.constructor = definition.ctor;- if (scope.ready) {- upgradeDocumentTree(document);- }- return definition.ctor;- }- function overrideAttributeApi(prototype) {- if (prototype.setAttribute._polyfilled) {- return;- }- var setAttribute = prototype.setAttribute;- prototype.setAttribute = function(name, value) {- changeAttribute.call(this, name, value, setAttribute);- };- var removeAttribute = prototype.removeAttribute;- prototype.removeAttribute = function(name) {- changeAttribute.call(this, name, null, removeAttribute);- };- prototype.setAttribute._polyfilled = true;- }- function changeAttribute(name, value, operation) {- name = name.toLowerCase();- var oldValue = this.getAttribute(name);- operation.apply(this, arguments);- var newValue = this.getAttribute(name);- if (this.attributeChangedCallback && newValue !== oldValue) {- this.attributeChangedCallback(name, oldValue, newValue);- }- }- function isReservedTag(name) {- for (var i = 0; i < reservedTagList.length; i++) {- if (name === reservedTagList[i]) {- return true;- }- }- }- var reservedTagList = [ "annotation-xml", "color-profile", "font-face", "font-face-src", "font-face-uri", "font-face-format", "font-face-name", "missing-glyph" ];- function ancestry(extnds) {- var extendee = getRegisteredDefinition(extnds);- if (extendee) {- return ancestry(extendee.extends).concat([ extendee ]);- }- return [];- }- function resolveTagName(definition) {- var baseTag = definition.extends;- for (var i = 0, a; a = definition.ancestry[i]; i++) {- baseTag = a.is && a.tag;- }- definition.tag = baseTag || definition.__name;- if (baseTag) {- definition.is = definition.__name;- }- }- function resolvePrototypeChain(definition) {- if (!Object.__proto__) {- var nativePrototype = HTMLElement.prototype;- if (definition.is) {- var inst = document.createElement(definition.tag);- nativePrototype = Object.getPrototypeOf(inst);- }- var proto = definition.prototype, ancestor;- var foundPrototype = false;- while (proto) {- if (proto == nativePrototype) {- foundPrototype = true;- }- ancestor = Object.getPrototypeOf(proto);- if (ancestor) {- proto.__proto__ = ancestor;- }- proto = ancestor;- }- if (!foundPrototype) {- console.warn(definition.tag + " prototype not found in prototype chain for " + definition.is);- }- definition.native = nativePrototype;- }- }- function instantiate(definition) {- return upgradeWithDefinition(domCreateElement(definition.tag), definition);- }- var registry = {};- function getRegisteredDefinition(name) {- if (name) {- return registry[name.toLowerCase()];- }- }- function registerDefinition(name, definition) {- registry[name] = definition;- }- function generateConstructor(definition) {- return function() {- return instantiate(definition);- };- }- var HTML_NAMESPACE = "http://www.w3.org/1999/xhtml";- function createElementNS(namespace, tag, typeExtension) {- if (namespace === HTML_NAMESPACE) {- return createElement(tag, typeExtension);- } else {- return domCreateElementNS(namespace, tag);- }- }- function createElement(tag, typeExtension) {- if (tag) {- tag = tag.toLowerCase();- }- if (typeExtension) {- typeExtension = typeExtension.toLowerCase();- }- var definition = getRegisteredDefinition(typeExtension || tag);- if (definition) {- if (tag == definition.tag && typeExtension == definition.is) {- return new definition.ctor();- }- if (!typeExtension && !definition.is) {- return new definition.ctor();- }- }- var element;- if (typeExtension) {- element = createElement(tag);- element.setAttribute("is", typeExtension);- return element;- }- element = domCreateElement(tag);- if (tag.indexOf("-") >= 0) {- implementPrototype(element, HTMLElement);- }- return element;- }- var domCreateElement = document.createElement.bind(document);- var domCreateElementNS = document.createElementNS.bind(document);- var isInstance;- if (!Object.__proto__ && !useNative) {- isInstance = function(obj, ctor) {- if (obj instanceof ctor) {- return true;- }- var p = obj;- while (p) {- if (p === ctor.prototype) {- return true;- }- p = p.__proto__;- }- return false;- };- } else {- isInstance = function(obj, base) {- return obj instanceof base;- };- }- function wrapDomMethodToForceUpgrade(obj, methodName) {- var orig = obj[methodName];- obj[methodName] = function() {- var n = orig.apply(this, arguments);- upgradeAll(n);- return n;- };- }- wrapDomMethodToForceUpgrade(Node.prototype, "cloneNode");- wrapDomMethodToForceUpgrade(document, "importNode");- document.registerElement = register;- document.createElement = createElement;- document.createElementNS = createElementNS;- scope.registry = registry;- scope.instanceof = isInstance;- scope.reservedTagList = reservedTagList;- scope.getRegisteredDefinition = getRegisteredDefinition;- document.register = document.registerElement;-});--(function(scope) {- var useNative = scope.useNative;- var initializeModules = scope.initializeModules;- var isIE = scope.isIE;- if (useNative) {- var nop = function() {};- scope.watchShadow = nop;- scope.upgrade = nop;- scope.upgradeAll = nop;- scope.upgradeDocumentTree = nop;- scope.upgradeSubtree = nop;- scope.takeRecords = nop;- scope.instanceof = function(obj, base) {- return obj instanceof base;- };- } else {- initializeModules();- }- var upgradeDocumentTree = scope.upgradeDocumentTree;- var upgradeDocument = scope.upgradeDocument;- if (!window.wrap) {- if (window.ShadowDOMPolyfill) {- window.wrap = window.ShadowDOMPolyfill.wrapIfNeeded;- window.unwrap = window.ShadowDOMPolyfill.unwrapIfNeeded;- } else {- window.wrap = window.unwrap = function(node) {- return node;- };- }- }- if (window.HTMLImports) {- window.HTMLImports.__importsParsingHook = function(elt) {- if (elt.import) {- upgradeDocument(wrap(elt.import));- }- };- }- function bootstrap() {- upgradeDocumentTree(window.wrap(document));- window.CustomElements.ready = true;- var requestAnimationFrame = window.requestAnimationFrame || function(f) {- setTimeout(f, 16);- };- requestAnimationFrame(function() {- setTimeout(function() {- window.CustomElements.readyTime = Date.now();- if (window.HTMLImports) {- window.CustomElements.elapsed = window.CustomElements.readyTime - window.HTMLImports.readyTime;- }- document.dispatchEvent(new CustomEvent("WebComponentsReady", {- bubbles: true- }));- });- });- }- if (document.readyState === "complete" || scope.flags.eager) {- bootstrap();- } else if (document.readyState === "interactive" && !window.attachEvent && (!window.HTMLImports || window.HTMLImports.ready)) {- bootstrap();- } else {- var loadEvent = window.HTMLImports && !window.HTMLImports.ready ? "HTMLImportsLoaded" : "DOMContentLoaded";- window.addEventListener(loadEvent, bootstrap);- }-})(window.CustomElements);\ No newline at end of filediff --git a/manager/client/src/main/webapp/bower_components/webcomponentsjs/CustomElements.min.js b/manager/client/src/main/webapp/bower_components/webcomponentsjs/CustomElements.min.jsdeleted file mode 100644index 839171cf5..000000000--- a/manager/client/src/main/webapp/bower_components/webcomponentsjs/CustomElements.min.js+++ /dev/null@@ -1,11 +0,0 @@-/**- * @license- * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.- * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt- * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt- * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt- * Code distributed by Google as part of the polymer project is also- * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt- */-// @version 0.7.24-"undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,n=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};n.prototype={set:function(t,n){var o=t[this.name];return o&&o[0]===t?o[1]=n:e(t,this.name,{value:[t,n],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return!(!t||t[0]!==e)&&(t[0]=t[1]=void 0,!0)},has:function(e){var t=e[this.name];return!!t&&t[0]===e}},window.WeakMap=n}(),function(e){function t(e){E.push(e),b||(b=!0,m(o))}function n(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function o(){b=!1;var e=E;E=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var n=e.takeRecords();r(e),n.length&&(e.callback_(n,e),t=!0)}),t&&o()}function r(e){e.nodes_.forEach(function(t){var n=v.get(t);n&&n.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}function i(e,t){for(var n=e;n;n=n.parentNode){var o=v.get(n);if(o)for(var r=0;r<o.length;r++){var i=o[r],a=i.options;if(n===e||a.subtree){var d=t(a);d&&i.enqueue(d)}}}}function a(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++_}function d(e,t){this.type=e,this.target=t,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function s(e){var t=new d(e.type,e.target);return t.addedNodes=e.addedNodes.slice(),t.removedNodes=e.removedNodes.slice(),t.previousSibling=e.previousSibling,t.nextSibling=e.nextSibling,t.attributeName=e.attributeName,t.attributeNamespace=e.attributeNamespace,t.oldValue=e.oldValue,t}function u(e,t){return y=new d(e,t)}function c(e){return N?N:(N=s(y),N.oldValue=e,N)}function l(){y=N=void 0}function f(e){return e===N||e===y}function p(e,t){return e===t?e:N&&f(e)?N:null}function w(e,t,n){this.observer=e,this.target=t,this.options=n,this.transientObservedNodes=[]}if(!e.JsMutationObserver){var m,v=new WeakMap;if(/Trident|Edge/.test(navigator.userAgent))m=setTimeout;else if(window.setImmediate)m=window.setImmediate;else{var h=[],g=String(Math.random());window.addEventListener("message",function(e){if(e.data===g){var t=h;h=[],t.forEach(function(e){e()})}}),m=function(e){h.push(e),window.postMessage(g,"*")}}var b=!1,E=[],_=0;a.prototype={observe:function(e,t){if(e=n(e),!t.childList&&!t.attributes&&!t.characterData||t.attributeOldValue&&!t.attributes||t.attributeFilter&&t.attributeFilter.length&&!t.attributes||t.characterDataOldValue&&!t.characterData)throw new SyntaxError;var o=v.get(e);o||v.set(e,o=[]);for(var r,i=0;i<o.length;i++)if(o[i].observer===this){r=o[i],r.removeListeners(),r.options=t;break}r||(r=new w(this,e,t),o.push(r),this.nodes_.push(e)),r.addListeners()},disconnect:function(){this.nodes_.forEach(function(e){for(var t=v.get(e),n=0;n<t.length;n++){var o=t[n];if(o.observer===this){o.removeListeners(),t.splice(n,1);break}}},this),this.records_=[]},takeRecords:function(){var e=this.records_;return this.records_=[],e}};var y,N;w.prototype={enqueue:function(e){var n=this.observer.records_,o=n.length;if(n.length>0){var r=n[o-1],i=p(r,e);if(i)return void(n[o-1]=i)}else t(this.observer);n[o]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=v.get(e);t||v.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=v.get(e),n=0;n<t.length;n++)if(t[n]===this){t.splice(n,1);break}},this)},handleEvent:function(e){switch(e.stopImmediatePropagation(),e.type){case"DOMAttrModified":var t=e.attrName,n=e.relatedNode.namespaceURI,o=e.target,r=new u("attributes",o);r.attributeName=t,r.attributeNamespace=n;var a=e.attrChange===MutationEvent.ADDITION?null:e.prevValue;i(o,function(e){if(e.attributes&&(!e.attributeFilter||!e.attributeFilter.length||e.attributeFilter.indexOf(t)!==-1||e.attributeFilter.indexOf(n)!==-1))return e.attributeOldValue?c(a):r});break;case"DOMCharacterDataModified":var o=e.target,r=u("characterData",o),a=e.prevValue;i(o,function(e){if(e.characterData)return e.characterDataOldValue?c(a):r});break;case"DOMNodeRemoved":this.addTransientObserver(e.target);case"DOMNodeInserted":var d,s,f=e.target;"DOMNodeInserted"===e.type?(d=[f],s=[]):(d=[],s=[f]);var p=f.previousSibling,w=f.nextSibling,r=u("childList",e.target.parentNode);r.addedNodes=d,r.removedNodes=s,r.previousSibling=p,r.nextSibling=w,i(e.relatedNode,function(e){if(e.childList)return r})}l()}},e.JsMutationObserver=a,e.MutationObserver||(e.MutationObserver=a,a._isPolyfilled=!0)}}(self),function(e){"use strict";if(!window.performance||!window.performance.now){var t=Date.now();window.performance={now:function(){return Date.now()-t}}}window.requestAnimationFrame||(window.requestAnimationFrame=function(){var e=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;return e?function(t){return e(function(){t(performance.now())})}:function(e){return window.setTimeout(e,1e3/60)}}()),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(){return window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(e){clearTimeout(e)}}());var n=function(){var e=document.createEvent("Event");return e.initEvent("foo",!0,!0),e.preventDefault(),e.defaultPrevented}();if(!n){var o=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(o.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var r=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||r&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.Event||r&&"function"!=typeof window.Event){var i=window.Event;window.Event=function(e,t){t=t||{};var n=document.createEvent("Event");return n.initEvent(e,Boolean(t.bubbles),Boolean(t.cancelable)),n},window.Event.prototype=i.prototype}}(window.WebComponents),window.CustomElements=window.CustomElements||{flags:{}},function(e){var t=e.flags,n=[],o=function(e){n.push(e)},r=function(){n.forEach(function(t){t(e)})};e.addModule=o,e.initializeModules=r,e.hasNative=Boolean(document.registerElement),e.isIE=/Trident/.test(navigator.userAgent),e.useNative=!t.register&&e.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||window.HTMLImports.useNative)}(window.CustomElements),window.CustomElements.addModule(function(e){function t(e,t){n(e,function(e){return!!t(e)||void o(e,t)}),o(e,t)}function n(e,t,o){var r=e.firstElementChild;if(!r)for(r=e.firstChild;r&&r.nodeType!==Node.ELEMENT_NODE;)r=r.nextSibling;for(;r;)t(r,o)!==!0&&n(r,t,o),r=r.nextElementSibling;return null}function o(e,n){for(var o=e.shadowRoot;o;)t(o,n),o=o.olderShadowRoot}function r(e,t){i(e,t,[])}function i(e,t,n){if(e=window.wrap(e),!(n.indexOf(e)>=0)){n.push(e);for(var o,r=e.querySelectorAll("link[rel="+a+"]"),d=0,s=r.length;d<s&&(o=r[d]);d++)o["import"]&&i(o["import"],t,n);t(e)}}var a=window.HTMLImports?window.HTMLImports.IMPORT_LINK_TYPE:"none";e.forDocumentTree=r,e.forSubtree=t}),window.CustomElements.addModule(function(e){function t(e,t){return n(e,t)||o(e,t)}function n(t,n){return!!e.upgrade(t,n)||void(n&&a(t))}function o(e,t){b(e,function(e){if(n(e,t))return!0})}function r(e){N.push(e),y||(y=!0,setTimeout(i))}function i(){y=!1;for(var e,t=N,n=0,o=t.length;n<o&&(e=t[n]);n++)e();N=[]}function a(e){_?r(function(){d(e)}):d(e)}function d(e){e.__upgraded__&&!e.__attached&&(e.__attached=!0,e.attachedCallback&&e.attachedCallback())}function s(e){u(e),b(e,function(e){u(e)})}function u(e){_?r(function(){c(e)}):c(e)}function c(e){e.__upgraded__&&e.__attached&&(e.__attached=!1,e.detachedCallback&&e.detachedCallback())}function l(e){for(var t=e,n=window.wrap(document);t;){if(t==n)return!0;t=t.parentNode||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host}}function f(e){if(e.shadowRoot&&!e.shadowRoot.__watched){g.dom&&console.log("watching shadow-root for: ",e.localName);for(var t=e.shadowRoot;t;)m(t),t=t.olderShadowRoot}}function p(e,n){if(g.dom){var o=n[0];if(o&&"childList"===o.type&&o.addedNodes&&o.addedNodes){for(var r=o.addedNodes[0];r&&r!==document&&!r.host;)r=r.parentNode;var i=r&&(r.URL||r._URL||r.host&&r.host.localName)||"";i=i.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",n.length,i||"")}var a=l(e);n.forEach(function(e){"childList"===e.type&&(M(e.addedNodes,function(e){e.localName&&t(e,a)}),M(e.removedNodes,function(e){e.localName&&s(e)}))}),g.dom&&console.groupEnd()}function w(e){for(e=window.wrap(e),e||(e=window.wrap(document));e.parentNode;)e=e.parentNode;var t=e.__observer;t&&(p(e,t.takeRecords()),i())}function m(e){if(!e.__observer){var t=new MutationObserver(p.bind(this,e));t.observe(e,{childList:!0,subtree:!0}),e.__observer=t}}function v(e){e=window.wrap(e),g.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop());var n=e===window.wrap(document);t(e,n),m(e),g.dom&&console.groupEnd()}function h(e){E(e,v)}var g=e.flags,b=e.forSubtree,E=e.forDocumentTree,_=window.MutationObserver._isPolyfilled&&g["throttle-attached"];e.hasPolyfillMutations=_,e.hasThrottledAttached=_;var y=!1,N=[],M=Array.prototype.forEach.call.bind(Array.prototype.forEach),O=Element.prototype.createShadowRoot;O&&(Element.prototype.createShadowRoot=function(){var e=O.call(this);return window.CustomElements.watchShadow(this),e}),e.watchShadow=f,e.upgradeDocumentTree=h,e.upgradeDocument=v,e.upgradeSubtree=o,e.upgradeAll=t,e.attached=a,e.takeRecords=w}),window.CustomElements.addModule(function(e){function t(t,o){if("template"===t.localName&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t),!t.__upgraded__&&t.nodeType===Node.ELEMENT_NODE){var r=t.getAttribute("is"),i=e.getRegisteredDefinition(t.localName)||e.getRegisteredDefinition(r);if(i&&(r&&i.tag==t.localName||!r&&!i["extends"]))return n(t,i,o)}}function n(t,n,r){return a.upgrade&&console.group("upgrade:",t.localName),n.is&&t.setAttribute("is",n.is),o(t,n),t.__upgraded__=!0,i(t),r&&e.attached(t),e.upgradeSubtree(t,r),a.upgrade&&console.groupEnd(),t}function o(e,t){Object.__proto__?e.__proto__=t.prototype:(r(e,t.prototype,t["native"]),e.__proto__=t.prototype)}function r(e,t,n){for(var o={},r=t;r!==n&&r!==HTMLElement.prototype;){for(var i,a=Object.getOwnPropertyNames(r),d=0;i=a[d];d++)o[i]||(Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i)),o[i]=1);r=Object.getPrototypeOf(r)}}function i(e){e.createdCallback&&e.createdCallback()}var a=e.flags;e.upgrade=t,e.upgradeWithDefinition=n,e.implementPrototype=o}),window.CustomElements.addModule(function(e){function t(t,o){var s=o||{};if(!t)throw new Error("document.registerElement: first argument `name` must not be empty");if(t.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(t)+"'.");if(r(t))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(t)+"'. The type name is invalid.");if(u(t))throw new Error("DuplicateDefinitionError: a type with name '"+String(t)+"' is already registered");return s.prototype||(s.prototype=Object.create(HTMLElement.prototype)),s.__name=t.toLowerCase(),s["extends"]&&(s["extends"]=s["extends"].toLowerCase()),s.lifecycle=s.lifecycle||{},s.ancestry=i(s["extends"]),a(s),d(s),n(s.prototype),c(s.__name,s),s.ctor=l(s),s.ctor.prototype=s.prototype,s.prototype.constructor=s.ctor,e.ready&&v(document),s.ctor}function n(e){if(!e.setAttribute._polyfilled){var t=e.setAttribute;e.setAttribute=function(e,n){o.call(this,e,n,t)};var n=e.removeAttribute;e.removeAttribute=function(e){o.call(this,e,null,n)},e.setAttribute._polyfilled=!0}}function o(e,t,n){e=e.toLowerCase();var o=this.getAttribute(e);n.apply(this,arguments);var r=this.getAttribute(e);this.attributeChangedCallback&&r!==o&&this.attributeChangedCallback(e,o,r)}function r(e){for(var t=0;t<_.length;t++)if(e===_[t])return!0}function i(e){var t=u(e);return t?i(t["extends"]).concat([t]):[]}function a(e){for(var t,n=e["extends"],o=0;t=e.ancestry[o];o++)n=t.is&&t.tag;e.tag=n||e.__name,n&&(e.is=e.__name)}function d(e){if(!Object.__proto__){var t=HTMLElement.prototype;if(e.is){var n=document.createElement(e.tag);t=Object.getPrototypeOf(n)}for(var o,r=e.prototype,i=!1;r;)r==t&&(i=!0),o=Object.getPrototypeOf(r),o&&(r.__proto__=o),r=o;i||console.warn(e.tag+" prototype not found in prototype chain for "+e.is),e["native"]=t}}function s(e){return g(M(e.tag),e)}function u(e){if(e)return y[e.toLowerCase()]}function c(e,t){y[e]=t}function l(e){return function(){return s(e)}}function f(e,t,n){return e===N?p(t,n):O(e,t)}function p(e,t){e&&(e=e.toLowerCase()),t&&(t=t.toLowerCase());var n=u(t||e);if(n){if(e==n.tag&&t==n.is)return new n.ctor;if(!t&&!n.is)return new n.ctor}var o;return t?(o=p(e),o.setAttribute("is",t),o):(o=M(e),e.indexOf("-")>=0&&b(o,HTMLElement),o)}function w(e,t){var n=e[t];e[t]=function(){var e=n.apply(this,arguments);return h(e),e}}var m,v=(e.isIE,e.upgradeDocumentTree),h=e.upgradeAll,g=e.upgradeWithDefinition,b=e.implementPrototype,E=e.useNative,_=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],y={},N="http://www.w3.org/1999/xhtml",M=document.createElement.bind(document),O=document.createElementNS.bind(document);m=Object.__proto__||E?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;for(var n=e;n;){if(n===t.prototype)return!0;n=n.__proto__}return!1},w(Node.prototype,"cloneNode"),w(document,"importNode"),document.registerElement=t,document.createElement=p,document.createElementNS=f,e.registry=y,e["instanceof"]=m,e.reservedTagList=_,e.getRegisteredDefinition=u,document.register=document.registerElement}),function(e){function t(){i(window.wrap(document)),window.CustomElements.ready=!0;var e=window.requestAnimationFrame||function(e){setTimeout(e,16)};e(function(){setTimeout(function(){window.CustomElements.readyTime=Date.now(),window.HTMLImports&&(window.CustomElements.elapsed=window.CustomElements.readyTime-window.HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}var n=e.useNative,o=e.initializeModules;e.isIE;if(n){var r=function(){};e.watchShadow=r,e.upgrade=r,e.upgradeAll=r,e.upgradeDocumentTree=r,e.upgradeSubtree=r,e.takeRecords=r,e["instanceof"]=function(e,t){return e instanceof t}}else o();var i=e.upgradeDocumentTree,a=e.upgradeDocument;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=window.ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=window.ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}),window.HTMLImports&&(window.HTMLImports.__importsParsingHook=function(e){e["import"]&&a(wrap(e["import"]))}),"complete"===document.readyState||e.flags.eager)t();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var d=window.HTMLImports&&!window.HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(d,t)}else t()}(window.CustomElements);\ No newline at end of filediff --git a/manager/client/src/main/webapp/bower_components/webcomponentsjs/HTMLImports.js b/manager/client/src/main/webapp/bower_components/webcomponentsjs/HTMLImports.jsdeleted file mode 100644index 3c2daeff0..000000000--- a/manager/client/src/main/webapp/bower_components/webcomponentsjs/HTMLImports.js+++ /dev/null@@ -1,1157 +0,0 @@-/**- * @license- * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.- * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt- * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt- * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt- * Code distributed by Google as part of the polymer project is also- * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt- */-// @version 0.7.24-if (typeof WeakMap === "undefined") {- (function() {- var defineProperty = Object.defineProperty;- var counter = Date.now() % 1e9;- var WeakMap = function() {- this.name = "__st" + (Math.random() * 1e9 >>> 0) + (counter++ + "__");- };- WeakMap.prototype = {- set: function(key, value) {- var entry = key[this.name];- if (entry && entry[0] === key) entry[1] = value; else defineProperty(key, this.name, {- value: [ key, value ],- writable: true- });- return this;- },- get: function(key) {- var entry;- return (entry = key[this.name]) && entry[0] === key ? entry[1] : undefined;- },- "delete": function(key) {- var entry = key[this.name];- if (!entry || entry[0] !== key) return false;- entry[0] = entry[1] = undefined;- return true;- },- has: function(key) {- var entry = key[this.name];- if (!entry) return false;- return entry[0] === key;- }- };- window.WeakMap = WeakMap;- })();-}--(function(global) {- if (global.JsMutationObserver) {- return;- }- var registrationsTable = new WeakMap();- var setImmediate;- if (/Trident|Edge/.test(navigator.userAgent)) {- setImmediate = setTimeout;- } else if (window.setImmediate) {- setImmediate = window.setImmediate;- } else {- var setImmediateQueue = [];- var sentinel = String(Math.random());- window.addEventListener("message", function(e) {- if (e.data === sentinel) {- var queue = setImmediateQueue;- setImmediateQueue = [];- queue.forEach(function(func) {- func();- });- }- });- setImmediate = function(func) {- setImmediateQueue.push(func);- window.postMessage(sentinel, "*");- };- }- var isScheduled = false;- var scheduledObservers = [];- function scheduleCallback(observer) {- scheduledObservers.push(observer);- if (!isScheduled) {- isScheduled = true;- setImmediate(dispatchCallbacks);- }- }- function wrapIfNeeded(node) {- return window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(node) || node;- }- function dispatchCallbacks() {- isScheduled = false;- var observers = scheduledObservers;- scheduledObservers = [];- observers.sort(function(o1, o2) {- return o1.uid_ - o2.uid_;- });- var anyNonEmpty = false;- observers.forEach(function(observer) {- var queue = observer.takeRecords();- removeTransientObserversFor(observer);- if (queue.length) {- observer.callback_(queue, observer);- anyNonEmpty = true;- }- });- if (anyNonEmpty) dispatchCallbacks();- }- function removeTransientObserversFor(observer) {- observer.nodes_.forEach(function(node) {- var registrations = registrationsTable.get(node);- if (!registrations) return;- registrations.forEach(function(registration) {- if (registration.observer === observer) registration.removeTransientObservers();- });- });- }- function forEachAncestorAndObserverEnqueueRecord(target, callback) {- for (var node = target; node; node = node.parentNode) {- var registrations = registrationsTable.get(node);- if (registrations) {- for (var j = 0; j < registrations.length; j++) {- var registration = registrations[j];- var options = registration.options;- if (node !== target && !options.subtree) continue;- var record = callback(options);- if (record) registration.enqueue(record);- }- }- }- }- var uidCounter = 0;- function JsMutationObserver(callback) {- this.callback_ = callback;- this.nodes_ = [];- this.records_ = [];- this.uid_ = ++uidCounter;- }- JsMutationObserver.prototype = {- observe: function(target, options) {- target = wrapIfNeeded(target);- if (!options.childList && !options.attributes && !options.characterData || options.attributeOldValue && !options.attributes || options.attributeFilter && options.attributeFilter.length && !options.attributes || options.characterDataOldValue && !options.characterData) {- throw new SyntaxError();- }- var registrations = registrationsTable.get(target);- if (!registrations) registrationsTable.set(target, registrations = []);- var registration;- for (var i = 0; i < registrations.length; i++) {- if (registrations[i].observer === this) {- registration = registrations[i];- registration.removeListeners();- registration.options = options;- break;- }- }- if (!registration) {- registration = new Registration(this, target, options);- registrations.push(registration);- this.nodes_.push(target);- }- registration.addListeners();- },- disconnect: function() {- this.nodes_.forEach(function(node) {- var registrations = registrationsTable.get(node);- for (var i = 0; i < registrations.length; i++) {- var registration = registrations[i];- if (registration.observer === this) {- registration.removeListeners();- registrations.splice(i, 1);- break;- }- }- }, this);- this.records_ = [];- },- takeRecords: function() {- var copyOfRecords = this.records_;- this.records_ = [];- return copyOfRecords;- }- };- function MutationRecord(type, target) {- this.type = type;- this.target = target;- this.addedNodes = [];- this.removedNodes = [];- this.previousSibling = null;- this.nextSibling = null;- this.attributeName = null;- this.attributeNamespace = null;- this.oldValue = null;- }- function copyMutationRecord(original) {- var record = new MutationRecord(original.type, original.target);- record.addedNodes = original.addedNodes.slice();- record.removedNodes = original.removedNodes.slice();- record.previousSibling = original.previousSibling;- record.nextSibling = original.nextSibling;- record.attributeName = original.attributeName;- record.attributeNamespace = original.attributeNamespace;- record.oldValue = original.oldValue;- return record;- }- var currentRecord, recordWithOldValue;- function getRecord(type, target) {- return currentRecord = new MutationRecord(type, target);- }- function getRecordWithOldValue(oldValue) {- if (recordWithOldValue) return recordWithOldValue;- recordWithOldValue = copyMutationRecord(currentRecord);- recordWithOldValue.oldValue = oldValue;- return recordWithOldValue;- }- function clearRecords() {- currentRecord = recordWithOldValue = undefined;- }- function recordRepresentsCurrentMutation(record) {- return record === recordWithOldValue || record === currentRecord;- }- function selectRecord(lastRecord, newRecord) {- if (lastRecord === newRecord) return lastRecord;- if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord)) return recordWithOldValue;- return null;- }- function Registration(observer, target, options) {- this.observer = observer;- this.target = target;- this.options = options;- this.transientObservedNodes = [];- }- Registration.prototype = {- enqueue: function(record) {- var records = this.observer.records_;- var length = records.length;- if (records.length > 0) {- var lastRecord = records[length - 1];- var recordToReplaceLast = selectRecord(lastRecord, record);- if (recordToReplaceLast) {- records[length - 1] = recordToReplaceLast;- return;- }- } else {- scheduleCallback(this.observer);- }- records[length] = record;- },- addListeners: function() {- this.addListeners_(this.target);- },- addListeners_: function(node) {- var options = this.options;- if (options.attributes) node.addEventListener("DOMAttrModified", this, true);- if (options.characterData) node.addEventListener("DOMCharacterDataModified", this, true);- if (options.childList) node.addEventListener("DOMNodeInserted", this, true);- if (options.childList || options.subtree) node.addEventListener("DOMNodeRemoved", this, true);- },- removeListeners: function() {- this.removeListeners_(this.target);- },- removeListeners_: function(node) {- var options = this.options;- if (options.attributes) node.removeEventListener("DOMAttrModified", this, true);- if (options.characterData) node.removeEventListener("DOMCharacterDataModified", this, true);- if (options.childList) node.removeEventListener("DOMNodeInserted", this, true);- if (options.childList || options.subtree) node.removeEventListener("DOMNodeRemoved", this, true);- },- addTransientObserver: function(node) {- if (node === this.target) return;- this.addListeners_(node);- this.transientObservedNodes.push(node);- var registrations = registrationsTable.get(node);- if (!registrations) registrationsTable.set(node, registrations = []);- registrations.push(this);- },- removeTransientObservers: function() {- var transientObservedNodes = this.transientObservedNodes;- this.transientObservedNodes = [];- transientObservedNodes.forEach(function(node) {- this.removeListeners_(node);- var registrations = registrationsTable.get(node);- for (var i = 0; i < registrations.length; i++) {- if (registrations[i] === this) {- registrations.splice(i, 1);- break;- }- }- }, this);- },- handleEvent: function(e) {- e.stopImmediatePropagation();- switch (e.type) {- case "DOMAttrModified":- var name = e.attrName;- var namespace = e.relatedNode.namespaceURI;- var target = e.target;- var record = new getRecord("attributes", target);- record.attributeName = name;- record.attributeNamespace = namespace;- var oldValue = e.attrChange === MutationEvent.ADDITION ? null : e.prevValue;- forEachAncestorAndObserverEnqueueRecord(target, function(options) {- if (!options.attributes) return;- if (options.attributeFilter && options.attributeFilter.length && options.attributeFilter.indexOf(name) === -1 && options.attributeFilter.indexOf(namespace) === -1) {- return;- }- if (options.attributeOldValue) return getRecordWithOldValue(oldValue);- return record;- });- break;-- case "DOMCharacterDataModified":- var target = e.target;- var record = getRecord("characterData", target);- var oldValue = e.prevValue;- forEachAncestorAndObserverEnqueueRecord(target, function(options) {- if (!options.characterData) return;- if (options.characterDataOldValue) return getRecordWithOldValue(oldValue);- return record;- });- break;-- case "DOMNodeRemoved":- this.addTransientObserver(e.target);-- case "DOMNodeInserted":- var changedNode = e.target;- var addedNodes, removedNodes;- if (e.type === "DOMNodeInserted") {- addedNodes = [ changedNode ];- removedNodes = [];- } else {- addedNodes = [];- removedNodes = [ changedNode ];- }- var previousSibling = changedNode.previousSibling;- var nextSibling = changedNode.nextSibling;- var record = getRecord("childList", e.target.parentNode);- record.addedNodes = addedNodes;- record.removedNodes = removedNodes;- record.previousSibling = previousSibling;- record.nextSibling = nextSibling;- forEachAncestorAndObserverEnqueueRecord(e.relatedNode, function(options) {- if (!options.childList) return;- return record;- });- }- clearRecords();- }- };- global.JsMutationObserver = JsMutationObserver;- if (!global.MutationObserver) {- global.MutationObserver = JsMutationObserver;- JsMutationObserver._isPolyfilled = true;- }-})(self);--(function(scope) {- "use strict";- if (!(window.performance && window.performance.now)) {- var start = Date.now();- window.performance = {- now: function() {- return Date.now() - start;- }- };- }- if (!window.requestAnimationFrame) {- window.requestAnimationFrame = function() {- var nativeRaf = window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame;- return nativeRaf ? function(callback) {- return nativeRaf(function() {- callback(performance.now());- });- } : function(callback) {- return window.setTimeout(callback, 1e3 / 60);- };- }();- }- if (!window.cancelAnimationFrame) {- window.cancelAnimationFrame = function() {- return window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || function(id) {- clearTimeout(id);- };- }();- }- var workingDefaultPrevented = function() {- var e = document.createEvent("Event");- e.initEvent("foo", true, true);- e.preventDefault();- return e.defaultPrevented;- }();- if (!workingDefaultPrevented) {- var origPreventDefault = Event.prototype.preventDefault;- Event.prototype.preventDefault = function() {- if (!this.cancelable) {- return;- }- origPreventDefault.call(this);- Object.defineProperty(this, "defaultPrevented", {- get: function() {- return true;- },- configurable: true- });- };- }- var isIE = /Trident/.test(navigator.userAgent);- if (!window.CustomEvent || isIE && typeof window.CustomEvent !== "function") {- window.CustomEvent = function(inType, params) {- params = params || {};- var e = document.createEvent("CustomEvent");- e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);- return e;- };- window.CustomEvent.prototype = window.Event.prototype;- }- if (!window.Event || isIE && typeof window.Event !== "function") {- var origEvent = window.Event;- window.Event = function(inType, params) {- params = params || {};- var e = document.createEvent("Event");- e.initEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable));- return e;- };- window.Event.prototype = origEvent.prototype;- }-})(window.WebComponents);--window.HTMLImports = window.HTMLImports || {- flags: {}-};--(function(scope) {- var IMPORT_LINK_TYPE = "import";- var useNative = Boolean(IMPORT_LINK_TYPE in document.createElement("link"));- var hasShadowDOMPolyfill = Boolean(window.ShadowDOMPolyfill);- var wrap = function(node) {- return hasShadowDOMPolyfill ? window.ShadowDOMPolyfill.wrapIfNeeded(node) : node;- };- var rootDocument = wrap(document);- var currentScriptDescriptor = {- get: function() {- var script = window.HTMLImports.currentScript || document.currentScript || (document.readyState !== "complete" ? document.scripts[document.scripts.length - 1] : null);- return wrap(script);- },- configurable: true- };- Object.defineProperty(document, "_currentScript", currentScriptDescriptor);- Object.defineProperty(rootDocument, "_currentScript", currentScriptDescriptor);- var isIE = /Trident/.test(navigator.userAgent);- function whenReady(callback, doc) {- doc = doc || rootDocument;- whenDocumentReady(function() {- watchImportsLoad(callback, doc);- }, doc);- }- var requiredReadyState = isIE ? "complete" : "interactive";- var READY_EVENT = "readystatechange";- function isDocumentReady(doc) {- return doc.readyState === "complete" || doc.readyState === requiredReadyState;- }- function whenDocumentReady(callback, doc) {- if (!isDocumentReady(doc)) {- var checkReady = function() {- if (doc.readyState === "complete" || doc.readyState === requiredReadyState) {- doc.removeEventListener(READY_EVENT, checkReady);- whenDocumentReady(callback, doc);- }- };- doc.addEventListener(READY_EVENT, checkReady);- } else if (callback) {- callback();- }- }- function markTargetLoaded(event) {- event.target.__loaded = true;- }- function watchImportsLoad(callback, doc) {- var imports = doc.querySelectorAll("link[rel=import]");- var parsedCount = 0, importCount = imports.length, newImports = [], errorImports = [];- function checkDone() {- if (parsedCount == importCount && callback) {- callback({- allImports: imports,- loadedImports: newImports,- errorImports: errorImports- });- }- }- function loadedImport(e) {- markTargetLoaded(e);- newImports.push(this);- parsedCount++;- checkDone();- }- function errorLoadingImport(e) {- errorImports.push(this);- parsedCount++;- checkDone();- }- if (importCount) {- for (var i = 0, imp; i < importCount && (imp = imports[i]); i++) {- if (isImportLoaded(imp)) {- newImports.push(this);- parsedCount++;- checkDone();- } else {- imp.addEventListener("load", loadedImport);- imp.addEventListener("error", errorLoadingImport);- }- }- } else {- checkDone();- }- }- function isImportLoaded(link) {- return useNative ? link.__loaded || link.import && link.import.readyState !== "loading" : link.__importParsed;- }- if (useNative) {- new MutationObserver(function(mxns) {- for (var i = 0, l = mxns.length, m; i < l && (m = mxns[i]); i++) {- if (m.addedNodes) {- handleImports(m.addedNodes);- }- }- }).observe(document.head, {- childList: true- });- function handleImports(nodes) {- for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {- if (isImport(n)) {- handleImport(n);- }- }- }- function isImport(element) {- return element.localName === "link" && element.rel === "import";- }- function handleImport(element) {- var loaded = element.import;- if (loaded) {- markTargetLoaded({- target: element- });- } else {- element.addEventListener("load", markTargetLoaded);- element.addEventListener("error", markTargetLoaded);- }- }- (function() {- if (document.readyState === "loading") {- var imports = document.querySelectorAll("link[rel=import]");- for (var i = 0, l = imports.length, imp; i < l && (imp = imports[i]); i++) {- handleImport(imp);- }- }- })();- }- whenReady(function(detail) {- window.HTMLImports.ready = true;- window.HTMLImports.readyTime = new Date().getTime();- var evt = rootDocument.createEvent("CustomEvent");- evt.initCustomEvent("HTMLImportsLoaded", true, true, detail);- rootDocument.dispatchEvent(evt);- });- scope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE;- scope.useNative = useNative;- scope.rootDocument = rootDocument;- scope.whenReady = whenReady;- scope.isIE = isIE;-})(window.HTMLImports);--(function(scope) {- var modules = [];- var addModule = function(module) {- modules.push(module);- };- var initializeModules = function() {- modules.forEach(function(module) {- module(scope);- });- };- scope.addModule = addModule;- scope.initializeModules = initializeModules;-})(window.HTMLImports);--window.HTMLImports.addModule(function(scope) {- var CSS_URL_REGEXP = /(url\()([^)]*)(\))/g;- var CSS_IMPORT_REGEXP = /(@import[\s]+(?!url\())([^;]*)(;)/g;- var path = {- resolveUrlsInStyle: function(style, linkUrl) {- var doc = style.ownerDocument;- var resolver = doc.createElement("a");- style.textContent = this.resolveUrlsInCssText(style.textContent, linkUrl, resolver);- return style;- },- resolveUrlsInCssText: function(cssText, linkUrl, urlObj) {- var r = this.replaceUrls(cssText, urlObj, linkUrl, CSS_URL_REGEXP);- r = this.replaceUrls(r, urlObj, linkUrl, CSS_IMPORT_REGEXP);- return r;- },- replaceUrls: function(text, urlObj, linkUrl, regexp) {- return text.replace(regexp, function(m, pre, url, post) {- var urlPath = url.replace(/["']/g, "");- if (linkUrl) {- urlPath = new URL(urlPath, linkUrl).href;- }- urlObj.href = urlPath;- urlPath = urlObj.href;- return pre + "'" + urlPath + "'" + post;- });- }- };- scope.path = path;-});--window.HTMLImports.addModule(function(scope) {- var xhr = {- async: true,- ok: function(request) {- return request.status >= 200 && request.status < 300 || request.status === 304 || request.status === 0;- },- load: function(url, next, nextContext) {- var request = new XMLHttpRequest();- if (scope.flags.debug || scope.flags.bust) {- url += "?" + Math.random();- }- request.open("GET", url, xhr.async);- request.addEventListener("readystatechange", function(e) {- if (request.readyState === 4) {- var redirectedUrl = null;- try {- var locationHeader = request.getResponseHeader("Location");- if (locationHeader) {- redirectedUrl = locationHeader.substr(0, 1) === "/" ? location.origin + locationHeader : locationHeader;- }- } catch (e) {- console.error(e.message);- }- next.call(nextContext, !xhr.ok(request) && request, request.response || request.responseText, redirectedUrl);- }- });- request.send();- return request;- },- loadDocument: function(url, next, nextContext) {- this.load(url, next, nextContext).responseType = "document";- }- };- scope.xhr = xhr;-});--window.HTMLImports.addModule(function(scope) {- var xhr = scope.xhr;- var flags = scope.flags;- var Loader = function(onLoad, onComplete) {- this.cache = {};- this.onload = onLoad;- this.oncomplete = onComplete;- this.inflight = 0;- this.pending = {};- };- Loader.prototype = {- addNodes: function(nodes) {- this.inflight += nodes.length;- for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {- this.require(n);- }- this.checkDone();- },- addNode: function(node) {- this.inflight++;- this.require(node);- this.checkDone();- },- require: function(elt) {- var url = elt.src || elt.href;- elt.__nodeUrl = url;- if (!this.dedupe(url, elt)) {- this.fetch(url, elt);- }- },- dedupe: function(url, elt) {- if (this.pending[url]) {- this.pending[url].push(elt);- return true;- }- var resource;- if (this.cache[url]) {- this.onload(url, elt, this.cache[url]);- this.tail();- return true;- }- this.pending[url] = [ elt ];- return false;- },- fetch: function(url, elt) {- flags.load && console.log("fetch", url, elt);- if (!url) {- setTimeout(function() {- this.receive(url, elt, {- error: "href must be specified"- }, null);- }.bind(this), 0);- } else if (url.match(/^data:/)) {- var pieces = url.split(",");- var header = pieces[0];- var body = pieces[1];- if (header.indexOf(";base64") > -1) {- body = atob(body);- } else {- body = decodeURIComponent(body);- }- setTimeout(function() {- this.receive(url, elt, null, body);- }.bind(this), 0);- } else {- var receiveXhr = function(err, resource, redirectedUrl) {- this.receive(url, elt, err, resource, redirectedUrl);- }.bind(this);- xhr.load(url, receiveXhr);- }- },- receive: function(url, elt, err, resource, redirectedUrl) {- this.cache[url] = resource;- var $p = this.pending[url];- for (var i = 0, l = $p.length, p; i < l && (p = $p[i]); i++) {- this.onload(url, p, resource, err, redirectedUrl);- this.tail();- }- this.pending[url] = null;- },- tail: function() {- --this.inflight;- this.checkDone();- },- checkDone: function() {- if (!this.inflight) {- this.oncomplete();- }- }- };- scope.Loader = Loader;-});--window.HTMLImports.addModule(function(scope) {- var Observer = function(addCallback) {- this.addCallback = addCallback;- this.mo = new MutationObserver(this.handler.bind(this));- };- Observer.prototype = {- handler: function(mutations) {- for (var i = 0, l = mutations.length, m; i < l && (m = mutations[i]); i++) {- if (m.type === "childList" && m.addedNodes.length) {- this.addedNodes(m.addedNodes);- }- }- },- addedNodes: function(nodes) {- if (this.addCallback) {- this.addCallback(nodes);- }- for (var i = 0, l = nodes.length, n, loading; i < l && (n = nodes[i]); i++) {- if (n.children && n.children.length) {- this.addedNodes(n.children);- }- }- },- observe: function(root) {- this.mo.observe(root, {- childList: true,- subtree: true- });- }- };- scope.Observer = Observer;-});--window.HTMLImports.addModule(function(scope) {- var path = scope.path;- var rootDocument = scope.rootDocument;- var flags = scope.flags;- var isIE = scope.isIE;- var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;- var IMPORT_SELECTOR = "link[rel=" + IMPORT_LINK_TYPE + "]";- var importParser = {- documentSelectors: IMPORT_SELECTOR,- importsSelectors: [ IMPORT_SELECTOR, "link[rel=stylesheet]:not([type])", "style:not([type])", "script:not([type])", 'script[type="application/javascript"]', 'script[type="text/javascript"]' ].join(","),- map: {- link: "parseLink",- script: "parseScript",- style: "parseStyle"- },- dynamicElements: [],- parseNext: function() {- var next = this.nextToParse();- if (next) {- this.parse(next);- }- },- parse: function(elt) {- if (this.isParsed(elt)) {- flags.parse && console.log("[%s] is already parsed", elt.localName);- return;- }- var fn = this[this.map[elt.localName]];- if (fn) {- this.markParsing(elt);- fn.call(this, elt);- }- },- parseDynamic: function(elt, quiet) {- this.dynamicElements.push(elt);- if (!quiet) {- this.parseNext();- }- },- markParsing: function(elt) {- flags.parse && console.log("parsing", elt);- this.parsingElement = elt;- },- markParsingComplete: function(elt) {- elt.__importParsed = true;- this.markDynamicParsingComplete(elt);- if (elt.__importElement) {- elt.__importElement.__importParsed = true;- this.markDynamicParsingComplete(elt.__importElement);- }- this.parsingElement = null;- flags.parse && console.log("completed", elt);- },- markDynamicParsingComplete: function(elt) {- var i = this.dynamicElements.indexOf(elt);- if (i >= 0) {- this.dynamicElements.splice(i, 1);- }- },- parseImport: function(elt) {- elt.import = elt.__doc;- if (window.HTMLImports.__importsParsingHook) {- window.HTMLImports.__importsParsingHook(elt);- }- if (elt.import) {- elt.import.__importParsed = true;- }- this.markParsingComplete(elt);- if (elt.__resource && !elt.__error) {- elt.dispatchEvent(new CustomEvent("load", {- bubbles: false- }));- } else {- elt.dispatchEvent(new CustomEvent("error", {- bubbles: false- }));- }- if (elt.__pending) {- var fn;- while (elt.__pending.length) {- fn = elt.__pending.shift();- if (fn) {- fn({- target: elt- });- }- }- }- this.parseNext();- },- parseLink: function(linkElt) {- if (nodeIsImport(linkElt)) {- this.parseImport(linkElt);- } else {- linkElt.href = linkElt.href;- this.parseGeneric(linkElt);- }- },- parseStyle: function(elt) {- var src = elt;- elt = cloneStyle(elt);- src.__appliedElement = elt;- elt.__importElement = src;- this.parseGeneric(elt);- },- parseGeneric: function(elt) {- this.trackElement(elt);- this.addElementToDocument(elt);- },- rootImportForElement: function(elt) {- var n = elt;- while (n.ownerDocument.__importLink) {- n = n.ownerDocument.__importLink;- }- return n;- },- addElementToDocument: function(elt) {- var port = this.rootImportForElement(elt.__importElement || elt);- port.parentNode.insertBefore(elt, port);- },- trackElement: function(elt, callback) {- var self = this;- var done = function(e) {- elt.removeEventListener("load", done);- elt.removeEventListener("error", done);- if (callback) {- callback(e);- }- self.markParsingComplete(elt);- self.parseNext();- };- elt.addEventListener("load", done);- elt.addEventListener("error", done);- if (isIE && elt.localName === "style") {- var fakeLoad = false;- if (elt.textContent.indexOf("@import") == -1) {- fakeLoad = true;- } else if (elt.sheet) {- fakeLoad = true;- var csr = elt.sheet.cssRules;- var len = csr ? csr.length : 0;- for (var i = 0, r; i < len && (r = csr[i]); i++) {- if (r.type === CSSRule.IMPORT_RULE) {- fakeLoad = fakeLoad && Boolean(r.styleSheet);- }- }- }- if (fakeLoad) {- setTimeout(function() {- elt.dispatchEvent(new CustomEvent("load", {- bubbles: false- }));- });- }- }- },- parseScript: function(scriptElt) {- var script = document.createElement("script");- script.__importElement = scriptElt;- script.src = scriptElt.src ? scriptElt.src : generateScriptDataUrl(scriptElt);- scope.currentScript = scriptElt;- this.trackElement(script, function(e) {- if (script.parentNode) {- script.parentNode.removeChild(script);- }- scope.currentScript = null;- });- this.addElementToDocument(script);- },- nextToParse: function() {- this._mayParse = [];- return !this.parsingElement && (this.nextToParseInDoc(rootDocument) || this.nextToParseDynamic());- },- nextToParseInDoc: function(doc, link) {- if (doc && this._mayParse.indexOf(doc) < 0) {- this._mayParse.push(doc);- var nodes = doc.querySelectorAll(this.parseSelectorsForNode(doc));- for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {- if (!this.isParsed(n)) {- if (this.hasResource(n)) {- return nodeIsImport(n) ? this.nextToParseInDoc(n.__doc, n) : n;- } else {- return;- }- }- }- }- return link;- },- nextToParseDynamic: function() {- return this.dynamicElements[0];- },- parseSelectorsForNode: function(node) {- var doc = node.ownerDocument || node;- return doc === rootDocument ? this.documentSelectors : this.importsSelectors;- },- isParsed: function(node) {- return node.__importParsed;- },- needsDynamicParsing: function(elt) {- return this.dynamicElements.indexOf(elt) >= 0;- },- hasResource: function(node) {- if (nodeIsImport(node) && node.__doc === undefined) {- return false;- }- return true;- }- };- function nodeIsImport(elt) {- return elt.localName === "link" && elt.rel === IMPORT_LINK_TYPE;- }- function generateScriptDataUrl(script) {- var scriptContent = generateScriptContent(script);- return "data:text/javascript;charset=utf-8," + encodeURIComponent(scriptContent);- }- function generateScriptContent(script) {- return script.textContent + generateSourceMapHint(script);- }- function generateSourceMapHint(script) {- var owner = script.ownerDocument;- owner.__importedScripts = owner.__importedScripts || 0;- var moniker = script.ownerDocument.baseURI;- var num = owner.__importedScripts ? "-" + owner.__importedScripts : "";- owner.__importedScripts++;- return "\n//# sourceURL=" + moniker + num + ".js\n";- }- function cloneStyle(style) {- var clone = style.ownerDocument.createElement("style");- clone.textContent = style.textContent;- path.resolveUrlsInStyle(clone);- return clone;- }- scope.parser = importParser;- scope.IMPORT_SELECTOR = IMPORT_SELECTOR;-});--window.HTMLImports.addModule(function(scope) {- var flags = scope.flags;- var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;- var IMPORT_SELECTOR = scope.IMPORT_SELECTOR;- var rootDocument = scope.rootDocument;- var Loader = scope.Loader;- var Observer = scope.Observer;- var parser = scope.parser;- var importer = {- documents: {},- documentPreloadSelectors: IMPORT_SELECTOR,- importsPreloadSelectors: [ IMPORT_SELECTOR ].join(","),- loadNode: function(node) {- importLoader.addNode(node);- },- loadSubtree: function(parent) {- var nodes = this.marshalNodes(parent);- importLoader.addNodes(nodes);- },- marshalNodes: function(parent) {- return parent.querySelectorAll(this.loadSelectorsForNode(parent));- },- loadSelectorsForNode: function(node) {- var doc = node.ownerDocument || node;- return doc === rootDocument ? this.documentPreloadSelectors : this.importsPreloadSelectors;- },- loaded: function(url, elt, resource, err, redirectedUrl) {- flags.load && console.log("loaded", url, elt);- elt.__resource = resource;- elt.__error = err;- if (isImportLink(elt)) {- var doc = this.documents[url];- if (doc === undefined) {- doc = err ? null : makeDocument(resource, redirectedUrl || url);- if (doc) {- doc.__importLink = elt;- this.bootDocument(doc);- }- this.documents[url] = doc;- }- elt.__doc = doc;- }- parser.parseNext();- },- bootDocument: function(doc) {- this.loadSubtree(doc);- this.observer.observe(doc);- parser.parseNext();- },- loadedAll: function() {- parser.parseNext();- }- };- var importLoader = new Loader(importer.loaded.bind(importer), importer.loadedAll.bind(importer));- importer.observer = new Observer();- function isImportLink(elt) {- return isLinkRel(elt, IMPORT_LINK_TYPE);- }- function isLinkRel(elt, rel) {- return elt.localName === "link" && elt.getAttribute("rel") === rel;- }- function hasBaseURIAccessor(doc) {- return !!Object.getOwnPropertyDescriptor(doc, "baseURI");- }- function makeDocument(resource, url) {- var doc = document.implementation.createHTMLDocument(IMPORT_LINK_TYPE);- doc._URL = url;- var base = doc.createElement("base");- base.setAttribute("href", url);- if (!doc.baseURI && !hasBaseURIAccessor(doc)) {- Object.defineProperty(doc, "baseURI", {- value: url- });- }- var meta = doc.createElement("meta");- meta.setAttribute("charset", "utf-8");- doc.head.appendChild(meta);- doc.head.appendChild(base);- doc.body.innerHTML = resource;- if (window.HTMLTemplateElement && HTMLTemplateElement.bootstrap) {- HTMLTemplateElement.bootstrap(doc);- }- return doc;- }- if (!document.baseURI) {- var baseURIDescriptor = {- get: function() {- var base = document.querySelector("base");- return base ? base.href : window.location.href;- },- configurable: true- };- Object.defineProperty(document, "baseURI", baseURIDescriptor);- Object.defineProperty(rootDocument, "baseURI", baseURIDescriptor);- }- scope.importer = importer;- scope.importLoader = importLoader;-});--window.HTMLImports.addModule(function(scope) {- var parser = scope.parser;- var importer = scope.importer;- var dynamic = {- added: function(nodes) {- var owner, parsed, loading;- for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {- if (!owner) {- owner = n.ownerDocument;- parsed = parser.isParsed(owner);- }- loading = this.shouldLoadNode(n);- if (loading) {- importer.loadNode(n);- }- if (this.shouldParseNode(n) && parsed) {- parser.parseDynamic(n, loading);- }- }- },- shouldLoadNode: function(node) {- return node.nodeType === 1 && matches.call(node, importer.loadSelectorsForNode(node));- },- shouldParseNode: function(node) {- return node.nodeType === 1 && matches.call(node, parser.parseSelectorsForNode(node));- }- };- importer.observer.addCallback = dynamic.added.bind(dynamic);- var matches = HTMLElement.prototype.matches || HTMLElement.prototype.matchesSelector || HTMLElement.prototype.webkitMatchesSelector || HTMLElement.prototype.mozMatchesSelector || HTMLElement.prototype.msMatchesSelector;-});--(function(scope) {- var initializeModules = scope.initializeModules;- var isIE = scope.isIE;- if (scope.useNative) {- return;- }- initializeModules();- var rootDocument = scope.rootDocument;- function bootstrap() {- window.HTMLImports.importer.bootDocument(rootDocument);- }- if (document.readyState === "complete" || document.readyState === "interactive" && !window.attachEvent) {- bootstrap();- } else {- document.addEventListener("DOMContentLoaded", bootstrap);- }-})(window.HTMLImports);\ No newline at end of filediff --git a/manager/client/src/main/webapp/bower_components/webcomponentsjs/HTMLImports.min.js b/manager/client/src/main/webapp/bower_components/webcomponentsjs/HTMLImports.min.jsdeleted file mode 100644index e89492c52..000000000--- a/manager/client/src/main/webapp/bower_components/webcomponentsjs/HTMLImports.min.js+++ /dev/null@@ -1,11 +0,0 @@-/**- * @license- * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.- * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt- * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt- * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt- * Code distributed by Google as part of the polymer project is also- * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt- */-// @version 0.7.24-"undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,n=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};n.prototype={set:function(t,n){var r=t[this.name];return r&&r[0]===t?r[1]=n:e(t,this.name,{value:[t,n],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return!(!t||t[0]!==e)&&(t[0]=t[1]=void 0,!0)},has:function(e){var t=e[this.name];return!!t&&t[0]===e}},window.WeakMap=n}(),function(e){function t(e){E.push(e),g||(g=!0,f(r))}function n(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function r(){g=!1;var e=E;E=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var n=e.takeRecords();o(e),n.length&&(e.callback_(n,e),t=!0)}),t&&r()}function o(e){e.nodes_.forEach(function(t){var n=v.get(t);n&&n.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}function i(e,t){for(var n=e;n;n=n.parentNode){var r=v.get(n);if(r)for(var o=0;o<r.length;o++){var i=r[o],a=i.options;if(n===e||a.subtree){var s=t(a);s&&i.enqueue(s)}}}}function a(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++_}function s(e,t){this.type=e,this.target=t,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function d(e){var t=new s(e.type,e.target);return t.addedNodes=e.addedNodes.slice(),t.removedNodes=e.removedNodes.slice(),t.previousSibling=e.previousSibling,t.nextSibling=e.nextSibling,t.attributeName=e.attributeName,t.attributeNamespace=e.attributeNamespace,t.oldValue=e.oldValue,t}function c(e,t){return y=new s(e,t)}function u(e){return L?L:(L=d(y),L.oldValue=e,L)}function l(){y=L=void 0}function h(e){return e===L||e===y}function m(e,t){return e===t?e:L&&h(e)?L:null}function p(e,t,n){this.observer=e,this.target=t,this.options=n,this.transientObservedNodes=[]}if(!e.JsMutationObserver){var f,v=new WeakMap;if(/Trident|Edge/.test(navigator.userAgent))f=setTimeout;else if(window.setImmediate)f=window.setImmediate;else{var w=[],b=String(Math.random());window.addEventListener("message",function(e){if(e.data===b){var t=w;w=[],t.forEach(function(e){e()})}}),f=function(e){w.push(e),window.postMessage(b,"*")}}var g=!1,E=[],_=0;a.prototype={observe:function(e,t){if(e=n(e),!t.childList&&!t.attributes&&!t.characterData||t.attributeOldValue&&!t.attributes||t.attributeFilter&&t.attributeFilter.length&&!t.attributes||t.characterDataOldValue&&!t.characterData)throw new SyntaxError;var r=v.get(e);r||v.set(e,r=[]);for(var o,i=0;i<r.length;i++)if(r[i].observer===this){o=r[i],o.removeListeners(),o.options=t;break}o||(o=new p(this,e,t),r.push(o),this.nodes_.push(e)),o.addListeners()},disconnect:function(){this.nodes_.forEach(function(e){for(var t=v.get(e),n=0;n<t.length;n++){var r=t[n];if(r.observer===this){r.removeListeners(),t.splice(n,1);break}}},this),this.records_=[]},takeRecords:function(){var e=this.records_;return this.records_=[],e}};var y,L;p.prototype={enqueue:function(e){var n=this.observer.records_,r=n.length;if(n.length>0){var o=n[r-1],i=m(o,e);if(i)return void(n[r-1]=i)}else t(this.observer);n[r]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=v.get(e);t||v.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=v.get(e),n=0;n<t.length;n++)if(t[n]===this){t.splice(n,1);break}},this)},handleEvent:function(e){switch(e.stopImmediatePropagation(),e.type){case"DOMAttrModified":var t=e.attrName,n=e.relatedNode.namespaceURI,r=e.target,o=new c("attributes",r);o.attributeName=t,o.attributeNamespace=n;var a=e.attrChange===MutationEvent.ADDITION?null:e.prevValue;i(r,function(e){if(e.attributes&&(!e.attributeFilter||!e.attributeFilter.length||e.attributeFilter.indexOf(t)!==-1||e.attributeFilter.indexOf(n)!==-1))return e.attributeOldValue?u(a):o});break;case"DOMCharacterDataModified":var r=e.target,o=c("characterData",r),a=e.prevValue;i(r,function(e){if(e.characterData)return e.characterDataOldValue?u(a):o});break;case"DOMNodeRemoved":this.addTransientObserver(e.target);case"DOMNodeInserted":var s,d,h=e.target;"DOMNodeInserted"===e.type?(s=[h],d=[]):(s=[],d=[h]);var m=h.previousSibling,p=h.nextSibling,o=c("childList",e.target.parentNode);o.addedNodes=s,o.removedNodes=d,o.previousSibling=m,o.nextSibling=p,i(e.relatedNode,function(e){if(e.childList)return o})}l()}},e.JsMutationObserver=a,e.MutationObserver||(e.MutationObserver=a,a._isPolyfilled=!0)}}(self),function(e){"use strict";if(!window.performance||!window.performance.now){var t=Date.now();window.performance={now:function(){return Date.now()-t}}}window.requestAnimationFrame||(window.requestAnimationFrame=function(){var e=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;return e?function(t){return e(function(){t(performance.now())})}:function(e){return window.setTimeout(e,1e3/60)}}()),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(){return window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(e){clearTimeout(e)}}());var n=function(){var e=document.createEvent("Event");return e.initEvent("foo",!0,!0),e.preventDefault(),e.defaultPrevented}();if(!n){var r=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(r.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var o=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||o&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.Event||o&&"function"!=typeof window.Event){var i=window.Event;window.Event=function(e,t){t=t||{};var n=document.createEvent("Event");return n.initEvent(e,Boolean(t.bubbles),Boolean(t.cancelable)),n},window.Event.prototype=i.prototype}}(window.WebComponents),window.HTMLImports=window.HTMLImports||{flags:{}},function(e){function t(e,t){t=t||p,r(function(){i(e,t)},t)}function n(e){return"complete"===e.readyState||e.readyState===w}function r(e,t){if(n(t))e&&e();else{var o=function(){"complete"!==t.readyState&&t.readyState!==w||(t.removeEventListener(b,o),r(e,t))};t.addEventListener(b,o)}}function o(e){e.target.__loaded=!0}function i(e,t){function n(){d==c&&e&&e({allImports:s,loadedImports:u,errorImports:l})}function r(e){o(e),u.push(this),d++,n()}function i(e){l.push(this),d++,n()}var s=t.querySelectorAll("link[rel=import]"),d=0,c=s.length,u=[],l=[];if(c)for(var h,m=0;m<c&&(h=s[m]);m++)a(h)?(u.push(this),d++,n()):(h.addEventListener("load",r),h.addEventListener("error",i));else n()}function a(e){return l?e.__loaded||e["import"]&&"loading"!==e["import"].readyState:e.__importParsed}function s(e){for(var t,n=0,r=e.length;n<r&&(t=e[n]);n++)d(t)&&c(t)}function d(e){return"link"===e.localName&&"import"===e.rel}function c(e){var t=e["import"];t?o({target:e}):(e.addEventListener("load",o),e.addEventListener("error",o))}var u="import",l=Boolean(u in document.createElement("link")),h=Boolean(window.ShadowDOMPolyfill),m=function(e){return h?window.ShadowDOMPolyfill.wrapIfNeeded(e):e},p=m(document),f={get:function(){var e=window.HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null);return m(e)},configurable:!0};Object.defineProperty(document,"_currentScript",f),Object.defineProperty(p,"_currentScript",f);var v=/Trident/.test(navigator.userAgent),w=v?"complete":"interactive",b="readystatechange";l&&(new MutationObserver(function(e){for(var t,n=0,r=e.length;n<r&&(t=e[n]);n++)t.addedNodes&&s(t.addedNodes)}).observe(document.head,{childList:!0}),function(){if("loading"===document.readyState)for(var e,t=document.querySelectorAll("link[rel=import]"),n=0,r=t.length;n<r&&(e=t[n]);n++)c(e)}()),t(function(e){window.HTMLImports.ready=!0,window.HTMLImports.readyTime=(new Date).getTime();var t=p.createEvent("CustomEvent");t.initCustomEvent("HTMLImportsLoaded",!0,!0,e),p.dispatchEvent(t)}),e.IMPORT_LINK_TYPE=u,e.useNative=l,e.rootDocument=p,e.whenReady=t,e.isIE=v}(window.HTMLImports),function(e){var t=[],n=function(e){t.push(e)},r=function(){t.forEach(function(t){t(e)})};e.addModule=n,e.initializeModules=r}(window.HTMLImports),window.HTMLImports.addModule(function(e){var t=/(url\()([^)]*)(\))/g,n=/(@import[\s]+(?!url\())([^;]*)(;)/g,r={resolveUrlsInStyle:function(e,t){var n=e.ownerDocument,r=n.createElement("a");return e.textContent=this.resolveUrlsInCssText(e.textContent,t,r),e},resolveUrlsInCssText:function(e,r,o){var i=this.replaceUrls(e,o,r,t);return i=this.replaceUrls(i,o,r,n)},replaceUrls:function(e,t,n,r){return e.replace(r,function(e,r,o,i){var a=o.replace(/["']/g,"");return n&&(a=new URL(a,n).href),t.href=a,a=t.href,r+"'"+a+"'"+i})}};e.path=r}),window.HTMLImports.addModule(function(e){var t={async:!0,ok:function(e){return e.status>=200&&e.status<300||304===e.status||0===e.status},load:function(n,r,o){var i=new XMLHttpRequest;return(e.flags.debug||e.flags.bust)&&(n+="?"+Math.random()),i.open("GET",n,t.async),i.addEventListener("readystatechange",function(e){if(4===i.readyState){var n=null;try{var a=i.getResponseHeader("Location");a&&(n="/"===a.substr(0,1)?location.origin+a:a)}catch(e){console.error(e.message)}r.call(o,!t.ok(i)&&i,i.response||i.responseText,n)}}),i.send(),i},loadDocument:function(e,t,n){this.load(e,t,n).responseType="document"}};e.xhr=t}),window.HTMLImports.addModule(function(e){var t=e.xhr,n=e.flags,r=function(e,t){this.cache={},this.onload=e,this.oncomplete=t,this.inflight=0,this.pending={}};r.prototype={addNodes:function(e){this.inflight+=e.length;for(var t,n=0,r=e.length;n<r&&(t=e[n]);n++)this.require(t);this.checkDone()},addNode:function(e){this.inflight++,this.require(e),this.checkDone()},require:function(e){var t=e.src||e.href;e.__nodeUrl=t,this.dedupe(t,e)||this.fetch(t,e)},dedupe:function(e,t){if(this.pending[e])return this.pending[e].push(t),!0;return this.cache[e]?(this.onload(e,t,this.cache[e]),this.tail(),!0):(this.pending[e]=[t],!1)},fetch:function(e,r){if(n.load&&console.log("fetch",e,r),e)if(e.match(/^data:/)){var o=e.split(","),i=o[0],a=o[1];a=i.indexOf(";base64")>-1?atob(a):decodeURIComponent(a),setTimeout(function(){this.receive(e,r,null,a)}.bind(this),0)}else{var s=function(t,n,o){this.receive(e,r,t,n,o)}.bind(this);t.load(e,s)}else setTimeout(function(){this.receive(e,r,{error:"href must be specified"},null)}.bind(this),0)},receive:function(e,t,n,r,o){this.cache[e]=r;for(var i,a=this.pending[e],s=0,d=a.length;s<d&&(i=a[s]);s++)this.onload(e,i,r,n,o),this.tail();this.pending[e]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},e.Loader=r}),window.HTMLImports.addModule(function(e){var t=function(e){this.addCallback=e,this.mo=new MutationObserver(this.handler.bind(this))};t.prototype={handler:function(e){for(var t,n=0,r=e.length;n<r&&(t=e[n]);n++)"childList"===t.type&&t.addedNodes.length&&this.addedNodes(t.addedNodes)},addedNodes:function(e){this.addCallback&&this.addCallback(e);for(var t,n=0,r=e.length;n<r&&(t=e[n]);n++)t.children&&t.children.length&&this.addedNodes(t.children)},observe:function(e){this.mo.observe(e,{childList:!0,subtree:!0})}},e.Observer=t}),window.HTMLImports.addModule(function(e){function t(e){return"link"===e.localName&&e.rel===u}function n(e){var t=r(e);return"data:text/javascript;charset=utf-8,"+encodeURIComponent(t)}function r(e){return e.textContent+o(e)}function o(e){var t=e.ownerDocument;t.__importedScripts=t.__importedScripts||0;var n=e.ownerDocument.baseURI,r=t.__importedScripts?"-"+t.__importedScripts:"";return t.__importedScripts++,"\n//# sourceURL="+n+r+".js\n"}function i(e){var t=e.ownerDocument.createElement("style");return t.textContent=e.textContent,a.resolveUrlsInStyle(t),t}var a=e.path,s=e.rootDocument,d=e.flags,c=e.isIE,u=e.IMPORT_LINK_TYPE,l="link[rel="+u+"]",h={documentSelectors:l,importsSelectors:[l,"link[rel=stylesheet]:not([type])","style:not([type])","script:not([type])",'script[type="application/javascript"]','script[type="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},dynamicElements:[],parseNext:function(){var e=this.nextToParse();e&&this.parse(e)},parse:function(e){if(this.isParsed(e))return void(d.parse&&console.log("[%s] is already parsed",e.localName));var t=this[this.map[e.localName]];t&&(this.markParsing(e),t.call(this,e))},parseDynamic:function(e,t){this.dynamicElements.push(e),t||this.parseNext()},markParsing:function(e){d.parse&&console.log("parsing",e),this.parsingElement=e},markParsingComplete:function(e){e.__importParsed=!0,this.markDynamicParsingComplete(e),e.__importElement&&(e.__importElement.__importParsed=!0,this.markDynamicParsingComplete(e.__importElement)),this.parsingElement=null,d.parse&&console.log("completed",e)},markDynamicParsingComplete:function(e){var t=this.dynamicElements.indexOf(e);t>=0&&this.dynamicElements.splice(t,1)},parseImport:function(e){if(e["import"]=e.__doc,window.HTMLImports.__importsParsingHook&&window.HTMLImports.__importsParsingHook(e),e["import"]&&(e["import"].__importParsed=!0),this.markParsingComplete(e),e.__resource&&!e.__error?e.dispatchEvent(new CustomEvent("load",{bubbles:!1})):e.dispatchEvent(new CustomEvent("error",{bubbles:!1})),e.__pending)for(var t;e.__pending.length;)t=e.__pending.shift(),t&&t({target:e});this.parseNext()},parseLink:function(e){t(e)?this.parseImport(e):(e.href=e.href,this.parseGeneric(e))},parseStyle:function(e){var t=e;e=i(e),t.__appliedElement=e,e.__importElement=t,this.parseGeneric(e)},parseGeneric:function(e){this.trackElement(e),this.addElementToDocument(e)},rootImportForElement:function(e){for(var t=e;t.ownerDocument.__importLink;)t=t.ownerDocument.__importLink;return t},addElementToDocument:function(e){var t=this.rootImportForElement(e.__importElement||e);t.parentNode.insertBefore(e,t)},trackElement:function(e,t){var n=this,r=function(o){e.removeEventListener("load",r),e.removeEventListener("error",r),t&&t(o),n.markParsingComplete(e),n.parseNext()};if(e.addEventListener("load",r),e.addEventListener("error",r),c&&"style"===e.localName){var o=!1;if(e.textContent.indexOf("@import")==-1)o=!0;else if(e.sheet){o=!0;for(var i,a=e.sheet.cssRules,s=a?a.length:0,d=0;d<s&&(i=a[d]);d++)i.type===CSSRule.IMPORT_RULE&&(o=o&&Boolean(i.styleSheet))}o&&setTimeout(function(){e.dispatchEvent(new CustomEvent("load",{bubbles:!1}))})}},parseScript:function(t){var r=document.createElement("script");r.__importElement=t,r.src=t.src?t.src:n(t),e.currentScript=t,this.trackElement(r,function(t){r.parentNode&&r.parentNode.removeChild(r),e.currentScript=null}),this.addElementToDocument(r)},nextToParse:function(){return this._mayParse=[],!this.parsingElement&&(this.nextToParseInDoc(s)||this.nextToParseDynamic())},nextToParseInDoc:function(e,n){if(e&&this._mayParse.indexOf(e)<0){this._mayParse.push(e);for(var r,o=e.querySelectorAll(this.parseSelectorsForNode(e)),i=0,a=o.length;i<a&&(r=o[i]);i++)if(!this.isParsed(r))return this.hasResource(r)?t(r)?this.nextToParseInDoc(r.__doc,r):r:void 0}return n},nextToParseDynamic:function(){return this.dynamicElements[0]},parseSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===s?this.documentSelectors:this.importsSelectors},isParsed:function(e){return e.__importParsed},needsDynamicParsing:function(e){return this.dynamicElements.indexOf(e)>=0},hasResource:function(e){return!t(e)||void 0!==e.__doc}};e.parser=h,e.IMPORT_SELECTOR=l}),window.HTMLImports.addModule(function(e){function t(e){return n(e,a)}function n(e,t){return"link"===e.localName&&e.getAttribute("rel")===t}function r(e){return!!Object.getOwnPropertyDescriptor(e,"baseURI")}function o(e,t){var n=document.implementation.createHTMLDocument(a);n._URL=t;var o=n.createElement("base");o.setAttribute("href",t),n.baseURI||r(n)||Object.defineProperty(n,"baseURI",{value:t});var i=n.createElement("meta");return i.setAttribute("charset","utf-8"),n.head.appendChild(i),n.head.appendChild(o),n.body.innerHTML=e,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(n),n}var i=e.flags,a=e.IMPORT_LINK_TYPE,s=e.IMPORT_SELECTOR,d=e.rootDocument,c=e.Loader,u=e.Observer,l=e.parser,h={documents:{},documentPreloadSelectors:s,importsPreloadSelectors:[s].join(","),loadNode:function(e){m.addNode(e)},loadSubtree:function(e){var t=this.marshalNodes(e);m.addNodes(t)},marshalNodes:function(e){return e.querySelectorAll(this.loadSelectorsForNode(e))},loadSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===d?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(e,n,r,a,s){if(i.load&&console.log("loaded",e,n),n.__resource=r,n.__error=a,t(n)){var d=this.documents[e];void 0===d&&(d=a?null:o(r,s||e),d&&(d.__importLink=n,this.bootDocument(d)),this.documents[e]=d),n.__doc=d}l.parseNext()},bootDocument:function(e){this.loadSubtree(e),this.observer.observe(e),l.parseNext()},loadedAll:function(){l.parseNext()}},m=new c(h.loaded.bind(h),h.loadedAll.bind(h));if(h.observer=new u,!document.baseURI){var p={get:function(){var e=document.querySelector("base");return e?e.href:window.location.href},configurable:!0};Object.defineProperty(document,"baseURI",p),Object.defineProperty(d,"baseURI",p)}e.importer=h,e.importLoader=m}),window.HTMLImports.addModule(function(e){var t=e.parser,n=e.importer,r={added:function(e){for(var r,o,i,a,s=0,d=e.length;s<d&&(a=e[s]);s++)r||(r=a.ownerDocument,o=t.isParsed(r)),i=this.shouldLoadNode(a),i&&n.loadNode(a),this.shouldParseNode(a)&&o&&t.parseDynamic(a,i)},shouldLoadNode:function(e){return 1===e.nodeType&&o.call(e,n.loadSelectorsForNode(e))},shouldParseNode:function(e){return 1===e.nodeType&&o.call(e,t.parseSelectorsForNode(e))}};n.observer.addCallback=r.added.bind(r);var o=HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector}),function(e){function t(){window.HTMLImports.importer.bootDocument(r)}var n=e.initializeModules;e.isIE;if(!e.useNative){n();var r=e.rootDocument;"complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?t():document.addEventListener("DOMContentLoaded",t)}}(window.HTMLImports);\ No newline at end of filediff --git a/manager/client/src/main/webapp/bower_components/webcomponentsjs/MutationObserver.js b/manager/client/src/main/webapp/bower_components/webcomponentsjs/MutationObserver.jsdeleted file mode 100644index 204de7d76..000000000--- a/manager/client/src/main/webapp/bower_components/webcomponentsjs/MutationObserver.js+++ /dev/null@@ -1,350 +0,0 @@-/**- * @license- * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.- * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt- * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt- * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt- * Code distributed by Google as part of the polymer project is also- * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt- */-// @version 0.7.24-if (typeof WeakMap === "undefined") {- (function() {- var defineProperty = Object.defineProperty;- var counter = Date.now() % 1e9;- var WeakMap = function() {- this.name = "__st" + (Math.random() * 1e9 >>> 0) + (counter++ + "__");- };- WeakMap.prototype = {- set: function(key, value) {- var entry = key[this.name];- if (entry && entry[0] === key) entry[1] = value; else defineProperty(key, this.name, {- value: [ key, value ],- writable: true- });- return this;- },- get: function(key) {- var entry;- return (entry = key[this.name]) && entry[0] === key ? entry[1] : undefined;- },- "delete": function(key) {- var entry = key[this.name];- if (!entry || entry[0] !== key) return false;- entry[0] = entry[1] = undefined;- return true;- },- has: function(key) {- var entry = key[this.name];- if (!entry) return false;- return entry[0] === key;- }- };- window.WeakMap = WeakMap;- })();-}--(function(global) {- if (global.JsMutationObserver) {- return;- }- var registrationsTable = new WeakMap();- var setImmediate;- if (/Trident|Edge/.test(navigator.userAgent)) {- setImmediate = setTimeout;- } else if (window.setImmediate) {- setImmediate = window.setImmediate;- } else {- var setImmediateQueue = [];- var sentinel = String(Math.random());- window.addEventListener("message", function(e) {- if (e.data === sentinel) {- var queue = setImmediateQueue;- setImmediateQueue = [];- queue.forEach(function(func) {- func();- });- }- });- setImmediate = function(func) {- setImmediateQueue.push(func);- window.postMessage(sentinel, "*");- };- }- var isScheduled = false;- var scheduledObservers = [];- function scheduleCallback(observer) {- scheduledObservers.push(observer);- if (!isScheduled) {- isScheduled = true;- setImmediate(dispatchCallbacks);- }- }- function wrapIfNeeded(node) {- return window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(node) || node;- }- function dispatchCallbacks() {- isScheduled = false;- var observers = scheduledObservers;- scheduledObservers = [];- observers.sort(function(o1, o2) {- return o1.uid_ - o2.uid_;- });- var anyNonEmpty = false;- observers.forEach(function(observer) {- var queue = observer.takeRecords();- removeTransientObserversFor(observer);- if (queue.length) {- observer.callback_(queue, observer);- anyNonEmpty = true;- }- });- if (anyNonEmpty) dispatchCallbacks();- }- function removeTransientObserversFor(observer) {- observer.nodes_.forEach(function(node) {- var registrations = registrationsTable.get(node);- if (!registrations) return;- registrations.forEach(function(registration) {- if (registration.observer === observer) registration.removeTransientObservers();- });- });- }- function forEachAncestorAndObserverEnqueueRecord(target, callback) {- for (var node = target; node; node = node.parentNode) {- var registrations = registrationsTable.get(node);- if (registrations) {- for (var j = 0; j < registrations.length; j++) {- var registration = registrations[j];- var options = registration.options;- if (node !== target && !options.subtree) continue;- var record = callback(options);- if (record) registration.enqueue(record);- }- }- }- }- var uidCounter = 0;- function JsMutationObserver(callback) {- this.callback_ = callback;- this.nodes_ = [];- this.records_ = [];- this.uid_ = ++uidCounter;- }- JsMutationObserver.prototype = {- observe: function(target, options) {- target = wrapIfNeeded(target);- if (!options.childList && !options.attributes && !options.characterData || options.attributeOldValue && !options.attributes || options.attributeFilter && options.attributeFilter.length && !options.attributes || options.characterDataOldValue && !options.characterData) {- throw new SyntaxError();- }- var registrations = registrationsTable.get(target);- if (!registrations) registrationsTable.set(target, registrations = []);- var registration;- for (var i = 0; i < registrations.length; i++) {- if (registrations[i].observer === this) {- registration = registrations[i];- registration.removeListeners();- registration.options = options;- break;- }- }- if (!registration) {- registration = new Registration(this, target, options);- registrations.push(registration);- this.nodes_.push(target);- }- registration.addListeners();- },- disconnect: function() {- this.nodes_.forEach(function(node) {- var registrations = registrationsTable.get(node);- for (var i = 0; i < registrations.length; i++) {- var registration = registrations[i];- if (registration.observer === this) {- registration.removeListeners();- registrations.splice(i, 1);- break;- }- }- }, this);- this.records_ = [];- },- takeRecords: function() {- var copyOfRecords = this.records_;- this.records_ = [];- return copyOfRecords;- }- };- function MutationRecord(type, target) {- this.type = type;- this.target = target;- this.addedNodes = [];- this.removedNodes = [];- this.previousSibling = null;- this.nextSibling = null;- this.attributeName = null;- this.attributeNamespace = null;- this.oldValue = null;- }- function copyMutationRecord(original) {- var record = new MutationRecord(original.type, original.target);- record.addedNodes = original.addedNodes.slice();- record.removedNodes = original.removedNodes.slice();- record.previousSibling = original.previousSibling;- record.nextSibling = original.nextSibling;- record.attributeName = original.attributeName;- record.attributeNamespace = original.attributeNamespace;- record.oldValue = original.oldValue;- return record;- }- var currentRecord, recordWithOldValue;- function getRecord(type, target) {- return currentRecord = new MutationRecord(type, target);- }- function getRecordWithOldValue(oldValue) {- if (recordWithOldValue) return recordWithOldValue;- recordWithOldValue = copyMutationRecord(currentRecord);- recordWithOldValue.oldValue = oldValue;- return recordWithOldValue;- }- function clearRecords() {- currentRecord = recordWithOldValue = undefined;- }- function recordRepresentsCurrentMutation(record) {- return record === recordWithOldValue || record === currentRecord;- }- function selectRecord(lastRecord, newRecord) {- if (lastRecord === newRecord) return lastRecord;- if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord)) return recordWithOldValue;- return null;- }- function Registration(observer, target, options) {- this.observer = observer;- this.target = target;- this.options = options;- this.transientObservedNodes = [];- }- Registration.prototype = {- enqueue: function(record) {- var records = this.observer.records_;- var length = records.length;- if (records.length > 0) {- var lastRecord = records[length - 1];- var recordToReplaceLast = selectRecord(lastRecord, record);- if (recordToReplaceLast) {- records[length - 1] = recordToReplaceLast;- return;- }- } else {- scheduleCallback(this.observer);- }- records[length] = record;- },- addListeners: function() {- this.addListeners_(this.target);- },- addListeners_: function(node) {- var options = this.options;- if (options.attributes) node.addEventListener("DOMAttrModified", this, true);- if (options.characterData) node.addEventListener("DOMCharacterDataModified", this, true);- if (options.childList) node.addEventListener("DOMNodeInserted", this, true);- if (options.childList || options.subtree) node.addEventListener("DOMNodeRemoved", this, true);- },- removeListeners: function() {- this.removeListeners_(this.target);- },- removeListeners_: function(node) {- var options = this.options;- if (options.attributes) node.removeEventListener("DOMAttrModified", this, true);- if (options.characterData) node.removeEventListener("DOMCharacterDataModified", this, true);- if (options.childList) node.removeEventListener("DOMNodeInserted", this, true);- if (options.childList || options.subtree) node.removeEventListener("DOMNodeRemoved", this, true);- },- addTransientObserver: function(node) {- if (node === this.target) return;- this.addListeners_(node);- this.transientObservedNodes.push(node);- var registrations = registrationsTable.get(node);- if (!registrations) registrationsTable.set(node, registrations = []);- registrations.push(this);- },- removeTransientObservers: function() {- var transientObservedNodes = this.transientObservedNodes;- this.transientObservedNodes = [];- transientObservedNodes.forEach(function(node) {- this.removeListeners_(node);- var registrations = registrationsTable.get(node);- for (var i = 0; i < registrations.length; i++) {- if (registrations[i] === this) {- registrations.splice(i, 1);- break;- }- }- }, this);- },- handleEvent: function(e) {- e.stopImmediatePropagation();- switch (e.type) {- case "DOMAttrModified":- var name = e.attrName;- var namespace = e.relatedNode.namespaceURI;- var target = e.target;- var record = new getRecord("attributes", target);- record.attributeName = name;- record.attributeNamespace = namespace;- var oldValue = e.attrChange === MutationEvent.ADDITION ? null : e.prevValue;- forEachAncestorAndObserverEnqueueRecord(target, function(options) {- if (!options.attributes) return;- if (options.attributeFilter && options.attributeFilter.length && options.attributeFilter.indexOf(name) === -1 && options.attributeFilter.indexOf(namespace) === -1) {- return;- }- if (options.attributeOldValue) return getRecordWithOldValue(oldValue);- return record;- });- break;-- case "DOMCharacterDataModified":- var target = e.target;- var record = getRecord("characterData", target);- var oldValue = e.prevValue;- forEachAncestorAndObserverEnqueueRecord(target, function(options) {- if (!options.characterData) return;- if (options.characterDataOldValue) return getRecordWithOldValue(oldValue);- return record;- });- break;-- case "DOMNodeRemoved":- this.addTransientObserver(e.target);-- case "DOMNodeInserted":- var changedNode = e.target;- var addedNodes, removedNodes;- if (e.type === "DOMNodeInserted") {- addedNodes = [ changedNode ];- removedNodes = [];- } else {- addedNodes = [];- removedNodes = [ changedNode ];- }- var previousSibling = changedNode.previousSibling;- var nextSibling = changedNode.nextSibling;- var record = getRecord("childList", e.target.parentNode);- record.addedNodes = addedNodes;- record.removedNodes = removedNodes;- record.previousSibling = previousSibling;- record.nextSibling = nextSibling;- forEachAncestorAndObserverEnqueueRecord(e.relatedNode, function(options) {- if (!options.childList) return;- return record;- });- }- clearRecords();- }- };- global.JsMutationObserver = JsMutationObserver;- if (!global.MutationObserver) {- global.MutationObserver = JsMutationObserver;- JsMutationObserver._isPolyfilled = true;- }-})(self);\ No newline at end of filediff --git a/manager/client/src/main/webapp/bower_components/webcomponentsjs/MutationObserver.min.js b/manager/client/src/main/webapp/bower_components/webcomponentsjs/MutationObserver.min.jsdeleted file mode 100644index a97c62444..000000000--- a/manager/client/src/main/webapp/bower_components/webcomponentsjs/MutationObserver.min.js+++ /dev/null@@ -1,11 +0,0 @@-/**- * @license- * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.- * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt- * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt- * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt- * Code distributed by Google as part of the polymer project is also- * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt- */-// @version 0.7.24-"undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,r=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};r.prototype={set:function(t,r){var i=t[this.name];return i&&i[0]===t?i[1]=r:e(t,this.name,{value:[t,r],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return!(!t||t[0]!==e)&&(t[0]=t[1]=void 0,!0)},has:function(e){var t=e[this.name];return!!t&&t[0]===e}},window.WeakMap=r}(),function(e){function t(e){N.push(e),O||(O=!0,b(i))}function r(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function i(){O=!1;var e=N;N=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var r=e.takeRecords();n(e),r.length&&(e.callback_(r,e),t=!0)}),t&&i()}function n(e){e.nodes_.forEach(function(t){var r=p.get(t);r&&r.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}function a(e,t){for(var r=e;r;r=r.parentNode){var i=p.get(r);if(i)for(var n=0;n<i.length;n++){var a=i[n],s=a.options;if(r===e||s.subtree){var o=t(s);o&&a.enqueue(o)}}}}function s(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++M}function o(e,t){this.type=e,this.target=t,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function d(e){var t=new o(e.type,e.target);return t.addedNodes=e.addedNodes.slice(),t.removedNodes=e.removedNodes.slice(),t.previousSibling=e.previousSibling,t.nextSibling=e.nextSibling,t.attributeName=e.attributeName,t.attributeNamespace=e.attributeNamespace,t.oldValue=e.oldValue,t}function u(e,t){return D=new o(e,t)}function h(e){return w?w:(w=d(D),w.oldValue=e,w)}function c(){D=w=void 0}function v(e){return e===w||e===D}function l(e,t){return e===t?e:w&&v(e)?w:null}function f(e,t,r){this.observer=e,this.target=t,this.options=r,this.transientObservedNodes=[]}if(!e.JsMutationObserver){var b,p=new WeakMap;if(/Trident|Edge/.test(navigator.userAgent))b=setTimeout;else if(window.setImmediate)b=window.setImmediate;else{var g=[],m=String(Math.random());window.addEventListener("message",function(e){if(e.data===m){var t=g;g=[],t.forEach(function(e){e()})}}),b=function(e){g.push(e),window.postMessage(m,"*")}}var O=!1,N=[],M=0;s.prototype={observe:function(e,t){if(e=r(e),!t.childList&&!t.attributes&&!t.characterData||t.attributeOldValue&&!t.attributes||t.attributeFilter&&t.attributeFilter.length&&!t.attributes||t.characterDataOldValue&&!t.characterData)throw new SyntaxError;var i=p.get(e);i||p.set(e,i=[]);for(var n,a=0;a<i.length;a++)if(i[a].observer===this){n=i[a],n.removeListeners(),n.options=t;break}n||(n=new f(this,e,t),i.push(n),this.nodes_.push(e)),n.addListeners()},disconnect:function(){this.nodes_.forEach(function(e){for(var t=p.get(e),r=0;r<t.length;r++){var i=t[r];if(i.observer===this){i.removeListeners(),t.splice(r,1);break}}},this),this.records_=[]},takeRecords:function(){var e=this.records_;return this.records_=[],e}};var D,w;f.prototype={enqueue:function(e){var r=this.observer.records_,i=r.length;if(r.length>0){var n=r[i-1],a=l(n,e);if(a)return void(r[i-1]=a)}else t(this.observer);r[i]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=p.get(e);t||p.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=p.get(e),r=0;r<t.length;r++)if(t[r]===this){t.splice(r,1);break}},this)},handleEvent:function(e){switch(e.stopImmediatePropagation(),e.type){case"DOMAttrModified":var t=e.attrName,r=e.relatedNode.namespaceURI,i=e.target,n=new u("attributes",i);n.attributeName=t,n.attributeNamespace=r;var s=e.attrChange===MutationEvent.ADDITION?null:e.prevValue;a(i,function(e){if(e.attributes&&(!e.attributeFilter||!e.attributeFilter.length||e.attributeFilter.indexOf(t)!==-1||e.attributeFilter.indexOf(r)!==-1))return e.attributeOldValue?h(s):n});break;case"DOMCharacterDataModified":var i=e.target,n=u("characterData",i),s=e.prevValue;a(i,function(e){if(e.characterData)return e.characterDataOldValue?h(s):n});break;case"DOMNodeRemoved":this.addTransientObserver(e.target);case"DOMNodeInserted":var o,d,v=e.target;"DOMNodeInserted"===e.type?(o=[v],d=[]):(o=[],d=[v]);var l=v.previousSibling,f=v.nextSibling,n=u("childList",e.target.parentNode);n.addedNodes=o,n.removedNodes=d,n.previousSibling=l,n.nextSibling=f,a(e.relatedNode,function(e){if(e.childList)return n})}c()}},e.JsMutationObserver=s,e.MutationObserver||(e.MutationObserver=s,s._isPolyfilled=!0)}}(self);\ No newline at end of filediff --git a/manager/client/src/main/webapp/bower_components/webcomponentsjs/README.md b/manager/client/src/main/webapp/bower_components/webcomponentsjs/README.mdindex d92ed6fc6..bbf8bdbbb 100644--- a/manager/client/src/main/webapp/bower_components/webcomponentsjs/README.md+++ b/manager/client/src/main/webapp/bower_components/webcomponentsjs/README.md@@ -1,53 +1,108 @@-webcomponents.js+webcomponents.js (v1 spec polyfills)================[](https://travis-ci.org/webcomponents/webcomponentsjs)-A suite of polyfills supporting the [Web Components](http://webcomponents.org) specs:--**Custom Elements**: allows authors to define their own custom tags ([spec](https://w3c.github.io/webcomponents/spec/custom/)).--**HTML Imports**: a way to include and reuse HTML documents via other HTML documents ([spec](https://w3c.github.io/webcomponents/spec/imports/)).--**Shadow DOM**: provides encapsulation by hiding DOM subtrees under shadow roots ([spec](https://w3c.github.io/webcomponents/spec/shadow/)).+> **Note**. For polyfills that work with the older Custom Elements and Shadow DOM v0 specs, see the [v0 branch](https://github.com/webcomponents/webcomponentsjs/tree/v0).-This also folds in polyfills for `MutationObserver` and `WeakMap`.+A suite of polyfills supporting the [Web Components](http://webcomponents.org) specs:+- **Custom Elements v1**: allows authors to define their own custom tags ([spec](https://w3c.github.io/webcomponents/spec/custom/), [tutorial](https://developers.google.com/web/fundamentals/getting-started/primers/customelements)).+- **HTML Imports**: a way to include and reuse HTML documents via other HTML documents ([spec](https://w3c.github.io/webcomponents/spec/imports/), [tutorial](https://www.html5rocks.com/en/tutorials/webcomponents/imports/)).+- **Shadow DOM v1**: provides encapsulation by hiding DOM subtrees under shadow roots ([spec](https://w3c.github.io/webcomponents/spec/shadow/), [tutorial](https://developers.google.com/web/fundamentals/getting-started/primers/shadowdom)).++For browsers that need it, there are also some minor polyfills included:+- [`HTMLTemplateElement`](https://github.com/webcomponents/template)+- [`Promise`](https://github.com/stefanpenner/es6-promise)+- `Event`, `CustomEvent`, `MouseEvent` constructors and `Object.assign`, `Array.from` (see [webcomponents-platform](https://github.com/webcomponents/webcomponents-platform))++## How to use++The polyfills are built (concatenated & minified) into several bundles that target+different browsers and spec readiness:++- `webcomponents-hi.js` -- HTML Imports (needed by Safari Tech Preview)+- `webcomponents-hi-ce.js` -- HTML Imports and Custom Elements v1 (needed by Safari 10)+- `webcomponents-hi-sd-ce.js` -- HTML Imports, Custom Elements v1 and Shady DOM/CSS (needed by Safari 9, Firefox, Edge)+- `webcomponents-sd-ce.js` -- Custom Elements and Shady DOM/CSS (no HTML Imports)+- `webcomponents-lite.js` -- all of the polyfills: HTML Imports, Custom Elements, Shady DOM/CSS and generic platform polyfills (such as ES6 Promise, Constructable events, etc.) (needed by Internet Explorer 11), and Template (needed by IE 11 and Edge)++If you are only targeting a specific browser, you can just use the bundle that's+needed by it; alternatively, if your server is capable of serving different assets based on user agent, you can send the polyfill bundle that's necessary for the browser making that request.++## `webcomponents-loader.js`+Alternatively, this repo also comes with `webcomponents-loader.js`, a client-side+loader that dynamically loads the minimum polyfill bundle, using feature detection.+Note that because the bundle will be loaded asynchronously, you should wait for the `WebComponentsReady` before you can safely assume that all the polyfills have+loaded and are ready to be used (i.e. if you want to dynamically load other custom+elements, etc.).++Additionally, you can check if `window.WebComponents` exists to know if the `WebComponentsReady` event will fire, and you can check if `window.WebComponents.ready` is true to check if the `WebComponentsReady` event has already fired.++Here's an example:++```html+<!-- Load polyfills; note that "loader" will load these async -->+<script src="bower_components/webcomponentsjs/webcomponents-loader.js"></script>++<!-- Load a custom element definition via HTMLImports -->+<link rel="import" href="my-element.html">++<!-- Use the custom element -->+<my-element></my-element>++<!-- Interact with the upgraded element -->+<script>+ window.addEventListener('WebComponentsReady', function() {+ // At this point we are guaranteed that all required polyfills have loaded,+ // all HTML imports have loaded, and all defined custom elements have upgraded+ let MyElement = customElements.get('my-element');+ let element = document.querySelector('my-element');+ console.assert(element instanceof MyElement); // 👍+ element.someAPI(); // 👍+ });+</script>+```-## Releases+## `custom-elements-es5-adapter.js`+According to the spec, Custom Elements must be ES6 classes (https://html.spec.whatwg.org/multipage/scripting.html#custom-element-conformance). Since most projects need to support a wide range of browsers that don't necessary support ES6, it may make sense to compile your project to ES5. However, ES5-style custom element classes will **not** work with native Custom Elements because ES5-style classes cannot properly extend ES6 classes, like `HTMLElement`.-Pre-built (concatenated & minified) versions of the polyfills are maintained in the [tagged versions](https://github.com/webcomponents/webcomponentsjs/releases) of this repo. There are two variants:+To work around this, load `custom-elements-es5-adapter.js` before declaring new Custom Elements.-`webcomponents.js` includes all of the polyfills.+**The adapter must NOT be compiled.**-`webcomponents-lite.js` includes all polyfills except for shadow DOM.+```html+<!-- Load Custom Elements es5 adapter -->+<script src="bower_components/webcomponentsjs/custom-elements-es5-adapter.js"></script>+<!-- Load polyfills; note that "loader" will load these async -->+<script src="bower_components/webcomponentsjs/webcomponents-loader.js"></script>+<!-- Load the es5 compiled custom element definition -->+<link rel="import" href="my-es5-element.html">+<!-- Use the custom element -->+<my-es5-element></my-es5-element>+```## Browser Support-Our polyfills are intended to work in the latest versions of evergreen browsers. See below+The polyfills are intended to work in the latest versions of evergreen browsers. See belowfor our complete browser support matrix:-| Polyfill | IE10 | IE11+ | Chrome* | Firefox* | Safari 7+* | Chrome Android* | Mobile Safari* |-| ---------- |:----:|:-----:|:-------:|:--------:|:----------:|:---------------:|:--------------:|-| Custom Elements | ~ | ✓ | ✓ | ✓ | ✓ | ✓| ✓ |-| HTML Imports | ~ | ✓ | ✓ | ✓ | ✓| ✓| ✓ |-| Shadow DOM | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |-| Templates | ✓ | ✓ | ✓ | ✓| ✓ | ✓ | ✓ |+| Polyfill | IE11+ | Chrome* | Firefox* | Safari 9+* | Chrome Android* | Mobile Safari* |+| ---------- |:-----:|:-------:|:--------:|:----------:|:---------------:|:--------------:|+| Custom Elements | ✓ | ✓ | ✓ | ✓ | ✓| ✓ |+| HTML Imports | ✓ | ✓ | ✓ | ✓| ✓| ✓ |+| Shady CSS/DOM | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |+\*Indicates the current version of the browser-*Indicates the current version of the browser--~Indicates support may be flaky. If using Custom Elements or HTML Imports with Shadow DOM,-you will get the non-flaky Mutation Observer polyfill that Shadow DOM includes.--The polyfills may work in older browsers, however require additional polyfills (such as classList)-to be used. We cannot guarantee support for browsers outside of our compatibility matrix.+The polyfills may work in older browsers, however require additional polyfills (such as classList, or other [platform](https://github.com/webcomponents/webcomponents-platform)+polyfills) to be used. We cannot guarantee support for browsers outside of our compatibility matrix.### Manually Building-If you wish to build the polyfills yourself, you'll need `node` and `gulp` on your system:+If you wish to build the bundles yourself, you'll need `node` and `npm` on your system:* install [node.js](http://nodejs.org/) using the instructions on their website* use `npm` to install [gulp.js](http://gulpjs.com/): `npm install -g gulp`@@ -56,10 +111,11 @@ Now you are ready to build the polyfills with:# install dependenciesnpm install+ bower install# buildgulp build-The builds will be placed into the `dist/` directory.+The builds will be placed into the root directory.## Contribute@@ -75,11 +131,11 @@ Copyright (c) 2015 The Polymer Authors. All rights reserved.### `WebComponentsReady`-Under native HTML Imports, `<script>` tags in the main document block the loading of such imports. This is to ensure the imports have loaded and any registered elements in them have been upgraded.+Under native HTML Imports, `<script>` tags in the main document block the loading of such imports. This is to ensure the imports have loaded and any registered elements in them have been upgraded.-The webcomponents.js and webcomponents-lite.js polyfills parse element definitions and handle their upgrade asynchronously. If prematurely fetching the element from the DOM before it has an opportunity to upgrade, you'll be working with an `HTMLUnknownElement`.+The `webcomponents-lite.js` polyfill (as well as the smaller bundles and the loader) parse element definitions and handle their upgrade asynchronously. If prematurely fetching the element from the DOM before it has an opportunity to upgrade, you'll be working with an `HTMLUnknownElement`.-For these situations (or when you need an approximate replacement for the Polymer 0.5 `polymer-ready` behavior), you can use the `WebComponentsReady` event as a signal before interacting with the element. The criteria for this event to fire is all Custom Elements with definitions registered by the time HTML Imports available at load time have loaded have upgraded.+For these situations, you can use the `WebComponentsReady` event as a signal before interacting with the element. The criteria for this event to fire is all Custom Elements with definitions registered by the time HTML Imports available at load time have loaded have upgraded.```jswindow.addEventListener('WebComponentsReady', function(e) {@@ -90,34 +146,13 @@ window.addEventListener('WebComponentsReady', function(e) {## Known Issues- * [Limited CSS encapsulation](#encapsulation)- * [Element wrapping / unwrapping limitations](#wrapping)+ * [ShadowDOM CSS is not encapsulated out of the box](#shadycss)* [Custom element's constructor property is unreliable](#constructor)* [Contenteditable elements do not trigger MutationObserver](#contentedit)- * [ShadowCSS: :host-context(...):host(...) doesn't work](#hostcontext)- * [ShadowCSS: :host(.zot:not(.bar:nth-child(2))) doesn't work](#nestedparens)- * [HTML imports: document.currentScript doesn't work as expected](#currentscript)- * [execCommand isn't supported under Shadow DOM](#execcommand)--### Limited CSS encapsulation <a id="encapsulation"></a>-Under native Shadow DOM, CSS selectors cannot cross the shadow boundary. This means document level styles don't apply to shadow roots, and styles defined within a shadow root don't apply outside of that shadow root. [Several selectors](http://www.html5rocks.com/en/tutorials/webcomponents/shadowdom-201/) are provided to be able to deal with the shadow boundary.--The Shadow DOM polyfill can't prevent document styles from leaking into shadow roots. It can, however, encapsulate styles within shadow roots to some extent. This behavior isn't automatically emulated by the Shadow DOM polyfill, but it can be achieved by manually using the included ShadowCSS shim:--```-WebComponents.ShadowCSS.shimStyling( shadowRoot, scope );-```--... where `shadowRoot` is the shadow root of a DOM element, and `scope` is the name of the scope used to prefix the selectors. This removes all `<style>` elements from the shadow root, rewrites it rules using the given scope and reinserts the style as a document level stylesheet. Note that the `:host` and `:host-context` pseudo classes are also rewritten.--For a full explanation on the implementation and both the possibilities and the limitations of ShadowCSS please view the documentation in the [ShadowCSS source](src/ShadowCSS/ShadowCSS.js).--### Element wrapping / unwrapping limitations <a id="wrapping"></a>-The Shadow DOM polyfill is implemented by [wrapping](http://webcomponents.org/polyfills/shadow-dom/#wrappers) DOM elements whenever possible. It does this by wrapping methods like `document.querySelector` to return wrapped DOM elements. This has a few caveats:- * Not _everything_ can be wrapped. For example, elements like `document`, `window`, `document.body`, `document.fullscreenElement` and others are non-configurable and thus cannot be overridden.- * Wrappers don't support [live NodeLists](https://developer.mozilla.org/en-US/docs/Web/API/NodeList#A_sometimes-live_collection) like `HTMLElement.childNodes` and `HTMLFormElement.elements`. All NodeLists are snapshotted upon read. See [#217](https://github.com/webcomponents/webcomponentsjs/issues/217) for an explanation.--In order to work around these limitations the polyfill provides the `ShadowDOMPolyfill.wrap` and `ShadowDOMPolyfill.unwrap` methods to respectively wrap and unwrap DOM elements manually.+ * [ShadyCSS: :host(.zot:not(.bar:nth-child(2))) doesn't work](#nestedparens)++### ShadowDOM CSS is not encapsulated out of the box <a id="shadycss"></a>+The ShadowDOM polyfill is not able to encapsulate CSS in ShadowDOM out of the box. You need to use specific code from the ShadyCSS library, included with the polyfill. See [ShadyCSS instructions](https://github.com/webcomponents/shadycss).### Custom element's constructor property is unreliable <a id="constructor"></a>See [#215](https://github.com/webcomponents/webcomponentsjs/issues/215) for background.@@ -130,26 +165,5 @@ It's worth noting that `customElement.__proto__.__proto__.constructor` is `HTMLEUsing the MutationObserver polyfill, it isn't possible to monitor mutations of an element marked `contenteditable`.See [the mailing list](https://groups.google.com/forum/#!msg/polymer-dev/LHdtRVXXVsA/v1sGoiTYWUkJ)-### ShadowCSS: :host-context(...):host(...) doesn't work <a id="hostcontext"></a>-See [#16](https://github.com/webcomponents/webcomponentsjs/issues/16) for background.--Under the shadow DOM polyfill, rules like:-```-:host-context(.foo):host(.bar) {...}-```-don't work, despite working under native Shadow DOM. The solution is to use `polyfill-next-selector` like:--```-polyfill-next-selector { content: '.foo :host.bar, :host.foo.bar'; }-```--### ShadowCSS: :host(.zot:not(.bar:nth-child(2))) doesn't work <a id="nestedparens"></a>-ShadowCSS `:host()` rules can only have (at most) 1-level of nested parentheses in its argument selector under ShadowCSS. For example, `:host(.zot)` and `:host(.zot:not(.bar))` both work, but `:host(.zot:not(.bar:nth-child(2)))` does not.--### HTML imports: document.currentScript doesn't work as expected <a id="currentscript"></a>-In native HTML Imports, document.currentScript.ownerDocument references the import document itself. In the polyfill use document._currentScript.ownerDocument (note the underscore).--### execCommand and contenteditable isn't supported under Shadow DOM <a id="execcommand"></a>-See [#212](https://github.com/webcomponents/webcomponentsjs/issues/212)--`execCommand`, and `contenteditable` aren't supported under the ShadowDOM polyfill, with commands that insert or remove nodes being especially prone to failure.+### ShadyCSS: :host(.zot:not(.bar:nth-child(2))) doesn't work <a id="nestedparens"></a>+ShadyCSS `:host()` rules can only have (at most) 1-level of nested parentheses in its argument selector under ShadyCSS. For example, `:host(.zot)` and `:host(.zot:not(.bar))` both work, but `:host(.zot:not(.bar:nth-child(2)))` does not.diff --git a/manager/client/src/main/webapp/bower_components/webcomponentsjs/ShadowDOM.js b/manager/client/src/main/webapp/bower_components/webcomponentsjs/ShadowDOM.jsdeleted file mode 100644index 519897544..000000000--- a/manager/client/src/main/webapp/bower_components/webcomponentsjs/ShadowDOM.js+++ /dev/null@@ -1,4496 +0,0 @@-/**- * @license- * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.- * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt- * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt- * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt- * Code distributed by Google as part of the polymer project is also- * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt- */-// @version 0.7.24-if (typeof WeakMap === "undefined") {- (function() {- var defineProperty = Object.defineProperty;- var counter = Date.now() % 1e9;- var WeakMap = function() {- this.name = "__st" + (Math.random() * 1e9 >>> 0) + (counter++ + "__");- };- WeakMap.prototype = {- set: function(key, value) {- var entry = key[this.name];- if (entry && entry[0] === key) entry[1] = value; else defineProperty(key, this.name, {- value: [ key, value ],- writable: true- });- return this;- },- get: function(key) {- var entry;- return (entry = key[this.name]) && entry[0] === key ? entry[1] : undefined;- },- "delete": function(key) {- var entry = key[this.name];- if (!entry || entry[0] !== key) return false;- entry[0] = entry[1] = undefined;- return true;- },- has: function(key) {- var entry = key[this.name];- if (!entry) return false;- return entry[0] === key;- }- };- window.WeakMap = WeakMap;- })();-}--window.ShadowDOMPolyfill = {};--(function(scope) {- "use strict";- var constructorTable = new WeakMap();- var nativePrototypeTable = new WeakMap();- var wrappers = Object.create(null);- function detectEval() {- if (typeof chrome !== "undefined" && chrome.app && chrome.app.runtime) {- return false;- }- if (navigator.getDeviceStorage) {- return false;- }- try {- var f = new Function("return true;");- return f();- } catch (ex) {- return false;- }- }- var hasEval = detectEval();- function assert(b) {- if (!b) throw new Error("Assertion failed");- }- var defineProperty = Object.defineProperty;- var getOwnPropertyNames = Object.getOwnPropertyNames;- var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;- function mixin(to, from) {- var names = getOwnPropertyNames(from);- for (var i = 0; i < names.length; i++) {- var name = names[i];- defineProperty(to, name, getOwnPropertyDescriptor(from, name));- }- return to;- }- function mixinStatics(to, from) {- var names = getOwnPropertyNames(from);- for (var i = 0; i < names.length; i++) {- var name = names[i];- switch (name) {- case "arguments":- case "caller":- case "length":- case "name":- case "prototype":- case "toString":- continue;- }- defineProperty(to, name, getOwnPropertyDescriptor(from, name));- }- return to;- }- function oneOf(object, propertyNames) {- for (var i = 0; i < propertyNames.length; i++) {- if (propertyNames[i] in object) return propertyNames[i];- }- }- var nonEnumerableDataDescriptor = {- value: undefined,- configurable: true,- enumerable: false,- writable: true- };- function defineNonEnumerableDataProperty(object, name, value) {- nonEnumerableDataDescriptor.value = value;- defineProperty(object, name, nonEnumerableDataDescriptor);- }- getOwnPropertyNames(window);- function getWrapperConstructor(node, opt_instance) {- var nativePrototype = node.__proto__ || Object.getPrototypeOf(node);- if (isFirefox) {- try {- getOwnPropertyNames(nativePrototype);- } catch (error) {- nativePrototype = nativePrototype.__proto__;- }- }- var wrapperConstructor = constructorTable.get(nativePrototype);- if (wrapperConstructor) return wrapperConstructor;- var parentWrapperConstructor = getWrapperConstructor(nativePrototype);- var GeneratedWrapper = createWrapperConstructor(parentWrapperConstructor);- registerInternal(nativePrototype, GeneratedWrapper, opt_instance);- return GeneratedWrapper;- }- function addForwardingProperties(nativePrototype, wrapperPrototype) {- installProperty(nativePrototype, wrapperPrototype, true);- }- function registerInstanceProperties(wrapperPrototype, instanceObject) {- installProperty(instanceObject, wrapperPrototype, false);- }- var isFirefox = /Firefox/.test(navigator.userAgent);- var dummyDescriptor = {- get: function() {},- set: function(v) {},- configurable: true,- enumerable: true- };- function isEventHandlerName(name) {- return /^on[a-z]+$/.test(name);- }- function isIdentifierName(name) {- return /^[a-zA-Z_$][a-zA-Z_$0-9]*$/.test(name);- }- function getGetter(name) {- return hasEval && isIdentifierName(name) ? new Function("return this.__impl4cf1e782hg__." + name) : function() {- return this.__impl4cf1e782hg__[name];- };- }- function getSetter(name) {- return hasEval && isIdentifierName(name) ? new Function("v", "this.__impl4cf1e782hg__." + name + " = v") : function(v) {- this.__impl4cf1e782hg__[name] = v;- };- }- function getMethod(name) {- return hasEval && isIdentifierName(name) ? new Function("return this.__impl4cf1e782hg__." + name + ".apply(this.__impl4cf1e782hg__, arguments)") : function() {- return this.__impl4cf1e782hg__[name].apply(this.__impl4cf1e782hg__, arguments);- };- }- function getDescriptor(source, name) {- try {- if (source === window && name === "showModalDialog") {- return dummyDescriptor;- }- return Object.getOwnPropertyDescriptor(source, name);- } catch (ex) {- return dummyDescriptor;- }- }- var isBrokenSafari = function() {- var descr = Object.getOwnPropertyDescriptor(Node.prototype, "nodeType");- return descr && !descr.get && !descr.set;- }();- function installProperty(source, target, allowMethod, opt_blacklist) {- var names = getOwnPropertyNames(source);- for (var i = 0; i < names.length; i++) {- var name = names[i];- if (name === "polymerBlackList_") continue;- if (name in target) continue;- if (source.polymerBlackList_ && source.polymerBlackList_[name]) continue;- if (isFirefox) {- source.__lookupGetter__(name);- }- var descriptor = getDescriptor(source, name);- var getter, setter;- if (typeof descriptor.value === "function") {- if (allowMethod) {- target[name] = getMethod(name);- }- continue;- }- var isEvent = isEventHandlerName(name);- if (isEvent) getter = scope.getEventHandlerGetter(name); else getter = getGetter(name);- if (descriptor.writable || descriptor.set || isBrokenSafari) {- if (isEvent) setter = scope.getEventHandlerSetter(name); else setter = getSetter(name);- }- var configurable = isBrokenSafari || descriptor.configurable;- defineProperty(target, name, {- get: getter,- set: setter,- configurable: configurable,- enumerable: descriptor.enumerable- });- }- }- function register(nativeConstructor, wrapperConstructor, opt_instance) {- if (nativeConstructor == null) {- return;- }- var nativePrototype = nativeConstructor.prototype;- registerInternal(nativePrototype, wrapperConstructor, opt_instance);- mixinStatics(wrapperConstructor, nativeConstructor);- }- function registerInternal(nativePrototype, wrapperConstructor, opt_instance) {- var wrapperPrototype = wrapperConstructor.prototype;- assert(constructorTable.get(nativePrototype) === undefined);- constructorTable.set(nativePrototype, wrapperConstructor);- nativePrototypeTable.set(wrapperPrototype, nativePrototype);- addForwardingProperties(nativePrototype, wrapperPrototype);- if (opt_instance) registerInstanceProperties(wrapperPrototype, opt_instance);- defineNonEnumerableDataProperty(wrapperPrototype, "constructor", wrapperConstructor);- wrapperConstructor.prototype = wrapperPrototype;- }- function isWrapperFor(wrapperConstructor, nativeConstructor) {- return constructorTable.get(nativeConstructor.prototype) === wrapperConstructor;- }- function registerObject(object) {- var nativePrototype = Object.getPrototypeOf(object);- var superWrapperConstructor = getWrapperConstructor(nativePrototype);- var GeneratedWrapper = createWrapperConstructor(superWrapperConstructor);- registerInternal(nativePrototype, GeneratedWrapper, object);- return GeneratedWrapper;- }- function createWrapperConstructor(superWrapperConstructor) {- function GeneratedWrapper(node) {- superWrapperConstructor.call(this, node);- }- var p = Object.create(superWrapperConstructor.prototype);- p.constructor = GeneratedWrapper;- GeneratedWrapper.prototype = p;- return GeneratedWrapper;- }- function isWrapper(object) {- return object && object.__impl4cf1e782hg__;- }- function isNative(object) {- return !isWrapper(object);- }- function wrap(impl) {- if (impl === null) return null;- assert(isNative(impl));- var wrapper = impl.__wrapper8e3dd93a60__;- if (wrapper != null) {- return wrapper;- }- return impl.__wrapper8e3dd93a60__ = new (getWrapperConstructor(impl, impl))(impl);- }- function unwrap(wrapper) {- if (wrapper === null) return null;- assert(isWrapper(wrapper));- return wrapper.__impl4cf1e782hg__;- }- function unsafeUnwrap(wrapper) {- return wrapper.__impl4cf1e782hg__;- }- function setWrapper(impl, wrapper) {- wrapper.__impl4cf1e782hg__ = impl;- impl.__wrapper8e3dd93a60__ = wrapper;- }- function unwrapIfNeeded(object) {- return object && isWrapper(object) ? unwrap(object) : object;- }- function wrapIfNeeded(object) {- return object && !isWrapper(object) ? wrap(object) : object;- }- function rewrap(node, wrapper) {- if (wrapper === null) return;- assert(isNative(node));- assert(wrapper === undefined || isWrapper(wrapper));- node.__wrapper8e3dd93a60__ = wrapper;- }- var getterDescriptor = {- get: undefined,- configurable: true,- enumerable: true- };- function defineGetter(constructor, name, getter) {- getterDescriptor.get = getter;- defineProperty(constructor.prototype, name, getterDescriptor);- }- function defineWrapGetter(constructor, name) {- defineGetter(constructor, name, function() {- return wrap(this.__impl4cf1e782hg__[name]);- });- }- function forwardMethodsToWrapper(constructors, names) {- constructors.forEach(function(constructor) {- names.forEach(function(name) {- constructor.prototype[name] = function() {- var w = wrapIfNeeded(this);- return w[name].apply(w, arguments);- };- });- });- }- scope.addForwardingProperties = addForwardingProperties;- scope.assert = assert;- scope.constructorTable = constructorTable;- scope.defineGetter = defineGetter;- scope.defineWrapGetter = defineWrapGetter;- scope.forwardMethodsToWrapper = forwardMethodsToWrapper;- scope.isIdentifierName = isIdentifierName;- scope.isWrapper = isWrapper;- scope.isWrapperFor = isWrapperFor;- scope.mixin = mixin;- scope.nativePrototypeTable = nativePrototypeTable;- scope.oneOf = oneOf;- scope.registerObject = registerObject;- scope.registerWrapper = register;- scope.rewrap = rewrap;- scope.setWrapper = setWrapper;- scope.unsafeUnwrap = unsafeUnwrap;- scope.unwrap = unwrap;- scope.unwrapIfNeeded = unwrapIfNeeded;- scope.wrap = wrap;- scope.wrapIfNeeded = wrapIfNeeded;- scope.wrappers = wrappers;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- function newSplice(index, removed, addedCount) {- return {- index: index,- removed: removed,- addedCount: addedCount- };- }- var EDIT_LEAVE = 0;- var EDIT_UPDATE = 1;- var EDIT_ADD = 2;- var EDIT_DELETE = 3;- function ArraySplice() {}- ArraySplice.prototype = {- calcEditDistances: function(current, currentStart, currentEnd, old, oldStart, oldEnd) {- var rowCount = oldEnd - oldStart + 1;- var columnCount = currentEnd - currentStart + 1;- var distances = new Array(rowCount);- for (var i = 0; i < rowCount; i++) {- distances[i] = new Array(columnCount);- distances[i][0] = i;- }- for (var j = 0; j < columnCount; j++) distances[0][j] = j;- for (var i = 1; i < rowCount; i++) {- for (var j = 1; j < columnCount; j++) {- if (this.equals(current[currentStart + j - 1], old[oldStart + i - 1])) distances[i][j] = distances[i - 1][j - 1]; else {- var north = distances[i - 1][j] + 1;- var west = distances[i][j - 1] + 1;- distances[i][j] = north < west ? north : west;- }- }- }- return distances;- },- spliceOperationsFromEditDistances: function(distances) {- var i = distances.length - 1;- var j = distances[0].length - 1;- var current = distances[i][j];- var edits = [];- while (i > 0 || j > 0) {- if (i == 0) {- edits.push(EDIT_ADD);- j--;- continue;- }- if (j == 0) {- edits.push(EDIT_DELETE);- i--;- continue;- }- var northWest = distances[i - 1][j - 1];- var west = distances[i - 1][j];- var north = distances[i][j - 1];- var min;- if (west < north) min = west < northWest ? west : northWest; else min = north < northWest ? north : northWest;- if (min == northWest) {- if (northWest == current) {- edits.push(EDIT_LEAVE);- } else {- edits.push(EDIT_UPDATE);- current = northWest;- }- i--;- j--;- } else if (min == west) {- edits.push(EDIT_DELETE);- i--;- current = west;- } else {- edits.push(EDIT_ADD);- j--;- current = north;- }- }- edits.reverse();- return edits;- },- calcSplices: function(current, currentStart, currentEnd, old, oldStart, oldEnd) {- var prefixCount = 0;- var suffixCount = 0;- var minLength = Math.min(currentEnd - currentStart, oldEnd - oldStart);- if (currentStart == 0 && oldStart == 0) prefixCount = this.sharedPrefix(current, old, minLength);- if (currentEnd == current.length && oldEnd == old.length) suffixCount = this.sharedSuffix(current, old, minLength - prefixCount);- currentStart += prefixCount;- oldStart += prefixCount;- currentEnd -= suffixCount;- oldEnd -= suffixCount;- if (currentEnd - currentStart == 0 && oldEnd - oldStart == 0) return [];- if (currentStart == currentEnd) {- var splice = newSplice(currentStart, [], 0);- while (oldStart < oldEnd) splice.removed.push(old[oldStart++]);- return [ splice ];- } else if (oldStart == oldEnd) return [ newSplice(currentStart, [], currentEnd - currentStart) ];- var ops = this.spliceOperationsFromEditDistances(this.calcEditDistances(current, currentStart, currentEnd, old, oldStart, oldEnd));- var splice = undefined;- var splices = [];- var index = currentStart;- var oldIndex = oldStart;- for (var i = 0; i < ops.length; i++) {- switch (ops[i]) {- case EDIT_LEAVE:- if (splice) {- splices.push(splice);- splice = undefined;- }- index++;- oldIndex++;- break;-- case EDIT_UPDATE:- if (!splice) splice = newSplice(index, [], 0);- splice.addedCount++;- index++;- splice.removed.push(old[oldIndex]);- oldIndex++;- break;-- case EDIT_ADD:- if (!splice) splice = newSplice(index, [], 0);- splice.addedCount++;- index++;- break;-- case EDIT_DELETE:- if (!splice) splice = newSplice(index, [], 0);- splice.removed.push(old[oldIndex]);- oldIndex++;- break;- }- }- if (splice) {- splices.push(splice);- }- return splices;- },- sharedPrefix: function(current, old, searchLength) {- for (var i = 0; i < searchLength; i++) if (!this.equals(current[i], old[i])) return i;- return searchLength;- },- sharedSuffix: function(current, old, searchLength) {- var index1 = current.length;- var index2 = old.length;- var count = 0;- while (count < searchLength && this.equals(current[--index1], old[--index2])) count++;- return count;- },- calculateSplices: function(current, previous) {- return this.calcSplices(current, 0, current.length, previous, 0, previous.length);- },- equals: function(currentValue, previousValue) {- return currentValue === previousValue;- }- };- scope.ArraySplice = ArraySplice;-})(window.ShadowDOMPolyfill);--(function(context) {- "use strict";- var OriginalMutationObserver = window.MutationObserver;- var callbacks = [];- var pending = false;- var timerFunc;- function handle() {- pending = false;- var copies = callbacks.slice(0);- callbacks = [];- for (var i = 0; i < copies.length; i++) {- (0, copies[i])();- }- }- if (OriginalMutationObserver) {- var counter = 1;- var observer = new OriginalMutationObserver(handle);- var textNode = document.createTextNode(counter);- observer.observe(textNode, {- characterData: true- });- timerFunc = function() {- counter = (counter + 1) % 2;- textNode.data = counter;- };- } else {- timerFunc = window.setTimeout;- }- function setEndOfMicrotask(func) {- callbacks.push(func);- if (pending) return;- pending = true;- timerFunc(handle, 0);- }- context.setEndOfMicrotask = setEndOfMicrotask;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var setEndOfMicrotask = scope.setEndOfMicrotask;- var wrapIfNeeded = scope.wrapIfNeeded;- var wrappers = scope.wrappers;- var registrationsTable = new WeakMap();- var globalMutationObservers = [];- var isScheduled = false;- function scheduleCallback(observer) {- if (observer.scheduled_) return;- observer.scheduled_ = true;- globalMutationObservers.push(observer);- if (isScheduled) return;- setEndOfMicrotask(notifyObservers);- isScheduled = true;- }- function notifyObservers() {- isScheduled = false;- while (globalMutationObservers.length) {- var notifyList = globalMutationObservers;- globalMutationObservers = [];- notifyList.sort(function(x, y) {- return x.uid_ - y.uid_;- });- for (var i = 0; i < notifyList.length; i++) {- var mo = notifyList[i];- mo.scheduled_ = false;- var queue = mo.takeRecords();- removeTransientObserversFor(mo);- if (queue.length) {- mo.callback_(queue, mo);- }- }- }- }- function MutationRecord(type, target) {- this.type = type;- this.target = target;- this.addedNodes = new wrappers.NodeList();- this.removedNodes = new wrappers.NodeList();- this.previousSibling = null;- this.nextSibling = null;- this.attributeName = null;- this.attributeNamespace = null;- this.oldValue = null;- }- function registerTransientObservers(ancestor, node) {- for (;ancestor; ancestor = ancestor.parentNode) {- var registrations = registrationsTable.get(ancestor);- if (!registrations) continue;- for (var i = 0; i < registrations.length; i++) {- var registration = registrations[i];- if (registration.options.subtree) registration.addTransientObserver(node);- }- }- }- function removeTransientObserversFor(observer) {- for (var i = 0; i < observer.nodes_.length; i++) {- var node = observer.nodes_[i];- var registrations = registrationsTable.get(node);- if (!registrations) return;- for (var j = 0; j < registrations.length; j++) {- var registration = registrations[j];- if (registration.observer === observer) registration.removeTransientObservers();- }- }- }- function enqueueMutation(target, type, data) {- var interestedObservers = Object.create(null);- var associatedStrings = Object.create(null);- for (var node = target; node; node = node.parentNode) {- var registrations = registrationsTable.get(node);- if (!registrations) continue;- for (var j = 0; j < registrations.length; j++) {- var registration = registrations[j];- var options = registration.options;- if (node !== target && !options.subtree) continue;- if (type === "attributes" && !options.attributes) continue;- if (type === "attributes" && options.attributeFilter && (data.namespace !== null || options.attributeFilter.indexOf(data.name) === -1)) {- continue;- }- if (type === "characterData" && !options.characterData) continue;- if (type === "childList" && !options.childList) continue;- var observer = registration.observer;- interestedObservers[observer.uid_] = observer;- if (type === "attributes" && options.attributeOldValue || type === "characterData" && options.characterDataOldValue) {- associatedStrings[observer.uid_] = data.oldValue;- }- }- }- for (var uid in interestedObservers) {- var observer = interestedObservers[uid];- var record = new MutationRecord(type, target);- if ("name" in data && "namespace" in data) {- record.attributeName = data.name;- record.attributeNamespace = data.namespace;- }- if (data.addedNodes) record.addedNodes = data.addedNodes;- if (data.removedNodes) record.removedNodes = data.removedNodes;- if (data.previousSibling) record.previousSibling = data.previousSibling;- if (data.nextSibling) record.nextSibling = data.nextSibling;- if (associatedStrings[uid] !== undefined) record.oldValue = associatedStrings[uid];- scheduleCallback(observer);- observer.records_.push(record);- }- }- var slice = Array.prototype.slice;- function MutationObserverOptions(options) {- this.childList = !!options.childList;- this.subtree = !!options.subtree;- if (!("attributes" in options) && ("attributeOldValue" in options || "attributeFilter" in options)) {- this.attributes = true;- } else {- this.attributes = !!options.attributes;- }- if ("characterDataOldValue" in options && !("characterData" in options)) this.characterData = true; else this.characterData = !!options.characterData;- if (!this.attributes && (options.attributeOldValue || "attributeFilter" in options) || !this.characterData && options.characterDataOldValue) {- throw new TypeError();- }- this.characterData = !!options.characterData;- this.attributeOldValue = !!options.attributeOldValue;- this.characterDataOldValue = !!options.characterDataOldValue;- if ("attributeFilter" in options) {- if (options.attributeFilter == null || typeof options.attributeFilter !== "object") {- throw new TypeError();- }- this.attributeFilter = slice.call(options.attributeFilter);- } else {- this.attributeFilter = null;- }- }- var uidCounter = 0;- function MutationObserver(callback) {- this.callback_ = callback;- this.nodes_ = [];- this.records_ = [];- this.uid_ = ++uidCounter;- this.scheduled_ = false;- }- MutationObserver.prototype = {- constructor: MutationObserver,- observe: function(target, options) {- target = wrapIfNeeded(target);- var newOptions = new MutationObserverOptions(options);- var registration;- var registrations = registrationsTable.get(target);- if (!registrations) registrationsTable.set(target, registrations = []);- for (var i = 0; i < registrations.length; i++) {- if (registrations[i].observer === this) {- registration = registrations[i];- registration.removeTransientObservers();- registration.options = newOptions;- }- }- if (!registration) {- registration = new Registration(this, target, newOptions);- registrations.push(registration);- this.nodes_.push(target);- }- },- disconnect: function() {- this.nodes_.forEach(function(node) {- var registrations = registrationsTable.get(node);- for (var i = 0; i < registrations.length; i++) {- var registration = registrations[i];- if (registration.observer === this) {- registrations.splice(i, 1);- break;- }- }- }, this);- this.records_ = [];- },- takeRecords: function() {- var copyOfRecords = this.records_;- this.records_ = [];- return copyOfRecords;- }- };- function Registration(observer, target, options) {- this.observer = observer;- this.target = target;- this.options = options;- this.transientObservedNodes = [];- }- Registration.prototype = {- addTransientObserver: function(node) {- if (node === this.target) return;- scheduleCallback(this.observer);- this.transientObservedNodes.push(node);- var registrations = registrationsTable.get(node);- if (!registrations) registrationsTable.set(node, registrations = []);- registrations.push(this);- },- removeTransientObservers: function() {- var transientObservedNodes = this.transientObservedNodes;- this.transientObservedNodes = [];- for (var i = 0; i < transientObservedNodes.length; i++) {- var node = transientObservedNodes[i];- var registrations = registrationsTable.get(node);- for (var j = 0; j < registrations.length; j++) {- if (registrations[j] === this) {- registrations.splice(j, 1);- break;- }- }- }- }- };- scope.enqueueMutation = enqueueMutation;- scope.registerTransientObservers = registerTransientObservers;- scope.wrappers.MutationObserver = MutationObserver;- scope.wrappers.MutationRecord = MutationRecord;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- function TreeScope(root, parent) {- this.root = root;- this.parent = parent;- }- TreeScope.prototype = {- get renderer() {- if (this.root instanceof scope.wrappers.ShadowRoot) {- return scope.getRendererForHost(this.root.host);- }- return null;- },- contains: function(treeScope) {- for (;treeScope; treeScope = treeScope.parent) {- if (treeScope === this) return true;- }- return false;- }- };- function setTreeScope(node, treeScope) {- if (node.treeScope_ !== treeScope) {- node.treeScope_ = treeScope;- for (var sr = node.shadowRoot; sr; sr = sr.olderShadowRoot) {- sr.treeScope_.parent = treeScope;- }- for (var child = node.firstChild; child; child = child.nextSibling) {- setTreeScope(child, treeScope);- }- }- }- function getTreeScope(node) {- if (node instanceof scope.wrappers.Window) {- debugger;- }- if (node.treeScope_) return node.treeScope_;- var parent = node.parentNode;- var treeScope;- if (parent) treeScope = getTreeScope(parent); else treeScope = new TreeScope(node, null);- return node.treeScope_ = treeScope;- }- scope.TreeScope = TreeScope;- scope.getTreeScope = getTreeScope;- scope.setTreeScope = setTreeScope;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var forwardMethodsToWrapper = scope.forwardMethodsToWrapper;- var getTreeScope = scope.getTreeScope;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var setWrapper = scope.setWrapper;- var unsafeUnwrap = scope.unsafeUnwrap;- var unwrap = scope.unwrap;- var wrap = scope.wrap;- var wrappers = scope.wrappers;- var wrappedFuns = new WeakMap();- var listenersTable = new WeakMap();- var handledEventsTable = new WeakMap();- var currentlyDispatchingEvents = new WeakMap();- var targetTable = new WeakMap();- var currentTargetTable = new WeakMap();- var relatedTargetTable = new WeakMap();- var eventPhaseTable = new WeakMap();- var stopPropagationTable = new WeakMap();- var stopImmediatePropagationTable = new WeakMap();- var eventHandlersTable = new WeakMap();- var eventPathTable = new WeakMap();- function isShadowRoot(node) {- return node instanceof wrappers.ShadowRoot;- }- function rootOfNode(node) {- return getTreeScope(node).root;- }- function getEventPath(node, event) {- var path = [];- var current = node;- path.push(current);- while (current) {- var destinationInsertionPoints = getDestinationInsertionPoints(current);- if (destinationInsertionPoints && destinationInsertionPoints.length > 0) {- for (var i = 0; i < destinationInsertionPoints.length; i++) {- var insertionPoint = destinationInsertionPoints[i];- if (isShadowInsertionPoint(insertionPoint)) {- var shadowRoot = rootOfNode(insertionPoint);- var olderShadowRoot = shadowRoot.olderShadowRoot;- if (olderShadowRoot) path.push(olderShadowRoot);- }- path.push(insertionPoint);- }- current = destinationInsertionPoints[destinationInsertionPoints.length - 1];- } else {- if (isShadowRoot(current)) {- if (inSameTree(node, current) && eventMustBeStopped(event)) {- break;- }- current = current.host;- path.push(current);- } else {- current = current.parentNode;- if (current) path.push(current);- }- }- }- return path;- }- function eventMustBeStopped(event) {- if (!event) return false;- switch (event.type) {- case "abort":- case "error":- case "select":- case "change":- case "load":- case "reset":- case "resize":- case "scroll":- case "selectstart":- return true;- }- return false;- }- function isShadowInsertionPoint(node) {- return node instanceof HTMLShadowElement;- }- function getDestinationInsertionPoints(node) {- return scope.getDestinationInsertionPoints(node);- }- function eventRetargetting(path, currentTarget) {- if (path.length === 0) return currentTarget;- if (currentTarget instanceof wrappers.Window) currentTarget = currentTarget.document;- var currentTargetTree = getTreeScope(currentTarget);- var originalTarget = path[0];- var originalTargetTree = getTreeScope(originalTarget);- var relativeTargetTree = lowestCommonInclusiveAncestor(currentTargetTree, originalTargetTree);- for (var i = 0; i < path.length; i++) {- var node = path[i];- if (getTreeScope(node) === relativeTargetTree) return node;- }- return path[path.length - 1];- }- function getTreeScopeAncestors(treeScope) {- var ancestors = [];- for (;treeScope; treeScope = treeScope.parent) {- ancestors.push(treeScope);- }- return ancestors;- }- function lowestCommonInclusiveAncestor(tsA, tsB) {- var ancestorsA = getTreeScopeAncestors(tsA);- var ancestorsB = getTreeScopeAncestors(tsB);- var result = null;- while (ancestorsA.length > 0 && ancestorsB.length > 0) {- var a = ancestorsA.pop();- var b = ancestorsB.pop();- if (a === b) result = a; else break;- }- return result;- }- function getTreeScopeRoot(ts) {- if (!ts.parent) return ts;- return getTreeScopeRoot(ts.parent);- }- function relatedTargetResolution(event, currentTarget, relatedTarget) {- if (currentTarget instanceof wrappers.Window) currentTarget = currentTarget.document;- var currentTargetTree = getTreeScope(currentTarget);- var relatedTargetTree = getTreeScope(relatedTarget);- var relatedTargetEventPath = getEventPath(relatedTarget, event);- var lowestCommonAncestorTree;- var lowestCommonAncestorTree = lowestCommonInclusiveAncestor(currentTargetTree, relatedTargetTree);- if (!lowestCommonAncestorTree) lowestCommonAncestorTree = relatedTargetTree.root;- for (var commonAncestorTree = lowestCommonAncestorTree; commonAncestorTree; commonAncestorTree = commonAncestorTree.parent) {- var adjustedRelatedTarget;- for (var i = 0; i < relatedTargetEventPath.length; i++) {- var node = relatedTargetEventPath[i];- if (getTreeScope(node) === commonAncestorTree) return node;- }- }- return null;- }- function inSameTree(a, b) {- return getTreeScope(a) === getTreeScope(b);- }- var NONE = 0;- var CAPTURING_PHASE = 1;- var AT_TARGET = 2;- var BUBBLING_PHASE = 3;- var pendingError;- function dispatchOriginalEvent(originalEvent) {- if (handledEventsTable.get(originalEvent)) return;- handledEventsTable.set(originalEvent, true);- dispatchEvent(wrap(originalEvent), wrap(originalEvent.target));- if (pendingError) {- var err = pendingError;- pendingError = null;- throw err;- }- }- function isLoadLikeEvent(event) {- switch (event.type) {- case "load":- case "beforeunload":- case "unload":- return true;- }- return false;- }- function dispatchEvent(event, originalWrapperTarget) {- if (currentlyDispatchingEvents.get(event)) throw new Error("InvalidStateError");- currentlyDispatchingEvents.set(event, true);- scope.renderAllPending();- var eventPath;- var overrideTarget;- var win;- if (isLoadLikeEvent(event) && !event.bubbles) {- var doc = originalWrapperTarget;- if (doc instanceof wrappers.Document && (win = doc.defaultView)) {- overrideTarget = doc;- eventPath = [];- }- }- if (!eventPath) {- if (originalWrapperTarget instanceof wrappers.Window) {- win = originalWrapperTarget;- eventPath = [];- } else {- eventPath = getEventPath(originalWrapperTarget, event);- if (!isLoadLikeEvent(event)) {- var doc = eventPath[eventPath.length - 1];- if (doc instanceof wrappers.Document) win = doc.defaultView;- }- }- }- eventPathTable.set(event, eventPath);- if (dispatchCapturing(event, eventPath, win, overrideTarget)) {- if (dispatchAtTarget(event, eventPath, win, overrideTarget)) {- dispatchBubbling(event, eventPath, win, overrideTarget);- }- }- eventPhaseTable.set(event, NONE);- currentTargetTable.delete(event, null);- currentlyDispatchingEvents.delete(event);- return event.defaultPrevented;- }- function dispatchCapturing(event, eventPath, win, overrideTarget) {- var phase = CAPTURING_PHASE;- if (win) {- if (!invoke(win, event, phase, eventPath, overrideTarget)) return false;- }- for (var i = eventPath.length - 1; i > 0; i--) {- if (!invoke(eventPath[i], event, phase, eventPath, overrideTarget)) return false;- }- return true;- }- function dispatchAtTarget(event, eventPath, win, overrideTarget) {- var phase = AT_TARGET;- var currentTarget = eventPath[0] || win;- return invoke(currentTarget, event, phase, eventPath, overrideTarget);- }- function dispatchBubbling(event, eventPath, win, overrideTarget) {- var phase = BUBBLING_PHASE;- for (var i = 1; i < eventPath.length; i++) {- if (!invoke(eventPath[i], event, phase, eventPath, overrideTarget)) return;- }- if (win && eventPath.length > 0) {- invoke(win, event, phase, eventPath, overrideTarget);- }- }- function invoke(currentTarget, event, phase, eventPath, overrideTarget) {- var listeners = listenersTable.get(currentTarget);- if (!listeners) return true;- var target = overrideTarget || eventRetargetting(eventPath, currentTarget);- if (target === currentTarget) {- if (phase === CAPTURING_PHASE) return true;- if (phase === BUBBLING_PHASE) phase = AT_TARGET;- } else if (phase === BUBBLING_PHASE && !event.bubbles) {- return true;- }- if ("relatedTarget" in event) {- var originalEvent = unwrap(event);- var unwrappedRelatedTarget = originalEvent.relatedTarget;- if (unwrappedRelatedTarget) {- if (unwrappedRelatedTarget instanceof Object && unwrappedRelatedTarget.addEventListener) {- var relatedTarget = wrap(unwrappedRelatedTarget);- var adjusted = relatedTargetResolution(event, currentTarget, relatedTarget);- if (adjusted === target) return true;- } else {- adjusted = null;- }- relatedTargetTable.set(event, adjusted);- }- }- eventPhaseTable.set(event, phase);- var type = event.type;- var anyRemoved = false;- targetTable.set(event, target);- currentTargetTable.set(event, currentTarget);- listeners.depth++;- for (var i = 0, len = listeners.length; i < len; i++) {- var listener = listeners[i];- if (listener.removed) {- anyRemoved = true;- continue;- }- if (listener.type !== type || !listener.capture && phase === CAPTURING_PHASE || listener.capture && phase === BUBBLING_PHASE) {- continue;- }- try {- if (typeof listener.handler === "function") listener.handler.call(currentTarget, event); else listener.handler.handleEvent(event);- if (stopImmediatePropagationTable.get(event)) return false;- } catch (ex) {- if (!pendingError) pendingError = ex;- }- }- listeners.depth--;- if (anyRemoved && listeners.depth === 0) {- var copy = listeners.slice();- listeners.length = 0;- for (var i = 0; i < copy.length; i++) {- if (!copy[i].removed) listeners.push(copy[i]);- }- }- return !stopPropagationTable.get(event);- }- function Listener(type, handler, capture) {- this.type = type;- this.handler = handler;- this.capture = Boolean(capture);- }- Listener.prototype = {- equals: function(that) {- return this.handler === that.handler && this.type === that.type && this.capture === that.capture;- },- get removed() {- return this.handler === null;- },- remove: function() {- this.handler = null;- }- };- var OriginalEvent = window.Event;- OriginalEvent.prototype.polymerBlackList_ = {- returnValue: true,- keyLocation: true- };- function Event(type, options) {- if (type instanceof OriginalEvent) {- var impl = type;- if (!OriginalBeforeUnloadEvent && impl.type === "beforeunload" && !(this instanceof BeforeUnloadEvent)) {- return new BeforeUnloadEvent(impl);- }- setWrapper(impl, this);- } else {- return wrap(constructEvent(OriginalEvent, "Event", type, options));- }- }- Event.prototype = {- get target() {- return targetTable.get(this);- },- get currentTarget() {- return currentTargetTable.get(this);- },- get eventPhase() {- return eventPhaseTable.get(this);- },- get path() {- var eventPath = eventPathTable.get(this);- if (!eventPath) return [];- return eventPath.slice();- },- stopPropagation: function() {- stopPropagationTable.set(this, true);- },- stopImmediatePropagation: function() {- stopPropagationTable.set(this, true);- stopImmediatePropagationTable.set(this, true);- }- };- var supportsDefaultPrevented = function() {- var e = document.createEvent("Event");- e.initEvent("test", true, true);- e.preventDefault();- return e.defaultPrevented;- }();- if (!supportsDefaultPrevented) {- Event.prototype.preventDefault = function() {- if (!this.cancelable) return;- unsafeUnwrap(this).preventDefault();- Object.defineProperty(this, "defaultPrevented", {- get: function() {- return true;- },- configurable: true- });- };- }- registerWrapper(OriginalEvent, Event, document.createEvent("Event"));- function unwrapOptions(options) {- if (!options || !options.relatedTarget) return options;- return Object.create(options, {- relatedTarget: {- value: unwrap(options.relatedTarget)- }- });- }- function registerGenericEvent(name, SuperEvent, prototype) {- var OriginalEvent = window[name];- var GenericEvent = function(type, options) {- if (type instanceof OriginalEvent) setWrapper(type, this); else return wrap(constructEvent(OriginalEvent, name, type, options));- };- GenericEvent.prototype = Object.create(SuperEvent.prototype);- if (prototype) mixin(GenericEvent.prototype, prototype);- if (OriginalEvent) {- try {- registerWrapper(OriginalEvent, GenericEvent, new OriginalEvent("temp"));- } catch (ex) {- registerWrapper(OriginalEvent, GenericEvent, document.createEvent(name));- }- }- return GenericEvent;- }- var UIEvent = registerGenericEvent("UIEvent", Event);- var CustomEvent = registerGenericEvent("CustomEvent", Event);- var relatedTargetProto = {- get relatedTarget() {- var relatedTarget = relatedTargetTable.get(this);- if (relatedTarget !== undefined) return relatedTarget;- return wrap(unwrap(this).relatedTarget);- }- };- function getInitFunction(name, relatedTargetIndex) {- return function() {- arguments[relatedTargetIndex] = unwrap(arguments[relatedTargetIndex]);- var impl = unwrap(this);- impl[name].apply(impl, arguments);- };- }- var mouseEventProto = mixin({- initMouseEvent: getInitFunction("initMouseEvent", 14)- }, relatedTargetProto);- var focusEventProto = mixin({- initFocusEvent: getInitFunction("initFocusEvent", 5)- }, relatedTargetProto);- var MouseEvent = registerGenericEvent("MouseEvent", UIEvent, mouseEventProto);- var FocusEvent = registerGenericEvent("FocusEvent", UIEvent, focusEventProto);- var defaultInitDicts = Object.create(null);- var supportsEventConstructors = function() {- try {- new window.FocusEvent("focus");- } catch (ex) {- return false;- }- return true;- }();- function constructEvent(OriginalEvent, name, type, options) {- if (supportsEventConstructors) return new OriginalEvent(type, unwrapOptions(options));- var event = unwrap(document.createEvent(name));- var defaultDict = defaultInitDicts[name];- var args = [ type ];- Object.keys(defaultDict).forEach(function(key) {- var v = options != null && key in options ? options[key] : defaultDict[key];- if (key === "relatedTarget") v = unwrap(v);- args.push(v);- });- event["init" + name].apply(event, args);- return event;- }- if (!supportsEventConstructors) {- var configureEventConstructor = function(name, initDict, superName) {- if (superName) {- var superDict = defaultInitDicts[superName];- initDict = mixin(mixin({}, superDict), initDict);- }- defaultInitDicts[name] = initDict;- };- configureEventConstructor("Event", {- bubbles: false,- cancelable: false- });- configureEventConstructor("CustomEvent", {- detail: null- }, "Event");- configureEventConstructor("UIEvent", {- view: null,- detail: 0- }, "Event");- configureEventConstructor("MouseEvent", {- screenX: 0,- screenY: 0,- clientX: 0,- clientY: 0,- ctrlKey: false,- altKey: false,- shiftKey: false,- metaKey: false,- button: 0,- relatedTarget: null- }, "UIEvent");- configureEventConstructor("FocusEvent", {- relatedTarget: null- }, "UIEvent");- }- var OriginalBeforeUnloadEvent = window.BeforeUnloadEvent;- function BeforeUnloadEvent(impl) {- Event.call(this, impl);- }- BeforeUnloadEvent.prototype = Object.create(Event.prototype);- mixin(BeforeUnloadEvent.prototype, {- get returnValue() {- return unsafeUnwrap(this).returnValue;- },- set returnValue(v) {- unsafeUnwrap(this).returnValue = v;- }- });- if (OriginalBeforeUnloadEvent) registerWrapper(OriginalBeforeUnloadEvent, BeforeUnloadEvent);- function isValidListener(fun) {- if (typeof fun === "function") return true;- return fun && fun.handleEvent;- }- function isMutationEvent(type) {- switch (type) {- case "DOMAttrModified":- case "DOMAttributeNameChanged":- case "DOMCharacterDataModified":- case "DOMElementNameChanged":- case "DOMNodeInserted":- case "DOMNodeInsertedIntoDocument":- case "DOMNodeRemoved":- case "DOMNodeRemovedFromDocument":- case "DOMSubtreeModified":- return true;- }- return false;- }- var OriginalEventTarget = window.EventTarget;- function EventTarget(impl) {- setWrapper(impl, this);- }- var methodNames = [ "addEventListener", "removeEventListener", "dispatchEvent" ];- [ Node, Window ].forEach(function(constructor) {- var p = constructor.prototype;- methodNames.forEach(function(name) {- Object.defineProperty(p, name + "_", {- value: p[name]- });- });- });- function getTargetToListenAt(wrapper) {- if (wrapper instanceof wrappers.ShadowRoot) wrapper = wrapper.host;- return unwrap(wrapper);- }- EventTarget.prototype = {- addEventListener: function(type, fun, capture) {- if (!isValidListener(fun) || isMutationEvent(type)) return;- var listener = new Listener(type, fun, capture);- var listeners = listenersTable.get(this);- if (!listeners) {- listeners = [];- listeners.depth = 0;- listenersTable.set(this, listeners);- } else {- for (var i = 0; i < listeners.length; i++) {- if (listener.equals(listeners[i])) return;- }- }- listeners.push(listener);- var target = getTargetToListenAt(this);- target.addEventListener_(type, dispatchOriginalEvent, true);- },- removeEventListener: function(type, fun, capture) {- capture = Boolean(capture);- var listeners = listenersTable.get(this);- if (!listeners) return;- var count = 0, found = false;- for (var i = 0; i < listeners.length; i++) {- if (listeners[i].type === type && listeners[i].capture === capture) {- count++;- if (listeners[i].handler === fun) {- found = true;- listeners[i].remove();- }- }- }- if (found && count === 1) {- var target = getTargetToListenAt(this);- target.removeEventListener_(type, dispatchOriginalEvent, true);- }- },- dispatchEvent: function(event) {- var nativeEvent = unwrap(event);- var eventType = nativeEvent.type;- handledEventsTable.set(nativeEvent, false);- scope.renderAllPending();- var tempListener;- if (!hasListenerInAncestors(this, eventType)) {- tempListener = function() {};- this.addEventListener(eventType, tempListener, true);- }- try {- return unwrap(this).dispatchEvent_(nativeEvent);- } finally {- if (tempListener) this.removeEventListener(eventType, tempListener, true);- }- }- };- function hasListener(node, type) {- var listeners = listenersTable.get(node);- if (listeners) {- for (var i = 0; i < listeners.length; i++) {- if (!listeners[i].removed && listeners[i].type === type) return true;- }- }- return false;- }- function hasListenerInAncestors(target, type) {- for (var node = unwrap(target); node; node = node.parentNode) {- if (hasListener(wrap(node), type)) return true;- }- return false;- }- if (OriginalEventTarget) registerWrapper(OriginalEventTarget, EventTarget);- function wrapEventTargetMethods(constructors) {- forwardMethodsToWrapper(constructors, methodNames);- }- var originalElementFromPoint = document.elementFromPoint;- function elementFromPoint(self, document, x, y) {- scope.renderAllPending();- var element = wrap(originalElementFromPoint.call(unsafeUnwrap(document), x, y));- if (!element) return null;- var path = getEventPath(element, null);- var idx = path.lastIndexOf(self);- if (idx == -1) return null; else path = path.slice(0, idx);- return eventRetargetting(path, self);- }- function getEventHandlerGetter(name) {- return function() {- var inlineEventHandlers = eventHandlersTable.get(this);- return inlineEventHandlers && inlineEventHandlers[name] && inlineEventHandlers[name].value || null;- };- }- function getEventHandlerSetter(name) {- var eventType = name.slice(2);- return function(value) {- var inlineEventHandlers = eventHandlersTable.get(this);- if (!inlineEventHandlers) {- inlineEventHandlers = Object.create(null);- eventHandlersTable.set(this, inlineEventHandlers);- }- var old = inlineEventHandlers[name];- if (old) this.removeEventListener(eventType, old.wrapped, false);- if (typeof value === "function") {- var wrapped = function(e) {- var rv = value.call(this, e);- if (rv === false) e.preventDefault(); else if (name === "onbeforeunload" && typeof rv === "string") e.returnValue = rv;- };- this.addEventListener(eventType, wrapped, false);- inlineEventHandlers[name] = {- value: value,- wrapped: wrapped- };- }- };- }- scope.elementFromPoint = elementFromPoint;- scope.getEventHandlerGetter = getEventHandlerGetter;- scope.getEventHandlerSetter = getEventHandlerSetter;- scope.wrapEventTargetMethods = wrapEventTargetMethods;- scope.wrappers.BeforeUnloadEvent = BeforeUnloadEvent;- scope.wrappers.CustomEvent = CustomEvent;- scope.wrappers.Event = Event;- scope.wrappers.EventTarget = EventTarget;- scope.wrappers.FocusEvent = FocusEvent;- scope.wrappers.MouseEvent = MouseEvent;- scope.wrappers.UIEvent = UIEvent;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var UIEvent = scope.wrappers.UIEvent;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var setWrapper = scope.setWrapper;- var unsafeUnwrap = scope.unsafeUnwrap;- var wrap = scope.wrap;- var OriginalTouchEvent = window.TouchEvent;- if (!OriginalTouchEvent) return;- var nativeEvent;- try {- nativeEvent = document.createEvent("TouchEvent");- } catch (ex) {- return;- }- var nonEnumDescriptor = {- enumerable: false- };- function nonEnum(obj, prop) {- Object.defineProperty(obj, prop, nonEnumDescriptor);- }- function Touch(impl) {- setWrapper(impl, this);- }- Touch.prototype = {- get target() {- return wrap(unsafeUnwrap(this).target);- }- };- var descr = {- configurable: true,- enumerable: true,- get: null- };- [ "clientX", "clientY", "screenX", "screenY", "pageX", "pageY", "identifier", "webkitRadiusX", "webkitRadiusY", "webkitRotationAngle", "webkitForce" ].forEach(function(name) {- descr.get = function() {- return unsafeUnwrap(this)[name];- };- Object.defineProperty(Touch.prototype, name, descr);- });- function TouchList() {- this.length = 0;- nonEnum(this, "length");- }- TouchList.prototype = {- item: function(index) {- return this[index];- }- };- function wrapTouchList(nativeTouchList) {- var list = new TouchList();- for (var i = 0; i < nativeTouchList.length; i++) {- list[i] = new Touch(nativeTouchList[i]);- }- list.length = i;- return list;- }- function TouchEvent(impl) {- UIEvent.call(this, impl);- }- TouchEvent.prototype = Object.create(UIEvent.prototype);- mixin(TouchEvent.prototype, {- get touches() {- return wrapTouchList(unsafeUnwrap(this).touches);- },- get targetTouches() {- return wrapTouchList(unsafeUnwrap(this).targetTouches);- },- get changedTouches() {- return wrapTouchList(unsafeUnwrap(this).changedTouches);- },- initTouchEvent: function() {- throw new Error("Not implemented");- }- });- registerWrapper(OriginalTouchEvent, TouchEvent, nativeEvent);- scope.wrappers.Touch = Touch;- scope.wrappers.TouchEvent = TouchEvent;- scope.wrappers.TouchList = TouchList;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var unsafeUnwrap = scope.unsafeUnwrap;- var wrap = scope.wrap;- var nonEnumDescriptor = {- enumerable: false- };- function nonEnum(obj, prop) {- Object.defineProperty(obj, prop, nonEnumDescriptor);- }- function NodeList() {- this.length = 0;- nonEnum(this, "length");- }- NodeList.prototype = {- item: function(index) {- return this[index];- }- };- nonEnum(NodeList.prototype, "item");- function wrapNodeList(list) {- if (list == null) return list;- var wrapperList = new NodeList();- for (var i = 0, length = list.length; i < length; i++) {- wrapperList[i] = wrap(list[i]);- }- wrapperList.length = length;- return wrapperList;- }- function addWrapNodeListMethod(wrapperConstructor, name) {- wrapperConstructor.prototype[name] = function() {- return wrapNodeList(unsafeUnwrap(this)[name].apply(unsafeUnwrap(this), arguments));- };- }- scope.wrappers.NodeList = NodeList;- scope.addWrapNodeListMethod = addWrapNodeListMethod;- scope.wrapNodeList = wrapNodeList;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- scope.wrapHTMLCollection = scope.wrapNodeList;- scope.wrappers.HTMLCollection = scope.wrappers.NodeList;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var EventTarget = scope.wrappers.EventTarget;- var NodeList = scope.wrappers.NodeList;- var TreeScope = scope.TreeScope;- var assert = scope.assert;- var defineWrapGetter = scope.defineWrapGetter;- var enqueueMutation = scope.enqueueMutation;- var getTreeScope = scope.getTreeScope;- var isWrapper = scope.isWrapper;- var mixin = scope.mixin;- var registerTransientObservers = scope.registerTransientObservers;- var registerWrapper = scope.registerWrapper;- var setTreeScope = scope.setTreeScope;- var unsafeUnwrap = scope.unsafeUnwrap;- var unwrap = scope.unwrap;- var unwrapIfNeeded = scope.unwrapIfNeeded;- var wrap = scope.wrap;- var wrapIfNeeded = scope.wrapIfNeeded;- var wrappers = scope.wrappers;- function assertIsNodeWrapper(node) {- assert(node instanceof Node);- }- function createOneElementNodeList(node) {- var nodes = new NodeList();- nodes[0] = node;- nodes.length = 1;- return nodes;- }- var surpressMutations = false;- function enqueueRemovalForInsertedNodes(node, parent, nodes) {- enqueueMutation(parent, "childList", {- removedNodes: nodes,- previousSibling: node.previousSibling,- nextSibling: node.nextSibling- });- }- function enqueueRemovalForInsertedDocumentFragment(df, nodes) {- enqueueMutation(df, "childList", {- removedNodes: nodes- });- }- function collectNodes(node, parentNode, previousNode, nextNode) {- if (node instanceof DocumentFragment) {- var nodes = collectNodesForDocumentFragment(node);- surpressMutations = true;- for (var i = nodes.length - 1; i >= 0; i--) {- node.removeChild(nodes[i]);- nodes[i].parentNode_ = parentNode;- }- surpressMutations = false;- for (var i = 0; i < nodes.length; i++) {- nodes[i].previousSibling_ = nodes[i - 1] || previousNode;- nodes[i].nextSibling_ = nodes[i + 1] || nextNode;- }- if (previousNode) previousNode.nextSibling_ = nodes[0];- if (nextNode) nextNode.previousSibling_ = nodes[nodes.length - 1];- return nodes;- }- var nodes = createOneElementNodeList(node);- var oldParent = node.parentNode;- if (oldParent) {- oldParent.removeChild(node);- }- node.parentNode_ = parentNode;- node.previousSibling_ = previousNode;- node.nextSibling_ = nextNode;- if (previousNode) previousNode.nextSibling_ = node;- if (nextNode) nextNode.previousSibling_ = node;- return nodes;- }- function collectNodesNative(node) {- if (node instanceof DocumentFragment) return collectNodesForDocumentFragment(node);- var nodes = createOneElementNodeList(node);- var oldParent = node.parentNode;- if (oldParent) enqueueRemovalForInsertedNodes(node, oldParent, nodes);- return nodes;- }- function collectNodesForDocumentFragment(node) {- var nodes = new NodeList();- var i = 0;- for (var child = node.firstChild; child; child = child.nextSibling) {- nodes[i++] = child;- }- nodes.length = i;- enqueueRemovalForInsertedDocumentFragment(node, nodes);- return nodes;- }- function snapshotNodeList(nodeList) {- return nodeList;- }- function nodeWasAdded(node, treeScope) {- setTreeScope(node, treeScope);- node.nodeIsInserted_();- }- function nodesWereAdded(nodes, parent) {- var treeScope = getTreeScope(parent);- for (var i = 0; i < nodes.length; i++) {- nodeWasAdded(nodes[i], treeScope);- }- }- function nodeWasRemoved(node) {- setTreeScope(node, new TreeScope(node, null));- }- function nodesWereRemoved(nodes) {- for (var i = 0; i < nodes.length; i++) {- nodeWasRemoved(nodes[i]);- }- }- function ensureSameOwnerDocument(parent, child) {- var ownerDoc = parent.nodeType === Node.DOCUMENT_NODE ? parent : parent.ownerDocument;- if (ownerDoc !== child.ownerDocument) ownerDoc.adoptNode(child);- }- function adoptNodesIfNeeded(owner, nodes) {- if (!nodes.length) return;- var ownerDoc = owner.ownerDocument;- if (ownerDoc === nodes[0].ownerDocument) return;- for (var i = 0; i < nodes.length; i++) {- scope.adoptNodeNoRemove(nodes[i], ownerDoc);- }- }- function unwrapNodesForInsertion(owner, nodes) {- adoptNodesIfNeeded(owner, nodes);- var length = nodes.length;- if (length === 1) return unwrap(nodes[0]);- var df = unwrap(owner.ownerDocument.createDocumentFragment());- for (var i = 0; i < length; i++) {- df.appendChild(unwrap(nodes[i]));- }- return df;- }- function clearChildNodes(wrapper) {- if (wrapper.firstChild_ !== undefined) {- var child = wrapper.firstChild_;- while (child) {- var tmp = child;- child = child.nextSibling_;- tmp.parentNode_ = tmp.previousSibling_ = tmp.nextSibling_ = undefined;- }- }- wrapper.firstChild_ = wrapper.lastChild_ = undefined;- }- function removeAllChildNodes(wrapper) {- if (wrapper.invalidateShadowRenderer()) {- var childWrapper = wrapper.firstChild;- while (childWrapper) {- assert(childWrapper.parentNode === wrapper);- var nextSibling = childWrapper.nextSibling;- var childNode = unwrap(childWrapper);- var parentNode = childNode.parentNode;- if (parentNode) originalRemoveChild.call(parentNode, childNode);- childWrapper.previousSibling_ = childWrapper.nextSibling_ = childWrapper.parentNode_ = null;- childWrapper = nextSibling;- }- wrapper.firstChild_ = wrapper.lastChild_ = null;- } else {- var node = unwrap(wrapper);- var child = node.firstChild;- var nextSibling;- while (child) {- nextSibling = child.nextSibling;- originalRemoveChild.call(node, child);- child = nextSibling;- }- }- }- function invalidateParent(node) {- var p = node.parentNode;- return p && p.invalidateShadowRenderer();- }- function cleanupNodes(nodes) {- for (var i = 0, n; i < nodes.length; i++) {- n = nodes[i];- n.parentNode.removeChild(n);- }- }- var originalImportNode = document.importNode;- var originalCloneNode = window.Node.prototype.cloneNode;- function cloneNode(node, deep, opt_doc) {- var clone;- if (opt_doc) clone = wrap(originalImportNode.call(opt_doc, unsafeUnwrap(node), false)); else clone = wrap(originalCloneNode.call(unsafeUnwrap(node), false));- if (deep) {- for (var child = node.firstChild; child; child = child.nextSibling) {- clone.appendChild(cloneNode(child, true, opt_doc));- }- if (node instanceof wrappers.HTMLTemplateElement) {- var cloneContent = clone.content;- for (var child = node.content.firstChild; child; child = child.nextSibling) {- cloneContent.appendChild(cloneNode(child, true, opt_doc));- }- }- }- return clone;- }- function contains(self, child) {- if (!child || getTreeScope(self) !== getTreeScope(child)) return false;- for (var node = child; node; node = node.parentNode) {- if (node === self) return true;- }- return false;- }- var OriginalNode = window.Node;- function Node(original) {- assert(original instanceof OriginalNode);- EventTarget.call(this, original);- this.parentNode_ = undefined;- this.firstChild_ = undefined;- this.lastChild_ = undefined;- this.nextSibling_ = undefined;- this.previousSibling_ = undefined;- this.treeScope_ = undefined;- }- var OriginalDocumentFragment = window.DocumentFragment;- var originalAppendChild = OriginalNode.prototype.appendChild;- var originalCompareDocumentPosition = OriginalNode.prototype.compareDocumentPosition;- var originalIsEqualNode = OriginalNode.prototype.isEqualNode;- var originalInsertBefore = OriginalNode.prototype.insertBefore;- var originalRemoveChild = OriginalNode.prototype.removeChild;- var originalReplaceChild = OriginalNode.prototype.replaceChild;- var isIEOrEdge = /Trident|Edge/.test(navigator.userAgent);- var removeChildOriginalHelper = isIEOrEdge ? function(parent, child) {- try {- originalRemoveChild.call(parent, child);- } catch (ex) {- if (!(parent instanceof OriginalDocumentFragment)) throw ex;- }- } : function(parent, child) {- originalRemoveChild.call(parent, child);- };- Node.prototype = Object.create(EventTarget.prototype);- mixin(Node.prototype, {- appendChild: function(childWrapper) {- return this.insertBefore(childWrapper, null);- },- insertBefore: function(childWrapper, refWrapper) {- assertIsNodeWrapper(childWrapper);- var refNode;- if (refWrapper) {- if (isWrapper(refWrapper)) {- refNode = unwrap(refWrapper);- } else {- refNode = refWrapper;- refWrapper = wrap(refNode);- }- } else {- refWrapper = null;- refNode = null;- }- refWrapper && assert(refWrapper.parentNode === this);- var nodes;- var previousNode = refWrapper ? refWrapper.previousSibling : this.lastChild;- var useNative = !this.invalidateShadowRenderer() && !invalidateParent(childWrapper);- if (useNative) nodes = collectNodesNative(childWrapper); else nodes = collectNodes(childWrapper, this, previousNode, refWrapper);- if (useNative) {- ensureSameOwnerDocument(this, childWrapper);- clearChildNodes(this);- originalInsertBefore.call(unsafeUnwrap(this), unwrap(childWrapper), refNode);- } else {- if (!previousNode) this.firstChild_ = nodes[0];- if (!refWrapper) {- this.lastChild_ = nodes[nodes.length - 1];- if (this.firstChild_ === undefined) this.firstChild_ = this.firstChild;- }- var parentNode = refNode ? refNode.parentNode : unsafeUnwrap(this);- if (parentNode) {- originalInsertBefore.call(parentNode, unwrapNodesForInsertion(this, nodes), refNode);- } else {- adoptNodesIfNeeded(this, nodes);- }- }- enqueueMutation(this, "childList", {- addedNodes: nodes,- nextSibling: refWrapper,- previousSibling: previousNode- });- nodesWereAdded(nodes, this);- return childWrapper;- },- removeChild: function(childWrapper) {- assertIsNodeWrapper(childWrapper);- if (childWrapper.parentNode !== this) {- var found = false;- var childNodes = this.childNodes;- for (var ieChild = this.firstChild; ieChild; ieChild = ieChild.nextSibling) {- if (ieChild === childWrapper) {- found = true;- break;- }- }- if (!found) {- throw new Error("NotFoundError");- }- }- var childNode = unwrap(childWrapper);- var childWrapperNextSibling = childWrapper.nextSibling;- var childWrapperPreviousSibling = childWrapper.previousSibling;- if (this.invalidateShadowRenderer()) {- var thisFirstChild = this.firstChild;- var thisLastChild = this.lastChild;- var parentNode = childNode.parentNode;- if (parentNode) removeChildOriginalHelper(parentNode, childNode);- if (thisFirstChild === childWrapper) this.firstChild_ = childWrapperNextSibling;- if (thisLastChild === childWrapper) this.lastChild_ = childWrapperPreviousSibling;- if (childWrapperPreviousSibling) childWrapperPreviousSibling.nextSibling_ = childWrapperNextSibling;- if (childWrapperNextSibling) {- childWrapperNextSibling.previousSibling_ = childWrapperPreviousSibling;- }- childWrapper.previousSibling_ = childWrapper.nextSibling_ = childWrapper.parentNode_ = undefined;- } else {- clearChildNodes(this);- removeChildOriginalHelper(unsafeUnwrap(this), childNode);- }- if (!surpressMutations) {- enqueueMutation(this, "childList", {- removedNodes: createOneElementNodeList(childWrapper),- nextSibling: childWrapperNextSibling,- previousSibling: childWrapperPreviousSibling- });- }- registerTransientObservers(this, childWrapper);- return childWrapper;- },- replaceChild: function(newChildWrapper, oldChildWrapper) {- assertIsNodeWrapper(newChildWrapper);- var oldChildNode;- if (isWrapper(oldChildWrapper)) {- oldChildNode = unwrap(oldChildWrapper);- } else {- oldChildNode = oldChildWrapper;- oldChildWrapper = wrap(oldChildNode);- }- if (oldChildWrapper.parentNode !== this) {- throw new Error("NotFoundError");- }- var nextNode = oldChildWrapper.nextSibling;- var previousNode = oldChildWrapper.previousSibling;- var nodes;- var useNative = !this.invalidateShadowRenderer() && !invalidateParent(newChildWrapper);- if (useNative) {- nodes = collectNodesNative(newChildWrapper);- } else {- if (nextNode === newChildWrapper) nextNode = newChildWrapper.nextSibling;- nodes = collectNodes(newChildWrapper, this, previousNode, nextNode);- }- if (!useNative) {- if (this.firstChild === oldChildWrapper) this.firstChild_ = nodes[0];- if (this.lastChild === oldChildWrapper) this.lastChild_ = nodes[nodes.length - 1];- oldChildWrapper.previousSibling_ = oldChildWrapper.nextSibling_ = oldChildWrapper.parentNode_ = undefined;- if (oldChildNode.parentNode) {- originalReplaceChild.call(oldChildNode.parentNode, unwrapNodesForInsertion(this, nodes), oldChildNode);- }- } else {- ensureSameOwnerDocument(this, newChildWrapper);- clearChildNodes(this);- originalReplaceChild.call(unsafeUnwrap(this), unwrap(newChildWrapper), oldChildNode);- }- enqueueMutation(this, "childList", {- addedNodes: nodes,- removedNodes: createOneElementNodeList(oldChildWrapper),- nextSibling: nextNode,- previousSibling: previousNode- });- nodeWasRemoved(oldChildWrapper);- nodesWereAdded(nodes, this);- return oldChildWrapper;- },- nodeIsInserted_: function() {- for (var child = this.firstChild; child; child = child.nextSibling) {- child.nodeIsInserted_();- }- },- hasChildNodes: function() {- return this.firstChild !== null;- },- get parentNode() {- return this.parentNode_ !== undefined ? this.parentNode_ : wrap(unsafeUnwrap(this).parentNode);- },- get firstChild() {- return this.firstChild_ !== undefined ? this.firstChild_ : wrap(unsafeUnwrap(this).firstChild);- },- get lastChild() {- return this.lastChild_ !== undefined ? this.lastChild_ : wrap(unsafeUnwrap(this).lastChild);- },- get nextSibling() {- return this.nextSibling_ !== undefined ? this.nextSibling_ : wrap(unsafeUnwrap(this).nextSibling);- },- get previousSibling() {- return this.previousSibling_ !== undefined ? this.previousSibling_ : wrap(unsafeUnwrap(this).previousSibling);- },- get parentElement() {- var p = this.parentNode;- while (p && p.nodeType !== Node.ELEMENT_NODE) {- p = p.parentNode;- }- return p;- },- get textContent() {- var s = "";- for (var child = this.firstChild; child; child = child.nextSibling) {- if (child.nodeType != Node.COMMENT_NODE) {- s += child.textContent;- }- }- return s;- },- set textContent(textContent) {- if (textContent == null) textContent = "";- var removedNodes = snapshotNodeList(this.childNodes);- if (this.invalidateShadowRenderer()) {- removeAllChildNodes(this);- if (textContent !== "") {- var textNode = unsafeUnwrap(this).ownerDocument.createTextNode(textContent);- this.appendChild(textNode);- }- } else {- clearChildNodes(this);- unsafeUnwrap(this).textContent = textContent;- }- var addedNodes = snapshotNodeList(this.childNodes);- enqueueMutation(this, "childList", {- addedNodes: addedNodes,- removedNodes: removedNodes- });- nodesWereRemoved(removedNodes);- nodesWereAdded(addedNodes, this);- },- get childNodes() {- var wrapperList = new NodeList();- var i = 0;- for (var child = this.firstChild; child; child = child.nextSibling) {- wrapperList[i++] = child;- }- wrapperList.length = i;- return wrapperList;- },- cloneNode: function(deep) {- return cloneNode(this, deep);- },- contains: function(child) {- return contains(this, wrapIfNeeded(child));- },- compareDocumentPosition: function(otherNode) {- return originalCompareDocumentPosition.call(unsafeUnwrap(this), unwrapIfNeeded(otherNode));- },- isEqualNode: function(otherNode) {- return originalIsEqualNode.call(unsafeUnwrap(this), unwrapIfNeeded(otherNode));- },- normalize: function() {- var nodes = snapshotNodeList(this.childNodes);- var remNodes = [];- var s = "";- var modNode;- for (var i = 0, n; i < nodes.length; i++) {- n = nodes[i];- if (n.nodeType === Node.TEXT_NODE) {- if (!modNode && !n.data.length) this.removeChild(n); else if (!modNode) modNode = n; else {- s += n.data;- remNodes.push(n);- }- } else {- if (modNode && remNodes.length) {- modNode.data += s;- cleanupNodes(remNodes);- }- remNodes = [];- s = "";- modNode = null;- if (n.childNodes.length) n.normalize();- }- }- if (modNode && remNodes.length) {- modNode.data += s;- cleanupNodes(remNodes);- }- }- });- defineWrapGetter(Node, "ownerDocument");- registerWrapper(OriginalNode, Node, document.createDocumentFragment());- delete Node.prototype.querySelector;- delete Node.prototype.querySelectorAll;- Node.prototype = mixin(Object.create(EventTarget.prototype), Node.prototype);- scope.cloneNode = cloneNode;- scope.nodeWasAdded = nodeWasAdded;- scope.nodeWasRemoved = nodeWasRemoved;- scope.nodesWereAdded = nodesWereAdded;- scope.nodesWereRemoved = nodesWereRemoved;- scope.originalInsertBefore = originalInsertBefore;- scope.originalRemoveChild = originalRemoveChild;- scope.snapshotNodeList = snapshotNodeList;- scope.wrappers.Node = Node;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var HTMLCollection = scope.wrappers.HTMLCollection;- var NodeList = scope.wrappers.NodeList;- var getTreeScope = scope.getTreeScope;- var unsafeUnwrap = scope.unsafeUnwrap;- var wrap = scope.wrap;- var originalDocumentQuerySelector = document.querySelector;- var originalElementQuerySelector = document.documentElement.querySelector;- var originalDocumentQuerySelectorAll = document.querySelectorAll;- var originalElementQuerySelectorAll = document.documentElement.querySelectorAll;- var originalDocumentGetElementsByTagName = document.getElementsByTagName;- var originalElementGetElementsByTagName = document.documentElement.getElementsByTagName;- var originalDocumentGetElementsByTagNameNS = document.getElementsByTagNameNS;- var originalElementGetElementsByTagNameNS = document.documentElement.getElementsByTagNameNS;- var OriginalElement = window.Element;- var OriginalDocument = window.HTMLDocument || window.Document;- function filterNodeList(list, index, result, deep) {- var wrappedItem = null;- var root = null;- for (var i = 0, length = list.length; i < length; i++) {- wrappedItem = wrap(list[i]);- if (!deep && (root = getTreeScope(wrappedItem).root)) {- if (root instanceof scope.wrappers.ShadowRoot) {- continue;- }- }- result[index++] = wrappedItem;- }- return index;- }- function shimSelector(selector) {- return String(selector).replace(/\/deep\/|::shadow|>>>/g, " ");- }- function shimMatchesSelector(selector) {- return String(selector).replace(/:host\(([^\s]+)\)/g, "$1").replace(/([^\s]):host/g, "$1").replace(":host", "*").replace(/\^|\/shadow\/|\/shadow-deep\/|::shadow|\/deep\/|::content|>>>/g, " ");- }- function findOne(node, selector) {- var m, el = node.firstElementChild;- while (el) {- if (el.matches(selector)) return el;- m = findOne(el, selector);- if (m) return m;- el = el.nextElementSibling;- }- return null;- }- function matchesSelector(el, selector) {- return el.matches(selector);- }- var XHTML_NS = "http://www.w3.org/1999/xhtml";- function matchesTagName(el, localName, localNameLowerCase) {- var ln = el.localName;- return ln === localName || ln === localNameLowerCase && el.namespaceURI === XHTML_NS;- }- function matchesEveryThing() {- return true;- }- function matchesLocalNameOnly(el, ns, localName) {- return el.localName === localName;- }- function matchesNameSpace(el, ns) {- return el.namespaceURI === ns;- }- function matchesLocalNameNS(el, ns, localName) {- return el.namespaceURI === ns && el.localName === localName;- }- function findElements(node, index, result, p, arg0, arg1) {- var el = node.firstElementChild;- while (el) {- if (p(el, arg0, arg1)) result[index++] = el;- index = findElements(el, index, result, p, arg0, arg1);- el = el.nextElementSibling;- }- return index;- }- function querySelectorAllFiltered(p, index, result, selector, deep) {- var target = unsafeUnwrap(this);- var list;- var root = getTreeScope(this).root;- if (root instanceof scope.wrappers.ShadowRoot) {- return findElements(this, index, result, p, selector, null);- } else if (target instanceof OriginalElement) {- list = originalElementQuerySelectorAll.call(target, selector);- } else if (target instanceof OriginalDocument) {- list = originalDocumentQuerySelectorAll.call(target, selector);- } else {- return findElements(this, index, result, p, selector, null);- }- return filterNodeList(list, index, result, deep);- }- var SelectorsInterface = {- querySelector: function(selector) {- var shimmed = shimSelector(selector);- var deep = shimmed !== selector;- selector = shimmed;- var target = unsafeUnwrap(this);- var wrappedItem;- var root = getTreeScope(this).root;- if (root instanceof scope.wrappers.ShadowRoot) {- return findOne(this, selector);- } else if (target instanceof OriginalElement) {- wrappedItem = wrap(originalElementQuerySelector.call(target, selector));- } else if (target instanceof OriginalDocument) {- wrappedItem = wrap(originalDocumentQuerySelector.call(target, selector));- } else {- return findOne(this, selector);- }- if (!wrappedItem) {- return wrappedItem;- } else if (!deep && (root = getTreeScope(wrappedItem).root)) {- if (root instanceof scope.wrappers.ShadowRoot) {- return findOne(this, selector);- }- }- return wrappedItem;- },- querySelectorAll: function(selector) {- var shimmed = shimSelector(selector);- var deep = shimmed !== selector;- selector = shimmed;- var result = new NodeList();- result.length = querySelectorAllFiltered.call(this, matchesSelector, 0, result, selector, deep);- return result;- }- };- var MatchesInterface = {- matches: function(selector) {- selector = shimMatchesSelector(selector);- return scope.originalMatches.call(unsafeUnwrap(this), selector);- }- };- function getElementsByTagNameFiltered(p, index, result, localName, lowercase) {- var target = unsafeUnwrap(this);- var list;- var root = getTreeScope(this).root;- if (root instanceof scope.wrappers.ShadowRoot) {- return findElements(this, index, result, p, localName, lowercase);- } else if (target instanceof OriginalElement) {- list = originalElementGetElementsByTagName.call(target, localName, lowercase);- } else if (target instanceof OriginalDocument) {- list = originalDocumentGetElementsByTagName.call(target, localName, lowercase);- } else {- return findElements(this, index, result, p, localName, lowercase);- }- return filterNodeList(list, index, result, false);- }- function getElementsByTagNameNSFiltered(p, index, result, ns, localName) {- var target = unsafeUnwrap(this);- var list;- var root = getTreeScope(this).root;- if (root instanceof scope.wrappers.ShadowRoot) {- return findElements(this, index, result, p, ns, localName);- } else if (target instanceof OriginalElement) {- list = originalElementGetElementsByTagNameNS.call(target, ns, localName);- } else if (target instanceof OriginalDocument) {- list = originalDocumentGetElementsByTagNameNS.call(target, ns, localName);- } else {- return findElements(this, index, result, p, ns, localName);- }- return filterNodeList(list, index, result, false);- }- var GetElementsByInterface = {- getElementsByTagName: function(localName) {- var result = new HTMLCollection();- var match = localName === "*" ? matchesEveryThing : matchesTagName;- result.length = getElementsByTagNameFiltered.call(this, match, 0, result, localName, localName.toLowerCase());- return result;- },- getElementsByClassName: function(className) {- return this.querySelectorAll("." + className);- },- getElementsByTagNameNS: function(ns, localName) {- var result = new HTMLCollection();- var match = null;- if (ns === "*") {- match = localName === "*" ? matchesEveryThing : matchesLocalNameOnly;- } else {- match = localName === "*" ? matchesNameSpace : matchesLocalNameNS;- }- result.length = getElementsByTagNameNSFiltered.call(this, match, 0, result, ns || null, localName);- return result;- }- };- scope.GetElementsByInterface = GetElementsByInterface;- scope.SelectorsInterface = SelectorsInterface;- scope.MatchesInterface = MatchesInterface;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var NodeList = scope.wrappers.NodeList;- function forwardElement(node) {- while (node && node.nodeType !== Node.ELEMENT_NODE) {- node = node.nextSibling;- }- return node;- }- function backwardsElement(node) {- while (node && node.nodeType !== Node.ELEMENT_NODE) {- node = node.previousSibling;- }- return node;- }- var ParentNodeInterface = {- get firstElementChild() {- return forwardElement(this.firstChild);- },- get lastElementChild() {- return backwardsElement(this.lastChild);- },- get childElementCount() {- var count = 0;- for (var child = this.firstElementChild; child; child = child.nextElementSibling) {- count++;- }- return count;- },- get children() {- var wrapperList = new NodeList();- var i = 0;- for (var child = this.firstElementChild; child; child = child.nextElementSibling) {- wrapperList[i++] = child;- }- wrapperList.length = i;- return wrapperList;- },- remove: function() {- var p = this.parentNode;- if (p) p.removeChild(this);- }- };- var ChildNodeInterface = {- get nextElementSibling() {- return forwardElement(this.nextSibling);- },- get previousElementSibling() {- return backwardsElement(this.previousSibling);- }- };- var NonElementParentNodeInterface = {- getElementById: function(id) {- if (/[ \t\n\r\f]/.test(id)) return null;- return this.querySelector('[id="' + id + '"]');- }- };- scope.ChildNodeInterface = ChildNodeInterface;- scope.NonElementParentNodeInterface = NonElementParentNodeInterface;- scope.ParentNodeInterface = ParentNodeInterface;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var ChildNodeInterface = scope.ChildNodeInterface;- var Node = scope.wrappers.Node;- var enqueueMutation = scope.enqueueMutation;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var unsafeUnwrap = scope.unsafeUnwrap;- var OriginalCharacterData = window.CharacterData;- function CharacterData(node) {- Node.call(this, node);- }- CharacterData.prototype = Object.create(Node.prototype);- mixin(CharacterData.prototype, {- get nodeValue() {- return this.data;- },- set nodeValue(data) {- this.data = data;- },- get textContent() {- return this.data;- },- set textContent(value) {- this.data = value;- },- get data() {- return unsafeUnwrap(this).data;- },- set data(value) {- var oldValue = unsafeUnwrap(this).data;- enqueueMutation(this, "characterData", {- oldValue: oldValue- });- unsafeUnwrap(this).data = value;- }- });- mixin(CharacterData.prototype, ChildNodeInterface);- registerWrapper(OriginalCharacterData, CharacterData, document.createTextNode(""));- scope.wrappers.CharacterData = CharacterData;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var CharacterData = scope.wrappers.CharacterData;- var enqueueMutation = scope.enqueueMutation;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- function toUInt32(x) {- return x >>> 0;- }- var OriginalText = window.Text;- function Text(node) {- CharacterData.call(this, node);- }- Text.prototype = Object.create(CharacterData.prototype);- mixin(Text.prototype, {- splitText: function(offset) {- offset = toUInt32(offset);- var s = this.data;- if (offset > s.length) throw new Error("IndexSizeError");- var head = s.slice(0, offset);- var tail = s.slice(offset);- this.data = head;- var newTextNode = this.ownerDocument.createTextNode(tail);- if (this.parentNode) this.parentNode.insertBefore(newTextNode, this.nextSibling);- return newTextNode;- }- });- registerWrapper(OriginalText, Text, document.createTextNode(""));- scope.wrappers.Text = Text;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- if (!window.DOMTokenList) {- console.warn("Missing DOMTokenList prototype, please include a " + "compatible classList polyfill such as http://goo.gl/uTcepH.");- return;- }- var unsafeUnwrap = scope.unsafeUnwrap;- var enqueueMutation = scope.enqueueMutation;- function getClass(el) {- return unsafeUnwrap(el).getAttribute("class");- }- function enqueueClassAttributeChange(el, oldValue) {- enqueueMutation(el, "attributes", {- name: "class",- namespace: null,- oldValue: oldValue- });- }- function invalidateClass(el) {- scope.invalidateRendererBasedOnAttribute(el, "class");- }- function changeClass(tokenList, method, args) {- var ownerElement = tokenList.ownerElement_;- if (ownerElement == null) {- return method.apply(tokenList, args);- }- var oldValue = getClass(ownerElement);- var retv = method.apply(tokenList, args);- if (getClass(ownerElement) !== oldValue) {- enqueueClassAttributeChange(ownerElement, oldValue);- invalidateClass(ownerElement);- }- return retv;- }- var oldAdd = DOMTokenList.prototype.add;- DOMTokenList.prototype.add = function() {- changeClass(this, oldAdd, arguments);- };- var oldRemove = DOMTokenList.prototype.remove;- DOMTokenList.prototype.remove = function() {- changeClass(this, oldRemove, arguments);- };- var oldToggle = DOMTokenList.prototype.toggle;- DOMTokenList.prototype.toggle = function() {- return changeClass(this, oldToggle, arguments);- };-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var ChildNodeInterface = scope.ChildNodeInterface;- var GetElementsByInterface = scope.GetElementsByInterface;- var Node = scope.wrappers.Node;- var ParentNodeInterface = scope.ParentNodeInterface;- var SelectorsInterface = scope.SelectorsInterface;- var MatchesInterface = scope.MatchesInterface;- var addWrapNodeListMethod = scope.addWrapNodeListMethod;- var enqueueMutation = scope.enqueueMutation;- var mixin = scope.mixin;- var oneOf = scope.oneOf;- var registerWrapper = scope.registerWrapper;- var unsafeUnwrap = scope.unsafeUnwrap;- var wrappers = scope.wrappers;- var OriginalElement = window.Element;- var matchesNames = [ "matches", "mozMatchesSelector", "msMatchesSelector", "webkitMatchesSelector" ].filter(function(name) {- return OriginalElement.prototype[name];- });- var matchesName = matchesNames[0];- var originalMatches = OriginalElement.prototype[matchesName];- function invalidateRendererBasedOnAttribute(element, name) {- var p = element.parentNode;- if (!p || !p.shadowRoot) return;- var renderer = scope.getRendererForHost(p);- if (renderer.dependsOnAttribute(name)) renderer.invalidate();- }- function enqueAttributeChange(element, name, oldValue) {- enqueueMutation(element, "attributes", {- name: name,- namespace: null,- oldValue: oldValue- });- }- var classListTable = new WeakMap();- function Element(node) {- Node.call(this, node);- }- Element.prototype = Object.create(Node.prototype);- mixin(Element.prototype, {- createShadowRoot: function() {- var newShadowRoot = new wrappers.ShadowRoot(this);- unsafeUnwrap(this).polymerShadowRoot_ = newShadowRoot;- var renderer = scope.getRendererForHost(this);- renderer.invalidate();- return newShadowRoot;- },- get shadowRoot() {- return unsafeUnwrap(this).polymerShadowRoot_ || null;- },- setAttribute: function(name, value) {- var oldValue = unsafeUnwrap(this).getAttribute(name);- unsafeUnwrap(this).setAttribute(name, value);- enqueAttributeChange(this, name, oldValue);- invalidateRendererBasedOnAttribute(this, name);- },- removeAttribute: function(name) {- var oldValue = unsafeUnwrap(this).getAttribute(name);- unsafeUnwrap(this).removeAttribute(name);- enqueAttributeChange(this, name, oldValue);- invalidateRendererBasedOnAttribute(this, name);- },- get classList() {- var list = classListTable.get(this);- if (!list) {- list = unsafeUnwrap(this).classList;- if (!list) return;- list.ownerElement_ = this;- classListTable.set(this, list);- }- return list;- },- get className() {- return unsafeUnwrap(this).className;- },- set className(v) {- this.setAttribute("class", v);- },- get id() {- return unsafeUnwrap(this).id;- },- set id(v) {- this.setAttribute("id", v);- }- });- matchesNames.forEach(function(name) {- if (name !== "matches") {- Element.prototype[name] = function(selector) {- return this.matches(selector);- };- }- });- if (OriginalElement.prototype.webkitCreateShadowRoot) {- Element.prototype.webkitCreateShadowRoot = Element.prototype.createShadowRoot;- }- mixin(Element.prototype, ChildNodeInterface);- mixin(Element.prototype, GetElementsByInterface);- mixin(Element.prototype, ParentNodeInterface);- mixin(Element.prototype, SelectorsInterface);- mixin(Element.prototype, MatchesInterface);- registerWrapper(OriginalElement, Element, document.createElementNS(null, "x"));- scope.invalidateRendererBasedOnAttribute = invalidateRendererBasedOnAttribute;- scope.matchesNames = matchesNames;- scope.originalMatches = originalMatches;- scope.wrappers.Element = Element;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var Element = scope.wrappers.Element;- var defineGetter = scope.defineGetter;- var enqueueMutation = scope.enqueueMutation;- var mixin = scope.mixin;- var nodesWereAdded = scope.nodesWereAdded;- var nodesWereRemoved = scope.nodesWereRemoved;- var registerWrapper = scope.registerWrapper;- var snapshotNodeList = scope.snapshotNodeList;- var unsafeUnwrap = scope.unsafeUnwrap;- var unwrap = scope.unwrap;- var wrap = scope.wrap;- var wrappers = scope.wrappers;- var escapeAttrRegExp = /[&\u00A0"]/g;- var escapeDataRegExp = /[&\u00A0<>]/g;- function escapeReplace(c) {- switch (c) {- case "&":- return "&";-- case "<":- return "<";-- case ">":- return ">";-- case '"':- return """;-- case " ":- return " ";- }- }- function escapeAttr(s) {- return s.replace(escapeAttrRegExp, escapeReplace);- }- function escapeData(s) {- return s.replace(escapeDataRegExp, escapeReplace);- }- function makeSet(arr) {- var set = {};- for (var i = 0; i < arr.length; i++) {- set[arr[i]] = true;- }- return set;- }- var voidElements = makeSet([ "area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr" ]);- var plaintextParents = makeSet([ "style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript" ]);- var XHTML_NS = "http://www.w3.org/1999/xhtml";- function needsSelfClosingSlash(node) {- if (node.namespaceURI !== XHTML_NS) return true;- var doctype = node.ownerDocument.doctype;- return doctype && doctype.publicId && doctype.systemId;- }- function getOuterHTML(node, parentNode) {- switch (node.nodeType) {- case Node.ELEMENT_NODE:- var tagName = node.tagName.toLowerCase();- var s = "<" + tagName;- var attrs = node.attributes;- for (var i = 0, attr; attr = attrs[i]; i++) {- s += " " + attr.name + '="' + escapeAttr(attr.value) + '"';- }- if (voidElements[tagName]) {- if (needsSelfClosingSlash(node)) s += "/";- return s + ">";- }- return s + ">" + getInnerHTML(node) + "</" + tagName + ">";-- case Node.TEXT_NODE:- var data = node.data;- if (parentNode && plaintextParents[parentNode.localName]) return data;- return escapeData(data);-- case Node.COMMENT_NODE:- return "<!--" + node.data + "-->";-- default:- console.error(node);- throw new Error("not implemented");- }- }- function getInnerHTML(node) {- if (node instanceof wrappers.HTMLTemplateElement) node = node.content;- var s = "";- for (var child = node.firstChild; child; child = child.nextSibling) {- s += getOuterHTML(child, node);- }- return s;- }- function setInnerHTML(node, value, opt_tagName) {- var tagName = opt_tagName || "div";- node.textContent = "";- var tempElement = unwrap(node.ownerDocument.createElement(tagName));- tempElement.innerHTML = value;- var firstChild;- while (firstChild = tempElement.firstChild) {- node.appendChild(wrap(firstChild));- }- }- var oldIe = /MSIE/.test(navigator.userAgent);- var OriginalHTMLElement = window.HTMLElement;- var OriginalHTMLTemplateElement = window.HTMLTemplateElement;- function HTMLElement(node) {- Element.call(this, node);- }- HTMLElement.prototype = Object.create(Element.prototype);- mixin(HTMLElement.prototype, {- get innerHTML() {- return getInnerHTML(this);- },- set innerHTML(value) {- if (oldIe && plaintextParents[this.localName]) {- this.textContent = value;- return;- }- var removedNodes = snapshotNodeList(this.childNodes);- if (this.invalidateShadowRenderer()) {- if (this instanceof wrappers.HTMLTemplateElement) setInnerHTML(this.content, value); else setInnerHTML(this, value, this.tagName);- } else if (!OriginalHTMLTemplateElement && this instanceof wrappers.HTMLTemplateElement) {- setInnerHTML(this.content, value);- } else {- unsafeUnwrap(this).innerHTML = value;- }- var addedNodes = snapshotNodeList(this.childNodes);- enqueueMutation(this, "childList", {- addedNodes: addedNodes,- removedNodes: removedNodes- });- nodesWereRemoved(removedNodes);- nodesWereAdded(addedNodes, this);- },- get outerHTML() {- return getOuterHTML(this, this.parentNode);- },- set outerHTML(value) {- var p = this.parentNode;- if (p) {- p.invalidateShadowRenderer();- var df = frag(p, value);- p.replaceChild(df, this);- }- },- insertAdjacentHTML: function(position, text) {- var contextElement, refNode;- switch (String(position).toLowerCase()) {- case "beforebegin":- contextElement = this.parentNode;- refNode = this;- break;-- case "afterend":- contextElement = this.parentNode;- refNode = this.nextSibling;- break;-- case "afterbegin":- contextElement = this;- refNode = this.firstChild;- break;-- case "beforeend":- contextElement = this;- refNode = null;- break;-- default:- return;- }- var df = frag(contextElement, text);- contextElement.insertBefore(df, refNode);- },- get hidden() {- return this.hasAttribute("hidden");- },- set hidden(v) {- if (v) {- this.setAttribute("hidden", "");- } else {- this.removeAttribute("hidden");- }- }- });- function frag(contextElement, html) {- var p = unwrap(contextElement.cloneNode(false));- p.innerHTML = html;- var df = unwrap(document.createDocumentFragment());- var c;- while (c = p.firstChild) {- df.appendChild(c);- }- return wrap(df);- }- function getter(name) {- return function() {- scope.renderAllPending();- return unsafeUnwrap(this)[name];- };- }- function getterRequiresRendering(name) {- defineGetter(HTMLElement, name, getter(name));- }- [ "clientHeight", "clientLeft", "clientTop", "clientWidth", "offsetHeight", "offsetLeft", "offsetTop", "offsetWidth", "scrollHeight", "scrollWidth" ].forEach(getterRequiresRendering);- function getterAndSetterRequiresRendering(name) {- Object.defineProperty(HTMLElement.prototype, name, {- get: getter(name),- set: function(v) {- scope.renderAllPending();- unsafeUnwrap(this)[name] = v;- },- configurable: true,- enumerable: true- });- }- [ "scrollLeft", "scrollTop" ].forEach(getterAndSetterRequiresRendering);- function methodRequiresRendering(name) {- Object.defineProperty(HTMLElement.prototype, name, {- value: function() {- scope.renderAllPending();- return unsafeUnwrap(this)[name].apply(unsafeUnwrap(this), arguments);- },- configurable: true,- enumerable: true- });- }- [ "focus", "getBoundingClientRect", "getClientRects", "scrollIntoView" ].forEach(methodRequiresRendering);- registerWrapper(OriginalHTMLElement, HTMLElement, document.createElement("b"));- scope.wrappers.HTMLElement = HTMLElement;- scope.getInnerHTML = getInnerHTML;- scope.setInnerHTML = setInnerHTML;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var HTMLElement = scope.wrappers.HTMLElement;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var unsafeUnwrap = scope.unsafeUnwrap;- var wrap = scope.wrap;- var OriginalHTMLCanvasElement = window.HTMLCanvasElement;- function HTMLCanvasElement(node) {- HTMLElement.call(this, node);- }- HTMLCanvasElement.prototype = Object.create(HTMLElement.prototype);- mixin(HTMLCanvasElement.prototype, {- getContext: function() {- var context = unsafeUnwrap(this).getContext.apply(unsafeUnwrap(this), arguments);- return context && wrap(context);- }- });- registerWrapper(OriginalHTMLCanvasElement, HTMLCanvasElement, document.createElement("canvas"));- scope.wrappers.HTMLCanvasElement = HTMLCanvasElement;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var HTMLElement = scope.wrappers.HTMLElement;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var OriginalHTMLContentElement = window.HTMLContentElement;- function HTMLContentElement(node) {- HTMLElement.call(this, node);- }- HTMLContentElement.prototype = Object.create(HTMLElement.prototype);- mixin(HTMLContentElement.prototype, {- constructor: HTMLContentElement,- get select() {- return this.getAttribute("select");- },- set select(value) {- this.setAttribute("select", value);- },- setAttribute: function(n, v) {- HTMLElement.prototype.setAttribute.call(this, n, v);- if (String(n).toLowerCase() === "select") this.invalidateShadowRenderer(true);- }- });- if (OriginalHTMLContentElement) registerWrapper(OriginalHTMLContentElement, HTMLContentElement);- scope.wrappers.HTMLContentElement = HTMLContentElement;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var HTMLElement = scope.wrappers.HTMLElement;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var wrapHTMLCollection = scope.wrapHTMLCollection;- var unwrap = scope.unwrap;- var OriginalHTMLFormElement = window.HTMLFormElement;- function HTMLFormElement(node) {- HTMLElement.call(this, node);- }- HTMLFormElement.prototype = Object.create(HTMLElement.prototype);- mixin(HTMLFormElement.prototype, {- get elements() {- return wrapHTMLCollection(unwrap(this).elements);- }- });- registerWrapper(OriginalHTMLFormElement, HTMLFormElement, document.createElement("form"));- scope.wrappers.HTMLFormElement = HTMLFormElement;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var HTMLElement = scope.wrappers.HTMLElement;- var registerWrapper = scope.registerWrapper;- var unwrap = scope.unwrap;- var rewrap = scope.rewrap;- var OriginalHTMLImageElement = window.HTMLImageElement;- function HTMLImageElement(node) {- HTMLElement.call(this, node);- }- HTMLImageElement.prototype = Object.create(HTMLElement.prototype);- registerWrapper(OriginalHTMLImageElement, HTMLImageElement, document.createElement("img"));- function Image(width, height) {- if (!(this instanceof Image)) {- throw new TypeError("DOM object constructor cannot be called as a function.");- }- var node = unwrap(document.createElement("img"));- HTMLElement.call(this, node);- rewrap(node, this);- if (width !== undefined) node.width = width;- if (height !== undefined) node.height = height;- }- Image.prototype = HTMLImageElement.prototype;- scope.wrappers.HTMLImageElement = HTMLImageElement;- scope.wrappers.Image = Image;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var HTMLElement = scope.wrappers.HTMLElement;- var mixin = scope.mixin;- var NodeList = scope.wrappers.NodeList;- var registerWrapper = scope.registerWrapper;- var OriginalHTMLShadowElement = window.HTMLShadowElement;- function HTMLShadowElement(node) {- HTMLElement.call(this, node);- }- HTMLShadowElement.prototype = Object.create(HTMLElement.prototype);- HTMLShadowElement.prototype.constructor = HTMLShadowElement;- if (OriginalHTMLShadowElement) registerWrapper(OriginalHTMLShadowElement, HTMLShadowElement);- scope.wrappers.HTMLShadowElement = HTMLShadowElement;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var HTMLElement = scope.wrappers.HTMLElement;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var unsafeUnwrap = scope.unsafeUnwrap;- var unwrap = scope.unwrap;- var wrap = scope.wrap;- var contentTable = new WeakMap();- var templateContentsOwnerTable = new WeakMap();- function getTemplateContentsOwner(doc) {- if (!doc.defaultView) return doc;- var d = templateContentsOwnerTable.get(doc);- if (!d) {- d = doc.implementation.createHTMLDocument("");- while (d.lastChild) {- d.removeChild(d.lastChild);- }- templateContentsOwnerTable.set(doc, d);- }- return d;- }- function extractContent(templateElement) {- var doc = getTemplateContentsOwner(templateElement.ownerDocument);- var df = unwrap(doc.createDocumentFragment());- var child;- while (child = templateElement.firstChild) {- df.appendChild(child);- }- return df;- }- var OriginalHTMLTemplateElement = window.HTMLTemplateElement;- function HTMLTemplateElement(node) {- HTMLElement.call(this, node);- if (!OriginalHTMLTemplateElement) {- var content = extractContent(node);- contentTable.set(this, wrap(content));- }- }- HTMLTemplateElement.prototype = Object.create(HTMLElement.prototype);- mixin(HTMLTemplateElement.prototype, {- constructor: HTMLTemplateElement,- get content() {- if (OriginalHTMLTemplateElement) return wrap(unsafeUnwrap(this).content);- return contentTable.get(this);- }- });- if (OriginalHTMLTemplateElement) registerWrapper(OriginalHTMLTemplateElement, HTMLTemplateElement);- scope.wrappers.HTMLTemplateElement = HTMLTemplateElement;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var HTMLElement = scope.wrappers.HTMLElement;- var registerWrapper = scope.registerWrapper;- var OriginalHTMLMediaElement = window.HTMLMediaElement;- if (!OriginalHTMLMediaElement) return;- function HTMLMediaElement(node) {- HTMLElement.call(this, node);- }- HTMLMediaElement.prototype = Object.create(HTMLElement.prototype);- registerWrapper(OriginalHTMLMediaElement, HTMLMediaElement, document.createElement("audio"));- scope.wrappers.HTMLMediaElement = HTMLMediaElement;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var HTMLMediaElement = scope.wrappers.HTMLMediaElement;- var registerWrapper = scope.registerWrapper;- var unwrap = scope.unwrap;- var rewrap = scope.rewrap;- var OriginalHTMLAudioElement = window.HTMLAudioElement;- if (!OriginalHTMLAudioElement) return;- function HTMLAudioElement(node) {- HTMLMediaElement.call(this, node);- }- HTMLAudioElement.prototype = Object.create(HTMLMediaElement.prototype);- registerWrapper(OriginalHTMLAudioElement, HTMLAudioElement, document.createElement("audio"));- function Audio(src) {- if (!(this instanceof Audio)) {- throw new TypeError("DOM object constructor cannot be called as a function.");- }- var node = unwrap(document.createElement("audio"));- HTMLMediaElement.call(this, node);- rewrap(node, this);- node.setAttribute("preload", "auto");- if (src !== undefined) node.setAttribute("src", src);- }- Audio.prototype = HTMLAudioElement.prototype;- scope.wrappers.HTMLAudioElement = HTMLAudioElement;- scope.wrappers.Audio = Audio;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var HTMLElement = scope.wrappers.HTMLElement;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var rewrap = scope.rewrap;- var unwrap = scope.unwrap;- var wrap = scope.wrap;- var OriginalHTMLOptionElement = window.HTMLOptionElement;- function trimText(s) {- return s.replace(/\s+/g, " ").trim();- }- function HTMLOptionElement(node) {- HTMLElement.call(this, node);- }- HTMLOptionElement.prototype = Object.create(HTMLElement.prototype);- mixin(HTMLOptionElement.prototype, {- get text() {- return trimText(this.textContent);- },- set text(value) {- this.textContent = trimText(String(value));- },- get form() {- return wrap(unwrap(this).form);- }- });- registerWrapper(OriginalHTMLOptionElement, HTMLOptionElement, document.createElement("option"));- function Option(text, value, defaultSelected, selected) {- if (!(this instanceof Option)) {- throw new TypeError("DOM object constructor cannot be called as a function.");- }- var node = unwrap(document.createElement("option"));- HTMLElement.call(this, node);- rewrap(node, this);- if (text !== undefined) node.text = text;- if (value !== undefined) node.setAttribute("value", value);- if (defaultSelected === true) node.setAttribute("selected", "");- node.selected = selected === true;- }- Option.prototype = HTMLOptionElement.prototype;- scope.wrappers.HTMLOptionElement = HTMLOptionElement;- scope.wrappers.Option = Option;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var HTMLElement = scope.wrappers.HTMLElement;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var unwrap = scope.unwrap;- var wrap = scope.wrap;- var OriginalHTMLSelectElement = window.HTMLSelectElement;- function HTMLSelectElement(node) {- HTMLElement.call(this, node);- }- HTMLSelectElement.prototype = Object.create(HTMLElement.prototype);- mixin(HTMLSelectElement.prototype, {- add: function(element, before) {- if (typeof before === "object") before = unwrap(before);- unwrap(this).add(unwrap(element), before);- },- remove: function(indexOrNode) {- if (indexOrNode === undefined) {- HTMLElement.prototype.remove.call(this);- return;- }- if (typeof indexOrNode === "object") indexOrNode = unwrap(indexOrNode);- unwrap(this).remove(indexOrNode);- },- get form() {- return wrap(unwrap(this).form);- }- });- registerWrapper(OriginalHTMLSelectElement, HTMLSelectElement, document.createElement("select"));- scope.wrappers.HTMLSelectElement = HTMLSelectElement;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var HTMLElement = scope.wrappers.HTMLElement;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var unwrap = scope.unwrap;- var wrap = scope.wrap;- var wrapHTMLCollection = scope.wrapHTMLCollection;- var OriginalHTMLTableElement = window.HTMLTableElement;- function HTMLTableElement(node) {- HTMLElement.call(this, node);- }- HTMLTableElement.prototype = Object.create(HTMLElement.prototype);- mixin(HTMLTableElement.prototype, {- get caption() {- return wrap(unwrap(this).caption);- },- createCaption: function() {- return wrap(unwrap(this).createCaption());- },- get tHead() {- return wrap(unwrap(this).tHead);- },- createTHead: function() {- return wrap(unwrap(this).createTHead());- },- createTFoot: function() {- return wrap(unwrap(this).createTFoot());- },- get tFoot() {- return wrap(unwrap(this).tFoot);- },- get tBodies() {- return wrapHTMLCollection(unwrap(this).tBodies);- },- createTBody: function() {- return wrap(unwrap(this).createTBody());- },- get rows() {- return wrapHTMLCollection(unwrap(this).rows);- },- insertRow: function(index) {- return wrap(unwrap(this).insertRow(index));- }- });- registerWrapper(OriginalHTMLTableElement, HTMLTableElement, document.createElement("table"));- scope.wrappers.HTMLTableElement = HTMLTableElement;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var HTMLElement = scope.wrappers.HTMLElement;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var wrapHTMLCollection = scope.wrapHTMLCollection;- var unwrap = scope.unwrap;- var wrap = scope.wrap;- var OriginalHTMLTableSectionElement = window.HTMLTableSectionElement;- function HTMLTableSectionElement(node) {- HTMLElement.call(this, node);- }- HTMLTableSectionElement.prototype = Object.create(HTMLElement.prototype);- mixin(HTMLTableSectionElement.prototype, {- constructor: HTMLTableSectionElement,- get rows() {- return wrapHTMLCollection(unwrap(this).rows);- },- insertRow: function(index) {- return wrap(unwrap(this).insertRow(index));- }- });- registerWrapper(OriginalHTMLTableSectionElement, HTMLTableSectionElement, document.createElement("thead"));- scope.wrappers.HTMLTableSectionElement = HTMLTableSectionElement;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var HTMLElement = scope.wrappers.HTMLElement;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var wrapHTMLCollection = scope.wrapHTMLCollection;- var unwrap = scope.unwrap;- var wrap = scope.wrap;- var OriginalHTMLTableRowElement = window.HTMLTableRowElement;- function HTMLTableRowElement(node) {- HTMLElement.call(this, node);- }- HTMLTableRowElement.prototype = Object.create(HTMLElement.prototype);- mixin(HTMLTableRowElement.prototype, {- get cells() {- return wrapHTMLCollection(unwrap(this).cells);- },- insertCell: function(index) {- return wrap(unwrap(this).insertCell(index));- }- });- registerWrapper(OriginalHTMLTableRowElement, HTMLTableRowElement, document.createElement("tr"));- scope.wrappers.HTMLTableRowElement = HTMLTableRowElement;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var HTMLContentElement = scope.wrappers.HTMLContentElement;- var HTMLElement = scope.wrappers.HTMLElement;- var HTMLShadowElement = scope.wrappers.HTMLShadowElement;- var HTMLTemplateElement = scope.wrappers.HTMLTemplateElement;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var OriginalHTMLUnknownElement = window.HTMLUnknownElement;- function HTMLUnknownElement(node) {- switch (node.localName) {- case "content":- return new HTMLContentElement(node);-- case "shadow":- return new HTMLShadowElement(node);-- case "template":- return new HTMLTemplateElement(node);- }- HTMLElement.call(this, node);- }- HTMLUnknownElement.prototype = Object.create(HTMLElement.prototype);- registerWrapper(OriginalHTMLUnknownElement, HTMLUnknownElement);- scope.wrappers.HTMLUnknownElement = HTMLUnknownElement;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var Element = scope.wrappers.Element;- var HTMLElement = scope.wrappers.HTMLElement;- var registerWrapper = scope.registerWrapper;- var defineWrapGetter = scope.defineWrapGetter;- var unsafeUnwrap = scope.unsafeUnwrap;- var wrap = scope.wrap;- var mixin = scope.mixin;- var SVG_NS = "http://www.w3.org/2000/svg";- var OriginalSVGElement = window.SVGElement;- var svgTitleElement = document.createElementNS(SVG_NS, "title");- if (!("classList" in svgTitleElement)) {- var descr = Object.getOwnPropertyDescriptor(Element.prototype, "classList");- Object.defineProperty(HTMLElement.prototype, "classList", descr);- delete Element.prototype.classList;- }- function SVGElement(node) {- Element.call(this, node);- }- SVGElement.prototype = Object.create(Element.prototype);- mixin(SVGElement.prototype, {- get ownerSVGElement() {- return wrap(unsafeUnwrap(this).ownerSVGElement);- }- });- registerWrapper(OriginalSVGElement, SVGElement, document.createElementNS(SVG_NS, "title"));- scope.wrappers.SVGElement = SVGElement;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var unwrap = scope.unwrap;- var wrap = scope.wrap;- var OriginalSVGUseElement = window.SVGUseElement;- var SVG_NS = "http://www.w3.org/2000/svg";- var gWrapper = wrap(document.createElementNS(SVG_NS, "g"));- var useElement = document.createElementNS(SVG_NS, "use");- var SVGGElement = gWrapper.constructor;- var parentInterfacePrototype = Object.getPrototypeOf(SVGGElement.prototype);- var parentInterface = parentInterfacePrototype.constructor;- function SVGUseElement(impl) {- parentInterface.call(this, impl);- }- SVGUseElement.prototype = Object.create(parentInterfacePrototype);- if ("instanceRoot" in useElement) {- mixin(SVGUseElement.prototype, {- get instanceRoot() {- return wrap(unwrap(this).instanceRoot);- },- get animatedInstanceRoot() {- return wrap(unwrap(this).animatedInstanceRoot);- }- });- }- registerWrapper(OriginalSVGUseElement, SVGUseElement, useElement);- scope.wrappers.SVGUseElement = SVGUseElement;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var EventTarget = scope.wrappers.EventTarget;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var unsafeUnwrap = scope.unsafeUnwrap;- var wrap = scope.wrap;- var OriginalSVGElementInstance = window.SVGElementInstance;- if (!OriginalSVGElementInstance) return;- function SVGElementInstance(impl) {- EventTarget.call(this, impl);- }- SVGElementInstance.prototype = Object.create(EventTarget.prototype);- mixin(SVGElementInstance.prototype, {- get correspondingElement() {- return wrap(unsafeUnwrap(this).correspondingElement);- },- get correspondingUseElement() {- return wrap(unsafeUnwrap(this).correspondingUseElement);- },- get parentNode() {- return wrap(unsafeUnwrap(this).parentNode);- },- get childNodes() {- throw new Error("Not implemented");- },- get firstChild() {- return wrap(unsafeUnwrap(this).firstChild);- },- get lastChild() {- return wrap(unsafeUnwrap(this).lastChild);- },- get previousSibling() {- return wrap(unsafeUnwrap(this).previousSibling);- },- get nextSibling() {- return wrap(unsafeUnwrap(this).nextSibling);- }- });- registerWrapper(OriginalSVGElementInstance, SVGElementInstance);- scope.wrappers.SVGElementInstance = SVGElementInstance;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var setWrapper = scope.setWrapper;- var unsafeUnwrap = scope.unsafeUnwrap;- var unwrap = scope.unwrap;- var unwrapIfNeeded = scope.unwrapIfNeeded;- var wrap = scope.wrap;- var OriginalCanvasRenderingContext2D = window.CanvasRenderingContext2D;- function CanvasRenderingContext2D(impl) {- setWrapper(impl, this);- }- mixin(CanvasRenderingContext2D.prototype, {- get canvas() {- return wrap(unsafeUnwrap(this).canvas);- },- drawImage: function() {- arguments[0] = unwrapIfNeeded(arguments[0]);- unsafeUnwrap(this).drawImage.apply(unsafeUnwrap(this), arguments);- },- createPattern: function() {- arguments[0] = unwrap(arguments[0]);- return unsafeUnwrap(this).createPattern.apply(unsafeUnwrap(this), arguments);- }- });- registerWrapper(OriginalCanvasRenderingContext2D, CanvasRenderingContext2D, document.createElement("canvas").getContext("2d"));- scope.wrappers.CanvasRenderingContext2D = CanvasRenderingContext2D;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var addForwardingProperties = scope.addForwardingProperties;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var setWrapper = scope.setWrapper;- var unsafeUnwrap = scope.unsafeUnwrap;- var unwrapIfNeeded = scope.unwrapIfNeeded;- var wrap = scope.wrap;- var OriginalWebGLRenderingContext = window.WebGLRenderingContext;- if (!OriginalWebGLRenderingContext) return;- function WebGLRenderingContext(impl) {- setWrapper(impl, this);- }- mixin(WebGLRenderingContext.prototype, {- get canvas() {- return wrap(unsafeUnwrap(this).canvas);- },- texImage2D: function() {- arguments[5] = unwrapIfNeeded(arguments[5]);- unsafeUnwrap(this).texImage2D.apply(unsafeUnwrap(this), arguments);- },- texSubImage2D: function() {- arguments[6] = unwrapIfNeeded(arguments[6]);- unsafeUnwrap(this).texSubImage2D.apply(unsafeUnwrap(this), arguments);- }- });- var OriginalWebGLRenderingContextBase = Object.getPrototypeOf(OriginalWebGLRenderingContext.prototype);- if (OriginalWebGLRenderingContextBase !== Object.prototype) {- addForwardingProperties(OriginalWebGLRenderingContextBase, WebGLRenderingContext.prototype);- }- var instanceProperties = /WebKit/.test(navigator.userAgent) ? {- drawingBufferHeight: null,- drawingBufferWidth: null- } : {};- registerWrapper(OriginalWebGLRenderingContext, WebGLRenderingContext, instanceProperties);- scope.wrappers.WebGLRenderingContext = WebGLRenderingContext;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var Node = scope.wrappers.Node;- var GetElementsByInterface = scope.GetElementsByInterface;- var NonElementParentNodeInterface = scope.NonElementParentNodeInterface;- var ParentNodeInterface = scope.ParentNodeInterface;- var SelectorsInterface = scope.SelectorsInterface;- var mixin = scope.mixin;- var registerObject = scope.registerObject;- var registerWrapper = scope.registerWrapper;- var OriginalDocumentFragment = window.DocumentFragment;- function DocumentFragment(node) {- Node.call(this, node);- }- DocumentFragment.prototype = Object.create(Node.prototype);- mixin(DocumentFragment.prototype, ParentNodeInterface);- mixin(DocumentFragment.prototype, SelectorsInterface);- mixin(DocumentFragment.prototype, GetElementsByInterface);- mixin(DocumentFragment.prototype, NonElementParentNodeInterface);- registerWrapper(OriginalDocumentFragment, DocumentFragment, document.createDocumentFragment());- scope.wrappers.DocumentFragment = DocumentFragment;- var Comment = registerObject(document.createComment(""));- scope.wrappers.Comment = Comment;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var DocumentFragment = scope.wrappers.DocumentFragment;- var TreeScope = scope.TreeScope;- var elementFromPoint = scope.elementFromPoint;- var getInnerHTML = scope.getInnerHTML;- var getTreeScope = scope.getTreeScope;- var mixin = scope.mixin;- var rewrap = scope.rewrap;- var setInnerHTML = scope.setInnerHTML;- var unsafeUnwrap = scope.unsafeUnwrap;- var unwrap = scope.unwrap;- var wrap = scope.wrap;- var shadowHostTable = new WeakMap();- var nextOlderShadowTreeTable = new WeakMap();- function ShadowRoot(hostWrapper) {- var node = unwrap(unsafeUnwrap(hostWrapper).ownerDocument.createDocumentFragment());- DocumentFragment.call(this, node);- rewrap(node, this);- var oldShadowRoot = hostWrapper.shadowRoot;- nextOlderShadowTreeTable.set(this, oldShadowRoot);- this.treeScope_ = new TreeScope(this, getTreeScope(oldShadowRoot || hostWrapper));- shadowHostTable.set(this, hostWrapper);- }- ShadowRoot.prototype = Object.create(DocumentFragment.prototype);- mixin(ShadowRoot.prototype, {- constructor: ShadowRoot,- get innerHTML() {- return getInnerHTML(this);- },- set innerHTML(value) {- setInnerHTML(this, value);- this.invalidateShadowRenderer();- },- get olderShadowRoot() {- return nextOlderShadowTreeTable.get(this) || null;- },- get host() {- return shadowHostTable.get(this) || null;- },- invalidateShadowRenderer: function() {- return shadowHostTable.get(this).invalidateShadowRenderer();- },- elementFromPoint: function(x, y) {- return elementFromPoint(this, this.ownerDocument, x, y);- },- getSelection: function() {- return document.getSelection();- },- get activeElement() {- var unwrappedActiveElement = unwrap(this).ownerDocument.activeElement;- if (!unwrappedActiveElement || !unwrappedActiveElement.nodeType) return null;- var activeElement = wrap(unwrappedActiveElement);- while (!this.contains(activeElement)) {- while (activeElement.parentNode) {- activeElement = activeElement.parentNode;- }- if (activeElement.host) {- activeElement = activeElement.host;- } else {- return null;- }- }- return activeElement;- }- });- scope.wrappers.ShadowRoot = ShadowRoot;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var registerWrapper = scope.registerWrapper;- var setWrapper = scope.setWrapper;- var unsafeUnwrap = scope.unsafeUnwrap;- var unwrap = scope.unwrap;- var unwrapIfNeeded = scope.unwrapIfNeeded;- var wrap = scope.wrap;- var getTreeScope = scope.getTreeScope;- var OriginalRange = window.Range;- var ShadowRoot = scope.wrappers.ShadowRoot;- function getHost(node) {- var root = getTreeScope(node).root;- if (root instanceof ShadowRoot) {- return root.host;- }- return null;- }- function hostNodeToShadowNode(refNode, offset) {- if (refNode.shadowRoot) {- offset = Math.min(refNode.childNodes.length - 1, offset);- var child = refNode.childNodes[offset];- if (child) {- var insertionPoint = scope.getDestinationInsertionPoints(child);- if (insertionPoint.length > 0) {- var parentNode = insertionPoint[0].parentNode;- if (parentNode.nodeType == Node.ELEMENT_NODE) {- refNode = parentNode;- }- }- }- }- return refNode;- }- function shadowNodeToHostNode(node) {- node = wrap(node);- return getHost(node) || node;- }- function Range(impl) {- setWrapper(impl, this);- }- Range.prototype = {- get startContainer() {- return shadowNodeToHostNode(unsafeUnwrap(this).startContainer);- },- get endContainer() {- return shadowNodeToHostNode(unsafeUnwrap(this).endContainer);- },- get commonAncestorContainer() {- return shadowNodeToHostNode(unsafeUnwrap(this).commonAncestorContainer);- },- setStart: function(refNode, offset) {- refNode = hostNodeToShadowNode(refNode, offset);- unsafeUnwrap(this).setStart(unwrapIfNeeded(refNode), offset);- },- setEnd: function(refNode, offset) {- refNode = hostNodeToShadowNode(refNode, offset);- unsafeUnwrap(this).setEnd(unwrapIfNeeded(refNode), offset);- },- setStartBefore: function(refNode) {- unsafeUnwrap(this).setStartBefore(unwrapIfNeeded(refNode));- },- setStartAfter: function(refNode) {- unsafeUnwrap(this).setStartAfter(unwrapIfNeeded(refNode));- },- setEndBefore: function(refNode) {- unsafeUnwrap(this).setEndBefore(unwrapIfNeeded(refNode));- },- setEndAfter: function(refNode) {- unsafeUnwrap(this).setEndAfter(unwrapIfNeeded(refNode));- },- selectNode: function(refNode) {- unsafeUnwrap(this).selectNode(unwrapIfNeeded(refNode));- },- selectNodeContents: function(refNode) {- unsafeUnwrap(this).selectNodeContents(unwrapIfNeeded(refNode));- },- compareBoundaryPoints: function(how, sourceRange) {- return unsafeUnwrap(this).compareBoundaryPoints(how, unwrap(sourceRange));- },- extractContents: function() {- return wrap(unsafeUnwrap(this).extractContents());- },- cloneContents: function() {- return wrap(unsafeUnwrap(this).cloneContents());- },- insertNode: function(node) {- unsafeUnwrap(this).insertNode(unwrapIfNeeded(node));- },- surroundContents: function(newParent) {- unsafeUnwrap(this).surroundContents(unwrapIfNeeded(newParent));- },- cloneRange: function() {- return wrap(unsafeUnwrap(this).cloneRange());- },- isPointInRange: function(node, offset) {- return unsafeUnwrap(this).isPointInRange(unwrapIfNeeded(node), offset);- },- comparePoint: function(node, offset) {- return unsafeUnwrap(this).comparePoint(unwrapIfNeeded(node), offset);- },- intersectsNode: function(node) {- return unsafeUnwrap(this).intersectsNode(unwrapIfNeeded(node));- },- toString: function() {- return unsafeUnwrap(this).toString();- }- };- if (OriginalRange.prototype.createContextualFragment) {- Range.prototype.createContextualFragment = function(html) {- return wrap(unsafeUnwrap(this).createContextualFragment(html));- };- }- registerWrapper(window.Range, Range, document.createRange());- scope.wrappers.Range = Range;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var Element = scope.wrappers.Element;- var HTMLContentElement = scope.wrappers.HTMLContentElement;- var HTMLShadowElement = scope.wrappers.HTMLShadowElement;- var Node = scope.wrappers.Node;- var ShadowRoot = scope.wrappers.ShadowRoot;- var assert = scope.assert;- var getTreeScope = scope.getTreeScope;- var mixin = scope.mixin;- var oneOf = scope.oneOf;- var unsafeUnwrap = scope.unsafeUnwrap;- var unwrap = scope.unwrap;- var wrap = scope.wrap;- var ArraySplice = scope.ArraySplice;- function updateWrapperUpAndSideways(wrapper) {- wrapper.previousSibling_ = wrapper.previousSibling;- wrapper.nextSibling_ = wrapper.nextSibling;- wrapper.parentNode_ = wrapper.parentNode;- }- function updateWrapperDown(wrapper) {- wrapper.firstChild_ = wrapper.firstChild;- wrapper.lastChild_ = wrapper.lastChild;- }- function updateAllChildNodes(parentNodeWrapper) {- assert(parentNodeWrapper instanceof Node);- for (var childWrapper = parentNodeWrapper.firstChild; childWrapper; childWrapper = childWrapper.nextSibling) {- updateWrapperUpAndSideways(childWrapper);- }- updateWrapperDown(parentNodeWrapper);- }- function insertBefore(parentNodeWrapper, newChildWrapper, refChildWrapper) {- var parentNode = unwrap(parentNodeWrapper);- var newChild = unwrap(newChildWrapper);- var refChild = refChildWrapper ? unwrap(refChildWrapper) : null;- remove(newChildWrapper);- updateWrapperUpAndSideways(newChildWrapper);- if (!refChildWrapper) {- parentNodeWrapper.lastChild_ = parentNodeWrapper.lastChild;- if (parentNodeWrapper.lastChild === parentNodeWrapper.firstChild) parentNodeWrapper.firstChild_ = parentNodeWrapper.firstChild;- var lastChildWrapper = wrap(parentNode.lastChild);- if (lastChildWrapper) lastChildWrapper.nextSibling_ = lastChildWrapper.nextSibling;- } else {- if (parentNodeWrapper.firstChild === refChildWrapper) parentNodeWrapper.firstChild_ = refChildWrapper;- refChildWrapper.previousSibling_ = refChildWrapper.previousSibling;- }- scope.originalInsertBefore.call(parentNode, newChild, refChild);- }- function remove(nodeWrapper) {- var node = unwrap(nodeWrapper);- var parentNode = node.parentNode;- if (!parentNode) return;- var parentNodeWrapper = wrap(parentNode);- updateWrapperUpAndSideways(nodeWrapper);- if (nodeWrapper.previousSibling) nodeWrapper.previousSibling.nextSibling_ = nodeWrapper;- if (nodeWrapper.nextSibling) nodeWrapper.nextSibling.previousSibling_ = nodeWrapper;- if (parentNodeWrapper.lastChild === nodeWrapper) parentNodeWrapper.lastChild_ = nodeWrapper;- if (parentNodeWrapper.firstChild === nodeWrapper) parentNodeWrapper.firstChild_ = nodeWrapper;- scope.originalRemoveChild.call(parentNode, node);- }- var distributedNodesTable = new WeakMap();- var destinationInsertionPointsTable = new WeakMap();- var rendererForHostTable = new WeakMap();- function resetDistributedNodes(insertionPoint) {- distributedNodesTable.set(insertionPoint, []);- }- function getDistributedNodes(insertionPoint) {- var rv = distributedNodesTable.get(insertionPoint);- if (!rv) distributedNodesTable.set(insertionPoint, rv = []);- return rv;- }- function getChildNodesSnapshot(node) {- var result = [], i = 0;- for (var child = node.firstChild; child; child = child.nextSibling) {- result[i++] = child;- }- return result;- }- var request = oneOf(window, [ "requestAnimationFrame", "mozRequestAnimationFrame", "webkitRequestAnimationFrame", "setTimeout" ]);- var pendingDirtyRenderers = [];- var renderTimer;- function renderAllPending() {- for (var i = 0; i < pendingDirtyRenderers.length; i++) {- var renderer = pendingDirtyRenderers[i];- var parentRenderer = renderer.parentRenderer;- if (parentRenderer && parentRenderer.dirty) continue;- renderer.render();- }- pendingDirtyRenderers = [];- }- function handleRequestAnimationFrame() {- renderTimer = null;- renderAllPending();- }- function getRendererForHost(host) {- var renderer = rendererForHostTable.get(host);- if (!renderer) {- renderer = new ShadowRenderer(host);- rendererForHostTable.set(host, renderer);- }- return renderer;- }- function getShadowRootAncestor(node) {- var root = getTreeScope(node).root;- if (root instanceof ShadowRoot) return root;- return null;- }- function getRendererForShadowRoot(shadowRoot) {- return getRendererForHost(shadowRoot.host);- }- var spliceDiff = new ArraySplice();- spliceDiff.equals = function(renderNode, rawNode) {- return unwrap(renderNode.node) === rawNode;- };- function RenderNode(node) {- this.skip = false;- this.node = node;- this.childNodes = [];- }- RenderNode.prototype = {- append: function(node) {- var rv = new RenderNode(node);- this.childNodes.push(rv);- return rv;- },- sync: function(opt_added) {- if (this.skip) return;- var nodeWrapper = this.node;- var newChildren = this.childNodes;- var oldChildren = getChildNodesSnapshot(unwrap(nodeWrapper));- var added = opt_added || new WeakMap();- var splices = spliceDiff.calculateSplices(newChildren, oldChildren);- var newIndex = 0, oldIndex = 0;- var lastIndex = 0;- for (var i = 0; i < splices.length; i++) {- var splice = splices[i];- for (;lastIndex < splice.index; lastIndex++) {- oldIndex++;- newChildren[newIndex++].sync(added);- }- var removedCount = splice.removed.length;- for (var j = 0; j < removedCount; j++) {- var wrapper = wrap(oldChildren[oldIndex++]);- if (!added.get(wrapper)) remove(wrapper);- }- var addedCount = splice.addedCount;- var refNode = oldChildren[oldIndex] && wrap(oldChildren[oldIndex]);- for (var j = 0; j < addedCount; j++) {- var newChildRenderNode = newChildren[newIndex++];- var newChildWrapper = newChildRenderNode.node;- insertBefore(nodeWrapper, newChildWrapper, refNode);- added.set(newChildWrapper, true);- newChildRenderNode.sync(added);- }- lastIndex += addedCount;- }- for (var i = lastIndex; i < newChildren.length; i++) {- newChildren[i].sync(added);- }- }- };- function ShadowRenderer(host) {- this.host = host;- this.dirty = false;- this.invalidateAttributes();- this.associateNode(host);- }- ShadowRenderer.prototype = {- render: function(opt_renderNode) {- if (!this.dirty) return;- this.invalidateAttributes();- var host = this.host;- this.distribution(host);- var renderNode = opt_renderNode || new RenderNode(host);- this.buildRenderTree(renderNode, host);- var topMostRenderer = !opt_renderNode;- if (topMostRenderer) renderNode.sync();- this.dirty = false;- },- get parentRenderer() {- return getTreeScope(this.host).renderer;- },- invalidate: function() {- if (!this.dirty) {- this.dirty = true;- var parentRenderer = this.parentRenderer;- if (parentRenderer) parentRenderer.invalidate();- pendingDirtyRenderers.push(this);- if (renderTimer) return;- renderTimer = window[request](handleRequestAnimationFrame, 0);- }- },- distribution: function(root) {- this.resetAllSubtrees(root);- this.distributionResolution(root);- },- resetAll: function(node) {- if (isInsertionPoint(node)) resetDistributedNodes(node); else resetDestinationInsertionPoints(node);- this.resetAllSubtrees(node);- },- resetAllSubtrees: function(node) {- for (var child = node.firstChild; child; child = child.nextSibling) {- this.resetAll(child);- }- if (node.shadowRoot) this.resetAll(node.shadowRoot);- if (node.olderShadowRoot) this.resetAll(node.olderShadowRoot);- },- distributionResolution: function(node) {- if (isShadowHost(node)) {- var shadowHost = node;- var pool = poolPopulation(shadowHost);- var shadowTrees = getShadowTrees(shadowHost);- for (var i = 0; i < shadowTrees.length; i++) {- this.poolDistribution(shadowTrees[i], pool);- }- for (var i = shadowTrees.length - 1; i >= 0; i--) {- var shadowTree = shadowTrees[i];- var shadow = getShadowInsertionPoint(shadowTree);- if (shadow) {- var olderShadowRoot = shadowTree.olderShadowRoot;- if (olderShadowRoot) {- pool = poolPopulation(olderShadowRoot);- }- for (var j = 0; j < pool.length; j++) {- destributeNodeInto(pool[j], shadow);- }- }- this.distributionResolution(shadowTree);- }- }- for (var child = node.firstChild; child; child = child.nextSibling) {- this.distributionResolution(child);- }- },- poolDistribution: function(node, pool) {- if (node instanceof HTMLShadowElement) return;- if (node instanceof HTMLContentElement) {- var content = node;- this.updateDependentAttributes(content.getAttribute("select"));- var anyDistributed = false;- for (var i = 0; i < pool.length; i++) {- var node = pool[i];- if (!node) continue;- if (matches(node, content)) {- destributeNodeInto(node, content);- pool[i] = undefined;- anyDistributed = true;- }- }- if (!anyDistributed) {- for (var child = content.firstChild; child; child = child.nextSibling) {- destributeNodeInto(child, content);- }- }- return;- }- for (var child = node.firstChild; child; child = child.nextSibling) {- this.poolDistribution(child, pool);- }- },- buildRenderTree: function(renderNode, node) {- var children = this.compose(node);- for (var i = 0; i < children.length; i++) {- var child = children[i];- var childRenderNode = renderNode.append(child);- this.buildRenderTree(childRenderNode, child);- }- if (isShadowHost(node)) {- var renderer = getRendererForHost(node);- renderer.dirty = false;- }- },- compose: function(node) {- var children = [];- var p = node.shadowRoot || node;- for (var child = p.firstChild; child; child = child.nextSibling) {- if (isInsertionPoint(child)) {- this.associateNode(p);- var distributedNodes = getDistributedNodes(child);- for (var j = 0; j < distributedNodes.length; j++) {- var distributedNode = distributedNodes[j];- if (isFinalDestination(child, distributedNode)) children.push(distributedNode);- }- } else {- children.push(child);- }- }- return children;- },- invalidateAttributes: function() {- this.attributes = Object.create(null);- },- updateDependentAttributes: function(selector) {- if (!selector) return;- var attributes = this.attributes;- if (/\.\w+/.test(selector)) attributes["class"] = true;- if (/#\w+/.test(selector)) attributes["id"] = true;- selector.replace(/\[\s*([^\s=\|~\]]+)/g, function(_, name) {- attributes[name] = true;- });- },- dependsOnAttribute: function(name) {- return this.attributes[name];- },- associateNode: function(node) {- unsafeUnwrap(node).polymerShadowRenderer_ = this;- }- };- function poolPopulation(node) {- var pool = [];- for (var child = node.firstChild; child; child = child.nextSibling) {- if (isInsertionPoint(child)) {- pool.push.apply(pool, getDistributedNodes(child));- } else {- pool.push(child);- }- }- return pool;- }- function getShadowInsertionPoint(node) {- if (node instanceof HTMLShadowElement) return node;- if (node instanceof HTMLContentElement) return null;- for (var child = node.firstChild; child; child = child.nextSibling) {- var res = getShadowInsertionPoint(child);- if (res) return res;- }- return null;- }- function destributeNodeInto(child, insertionPoint) {- getDistributedNodes(insertionPoint).push(child);- var points = destinationInsertionPointsTable.get(child);- if (!points) destinationInsertionPointsTable.set(child, [ insertionPoint ]); else points.push(insertionPoint);- }- function getDestinationInsertionPoints(node) {- return destinationInsertionPointsTable.get(node);- }- function resetDestinationInsertionPoints(node) {- destinationInsertionPointsTable.set(node, undefined);- }- var selectorStartCharRe = /^(:not\()?[*.#[a-zA-Z_|]/;- function matches(node, contentElement) {- var select = contentElement.getAttribute("select");- if (!select) return true;- select = select.trim();- if (!select) return true;- if (!(node instanceof Element)) return false;- if (!selectorStartCharRe.test(select)) return false;- try {- return node.matches(select);- } catch (ex) {- return false;- }- }- function isFinalDestination(insertionPoint, node) {- var points = getDestinationInsertionPoints(node);- return points && points[points.length - 1] === insertionPoint;- }- function isInsertionPoint(node) {- return node instanceof HTMLContentElement || node instanceof HTMLShadowElement;- }- function isShadowHost(shadowHost) {- return shadowHost.shadowRoot;- }- function getShadowTrees(host) {- var trees = [];- for (var tree = host.shadowRoot; tree; tree = tree.olderShadowRoot) {- trees.push(tree);- }- return trees;- }- function render(host) {- new ShadowRenderer(host).render();- }- Node.prototype.invalidateShadowRenderer = function(force) {- var renderer = unsafeUnwrap(this).polymerShadowRenderer_;- if (renderer) {- renderer.invalidate();- return true;- }- return false;- };- HTMLContentElement.prototype.getDistributedNodes = HTMLShadowElement.prototype.getDistributedNodes = function() {- renderAllPending();- return getDistributedNodes(this);- };- Element.prototype.getDestinationInsertionPoints = function() {- renderAllPending();- return getDestinationInsertionPoints(this) || [];- };- HTMLContentElement.prototype.nodeIsInserted_ = HTMLShadowElement.prototype.nodeIsInserted_ = function() {- this.invalidateShadowRenderer();- var shadowRoot = getShadowRootAncestor(this);- var renderer;- if (shadowRoot) renderer = getRendererForShadowRoot(shadowRoot);- unsafeUnwrap(this).polymerShadowRenderer_ = renderer;- if (renderer) renderer.invalidate();- };- scope.getRendererForHost = getRendererForHost;- scope.getShadowTrees = getShadowTrees;- scope.renderAllPending = renderAllPending;- scope.getDestinationInsertionPoints = getDestinationInsertionPoints;- scope.visual = {- insertBefore: insertBefore,- remove: remove- };-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var HTMLElement = scope.wrappers.HTMLElement;- var assert = scope.assert;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var unwrap = scope.unwrap;- var wrap = scope.wrap;- var elementsWithFormProperty = [ "HTMLButtonElement", "HTMLFieldSetElement", "HTMLInputElement", "HTMLKeygenElement", "HTMLLabelElement", "HTMLLegendElement", "HTMLObjectElement", "HTMLOutputElement", "HTMLTextAreaElement" ];- function createWrapperConstructor(name) {- if (!window[name]) return;- assert(!scope.wrappers[name]);- var GeneratedWrapper = function(node) {- HTMLElement.call(this, node);- };- GeneratedWrapper.prototype = Object.create(HTMLElement.prototype);- mixin(GeneratedWrapper.prototype, {- get form() {- return wrap(unwrap(this).form);- }- });- registerWrapper(window[name], GeneratedWrapper, document.createElement(name.slice(4, -7)));- scope.wrappers[name] = GeneratedWrapper;- }- elementsWithFormProperty.forEach(createWrapperConstructor);-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var registerWrapper = scope.registerWrapper;- var setWrapper = scope.setWrapper;- var unsafeUnwrap = scope.unsafeUnwrap;- var unwrap = scope.unwrap;- var unwrapIfNeeded = scope.unwrapIfNeeded;- var wrap = scope.wrap;- var OriginalSelection = window.Selection;- function Selection(impl) {- setWrapper(impl, this);- }- Selection.prototype = {- get anchorNode() {- return wrap(unsafeUnwrap(this).anchorNode);- },- get focusNode() {- return wrap(unsafeUnwrap(this).focusNode);- },- addRange: function(range) {- unsafeUnwrap(this).addRange(unwrapIfNeeded(range));- },- collapse: function(node, index) {- unsafeUnwrap(this).collapse(unwrapIfNeeded(node), index);- },- containsNode: function(node, allowPartial) {- return unsafeUnwrap(this).containsNode(unwrapIfNeeded(node), allowPartial);- },- getRangeAt: function(index) {- return wrap(unsafeUnwrap(this).getRangeAt(index));- },- removeRange: function(range) {- unsafeUnwrap(this).removeRange(unwrap(range));- },- selectAllChildren: function(node) {- unsafeUnwrap(this).selectAllChildren(node instanceof ShadowRoot ? unsafeUnwrap(node.host) : unwrapIfNeeded(node));- },- toString: function() {- return unsafeUnwrap(this).toString();- }- };- if (OriginalSelection.prototype.extend) {- Selection.prototype.extend = function(node, offset) {- unsafeUnwrap(this).extend(unwrapIfNeeded(node), offset);- };- }- registerWrapper(window.Selection, Selection, window.getSelection());- scope.wrappers.Selection = Selection;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var registerWrapper = scope.registerWrapper;- var setWrapper = scope.setWrapper;- var unsafeUnwrap = scope.unsafeUnwrap;- var unwrapIfNeeded = scope.unwrapIfNeeded;- var wrap = scope.wrap;- var OriginalTreeWalker = window.TreeWalker;- function TreeWalker(impl) {- setWrapper(impl, this);- }- TreeWalker.prototype = {- get root() {- return wrap(unsafeUnwrap(this).root);- },- get currentNode() {- return wrap(unsafeUnwrap(this).currentNode);- },- set currentNode(node) {- unsafeUnwrap(this).currentNode = unwrapIfNeeded(node);- },- get filter() {- return unsafeUnwrap(this).filter;- },- parentNode: function() {- return wrap(unsafeUnwrap(this).parentNode());- },- firstChild: function() {- return wrap(unsafeUnwrap(this).firstChild());- },- lastChild: function() {- return wrap(unsafeUnwrap(this).lastChild());- },- previousSibling: function() {- return wrap(unsafeUnwrap(this).previousSibling());- },- previousNode: function() {- return wrap(unsafeUnwrap(this).previousNode());- },- nextNode: function() {- return wrap(unsafeUnwrap(this).nextNode());- }- };- registerWrapper(OriginalTreeWalker, TreeWalker);- scope.wrappers.TreeWalker = TreeWalker;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var GetElementsByInterface = scope.GetElementsByInterface;- var Node = scope.wrappers.Node;- var ParentNodeInterface = scope.ParentNodeInterface;- var NonElementParentNodeInterface = scope.NonElementParentNodeInterface;- var Selection = scope.wrappers.Selection;- var SelectorsInterface = scope.SelectorsInterface;- var ShadowRoot = scope.wrappers.ShadowRoot;- var TreeScope = scope.TreeScope;- var cloneNode = scope.cloneNode;- var defineGetter = scope.defineGetter;- var defineWrapGetter = scope.defineWrapGetter;- var elementFromPoint = scope.elementFromPoint;- var forwardMethodsToWrapper = scope.forwardMethodsToWrapper;- var matchesNames = scope.matchesNames;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var renderAllPending = scope.renderAllPending;- var rewrap = scope.rewrap;- var setWrapper = scope.setWrapper;- var unsafeUnwrap = scope.unsafeUnwrap;- var unwrap = scope.unwrap;- var wrap = scope.wrap;- var wrapEventTargetMethods = scope.wrapEventTargetMethods;- var wrapNodeList = scope.wrapNodeList;- var implementationTable = new WeakMap();- function Document(node) {- Node.call(this, node);- this.treeScope_ = new TreeScope(this, null);- }- Document.prototype = Object.create(Node.prototype);- defineWrapGetter(Document, "documentElement");- defineWrapGetter(Document, "body");- defineWrapGetter(Document, "head");- defineGetter(Document, "activeElement", function() {- var unwrappedActiveElement = unwrap(this).activeElement;- if (!unwrappedActiveElement || !unwrappedActiveElement.nodeType) return null;- var activeElement = wrap(unwrappedActiveElement);- while (!this.contains(activeElement)) {- while (activeElement.parentNode) {- activeElement = activeElement.parentNode;- }- if (activeElement.host) {- activeElement = activeElement.host;- } else {- return null;- }- }- return activeElement;- });- function wrapMethod(name) {- var original = document[name];- Document.prototype[name] = function() {- return wrap(original.apply(unsafeUnwrap(this), arguments));- };- }- [ "createComment", "createDocumentFragment", "createElement", "createElementNS", "createEvent", "createEventNS", "createRange", "createTextNode" ].forEach(wrapMethod);- var originalAdoptNode = document.adoptNode;- function adoptNodeNoRemove(node, doc) {- originalAdoptNode.call(unsafeUnwrap(doc), unwrap(node));- adoptSubtree(node, doc);- }- function adoptSubtree(node, doc) {- if (node.shadowRoot) doc.adoptNode(node.shadowRoot);- if (node instanceof ShadowRoot) adoptOlderShadowRoots(node, doc);- for (var child = node.firstChild; child; child = child.nextSibling) {- adoptSubtree(child, doc);- }- }- function adoptOlderShadowRoots(shadowRoot, doc) {- var oldShadowRoot = shadowRoot.olderShadowRoot;- if (oldShadowRoot) doc.adoptNode(oldShadowRoot);- }- var originalGetSelection = document.getSelection;- mixin(Document.prototype, {- adoptNode: function(node) {- if (node.parentNode) node.parentNode.removeChild(node);- adoptNodeNoRemove(node, this);- return node;- },- elementFromPoint: function(x, y) {- return elementFromPoint(this, this, x, y);- },- importNode: function(node, deep) {- return cloneNode(node, deep, unsafeUnwrap(this));- },- getSelection: function() {- renderAllPending();- return new Selection(originalGetSelection.call(unwrap(this)));- },- getElementsByName: function(name) {- return SelectorsInterface.querySelectorAll.call(this, "[name=" + JSON.stringify(String(name)) + "]");- }- });- var originalCreateTreeWalker = document.createTreeWalker;- var TreeWalkerWrapper = scope.wrappers.TreeWalker;- Document.prototype.createTreeWalker = function(root, whatToShow, filter, expandEntityReferences) {- var newFilter = null;- if (filter) {- if (filter.acceptNode && typeof filter.acceptNode === "function") {- newFilter = {- acceptNode: function(node) {- return filter.acceptNode(wrap(node));- }- };- } else if (typeof filter === "function") {- newFilter = function(node) {- return filter(wrap(node));- };- }- }- return new TreeWalkerWrapper(originalCreateTreeWalker.call(unwrap(this), unwrap(root), whatToShow, newFilter, expandEntityReferences));- };- if (document.registerElement) {- var originalRegisterElement = document.registerElement;- Document.prototype.registerElement = function(tagName, object) {- var prototype, extendsOption;- if (object !== undefined) {- prototype = object.prototype;- extendsOption = object.extends;- }- if (!prototype) prototype = Object.create(HTMLElement.prototype);- if (scope.nativePrototypeTable.get(prototype)) {- throw new Error("NotSupportedError");- }- var proto = Object.getPrototypeOf(prototype);- var nativePrototype;- var prototypes = [];- while (proto) {- nativePrototype = scope.nativePrototypeTable.get(proto);- if (nativePrototype) break;- prototypes.push(proto);- proto = Object.getPrototypeOf(proto);- }- if (!nativePrototype) {- throw new Error("NotSupportedError");- }- var newPrototype = Object.create(nativePrototype);- for (var i = prototypes.length - 1; i >= 0; i--) {- newPrototype = Object.create(newPrototype);- }- [ "createdCallback", "attachedCallback", "detachedCallback", "attributeChangedCallback" ].forEach(function(name) {- var f = prototype[name];- if (!f) return;- newPrototype[name] = function() {- if (!(wrap(this) instanceof CustomElementConstructor)) {- rewrap(this);- }- f.apply(wrap(this), arguments);- };- });- var p = {- prototype: newPrototype- };- if (extendsOption) p.extends = extendsOption;- function CustomElementConstructor(node) {- if (!node) {- if (extendsOption) {- return document.createElement(extendsOption, tagName);- } else {- return document.createElement(tagName);- }- }- setWrapper(node, this);- }- CustomElementConstructor.prototype = prototype;- CustomElementConstructor.prototype.constructor = CustomElementConstructor;- scope.constructorTable.set(newPrototype, CustomElementConstructor);- scope.nativePrototypeTable.set(prototype, newPrototype);- var nativeConstructor = originalRegisterElement.call(unwrap(this), tagName, p);- return CustomElementConstructor;- };- forwardMethodsToWrapper([ window.HTMLDocument || window.Document ], [ "registerElement" ]);- }- forwardMethodsToWrapper([ window.HTMLBodyElement, window.HTMLDocument || window.Document, window.HTMLHeadElement, window.HTMLHtmlElement ], [ "appendChild", "compareDocumentPosition", "contains", "getElementsByClassName", "getElementsByTagName", "getElementsByTagNameNS", "insertBefore", "querySelector", "querySelectorAll", "removeChild", "replaceChild" ]);- forwardMethodsToWrapper([ window.HTMLBodyElement, window.HTMLHeadElement, window.HTMLHtmlElement ], matchesNames);- forwardMethodsToWrapper([ window.HTMLDocument || window.Document ], [ "adoptNode", "importNode", "contains", "createComment", "createDocumentFragment", "createElement", "createElementNS", "createEvent", "createEventNS", "createRange", "createTextNode", "createTreeWalker", "elementFromPoint", "getElementById", "getElementsByName", "getSelection" ]);- mixin(Document.prototype, GetElementsByInterface);- mixin(Document.prototype, ParentNodeInterface);- mixin(Document.prototype, SelectorsInterface);- mixin(Document.prototype, NonElementParentNodeInterface);- mixin(Document.prototype, {- get implementation() {- var implementation = implementationTable.get(this);- if (implementation) return implementation;- implementation = new DOMImplementation(unwrap(this).implementation);- implementationTable.set(this, implementation);- return implementation;- },- get defaultView() {- return wrap(unwrap(this).defaultView);- }- });- registerWrapper(window.Document, Document, document.implementation.createHTMLDocument(""));- if (window.HTMLDocument) registerWrapper(window.HTMLDocument, Document);- wrapEventTargetMethods([ window.HTMLBodyElement, window.HTMLDocument || window.Document, window.HTMLHeadElement ]);- function DOMImplementation(impl) {- setWrapper(impl, this);- }- var originalCreateDocument = document.implementation.createDocument;- DOMImplementation.prototype.createDocument = function() {- arguments[2] = unwrap(arguments[2]);- return wrap(originalCreateDocument.apply(unsafeUnwrap(this), arguments));- };- function wrapImplMethod(constructor, name) {- var original = document.implementation[name];- constructor.prototype[name] = function() {- return wrap(original.apply(unsafeUnwrap(this), arguments));- };- }- function forwardImplMethod(constructor, name) {- var original = document.implementation[name];- constructor.prototype[name] = function() {- return original.apply(unsafeUnwrap(this), arguments);- };- }- wrapImplMethod(DOMImplementation, "createDocumentType");- wrapImplMethod(DOMImplementation, "createHTMLDocument");- forwardImplMethod(DOMImplementation, "hasFeature");- registerWrapper(window.DOMImplementation, DOMImplementation);- forwardMethodsToWrapper([ window.DOMImplementation ], [ "createDocument", "createDocumentType", "createHTMLDocument", "hasFeature" ]);- scope.adoptNodeNoRemove = adoptNodeNoRemove;- scope.wrappers.DOMImplementation = DOMImplementation;- scope.wrappers.Document = Document;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var EventTarget = scope.wrappers.EventTarget;- var Selection = scope.wrappers.Selection;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var renderAllPending = scope.renderAllPending;- var unwrap = scope.unwrap;- var unwrapIfNeeded = scope.unwrapIfNeeded;- var wrap = scope.wrap;- var OriginalWindow = window.Window;- var originalGetComputedStyle = window.getComputedStyle;- var originalGetDefaultComputedStyle = window.getDefaultComputedStyle;- var originalGetSelection = window.getSelection;- function Window(impl) {- EventTarget.call(this, impl);- }- Window.prototype = Object.create(EventTarget.prototype);- OriginalWindow.prototype.getComputedStyle = function(el, pseudo) {- return wrap(this || window).getComputedStyle(unwrapIfNeeded(el), pseudo);- };- if (originalGetDefaultComputedStyle) {- OriginalWindow.prototype.getDefaultComputedStyle = function(el, pseudo) {- return wrap(this || window).getDefaultComputedStyle(unwrapIfNeeded(el), pseudo);- };- }- OriginalWindow.prototype.getSelection = function() {- return wrap(this || window).getSelection();- };- delete window.getComputedStyle;- delete window.getDefaultComputedStyle;- delete window.getSelection;- [ "addEventListener", "removeEventListener", "dispatchEvent" ].forEach(function(name) {- OriginalWindow.prototype[name] = function() {- var w = wrap(this || window);- return w[name].apply(w, arguments);- };- delete window[name];- });- mixin(Window.prototype, {- getComputedStyle: function(el, pseudo) {- renderAllPending();- return originalGetComputedStyle.call(unwrap(this), unwrapIfNeeded(el), pseudo);- },- getSelection: function() {- renderAllPending();- return new Selection(originalGetSelection.call(unwrap(this)));- },- get document() {- return wrap(unwrap(this).document);- }- });- if (originalGetDefaultComputedStyle) {- Window.prototype.getDefaultComputedStyle = function(el, pseudo) {- renderAllPending();- return originalGetDefaultComputedStyle.call(unwrap(this), unwrapIfNeeded(el), pseudo);- };- }- registerWrapper(OriginalWindow, Window, window);- scope.wrappers.Window = Window;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var unwrap = scope.unwrap;- var OriginalDataTransfer = window.DataTransfer || window.Clipboard;- var OriginalDataTransferSetDragImage = OriginalDataTransfer.prototype.setDragImage;- if (OriginalDataTransferSetDragImage) {- OriginalDataTransfer.prototype.setDragImage = function(image, x, y) {- OriginalDataTransferSetDragImage.call(this, unwrap(image), x, y);- };- }-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var registerWrapper = scope.registerWrapper;- var setWrapper = scope.setWrapper;- var unwrap = scope.unwrap;- var OriginalFormData = window.FormData;- if (!OriginalFormData) return;- function FormData(formElement) {- var impl;- if (formElement instanceof OriginalFormData) {- impl = formElement;- } else {- impl = new OriginalFormData(formElement && unwrap(formElement));- }- setWrapper(impl, this);- }- registerWrapper(OriginalFormData, FormData, new OriginalFormData());- scope.wrappers.FormData = FormData;-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var unwrapIfNeeded = scope.unwrapIfNeeded;- var originalSend = XMLHttpRequest.prototype.send;- XMLHttpRequest.prototype.send = function(obj) {- return originalSend.call(this, unwrapIfNeeded(obj));- };-})(window.ShadowDOMPolyfill);--(function(scope) {- "use strict";- var isWrapperFor = scope.isWrapperFor;- var elements = {- a: "HTMLAnchorElement",- area: "HTMLAreaElement",- audio: "HTMLAudioElement",- base: "HTMLBaseElement",- body: "HTMLBodyElement",- br: "HTMLBRElement",- button: "HTMLButtonElement",- canvas: "HTMLCanvasElement",- caption: "HTMLTableCaptionElement",- col: "HTMLTableColElement",- content: "HTMLContentElement",- data: "HTMLDataElement",- datalist: "HTMLDataListElement",- del: "HTMLModElement",- dir: "HTMLDirectoryElement",- div: "HTMLDivElement",- dl: "HTMLDListElement",- embed: "HTMLEmbedElement",- fieldset: "HTMLFieldSetElement",- font: "HTMLFontElement",- form: "HTMLFormElement",- frame: "HTMLFrameElement",- frameset: "HTMLFrameSetElement",- h1: "HTMLHeadingElement",- head: "HTMLHeadElement",- hr: "HTMLHRElement",- html: "HTMLHtmlElement",- iframe: "HTMLIFrameElement",- img: "HTMLImageElement",- input: "HTMLInputElement",- keygen: "HTMLKeygenElement",- label: "HTMLLabelElement",- legend: "HTMLLegendElement",- li: "HTMLLIElement",- link: "HTMLLinkElement",- map: "HTMLMapElement",- marquee: "HTMLMarqueeElement",- menu: "HTMLMenuElement",- menuitem: "HTMLMenuItemElement",- meta: "HTMLMetaElement",- meter: "HTMLMeterElement",- object: "HTMLObjectElement",- ol: "HTMLOListElement",- optgroup: "HTMLOptGroupElement",- option: "HTMLOptionElement",- output: "HTMLOutputElement",- p: "HTMLParagraphElement",- param: "HTMLParamElement",- pre: "HTMLPreElement",- progress: "HTMLProgressElement",- q: "HTMLQuoteElement",- script: "HTMLScriptElement",- select: "HTMLSelectElement",- shadow: "HTMLShadowElement",- source: "HTMLSourceElement",- span: "HTMLSpanElement",- style: "HTMLStyleElement",- table: "HTMLTableElement",- tbody: "HTMLTableSectionElement",- template: "HTMLTemplateElement",- textarea: "HTMLTextAreaElement",- thead: "HTMLTableSectionElement",- time: "HTMLTimeElement",- title: "HTMLTitleElement",- tr: "HTMLTableRowElement",- track: "HTMLTrackElement",- ul: "HTMLUListElement",- video: "HTMLVideoElement"- };- function overrideConstructor(tagName) {- var nativeConstructorName = elements[tagName];- var nativeConstructor = window[nativeConstructorName];- if (!nativeConstructor) return;- var element = document.createElement(tagName);- var wrapperConstructor = element.constructor;- window[nativeConstructorName] = wrapperConstructor;- }- Object.keys(elements).forEach(overrideConstructor);- Object.getOwnPropertyNames(scope.wrappers).forEach(function(name) {- window[name] = scope.wrappers[name];- });-})(window.ShadowDOMPolyfill);\ No newline at end of filediff --git a/manager/client/src/main/webapp/bower_components/webcomponentsjs/ShadowDOM.min.js b/manager/client/src/main/webapp/bower_components/webcomponentsjs/ShadowDOM.min.jsdeleted file mode 100644index fdbb8645a..000000000--- a/manager/client/src/main/webapp/bower_components/webcomponentsjs/ShadowDOM.min.js+++ /dev/null@@ -1,13 +0,0 @@-/**- * @license- * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.- * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt- * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt- * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt- * Code distributed by Google as part of the polymer project is also- * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt- */-// @version 0.7.24-"undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,n=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};n.prototype={set:function(t,n){var r=t[this.name];return r&&r[0]===t?r[1]=n:e(t,this.name,{value:[t,n],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return!(!t||t[0]!==e)&&(t[0]=t[1]=void 0,!0)},has:function(e){var t=e[this.name];return!!t&&t[0]===e}},window.WeakMap=n}(),window.ShadowDOMPolyfill={},function(e){"use strict";function t(){if("undefined"!=typeof chrome&&chrome.app&&chrome.app.runtime)return!1;if(navigator.getDeviceStorage)return!1;try{var e=new Function("return true;");return e()}catch(t){return!1}}function n(e){if(!e)throw new Error("Assertion failed")}function r(e,t){for(var n=k(t),r=0;r<n.length;r++){var o=n[r];A(e,o,F(t,o))}return e}function o(e,t){for(var n=k(t),r=0;r<n.length;r++){var o=n[r];switch(o){case"arguments":case"caller":case"length":case"name":case"prototype":case"toString":continue}A(e,o,F(t,o))}return e}function i(e,t){for(var n=0;n<t.length;n++)if(t[n]in e)return t[n]}function a(e,t,n){B.value=n,A(e,t,B)}function s(e,t){var n=e.__proto__||Object.getPrototypeOf(e);if(U)try{k(n)}catch(r){n=n.__proto__}var o=R.get(n);if(o)return o;var i=s(n),a=E(i);return g(n,a,t),a}function c(e,t){m(e,t,!0)}function u(e,t){m(t,e,!1)}function l(e){return/^on[a-z]+$/.test(e)}function p(e){return/^[a-zA-Z_$][a-zA-Z_$0-9]*$/.test(e)}function d(e){return I&&p(e)?new Function("return this.__impl4cf1e782hg__."+e):function(){return this.__impl4cf1e782hg__[e]}}function f(e){return I&&p(e)?new Function("v","this.__impl4cf1e782hg__."+e+" = v"):function(t){this.__impl4cf1e782hg__[e]=t}}function h(e){return I&&p(e)?new Function("return this.__impl4cf1e782hg__."+e+".apply(this.__impl4cf1e782hg__, arguments)"):function(){return this.__impl4cf1e782hg__[e].apply(this.__impl4cf1e782hg__,arguments)}}function w(e,t){try{return e===window&&"showModalDialog"===t?q:Object.getOwnPropertyDescriptor(e,t)}catch(n){return q}}function m(t,n,r,o){for(var i=k(t),a=0;a<i.length;a++){var s=i[a];if("polymerBlackList_"!==s&&!(s in n||t.polymerBlackList_&&t.polymerBlackList_[s])){U&&t.__lookupGetter__(s);var c,u,p=w(t,s);if("function"!=typeof p.value){var m=l(s);c=m?e.getEventHandlerGetter(s):d(s),(p.writable||p.set||V)&&(u=m?e.getEventHandlerSetter(s):f(s));var v=V||p.configurable;A(n,s,{get:c,set:u,configurable:v,enumerable:p.enumerable})}else r&&(n[s]=h(s))}}}function v(e,t,n){if(null!=e){var r=e.prototype;g(r,t,n),o(t,e)}}function g(e,t,r){var o=t.prototype;n(void 0===R.get(e)),R.set(e,t),P.set(o,e),c(e,o),r&&u(o,r),a(o,"constructor",t),t.prototype=o}function b(e,t){return R.get(t.prototype)===e}function y(e){var t=Object.getPrototypeOf(e),n=s(t),r=E(n);return g(t,r,e),r}function E(e){function t(t){e.call(this,t)}var n=Object.create(e.prototype);return n.constructor=t,t.prototype=n,t}function S(e){return e&&e.__impl4cf1e782hg__}function M(e){return!S(e)}function T(e){if(null===e)return null;n(M(e));var t=e.__wrapper8e3dd93a60__;return null!=t?t:e.__wrapper8e3dd93a60__=new(s(e,e))(e)}function O(e){return null===e?null:(n(S(e)),e.__impl4cf1e782hg__)}function N(e){return e.__impl4cf1e782hg__}function j(e,t){t.__impl4cf1e782hg__=e,e.__wrapper8e3dd93a60__=t}function L(e){return e&&S(e)?O(e):e}function _(e){return e&&!S(e)?T(e):e}function D(e,t){null!==t&&(n(M(e)),n(void 0===t||S(t)),e.__wrapper8e3dd93a60__=t)}function C(e,t,n){G.get=n,A(e.prototype,t,G)}function H(e,t){C(e,t,function(){return T(this.__impl4cf1e782hg__[t])})}function x(e,t){e.forEach(function(e){t.forEach(function(t){e.prototype[t]=function(){var e=_(this);return e[t].apply(e,arguments)}})})}var R=new WeakMap,P=new WeakMap,W=Object.create(null),I=t(),A=Object.defineProperty,k=Object.getOwnPropertyNames,F=Object.getOwnPropertyDescriptor,B={value:void 0,configurable:!0,enumerable:!1,writable:!0};k(window);var U=/Firefox/.test(navigator.userAgent),q={get:function(){},set:function(e){},configurable:!0,enumerable:!0},V=function(){var e=Object.getOwnPropertyDescriptor(Node.prototype,"nodeType");return e&&!e.get&&!e.set}(),G={get:void 0,configurable:!0,enumerable:!0};e.addForwardingProperties=c,e.assert=n,e.constructorTable=R,e.defineGetter=C,e.defineWrapGetter=H,e.forwardMethodsToWrapper=x,e.isIdentifierName=p,e.isWrapper=S,e.isWrapperFor=b,e.mixin=r,e.nativePrototypeTable=P,e.oneOf=i,e.registerObject=y,e.registerWrapper=v,e.rewrap=D,e.setWrapper=j,e.unsafeUnwrap=N,e.unwrap=O,e.unwrapIfNeeded=L,e.wrap=T,e.wrapIfNeeded=_,e.wrappers=W}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t,n){return{index:e,removed:t,addedCount:n}}function n(){}var r=0,o=1,i=2,a=3;n.prototype={calcEditDistances:function(e,t,n,r,o,i){for(var a=i-o+1,s=n-t+1,c=new Array(a),u=0;u<a;u++)c[u]=new Array(s),c[u][0]=u;for(var l=0;l<s;l++)c[0][l]=l;for(var u=1;u<a;u++)for(var l=1;l<s;l++)if(this.equals(e[t+l-1],r[o+u-1]))c[u][l]=c[u-1][l-1];else{var p=c[u-1][l]+1,d=c[u][l-1]+1;c[u][l]=p<d?p:d}return c},spliceOperationsFromEditDistances:function(e){for(var t=e.length-1,n=e[0].length-1,s=e[t][n],c=[];t>0||n>0;)if(0!=t)if(0!=n){var u,l=e[t-1][n-1],p=e[t-1][n],d=e[t][n-1];u=p<d?p<l?p:l:d<l?d:l,u==l?(l==s?c.push(r):(c.push(o),s=l),t--,n--):u==p?(c.push(a),t--,s=p):(c.push(i),n--,s=d)}else c.push(a),t--;else c.push(i),n--;return c.reverse(),c},calcSplices:function(e,n,s,c,u,l){var p=0,d=0,f=Math.min(s-n,l-u);if(0==n&&0==u&&(p=this.sharedPrefix(e,c,f)),s==e.length&&l==c.length&&(d=this.sharedSuffix(e,c,f-p)),n+=p,u+=p,s-=d,l-=d,s-n==0&&l-u==0)return[];if(n==s){for(var h=t(n,[],0);u<l;)h.removed.push(c[u++]);return[h]}if(u==l)return[t(n,[],s-n)];for(var w=this.spliceOperationsFromEditDistances(this.calcEditDistances(e,n,s,c,u,l)),h=void 0,m=[],v=n,g=u,b=0;b<w.length;b++)switch(w[b]){case r:h&&(m.push(h),h=void 0),v++,g++;break;case o:h||(h=t(v,[],0)),h.addedCount++,v++,h.removed.push(c[g]),g++;break;case i:h||(h=t(v,[],0)),h.addedCount++,v++;break;case a:h||(h=t(v,[],0)),h.removed.push(c[g]),g++}return h&&m.push(h),m},sharedPrefix:function(e,t,n){for(var r=0;r<n;r++)if(!this.equals(e[r],t[r]))return r;return n},sharedSuffix:function(e,t,n){for(var r=e.length,o=t.length,i=0;i<n&&this.equals(e[--r],t[--o]);)i++;return i},calculateSplices:function(e,t){return this.calcSplices(e,0,e.length,t,0,t.length)},equals:function(e,t){return e===t}},e.ArraySplice=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(){a=!1;var e=i.slice(0);i=[];for(var t=0;t<e.length;t++)(0,e[t])()}function n(e){i.push(e),a||(a=!0,r(t,0))}var r,o=window.MutationObserver,i=[],a=!1;if(o){var s=1,c=new o(t),u=document.createTextNode(s);c.observe(u,{characterData:!0}),r=function(){s=(s+1)%2,u.data=s}}else r=window.setTimeout;e.setEndOfMicrotask=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){e.scheduled_||(e.scheduled_=!0,h.push(e),w||(l(n),w=!0))}function n(){for(w=!1;h.length;){var e=h;h=[],e.sort(function(e,t){return e.uid_-t.uid_});for(var t=0;t<e.length;t++){var n=e[t];n.scheduled_=!1;var r=n.takeRecords();i(n),r.length&&n.callback_(r,n)}}}function r(e,t){this.type=e,this.target=t,this.addedNodes=new d.NodeList,this.removedNodes=new d.NodeList,this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function o(e,t){for(;e;e=e.parentNode){var n=f.get(e);if(n)for(var r=0;r<n.length;r++){var o=n[r];o.options.subtree&&o.addTransientObserver(t)}}}function i(e){for(var t=0;t<e.nodes_.length;t++){var n=e.nodes_[t],r=f.get(n);if(!r)return;for(var o=0;o<r.length;o++){var i=r[o];i.observer===e&&i.removeTransientObservers()}}}function a(e,n,o){for(var i=Object.create(null),a=Object.create(null),s=e;s;s=s.parentNode){var c=f.get(s);if(c)for(var u=0;u<c.length;u++){var l=c[u],p=l.options;if((s===e||p.subtree)&&("attributes"!==n||p.attributes)&&("attributes"!==n||!p.attributeFilter||null===o.namespace&&p.attributeFilter.indexOf(o.name)!==-1)&&("characterData"!==n||p.characterData)&&("childList"!==n||p.childList)){var d=l.observer;i[d.uid_]=d,("attributes"===n&&p.attributeOldValue||"characterData"===n&&p.characterDataOldValue)&&(a[d.uid_]=o.oldValue)}}}for(var h in i){var d=i[h],w=new r(n,e);"name"in o&&"namespace"in o&&(w.attributeName=o.name,w.attributeNamespace=o.namespace),o.addedNodes&&(w.addedNodes=o.addedNodes),o.removedNodes&&(w.removedNodes=o.removedNodes),o.previousSibling&&(w.previousSibling=o.previousSibling),o.nextSibling&&(w.nextSibling=o.nextSibling),void 0!==a[h]&&(w.oldValue=a[h]),t(d),d.records_.push(w)}}function s(e){if(this.childList=!!e.childList,this.subtree=!!e.subtree,"attributes"in e||!("attributeOldValue"in e||"attributeFilter"in e)?this.attributes=!!e.attributes:this.attributes=!0,"characterDataOldValue"in e&&!("characterData"in e)?this.characterData=!0:this.characterData=!!e.characterData,!this.attributes&&(e.attributeOldValue||"attributeFilter"in e)||!this.characterData&&e.characterDataOldValue)throw new TypeError;if(this.characterData=!!e.characterData,this.attributeOldValue=!!e.attributeOldValue,this.characterDataOldValue=!!e.characterDataOldValue,"attributeFilter"in e){if(null==e.attributeFilter||"object"!=typeof e.attributeFilter)throw new TypeError;this.attributeFilter=m.call(e.attributeFilter)}else this.attributeFilter=null}function c(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++v,this.scheduled_=!1}function u(e,t,n){this.observer=e,this.target=t,this.options=n,this.transientObservedNodes=[]}var l=e.setEndOfMicrotask,p=e.wrapIfNeeded,d=e.wrappers,f=new WeakMap,h=[],w=!1,m=Array.prototype.slice,v=0;c.prototype={constructor:c,observe:function(e,t){e=p(e);var n,r=new s(t),o=f.get(e);o||f.set(e,o=[]);for(var i=0;i<o.length;i++)o[i].observer===this&&(n=o[i],n.removeTransientObservers(),n.options=r);n||(n=new u(this,e,r),o.push(n),this.nodes_.push(e))},disconnect:function(){this.nodes_.forEach(function(e){for(var t=f.get(e),n=0;n<t.length;n++){var r=t[n];if(r.observer===this){t.splice(n,1);break}}},this),this.records_=[]},takeRecords:function(){var e=this.records_;return this.records_=[],e}},u.prototype={addTransientObserver:function(e){if(e!==this.target){t(this.observer),this.transientObservedNodes.push(e);var n=f.get(e);n||f.set(e,n=[]),n.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[];for(var t=0;t<e.length;t++)for(var n=e[t],r=f.get(n),o=0;o<r.length;o++)if(r[o]===this){r.splice(o,1);break}}},e.enqueueMutation=a,e.registerTransientObservers=o,e.wrappers.MutationObserver=c,e.wrappers.MutationRecord=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t){this.root=e,this.parent=t}function n(e,t){if(e.treeScope_!==t){e.treeScope_=t;for(var r=e.shadowRoot;r;r=r.olderShadowRoot)r.treeScope_.parent=t;for(var o=e.firstChild;o;o=o.nextSibling)n(o,t)}}function r(n){if(n instanceof e.wrappers.Window,n.treeScope_)return n.treeScope_;var o,i=n.parentNode;return o=i?r(i):new t(n,null),n.treeScope_=o}t.prototype={get renderer(){return this.root instanceof e.wrappers.ShadowRoot?e.getRendererForHost(this.root.host):null},contains:function(e){for(;e;e=e.parent)if(e===this)return!0;return!1}},e.TreeScope=t,e.getTreeScope=r,e.setTreeScope=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return e instanceof G.ShadowRoot}function n(e){return A(e).root}function r(e,r){var s=[],c=e;for(s.push(c);c;){var u=a(c);if(u&&u.length>0){for(var l=0;l<u.length;l++){var d=u[l];if(i(d)){var f=n(d),h=f.olderShadowRoot;h&&s.push(h)}s.push(d)}c=u[u.length-1]}else if(t(c)){if(p(e,c)&&o(r))break;c=c.host,s.push(c)}else c=c.parentNode,c&&s.push(c)}return s}function o(e){if(!e)return!1;switch(e.type){case"abort":case"error":case"select":case"change":case"load":case"reset":case"resize":case"scroll":case"selectstart":return!0}return!1}function i(e){return e instanceof HTMLShadowElement}function a(t){return e.getDestinationInsertionPoints(t)}function s(e,t){if(0===e.length)return t;t instanceof G.Window&&(t=t.document);for(var n=A(t),r=e[0],o=A(r),i=u(n,o),a=0;a<e.length;a++){var s=e[a];if(A(s)===i)return s}return e[e.length-1]}function c(e){for(var t=[];e;e=e.parent)t.push(e);return t}function u(e,t){for(var n=c(e),r=c(t),o=null;n.length>0&&r.length>0;){var i=n.pop(),a=r.pop();if(i!==a)break;o=i}return o}function l(e,t,n){t instanceof G.Window&&(t=t.document);var o,i=A(t),a=A(n),s=r(n,e),o=u(i,a);o||(o=a.root);for(var c=o;c;c=c.parent)for(var l=0;l<s.length;l++){var p=s[l];if(A(p)===c)return p}return null}function p(e,t){return A(e)===A(t)}function d(e){if(!X.get(e)&&(X.set(e,!0),h(V(e),V(e.target)),W)){var t=W;throw W=null,t}}function f(e){switch(e.type){case"load":case"beforeunload":case"unload":return!0}return!1}function h(t,n){if(K.get(t))throw new Error("InvalidStateError");K.set(t,!0),e.renderAllPending();var o,i,a;if(f(t)&&!t.bubbles){var s=n;s instanceof G.Document&&(a=s.defaultView)&&(i=s,o=[])}if(!o)if(n instanceof G.Window)a=n,o=[];else if(o=r(n,t),!f(t)){var s=o[o.length-1];s instanceof G.Document&&(a=s.defaultView)}return ne.set(t,o),w(t,o,a,i)&&m(t,o,a,i)&&v(t,o,a,i),J.set(t,re),$["delete"](t,null),K["delete"](t),t.defaultPrevented}function w(e,t,n,r){var o=oe;if(n&&!g(n,e,o,t,r))return!1;for(var i=t.length-1;i>0;i--)if(!g(t[i],e,o,t,r))return!1;return!0}function m(e,t,n,r){var o=ie,i=t[0]||n;return g(i,e,o,t,r)}function v(e,t,n,r){for(var o=ae,i=1;i<t.length;i++)if(!g(t[i],e,o,t,r))return;n&&t.length>0&&g(n,e,o,t,r)}function g(e,t,n,r,o){var i=z.get(e);if(!i)return!0;var a=o||s(r,e);if(a===e){if(n===oe)return!0;n===ae&&(n=ie)}else if(n===ae&&!t.bubbles)return!0;if("relatedTarget"in t){var c=q(t),u=c.relatedTarget;if(u){if(u instanceof Object&&u.addEventListener){var p=V(u),d=l(t,e,p);if(d===a)return!0}else d=null;Z.set(t,d)}}J.set(t,n);var f=t.type,h=!1;Y.set(t,a),$.set(t,e),i.depth++;for(var w=0,m=i.length;w<m;w++){var v=i[w];if(v.removed)h=!0;else if(!(v.type!==f||!v.capture&&n===oe||v.capture&&n===ae))try{if("function"==typeof v.handler?v.handler.call(e,t):v.handler.handleEvent(t),ee.get(t))return!1}catch(g){W||(W=g)}}if(i.depth--,h&&0===i.depth){var b=i.slice();i.length=0;for(var w=0;w<b.length;w++)b[w].removed||i.push(b[w])}return!Q.get(t)}function b(e,t,n){this.type=e,this.handler=t,this.capture=Boolean(n)}function y(e,t){if(!(e instanceof se))return V(T(se,"Event",e,t));var n=e;return be||"beforeunload"!==n.type||this instanceof O?void B(n,this):new O(n)}function E(e){return e&&e.relatedTarget?Object.create(e,{relatedTarget:{value:q(e.relatedTarget)}}):e}function S(e,t,n){var r=window[e],o=function(t,n){return t instanceof r?void B(t,this):V(T(r,e,t,n))};if(o.prototype=Object.create(t.prototype),n&&k(o.prototype,n),r)try{F(r,o,new r("temp"))}catch(i){F(r,o,document.createEvent(e))}return o}function M(e,t){return function(){arguments[t]=q(arguments[t]);var n=q(this);n[e].apply(n,arguments)}}function T(e,t,n,r){if(ve)return new e(n,E(r));var o=q(document.createEvent(t)),i=me[t],a=[n];return Object.keys(i).forEach(function(e){var t=null!=r&&e in r?r[e]:i[e];"relatedTarget"===e&&(t=q(t)),a.push(t)}),o["init"+t].apply(o,a),o}function O(e){y.call(this,e)}function N(e){return"function"==typeof e||e&&e.handleEvent}function j(e){switch(e){case"DOMAttrModified":case"DOMAttributeNameChanged":case"DOMCharacterDataModified":case"DOMElementNameChanged":case"DOMNodeInserted":case"DOMNodeInsertedIntoDocument":case"DOMNodeRemoved":case"DOMNodeRemovedFromDocument":case"DOMSubtreeModified":return!0}return!1}function L(e){B(e,this)}function _(e){return e instanceof G.ShadowRoot&&(e=e.host),q(e)}function D(e,t){var n=z.get(e);if(n)for(var r=0;r<n.length;r++)if(!n[r].removed&&n[r].type===t)return!0;return!1}function C(e,t){for(var n=q(e);n;n=n.parentNode)if(D(V(n),t))return!0;return!1}function H(e){I(e,Ee)}function x(t,n,o,i){e.renderAllPending();var a=V(Se.call(U(n),o,i));if(!a)return null;var c=r(a,null),u=c.lastIndexOf(t);return u==-1?null:(c=c.slice(0,u),s(c,t))}function R(e){return function(){var t=te.get(this);return t&&t[e]&&t[e].value||null}}function P(e){var t=e.slice(2);return function(n){var r=te.get(this);r||(r=Object.create(null),te.set(this,r));var o=r[e];if(o&&this.removeEventListener(t,o.wrapped,!1),"function"==typeof n){var i=function(t){var r=n.call(this,t);r===!1?t.preventDefault():"onbeforeunload"===e&&"string"==typeof r&&(t.returnValue=r)};this.addEventListener(t,i,!1),r[e]={value:n,wrapped:i}}}}var W,I=e.forwardMethodsToWrapper,A=e.getTreeScope,k=e.mixin,F=e.registerWrapper,B=e.setWrapper,U=e.unsafeUnwrap,q=e.unwrap,V=e.wrap,G=e.wrappers,z=(new WeakMap,new WeakMap),X=new WeakMap,K=new WeakMap,Y=new WeakMap,$=new WeakMap,Z=new WeakMap,J=new WeakMap,Q=new WeakMap,ee=new WeakMap,te=new WeakMap,ne=new WeakMap,re=0,oe=1,ie=2,ae=3;b.prototype={equals:function(e){return this.handler===e.handler&&this.type===e.type&&this.capture===e.capture},get removed(){return null===this.handler},remove:function(){this.handler=null}};var se=window.Event;se.prototype.polymerBlackList_={returnValue:!0,keyLocation:!0},y.prototype={get target(){return Y.get(this)},get currentTarget(){return $.get(this)},get eventPhase(){return J.get(this)},get path(){var e=ne.get(this);return e?e.slice():[]},stopPropagation:function(){Q.set(this,!0)},stopImmediatePropagation:function(){Q.set(this,!0),ee.set(this,!0)}};var ce=function(){var e=document.createEvent("Event");return e.initEvent("test",!0,!0),e.preventDefault(),e.defaultPrevented}();ce||(y.prototype.preventDefault=function(){this.cancelable&&(U(this).preventDefault(),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}),F(se,y,document.createEvent("Event"));var ue=S("UIEvent",y),le=S("CustomEvent",y),pe={get relatedTarget(){var e=Z.get(this);return void 0!==e?e:V(q(this).relatedTarget)}},de=k({initMouseEvent:M("initMouseEvent",14)},pe),fe=k({initFocusEvent:M("initFocusEvent",5)},pe),he=S("MouseEvent",ue,de),we=S("FocusEvent",ue,fe),me=Object.create(null),ve=function(){try{new window.FocusEvent("focus")}catch(e){return!1}return!0}();if(!ve){var ge=function(e,t,n){if(n){var r=me[n];t=k(k({},r),t)}me[e]=t};ge("Event",{bubbles:!1,cancelable:!1}),ge("CustomEvent",{detail:null},"Event"),ge("UIEvent",{view:null,detail:0},"Event"),ge("MouseEvent",{screenX:0,screenY:0,clientX:0,clientY:0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null},"UIEvent"),ge("FocusEvent",{relatedTarget:null},"UIEvent")}var be=window.BeforeUnloadEvent;O.prototype=Object.create(y.prototype),k(O.prototype,{get returnValue(){return U(this).returnValue},set returnValue(e){U(this).returnValue=e}}),be&&F(be,O);var ye=window.EventTarget,Ee=["addEventListener","removeEventListener","dispatchEvent"];[Node,Window].forEach(function(e){var t=e.prototype;Ee.forEach(function(e){Object.defineProperty(t,e+"_",{value:t[e]})})}),L.prototype={addEventListener:function(e,t,n){if(N(t)&&!j(e)){var r=new b(e,t,n),o=z.get(this);if(o){for(var i=0;i<o.length;i++)if(r.equals(o[i]))return}else o=[],o.depth=0,z.set(this,o);o.push(r);var a=_(this);a.addEventListener_(e,d,!0)}},removeEventListener:function(e,t,n){n=Boolean(n);var r=z.get(this);if(r){for(var o=0,i=!1,a=0;a<r.length;a++)r[a].type===e&&r[a].capture===n&&(o++,r[a].handler===t&&(i=!0,r[a].remove()));if(i&&1===o){var s=_(this);s.removeEventListener_(e,d,!0)}}},dispatchEvent:function(t){var n=q(t),r=n.type;X.set(n,!1),e.renderAllPending();var o;C(this,r)||(o=function(){},this.addEventListener(r,o,!0));try{return q(this).dispatchEvent_(n)}finally{o&&this.removeEventListener(r,o,!0)}}},ye&&F(ye,L);var Se=document.elementFromPoint;e.elementFromPoint=x,e.getEventHandlerGetter=R,e.getEventHandlerSetter=P,e.wrapEventTargetMethods=H,e.wrappers.BeforeUnloadEvent=O,e.wrappers.CustomEvent=le,e.wrappers.Event=y,e.wrappers.EventTarget=L,e.wrappers.FocusEvent=we,e.wrappers.MouseEvent=he,e.wrappers.UIEvent=ue}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t){Object.defineProperty(e,t,w)}function n(e){u(e,this)}function r(){this.length=0,t(this,"length")}function o(e){for(var t=new r,o=0;o<e.length;o++)t[o]=new n(e[o]);return t.length=o,t}function i(e){a.call(this,e)}var a=e.wrappers.UIEvent,s=e.mixin,c=e.registerWrapper,u=e.setWrapper,l=e.unsafeUnwrap,p=e.wrap,d=window.TouchEvent;if(d){var f;try{f=document.createEvent("TouchEvent")}catch(h){return}var w={enumerable:!1};n.prototype={get target(){return p(l(this).target)}};var m={configurable:!0,enumerable:!0,get:null};["clientX","clientY","screenX","screenY","pageX","pageY","identifier","webkitRadiusX","webkitRadiusY","webkitRotationAngle","webkitForce"].forEach(function(e){m.get=function(){return l(this)[e]},Object.defineProperty(n.prototype,e,m)}),r.prototype={item:function(e){return this[e]}},i.prototype=Object.create(a.prototype),s(i.prototype,{get touches(){return o(l(this).touches)},get targetTouches(){return o(l(this).targetTouches)},get changedTouches(){return o(l(this).changedTouches)},initTouchEvent:function(){throw new Error("Not implemented")}}),c(d,i,f),e.wrappers.Touch=n,e.wrappers.TouchEvent=i,e.wrappers.TouchList=r}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t){Object.defineProperty(e,t,s)}function n(){this.length=0,t(this,"length")}function r(e){if(null==e)return e;for(var t=new n,r=0,o=e.length;r<o;r++)t[r]=a(e[r]);return t.length=o,t}function o(e,t){e.prototype[t]=function(){return r(i(this)[t].apply(i(this),arguments))}}var i=e.unsafeUnwrap,a=e.wrap,s={enumerable:!1};n.prototype={item:function(e){return this[e]}},t(n.prototype,"item"),e.wrappers.NodeList=n,e.addWrapNodeListMethod=o,e.wrapNodeList=r}(window.ShadowDOMPolyfill),function(e){"use strict";e.wrapHTMLCollection=e.wrapNodeList,e.wrappers.HTMLCollection=e.wrappers.NodeList}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){N(e instanceof S)}function n(e){var t=new T;return t[0]=e,t.length=1,t}function r(e,t,n){L(t,"childList",{removedNodes:n,previousSibling:e.previousSibling,nextSibling:e.nextSibling})}function o(e,t){L(e,"childList",{removedNodes:t})}function i(e,t,r,o){if(e instanceof DocumentFragment){var i=s(e);B=!0;for(var a=i.length-1;a>=0;a--)e.removeChild(i[a]),i[a].parentNode_=t;B=!1;for(var a=0;a<i.length;a++)i[a].previousSibling_=i[a-1]||r,i[a].nextSibling_=i[a+1]||o;return r&&(r.nextSibling_=i[0]),o&&(o.previousSibling_=i[i.length-1]),i}var i=n(e),c=e.parentNode;return c&&c.removeChild(e),e.parentNode_=t,e.previousSibling_=r,e.nextSibling_=o,r&&(r.nextSibling_=e),o&&(o.previousSibling_=e),i}function a(e){if(e instanceof DocumentFragment)return s(e);var t=n(e),o=e.parentNode;return o&&r(e,o,t),t}function s(e){for(var t=new T,n=0,r=e.firstChild;r;r=r.nextSibling)t[n++]=r;return t.length=n,o(e,t),t}function c(e){return e}function u(e,t){R(e,t),e.nodeIsInserted_()}function l(e,t){for(var n=_(t),r=0;r<e.length;r++)u(e[r],n)}function p(e){R(e,new O(e,null))}function d(e){for(var t=0;t<e.length;t++)p(e[t])}function f(e,t){var n=e.nodeType===S.DOCUMENT_NODE?e:e.ownerDocument;n!==t.ownerDocument&&n.adoptNode(t)}function h(t,n){if(n.length){var r=t.ownerDocument;if(r!==n[0].ownerDocument)for(var o=0;o<n.length;o++)e.adoptNodeNoRemove(n[o],r)}}function w(e,t){h(e,t);var n=t.length;if(1===n)return W(t[0]);for(var r=W(e.ownerDocument.createDocumentFragment()),o=0;o<n;o++)r.appendChild(W(t[o]));return r}function m(e){if(void 0!==e.firstChild_)for(var t=e.firstChild_;t;){var n=t;t=t.nextSibling_,n.parentNode_=n.previousSibling_=n.nextSibling_=void 0}e.firstChild_=e.lastChild_=void 0}function v(e){if(e.invalidateShadowRenderer()){for(var t=e.firstChild;t;){N(t.parentNode===e);var n=t.nextSibling,r=W(t),o=r.parentNode;o&&Y.call(o,r),t.previousSibling_=t.nextSibling_=t.parentNode_=null,t=n}e.firstChild_=e.lastChild_=null}else for(var n,i=W(e),a=i.firstChild;a;)n=a.nextSibling,Y.call(i,a),a=n}function g(e){var t=e.parentNode;return t&&t.invalidateShadowRenderer()}function b(e){for(var t,n=0;n<e.length;n++)t=e[n],t.parentNode.removeChild(t)}function y(e,t,n){var r;if(r=A(n?U.call(n,P(e),!1):q.call(P(e),!1)),t){for(var o=e.firstChild;o;o=o.nextSibling)r.appendChild(y(o,!0,n));if(e instanceof F.HTMLTemplateElement)for(var i=r.content,o=e.content.firstChild;o;o=o.nextSibling)i.appendChild(y(o,!0,n))}return r}function E(e,t){if(!t||_(e)!==_(t))return!1;for(var n=t;n;n=n.parentNode)if(n===e)return!0;return!1}function S(e){N(e instanceof V),M.call(this,e),this.parentNode_=void 0,this.firstChild_=void 0,this.lastChild_=void 0,this.nextSibling_=void 0,this.previousSibling_=void 0,this.treeScope_=void 0}var M=e.wrappers.EventTarget,T=e.wrappers.NodeList,O=e.TreeScope,N=e.assert,j=e.defineWrapGetter,L=e.enqueueMutation,_=e.getTreeScope,D=e.isWrapper,C=e.mixin,H=e.registerTransientObservers,x=e.registerWrapper,R=e.setTreeScope,P=e.unsafeUnwrap,W=e.unwrap,I=e.unwrapIfNeeded,A=e.wrap,k=e.wrapIfNeeded,F=e.wrappers,B=!1,U=document.importNode,q=window.Node.prototype.cloneNode,V=window.Node,G=window.DocumentFragment,z=(V.prototype.appendChild,V.prototype.compareDocumentPosition),X=V.prototype.isEqualNode,K=V.prototype.insertBefore,Y=V.prototype.removeChild,$=V.prototype.replaceChild,Z=/Trident|Edge/.test(navigator.userAgent),J=Z?function(e,t){try{Y.call(e,t)}catch(n){if(!(e instanceof G))throw n}}:function(e,t){Y.call(e,t)};S.prototype=Object.create(M.prototype),C(S.prototype,{appendChild:function(e){return this.insertBefore(e,null)},insertBefore:function(e,n){t(e);var r;n?D(n)?r=W(n):(r=n,n=A(r)):(n=null,r=null),n&&N(n.parentNode===this);var o,s=n?n.previousSibling:this.lastChild,c=!this.invalidateShadowRenderer()&&!g(e);if(o=c?a(e):i(e,this,s,n),c)f(this,e),m(this),K.call(P(this),W(e),r);else{s||(this.firstChild_=o[0]),n||(this.lastChild_=o[o.length-1],void 0===this.firstChild_&&(this.firstChild_=this.firstChild));var u=r?r.parentNode:P(this);u?K.call(u,w(this,o),r):h(this,o)}return L(this,"childList",{addedNodes:o,nextSibling:n,previousSibling:s}),l(o,this),e},removeChild:function(e){if(t(e),e.parentNode!==this){for(var r=!1,o=(this.childNodes,this.firstChild);o;o=o.nextSibling)if(o===e){r=!0;break}if(!r)throw new Error("NotFoundError")}var i=W(e),a=e.nextSibling,s=e.previousSibling;if(this.invalidateShadowRenderer()){var c=this.firstChild,u=this.lastChild,l=i.parentNode;l&&J(l,i),c===e&&(this.firstChild_=a),u===e&&(this.lastChild_=s),s&&(s.nextSibling_=a),a&&(a.previousSibling_=s),e.previousSibling_=e.nextSibling_=e.parentNode_=void 0}else m(this),J(P(this),i);return B||L(this,"childList",{removedNodes:n(e),nextSibling:a,previousSibling:s}),H(this,e),e},replaceChild:function(e,r){t(e);var o;if(D(r)?o=W(r):(o=r,r=A(o)),r.parentNode!==this)throw new Error("NotFoundError");var s,c=r.nextSibling,u=r.previousSibling,d=!this.invalidateShadowRenderer()&&!g(e);return d?s=a(e):(c===e&&(c=e.nextSibling),s=i(e,this,u,c)),d?(f(this,e),m(this),$.call(P(this),W(e),o)):(this.firstChild===r&&(this.firstChild_=s[0]),this.lastChild===r&&(this.lastChild_=s[s.length-1]),r.previousSibling_=r.nextSibling_=r.parentNode_=void 0,o.parentNode&&$.call(o.parentNode,w(this,s),o)),L(this,"childList",{addedNodes:s,removedNodes:n(r),nextSibling:c,previousSibling:u}),p(r),l(s,this),r},nodeIsInserted_:function(){for(var e=this.firstChild;e;e=e.nextSibling)e.nodeIsInserted_()},hasChildNodes:function(){return null!==this.firstChild},get parentNode(){return void 0!==this.parentNode_?this.parentNode_:A(P(this).parentNode)},get firstChild(){return void 0!==this.firstChild_?this.firstChild_:A(P(this).firstChild)},get lastChild(){return void 0!==this.lastChild_?this.lastChild_:A(P(this).lastChild)},get nextSibling(){return void 0!==this.nextSibling_?this.nextSibling_:A(P(this).nextSibling)},get previousSibling(){return void 0!==this.previousSibling_?this.previousSibling_:A(P(this).previousSibling)},get parentElement(){for(var e=this.parentNode;e&&e.nodeType!==S.ELEMENT_NODE;)e=e.parentNode;return e},get textContent(){for(var e="",t=this.firstChild;t;t=t.nextSibling)t.nodeType!=S.COMMENT_NODE&&(e+=t.textContent);return e},set textContent(e){null==e&&(e="");var t=c(this.childNodes);if(this.invalidateShadowRenderer()){if(v(this),""!==e){var n=P(this).ownerDocument.createTextNode(e);this.appendChild(n)}}else m(this),P(this).textContent=e;var r=c(this.childNodes);L(this,"childList",{addedNodes:r,removedNodes:t}),d(t),l(r,this)},get childNodes(){for(var e=new T,t=0,n=this.firstChild;n;n=n.nextSibling)e[t++]=n;return e.length=t,e},cloneNode:function(e){return y(this,e)},contains:function(e){return E(this,k(e))},compareDocumentPosition:function(e){return z.call(P(this),I(e))},isEqualNode:function(e){return X.call(P(this),I(e))},normalize:function(){for(var e,t,n=c(this.childNodes),r=[],o="",i=0;i<n.length;i++)t=n[i],t.nodeType===S.TEXT_NODE?e||t.data.length?e?(o+=t.data,r.push(t)):e=t:this.removeChild(t):(e&&r.length&&(e.data+=o,b(r)),r=[],o="",e=null,t.childNodes.length&&t.normalize());e&&r.length&&(e.data+=o,b(r))}}),j(S,"ownerDocument"),x(V,S,document.createDocumentFragment()),delete S.prototype.querySelector,delete S.prototype.querySelectorAll,S.prototype=C(Object.create(M.prototype),S.prototype),e.cloneNode=y,e.nodeWasAdded=u,e.nodeWasRemoved=p,e.nodesWereAdded=l,e.nodesWereRemoved=d,e.originalInsertBefore=K,e.originalRemoveChild=Y,e.snapshotNodeList=c,e.wrappers.Node=S}(window.ShadowDOMPolyfill),function(e){"use strict";function t(t,n,r,o){for(var i=null,a=null,s=0,c=t.length;s<c;s++)i=b(t[s]),!o&&(a=v(i).root)&&a instanceof e.wrappers.ShadowRoot||(r[n++]=i);return n}function n(e){return String(e).replace(/\/deep\/|::shadow|>>>/g," ")}function r(e){return String(e).replace(/:host\(([^\s]+)\)/g,"$1").replace(/([^\s]):host/g,"$1").replace(":host","*").replace(/\^|\/shadow\/|\/shadow-deep\/|::shadow|\/deep\/|::content|>>>/g," ")}function o(e,t){for(var n,r=e.firstElementChild;r;){if(r.matches(t))return r;if(n=o(r,t))return n;r=r.nextElementSibling}return null}function i(e,t){return e.matches(t)}function a(e,t,n){var r=e.localName;return r===t||r===n&&e.namespaceURI===D}function s(){return!0}function c(e,t,n){return e.localName===n}function u(e,t){return e.namespaceURI===t}function l(e,t,n){return e.namespaceURI===t&&e.localName===n}function p(e,t,n,r,o,i){for(var a=e.firstElementChild;a;)r(a,o,i)&&(n[t++]=a),t=p(a,t,n,r,o,i),a=a.nextElementSibling;return t}function d(n,r,o,i,a){var s,c=g(this),u=v(this).root;if(u instanceof e.wrappers.ShadowRoot)return p(this,r,o,n,i,null);if(c instanceof L)s=M.call(c,i);else{if(!(c instanceof _))return p(this,r,o,n,i,null);s=S.call(c,i)}return t(s,r,o,a)}function f(n,r,o,i,a){var s,c=g(this),u=v(this).root;if(u instanceof e.wrappers.ShadowRoot)return p(this,r,o,n,i,a);if(c instanceof L)s=O.call(c,i,a);else{if(!(c instanceof _))return p(this,r,o,n,i,a);s=T.call(c,i,a)}return t(s,r,o,!1)}function h(n,r,o,i,a){var s,c=g(this),u=v(this).root;if(u instanceof e.wrappers.ShadowRoot)return p(this,r,o,n,i,a);if(c instanceof L)s=j.call(c,i,a);else{if(!(c instanceof _))return p(this,r,o,n,i,a);s=N.call(c,i,a)}return t(s,r,o,!1)}var w=e.wrappers.HTMLCollection,m=e.wrappers.NodeList,v=e.getTreeScope,g=e.unsafeUnwrap,b=e.wrap,y=document.querySelector,E=document.documentElement.querySelector,S=document.querySelectorAll,M=document.documentElement.querySelectorAll,T=document.getElementsByTagName,O=document.documentElement.getElementsByTagName,N=document.getElementsByTagNameNS,j=document.documentElement.getElementsByTagNameNS,L=window.Element,_=window.HTMLDocument||window.Document,D="http://www.w3.org/1999/xhtml",C={querySelector:function(t){var r=n(t),i=r!==t;t=r;var a,s=g(this),c=v(this).root;if(c instanceof e.wrappers.ShadowRoot)return o(this,t);if(s instanceof L)a=b(E.call(s,t));else{if(!(s instanceof _))return o(this,t);a=b(y.call(s,t))}return a&&!i&&(c=v(a).root)&&c instanceof e.wrappers.ShadowRoot?o(this,t):a},querySelectorAll:function(e){var t=n(e),r=t!==e;e=t;var o=new m;return o.length=d.call(this,i,0,o,e,r),o}},H={matches:function(t){return t=r(t),e.originalMatches.call(g(this),t)}},x={getElementsByTagName:function(e){var t=new w,n="*"===e?s:a;return t.length=f.call(this,n,0,t,e,e.toLowerCase()),-t},getElementsByClassName:function(e){return this.querySelectorAll("."+e)},getElementsByTagNameNS:function(e,t){var n=new w,r=null;return r="*"===e?"*"===t?s:c:"*"===t?u:l,n.length=h.call(this,r,0,n,e||null,t),n}};e.GetElementsByInterface=x,e.SelectorsInterface=C,e.MatchesInterface=H}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){for(;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.nextSibling;return e}function n(e){for(;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.previousSibling;return e}var r=e.wrappers.NodeList,o={get firstElementChild(){return t(this.firstChild)},get lastElementChild(){return n(this.lastChild)},get childElementCount(){for(var e=0,t=this.firstElementChild;t;t=t.nextElementSibling)e++;return e},get children(){for(var e=new r,t=0,n=this.firstElementChild;n;n=n.nextElementSibling)e[t++]=n;return e.length=t,e},remove:function(){var e=this.parentNode;e&&e.removeChild(this)}},i={get nextElementSibling(){return t(this.nextSibling)},get previousElementSibling(){return n(this.previousSibling)}},a={getElementById:function(e){return/[ \t\n\r\f]/.test(e)?null:this.querySelector('[id="'+e+'"]')}};e.ChildNodeInterface=i,e.NonElementParentNodeInterface=a,e.ParentNodeInterface=o}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call(this,e)}var n=e.ChildNodeInterface,r=e.wrappers.Node,o=e.enqueueMutation,i=e.mixin,a=e.registerWrapper,s=e.unsafeUnwrap,c=window.CharacterData;t.prototype=Object.create(r.prototype),i(t.prototype,{get nodeValue(){return this.data},set nodeValue(e){this.data=e},get textContent(){return this.data},set textContent(e){this.data=e},get data(){return s(this).data},set data(e){var t=s(this).data;o(this,"characterData",{oldValue:t}),s(this).data=e}}),i(t.prototype,n),a(c,t,document.createTextNode("")),e.wrappers.CharacterData=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return e>>>0}function n(e){r.call(this,e)}var r=e.wrappers.CharacterData,o=(e.enqueueMutation,e.mixin),i=e.registerWrapper,a=window.Text;n.prototype=Object.create(r.prototype),o(n.prototype,{splitText:function(e){e=t(e);var n=this.data;if(e>n.length)throw new Error("IndexSizeError");var r=n.slice(0,e),o=n.slice(e);this.data=r;var i=this.ownerDocument.createTextNode(o);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}}),i(a,n,document.createTextNode("")),e.wrappers.Text=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return i(e).getAttribute("class")}function n(e,t){a(e,"attributes",{name:"class",namespace:null,oldValue:t})}function r(t){e.invalidateRendererBasedOnAttribute(t,"class")}function o(e,o,i){var a=e.ownerElement_;if(null==a)return o.apply(e,i);var s=t(a),c=o.apply(e,i);return t(a)!==s&&(n(a,s),r(a)),c}if(!window.DOMTokenList)return void console.warn("Missing DOMTokenList prototype, please include a compatible classList polyfill such as http://goo.gl/uTcepH.");var i=e.unsafeUnwrap,a=e.enqueueMutation,s=DOMTokenList.prototype.add;DOMTokenList.prototype.add=function(){o(this,s,arguments)};var c=DOMTokenList.prototype.remove;DOMTokenList.prototype.remove=function(){o(this,c,arguments)};var u=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(){return o(this,u,arguments)}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(t,n){var r=t.parentNode;if(r&&r.shadowRoot){var o=e.getRendererForHost(r);o.dependsOnAttribute(n)&&o.invalidate()}}function n(e,t,n){l(e,"attributes",{name:t,namespace:null,oldValue:n})}function r(e){a.call(this,e)}var o=e.ChildNodeInterface,i=e.GetElementsByInterface,a=e.wrappers.Node,s=e.ParentNodeInterface,c=e.SelectorsInterface,u=e.MatchesInterface,l=(e.addWrapNodeListMethod,e.enqueueMutation),p=e.mixin,d=(e.oneOf,e.registerWrapper),f=e.unsafeUnwrap,h=e.wrappers,w=window.Element,m=["matches","mozMatchesSelector","msMatchesSelector","webkitMatchesSelector"].filter(function(e){return w.prototype[e]}),v=m[0],g=w.prototype[v],b=new WeakMap;r.prototype=Object.create(a.prototype),p(r.prototype,{createShadowRoot:function(){var t=new h.ShadowRoot(this);f(this).polymerShadowRoot_=t;var n=e.getRendererForHost(this);return n.invalidate(),t},get shadowRoot(){return f(this).polymerShadowRoot_||null},setAttribute:function(e,r){var o=f(this).getAttribute(e);f(this).setAttribute(e,r),n(this,e,o),t(this,e)},removeAttribute:function(e){var r=f(this).getAttribute(e);f(this).removeAttribute(e),n(this,e,r),t(this,e)},get classList(){var e=b.get(this);if(!e){if(e=f(this).classList,!e)return;e.ownerElement_=this,b.set(this,e)}return e},get className(){return f(this).className},set className(e){this.setAttribute("class",e)},get id(){return f(this).id},set id(e){this.setAttribute("id",e)}}),m.forEach(function(e){"matches"!==e&&(r.prototype[e]=function(e){return this.matches(e)})}),w.prototype.webkitCreateShadowRoot&&(r.prototype.webkitCreateShadowRoot=r.prototype.createShadowRoot),p(r.prototype,o),p(r.prototype,i),p(r.prototype,s),p(r.prototype,c),p(r.prototype,u),d(w,r,document.createElementNS(null,"x")),e.invalidateRendererBasedOnAttribute=t,e.matchesNames=m,e.originalMatches=g,e.wrappers.Element=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case" ":return" "}}function n(e){return e.replace(j,t)}function r(e){return e.replace(L,t)}function o(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return t}function i(e){if(e.namespaceURI!==C)return!0;var t=e.ownerDocument.doctype;return t&&t.publicId&&t.systemId}function a(e,t){switch(e.nodeType){case Node.ELEMENT_NODE:for(var o,a=e.tagName.toLowerCase(),c="<"+a,u=e.attributes,l=0;o=u[l];l++)c+=" "+o.name+'="'+n(o.value)+'"';return _[a]?(i(e)&&(c+="/"),c+">"):c+">"+s(e)+"</"+a+">";case Node.TEXT_NODE:var p=e.data;return t&&D[t.localName]?p:r(p);case Node.COMMENT_NODE:return"<!--"+e.data+"-->";default:throw console.error(e),new Error("not implemented")}}function s(e){e instanceof N.HTMLTemplateElement&&(e=e.content);for(var t="",n=e.firstChild;n;n=n.nextSibling)t+=a(n,e);return t}function c(e,t,n){var r=n||"div";e.textContent="";var o=T(e.ownerDocument.createElement(r));o.innerHTML=t;for(var i;i=o.firstChild;)e.appendChild(O(i))}function u(e){w.call(this,e)}function l(e,t){var n=T(e.cloneNode(!1));n.innerHTML=t;for(var r,o=T(document.createDocumentFragment());r=n.firstChild;)o.appendChild(r);return O(o)}function p(t){return function(){return e.renderAllPending(),M(this)[t]}}function d(e){m(u,e,p(e))}function f(t){Object.defineProperty(u.prototype,t,{get:p(t),set:function(n){e.renderAllPending(),M(this)[t]=n},configurable:!0,enumerable:!0})}function h(t){Object.defineProperty(u.prototype,t,{value:function(){return e.renderAllPending(),M(this)[t].apply(M(this),arguments)},configurable:!0,enumerable:!0})}var w=e.wrappers.Element,m=e.defineGetter,v=e.enqueueMutation,g=e.mixin,b=e.nodesWereAdded,y=e.nodesWereRemoved,E=e.registerWrapper,S=e.snapshotNodeList,M=e.unsafeUnwrap,T=e.unwrap,O=e.wrap,N=e.wrappers,j=/[&\u00A0"]/g,L=/[&\u00A0<>]/g,_=o(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),D=o(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]),C="http://www.w3.org/1999/xhtml",H=/MSIE/.test(navigator.userAgent),x=window.HTMLElement,R=window.HTMLTemplateElement;u.prototype=Object.create(w.prototype),g(u.prototype,{get innerHTML(){return s(this)},set innerHTML(e){if(H&&D[this.localName])return void(this.textContent=e);var t=S(this.childNodes);this.invalidateShadowRenderer()?this instanceof N.HTMLTemplateElement?c(this.content,e):c(this,e,this.tagName):!R&&this instanceof N.HTMLTemplateElement?c(this.content,e):M(this).innerHTML=e;var n=S(this.childNodes);v(this,"childList",{addedNodes:n,removedNodes:t}),y(t),b(n,this)},get outerHTML(){return a(this,this.parentNode)},set outerHTML(e){var t=this.parentNode;if(t){t.invalidateShadowRenderer();var n=l(t,e);t.replaceChild(n,this)}},insertAdjacentHTML:function(e,t){var n,r;switch(String(e).toLowerCase()){case"beforebegin":n=this.parentNode,r=this;break;case"afterend":n=this.parentNode,r=this.nextSibling;break;case"afterbegin":n=this,r=this.firstChild;break;case"beforeend":n=this,r=null;break;default:return}var o=l(n,t);n.insertBefore(o,r)},get hidden(){return this.hasAttribute("hidden")},set hidden(e){e?this.setAttribute("hidden",""):this.removeAttribute("hidden")}}),["clientHeight","clientLeft","clientTop","clientWidth","offsetHeight","offsetLeft","offsetTop","offsetWidth","scrollHeight","scrollWidth"].forEach(d),["scrollLeft","scrollTop"].forEach(f),["focus","getBoundingClientRect","getClientRects","scrollIntoView"].forEach(h),E(x,u,document.createElement("b")),e.wrappers.HTMLElement=u,e.getInnerHTML=s,e.setInnerHTML=c}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.unsafeUnwrap,a=e.wrap,s=window.HTMLCanvasElement;t.prototype=Object.create(n.prototype),r(t.prototype,{getContext:function(){var e=i(this).getContext.apply(i(this),arguments);return e&&a(e)}}),o(s,t,document.createElement("canvas")),e.wrappers.HTMLCanvasElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=window.HTMLContentElement;t.prototype=Object.create(n.prototype),r(t.prototype,{constructor:t,get select(){return this.getAttribute("select")},set select(e){this.setAttribute("select",e)},setAttribute:function(e,t){n.prototype.setAttribute.call(this,e,t),"select"===String(e).toLowerCase()&&this.invalidateShadowRenderer(!0)}}),i&&o(i,t),e.wrappers.HTMLContentElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapHTMLCollection,a=e.unwrap,s=window.HTMLFormElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get elements(){return i(a(this).elements)}}),o(s,t,document.createElement("form")),e.wrappers.HTMLFormElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call(this,e)}function n(e,t){if(!(this instanceof n))throw new TypeError("DOM object constructor cannot be called as a function.");var o=i(document.createElement("img"));r.call(this,o),a(o,this),void 0!==e&&(o.width=e),void 0!==t&&(o.height=t)}var r=e.wrappers.HTMLElement,o=e.registerWrapper,i=e.unwrap,a=e.rewrap,s=window.HTMLImageElement;t.prototype=Object.create(r.prototype),o(s,t,document.createElement("img")),n.prototype=t.prototype,e.wrappers.HTMLImageElement=t,e.wrappers.Image=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=(e.mixin,e.wrappers.NodeList,e.registerWrapper),o=window.HTMLShadowElement;t.prototype=Object.create(n.prototype),t.prototype.constructor=t,o&&r(o,t),e.wrappers.HTMLShadowElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){if(!e.defaultView)return e;var t=p.get(e);if(!t){for(t=e.implementation.createHTMLDocument("");t.lastChild;)t.removeChild(t.lastChild);p.set(e,t)}return t}function n(e){for(var n,r=t(e.ownerDocument),o=c(r.createDocumentFragment());n=e.firstChild;)o.appendChild(n);return o}function r(e){if(o.call(this,e),!d){var t=n(e);l.set(this,u(t))}}var o=e.wrappers.HTMLElement,i=e.mixin,a=e.registerWrapper,s=e.unsafeUnwrap,c=e.unwrap,u=e.wrap,l=new WeakMap,p=new WeakMap,d=window.HTMLTemplateElement;r.prototype=Object.create(o.prototype),i(r.prototype,{constructor:r,get content(){return d?u(s(this).content):l.get(this)}}),d&&a(d,r),e.wrappers.HTMLTemplateElement=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.registerWrapper,o=window.HTMLMediaElement;o&&(t.prototype=Object.create(n.prototype),r(o,t,document.createElement("audio")),e.wrappers.HTMLMediaElement=t)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call(this,e)}function n(e){if(!(this instanceof n))throw new TypeError("DOM object constructor cannot be called as a function.");var t=i(document.createElement("audio"));r.call(this,t),a(t,this),t.setAttribute("preload","auto"),void 0!==e&&t.setAttribute("src",e)}var r=e.wrappers.HTMLMediaElement,o=e.registerWrapper,i=e.unwrap,a=e.rewrap,s=window.HTMLAudioElement;s&&(t.prototype=Object.create(r.prototype),o(s,t,document.createElement("audio")),n.prototype=t.prototype,e.wrappers.HTMLAudioElement=t,e.wrappers.Audio=n)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return e.replace(/\s+/g," ").trim()}function n(e){o.call(this,e)}function r(e,t,n,i){if(!(this instanceof r))throw new TypeError("DOM object constructor cannot be called as a function.");var a=c(document.createElement("option"));o.call(this,a),s(a,this),void 0!==e&&(a.text=e),void 0!==t&&a.setAttribute("value",t),n===!0&&a.setAttribute("selected",""),a.selected=i===!0}var o=e.wrappers.HTMLElement,i=e.mixin,a=e.registerWrapper,s=e.rewrap,c=e.unwrap,u=e.wrap,l=window.HTMLOptionElement;n.prototype=Object.create(o.prototype),i(n.prototype,{get text(){return t(this.textContent)},set text(e){this.textContent=t(String(e))},get form(){return u(c(this).form)}}),a(l,n,document.createElement("option")),r.prototype=n.prototype,e.wrappers.HTMLOptionElement=n,e.wrappers.Option=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.unwrap,a=e.wrap,s=window.HTMLSelectElement;t.prototype=Object.create(n.prototype),r(t.prototype,{add:function(e,t){"object"==typeof t&&(t=i(t)),i(this).add(i(e),t)},remove:function(e){return void 0===e?void n.prototype.remove.call(this):("object"==typeof e&&(e=i(e)),void i(this).remove(e))},get form(){return a(i(this).form)}}),o(s,t,document.createElement("select")),e.wrappers.HTMLSelectElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.unwrap,a=e.wrap,s=e.wrapHTMLCollection,c=window.HTMLTableElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get caption(){return a(i(this).caption)},createCaption:function(){return a(i(this).createCaption())},get tHead(){return a(i(this).tHead)},createTHead:function(){return a(i(this).createTHead())},createTFoot:function(){return a(i(this).createTFoot())},get tFoot(){return a(i(this).tFoot)},get tBodies(){return s(i(this).tBodies)},createTBody:function(){return a(i(this).createTBody())},get rows(){return s(i(this).rows)},insertRow:function(e){return a(i(this).insertRow(e))}}),o(c,t,document.createElement("table")),e.wrappers.HTMLTableElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapHTMLCollection,a=e.unwrap,s=e.wrap,c=window.HTMLTableSectionElement;t.prototype=Object.create(n.prototype),r(t.prototype,{constructor:t,get rows(){return i(a(this).rows)},insertRow:function(e){return s(a(this).insertRow(e))}}),o(c,t,document.createElement("thead")),e.wrappers.HTMLTableSectionElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapHTMLCollection,a=e.unwrap,s=e.wrap,c=window.HTMLTableRowElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get cells(){return i(a(this).cells)},insertCell:function(e){return s(a(this).insertCell(e))}}),o(c,t,document.createElement("tr")),e.wrappers.HTMLTableRowElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){switch(e.localName){case"content":return new n(e);case"shadow":return new o(e);case"template":return new i(e)}r.call(this,e)}var n=e.wrappers.HTMLContentElement,r=e.wrappers.HTMLElement,o=e.wrappers.HTMLShadowElement,i=e.wrappers.HTMLTemplateElement,a=(e.mixin,e.registerWrapper),s=window.HTMLUnknownElement;t.prototype=Object.create(r.prototype),a(s,t),e.wrappers.HTMLUnknownElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.Element,r=e.wrappers.HTMLElement,o=e.registerWrapper,i=(e.defineWrapGetter,e.unsafeUnwrap),a=e.wrap,s=e.mixin,c="http://www.w3.org/2000/svg",u=window.SVGElement,l=document.createElementNS(c,"title");if(!("classList"in l)){var p=Object.getOwnPropertyDescriptor(n.prototype,"classList");Object.defineProperty(r.prototype,"classList",p),delete n.prototype.classList}t.prototype=Object.create(n.prototype),s(t.prototype,{get ownerSVGElement(){return a(i(this).ownerSVGElement)}}),o(u,t,document.createElementNS(c,"title")),e.wrappers.SVGElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){d.call(this,e)}var n=e.mixin,r=e.registerWrapper,o=e.unwrap,i=e.wrap,a=window.SVGUseElement,s="http://www.w3.org/2000/svg",c=i(document.createElementNS(s,"g")),u=document.createElementNS(s,"use"),l=c.constructor,p=Object.getPrototypeOf(l.prototype),d=p.constructor;t.prototype=Object.create(p),"instanceRoot"in u&&n(t.prototype,{get instanceRoot(){return i(o(this).instanceRoot)},get animatedInstanceRoot(){return i(o(this).animatedInstanceRoot)}}),r(a,t,u),e.wrappers.SVGUseElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.EventTarget,r=e.mixin,o=e.registerWrapper,i=e.unsafeUnwrap,a=e.wrap,s=window.SVGElementInstance;s&&(t.prototype=Object.create(n.prototype),r(t.prototype,{get correspondingElement(){return a(i(this).correspondingElement)},get correspondingUseElement(){return a(i(this).correspondingUseElement)},get parentNode(){return a(i(this).parentNode)},get childNodes(){throw new Error("Not implemented")},get firstChild(){return a(i(this).firstChild)},get lastChild(){return a(i(this).lastChild)},get previousSibling(){return a(i(this).previousSibling)},get nextSibling(){return a(i(this).nextSibling)}}),o(s,t),e.wrappers.SVGElementInstance=t)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){o(e,this)}var n=e.mixin,r=e.registerWrapper,o=e.setWrapper,i=e.unsafeUnwrap,a=e.unwrap,s=e.unwrapIfNeeded,c=e.wrap,u=window.CanvasRenderingContext2D;n(t.prototype,{get canvas(){return c(i(this).canvas)},drawImage:function(){arguments[0]=s(arguments[0]),i(this).drawImage.apply(i(this),arguments)},createPattern:function(){return arguments[0]=a(arguments[0]),i(this).createPattern.apply(i(this),arguments)}}),r(u,t,document.createElement("canvas").getContext("2d")),e.wrappers.CanvasRenderingContext2D=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){i(e,this)}var n=e.addForwardingProperties,r=e.mixin,o=e.registerWrapper,i=e.setWrapper,a=e.unsafeUnwrap,s=e.unwrapIfNeeded,c=e.wrap,u=window.WebGLRenderingContext;if(u){r(t.prototype,{get canvas(){return c(a(this).canvas)},texImage2D:function(){arguments[5]=s(arguments[5]),a(this).texImage2D.apply(a(this),arguments)},texSubImage2D:function(){arguments[6]=s(arguments[6]),a(this).texSubImage2D.apply(a(this),arguments)}});var l=Object.getPrototypeOf(u.prototype);l!==Object.prototype&&n(l,t.prototype);var p=/WebKit/.test(navigator.userAgent)?{drawingBufferHeight:null,drawingBufferWidth:null}:{};o(u,t,p),e.wrappers.WebGLRenderingContext=t}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.Node,r=e.GetElementsByInterface,o=e.NonElementParentNodeInterface,i=e.ParentNodeInterface,a=e.SelectorsInterface,s=e.mixin,c=e.registerObject,u=e.registerWrapper,l=window.DocumentFragment;t.prototype=Object.create(n.prototype),s(t.prototype,i),s(t.prototype,a),s(t.prototype,r),s(t.prototype,o),u(l,t,document.createDocumentFragment()),e.wrappers.DocumentFragment=t;var p=c(document.createComment(""));e.wrappers.Comment=p}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t=p(l(e).ownerDocument.createDocumentFragment());n.call(this,t),c(t,this);var o=e.shadowRoot;h.set(this,o),this.treeScope_=new r(this,a(o||e)),f.set(this,e)}var n=e.wrappers.DocumentFragment,r=e.TreeScope,o=e.elementFromPoint,i=e.getInnerHTML,a=e.getTreeScope,s=e.mixin,c=e.rewrap,u=e.setInnerHTML,l=e.unsafeUnwrap,p=e.unwrap,d=e.wrap,f=new WeakMap,h=new WeakMap;t.prototype=Object.create(n.prototype),s(t.prototype,{constructor:t,get innerHTML(){return i(this)},set innerHTML(e){u(this,e),this.invalidateShadowRenderer()},get olderShadowRoot(){return h.get(this)||null},get host(){return f.get(this)||null},invalidateShadowRenderer:function(){return f.get(this).invalidateShadowRenderer()},elementFromPoint:function(e,t){return o(this,this.ownerDocument,e,t)},getSelection:function(){return document.getSelection()},get activeElement(){var e=p(this).ownerDocument.activeElement;if(!e||!e.nodeType)return null;for(var t=d(e);!this.contains(t);){for(;t.parentNode;)t=t.parentNode;if(!t.host)return null;t=t.host}return t}}),e.wrappers.ShadowRoot=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t=p(e).root;return t instanceof f?t.host:null}function n(t,n){if(t.shadowRoot){n=Math.min(t.childNodes.length-1,n);var r=t.childNodes[n];if(r){var o=e.getDestinationInsertionPoints(r);if(o.length>0){var i=o[0].parentNode;i.nodeType==Node.ELEMENT_NODE&&(t=i)}}}return t}function r(e){return e=l(e),t(e)||e}function o(e){a(e,this)}var i=e.registerWrapper,a=e.setWrapper,s=e.unsafeUnwrap,c=e.unwrap,u=e.unwrapIfNeeded,l=e.wrap,p=e.getTreeScope,d=window.Range,f=e.wrappers.ShadowRoot;o.prototype={get startContainer(){return r(s(this).startContainer)},get endContainer(){return r(s(this).endContainer)},get commonAncestorContainer(){return r(s(this).commonAncestorContainer)},setStart:function(e,t){e=n(e,t),s(this).setStart(u(e),t)},setEnd:function(e,t){e=n(e,t),s(this).setEnd(u(e),t)},setStartBefore:function(e){s(this).setStartBefore(u(e))},setStartAfter:function(e){s(this).setStartAfter(u(e))},setEndBefore:function(e){s(this).setEndBefore(u(e))},setEndAfter:function(e){s(this).setEndAfter(u(e))},selectNode:function(e){s(this).selectNode(u(e))},selectNodeContents:function(e){s(this).selectNodeContents(u(e))},compareBoundaryPoints:function(e,t){return s(this).compareBoundaryPoints(e,c(t))},extractContents:function(){return l(s(this).extractContents())},cloneContents:function(){return l(s(this).cloneContents())},insertNode:function(e){s(this).insertNode(u(e))},surroundContents:function(e){s(this).surroundContents(u(e))},cloneRange:function(){return l(s(this).cloneRange())},isPointInRange:function(e,t){return s(this).isPointInRange(u(e),t)},comparePoint:function(e,t){return s(this).comparePoint(u(e),t)},intersectsNode:function(e){return s(this).intersectsNode(u(e))},toString:function(){return s(this).toString()}},d.prototype.createContextualFragment&&(o.prototype.createContextualFragment=function(e){return l(s(this).createContextualFragment(e))}),i(window.Range,o,document.createRange()),e.wrappers.Range=o}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){e.previousSibling_=e.previousSibling,e.nextSibling_=e.nextSibling,e.parentNode_=e.parentNode}function n(n,o,i){var a=x(n),s=x(o),c=i?x(i):null;if(r(o),t(o),i)n.firstChild===i&&(n.firstChild_=i),i.previousSibling_=i.previousSibling;else{n.lastChild_=n.lastChild,n.lastChild===n.firstChild&&(n.firstChild_=n.firstChild);var u=R(a.lastChild);u&&(u.nextSibling_=u.nextSibling)}e.originalInsertBefore.call(a,s,c)}function r(n){var r=x(n),o=r.parentNode;if(o){var i=R(o);t(n),n.previousSibling&&(n.previousSibling.nextSibling_=n),n.nextSibling&&(n.nextSibling.previousSibling_=n),i.lastChild===n&&(i.lastChild_=n),i.firstChild===n&&(i.firstChild_=n),e.originalRemoveChild.call(o,r)}}function o(e){W.set(e,[])}function i(e){var t=W.get(e);return t||W.set(e,t=[]),t}function a(e){for(var t=[],n=0,r=e.firstChild;r;r=r.nextSibling)t[n++]=r;return t}function s(){for(var e=0;e<F.length;e++){var t=F[e],n=t.parentRenderer;n&&n.dirty||t.render()}F=[]}function c(){T=null,s()}function u(e){var t=A.get(e);return t||(t=new f(e),A.set(e,t)),t}function l(e){var t=D(e).root;return t instanceof _?t:null}function p(e){return u(e.host)}function d(e){this.skip=!1,this.node=e,this.childNodes=[]}function f(e){this.host=e,this.dirty=!1,this.invalidateAttributes(),this.associateNode(e)}function h(e){for(var t=[],n=e.firstChild;n;n=n.nextSibling)E(n)?t.push.apply(t,i(n)):t.push(n);return t}function w(e){if(e instanceof j)return e;if(e instanceof N)return null;for(var t=e.firstChild;t;t=t.nextSibling){var n=w(t);if(n)return n}return null}function m(e,t){i(t).push(e);var n=I.get(e);n?n.push(t):I.set(e,[t])}function v(e){return I.get(e)}function g(e){I.set(e,void 0)}function b(e,t){var n=t.getAttribute("select");if(!n)return!0;if(n=n.trim(),!n)return!0;if(!(e instanceof O))return!1;if(!U.test(n))return!1;try{return e.matches(n)}catch(r){return!1}}function y(e,t){var n=v(t);return n&&n[n.length-1]===e}function E(e){return e instanceof N||e instanceof j}function S(e){return e.shadowRoot}function M(e){for(var t=[],n=e.shadowRoot;n;n=n.olderShadowRoot)t.push(n);return t}var T,O=e.wrappers.Element,N=e.wrappers.HTMLContentElement,j=e.wrappers.HTMLShadowElement,L=e.wrappers.Node,_=e.wrappers.ShadowRoot,D=(e.assert,e.getTreeScope),C=(e.mixin,e.oneOf),H=e.unsafeUnwrap,x=e.unwrap,R=e.wrap,P=e.ArraySplice,W=new WeakMap,I=new WeakMap,A=new WeakMap,k=C(window,["requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","setTimeout"]),F=[],B=new P;B.equals=function(e,t){return x(e.node)===t},d.prototype={append:function(e){var t=new d(e);return this.childNodes.push(t),t},sync:function(e){if(!this.skip){for(var t=this.node,o=this.childNodes,i=a(x(t)),s=e||new WeakMap,c=B.calculateSplices(o,i),u=0,l=0,p=0,d=0;d<c.length;d++){for(var f=c[d];p<f.index;p++)l++,o[u++].sync(s);for(var h=f.removed.length,w=0;w<h;w++){var m=R(i[l++]);s.get(m)||r(m)}for(var v=f.addedCount,g=i[l]&&R(i[l]),w=0;w<v;w++){var b=o[u++],y=b.node;n(t,y,g),s.set(y,!0),b.sync(s)}p+=v}for(var d=p;d<o.length;d++)o[d].sync(s)}}},f.prototype={render:function(e){if(this.dirty){this.invalidateAttributes();var t=this.host;this.distribution(t);var n=e||new d(t);this.buildRenderTree(n,t);var r=!e;r&&n.sync(),this.dirty=!1}},get parentRenderer(){return D(this.host).renderer},invalidate:function(){if(!this.dirty){this.dirty=!0;var e=this.parentRenderer;if(e&&e.invalidate(),F.push(this),T)return;T=window[k](c,0)}},distribution:function(e){this.resetAllSubtrees(e),this.distributionResolution(e)},resetAll:function(e){E(e)?o(e):g(e),this.resetAllSubtrees(e)},resetAllSubtrees:function(e){for(var t=e.firstChild;t;t=t.nextSibling)this.resetAll(t);e.shadowRoot&&this.resetAll(e.shadowRoot),e.olderShadowRoot&&this.resetAll(e.olderShadowRoot)},distributionResolution:function(e){if(S(e)){for(var t=e,n=h(t),r=M(t),o=0;o<r.length;o++)this.poolDistribution(r[o],n);for(var o=r.length-1;o>=0;o--){var i=r[o],a=w(i);if(a){var s=i.olderShadowRoot;s&&(n=h(s));for(var c=0;c<n.length;c++)m(n[c],a)}this.distributionResolution(i)}}for(var u=e.firstChild;u;u=u.nextSibling)this.distributionResolution(u)},poolDistribution:function(e,t){if(!(e instanceof j))if(e instanceof N){var n=e;this.updateDependentAttributes(n.getAttribute("select"));for(var r=!1,o=0;o<t.length;o++){var e=t[o];e&&b(e,n)&&(m(e,n),t[o]=void 0,r=!0)}if(!r)for(var i=n.firstChild;i;i=i.nextSibling)m(i,n)}else for(var i=e.firstChild;i;i=i.nextSibling)this.poolDistribution(i,t)},buildRenderTree:function(e,t){for(var n=this.compose(t),r=0;r<n.length;r++){var o=n[r],i=e.append(o);this.buildRenderTree(i,o)}if(S(t)){var a=u(t);a.dirty=!1}},compose:function(e){for(var t=[],n=e.shadowRoot||e,r=n.firstChild;r;r=r.nextSibling)if(E(r)){this.associateNode(n);for(var o=i(r),a=0;a<o.length;a++){var s=o[a];y(r,s)&&t.push(s)}}else t.push(r);return t},invalidateAttributes:function(){this.attributes=Object.create(null)},updateDependentAttributes:function(e){if(e){var t=this.attributes;/\.\w+/.test(e)&&(t["class"]=!0),/#\w+/.test(e)&&(t.id=!0),e.replace(/\[\s*([^\s=\|~\]]+)/g,function(e,n){t[n]=!0})}},dependsOnAttribute:function(e){return this.attributes[e]},associateNode:function(e){H(e).polymerShadowRenderer_=this}};var U=/^(:not\()?[*.#[a-zA-Z_|]/;L.prototype.invalidateShadowRenderer=function(e){var t=H(this).polymerShadowRenderer_;return!!t&&(t.invalidate(),!0)},N.prototype.getDistributedNodes=j.prototype.getDistributedNodes=function(){return s(),i(this)},O.prototype.getDestinationInsertionPoints=function(){return s(),v(this)||[]},N.prototype.nodeIsInserted_=j.prototype.nodeIsInserted_=function(){this.invalidateShadowRenderer();var e,t=l(this);t&&(e=p(t)),H(this).polymerShadowRenderer_=e,e&&e.invalidate()},e.getRendererForHost=u,e.getShadowTrees=M,e.renderAllPending=s,e.getDestinationInsertionPoints=v,e.visual={insertBefore:n,remove:r}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(t){if(window[t]){r(!e.wrappers[t]);var c=function(e){n.call(this,e)};c.prototype=Object.create(n.prototype),o(c.prototype,{get form(){return s(a(this).form)}}),i(window[t],c,document.createElement(t.slice(4,-7))),e.wrappers[t]=c}}var n=e.wrappers.HTMLElement,r=e.assert,o=e.mixin,i=e.registerWrapper,a=e.unwrap,s=e.wrap,c=["HTMLButtonElement","HTMLFieldSetElement","HTMLInputElement","HTMLKeygenElement","HTMLLabelElement","HTMLLegendElement","HTMLObjectElement","HTMLOutputElement","HTMLTextAreaElement"];c.forEach(t)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r(e,this)}var n=e.registerWrapper,r=e.setWrapper,o=e.unsafeUnwrap,i=e.unwrap,a=e.unwrapIfNeeded,s=e.wrap,c=window.Selection;t.prototype={get anchorNode(){return s(o(this).anchorNode)},get focusNode(){return s(o(this).focusNode)},addRange:function(e){o(this).addRange(a(e))},collapse:function(e,t){o(this).collapse(a(e),t)},containsNode:function(e,t){return o(this).containsNode(a(e),t)},getRangeAt:function(e){return s(o(this).getRangeAt(e))},removeRange:function(e){o(this).removeRange(i(e))},selectAllChildren:function(e){o(this).selectAllChildren(e instanceof ShadowRoot?o(e.host):a(e))},toString:function(){return o(this).toString()}},c.prototype.extend&&(t.prototype.extend=function(e,t){o(this).extend(a(e),t)}),n(window.Selection,t,window.getSelection()),e.wrappers.Selection=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r(e,this)}var n=e.registerWrapper,r=e.setWrapper,o=e.unsafeUnwrap,i=e.unwrapIfNeeded,a=e.wrap,s=window.TreeWalker;t.prototype={get root(){return a(o(this).root)},get currentNode(){return a(o(this).currentNode)},set currentNode(e){o(this).currentNode=i(e)},get filter(){return o(this).filter},parentNode:function(){return a(o(this).parentNode())},firstChild:function(){return a(o(this).firstChild())},lastChild:function(){return a(o(this).lastChild())},previousSibling:function(){return a(o(this).previousSibling())},previousNode:function(){return a(o(this).previousNode())},nextNode:function(){return a(o(this).nextNode())}},n(s,t),e.wrappers.TreeWalker=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){l.call(this,e),this.treeScope_=new m(this,null)}function n(e){var n=document[e];t.prototype[e]=function(){return D(n.apply(L(this),arguments))}}function r(e,t){x.call(L(t),_(e)),o(e,t)}function o(e,t){e.shadowRoot&&t.adoptNode(e.shadowRoot),e instanceof w&&i(e,t);for(var n=e.firstChild;n;n=n.nextSibling)o(n,t)}function i(e,t){var n=e.olderShadowRoot;n&&t.adoptNode(n)}function a(e){j(e,this)}function s(e,t){var n=document.implementation[t];e.prototype[t]=function(){return D(n.apply(L(this),arguments))}}function c(e,t){var n=document.implementation[t];e.prototype[t]=function(){return n.apply(L(this),arguments)}}var u=e.GetElementsByInterface,l=e.wrappers.Node,p=e.ParentNodeInterface,d=e.NonElementParentNodeInterface,f=e.wrappers.Selection,h=e.SelectorsInterface,w=e.wrappers.ShadowRoot,m=e.TreeScope,v=e.cloneNode,g=e.defineGetter,b=e.defineWrapGetter,y=e.elementFromPoint,E=e.forwardMethodsToWrapper,S=e.matchesNames,M=e.mixin,T=e.registerWrapper,O=e.renderAllPending,N=e.rewrap,j=e.setWrapper,L=e.unsafeUnwrap,_=e.unwrap,D=e.wrap,C=e.wrapEventTargetMethods,H=(e.wrapNodeList,-new WeakMap);t.prototype=Object.create(l.prototype),b(t,"documentElement"),b(t,"body"),b(t,"head"),g(t,"activeElement",function(){var e=_(this).activeElement;if(!e||!e.nodeType)return null;for(var t=D(e);!this.contains(t);){for(;t.parentNode;)t=t.parentNode;if(!t.host)return null;t=t.host}return t}),["createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode"].forEach(n);var x=document.adoptNode,R=document.getSelection;M(t.prototype,{adoptNode:function(e){return e.parentNode&&e.parentNode.removeChild(e),r(e,this),e},elementFromPoint:function(e,t){return y(this,this,e,t)},importNode:function(e,t){return v(e,t,L(this))},getSelection:function(){return O(),new f(R.call(_(this)))},getElementsByName:function(e){return h.querySelectorAll.call(this,"[name="+JSON.stringify(String(e))+"]")}});var P=document.createTreeWalker,W=e.wrappers.TreeWalker;if(t.prototype.createTreeWalker=function(e,t,n,r){var o=null;return n&&(n.acceptNode&&"function"==typeof n.acceptNode?o={acceptNode:function(e){return n.acceptNode(D(e))}}:"function"==typeof n&&(o=function(e){return n(D(e))})),new W(P.call(_(this),_(e),t,o,r))},document.registerElement){var I=document.registerElement;t.prototype.registerElement=function(t,n){function r(e){return e?void j(e,this):i?document.createElement(i,t):document.createElement(t)}var o,i;if(void 0!==n&&(o=n.prototype,i=n["extends"]),o||(o=Object.create(HTMLElement.prototype)),e.nativePrototypeTable.get(o))throw new Error("NotSupportedError");for(var a,s=Object.getPrototypeOf(o),c=[];s&&!(a=e.nativePrototypeTable.get(s));)c.push(s),s=Object.getPrototypeOf(s);if(!a)throw new Error("NotSupportedError");for(var u=Object.create(a),l=c.length-1;l>=0;l--)u=Object.create(u);["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"].forEach(function(e){var t=o[e];t&&(u[e]=function(){D(this)instanceof r||N(this),t.apply(D(this),arguments)})});var p={prototype:u};i&&(p["extends"]=i),r.prototype=o,r.prototype.constructor=r,e.constructorTable.set(u,r),e.nativePrototypeTable.set(o,u);I.call(_(this),t,p);return r},E([window.HTMLDocument||window.Document],["registerElement"])}E([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement,window.HTMLHtmlElement],["appendChild","compareDocumentPosition","contains","getElementsByClassName","getElementsByTagName","getElementsByTagNameNS","insertBefore","querySelector","querySelectorAll","removeChild","replaceChild"]),E([window.HTMLBodyElement,window.HTMLHeadElement,window.HTMLHtmlElement],S),E([window.HTMLDocument||window.Document],["adoptNode","importNode","contains","createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode","createTreeWalker","elementFromPoint","getElementById","getElementsByName","getSelection"]),M(t.prototype,u),M(t.prototype,p),M(t.prototype,h),M(t.prototype,d),M(t.prototype,{get implementation(){var e=H.get(this);return e?e:(e=new a(_(this).implementation),H.set(this,e),e)},get defaultView(){return D(_(this).defaultView)}}),T(window.Document,t,document.implementation.createHTMLDocument("")),window.HTMLDocument&&T(window.HTMLDocument,t),C([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement]);var A=document.implementation.createDocument;a.prototype.createDocument=function(){return arguments[2]=_(arguments[2]),D(A.apply(L(this),arguments))},s(a,"createDocumentType"),s(a,"createHTMLDocument"),c(a,"hasFeature"),T(window.DOMImplementation,a),E([window.DOMImplementation],["createDocument","createDocumentType","createHTMLDocument","hasFeature"]),e.adoptNodeNoRemove=r,e.wrappers.DOMImplementation=a,e.wrappers.Document=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.EventTarget,r=e.wrappers.Selection,o=e.mixin,i=e.registerWrapper,a=e.renderAllPending,s=e.unwrap,c=e.unwrapIfNeeded,u=e.wrap,l=window.Window,p=window.getComputedStyle,d=window.getDefaultComputedStyle,f=window.getSelection;t.prototype=Object.create(n.prototype),l.prototype.getComputedStyle=function(e,t){return u(this||window).getComputedStyle(c(e),t)},d&&(l.prototype.getDefaultComputedStyle=function(e,t){return u(this||window).getDefaultComputedStyle(c(e),t)}),l.prototype.getSelection=function(){return u(this||window).getSelection()},delete window.getComputedStyle,delete window.getDefaultComputedStyle,delete window.getSelection,["addEventListener","removeEventListener","dispatchEvent"].forEach(function(e){l.prototype[e]=function(){var t=u(this||window);return t[e].apply(t,arguments)},delete window[e]}),o(t.prototype,{getComputedStyle:function(e,t){return a(),p.call(s(this),c(e),t)},getSelection:function(){return a(),new r(f.call(s(this)))},get document(){return u(s(this).document)}}),d&&(t.prototype.getDefaultComputedStyle=function(e,t){return a(),d.call(s(this),c(e),t)}),i(l,t,window),e.wrappers.Window=t}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.unwrap,n=window.DataTransfer||window.Clipboard,r=n.prototype.setDragImage;r&&(n.prototype.setDragImage=function(e,n,o){r.call(this,t(e),n,o)})}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t;t=e instanceof i?e:new i(e&&o(e)),r(t,this)}var n=e.registerWrapper,r=e.setWrapper,o=e.unwrap,i=window.FormData;i&&(n(i,t,new i),e.wrappers.FormData=t)}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.unwrapIfNeeded,n=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(e){return n.call(this,t(e))}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t=n[e],r=window[t];if(r){var o=document.createElement(e),i=o.constructor;window[t]=i}}var n=(e.isWrapperFor,{a:"HTMLAnchorElement",area:"HTMLAreaElement",audio:"HTMLAudioElement",base:"HTMLBaseElement",body:"HTMLBodyElement",br:"HTMLBRElement",button:"HTMLButtonElement",canvas:"HTMLCanvasElement",caption:"HTMLTableCaptionElement",col:"HTMLTableColElement",content:"HTMLContentElement",data:"HTMLDataElement",datalist:"HTMLDataListElement",del:"HTMLModElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",dl:"HTMLDListElement",embed:"HTMLEmbedElement",fieldset:"HTMLFieldSetElement",font:"HTMLFontElement",form:"HTMLFormElement",frame:"HTMLFrameElement",frameset:"HTMLFrameSetElement",h1:"HTMLHeadingElement",head:"HTMLHeadElement",hr:"HTMLHRElement",html:"HTMLHtmlElement",iframe:"HTMLIFrameElement",img:"HTMLImageElement",input:"HTMLInputElement",keygen:"HTMLKeygenElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",li:"HTMLLIElement",link:"HTMLLinkElement",map:"HTMLMapElement",marquee:"HTMLMarqueeElement",menu:"HTMLMenuElement",menuitem:"HTMLMenuItemElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",object:"HTMLObjectElement",ol:"HTMLOListElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",script:"HTMLScriptElement",select:"HTMLSelectElement",shadow:"HTMLShadowElement",source:"HTMLSourceElement",span:"HTMLSpanElement",style:"HTMLStyleElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",template:"HTMLTemplateElement",textarea:"HTMLTextAreaElement",thead:"HTMLTableSectionElement",time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",ul:"HTMLUListElement",video:"HTMLVideoElement"});Object.keys(n).forEach(t),Object.getOwnPropertyNames(e.wrappers).forEach(function(t){window[t]=e.wrappers[t]})}(window.ShadowDOMPolyfill);\ No newline at end of filediff --git a/manager/client/src/main/webapp/bower_components/webcomponentsjs/bower.json b/manager/client/src/main/webapp/bower_components/webcomponentsjs/bower.jsonindex b96995e0e..4f5d918b1 100644--- a/manager/client/src/main/webapp/bower_components/webcomponentsjs/bower.json+++ b/manager/client/src/main/webapp/bower_components/webcomponentsjs/bower.json@@ -1,7 +1,7 @@{"name": "webcomponentsjs",+ "description": "Web components polyfill","main": "webcomponents.js",- "version": "0.7.24","homepage": "http://webcomponents.org","authors": ["The Polymer Authors"@@ -11,11 +11,14 @@"url": "https://github.com/webcomponents/webcomponentsjs.git"},"keywords": [- "webcomponents"+ "webcomponents",+ "web-components",+ "polyfill",+ "shim"],- "license": "BSD",+ "license": "BSD-3-Clause","ignore": [],"devDependencies": {- "web-component-tester": "^4.0.1"+ "web-component-tester": "^v6.0.0"}}diff --git a/manager/client/src/main/webapp/bower_components/webcomponentsjs/build.log b/manager/client/src/main/webapp/bower_components/webcomponentsjs/build.logdeleted file mode 100644index 3f1d6bb0b..000000000--- a/manager/client/src/main/webapp/bower_components/webcomponentsjs/build.log+++ /dev/null@@ -1,507 +0,0 @@-BUILD LOG-----------Build Time: 2017-02-06T15:35:26-0800--NODEJS INFORMATION-==================-nodejs: v6.9.3-accepts: 1.3.3-accessibility-developer-tools: 2.11.0-adm-zip: 0.4.7-after: 0.8.2-agent-base: 2.0.1-align-text: 0.1.4-ansi-regex: 2.1.1-ansi-styles: 2.2.1-archiver: 0.14.4-append-field: 0.1.0-archy: 1.0.0-arr-diff: 2.0.0-arr-flatten: 1.0.1-array-differ: 1.0.0-array-flatten: 1.1.1-array-uniq: 1.0.3-array-unique: 0.2.1-asap: 2.0.5-asn1: 0.1.11-arraybuffer.slice: 0.0.6-assert-plus: 0.1.5-assertion-error: 1.0.2-asynckit: 0.4.0-async: 0.9.2-aws-sign2: 0.6.0-aws4: 1.5.0-backo2: 1.0.2-backoff: 2.5.0-balanced-match: 0.4.2-base64-arraybuffer: 0.1.5-base64-js: 1.1.2-base64id: 1.0.0-bcrypt-pbkdf: 1.0.1-beeper: 1.1.1-better-assert: 1.0.2-bl: 1.2.0-blob: 0.0.4-bluebird: 2.11.0-body-parser: 1.16.0-boom: 2.10.1-boxen: 0.3.1-brace-expansion: 1.1.6-braces: 1.8.5-browserstack: 1.5.0-buffer-crc32: 0.2.13-bunyan: 1.8.5-buffer-shims: 1.0.0-busboy: 0.2.14-bytes: 2.4.0-callsite: 1.0.0-camelcase: 1.2.1-capture-stack-trace: 1.0.0-chai: 3.5.0-caseless: 0.11.0-center-align: 0.1.3-chalk: 1.1.3-cleankill: 1.0.3-cliui: 2.1.0-clone: 1.0.2-clone-buffer: 1.0.0-clone-stats: 0.0.1-cloneable-readable: 1.0.0-code-point-at: 1.1.0-combined-stream: 1.0.5-commander: 2.3.0-component-bind: 1.0.0-component-emitter: 1.1.2-component-inherit: 0.0.3-compress-commons: 0.2.9-concat-map: 0.0.1-concat-stream: 1.6.0-concat-with-sourcemaps: 1.0.4-configstore: 2.1.0-content-disposition: 0.5.2-content-type: 1.0.2-cookie: 0.3.1-cookie-signature: 1.0.6-core-util-is: 1.0.2-crc: 3.2.1-crc32-stream: 0.3.4-create-error-class: 3.0.2-cryptiles: 2.0.5-csv-generate: 0.0.6-csv: 0.4.6-csv-parse: 1.2.0-ctype: 0.5.3-csv-stringify: 0.0.8-dashdash: 1.14.1-dateformat: 2.0.0-deap: 1.0.0-debug: 2.6.0-debuglog: 1.0.1-decamelize: 1.2.0-defaults: 1.0.3-deep-eql: 0.1.3-deep-extend: 0.4.1-delayed-stream: 1.0.0-depd: 1.1.0-deprecated: 0.0.1-detect-file: 0.1.0-destroy: 1.0.4-dezalgo: 1.0.3-dicer: 0.2.5-diff: 1.4.0-dot-prop: 3.0.0-dtrace-provider: 0.6.0-duplexer2: 0.0.2-ee-first: 1.1.1-ecc-jsbn: 0.1.1-encodeurl: 1.0.1-end-of-stream: 0.1.5-engine.io: 1.8.2-engine.io-client: 1.8.2-engine.io-parser: 1.3.2-error-ex: 1.3.0-escape-html: 1.0.3-escape-regexp-component: 1.0.2-etag: 1.7.0-escape-string-regexp: 1.0.5-expand-brackets: 0.1.5-expand-range: 1.8.2-expand-tilde: 1.2.2-express: 4.14.1-extend: 3.0.0-extglob: 0.3.2-extsprintf: 1.2.0-fancy-log: 1.3.0-fd-slicer: 1.0.1-filename-regex: 2.0.0-fill-range: 2.2.3-filled-array: 1.1.0-finalhandler: 0.5.1-find-index: 0.1.1-findup-sync: 0.4.3-fined: 1.0.2-first-chunk-stream: 1.0.0-flagged-respawn: 0.3.2-for-in: 0.1.6-for-own: 0.1.4-forever-agent: 0.6.1-form-data: 2.1.2-formatio: 1.1.1-formidable: 1.1.1-forwarded: 0.1.0-fresh: 0.3.0-freeport: 1.0.5-fs-exists-sync: 0.1.0-fs.realpath: 1.0.0-gaze: 0.5.2-generate-function: 2.0.0-generate-object-property: 1.2.0-getpass: 0.1.6-github-url-from-git: 1.5.0-github-url-from-username-repo: 1.0.2-glob: 4.5.3-glob-base: 0.3.0-glob-parent: 2.0.0-glob-stream: 3.1.18-glob2base: 0.0.12-glob-watcher: 0.0.6-global-prefix: 0.1.5-global-modules: 0.2.3-globule: 0.1.0-glogg: 1.0.0-got: 5.7.1-graceful-fs: 3.0.11-growl: 1.9.2-graceful-readlink: 1.0.1-gulp: 3.9.1-gulp-audit: 1.0.0-gulp-concat: 2.6.1-gulp-header: 1.8.8-gulp-uglify: 1.5.4-gulplog: 1.0.0-gulp-util: 3.0.8-handle-thing: 1.2.5-har-validator: 2.0.6-has-binary: 0.1.7-has-ansi: 2.0.0-has-color: 0.1.7-has-cors: 1.1.0-has-gulplog: 0.1.0-hawk: 3.1.3-hoek: 2.16.3-hpack.js: 2.1.6-homedir-polyfill: 1.0.1-http-deceiver: 1.2.7-http-errors: 1.5.1-http-signature: 0.11.0-https-proxy-agent: 1.0.0-imurmurhash: 0.1.4-indexof: 0.0.1-inflight: 1.0.6-iconv-lite: 0.4.15-inherits: 2.0.3-ini: 1.3.4-interpret: 1.0.1-ipaddr.js: 1.2.0-is-absolute: 0.2.6-is-arrayish: 0.2.1-is-buffer: 1.1.4-is-dotfile: 1.0.2-is-equal-shallow: 0.1.3-is-extglob: 1.0.0-is-extendable: 0.1.1-is-finite: 1.0.2-is-fullwidth-code-point: 1.0.0-is-glob: 2.0.1-is-my-json-valid: 2.15.0-is-npm: 1.0.0-is-number: 2.1.0-is-posix-bracket: 0.1.1-is-obj: 1.0.1-is-primitive: 2.0.0-is-property: 1.0.2-is-redirect: 1.0.0-is-relative: 0.2.1-is-retry-allowed: 1.1.0-is-typedarray: 1.0.0-is-stream: 1.1.0-is-unc-path: 0.1.2-is-utf8: 0.2.1-is-windows: 0.2.0-isarray: 0.0.1-isexe: 1.1.2-isobject: 2.1.0-isstream: 0.1.2-jju: 1.3.0-jade: 0.26.3-jodid25519: 1.0.2-json-parse-helpfulerror: 1.0.3-json-schema: 0.2.3-jsbn: 0.1.0-json-stringify-safe: 5.0.1-json3: 3.3.2-jsonpointer: 4.0.1-keep-alive-agent: 0.0.1-jsprim: 1.3.1-kind-of: 3.1.0-latest-version: 2.0.0-lazy-cache: 1.0.4-lazystream: 0.1.0-launchpad: 0.5.4-liftoff: 2.3.0-lodash: 1.0.2-lodash._basetostring: 3.0.1-lodash._basevalues: 3.0.0-lodash._basecopy: 3.0.1-lodash._getnative: 3.9.1-lodash._isiterateecall: 3.0.9-lodash._reescape: 3.0.0-lodash._reevaluate: 3.0.0-lodash._reinterpolate: 3.0.0-lodash._root: 3.0.1-lodash.assignwith: 4.2.0-lodash.escape: 3.2.0-lodash.isarguments: 3.1.0-lodash.isarray: 3.0.4-lodash.isplainobject: 4.0.6-lodash.isempty: 4.4.0-lodash.isstring: 4.0.1-lodash.keys: 3.1.2-lodash.mapvalues: 4.6.0-lodash.pick: 4.4.0-lodash.template: 3.6.2-lodash.templatesettings: 3.1.1-lodash.restparam: 3.6.1-lolex: 1.3.2-longest: 1.0.1-lru-cache: 2.7.3-lowercase-keys: 1.0.0-media-typer: 0.3.0-map-cache: 0.2.2-methods: 1.1.2-merge-descriptors: 1.0.1-micromatch: 2.3.11-mime: 1.3.4-mime-db: 1.26.0-mime-types: 2.1.14-minimalistic-assert: 1.0.0-minimatch: 2.0.10-minimist: 1.2.0-mkdirp: 0.5.1-mocha: 2.5.3-moment: 2.17.1-ms: 0.7.2-multer: 1.3.0-multipipe: 0.1.2-mv: 2.1.1-nan: 2.5.1-ncp: 2.0.0-negotiator: 0.6.1-natives: 1.1.0-node-int64: 0.3.3-node-status-codes: 1.0.0-node-uuid: 1.4.7-nodegit-promise: 4.0.0-nomnom: 1.8.1-normalize-package-data: 1.0.3-normalize-path: 2.0.1-number-is-nan: 1.0.1-oauth-sign: 0.8.2-object-assign: 3.0.0-object-component: 0.0.3-object.omit: 2.0.1-obuf: 1.1.1-on-finished: 2.3.0-once: 1.3.3-options: 0.0.6-orchestrator: 0.3.8-ordered-read-streams: 0.1.0-os-homedir: 1.0.2-os-tmpdir: 1.0.2-osenv: 0.1.4-parse-filepath: 1.0.1-package-json: 2.4.0-parse-glob: 3.0.4-parse-json: 2.2.0-parse-passwd: 1.0.0-parsejson: 0.0.3-parseqs: 0.0.5-parseuri: 0.0.5-parseurl: 1.3.1-path-is-absolute: 1.0.1-path-root: 0.1.1-path-root-regex: 0.1.2-path-to-regexp: 0.1.7-pend: 1.2.0-pinkie: 2.0.4-pinkie-promise: 2.0.1-plist: 2.0.1-precond: 0.2.3-prepend-http: 1.0.4-preserve: 0.2.0-pretty-hrtime: 1.0.3-process-nextick-args: 1.0.7-progress: 1.1.8-promisify-node: 0.4.0-proxy-addr: 1.1.3-pseudomap: 1.0.2-q: 1.4.1-punycode: 1.4.1-qs: 6.2.1-randomatic: 1.1.6-range-parser: 1.2.0-raw-body: 2.2.0-rc: 1.1.6-read-all-stream: 3.1.0-read-installed: 3.1.5-read-package-json: 1.3.3-readable-stream: 1.1.14-readdir-scoped-modules: 1.0.2-rechoir: 0.6.2-regex-cache: 0.4.3-registry-auth-token: 3.1.0-registry-url: 3.1.0-remove-trailing-separator: 1.0.1-repeat-element: 1.1.2-repeating: 2.0.1-repeat-string: 1.6.1-request: 2.79.0-replace-ext: 0.0.1-resolve: 1.2.0-resolve-dir: 0.1.1-restify: 4.3.0-right-align: 0.1.3-rimraf: 2.4.5-run-sequence: 1.2.2-safe-json-stringify: 1.0.3-samsam: 1.1.2-sauce-connect-launcher: 1.2.0-selenium-standalone: 5.11.2-select-hose: 2.0.0-semver-diff: 2.1.0-semver: 4.3.6-send: 0.11.1-sequencify: 0.0.7-serve-static: 1.11.2-serve-waterfall: 1.1.1-server-destroy: 1.0.1-setprototypeof: 1.0.2-sigmund: 1.0.1-sinon: 1.17.7-sinon-chai: 2.8.0-slide: 1.1.6-sntp: 1.0.9-socket.io: 1.7.2-socket.io-adapter: 0.5.0-socket.io-client: 1.7.2-source-map: 0.5.6-socket.io-parser: 2.3.1-sparkles: 1.0.0-spdy: 3.4.4-spdy-transport: 2.0.18-sshpk: 1.10.2-stacky: 1.3.1-statuses: 1.3.1-stream-consume: 0.1.0-stream-transform: 0.1.1-streamsearch: 0.1.2-string-width: 1.0.2-string_decoder: 0.10.31-stringstream: 0.0.5-strip-ansi: 3.0.1-strip-bom: 1.0.0-strip-json-comments: 1.0.4-supports-color: 2.0.0-tar-stream: 1.5.2-temp: 0.8.3-test-fixture: 2.0.1-through2: 2.0.3-tildify: 1.2.0-time-stamp: 1.0.1-timed-out: 3.1.3-to-iso-string: 0.0.2-tough-cookie: 2.3.2-to-array: 0.1.4-tweetnacl: 0.14.5-tunnel-agent: 0.4.3-type-detect: 1.0.0-type-is: 1.6.14-typedarray: 0.0.6-uglify-js: 2.6.4-uglify-save-license: 0.4.1-uglify-to-browserify: 1.0.2-ultron: 1.0.2-unc-path-regex: 0.1.2-underscore: 1.6.0-underscore.string: 3.0.3-unique-stream: 1.0.0-unpipe: 1.0.0-unzip-response: 1.0.2-update-notifier: 0.6.3-urijs: 1.16.1-url-parse-lax: 1.0.0-util: 0.10.3-user-home: 1.1.1-util-deprecate: 1.0.2-util-extend: 1.0.3-utils-merge: 1.0.0-uuid: 2.0.3-v8flags: 2.0.11-vargs: 0.1.0-vary: 1.1.0-verror: 1.9.0-vasync: 1.6.3-vinyl: 0.5.3-vinyl-fs: 0.3.14-vinyl-sourcemaps-apply: 0.2.1-wbuf: 1.7.2-wct-local: 2.0.14-wct-sauce: 1.8.6-wd: 0.3.12-which: 1.2.12-web-component-tester: 4.3.6-widest-line: 1.0.0-window-size: 0.1.0-wrappy: 1.0.2-wordwrap: 0.0.2-write-file-atomic: 1.3.1-ws: 1.1.1-wtf-8: 1.0.0-xmlbuilder: 8.2.2-xdg-basedir: 2.0.0-xmldom: 0.1.27-xmlhttprequest-ssl: 1.5.3-xtend: 4.0.1-yargs: 3.10.0-yallist: 2.0.0-yauzl: 2.7.0-yeast: 0.1.2-zip-stream: 0.5.2-@types/chalk: 0.4.31-@types/express-serve-static-core: 4.0.40-@types/express: 4.0.35-@types/freeport: 1.0.21-@types/launchpad: 0.0.4-@types/node: 6.0.62-@types/mime: 0.0.29-@types/serve-static: 1.7.31-@types/which: 1.0.28--REPO REVISIONS-==============-webcomponentsjs: 0fbebea7bb0d9c310fdc328493bb9f53c600b366--BUILD HASHES-============-CustomElements.js: f33eb6e0a617ddfdc1508e1cb913442f6599c7f7-CustomElements.min.js: a0e1b31e5a0bf95cfb0ff7f0cd12c354879cad8a-HTMLImports.js: 3723342f206868f1a57001d7348159a3525d087f-HTMLImports.min.js: 2dfac33d31d9a3b247868c85782197c9a24b70c6-MutationObserver.js: 40566c0e3aec84650b43f74f51bdad7218a3a10a-MutationObserver.min.js: 9838a8deeb8ae110aa1c19d6e5d88c52cfbb7924-ShadowDOM.js: 9d56dd89199114170bc56ce0c759d0112d9895d6-ShadowDOM.min.js: 6bca1a02e3ecb6933c27f24036ff40f83a581f82-webcomponents-lite.js: 8ac8296830abcc2eecd9bfa4cea05edf9c5d4bc8-webcomponents-lite.min.js: 6c4edd8efa046627216a625bf8f8903d41a9fe87-webcomponents.js: 10940fc011b02665c826cde432601297fc0f1179-webcomponents.min.js: 42404bdd62ebb7b6bb63d15d8e1bccf070de700b\ No newline at end of filediff --git a/manager/client/src/main/webapp/bower_components/webcomponentsjs/package.json b/manager/client/src/main/webapp/bower_components/webcomponentsjs/package.jsonindex 10dc3111f..11a3fa827 100644--- a/manager/client/src/main/webapp/bower_components/webcomponentsjs/package.json+++ b/manager/client/src/main/webapp/bower_components/webcomponentsjs/package.json@@ -1,11 +1,17 @@{- "name": "webcomponents.js",- "version": "0.7.24",- "description": "webcomponents.js",- "main": "webcomponents.js",+ "name": "@webcomponents/webcomponentsjs",+ "version": "1.0.11",+ "description": "Web Components Polyfills",+ "main": "webcomponents-lite.js","directories": {"test": "tests"},+ "keywords": [+ "webcomponents",+ "web-components",+ "polyfill",+ "shim"+ ],"repository": {"type": "git","url": "https://github.com/webcomponents/webcomponentsjs.git"@@ -16,16 +22,33 @@"url": "https://github.com/webcomponents/webcomponentsjs/issues"},"scripts": {+ "build": "gulp","test": "wct"},- "homepage": "http://webcomponents.org",+ "homepage": "https://webcomponents.org/polyfills","devDependencies": {+ "@webcomponents/custom-elements": "^1.0.4",+ "@webcomponents/html-imports": "^1.0.0",+ "@webcomponents/shadycss": "^1.0.5",+ "@webcomponents/shadydom": "^1.0.0",+ "@webcomponents/template": "^1.0.0",+ "@webcomponents/webcomponents-platform": "^1.0.0",+ "babel-preset-minify": "^0.2.0",+ "del": "^3.0.0",+ "es6-promise": "^4.1.1",+ "eslint": "^4.4.1",+ "google-closure-compiler": "^20170910.0.0","gulp": "^3.8.8",- "gulp-audit": "^1.0.0",- "gulp-concat": "^2.4.1",- "gulp-header": "^1.1.1",- "gulp-uglify": "^1.0.1",- "run-sequence": "^1.0.1",- "web-component-tester": "^4.0.1"+ "gulp-rename": "^1.2.2",+ "gulp-sourcemaps": "^2.4.1",+ "rollup-plugin-babel": "^2.7.1",+ "rollup-stream": "=1.23",+ "run-sequence": "^2.0.0",+ "vinyl-buffer": "^1.0.0",+ "vinyl-source-stream": "^1.1.0",+ "web-component-tester": "^6.0.0"+ },+ "publishConfig": {+ "access": "public"}}diff --git a/manager/client/src/main/webapp/bower_components/webcomponentsjs/webcomponents-lite.js b/manager/client/src/main/webapp/bower_components/webcomponentsjs/webcomponents-lite.jsindex 957bd5695..e5f7086a5 100644--- a/manager/client/src/main/webapp/bower_components/webcomponentsjs/webcomponents-lite.js+++ b/manager/client/src/main/webapp/bower_components/webcomponentsjs/webcomponents-lite.js@@ -1,2505 +1,193 @@-/**- * @license- * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.- * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt- * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt- * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt- * Code distributed by Google as part of the polymer project is also- * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt- */-// @version 0.7.24-(function() {- window.WebComponents = window.WebComponents || {- flags: {}- };- var file = "webcomponents-lite.js";- var script = document.querySelector('script[src*="' + file + '"]');- var flags = {};- if (!flags.noOpts) {- location.search.slice(1).split("&").forEach(function(option) {- var parts = option.split("=");- var match;- if (parts[0] && (match = parts[0].match(/wc-(.+)/))) {- flags[match[1]] = parts[1] || true;- }- });- if (script) {- for (var i = 0, a; a = script.attributes[i]; i++) {- if (a.name !== "src") {- flags[a.name] = a.value || true;- }- }- }- if (flags.log && flags.log.split) {- var parts = flags.log.split(",");- flags.log = {};- parts.forEach(function(f) {- flags.log[f] = true;- });- } else {- flags.log = {};- }- }- if (flags.register) {- window.CustomElements = window.CustomElements || {- flags: {}- };- window.CustomElements.flags.register = flags.register;- }- WebComponents.flags = flags;-})();--(function(scope) {- "use strict";- var hasWorkingUrl = false;- if (!scope.forceJURL) {- try {- var u = new URL("b", "http://a");- u.pathname = "c%20d";- hasWorkingUrl = u.href === "http://a/c%20d";- } catch (e) {}- }- if (hasWorkingUrl) return;- var relative = Object.create(null);- relative["ftp"] = 21;- relative["file"] = 0;- relative["gopher"] = 70;- relative["http"] = 80;- relative["https"] = 443;- relative["ws"] = 80;- relative["wss"] = 443;- var relativePathDotMapping = Object.create(null);- relativePathDotMapping["%2e"] = ".";- relativePathDotMapping[".%2e"] = "..";- relativePathDotMapping["%2e."] = "..";- relativePathDotMapping["%2e%2e"] = "..";- function isRelativeScheme(scheme) {- return relative[scheme] !== undefined;- }- function invalid() {- clear.call(this);- this._isInvalid = true;- }- function IDNAToASCII(h) {- if ("" == h) {- invalid.call(this);- }- return h.toLowerCase();- }- function percentEscape(c) {- var unicode = c.charCodeAt(0);- if (unicode > 32 && unicode < 127 && [ 34, 35, 60, 62, 63, 96 ].indexOf(unicode) == -1) {- return c;- }- return encodeURIComponent(c);- }- function percentEscapeQuery(c) {- var unicode = c.charCodeAt(0);- if (unicode > 32 && unicode < 127 && [ 34, 35, 60, 62, 96 ].indexOf(unicode) == -1) {- return c;- }- return encodeURIComponent(c);- }- var EOF = undefined, ALPHA = /[a-zA-Z]/, ALPHANUMERIC = /[a-zA-Z0-9\+\-\.]/;- function parse(input, stateOverride, base) {- function err(message) {- errors.push(message);- }- var state = stateOverride || "scheme start", cursor = 0, buffer = "", seenAt = false, seenBracket = false, errors = [];- loop: while ((input[cursor - 1] != EOF || cursor == 0) && !this._isInvalid) {- var c = input[cursor];- switch (state) {- case "scheme start":- if (c && ALPHA.test(c)) {- buffer += c.toLowerCase();- state = "scheme";- } else if (!stateOverride) {- buffer = "";- state = "no scheme";- continue;- } else {- err("Invalid scheme.");- break loop;- }- break;-- case "scheme":- if (c && ALPHANUMERIC.test(c)) {- buffer += c.toLowerCase();- } else if (":" == c) {- this._scheme = buffer;- buffer = "";- if (stateOverride) {- break loop;- }- if (isRelativeScheme(this._scheme)) {- this._isRelative = true;- }- if ("file" == this._scheme) {- state = "relative";- } else if (this._isRelative && base && base._scheme == this._scheme) {- state = "relative or authority";- } else if (this._isRelative) {- state = "authority first slash";- } else {- state = "scheme data";- }- } else if (!stateOverride) {- buffer = "";- cursor = 0;- state = "no scheme";- continue;- } else if (EOF == c) {- break loop;- } else {- err("Code point not allowed in scheme: " + c);- break loop;- }- break;-- case "scheme data":- if ("?" == c) {- this._query = "?";- state = "query";- } else if ("#" == c) {- this._fragment = "#";- state = "fragment";- } else {- if (EOF != c && "\t" != c && "\n" != c && "\r" != c) {- this._schemeData += percentEscape(c);- }- }- break;-- case "no scheme":- if (!base || !isRelativeScheme(base._scheme)) {- err("Missing scheme.");- invalid.call(this);- } else {- state = "relative";- continue;- }- break;-- case "relative or authority":- if ("/" == c && "/" == input[cursor + 1]) {- state = "authority ignore slashes";- } else {- err("Expected /, got: " + c);- state = "relative";- continue;- }- break;-- case "relative":- this._isRelative = true;- if ("file" != this._scheme) this._scheme = base._scheme;- if (EOF == c) {- this._host = base._host;- this._port = base._port;- this._path = base._path.slice();- this._query = base._query;- this._username = base._username;- this._password = base._password;- break loop;- } else if ("/" == c || "\\" == c) {- if ("\\" == c) err("\\ is an invalid code point.");- state = "relative slash";- } else if ("?" == c) {- this._host = base._host;- this._port = base._port;- this._path = base._path.slice();- this._query = "?";- this._username = base._username;- this._password = base._password;- state = "query";- } else if ("#" == c) {- this._host = base._host;- this._port = base._port;- this._path = base._path.slice();- this._query = base._query;- this._fragment = "#";- this._username = base._username;- this._password = base._password;- state = "fragment";- } else {- var nextC = input[cursor + 1];- var nextNextC = input[cursor + 2];- if ("file" != this._scheme || !ALPHA.test(c) || nextC != ":" && nextC != "|" || EOF != nextNextC && "/" != nextNextC && "\\" != nextNextC && "?" != nextNextC && "#" != nextNextC) {- this._host = base._host;- this._port = base._port;- this._username = base._username;- this._password = base._password;- this._path = base._path.slice();- this._path.pop();- }- state = "relative path";- continue;- }- break;-- case "relative slash":- if ("/" == c || "\\" == c) {- if ("\\" == c) {- err("\\ is an invalid code point.");- }- if ("file" == this._scheme) {- state = "file host";- } else {- state = "authority ignore slashes";- }- } else {- if ("file" != this._scheme) {- this._host = base._host;- this._port = base._port;- this._username = base._username;- this._password = base._password;- }- state = "relative path";- continue;- }- break;-- case "authority first slash":- if ("/" == c) {- state = "authority second slash";- } else {- err("Expected '/', got: " + c);- state = "authority ignore slashes";- continue;- }- break;-- case "authority second slash":- state = "authority ignore slashes";- if ("/" != c) {- err("Expected '/', got: " + c);- continue;- }- break;-- case "authority ignore slashes":- if ("/" != c && "\\" != c) {- state = "authority";- continue;- } else {- err("Expected authority, got: " + c);- }- break;-- case "authority":- if ("@" == c) {- if (seenAt) {- err("@ already seen.");- buffer += "%40";- }- seenAt = true;- for (var i = 0; i < buffer.length; i++) {- var cp = buffer[i];- if ("\t" == cp || "\n" == cp || "\r" == cp) {- err("Invalid whitespace in authority.");- continue;- }- if (":" == cp && null === this._password) {- this._password = "";- continue;- }- var tempC = percentEscape(cp);- null !== this._password ? this._password += tempC : this._username += tempC;- }- buffer = "";- } else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) {- cursor -= buffer.length;- buffer = "";- state = "host";- continue;- } else {- buffer += c;- }- break;-- case "file host":- if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) {- if (buffer.length == 2 && ALPHA.test(buffer[0]) && (buffer[1] == ":" || buffer[1] == "|")) {- state = "relative path";- } else if (buffer.length == 0) {- state = "relative path start";- } else {- this._host = IDNAToASCII.call(this, buffer);- buffer = "";- state = "relative path start";- }- continue;- } else if ("\t" == c || "\n" == c || "\r" == c) {- err("Invalid whitespace in file host.");- } else {- buffer += c;- }- break;-- case "host":- case "hostname":- if (":" == c && !seenBracket) {- this._host = IDNAToASCII.call(this, buffer);- buffer = "";- state = "port";- if ("hostname" == stateOverride) {- break loop;- }- } else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) {- this._host = IDNAToASCII.call(this, buffer);- buffer = "";- state = "relative path start";- if (stateOverride) {- break loop;- }- continue;- } else if ("\t" != c && "\n" != c && "\r" != c) {- if ("[" == c) {- seenBracket = true;- } else if ("]" == c) {- seenBracket = false;- }- buffer += c;- } else {- err("Invalid code point in host/hostname: " + c);- }- break;-- case "port":- if (/[0-9]/.test(c)) {- buffer += c;- } else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c || stateOverride) {- if ("" != buffer) {- var temp = parseInt(buffer, 10);- if (temp != relative[this._scheme]) {- this._port = temp + "";- }- buffer = "";- }- if (stateOverride) {- break loop;- }- state = "relative path start";- continue;- } else if ("\t" == c || "\n" == c || "\r" == c) {- err("Invalid code point in port: " + c);- } else {- invalid.call(this);- }- break;-- case "relative path start":- if ("\\" == c) err("'\\' not allowed in path.");- state = "relative path";- if ("/" != c && "\\" != c) {- continue;- }- break;-- case "relative path":- if (EOF == c || "/" == c || "\\" == c || !stateOverride && ("?" == c || "#" == c)) {- if ("\\" == c) {- err("\\ not allowed in relative path.");- }- var tmp;- if (tmp = relativePathDotMapping[buffer.toLowerCase()]) {- buffer = tmp;- }- if (".." == buffer) {- this._path.pop();- if ("/" != c && "\\" != c) {- this._path.push("");- }- } else if ("." == buffer && "/" != c && "\\" != c) {- this._path.push("");- } else if ("." != buffer) {- if ("file" == this._scheme && this._path.length == 0 && buffer.length == 2 && ALPHA.test(buffer[0]) && buffer[1] == "|") {- buffer = buffer[0] + ":";- }- this._path.push(buffer);- }- buffer = "";- if ("?" == c) {- this._query = "?";- state = "query";- } else if ("#" == c) {- this._fragment = "#";- state = "fragment";- }- } else if ("\t" != c && "\n" != c && "\r" != c) {- buffer += percentEscape(c);- }- break;-- case "query":- if (!stateOverride && "#" == c) {- this._fragment = "#";- state = "fragment";- } else if (EOF != c && "\t" != c && "\n" != c && "\r" != c) {- this._query += percentEscapeQuery(c);- }- break;-- case "fragment":- if (EOF != c && "\t" != c && "\n" != c && "\r" != c) {- this._fragment += c;- }- break;- }- cursor++;- }- }- function clear() {- this._scheme = "";- this._schemeData = "";- this._username = "";- this._password = null;- this._host = "";- this._port = "";- this._path = [];- this._query = "";- this._fragment = "";- this._isInvalid = false;- this._isRelative = false;- }- function jURL(url, base) {- if (base !== undefined && !(base instanceof jURL)) base = new jURL(String(base));- this._url = url;- clear.call(this);- var input = url.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g, "");- parse.call(this, input, null, base);- }- jURL.prototype = {- toString: function() {- return this.href;- },- get href() {- if (this._isInvalid) return this._url;- var authority = "";- if ("" != this._username || null != this._password) {- authority = this._username + (null != this._password ? ":" + this._password : "") + "@";- }- return this.protocol + (this._isRelative ? "//" + authority + this.host : "") + this.pathname + this._query + this._fragment;- },- set href(href) {- clear.call(this);- parse.call(this, href);- },- get protocol() {- return this._scheme + ":";- },- set protocol(protocol) {- if (this._isInvalid) return;- parse.call(this, protocol + ":", "scheme start");- },- get host() {- return this._isInvalid ? "" : this._port ? this._host + ":" + this._port : this._host;- },- set host(host) {- if (this._isInvalid || !this._isRelative) return;- parse.call(this, host, "host");- },- get hostname() {- return this._host;- },- set hostname(hostname) {- if (this._isInvalid || !this._isRelative) return;- parse.call(this, hostname, "hostname");- },- get port() {- return this._port;- },- set port(port) {- if (this._isInvalid || !this._isRelative) return;- parse.call(this, port, "port");- },- get pathname() {- return this._isInvalid ? "" : this._isRelative ? "/" + this._path.join("/") : this._schemeData;- },- set pathname(pathname) {- if (this._isInvalid || !this._isRelative) return;- this._path = [];- parse.call(this, pathname, "relative path start");- },- get search() {- return this._isInvalid || !this._query || "?" == this._query ? "" : this._query;- },- set search(search) {- if (this._isInvalid || !this._isRelative) return;- this._query = "?";- if ("?" == search[0]) search = search.slice(1);- parse.call(this, search, "query");- },- get hash() {- return this._isInvalid || !this._fragment || "#" == this._fragment ? "" : this._fragment;- },- set hash(hash) {- if (this._isInvalid) return;- this._fragment = "#";- if ("#" == hash[0]) hash = hash.slice(1);- parse.call(this, hash, "fragment");- },- get origin() {- var host;- if (this._isInvalid || !this._scheme) {- return "";- }- switch (this._scheme) {- case "data":- case "file":- case "javascript":- case "mailto":- return "null";- }- host = this.host;- if (!host) {- return "";- }- return this._scheme + "://" + host;- }- };- var OriginalURL = scope.URL;- if (OriginalURL) {- jURL.createObjectURL = function(blob) {- return OriginalURL.createObjectURL.apply(OriginalURL, arguments);- };- jURL.revokeObjectURL = function(url) {- OriginalURL.revokeObjectURL(url);- };- }- scope.URL = jURL;-})(self);--if (typeof WeakMap === "undefined") {- (function() {- var defineProperty = Object.defineProperty;- var counter = Date.now() % 1e9;- var WeakMap = function() {- this.name = "__st" + (Math.random() * 1e9 >>> 0) + (counter++ + "__");- };- WeakMap.prototype = {- set: function(key, value) {- var entry = key[this.name];- if (entry && entry[0] === key) entry[1] = value; else defineProperty(key, this.name, {- value: [ key, value ],- writable: true- });- return this;- },- get: function(key) {- var entry;- return (entry = key[this.name]) && entry[0] === key ? entry[1] : undefined;- },- "delete": function(key) {- var entry = key[this.name];- if (!entry || entry[0] !== key) return false;- entry[0] = entry[1] = undefined;- return true;- },- has: function(key) {- var entry = key[this.name];- if (!entry) return false;- return entry[0] === key;- }- };- window.WeakMap = WeakMap;- })();-}--(function(global) {- if (global.JsMutationObserver) {- return;- }- var registrationsTable = new WeakMap();- var setImmediate;- if (/Trident|Edge/.test(navigator.userAgent)) {- setImmediate = setTimeout;- } else if (window.setImmediate) {- setImmediate = window.setImmediate;- } else {- var setImmediateQueue = [];- var sentinel = String(Math.random());- window.addEventListener("message", function(e) {- if (e.data === sentinel) {- var queue = setImmediateQueue;- setImmediateQueue = [];- queue.forEach(function(func) {- func();- });- }- });- setImmediate = function(func) {- setImmediateQueue.push(func);- window.postMessage(sentinel, "*");- };- }- var isScheduled = false;- var scheduledObservers = [];- function scheduleCallback(observer) {- scheduledObservers.push(observer);- if (!isScheduled) {- isScheduled = true;- setImmediate(dispatchCallbacks);- }- }- function wrapIfNeeded(node) {- return window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(node) || node;- }- function dispatchCallbacks() {- isScheduled = false;- var observers = scheduledObservers;- scheduledObservers = [];- observers.sort(function(o1, o2) {- return o1.uid_ - o2.uid_;- });- var anyNonEmpty = false;- observers.forEach(function(observer) {- var queue = observer.takeRecords();- removeTransientObserversFor(observer);- if (queue.length) {- observer.callback_(queue, observer);- anyNonEmpty = true;- }- });- if (anyNonEmpty) dispatchCallbacks();- }- function removeTransientObserversFor(observer) {- observer.nodes_.forEach(function(node) {- var registrations = registrationsTable.get(node);- if (!registrations) return;- registrations.forEach(function(registration) {- if (registration.observer === observer) registration.removeTransientObservers();- });- });- }- function forEachAncestorAndObserverEnqueueRecord(target, callback) {- for (var node = target; node; node = node.parentNode) {- var registrations = registrationsTable.get(node);- if (registrations) {- for (var j = 0; j < registrations.length; j++) {- var registration = registrations[j];- var options = registration.options;- if (node !== target && !options.subtree) continue;- var record = callback(options);- if (record) registration.enqueue(record);- }- }- }- }- var uidCounter = 0;- function JsMutationObserver(callback) {- this.callback_ = callback;- this.nodes_ = [];- this.records_ = [];- this.uid_ = ++uidCounter;- }- JsMutationObserver.prototype = {- observe: function(target, options) {- target = wrapIfNeeded(target);- if (!options.childList && !options.attributes && !options.characterData || options.attributeOldValue && !options.attributes || options.attributeFilter && options.attributeFilter.length && !options.attributes || options.characterDataOldValue && !options.characterData) {- throw new SyntaxError();- }- var registrations = registrationsTable.get(target);- if (!registrations) registrationsTable.set(target, registrations = []);- var registration;- for (var i = 0; i < registrations.length; i++) {- if (registrations[i].observer === this) {- registration = registrations[i];- registration.removeListeners();- registration.options = options;- break;- }- }- if (!registration) {- registration = new Registration(this, target, options);- registrations.push(registration);- this.nodes_.push(target);- }- registration.addListeners();- },- disconnect: function() {- this.nodes_.forEach(function(node) {- var registrations = registrationsTable.get(node);- for (var i = 0; i < registrations.length; i++) {- var registration = registrations[i];- if (registration.observer === this) {- registration.removeListeners();- registrations.splice(i, 1);- break;- }- }- }, this);- this.records_ = [];- },- takeRecords: function() {- var copyOfRecords = this.records_;- this.records_ = [];- return copyOfRecords;- }- };- function MutationRecord(type, target) {- this.type = type;- this.target = target;- this.addedNodes = [];- this.removedNodes = [];- this.previousSibling = null;- this.nextSibling = null;- this.attributeName = null;- this.attributeNamespace = null;- this.oldValue = null;- }- function copyMutationRecord(original) {- var record = new MutationRecord(original.type, original.target);- record.addedNodes = original.addedNodes.slice();- record.removedNodes = original.removedNodes.slice();- record.previousSibling = original.previousSibling;- record.nextSibling = original.nextSibling;- record.attributeName = original.attributeName;- record.attributeNamespace = original.attributeNamespace;- record.oldValue = original.oldValue;- return record;- }- var currentRecord, recordWithOldValue;- function getRecord(type, target) {- return currentRecord = new MutationRecord(type, target);- }- function getRecordWithOldValue(oldValue) {- if (recordWithOldValue) return recordWithOldValue;- recordWithOldValue = copyMutationRecord(currentRecord);- recordWithOldValue.oldValue = oldValue;- return recordWithOldValue;- }- function clearRecords() {- currentRecord = recordWithOldValue = undefined;- }- function recordRepresentsCurrentMutation(record) {- return record === recordWithOldValue || record === currentRecord;- }- function selectRecord(lastRecord, newRecord) {- if (lastRecord === newRecord) return lastRecord;- if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord)) return recordWithOldValue;- return null;- }- function Registration(observer, target, options) {- this.observer = observer;- this.target = target;- this.options = options;- this.transientObservedNodes = [];- }- Registration.prototype = {- enqueue: function(record) {- var records = this.observer.records_;- var length = records.length;- if (records.length > 0) {- var lastRecord = records[length - 1];- var recordToReplaceLast = selectRecord(lastRecord, record);- if (recordToReplaceLast) {- records[length - 1] = recordToReplaceLast;- return;- }- } else {- scheduleCallback(this.observer);- }- records[length] = record;- },- addListeners: function() {- this.addListeners_(this.target);- },- addListeners_: function(node) {- var options = this.options;- if (options.attributes) node.addEventListener("DOMAttrModified", this, true);- if (options.characterData) node.addEventListener("DOMCharacterDataModified", this, true);- if (options.childList) node.addEventListener("DOMNodeInserted", this, true);- if (options.childList || options.subtree) node.addEventListener("DOMNodeRemoved", this, true);- },- removeListeners: function() {- this.removeListeners_(this.target);- },- removeListeners_: function(node) {- var options = this.options;- if (options.attributes) node.removeEventListener("DOMAttrModified", this, true);- if (options.characterData) node.removeEventListener("DOMCharacterDataModified", this, true);- if (options.childList) node.removeEventListener("DOMNodeInserted", this, true);- if (options.childList || options.subtree) node.removeEventListener("DOMNodeRemoved", this, true);- },- addTransientObserver: function(node) {- if (node === this.target) return;- this.addListeners_(node);- this.transientObservedNodes.push(node);- var registrations = registrationsTable.get(node);- if (!registrations) registrationsTable.set(node, registrations = []);- registrations.push(this);- },- removeTransientObservers: function() {- var transientObservedNodes = this.transientObservedNodes;- this.transientObservedNodes = [];- transientObservedNodes.forEach(function(node) {- this.removeListeners_(node);- var registrations = registrationsTable.get(node);- for (var i = 0; i < registrations.length; i++) {- if (registrations[i] === this) {- registrations.splice(i, 1);- break;- }- }- }, this);- },- handleEvent: function(e) {- e.stopImmediatePropagation();- switch (e.type) {- case "DOMAttrModified":- var name = e.attrName;- var namespace = e.relatedNode.namespaceURI;- var target = e.target;- var record = new getRecord("attributes", target);- record.attributeName = name;- record.attributeNamespace = namespace;- var oldValue = e.attrChange === MutationEvent.ADDITION ? null : e.prevValue;- forEachAncestorAndObserverEnqueueRecord(target, function(options) {- if (!options.attributes) return;- if (options.attributeFilter && options.attributeFilter.length && options.attributeFilter.indexOf(name) === -1 && options.attributeFilter.indexOf(namespace) === -1) {- return;- }- if (options.attributeOldValue) return getRecordWithOldValue(oldValue);- return record;- });- break;-- case "DOMCharacterDataModified":- var target = e.target;- var record = getRecord("characterData", target);- var oldValue = e.prevValue;- forEachAncestorAndObserverEnqueueRecord(target, function(options) {- if (!options.characterData) return;- if (options.characterDataOldValue) return getRecordWithOldValue(oldValue);- return record;- });- break;-- case "DOMNodeRemoved":- this.addTransientObserver(e.target);-- case "DOMNodeInserted":- var changedNode = e.target;- var addedNodes, removedNodes;- if (e.type === "DOMNodeInserted") {- addedNodes = [ changedNode ];- removedNodes = [];- } else {- addedNodes = [];- removedNodes = [ changedNode ];- }- var previousSibling = changedNode.previousSibling;- var nextSibling = changedNode.nextSibling;- var record = getRecord("childList", e.target.parentNode);- record.addedNodes = addedNodes;- record.removedNodes = removedNodes;- record.previousSibling = previousSibling;- record.nextSibling = nextSibling;- forEachAncestorAndObserverEnqueueRecord(e.relatedNode, function(options) {- if (!options.childList) return;- return record;- });- }- clearRecords();- }- };- global.JsMutationObserver = JsMutationObserver;- if (!global.MutationObserver) {- global.MutationObserver = JsMutationObserver;- JsMutationObserver._isPolyfilled = true;- }-})(self);--(function() {- var needsTemplate = typeof HTMLTemplateElement === "undefined";- if (/Trident/.test(navigator.userAgent)) {- (function() {- var importNode = document.importNode;- document.importNode = function() {- var n = importNode.apply(document, arguments);- if (n.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {- var f = document.createDocumentFragment();- f.appendChild(n);- return f;- } else {- return n;- }- };- })();- }- var needsCloning = function() {- if (!needsTemplate) {- var t = document.createElement("template");- var t2 = document.createElement("template");- t2.content.appendChild(document.createElement("div"));- t.content.appendChild(t2);- var clone = t.cloneNode(true);- return clone.content.childNodes.length === 0 || clone.content.firstChild.content.childNodes.length === 0;- }- }();- var TEMPLATE_TAG = "template";- var TemplateImpl = function() {};- if (needsTemplate) {- var contentDoc = document.implementation.createHTMLDocument("template");- var canDecorate = true;- var templateStyle = document.createElement("style");- templateStyle.textContent = TEMPLATE_TAG + "{display:none;}";- var head = document.head;- head.insertBefore(templateStyle, head.firstElementChild);- TemplateImpl.prototype = Object.create(HTMLElement.prototype);- TemplateImpl.decorate = function(template) {- if (template.content) {- return;- }- template.content = contentDoc.createDocumentFragment();- var child;- while (child = template.firstChild) {- template.content.appendChild(child);- }- template.cloneNode = function(deep) {- return TemplateImpl.cloneNode(this, deep);- };- if (canDecorate) {- try {- Object.defineProperty(template, "innerHTML", {- get: function() {- var o = "";- for (var e = this.content.firstChild; e; e = e.nextSibling) {- o += e.outerHTML || escapeData(e.data);- }- return o;- },- set: function(text) {- contentDoc.body.innerHTML = text;- TemplateImpl.bootstrap(contentDoc);- while (this.content.firstChild) {- this.content.removeChild(this.content.firstChild);- }- while (contentDoc.body.firstChild) {- this.content.appendChild(contentDoc.body.firstChild);- }- },- configurable: true- });- } catch (err) {- canDecorate = false;- }- }- TemplateImpl.bootstrap(template.content);- };- TemplateImpl.bootstrap = function(doc) {- var templates = doc.querySelectorAll(TEMPLATE_TAG);- for (var i = 0, l = templates.length, t; i < l && (t = templates[i]); i++) {- TemplateImpl.decorate(t);- }- };- document.addEventListener("DOMContentLoaded", function() {- TemplateImpl.bootstrap(document);- });- var createElement = document.createElement;- document.createElement = function() {- "use strict";- var el = createElement.apply(document, arguments);- if (el.localName === "template") {- TemplateImpl.decorate(el);- }- return el;- };- var escapeDataRegExp = /[&\u00A0<>]/g;- function escapeReplace(c) {- switch (c) {- case "&":- return "&";-- case "<":- return "<";-- case ">":- return ">";-- case " ":- return " ";- }- }- function escapeData(s) {- return s.replace(escapeDataRegExp, escapeReplace);- }- }- if (needsTemplate || needsCloning) {- var nativeCloneNode = Node.prototype.cloneNode;- TemplateImpl.cloneNode = function(template, deep) {- var clone = nativeCloneNode.call(template, false);- if (this.decorate) {- this.decorate(clone);- }- if (deep) {- clone.content.appendChild(nativeCloneNode.call(template.content, true));- this.fixClonedDom(clone.content, template.content);- }- return clone;- };- TemplateImpl.fixClonedDom = function(clone, source) {- if (!source.querySelectorAll) return;- var s$ = source.querySelectorAll(TEMPLATE_TAG);- var t$ = clone.querySelectorAll(TEMPLATE_TAG);- for (var i = 0, l = t$.length, t, s; i < l; i++) {- s = s$[i];- t = t$[i];- if (this.decorate) {- this.decorate(s);- }- t.parentNode.replaceChild(s.cloneNode(true), t);- }- };- var originalImportNode = document.importNode;- Node.prototype.cloneNode = function(deep) {- var dom = nativeCloneNode.call(this, deep);- if (deep) {- TemplateImpl.fixClonedDom(dom, this);- }- return dom;- };- document.importNode = function(element, deep) {- if (element.localName === TEMPLATE_TAG) {- return TemplateImpl.cloneNode(element, deep);- } else {- var dom = originalImportNode.call(document, element, deep);- if (deep) {- TemplateImpl.fixClonedDom(dom, element);- }- return dom;- }- };- if (needsCloning) {- HTMLTemplateElement.prototype.cloneNode = function(deep) {- return TemplateImpl.cloneNode(this, deep);- };- }- }- if (needsTemplate) {- window.HTMLTemplateElement = TemplateImpl;- }-})();--(function(scope) {- "use strict";- if (!(window.performance && window.performance.now)) {- var start = Date.now();- window.performance = {- now: function() {- return Date.now() - start;- }- };- }- if (!window.requestAnimationFrame) {- window.requestAnimationFrame = function() {- var nativeRaf = window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame;- return nativeRaf ? function(callback) {- return nativeRaf(function() {- callback(performance.now());- });- } : function(callback) {- return window.setTimeout(callback, 1e3 / 60);- };- }();- }- if (!window.cancelAnimationFrame) {- window.cancelAnimationFrame = function() {- return window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || function(id) {- clearTimeout(id);- };- }();- }- var workingDefaultPrevented = function() {- var e = document.createEvent("Event");- e.initEvent("foo", true, true);- e.preventDefault();- return e.defaultPrevented;- }();- if (!workingDefaultPrevented) {- var origPreventDefault = Event.prototype.preventDefault;- Event.prototype.preventDefault = function() {- if (!this.cancelable) {- return;- }- origPreventDefault.call(this);- Object.defineProperty(this, "defaultPrevented", {- get: function() {- return true;- },- configurable: true- });- };- }- var isIE = /Trident/.test(navigator.userAgent);- if (!window.CustomEvent || isIE && typeof window.CustomEvent !== "function") {- window.CustomEvent = function(inType, params) {- params = params || {};- var e = document.createEvent("CustomEvent");- e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);- return e;- };- window.CustomEvent.prototype = window.Event.prototype;- }- if (!window.Event || isIE && typeof window.Event !== "function") {- var origEvent = window.Event;- window.Event = function(inType, params) {- params = params || {};- var e = document.createEvent("Event");- e.initEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable));- return e;- };- window.Event.prototype = origEvent.prototype;- }-})(window.WebComponents);--window.HTMLImports = window.HTMLImports || {- flags: {}-};--(function(scope) {- var IMPORT_LINK_TYPE = "import";- var useNative = Boolean(IMPORT_LINK_TYPE in document.createElement("link"));- var hasShadowDOMPolyfill = Boolean(window.ShadowDOMPolyfill);- var wrap = function(node) {- return hasShadowDOMPolyfill ? window.ShadowDOMPolyfill.wrapIfNeeded(node) : node;- };- var rootDocument = wrap(document);- var currentScriptDescriptor = {- get: function() {- var script = window.HTMLImports.currentScript || document.currentScript || (document.readyState !== "complete" ? document.scripts[document.scripts.length - 1] : null);- return wrap(script);- },- configurable: true- };- Object.defineProperty(document, "_currentScript", currentScriptDescriptor);- Object.defineProperty(rootDocument, "_currentScript", currentScriptDescriptor);- var isIE = /Trident/.test(navigator.userAgent);- function whenReady(callback, doc) {- doc = doc || rootDocument;- whenDocumentReady(function() {- watchImportsLoad(callback, doc);- }, doc);- }- var requiredReadyState = isIE ? "complete" : "interactive";- var READY_EVENT = "readystatechange";- function isDocumentReady(doc) {- return doc.readyState === "complete" || doc.readyState === requiredReadyState;- }- function whenDocumentReady(callback, doc) {- if (!isDocumentReady(doc)) {- var checkReady = function() {- if (doc.readyState === "complete" || doc.readyState === requiredReadyState) {- doc.removeEventListener(READY_EVENT, checkReady);- whenDocumentReady(callback, doc);- }- };- doc.addEventListener(READY_EVENT, checkReady);- } else if (callback) {- callback();- }- }- function markTargetLoaded(event) {- event.target.__loaded = true;- }- function watchImportsLoad(callback, doc) {- var imports = doc.querySelectorAll("link[rel=import]");- var parsedCount = 0, importCount = imports.length, newImports = [], errorImports = [];- function checkDone() {- if (parsedCount == importCount && callback) {- callback({- allImports: imports,- loadedImports: newImports,- errorImports: errorImports- });- }- }- function loadedImport(e) {- markTargetLoaded(e);- newImports.push(this);- parsedCount++;- checkDone();- }- function errorLoadingImport(e) {- errorImports.push(this);- parsedCount++;- checkDone();- }- if (importCount) {- for (var i = 0, imp; i < importCount && (imp = imports[i]); i++) {- if (isImportLoaded(imp)) {- newImports.push(this);- parsedCount++;- checkDone();- } else {- imp.addEventListener("load", loadedImport);- imp.addEventListener("error", errorLoadingImport);- }- }- } else {- checkDone();- }- }- function isImportLoaded(link) {- return useNative ? link.__loaded || link.import && link.import.readyState !== "loading" : link.__importParsed;- }- if (useNative) {- new MutationObserver(function(mxns) {- for (var i = 0, l = mxns.length, m; i < l && (m = mxns[i]); i++) {- if (m.addedNodes) {- handleImports(m.addedNodes);- }- }- }).observe(document.head, {- childList: true- });- function handleImports(nodes) {- for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {- if (isImport(n)) {- handleImport(n);- }- }- }- function isImport(element) {- return element.localName === "link" && element.rel === "import";- }- function handleImport(element) {- var loaded = element.import;- if (loaded) {- markTargetLoaded({- target: element- });- } else {- element.addEventListener("load", markTargetLoaded);- element.addEventListener("error", markTargetLoaded);- }- }- (function() {- if (document.readyState === "loading") {- var imports = document.querySelectorAll("link[rel=import]");- for (var i = 0, l = imports.length, imp; i < l && (imp = imports[i]); i++) {- handleImport(imp);- }- }- })();- }- whenReady(function(detail) {- window.HTMLImports.ready = true;- window.HTMLImports.readyTime = new Date().getTime();- var evt = rootDocument.createEvent("CustomEvent");- evt.initCustomEvent("HTMLImportsLoaded", true, true, detail);- rootDocument.dispatchEvent(evt);- });- scope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE;- scope.useNative = useNative;- scope.rootDocument = rootDocument;- scope.whenReady = whenReady;- scope.isIE = isIE;-})(window.HTMLImports);--(function(scope) {- var modules = [];- var addModule = function(module) {- modules.push(module);- };- var initializeModules = function() {- modules.forEach(function(module) {- module(scope);- });- };- scope.addModule = addModule;- scope.initializeModules = initializeModules;-})(window.HTMLImports);--window.HTMLImports.addModule(function(scope) {- var CSS_URL_REGEXP = /(url\()([^)]*)(\))/g;- var CSS_IMPORT_REGEXP = /(@import[\s]+(?!url\())([^;]*)(;)/g;- var path = {- resolveUrlsInStyle: function(style, linkUrl) {- var doc = style.ownerDocument;- var resolver = doc.createElement("a");- style.textContent = this.resolveUrlsInCssText(style.textContent, linkUrl, resolver);- return style;- },- resolveUrlsInCssText: function(cssText, linkUrl, urlObj) {- var r = this.replaceUrls(cssText, urlObj, linkUrl, CSS_URL_REGEXP);- r = this.replaceUrls(r, urlObj, linkUrl, CSS_IMPORT_REGEXP);- return r;- },- replaceUrls: function(text, urlObj, linkUrl, regexp) {- return text.replace(regexp, function(m, pre, url, post) {- var urlPath = url.replace(/["']/g, "");- if (linkUrl) {- urlPath = new URL(urlPath, linkUrl).href;- }- urlObj.href = urlPath;- urlPath = urlObj.href;- return pre + "'" + urlPath + "'" + post;- });- }- };- scope.path = path;-});--window.HTMLImports.addModule(function(scope) {- var xhr = {- async: true,- ok: function(request) {- return request.status >= 200 && request.status < 300 || request.status === 304 || request.status === 0;- },- load: function(url, next, nextContext) {- var request = new XMLHttpRequest();- if (scope.flags.debug || scope.flags.bust) {- url += "?" + Math.random();- }- request.open("GET", url, xhr.async);- request.addEventListener("readystatechange", function(e) {- if (request.readyState === 4) {- var redirectedUrl = null;- try {- var locationHeader = request.getResponseHeader("Location");- if (locationHeader) {- redirectedUrl = locationHeader.substr(0, 1) === "/" ? location.origin + locationHeader : locationHeader;- }- } catch (e) {- console.error(e.message);- }- next.call(nextContext, !xhr.ok(request) && request, request.response || request.responseText, redirectedUrl);- }- });- request.send();- return request;- },- loadDocument: function(url, next, nextContext) {- this.load(url, next, nextContext).responseType = "document";- }- };- scope.xhr = xhr;-});--window.HTMLImports.addModule(function(scope) {- var xhr = scope.xhr;- var flags = scope.flags;- var Loader = function(onLoad, onComplete) {- this.cache = {};- this.onload = onLoad;- this.oncomplete = onComplete;- this.inflight = 0;- this.pending = {};- };- Loader.prototype = {- addNodes: function(nodes) {- this.inflight += nodes.length;- for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {- this.require(n);- }- this.checkDone();- },- addNode: function(node) {- this.inflight++;- this.require(node);- this.checkDone();- },- require: function(elt) {- var url = elt.src || elt.href;- elt.__nodeUrl = url;- if (!this.dedupe(url, elt)) {- this.fetch(url, elt);- }- },- dedupe: function(url, elt) {- if (this.pending[url]) {- this.pending[url].push(elt);- return true;- }- var resource;- if (this.cache[url]) {- this.onload(url, elt, this.cache[url]);- this.tail();- return true;- }- this.pending[url] = [ elt ];- return false;- },- fetch: function(url, elt) {- flags.load && console.log("fetch", url, elt);- if (!url) {- setTimeout(function() {- this.receive(url, elt, {- error: "href must be specified"- }, null);- }.bind(this), 0);- } else if (url.match(/^data:/)) {- var pieces = url.split(",");- var header = pieces[0];- var body = pieces[1];- if (header.indexOf(";base64") > -1) {- body = atob(body);- } else {- body = decodeURIComponent(body);- }- setTimeout(function() {- this.receive(url, elt, null, body);- }.bind(this), 0);- } else {- var receiveXhr = function(err, resource, redirectedUrl) {- this.receive(url, elt, err, resource, redirectedUrl);- }.bind(this);- xhr.load(url, receiveXhr);- }- },- receive: function(url, elt, err, resource, redirectedUrl) {- this.cache[url] = resource;- var $p = this.pending[url];- for (var i = 0, l = $p.length, p; i < l && (p = $p[i]); i++) {- this.onload(url, p, resource, err, redirectedUrl);- this.tail();- }- this.pending[url] = null;- },- tail: function() {- --this.inflight;- this.checkDone();- },- checkDone: function() {- if (!this.inflight) {- this.oncomplete();- }- }- };- scope.Loader = Loader;-});--window.HTMLImports.addModule(function(scope) {- var Observer = function(addCallback) {- this.addCallback = addCallback;- this.mo = new MutationObserver(this.handler.bind(this));- };- Observer.prototype = {- handler: function(mutations) {- for (var i = 0, l = mutations.length, m; i < l && (m = mutations[i]); i++) {- if (m.type === "childList" && m.addedNodes.length) {- this.addedNodes(m.addedNodes);- }- }- },- addedNodes: function(nodes) {- if (this.addCallback) {- this.addCallback(nodes);- }- for (var i = 0, l = nodes.length, n, loading; i < l && (n = nodes[i]); i++) {- if (n.children && n.children.length) {- this.addedNodes(n.children);- }- }- },- observe: function(root) {- this.mo.observe(root, {- childList: true,- subtree: true- });- }- };- scope.Observer = Observer;-});--window.HTMLImports.addModule(function(scope) {- var path = scope.path;- var rootDocument = scope.rootDocument;- var flags = scope.flags;- var isIE = scope.isIE;- var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;- var IMPORT_SELECTOR = "link[rel=" + IMPORT_LINK_TYPE + "]";- var importParser = {- documentSelectors: IMPORT_SELECTOR,- importsSelectors: [ IMPORT_SELECTOR, "link[rel=stylesheet]:not([type])", "style:not([type])", "script:not([type])", 'script[type="application/javascript"]', 'script[type="text/javascript"]' ].join(","),- map: {- link: "parseLink",- script: "parseScript",- style: "parseStyle"- },- dynamicElements: [],- parseNext: function() {- var next = this.nextToParse();- if (next) {- this.parse(next);- }- },- parse: function(elt) {- if (this.isParsed(elt)) {- flags.parse && console.log("[%s] is already parsed", elt.localName);- return;- }- var fn = this[this.map[elt.localName]];- if (fn) {- this.markParsing(elt);- fn.call(this, elt);- }- },- parseDynamic: function(elt, quiet) {- this.dynamicElements.push(elt);- if (!quiet) {- this.parseNext();- }- },- markParsing: function(elt) {- flags.parse && console.log("parsing", elt);- this.parsingElement = elt;- },- markParsingComplete: function(elt) {- elt.__importParsed = true;- this.markDynamicParsingComplete(elt);- if (elt.__importElement) {- elt.__importElement.__importParsed = true;- this.markDynamicParsingComplete(elt.__importElement);- }- this.parsingElement = null;- flags.parse && console.log("completed", elt);- },- markDynamicParsingComplete: function(elt) {- var i = this.dynamicElements.indexOf(elt);- if (i >= 0) {- this.dynamicElements.splice(i, 1);- }- },- parseImport: function(elt) {- elt.import = elt.__doc;- if (window.HTMLImports.__importsParsingHook) {- window.HTMLImports.__importsParsingHook(elt);- }- if (elt.import) {- elt.import.__importParsed = true;- }- this.markParsingComplete(elt);- if (elt.__resource && !elt.__error) {- elt.dispatchEvent(new CustomEvent("load", {- bubbles: false- }));- } else {- elt.dispatchEvent(new CustomEvent("error", {- bubbles: false- }));- }- if (elt.__pending) {- var fn;- while (elt.__pending.length) {- fn = elt.__pending.shift();- if (fn) {- fn({- target: elt- });- }- }- }- this.parseNext();- },- parseLink: function(linkElt) {- if (nodeIsImport(linkElt)) {- this.parseImport(linkElt);- } else {- linkElt.href = linkElt.href;- this.parseGeneric(linkElt);- }- },- parseStyle: function(elt) {- var src = elt;- elt = cloneStyle(elt);- src.__appliedElement = elt;- elt.__importElement = src;- this.parseGeneric(elt);- },- parseGeneric: function(elt) {- this.trackElement(elt);- this.addElementToDocument(elt);- },- rootImportForElement: function(elt) {- var n = elt;- while (n.ownerDocument.__importLink) {- n = n.ownerDocument.__importLink;- }- return n;- },- addElementToDocument: function(elt) {- var port = this.rootImportForElement(elt.__importElement || elt);- port.parentNode.insertBefore(elt, port);- },- trackElement: function(elt, callback) {- var self = this;- var done = function(e) {- elt.removeEventListener("load", done);- elt.removeEventListener("error", done);- if (callback) {- callback(e);- }- self.markParsingComplete(elt);- self.parseNext();- };- elt.addEventListener("load", done);- elt.addEventListener("error", done);- if (isIE && elt.localName === "style") {- var fakeLoad = false;- if (elt.textContent.indexOf("@import") == -1) {- fakeLoad = true;- } else if (elt.sheet) {- fakeLoad = true;- var csr = elt.sheet.cssRules;- var len = csr ? csr.length : 0;- for (var i = 0, r; i < len && (r = csr[i]); i++) {- if (r.type === CSSRule.IMPORT_RULE) {- fakeLoad = fakeLoad && Boolean(r.styleSheet);- }- }- }- if (fakeLoad) {- setTimeout(function() {- elt.dispatchEvent(new CustomEvent("load", {- bubbles: false- }));- });- }- }- },- parseScript: function(scriptElt) {- var script = document.createElement("script");- script.__importElement = scriptElt;- script.src = scriptElt.src ? scriptElt.src : generateScriptDataUrl(scriptElt);- scope.currentScript = scriptElt;- this.trackElement(script, function(e) {- if (script.parentNode) {- script.parentNode.removeChild(script);- }- scope.currentScript = null;- });- this.addElementToDocument(script);- },- nextToParse: function() {- this._mayParse = [];- return !this.parsingElement && (this.nextToParseInDoc(rootDocument) || this.nextToParseDynamic());- },- nextToParseInDoc: function(doc, link) {- if (doc && this._mayParse.indexOf(doc) < 0) {- this._mayParse.push(doc);- var nodes = doc.querySelectorAll(this.parseSelectorsForNode(doc));- for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {- if (!this.isParsed(n)) {- if (this.hasResource(n)) {- return nodeIsImport(n) ? this.nextToParseInDoc(n.__doc, n) : n;- } else {- return;- }- }- }- }- return link;- },- nextToParseDynamic: function() {- return this.dynamicElements[0];- },- parseSelectorsForNode: function(node) {- var doc = node.ownerDocument || node;- return doc === rootDocument ? this.documentSelectors : this.importsSelectors;- },- isParsed: function(node) {- return node.__importParsed;- },- needsDynamicParsing: function(elt) {- return this.dynamicElements.indexOf(elt) >= 0;- },- hasResource: function(node) {- if (nodeIsImport(node) && node.__doc === undefined) {- return false;- }- return true;- }- };- function nodeIsImport(elt) {- return elt.localName === "link" && elt.rel === IMPORT_LINK_TYPE;- }- function generateScriptDataUrl(script) {- var scriptContent = generateScriptContent(script);- return "data:text/javascript;charset=utf-8," + encodeURIComponent(scriptContent);- }- function generateScriptContent(script) {- return script.textContent + generateSourceMapHint(script);- }- function generateSourceMapHint(script) {- var owner = script.ownerDocument;- owner.__importedScripts = owner.__importedScripts || 0;- var moniker = script.ownerDocument.baseURI;- var num = owner.__importedScripts ? "-" + owner.__importedScripts : "";- owner.__importedScripts++;- return "\n//# sourceURL=" + moniker + num + ".js\n";- }- function cloneStyle(style) {- var clone = style.ownerDocument.createElement("style");- clone.textContent = style.textContent;- path.resolveUrlsInStyle(clone);- return clone;- }- scope.parser = importParser;- scope.IMPORT_SELECTOR = IMPORT_SELECTOR;-});--window.HTMLImports.addModule(function(scope) {- var flags = scope.flags;- var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;- var IMPORT_SELECTOR = scope.IMPORT_SELECTOR;- var rootDocument = scope.rootDocument;- var Loader = scope.Loader;- var Observer = scope.Observer;- var parser = scope.parser;- var importer = {- documents: {},- documentPreloadSelectors: IMPORT_SELECTOR,- importsPreloadSelectors: [ IMPORT_SELECTOR ].join(","),- loadNode: function(node) {- importLoader.addNode(node);- },- loadSubtree: function(parent) {- var nodes = this.marshalNodes(parent);- importLoader.addNodes(nodes);- },- marshalNodes: function(parent) {- return parent.querySelectorAll(this.loadSelectorsForNode(parent));- },- loadSelectorsForNode: function(node) {- var doc = node.ownerDocument || node;- return doc === rootDocument ? this.documentPreloadSelectors : this.importsPreloadSelectors;- },- loaded: function(url, elt, resource, err, redirectedUrl) {- flags.load && console.log("loaded", url, elt);- elt.__resource = resource;- elt.__error = err;- if (isImportLink(elt)) {- var doc = this.documents[url];- if (doc === undefined) {- doc = err ? null : makeDocument(resource, redirectedUrl || url);- if (doc) {- doc.__importLink = elt;- this.bootDocument(doc);- }- this.documents[url] = doc;- }- elt.__doc = doc;- }- parser.parseNext();- },- bootDocument: function(doc) {- this.loadSubtree(doc);- this.observer.observe(doc);- parser.parseNext();- },- loadedAll: function() {- parser.parseNext();- }- };- var importLoader = new Loader(importer.loaded.bind(importer), importer.loadedAll.bind(importer));- importer.observer = new Observer();- function isImportLink(elt) {- return isLinkRel(elt, IMPORT_LINK_TYPE);- }- function isLinkRel(elt, rel) {- return elt.localName === "link" && elt.getAttribute("rel") === rel;- }- function hasBaseURIAccessor(doc) {- return !!Object.getOwnPropertyDescriptor(doc, "baseURI");- }- function makeDocument(resource, url) {- var doc = document.implementation.createHTMLDocument(IMPORT_LINK_TYPE);- doc._URL = url;- var base = doc.createElement("base");- base.setAttribute("href", url);- if (!doc.baseURI && !hasBaseURIAccessor(doc)) {- Object.defineProperty(doc, "baseURI", {- value: url- });- }- var meta = doc.createElement("meta");- meta.setAttribute("charset", "utf-8");- doc.head.appendChild(meta);- doc.head.appendChild(base);- doc.body.innerHTML = resource;- if (window.HTMLTemplateElement && HTMLTemplateElement.bootstrap) {- HTMLTemplateElement.bootstrap(doc);- }- return doc;- }- if (!document.baseURI) {- var baseURIDescriptor = {- get: function() {- var base = document.querySelector("base");- return base ? base.href : window.location.href;- },- configurable: true- };- Object.defineProperty(document, "baseURI", baseURIDescriptor);- Object.defineProperty(rootDocument, "baseURI", baseURIDescriptor);- }- scope.importer = importer;- scope.importLoader = importLoader;-});--window.HTMLImports.addModule(function(scope) {- var parser = scope.parser;- var importer = scope.importer;- var dynamic = {- added: function(nodes) {- var owner, parsed, loading;- for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {- if (!owner) {- owner = n.ownerDocument;- parsed = parser.isParsed(owner);- }- loading = this.shouldLoadNode(n);- if (loading) {- importer.loadNode(n);- }- if (this.shouldParseNode(n) && parsed) {- parser.parseDynamic(n, loading);- }- }- },- shouldLoadNode: function(node) {- return node.nodeType === 1 && matches.call(node, importer.loadSelectorsForNode(node));- },- shouldParseNode: function(node) {- return node.nodeType === 1 && matches.call(node, parser.parseSelectorsForNode(node));- }- };- importer.observer.addCallback = dynamic.added.bind(dynamic);- var matches = HTMLElement.prototype.matches || HTMLElement.prototype.matchesSelector || HTMLElement.prototype.webkitMatchesSelector || HTMLElement.prototype.mozMatchesSelector || HTMLElement.prototype.msMatchesSelector;-});--(function(scope) {- var initializeModules = scope.initializeModules;- var isIE = scope.isIE;- if (scope.useNative) {- return;- }- initializeModules();- var rootDocument = scope.rootDocument;- function bootstrap() {- window.HTMLImports.importer.bootDocument(rootDocument);- }- if (document.readyState === "complete" || document.readyState === "interactive" && !window.attachEvent) {- bootstrap();- } else {- document.addEventListener("DOMContentLoaded", bootstrap);- }-})(window.HTMLImports);--window.CustomElements = window.CustomElements || {- flags: {}-};--(function(scope) {- var flags = scope.flags;- var modules = [];- var addModule = function(module) {- modules.push(module);- };- var initializeModules = function() {- modules.forEach(function(module) {- module(scope);- });- };- scope.addModule = addModule;- scope.initializeModules = initializeModules;- scope.hasNative = Boolean(document.registerElement);- scope.isIE = /Trident/.test(navigator.userAgent);- scope.useNative = !flags.register && scope.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || window.HTMLImports.useNative);-})(window.CustomElements);--window.CustomElements.addModule(function(scope) {- var IMPORT_LINK_TYPE = window.HTMLImports ? window.HTMLImports.IMPORT_LINK_TYPE : "none";- function forSubtree(node, cb) {- findAllElements(node, function(e) {- if (cb(e)) {- return true;- }- forRoots(e, cb);- });- forRoots(node, cb);- }- function findAllElements(node, find, data) {- var e = node.firstElementChild;- if (!e) {- e = node.firstChild;- while (e && e.nodeType !== Node.ELEMENT_NODE) {- e = e.nextSibling;- }- }- while (e) {- if (find(e, data) !== true) {- findAllElements(e, find, data);- }- e = e.nextElementSibling;- }- return null;- }- function forRoots(node, cb) {- var root = node.shadowRoot;- while (root) {- forSubtree(root, cb);- root = root.olderShadowRoot;- }- }- function forDocumentTree(doc, cb) {- _forDocumentTree(doc, cb, []);- }- function _forDocumentTree(doc, cb, processingDocuments) {- doc = window.wrap(doc);- if (processingDocuments.indexOf(doc) >= 0) {- return;- }- processingDocuments.push(doc);- var imports = doc.querySelectorAll("link[rel=" + IMPORT_LINK_TYPE + "]");- for (var i = 0, l = imports.length, n; i < l && (n = imports[i]); i++) {- if (n.import) {- _forDocumentTree(n.import, cb, processingDocuments);- }- }- cb(doc);- }- scope.forDocumentTree = forDocumentTree;- scope.forSubtree = forSubtree;-});--window.CustomElements.addModule(function(scope) {- var flags = scope.flags;- var forSubtree = scope.forSubtree;- var forDocumentTree = scope.forDocumentTree;- function addedNode(node, isAttached) {- return added(node, isAttached) || addedSubtree(node, isAttached);- }- function added(node, isAttached) {- if (scope.upgrade(node, isAttached)) {- return true;- }- if (isAttached) {- attached(node);- }- }- function addedSubtree(node, isAttached) {- forSubtree(node, function(e) {- if (added(e, isAttached)) {- return true;- }- });- }- var hasThrottledAttached = window.MutationObserver._isPolyfilled && flags["throttle-attached"];- scope.hasPolyfillMutations = hasThrottledAttached;- scope.hasThrottledAttached = hasThrottledAttached;- var isPendingMutations = false;- var pendingMutations = [];- function deferMutation(fn) {- pendingMutations.push(fn);- if (!isPendingMutations) {- isPendingMutations = true;- setTimeout(takeMutations);- }- }- function takeMutations() {- isPendingMutations = false;- var $p = pendingMutations;- for (var i = 0, l = $p.length, p; i < l && (p = $p[i]); i++) {- p();- }- pendingMutations = [];- }- function attached(element) {- if (hasThrottledAttached) {- deferMutation(function() {- _attached(element);- });- } else {- _attached(element);- }- }- function _attached(element) {- if (element.__upgraded__ && !element.__attached) {- element.__attached = true;- if (element.attachedCallback) {- element.attachedCallback();- }- }- }- function detachedNode(node) {- detached(node);- forSubtree(node, function(e) {- detached(e);- });- }- function detached(element) {- if (hasThrottledAttached) {- deferMutation(function() {- _detached(element);- });- } else {- _detached(element);- }- }- function _detached(element) {- if (element.__upgraded__ && element.__attached) {- element.__attached = false;- if (element.detachedCallback) {- element.detachedCallback();- }- }- }- function inDocument(element) {- var p = element;- var doc = window.wrap(document);- while (p) {- if (p == doc) {- return true;- }- p = p.parentNode || p.nodeType === Node.DOCUMENT_FRAGMENT_NODE && p.host;- }- }- function watchShadow(node) {- if (node.shadowRoot && !node.shadowRoot.__watched) {- flags.dom && console.log("watching shadow-root for: ", node.localName);- var root = node.shadowRoot;- while (root) {- observe(root);- root = root.olderShadowRoot;- }- }- }- function handler(root, mutations) {- if (flags.dom) {- var mx = mutations[0];- if (mx && mx.type === "childList" && mx.addedNodes) {- if (mx.addedNodes) {- var d = mx.addedNodes[0];- while (d && d !== document && !d.host) {- d = d.parentNode;- }- var u = d && (d.URL || d._URL || d.host && d.host.localName) || "";- u = u.split("/?").shift().split("/").pop();- }- }- console.group("mutations (%d) [%s]", mutations.length, u || "");- }- var isAttached = inDocument(root);- mutations.forEach(function(mx) {- if (mx.type === "childList") {- forEach(mx.addedNodes, function(n) {- if (!n.localName) {- return;- }- addedNode(n, isAttached);- });- forEach(mx.removedNodes, function(n) {- if (!n.localName) {- return;- }- detachedNode(n);- });- }- });- flags.dom && console.groupEnd();- }- function takeRecords(node) {- node = window.wrap(node);- if (!node) {- node = window.wrap(document);- }- while (node.parentNode) {- node = node.parentNode;- }- var observer = node.__observer;- if (observer) {- handler(node, observer.takeRecords());- takeMutations();- }- }- var forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);- function observe(inRoot) {- if (inRoot.__observer) {- return;- }- var observer = new MutationObserver(handler.bind(this, inRoot));- observer.observe(inRoot, {- childList: true,- subtree: true- });- inRoot.__observer = observer;- }- function upgradeDocument(doc) {- doc = window.wrap(doc);- flags.dom && console.group("upgradeDocument: ", doc.baseURI.split("/").pop());- var isMainDocument = doc === window.wrap(document);- addedNode(doc, isMainDocument);- observe(doc);- flags.dom && console.groupEnd();- }- function upgradeDocumentTree(doc) {- forDocumentTree(doc, upgradeDocument);- }- var originalCreateShadowRoot = Element.prototype.createShadowRoot;- if (originalCreateShadowRoot) {- Element.prototype.createShadowRoot = function() {- var root = originalCreateShadowRoot.call(this);- window.CustomElements.watchShadow(this);- return root;- };- }- scope.watchShadow = watchShadow;- scope.upgradeDocumentTree = upgradeDocumentTree;- scope.upgradeDocument = upgradeDocument;- scope.upgradeSubtree = addedSubtree;- scope.upgradeAll = addedNode;- scope.attached = attached;- scope.takeRecords = takeRecords;-});--window.CustomElements.addModule(function(scope) {- var flags = scope.flags;- function upgrade(node, isAttached) {- if (node.localName === "template") {- if (window.HTMLTemplateElement && HTMLTemplateElement.decorate) {- HTMLTemplateElement.decorate(node);- }- }- if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) {- var is = node.getAttribute("is");- var definition = scope.getRegisteredDefinition(node.localName) || scope.getRegisteredDefinition(is);- if (definition) {- if (is && definition.tag == node.localName || !is && !definition.extends) {- return upgradeWithDefinition(node, definition, isAttached);- }- }- }- }- function upgradeWithDefinition(element, definition, isAttached) {- flags.upgrade && console.group("upgrade:", element.localName);- if (definition.is) {- element.setAttribute("is", definition.is);- }- implementPrototype(element, definition);- element.__upgraded__ = true;- created(element);- if (isAttached) {- scope.attached(element);- }- scope.upgradeSubtree(element, isAttached);- flags.upgrade && console.groupEnd();- return element;- }- function implementPrototype(element, definition) {- if (Object.__proto__) {- element.__proto__ = definition.prototype;- } else {- customMixin(element, definition.prototype, definition.native);- element.__proto__ = definition.prototype;- }- }- function customMixin(inTarget, inSrc, inNative) {- var used = {};- var p = inSrc;- while (p !== inNative && p !== HTMLElement.prototype) {- var keys = Object.getOwnPropertyNames(p);- for (var i = 0, k; k = keys[i]; i++) {- if (!used[k]) {- Object.defineProperty(inTarget, k, Object.getOwnPropertyDescriptor(p, k));- used[k] = 1;- }- }- p = Object.getPrototypeOf(p);- }- }- function created(element) {- if (element.createdCallback) {- element.createdCallback();- }- }- scope.upgrade = upgrade;- scope.upgradeWithDefinition = upgradeWithDefinition;- scope.implementPrototype = implementPrototype;-});--window.CustomElements.addModule(function(scope) {- var isIE = scope.isIE;- var upgradeDocumentTree = scope.upgradeDocumentTree;- var upgradeAll = scope.upgradeAll;- var upgradeWithDefinition = scope.upgradeWithDefinition;- var implementPrototype = scope.implementPrototype;- var useNative = scope.useNative;- function register(name, options) {- var definition = options || {};- if (!name) {- throw new Error("document.registerElement: first argument `name` must not be empty");- }- if (name.indexOf("-") < 0) {- throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '" + String(name) + "'.");- }- if (isReservedTag(name)) {- throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '" + String(name) + "'. The type name is invalid.");- }- if (getRegisteredDefinition(name)) {- throw new Error("DuplicateDefinitionError: a type with name '" + String(name) + "' is already registered");- }- if (!definition.prototype) {- definition.prototype = Object.create(HTMLElement.prototype);- }- definition.__name = name.toLowerCase();- if (definition.extends) {- definition.extends = definition.extends.toLowerCase();- }- definition.lifecycle = definition.lifecycle || {};- definition.ancestry = ancestry(definition.extends);- resolveTagName(definition);- resolvePrototypeChain(definition);- overrideAttributeApi(definition.prototype);- registerDefinition(definition.__name, definition);- definition.ctor = generateConstructor(definition);- definition.ctor.prototype = definition.prototype;- definition.prototype.constructor = definition.ctor;- if (scope.ready) {- upgradeDocumentTree(document);- }- return definition.ctor;- }- function overrideAttributeApi(prototype) {- if (prototype.setAttribute._polyfilled) {- return;- }- var setAttribute = prototype.setAttribute;- prototype.setAttribute = function(name, value) {- changeAttribute.call(this, name, value, setAttribute);- };- var removeAttribute = prototype.removeAttribute;- prototype.removeAttribute = function(name) {- changeAttribute.call(this, name, null, removeAttribute);- };- prototype.setAttribute._polyfilled = true;- }- function changeAttribute(name, value, operation) {- name = name.toLowerCase();- var oldValue = this.getAttribute(name);- operation.apply(this, arguments);- var newValue = this.getAttribute(name);- if (this.attributeChangedCallback && newValue !== oldValue) {- this.attributeChangedCallback(name, oldValue, newValue);- }- }- function isReservedTag(name) {- for (var i = 0; i < reservedTagList.length; i++) {- if (name === reservedTagList[i]) {- return true;- }- }- }- var reservedTagList = [ "annotation-xml", "color-profile", "font-face", "font-face-src", "font-face-uri", "font-face-format", "font-face-name", "missing-glyph" ];- function ancestry(extnds) {- var extendee = getRegisteredDefinition(extnds);- if (extendee) {- return ancestry(extendee.extends).concat([ extendee ]);- }- return [];- }- function resolveTagName(definition) {- var baseTag = definition.extends;- for (var i = 0, a; a = definition.ancestry[i]; i++) {- baseTag = a.is && a.tag;- }- definition.tag = baseTag || definition.__name;- if (baseTag) {- definition.is = definition.__name;- }- }- function resolvePrototypeChain(definition) {- if (!Object.__proto__) {- var nativePrototype = HTMLElement.prototype;- if (definition.is) {- var inst = document.createElement(definition.tag);- nativePrototype = Object.getPrototypeOf(inst);- }- var proto = definition.prototype, ancestor;- var foundPrototype = false;- while (proto) {- if (proto == nativePrototype) {- foundPrototype = true;- }- ancestor = Object.getPrototypeOf(proto);- if (ancestor) {- proto.__proto__ = ancestor;- }- proto = ancestor;- }- if (!foundPrototype) {- console.warn(definition.tag + " prototype not found in prototype chain for " + definition.is);- }- definition.native = nativePrototype;- }- }- function instantiate(definition) {- return upgradeWithDefinition(domCreateElement(definition.tag), definition);- }- var registry = {};- function getRegisteredDefinition(name) {- if (name) {- return registry[name.toLowerCase()];- }- }- function registerDefinition(name, definition) {- registry[name] = definition;- }- function generateConstructor(definition) {- return function() {- return instantiate(definition);- };- }- var HTML_NAMESPACE = "http://www.w3.org/1999/xhtml";- function createElementNS(namespace, tag, typeExtension) {- if (namespace === HTML_NAMESPACE) {- return createElement(tag, typeExtension);- } else {- return domCreateElementNS(namespace, tag);- }- }- function createElement(tag, typeExtension) {- if (tag) {- tag = tag.toLowerCase();- }- if (typeExtension) {- typeExtension = typeExtension.toLowerCase();- }- var definition = getRegisteredDefinition(typeExtension || tag);- if (definition) {- if (tag == definition.tag && typeExtension == definition.is) {- return new definition.ctor();- }- if (!typeExtension && !definition.is) {- return new definition.ctor();- }- }- var element;- if (typeExtension) {- element = createElement(tag);- element.setAttribute("is", typeExtension);- return element;- }- element = domCreateElement(tag);- if (tag.indexOf("-") >= 0) {- implementPrototype(element, HTMLElement);- }- return element;- }- var domCreateElement = document.createElement.bind(document);- var domCreateElementNS = document.createElementNS.bind(document);- var isInstance;- if (!Object.__proto__ && !useNative) {- isInstance = function(obj, ctor) {- if (obj instanceof ctor) {- return true;- }- var p = obj;- while (p) {- if (p === ctor.prototype) {- return true;- }- p = p.__proto__;- }- return false;- };- } else {- isInstance = function(obj, base) {- return obj instanceof base;- };- }- function wrapDomMethodToForceUpgrade(obj, methodName) {- var orig = obj[methodName];- obj[methodName] = function() {- var n = orig.apply(this, arguments);- upgradeAll(n);- return n;- };- }- wrapDomMethodToForceUpgrade(Node.prototype, "cloneNode");- wrapDomMethodToForceUpgrade(document, "importNode");- document.registerElement = register;- document.createElement = createElement;- document.createElementNS = createElementNS;- scope.registry = registry;- scope.instanceof = isInstance;- scope.reservedTagList = reservedTagList;- scope.getRegisteredDefinition = getRegisteredDefinition;- document.register = document.registerElement;-});--(function(scope) {- var useNative = scope.useNative;- var initializeModules = scope.initializeModules;- var isIE = scope.isIE;- if (useNative) {- var nop = function() {};- scope.watchShadow = nop;- scope.upgrade = nop;- scope.upgradeAll = nop;- scope.upgradeDocumentTree = nop;- scope.upgradeSubtree = nop;- scope.takeRecords = nop;- scope.instanceof = function(obj, base) {- return obj instanceof base;- };- } else {- initializeModules();- }- var upgradeDocumentTree = scope.upgradeDocumentTree;- var upgradeDocument = scope.upgradeDocument;- if (!window.wrap) {- if (window.ShadowDOMPolyfill) {- window.wrap = window.ShadowDOMPolyfill.wrapIfNeeded;- window.unwrap = window.ShadowDOMPolyfill.unwrapIfNeeded;- } else {- window.wrap = window.unwrap = function(node) {- return node;- };- }- }- if (window.HTMLImports) {- window.HTMLImports.__importsParsingHook = function(elt) {- if (elt.import) {- upgradeDocument(wrap(elt.import));- }- };- }- function bootstrap() {- upgradeDocumentTree(window.wrap(document));- window.CustomElements.ready = true;- var requestAnimationFrame = window.requestAnimationFrame || function(f) {- setTimeout(f, 16);- };- requestAnimationFrame(function() {- setTimeout(function() {- window.CustomElements.readyTime = Date.now();- if (window.HTMLImports) {- window.CustomElements.elapsed = window.CustomElements.readyTime - window.HTMLImports.readyTime;- }- document.dispatchEvent(new CustomEvent("WebComponentsReady", {- bubbles: true- }));- });- });- }- if (document.readyState === "complete" || scope.flags.eager) {- bootstrap();- } else if (document.readyState === "interactive" && !window.attachEvent && (!window.HTMLImports || window.HTMLImports.ready)) {- bootstrap();- } else {- var loadEvent = window.HTMLImports && !window.HTMLImports.ready ? "HTMLImportsLoaded" : "DOMContentLoaded";- window.addEventListener(loadEvent, bootstrap);- }-})(window.CustomElements);--(function(scope) {- var style = document.createElement("style");- style.textContent = "" + "body {" + "transition: opacity ease-in 0.2s;" + " } \n" + "body[unresolved] {" + "opacity: 0; display: block; overflow: hidden; position: relative;" + " } \n";- var head = document.querySelector("head");- head.insertBefore(style, head.firstChild);-})(window.WebComponents);\ No newline at end of file+(function(){/*++ Copyright (c) 2016 The Polymer Project Authors. All rights reserved.+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt+ Code distributed by Google as part of the polymer project is also+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt++Copyright (c) 2017 The Polymer Project Authors. All rights reserved.+This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt+The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt+Code distributed by Google as part of the polymer project is also+subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt++ Copyright (c) 2014 The Polymer Project Authors. All rights reserved.+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt+ Code distributed by Google as part of the polymer project is also+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt++Copyright (c) 2016 The Polymer Project Authors. All rights reserved.+This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt+The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt+Code distributed by Google as part of the polymer project is also+subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt+*/+'use strict';var Lb="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;+(function(){function k(){var a=this;this.s={};this.g=document.documentElement;var b=new La;b.rules=[];this.h=v.set(this.g,new v(b));this.i=!1;this.b=this.a=null;Mb(function(){a.c()})}function H(){this.customStyles=[];this.enqueued=!1}function Nb(){}function qa(a){this.cache={};this.c=void 0===a?100:a}function p(){}function v(a,b,c,d,e){this.G=a||null;this.b=b||null;this.ta=c||[];this.P=null;this.Z=e||"";this.a=this.B=this.K=null}function u(){}function La(){this.end=this.start=0;this.rules=this.parent=+this.previous=null;this.cssText=this.parsedCssText="";this.atRule=!1;this.type=0;this.parsedSelector=this.selector=this.keyframesName=""}function Jd(a){function b(b,c){Object.defineProperty(b,"innerHTML",{enumerable:c.enumerable,configurable:!0,get:c.get,set:function(b){var d=this,e=void 0;t(this)&&(e=[],Q(this,function(a){a!==d&&e.push(a)}));c.set.call(this,b);if(e)for(var f=0;f<e.length;f++){var h=e[f];1===h.__CE_state&&a.disconnectedCallback(h)}this.ownerDocument.__CE_hasRegistry?a.f(this):a.l(this);+return b}})}function c(b,c){z(b,"insertAdjacentElement",function(b,d){var e=t(d);b=c.call(this,b,d);e&&a.a(d);t(b)&&a.b(d);return b})}Ob&&z(Element.prototype,"attachShadow",function(a){return this.__CE_shadowRoot=a=Ob.call(this,a)});if(Ma&&Ma.get)b(Element.prototype,Ma);else if(Na&&Na.get)b(HTMLElement.prototype,Na);else{var d=Oa.call(document,"div");a.v(function(a){b(a,{enumerable:!0,configurable:!0,get:function(){return Pb.call(this,!0).innerHTML},set:function(a){var b="template"===this.localName?+this.content:this;for(d.innerHTML=a;0<b.childNodes.length;)Pa.call(b,b.childNodes[0]);for(;0<d.childNodes.length;)ra.call(b,d.childNodes[0])}})})}z(Element.prototype,"setAttribute",function(b,c){if(1!==this.__CE_state)return Qb.call(this,b,c);var d=Qa.call(this,b);Qb.call(this,b,c);c=Qa.call(this,b);a.attributeChangedCallback(this,b,d,c,null)});z(Element.prototype,"setAttributeNS",function(b,c,d){if(1!==this.__CE_state)return Rb.call(this,b,c,d);var e=sa.call(this,b,c);Rb.call(this,b,c,d);d=sa.call(this,+b,c);a.attributeChangedCallback(this,c,e,d,b)});z(Element.prototype,"removeAttribute",function(b){if(1!==this.__CE_state)return Sb.call(this,b);var c=Qa.call(this,b);Sb.call(this,b);null!==c&&a.attributeChangedCallback(this,b,c,null,null)});z(Element.prototype,"removeAttributeNS",function(b,c){if(1!==this.__CE_state)return Tb.call(this,b,c);var d=sa.call(this,b,c);Tb.call(this,b,c);var e=sa.call(this,b,c);d!==e&&a.attributeChangedCallback(this,c,d,e,b)});Ub?c(HTMLElement.prototype,Ub):Vb?c(Element.prototype,+Vb):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched.");Ra(a,Element.prototype,{da:Kd,append:Ld});Md(a,{qa:Nd,kb:Od,replaceWith:Pd,remove:Qd})}function Md(a,b){var c=Element.prototype;function d(b){return function(c){for(var d=[],e=0;e<arguments.length;++e)d[e-0]=arguments[e];e=[];for(var f=[],m=0;m<d.length;m++){var q=d[m];q instanceof Element&&t(q)&&f.push(q);if(q instanceof DocumentFragment)for(q=q.firstChild;q;q=q.nextSibling)e.push(q);else e.push(q)}b.apply(this,+d);for(d=0;d<f.length;d++)a.a(f[d]);if(t(this))for(d=0;d<e.length;d++)f=e[d],f instanceof Element&&a.b(f)}}void 0!==b.qa&&(c.before=d(b.qa));void 0!==b.qa&&(c.after=d(b.kb));void 0!==b.replaceWith&&z(c,"replaceWith",function(c){for(var d=[],e=0;e<arguments.length;++e)d[e-0]=arguments[e];e=[];for(var g=[],l=0;l<d.length;l++){var m=d[l];m instanceof Element&&t(m)&&g.push(m);if(m instanceof DocumentFragment)for(m=m.firstChild;m;m=m.nextSibling)e.push(m);else e.push(m)}l=t(this);b.replaceWith.apply(this,+d);for(d=0;d<g.length;d++)a.a(g[d]);if(l)for(a.a(this),d=0;d<e.length;d++)g=e[d],g instanceof Element&&a.b(g)});void 0!==b.remove&&z(c,"remove",function(){var c=t(this);b.remove.call(this);c&&a.a(this)})}function Rd(a){function b(b,d){Object.defineProperty(b,"textContent",{enumerable:d.enumerable,configurable:!0,get:d.get,set:function(b){if(this.nodeType===Node.TEXT_NODE)d.set.call(this,b);else{var c=void 0;if(this.firstChild){var e=this.childNodes,g=e.length;if(0<g&&t(this)){c=Array(g);for(var l=+0;l<g;l++)c[l]=e[l]}}d.set.call(this,b);if(c)for(b=0;b<c.length;b++)a.a(c[b])}}})}z(Node.prototype,"insertBefore",function(b,d){if(b instanceof DocumentFragment){var c=Array.prototype.slice.apply(b.childNodes);b=Wb.call(this,b,d);if(t(this))for(d=0;d<c.length;d++)a.b(c[d]);return b}c=t(b);d=Wb.call(this,b,d);c&&a.a(b);t(this)&&a.b(b);return d});z(Node.prototype,"appendChild",function(b){if(b instanceof DocumentFragment){var c=Array.prototype.slice.apply(b.childNodes);b=ra.call(this,b);if(t(this))for(var e=+0;e<c.length;e++)a.b(c[e]);return b}c=t(b);e=ra.call(this,b);c&&a.a(b);t(this)&&a.b(b);return e});z(Node.prototype,"cloneNode",function(b){b=Pb.call(this,b);this.ownerDocument.__CE_hasRegistry?a.f(b):a.l(b);return b});z(Node.prototype,"removeChild",function(b){var c=t(b),e=Pa.call(this,b);c&&a.a(b);return e});z(Node.prototype,"replaceChild",function(b,d){if(b instanceof DocumentFragment){var c=Array.prototype.slice.apply(b.childNodes);b=Xb.call(this,b,d);if(t(this))for(a.a(d),d=0;d<c.length;d++)a.b(c[d]);+return b}c=t(b);var f=Xb.call(this,b,d),h=t(this);h&&a.a(d);c&&a.a(b);h&&a.b(b);return f});Sa&&Sa.get?b(Node.prototype,Sa):a.v(function(a){b(a,{enumerable:!0,configurable:!0,get:function(){for(var a=[],b=0;b<this.childNodes.length;b++)a.push(this.childNodes[b].textContent);return a.join("")},set:function(a){for(;this.firstChild;)Pa.call(this,this.firstChild);ra.call(this,document.createTextNode(a))}})})}function Sd(a){z(Document.prototype,"createElement",function(b){if(this.__CE_hasRegistry){var c=+a.c(b);if(c)return new c.constructor}b=Oa.call(this,b);a.g(b);return b});z(Document.prototype,"importNode",function(b,c){b=Td.call(this,b,c);this.__CE_hasRegistry?a.f(b):a.l(b);return b});z(Document.prototype,"createElementNS",function(b,c){if(this.__CE_hasRegistry&&(null===b||"http://www.w3.org/1999/xhtml"===b)){var d=a.c(c);if(d)return new d.constructor}b=Ud.call(this,b,c);a.g(b);return b});Ra(a,Document.prototype,{da:Vd,append:Wd})}function Ra(a,b,c){function d(b){return function(c){for(var d=+[],e=0;e<arguments.length;++e)d[e-0]=arguments[e];e=[];for(var f=[],m=0;m<d.length;m++){var q=d[m];q instanceof Element&&t(q)&&f.push(q);if(q instanceof DocumentFragment)for(q=q.firstChild;q;q=q.nextSibling)e.push(q);else e.push(q)}b.apply(this,d);for(d=0;d<f.length;d++)a.a(f[d]);if(t(this))for(d=0;d<e.length;d++)f=e[d],f instanceof Element&&a.b(f)}}void 0!==c.da&&(b.prepend=d(c.da));void 0!==c.append&&(b.append=d(c.append))}function Xd(a){window.HTMLElement=function(){function b(){var b=this.constructor,+d=a.C(b);if(!d)throw Error("The custom element being constructed was not registered with `customElements`.");var e=d.constructionStack;if(0===e.length)return e=Oa.call(document,d.localName),Object.setPrototypeOf(e,b.prototype),e.__CE_state=1,e.__CE_definition=d,a.g(e),e;d=e.length-1;var f=e[d];if(f===Yb)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");e[d]=Yb;Object.setPrototypeOf(f,b.prototype);a.g(f);return f}b.prototype=Yd.prototype;+return b}()}function A(a){this.c=!1;this.a=a;this.h=new Map;this.f=function(a){return a()};this.b=!1;this.g=[];this.i=new Ta(a,document)}function Zb(){var a=this;this.b=this.a=void 0;this.c=new Promise(function(b){a.b=b;a.a&&b(a.a)})}function Ta(a,b){this.b=a;this.a=b;this.N=void 0;this.b.f(this.a);"loading"===this.a.readyState&&(this.N=new MutationObserver(this.f.bind(this)),this.N.observe(this.a,{childList:!0,subtree:!0}))}function w(){this.u=new Map;this.s=new Map;this.j=[];this.h=!1}function n(a,+b,c){if(a!==$b)throw new TypeError("Illegal constructor");a=document.createDocumentFragment();a.__proto__=n.prototype;a.D(b,c);return a}function ta(a){if(!a.__shady||void 0===a.__shady.firstChild){a.__shady=a.__shady||{};a.__shady.firstChild=Ua(a);a.__shady.lastChild=Va(a);ac(a);for(var b=a.__shady.childNodes=V(a),c=0,d;c<b.length&&(d=b[c]);c++)d.__shady=d.__shady||{},d.__shady.parentNode=a,d.__shady.nextSibling=b[c+1]||null,d.__shady.previousSibling=b[c-1]||null,bc(d)}}function Zd(a){var b=a&&a.N;+b&&(b.ba.delete(a.bb),b.ba.size||(a.gb.__shady.X=null))}function $d(a,b){a.__shady=a.__shady||{};a.__shady.X||(a.__shady.X=new ua);a.__shady.X.ba.add(b);var c=a.__shady.X;return{bb:b,N:c,gb:a,takeRecords:function(){return c.takeRecords()}}}function ua(){this.a=!1;this.addedNodes=[];this.removedNodes=[];this.ba=new Set}function R(a,b){W[X]=a;W[X+1]=b;X+=2;2===X&&(Wa?Wa(Y):ae())}function be(){return function(){return process.Ib(Y)}}function ce(){return"undefined"!==typeof Xa?function(){Xa(Y)}:Ya()}+function de(){var a=0,b=new cc(Y),c=document.createTextNode("");b.observe(c,{characterData:!0});return function(){c.data=a=++a%2}}function ee(){var a=new MessageChannel;a.port1.onmessage=Y;return function(){return a.port2.postMessage(0)}}function Ya(){var a=setTimeout;return function(){return a(Y,1)}}function Y(){for(var a=0;a<X;a+=2)(0,W[a])(W[a+1]),W[a]=void 0,W[a+1]=void 0;X=0}function fe(){try{var a=require("vertx");Xa=a.Kb||a.Jb;return ce()}catch(b){return Ya()}}function Za(a,b){var c=this,d=+new this.constructor(Z);void 0===d[va]&&dc(d);var e=c.o;if(e){var f=arguments[e-1];R(function(){return ec(e,d,f,c.m)})}else $a(c,d,a,b);return d}function ab(a){if(a&&"object"===typeof a&&a.constructor===this)return a;var b=new this(Z);ha(b,a);return b}function Z(){}function fc(a){try{return a.then}catch(b){return ia.error=b,ia}}function ge(a,b,c,d){try{a.call(b,c,d)}catch(e){return e}}function he(a,b,c){R(function(a){var d=!1,f=ge(c,b,function(c){d||(d=!0,b!==c?ha(a,c):L(a,c))},function(b){d||(d=+!0,B(a,b))});!d&&f&&(d=!0,B(a,f))},a)}function ie(a,b){1===b.o?L(a,b.m):2===b.o?B(a,b.m):$a(b,void 0,function(b){return ha(a,b)},function(b){return B(a,b)})}function gc(a,b,c){b.constructor===a.constructor&&c===Za&&b.constructor.resolve===ab?ie(a,b):c===ia?(B(a,ia.error),ia.error=null):void 0===c?L(a,b):"function"===typeof c?he(a,b,c):L(a,b)}function ha(a,b){if(a===b)B(a,new TypeError("You cannot resolve a promise with itself"));else{var c=typeof b;null===b||"object"!==c&&"function"!==c?L(a,b):gc(a,+b,fc(b))}}function je(a){a.Da&&a.Da(a.m);bb(a)}function L(a,b){void 0===a.o&&(a.m=b,a.o=1,0!==a.U.length&&R(bb,a))}function B(a,b){void 0===a.o&&(a.o=2,a.m=b,R(je,a))}function $a(a,b,c,d){var e=a.U,f=e.length;a.Da=null;e[f]=b;e[f+1]=c;e[f+2]=d;0===f&&a.o&&R(bb,a)}function bb(a){var b=a.U,c=a.o;if(0!==b.length){for(var d,e,f=a.m,h=0;h<b.length;h+=3)d=b[h],e=b[h+c],d?ec(c,d,e,f):e(f);a.U.length=0}}function hc(){this.error=null}function ec(a,b,c,d){var e="function"===typeof c;if(e){try{var f=c(d)}catch(m){cb.error=+m,f=cb}if(f===cb){var h=!0;var g=f.error;f.error=null}else var l=!0;if(b===f){B(b,new TypeError("A promises callback cannot return that same promise."));return}}else f=d,l=!0;void 0===b.o&&(e&&l?ha(b,f):h?B(b,g):1===a?L(b,f):2===a&&B(b,f))}function ke(a,b){try{b(function(b){ha(a,b)},function(b){B(a,b)})}catch(c){B(a,c)}}function dc(a){a[va]=ic++;a.o=void 0;a.m=void 0;a.U=[]}function ja(a,b){this.fb=a;this.J=new a(Z);this.J[va]||dc(this.J);jc(b)?(this.$=this.length=b.length,this.m=Array(this.length),+0===this.length?L(this.J,this.m):(this.length=this.length||0,this.eb(b),0===this.$&&L(this.J,this.m))):B(this.J,Error("Array Methods must be provided an Array"))}function C(a){this[va]=ic++;this.m=this.o=void 0;this.U=[];if(Z!==a){if("function"!==typeof a)throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(this instanceof C)ke(this,a);else throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");+}}function aa(a){return a.__shady&&void 0!==a.__shady.firstChild}function J(a){return"ShadyRoot"===a.Xa}function ka(a){a=a.getRootNode();if(J(a))return a}function db(a,b){if(a&&b)for(var c=Object.getOwnPropertyNames(b),d=0,e;d<c.length&&(e=c[d]);d++){var f=Object.getOwnPropertyDescriptor(b,e);f&&Object.defineProperty(a,e,f)}}function eb(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];for(d=0;d<c.length;d++)db(a,c[d]);return a}function le(a,b){for(var c in b)a[c]=b[c]}function kc(a){fb.push(a);+gb.textContent=lc++}function mc(a){hb||(hb=!0,kc(wa));la.push(a)}function wa(){hb=!1;for(var a=!!la.length;la.length;)la.shift()();return a}function me(a,b){var c=b.getRootNode();return a.map(function(a){var b=c===a.target.getRootNode();if(b&&a.addedNodes){if(b=Array.from(a.addedNodes).filter(function(a){return c===a.getRootNode()}),b.length)return a=Object.create(a),Object.defineProperty(a,"addedNodes",{value:b,configurable:!0}),a}else if(b)return a}).filter(function(a){return a})}function nc(a){switch(a){case "&":return"&";+case "<":return"<";case ">":return">";case '"':return""";case "\u00a0":return" "}}function oc(a){for(var b={},c=0;c<a.length;c++)b[a[c]]=!0;return b}function ib(a,b){"template"===a.localName&&(a=a.content);for(var c="",d=b?b(a):a.childNodes,e=0,f=d.length,h;e<f&&(h=d[e]);e++){a:{var g=h;var l=a;var m=b;switch(g.nodeType){case Node.ELEMENT_NODE:for(var q=g.localName,k="<"+q,n=g.attributes,p=0;l=n[p];p++)k+=" "+l.name+'="'+l.value.replace(ne,nc)+'"';k+=">";g=oe[q]?k:k+ib(g,m)+"</"+q++">";break a;case Node.TEXT_NODE:g=g.data;g=l&&pe[l.localName]?g:g.replace(qe,nc);break a;case Node.COMMENT_NODE:g="\x3c!--"+g.data+"--\x3e";break a;default:throw window.console.error(g),Error("not implemented");}}c+=g}return c}function ba(a){D.currentNode=a;return D.parentNode()}function Ua(a){D.currentNode=a;return D.firstChild()}function Va(a){D.currentNode=a;return D.lastChild()}function pc(a){D.currentNode=a;return D.previousSibling()}function qc(a){D.currentNode=a;return D.nextSibling()}function V(a){var b=+[];D.currentNode=a;for(a=D.firstChild();a;)b.push(a),a=D.nextSibling();return b}function rc(a){E.currentNode=a;return E.parentNode()}function sc(a){E.currentNode=a;return E.firstChild()}function tc(a){E.currentNode=a;return E.lastChild()}function uc(a){E.currentNode=a;return E.previousSibling()}function vc(a){E.currentNode=a;return E.nextSibling()}function wc(a){var b=[];E.currentNode=a;for(a=E.firstChild();a;)b.push(a),a=E.nextSibling();return b}function xc(a){return ib(a,function(a){return V(a)})}+function yc(a){switch(a.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:a=document.createTreeWalker(a,NodeFilter.SHOW_TEXT,null,!1);for(var b="",c;c=a.nextNode();)b+=c.nodeValue;return b;default:return a.nodeValue}}function N(a,b,c){for(var d in b){var e=Object.getOwnPropertyDescriptor(a,d);e&&e.configurable||!e&&c?Object.defineProperty(a,d,b[d]):c&&console.warn("Could not define",d,"on",a)}}function S(a){N(a,zc);N(a,jb);N(a,kb)}function Ac(a,b,c){bc(a);c=c||null;a.__shady=a.__shady||+{};b.__shady=b.__shady||{};c&&(c.__shady=c.__shady||{});a.__shady.previousSibling=c?c.__shady.previousSibling:b.lastChild;var d=a.__shady.previousSibling;d&&d.__shady&&(d.__shady.nextSibling=a);(d=a.__shady.nextSibling=c)&&d.__shady&&(d.__shady.previousSibling=a);a.__shady.parentNode=b;c?c===b.__shady.firstChild&&(b.__shady.firstChild=a):(b.__shady.lastChild=a,b.__shady.firstChild||(b.__shady.firstChild=a));b.__shady.childNodes=null}function lb(a,b,c){if(b===a)throw Error("Failed to execute 'appendChild' on 'Node': The new child element contains the parent.");+if(c){var d=c.__shady&&c.__shady.parentNode;if(void 0!==d&&d!==a||void 0===d&&ba(c)!==a)throw Error("Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.");}if(c===b)return b;b.parentNode&&mb(b.parentNode,b);d=ka(a);var e;if(e=d)a:{if(!b.__noInsertionPoint){var f;"slot"===b.localName?f=[b]:b.querySelectorAll&&(f=b.querySelectorAll("slot"));if(f&&f.length){e=f;break a}}e=void 0}f=e;d&&("slot"===a.localName||f)&&d.M();if(aa(a)){e=+c;ac(a);a.__shady=a.__shady||{};void 0!==a.__shady.firstChild&&(a.__shady.childNodes=null);if(b.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(var h=b.childNodes,g=0;g<h.length;g++)Ac(h[g],a,e);b.__shady=b.__shady||{};e=void 0!==b.__shady.firstChild?null:void 0;b.__shady.firstChild=b.__shady.lastChild=e;b.__shady.childNodes=e}else Ac(b,a,e);if(nb(a)){a.__shady.root.M();var l=!0}else a.__shady.root&&(l=!0)}l||(l=J(a)?a.host:a,c?(c=Bc(c),ob.call(l,b,c)):Cc.call(l,b));Dc(a,b);f&&d.ab(f);return b}function mb(a,+b){if(b.parentNode!==a)throw Error("The node to be removed is not a child of this node: "+b);var c=ka(b);if(aa(a)){b.__shady=b.__shady||{};a.__shady=a.__shady||{};b===a.__shady.firstChild&&(a.__shady.firstChild=b.__shady.nextSibling);b===a.__shady.lastChild&&(a.__shady.lastChild=b.__shady.previousSibling);var d=b.__shady.previousSibling;var e=b.__shady.nextSibling;d&&(d.__shady=d.__shady||{},d.__shady.nextSibling=e);e&&(e.__shady=e.__shady||{},e.__shady.previousSibling=d);b.__shady.parentNode=b.__shady.previousSibling=+b.__shady.nextSibling=void 0;void 0!==a.__shady.childNodes&&(a.__shady.childNodes=null);if(nb(a)){a.__shady.root.M();var f=!0}}Ec(b);c&&((e=a&&"slot"===a.localName)&&(f=!0),((d=c.hb(b))||e)&&c.M());f||(f=J(a)?a.host:a,(!a.__shady.root&&"slot"!==b.localName||f===ba(b))&&ma.call(f,b));Dc(a,null,b);return b}function Ec(a){if(a.__shady&&void 0!==a.__shady.ua)for(var b=a.childNodes,c=0,d=b.length,e;c<d&&(e=b[c]);c++)Ec(e);a.__shady&&(a.__shady.ua=void 0)}function Bc(a){var b=a;a&&"slot"===a.localName&&+(b=(b=a.__shady&&a.__shady.V)&&b.length?b[0]:Bc(a.nextSibling));return b}function nb(a){return(a=a&&a.__shady&&a.__shady.root)&&a.Ca()}function Fc(a,b){"slot"===b?(a=a.parentNode,nb(a)&&a.__shady.root.M()):"slot"===a.localName&&"name"===b&&(b=ka(a))&&(b.jb(a),b.M())}function Dc(a,b,c){if(a=a.__shady&&a.__shady.X)b&&a.addedNodes.push(b),c&&a.removedNodes.push(c),a.vb()}function Gc(a){if(a&&a.nodeType){a.__shady=a.__shady||{};var b=a.__shady.ua;void 0===b&&(J(a)?b=a:b=(b=a.parentNode)?Gc(b):a,document.documentElement.contains(a)&&+(a.__shady.ua=b));return b}}function xa(a,b,c){var d=[];Hc(a.childNodes,b,c,d);return d}function Hc(a,b,c,d){for(var e=0,f=a.length,h;e<f&&(h=a[e]);e++){var g;if(g=h.nodeType===Node.ELEMENT_NODE){g=h;var l=b,m=c,q=d,k=l(g);k&&q.push(g);m&&m(k)?g=k:(Hc(g.childNodes,l,m,q),g=void 0)}if(g)break}}function Ic(a){a=a.getRootNode();J(a)&&a.Fa()}function Jc(a,b,c){ya||(ya=window.ShadyCSS&&window.ShadyCSS.ScopingShim);ya&&"class"===b?ya.setElementClass(a,c):(Kc.call(a,b,c),Fc(a,b))}function Lc(a,b){if(a.ownerDocument!==+document)return pb.call(document,a,b);var c=pb.call(document,a,!1);if(b){a=a.childNodes;b=0;for(var d;b<a.length;b++)d=Lc(a[b],!0),c.appendChild(d)}return c}function qb(a,b){var c=[],d=a;for(a=a===window?window:a.getRootNode();d;)c.push(d),d=d.assignedSlot?d.assignedSlot:d.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&d.host&&(b||d!==a)?d.host:d.parentNode;c[c.length-1]===document&&c.push(window);return c}function Mc(a,b){if(!J)return a;a=qb(a,!0);for(var c=0,d,e,f,h;c<b.length;c++)if(d=b[c],f=d===window?+window:d.getRootNode(),f!==e&&(h=a.indexOf(f),e=f),!J(f)||-1<h)return d}function rb(a){function b(b,d){b=new a(b,d);b.ja=d&&!!d.composed;return b}le(b,a);b.prototype=a.prototype;return b}function Nc(a,b,c){if(c=b.__handlers&&b.__handlers[a.type]&&b.__handlers[a.type][c])for(var d=0,e;(e=c[d])&&a.target!==a.relatedTarget&&(e.call(b,a),!a.Va);d++);}function re(a){var b=a.composedPath();Object.defineProperty(a,"currentTarget",{get:function(){return d},configurable:!0});for(var c=b.length-1;0<=c;c--){var d=+b[c];Nc(a,d,"capture");if(a.ka)return}Object.defineProperty(a,"eventPhase",{get:function(){return Event.AT_TARGET}});var e;for(c=0;c<b.length;c++){d=b[c];var f=d.__shady&&d.__shady.root;if(0===c||f&&f===e)if(Nc(a,d,"bubble"),d!==window&&(e=d.getRootNode()),a.ka)break}}function Oc(a,b,c,d,e,f){for(var h=0;h<a.length;h++){var g=a[h],l=g.type,m=g.capture,q=g.once,k=g.passive;if(b===g.node&&c===l&&d===m&&e===q&&f===k)return h}return-1}function Pc(a,b,c){if(b){if("object"===typeof c){var d=!!c.capture;+var e=!!c.once;var f=!!c.passive}else d=!!c,f=e=!1;var h=c&&c.la||this,g=b[na];if(g){if(-1<Oc(g,h,a,d,e,f))return}else b[na]=[];g=function(d){e&&this.removeEventListener(a,b,c);d.__target||Qc(d);if(h!==this){var f=Object.getOwnPropertyDescriptor(d,"currentTarget");Object.defineProperty(d,"currentTarget",{get:function(){return h},configurable:!0})}if(d.composed||-1<d.composedPath().indexOf(h))if(d.target===d.relatedTarget)d.eventPhase===Event.BUBBLING_PHASE&&d.stopImmediatePropagation();else if(d.eventPhase===+Event.CAPTURING_PHASE||d.bubbles||d.target===h){var g="object"===typeof b&&b.handleEvent?b.handleEvent(d):b.call(h,d);h!==this&&(f?(Object.defineProperty(d,"currentTarget",f),f=null):delete d.currentTarget);return g}};b[na].push({node:this,type:a,capture:d,once:e,passive:f,zb:g});sb[a]?(this.__handlers=this.__handlers||{},this.__handlers[a]=this.__handlers[a]||{capture:[],bubble:[]},this.__handlers[a][d?"capture":"bubble"].push(g)):(this instanceof Window?Rc:Sc).call(this,a,g,c)}}function Tc(a,b,+c){if(b){if("object"===typeof c){var d=!!c.capture;var e=!!c.once;var f=!!c.passive}else d=!!c,f=e=!1;var h=c&&c.la||this,g=void 0;var l=null;try{l=b[na]}catch(m){}l&&(e=Oc(l,h,a,d,e,f),-1<e&&(g=l.splice(e,1)[0].zb,l.length||(b[na]=void 0)));(this instanceof Window?Uc:Vc).call(this,a,g||b,c);g&&sb[a]&&this.__handlers&&this.__handlers[a]&&(a=this.__handlers[a][d?"capture":"bubble"],g=a.indexOf(g),-1<g&&a.splice(g,1))}}function se(){for(var a in sb)window.addEventListener(a,function(a){a.__target||+(Qc(a),re(a))},!0)}function Qc(a){a.__target=a.target;a.Aa=a.relatedTarget;if(F.W){var b=Wc,c=Object.getPrototypeOf(a);if(!c.hasOwnProperty("__patchProto")){var d=Object.create(c);d.Bb=c;db(d,b);c.__patchProto=d}a.__proto__=c.__patchProto}else db(a,Wc)}function oa(a,b){return{index:a,Y:[],aa:b}}function te(a,b,c,d){var e=0,f=0,h=0,g=0,l=Math.min(b-e,d-f);if(0==e&&0==f)a:{for(h=0;h<l;h++)if(a[h]!==c[h])break a;h=l}if(b==a.length&&d==c.length){g=a.length;for(var m=c.length,k=0;k<l-h&&ue(a[--g],c[--m]);)k++;+g=k}e+=h;f+=h;b-=g;d-=g;if(0==b-e&&0==d-f)return[];if(e==b){for(b=oa(e,0);f<d;)b.Y.push(c[f++]);return[b]}if(f==d)return[oa(e,b-e)];l=e;h=f;d=d-h+1;g=b-l+1;b=Array(d);for(m=0;m<d;m++)b[m]=Array(g),b[m][0]=m;for(m=0;m<g;m++)b[0][m]=m;for(m=1;m<d;m++)for(k=1;k<g;k++)if(a[l+k-1]===c[h+m-1])b[m][k]=b[m-1][k-1];else{var n=b[m-1][k]+1,p=b[m][k-1]+1;b[m][k]=n<p?n:p}l=b.length-1;h=b[0].length-1;d=b[l][h];for(a=[];0<l||0<h;)0==l?(a.push(2),h--):0==h?(a.push(3),l--):(g=b[l-1][h-1],m=b[l-1][h],k=b[l][h-1],n=+m<k?m<g?m:g:k<g?k:g,n==g?(g==d?a.push(0):(a.push(1),d=g),l--,h--):n==m?(a.push(3),l--,d=m):(a.push(2),h--,d=k));a.reverse();b=void 0;l=[];for(h=0;h<a.length;h++)switch(a[h]){case 0:b&&(l.push(b),b=void 0);e++;f++;break;case 1:b||(b=oa(e,0));b.aa++;e++;b.Y.push(c[f]);f++;break;case 2:b||(b=oa(e,0));b.aa++;e++;break;case 3:b||(b=oa(e,0)),b.Y.push(c[f]),f++}b&&l.push(b);return l}function ue(a,b){return a===b}function Xc(a){var b=[];do b.unshift(a);while(a=a.parentNode);return b}function Yc(a){Ic(a);+return a.__shady&&a.__shady.assignedSlot||null}function O(a,b){for(var c=Object.getOwnPropertyNames(b),d=0;d<c.length;d++){var e=c[d],f=Object.getOwnPropertyDescriptor(b,e);f.value?a[e]=f.value:Object.defineProperty(a,e,f)}}function ve(){var a=window.customElements&&window.customElements.nativeHTMLElement||HTMLElement;O(window.Node.prototype,we);O(window.Window.prototype,xe);O(window.Text.prototype,ye);O(window.DocumentFragment.prototype,tb);O(window.Element.prototype,Zc);O(window.Document.prototype,+$c);window.HTMLSlotElement&&O(window.HTMLSlotElement.prototype,ad);O(a.prototype,ze);F.W&&(S(window.Node.prototype),S(window.Text.prototype),S(window.DocumentFragment.prototype),S(window.Element.prototype),S(a.prototype),S(window.Document.prototype),window.HTMLSlotElement&&S(window.HTMLSlotElement.prototype))}function bd(a){var b=Ae.has(a);a=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(a);return!b&&a}function t(a){var b=a.isConnected;if(void 0!==b)return b;for(;a&&!(a.__CE_isImportDocument||a instanceof+Document);)a=a.parentNode||(window.ShadowRoot&&a instanceof ShadowRoot?a.host:void 0);return!(!a||!(a.__CE_isImportDocument||a instanceof Document))}function ub(a,b){for(;b&&b!==a&&!b.nextSibling;)b=b.parentNode;return b&&b!==a?b.nextSibling:null}function Q(a,b,c){c=c?c:new Set;for(var d=a;d;){if(d.nodeType===Node.ELEMENT_NODE){var e=d;b(e);var f=e.localName;if("link"===f&&"import"===e.getAttribute("rel")){d=e.import;if(d instanceof Node&&!c.has(d))for(c.add(d),d=d.firstChild;d;d=d.nextSibling)Q(d,+b,c);d=ub(a,e);continue}else if("template"===f){d=ub(a,e);continue}if(e=e.__CE_shadowRoot)for(e=e.firstChild;e;e=e.nextSibling)Q(e,b,c)}d=d.firstChild?d.firstChild:ub(a,d)}}function z(a,b,c){a[b]=c}function vb(a){a=a.replace(I.mb,"").replace(I.port,"");var b=cd,c=a,d=new La;d.start=0;d.end=c.length;for(var e=d,f=0,h=c.length;f<h;f++)if("{"===c[f]){e.rules||(e.rules=[]);var g=e,l=g.rules[g.rules.length-1]||null;e=new La;e.start=f+1;e.parent=g;e.previous=l;g.rules.push(e)}else"}"===c[f]&&(e.end=f+1,+e=e.parent||d);return b(d,a)}function cd(a,b){var c=b.substring(a.start,a.end-1);a.parsedCssText=a.cssText=c.trim();a.parent&&(c=b.substring(a.previous?a.previous.end:a.parent.start,a.start-1),c=Be(c),c=c.replace(I.La," "),c=c.substring(c.lastIndexOf(";")+1),c=a.parsedSelector=a.selector=c.trim(),a.atRule=0===c.indexOf("@"),a.atRule?0===c.indexOf("@media")?a.type=M.MEDIA_RULE:c.match(I.rb)&&(a.type=M.ia,a.keyframesName=a.selector.split(I.La).pop()):a.type=0===c.indexOf("--")?M.wa:M.STYLE_RULE);if(c=+a.rules)for(var d=0,e=c.length,f;d<e&&(f=c[d]);d++)cd(f,b);return a}function Be(a){return a.replace(/\\([0-9a-f]{1,6})\s/gi,function(a,c){a=c;for(c=6-a.length;c--;)a="0"+a;return"\\"+a})}function dd(a,b,c){c=void 0===c?"":c;var d="";if(a.cssText||a.rules){var e=a.rules,f;if(f=e)f=e[0],f=!(f&&f.selector&&0===f.selector.indexOf("--"));if(f){f=0;for(var h=e.length,g;f<h&&(g=e[f]);f++)d=dd(g,b,d)}else b?b=a.cssText:(b=a.cssText,b=b.replace(I.Ga,"").replace(I.Ka,""),b=b.replace(I.sb,"").replace(I.xb,"")),+(d=b.trim())&&(d=" "+d+"\n")}d&&(a.selector&&(c+=a.selector+" {\n"),c+=d,a.selector&&(c+="}\n\n"));return c}function ed(a){x=a&&a.shimcssproperties?!1:r||!(navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)"))}function ca(a,b){if(!a)return"";"string"===typeof a&&(a=vb(a));b&&da(a,b);return dd(a,x)}function za(a){!a.__cssRules&&a.textContent&&(a.__cssRules=vb(a.textContent));return a.__cssRules||null}function fd(a){return!!a.parent&&+a.parent.type===M.ia}function da(a,b,c,d){if(a){var e=!1,f=a.type;if(d&&f===M.MEDIA_RULE){var h=a.selector.match(Ce);h&&(window.matchMedia(h[1]).matches||(e=!0))}f===M.STYLE_RULE?b(a):c&&f===M.ia?c(a):f===M.wa&&(e=!0);if((a=a.rules)&&!e){e=0;f=a.length;for(var g;e<f&&(g=a[e]);e++)da(g,b,c,d)}}}function wb(a,b,c,d){var e=document.createElement("style");b&&e.setAttribute("scope",b);e.textContent=a;gd(e,c,d);return e}function gd(a,b,c){b=b||document.head;b.insertBefore(a,c&&c.nextSibling||b.firstChild);+T?a.compareDocumentPosition(T)===Node.DOCUMENT_POSITION_PRECEDING&&(T=a):T=a}function hd(a,b){var c=a.indexOf("var(");if(-1===c)return b(a,"","","");a:{var d=0;var e=c+3;for(var f=a.length;e<f;e++)if("("===a[e])d++;else if(")"===a[e]&&0===--d)break a;e=-1}d=a.substring(c+4,e);c=a.substring(0,c);a=hd(a.substring(e+1),b);e=d.indexOf(",");return-1===e?b(c,d.trim(),"",a):b(c,d.substring(0,e).trim(),d.substring(e+1).trim(),a)}function Aa(a,b){r?a.setAttribute("class",b):window.ShadyDOM.nativeMethods.setAttribute.call(a,+"class",b)}function U(a){var b=a.localName,c="";b?-1<b.indexOf("-")||(c=b,b=a.getAttribute&&a.getAttribute("is")||""):(b=a.is,c=a.extends);return{is:b,Z:c}}function id(a){for(var b=0;b<a.length;b++){var c=a[b];if(c.target!==document.documentElement&&c.target!==document.head)for(var d=0;d<c.addedNodes.length;d++){var e=c.addedNodes[d];if(e.nodeType===Node.ELEMENT_NODE){var f=e.getRootNode();var h=e;var g=[];h.classList?g=Array.from(h.classList):h instanceof window.SVGElement&&h.hasAttribute("class")&&+(g=h.getAttribute("class").split(/\s+/));h=g;g=h.indexOf(y.c);(h=-1<g?h[g+1]:"")&&f===e.ownerDocument?y.a(e,h,!0):f.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(f=f.host)&&(f=U(f).is,h!==f&&(h&&y.a(e,h,!0),y.a(e,f)))}}}}function De(a){if(a=Ba[a])a._applyShimCurrentVersion=a._applyShimCurrentVersion||0,a._applyShimValidatingVersion=a._applyShimValidatingVersion||0,a._applyShimNextVersion=(a._applyShimNextVersion||0)+1}function jd(a){return a._applyShimCurrentVersion===a._applyShimNextVersion}function Ee(a){a._applyShimValidatingVersion=+a._applyShimNextVersion;a.b||(a.b=!0,Fe.then(function(){a._applyShimCurrentVersion=a._applyShimNextVersion;a.b=!1}))}function Mb(a){requestAnimationFrame(function(){kd?kd(a):(xb||(xb=new Promise(function(a){yb=a}),"complete"===document.readyState?yb():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&yb()})),xb.then(function(){a&&a()}))})}(function(){if(!function(){var a=document.createEvent("Event");a.initEvent("foo",!0,!0);a.preventDefault();return a.defaultPrevented}()){var a=+Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(a.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var b=/Trident/.test(navigator.userAgent);if(!window.CustomEvent||b&&"function"!==typeof window.CustomEvent)window.CustomEvent=function(a,b){b=b||{};var c=document.createEvent("CustomEvent");c.initCustomEvent(a,!!b.bubbles,!!b.cancelable,b.detail);return c},window.CustomEvent.prototype=window.Event.prototype;+if(!window.Event||b&&"function"!==typeof window.Event){var c=window.Event;window.Event=function(a,b){b=b||{};var c=document.createEvent("Event");c.initEvent(a,!!b.bubbles,!!b.cancelable);return c};if(c)for(var d in c)window.Event[d]=c[d];window.Event.prototype=c.prototype}if(!window.MouseEvent||b&&"function"!==typeof window.MouseEvent){b=window.MouseEvent;window.MouseEvent=function(a,b){b=b||{};var c=document.createEvent("MouseEvent");c.initMouseEvent(a,!!b.bubbles,!!b.cancelable,b.view||window,b.detail,+b.screenX,b.screenY,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget);return c};if(b)for(d in b)window.MouseEvent[d]=b[d];window.MouseEvent.prototype=b.prototype}Array.from||(Array.from=function(a){return[].slice.call(a)});Object.assign||(Object.assign=function(a,b){for(var c=[].slice.call(arguments,1),d=0,e;d<c.length;d++)if(e=c[d])for(var f=a,k=e,n=Object.getOwnPropertyNames(k),p=0;p<n.length;p++)e=n[p],f[e]=k[e];return a})})(window.WebComponents);(function(){function a(){}+var b="undefined"===typeof HTMLTemplateElement;/Trident/.test(navigator.userAgent)&&function(){var a=Document.prototype.importNode;Document.prototype.importNode=function(){var b=a.apply(this,arguments);if(b.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var c=this.createDocumentFragment();c.appendChild(b);return c}return b}}();var c=Node.prototype.cloneNode,d=Document.prototype.createElement,e=Document.prototype.importNode,f=function(){if(!b){var a=document.createElement("template"),c=document.createElement("template");+c.content.appendChild(document.createElement("div"));a.content.appendChild(c);a=a.cloneNode(!0);return 0===a.content.childNodes.length||0===a.content.firstChild.content.childNodes.length||!(document.createDocumentFragment().cloneNode()instanceof DocumentFragment)}}();if(b){var h=function(a){switch(a){case "&":return"&";case "<":return"<";case ">":return">";case "\u00a0":return" "}},g=function(b){Object.defineProperty(b,"innerHTML",{get:function(){for(var a="",b=this.content.firstChild;b;b=+b.nextSibling)a+=b.outerHTML||b.data.replace(t,h);return a},set:function(b){l.body.innerHTML=b;for(a.b(l);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;l.body.firstChild;)this.content.appendChild(l.body.firstChild)},configurable:!0})},l=document.implementation.createHTMLDocument("template"),k=!0,q=document.createElement("style");q.textContent="template{display:none;}";var n=document.head;n.insertBefore(q,n.firstElementChild);a.prototype=Object.create(HTMLElement.prototype);+var p=!document.createElement("div").hasOwnProperty("innerHTML");a.O=function(b){if(!b.content){b.content=l.createDocumentFragment();for(var c;c=b.firstChild;)b.content.appendChild(c);if(p)b.__proto__=a.prototype;else if(b.cloneNode=function(b){return a.a(this,b)},k)try{g(b)}catch(ff){k=!1}a.b(b.content)}};g(a.prototype);a.b=function(b){b=b.querySelectorAll("template");for(var c=0,d=b.length,e;c<d&&(e=b[c]);c++)a.O(e)};document.addEventListener("DOMContentLoaded",function(){a.b(document)});Document.prototype.createElement=+function(){var b=d.apply(this,arguments);"template"===b.localName&&a.O(b);return b};var t=/[&\u00A0<>]/g}if(b||f)a.a=function(a,b){var d=c.call(a,!1);this.O&&this.O(d);b&&(d.content.appendChild(c.call(a.content,!0)),this.sa(d.content,a.content));return d},a.prototype.cloneNode=function(b){return a.a(this,b)},a.sa=function(a,b){if(b.querySelectorAll){b=b.querySelectorAll("template");a=a.querySelectorAll("template");for(var c=0,d=a.length,e,f;c<d;c++)f=b[c],e=a[c],this.O&&this.O(f),e.parentNode.replaceChild(f.cloneNode(!0),+e)}},Node.prototype.cloneNode=function(b){if(this instanceof DocumentFragment)if(b)var d=this.ownerDocument.importNode(this,!0);else return this.ownerDocument.createDocumentFragment();else d=c.call(this,b);b&&a.sa(d,this);return d},Document.prototype.importNode=function(b,c){if("template"===b.localName)return a.a(b,c);var d=e.call(this,b,c);c&&a.sa(d,b);return d},f&&(window.HTMLTemplateElement.prototype.cloneNode=function(b){return a.a(this,b)});b&&(window.HTMLTemplateElement=a)})();var zb;Array.isArray?+zb=Array.isArray:zb=function(a){return"[object Array]"===Object.prototype.toString.call(a)};var jc=zb,X=0,Xa,Wa,ld="undefined"!==typeof window?window:void 0,md=ld||{},cc=md.MutationObserver||md.WebKitMutationObserver,Ge="undefined"!==typeof Uint8ClampedArray&&"undefined"!==typeof importScripts&&"undefined"!==typeof MessageChannel,W=Array(1E3);var ae="undefined"===typeof self&&"undefined"!==typeof process&&"[object process]"==={}.toString.call(process)?be():cc?de():Ge?ee():ld||"function"!==typeof require?+Ya():fe();var va=Math.random().toString(36).substring(16),ia=new hc,cb=new hc,ic=0;ja.prototype.eb=function(a){for(var b=0;void 0===this.o&&b<a.length;b++)this.cb(a[b],b)};ja.prototype.cb=function(a,b){var c=this.fb,d=c.resolve;d===ab?(d=fc(a),d===Za&&void 0!==a.o?this.oa(a.o,b,a.m):"function"!==typeof d?(this.$--,this.m[b]=a):c===C?(c=new c(Z),gc(c,a,d),this.pa(c,b)):this.pa(new c(function(b){return b(a)}),b)):this.pa(d(a),b)};ja.prototype.oa=function(a,b,c){var d=this.J;void 0===d.o&&(this.$--,+2===a?B(d,c):this.m[b]=c);0===this.$&&L(d,this.m)};ja.prototype.pa=function(a,b){var c=this;$a(a,void 0,function(a){return c.oa(1,b,a)},function(a){return c.oa(2,b,a)})};C.all=function(a){return(new ja(this,a)).J};C.race=function(a){var b=this;return jc(a)?new b(function(c,d){for(var e=a.length,f=0;f<e;f++)b.resolve(a[f]).then(c,d)}):new b(function(a,b){return b(new TypeError("You must pass an array to race."))})};C.resolve=ab;C.reject=function(a){var b=new this(Z);B(b,a);return b};C.Gb=function(a){Wa=+a};C.Fb=function(a){R=a};C.Cb=R;C.prototype={constructor:C,then:Za,a:function(a){return this.then(null,a)}};window.Promise||(window.Promise=C,C.prototype["catch"]=C.prototype.a);(function(a){function b(a,b){if("function"===typeof window.CustomEvent)return new CustomEvent(a,b);var c=document.createEvent("CustomEvent");c.initCustomEvent(a,!!b.bubbles,!!b.cancelable,b.detail);return c}function c(a){if(n)return a.ownerDocument!==document?a.ownerDocument:null;var b=a.__importDoc;if(!b&&a.parentNode){b=+a.parentNode;if("function"===typeof b.closest)b=b.closest("link[rel=import]");else for(;!g(b)&&(b=b.parentNode););a.__importDoc=b}return b}function d(a){var b=document.querySelectorAll("link[rel=import]:not(import-dependency)"),c=b.length;c?k(b,function(b){return h(b,function(){0===--c&&a()})}):a()}function e(a){function b(){"loading"!==document.readyState&&document.body&&(document.removeEventListener("readystatechange",b),a())}document.addEventListener("readystatechange",b);b()}function f(a){e(function(){return d(function(){return a&&+a()})})}function h(a,b){if(a.__loaded)b&&b();else if("script"===a.localName&&!a.src||"style"===a.localName&&!a.firstChild)a.__loaded=!0,b&&b();else{var c=function(d){a.removeEventListener(d.type,c);a.__loaded=!0;b&&b()};a.addEventListener("load",c);A&&"style"===a.localName||a.addEventListener("error",c)}}function g(a){return a.nodeType===Node.ELEMENT_NODE&&"link"===a.localName&&"import"===a.rel}function l(){var a=this;this.a={};this.b=0;this.f=new MutationObserver(function(b){return a.l(b)});this.f.observe(document.head,+{childList:!0,subtree:!0});this.c(document)}function k(a,b,c){var d=a?a.length:0,e=c?-1:1;for(c=c?d-1:0;c<d&&0<=c;c+=e)b(a[c],c)}var n="import"in document.createElement("link"),p=null;!1==="currentScript"in document&&Object.defineProperty(document,"currentScript",{get:function(){return p||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null)},configurable:!0});var t=/(^\/)|(^#)|(^[\w-\d]*:)/,u=/(url\()([^)]*)(\))/g,v=/(@import[\s]+(?!url\())([^;]*)(;)/g,y=/(<link[^>]*)(rel=['|"]?stylesheet['|"]?[^>]*>)/g,+r={nb:function(a,b){a.href&&a.setAttribute("href",r.va(a.getAttribute("href"),b));a.src&&a.setAttribute("src",r.va(a.getAttribute("src"),b));if("style"===a.localName){var c=r.Ma(a.textContent,b,u);a.textContent=r.Ma(c,b,v)}},Ma:function(a,b,c){return a.replace(c,function(a,c,d,e){a=d.replace(/["']/g,"");b&&(a=r.Na(a,b));return c+"'"+a+"'"+e})},va:function(a,b){return a&&t.test(a)?a:r.Na(a,b)},Na:function(a,b){if(void 0===r.ma){r.ma=!1;try{var c=new URL("b","http://a");c.pathname="c%20d";r.ma="http://a/c%20d"===+c.href}catch(gf){}}if(r.ma)return(new URL(a,b)).href;c=r.$a;c||(c=document.implementation.createHTMLDocument("temp"),r.$a=c,c.ya=c.createElement("base"),c.head.appendChild(c.ya),c.xa=c.createElement("a"));c.ya.href=b;c.xa.href=a;return c.xa.href||a}},z={async:!0,load:function(a,b,c){if(a)if(a.match(/^data:/)){a=a.split(",");var d=a[1];d=-1<a[0].indexOf(";base64")?atob(d):decodeURIComponent(d);b(d)}else{var e=new XMLHttpRequest;e.open("GET",a,z.async);e.onload=function(){var a=e.responseURL||e.getResponseHeader("Location");+a&&0===a.indexOf("/")&&(a=(location.origin||location.protocol+"//"+location.host)+a);var d=e.response||e.responseText;304===e.status||0===e.status||200<=e.status&&300>e.status?b(d,a):c(d)};e.send()}else c("error: href must be specified")}},A=/Trident/.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent);l.prototype.c=function(a){var b=this;a=a.querySelectorAll("link[rel=import]");k(a,function(a){return b.h(a)})};l.prototype.h=function(a){var b=this,c=a.href;if(void 0!==this.a[c]){var d=+this.a[c];d&&d.__loaded&&(a.import=d,this.g(a))}else this.b++,this.a[c]="pending",z.load(c,function(a,d){a=b.s(a,d||c);b.a[c]=a;b.b--;b.c(a);b.i()},function(){b.a[c]=null;b.b--;b.i()})};l.prototype.s=function(a,b){if(!a)return document.createDocumentFragment();A&&(a=a.replace(y,function(a,b,c){return-1===a.indexOf("type=")?b+" type=import-disable "+c:a}));var c=document.createElement("template");c.innerHTML=a;if(c.content)a=c.content;else for(a=document.createDocumentFragment();c.firstChild;)a.appendChild(c.firstChild);+if(c=a.querySelector("base"))b=r.va(c.getAttribute("href"),b),c.removeAttribute("href");c=a.querySelectorAll('link[rel=import], link[rel=stylesheet][href][type=import-disable],\n style:not([type]), link[rel=stylesheet][href]:not([type]),\n script:not([type]), script[type="application/javascript"],\n script[type="text/javascript"]');var d=0;k(c,function(a){h(a);r.nb(a,b);a.setAttribute("import-dependency","");"script"===a.localName&&!a.src&&a.textContent&&(a.setAttribute("src","data:text/javascript;charset=utf-8,"++encodeURIComponent(a.textContent+("\n//# sourceURL="+b+(d?"-"+d:"")+".js\n"))),a.textContent="",d++)});return a};l.prototype.i=function(){var a=this;if(!this.b){this.f.disconnect();this.flatten(document);var b=!1,c=!1,d=function(){c&&b&&(a.c(document),a.b||(a.f.observe(document.head,{childList:!0,subtree:!0}),a.j()))};this.v(function(){c=!0;d()});this.u(function(){b=!0;d()})}};l.prototype.flatten=function(a){var b=this;a=a.querySelectorAll("link[rel=import]");k(a,function(a){var c=b.a[a.href];(a.import=+c)&&c.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(b.a[a.href]=a,a.readyState="loading",a.import=a,b.flatten(c),a.appendChild(c))})};l.prototype.u=function(a){function b(e){if(e<d){var f=c[e],g=document.createElement("script");f.removeAttribute("import-dependency");k(f.attributes,function(a){return g.setAttribute(a.name,a.value)});p=g;f.parentNode.replaceChild(g,f);h(g,function(){p=null;b(e+1)})}else a()}var c=document.querySelectorAll("script[import-dependency]"),d=c.length;b(0)};l.prototype.v=function(a){var b=+document.querySelectorAll("style[import-dependency],\n link[rel=stylesheet][import-dependency]"),d=b.length;if(d){var e=A&&!!document.querySelector("link[rel=stylesheet][href][type=import-disable]");k(b,function(b){h(b,function(){b.removeAttribute("import-dependency");0===--d&&a()});if(e&&b.parentNode!==document.head){var f=document.createElement(b.localName);f.__appliedElement=b;f.setAttribute("type","import-placeholder");b.parentNode.insertBefore(f,b.nextSibling);for(f=c(b);f&&c(f);)f=c(f);f.parentNode!==+document.head&&(f=null);document.head.insertBefore(b,f);b.removeAttribute("type")}})}else a()};l.prototype.j=function(){var a=this,b=document.querySelectorAll("link[rel=import]");k(b,function(b){return a.g(b)},!0)};l.prototype.g=function(a){a.__loaded||(a.__loaded=!0,a.import&&(a.import.readyState="complete"),a.dispatchEvent(b(a.import?"load":"error",{bubbles:!1,cancelable:!1,detail:void 0})))};l.prototype.l=function(a){var b=this;k(a,function(a){return k(a.addedNodes,function(a){a&&a.nodeType===+Node.ELEMENT_NODE&&(g(a)?b.h(a):b.c(a))})})};if(n){var x=document.querySelectorAll("link[rel=import]");k(x,function(a){a.import&&"loading"===a.import.readyState||(a.__loaded=!0)});x=function(a){a=a.target;g(a)&&(a.__loaded=!0)};document.addEventListener("load",x,!0);document.addEventListener("error",x,!0)}else{var w=Object.getOwnPropertyDescriptor(Node.prototype,"baseURI");Object.defineProperty((!w||w.configurable?Node:Element).prototype,"baseURI",{get:function(){var a=g(this)?this:c(this);return a?+a.href:w&&w.get?w.get.call(this):(document.querySelector("base")||window.location).href},configurable:!0,enumerable:!0});e(function(){return new l})}f(function(){return document.dispatchEvent(b("HTMLImportsLoaded",{cancelable:!0,bubbles:!0,detail:void 0}))});a.useNative=n;a.whenReady=f;a.importForElement=c})(window.HTMLImports=window.HTMLImports||{});window.WebComponents=window.WebComponents||{flags:{}};var nd=document.querySelector('script[src*="webcomponents-lite.js"]'),He=/wc-(.+)/,G={};if(!G.noOpts){location.search.slice(1).split("&").forEach(function(a){a=+a.split("=");var b;a[0]&&(b=a[0].match(He))&&(G[b[1]]=a[1]||!0)});if(nd)for(var od=0,Ca;Ca=nd.attributes[od];od++)"src"!==Ca.name&&(G[Ca.name]=Ca.value||!0);if(G.log&&G.log.split){var Ie=G.log.split(",");G.log={};Ie.forEach(function(a){G.log[a]=!0})}else G.log={}}window.WebComponents.flags=G;var pd=G.shadydom;pd&&(window.ShadyDOM=window.ShadyDOM||{},window.ShadyDOM.force=pd);var qd=G.register||G.ce;qd&&window.customElements&&(window.customElements.forcePolyfill=qd);var F=window.ShadyDOM||{};F.ob=+!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var Ab=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");F.W=!!(Ab&&Ab.configurable&&Ab.get);F.Ja=F.force||!F.ob;var ea=Element.prototype,rd=ea.matches||ea.matchesSelector||ea.mozMatchesSelector||ea.msMatchesSelector||ea.oMatchesSelector||ea.webkitMatchesSelector,gb=document.createTextNode(""),lc=0,fb=[];(new MutationObserver(function(){for(;fb.length;)try{fb.shift()()}catch(a){throw gb.textContent=lc++,a;}})).observe(gb,{characterData:!0});+var la=[],hb;wa.list=la;ua.prototype.vb=function(){var a=this;this.a||(this.a=!0,kc(function(){a.b()}))};ua.prototype.b=function(){if(this.a){this.a=!1;var a=this.takeRecords();a.length&&this.ba.forEach(function(b){b(a)})}};ua.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var a=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];this.addedNodes=[];this.removedNodes=[];return a}return[]};var Cc=Element.prototype.appendChild,ob=Element.prototype.insertBefore,+ma=Element.prototype.removeChild,Kc=Element.prototype.setAttribute,sd=Element.prototype.removeAttribute,Bb=Element.prototype.cloneNode,pb=Document.prototype.importNode,Sc=Element.prototype.addEventListener,Vc=Element.prototype.removeEventListener,Rc=Window.prototype.addEventListener,Uc=Window.prototype.removeEventListener,Cb=Element.prototype.dispatchEvent,Je=Object.freeze({appendChild:Cc,insertBefore:ob,removeChild:ma,setAttribute:Kc,removeAttribute:sd,cloneNode:Bb,importNode:pb,addEventListener:Sc,+removeEventListener:Vc,Lb:Rc,Mb:Uc,dispatchEvent:Cb,querySelector:Element.prototype.querySelector,querySelectorAll:Element.prototype.querySelectorAll}),ne=/[&\u00A0"]/g,qe=/[&\u00A0<>]/g,oe=oc("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),pe=oc("style script xmp iframe noembed noframes plaintext noscript".split(" ")),D=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),E=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,+!1),Ke=Object.freeze({parentNode:ba,firstChild:Ua,lastChild:Va,previousSibling:pc,nextSibling:qc,childNodes:V,parentElement:rc,firstElementChild:sc,lastElementChild:tc,previousElementSibling:uc,nextElementSibling:vc,children:wc,innerHTML:xc,textContent:yc}),Db=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML")||Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML"),Da=document.implementation.createHTMLDocument("inert").createElement("div"),Eb=Object.getOwnPropertyDescriptor(Document.prototype,+"activeElement"),zc={parentElement:{get:function(){var a=this.__shady&&this.__shady.parentNode;a&&a.nodeType!==Node.ELEMENT_NODE&&(a=null);return void 0!==a?a:rc(this)},configurable:!0},parentNode:{get:function(){var a=this.__shady&&this.__shady.parentNode;return void 0!==a?a:ba(this)},configurable:!0},nextSibling:{get:function(){var a=this.__shady&&this.__shady.nextSibling;return void 0!==a?a:qc(this)},configurable:!0},previousSibling:{get:function(){var a=this.__shady&&this.__shady.previousSibling;+return void 0!==a?a:pc(this)},configurable:!0},className:{get:function(){return this.getAttribute("class")||""},set:function(a){this.setAttribute("class",a)},configurable:!0},nextElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.nextSibling){for(var a=this.nextSibling;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.nextSibling;return a}return vc(this)},configurable:!0},previousElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.previousSibling){for(var a=this.previousSibling;a&&+a.nodeType!==Node.ELEMENT_NODE;)a=a.previousSibling;return a}return uc(this)},configurable:!0}},jb={childNodes:{get:function(){if(aa(this)){if(!this.__shady.childNodes){this.__shady.childNodes=[];for(var a=this.firstChild;a;a=a.nextSibling)this.__shady.childNodes.push(a)}var b=this.__shady.childNodes}else b=V(this);b.item=function(a){return b[a]};return b},configurable:!0},childElementCount:{get:function(){return this.children.length},configurable:!0},firstChild:{get:function(){var a=this.__shady&&+this.__shady.firstChild;return void 0!==a?a:Ua(this)},configurable:!0},lastChild:{get:function(){var a=this.__shady&&this.__shady.lastChild;return void 0!==a?a:Va(this)},configurable:!0},textContent:{get:function(){if(aa(this)){for(var a=[],b=0,c=this.childNodes,d;d=c[b];b++)d.nodeType!==Node.COMMENT_NODE&&a.push(d.textContent);return a.join("")}return yc(this)},set:function(a){switch(this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:for(;this.firstChild;)this.removeChild(this.firstChild);+(0<a.length||this.nodeType===Node.ELEMENT_NODE)&&this.appendChild(document.createTextNode(a));break;default:this.nodeValue=a}},configurable:!0},firstElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.firstChild){for(var a=this.firstChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.nextSibling;return a}return sc(this)},configurable:!0},lastElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.lastChild){for(var a=this.lastChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.previousSibling;+return a}return tc(this)},configurable:!0},children:{get:function(){var a;aa(this)?a=Array.prototype.filter.call(this.childNodes,function(a){return a.nodeType===Node.ELEMENT_NODE}):a=wc(this);a.item=function(b){return a[b]};return a},configurable:!0},innerHTML:{get:function(){var a="template"===this.localName?this.content:this;return aa(this)?ib(a):xc(a)},set:function(a){for(var b="template"===this.localName?this.content:this;b.firstChild;)b.removeChild(b.firstChild);for(Db&&Db.set?Db.set.call(Da,+a):Da.innerHTML=a;Da.firstChild;)b.appendChild(Da.firstChild)},configurable:!0}},td={shadowRoot:{get:function(){return this.__shady&&this.__shady.tb||null},configurable:!0}},kb={activeElement:{get:function(){var a=Eb&&Eb.get?Eb.get.call(document):F.W?void 0:document.activeElement;if(a&&a.nodeType){var b=!!J(this);if(this===document||b&&this.host!==a&&this.host.contains(a)){for(b=ka(a);b&&b!==this;)a=b.host,b=ka(a);a=this===document?b?null:a:b===this?a:null}else a=null}else a=null;return a},set:function(){},+configurable:!0}},bc=F.W?function(){}:function(a){a.__shady&&a.__shady.Ya||(a.__shady=a.__shady||{},a.__shady.Ya=!0,N(a,zc,!0))},ac=F.W?function(){}:function(a){a.__shady&&a.__shady.Wa||(a.__shady=a.__shady||{},a.__shady.Wa=!0,N(a,jb,!0),N(a,td,!0))},ya=null,na="__eventWrappers"+Date.now(),Le={blur:!0,focus:!0,focusin:!0,focusout:!0,click:!0,dblclick:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,wheel:!0,beforeinput:!0,input:!0,keydown:!0,keyup:!0,compositionstart:!0,+compositionupdate:!0,compositionend:!0,touchstart:!0,touchend:!0,touchmove:!0,touchcancel:!0,pointerover:!0,pointerenter:!0,pointerdown:!0,pointermove:!0,pointerup:!0,pointercancel:!0,pointerout:!0,pointerleave:!0,gotpointercapture:!0,lostpointercapture:!0,dragstart:!0,drag:!0,dragenter:!0,dragleave:!0,dragover:!0,drop:!0,dragend:!0,DOMActivate:!0,DOMFocusIn:!0,DOMFocusOut:!0,keypress:!0},Wc={get composed(){!1!==this.isTrusted&&void 0===this.ja&&(this.ja=Le[this.type]);return this.ja||!1},composedPath:function(){this.za||+(this.za=qb(this.__target,this.composed));return this.za},get target(){return Mc(this.currentTarget,this.composedPath())},get relatedTarget(){if(!this.Aa)return null;this.Ba||(this.Ba=qb(this.Aa,!0));return Mc(this.currentTarget,this.Ba)},stopPropagation:function(){Event.prototype.stopPropagation.call(this);this.ka=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this);this.ka=this.Va=!0}},sb={focus:!0,blur:!0},Me=rb(window.Event),Ne=rb(window.CustomEvent),Oe=+rb(window.MouseEvent),$b={};n.prototype=Object.create(DocumentFragment.prototype);n.prototype.D=function(a,b){this.Xa="ShadyRoot";ta(a);ta(this);this.host=a;this.L=b&&b.mode;a.__shady=a.__shady||{};a.__shady.root=this;a.__shady.tb="closed"!==this.L?this:null;this.T=!1;this.b=[];this.a=null;b=V(a);for(var c=0,d=b.length;c<d;c++)ma.call(a,b[c])};n.prototype.M=function(){var a=this;this.T||(this.T=!0,mc(function(){return a.Fa()}))};n.prototype.C=function(){for(var a=this,b=this;b;)b.T&&(a=b),b=b.ib();+return a};n.prototype.ib=function(){var a=this.host.getRootNode();if(J(a))for(var b=this.host.childNodes,c=0,d;c<b.length;c++)if(d=b[c],this.h(d))return a};n.prototype.Fa=function(){this.T&&this.C()._renderRoot()};n.prototype._renderRoot=function(){this.T=!1;this.v();this.s()};n.prototype.v=function(){for(var a=0,b;a<this.b.length;a++)b=this.b[a],this.l(b);for(b=this.host.firstChild;b;b=b.nextSibling)this.f(b);for(a=0;a<this.b.length;a++){b=this.b[a];if(!b.__shady.assignedNodes.length)for(var c=b.firstChild;c;c=+c.nextSibling)this.f(c,b);c=b.parentNode;(c=c.__shady&&c.__shady.root)&&c.Ca()&&c._renderRoot();this.c(b.__shady.V,b.__shady.assignedNodes);if(c=b.__shady.Ea){for(var d=0;d<c.length;d++)c[d].__shady.na=null;b.__shady.Ea=null;c.length>b.__shady.assignedNodes.length&&(b.__shady.ra=!0)}b.__shady.ra&&(b.__shady.ra=!1,this.g(b))}};n.prototype.f=function(a,b){a.__shady=a.__shady||{};var c=a.__shady.na;a.__shady.na=null;b||(b=(b=this.a[a.slot||"__catchall"])&&b[0]);b?(b.__shady.assignedNodes.push(a),a.__shady.assignedSlot=+b):a.__shady.assignedSlot=void 0;c!==a.__shady.assignedSlot&&a.__shady.assignedSlot&&(a.__shady.assignedSlot.__shady.ra=!0)};n.prototype.l=function(a){var b=a.__shady.assignedNodes;a.__shady.assignedNodes=[];a.__shady.V=[];if(a.__shady.Ea=b)for(var c=0;c<b.length;c++){var d=b[c];d.__shady.na=d.__shady.assignedSlot;d.__shady.assignedSlot===a&&(d.__shady.assignedSlot=null)}};n.prototype.c=function(a,b){for(var c=0,d;c<b.length&&(d=b[c]);c++)"slot"==d.localName?this.c(a,d.__shady.assignedNodes):a.push(b[c])};+n.prototype.g=function(a){Cb.call(a,new Event("slotchange"));a.__shady.assignedSlot&&this.g(a.__shady.assignedSlot)};n.prototype.s=function(){for(var a=this.b,b=[],c=0;c<a.length;c++){var d=a[c].parentNode;d.__shady&&d.__shady.root||!(0>b.indexOf(d))||b.push(d)}for(a=0;a<b.length;a++)c=b[a],this.I(c===this?this.host:c,this.u(c))};n.prototype.u=function(a){var b=[];a=a.childNodes;for(var c=0;c<a.length;c++){var d=a[c];if(this.h(d)){d=d.__shady.V;for(var e=0;e<d.length;e++)b.push(d[e])}else b.push(d)}return b};+n.prototype.h=function(a){return"slot"==a.localName};n.prototype.I=function(a,b){for(var c=V(a),d=te(b,b.length,c,c.length),e=0,f=0,h;e<d.length&&(h=d[e]);e++){for(var g=0,l;g<h.Y.length&&(l=h.Y[g]);g++)ba(l)===a&&ma.call(a,l),c.splice(h.index+f,1);f-=h.aa}for(e=0;e<d.length&&(h=d[e]);e++)for(f=c[h.index],g=h.index;g<h.index+h.aa;g++)l=b[g],ob.call(a,l,f),c.splice(g,0,l)};n.prototype.ab=function(a){this.a=this.a||{};this.b=this.b||[];for(var b=0;b<a.length;b++){var c=a[b];c.__shady=c.__shady||{};+ta(c);ta(c.parentNode);var d=this.i(c);if(this.a[d]){var e=e||{};e[d]=!0;this.a[d].push(c)}else this.a[d]=[c];this.b.push(c)}if(e)for(var f in e)this.a[f]=this.j(this.a[f])};n.prototype.i=function(a){var b=a.name||a.getAttribute("name")||"__catchall";return a.Za=b};n.prototype.j=function(a){return a.sort(function(a,c){a=Xc(a);for(var b=Xc(c),e=0;e<a.length;e++){c=a[e];var f=b[e];if(c!==f)return a=Array.from(c.parentNode.childNodes),a.indexOf(c)-a.indexOf(f)}})};n.prototype.hb=function(a){this.a=this.a||+{};this.b=this.b||[];var b=this.a,c;for(c in b)for(var d=b[c],e=0;e<d.length;e++){var f=d[e],h;a:{for(h=f;h;){if(h==a){h=!0;break a}h=h.parentNode}h=void 0}if(h){d.splice(e,1);var g=this.b.indexOf(f);0<=g&&this.b.splice(g,1);e--;this.H(f);g=!0}}return g};n.prototype.jb=function(a){var b=a.Za,c=this.i(a);if(c!==b){b=this.a[b];var d=b.indexOf(a);0<=d&&b.splice(d,1);b=this.a[c]||(this.a[c]=[]);b.push(a);1<b.length&&(this.a[c]=this.j(b))}};n.prototype.H=function(a){if(a=a.__shady.V)for(var b=0;b<a.length;b++){var c=+a[b],d=ba(c);d&&ma.call(d,c)}};n.prototype.Ca=function(){return!!this.b.length};n.prototype.addEventListener=function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.la=this;this.host.addEventListener(a,b,c)};n.prototype.removeEventListener=function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.la=this;this.host.removeEventListener(a,b,c)};n.prototype.getElementById=function(a){return xa(this,function(b){return b.id==a},function(a){return!!a})[0]||null};(function(a){N(a,jb,!0);N(a,kb,!0)})(n.prototype);+var xe={addEventListener:Pc.bind(window),removeEventListener:Tc.bind(window)},we={addEventListener:Pc,removeEventListener:Tc,appendChild:function(a){return lb(this,a)},insertBefore:function(a,b){return lb(this,a,b)},removeChild:function(a){return mb(this,a)},replaceChild:function(a,b){lb(this,a,b);mb(this,b);return a},cloneNode:function(a){if("template"==this.localName)var b=Bb.call(this,a);else if(b=Bb.call(this,!1),a){a=this.childNodes;for(var c=0,d;c<a.length;c++)d=a[c].cloneNode(!0),b.appendChild(d)}return b},+getRootNode:function(){return Gc(this)},get isConnected(){var a=this.ownerDocument;if(a&&a.contains&&a.contains(this)||(a=a.documentElement)&&a.contains&&a.contains(this))return!0;for(a=this;a&&!(a instanceof Document);)a=a.parentNode||(a instanceof n?a.host:void 0);return!!(a&&a instanceof Document)},dispatchEvent:function(a){wa();return Cb.call(this,a)}},ye={get assignedSlot(){return Yc(this)}},tb={querySelector:function(a){return xa(this,function(b){return rd.call(b,a)},function(a){return!!a})[0]||+null},querySelectorAll:function(a){return xa(this,function(b){return rd.call(b,a)})}},ad={assignedNodes:function(a){if("slot"===this.localName)return Ic(this),this.__shady?(a&&a.flatten?this.__shady.V:this.__shady.assignedNodes)||[]:[]}},Zc=eb({setAttribute:function(a,b){Jc(this,a,b)},removeAttribute:function(a){sd.call(this,a);Fc(this,a)},attachShadow:function(a){if(!this)throw"Must provide a host.";if(!a)throw"Not enough arguments.";return new n($b,this,a)},get slot(){return this.getAttribute("slot")},+set slot(a){Jc(this,"slot",a)},get assignedSlot(){return Yc(this)}},tb,ad);Object.defineProperties(Zc,td);var $c=eb({importNode:function(a,b){return Lc(a,b)},getElementById:function(a){return xa(this,function(b){return b.id==a},function(a){return!!a})[0]||null}},tb);Object.defineProperties($c,{_activeElement:kb.activeElement});var Pe=HTMLElement.prototype.blur,ze=eb({blur:function(){var a=this.__shady&&this.__shady.root;(a=a&&a.activeElement)?a.blur():Pe.call(this)}});F.Ja&&(window.ShadyDOM={inUse:F.Ja,+patch:function(a){return a},isShadyRoot:J,enqueue:mc,flush:wa,settings:F,filterMutations:me,observeChildren:$d,unobserveChildren:Zd,nativeMethods:Je,nativeTree:Ke},window.Event=Me,window.CustomEvent=Ne,window.MouseEvent=Oe,se(),ve(),window.ShadowRoot=n);var Ae=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));w.prototype.D=function(a,b){this.u.set(a,b);this.s.set(b.constructor,b)};w.prototype.c=function(a){return this.u.get(a)};+w.prototype.C=function(a){return this.s.get(a)};w.prototype.v=function(a){this.h=!0;this.j.push(a)};w.prototype.l=function(a){var b=this;this.h&&Q(a,function(a){return b.g(a)})};w.prototype.g=function(a){if(this.h&&!a.__CE_patched){a.__CE_patched=!0;for(var b=0;b<this.j.length;b++)this.j[b](a)}};w.prototype.b=function(a){var b=[];Q(a,function(a){return b.push(a)});for(a=0;a<b.length;a++){var c=b[a];1===c.__CE_state?this.connectedCallback(c):this.i(c)}};w.prototype.a=function(a){var b=[];Q(a,function(a){return b.push(a)});+for(a=0;a<b.length;a++){var c=b[a];1===c.__CE_state&&this.disconnectedCallback(c)}};w.prototype.f=function(a,b){var c=this;b=b?b:{};var d=b.yb||new Set,e=b.Oa||function(a){return c.i(a)},f=[];Q(a,function(a){if("link"===a.localName&&"import"===a.getAttribute("rel")){var b=a.import;b instanceof Node&&"complete"===b.readyState?(b.__CE_isImportDocument=!0,b.__CE_hasRegistry=!0):a.addEventListener("load",function(){var b=a.import;if(!b.__CE_documentLoadHandled){b.__CE_documentLoadHandled=!0;b.__CE_isImportDocument=+!0;b.__CE_hasRegistry=!0;var f=new Set(d);f.delete(b);c.f(b,{yb:f,Oa:e})}})}else f.push(a)},d);if(this.h)for(a=0;a<f.length;a++)this.g(f[a]);for(a=0;a<f.length;a++)e(f[a])};w.prototype.i=function(a){if(void 0===a.__CE_state){var b=this.c(a.localName);if(b){b.constructionStack.push(a);var c=b.constructor;try{try{if(new c!==a)throw Error("The custom element constructor did not produce the element being upgraded.");}finally{b.constructionStack.pop()}}catch(f){throw a.__CE_state=2,f;}a.__CE_state=1;a.__CE_definition=+b;if(b.attributeChangedCallback)for(b=b.observedAttributes,c=0;c<b.length;c++){var d=b[c],e=a.getAttribute(d);null!==e&&this.attributeChangedCallback(a,d,null,e,null)}t(a)&&this.connectedCallback(a)}}};w.prototype.connectedCallback=function(a){var b=a.__CE_definition;b.connectedCallback&&b.connectedCallback.call(a)};w.prototype.disconnectedCallback=function(a){var b=a.__CE_definition;b.disconnectedCallback&&b.disconnectedCallback.call(a)};w.prototype.attributeChangedCallback=function(a,b,c,d,e){var f=+a.__CE_definition;f.attributeChangedCallback&&-1<f.observedAttributes.indexOf(b)&&f.attributeChangedCallback.call(a,b,c,d,e)};Ta.prototype.c=function(){this.N&&this.N.disconnect()};Ta.prototype.f=function(a){var b=this.a.readyState;"interactive"!==b&&"complete"!==b||this.c();for(b=0;b<a.length;b++)for(var c=a[b].addedNodes,d=0;d<c.length;d++)this.b.f(c[d])};Zb.prototype.resolve=function(a){if(this.a)throw Error("Already resolved.");this.a=a;this.b&&this.b(a)};A.prototype.define=function(a,b){var c=+this;if(!(b instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!bd(a))throw new SyntaxError("The element name '"+a+"' is not valid.");if(this.a.c(a))throw Error("A custom element with name '"+a+"' has already been defined.");if(this.c)throw Error("A custom element is already being defined.");this.c=!0;try{var d=function(a){var b=e[a];if(void 0!==b&&!(b instanceof Function))throw Error("The '"+a+"' callback must be a function.");return b},e=b.prototype;if(!(e instanceof+Object))throw new TypeError("The custom element constructor's prototype is not an object.");var f=d("connectedCallback");var h=d("disconnectedCallback");var g=d("adoptedCallback");var l=d("attributeChangedCallback");var k=b.observedAttributes||[]}catch(q){return}finally{this.c=!1}b={localName:a,constructor:b,connectedCallback:f,disconnectedCallback:h,adoptedCallback:g,attributeChangedCallback:l,observedAttributes:k,constructionStack:[]};this.a.D(a,b);this.g.push(b);this.b||(this.b=!0,this.f(function(){return c.j()}))};+A.prototype.j=function(){var a=this;if(!1!==this.b){this.b=!1;for(var b=this.g,c=[],d=new Map,e=0;e<b.length;e++)d.set(b[e].localName,[]);this.a.f(document,{Oa:function(b){if(void 0===b.__CE_state){var e=b.localName,f=d.get(e);f?f.push(b):a.a.c(e)&&c.push(b)}}});for(e=0;e<c.length;e++)this.a.i(c[e]);for(;0<b.length;){var f=b.shift();e=f.localName;f=d.get(f.localName);for(var h=0;h<f.length;h++)this.a.i(f[h]);(e=this.h.get(e))&&e.resolve(void 0)}}};A.prototype.get=function(a){if(a=this.a.c(a))return a.constructor};+A.prototype.whenDefined=function(a){if(!bd(a))return Promise.reject(new SyntaxError("'"+a+"' is not a valid custom element name."));var b=this.h.get(a);if(b)return b.c;b=new Zb;this.h.set(a,b);this.a.c(a)&&!this.g.some(function(b){return b.localName===a})&&b.resolve(void 0);return b.c};A.prototype.l=function(a){this.i.c();var b=this.f;this.f=function(c){return a(function(){return b(c)})}};window.CustomElementRegistry=A;A.prototype.define=A.prototype.define;A.prototype.get=A.prototype.get;A.prototype.whenDefined=+A.prototype.whenDefined;A.prototype.polyfillWrapFlushCallback=A.prototype.l;var Oa=window.Document.prototype.createElement,Ud=window.Document.prototype.createElementNS,Td=window.Document.prototype.importNode,Vd=window.Document.prototype.prepend,Wd=window.Document.prototype.append,Qe=window.DocumentFragment.prototype.prepend,Re=window.DocumentFragment.prototype.append,Pb=window.Node.prototype.cloneNode,ra=window.Node.prototype.appendChild,Wb=window.Node.prototype.insertBefore,Pa=window.Node.prototype.removeChild,+Xb=window.Node.prototype.replaceChild,Sa=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),Ob=window.Element.prototype.attachShadow,Ma=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),Qa=window.Element.prototype.getAttribute,Qb=window.Element.prototype.setAttribute,Sb=window.Element.prototype.removeAttribute,sa=window.Element.prototype.getAttributeNS,Rb=window.Element.prototype.setAttributeNS,Tb=window.Element.prototype.removeAttributeNS,Vb=window.Element.prototype.insertAdjacentElement,+Kd=window.Element.prototype.prepend,Ld=window.Element.prototype.append,Nd=window.Element.prototype.before,Od=window.Element.prototype.after,Pd=window.Element.prototype.replaceWith,Qd=window.Element.prototype.remove,Yd=window.HTMLElement,Na=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),Ub=window.HTMLElement.prototype.insertAdjacentElement,Yb=new function(){},Ea=window.customElements;if(!Ea||Ea.forcePolyfill||"function"!=typeof Ea.define||"function"!=typeof Ea.get){var fa=+new w;Xd(fa);Sd(fa);Ra(fa,DocumentFragment.prototype,{da:Qe,append:Re});Rd(fa);Jd(fa);document.__CE_hasRegistry=!0;var Se=new A(fa);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:Se})}var M={STYLE_RULE:1,ia:7,MEDIA_RULE:4,wa:1E3},I={mb:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,Ga:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,Ka:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,sb:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,xb:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,+rb:/^@[^\s]*keyframes/,La:/\s+/g},r=!(window.ShadyDOM&&window.ShadyDOM.inUse);if(window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss)var x=window.ShadyCSS.nativeCss;else window.ShadyCSS?(ed(window.ShadyCSS),window.ShadyCSS=void 0):ed(window.WebComponents&&window.WebComponents.flags);var Fa=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,Ga=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,Te=/(--[\w-]+)\s*([:,;)]|$)/gi,Ue=/(animation\s*:)|(animation-name\s*:)/,+Ce=/@media\s(.*)/,Ve=/\{[^}]*\}/g,T=null;u.prototype.a=function(a,b,c){a.__styleScoped?a.__styleScoped=null:this.i(a,b||"",c)};u.prototype.i=function(a,b,c){a.nodeType===Node.ELEMENT_NODE&&this.C(a,b,c);if(a="template"===a.localName?(a.content||a.Db).childNodes:a.children||a.childNodes)for(var d=0;d<a.length;d++)this.i(a[d],b,c)};u.prototype.C=function(a,b,c){if(b)if(a.classList)c?(a.classList.remove("style-scope"),a.classList.remove(b)):(a.classList.add("style-scope"),a.classList.add(b));else if(a.getAttribute){var d=+a.getAttribute(We);c?d&&(b=d.replace("style-scope","").replace(b,""),Aa(a,b)):Aa(a,(d?d+" ":"")+"style-scope "+b)}};u.prototype.b=function(a,b,c){var d=a.__cssBuild;r||"shady"===d?b=ca(b,c):(a=U(a),b=this.I(b,a.is,a.Z,c)+"\n\n");return b.trim()};u.prototype.I=function(a,b,c,d){var e=this.f(b,c);b=this.h(b);var f=this;return ca(a,function(a){a.c||(f.S(a,b,e),a.c=!0);d&&d(a,b,e)})};u.prototype.h=function(a){return a?Xe+a:""};u.prototype.f=function(a,b){return b?"[is="+a+"]":a};u.prototype.S=function(a,+b,c){this.j(a,this.g,b,c)};u.prototype.j=function(a,b,c,d){a.selector=a.A=this.l(a,b,c,d)};u.prototype.l=function(a,b,c,d){var e=a.selector.split(ud);if(!fd(a)){a=0;for(var f=e.length,h;a<f&&(h=e[a]);a++)e[a]=b.call(this,h,c,d)}return e.join(ud)};u.prototype.u=function(a){return a.replace(Fb,function(a,c,d){-1<d.indexOf("+")?d=d.replace(/\+/g,"___"):-1<d.indexOf("___")&&(d=d.replace(/___/g,"+"));return":"+c+"("+d+")"})};u.prototype.g=function(a,b,c){var d=this,e=!1;a=a.trim();var f=Fb.test(a);f&&+(a=a.replace(Fb,function(a,b,c){return":"+b+"("+c.replace(/\s/g,"")+")"}),a=this.u(a));a=a.replace(Ye,Gb+" $1");a=a.replace(Ze,function(a,f,k){e||(a=d.D(k,f,b,c),e=e||a.stop,f=a.lb,k=a.value);return f+k});f&&(a=this.u(a));return a};u.prototype.D=function(a,b,c,d){var e=a.indexOf(Hb);0<=a.indexOf(Gb)?a=this.H(a,d):0!==e&&(a=c?this.s(a,c):a);c=!1;0<=e&&(b="",c=!0);if(c){var f=!0;c&&(a=a.replace($e,function(a,b){return" > "+b}))}a=a.replace(af,function(a,b,c){return'[dir="'+c+'"] '+b+", "+b+'[dir="'++c+'"]'});return{value:a,lb:b,stop:f}};u.prototype.s=function(a,b){a=a.split(vd);a[0]+=b;return a.join(vd)};u.prototype.H=function(a,b){var c=a.match(wd);return(c=c&&c[2].trim()||"")?c[0].match(xd)?a.replace(wd,function(a,c,f){return b+f}):c.split(xd)[0]===b?c:bf:a.replace(Gb,b)};u.prototype.R=function(a){a.selector=a.parsedSelector;this.v(a);this.j(a,this.L)};u.prototype.v=function(a){a.selector===cf&&(a.selector="html")};u.prototype.L=function(a){return a.match(Hb)?this.g(a,yd):this.s(a.trim(),yd)};+Lb.Object.defineProperties(u.prototype,{c:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});var Fb=/:(nth[-\w]+)\(([^)]+)\)/,yd=":not(.style-scope)",ud=",",Ze=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,xd=/[[.:#*]/,Gb=":host",cf=":root",Hb="::slotted",Ye=new RegExp("^("+Hb+")"),wd=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,$e=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,af=/(.*):dir\((?:(ltr|rtl))\)/,Xe=".",vd=":",We="class",bf="should_not_match",y=new u;v.get=function(a){return a?+a.__styleInfo:null};v.set=function(a,b){return a.__styleInfo=b};v.prototype.c=function(){return this.G};v.prototype._getStyleRules=v.prototype.c;var zd=function(a){return a.matches||a.matchesSelector||a.mozMatchesSelector||a.msMatchesSelector||a.oMatchesSelector||a.webkitMatchesSelector}(window.Element.prototype),df=navigator.userAgent.match("Trident");p.prototype.R=function(a){var b=this,c={},d=[],e=0;da(a,function(a){b.c(a);a.index=e++;b.I(a.w.cssText,c)},function(a){d.push(a)});a.b=d;a=[];for(var f in c)a.push(f);+return a};p.prototype.c=function(a){if(!a.w){var b={},c={};this.b(a,c)&&(b.F=c,a.rules=null);b.cssText=this.H(a);a.w=b}};p.prototype.b=function(a,b){var c=a.w;if(c){if(c.F)return Object.assign(b,c.F),!0}else{c=a.parsedCssText;for(var d;a=Fa.exec(c);){d=(a[2]||a[3]).trim();if("inherit"!==d||"unset"!==d)b[a[1].trim()]=d;d=!0}return d}};p.prototype.H=function(a){return this.L(a.parsedCssText)};p.prototype.L=function(a){return a.replace(Ve,"").replace(Fa,"")};p.prototype.I=function(a,b){for(var c;c=Te.exec(a);){var d=+c[1];":"!==c[2]&&(b[d]=!0)}};p.prototype.fa=function(a){for(var b=Object.getOwnPropertyNames(a),c=0,d;c<b.length;c++)d=b[c],a[d]=this.a(a[d],a)};p.prototype.a=function(a,b){if(a)if(0<=a.indexOf(";"))a=this.f(a,b);else{var c=this;a=hd(a,function(a,e,f,h){if(!e)return a+h;(e=c.a(b[e],b))&&"initial"!==e?"apply-shim-inherit"===e&&(e="inherit"):e=c.a(b[f]||f,b)||f;return a+(e||"")+h})}return a&&a.trim()||""};p.prototype.f=function(a,b){a=a.split(";");for(var c=0,d,e;c<a.length;c++)if(d=a[c]){Ga.lastIndex=+0;if(e=Ga.exec(d))d=this.a(b[e[1]],b);else if(e=d.indexOf(":"),-1!==e){var f=d.substring(e);f=f.trim();f=this.a(f,b)||f;d=d.substring(0,e)+f}a[c]=d&&d.lastIndexOf(";")===d.length-1?d.slice(0,-1):d||""}return a.join(";")};p.prototype.D=function(a,b){var c="";a.w||this.c(a);a.w.cssText&&(c=this.f(a.w.cssText,b));a.cssText=c};p.prototype.C=function(a,b){var c=a.cssText,d=a.cssText;null==a.Ia&&(a.Ia=Ue.test(c));if(a.Ia)if(null==a.ca){a.ca=[];for(var e in b)d=b[e],d=d(c),c!==d&&(c=d,a.ca.push(e))}else{for(e=+0;e<a.ca.length;++e)d=b[a.ca[e]],c=d(c);d=c}a.cssText=d};p.prototype.ea=function(a,b){var c={},d=this,e=[];da(a,function(a){a.w||d.c(a);var f=a.A||a.parsedSelector;b&&a.w.F&&f&&zd.call(b,f)&&(d.b(a,c),a=a.index,f=parseInt(a/32,10),e[f]=(e[f]||0)|1<<a%32)},null,!0);return{F:c,key:e}};p.prototype.ha=function(a,b,c,d){b.w||this.c(b);if(b.w.F){var e=U(a);a=e.is;e=e.Z;e=a?y.f(a,e):"html";var f=b.parsedSelector,h=":host > *"===f||"html"===f,g=0===f.indexOf(":host")&&!h;"shady"===c&&(h=f===e+" > *."+e||+-1!==f.indexOf("html"),g=!h&&0===f.indexOf(e));"shadow"===c&&(h=":host > *"===f||"html"===f,g=g&&!h);if(h||g)c=e,g&&(r&&!b.A&&(b.A=y.l(b,y.g,y.h(a),e)),c=b.A||e),d({wb:c,qb:g,Hb:h})}};p.prototype.S=function(a,b){var c={},d={},e=this,f=b&&b.__cssBuild;da(b,function(b){e.ha(a,b,f,function(f){zd.call(a.Eb||a,f.wb)&&(f.qb?e.b(b,c):e.b(b,d))})},null,!0);return{ub:d,pb:c}};p.prototype.ga=function(a,b,c){var d=this,e=U(a),f=y.f(e.is,e.Z),h=new RegExp("(?:^|[^.#[:])"+(a.extends?"\\"+f.slice(0,-1)+"\\]":f)++"($|[.:[\\s>+~])");e=v.get(a).G;var g=this.h(e,c);return y.b(a,e,function(a){d.D(a,b);r||fd(a)||!a.cssText||(d.C(a,g),d.l(a,h,f,c))})};p.prototype.h=function(a,b){a=a.b;var c={};if(!r&&a)for(var d=0,e=a[d];d<a.length;e=a[++d])this.j(e,b),c[e.keyframesName]=this.i(e);return c};p.prototype.i=function(a){return function(b){return b.replace(a.f,a.a)}};p.prototype.j=function(a,b){a.f=new RegExp(a.keyframesName,"g");a.a=a.keyframesName+"-"+b;a.A=a.A||a.selector;a.selector=a.A.replace(a.keyframesName,a.a)};+p.prototype.l=function(a,b,c,d){a.A=a.A||a.selector;d="."+d;for(var e=a.A.split(","),f=0,h=e.length,g;f<h&&(g=e[f]);f++)e[f]=g.match(b)?g.replace(c,d):d+" "+g;a.selector=e.join(",")};p.prototype.u=function(a,b,c){var d=a.getAttribute("class")||"",e=d;c&&(e=d.replace(new RegExp("\\s*x-scope\\s*"+c+"\\s*","g")," "));e+=(e?" ":"")+"x-scope "+b;d!==e&&Aa(a,e)};p.prototype.v=function(a,b,c,d){b=d?d.textContent||"":this.ga(a,b,c);var e=v.get(a),f=e.a;f&&!r&&f!==d&&(f._useCount--,0>=f._useCount&&f.parentNode&&+f.parentNode.removeChild(f));r?e.a?(e.a.textContent=b,d=e.a):b&&(d=wb(b,c,a.shadowRoot,e.b)):d?d.parentNode||(df&&-1<b.indexOf("@media")&&(d.textContent=b),gd(d,null,e.b)):b&&(d=wb(b,c,null,e.b));d&&(d._useCount=d._useCount||0,e.a!=d&&d._useCount++,e.a=d);return d};p.prototype.s=function(a,b){var c=za(a),d=this;a.textContent=ca(c,function(a){var c=a.cssText=a.parsedCssText;a.w&&a.w.cssText&&(c=c.replace(I.Ga,"").replace(I.Ka,""),a.cssText=d.f(c,b))})};Lb.Object.defineProperties(p.prototype,{g:{configurable:!0,+enumerable:!0,get:function(){return"x-scope"}}});var P=new p,Ib={},Ha=window.customElements;if(Ha&&!r){var ef=Ha.define;Ha.define=function(a,b,c){var d=document.createComment(" Shady DOM styles for "+a+" "),e=document.head;e.insertBefore(d,(T?T.nextSibling:null)||e.firstChild);T=d;Ib[a]=d;return ef.call(Ha,a,b,c)}}qa.prototype.a=function(a,b,c){for(var d=0;d<c.length;d++){var e=c[d];if(a.F[e]!==b[e])return!1}return!0};qa.prototype.b=function(a,b,c,d){var e=this.cache[a]||[];e.push({F:b,styleElement:c,+B:d});e.length>this.c&&e.shift();this.cache[a]=e};qa.prototype.fetch=function(a,b,c){if(a=this.cache[a])for(var d=a.length-1;0<=d;d--){var e=a[d];if(this.a(e,b,c))return e}};if(!r){var Ad=new MutationObserver(id),Bd=function(a){Ad.observe(a,{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)Bd(document);else{var Jb=function(){Bd(document.body)};window.HTMLImports?window.HTMLImports.whenReady(Jb):requestAnimationFrame(function(){if("loading"===document.readyState){var a=+function(){Jb();document.removeEventListener("readystatechange",a)};document.addEventListener("readystatechange",a)}else Jb()})}Nb=function(){id(Ad.takeRecords())}}var Ba={},Fe=Promise.resolve(),xb=null,kd=window.HTMLImports&&window.HTMLImports.whenReady||null,yb,Ia=null,pa=null;H.prototype.Ha=function(){!this.enqueued&&pa&&(this.enqueued=!0,Mb(pa))};H.prototype.b=function(a){a.__seenByShadyCSS||(a.__seenByShadyCSS=!0,this.customStyles.push(a),this.Ha())};H.prototype.a=function(a){return a.__shadyCSSCachedStyle?+a.__shadyCSSCachedStyle:a.getStyle?a.getStyle():a};H.prototype.c=function(){for(var a=this.customStyles,b=0;b<a.length;b++){var c=a[b];if(!c.__shadyCSSCachedStyle){var d=this.a(c);d&&(d=d.__appliedElement||d,Ia&&Ia(d),c.__shadyCSSCachedStyle=d)}}return a};H.prototype.addCustomStyle=H.prototype.b;H.prototype.getStyleForCustomStyle=H.prototype.a;H.prototype.processStyles=H.prototype.c;Object.defineProperties(H.prototype,{transformCallback:{get:function(){return Ia},set:function(a){Ia=a}},validateCallback:{get:function(){return pa},+set:function(a){var b=!1;pa||(b=!0);pa=a;b&&this.Ha()}}});var Cd=new qa;k.prototype.C=function(){Nb()};k.prototype.S=function(a){var b=this.s[a]=(this.s[a]||0)+1;return a+"-"+b};k.prototype.Sa=function(a){return za(a)};k.prototype.Ua=function(a){return ca(a)};k.prototype.R=function(a){a=a.content.querySelectorAll("style");for(var b=[],c=0;c<a.length;c++){var d=a[c];b.push(d.textContent);d.parentNode.removeChild(d)}return b.join("").trim()};k.prototype.fa=function(a){return(a=a.content.querySelector("style"))?+a.getAttribute("css-build")||"":""};k.prototype.prepareTemplate=function(a,b,c){if(!a.f){a.f=!0;a.name=b;a.extends=c;Ba[b]=a;var d=this.fa(a),e=this.R(a);c={is:b,extends:c,Ab:d};r||y.a(a.content,b);this.c();var f=Ga.test(e)||Fa.test(e);Ga.lastIndex=0;Fa.lastIndex=0;e=vb(e);f&&x&&this.a&&this.a.transformRules(e,b);a._styleAst=e;a.g=d;d=[];x||(d=P.R(a._styleAst));if(!d.length||x)b=this.ea(c,a._styleAst,r?a.content:null,Ib[b]),a.a=b;a.c=d}};k.prototype.ea=function(a,b,c,d){b=y.b(a,b);if(b.length)return wb(b,+a.is,c,d)};k.prototype.ha=function(a){var b=U(a),c=b.is;b=b.Z;var d=Ib[c];c=Ba[c];if(c){var e=c._styleAst;var f=c.c}return v.set(a,new v(e,d,f,0,b))};k.prototype.H=function(){!this.a&&window.ShadyCSS&&window.ShadyCSS.ApplyShim&&(this.a=window.ShadyCSS.ApplyShim,this.a.invalidCallback=De)};k.prototype.I=function(){var a=this;!this.b&&window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface&&(this.b=window.ShadyCSS.CustomStyleInterface,this.b.transformCallback=function(b){a.v(b)},this.b.validateCallback=+function(){requestAnimationFrame(function(){(a.b.enqueued||a.i)&&a.f()})})};k.prototype.c=function(){this.H();this.I()};k.prototype.f=function(){this.c();if(this.b){var a=this.b.processStyles();this.b.enqueued&&(x?this.Qa(a):(this.u(this.g,this.h),this.D(a)),this.b.enqueued=!1,this.i&&!x&&this.styleDocument())}};k.prototype.styleElement=function(a,b){var c=U(a).is,d=v.get(a);d||(d=this.ha(a));this.j(a)||(this.i=!0);b&&(d.P=d.P||{},Object.assign(d.P,b));if(x){if(d.P){b=d.P;for(var e in b)null===e?+a.style.removeProperty(e):a.style.setProperty(e,b[e])}if(((e=Ba[c])||this.j(a))&&e&&e.a&&!jd(e)){if(jd(e)||e._applyShimValidatingVersion!==e._applyShimNextVersion)this.c(),this.a&&this.a.transformRules(e._styleAst,c),e.a.textContent=y.b(a,d.G),Ee(e);r&&(c=a.shadowRoot)&&(c.querySelector("style").textContent=y.b(a,d.G));d.G=e._styleAst}}else this.u(a,d),d.ta&&d.ta.length&&this.L(a,d)};k.prototype.l=function(a){return(a=a.getRootNode().host)?v.get(a)?a:this.l(a):this.g};k.prototype.j=function(a){return a===+this.g};k.prototype.L=function(a,b){var c=U(a).is,d=Cd.fetch(c,b.K,b.ta),e=d?d.styleElement:null,f=b.B;b.B=d&&d.B||this.S(c);e=P.v(a,b.K,b.B,e);r||P.u(a,b.B,f);d||Cd.b(c,b.K,e,b.B)};k.prototype.u=function(a,b){var c=this.l(a),d=v.get(c);c=Object.create(d.K||null);var e=P.S(a,b.G);a=P.ea(d.G,a).F;Object.assign(c,e.pb,a,e.ub);this.ga(c,b.P);P.fa(c);b.K=c};k.prototype.ga=function(a,b){for(var c in b){var d=b[c];if(d||0===d)a[c]=d}};k.prototype.styleDocument=function(a){this.styleSubtree(this.g,a)};k.prototype.styleSubtree=+function(a,b){var c=a.shadowRoot;(c||this.j(a))&&this.styleElement(a,b);if(b=c&&(c.children||c.childNodes))for(a=0;a<b.length;a++)this.styleSubtree(b[a]);else if(a=a.children||a.childNodes)for(b=0;b<a.length;b++)this.styleSubtree(a[b])};k.prototype.Qa=function(a){for(var b=0;b<a.length;b++){var c=this.b.getStyleForCustomStyle(a[b]);c&&this.Pa(c)}};k.prototype.D=function(a){for(var b=0;b<a.length;b++){var c=this.b.getStyleForCustomStyle(a[b]);c&&P.s(c,this.h.K)}};k.prototype.v=function(a){var b=this,+c=za(a);da(c,function(a){r?y.v(a):y.R(a);x&&(b.c(),b.a&&b.a.transformRule(a))});x?a.textContent=ca(c):this.h.G.rules.push(c)};k.prototype.Pa=function(a){if(x&&this.a){var b=za(a);this.c();this.a.transformRules(b);a.textContent=ca(b)}};k.prototype.getComputedStyleValue=function(a,b){var c;x||(c=(v.get(a)||v.get(this.l(a))).K[b]);return(c=c||window.getComputedStyle(a).getPropertyValue(b))?c.trim():""};k.prototype.Ta=function(a,b){var c=a.getRootNode();b=b?b.split(/\s/):[];c=c.host&&c.host.localName;+if(!c){var d=a.getAttribute("class");if(d){d=d.split(/\s/);for(var e=0;e<d.length;e++)if(d[e]===y.c){c=d[e+1];break}}}c&&b.push(y.c,c);x||(c=v.get(a))&&c.B&&b.push(P.g,c.B);Aa(a,b.join(" "))};k.prototype.Ra=function(a){return v.get(a)};k.prototype.flush=k.prototype.C;k.prototype.prepareTemplate=k.prototype.prepareTemplate;k.prototype.styleElement=k.prototype.styleElement;k.prototype.styleDocument=k.prototype.styleDocument;k.prototype.styleSubtree=k.prototype.styleSubtree;k.prototype.getComputedStyleValue=+k.prototype.getComputedStyleValue;k.prototype.setElementClass=k.prototype.Ta;k.prototype._styleInfoForNode=k.prototype.Ra;k.prototype.transformCustomStyleForDocument=k.prototype.v;k.prototype.getStyleAst=k.prototype.Sa;k.prototype.styleAstToString=k.prototype.Ua;k.prototype.flushCustomStyles=k.prototype.f;Object.defineProperties(k.prototype,{nativeShadow:{get:function(){return r}},nativeCss:{get:function(){return x}}});var K=new k;if(window.ShadyCSS){var Dd=window.ShadyCSS.ApplyShim;var Ed=window.ShadyCSS.CustomStyleInterface}window.ShadyCSS=+{ScopingShim:K,prepareTemplate:function(a,b,c){K.f();K.prepareTemplate(a,b,c)},styleSubtree:function(a,b){K.f();K.styleSubtree(a,b)},styleElement:function(a){K.f();K.styleElement(a)},styleDocument:function(a){K.f();K.styleDocument(a)},getComputedStyleValue:function(a,b){return K.getComputedStyleValue(a,b)},nativeCss:x,nativeShadow:r};Dd&&(window.ShadyCSS.ApplyShim=Dd);Ed&&(window.ShadyCSS.CustomStyleInterface=Ed);var Kb=window.customElements,Ja=window.HTMLImports;window.WebComponents=window.WebComponents||+{};if(Kb&&Kb.polyfillWrapFlushCallback){var Ka,Fd=function(){if(Ka){var a=Ka;Ka=null;a();return!0}},Gd=Ja.whenReady;Kb.polyfillWrapFlushCallback(function(a){Ka=a;Gd(Fd)});Ja.whenReady=function(a){Gd(function(){Fd()?Ja.whenReady(a):a()})}}Ja.whenReady(function(){requestAnimationFrame(function(){window.WebComponents.ready=!0;document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})});var Hd=document.createElement("style");Hd.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";+var Id=document.querySelector("head");Id.insertBefore(Hd,Id.firstChild)})();}).call(this);++//# sourceMappingURL=webcomponents-lite.js.mapdiff --git a/manager/client/src/main/webapp/bower_components/webcomponentsjs/webcomponents-lite.min.js b/manager/client/src/main/webapp/bower_components/webcomponentsjs/webcomponents-lite.min.jsdeleted file mode 100644index fb9d01025..000000000--- a/manager/client/src/main/webapp/bower_components/webcomponentsjs/webcomponents-lite.min.js+++ /dev/null@@ -1,12 +0,0 @@-/**- * @license- * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.- * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt- * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt- * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt- * Code distributed by Google as part of the polymer project is also- * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt- */-// @version 0.7.24-!function(){window.WebComponents=window.WebComponents||{flags:{}};var e="webcomponents-lite.js",t=document.querySelector('script[src*="'+e+'"]'),n={};if(!n.noOpts){if(location.search.slice(1).split("&").forEach(function(e){var t,o=e.split("=");o[0]&&(t=o[0].match(/wc-(.+)/))&&(n[t[1]]=o[1]||!0)}),t)for(var o,r=0;o=t.attributes[r];r++)"src"!==o.name&&(n[o.name]=o.value||!0);if(n.log&&n.log.split){var i=n.log.split(",");n.log={},i.forEach(function(e){n.log[e]=!0})}else n.log={}}n.register&&(window.CustomElements=window.CustomElements||{flags:{}},window.CustomElements.flags.register=n.register),WebComponents.flags=n}(),function(e){"use strict";function t(e){return void 0!==h[e]}function n(){s.call(this),this._isInvalid=!0}function o(e){return""==e&&n.call(this),e.toLowerCase()}function r(e){var t=e.charCodeAt(0);return t>32&&t<127&&[34,35,60,62,63,96].indexOf(t)==-1?e:encodeURIComponent(e)}function i(e){var t=e.charCodeAt(0);return t>32&&t<127&&[34,35,60,62,96].indexOf(t)==-1?e:encodeURIComponent(e)}function a(e,a,s){function c(e){g.push(e)}var d=a||"scheme start",l=0,u="",w=!1,_=!1,g=[];e:for(;(e[l-1]!=p||0==l)&&!this._isInvalid;){var b=e[l];switch(d){case"scheme start":if(!b||!m.test(b)){if(a){c("Invalid scheme.");break e}u="",d="no scheme";continue}u+=b.toLowerCase(),d="scheme";break;case"scheme":if(b&&v.test(b))u+=b.toLowerCase();else{if(":"!=b){if(a){if(p==b)break e;c("Code point not allowed in scheme: "+b);break e}u="",l=0,d="no scheme";continue}if(this._scheme=u,u="",a)break e;t(this._scheme)&&(this._isRelative=!0),d="file"==this._scheme?"relative":this._isRelative&&s&&s._scheme==this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"==b?(this._query="?",d="query"):"#"==b?(this._fragment="#",d="fragment"):p!=b&&"\t"!=b&&"\n"!=b&&"\r"!=b&&(this._schemeData+=r(b));break;case"no scheme":if(s&&t(s._scheme)){d="relative";continue}c("Missing scheme."),n.call(this);break;case"relative or authority":if("/"!=b||"/"!=e[l+1]){c("Expected /, got: "+b),d="relative";continue}d="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!=this._scheme&&(this._scheme=s._scheme),p==b){this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query=s._query,this._username=s._username,this._password=s._password;break e}if("/"==b||"\\"==b)"\\"==b&&c("\\ is an invalid code point."),d="relative slash";else if("?"==b)this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query="?",this._username=s._username,this._password=s._password,d="query";else{if("#"!=b){var y=e[l+1],E=e[l+2];("file"!=this._scheme||!m.test(b)||":"!=y&&"|"!=y||p!=E&&"/"!=E&&"\\"!=E&&"?"!=E&&"#"!=E)&&(this._host=s._host,this._port=s._port,this._username=s._username,this._password=s._password,this._path=s._path.slice(),this._path.pop()),d="relative path";continue}this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query=s._query,this._fragment="#",this._username=s._username,this._password=s._password,d="fragment"}break;case"relative slash":if("/"!=b&&"\\"!=b){"file"!=this._scheme&&(this._host=s._host,this._port=s._port,this._username=s._username,this._password=s._password),d="relative path";continue}"\\"==b&&c("\\ is an invalid code point."),d="file"==this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=b){c("Expected '/', got: "+b),d="authority ignore slashes";continue}d="authority second slash";break;case"authority second slash":if(d="authority ignore slashes","/"!=b){c("Expected '/', got: "+b);continue}break;case"authority ignore slashes":if("/"!=b&&"\\"!=b){d="authority";continue}c("Expected authority, got: "+b);break;case"authority":if("@"==b){w&&(c("@ already seen."),u+="%40"),w=!0;for(var L=0;L<u.length;L++){var N=u[L];if("\t"!=N&&"\n"!=N&&"\r"!=N)if(":"!=N||null!==this._password){var M=r(N);null!==this._password?this._password+=M:this._username+=M}else this._password="";else c("Invalid whitespace in authority.")}u=""}else{if(p==b||"/"==b||"\\"==b||"?"==b||"#"==b){l-=u.length,u="",d="host";continue}u+=b}break;case"file host":if(p==b||"/"==b||"\\"==b||"?"==b||"#"==b){2!=u.length||!m.test(u[0])||":"!=u[1]&&"|"!=u[1]?0==u.length?d="relative path start":(this._host=o.call(this,u),u="",d="relative path start"):d="relative path";continue}"\t"==b||"\n"==b||"\r"==b?c("Invalid whitespace in file host."):u+=b;break;case"host":case"hostname":if(":"!=b||_){if(p==b||"/"==b||"\\"==b||"?"==b||"#"==b){if(this._host=o.call(this,u),u="",d="relative path start",a)break e;continue}"\t"!=b&&"\n"!=b&&"\r"!=b?("["==b?_=!0:"]"==b&&(_=!1),u+=b):c("Invalid code point in host/hostname: "+b)}else if(this._host=o.call(this,u),u="",d="port","hostname"==a)break e;break;case"port":if(/[0-9]/.test(b))u+=b;else{if(p==b||"/"==b||"\\"==b||"?"==b||"#"==b||a){if(""!=u){var T=parseInt(u,10);T!=h[this._scheme]&&(this._port=T+""),u=""}if(a)break e;d="relative path start";continue}"\t"==b||"\n"==b||"\r"==b?c("Invalid code point in port: "+b):n.call(this)}break;case"relative path start":if("\\"==b&&c("'\\' not allowed in path."),d="relative path","/"!=b&&"\\"!=b)continue;break;case"relative path":if(p!=b&&"/"!=b&&"\\"!=b&&(a||"?"!=b&&"#"!=b))"\t"!=b&&"\n"!=b&&"\r"!=b&&(u+=r(b));else{"\\"==b&&c("\\ not allowed in relative path.");var O;(O=f[u.toLowerCase()])&&(u=O),".."==u?(this._path.pop(),"/"!=b&&"\\"!=b&&this._path.push("")):"."==u&&"/"!=b&&"\\"!=b?this._path.push(""):"."!=u&&("file"==this._scheme&&0==this._path.length&&2==u.length&&m.test(u[0])&&"|"==u[1]&&(u=u[0]+":"),this._path.push(u)),u="","?"==b?(this._query="?",d="query"):"#"==b&&(this._fragment="#",d="fragment")}break;case"query":a||"#"!=b?p!=b&&"\t"!=b&&"\n"!=b&&"\r"!=b&&(this._query+=i(b)):(this._fragment="#",d="fragment");break;case"fragment":p!=b&&"\t"!=b&&"\n"!=b&&"\r"!=b&&(this._fragment+=b)}l++}}function s(){this._scheme="",this._schemeData="",this._username="",this._password=null,this._host="",this._port="",this._path=[],this._query="",this._fragment="",this._isInvalid=!1,this._isRelative=!1}function c(e,t){void 0===t||t instanceof c||(t=new c(String(t))),this._url=e,s.call(this);var n=e.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g,"");a.call(this,n,null,t)}var d=!1;if(!e.forceJURL)try{var l=new URL("b","http://a");l.pathname="c%20d",d="http://a/c%20d"===l.href}catch(u){}if(!d){var h=Object.create(null);h.ftp=21,h.file=0,h.gopher=70,h.http=80,h.https=443,h.ws=80,h.wss=443;var f=Object.create(null);f["%2e"]=".",f[".%2e"]="..",f["%2e."]="..",f["%2e%2e"]="..";var p=void 0,m=/[a-zA-Z]/,v=/[a-zA-Z0-9\+\-\.]/;c.prototype={toString:function(){return this.href},get href(){if(this._isInvalid)return this._url;var e="";return""==this._username&&null==this._password||(e=this._username+(null!=this._password?":"+this._password:"")+"@"),this.protocol+(this._isRelative?"//"+e+this.host:"")+this.pathname+this._query+this._fragment},set href(e){s.call(this),a.call(this,e)},get protocol(){return this._scheme+":"},set protocol(e){this._isInvalid||a.call(this,e+":","scheme start")},get host(){return this._isInvalid?"":this._port?this._host+":"+this._port:this._host},set host(e){!this._isInvalid&&this._isRelative&&a.call(this,e,"host")},get hostname(){return this._host},set hostname(e){!this._isInvalid&&this._isRelative&&a.call(this,e,"hostname")},get port(){return this._port},set port(e){!this._isInvalid&&this._isRelative&&a.call(this,e,"port")},get pathname(){return this._isInvalid?"":this._isRelative?"/"+this._path.join("/"):this._schemeData},set pathname(e){!this._isInvalid&&this._isRelative&&(this._path=[],a.call(this,e,"relative path start"))},get search(){return this._isInvalid||!this._query||"?"==this._query?"":this._query},set search(e){!this._isInvalid&&this._isRelative&&(this._query="?","?"==e[0]&&(e=e.slice(1)),a.call(this,e,"query"))},get hash(){return this._isInvalid||!this._fragment||"#"==this._fragment?"":this._fragment},set hash(e){this._isInvalid||(this._fragment="#","#"==e[0]&&(e=e.slice(1)),a.call(this,e,"fragment"))},get origin(){var e;if(this._isInvalid||!this._scheme)return"";switch(this._scheme){case"data":case"file":case"javascript":case"mailto":return"null"}return e=this.host,e?this._scheme+"://"+e:""}};var w=e.URL;w&&(c.createObjectURL=function(e){return w.createObjectURL.apply(w,arguments)},c.revokeObjectURL=function(e){w.revokeObjectURL(e)}),e.URL=c}}(self),"undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,n=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};n.prototype={set:function(t,n){var o=t[this.name];return o&&o[0]===t?o[1]=n:e(t,this.name,{value:[t,n],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return!(!t||t[0]!==e)&&(t[0]=t[1]=void 0,!0)},has:function(e){var t=e[this.name];return!!t&&t[0]===e}},window.WeakMap=n}(),function(e){function t(e){b.push(e),g||(g=!0,m(o))}function n(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function o(){g=!1;var e=b;b=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var n=e.takeRecords();r(e),n.length&&(e.callback_(n,e),t=!0)}),t&&o()}function r(e){e.nodes_.forEach(function(t){var n=v.get(t);n&&n.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}function i(e,t){for(var n=e;n;n=n.parentNode){var o=v.get(n);if(o)for(var r=0;r<o.length;r++){var i=o[r],a=i.options;if(n===e||a.subtree){var s=t(a);s&&i.enqueue(s)}}}}function a(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++y}function s(e,t){this.type=e,this.target=t,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function c(e){var t=new s(e.type,e.target);return t.addedNodes=e.addedNodes.slice(),t.removedNodes=e.removedNodes.slice(),t.previousSibling=e.previousSibling,t.nextSibling=e.nextSibling,t.attributeName=e.attributeName,t.attributeNamespace=e.attributeNamespace,t.oldValue=e.oldValue,t}function d(e,t){return E=new s(e,t)}function l(e){return L?L:(L=c(E),L.oldValue=e,L)}function u(){E=L=void 0}function h(e){return e===L||e===E}function f(e,t){return e===t?e:L&&h(e)?L:null}function p(e,t,n){this.observer=e,this.target=t,this.options=n,this.transientObservedNodes=[]}if(!e.JsMutationObserver){var m,v=new WeakMap;if(/Trident|Edge/.test(navigator.userAgent))m=setTimeout;else if(window.setImmediate)m=window.setImmediate;else{var w=[],_=String(Math.random());window.addEventListener("message",function(e){if(e.data===_){var t=w;w=[],t.forEach(function(e){e()})}}),m=function(e){w.push(e),window.postMessage(_,"*")}}var g=!1,b=[],y=0;a.prototype={observe:function(e,t){if(e=n(e),!t.childList&&!t.attributes&&!t.characterData||t.attributeOldValue&&!t.attributes||t.attributeFilter&&t.attributeFilter.length&&!t.attributes||t.characterDataOldValue&&!t.characterData)throw new SyntaxError;var o=v.get(e);o||v.set(e,o=[]);for(var r,i=0;i<o.length;i++)if(o[i].observer===this){r=o[i],r.removeListeners(),r.options=t;break}r||(r=new p(this,e,t),o.push(r),this.nodes_.push(e)),r.addListeners()},disconnect:function(){this.nodes_.forEach(function(e){for(var t=v.get(e),n=0;n<t.length;n++){var o=t[n];if(o.observer===this){o.removeListeners(),t.splice(n,1);break}}},this),this.records_=[]},takeRecords:function(){var e=this.records_;return this.records_=[],e}};var E,L;p.prototype={enqueue:function(e){var n=this.observer.records_,o=n.length;if(n.length>0){var r=n[o-1],i=f(r,e);if(i)return void(n[o-1]=i)}else t(this.observer);n[o]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=v.get(e);t||v.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=v.get(e),n=0;n<t.length;n++)if(t[n]===this){t.splice(n,1);break}},this)},handleEvent:function(e){switch(e.stopImmediatePropagation(),e.type){case"DOMAttrModified":var t=e.attrName,n=e.relatedNode.namespaceURI,o=e.target,r=new d("attributes",o);r.attributeName=t,r.attributeNamespace=n;var a=e.attrChange===MutationEvent.ADDITION?null:e.prevValue;i(o,function(e){if(e.attributes&&(!e.attributeFilter||!e.attributeFilter.length||e.attributeFilter.indexOf(t)!==-1||e.attributeFilter.indexOf(n)!==-1))return e.attributeOldValue?l(a):r});break;case"DOMCharacterDataModified":var o=e.target,r=d("characterData",o),a=e.prevValue;i(o,function(e){if(e.characterData)return e.characterDataOldValue?l(a):r});break;case"DOMNodeRemoved":this.addTransientObserver(e.target);case"DOMNodeInserted":var s,c,h=e.target;"DOMNodeInserted"===e.type?(s=[h],c=[]):(s=[],c=[h]);var f=h.previousSibling,p=h.nextSibling,r=d("childList",e.target.parentNode);r.addedNodes=s,r.removedNodes=c,r.previousSibling=f,r.nextSibling=p,i(e.relatedNode,function(e){if(e.childList)return r})}u()}},e.JsMutationObserver=a,e.MutationObserver||(e.MutationObserver=a,a._isPolyfilled=!0)}}(self),function(){function e(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case" ":return" "}}function t(t){return t.replace(u,e)}var n="undefined"==typeof HTMLTemplateElement;/Trident/.test(navigator.userAgent)&&!function(){var e=document.importNode;document.importNode=function(){var t=e.apply(document,arguments);if(t.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var n=document.createDocumentFragment();return n.appendChild(t),n}return t}}();var o=function(){if(!n){var e=document.createElement("template"),t=document.createElement("template");t.content.appendChild(document.createElement("div")),e.content.appendChild(t);var o=e.cloneNode(!0);return 0===o.content.childNodes.length||0===o.content.firstChild.content.childNodes.length}}(),r="template",i=function(){};if(n){var a=document.implementation.createHTMLDocument("template"),s=!0,c=document.createElement("style");c.textContent=r+"{display:none;}";var d=document.head;d.insertBefore(c,d.firstElementChild),i.prototype=Object.create(HTMLElement.prototype),i.decorate=function(e){if(!e.content){e.content=a.createDocumentFragment();for(var n;n=e.firstChild;)e.content.appendChild(n);if(e.cloneNode=function(e){return i.cloneNode(this,e)},s)try{Object.defineProperty(e,"innerHTML",{get:function(){for(var e="",n=this.content.firstChild;n;n=n.nextSibling)e+=n.outerHTML||t(n.data);return e},set:function(e){for(a.body.innerHTML=e,i.bootstrap(a);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;a.body.firstChild;)this.content.appendChild(a.body.firstChild)},configurable:!0})}catch(o){s=!1}i.bootstrap(e.content)}},i.bootstrap=function(e){for(var t,n=e.querySelectorAll(r),o=0,a=n.length;o<a&&(t=n[o]);o++)i.decorate(t)},document.addEventListener("DOMContentLoaded",function(){i.bootstrap(document)});var l=document.createElement;document.createElement=function(){"use strict";var e=l.apply(document,arguments);return"template"===e.localName&&i.decorate(e),e};var u=/[&\u00A0<>]/g}if(n||o){var h=Node.prototype.cloneNode;i.cloneNode=function(e,t){var n=h.call(e,!1);return this.decorate&&this.decorate(n),t&&(n.content.appendChild(h.call(e.content,!0)),this.fixClonedDom(n.content,e.content)),n},i.fixClonedDom=function(e,t){if(t.querySelectorAll)for(var n,o,i=t.querySelectorAll(r),a=e.querySelectorAll(r),s=0,c=a.length;s<c;s++)o=i[s],n=a[s],this.decorate&&this.decorate(o),n.parentNode.replaceChild(o.cloneNode(!0),n)};var f=document.importNode;Node.prototype.cloneNode=function(e){var t=h.call(this,e);return e&&i.fixClonedDom(t,this),t},document.importNode=function(e,t){if(e.localName===r)return i.cloneNode(e,t);var n=f.call(document,e,t);return t&&i.fixClonedDom(n,e),n},o&&(HTMLTemplateElement.prototype.cloneNode=function(e){return i.cloneNode(this,e)})}n&&(window.HTMLTemplateElement=i)}(),function(e){"use strict";if(!window.performance||!window.performance.now){var t=Date.now();window.performance={now:function(){return Date.now()-t}}}window.requestAnimationFrame||(window.requestAnimationFrame=function(){var e=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;return e?function(t){return e(function(){t(performance.now())})}:function(e){return window.setTimeout(e,1e3/60)}}()),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(){return window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(e){clearTimeout(e)}}());var n=function(){var e=document.createEvent("Event");return e.initEvent("foo",!0,!0),e.preventDefault(),e.defaultPrevented}();if(!n){var o=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(o.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var r=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||r&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.Event||r&&"function"!=typeof window.Event){var i=window.Event;window.Event=function(e,t){t=t||{};var n=document.createEvent("Event");return n.initEvent(e,Boolean(t.bubbles),Boolean(t.cancelable)),n},window.Event.prototype=i.prototype}}(window.WebComponents),window.HTMLImports=window.HTMLImports||{flags:{}},function(e){function t(e,t){t=t||p,o(function(){i(e,t)},t)}function n(e){return"complete"===e.readyState||e.readyState===w}function o(e,t){if(n(t))e&&e();else{var r=function(){"complete"!==t.readyState&&t.readyState!==w||(t.removeEventListener(_,r),o(e,t))};t.addEventListener(_,r)}}function r(e){e.target.__loaded=!0}function i(e,t){function n(){c==d&&e&&e({allImports:s,loadedImports:l,errorImports:u})}function o(e){r(e),l.push(this),c++,n()}function i(e){u.push(this),c++,n()}var s=t.querySelectorAll("link[rel=import]"),c=0,d=s.length,l=[],u=[];if(d)for(var h,f=0;f<d&&(h=s[f]);f++)a(h)?(l.push(this),c++,n()):(h.addEventListener("load",o),h.addEventListener("error",i));else n()}function a(e){return u?e.__loaded||e["import"]&&"loading"!==e["import"].readyState:e.__importParsed}function s(e){for(var t,n=0,o=e.length;n<o&&(t=e[n]);n++)c(t)&&d(t)}function c(e){return"link"===e.localName&&"import"===e.rel}function d(e){var t=e["import"];t?r({target:e}):(e.addEventListener("load",r),e.addEventListener("error",r))}var l="import",u=Boolean(l in document.createElement("link")),h=Boolean(window.ShadowDOMPolyfill),f=function(e){return h?window.ShadowDOMPolyfill.wrapIfNeeded(e):e},p=f(document),m={get:function(){var e=window.HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null);return f(e)},configurable:!0};Object.defineProperty(document,"_currentScript",m),Object.defineProperty(p,"_currentScript",m);var v=/Trident/.test(navigator.userAgent),w=v?"complete":"interactive",_="readystatechange";u&&(new MutationObserver(function(e){for(var t,n=0,o=e.length;n<o&&(t=e[n]);n++)t.addedNodes&&s(t.addedNodes)}).observe(document.head,{childList:!0}),function(){if("loading"===document.readyState)for(var e,t=document.querySelectorAll("link[rel=import]"),n=0,o=t.length;n<o&&(e=t[n]);n++)d(e)}()),t(function(e){window.HTMLImports.ready=!0,window.HTMLImports.readyTime=(new Date).getTime();var t=p.createEvent("CustomEvent");t.initCustomEvent("HTMLImportsLoaded",!0,!0,e),p.dispatchEvent(t)}),e.IMPORT_LINK_TYPE=l,e.useNative=u,e.rootDocument=p,e.whenReady=t,e.isIE=v}(window.HTMLImports),function(e){var t=[],n=function(e){t.push(e)},o=function(){t.forEach(function(t){t(e)})};e.addModule=n,e.initializeModules=o}(window.HTMLImports),window.HTMLImports.addModule(function(e){var t=/(url\()([^)]*)(\))/g,n=/(@import[\s]+(?!url\())([^;]*)(;)/g,o={resolveUrlsInStyle:function(e,t){var n=e.ownerDocument,o=n.createElement("a");return e.textContent=this.resolveUrlsInCssText(e.textContent,t,o),e},resolveUrlsInCssText:function(e,o,r){var i=this.replaceUrls(e,r,o,t);return i=this.replaceUrls(i,r,o,n)},replaceUrls:function(e,t,n,o){return e.replace(o,function(e,o,r,i){var a=r.replace(/["']/g,"");return n&&(a=new URL(a,n).href),t.href=a,a=t.href,o+"'"+a+"'"+i})}};e.path=o}),window.HTMLImports.addModule(function(e){var t={async:!0,ok:function(e){return e.status>=200&&e.status<300||304===e.status||0===e.status},load:function(n,o,r){var i=new XMLHttpRequest;return(e.flags.debug||e.flags.bust)&&(n+="?"+Math.random()),i.open("GET",n,t.async),i.addEventListener("readystatechange",function(e){if(4===i.readyState){var n=null;try{var a=i.getResponseHeader("Location");a&&(n="/"===a.substr(0,1)?location.origin+a:a)}catch(e){console.error(e.message)}o.call(r,!t.ok(i)&&i,i.response||i.responseText,n)}}),i.send(),i},loadDocument:function(e,t,n){this.load(e,t,n).responseType="document"}};e.xhr=t}),window.HTMLImports.addModule(function(e){var t=e.xhr,n=e.flags,o=function(e,t){this.cache={},this.onload=e,this.oncomplete=t,this.inflight=0,this.pending={}};o.prototype={addNodes:function(e){this.inflight+=e.length;for(var t,n=0,o=e.length;n<o&&(t=e[n]);n++)this.require(t);this.checkDone()},addNode:function(e){this.inflight++,this.require(e),this.checkDone()},require:function(e){var t=e.src||e.href;e.__nodeUrl=t,this.dedupe(t,e)||this.fetch(t,e)},dedupe:function(e,t){if(this.pending[e])return this.pending[e].push(t),!0;return this.cache[e]?(this.onload(e,t,this.cache[e]),this.tail(),!0):(this.pending[e]=[t],!1)},fetch:function(e,o){if(n.load&&console.log("fetch",e,o),e)if(e.match(/^data:/)){var r=e.split(","),i=r[0],a=r[1];a=i.indexOf(";base64")>-1?atob(a):decodeURIComponent(a),setTimeout(function(){this.receive(e,o,null,a)}.bind(this),0)}else{var s=function(t,n,r){this.receive(e,o,t,n,r)}.bind(this);t.load(e,s)}else setTimeout(function(){this.receive(e,o,{error:"href must be specified"},null)}.bind(this),0)},receive:function(e,t,n,o,r){this.cache[e]=o;for(var i,a=this.pending[e],s=0,c=a.length;s<c&&(i=a[s]);s++)this.onload(e,i,o,n,r),this.tail();this.pending[e]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},e.Loader=o}),window.HTMLImports.addModule(function(e){var t=function(e){this.addCallback=e,this.mo=new MutationObserver(this.handler.bind(this))};t.prototype={handler:function(e){for(var t,n=0,o=e.length;n<o&&(t=e[n]);n++)"childList"===t.type&&t.addedNodes.length&&this.addedNodes(t.addedNodes)},addedNodes:function(e){this.addCallback&&this.addCallback(e);for(var t,n=0,o=e.length;n<o&&(t=e[n]);n++)t.children&&t.children.length&&this.addedNodes(t.children)},observe:function(e){this.mo.observe(e,{childList:!0,subtree:!0})}},e.Observer=t}),window.HTMLImports.addModule(function(e){function t(e){return"link"===e.localName&&e.rel===l}function n(e){var t=o(e);return"data:text/javascript;charset=utf-8,"+encodeURIComponent(t)}function o(e){return e.textContent+r(e)}function r(e){var t=e.ownerDocument;t.__importedScripts=t.__importedScripts||0;var n=e.ownerDocument.baseURI,o=t.__importedScripts?"-"+t.__importedScripts:"";return t.__importedScripts++,"\n//# sourceURL="+n+o+".js\n"}function i(e){var t=e.ownerDocument.createElement("style");return t.textContent=e.textContent,a.resolveUrlsInStyle(t),t}var a=e.path,s=e.rootDocument,c=e.flags,d=e.isIE,l=e.IMPORT_LINK_TYPE,u="link[rel="+l+"]",h={documentSelectors:u,importsSelectors:[u,"link[rel=stylesheet]:not([type])","style:not([type])","script:not([type])",'script[type="application/javascript"]','script[type="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},dynamicElements:[],parseNext:function(){var e=this.nextToParse();e&&this.parse(e)},parse:function(e){if(this.isParsed(e))return void(c.parse&&console.log("[%s] is already parsed",e.localName));var t=this[this.map[e.localName]];t&&(this.markParsing(e),t.call(this,e))},parseDynamic:function(e,t){this.dynamicElements.push(e),t||this.parseNext()},markParsing:function(e){c.parse&&console.log("parsing",e),this.parsingElement=e},markParsingComplete:function(e){e.__importParsed=!0,this.markDynamicParsingComplete(e),e.__importElement&&(e.__importElement.__importParsed=!0,this.markDynamicParsingComplete(e.__importElement)),this.parsingElement=null,c.parse&&console.log("completed",e)},markDynamicParsingComplete:function(e){var t=this.dynamicElements.indexOf(e);t>=0&&this.dynamicElements.splice(t,1)},parseImport:function(e){if(e["import"]=e.__doc,window.HTMLImports.__importsParsingHook&&window.HTMLImports.__importsParsingHook(e),e["import"]&&(e["import"].__importParsed=!0),this.markParsingComplete(e),e.__resource&&!e.__error?e.dispatchEvent(new CustomEvent("load",{bubbles:!1})):e.dispatchEvent(new CustomEvent("error",{bubbles:!1})),e.__pending)for(var t;e.__pending.length;)t=e.__pending.shift(),t&&t({target:e});this.parseNext()},parseLink:function(e){t(e)?this.parseImport(e):(e.href=e.href,this.parseGeneric(e))},parseStyle:function(e){var t=e;e=i(e),t.__appliedElement=e,e.__importElement=t,this.parseGeneric(e)},parseGeneric:function(e){this.trackElement(e),this.addElementToDocument(e)},rootImportForElement:function(e){for(var t=e;t.ownerDocument.__importLink;)t=t.ownerDocument.__importLink;return t},addElementToDocument:function(e){var t=this.rootImportForElement(e.__importElement||e);t.parentNode.insertBefore(e,t)},trackElement:function(e,t){var n=this,o=function(r){e.removeEventListener("load",o),e.removeEventListener("error",o),t&&t(r),n.markParsingComplete(e),n.parseNext()};if(e.addEventListener("load",o),e.addEventListener("error",o),d&&"style"===e.localName){var r=!1;if(e.textContent.indexOf("@import")==-1)r=!0;else if(e.sheet){r=!0;for(var i,a=e.sheet.cssRules,s=a?a.length:0,c=0;c<s&&(i=a[c]);c++)i.type===CSSRule.IMPORT_RULE&&(r=r&&Boolean(i.styleSheet))}r&&setTimeout(function(){e.dispatchEvent(new CustomEvent("load",{bubbles:!1}))})}},parseScript:function(t){var o=document.createElement("script");o.__importElement=t,o.src=t.src?t.src:n(t),e.currentScript=t,this.trackElement(o,function(t){o.parentNode&&o.parentNode.removeChild(o),e.currentScript=null}),this.addElementToDocument(o)},nextToParse:function(){return this._mayParse=[],!this.parsingElement&&(this.nextToParseInDoc(s)||this.nextToParseDynamic())},nextToParseInDoc:function(e,n){if(e&&this._mayParse.indexOf(e)<0){this._mayParse.push(e);for(var o,r=e.querySelectorAll(this.parseSelectorsForNode(e)),i=0,a=r.length;i<a&&(o=r[i]);i++)if(!this.isParsed(o))return this.hasResource(o)?t(o)?this.nextToParseInDoc(o.__doc,o):o:void 0}return n},nextToParseDynamic:function(){return this.dynamicElements[0]},parseSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===s?this.documentSelectors:this.importsSelectors},isParsed:function(e){return e.__importParsed},needsDynamicParsing:function(e){return this.dynamicElements.indexOf(e)>=0},hasResource:function(e){return!t(e)||void 0!==e.__doc}};e.parser=h,e.IMPORT_SELECTOR=u}),window.HTMLImports.addModule(function(e){function t(e){return n(e,a)}function n(e,t){return"link"===e.localName&&e.getAttribute("rel")===t}function o(e){return!!Object.getOwnPropertyDescriptor(e,"baseURI")}function r(e,t){var n=document.implementation.createHTMLDocument(a);n._URL=t;var r=n.createElement("base");r.setAttribute("href",t),n.baseURI||o(n)||Object.defineProperty(n,"baseURI",{value:t});var i=n.createElement("meta");return i.setAttribute("charset","utf-8"),n.head.appendChild(i),n.head.appendChild(r),n.body.innerHTML=e,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(n),n}var i=e.flags,a=e.IMPORT_LINK_TYPE,s=e.IMPORT_SELECTOR,c=e.rootDocument,d=e.Loader,l=e.Observer,u=e.parser,h={documents:{},documentPreloadSelectors:s,importsPreloadSelectors:[s].join(","),loadNode:function(e){f.addNode(e)},loadSubtree:function(e){var t=this.marshalNodes(e);f.addNodes(t)},marshalNodes:function(e){return e.querySelectorAll(this.loadSelectorsForNode(e))},loadSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===c?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(e,n,o,a,s){if(i.load&&console.log("loaded",e,n),n.__resource=o,n.__error=a,t(n)){var c=this.documents[e];void 0===c&&(c=a?null:r(o,s||e),c&&(c.__importLink=n,this.bootDocument(c)),this.documents[e]=c),n.__doc=c}u.parseNext()},bootDocument:function(e){this.loadSubtree(e),this.observer.observe(e),u.parseNext()},loadedAll:function(){u.parseNext()}},f=new d(h.loaded.bind(h),h.loadedAll.bind(h));if(h.observer=new l,!document.baseURI){var p={get:function(){var e=document.querySelector("base");return e?e.href:window.location.href},configurable:!0};Object.defineProperty(document,"baseURI",p),Object.defineProperty(c,"baseURI",p)}e.importer=h,e.importLoader=f}),window.HTMLImports.addModule(function(e){var t=e.parser,n=e.importer,o={added:function(e){for(var o,r,i,a,s=0,c=e.length;s<c&&(a=e[s]);s++)o||(o=a.ownerDocument,r=t.isParsed(o)),i=this.shouldLoadNode(a),i&&n.loadNode(a),this.shouldParseNode(a)&&r&&t.parseDynamic(a,i)},shouldLoadNode:function(e){return 1===e.nodeType&&r.call(e,n.loadSelectorsForNode(e))},shouldParseNode:function(e){return 1===e.nodeType&&r.call(e,t.parseSelectorsForNode(e))}};n.observer.addCallback=o.added.bind(o);var r=HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector}),function(e){function t(){window.HTMLImports.importer.bootDocument(o)}var n=e.initializeModules;e.isIE;if(!e.useNative){n();var o=e.rootDocument;"complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?t():document.addEventListener("DOMContentLoaded",t)}}(window.HTMLImports),window.CustomElements=window.CustomElements||{flags:{}},function(e){var t=e.flags,n=[],o=function(e){n.push(e)},r=function(){n.forEach(function(t){t(e)})};e.addModule=o,e.initializeModules=r,e.hasNative=Boolean(document.registerElement),e.isIE=/Trident/.test(navigator.userAgent),e.useNative=!t.register&&e.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||window.HTMLImports.useNative)}(window.CustomElements),window.CustomElements.addModule(function(e){function t(e,t){n(e,function(e){return!!t(e)||void o(e,t)}),o(e,t)}function n(e,t,o){var r=e.firstElementChild;if(!r)for(r=e.firstChild;r&&r.nodeType!==Node.ELEMENT_NODE;)r=r.nextSibling;for(;r;)t(r,o)!==!0&&n(r,t,o),r=r.nextElementSibling;return null}function o(e,n){for(var o=e.shadowRoot;o;)t(o,n),o=o.olderShadowRoot}function r(e,t){i(e,t,[])}function i(e,t,n){if(e=window.wrap(e),!(n.indexOf(e)>=0)){n.push(e);for(var o,r=e.querySelectorAll("link[rel="+a+"]"),s=0,c=r.length;s<c&&(o=r[s]);s++)o["import"]&&i(o["import"],t,n);t(e)}}var a=window.HTMLImports?window.HTMLImports.IMPORT_LINK_TYPE:"none";e.forDocumentTree=r,e.forSubtree=t}),window.CustomElements.addModule(function(e){function t(e,t){return n(e,t)||o(e,t)}function n(t,n){return!!e.upgrade(t,n)||void(n&&a(t))}function o(e,t){g(e,function(e){if(n(e,t))return!0})}function r(e){L.push(e),E||(E=!0,setTimeout(i))}function i(){E=!1;for(var e,t=L,n=0,o=t.length;n<o&&(e=t[n]);n++)e();L=[]}function a(e){y?r(function(){s(e);-}):s(e)}function s(e){e.__upgraded__&&!e.__attached&&(e.__attached=!0,e.attachedCallback&&e.attachedCallback())}function c(e){d(e),g(e,function(e){d(e)})}function d(e){y?r(function(){l(e)}):l(e)}function l(e){e.__upgraded__&&e.__attached&&(e.__attached=!1,e.detachedCallback&&e.detachedCallback())}function u(e){for(var t=e,n=window.wrap(document);t;){if(t==n)return!0;t=t.parentNode||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host}}function h(e){if(e.shadowRoot&&!e.shadowRoot.__watched){_.dom&&console.log("watching shadow-root for: ",e.localName);for(var t=e.shadowRoot;t;)m(t),t=t.olderShadowRoot}}function f(e,n){if(_.dom){var o=n[0];if(o&&"childList"===o.type&&o.addedNodes&&o.addedNodes){for(var r=o.addedNodes[0];r&&r!==document&&!r.host;)r=r.parentNode;var i=r&&(r.URL||r._URL||r.host&&r.host.localName)||"";i=i.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",n.length,i||"")}var a=u(e);n.forEach(function(e){"childList"===e.type&&(N(e.addedNodes,function(e){e.localName&&t(e,a)}),N(e.removedNodes,function(e){e.localName&&c(e)}))}),_.dom&&console.groupEnd()}function p(e){for(e=window.wrap(e),e||(e=window.wrap(document));e.parentNode;)e=e.parentNode;var t=e.__observer;t&&(f(e,t.takeRecords()),i())}function m(e){if(!e.__observer){var t=new MutationObserver(f.bind(this,e));t.observe(e,{childList:!0,subtree:!0}),e.__observer=t}}function v(e){e=window.wrap(e),_.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop());var n=e===window.wrap(document);t(e,n),m(e),_.dom&&console.groupEnd()}function w(e){b(e,v)}var _=e.flags,g=e.forSubtree,b=e.forDocumentTree,y=window.MutationObserver._isPolyfilled&&_["throttle-attached"];e.hasPolyfillMutations=y,e.hasThrottledAttached=y;var E=!1,L=[],N=Array.prototype.forEach.call.bind(Array.prototype.forEach),M=Element.prototype.createShadowRoot;M&&(Element.prototype.createShadowRoot=function(){var e=M.call(this);return window.CustomElements.watchShadow(this),e}),e.watchShadow=h,e.upgradeDocumentTree=w,e.upgradeDocument=v,e.upgradeSubtree=o,e.upgradeAll=t,e.attached=a,e.takeRecords=p}),window.CustomElements.addModule(function(e){function t(t,o){if("template"===t.localName&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t),!t.__upgraded__&&t.nodeType===Node.ELEMENT_NODE){var r=t.getAttribute("is"),i=e.getRegisteredDefinition(t.localName)||e.getRegisteredDefinition(r);if(i&&(r&&i.tag==t.localName||!r&&!i["extends"]))return n(t,i,o)}}function n(t,n,r){return a.upgrade&&console.group("upgrade:",t.localName),n.is&&t.setAttribute("is",n.is),o(t,n),t.__upgraded__=!0,i(t),r&&e.attached(t),e.upgradeSubtree(t,r),a.upgrade&&console.groupEnd(),t}function o(e,t){Object.__proto__?e.__proto__=t.prototype:(r(e,t.prototype,t["native"]),e.__proto__=t.prototype)}function r(e,t,n){for(var o={},r=t;r!==n&&r!==HTMLElement.prototype;){for(var i,a=Object.getOwnPropertyNames(r),s=0;i=a[s];s++)o[i]||(Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i)),o[i]=1);r=Object.getPrototypeOf(r)}}function i(e){e.createdCallback&&e.createdCallback()}var a=e.flags;e.upgrade=t,e.upgradeWithDefinition=n,e.implementPrototype=o}),window.CustomElements.addModule(function(e){function t(t,o){var c=o||{};if(!t)throw new Error("document.registerElement: first argument `name` must not be empty");if(t.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(t)+"'.");if(r(t))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(t)+"'. The type name is invalid.");if(d(t))throw new Error("DuplicateDefinitionError: a type with name '"+String(t)+"' is already registered");return c.prototype||(c.prototype=Object.create(HTMLElement.prototype)),c.__name=t.toLowerCase(),c["extends"]&&(c["extends"]=c["extends"].toLowerCase()),c.lifecycle=c.lifecycle||{},c.ancestry=i(c["extends"]),a(c),s(c),n(c.prototype),l(c.__name,c),c.ctor=u(c),c.ctor.prototype=c.prototype,c.prototype.constructor=c.ctor,e.ready&&v(document),c.ctor}function n(e){if(!e.setAttribute._polyfilled){var t=e.setAttribute;e.setAttribute=function(e,n){o.call(this,e,n,t)};var n=e.removeAttribute;e.removeAttribute=function(e){o.call(this,e,null,n)},e.setAttribute._polyfilled=!0}}function o(e,t,n){e=e.toLowerCase();var o=this.getAttribute(e);n.apply(this,arguments);var r=this.getAttribute(e);this.attributeChangedCallback&&r!==o&&this.attributeChangedCallback(e,o,r)}function r(e){for(var t=0;t<y.length;t++)if(e===y[t])return!0}function i(e){var t=d(e);return t?i(t["extends"]).concat([t]):[]}function a(e){for(var t,n=e["extends"],o=0;t=e.ancestry[o];o++)n=t.is&&t.tag;e.tag=n||e.__name,n&&(e.is=e.__name)}function s(e){if(!Object.__proto__){var t=HTMLElement.prototype;if(e.is){var n=document.createElement(e.tag);t=Object.getPrototypeOf(n)}for(var o,r=e.prototype,i=!1;r;)r==t&&(i=!0),o=Object.getPrototypeOf(r),o&&(r.__proto__=o),r=o;i||console.warn(e.tag+" prototype not found in prototype chain for "+e.is),e["native"]=t}}function c(e){return _(N(e.tag),e)}function d(e){if(e)return E[e.toLowerCase()]}function l(e,t){E[e]=t}function u(e){return function(){return c(e)}}function h(e,t,n){return e===L?f(t,n):M(e,t)}function f(e,t){e&&(e=e.toLowerCase()),t&&(t=t.toLowerCase());var n=d(t||e);if(n){if(e==n.tag&&t==n.is)return new n.ctor;if(!t&&!n.is)return new n.ctor}var o;return t?(o=f(e),o.setAttribute("is",t),o):(o=N(e),e.indexOf("-")>=0&&g(o,HTMLElement),o)}function p(e,t){var n=e[t];e[t]=function(){var e=n.apply(this,arguments);return w(e),e}}var m,v=(e.isIE,e.upgradeDocumentTree),w=e.upgradeAll,_=e.upgradeWithDefinition,g=e.implementPrototype,b=e.useNative,y=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],E={},L="http://www.w3.org/1999/xhtml",N=document.createElement.bind(document),M=document.createElementNS.bind(document);m=Object.__proto__||b?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;for(var n=e;n;){if(n===t.prototype)return!0;n=n.__proto__}return!1},p(Node.prototype,"cloneNode"),p(document,"importNode"),document.registerElement=t,document.createElement=f,document.createElementNS=h,e.registry=E,e["instanceof"]=m,e.reservedTagList=y,e.getRegisteredDefinition=d,document.register=document.registerElement}),function(e){function t(){i(window.wrap(document)),window.CustomElements.ready=!0;var e=window.requestAnimationFrame||function(e){setTimeout(e,16)};e(function(){setTimeout(function(){window.CustomElements.readyTime=Date.now(),window.HTMLImports&&(window.CustomElements.elapsed=window.CustomElements.readyTime-window.HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}var n=e.useNative,o=e.initializeModules;e.isIE;if(n){var r=function(){};e.watchShadow=r,e.upgrade=r,e.upgradeAll=r,e.upgradeDocumentTree=r,e.upgradeSubtree=r,e.takeRecords=r,e["instanceof"]=function(e,t){return e instanceof t}}else o();var i=e.upgradeDocumentTree,a=e.upgradeDocument;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=window.ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=window.ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}),window.HTMLImports&&(window.HTMLImports.__importsParsingHook=function(e){e["import"]&&a(wrap(e["import"]))}),"complete"===document.readyState||e.flags.eager)t();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var s=window.HTMLImports&&!window.HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(s,t)}else t()}(window.CustomElements),function(e){var t=document.createElement("style");t.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var n=document.querySelector("head");n.insertBefore(t,n.firstChild)}(window.WebComponents);\ No newline at end of filediff --git a/manager/client/src/main/webapp/bower_components/webcomponentsjs/webcomponents.js b/manager/client/src/main/webapp/bower_components/webcomponentsjs/webcomponents.jsdeleted file mode 100644index daf5c22d9..000000000--- a/manager/client/src/main/webapp/bower_components/webcomponentsjs/webcomponents.js+++ /dev/null@@ -1,7209 +0,0 @@-/**- * @license- * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.- * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt- * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt- * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt- * Code distributed by Google as part of the polymer project is also- * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt- */-// @version 0.7.24-(function() {- window.WebComponents = window.WebComponents || {- flags: {}- };- var file = "webcomponents.js";- var script = document.querySelector('script[src*="' + file + '"]');- var flags = {};- if (!flags.noOpts) {- location.search.slice(1).split("&").forEach(function(option) {- var parts = option.split("=");- var match;- if (parts[0] && (match = parts[0].match(/wc-(.+)/))) {- flags[match[1]] = parts[1] || true;- }- });- if (script) {- for (var i = 0, a; a = script.attributes[i]; i++) {- if (a.name !== "src") {- flags[a.name] = a.value || true;- }- }- }- if (flags.log && flags.log.split) {- var parts = flags.log.split(",");- flags.log = {};- parts.forEach(function(f) {- flags.log[f] = true;- });- } else {- flags.log = {};- }- }- flags.shadow = flags.shadow || flags.shadowdom || flags.polyfill;- if (flags.shadow === "native") {- flags.shadow = false;- } else {- flags.shadow = flags.shadow || !HTMLElement.prototype.createShadowRoot;- }- if (flags.register) {- window.CustomElements = window.CustomElements || {- flags: {}- };- window.CustomElements.flags.register = flags.register;- }- WebComponents.flags = flags;-})();--if (WebComponents.flags.shadow) {- if (typeof WeakMap === "undefined") {- (function() {- var defineProperty = Object.defineProperty;- var counter = Date.now() % 1e9;- var WeakMap = function() {- this.name = "__st" + (Math.random() * 1e9 >>> 0) + (counter++ + "__");- };- WeakMap.prototype = {- set: function(key, value) {- var entry = key[this.name];- if (entry && entry[0] === key) entry[1] = value; else defineProperty(key, this.name, {- value: [ key, value ],- writable: true- });- return this;- },- get: function(key) {- var entry;- return (entry = key[this.name]) && entry[0] === key ? entry[1] : undefined;- },- "delete": function(key) {- var entry = key[this.name];- if (!entry || entry[0] !== key) return false;- entry[0] = entry[1] = undefined;- return true;- },- has: function(key) {- var entry = key[this.name];- if (!entry) return false;- return entry[0] === key;- }- };- window.WeakMap = WeakMap;- })();- }- window.ShadowDOMPolyfill = {};- (function(scope) {- "use strict";- var constructorTable = new WeakMap();- var nativePrototypeTable = new WeakMap();- var wrappers = Object.create(null);- function detectEval() {- if (typeof chrome !== "undefined" && chrome.app && chrome.app.runtime) {- return false;- }- if (navigator.getDeviceStorage) {- return false;- }- try {- var f = new Function("return true;");- return f();- } catch (ex) {- return false;- }- }- var hasEval = detectEval();- function assert(b) {- if (!b) throw new Error("Assertion failed");- }- var defineProperty = Object.defineProperty;- var getOwnPropertyNames = Object.getOwnPropertyNames;- var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;- function mixin(to, from) {- var names = getOwnPropertyNames(from);- for (var i = 0; i < names.length; i++) {- var name = names[i];- defineProperty(to, name, getOwnPropertyDescriptor(from, name));- }- return to;- }- function mixinStatics(to, from) {- var names = getOwnPropertyNames(from);- for (var i = 0; i < names.length; i++) {- var name = names[i];- switch (name) {- case "arguments":- case "caller":- case "length":- case "name":- case "prototype":- case "toString":- continue;- }- defineProperty(to, name, getOwnPropertyDescriptor(from, name));- }- return to;- }- function oneOf(object, propertyNames) {- for (var i = 0; i < propertyNames.length; i++) {- if (propertyNames[i] in object) return propertyNames[i];- }- }- var nonEnumerableDataDescriptor = {- value: undefined,- configurable: true,- enumerable: false,- writable: true- };- function defineNonEnumerableDataProperty(object, name, value) {- nonEnumerableDataDescriptor.value = value;- defineProperty(object, name, nonEnumerableDataDescriptor);- }- getOwnPropertyNames(window);- function getWrapperConstructor(node, opt_instance) {- var nativePrototype = node.__proto__ || Object.getPrototypeOf(node);- if (isFirefox) {- try {- getOwnPropertyNames(nativePrototype);- } catch (error) {- nativePrototype = nativePrototype.__proto__;- }- }- var wrapperConstructor = constructorTable.get(nativePrototype);- if (wrapperConstructor) return wrapperConstructor;- var parentWrapperConstructor = getWrapperConstructor(nativePrototype);- var GeneratedWrapper = createWrapperConstructor(parentWrapperConstructor);- registerInternal(nativePrototype, GeneratedWrapper, opt_instance);- return GeneratedWrapper;- }- function addForwardingProperties(nativePrototype, wrapperPrototype) {- installProperty(nativePrototype, wrapperPrototype, true);- }- function registerInstanceProperties(wrapperPrototype, instanceObject) {- installProperty(instanceObject, wrapperPrototype, false);- }- var isFirefox = /Firefox/.test(navigator.userAgent);- var dummyDescriptor = {- get: function() {},- set: function(v) {},- configurable: true,- enumerable: true- };- function isEventHandlerName(name) {- return /^on[a-z]+$/.test(name);- }- function isIdentifierName(name) {- return /^[a-zA-Z_$][a-zA-Z_$0-9]*$/.test(name);- }- function getGetter(name) {- return hasEval && isIdentifierName(name) ? new Function("return this.__impl4cf1e782hg__." + name) : function() {- return this.__impl4cf1e782hg__[name];- };- }- function getSetter(name) {- return hasEval && isIdentifierName(name) ? new Function("v", "this.__impl4cf1e782hg__." + name + " = v") : function(v) {- this.__impl4cf1e782hg__[name] = v;- };- }- function getMethod(name) {- return hasEval && isIdentifierName(name) ? new Function("return this.__impl4cf1e782hg__." + name + ".apply(this.__impl4cf1e782hg__, arguments)") : function() {- return this.__impl4cf1e782hg__[name].apply(this.__impl4cf1e782hg__, arguments);- };- }- function getDescriptor(source, name) {- try {- if (source === window && name === "showModalDialog") {- return dummyDescriptor;- }- return Object.getOwnPropertyDescriptor(source, name);- } catch (ex) {- return dummyDescriptor;- }- }- var isBrokenSafari = function() {- var descr = Object.getOwnPropertyDescriptor(Node.prototype, "nodeType");- return descr && !descr.get && !descr.set;- }();- function installProperty(source, target, allowMethod, opt_blacklist) {- var names = getOwnPropertyNames(source);- for (var i = 0; i < names.length; i++) {- var name = names[i];- if (name === "polymerBlackList_") continue;- if (name in target) continue;- if (source.polymerBlackList_ && source.polymerBlackList_[name]) continue;- if (isFirefox) {- source.__lookupGetter__(name);- }- var descriptor = getDescriptor(source, name);- var getter, setter;- if (typeof descriptor.value === "function") {- if (allowMethod) {- target[name] = getMethod(name);- }- continue;- }- var isEvent = isEventHandlerName(name);- if (isEvent) getter = scope.getEventHandlerGetter(name); else getter = getGetter(name);- if (descriptor.writable || descriptor.set || isBrokenSafari) {- if (isEvent) setter = scope.getEventHandlerSetter(name); else setter = getSetter(name);- }- var configurable = isBrokenSafari || descriptor.configurable;- defineProperty(target, name, {- get: getter,- set: setter,- configurable: configurable,- enumerable: descriptor.enumerable- });- }- }- function register(nativeConstructor, wrapperConstructor, opt_instance) {- if (nativeConstructor == null) {- return;- }- var nativePrototype = nativeConstructor.prototype;- registerInternal(nativePrototype, wrapperConstructor, opt_instance);- mixinStatics(wrapperConstructor, nativeConstructor);- }- function registerInternal(nativePrototype, wrapperConstructor, opt_instance) {- var wrapperPrototype = wrapperConstructor.prototype;- assert(constructorTable.get(nativePrototype) === undefined);- constructorTable.set(nativePrototype, wrapperConstructor);- nativePrototypeTable.set(wrapperPrototype, nativePrototype);- addForwardingProperties(nativePrototype, wrapperPrototype);- if (opt_instance) registerInstanceProperties(wrapperPrototype, opt_instance);- defineNonEnumerableDataProperty(wrapperPrototype, "constructor", wrapperConstructor);- wrapperConstructor.prototype = wrapperPrototype;- }- function isWrapperFor(wrapperConstructor, nativeConstructor) {- return constructorTable.get(nativeConstructor.prototype) === wrapperConstructor;- }- function registerObject(object) {- var nativePrototype = Object.getPrototypeOf(object);- var superWrapperConstructor = getWrapperConstructor(nativePrototype);- var GeneratedWrapper = createWrapperConstructor(superWrapperConstructor);- registerInternal(nativePrototype, GeneratedWrapper, object);- return GeneratedWrapper;- }- function createWrapperConstructor(superWrapperConstructor) {- function GeneratedWrapper(node) {- superWrapperConstructor.call(this, node);- }- var p = Object.create(superWrapperConstructor.prototype);- p.constructor = GeneratedWrapper;- GeneratedWrapper.prototype = p;- return GeneratedWrapper;- }- function isWrapper(object) {- return object && object.__impl4cf1e782hg__;- }- function isNative(object) {- return !isWrapper(object);- }- function wrap(impl) {- if (impl === null) return null;- assert(isNative(impl));- var wrapper = impl.__wrapper8e3dd93a60__;- if (wrapper != null) {- return wrapper;- }- return impl.__wrapper8e3dd93a60__ = new (getWrapperConstructor(impl, impl))(impl);- }- function unwrap(wrapper) {- if (wrapper === null) return null;- assert(isWrapper(wrapper));- return wrapper.__impl4cf1e782hg__;- }- function unsafeUnwrap(wrapper) {- return wrapper.__impl4cf1e782hg__;- }- function setWrapper(impl, wrapper) {- wrapper.__impl4cf1e782hg__ = impl;- impl.__wrapper8e3dd93a60__ = wrapper;- }- function unwrapIfNeeded(object) {- return object && isWrapper(object) ? unwrap(object) : object;- }- function wrapIfNeeded(object) {- return object && !isWrapper(object) ? wrap(object) : object;- }- function rewrap(node, wrapper) {- if (wrapper === null) return;- assert(isNative(node));- assert(wrapper === undefined || isWrapper(wrapper));- node.__wrapper8e3dd93a60__ = wrapper;- }- var getterDescriptor = {- get: undefined,- configurable: true,- enumerable: true- };- function defineGetter(constructor, name, getter) {- getterDescriptor.get = getter;- defineProperty(constructor.prototype, name, getterDescriptor);- }- function defineWrapGetter(constructor, name) {- defineGetter(constructor, name, function() {- return wrap(this.__impl4cf1e782hg__[name]);- });- }- function forwardMethodsToWrapper(constructors, names) {- constructors.forEach(function(constructor) {- names.forEach(function(name) {- constructor.prototype[name] = function() {- var w = wrapIfNeeded(this);- return w[name].apply(w, arguments);- };- });- });- }- scope.addForwardingProperties = addForwardingProperties;- scope.assert = assert;- scope.constructorTable = constructorTable;- scope.defineGetter = defineGetter;- scope.defineWrapGetter = defineWrapGetter;- scope.forwardMethodsToWrapper = forwardMethodsToWrapper;- scope.isIdentifierName = isIdentifierName;- scope.isWrapper = isWrapper;- scope.isWrapperFor = isWrapperFor;- scope.mixin = mixin;- scope.nativePrototypeTable = nativePrototypeTable;- scope.oneOf = oneOf;- scope.registerObject = registerObject;- scope.registerWrapper = register;- scope.rewrap = rewrap;- scope.setWrapper = setWrapper;- scope.unsafeUnwrap = unsafeUnwrap;- scope.unwrap = unwrap;- scope.unwrapIfNeeded = unwrapIfNeeded;- scope.wrap = wrap;- scope.wrapIfNeeded = wrapIfNeeded;- scope.wrappers = wrappers;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- function newSplice(index, removed, addedCount) {- return {- index: index,- removed: removed,- addedCount: addedCount- };- }- var EDIT_LEAVE = 0;- var EDIT_UPDATE = 1;- var EDIT_ADD = 2;- var EDIT_DELETE = 3;- function ArraySplice() {}- ArraySplice.prototype = {- calcEditDistances: function(current, currentStart, currentEnd, old, oldStart, oldEnd) {- var rowCount = oldEnd - oldStart + 1;- var columnCount = currentEnd - currentStart + 1;- var distances = new Array(rowCount);- for (var i = 0; i < rowCount; i++) {- distances[i] = new Array(columnCount);- distances[i][0] = i;- }- for (var j = 0; j < columnCount; j++) distances[0][j] = j;- for (var i = 1; i < rowCount; i++) {- for (var j = 1; j < columnCount; j++) {- if (this.equals(current[currentStart + j - 1], old[oldStart + i - 1])) distances[i][j] = distances[i - 1][j - 1]; else {- var north = distances[i - 1][j] + 1;- var west = distances[i][j - 1] + 1;- distances[i][j] = north < west ? north : west;- }- }- }- return distances;- },- spliceOperationsFromEditDistances: function(distances) {- var i = distances.length - 1;- var j = distances[0].length - 1;- var current = distances[i][j];- var edits = [];- while (i > 0 || j > 0) {- if (i == 0) {- edits.push(EDIT_ADD);- j--;- continue;- }- if (j == 0) {- edits.push(EDIT_DELETE);- i--;- continue;- }- var northWest = distances[i - 1][j - 1];- var west = distances[i - 1][j];- var north = distances[i][j - 1];- var min;- if (west < north) min = west < northWest ? west : northWest; else min = north < northWest ? north : northWest;- if (min == northWest) {- if (northWest == current) {- edits.push(EDIT_LEAVE);- } else {- edits.push(EDIT_UPDATE);- current = northWest;- }- i--;- j--;- } else if (min == west) {- edits.push(EDIT_DELETE);- i--;- current = west;- } else {- edits.push(EDIT_ADD);- j--;- current = north;- }- }- edits.reverse();- return edits;- },- calcSplices: function(current, currentStart, currentEnd, old, oldStart, oldEnd) {- var prefixCount = 0;- var suffixCount = 0;- var minLength = Math.min(currentEnd - currentStart, oldEnd - oldStart);- if (currentStart == 0 && oldStart == 0) prefixCount = this.sharedPrefix(current, old, minLength);- if (currentEnd == current.length && oldEnd == old.length) suffixCount = this.sharedSuffix(current, old, minLength - prefixCount);- currentStart += prefixCount;- oldStart += prefixCount;- currentEnd -= suffixCount;- oldEnd -= suffixCount;- if (currentEnd - currentStart == 0 && oldEnd - oldStart == 0) return [];- if (currentStart == currentEnd) {- var splice = newSplice(currentStart, [], 0);- while (oldStart < oldEnd) splice.removed.push(old[oldStart++]);- return [ splice ];- } else if (oldStart == oldEnd) return [ newSplice(currentStart, [], currentEnd - currentStart) ];- var ops = this.spliceOperationsFromEditDistances(this.calcEditDistances(current, currentStart, currentEnd, old, oldStart, oldEnd));- var splice = undefined;- var splices = [];- var index = currentStart;- var oldIndex = oldStart;- for (var i = 0; i < ops.length; i++) {- switch (ops[i]) {- case EDIT_LEAVE:- if (splice) {- splices.push(splice);- splice = undefined;- }- index++;- oldIndex++;- break;-- case EDIT_UPDATE:- if (!splice) splice = newSplice(index, [], 0);- splice.addedCount++;- index++;- splice.removed.push(old[oldIndex]);- oldIndex++;- break;-- case EDIT_ADD:- if (!splice) splice = newSplice(index, [], 0);- splice.addedCount++;- index++;- break;-- case EDIT_DELETE:- if (!splice) splice = newSplice(index, [], 0);- splice.removed.push(old[oldIndex]);- oldIndex++;- break;- }- }- if (splice) {- splices.push(splice);- }- return splices;- },- sharedPrefix: function(current, old, searchLength) {- for (var i = 0; i < searchLength; i++) if (!this.equals(current[i], old[i])) return i;- return searchLength;- },- sharedSuffix: function(current, old, searchLength) {- var index1 = current.length;- var index2 = old.length;- var count = 0;- while (count < searchLength && this.equals(current[--index1], old[--index2])) count++;- return count;- },- calculateSplices: function(current, previous) {- return this.calcSplices(current, 0, current.length, previous, 0, previous.length);- },- equals: function(currentValue, previousValue) {- return currentValue === previousValue;- }- };- scope.ArraySplice = ArraySplice;- })(window.ShadowDOMPolyfill);- (function(context) {- "use strict";- var OriginalMutationObserver = window.MutationObserver;- var callbacks = [];- var pending = false;- var timerFunc;- function handle() {- pending = false;- var copies = callbacks.slice(0);- callbacks = [];- for (var i = 0; i < copies.length; i++) {- (0, copies[i])();- }- }- if (OriginalMutationObserver) {- var counter = 1;- var observer = new OriginalMutationObserver(handle);- var textNode = document.createTextNode(counter);- observer.observe(textNode, {- characterData: true- });- timerFunc = function() {- counter = (counter + 1) % 2;- textNode.data = counter;- };- } else {- timerFunc = window.setTimeout;- }- function setEndOfMicrotask(func) {- callbacks.push(func);- if (pending) return;- pending = true;- timerFunc(handle, 0);- }- context.setEndOfMicrotask = setEndOfMicrotask;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var setEndOfMicrotask = scope.setEndOfMicrotask;- var wrapIfNeeded = scope.wrapIfNeeded;- var wrappers = scope.wrappers;- var registrationsTable = new WeakMap();- var globalMutationObservers = [];- var isScheduled = false;- function scheduleCallback(observer) {- if (observer.scheduled_) return;- observer.scheduled_ = true;- globalMutationObservers.push(observer);- if (isScheduled) return;- setEndOfMicrotask(notifyObservers);- isScheduled = true;- }- function notifyObservers() {- isScheduled = false;- while (globalMutationObservers.length) {- var notifyList = globalMutationObservers;- globalMutationObservers = [];- notifyList.sort(function(x, y) {- return x.uid_ - y.uid_;- });- for (var i = 0; i < notifyList.length; i++) {- var mo = notifyList[i];- mo.scheduled_ = false;- var queue = mo.takeRecords();- removeTransientObserversFor(mo);- if (queue.length) {- mo.callback_(queue, mo);- }- }- }- }- function MutationRecord(type, target) {- this.type = type;- this.target = target;- this.addedNodes = new wrappers.NodeList();- this.removedNodes = new wrappers.NodeList();- this.previousSibling = null;- this.nextSibling = null;- this.attributeName = null;- this.attributeNamespace = null;- this.oldValue = null;- }- function registerTransientObservers(ancestor, node) {- for (;ancestor; ancestor = ancestor.parentNode) {- var registrations = registrationsTable.get(ancestor);- if (!registrations) continue;- for (var i = 0; i < registrations.length; i++) {- var registration = registrations[i];- if (registration.options.subtree) registration.addTransientObserver(node);- }- }- }- function removeTransientObserversFor(observer) {- for (var i = 0; i < observer.nodes_.length; i++) {- var node = observer.nodes_[i];- var registrations = registrationsTable.get(node);- if (!registrations) return;- for (var j = 0; j < registrations.length; j++) {- var registration = registrations[j];- if (registration.observer === observer) registration.removeTransientObservers();- }- }- }- function enqueueMutation(target, type, data) {- var interestedObservers = Object.create(null);- var associatedStrings = Object.create(null);- for (var node = target; node; node = node.parentNode) {- var registrations = registrationsTable.get(node);- if (!registrations) continue;- for (var j = 0; j < registrations.length; j++) {- var registration = registrations[j];- var options = registration.options;- if (node !== target && !options.subtree) continue;- if (type === "attributes" && !options.attributes) continue;- if (type === "attributes" && options.attributeFilter && (data.namespace !== null || options.attributeFilter.indexOf(data.name) === -1)) {- continue;- }- if (type === "characterData" && !options.characterData) continue;- if (type === "childList" && !options.childList) continue;- var observer = registration.observer;- interestedObservers[observer.uid_] = observer;- if (type === "attributes" && options.attributeOldValue || type === "characterData" && options.characterDataOldValue) {- associatedStrings[observer.uid_] = data.oldValue;- }- }- }- for (var uid in interestedObservers) {- var observer = interestedObservers[uid];- var record = new MutationRecord(type, target);- if ("name" in data && "namespace" in data) {- record.attributeName = data.name;- record.attributeNamespace = data.namespace;- }- if (data.addedNodes) record.addedNodes = data.addedNodes;- if (data.removedNodes) record.removedNodes = data.removedNodes;- if (data.previousSibling) record.previousSibling = data.previousSibling;- if (data.nextSibling) record.nextSibling = data.nextSibling;- if (associatedStrings[uid] !== undefined) record.oldValue = associatedStrings[uid];- scheduleCallback(observer);- observer.records_.push(record);- }- }- var slice = Array.prototype.slice;- function MutationObserverOptions(options) {- this.childList = !!options.childList;- this.subtree = !!options.subtree;- if (!("attributes" in options) && ("attributeOldValue" in options || "attributeFilter" in options)) {- this.attributes = true;- } else {- this.attributes = !!options.attributes;- }- if ("characterDataOldValue" in options && !("characterData" in options)) this.characterData = true; else this.characterData = !!options.characterData;- if (!this.attributes && (options.attributeOldValue || "attributeFilter" in options) || !this.characterData && options.characterDataOldValue) {- throw new TypeError();- }- this.characterData = !!options.characterData;- this.attributeOldValue = !!options.attributeOldValue;- this.characterDataOldValue = !!options.characterDataOldValue;- if ("attributeFilter" in options) {- if (options.attributeFilter == null || typeof options.attributeFilter !== "object") {- throw new TypeError();- }- this.attributeFilter = slice.call(options.attributeFilter);- } else {- this.attributeFilter = null;- }- }- var uidCounter = 0;- function MutationObserver(callback) {- this.callback_ = callback;- this.nodes_ = [];- this.records_ = [];- this.uid_ = ++uidCounter;- this.scheduled_ = false;- }- MutationObserver.prototype = {- constructor: MutationObserver,- observe: function(target, options) {- target = wrapIfNeeded(target);- var newOptions = new MutationObserverOptions(options);- var registration;- var registrations = registrationsTable.get(target);- if (!registrations) registrationsTable.set(target, registrations = []);- for (var i = 0; i < registrations.length; i++) {- if (registrations[i].observer === this) {- registration = registrations[i];- registration.removeTransientObservers();- registration.options = newOptions;- }- }- if (!registration) {- registration = new Registration(this, target, newOptions);- registrations.push(registration);- this.nodes_.push(target);- }- },- disconnect: function() {- this.nodes_.forEach(function(node) {- var registrations = registrationsTable.get(node);- for (var i = 0; i < registrations.length; i++) {- var registration = registrations[i];- if (registration.observer === this) {- registrations.splice(i, 1);- break;- }- }- }, this);- this.records_ = [];- },- takeRecords: function() {- var copyOfRecords = this.records_;- this.records_ = [];- return copyOfRecords;- }- };- function Registration(observer, target, options) {- this.observer = observer;- this.target = target;- this.options = options;- this.transientObservedNodes = [];- }- Registration.prototype = {- addTransientObserver: function(node) {- if (node === this.target) return;- scheduleCallback(this.observer);- this.transientObservedNodes.push(node);- var registrations = registrationsTable.get(node);- if (!registrations) registrationsTable.set(node, registrations = []);- registrations.push(this);- },- removeTransientObservers: function() {- var transientObservedNodes = this.transientObservedNodes;- this.transientObservedNodes = [];- for (var i = 0; i < transientObservedNodes.length; i++) {- var node = transientObservedNodes[i];- var registrations = registrationsTable.get(node);- for (var j = 0; j < registrations.length; j++) {- if (registrations[j] === this) {- registrations.splice(j, 1);- break;- }- }- }- }- };- scope.enqueueMutation = enqueueMutation;- scope.registerTransientObservers = registerTransientObservers;- scope.wrappers.MutationObserver = MutationObserver;- scope.wrappers.MutationRecord = MutationRecord;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- function TreeScope(root, parent) {- this.root = root;- this.parent = parent;- }- TreeScope.prototype = {- get renderer() {- if (this.root instanceof scope.wrappers.ShadowRoot) {- return scope.getRendererForHost(this.root.host);- }- return null;- },- contains: function(treeScope) {- for (;treeScope; treeScope = treeScope.parent) {- if (treeScope === this) return true;- }- return false;- }- };- function setTreeScope(node, treeScope) {- if (node.treeScope_ !== treeScope) {- node.treeScope_ = treeScope;- for (var sr = node.shadowRoot; sr; sr = sr.olderShadowRoot) {- sr.treeScope_.parent = treeScope;- }- for (var child = node.firstChild; child; child = child.nextSibling) {- setTreeScope(child, treeScope);- }- }- }- function getTreeScope(node) {- if (node instanceof scope.wrappers.Window) {- debugger;- }- if (node.treeScope_) return node.treeScope_;- var parent = node.parentNode;- var treeScope;- if (parent) treeScope = getTreeScope(parent); else treeScope = new TreeScope(node, null);- return node.treeScope_ = treeScope;- }- scope.TreeScope = TreeScope;- scope.getTreeScope = getTreeScope;- scope.setTreeScope = setTreeScope;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var forwardMethodsToWrapper = scope.forwardMethodsToWrapper;- var getTreeScope = scope.getTreeScope;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var setWrapper = scope.setWrapper;- var unsafeUnwrap = scope.unsafeUnwrap;- var unwrap = scope.unwrap;- var wrap = scope.wrap;- var wrappers = scope.wrappers;- var wrappedFuns = new WeakMap();- var listenersTable = new WeakMap();- var handledEventsTable = new WeakMap();- var currentlyDispatchingEvents = new WeakMap();- var targetTable = new WeakMap();- var currentTargetTable = new WeakMap();- var relatedTargetTable = new WeakMap();- var eventPhaseTable = new WeakMap();- var stopPropagationTable = new WeakMap();- var stopImmediatePropagationTable = new WeakMap();- var eventHandlersTable = new WeakMap();- var eventPathTable = new WeakMap();- function isShadowRoot(node) {- return node instanceof wrappers.ShadowRoot;- }- function rootOfNode(node) {- return getTreeScope(node).root;- }- function getEventPath(node, event) {- var path = [];- var current = node;- path.push(current);- while (current) {- var destinationInsertionPoints = getDestinationInsertionPoints(current);- if (destinationInsertionPoints && destinationInsertionPoints.length > 0) {- for (var i = 0; i < destinationInsertionPoints.length; i++) {- var insertionPoint = destinationInsertionPoints[i];- if (isShadowInsertionPoint(insertionPoint)) {- var shadowRoot = rootOfNode(insertionPoint);- var olderShadowRoot = shadowRoot.olderShadowRoot;- if (olderShadowRoot) path.push(olderShadowRoot);- }- path.push(insertionPoint);- }- current = destinationInsertionPoints[destinationInsertionPoints.length - 1];- } else {- if (isShadowRoot(current)) {- if (inSameTree(node, current) && eventMustBeStopped(event)) {- break;- }- current = current.host;- path.push(current);- } else {- current = current.parentNode;- if (current) path.push(current);- }- }- }- return path;- }- function eventMustBeStopped(event) {- if (!event) return false;- switch (event.type) {- case "abort":- case "error":- case "select":- case "change":- case "load":- case "reset":- case "resize":- case "scroll":- case "selectstart":- return true;- }- return false;- }- function isShadowInsertionPoint(node) {- return node instanceof HTMLShadowElement;- }- function getDestinationInsertionPoints(node) {- return scope.getDestinationInsertionPoints(node);- }- function eventRetargetting(path, currentTarget) {- if (path.length === 0) return currentTarget;- if (currentTarget instanceof wrappers.Window) currentTarget = currentTarget.document;- var currentTargetTree = getTreeScope(currentTarget);- var originalTarget = path[0];- var originalTargetTree = getTreeScope(originalTarget);- var relativeTargetTree = lowestCommonInclusiveAncestor(currentTargetTree, originalTargetTree);- for (var i = 0; i < path.length; i++) {- var node = path[i];- if (getTreeScope(node) === relativeTargetTree) return node;- }- return path[path.length - 1];- }- function getTreeScopeAncestors(treeScope) {- var ancestors = [];- for (;treeScope; treeScope = treeScope.parent) {- ancestors.push(treeScope);- }- return ancestors;- }- function lowestCommonInclusiveAncestor(tsA, tsB) {- var ancestorsA = getTreeScopeAncestors(tsA);- var ancestorsB = getTreeScopeAncestors(tsB);- var result = null;- while (ancestorsA.length > 0 && ancestorsB.length > 0) {- var a = ancestorsA.pop();- var b = ancestorsB.pop();- if (a === b) result = a; else break;- }- return result;- }- function getTreeScopeRoot(ts) {- if (!ts.parent) return ts;- return getTreeScopeRoot(ts.parent);- }- function relatedTargetResolution(event, currentTarget, relatedTarget) {- if (currentTarget instanceof wrappers.Window) currentTarget = currentTarget.document;- var currentTargetTree = getTreeScope(currentTarget);- var relatedTargetTree = getTreeScope(relatedTarget);- var relatedTargetEventPath = getEventPath(relatedTarget, event);- var lowestCommonAncestorTree;- var lowestCommonAncestorTree = lowestCommonInclusiveAncestor(currentTargetTree, relatedTargetTree);- if (!lowestCommonAncestorTree) lowestCommonAncestorTree = relatedTargetTree.root;- for (var commonAncestorTree = lowestCommonAncestorTree; commonAncestorTree; commonAncestorTree = commonAncestorTree.parent) {- var adjustedRelatedTarget;- for (var i = 0; i < relatedTargetEventPath.length; i++) {- var node = relatedTargetEventPath[i];- if (getTreeScope(node) === commonAncestorTree) return node;- }- }- return null;- }- function inSameTree(a, b) {- return getTreeScope(a) === getTreeScope(b);- }- var NONE = 0;- var CAPTURING_PHASE = 1;- var AT_TARGET = 2;- var BUBBLING_PHASE = 3;- var pendingError;- function dispatchOriginalEvent(originalEvent) {- if (handledEventsTable.get(originalEvent)) return;- handledEventsTable.set(originalEvent, true);- dispatchEvent(wrap(originalEvent), wrap(originalEvent.target));- if (pendingError) {- var err = pendingError;- pendingError = null;- throw err;- }- }- function isLoadLikeEvent(event) {- switch (event.type) {- case "load":- case "beforeunload":- case "unload":- return true;- }- return false;- }- function dispatchEvent(event, originalWrapperTarget) {- if (currentlyDispatchingEvents.get(event)) throw new Error("InvalidStateError");- currentlyDispatchingEvents.set(event, true);- scope.renderAllPending();- var eventPath;- var overrideTarget;- var win;- if (isLoadLikeEvent(event) && !event.bubbles) {- var doc = originalWrapperTarget;- if (doc instanceof wrappers.Document && (win = doc.defaultView)) {- overrideTarget = doc;- eventPath = [];- }- }- if (!eventPath) {- if (originalWrapperTarget instanceof wrappers.Window) {- win = originalWrapperTarget;- eventPath = [];- } else {- eventPath = getEventPath(originalWrapperTarget, event);- if (!isLoadLikeEvent(event)) {- var doc = eventPath[eventPath.length - 1];- if (doc instanceof wrappers.Document) win = doc.defaultView;- }- }- }- eventPathTable.set(event, eventPath);- if (dispatchCapturing(event, eventPath, win, overrideTarget)) {- if (dispatchAtTarget(event, eventPath, win, overrideTarget)) {- dispatchBubbling(event, eventPath, win, overrideTarget);- }- }- eventPhaseTable.set(event, NONE);- currentTargetTable.delete(event, null);- currentlyDispatchingEvents.delete(event);- return event.defaultPrevented;- }- function dispatchCapturing(event, eventPath, win, overrideTarget) {- var phase = CAPTURING_PHASE;- if (win) {- if (!invoke(win, event, phase, eventPath, overrideTarget)) return false;- }- for (var i = eventPath.length - 1; i > 0; i--) {- if (!invoke(eventPath[i], event, phase, eventPath, overrideTarget)) return false;- }- return true;- }- function dispatchAtTarget(event, eventPath, win, overrideTarget) {- var phase = AT_TARGET;- var currentTarget = eventPath[0] || win;- return invoke(currentTarget, event, phase, eventPath, overrideTarget);- }- function dispatchBubbling(event, eventPath, win, overrideTarget) {- var phase = BUBBLING_PHASE;- for (var i = 1; i < eventPath.length; i++) {- if (!invoke(eventPath[i], event, phase, eventPath, overrideTarget)) return;- }- if (win && eventPath.length > 0) {- invoke(win, event, phase, eventPath, overrideTarget);- }- }- function invoke(currentTarget, event, phase, eventPath, overrideTarget) {- var listeners = listenersTable.get(currentTarget);- if (!listeners) return true;- var target = overrideTarget || eventRetargetting(eventPath, currentTarget);- if (target === currentTarget) {- if (phase === CAPTURING_PHASE) return true;- if (phase === BUBBLING_PHASE) phase = AT_TARGET;- } else if (phase === BUBBLING_PHASE && !event.bubbles) {- return true;- }- if ("relatedTarget" in event) {- var originalEvent = unwrap(event);- var unwrappedRelatedTarget = originalEvent.relatedTarget;- if (unwrappedRelatedTarget) {- if (unwrappedRelatedTarget instanceof Object && unwrappedRelatedTarget.addEventListener) {- var relatedTarget = wrap(unwrappedRelatedTarget);- var adjusted = relatedTargetResolution(event, currentTarget, relatedTarget);- if (adjusted === target) return true;- } else {- adjusted = null;- }- relatedTargetTable.set(event, adjusted);- }- }- eventPhaseTable.set(event, phase);- var type = event.type;- var anyRemoved = false;- targetTable.set(event, target);- currentTargetTable.set(event, currentTarget);- listeners.depth++;- for (var i = 0, len = listeners.length; i < len; i++) {- var listener = listeners[i];- if (listener.removed) {- anyRemoved = true;- continue;- }- if (listener.type !== type || !listener.capture && phase === CAPTURING_PHASE || listener.capture && phase === BUBBLING_PHASE) {- continue;- }- try {- if (typeof listener.handler === "function") listener.handler.call(currentTarget, event); else listener.handler.handleEvent(event);- if (stopImmediatePropagationTable.get(event)) return false;- } catch (ex) {- if (!pendingError) pendingError = ex;- }- }- listeners.depth--;- if (anyRemoved && listeners.depth === 0) {- var copy = listeners.slice();- listeners.length = 0;- for (var i = 0; i < copy.length; i++) {- if (!copy[i].removed) listeners.push(copy[i]);- }- }- return !stopPropagationTable.get(event);- }- function Listener(type, handler, capture) {- this.type = type;- this.handler = handler;- this.capture = Boolean(capture);- }- Listener.prototype = {- equals: function(that) {- return this.handler === that.handler && this.type === that.type && this.capture === that.capture;- },- get removed() {- return this.handler === null;- },- remove: function() {- this.handler = null;- }- };- var OriginalEvent = window.Event;- OriginalEvent.prototype.polymerBlackList_ = {- returnValue: true,- keyLocation: true- };- function Event(type, options) {- if (type instanceof OriginalEvent) {- var impl = type;- if (!OriginalBeforeUnloadEvent && impl.type === "beforeunload" && !(this instanceof BeforeUnloadEvent)) {- return new BeforeUnloadEvent(impl);- }- setWrapper(impl, this);- } else {- return wrap(constructEvent(OriginalEvent, "Event", type, options));- }- }- Event.prototype = {- get target() {- return targetTable.get(this);- },- get currentTarget() {- return currentTargetTable.get(this);- },- get eventPhase() {- return eventPhaseTable.get(this);- },- get path() {- var eventPath = eventPathTable.get(this);- if (!eventPath) return [];- return eventPath.slice();- },- stopPropagation: function() {- stopPropagationTable.set(this, true);- },- stopImmediatePropagation: function() {- stopPropagationTable.set(this, true);- stopImmediatePropagationTable.set(this, true);- }- };- var supportsDefaultPrevented = function() {- var e = document.createEvent("Event");- e.initEvent("test", true, true);- e.preventDefault();- return e.defaultPrevented;- }();- if (!supportsDefaultPrevented) {- Event.prototype.preventDefault = function() {- if (!this.cancelable) return;- unsafeUnwrap(this).preventDefault();- Object.defineProperty(this, "defaultPrevented", {- get: function() {- return true;- },- configurable: true- });- };- }- registerWrapper(OriginalEvent, Event, document.createEvent("Event"));- function unwrapOptions(options) {- if (!options || !options.relatedTarget) return options;- return Object.create(options, {- relatedTarget: {- value: unwrap(options.relatedTarget)- }- });- }- function registerGenericEvent(name, SuperEvent, prototype) {- var OriginalEvent = window[name];- var GenericEvent = function(type, options) {- if (type instanceof OriginalEvent) setWrapper(type, this); else return wrap(constructEvent(OriginalEvent, name, type, options));- };- GenericEvent.prototype = Object.create(SuperEvent.prototype);- if (prototype) mixin(GenericEvent.prototype, prototype);- if (OriginalEvent) {- try {- registerWrapper(OriginalEvent, GenericEvent, new OriginalEvent("temp"));- } catch (ex) {- registerWrapper(OriginalEvent, GenericEvent, document.createEvent(name));- }- }- return GenericEvent;- }- var UIEvent = registerGenericEvent("UIEvent", Event);- var CustomEvent = registerGenericEvent("CustomEvent", Event);- var relatedTargetProto = {- get relatedTarget() {- var relatedTarget = relatedTargetTable.get(this);- if (relatedTarget !== undefined) return relatedTarget;- return wrap(unwrap(this).relatedTarget);- }- };- function getInitFunction(name, relatedTargetIndex) {- return function() {- arguments[relatedTargetIndex] = unwrap(arguments[relatedTargetIndex]);- var impl = unwrap(this);- impl[name].apply(impl, arguments);- };- }- var mouseEventProto = mixin({- initMouseEvent: getInitFunction("initMouseEvent", 14)- }, relatedTargetProto);- var focusEventProto = mixin({- initFocusEvent: getInitFunction("initFocusEvent", 5)- }, relatedTargetProto);- var MouseEvent = registerGenericEvent("MouseEvent", UIEvent, mouseEventProto);- var FocusEvent = registerGenericEvent("FocusEvent", UIEvent, focusEventProto);- var defaultInitDicts = Object.create(null);- var supportsEventConstructors = function() {- try {- new window.FocusEvent("focus");- } catch (ex) {- return false;- }- return true;- }();- function constructEvent(OriginalEvent, name, type, options) {- if (supportsEventConstructors) return new OriginalEvent(type, unwrapOptions(options));- var event = unwrap(document.createEvent(name));- var defaultDict = defaultInitDicts[name];- var args = [ type ];- Object.keys(defaultDict).forEach(function(key) {- var v = options != null && key in options ? options[key] : defaultDict[key];- if (key === "relatedTarget") v = unwrap(v);- args.push(v);- });- event["init" + name].apply(event, args);- return event;- }- if (!supportsEventConstructors) {- var configureEventConstructor = function(name, initDict, superName) {- if (superName) {- var superDict = defaultInitDicts[superName];- initDict = mixin(mixin({}, superDict), initDict);- }- defaultInitDicts[name] = initDict;- };- configureEventConstructor("Event", {- bubbles: false,- cancelable: false- });- configureEventConstructor("CustomEvent", {- detail: null- }, "Event");- configureEventConstructor("UIEvent", {- view: null,- detail: 0- }, "Event");- configureEventConstructor("MouseEvent", {- screenX: 0,- screenY: 0,- clientX: 0,- clientY: 0,- ctrlKey: false,- altKey: false,- shiftKey: false,- metaKey: false,- button: 0,- relatedTarget: null- }, "UIEvent");- configureEventConstructor("FocusEvent", {- relatedTarget: null- }, "UIEvent");- }- var OriginalBeforeUnloadEvent = window.BeforeUnloadEvent;- function BeforeUnloadEvent(impl) {- Event.call(this, impl);- }- BeforeUnloadEvent.prototype = Object.create(Event.prototype);- mixin(BeforeUnloadEvent.prototype, {- get returnValue() {- return unsafeUnwrap(this).returnValue;- },- set returnValue(v) {- unsafeUnwrap(this).returnValue = v;- }- });- if (OriginalBeforeUnloadEvent) registerWrapper(OriginalBeforeUnloadEvent, BeforeUnloadEvent);- function isValidListener(fun) {- if (typeof fun === "function") return true;- return fun && fun.handleEvent;- }- function isMutationEvent(type) {- switch (type) {- case "DOMAttrModified":- case "DOMAttributeNameChanged":- case "DOMCharacterDataModified":- case "DOMElementNameChanged":- case "DOMNodeInserted":- case "DOMNodeInsertedIntoDocument":- case "DOMNodeRemoved":- case "DOMNodeRemovedFromDocument":- case "DOMSubtreeModified":- return true;- }- return false;- }- var OriginalEventTarget = window.EventTarget;- function EventTarget(impl) {- setWrapper(impl, this);- }- var methodNames = [ "addEventListener", "removeEventListener", "dispatchEvent" ];- [ Node, Window ].forEach(function(constructor) {- var p = constructor.prototype;- methodNames.forEach(function(name) {- Object.defineProperty(p, name + "_", {- value: p[name]- });- });- });- function getTargetToListenAt(wrapper) {- if (wrapper instanceof wrappers.ShadowRoot) wrapper = wrapper.host;- return unwrap(wrapper);- }- EventTarget.prototype = {- addEventListener: function(type, fun, capture) {- if (!isValidListener(fun) || isMutationEvent(type)) return;- var listener = new Listener(type, fun, capture);- var listeners = listenersTable.get(this);- if (!listeners) {- listeners = [];- listeners.depth = 0;- listenersTable.set(this, listeners);- } else {- for (var i = 0; i < listeners.length; i++) {- if (listener.equals(listeners[i])) return;- }- }- listeners.push(listener);- var target = getTargetToListenAt(this);- target.addEventListener_(type, dispatchOriginalEvent, true);- },- removeEventListener: function(type, fun, capture) {- capture = Boolean(capture);- var listeners = listenersTable.get(this);- if (!listeners) return;- var count = 0, found = false;- for (var i = 0; i < listeners.length; i++) {- if (listeners[i].type === type && listeners[i].capture === capture) {- count++;- if (listeners[i].handler === fun) {- found = true;- listeners[i].remove();- }- }- }- if (found && count === 1) {- var target = getTargetToListenAt(this);- target.removeEventListener_(type, dispatchOriginalEvent, true);- }- },- dispatchEvent: function(event) {- var nativeEvent = unwrap(event);- var eventType = nativeEvent.type;- handledEventsTable.set(nativeEvent, false);- scope.renderAllPending();- var tempListener;- if (!hasListenerInAncestors(this, eventType)) {- tempListener = function() {};- this.addEventListener(eventType, tempListener, true);- }- try {- return unwrap(this).dispatchEvent_(nativeEvent);- } finally {- if (tempListener) this.removeEventListener(eventType, tempListener, true);- }- }- };- function hasListener(node, type) {- var listeners = listenersTable.get(node);- if (listeners) {- for (var i = 0; i < listeners.length; i++) {- if (!listeners[i].removed && listeners[i].type === type) return true;- }- }- return false;- }- function hasListenerInAncestors(target, type) {- for (var node = unwrap(target); node; node = node.parentNode) {- if (hasListener(wrap(node), type)) return true;- }- return false;- }- if (OriginalEventTarget) registerWrapper(OriginalEventTarget, EventTarget);- function wrapEventTargetMethods(constructors) {- forwardMethodsToWrapper(constructors, methodNames);- }- var originalElementFromPoint = document.elementFromPoint;- function elementFromPoint(self, document, x, y) {- scope.renderAllPending();- var element = wrap(originalElementFromPoint.call(unsafeUnwrap(document), x, y));- if (!element) return null;- var path = getEventPath(element, null);- var idx = path.lastIndexOf(self);- if (idx == -1) return null; else path = path.slice(0, idx);- return eventRetargetting(path, self);- }- function getEventHandlerGetter(name) {- return function() {- var inlineEventHandlers = eventHandlersTable.get(this);- return inlineEventHandlers && inlineEventHandlers[name] && inlineEventHandlers[name].value || null;- };- }- function getEventHandlerSetter(name) {- var eventType = name.slice(2);- return function(value) {- var inlineEventHandlers = eventHandlersTable.get(this);- if (!inlineEventHandlers) {- inlineEventHandlers = Object.create(null);- eventHandlersTable.set(this, inlineEventHandlers);- }- var old = inlineEventHandlers[name];- if (old) this.removeEventListener(eventType, old.wrapped, false);- if (typeof value === "function") {- var wrapped = function(e) {- var rv = value.call(this, e);- if (rv === false) e.preventDefault(); else if (name === "onbeforeunload" && typeof rv === "string") e.returnValue = rv;- };- this.addEventListener(eventType, wrapped, false);- inlineEventHandlers[name] = {- value: value,- wrapped: wrapped- };- }- };- }- scope.elementFromPoint = elementFromPoint;- scope.getEventHandlerGetter = getEventHandlerGetter;- scope.getEventHandlerSetter = getEventHandlerSetter;- scope.wrapEventTargetMethods = wrapEventTargetMethods;- scope.wrappers.BeforeUnloadEvent = BeforeUnloadEvent;- scope.wrappers.CustomEvent = CustomEvent;- scope.wrappers.Event = Event;- scope.wrappers.EventTarget = EventTarget;- scope.wrappers.FocusEvent = FocusEvent;- scope.wrappers.MouseEvent = MouseEvent;- scope.wrappers.UIEvent = UIEvent;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var UIEvent = scope.wrappers.UIEvent;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var setWrapper = scope.setWrapper;- var unsafeUnwrap = scope.unsafeUnwrap;- var wrap = scope.wrap;- var OriginalTouchEvent = window.TouchEvent;- if (!OriginalTouchEvent) return;- var nativeEvent;- try {- nativeEvent = document.createEvent("TouchEvent");- } catch (ex) {- return;- }- var nonEnumDescriptor = {- enumerable: false- };- function nonEnum(obj, prop) {- Object.defineProperty(obj, prop, nonEnumDescriptor);- }- function Touch(impl) {- setWrapper(impl, this);- }- Touch.prototype = {- get target() {- return wrap(unsafeUnwrap(this).target);- }- };- var descr = {- configurable: true,- enumerable: true,- get: null- };- [ "clientX", "clientY", "screenX", "screenY", "pageX", "pageY", "identifier", "webkitRadiusX", "webkitRadiusY", "webkitRotationAngle", "webkitForce" ].forEach(function(name) {- descr.get = function() {- return unsafeUnwrap(this)[name];- };- Object.defineProperty(Touch.prototype, name, descr);- });- function TouchList() {- this.length = 0;- nonEnum(this, "length");- }- TouchList.prototype = {- item: function(index) {- return this[index];- }- };- function wrapTouchList(nativeTouchList) {- var list = new TouchList();- for (var i = 0; i < nativeTouchList.length; i++) {- list[i] = new Touch(nativeTouchList[i]);- }- list.length = i;- return list;- }- function TouchEvent(impl) {- UIEvent.call(this, impl);- }- TouchEvent.prototype = Object.create(UIEvent.prototype);- mixin(TouchEvent.prototype, {- get touches() {- return wrapTouchList(unsafeUnwrap(this).touches);- },- get targetTouches() {- return wrapTouchList(unsafeUnwrap(this).targetTouches);- },- get changedTouches() {- return wrapTouchList(unsafeUnwrap(this).changedTouches);- },- initTouchEvent: function() {- throw new Error("Not implemented");- }- });- registerWrapper(OriginalTouchEvent, TouchEvent, nativeEvent);- scope.wrappers.Touch = Touch;- scope.wrappers.TouchEvent = TouchEvent;- scope.wrappers.TouchList = TouchList;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var unsafeUnwrap = scope.unsafeUnwrap;- var wrap = scope.wrap;- var nonEnumDescriptor = {- enumerable: false- };- function nonEnum(obj, prop) {- Object.defineProperty(obj, prop, nonEnumDescriptor);- }- function NodeList() {- this.length = 0;- nonEnum(this, "length");- }- NodeList.prototype = {- item: function(index) {- return this[index];- }- };- nonEnum(NodeList.prototype, "item");- function wrapNodeList(list) {- if (list == null) return list;- var wrapperList = new NodeList();- for (var i = 0, length = list.length; i < length; i++) {- wrapperList[i] = wrap(list[i]);- }- wrapperList.length = length;- return wrapperList;- }- function addWrapNodeListMethod(wrapperConstructor, name) {- wrapperConstructor.prototype[name] = function() {- return wrapNodeList(unsafeUnwrap(this)[name].apply(unsafeUnwrap(this), arguments));- };- }- scope.wrappers.NodeList = NodeList;- scope.addWrapNodeListMethod = addWrapNodeListMethod;- scope.wrapNodeList = wrapNodeList;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- scope.wrapHTMLCollection = scope.wrapNodeList;- scope.wrappers.HTMLCollection = scope.wrappers.NodeList;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var EventTarget = scope.wrappers.EventTarget;- var NodeList = scope.wrappers.NodeList;- var TreeScope = scope.TreeScope;- var assert = scope.assert;- var defineWrapGetter = scope.defineWrapGetter;- var enqueueMutation = scope.enqueueMutation;- var getTreeScope = scope.getTreeScope;- var isWrapper = scope.isWrapper;- var mixin = scope.mixin;- var registerTransientObservers = scope.registerTransientObservers;- var registerWrapper = scope.registerWrapper;- var setTreeScope = scope.setTreeScope;- var unsafeUnwrap = scope.unsafeUnwrap;- var unwrap = scope.unwrap;- var unwrapIfNeeded = scope.unwrapIfNeeded;- var wrap = scope.wrap;- var wrapIfNeeded = scope.wrapIfNeeded;- var wrappers = scope.wrappers;- function assertIsNodeWrapper(node) {- assert(node instanceof Node);- }- function createOneElementNodeList(node) {- var nodes = new NodeList();- nodes[0] = node;- nodes.length = 1;- return nodes;- }- var surpressMutations = false;- function enqueueRemovalForInsertedNodes(node, parent, nodes) {- enqueueMutation(parent, "childList", {- removedNodes: nodes,- previousSibling: node.previousSibling,- nextSibling: node.nextSibling- });- }- function enqueueRemovalForInsertedDocumentFragment(df, nodes) {- enqueueMutation(df, "childList", {- removedNodes: nodes- });- }- function collectNodes(node, parentNode, previousNode, nextNode) {- if (node instanceof DocumentFragment) {- var nodes = collectNodesForDocumentFragment(node);- surpressMutations = true;- for (var i = nodes.length - 1; i >= 0; i--) {- node.removeChild(nodes[i]);- nodes[i].parentNode_ = parentNode;- }- surpressMutations = false;- for (var i = 0; i < nodes.length; i++) {- nodes[i].previousSibling_ = nodes[i - 1] || previousNode;- nodes[i].nextSibling_ = nodes[i + 1] || nextNode;- }- if (previousNode) previousNode.nextSibling_ = nodes[0];- if (nextNode) nextNode.previousSibling_ = nodes[nodes.length - 1];- return nodes;- }- var nodes = createOneElementNodeList(node);- var oldParent = node.parentNode;- if (oldParent) {- oldParent.removeChild(node);- }- node.parentNode_ = parentNode;- node.previousSibling_ = previousNode;- node.nextSibling_ = nextNode;- if (previousNode) previousNode.nextSibling_ = node;- if (nextNode) nextNode.previousSibling_ = node;- return nodes;- }- function collectNodesNative(node) {- if (node instanceof DocumentFragment) return collectNodesForDocumentFragment(node);- var nodes = createOneElementNodeList(node);- var oldParent = node.parentNode;- if (oldParent) enqueueRemovalForInsertedNodes(node, oldParent, nodes);- return nodes;- }- function collectNodesForDocumentFragment(node) {- var nodes = new NodeList();- var i = 0;- for (var child = node.firstChild; child; child = child.nextSibling) {- nodes[i++] = child;- }- nodes.length = i;- enqueueRemovalForInsertedDocumentFragment(node, nodes);- return nodes;- }- function snapshotNodeList(nodeList) {- return nodeList;- }- function nodeWasAdded(node, treeScope) {- setTreeScope(node, treeScope);- node.nodeIsInserted_();- }- function nodesWereAdded(nodes, parent) {- var treeScope = getTreeScope(parent);- for (var i = 0; i < nodes.length; i++) {- nodeWasAdded(nodes[i], treeScope);- }- }- function nodeWasRemoved(node) {- setTreeScope(node, new TreeScope(node, null));- }- function nodesWereRemoved(nodes) {- for (var i = 0; i < nodes.length; i++) {- nodeWasRemoved(nodes[i]);- }- }- function ensureSameOwnerDocument(parent, child) {- var ownerDoc = parent.nodeType === Node.DOCUMENT_NODE ? parent : parent.ownerDocument;- if (ownerDoc !== child.ownerDocument) ownerDoc.adoptNode(child);- }- function adoptNodesIfNeeded(owner, nodes) {- if (!nodes.length) return;- var ownerDoc = owner.ownerDocument;- if (ownerDoc === nodes[0].ownerDocument) return;- for (var i = 0; i < nodes.length; i++) {- scope.adoptNodeNoRemove(nodes[i], ownerDoc);- }- }- function unwrapNodesForInsertion(owner, nodes) {- adoptNodesIfNeeded(owner, nodes);- var length = nodes.length;- if (length === 1) return unwrap(nodes[0]);- var df = unwrap(owner.ownerDocument.createDocumentFragment());- for (var i = 0; i < length; i++) {- df.appendChild(unwrap(nodes[i]));- }- return df;- }- function clearChildNodes(wrapper) {- if (wrapper.firstChild_ !== undefined) {- var child = wrapper.firstChild_;- while (child) {- var tmp = child;- child = child.nextSibling_;- tmp.parentNode_ = tmp.previousSibling_ = tmp.nextSibling_ = undefined;- }- }- wrapper.firstChild_ = wrapper.lastChild_ = undefined;- }- function removeAllChildNodes(wrapper) {- if (wrapper.invalidateShadowRenderer()) {- var childWrapper = wrapper.firstChild;- while (childWrapper) {- assert(childWrapper.parentNode === wrapper);- var nextSibling = childWrapper.nextSibling;- var childNode = unwrap(childWrapper);- var parentNode = childNode.parentNode;- if (parentNode) originalRemoveChild.call(parentNode, childNode);- childWrapper.previousSibling_ = childWrapper.nextSibling_ = childWrapper.parentNode_ = null;- childWrapper = nextSibling;- }- wrapper.firstChild_ = wrapper.lastChild_ = null;- } else {- var node = unwrap(wrapper);- var child = node.firstChild;- var nextSibling;- while (child) {- nextSibling = child.nextSibling;- originalRemoveChild.call(node, child);- child = nextSibling;- }- }- }- function invalidateParent(node) {- var p = node.parentNode;- return p && p.invalidateShadowRenderer();- }- function cleanupNodes(nodes) {- for (var i = 0, n; i < nodes.length; i++) {- n = nodes[i];- n.parentNode.removeChild(n);- }- }- var originalImportNode = document.importNode;- var originalCloneNode = window.Node.prototype.cloneNode;- function cloneNode(node, deep, opt_doc) {- var clone;- if (opt_doc) clone = wrap(originalImportNode.call(opt_doc, unsafeUnwrap(node), false)); else clone = wrap(originalCloneNode.call(unsafeUnwrap(node), false));- if (deep) {- for (var child = node.firstChild; child; child = child.nextSibling) {- clone.appendChild(cloneNode(child, true, opt_doc));- }- if (node instanceof wrappers.HTMLTemplateElement) {- var cloneContent = clone.content;- for (var child = node.content.firstChild; child; child = child.nextSibling) {- cloneContent.appendChild(cloneNode(child, true, opt_doc));- }- }- }- return clone;- }- function contains(self, child) {- if (!child || getTreeScope(self) !== getTreeScope(child)) return false;- for (var node = child; node; node = node.parentNode) {- if (node === self) return true;- }- return false;- }- var OriginalNode = window.Node;- function Node(original) {- assert(original instanceof OriginalNode);- EventTarget.call(this, original);- this.parentNode_ = undefined;- this.firstChild_ = undefined;- this.lastChild_ = undefined;- this.nextSibling_ = undefined;- this.previousSibling_ = undefined;- this.treeScope_ = undefined;- }- var OriginalDocumentFragment = window.DocumentFragment;- var originalAppendChild = OriginalNode.prototype.appendChild;- var originalCompareDocumentPosition = OriginalNode.prototype.compareDocumentPosition;- var originalIsEqualNode = OriginalNode.prototype.isEqualNode;- var originalInsertBefore = OriginalNode.prototype.insertBefore;- var originalRemoveChild = OriginalNode.prototype.removeChild;- var originalReplaceChild = OriginalNode.prototype.replaceChild;- var isIEOrEdge = /Trident|Edge/.test(navigator.userAgent);- var removeChildOriginalHelper = isIEOrEdge ? function(parent, child) {- try {- originalRemoveChild.call(parent, child);- } catch (ex) {- if (!(parent instanceof OriginalDocumentFragment)) throw ex;- }- } : function(parent, child) {- originalRemoveChild.call(parent, child);- };- Node.prototype = Object.create(EventTarget.prototype);- mixin(Node.prototype, {- appendChild: function(childWrapper) {- return this.insertBefore(childWrapper, null);- },- insertBefore: function(childWrapper, refWrapper) {- assertIsNodeWrapper(childWrapper);- var refNode;- if (refWrapper) {- if (isWrapper(refWrapper)) {- refNode = unwrap(refWrapper);- } else {- refNode = refWrapper;- refWrapper = wrap(refNode);- }- } else {- refWrapper = null;- refNode = null;- }- refWrapper && assert(refWrapper.parentNode === this);- var nodes;- var previousNode = refWrapper ? refWrapper.previousSibling : this.lastChild;- var useNative = !this.invalidateShadowRenderer() && !invalidateParent(childWrapper);- if (useNative) nodes = collectNodesNative(childWrapper); else nodes = collectNodes(childWrapper, this, previousNode, refWrapper);- if (useNative) {- ensureSameOwnerDocument(this, childWrapper);- clearChildNodes(this);- originalInsertBefore.call(unsafeUnwrap(this), unwrap(childWrapper), refNode);- } else {- if (!previousNode) this.firstChild_ = nodes[0];- if (!refWrapper) {- this.lastChild_ = nodes[nodes.length - 1];- if (this.firstChild_ === undefined) this.firstChild_ = this.firstChild;- }- var parentNode = refNode ? refNode.parentNode : unsafeUnwrap(this);- if (parentNode) {- originalInsertBefore.call(parentNode, unwrapNodesForInsertion(this, nodes), refNode);- } else {- adoptNodesIfNeeded(this, nodes);- }- }- enqueueMutation(this, "childList", {- addedNodes: nodes,- nextSibling: refWrapper,- previousSibling: previousNode- });- nodesWereAdded(nodes, this);- return childWrapper;- },- removeChild: function(childWrapper) {- assertIsNodeWrapper(childWrapper);- if (childWrapper.parentNode !== this) {- var found = false;- var childNodes = this.childNodes;- for (var ieChild = this.firstChild; ieChild; ieChild = ieChild.nextSibling) {- if (ieChild === childWrapper) {- found = true;- break;- }- }- if (!found) {- throw new Error("NotFoundError");- }- }- var childNode = unwrap(childWrapper);- var childWrapperNextSibling = childWrapper.nextSibling;- var childWrapperPreviousSibling = childWrapper.previousSibling;- if (this.invalidateShadowRenderer()) {- var thisFirstChild = this.firstChild;- var thisLastChild = this.lastChild;- var parentNode = childNode.parentNode;- if (parentNode) removeChildOriginalHelper(parentNode, childNode);- if (thisFirstChild === childWrapper) this.firstChild_ = childWrapperNextSibling;- if (thisLastChild === childWrapper) this.lastChild_ = childWrapperPreviousSibling;- if (childWrapperPreviousSibling) childWrapperPreviousSibling.nextSibling_ = childWrapperNextSibling;- if (childWrapperNextSibling) {- childWrapperNextSibling.previousSibling_ = childWrapperPreviousSibling;- }- childWrapper.previousSibling_ = childWrapper.nextSibling_ = childWrapper.parentNode_ = undefined;- } else {- clearChildNodes(this);- removeChildOriginalHelper(unsafeUnwrap(this), childNode);- }- if (!surpressMutations) {- enqueueMutation(this, "childList", {- removedNodes: createOneElementNodeList(childWrapper),- nextSibling: childWrapperNextSibling,- previousSibling: childWrapperPreviousSibling- });- }- registerTransientObservers(this, childWrapper);- return childWrapper;- },- replaceChild: function(newChildWrapper, oldChildWrapper) {- assertIsNodeWrapper(newChildWrapper);- var oldChildNode;- if (isWrapper(oldChildWrapper)) {- oldChildNode = unwrap(oldChildWrapper);- } else {- oldChildNode = oldChildWrapper;- oldChildWrapper = wrap(oldChildNode);- }- if (oldChildWrapper.parentNode !== this) {- throw new Error("NotFoundError");- }- var nextNode = oldChildWrapper.nextSibling;- var previousNode = oldChildWrapper.previousSibling;- var nodes;- var useNative = !this.invalidateShadowRenderer() && !invalidateParent(newChildWrapper);- if (useNative) {- nodes = collectNodesNative(newChildWrapper);- } else {- if (nextNode === newChildWrapper) nextNode = newChildWrapper.nextSibling;- nodes = collectNodes(newChildWrapper, this, previousNode, nextNode);- }- if (!useNative) {- if (this.firstChild === oldChildWrapper) this.firstChild_ = nodes[0];- if (this.lastChild === oldChildWrapper) this.lastChild_ = nodes[nodes.length - 1];- oldChildWrapper.previousSibling_ = oldChildWrapper.nextSibling_ = oldChildWrapper.parentNode_ = undefined;- if (oldChildNode.parentNode) {- originalReplaceChild.call(oldChildNode.parentNode, unwrapNodesForInsertion(this, nodes), oldChildNode);- }- } else {- ensureSameOwnerDocument(this, newChildWrapper);- clearChildNodes(this);- originalReplaceChild.call(unsafeUnwrap(this), unwrap(newChildWrapper), oldChildNode);- }- enqueueMutation(this, "childList", {- addedNodes: nodes,- removedNodes: createOneElementNodeList(oldChildWrapper),- nextSibling: nextNode,- previousSibling: previousNode- });- nodeWasRemoved(oldChildWrapper);- nodesWereAdded(nodes, this);- return oldChildWrapper;- },- nodeIsInserted_: function() {- for (var child = this.firstChild; child; child = child.nextSibling) {- child.nodeIsInserted_();- }- },- hasChildNodes: function() {- return this.firstChild !== null;- },- get parentNode() {- return this.parentNode_ !== undefined ? this.parentNode_ : wrap(unsafeUnwrap(this).parentNode);- },- get firstChild() {- return this.firstChild_ !== undefined ? this.firstChild_ : wrap(unsafeUnwrap(this).firstChild);- },- get lastChild() {- return this.lastChild_ !== undefined ? this.lastChild_ : wrap(unsafeUnwrap(this).lastChild);- },- get nextSibling() {- return this.nextSibling_ !== undefined ? this.nextSibling_ : wrap(unsafeUnwrap(this).nextSibling);- },- get previousSibling() {- return this.previousSibling_ !== undefined ? this.previousSibling_ : wrap(unsafeUnwrap(this).previousSibling);- },- get parentElement() {- var p = this.parentNode;- while (p && p.nodeType !== Node.ELEMENT_NODE) {- p = p.parentNode;- }- return p;- },- get textContent() {- var s = "";- for (var child = this.firstChild; child; child = child.nextSibling) {- if (child.nodeType != Node.COMMENT_NODE) {- s += child.textContent;- }- }- return s;- },- set textContent(textContent) {- if (textContent == null) textContent = "";- var removedNodes = snapshotNodeList(this.childNodes);- if (this.invalidateShadowRenderer()) {- removeAllChildNodes(this);- if (textContent !== "") {- var textNode = unsafeUnwrap(this).ownerDocument.createTextNode(textContent);- this.appendChild(textNode);- }- } else {- clearChildNodes(this);- unsafeUnwrap(this).textContent = textContent;- }- var addedNodes = snapshotNodeList(this.childNodes);- enqueueMutation(this, "childList", {- addedNodes: addedNodes,- removedNodes: removedNodes- });- nodesWereRemoved(removedNodes);- nodesWereAdded(addedNodes, this);- },- get childNodes() {- var wrapperList = new NodeList();- var i = 0;- for (var child = this.firstChild; child; child = child.nextSibling) {- wrapperList[i++] = child;- }- wrapperList.length = i;- return wrapperList;- },- cloneNode: function(deep) {- return cloneNode(this, deep);- },- contains: function(child) {- return contains(this, wrapIfNeeded(child));- },- compareDocumentPosition: function(otherNode) {- return originalCompareDocumentPosition.call(unsafeUnwrap(this), unwrapIfNeeded(otherNode));- },- isEqualNode: function(otherNode) {- return originalIsEqualNode.call(unsafeUnwrap(this), unwrapIfNeeded(otherNode));- },- normalize: function() {- var nodes = snapshotNodeList(this.childNodes);- var remNodes = [];- var s = "";- var modNode;- for (var i = 0, n; i < nodes.length; i++) {- n = nodes[i];- if (n.nodeType === Node.TEXT_NODE) {- if (!modNode && !n.data.length) this.removeChild(n); else if (!modNode) modNode = n; else {- s += n.data;- remNodes.push(n);- }- } else {- if (modNode && remNodes.length) {- modNode.data += s;- cleanupNodes(remNodes);- }- remNodes = [];- s = "";- modNode = null;- if (n.childNodes.length) n.normalize();- }- }- if (modNode && remNodes.length) {- modNode.data += s;- cleanupNodes(remNodes);- }- }- });- defineWrapGetter(Node, "ownerDocument");- registerWrapper(OriginalNode, Node, document.createDocumentFragment());- delete Node.prototype.querySelector;- delete Node.prototype.querySelectorAll;- Node.prototype = mixin(Object.create(EventTarget.prototype), Node.prototype);- scope.cloneNode = cloneNode;- scope.nodeWasAdded = nodeWasAdded;- scope.nodeWasRemoved = nodeWasRemoved;- scope.nodesWereAdded = nodesWereAdded;- scope.nodesWereRemoved = nodesWereRemoved;- scope.originalInsertBefore = originalInsertBefore;- scope.originalRemoveChild = originalRemoveChild;- scope.snapshotNodeList = snapshotNodeList;- scope.wrappers.Node = Node;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var HTMLCollection = scope.wrappers.HTMLCollection;- var NodeList = scope.wrappers.NodeList;- var getTreeScope = scope.getTreeScope;- var unsafeUnwrap = scope.unsafeUnwrap;- var wrap = scope.wrap;- var originalDocumentQuerySelector = document.querySelector;- var originalElementQuerySelector = document.documentElement.querySelector;- var originalDocumentQuerySelectorAll = document.querySelectorAll;- var originalElementQuerySelectorAll = document.documentElement.querySelectorAll;- var originalDocumentGetElementsByTagName = document.getElementsByTagName;- var originalElementGetElementsByTagName = document.documentElement.getElementsByTagName;- var originalDocumentGetElementsByTagNameNS = document.getElementsByTagNameNS;- var originalElementGetElementsByTagNameNS = document.documentElement.getElementsByTagNameNS;- var OriginalElement = window.Element;- var OriginalDocument = window.HTMLDocument || window.Document;- function filterNodeList(list, index, result, deep) {- var wrappedItem = null;- var root = null;- for (var i = 0, length = list.length; i < length; i++) {- wrappedItem = wrap(list[i]);- if (!deep && (root = getTreeScope(wrappedItem).root)) {- if (root instanceof scope.wrappers.ShadowRoot) {- continue;- }- }- result[index++] = wrappedItem;- }- return index;- }- function shimSelector(selector) {- return String(selector).replace(/\/deep\/|::shadow|>>>/g, " ");- }- function shimMatchesSelector(selector) {- return String(selector).replace(/:host\(([^\s]+)\)/g, "$1").replace(/([^\s]):host/g, "$1").replace(":host", "*").replace(/\^|\/shadow\/|\/shadow-deep\/|::shadow|\/deep\/|::content|>>>/g, " ");- }- function findOne(node, selector) {- var m, el = node.firstElementChild;- while (el) {- if (el.matches(selector)) return el;- m = findOne(el, selector);- if (m) return m;- el = el.nextElementSibling;- }- return null;- }- function matchesSelector(el, selector) {- return el.matches(selector);- }- var XHTML_NS = "http://www.w3.org/1999/xhtml";- function matchesTagName(el, localName, localNameLowerCase) {- var ln = el.localName;- return ln === localName || ln === localNameLowerCase && el.namespaceURI === XHTML_NS;- }- function matchesEveryThing() {- return true;- }- function matchesLocalNameOnly(el, ns, localName) {- return el.localName === localName;- }- function matchesNameSpace(el, ns) {- return el.namespaceURI === ns;- }- function matchesLocalNameNS(el, ns, localName) {- return el.namespaceURI === ns && el.localName === localName;- }- function findElements(node, index, result, p, arg0, arg1) {- var el = node.firstElementChild;- while (el) {- if (p(el, arg0, arg1)) result[index++] = el;- index = findElements(el, index, result, p, arg0, arg1);- el = el.nextElementSibling;- }- return index;- }- function querySelectorAllFiltered(p, index, result, selector, deep) {- var target = unsafeUnwrap(this);- var list;- var root = getTreeScope(this).root;- if (root instanceof scope.wrappers.ShadowRoot) {- return findElements(this, index, result, p, selector, null);- } else if (target instanceof OriginalElement) {- list = originalElementQuerySelectorAll.call(target, selector);- } else if (target instanceof OriginalDocument) {- list = originalDocumentQuerySelectorAll.call(target, selector);- } else {- return findElements(this, index, result, p, selector, null);- }- return filterNodeList(list, index, result, deep);- }- var SelectorsInterface = {- querySelector: function(selector) {- var shimmed = shimSelector(selector);- var deep = shimmed !== selector;- selector = shimmed;- var target = unsafeUnwrap(this);- var wrappedItem;- var root = getTreeScope(this).root;- if (root instanceof scope.wrappers.ShadowRoot) {- return findOne(this, selector);- } else if (target instanceof OriginalElement) {- wrappedItem = wrap(originalElementQuerySelector.call(target, selector));- } else if (target instanceof OriginalDocument) {- wrappedItem = wrap(originalDocumentQuerySelector.call(target, selector));- } else {- return findOne(this, selector);- }- if (!wrappedItem) {- return wrappedItem;- } else if (!deep && (root = getTreeScope(wrappedItem).root)) {- if (root instanceof scope.wrappers.ShadowRoot) {- return findOne(this, selector);- }- }- return wrappedItem;- },- querySelectorAll: function(selector) {- var shimmed = shimSelector(selector);- var deep = shimmed !== selector;- selector = shimmed;- var result = new NodeList();- result.length = querySelectorAllFiltered.call(this, matchesSelector, 0, result, selector, deep);- return result;- }- };- var MatchesInterface = {- matches: function(selector) {- selector = shimMatchesSelector(selector);- return scope.originalMatches.call(unsafeUnwrap(this), selector);- }- };- function getElementsByTagNameFiltered(p, index, result, localName, lowercase) {- var target = unsafeUnwrap(this);- var list;- var root = getTreeScope(this).root;- if (root instanceof scope.wrappers.ShadowRoot) {- return findElements(this, index, result, p, localName, lowercase);- } else if (target instanceof OriginalElement) {- list = originalElementGetElementsByTagName.call(target, localName, lowercase);- } else if (target instanceof OriginalDocument) {- list = originalDocumentGetElementsByTagName.call(target, localName, lowercase);- } else {- return findElements(this, index, result, p, localName, lowercase);- }- return filterNodeList(list, index, result, false);- }- function getElementsByTagNameNSFiltered(p, index, result, ns, localName) {- var target = unsafeUnwrap(this);- var list;- var root = getTreeScope(this).root;- if (root instanceof scope.wrappers.ShadowRoot) {- return findElements(this, index, result, p, ns, localName);- } else if (target instanceof OriginalElement) {- list = originalElementGetElementsByTagNameNS.call(target, ns, localName);- } else if (target instanceof OriginalDocument) {- list = originalDocumentGetElementsByTagNameNS.call(target, ns, localName);- } else {- return findElements(this, index, result, p, ns, localName);- }- return filterNodeList(list, index, result, false);- }- var GetElementsByInterface = {- getElementsByTagName: function(localName) {- var result = new HTMLCollection();- var match = localName === "*" ? matchesEveryThing : matchesTagName;- result.length = getElementsByTagNameFiltered.call(this, match, 0, result, localName, localName.toLowerCase());- return result;- },- getElementsByClassName: function(className) {- return this.querySelectorAll("." + className);- },- getElementsByTagNameNS: function(ns, localName) {- var result = new HTMLCollection();- var match = null;- if (ns === "*") {- match = localName === "*" ? matchesEveryThing : matchesLocalNameOnly;- } else {- match = localName === "*" ? matchesNameSpace : matchesLocalNameNS;- }- result.length = getElementsByTagNameNSFiltered.call(this, match, 0, result, ns || null, localName);- return result;- }- };- scope.GetElementsByInterface = GetElementsByInterface;- scope.SelectorsInterface = SelectorsInterface;- scope.MatchesInterface = MatchesInterface;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var NodeList = scope.wrappers.NodeList;- function forwardElement(node) {- while (node && node.nodeType !== Node.ELEMENT_NODE) {- node = node.nextSibling;- }- return node;- }- function backwardsElement(node) {- while (node && node.nodeType !== Node.ELEMENT_NODE) {- node = node.previousSibling;- }- return node;- }- var ParentNodeInterface = {- get firstElementChild() {- return forwardElement(this.firstChild);- },- get lastElementChild() {- return backwardsElement(this.lastChild);- },- get childElementCount() {- var count = 0;- for (var child = this.firstElementChild; child; child = child.nextElementSibling) {- count++;- }- return count;- },- get children() {- var wrapperList = new NodeList();- var i = 0;- for (var child = this.firstElementChild; child; child = child.nextElementSibling) {- wrapperList[i++] = child;- }- wrapperList.length = i;- return wrapperList;- },- remove: function() {- var p = this.parentNode;- if (p) p.removeChild(this);- }- };- var ChildNodeInterface = {- get nextElementSibling() {- return forwardElement(this.nextSibling);- },- get previousElementSibling() {- return backwardsElement(this.previousSibling);- }- };- var NonElementParentNodeInterface = {- getElementById: function(id) {- if (/[ \t\n\r\f]/.test(id)) return null;- return this.querySelector('[id="' + id + '"]');- }- };- scope.ChildNodeInterface = ChildNodeInterface;- scope.NonElementParentNodeInterface = NonElementParentNodeInterface;- scope.ParentNodeInterface = ParentNodeInterface;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var ChildNodeInterface = scope.ChildNodeInterface;- var Node = scope.wrappers.Node;- var enqueueMutation = scope.enqueueMutation;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var unsafeUnwrap = scope.unsafeUnwrap;- var OriginalCharacterData = window.CharacterData;- function CharacterData(node) {- Node.call(this, node);- }- CharacterData.prototype = Object.create(Node.prototype);- mixin(CharacterData.prototype, {- get nodeValue() {- return this.data;- },- set nodeValue(data) {- this.data = data;- },- get textContent() {- return this.data;- },- set textContent(value) {- this.data = value;- },- get data() {- return unsafeUnwrap(this).data;- },- set data(value) {- var oldValue = unsafeUnwrap(this).data;- enqueueMutation(this, "characterData", {- oldValue: oldValue- });- unsafeUnwrap(this).data = value;- }- });- mixin(CharacterData.prototype, ChildNodeInterface);- registerWrapper(OriginalCharacterData, CharacterData, document.createTextNode(""));- scope.wrappers.CharacterData = CharacterData;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var CharacterData = scope.wrappers.CharacterData;- var enqueueMutation = scope.enqueueMutation;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- function toUInt32(x) {- return x >>> 0;- }- var OriginalText = window.Text;- function Text(node) {- CharacterData.call(this, node);- }- Text.prototype = Object.create(CharacterData.prototype);- mixin(Text.prototype, {- splitText: function(offset) {- offset = toUInt32(offset);- var s = this.data;- if (offset > s.length) throw new Error("IndexSizeError");- var head = s.slice(0, offset);- var tail = s.slice(offset);- this.data = head;- var newTextNode = this.ownerDocument.createTextNode(tail);- if (this.parentNode) this.parentNode.insertBefore(newTextNode, this.nextSibling);- return newTextNode;- }- });- registerWrapper(OriginalText, Text, document.createTextNode(""));- scope.wrappers.Text = Text;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- if (!window.DOMTokenList) {- console.warn("Missing DOMTokenList prototype, please include a " + "compatible classList polyfill such as http://goo.gl/uTcepH.");- return;- }- var unsafeUnwrap = scope.unsafeUnwrap;- var enqueueMutation = scope.enqueueMutation;- function getClass(el) {- return unsafeUnwrap(el).getAttribute("class");- }- function enqueueClassAttributeChange(el, oldValue) {- enqueueMutation(el, "attributes", {- name: "class",- namespace: null,- oldValue: oldValue- });- }- function invalidateClass(el) {- scope.invalidateRendererBasedOnAttribute(el, "class");- }- function changeClass(tokenList, method, args) {- var ownerElement = tokenList.ownerElement_;- if (ownerElement == null) {- return method.apply(tokenList, args);- }- var oldValue = getClass(ownerElement);- var retv = method.apply(tokenList, args);- if (getClass(ownerElement) !== oldValue) {- enqueueClassAttributeChange(ownerElement, oldValue);- invalidateClass(ownerElement);- }- return retv;- }- var oldAdd = DOMTokenList.prototype.add;- DOMTokenList.prototype.add = function() {- changeClass(this, oldAdd, arguments);- };- var oldRemove = DOMTokenList.prototype.remove;- DOMTokenList.prototype.remove = function() {- changeClass(this, oldRemove, arguments);- };- var oldToggle = DOMTokenList.prototype.toggle;- DOMTokenList.prototype.toggle = function() {- return changeClass(this, oldToggle, arguments);- };- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var ChildNodeInterface = scope.ChildNodeInterface;- var GetElementsByInterface = scope.GetElementsByInterface;- var Node = scope.wrappers.Node;- var ParentNodeInterface = scope.ParentNodeInterface;- var SelectorsInterface = scope.SelectorsInterface;- var MatchesInterface = scope.MatchesInterface;- var addWrapNodeListMethod = scope.addWrapNodeListMethod;- var enqueueMutation = scope.enqueueMutation;- var mixin = scope.mixin;- var oneOf = scope.oneOf;- var registerWrapper = scope.registerWrapper;- var unsafeUnwrap = scope.unsafeUnwrap;- var wrappers = scope.wrappers;- var OriginalElement = window.Element;- var matchesNames = [ "matches", "mozMatchesSelector", "msMatchesSelector", "webkitMatchesSelector" ].filter(function(name) {- return OriginalElement.prototype[name];- });- var matchesName = matchesNames[0];- var originalMatches = OriginalElement.prototype[matchesName];- function invalidateRendererBasedOnAttribute(element, name) {- var p = element.parentNode;- if (!p || !p.shadowRoot) return;- var renderer = scope.getRendererForHost(p);- if (renderer.dependsOnAttribute(name)) renderer.invalidate();- }- function enqueAttributeChange(element, name, oldValue) {- enqueueMutation(element, "attributes", {- name: name,- namespace: null,- oldValue: oldValue- });- }- var classListTable = new WeakMap();- function Element(node) {- Node.call(this, node);- }- Element.prototype = Object.create(Node.prototype);- mixin(Element.prototype, {- createShadowRoot: function() {- var newShadowRoot = new wrappers.ShadowRoot(this);- unsafeUnwrap(this).polymerShadowRoot_ = newShadowRoot;- var renderer = scope.getRendererForHost(this);- renderer.invalidate();- return newShadowRoot;- },- get shadowRoot() {- return unsafeUnwrap(this).polymerShadowRoot_ || null;- },- setAttribute: function(name, value) {- var oldValue = unsafeUnwrap(this).getAttribute(name);- unsafeUnwrap(this).setAttribute(name, value);- enqueAttributeChange(this, name, oldValue);- invalidateRendererBasedOnAttribute(this, name);- },- removeAttribute: function(name) {- var oldValue = unsafeUnwrap(this).getAttribute(name);- unsafeUnwrap(this).removeAttribute(name);- enqueAttributeChange(this, name, oldValue);- invalidateRendererBasedOnAttribute(this, name);- },- get classList() {- var list = classListTable.get(this);- if (!list) {- list = unsafeUnwrap(this).classList;- if (!list) return;- list.ownerElement_ = this;- classListTable.set(this, list);- }- return list;- },- get className() {- return unsafeUnwrap(this).className;- },- set className(v) {- this.setAttribute("class", v);- },- get id() {- return unsafeUnwrap(this).id;- },- set id(v) {- this.setAttribute("id", v);- }- });- matchesNames.forEach(function(name) {- if (name !== "matches") {- Element.prototype[name] = function(selector) {- return this.matches(selector);- };- }- });- if (OriginalElement.prototype.webkitCreateShadowRoot) {- Element.prototype.webkitCreateShadowRoot = Element.prototype.createShadowRoot;- }- mixin(Element.prototype, ChildNodeInterface);- mixin(Element.prototype, GetElementsByInterface);- mixin(Element.prototype, ParentNodeInterface);- mixin(Element.prototype, SelectorsInterface);- mixin(Element.prototype, MatchesInterface);- registerWrapper(OriginalElement, Element, document.createElementNS(null, "x"));- scope.invalidateRendererBasedOnAttribute = invalidateRendererBasedOnAttribute;- scope.matchesNames = matchesNames;- scope.originalMatches = originalMatches;- scope.wrappers.Element = Element;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var Element = scope.wrappers.Element;- var defineGetter = scope.defineGetter;- var enqueueMutation = scope.enqueueMutation;- var mixin = scope.mixin;- var nodesWereAdded = scope.nodesWereAdded;- var nodesWereRemoved = scope.nodesWereRemoved;- var registerWrapper = scope.registerWrapper;- var snapshotNodeList = scope.snapshotNodeList;- var unsafeUnwrap = scope.unsafeUnwrap;- var unwrap = scope.unwrap;- var wrap = scope.wrap;- var wrappers = scope.wrappers;- var escapeAttrRegExp = /[&\u00A0"]/g;- var escapeDataRegExp = /[&\u00A0<>]/g;- function escapeReplace(c) {- switch (c) {- case "&":- return "&";-- case "<":- return "<";-- case ">":- return ">";-- case '"':- return """;-- case " ":- return " ";- }- }- function escapeAttr(s) {- return s.replace(escapeAttrRegExp, escapeReplace);- }- function escapeData(s) {- return s.replace(escapeDataRegExp, escapeReplace);- }- function makeSet(arr) {- var set = {};- for (var i = 0; i < arr.length; i++) {- set[arr[i]] = true;- }- return set;- }- var voidElements = makeSet([ "area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr" ]);- var plaintextParents = makeSet([ "style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript" ]);- var XHTML_NS = "http://www.w3.org/1999/xhtml";- function needsSelfClosingSlash(node) {- if (node.namespaceURI !== XHTML_NS) return true;- var doctype = node.ownerDocument.doctype;- return doctype && doctype.publicId && doctype.systemId;- }- function getOuterHTML(node, parentNode) {- switch (node.nodeType) {- case Node.ELEMENT_NODE:- var tagName = node.tagName.toLowerCase();- var s = "<" + tagName;- var attrs = node.attributes;- for (var i = 0, attr; attr = attrs[i]; i++) {- s += " " + attr.name + '="' + escapeAttr(attr.value) + '"';- }- if (voidElements[tagName]) {- if (needsSelfClosingSlash(node)) s += "/";- return s + ">";- }- return s + ">" + getInnerHTML(node) + "</" + tagName + ">";-- case Node.TEXT_NODE:- var data = node.data;- if (parentNode && plaintextParents[parentNode.localName]) return data;- return escapeData(data);-- case Node.COMMENT_NODE:- return "<!--" + node.data + "-->";-- default:- console.error(node);- throw new Error("not implemented");- }- }- function getInnerHTML(node) {- if (node instanceof wrappers.HTMLTemplateElement) node = node.content;- var s = "";- for (var child = node.firstChild; child; child = child.nextSibling) {- s += getOuterHTML(child, node);- }- return s;- }- function setInnerHTML(node, value, opt_tagName) {- var tagName = opt_tagName || "div";- node.textContent = "";- var tempElement = unwrap(node.ownerDocument.createElement(tagName));- tempElement.innerHTML = value;- var firstChild;- while (firstChild = tempElement.firstChild) {- node.appendChild(wrap(firstChild));- }- }- var oldIe = /MSIE/.test(navigator.userAgent);- var OriginalHTMLElement = window.HTMLElement;- var OriginalHTMLTemplateElement = window.HTMLTemplateElement;- function HTMLElement(node) {- Element.call(this, node);- }- HTMLElement.prototype = Object.create(Element.prototype);- mixin(HTMLElement.prototype, {- get innerHTML() {- return getInnerHTML(this);- },- set innerHTML(value) {- if (oldIe && plaintextParents[this.localName]) {- this.textContent = value;- return;- }- var removedNodes = snapshotNodeList(this.childNodes);- if (this.invalidateShadowRenderer()) {- if (this instanceof wrappers.HTMLTemplateElement) setInnerHTML(this.content, value); else setInnerHTML(this, value, this.tagName);- } else if (!OriginalHTMLTemplateElement && this instanceof wrappers.HTMLTemplateElement) {- setInnerHTML(this.content, value);- } else {- unsafeUnwrap(this).innerHTML = value;- }- var addedNodes = snapshotNodeList(this.childNodes);- enqueueMutation(this, "childList", {- addedNodes: addedNodes,- removedNodes: removedNodes- });- nodesWereRemoved(removedNodes);- nodesWereAdded(addedNodes, this);- },- get outerHTML() {- return getOuterHTML(this, this.parentNode);- },- set outerHTML(value) {- var p = this.parentNode;- if (p) {- p.invalidateShadowRenderer();- var df = frag(p, value);- p.replaceChild(df, this);- }- },- insertAdjacentHTML: function(position, text) {- var contextElement, refNode;- switch (String(position).toLowerCase()) {- case "beforebegin":- contextElement = this.parentNode;- refNode = this;- break;-- case "afterend":- contextElement = this.parentNode;- refNode = this.nextSibling;- break;-- case "afterbegin":- contextElement = this;- refNode = this.firstChild;- break;-- case "beforeend":- contextElement = this;- refNode = null;- break;-- default:- return;- }- var df = frag(contextElement, text);- contextElement.insertBefore(df, refNode);- },- get hidden() {- return this.hasAttribute("hidden");- },- set hidden(v) {- if (v) {- this.setAttribute("hidden", "");- } else {- this.removeAttribute("hidden");- }- }- });- function frag(contextElement, html) {- var p = unwrap(contextElement.cloneNode(false));- p.innerHTML = html;- var df = unwrap(document.createDocumentFragment());- var c;- while (c = p.firstChild) {- df.appendChild(c);- }- return wrap(df);- }- function getter(name) {- return function() {- scope.renderAllPending();- return unsafeUnwrap(this)[name];- };- }- function getterRequiresRendering(name) {- defineGetter(HTMLElement, name, getter(name));- }- [ "clientHeight", "clientLeft", "clientTop", "clientWidth", "offsetHeight", "offsetLeft", "offsetTop", "offsetWidth", "scrollHeight", "scrollWidth" ].forEach(getterRequiresRendering);- function getterAndSetterRequiresRendering(name) {- Object.defineProperty(HTMLElement.prototype, name, {- get: getter(name),- set: function(v) {- scope.renderAllPending();- unsafeUnwrap(this)[name] = v;- },- configurable: true,- enumerable: true- });- }- [ "scrollLeft", "scrollTop" ].forEach(getterAndSetterRequiresRendering);- function methodRequiresRendering(name) {- Object.defineProperty(HTMLElement.prototype, name, {- value: function() {- scope.renderAllPending();- return unsafeUnwrap(this)[name].apply(unsafeUnwrap(this), arguments);- },- configurable: true,- enumerable: true- });- }- [ "focus", "getBoundingClientRect", "getClientRects", "scrollIntoView" ].forEach(methodRequiresRendering);- registerWrapper(OriginalHTMLElement, HTMLElement, document.createElement("b"));- scope.wrappers.HTMLElement = HTMLElement;- scope.getInnerHTML = getInnerHTML;- scope.setInnerHTML = setInnerHTML;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var HTMLElement = scope.wrappers.HTMLElement;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var unsafeUnwrap = scope.unsafeUnwrap;- var wrap = scope.wrap;- var OriginalHTMLCanvasElement = window.HTMLCanvasElement;- function HTMLCanvasElement(node) {- HTMLElement.call(this, node);- }- HTMLCanvasElement.prototype = Object.create(HTMLElement.prototype);- mixin(HTMLCanvasElement.prototype, {- getContext: function() {- var context = unsafeUnwrap(this).getContext.apply(unsafeUnwrap(this), arguments);- return context && wrap(context);- }- });- registerWrapper(OriginalHTMLCanvasElement, HTMLCanvasElement, document.createElement("canvas"));- scope.wrappers.HTMLCanvasElement = HTMLCanvasElement;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var HTMLElement = scope.wrappers.HTMLElement;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var OriginalHTMLContentElement = window.HTMLContentElement;- function HTMLContentElement(node) {- HTMLElement.call(this, node);- }- HTMLContentElement.prototype = Object.create(HTMLElement.prototype);- mixin(HTMLContentElement.prototype, {- constructor: HTMLContentElement,- get select() {- return this.getAttribute("select");- },- set select(value) {- this.setAttribute("select", value);- },- setAttribute: function(n, v) {- HTMLElement.prototype.setAttribute.call(this, n, v);- if (String(n).toLowerCase() === "select") this.invalidateShadowRenderer(true);- }- });- if (OriginalHTMLContentElement) registerWrapper(OriginalHTMLContentElement, HTMLContentElement);- scope.wrappers.HTMLContentElement = HTMLContentElement;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var HTMLElement = scope.wrappers.HTMLElement;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var wrapHTMLCollection = scope.wrapHTMLCollection;- var unwrap = scope.unwrap;- var OriginalHTMLFormElement = window.HTMLFormElement;- function HTMLFormElement(node) {- HTMLElement.call(this, node);- }- HTMLFormElement.prototype = Object.create(HTMLElement.prototype);- mixin(HTMLFormElement.prototype, {- get elements() {- return wrapHTMLCollection(unwrap(this).elements);- }- });- registerWrapper(OriginalHTMLFormElement, HTMLFormElement, document.createElement("form"));- scope.wrappers.HTMLFormElement = HTMLFormElement;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var HTMLElement = scope.wrappers.HTMLElement;- var registerWrapper = scope.registerWrapper;- var unwrap = scope.unwrap;- var rewrap = scope.rewrap;- var OriginalHTMLImageElement = window.HTMLImageElement;- function HTMLImageElement(node) {- HTMLElement.call(this, node);- }- HTMLImageElement.prototype = Object.create(HTMLElement.prototype);- registerWrapper(OriginalHTMLImageElement, HTMLImageElement, document.createElement("img"));- function Image(width, height) {- if (!(this instanceof Image)) {- throw new TypeError("DOM object constructor cannot be called as a function.");- }- var node = unwrap(document.createElement("img"));- HTMLElement.call(this, node);- rewrap(node, this);- if (width !== undefined) node.width = width;- if (height !== undefined) node.height = height;- }- Image.prototype = HTMLImageElement.prototype;- scope.wrappers.HTMLImageElement = HTMLImageElement;- scope.wrappers.Image = Image;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var HTMLElement = scope.wrappers.HTMLElement;- var mixin = scope.mixin;- var NodeList = scope.wrappers.NodeList;- var registerWrapper = scope.registerWrapper;- var OriginalHTMLShadowElement = window.HTMLShadowElement;- function HTMLShadowElement(node) {- HTMLElement.call(this, node);- }- HTMLShadowElement.prototype = Object.create(HTMLElement.prototype);- HTMLShadowElement.prototype.constructor = HTMLShadowElement;- if (OriginalHTMLShadowElement) registerWrapper(OriginalHTMLShadowElement, HTMLShadowElement);- scope.wrappers.HTMLShadowElement = HTMLShadowElement;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var HTMLElement = scope.wrappers.HTMLElement;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var unsafeUnwrap = scope.unsafeUnwrap;- var unwrap = scope.unwrap;- var wrap = scope.wrap;- var contentTable = new WeakMap();- var templateContentsOwnerTable = new WeakMap();- function getTemplateContentsOwner(doc) {- if (!doc.defaultView) return doc;- var d = templateContentsOwnerTable.get(doc);- if (!d) {- d = doc.implementation.createHTMLDocument("");- while (d.lastChild) {- d.removeChild(d.lastChild);- }- templateContentsOwnerTable.set(doc, d);- }- return d;- }- function extractContent(templateElement) {- var doc = getTemplateContentsOwner(templateElement.ownerDocument);- var df = unwrap(doc.createDocumentFragment());- var child;- while (child = templateElement.firstChild) {- df.appendChild(child);- }- return df;- }- var OriginalHTMLTemplateElement = window.HTMLTemplateElement;- function HTMLTemplateElement(node) {- HTMLElement.call(this, node);- if (!OriginalHTMLTemplateElement) {- var content = extractContent(node);- contentTable.set(this, wrap(content));- }- }- HTMLTemplateElement.prototype = Object.create(HTMLElement.prototype);- mixin(HTMLTemplateElement.prototype, {- constructor: HTMLTemplateElement,- get content() {- if (OriginalHTMLTemplateElement) return wrap(unsafeUnwrap(this).content);- return contentTable.get(this);- }- });- if (OriginalHTMLTemplateElement) registerWrapper(OriginalHTMLTemplateElement, HTMLTemplateElement);- scope.wrappers.HTMLTemplateElement = HTMLTemplateElement;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var HTMLElement = scope.wrappers.HTMLElement;- var registerWrapper = scope.registerWrapper;- var OriginalHTMLMediaElement = window.HTMLMediaElement;- if (!OriginalHTMLMediaElement) return;- function HTMLMediaElement(node) {- HTMLElement.call(this, node);- }- HTMLMediaElement.prototype = Object.create(HTMLElement.prototype);- registerWrapper(OriginalHTMLMediaElement, HTMLMediaElement, document.createElement("audio"));- scope.wrappers.HTMLMediaElement = HTMLMediaElement;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var HTMLMediaElement = scope.wrappers.HTMLMediaElement;- var registerWrapper = scope.registerWrapper;- var unwrap = scope.unwrap;- var rewrap = scope.rewrap;- var OriginalHTMLAudioElement = window.HTMLAudioElement;- if (!OriginalHTMLAudioElement) return;- function HTMLAudioElement(node) {- HTMLMediaElement.call(this, node);- }- HTMLAudioElement.prototype = Object.create(HTMLMediaElement.prototype);- registerWrapper(OriginalHTMLAudioElement, HTMLAudioElement, document.createElement("audio"));- function Audio(src) {- if (!(this instanceof Audio)) {- throw new TypeError("DOM object constructor cannot be called as a function.");- }- var node = unwrap(document.createElement("audio"));- HTMLMediaElement.call(this, node);- rewrap(node, this);- node.setAttribute("preload", "auto");- if (src !== undefined) node.setAttribute("src", src);- }- Audio.prototype = HTMLAudioElement.prototype;- scope.wrappers.HTMLAudioElement = HTMLAudioElement;- scope.wrappers.Audio = Audio;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var HTMLElement = scope.wrappers.HTMLElement;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var rewrap = scope.rewrap;- var unwrap = scope.unwrap;- var wrap = scope.wrap;- var OriginalHTMLOptionElement = window.HTMLOptionElement;- function trimText(s) {- return s.replace(/\s+/g, " ").trim();- }- function HTMLOptionElement(node) {- HTMLElement.call(this, node);- }- HTMLOptionElement.prototype = Object.create(HTMLElement.prototype);- mixin(HTMLOptionElement.prototype, {- get text() {- return trimText(this.textContent);- },- set text(value) {- this.textContent = trimText(String(value));- },- get form() {- return wrap(unwrap(this).form);- }- });- registerWrapper(OriginalHTMLOptionElement, HTMLOptionElement, document.createElement("option"));- function Option(text, value, defaultSelected, selected) {- if (!(this instanceof Option)) {- throw new TypeError("DOM object constructor cannot be called as a function.");- }- var node = unwrap(document.createElement("option"));- HTMLElement.call(this, node);- rewrap(node, this);- if (text !== undefined) node.text = text;- if (value !== undefined) node.setAttribute("value", value);- if (defaultSelected === true) node.setAttribute("selected", "");- node.selected = selected === true;- }- Option.prototype = HTMLOptionElement.prototype;- scope.wrappers.HTMLOptionElement = HTMLOptionElement;- scope.wrappers.Option = Option;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var HTMLElement = scope.wrappers.HTMLElement;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var unwrap = scope.unwrap;- var wrap = scope.wrap;- var OriginalHTMLSelectElement = window.HTMLSelectElement;- function HTMLSelectElement(node) {- HTMLElement.call(this, node);- }- HTMLSelectElement.prototype = Object.create(HTMLElement.prototype);- mixin(HTMLSelectElement.prototype, {- add: function(element, before) {- if (typeof before === "object") before = unwrap(before);- unwrap(this).add(unwrap(element), before);- },- remove: function(indexOrNode) {- if (indexOrNode === undefined) {- HTMLElement.prototype.remove.call(this);- return;- }- if (typeof indexOrNode === "object") indexOrNode = unwrap(indexOrNode);- unwrap(this).remove(indexOrNode);- },- get form() {- return wrap(unwrap(this).form);- }- });- registerWrapper(OriginalHTMLSelectElement, HTMLSelectElement, document.createElement("select"));- scope.wrappers.HTMLSelectElement = HTMLSelectElement;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var HTMLElement = scope.wrappers.HTMLElement;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var unwrap = scope.unwrap;- var wrap = scope.wrap;- var wrapHTMLCollection = scope.wrapHTMLCollection;- var OriginalHTMLTableElement = window.HTMLTableElement;- function HTMLTableElement(node) {- HTMLElement.call(this, node);- }- HTMLTableElement.prototype = Object.create(HTMLElement.prototype);- mixin(HTMLTableElement.prototype, {- get caption() {- return wrap(unwrap(this).caption);- },- createCaption: function() {- return wrap(unwrap(this).createCaption());- },- get tHead() {- return wrap(unwrap(this).tHead);- },- createTHead: function() {- return wrap(unwrap(this).createTHead());- },- createTFoot: function() {- return wrap(unwrap(this).createTFoot());- },- get tFoot() {- return wrap(unwrap(this).tFoot);- },- get tBodies() {- return wrapHTMLCollection(unwrap(this).tBodies);- },- createTBody: function() {- return wrap(unwrap(this).createTBody());- },- get rows() {- return wrapHTMLCollection(unwrap(this).rows);- },- insertRow: function(index) {- return wrap(unwrap(this).insertRow(index));- }- });- registerWrapper(OriginalHTMLTableElement, HTMLTableElement, document.createElement("table"));- scope.wrappers.HTMLTableElement = HTMLTableElement;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var HTMLElement = scope.wrappers.HTMLElement;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var wrapHTMLCollection = scope.wrapHTMLCollection;- var unwrap = scope.unwrap;- var wrap = scope.wrap;- var OriginalHTMLTableSectionElement = window.HTMLTableSectionElement;- function HTMLTableSectionElement(node) {- HTMLElement.call(this, node);- }- HTMLTableSectionElement.prototype = Object.create(HTMLElement.prototype);- mixin(HTMLTableSectionElement.prototype, {- constructor: HTMLTableSectionElement,- get rows() {- return wrapHTMLCollection(unwrap(this).rows);- },- insertRow: function(index) {- return wrap(unwrap(this).insertRow(index));- }- });- registerWrapper(OriginalHTMLTableSectionElement, HTMLTableSectionElement, document.createElement("thead"));- scope.wrappers.HTMLTableSectionElement = HTMLTableSectionElement;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var HTMLElement = scope.wrappers.HTMLElement;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var wrapHTMLCollection = scope.wrapHTMLCollection;- var unwrap = scope.unwrap;- var wrap = scope.wrap;- var OriginalHTMLTableRowElement = window.HTMLTableRowElement;- function HTMLTableRowElement(node) {- HTMLElement.call(this, node);- }- HTMLTableRowElement.prototype = Object.create(HTMLElement.prototype);- mixin(HTMLTableRowElement.prototype, {- get cells() {- return wrapHTMLCollection(unwrap(this).cells);- },- insertCell: function(index) {- return wrap(unwrap(this).insertCell(index));- }- });- registerWrapper(OriginalHTMLTableRowElement, HTMLTableRowElement, document.createElement("tr"));- scope.wrappers.HTMLTableRowElement = HTMLTableRowElement;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var HTMLContentElement = scope.wrappers.HTMLContentElement;- var HTMLElement = scope.wrappers.HTMLElement;- var HTMLShadowElement = scope.wrappers.HTMLShadowElement;- var HTMLTemplateElement = scope.wrappers.HTMLTemplateElement;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var OriginalHTMLUnknownElement = window.HTMLUnknownElement;- function HTMLUnknownElement(node) {- switch (node.localName) {- case "content":- return new HTMLContentElement(node);-- case "shadow":- return new HTMLShadowElement(node);-- case "template":- return new HTMLTemplateElement(node);- }- HTMLElement.call(this, node);- }- HTMLUnknownElement.prototype = Object.create(HTMLElement.prototype);- registerWrapper(OriginalHTMLUnknownElement, HTMLUnknownElement);- scope.wrappers.HTMLUnknownElement = HTMLUnknownElement;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var Element = scope.wrappers.Element;- var HTMLElement = scope.wrappers.HTMLElement;- var registerWrapper = scope.registerWrapper;- var defineWrapGetter = scope.defineWrapGetter;- var unsafeUnwrap = scope.unsafeUnwrap;- var wrap = scope.wrap;- var mixin = scope.mixin;- var SVG_NS = "http://www.w3.org/2000/svg";- var OriginalSVGElement = window.SVGElement;- var svgTitleElement = document.createElementNS(SVG_NS, "title");- if (!("classList" in svgTitleElement)) {- var descr = Object.getOwnPropertyDescriptor(Element.prototype, "classList");- Object.defineProperty(HTMLElement.prototype, "classList", descr);- delete Element.prototype.classList;- }- function SVGElement(node) {- Element.call(this, node);- }- SVGElement.prototype = Object.create(Element.prototype);- mixin(SVGElement.prototype, {- get ownerSVGElement() {- return wrap(unsafeUnwrap(this).ownerSVGElement);- }- });- registerWrapper(OriginalSVGElement, SVGElement, document.createElementNS(SVG_NS, "title"));- scope.wrappers.SVGElement = SVGElement;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var unwrap = scope.unwrap;- var wrap = scope.wrap;- var OriginalSVGUseElement = window.SVGUseElement;- var SVG_NS = "http://www.w3.org/2000/svg";- var gWrapper = wrap(document.createElementNS(SVG_NS, "g"));- var useElement = document.createElementNS(SVG_NS, "use");- var SVGGElement = gWrapper.constructor;- var parentInterfacePrototype = Object.getPrototypeOf(SVGGElement.prototype);- var parentInterface = parentInterfacePrototype.constructor;- function SVGUseElement(impl) {- parentInterface.call(this, impl);- }- SVGUseElement.prototype = Object.create(parentInterfacePrototype);- if ("instanceRoot" in useElement) {- mixin(SVGUseElement.prototype, {- get instanceRoot() {- return wrap(unwrap(this).instanceRoot);- },- get animatedInstanceRoot() {- return wrap(unwrap(this).animatedInstanceRoot);- }- });- }- registerWrapper(OriginalSVGUseElement, SVGUseElement, useElement);- scope.wrappers.SVGUseElement = SVGUseElement;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var EventTarget = scope.wrappers.EventTarget;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var unsafeUnwrap = scope.unsafeUnwrap;- var wrap = scope.wrap;- var OriginalSVGElementInstance = window.SVGElementInstance;- if (!OriginalSVGElementInstance) return;- function SVGElementInstance(impl) {- EventTarget.call(this, impl);- }- SVGElementInstance.prototype = Object.create(EventTarget.prototype);- mixin(SVGElementInstance.prototype, {- get correspondingElement() {- return wrap(unsafeUnwrap(this).correspondingElement);- },- get correspondingUseElement() {- return wrap(unsafeUnwrap(this).correspondingUseElement);- },- get parentNode() {- return wrap(unsafeUnwrap(this).parentNode);- },- get childNodes() {- throw new Error("Not implemented");- },- get firstChild() {- return wrap(unsafeUnwrap(this).firstChild);- },- get lastChild() {- return wrap(unsafeUnwrap(this).lastChild);- },- get previousSibling() {- return wrap(unsafeUnwrap(this).previousSibling);- },- get nextSibling() {- return wrap(unsafeUnwrap(this).nextSibling);- }- });- registerWrapper(OriginalSVGElementInstance, SVGElementInstance);- scope.wrappers.SVGElementInstance = SVGElementInstance;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var setWrapper = scope.setWrapper;- var unsafeUnwrap = scope.unsafeUnwrap;- var unwrap = scope.unwrap;- var unwrapIfNeeded = scope.unwrapIfNeeded;- var wrap = scope.wrap;- var OriginalCanvasRenderingContext2D = window.CanvasRenderingContext2D;- function CanvasRenderingContext2D(impl) {- setWrapper(impl, this);- }- mixin(CanvasRenderingContext2D.prototype, {- get canvas() {- return wrap(unsafeUnwrap(this).canvas);- },- drawImage: function() {- arguments[0] = unwrapIfNeeded(arguments[0]);- unsafeUnwrap(this).drawImage.apply(unsafeUnwrap(this), arguments);- },- createPattern: function() {- arguments[0] = unwrap(arguments[0]);- return unsafeUnwrap(this).createPattern.apply(unsafeUnwrap(this), arguments);- }- });- registerWrapper(OriginalCanvasRenderingContext2D, CanvasRenderingContext2D, document.createElement("canvas").getContext("2d"));- scope.wrappers.CanvasRenderingContext2D = CanvasRenderingContext2D;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var addForwardingProperties = scope.addForwardingProperties;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var setWrapper = scope.setWrapper;- var unsafeUnwrap = scope.unsafeUnwrap;- var unwrapIfNeeded = scope.unwrapIfNeeded;- var wrap = scope.wrap;- var OriginalWebGLRenderingContext = window.WebGLRenderingContext;- if (!OriginalWebGLRenderingContext) return;- function WebGLRenderingContext(impl) {- setWrapper(impl, this);- }- mixin(WebGLRenderingContext.prototype, {- get canvas() {- return wrap(unsafeUnwrap(this).canvas);- },- texImage2D: function() {- arguments[5] = unwrapIfNeeded(arguments[5]);- unsafeUnwrap(this).texImage2D.apply(unsafeUnwrap(this), arguments);- },- texSubImage2D: function() {- arguments[6] = unwrapIfNeeded(arguments[6]);- unsafeUnwrap(this).texSubImage2D.apply(unsafeUnwrap(this), arguments);- }- });- var OriginalWebGLRenderingContextBase = Object.getPrototypeOf(OriginalWebGLRenderingContext.prototype);- if (OriginalWebGLRenderingContextBase !== Object.prototype) {- addForwardingProperties(OriginalWebGLRenderingContextBase, WebGLRenderingContext.prototype);- }- var instanceProperties = /WebKit/.test(navigator.userAgent) ? {- drawingBufferHeight: null,- drawingBufferWidth: null- } : {};- registerWrapper(OriginalWebGLRenderingContext, WebGLRenderingContext, instanceProperties);- scope.wrappers.WebGLRenderingContext = WebGLRenderingContext;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var Node = scope.wrappers.Node;- var GetElementsByInterface = scope.GetElementsByInterface;- var NonElementParentNodeInterface = scope.NonElementParentNodeInterface;- var ParentNodeInterface = scope.ParentNodeInterface;- var SelectorsInterface = scope.SelectorsInterface;- var mixin = scope.mixin;- var registerObject = scope.registerObject;- var registerWrapper = scope.registerWrapper;- var OriginalDocumentFragment = window.DocumentFragment;- function DocumentFragment(node) {- Node.call(this, node);- }- DocumentFragment.prototype = Object.create(Node.prototype);- mixin(DocumentFragment.prototype, ParentNodeInterface);- mixin(DocumentFragment.prototype, SelectorsInterface);- mixin(DocumentFragment.prototype, GetElementsByInterface);- mixin(DocumentFragment.prototype, NonElementParentNodeInterface);- registerWrapper(OriginalDocumentFragment, DocumentFragment, document.createDocumentFragment());- scope.wrappers.DocumentFragment = DocumentFragment;- var Comment = registerObject(document.createComment(""));- scope.wrappers.Comment = Comment;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var DocumentFragment = scope.wrappers.DocumentFragment;- var TreeScope = scope.TreeScope;- var elementFromPoint = scope.elementFromPoint;- var getInnerHTML = scope.getInnerHTML;- var getTreeScope = scope.getTreeScope;- var mixin = scope.mixin;- var rewrap = scope.rewrap;- var setInnerHTML = scope.setInnerHTML;- var unsafeUnwrap = scope.unsafeUnwrap;- var unwrap = scope.unwrap;- var wrap = scope.wrap;- var shadowHostTable = new WeakMap();- var nextOlderShadowTreeTable = new WeakMap();- function ShadowRoot(hostWrapper) {- var node = unwrap(unsafeUnwrap(hostWrapper).ownerDocument.createDocumentFragment());- DocumentFragment.call(this, node);- rewrap(node, this);- var oldShadowRoot = hostWrapper.shadowRoot;- nextOlderShadowTreeTable.set(this, oldShadowRoot);- this.treeScope_ = new TreeScope(this, getTreeScope(oldShadowRoot || hostWrapper));- shadowHostTable.set(this, hostWrapper);- }- ShadowRoot.prototype = Object.create(DocumentFragment.prototype);- mixin(ShadowRoot.prototype, {- constructor: ShadowRoot,- get innerHTML() {- return getInnerHTML(this);- },- set innerHTML(value) {- setInnerHTML(this, value);- this.invalidateShadowRenderer();- },- get olderShadowRoot() {- return nextOlderShadowTreeTable.get(this) || null;- },- get host() {- return shadowHostTable.get(this) || null;- },- invalidateShadowRenderer: function() {- return shadowHostTable.get(this).invalidateShadowRenderer();- },- elementFromPoint: function(x, y) {- return elementFromPoint(this, this.ownerDocument, x, y);- },- getSelection: function() {- return document.getSelection();- },- get activeElement() {- var unwrappedActiveElement = unwrap(this).ownerDocument.activeElement;- if (!unwrappedActiveElement || !unwrappedActiveElement.nodeType) return null;- var activeElement = wrap(unwrappedActiveElement);- while (!this.contains(activeElement)) {- while (activeElement.parentNode) {- activeElement = activeElement.parentNode;- }- if (activeElement.host) {- activeElement = activeElement.host;- } else {- return null;- }- }- return activeElement;- }- });- scope.wrappers.ShadowRoot = ShadowRoot;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var registerWrapper = scope.registerWrapper;- var setWrapper = scope.setWrapper;- var unsafeUnwrap = scope.unsafeUnwrap;- var unwrap = scope.unwrap;- var unwrapIfNeeded = scope.unwrapIfNeeded;- var wrap = scope.wrap;- var getTreeScope = scope.getTreeScope;- var OriginalRange = window.Range;- var ShadowRoot = scope.wrappers.ShadowRoot;- function getHost(node) {- var root = getTreeScope(node).root;- if (root instanceof ShadowRoot) {- return root.host;- }- return null;- }- function hostNodeToShadowNode(refNode, offset) {- if (refNode.shadowRoot) {- offset = Math.min(refNode.childNodes.length - 1, offset);- var child = refNode.childNodes[offset];- if (child) {- var insertionPoint = scope.getDestinationInsertionPoints(child);- if (insertionPoint.length > 0) {- var parentNode = insertionPoint[0].parentNode;- if (parentNode.nodeType == Node.ELEMENT_NODE) {- refNode = parentNode;- }- }- }- }- return refNode;- }- function shadowNodeToHostNode(node) {- node = wrap(node);- return getHost(node) || node;- }- function Range(impl) {- setWrapper(impl, this);- }- Range.prototype = {- get startContainer() {- return shadowNodeToHostNode(unsafeUnwrap(this).startContainer);- },- get endContainer() {- return shadowNodeToHostNode(unsafeUnwrap(this).endContainer);- },- get commonAncestorContainer() {- return shadowNodeToHostNode(unsafeUnwrap(this).commonAncestorContainer);- },- setStart: function(refNode, offset) {- refNode = hostNodeToShadowNode(refNode, offset);- unsafeUnwrap(this).setStart(unwrapIfNeeded(refNode), offset);- },- setEnd: function(refNode, offset) {- refNode = hostNodeToShadowNode(refNode, offset);- unsafeUnwrap(this).setEnd(unwrapIfNeeded(refNode), offset);- },- setStartBefore: function(refNode) {- unsafeUnwrap(this).setStartBefore(unwrapIfNeeded(refNode));- },- setStartAfter: function(refNode) {- unsafeUnwrap(this).setStartAfter(unwrapIfNeeded(refNode));- },- setEndBefore: function(refNode) {- unsafeUnwrap(this).setEndBefore(unwrapIfNeeded(refNode));- },- setEndAfter: function(refNode) {- unsafeUnwrap(this).setEndAfter(unwrapIfNeeded(refNode));- },- selectNode: function(refNode) {- unsafeUnwrap(this).selectNode(unwrapIfNeeded(refNode));- },- selectNodeContents: function(refNode) {- unsafeUnwrap(this).selectNodeContents(unwrapIfNeeded(refNode));- },- compareBoundaryPoints: function(how, sourceRange) {- return unsafeUnwrap(this).compareBoundaryPoints(how, unwrap(sourceRange));- },- extractContents: function() {- return wrap(unsafeUnwrap(this).extractContents());- },- cloneContents: function() {- return wrap(unsafeUnwrap(this).cloneContents());- },- insertNode: function(node) {- unsafeUnwrap(this).insertNode(unwrapIfNeeded(node));- },- surroundContents: function(newParent) {- unsafeUnwrap(this).surroundContents(unwrapIfNeeded(newParent));- },- cloneRange: function() {- return wrap(unsafeUnwrap(this).cloneRange());- },- isPointInRange: function(node, offset) {- return unsafeUnwrap(this).isPointInRange(unwrapIfNeeded(node), offset);- },- comparePoint: function(node, offset) {- return unsafeUnwrap(this).comparePoint(unwrapIfNeeded(node), offset);- },- intersectsNode: function(node) {- return unsafeUnwrap(this).intersectsNode(unwrapIfNeeded(node));- },- toString: function() {- return unsafeUnwrap(this).toString();- }- };- if (OriginalRange.prototype.createContextualFragment) {- Range.prototype.createContextualFragment = function(html) {- return wrap(unsafeUnwrap(this).createContextualFragment(html));- };- }- registerWrapper(window.Range, Range, document.createRange());- scope.wrappers.Range = Range;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var Element = scope.wrappers.Element;- var HTMLContentElement = scope.wrappers.HTMLContentElement;- var HTMLShadowElement = scope.wrappers.HTMLShadowElement;- var Node = scope.wrappers.Node;- var ShadowRoot = scope.wrappers.ShadowRoot;- var assert = scope.assert;- var getTreeScope = scope.getTreeScope;- var mixin = scope.mixin;- var oneOf = scope.oneOf;- var unsafeUnwrap = scope.unsafeUnwrap;- var unwrap = scope.unwrap;- var wrap = scope.wrap;- var ArraySplice = scope.ArraySplice;- function updateWrapperUpAndSideways(wrapper) {- wrapper.previousSibling_ = wrapper.previousSibling;- wrapper.nextSibling_ = wrapper.nextSibling;- wrapper.parentNode_ = wrapper.parentNode;- }- function updateWrapperDown(wrapper) {- wrapper.firstChild_ = wrapper.firstChild;- wrapper.lastChild_ = wrapper.lastChild;- }- function updateAllChildNodes(parentNodeWrapper) {- assert(parentNodeWrapper instanceof Node);- for (var childWrapper = parentNodeWrapper.firstChild; childWrapper; childWrapper = childWrapper.nextSibling) {- updateWrapperUpAndSideways(childWrapper);- }- updateWrapperDown(parentNodeWrapper);- }- function insertBefore(parentNodeWrapper, newChildWrapper, refChildWrapper) {- var parentNode = unwrap(parentNodeWrapper);- var newChild = unwrap(newChildWrapper);- var refChild = refChildWrapper ? unwrap(refChildWrapper) : null;- remove(newChildWrapper);- updateWrapperUpAndSideways(newChildWrapper);- if (!refChildWrapper) {- parentNodeWrapper.lastChild_ = parentNodeWrapper.lastChild;- if (parentNodeWrapper.lastChild === parentNodeWrapper.firstChild) parentNodeWrapper.firstChild_ = parentNodeWrapper.firstChild;- var lastChildWrapper = wrap(parentNode.lastChild);- if (lastChildWrapper) lastChildWrapper.nextSibling_ = lastChildWrapper.nextSibling;- } else {- if (parentNodeWrapper.firstChild === refChildWrapper) parentNodeWrapper.firstChild_ = refChildWrapper;- refChildWrapper.previousSibling_ = refChildWrapper.previousSibling;- }- scope.originalInsertBefore.call(parentNode, newChild, refChild);- }- function remove(nodeWrapper) {- var node = unwrap(nodeWrapper);- var parentNode = node.parentNode;- if (!parentNode) return;- var parentNodeWrapper = wrap(parentNode);- updateWrapperUpAndSideways(nodeWrapper);- if (nodeWrapper.previousSibling) nodeWrapper.previousSibling.nextSibling_ = nodeWrapper;- if (nodeWrapper.nextSibling) nodeWrapper.nextSibling.previousSibling_ = nodeWrapper;- if (parentNodeWrapper.lastChild === nodeWrapper) parentNodeWrapper.lastChild_ = nodeWrapper;- if (parentNodeWrapper.firstChild === nodeWrapper) parentNodeWrapper.firstChild_ = nodeWrapper;- scope.originalRemoveChild.call(parentNode, node);- }- var distributedNodesTable = new WeakMap();- var destinationInsertionPointsTable = new WeakMap();- var rendererForHostTable = new WeakMap();- function resetDistributedNodes(insertionPoint) {- distributedNodesTable.set(insertionPoint, []);- }- function getDistributedNodes(insertionPoint) {- var rv = distributedNodesTable.get(insertionPoint);- if (!rv) distributedNodesTable.set(insertionPoint, rv = []);- return rv;- }- function getChildNodesSnapshot(node) {- var result = [], i = 0;- for (var child = node.firstChild; child; child = child.nextSibling) {- result[i++] = child;- }- return result;- }- var request = oneOf(window, [ "requestAnimationFrame", "mozRequestAnimationFrame", "webkitRequestAnimationFrame", "setTimeout" ]);- var pendingDirtyRenderers = [];- var renderTimer;- function renderAllPending() {- for (var i = 0; i < pendingDirtyRenderers.length; i++) {- var renderer = pendingDirtyRenderers[i];- var parentRenderer = renderer.parentRenderer;- if (parentRenderer && parentRenderer.dirty) continue;- renderer.render();- }- pendingDirtyRenderers = [];- }- function handleRequestAnimationFrame() {- renderTimer = null;- renderAllPending();- }- function getRendererForHost(host) {- var renderer = rendererForHostTable.get(host);- if (!renderer) {- renderer = new ShadowRenderer(host);- rendererForHostTable.set(host, renderer);- }- return renderer;- }- function getShadowRootAncestor(node) {- var root = getTreeScope(node).root;- if (root instanceof ShadowRoot) return root;- return null;- }- function getRendererForShadowRoot(shadowRoot) {- return getRendererForHost(shadowRoot.host);- }- var spliceDiff = new ArraySplice();- spliceDiff.equals = function(renderNode, rawNode) {- return unwrap(renderNode.node) === rawNode;- };- function RenderNode(node) {- this.skip = false;- this.node = node;- this.childNodes = [];- }- RenderNode.prototype = {- append: function(node) {- var rv = new RenderNode(node);- this.childNodes.push(rv);- return rv;- },- sync: function(opt_added) {- if (this.skip) return;- var nodeWrapper = this.node;- var newChildren = this.childNodes;- var oldChildren = getChildNodesSnapshot(unwrap(nodeWrapper));- var added = opt_added || new WeakMap();- var splices = spliceDiff.calculateSplices(newChildren, oldChildren);- var newIndex = 0, oldIndex = 0;- var lastIndex = 0;- for (var i = 0; i < splices.length; i++) {- var splice = splices[i];- for (;lastIndex < splice.index; lastIndex++) {- oldIndex++;- newChildren[newIndex++].sync(added);- }- var removedCount = splice.removed.length;- for (var j = 0; j < removedCount; j++) {- var wrapper = wrap(oldChildren[oldIndex++]);- if (!added.get(wrapper)) remove(wrapper);- }- var addedCount = splice.addedCount;- var refNode = oldChildren[oldIndex] && wrap(oldChildren[oldIndex]);- for (var j = 0; j < addedCount; j++) {- var newChildRenderNode = newChildren[newIndex++];- var newChildWrapper = newChildRenderNode.node;- insertBefore(nodeWrapper, newChildWrapper, refNode);- added.set(newChildWrapper, true);- newChildRenderNode.sync(added);- }- lastIndex += addedCount;- }- for (var i = lastIndex; i < newChildren.length; i++) {- newChildren[i].sync(added);- }- }- };- function ShadowRenderer(host) {- this.host = host;- this.dirty = false;- this.invalidateAttributes();- this.associateNode(host);- }- ShadowRenderer.prototype = {- render: function(opt_renderNode) {- if (!this.dirty) return;- this.invalidateAttributes();- var host = this.host;- this.distribution(host);- var renderNode = opt_renderNode || new RenderNode(host);- this.buildRenderTree(renderNode, host);- var topMostRenderer = !opt_renderNode;- if (topMostRenderer) renderNode.sync();- this.dirty = false;- },- get parentRenderer() {- return getTreeScope(this.host).renderer;- },- invalidate: function() {- if (!this.dirty) {- this.dirty = true;- var parentRenderer = this.parentRenderer;- if (parentRenderer) parentRenderer.invalidate();- pendingDirtyRenderers.push(this);- if (renderTimer) return;- renderTimer = window[request](handleRequestAnimationFrame, 0);- }- },- distribution: function(root) {- this.resetAllSubtrees(root);- this.distributionResolution(root);- },- resetAll: function(node) {- if (isInsertionPoint(node)) resetDistributedNodes(node); else resetDestinationInsertionPoints(node);- this.resetAllSubtrees(node);- },- resetAllSubtrees: function(node) {- for (var child = node.firstChild; child; child = child.nextSibling) {- this.resetAll(child);- }- if (node.shadowRoot) this.resetAll(node.shadowRoot);- if (node.olderShadowRoot) this.resetAll(node.olderShadowRoot);- },- distributionResolution: function(node) {- if (isShadowHost(node)) {- var shadowHost = node;- var pool = poolPopulation(shadowHost);- var shadowTrees = getShadowTrees(shadowHost);- for (var i = 0; i < shadowTrees.length; i++) {- this.poolDistribution(shadowTrees[i], pool);- }- for (var i = shadowTrees.length - 1; i >= 0; i--) {- var shadowTree = shadowTrees[i];- var shadow = getShadowInsertionPoint(shadowTree);- if (shadow) {- var olderShadowRoot = shadowTree.olderShadowRoot;- if (olderShadowRoot) {- pool = poolPopulation(olderShadowRoot);- }- for (var j = 0; j < pool.length; j++) {- destributeNodeInto(pool[j], shadow);- }- }- this.distributionResolution(shadowTree);- }- }- for (var child = node.firstChild; child; child = child.nextSibling) {- this.distributionResolution(child);- }- },- poolDistribution: function(node, pool) {- if (node instanceof HTMLShadowElement) return;- if (node instanceof HTMLContentElement) {- var content = node;- this.updateDependentAttributes(content.getAttribute("select"));- var anyDistributed = false;- for (var i = 0; i < pool.length; i++) {- var node = pool[i];- if (!node) continue;- if (matches(node, content)) {- destributeNodeInto(node, content);- pool[i] = undefined;- anyDistributed = true;- }- }- if (!anyDistributed) {- for (var child = content.firstChild; child; child = child.nextSibling) {- destributeNodeInto(child, content);- }- }- return;- }- for (var child = node.firstChild; child; child = child.nextSibling) {- this.poolDistribution(child, pool);- }- },- buildRenderTree: function(renderNode, node) {- var children = this.compose(node);- for (var i = 0; i < children.length; i++) {- var child = children[i];- var childRenderNode = renderNode.append(child);- this.buildRenderTree(childRenderNode, child);- }- if (isShadowHost(node)) {- var renderer = getRendererForHost(node);- renderer.dirty = false;- }- },- compose: function(node) {- var children = [];- var p = node.shadowRoot || node;- for (var child = p.firstChild; child; child = child.nextSibling) {- if (isInsertionPoint(child)) {- this.associateNode(p);- var distributedNodes = getDistributedNodes(child);- for (var j = 0; j < distributedNodes.length; j++) {- var distributedNode = distributedNodes[j];- if (isFinalDestination(child, distributedNode)) children.push(distributedNode);- }- } else {- children.push(child);- }- }- return children;- },- invalidateAttributes: function() {- this.attributes = Object.create(null);- },- updateDependentAttributes: function(selector) {- if (!selector) return;- var attributes = this.attributes;- if (/\.\w+/.test(selector)) attributes["class"] = true;- if (/#\w+/.test(selector)) attributes["id"] = true;- selector.replace(/\[\s*([^\s=\|~\]]+)/g, function(_, name) {- attributes[name] = true;- });- },- dependsOnAttribute: function(name) {- return this.attributes[name];- },- associateNode: function(node) {- unsafeUnwrap(node).polymerShadowRenderer_ = this;- }- };- function poolPopulation(node) {- var pool = [];- for (var child = node.firstChild; child; child = child.nextSibling) {- if (isInsertionPoint(child)) {- pool.push.apply(pool, getDistributedNodes(child));- } else {- pool.push(child);- }- }- return pool;- }- function getShadowInsertionPoint(node) {- if (node instanceof HTMLShadowElement) return node;- if (node instanceof HTMLContentElement) return null;- for (var child = node.firstChild; child; child = child.nextSibling) {- var res = getShadowInsertionPoint(child);- if (res) return res;- }- return null;- }- function destributeNodeInto(child, insertionPoint) {- getDistributedNodes(insertionPoint).push(child);- var points = destinationInsertionPointsTable.get(child);- if (!points) destinationInsertionPointsTable.set(child, [ insertionPoint ]); else points.push(insertionPoint);- }- function getDestinationInsertionPoints(node) {- return destinationInsertionPointsTable.get(node);- }- function resetDestinationInsertionPoints(node) {- destinationInsertionPointsTable.set(node, undefined);- }- var selectorStartCharRe = /^(:not\()?[*.#[a-zA-Z_|]/;- function matches(node, contentElement) {- var select = contentElement.getAttribute("select");- if (!select) return true;- select = select.trim();- if (!select) return true;- if (!(node instanceof Element)) return false;- if (!selectorStartCharRe.test(select)) return false;- try {- return node.matches(select);- } catch (ex) {- return false;- }- }- function isFinalDestination(insertionPoint, node) {- var points = getDestinationInsertionPoints(node);- return points && points[points.length - 1] === insertionPoint;- }- function isInsertionPoint(node) {- return node instanceof HTMLContentElement || node instanceof HTMLShadowElement;- }- function isShadowHost(shadowHost) {- return shadowHost.shadowRoot;- }- function getShadowTrees(host) {- var trees = [];- for (var tree = host.shadowRoot; tree; tree = tree.olderShadowRoot) {- trees.push(tree);- }- return trees;- }- function render(host) {- new ShadowRenderer(host).render();- }- Node.prototype.invalidateShadowRenderer = function(force) {- var renderer = unsafeUnwrap(this).polymerShadowRenderer_;- if (renderer) {- renderer.invalidate();- return true;- }- return false;- };- HTMLContentElement.prototype.getDistributedNodes = HTMLShadowElement.prototype.getDistributedNodes = function() {- renderAllPending();- return getDistributedNodes(this);- };- Element.prototype.getDestinationInsertionPoints = function() {- renderAllPending();- return getDestinationInsertionPoints(this) || [];- };- HTMLContentElement.prototype.nodeIsInserted_ = HTMLShadowElement.prototype.nodeIsInserted_ = function() {- this.invalidateShadowRenderer();- var shadowRoot = getShadowRootAncestor(this);- var renderer;- if (shadowRoot) renderer = getRendererForShadowRoot(shadowRoot);- unsafeUnwrap(this).polymerShadowRenderer_ = renderer;- if (renderer) renderer.invalidate();- };- scope.getRendererForHost = getRendererForHost;- scope.getShadowTrees = getShadowTrees;- scope.renderAllPending = renderAllPending;- scope.getDestinationInsertionPoints = getDestinationInsertionPoints;- scope.visual = {- insertBefore: insertBefore,- remove: remove- };- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var HTMLElement = scope.wrappers.HTMLElement;- var assert = scope.assert;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var unwrap = scope.unwrap;- var wrap = scope.wrap;- var elementsWithFormProperty = [ "HTMLButtonElement", "HTMLFieldSetElement", "HTMLInputElement", "HTMLKeygenElement", "HTMLLabelElement", "HTMLLegendElement", "HTMLObjectElement", "HTMLOutputElement", "HTMLTextAreaElement" ];- function createWrapperConstructor(name) {- if (!window[name]) return;- assert(!scope.wrappers[name]);- var GeneratedWrapper = function(node) {- HTMLElement.call(this, node);- };- GeneratedWrapper.prototype = Object.create(HTMLElement.prototype);- mixin(GeneratedWrapper.prototype, {- get form() {- return wrap(unwrap(this).form);- }- });- registerWrapper(window[name], GeneratedWrapper, document.createElement(name.slice(4, -7)));- scope.wrappers[name] = GeneratedWrapper;- }- elementsWithFormProperty.forEach(createWrapperConstructor);- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var registerWrapper = scope.registerWrapper;- var setWrapper = scope.setWrapper;- var unsafeUnwrap = scope.unsafeUnwrap;- var unwrap = scope.unwrap;- var unwrapIfNeeded = scope.unwrapIfNeeded;- var wrap = scope.wrap;- var OriginalSelection = window.Selection;- function Selection(impl) {- setWrapper(impl, this);- }- Selection.prototype = {- get anchorNode() {- return wrap(unsafeUnwrap(this).anchorNode);- },- get focusNode() {- return wrap(unsafeUnwrap(this).focusNode);- },- addRange: function(range) {- unsafeUnwrap(this).addRange(unwrapIfNeeded(range));- },- collapse: function(node, index) {- unsafeUnwrap(this).collapse(unwrapIfNeeded(node), index);- },- containsNode: function(node, allowPartial) {- return unsafeUnwrap(this).containsNode(unwrapIfNeeded(node), allowPartial);- },- getRangeAt: function(index) {- return wrap(unsafeUnwrap(this).getRangeAt(index));- },- removeRange: function(range) {- unsafeUnwrap(this).removeRange(unwrap(range));- },- selectAllChildren: function(node) {- unsafeUnwrap(this).selectAllChildren(node instanceof ShadowRoot ? unsafeUnwrap(node.host) : unwrapIfNeeded(node));- },- toString: function() {- return unsafeUnwrap(this).toString();- }- };- if (OriginalSelection.prototype.extend) {- Selection.prototype.extend = function(node, offset) {- unsafeUnwrap(this).extend(unwrapIfNeeded(node), offset);- };- }- registerWrapper(window.Selection, Selection, window.getSelection());- scope.wrappers.Selection = Selection;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var registerWrapper = scope.registerWrapper;- var setWrapper = scope.setWrapper;- var unsafeUnwrap = scope.unsafeUnwrap;- var unwrapIfNeeded = scope.unwrapIfNeeded;- var wrap = scope.wrap;- var OriginalTreeWalker = window.TreeWalker;- function TreeWalker(impl) {- setWrapper(impl, this);- }- TreeWalker.prototype = {- get root() {- return wrap(unsafeUnwrap(this).root);- },- get currentNode() {- return wrap(unsafeUnwrap(this).currentNode);- },- set currentNode(node) {- unsafeUnwrap(this).currentNode = unwrapIfNeeded(node);- },- get filter() {- return unsafeUnwrap(this).filter;- },- parentNode: function() {- return wrap(unsafeUnwrap(this).parentNode());- },- firstChild: function() {- return wrap(unsafeUnwrap(this).firstChild());- },- lastChild: function() {- return wrap(unsafeUnwrap(this).lastChild());- },- previousSibling: function() {- return wrap(unsafeUnwrap(this).previousSibling());- },- previousNode: function() {- return wrap(unsafeUnwrap(this).previousNode());- },- nextNode: function() {- return wrap(unsafeUnwrap(this).nextNode());- }- };- registerWrapper(OriginalTreeWalker, TreeWalker);- scope.wrappers.TreeWalker = TreeWalker;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var GetElementsByInterface = scope.GetElementsByInterface;- var Node = scope.wrappers.Node;- var ParentNodeInterface = scope.ParentNodeInterface;- var NonElementParentNodeInterface = scope.NonElementParentNodeInterface;- var Selection = scope.wrappers.Selection;- var SelectorsInterface = scope.SelectorsInterface;- var ShadowRoot = scope.wrappers.ShadowRoot;- var TreeScope = scope.TreeScope;- var cloneNode = scope.cloneNode;- var defineGetter = scope.defineGetter;- var defineWrapGetter = scope.defineWrapGetter;- var elementFromPoint = scope.elementFromPoint;- var forwardMethodsToWrapper = scope.forwardMethodsToWrapper;- var matchesNames = scope.matchesNames;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var renderAllPending = scope.renderAllPending;- var rewrap = scope.rewrap;- var setWrapper = scope.setWrapper;- var unsafeUnwrap = scope.unsafeUnwrap;- var unwrap = scope.unwrap;- var wrap = scope.wrap;- var wrapEventTargetMethods = scope.wrapEventTargetMethods;- var wrapNodeList = scope.wrapNodeList;- var implementationTable = new WeakMap();- function Document(node) {- Node.call(this, node);- this.treeScope_ = new TreeScope(this, null);- }- Document.prototype = Object.create(Node.prototype);- defineWrapGetter(Document, "documentElement");- defineWrapGetter(Document, "body");- defineWrapGetter(Document, "head");- defineGetter(Document, "activeElement", function() {- var unwrappedActiveElement = unwrap(this).activeElement;- if (!unwrappedActiveElement || !unwrappedActiveElement.nodeType) return null;- var activeElement = wrap(unwrappedActiveElement);- while (!this.contains(activeElement)) {- while (activeElement.parentNode) {- activeElement = activeElement.parentNode;- }- if (activeElement.host) {- activeElement = activeElement.host;- } else {- return null;- }- }- return activeElement;- });- function wrapMethod(name) {- var original = document[name];- Document.prototype[name] = function() {- return wrap(original.apply(unsafeUnwrap(this), arguments));- };- }- [ "createComment", "createDocumentFragment", "createElement", "createElementNS", "createEvent", "createEventNS", "createRange", "createTextNode" ].forEach(wrapMethod);- var originalAdoptNode = document.adoptNode;- function adoptNodeNoRemove(node, doc) {- originalAdoptNode.call(unsafeUnwrap(doc), unwrap(node));- adoptSubtree(node, doc);- }- function adoptSubtree(node, doc) {- if (node.shadowRoot) doc.adoptNode(node.shadowRoot);- if (node instanceof ShadowRoot) adoptOlderShadowRoots(node, doc);- for (var child = node.firstChild; child; child = child.nextSibling) {- adoptSubtree(child, doc);- }- }- function adoptOlderShadowRoots(shadowRoot, doc) {- var oldShadowRoot = shadowRoot.olderShadowRoot;- if (oldShadowRoot) doc.adoptNode(oldShadowRoot);- }- var originalGetSelection = document.getSelection;- mixin(Document.prototype, {- adoptNode: function(node) {- if (node.parentNode) node.parentNode.removeChild(node);- adoptNodeNoRemove(node, this);- return node;- },- elementFromPoint: function(x, y) {- return elementFromPoint(this, this, x, y);- },- importNode: function(node, deep) {- return cloneNode(node, deep, unsafeUnwrap(this));- },- getSelection: function() {- renderAllPending();- return new Selection(originalGetSelection.call(unwrap(this)));- },- getElementsByName: function(name) {- return SelectorsInterface.querySelectorAll.call(this, "[name=" + JSON.stringify(String(name)) + "]");- }- });- var originalCreateTreeWalker = document.createTreeWalker;- var TreeWalkerWrapper = scope.wrappers.TreeWalker;- Document.prototype.createTreeWalker = function(root, whatToShow, filter, expandEntityReferences) {- var newFilter = null;- if (filter) {- if (filter.acceptNode && typeof filter.acceptNode === "function") {- newFilter = {- acceptNode: function(node) {- return filter.acceptNode(wrap(node));- }- };- } else if (typeof filter === "function") {- newFilter = function(node) {- return filter(wrap(node));- };- }- }- return new TreeWalkerWrapper(originalCreateTreeWalker.call(unwrap(this), unwrap(root), whatToShow, newFilter, expandEntityReferences));- };- if (document.registerElement) {- var originalRegisterElement = document.registerElement;- Document.prototype.registerElement = function(tagName, object) {- var prototype, extendsOption;- if (object !== undefined) {- prototype = object.prototype;- extendsOption = object.extends;- }- if (!prototype) prototype = Object.create(HTMLElement.prototype);- if (scope.nativePrototypeTable.get(prototype)) {- throw new Error("NotSupportedError");- }- var proto = Object.getPrototypeOf(prototype);- var nativePrototype;- var prototypes = [];- while (proto) {- nativePrototype = scope.nativePrototypeTable.get(proto);- if (nativePrototype) break;- prototypes.push(proto);- proto = Object.getPrototypeOf(proto);- }- if (!nativePrototype) {- throw new Error("NotSupportedError");- }- var newPrototype = Object.create(nativePrototype);- for (var i = prototypes.length - 1; i >= 0; i--) {- newPrototype = Object.create(newPrototype);- }- [ "createdCallback", "attachedCallback", "detachedCallback", "attributeChangedCallback" ].forEach(function(name) {- var f = prototype[name];- if (!f) return;- newPrototype[name] = function() {- if (!(wrap(this) instanceof CustomElementConstructor)) {- rewrap(this);- }- f.apply(wrap(this), arguments);- };- });- var p = {- prototype: newPrototype- };- if (extendsOption) p.extends = extendsOption;- function CustomElementConstructor(node) {- if (!node) {- if (extendsOption) {- return document.createElement(extendsOption, tagName);- } else {- return document.createElement(tagName);- }- }- setWrapper(node, this);- }- CustomElementConstructor.prototype = prototype;- CustomElementConstructor.prototype.constructor = CustomElementConstructor;- scope.constructorTable.set(newPrototype, CustomElementConstructor);- scope.nativePrototypeTable.set(prototype, newPrototype);- var nativeConstructor = originalRegisterElement.call(unwrap(this), tagName, p);- return CustomElementConstructor;- };- forwardMethodsToWrapper([ window.HTMLDocument || window.Document ], [ "registerElement" ]);- }- forwardMethodsToWrapper([ window.HTMLBodyElement, window.HTMLDocument || window.Document, window.HTMLHeadElement, window.HTMLHtmlElement ], [ "appendChild", "compareDocumentPosition", "contains", "getElementsByClassName", "getElementsByTagName", "getElementsByTagNameNS", "insertBefore", "querySelector", "querySelectorAll", "removeChild", "replaceChild" ]);- forwardMethodsToWrapper([ window.HTMLBodyElement, window.HTMLHeadElement, window.HTMLHtmlElement ], matchesNames);- forwardMethodsToWrapper([ window.HTMLDocument || window.Document ], [ "adoptNode", "importNode", "contains", "createComment", "createDocumentFragment", "createElement", "createElementNS", "createEvent", "createEventNS", "createRange", "createTextNode", "createTreeWalker", "elementFromPoint", "getElementById", "getElementsByName", "getSelection" ]);- mixin(Document.prototype, GetElementsByInterface);- mixin(Document.prototype, ParentNodeInterface);- mixin(Document.prototype, SelectorsInterface);- mixin(Document.prototype, NonElementParentNodeInterface);- mixin(Document.prototype, {- get implementation() {- var implementation = implementationTable.get(this);- if (implementation) return implementation;- implementation = new DOMImplementation(unwrap(this).implementation);- implementationTable.set(this, implementation);- return implementation;- },- get defaultView() {- return wrap(unwrap(this).defaultView);- }- });- registerWrapper(window.Document, Document, document.implementation.createHTMLDocument(""));- if (window.HTMLDocument) registerWrapper(window.HTMLDocument, Document);- wrapEventTargetMethods([ window.HTMLBodyElement, window.HTMLDocument || window.Document, window.HTMLHeadElement ]);- function DOMImplementation(impl) {- setWrapper(impl, this);- }- var originalCreateDocument = document.implementation.createDocument;- DOMImplementation.prototype.createDocument = function() {- arguments[2] = unwrap(arguments[2]);- return wrap(originalCreateDocument.apply(unsafeUnwrap(this), arguments));- };- function wrapImplMethod(constructor, name) {- var original = document.implementation[name];- constructor.prototype[name] = function() {- return wrap(original.apply(unsafeUnwrap(this), arguments));- };- }- function forwardImplMethod(constructor, name) {- var original = document.implementation[name];- constructor.prototype[name] = function() {- return original.apply(unsafeUnwrap(this), arguments);- };- }- wrapImplMethod(DOMImplementation, "createDocumentType");- wrapImplMethod(DOMImplementation, "createHTMLDocument");- forwardImplMethod(DOMImplementation, "hasFeature");- registerWrapper(window.DOMImplementation, DOMImplementation);- forwardMethodsToWrapper([ window.DOMImplementation ], [ "createDocument", "createDocumentType", "createHTMLDocument", "hasFeature" ]);- scope.adoptNodeNoRemove = adoptNodeNoRemove;- scope.wrappers.DOMImplementation = DOMImplementation;- scope.wrappers.Document = Document;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var EventTarget = scope.wrappers.EventTarget;- var Selection = scope.wrappers.Selection;- var mixin = scope.mixin;- var registerWrapper = scope.registerWrapper;- var renderAllPending = scope.renderAllPending;- var unwrap = scope.unwrap;- var unwrapIfNeeded = scope.unwrapIfNeeded;- var wrap = scope.wrap;- var OriginalWindow = window.Window;- var originalGetComputedStyle = window.getComputedStyle;- var originalGetDefaultComputedStyle = window.getDefaultComputedStyle;- var originalGetSelection = window.getSelection;- function Window(impl) {- EventTarget.call(this, impl);- }- Window.prototype = Object.create(EventTarget.prototype);- OriginalWindow.prototype.getComputedStyle = function(el, pseudo) {- return wrap(this || window).getComputedStyle(unwrapIfNeeded(el), pseudo);- };- if (originalGetDefaultComputedStyle) {- OriginalWindow.prototype.getDefaultComputedStyle = function(el, pseudo) {- return wrap(this || window).getDefaultComputedStyle(unwrapIfNeeded(el), pseudo);- };- }- OriginalWindow.prototype.getSelection = function() {- return wrap(this || window).getSelection();- };- delete window.getComputedStyle;- delete window.getDefaultComputedStyle;- delete window.getSelection;- [ "addEventListener", "removeEventListener", "dispatchEvent" ].forEach(function(name) {- OriginalWindow.prototype[name] = function() {- var w = wrap(this || window);- return w[name].apply(w, arguments);- };- delete window[name];- });- mixin(Window.prototype, {- getComputedStyle: function(el, pseudo) {- renderAllPending();- return originalGetComputedStyle.call(unwrap(this), unwrapIfNeeded(el), pseudo);- },- getSelection: function() {- renderAllPending();- return new Selection(originalGetSelection.call(unwrap(this)));- },- get document() {- return wrap(unwrap(this).document);- }- });- if (originalGetDefaultComputedStyle) {- Window.prototype.getDefaultComputedStyle = function(el, pseudo) {- renderAllPending();- return originalGetDefaultComputedStyle.call(unwrap(this), unwrapIfNeeded(el), pseudo);- };- }- registerWrapper(OriginalWindow, Window, window);- scope.wrappers.Window = Window;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var unwrap = scope.unwrap;- var OriginalDataTransfer = window.DataTransfer || window.Clipboard;- var OriginalDataTransferSetDragImage = OriginalDataTransfer.prototype.setDragImage;- if (OriginalDataTransferSetDragImage) {- OriginalDataTransfer.prototype.setDragImage = function(image, x, y) {- OriginalDataTransferSetDragImage.call(this, unwrap(image), x, y);- };- }- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var registerWrapper = scope.registerWrapper;- var setWrapper = scope.setWrapper;- var unwrap = scope.unwrap;- var OriginalFormData = window.FormData;- if (!OriginalFormData) return;- function FormData(formElement) {- var impl;- if (formElement instanceof OriginalFormData) {- impl = formElement;- } else {- impl = new OriginalFormData(formElement && unwrap(formElement));- }- setWrapper(impl, this);- }- registerWrapper(OriginalFormData, FormData, new OriginalFormData());- scope.wrappers.FormData = FormData;- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var unwrapIfNeeded = scope.unwrapIfNeeded;- var originalSend = XMLHttpRequest.prototype.send;- XMLHttpRequest.prototype.send = function(obj) {- return originalSend.call(this, unwrapIfNeeded(obj));- };- })(window.ShadowDOMPolyfill);- (function(scope) {- "use strict";- var isWrapperFor = scope.isWrapperFor;- var elements = {- a: "HTMLAnchorElement",- area: "HTMLAreaElement",- audio: "HTMLAudioElement",- base: "HTMLBaseElement",- body: "HTMLBodyElement",- br: "HTMLBRElement",- button: "HTMLButtonElement",- canvas: "HTMLCanvasElement",- caption: "HTMLTableCaptionElement",- col: "HTMLTableColElement",- content: "HTMLContentElement",- data: "HTMLDataElement",- datalist: "HTMLDataListElement",- del: "HTMLModElement",- dir: "HTMLDirectoryElement",- div: "HTMLDivElement",- dl: "HTMLDListElement",- embed: "HTMLEmbedElement",- fieldset: "HTMLFieldSetElement",- font: "HTMLFontElement",- form: "HTMLFormElement",- frame: "HTMLFrameElement",- frameset: "HTMLFrameSetElement",- h1: "HTMLHeadingElement",- head: "HTMLHeadElement",- hr: "HTMLHRElement",- html: "HTMLHtmlElement",- iframe: "HTMLIFrameElement",- img: "HTMLImageElement",- input: "HTMLInputElement",- keygen: "HTMLKeygenElement",- label: "HTMLLabelElement",- legend: "HTMLLegendElement",- li: "HTMLLIElement",- link: "HTMLLinkElement",- map: "HTMLMapElement",- marquee: "HTMLMarqueeElement",- menu: "HTMLMenuElement",- menuitem: "HTMLMenuItemElement",- meta: "HTMLMetaElement",- meter: "HTMLMeterElement",- object: "HTMLObjectElement",- ol: "HTMLOListElement",- optgroup: "HTMLOptGroupElement",- option: "HTMLOptionElement",- output: "HTMLOutputElement",- p: "HTMLParagraphElement",- param: "HTMLParamElement",- pre: "HTMLPreElement",- progress: "HTMLProgressElement",- q: "HTMLQuoteElement",- script: "HTMLScriptElement",- select: "HTMLSelectElement",- shadow: "HTMLShadowElement",- source: "HTMLSourceElement",- span: "HTMLSpanElement",- style: "HTMLStyleElement",- table: "HTMLTableElement",- tbody: "HTMLTableSectionElement",- template: "HTMLTemplateElement",- textarea: "HTMLTextAreaElement",- thead: "HTMLTableSectionElement",- time: "HTMLTimeElement",- title: "HTMLTitleElement",- tr: "HTMLTableRowElement",- track: "HTMLTrackElement",- ul: "HTMLUListElement",- video: "HTMLVideoElement"- };- function overrideConstructor(tagName) {- var nativeConstructorName = elements[tagName];- var nativeConstructor = window[nativeConstructorName];- if (!nativeConstructor) return;- var element = document.createElement(tagName);- var wrapperConstructor = element.constructor;- window[nativeConstructorName] = wrapperConstructor;- }- Object.keys(elements).forEach(overrideConstructor);- Object.getOwnPropertyNames(scope.wrappers).forEach(function(name) {- window[name] = scope.wrappers[name];- });- })(window.ShadowDOMPolyfill);- (function(scope) {- var ShadowCSS = {- strictStyling: false,- registry: {},- shimStyling: function(root, name, extendsName) {- var scopeStyles = this.prepareRoot(root, name, extendsName);- var typeExtension = this.isTypeExtension(extendsName);- var scopeSelector = this.makeScopeSelector(name, typeExtension);- var cssText = stylesToCssText(scopeStyles, true);- cssText = this.scopeCssText(cssText, scopeSelector);- if (root) {- root.shimmedStyle = cssText;- }- this.addCssToDocument(cssText, name);- },- shimStyle: function(style, selector) {- return this.shimCssText(style.textContent, selector);- },- shimCssText: function(cssText, selector) {- cssText = this.insertDirectives(cssText);- return this.scopeCssText(cssText, selector);- },- makeScopeSelector: function(name, typeExtension) {- if (name) {- return typeExtension ? "[is=" + name + "]" : name;- }- return "";- },- isTypeExtension: function(extendsName) {- return extendsName && extendsName.indexOf("-") < 0;- },- prepareRoot: function(root, name, extendsName) {- var def = this.registerRoot(root, name, extendsName);- this.replaceTextInStyles(def.rootStyles, this.insertDirectives);- this.removeStyles(root, def.rootStyles);- if (this.strictStyling) {- this.applyScopeToContent(root, name);- }- return def.scopeStyles;- },- removeStyles: function(root, styles) {- for (var i = 0, l = styles.length, s; i < l && (s = styles[i]); i++) {- s.parentNode.removeChild(s);- }- },- registerRoot: function(root, name, extendsName) {- var def = this.registry[name] = {- root: root,- name: name,- extendsName: extendsName- };- var styles = this.findStyles(root);- def.rootStyles = styles;- def.scopeStyles = def.rootStyles;- var extendee = this.registry[def.extendsName];- if (extendee) {- def.scopeStyles = extendee.scopeStyles.concat(def.scopeStyles);- }- return def;- },- findStyles: function(root) {- if (!root) {- return [];- }- var styles = root.querySelectorAll("style");- return Array.prototype.filter.call(styles, function(s) {- return !s.hasAttribute(NO_SHIM_ATTRIBUTE);- });- },- applyScopeToContent: function(root, name) {- if (root) {- Array.prototype.forEach.call(root.querySelectorAll("*"), function(node) {- node.setAttribute(name, "");- });- Array.prototype.forEach.call(root.querySelectorAll("template"), function(template) {- this.applyScopeToContent(template.content, name);- }, this);- }- },- insertDirectives: function(cssText) {- cssText = this.insertPolyfillDirectivesInCssText(cssText);- return this.insertPolyfillRulesInCssText(cssText);- },- insertPolyfillDirectivesInCssText: function(cssText) {- cssText = cssText.replace(cssCommentNextSelectorRe, function(match, p1) {- return p1.slice(0, -2) + "{";- });- return cssText.replace(cssContentNextSelectorRe, function(match, p1) {- return p1 + " {";- });- },- insertPolyfillRulesInCssText: function(cssText) {- cssText = cssText.replace(cssCommentRuleRe, function(match, p1) {- return p1.slice(0, -1);- });- return cssText.replace(cssContentRuleRe, function(match, p1, p2, p3) {- var rule = match.replace(p1, "").replace(p2, "");- return p3 + rule;- });- },- scopeCssText: function(cssText, scopeSelector) {- var unscoped = this.extractUnscopedRulesFromCssText(cssText);- cssText = this.insertPolyfillHostInCssText(cssText);- cssText = this.convertColonHost(cssText);- cssText = this.convertColonHostContext(cssText);- cssText = this.convertShadowDOMSelectors(cssText);- if (scopeSelector) {- var self = this, cssText;- withCssRules(cssText, function(rules) {- cssText = self.scopeRules(rules, scopeSelector);- });- }- cssText = cssText + "\n" + unscoped;- return cssText.trim();- },- extractUnscopedRulesFromCssText: function(cssText) {- var r = "", m;- while (m = cssCommentUnscopedRuleRe.exec(cssText)) {- r += m[1].slice(0, -1) + "\n\n";- }- while (m = cssContentUnscopedRuleRe.exec(cssText)) {- r += m[0].replace(m[2], "").replace(m[1], m[3]) + "\n\n";- }- return r;- },- convertColonHost: function(cssText) {- return this.convertColonRule(cssText, cssColonHostRe, this.colonHostPartReplacer);- },- convertColonHostContext: function(cssText) {- return this.convertColonRule(cssText, cssColonHostContextRe, this.colonHostContextPartReplacer);- },- convertColonRule: function(cssText, regExp, partReplacer) {- return cssText.replace(regExp, function(m, p1, p2, p3) {- p1 = polyfillHostNoCombinator;- if (p2) {- var parts = p2.split(","), r = [];- for (var i = 0, l = parts.length, p; i < l && (p = parts[i]); i++) {- p = p.trim();- r.push(partReplacer(p1, p, p3));- }- return r.join(",");- } else {- return p1 + p3;- }- });- },- colonHostContextPartReplacer: function(host, part, suffix) {- if (part.match(polyfillHost)) {- return this.colonHostPartReplacer(host, part, suffix);- } else {- return host + part + suffix + ", " + part + " " + host + suffix;- }- },- colonHostPartReplacer: function(host, part, suffix) {- return host + part.replace(polyfillHost, "") + suffix;- },- convertShadowDOMSelectors: function(cssText) {- for (var i = 0; i < shadowDOMSelectorsRe.length; i++) {- cssText = cssText.replace(shadowDOMSelectorsRe[i], " ");- }- return cssText;- },- scopeRules: function(cssRules, scopeSelector) {- var cssText = "";- if (cssRules) {- Array.prototype.forEach.call(cssRules, function(rule) {- if (rule.selectorText && (rule.style && rule.style.cssText !== undefined)) {- cssText += this.scopeSelector(rule.selectorText, scopeSelector, this.strictStyling) + " {\n\t";- cssText += this.propertiesFromRule(rule) + "\n}\n\n";- } else if (rule.type === CSSRule.MEDIA_RULE) {- cssText += "@media " + rule.media.mediaText + " {\n";- cssText += this.scopeRules(rule.cssRules, scopeSelector);- cssText += "\n}\n\n";- } else {- try {- if (rule.cssText) {- cssText += rule.cssText + "\n\n";- }- } catch (x) {- if (rule.type === CSSRule.KEYFRAMES_RULE && rule.cssRules) {- cssText += this.ieSafeCssTextFromKeyFrameRule(rule);- }- }- }- }, this);- }- return cssText;- },- ieSafeCssTextFromKeyFrameRule: function(rule) {- var cssText = "@keyframes " + rule.name + " {";- Array.prototype.forEach.call(rule.cssRules, function(rule) {- cssText += " " + rule.keyText + " {" + rule.style.cssText + "}";- });- cssText += " }";- return cssText;- },- scopeSelector: function(selector, scopeSelector, strict) {- var r = [], parts = selector.split(",");- parts.forEach(function(p) {- p = p.trim();- if (this.selectorNeedsScoping(p, scopeSelector)) {- p = strict && !p.match(polyfillHostNoCombinator) ? this.applyStrictSelectorScope(p, scopeSelector) : this.applySelectorScope(p, scopeSelector);- }- r.push(p);- }, this);- return r.join(", ");- },- selectorNeedsScoping: function(selector, scopeSelector) {- if (Array.isArray(scopeSelector)) {- return true;- }- var re = this.makeScopeMatcher(scopeSelector);- return !selector.match(re);- },- makeScopeMatcher: function(scopeSelector) {- scopeSelector = scopeSelector.replace(/\[/g, "\\[").replace(/\]/g, "\\]");- return new RegExp("^(" + scopeSelector + ")" + selectorReSuffix, "m");- },- applySelectorScope: function(selector, selectorScope) {- return Array.isArray(selectorScope) ? this.applySelectorScopeList(selector, selectorScope) : this.applySimpleSelectorScope(selector, selectorScope);- },- applySelectorScopeList: function(selector, scopeSelectorList) {- var r = [];- for (var i = 0, s; s = scopeSelectorList[i]; i++) {- r.push(this.applySimpleSelectorScope(selector, s));- }- return r.join(", ");- },- applySimpleSelectorScope: function(selector, scopeSelector) {- if (selector.match(polyfillHostRe)) {- selector = selector.replace(polyfillHostNoCombinator, scopeSelector);- return selector.replace(polyfillHostRe, scopeSelector + " ");- } else {- return scopeSelector + " " + selector;- }- },- applyStrictSelectorScope: function(selector, scopeSelector) {- scopeSelector = scopeSelector.replace(/\[is=([^\]]*)\]/g, "$1");- var splits = [ " ", ">", "+", "~" ], scoped = selector, attrName = "[" + scopeSelector + "]";- splits.forEach(function(sep) {- var parts = scoped.split(sep);- scoped = parts.map(function(p) {- var t = p.trim().replace(polyfillHostRe, "");- if (t && splits.indexOf(t) < 0 && t.indexOf(attrName) < 0) {- p = t.replace(/([^:]*)(:*)(.*)/, "$1" + attrName + "$2$3");- }- return p;- }).join(sep);- });- return scoped;- },- insertPolyfillHostInCssText: function(selector) {- return selector.replace(colonHostContextRe, polyfillHostContext).replace(colonHostRe, polyfillHost);- },- propertiesFromRule: function(rule) {- var cssText = rule.style.cssText;- if (rule.style.content && !rule.style.content.match(/['"]+|attr/)) {- cssText = cssText.replace(/content:[^;]*;/g, "content: '" + rule.style.content + "';");- }- var style = rule.style;- for (var i in style) {- if (style[i] === "initial") {- cssText += i + ": initial; ";- }- }- return cssText;- },- replaceTextInStyles: function(styles, action) {- if (styles && action) {- if (!(styles instanceof Array)) {- styles = [ styles ];- }- Array.prototype.forEach.call(styles, function(s) {- s.textContent = action.call(this, s.textContent);- }, this);- }- },- addCssToDocument: function(cssText, name) {- if (cssText.match("@import")) {- addOwnSheet(cssText, name);- } else {- addCssToDocument(cssText);- }- }- };- var selectorRe = /([^{]*)({[\s\S]*?})/gim, cssCommentRe = /\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim, cssCommentNextSelectorRe = /\/\*\s*@polyfill ([^*]*\*+([^\/*][^*]*\*+)*\/)([^{]*?){/gim, cssContentNextSelectorRe = /polyfill-next-selector[^}]*content\:[\s]*?['"](.*?)['"][;\s]*}([^{]*?){/gim, cssCommentRuleRe = /\/\*\s@polyfill-rule([^*]*\*+([^\/*][^*]*\*+)*)\//gim, cssContentRuleRe = /(polyfill-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim, cssCommentUnscopedRuleRe = /\/\*\s@polyfill-unscoped-rule([^*]*\*+([^\/*][^*]*\*+)*)\//gim, cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim, cssPseudoRe = /::(x-[^\s{,(]*)/gim, cssPartRe = /::part\(([^)]*)\)/gim, polyfillHost = "-shadowcsshost", polyfillHostContext = "-shadowcsscontext", parenSuffix = ")(?:\\((" + "(?:\\([^)(]*\\)|[^)(]*)+?" + ")\\))?([^,{]*)";- var cssColonHostRe = new RegExp("(" + polyfillHost + parenSuffix, "gim"), cssColonHostContextRe = new RegExp("(" + polyfillHostContext + parenSuffix, "gim"), selectorReSuffix = "([>\\s~+[.,{:][\\s\\S]*)?$", colonHostRe = /\:host/gim, colonHostContextRe = /\:host-context/gim, polyfillHostNoCombinator = polyfillHost + "-no-combinator", polyfillHostRe = new RegExp(polyfillHost, "gim"), polyfillHostContextRe = new RegExp(polyfillHostContext, "gim"), shadowDOMSelectorsRe = [ />>>/g, /::shadow/g, /::content/g, /\/deep\//g, /\/shadow\//g, /\/shadow-deep\//g, /\^\^/g, /\^(?!=)/g ];- function stylesToCssText(styles, preserveComments) {- var cssText = "";- Array.prototype.forEach.call(styles, function(s) {- cssText += s.textContent + "\n\n";- });- if (!preserveComments) {- cssText = cssText.replace(cssCommentRe, "");- }- return cssText;- }- function cssTextToStyle(cssText) {- var style = document.createElement("style");- style.textContent = cssText;- return style;- }- function cssToRules(cssText) {- var style = cssTextToStyle(cssText);- document.head.appendChild(style);- var rules = [];- if (style.sheet) {- try {- rules = style.sheet.cssRules;- } catch (e) {}- } else {- console.warn("sheet not found", style);- }- style.parentNode.removeChild(style);- return rules;- }- var frame = document.createElement("iframe");- frame.style.display = "none";- function initFrame() {- frame.initialized = true;- document.body.appendChild(frame);- var doc = frame.contentDocument;- var base = doc.createElement("base");- base.href = document.baseURI;- doc.head.appendChild(base);- }- function inFrame(fn) {- if (!frame.initialized) {- initFrame();- }- document.body.appendChild(frame);- fn(frame.contentDocument);- document.body.removeChild(frame);- }- var isChrome = navigator.userAgent.match("Chrome");- function withCssRules(cssText, callback) {- if (!callback) {- return;- }- var rules;- if (cssText.match("@import") && isChrome) {- var style = cssTextToStyle(cssText);- inFrame(function(doc) {- doc.head.appendChild(style.impl);- rules = Array.prototype.slice.call(style.sheet.cssRules, 0);- callback(rules);- });- } else {- rules = cssToRules(cssText);- callback(rules);- }- }- function rulesToCss(cssRules) {- for (var i = 0, css = []; i < cssRules.length; i++) {- css.push(cssRules[i].cssText);- }- return css.join("\n\n");- }- function addCssToDocument(cssText) {- if (cssText) {- getSheet().appendChild(document.createTextNode(cssText));- }- }- function addOwnSheet(cssText, name) {- var style = cssTextToStyle(cssText);- style.setAttribute(name, "");- style.setAttribute(SHIMMED_ATTRIBUTE, "");- document.head.appendChild(style);- }- var SHIM_ATTRIBUTE = "shim-shadowdom";- var SHIMMED_ATTRIBUTE = "shim-shadowdom-css";- var NO_SHIM_ATTRIBUTE = "no-shim";- var sheet;- function getSheet() {- if (!sheet) {- sheet = document.createElement("style");- sheet.setAttribute(SHIMMED_ATTRIBUTE, "");- sheet[SHIMMED_ATTRIBUTE] = true;- }- return sheet;- }- if (window.ShadowDOMPolyfill) {- addCssToDocument("style { display: none !important; }\n");- var doc = ShadowDOMPolyfill.wrap(document);- var head = doc.querySelector("head");- head.insertBefore(getSheet(), head.childNodes[0]);- document.addEventListener("DOMContentLoaded", function() {- var urlResolver = scope.urlResolver;- if (window.HTMLImports && !HTMLImports.useNative) {- var SHIM_SHEET_SELECTOR = "link[rel=stylesheet]" + "[" + SHIM_ATTRIBUTE + "]";- var SHIM_STYLE_SELECTOR = "style[" + SHIM_ATTRIBUTE + "]";- HTMLImports.importer.documentPreloadSelectors += "," + SHIM_SHEET_SELECTOR;- HTMLImports.importer.importsPreloadSelectors += "," + SHIM_SHEET_SELECTOR;- HTMLImports.parser.documentSelectors = [ HTMLImports.parser.documentSelectors, SHIM_SHEET_SELECTOR, SHIM_STYLE_SELECTOR ].join(",");- var originalParseGeneric = HTMLImports.parser.parseGeneric;- HTMLImports.parser.parseGeneric = function(elt) {- if (elt[SHIMMED_ATTRIBUTE]) {- return;- }- var style = elt.__importElement || elt;- if (!style.hasAttribute(SHIM_ATTRIBUTE)) {- originalParseGeneric.call(this, elt);- return;- }- if (elt.__resource) {- style = elt.ownerDocument.createElement("style");- style.textContent = elt.__resource;- }- HTMLImports.path.resolveUrlsInStyle(style, elt.href);- style.textContent = ShadowCSS.shimStyle(style);- style.removeAttribute(SHIM_ATTRIBUTE, "");- style.setAttribute(SHIMMED_ATTRIBUTE, "");- style[SHIMMED_ATTRIBUTE] = true;- if (style.parentNode !== head) {- if (elt.parentNode === head) {- head.replaceChild(style, elt);- } else {- this.addElementToDocument(style);- }- }- style.__importParsed = true;- this.markParsingComplete(elt);- this.parseNext();- };- var hasResource = HTMLImports.parser.hasResource;- HTMLImports.parser.hasResource = function(node) {- if (node.localName === "link" && node.rel === "stylesheet" && node.hasAttribute(SHIM_ATTRIBUTE)) {- return node.__resource;- } else {- return hasResource.call(this, node);- }- };- }- });- }- scope.ShadowCSS = ShadowCSS;- })(window.WebComponents);-}--(function(scope) {- if (window.ShadowDOMPolyfill) {- window.wrap = ShadowDOMPolyfill.wrapIfNeeded;- window.unwrap = ShadowDOMPolyfill.unwrapIfNeeded;- } else {- window.wrap = window.unwrap = function(n) {- return n;- };- }-})(window.WebComponents);--(function(scope) {- "use strict";- var hasWorkingUrl = false;- if (!scope.forceJURL) {- try {- var u = new URL("b", "http://a");- u.pathname = "c%20d";- hasWorkingUrl = u.href === "http://a/c%20d";- } catch (e) {}- }- if (hasWorkingUrl) return;- var relative = Object.create(null);- relative["ftp"] = 21;- relative["file"] = 0;- relative["gopher"] = 70;- relative["http"] = 80;- relative["https"] = 443;- relative["ws"] = 80;- relative["wss"] = 443;- var relativePathDotMapping = Object.create(null);- relativePathDotMapping["%2e"] = ".";- relativePathDotMapping[".%2e"] = "..";- relativePathDotMapping["%2e."] = "..";- relativePathDotMapping["%2e%2e"] = "..";- function isRelativeScheme(scheme) {- return relative[scheme] !== undefined;- }- function invalid() {- clear.call(this);- this._isInvalid = true;- }- function IDNAToASCII(h) {- if ("" == h) {- invalid.call(this);- }- return h.toLowerCase();- }- function percentEscape(c) {- var unicode = c.charCodeAt(0);- if (unicode > 32 && unicode < 127 && [ 34, 35, 60, 62, 63, 96 ].indexOf(unicode) == -1) {- return c;- }- return encodeURIComponent(c);- }- function percentEscapeQuery(c) {- var unicode = c.charCodeAt(0);- if (unicode > 32 && unicode < 127 && [ 34, 35, 60, 62, 96 ].indexOf(unicode) == -1) {- return c;- }- return encodeURIComponent(c);- }- var EOF = undefined, ALPHA = /[a-zA-Z]/, ALPHANUMERIC = /[a-zA-Z0-9\+\-\.]/;- function parse(input, stateOverride, base) {- function err(message) {- errors.push(message);- }- var state = stateOverride || "scheme start", cursor = 0, buffer = "", seenAt = false, seenBracket = false, errors = [];- loop: while ((input[cursor - 1] != EOF || cursor == 0) && !this._isInvalid) {- var c = input[cursor];- switch (state) {- case "scheme start":- if (c && ALPHA.test(c)) {- buffer += c.toLowerCase();- state = "scheme";- } else if (!stateOverride) {- buffer = "";- state = "no scheme";- continue;- } else {- err("Invalid scheme.");- break loop;- }- break;-- case "scheme":- if (c && ALPHANUMERIC.test(c)) {- buffer += c.toLowerCase();- } else if (":" == c) {- this._scheme = buffer;- buffer = "";- if (stateOverride) {- break loop;- }- if (isRelativeScheme(this._scheme)) {- this._isRelative = true;- }- if ("file" == this._scheme) {- state = "relative";- } else if (this._isRelative && base && base._scheme == this._scheme) {- state = "relative or authority";- } else if (this._isRelative) {- state = "authority first slash";- } else {- state = "scheme data";- }- } else if (!stateOverride) {- buffer = "";- cursor = 0;- state = "no scheme";- continue;- } else if (EOF == c) {- break loop;- } else {- err("Code point not allowed in scheme: " + c);- break loop;- }- break;-- case "scheme data":- if ("?" == c) {- this._query = "?";- state = "query";- } else if ("#" == c) {- this._fragment = "#";- state = "fragment";- } else {- if (EOF != c && "\t" != c && "\n" != c && "\r" != c) {- this._schemeData += percentEscape(c);- }- }- break;-- case "no scheme":- if (!base || !isRelativeScheme(base._scheme)) {- err("Missing scheme.");- invalid.call(this);- } else {- state = "relative";- continue;- }- break;-- case "relative or authority":- if ("/" == c && "/" == input[cursor + 1]) {- state = "authority ignore slashes";- } else {- err("Expected /, got: " + c);- state = "relative";- continue;- }- break;-- case "relative":- this._isRelative = true;- if ("file" != this._scheme) this._scheme = base._scheme;- if (EOF == c) {- this._host = base._host;- this._port = base._port;- this._path = base._path.slice();- this._query = base._query;- this._username = base._username;- this._password = base._password;- break loop;- } else if ("/" == c || "\\" == c) {- if ("\\" == c) err("\\ is an invalid code point.");- state = "relative slash";- } else if ("?" == c) {- this._host = base._host;- this._port = base._port;- this._path = base._path.slice();- this._query = "?";- this._username = base._username;- this._password = base._password;- state = "query";- } else if ("#" == c) {- this._host = base._host;- this._port = base._port;- this._path = base._path.slice();- this._query = base._query;- this._fragment = "#";- this._username = base._username;- this._password = base._password;- state = "fragment";- } else {- var nextC = input[cursor + 1];- var nextNextC = input[cursor + 2];- if ("file" != this._scheme || !ALPHA.test(c) || nextC != ":" && nextC != "|" || EOF != nextNextC && "/" != nextNextC && "\\" != nextNextC && "?" != nextNextC && "#" != nextNextC) {- this._host = base._host;- this._port = base._port;- this._username = base._username;- this._password = base._password;- this._path = base._path.slice();- this._path.pop();- }- state = "relative path";- continue;- }- break;-- case "relative slash":- if ("/" == c || "\\" == c) {- if ("\\" == c) {- err("\\ is an invalid code point.");- }- if ("file" == this._scheme) {- state = "file host";- } else {- state = "authority ignore slashes";- }- } else {- if ("file" != this._scheme) {- this._host = base._host;- this._port = base._port;- this._username = base._username;- this._password = base._password;- }- state = "relative path";- continue;- }- break;-- case "authority first slash":- if ("/" == c) {- state = "authority second slash";- } else {- err("Expected '/', got: " + c);- state = "authority ignore slashes";- continue;- }- break;-- case "authority second slash":- state = "authority ignore slashes";- if ("/" != c) {- err("Expected '/', got: " + c);- continue;- }- break;-- case "authority ignore slashes":- if ("/" != c && "\\" != c) {- state = "authority";- continue;- } else {- err("Expected authority, got: " + c);- }- break;-- case "authority":- if ("@" == c) {- if (seenAt) {- err("@ already seen.");- buffer += "%40";- }- seenAt = true;- for (var i = 0; i < buffer.length; i++) {- var cp = buffer[i];- if ("\t" == cp || "\n" == cp || "\r" == cp) {- err("Invalid whitespace in authority.");- continue;- }- if (":" == cp && null === this._password) {- this._password = "";- continue;- }- var tempC = percentEscape(cp);- null !== this._password ? this._password += tempC : this._username += tempC;- }- buffer = "";- } else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) {- cursor -= buffer.length;- buffer = "";- state = "host";- continue;- } else {- buffer += c;- }- break;-- case "file host":- if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) {- if (buffer.length == 2 && ALPHA.test(buffer[0]) && (buffer[1] == ":" || buffer[1] == "|")) {- state = "relative path";- } else if (buffer.length == 0) {- state = "relative path start";- } else {- this._host = IDNAToASCII.call(this, buffer);- buffer = "";- state = "relative path start";- }- continue;- } else if ("\t" == c || "\n" == c || "\r" == c) {- err("Invalid whitespace in file host.");- } else {- buffer += c;- }- break;-- case "host":- case "hostname":- if (":" == c && !seenBracket) {- this._host = IDNAToASCII.call(this, buffer);- buffer = "";- state = "port";- if ("hostname" == stateOverride) {- break loop;- }- } else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) {- this._host = IDNAToASCII.call(this, buffer);- buffer = "";- state = "relative path start";- if (stateOverride) {- break loop;- }- continue;- } else if ("\t" != c && "\n" != c && "\r" != c) {- if ("[" == c) {- seenBracket = true;- } else if ("]" == c) {- seenBracket = false;- }- buffer += c;- } else {- err("Invalid code point in host/hostname: " + c);- }- break;-- case "port":- if (/[0-9]/.test(c)) {- buffer += c;- } else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c || stateOverride) {- if ("" != buffer) {- var temp = parseInt(buffer, 10);- if (temp != relative[this._scheme]) {- this._port = temp + "";- }- buffer = "";- }- if (stateOverride) {- break loop;- }- state = "relative path start";- continue;- } else if ("\t" == c || "\n" == c || "\r" == c) {- err("Invalid code point in port: " + c);- } else {- invalid.call(this);- }- break;-- case "relative path start":- if ("\\" == c) err("'\\' not allowed in path.");- state = "relative path";- if ("/" != c && "\\" != c) {- continue;- }- break;-- case "relative path":- if (EOF == c || "/" == c || "\\" == c || !stateOverride && ("?" == c || "#" == c)) {- if ("\\" == c) {- err("\\ not allowed in relative path.");- }- var tmp;- if (tmp = relativePathDotMapping[buffer.toLowerCase()]) {- buffer = tmp;- }- if (".." == buffer) {- this._path.pop();- if ("/" != c && "\\" != c) {- this._path.push("");- }- } else if ("." == buffer && "/" != c && "\\" != c) {- this._path.push("");- } else if ("." != buffer) {- if ("file" == this._scheme && this._path.length == 0 && buffer.length == 2 && ALPHA.test(buffer[0]) && buffer[1] == "|") {- buffer = buffer[0] + ":";- }- this._path.push(buffer);- }- buffer = "";- if ("?" == c) {- this._query = "?";- state = "query";- } else if ("#" == c) {- this._fragment = "#";- state = "fragment";- }- } else if ("\t" != c && "\n" != c && "\r" != c) {- buffer += percentEscape(c);- }- break;-- case "query":- if (!stateOverride && "#" == c) {- this._fragment = "#";- state = "fragment";- } else if (EOF != c && "\t" != c && "\n" != c && "\r" != c) {- this._query += percentEscapeQuery(c);- }- break;-- case "fragment":- if (EOF != c && "\t" != c && "\n" != c && "\r" != c) {- this._fragment += c;- }- break;- }- cursor++;- }- }- function clear() {- this._scheme = "";- this._schemeData = "";- this._username = "";- this._password = null;- this._host = "";- this._port = "";- this._path = [];- this._query = "";- this._fragment = "";- this._isInvalid = false;- this._isRelative = false;- }- function jURL(url, base) {- if (base !== undefined && !(base instanceof jURL)) base = new jURL(String(base));- this._url = url;- clear.call(this);- var input = url.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g, "");- parse.call(this, input, null, base);- }- jURL.prototype = {- toString: function() {- return this.href;- },- get href() {- if (this._isInvalid) return this._url;- var authority = "";- if ("" != this._username || null != this._password) {- authority = this._username + (null != this._password ? ":" + this._password : "") + "@";- }- return this.protocol + (this._isRelative ? "//" + authority + this.host : "") + this.pathname + this._query + this._fragment;- },- set href(href) {- clear.call(this);- parse.call(this, href);- },- get protocol() {- return this._scheme + ":";- },- set protocol(protocol) {- if (this._isInvalid) return;- parse.call(this, protocol + ":", "scheme start");- },- get host() {- return this._isInvalid ? "" : this._port ? this._host + ":" + this._port : this._host;- },- set host(host) {- if (this._isInvalid || !this._isRelative) return;- parse.call(this, host, "host");- },- get hostname() {- return this._host;- },- set hostname(hostname) {- if (this._isInvalid || !this._isRelative) return;- parse.call(this, hostname, "hostname");- },- get port() {- return this._port;- },- set port(port) {- if (this._isInvalid || !this._isRelative) return;- parse.call(this, port, "port");- },- get pathname() {- return this._isInvalid ? "" : this._isRelative ? "/" + this._path.join("/") : this._schemeData;- },- set pathname(pathname) {- if (this._isInvalid || !this._isRelative) return;- this._path = [];- parse.call(this, pathname, "relative path start");- },- get search() {- return this._isInvalid || !this._query || "?" == this._query ? "" : this._query;- },- set search(search) {- if (this._isInvalid || !this._isRelative) return;- this._query = "?";- if ("?" == search[0]) search = search.slice(1);- parse.call(this, search, "query");- },- get hash() {- return this._isInvalid || !this._fragment || "#" == this._fragment ? "" : this._fragment;- },- set hash(hash) {- if (this._isInvalid) return;- this._fragment = "#";- if ("#" == hash[0]) hash = hash.slice(1);- parse.call(this, hash, "fragment");- },- get origin() {- var host;- if (this._isInvalid || !this._scheme) {- return "";- }- switch (this._scheme) {- case "data":- case "file":- case "javascript":- case "mailto":- return "null";- }- host = this.host;- if (!host) {- return "";- }- return this._scheme + "://" + host;- }- };- var OriginalURL = scope.URL;- if (OriginalURL) {- jURL.createObjectURL = function(blob) {- return OriginalURL.createObjectURL.apply(OriginalURL, arguments);- };- jURL.revokeObjectURL = function(url) {- OriginalURL.revokeObjectURL(url);- };- }- scope.URL = jURL;-})(self);--(function(global) {- if (global.JsMutationObserver) {- return;- }- var registrationsTable = new WeakMap();- var setImmediate;- if (/Trident|Edge/.test(navigator.userAgent)) {- setImmediate = setTimeout;- } else if (window.setImmediate) {- setImmediate = window.setImmediate;- } else {- var setImmediateQueue = [];- var sentinel = String(Math.random());- window.addEventListener("message", function(e) {- if (e.data === sentinel) {- var queue = setImmediateQueue;- setImmediateQueue = [];- queue.forEach(function(func) {- func();- });- }- });- setImmediate = function(func) {- setImmediateQueue.push(func);- window.postMessage(sentinel, "*");- };- }- var isScheduled = false;- var scheduledObservers = [];- function scheduleCallback(observer) {- scheduledObservers.push(observer);- if (!isScheduled) {- isScheduled = true;- setImmediate(dispatchCallbacks);- }- }- function wrapIfNeeded(node) {- return window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(node) || node;- }- function dispatchCallbacks() {- isScheduled = false;- var observers = scheduledObservers;- scheduledObservers = [];- observers.sort(function(o1, o2) {- return o1.uid_ - o2.uid_;- });- var anyNonEmpty = false;- observers.forEach(function(observer) {- var queue = observer.takeRecords();- removeTransientObserversFor(observer);- if (queue.length) {- observer.callback_(queue, observer);- anyNonEmpty = true;- }- });- if (anyNonEmpty) dispatchCallbacks();- }- function removeTransientObserversFor(observer) {- observer.nodes_.forEach(function(node) {- var registrations = registrationsTable.get(node);- if (!registrations) return;- registrations.forEach(function(registration) {- if (registration.observer === observer) registration.removeTransientObservers();- });- });- }- function forEachAncestorAndObserverEnqueueRecord(target, callback) {- for (var node = target; node; node = node.parentNode) {- var registrations = registrationsTable.get(node);- if (registrations) {- for (var j = 0; j < registrations.length; j++) {- var registration = registrations[j];- var options = registration.options;- if (node !== target && !options.subtree) continue;- var record = callback(options);- if (record) registration.enqueue(record);- }- }- }- }- var uidCounter = 0;- function JsMutationObserver(callback) {- this.callback_ = callback;- this.nodes_ = [];- this.records_ = [];- this.uid_ = ++uidCounter;- }- JsMutationObserver.prototype = {- observe: function(target, options) {- target = wrapIfNeeded(target);- if (!options.childList && !options.attributes && !options.characterData || options.attributeOldValue && !options.attributes || options.attributeFilter && options.attributeFilter.length && !options.attributes || options.characterDataOldValue && !options.characterData) {- throw new SyntaxError();- }- var registrations = registrationsTable.get(target);- if (!registrations) registrationsTable.set(target, registrations = []);- var registration;- for (var i = 0; i < registrations.length; i++) {- if (registrations[i].observer === this) {- registration = registrations[i];- registration.removeListeners();- registration.options = options;- break;- }- }- if (!registration) {- registration = new Registration(this, target, options);- registrations.push(registration);- this.nodes_.push(target);- }- registration.addListeners();- },- disconnect: function() {- this.nodes_.forEach(function(node) {- var registrations = registrationsTable.get(node);- for (var i = 0; i < registrations.length; i++) {- var registration = registrations[i];- if (registration.observer === this) {- registration.removeListeners();- registrations.splice(i, 1);- break;- }- }- }, this);- this.records_ = [];- },- takeRecords: function() {- var copyOfRecords = this.records_;- this.records_ = [];- return copyOfRecords;- }- };- function MutationRecord(type, target) {- this.type = type;- this.target = target;- this.addedNodes = [];- this.removedNodes = [];- this.previousSibling = null;- this.nextSibling = null;- this.attributeName = null;- this.attributeNamespace = null;- this.oldValue = null;- }- function copyMutationRecord(original) {- var record = new MutationRecord(original.type, original.target);- record.addedNodes = original.addedNodes.slice();- record.removedNodes = original.removedNodes.slice();- record.previousSibling = original.previousSibling;- record.nextSibling = original.nextSibling;- record.attributeName = original.attributeName;- record.attributeNamespace = original.attributeNamespace;- record.oldValue = original.oldValue;- return record;- }- var currentRecord, recordWithOldValue;- function getRecord(type, target) {- return currentRecord = new MutationRecord(type, target);- }- function getRecordWithOldValue(oldValue) {- if (recordWithOldValue) return recordWithOldValue;- recordWithOldValue = copyMutationRecord(currentRecord);- recordWithOldValue.oldValue = oldValue;- return recordWithOldValue;- }- function clearRecords() {- currentRecord = recordWithOldValue = undefined;- }- function recordRepresentsCurrentMutation(record) {- return record === recordWithOldValue || record === currentRecord;- }- function selectRecord(lastRecord, newRecord) {- if (lastRecord === newRecord) return lastRecord;- if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord)) return recordWithOldValue;- return null;- }- function Registration(observer, target, options) {- this.observer = observer;- this.target = target;- this.options = options;- this.transientObservedNodes = [];- }- Registration.prototype = {- enqueue: function(record) {- var records = this.observer.records_;- var length = records.length;- if (records.length > 0) {- var lastRecord = records[length - 1];- var recordToReplaceLast = selectRecord(lastRecord, record);- if (recordToReplaceLast) {- records[length - 1] = recordToReplaceLast;- return;- }- } else {- scheduleCallback(this.observer);- }- records[length] = record;- },- addListeners: function() {- this.addListeners_(this.target);- },- addListeners_: function(node) {- var options = this.options;- if (options.attributes) node.addEventListener("DOMAttrModified", this, true);- if (options.characterData) node.addEventListener("DOMCharacterDataModified", this, true);- if (options.childList) node.addEventListener("DOMNodeInserted", this, true);- if (options.childList || options.subtree) node.addEventListener("DOMNodeRemoved", this, true);- },- removeListeners: function() {- this.removeListeners_(this.target);- },- removeListeners_: function(node) {- var options = this.options;- if (options.attributes) node.removeEventListener("DOMAttrModified", this, true);- if (options.characterData) node.removeEventListener("DOMCharacterDataModified", this, true);- if (options.childList) node.removeEventListener("DOMNodeInserted", this, true);- if (options.childList || options.subtree) node.removeEventListener("DOMNodeRemoved", this, true);- },- addTransientObserver: function(node) {- if (node === this.target) return;- this.addListeners_(node);- this.transientObservedNodes.push(node);- var registrations = registrationsTable.get(node);- if (!registrations) registrationsTable.set(node, registrations = []);- registrations.push(this);- },- removeTransientObservers: function() {- var transientObservedNodes = this.transientObservedNodes;- this.transientObservedNodes = [];- transientObservedNodes.forEach(function(node) {- this.removeListeners_(node);- var registrations = registrationsTable.get(node);- for (var i = 0; i < registrations.length; i++) {- if (registrations[i] === this) {- registrations.splice(i, 1);- break;- }- }- }, this);- },- handleEvent: function(e) {- e.stopImmediatePropagation();- switch (e.type) {- case "DOMAttrModified":- var name = e.attrName;- var namespace = e.relatedNode.namespaceURI;- var target = e.target;- var record = new getRecord("attributes", target);- record.attributeName = name;- record.attributeNamespace = namespace;- var oldValue = e.attrChange === MutationEvent.ADDITION ? null : e.prevValue;- forEachAncestorAndObserverEnqueueRecord(target, function(options) {- if (!options.attributes) return;- if (options.attributeFilter && options.attributeFilter.length && options.attributeFilter.indexOf(name) === -1 && options.attributeFilter.indexOf(namespace) === -1) {- return;- }- if (options.attributeOldValue) return getRecordWithOldValue(oldValue);- return record;- });- break;-- case "DOMCharacterDataModified":- var target = e.target;- var record = getRecord("characterData", target);- var oldValue = e.prevValue;- forEachAncestorAndObserverEnqueueRecord(target, function(options) {- if (!options.characterData) return;- if (options.characterDataOldValue) return getRecordWithOldValue(oldValue);- return record;- });- break;-- case "DOMNodeRemoved":- this.addTransientObserver(e.target);-- case "DOMNodeInserted":- var changedNode = e.target;- var addedNodes, removedNodes;- if (e.type === "DOMNodeInserted") {- addedNodes = [ changedNode ];- removedNodes = [];- } else {- addedNodes = [];- removedNodes = [ changedNode ];- }- var previousSibling = changedNode.previousSibling;- var nextSibling = changedNode.nextSibling;- var record = getRecord("childList", e.target.parentNode);- record.addedNodes = addedNodes;- record.removedNodes = removedNodes;- record.previousSibling = previousSibling;- record.nextSibling = nextSibling;- forEachAncestorAndObserverEnqueueRecord(e.relatedNode, function(options) {- if (!options.childList) return;- return record;- });- }- clearRecords();- }- };- global.JsMutationObserver = JsMutationObserver;- if (!global.MutationObserver) {- global.MutationObserver = JsMutationObserver;- JsMutationObserver._isPolyfilled = true;- }-})(self);--(function(scope) {- "use strict";- if (!(window.performance && window.performance.now)) {- var start = Date.now();- window.performance = {- now: function() {- return Date.now() - start;- }- };- }- if (!window.requestAnimationFrame) {- window.requestAnimationFrame = function() {- var nativeRaf = window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame;- return nativeRaf ? function(callback) {- return nativeRaf(function() {- callback(performance.now());- });- } : function(callback) {- return window.setTimeout(callback, 1e3 / 60);- };- }();- }- if (!window.cancelAnimationFrame) {- window.cancelAnimationFrame = function() {- return window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || function(id) {- clearTimeout(id);- };- }();- }- var workingDefaultPrevented = function() {- var e = document.createEvent("Event");- e.initEvent("foo", true, true);- e.preventDefault();- return e.defaultPrevented;- }();- if (!workingDefaultPrevented) {- var origPreventDefault = Event.prototype.preventDefault;- Event.prototype.preventDefault = function() {- if (!this.cancelable) {- return;- }- origPreventDefault.call(this);- Object.defineProperty(this, "defaultPrevented", {- get: function() {- return true;- },- configurable: true- });- };- }- var isIE = /Trident/.test(navigator.userAgent);- if (!window.CustomEvent || isIE && typeof window.CustomEvent !== "function") {- window.CustomEvent = function(inType, params) {- params = params || {};- var e = document.createEvent("CustomEvent");- e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);- return e;- };- window.CustomEvent.prototype = window.Event.prototype;- }- if (!window.Event || isIE && typeof window.Event !== "function") {- var origEvent = window.Event;- window.Event = function(inType, params) {- params = params || {};- var e = document.createEvent("Event");- e.initEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable));- return e;- };- window.Event.prototype = origEvent.prototype;- }-})(window.WebComponents);--window.HTMLImports = window.HTMLImports || {- flags: {}-};--(function(scope) {- var IMPORT_LINK_TYPE = "import";- var useNative = Boolean(IMPORT_LINK_TYPE in document.createElement("link"));- var hasShadowDOMPolyfill = Boolean(window.ShadowDOMPolyfill);- var wrap = function(node) {- return hasShadowDOMPolyfill ? window.ShadowDOMPolyfill.wrapIfNeeded(node) : node;- };- var rootDocument = wrap(document);- var currentScriptDescriptor = {- get: function() {- var script = window.HTMLImports.currentScript || document.currentScript || (document.readyState !== "complete" ? document.scripts[document.scripts.length - 1] : null);- return wrap(script);- },- configurable: true- };- Object.defineProperty(document, "_currentScript", currentScriptDescriptor);- Object.defineProperty(rootDocument, "_currentScript", currentScriptDescriptor);- var isIE = /Trident/.test(navigator.userAgent);- function whenReady(callback, doc) {- doc = doc || rootDocument;- whenDocumentReady(function() {- watchImportsLoad(callback, doc);- }, doc);- }- var requiredReadyState = isIE ? "complete" : "interactive";- var READY_EVENT = "readystatechange";- function isDocumentReady(doc) {- return doc.readyState === "complete" || doc.readyState === requiredReadyState;- }- function whenDocumentReady(callback, doc) {- if (!isDocumentReady(doc)) {- var checkReady = function() {- if (doc.readyState === "complete" || doc.readyState === requiredReadyState) {- doc.removeEventListener(READY_EVENT, checkReady);- whenDocumentReady(callback, doc);- }- };- doc.addEventListener(READY_EVENT, checkReady);- } else if (callback) {- callback();- }- }- function markTargetLoaded(event) {- event.target.__loaded = true;- }- function watchImportsLoad(callback, doc) {- var imports = doc.querySelectorAll("link[rel=import]");- var parsedCount = 0, importCount = imports.length, newImports = [], errorImports = [];- function checkDone() {- if (parsedCount == importCount && callback) {- callback({- allImports: imports,- loadedImports: newImports,- errorImports: errorImports- });- }- }- function loadedImport(e) {- markTargetLoaded(e);- newImports.push(this);- parsedCount++;- checkDone();- }- function errorLoadingImport(e) {- errorImports.push(this);- parsedCount++;- checkDone();- }- if (importCount) {- for (var i = 0, imp; i < importCount && (imp = imports[i]); i++) {- if (isImportLoaded(imp)) {- newImports.push(this);- parsedCount++;- checkDone();- } else {- imp.addEventListener("load", loadedImport);- imp.addEventListener("error", errorLoadingImport);- }- }- } else {- checkDone();- }- }- function isImportLoaded(link) {- return useNative ? link.__loaded || link.import && link.import.readyState !== "loading" : link.__importParsed;- }- if (useNative) {- new MutationObserver(function(mxns) {- for (var i = 0, l = mxns.length, m; i < l && (m = mxns[i]); i++) {- if (m.addedNodes) {- handleImports(m.addedNodes);- }- }- }).observe(document.head, {- childList: true- });- function handleImports(nodes) {- for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {- if (isImport(n)) {- handleImport(n);- }- }- }- function isImport(element) {- return element.localName === "link" && element.rel === "import";- }- function handleImport(element) {- var loaded = element.import;- if (loaded) {- markTargetLoaded({- target: element- });- } else {- element.addEventListener("load", markTargetLoaded);- element.addEventListener("error", markTargetLoaded);- }- }- (function() {- if (document.readyState === "loading") {- var imports = document.querySelectorAll("link[rel=import]");- for (var i = 0, l = imports.length, imp; i < l && (imp = imports[i]); i++) {- handleImport(imp);- }- }- })();- }- whenReady(function(detail) {- window.HTMLImports.ready = true;- window.HTMLImports.readyTime = new Date().getTime();- var evt = rootDocument.createEvent("CustomEvent");- evt.initCustomEvent("HTMLImportsLoaded", true, true, detail);- rootDocument.dispatchEvent(evt);- });- scope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE;- scope.useNative = useNative;- scope.rootDocument = rootDocument;- scope.whenReady = whenReady;- scope.isIE = isIE;-})(window.HTMLImports);--(function(scope) {- var modules = [];- var addModule = function(module) {- modules.push(module);- };- var initializeModules = function() {- modules.forEach(function(module) {- module(scope);- });- };- scope.addModule = addModule;- scope.initializeModules = initializeModules;-})(window.HTMLImports);--window.HTMLImports.addModule(function(scope) {- var CSS_URL_REGEXP = /(url\()([^)]*)(\))/g;- var CSS_IMPORT_REGEXP = /(@import[\s]+(?!url\())([^;]*)(;)/g;- var path = {- resolveUrlsInStyle: function(style, linkUrl) {- var doc = style.ownerDocument;- var resolver = doc.createElement("a");- style.textContent = this.resolveUrlsInCssText(style.textContent, linkUrl, resolver);- return style;- },- resolveUrlsInCssText: function(cssText, linkUrl, urlObj) {- var r = this.replaceUrls(cssText, urlObj, linkUrl, CSS_URL_REGEXP);- r = this.replaceUrls(r, urlObj, linkUrl, CSS_IMPORT_REGEXP);- return r;- },- replaceUrls: function(text, urlObj, linkUrl, regexp) {- return text.replace(regexp, function(m, pre, url, post) {- var urlPath = url.replace(/["']/g, "");- if (linkUrl) {- urlPath = new URL(urlPath, linkUrl).href;- }- urlObj.href = urlPath;- urlPath = urlObj.href;- return pre + "'" + urlPath + "'" + post;- });- }- };- scope.path = path;-});--window.HTMLImports.addModule(function(scope) {- var xhr = {- async: true,- ok: function(request) {- return request.status >= 200 && request.status < 300 || request.status === 304 || request.status === 0;- },- load: function(url, next, nextContext) {- var request = new XMLHttpRequest();- if (scope.flags.debug || scope.flags.bust) {- url += "?" + Math.random();- }- request.open("GET", url, xhr.async);- request.addEventListener("readystatechange", function(e) {- if (request.readyState === 4) {- var redirectedUrl = null;- try {- var locationHeader = request.getResponseHeader("Location");- if (locationHeader) {- redirectedUrl = locationHeader.substr(0, 1) === "/" ? location.origin + locationHeader : locationHeader;- }- } catch (e) {- console.error(e.message);- }- next.call(nextContext, !xhr.ok(request) && request, request.response || request.responseText, redirectedUrl);- }- });- request.send();- return request;- },- loadDocument: function(url, next, nextContext) {- this.load(url, next, nextContext).responseType = "document";- }- };- scope.xhr = xhr;-});--window.HTMLImports.addModule(function(scope) {- var xhr = scope.xhr;- var flags = scope.flags;- var Loader = function(onLoad, onComplete) {- this.cache = {};- this.onload = onLoad;- this.oncomplete = onComplete;- this.inflight = 0;- this.pending = {};- };- Loader.prototype = {- addNodes: function(nodes) {- this.inflight += nodes.length;- for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {- this.require(n);- }- this.checkDone();- },- addNode: function(node) {- this.inflight++;- this.require(node);- this.checkDone();- },- require: function(elt) {- var url = elt.src || elt.href;- elt.__nodeUrl = url;- if (!this.dedupe(url, elt)) {- this.fetch(url, elt);- }- },- dedupe: function(url, elt) {- if (this.pending[url]) {- this.pending[url].push(elt);- return true;- }- var resource;- if (this.cache[url]) {- this.onload(url, elt, this.cache[url]);- this.tail();- return true;- }- this.pending[url] = [ elt ];- return false;- },- fetch: function(url, elt) {- flags.load && console.log("fetch", url, elt);- if (!url) {- setTimeout(function() {- this.receive(url, elt, {- error: "href must be specified"- }, null);- }.bind(this), 0);- } else if (url.match(/^data:/)) {- var pieces = url.split(",");- var header = pieces[0];- var body = pieces[1];- if (header.indexOf(";base64") > -1) {- body = atob(body);- } else {- body = decodeURIComponent(body);- }- setTimeout(function() {- this.receive(url, elt, null, body);- }.bind(this), 0);- } else {- var receiveXhr = function(err, resource, redirectedUrl) {- this.receive(url, elt, err, resource, redirectedUrl);- }.bind(this);- xhr.load(url, receiveXhr);- }- },- receive: function(url, elt, err, resource, redirectedUrl) {- this.cache[url] = resource;- var $p = this.pending[url];- for (var i = 0, l = $p.length, p; i < l && (p = $p[i]); i++) {- this.onload(url, p, resource, err, redirectedUrl);- this.tail();- }- this.pending[url] = null;- },- tail: function() {- --this.inflight;- this.checkDone();- },- checkDone: function() {- if (!this.inflight) {- this.oncomplete();- }- }- };- scope.Loader = Loader;-});--window.HTMLImports.addModule(function(scope) {- var Observer = function(addCallback) {- this.addCallback = addCallback;- this.mo = new MutationObserver(this.handler.bind(this));- };- Observer.prototype = {- handler: function(mutations) {- for (var i = 0, l = mutations.length, m; i < l && (m = mutations[i]); i++) {- if (m.type === "childList" && m.addedNodes.length) {- this.addedNodes(m.addedNodes);- }- }- },- addedNodes: function(nodes) {- if (this.addCallback) {- this.addCallback(nodes);- }- for (var i = 0, l = nodes.length, n, loading; i < l && (n = nodes[i]); i++) {- if (n.children && n.children.length) {- this.addedNodes(n.children);- }- }- },- observe: function(root) {- this.mo.observe(root, {- childList: true,- subtree: true- });- }- };- scope.Observer = Observer;-});--window.HTMLImports.addModule(function(scope) {- var path = scope.path;- var rootDocument = scope.rootDocument;- var flags = scope.flags;- var isIE = scope.isIE;- var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;- var IMPORT_SELECTOR = "link[rel=" + IMPORT_LINK_TYPE + "]";- var importParser = {- documentSelectors: IMPORT_SELECTOR,- importsSelectors: [ IMPORT_SELECTOR, "link[rel=stylesheet]:not([type])", "style:not([type])", "script:not([type])", 'script[type="application/javascript"]', 'script[type="text/javascript"]' ].join(","),- map: {- link: "parseLink",- script: "parseScript",- style: "parseStyle"- },- dynamicElements: [],- parseNext: function() {- var next = this.nextToParse();- if (next) {- this.parse(next);- }- },- parse: function(elt) {- if (this.isParsed(elt)) {- flags.parse && console.log("[%s] is already parsed", elt.localName);- return;- }- var fn = this[this.map[elt.localName]];- if (fn) {- this.markParsing(elt);- fn.call(this, elt);- }- },- parseDynamic: function(elt, quiet) {- this.dynamicElements.push(elt);- if (!quiet) {- this.parseNext();- }- },- markParsing: function(elt) {- flags.parse && console.log("parsing", elt);- this.parsingElement = elt;- },- markParsingComplete: function(elt) {- elt.__importParsed = true;- this.markDynamicParsingComplete(elt);- if (elt.__importElement) {- elt.__importElement.__importParsed = true;- this.markDynamicParsingComplete(elt.__importElement);- }- this.parsingElement = null;- flags.parse && console.log("completed", elt);- },- markDynamicParsingComplete: function(elt) {- var i = this.dynamicElements.indexOf(elt);- if (i >= 0) {- this.dynamicElements.splice(i, 1);- }- },- parseImport: function(elt) {- elt.import = elt.__doc;- if (window.HTMLImports.__importsParsingHook) {- window.HTMLImports.__importsParsingHook(elt);- }- if (elt.import) {- elt.import.__importParsed = true;- }- this.markParsingComplete(elt);- if (elt.__resource && !elt.__error) {- elt.dispatchEvent(new CustomEvent("load", {- bubbles: false- }));- } else {- elt.dispatchEvent(new CustomEvent("error", {- bubbles: false- }));- }- if (elt.__pending) {- var fn;- while (elt.__pending.length) {- fn = elt.__pending.shift();- if (fn) {- fn({- target: elt- });- }- }- }- this.parseNext();- },- parseLink: function(linkElt) {- if (nodeIsImport(linkElt)) {- this.parseImport(linkElt);- } else {- linkElt.href = linkElt.href;- this.parseGeneric(linkElt);- }- },- parseStyle: function(elt) {- var src = elt;- elt = cloneStyle(elt);- src.__appliedElement = elt;- elt.__importElement = src;- this.parseGeneric(elt);- },- parseGeneric: function(elt) {- this.trackElement(elt);- this.addElementToDocument(elt);- },- rootImportForElement: function(elt) {- var n = elt;- while (n.ownerDocument.__importLink) {- n = n.ownerDocument.__importLink;- }- return n;- },- addElementToDocument: function(elt) {- var port = this.rootImportForElement(elt.__importElement || elt);- port.parentNode.insertBefore(elt, port);- },- trackElement: function(elt, callback) {- var self = this;- var done = function(e) {- elt.removeEventListener("load", done);- elt.removeEventListener("error", done);- if (callback) {- callback(e);- }- self.markParsingComplete(elt);- self.parseNext();- };- elt.addEventListener("load", done);- elt.addEventListener("error", done);- if (isIE && elt.localName === "style") {- var fakeLoad = false;- if (elt.textContent.indexOf("@import") == -1) {- fakeLoad = true;- } else if (elt.sheet) {- fakeLoad = true;- var csr = elt.sheet.cssRules;- var len = csr ? csr.length : 0;- for (var i = 0, r; i < len && (r = csr[i]); i++) {- if (r.type === CSSRule.IMPORT_RULE) {- fakeLoad = fakeLoad && Boolean(r.styleSheet);- }- }- }- if (fakeLoad) {- setTimeout(function() {- elt.dispatchEvent(new CustomEvent("load", {- bubbles: false- }));- });- }- }- },- parseScript: function(scriptElt) {- var script = document.createElement("script");- script.__importElement = scriptElt;- script.src = scriptElt.src ? scriptElt.src : generateScriptDataUrl(scriptElt);- scope.currentScript = scriptElt;- this.trackElement(script, function(e) {- if (script.parentNode) {- script.parentNode.removeChild(script);- }- scope.currentScript = null;- });- this.addElementToDocument(script);- },- nextToParse: function() {- this._mayParse = [];- return !this.parsingElement && (this.nextToParseInDoc(rootDocument) || this.nextToParseDynamic());- },- nextToParseInDoc: function(doc, link) {- if (doc && this._mayParse.indexOf(doc) < 0) {- this._mayParse.push(doc);- var nodes = doc.querySelectorAll(this.parseSelectorsForNode(doc));- for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {- if (!this.isParsed(n)) {- if (this.hasResource(n)) {- return nodeIsImport(n) ? this.nextToParseInDoc(n.__doc, n) : n;- } else {- return;- }- }- }- }- return link;- },- nextToParseDynamic: function() {- return this.dynamicElements[0];- },- parseSelectorsForNode: function(node) {- var doc = node.ownerDocument || node;- return doc === rootDocument ? this.documentSelectors : this.importsSelectors;- },- isParsed: function(node) {- return node.__importParsed;- },- needsDynamicParsing: function(elt) {- return this.dynamicElements.indexOf(elt) >= 0;- },- hasResource: function(node) {- if (nodeIsImport(node) && node.__doc === undefined) {- return false;- }- return true;- }- };- function nodeIsImport(elt) {- return elt.localName === "link" && elt.rel === IMPORT_LINK_TYPE;- }- function generateScriptDataUrl(script) {- var scriptContent = generateScriptContent(script);- return "data:text/javascript;charset=utf-8," + encodeURIComponent(scriptContent);- }- function generateScriptContent(script) {- return script.textContent + generateSourceMapHint(script);- }- function generateSourceMapHint(script) {- var owner = script.ownerDocument;- owner.__importedScripts = owner.__importedScripts || 0;- var moniker = script.ownerDocument.baseURI;- var num = owner.__importedScripts ? "-" + owner.__importedScripts : "";- owner.__importedScripts++;- return "\n//# sourceURL=" + moniker + num + ".js\n";- }- function cloneStyle(style) {- var clone = style.ownerDocument.createElement("style");- clone.textContent = style.textContent;- path.resolveUrlsInStyle(clone);- return clone;- }- scope.parser = importParser;- scope.IMPORT_SELECTOR = IMPORT_SELECTOR;-});--window.HTMLImports.addModule(function(scope) {- var flags = scope.flags;- var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;- var IMPORT_SELECTOR = scope.IMPORT_SELECTOR;- var rootDocument = scope.rootDocument;- var Loader = scope.Loader;- var Observer = scope.Observer;- var parser = scope.parser;- var importer = {- documents: {},- documentPreloadSelectors: IMPORT_SELECTOR,- importsPreloadSelectors: [ IMPORT_SELECTOR ].join(","),- loadNode: function(node) {- importLoader.addNode(node);- },- loadSubtree: function(parent) {- var nodes = this.marshalNodes(parent);- importLoader.addNodes(nodes);- },- marshalNodes: function(parent) {- return parent.querySelectorAll(this.loadSelectorsForNode(parent));- },- loadSelectorsForNode: function(node) {- var doc = node.ownerDocument || node;- return doc === rootDocument ? this.documentPreloadSelectors : this.importsPreloadSelectors;- },- loaded: function(url, elt, resource, err, redirectedUrl) {- flags.load && console.log("loaded", url, elt);- elt.__resource = resource;- elt.__error = err;- if (isImportLink(elt)) {- var doc = this.documents[url];- if (doc === undefined) {- doc = err ? null : makeDocument(resource, redirectedUrl || url);- if (doc) {- doc.__importLink = elt;- this.bootDocument(doc);- }- this.documents[url] = doc;- }- elt.__doc = doc;- }- parser.parseNext();- },- bootDocument: function(doc) {- this.loadSubtree(doc);- this.observer.observe(doc);- parser.parseNext();- },- loadedAll: function() {- parser.parseNext();- }- };- var importLoader = new Loader(importer.loaded.bind(importer), importer.loadedAll.bind(importer));- importer.observer = new Observer();- function isImportLink(elt) {- return isLinkRel(elt, IMPORT_LINK_TYPE);- }- function isLinkRel(elt, rel) {- return elt.localName === "link" && elt.getAttribute("rel") === rel;- }- function hasBaseURIAccessor(doc) {- return !!Object.getOwnPropertyDescriptor(doc, "baseURI");- }- function makeDocument(resource, url) {- var doc = document.implementation.createHTMLDocument(IMPORT_LINK_TYPE);- doc._URL = url;- var base = doc.createElement("base");- base.setAttribute("href", url);- if (!doc.baseURI && !hasBaseURIAccessor(doc)) {- Object.defineProperty(doc, "baseURI", {- value: url- });- }- var meta = doc.createElement("meta");- meta.setAttribute("charset", "utf-8");- doc.head.appendChild(meta);- doc.head.appendChild(base);- doc.body.innerHTML = resource;- if (window.HTMLTemplateElement && HTMLTemplateElement.bootstrap) {- HTMLTemplateElement.bootstrap(doc);- }- return doc;- }- if (!document.baseURI) {- var baseURIDescriptor = {- get: function() {- var base = document.querySelector("base");- return base ? base.href : window.location.href;- },- configurable: true- };- Object.defineProperty(document, "baseURI", baseURIDescriptor);- Object.defineProperty(rootDocument, "baseURI", baseURIDescriptor);- }- scope.importer = importer;- scope.importLoader = importLoader;-});--window.HTMLImports.addModule(function(scope) {- var parser = scope.parser;- var importer = scope.importer;- var dynamic = {- added: function(nodes) {- var owner, parsed, loading;- for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {- if (!owner) {- owner = n.ownerDocument;- parsed = parser.isParsed(owner);- }- loading = this.shouldLoadNode(n);- if (loading) {- importer.loadNode(n);- }- if (this.shouldParseNode(n) && parsed) {- parser.parseDynamic(n, loading);- }- }- },- shouldLoadNode: function(node) {- return node.nodeType === 1 && matches.call(node, importer.loadSelectorsForNode(node));- },- shouldParseNode: function(node) {- return node.nodeType === 1 && matches.call(node, parser.parseSelectorsForNode(node));- }- };- importer.observer.addCallback = dynamic.added.bind(dynamic);- var matches = HTMLElement.prototype.matches || HTMLElement.prototype.matchesSelector || HTMLElement.prototype.webkitMatchesSelector || HTMLElement.prototype.mozMatchesSelector || HTMLElement.prototype.msMatchesSelector;-});--(function(scope) {- var initializeModules = scope.initializeModules;- var isIE = scope.isIE;- if (scope.useNative) {- return;- }- initializeModules();- var rootDocument = scope.rootDocument;- function bootstrap() {- window.HTMLImports.importer.bootDocument(rootDocument);- }- if (document.readyState === "complete" || document.readyState === "interactive" && !window.attachEvent) {- bootstrap();- } else {- document.addEventListener("DOMContentLoaded", bootstrap);- }-})(window.HTMLImports);--window.CustomElements = window.CustomElements || {- flags: {}-};--(function(scope) {- var flags = scope.flags;- var modules = [];- var addModule = function(module) {- modules.push(module);- };- var initializeModules = function() {- modules.forEach(function(module) {- module(scope);- });- };- scope.addModule = addModule;- scope.initializeModules = initializeModules;- scope.hasNative = Boolean(document.registerElement);- scope.isIE = /Trident/.test(navigator.userAgent);- scope.useNative = !flags.register && scope.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || window.HTMLImports.useNative);-})(window.CustomElements);--window.CustomElements.addModule(function(scope) {- var IMPORT_LINK_TYPE = window.HTMLImports ? window.HTMLImports.IMPORT_LINK_TYPE : "none";- function forSubtree(node, cb) {- findAllElements(node, function(e) {- if (cb(e)) {- return true;- }- forRoots(e, cb);- });- forRoots(node, cb);- }- function findAllElements(node, find, data) {- var e = node.firstElementChild;- if (!e) {- e = node.firstChild;- while (e && e.nodeType !== Node.ELEMENT_NODE) {- e = e.nextSibling;- }- }- while (e) {- if (find(e, data) !== true) {- findAllElements(e, find, data);- }- e = e.nextElementSibling;- }- return null;- }- function forRoots(node, cb) {- var root = node.shadowRoot;- while (root) {- forSubtree(root, cb);- root = root.olderShadowRoot;- }- }- function forDocumentTree(doc, cb) {- _forDocumentTree(doc, cb, []);- }- function _forDocumentTree(doc, cb, processingDocuments) {- doc = window.wrap(doc);- if (processingDocuments.indexOf(doc) >= 0) {- return;- }- processingDocuments.push(doc);- var imports = doc.querySelectorAll("link[rel=" + IMPORT_LINK_TYPE + "]");- for (var i = 0, l = imports.length, n; i < l && (n = imports[i]); i++) {- if (n.import) {- _forDocumentTree(n.import, cb, processingDocuments);- }- }- cb(doc);- }- scope.forDocumentTree = forDocumentTree;- scope.forSubtree = forSubtree;-});--window.CustomElements.addModule(function(scope) {- var flags = scope.flags;- var forSubtree = scope.forSubtree;- var forDocumentTree = scope.forDocumentTree;- function addedNode(node, isAttached) {- return added(node, isAttached) || addedSubtree(node, isAttached);- }- function added(node, isAttached) {- if (scope.upgrade(node, isAttached)) {- return true;- }- if (isAttached) {- attached(node);- }- }- function addedSubtree(node, isAttached) {- forSubtree(node, function(e) {- if (added(e, isAttached)) {- return true;- }- });- }- var hasThrottledAttached = window.MutationObserver._isPolyfilled && flags["throttle-attached"];- scope.hasPolyfillMutations = hasThrottledAttached;- scope.hasThrottledAttached = hasThrottledAttached;- var isPendingMutations = false;- var pendingMutations = [];- function deferMutation(fn) {- pendingMutations.push(fn);- if (!isPendingMutations) {- isPendingMutations = true;- setTimeout(takeMutations);- }- }- function takeMutations() {- isPendingMutations = false;- var $p = pendingMutations;- for (var i = 0, l = $p.length, p; i < l && (p = $p[i]); i++) {- p();- }- pendingMutations = [];- }- function attached(element) {- if (hasThrottledAttached) {- deferMutation(function() {- _attached(element);- });- } else {- _attached(element);- }- }- function _attached(element) {- if (element.__upgraded__ && !element.__attached) {- element.__attached = true;- if (element.attachedCallback) {- element.attachedCallback();- }- }- }- function detachedNode(node) {- detached(node);- forSubtree(node, function(e) {- detached(e);- });- }- function detached(element) {- if (hasThrottledAttached) {- deferMutation(function() {- _detached(element);- });- } else {- _detached(element);- }- }- function _detached(element) {- if (element.__upgraded__ && element.__attached) {- element.__attached = false;- if (element.detachedCallback) {- element.detachedCallback();- }- }- }- function inDocument(element) {- var p = element;- var doc = window.wrap(document);- while (p) {- if (p == doc) {- return true;- }- p = p.parentNode || p.nodeType === Node.DOCUMENT_FRAGMENT_NODE && p.host;- }- }- function watchShadow(node) {- if (node.shadowRoot && !node.shadowRoot.__watched) {- flags.dom && console.log("watching shadow-root for: ", node.localName);- var root = node.shadowRoot;- while (root) {- observe(root);- root = root.olderShadowRoot;- }- }- }- function handler(root, mutations) {- if (flags.dom) {- var mx = mutations[0];- if (mx && mx.type === "childList" && mx.addedNodes) {- if (mx.addedNodes) {- var d = mx.addedNodes[0];- while (d && d !== document && !d.host) {- d = d.parentNode;- }- var u = d && (d.URL || d._URL || d.host && d.host.localName) || "";- u = u.split("/?").shift().split("/").pop();- }- }- console.group("mutations (%d) [%s]", mutations.length, u || "");- }- var isAttached = inDocument(root);- mutations.forEach(function(mx) {- if (mx.type === "childList") {- forEach(mx.addedNodes, function(n) {- if (!n.localName) {- return;- }- addedNode(n, isAttached);- });- forEach(mx.removedNodes, function(n) {- if (!n.localName) {- return;- }- detachedNode(n);- });- }- });- flags.dom && console.groupEnd();- }- function takeRecords(node) {- node = window.wrap(node);- if (!node) {- node = window.wrap(document);- }- while (node.parentNode) {- node = node.parentNode;- }- var observer = node.__observer;- if (observer) {- handler(node, observer.takeRecords());- takeMutations();- }- }- var forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);- function observe(inRoot) {- if (inRoot.__observer) {- return;- }- var observer = new MutationObserver(handler.bind(this, inRoot));- observer.observe(inRoot, {- childList: true,- subtree: true- });- inRoot.__observer = observer;- }- function upgradeDocument(doc) {- doc = window.wrap(doc);- flags.dom && console.group("upgradeDocument: ", doc.baseURI.split("/").pop());- var isMainDocument = doc === window.wrap(document);- addedNode(doc, isMainDocument);- observe(doc);- flags.dom && console.groupEnd();- }- function upgradeDocumentTree(doc) {- forDocumentTree(doc, upgradeDocument);- }- var originalCreateShadowRoot = Element.prototype.createShadowRoot;- if (originalCreateShadowRoot) {- Element.prototype.createShadowRoot = function() {- var root = originalCreateShadowRoot.call(this);- window.CustomElements.watchShadow(this);- return root;- };- }- scope.watchShadow = watchShadow;- scope.upgradeDocumentTree = upgradeDocumentTree;- scope.upgradeDocument = upgradeDocument;- scope.upgradeSubtree = addedSubtree;- scope.upgradeAll = addedNode;- scope.attached = attached;- scope.takeRecords = takeRecords;-});--window.CustomElements.addModule(function(scope) {- var flags = scope.flags;- function upgrade(node, isAttached) {- if (node.localName === "template") {- if (window.HTMLTemplateElement && HTMLTemplateElement.decorate) {- HTMLTemplateElement.decorate(node);- }- }- if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) {- var is = node.getAttribute("is");- var definition = scope.getRegisteredDefinition(node.localName) || scope.getRegisteredDefinition(is);- if (definition) {- if (is && definition.tag == node.localName || !is && !definition.extends) {- return upgradeWithDefinition(node, definition, isAttached);- }- }- }- }- function upgradeWithDefinition(element, definition, isAttached) {- flags.upgrade && console.group("upgrade:", element.localName);- if (definition.is) {- element.setAttribute("is", definition.is);- }- implementPrototype(element, definition);- element.__upgraded__ = true;- created(element);- if (isAttached) {- scope.attached(element);- }- scope.upgradeSubtree(element, isAttached);- flags.upgrade && console.groupEnd();- return element;- }- function implementPrototype(element, definition) {- if (Object.__proto__) {- element.__proto__ = definition.prototype;- } else {- customMixin(element, definition.prototype, definition.native);- element.__proto__ = definition.prototype;- }- }- function customMixin(inTarget, inSrc, inNative) {- var used = {};- var p = inSrc;- while (p !== inNative && p !== HTMLElement.prototype) {- var keys = Object.getOwnPropertyNames(p);- for (var i = 0, k; k = keys[i]; i++) {- if (!used[k]) {- Object.defineProperty(inTarget, k, Object.getOwnPropertyDescriptor(p, k));- used[k] = 1;- }- }- p = Object.getPrototypeOf(p);- }- }- function created(element) {- if (element.createdCallback) {- element.createdCallback();- }- }- scope.upgrade = upgrade;- scope.upgradeWithDefinition = upgradeWithDefinition;- scope.implementPrototype = implementPrototype;-});--window.CustomElements.addModule(function(scope) {- var isIE = scope.isIE;- var upgradeDocumentTree = scope.upgradeDocumentTree;- var upgradeAll = scope.upgradeAll;- var upgradeWithDefinition = scope.upgradeWithDefinition;- var implementPrototype = scope.implementPrototype;- var useNative = scope.useNative;- function register(name, options) {- var definition = options || {};- if (!name) {- throw new Error("document.registerElement: first argument `name` must not be empty");- }- if (name.indexOf("-") < 0) {- throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '" + String(name) + "'.");- }- if (isReservedTag(name)) {- throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '" + String(name) + "'. The type name is invalid.");- }- if (getRegisteredDefinition(name)) {- throw new Error("DuplicateDefinitionError: a type with name '" + String(name) + "' is already registered");- }- if (!definition.prototype) {- definition.prototype = Object.create(HTMLElement.prototype);- }- definition.__name = name.toLowerCase();- if (definition.extends) {- definition.extends = definition.extends.toLowerCase();- }- definition.lifecycle = definition.lifecycle || {};- definition.ancestry = ancestry(definition.extends);- resolveTagName(definition);- resolvePrototypeChain(definition);- overrideAttributeApi(definition.prototype);- registerDefinition(definition.__name, definition);- definition.ctor = generateConstructor(definition);- definition.ctor.prototype = definition.prototype;- definition.prototype.constructor = definition.ctor;- if (scope.ready) {- upgradeDocumentTree(document);- }- return definition.ctor;- }- function overrideAttributeApi(prototype) {- if (prototype.setAttribute._polyfilled) {- return;- }- var setAttribute = prototype.setAttribute;- prototype.setAttribute = function(name, value) {- changeAttribute.call(this, name, value, setAttribute);- };- var removeAttribute = prototype.removeAttribute;- prototype.removeAttribute = function(name) {- changeAttribute.call(this, name, null, removeAttribute);- };- prototype.setAttribute._polyfilled = true;- }- function changeAttribute(name, value, operation) {- name = name.toLowerCase();- var oldValue = this.getAttribute(name);- operation.apply(this, arguments);- var newValue = this.getAttribute(name);- if (this.attributeChangedCallback && newValue !== oldValue) {- this.attributeChangedCallback(name, oldValue, newValue);- }- }- function isReservedTag(name) {- for (var i = 0; i < reservedTagList.length; i++) {- if (name === reservedTagList[i]) {- return true;- }- }- }- var reservedTagList = [ "annotation-xml", "color-profile", "font-face", "font-face-src", "font-face-uri", "font-face-format", "font-face-name", "missing-glyph" ];- function ancestry(extnds) {- var extendee = getRegisteredDefinition(extnds);- if (extendee) {- return ancestry(extendee.extends).concat([ extendee ]);- }- return [];- }- function resolveTagName(definition) {- var baseTag = definition.extends;- for (var i = 0, a; a = definition.ancestry[i]; i++) {- baseTag = a.is && a.tag;- }- definition.tag = baseTag || definition.__name;- if (baseTag) {- definition.is = definition.__name;- }- }- function resolvePrototypeChain(definition) {- if (!Object.__proto__) {- var nativePrototype = HTMLElement.prototype;- if (definition.is) {- var inst = document.createElement(definition.tag);- nativePrototype = Object.getPrototypeOf(inst);- }- var proto = definition.prototype, ancestor;- var foundPrototype = false;- while (proto) {- if (proto == nativePrototype) {- foundPrototype = true;- }- ancestor = Object.getPrototypeOf(proto);- if (ancestor) {- proto.__proto__ = ancestor;- }- proto = ancestor;- }- if (!foundPrototype) {- console.warn(definition.tag + " prototype not found in prototype chain for " + definition.is);- }- definition.native = nativePrototype;- }- }- function instantiate(definition) {- return upgradeWithDefinition(domCreateElement(definition.tag), definition);- }- var registry = {};- function getRegisteredDefinition(name) {- if (name) {- return registry[name.toLowerCase()];- }- }- function registerDefinition(name, definition) {- registry[name] = definition;- }- function generateConstructor(definition) {- return function() {- return instantiate(definition);- };- }- var HTML_NAMESPACE = "http://www.w3.org/1999/xhtml";- function createElementNS(namespace, tag, typeExtension) {- if (namespace === HTML_NAMESPACE) {- return createElement(tag, typeExtension);- } else {- return domCreateElementNS(namespace, tag);- }- }- function createElement(tag, typeExtension) {- if (tag) {- tag = tag.toLowerCase();- }- if (typeExtension) {- typeExtension = typeExtension.toLowerCase();- }- var definition = getRegisteredDefinition(typeExtension || tag);- if (definition) {- if (tag == definition.tag && typeExtension == definition.is) {- return new definition.ctor();- }- if (!typeExtension && !definition.is) {- return new definition.ctor();- }- }- var element;- if (typeExtension) {- element = createElement(tag);- element.setAttribute("is", typeExtension);- return element;- }- element = domCreateElement(tag);- if (tag.indexOf("-") >= 0) {- implementPrototype(element, HTMLElement);- }- return element;- }- var domCreateElement = document.createElement.bind(document);- var domCreateElementNS = document.createElementNS.bind(document);- var isInstance;- if (!Object.__proto__ && !useNative) {- isInstance = function(obj, ctor) {- if (obj instanceof ctor) {- return true;- }- var p = obj;- while (p) {- if (p === ctor.prototype) {- return true;- }- p = p.__proto__;- }- return false;- };- } else {- isInstance = function(obj, base) {- return obj instanceof base;- };- }- function wrapDomMethodToForceUpgrade(obj, methodName) {- var orig = obj[methodName];- obj[methodName] = function() {- var n = orig.apply(this, arguments);- upgradeAll(n);- return n;- };- }- wrapDomMethodToForceUpgrade(Node.prototype, "cloneNode");- wrapDomMethodToForceUpgrade(document, "importNode");- document.registerElement = register;- document.createElement = createElement;- document.createElementNS = createElementNS;- scope.registry = registry;- scope.instanceof = isInstance;- scope.reservedTagList = reservedTagList;- scope.getRegisteredDefinition = getRegisteredDefinition;- document.register = document.registerElement;-});--(function(scope) {- var useNative = scope.useNative;- var initializeModules = scope.initializeModules;- var isIE = scope.isIE;- if (useNative) {- var nop = function() {};- scope.watchShadow = nop;- scope.upgrade = nop;- scope.upgradeAll = nop;- scope.upgradeDocumentTree = nop;- scope.upgradeSubtree = nop;- scope.takeRecords = nop;- scope.instanceof = function(obj, base) {- return obj instanceof base;- };- } else {- initializeModules();- }- var upgradeDocumentTree = scope.upgradeDocumentTree;- var upgradeDocument = scope.upgradeDocument;- if (!window.wrap) {- if (window.ShadowDOMPolyfill) {- window.wrap = window.ShadowDOMPolyfill.wrapIfNeeded;- window.unwrap = window.ShadowDOMPolyfill.unwrapIfNeeded;- } else {- window.wrap = window.unwrap = function(node) {- return node;- };- }- }- if (window.HTMLImports) {- window.HTMLImports.__importsParsingHook = function(elt) {- if (elt.import) {- upgradeDocument(wrap(elt.import));- }- };- }- function bootstrap() {- upgradeDocumentTree(window.wrap(document));- window.CustomElements.ready = true;- var requestAnimationFrame = window.requestAnimationFrame || function(f) {- setTimeout(f, 16);- };- requestAnimationFrame(function() {- setTimeout(function() {- window.CustomElements.readyTime = Date.now();- if (window.HTMLImports) {- window.CustomElements.elapsed = window.CustomElements.readyTime - window.HTMLImports.readyTime;- }- document.dispatchEvent(new CustomEvent("WebComponentsReady", {- bubbles: true- }));- });- });- }- if (document.readyState === "complete" || scope.flags.eager) {- bootstrap();- } else if (document.readyState === "interactive" && !window.attachEvent && (!window.HTMLImports || window.HTMLImports.ready)) {- bootstrap();- } else {- var loadEvent = window.HTMLImports && !window.HTMLImports.ready ? "HTMLImportsLoaded" : "DOMContentLoaded";- window.addEventListener(loadEvent, bootstrap);- }-})(window.CustomElements);--(function(scope) {- if (!Function.prototype.bind) {- Function.prototype.bind = function(scope) {- var self = this;- var args = Array.prototype.slice.call(arguments, 1);- return function() {- var args2 = args.slice();- args2.push.apply(args2, arguments);- return self.apply(scope, args2);- };- };- }-})(window.WebComponents);--(function(scope) {- var style = document.createElement("style");- style.textContent = "" + "body {" + "transition: opacity ease-in 0.2s;" + " } \n" + "body[unresolved] {" + "opacity: 0; display: block; overflow: hidden; position: relative;" + " } \n";- var head = document.querySelector("head");- head.insertBefore(style, head.firstChild);-})(window.WebComponents);--(function(scope) {- window.Platform = scope;-})(window.WebComponents);\ No newline at end of filediff --git a/manager/client/src/main/webapp/bower_components/webcomponentsjs/webcomponents.min.js b/manager/client/src/main/webapp/bower_components/webcomponentsjs/webcomponents.min.jsdeleted file mode 100644index ad8196bc3..000000000--- a/manager/client/src/main/webapp/bower_components/webcomponentsjs/webcomponents.min.js+++ /dev/null@@ -1,14 +0,0 @@-/**- * @license- * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.- * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt- * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt- * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt- * Code distributed by Google as part of the polymer project is also- * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt- */-// @version 0.7.24-!function(){window.WebComponents=window.WebComponents||{flags:{}};var e="webcomponents.js",t=document.querySelector('script[src*="'+e+'"]'),n={};if(!n.noOpts){if(location.search.slice(1).split("&").forEach(function(e){var t,r=e.split("=");r[0]&&(t=r[0].match(/wc-(.+)/))&&(n[t[1]]=r[1]||!0)}),t)for(var r,o=0;r=t.attributes[o];o++)"src"!==r.name&&(n[r.name]=r.value||!0);if(n.log&&n.log.split){var i=n.log.split(",");n.log={},i.forEach(function(e){n.log[e]=!0})}else n.log={}}n.shadow=n.shadow||n.shadowdom||n.polyfill,"native"===n.shadow?n.shadow=!1:n.shadow=n.shadow||!HTMLElement.prototype.createShadowRoot,n.register&&(window.CustomElements=window.CustomElements||{flags:{}},window.CustomElements.flags.register=n.register),WebComponents.flags=n}(),WebComponents.flags.shadow&&("undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,n=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};n.prototype={set:function(t,n){var r=t[this.name];return r&&r[0]===t?r[1]=n:e(t,this.name,{value:[t,n],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return!(!t||t[0]!==e)&&(t[0]=t[1]=void 0,!0)},has:function(e){var t=e[this.name];return!!t&&t[0]===e}},window.WeakMap=n}(),window.ShadowDOMPolyfill={},function(e){"use strict";function t(){if("undefined"!=typeof chrome&&chrome.app&&chrome.app.runtime)return!1;if(navigator.getDeviceStorage)return!1;try{var e=new Function("return true;");return e()}catch(t){return!1}}function n(e){if(!e)throw new Error("Assertion failed")}function r(e,t){for(var n=W(t),r=0;r<n.length;r++){var o=n[r];A(e,o,F(t,o))}return e}function o(e,t){for(var n=W(t),r=0;r<n.length;r++){var o=n[r];switch(o){case"arguments":case"caller":case"length":case"name":case"prototype":case"toString":continue}A(e,o,F(t,o))}return e}function i(e,t){for(var n=0;n<t.length;n++)if(t[n]in e)return t[n]}function a(e,t,n){U.value=n,A(e,t,U)}function s(e,t){var n=e.__proto__||Object.getPrototypeOf(e);if(q)try{W(n)}catch(r){n=n.__proto__}var o=R.get(n);if(o)return o;var i=s(n),a=E(i);return g(n,a,t),a}function c(e,t){w(e,t,!0)}function l(e,t){w(t,e,!1)}function u(e){return/^on[a-z]+$/.test(e)}function d(e){return/^[a-zA-Z_$][a-zA-Z_$0-9]*$/.test(e)}function p(e){return k&&d(e)?new Function("return this.__impl4cf1e782hg__."+e):function(){return this.__impl4cf1e782hg__[e]}}function h(e){return k&&d(e)?new Function("v","this.__impl4cf1e782hg__."+e+" = v"):function(t){this.__impl4cf1e782hg__[e]=t}}function f(e){return k&&d(e)?new Function("return this.__impl4cf1e782hg__."+e+".apply(this.__impl4cf1e782hg__, arguments)"):function(){return this.__impl4cf1e782hg__[e].apply(this.__impl4cf1e782hg__,arguments)}}function m(e,t){try{return e===window&&"showModalDialog"===t?B:Object.getOwnPropertyDescriptor(e,t)}catch(n){return B}}function w(t,n,r,o){for(var i=W(t),a=0;a<i.length;a++){var s=i[a];if("polymerBlackList_"!==s&&!(s in n||t.polymerBlackList_&&t.polymerBlackList_[s])){q&&t.__lookupGetter__(s);var c,l,d=m(t,s);if("function"!=typeof d.value){var w=u(s);c=w?e.getEventHandlerGetter(s):p(s),(d.writable||d.set||V)&&(l=w?e.getEventHandlerSetter(s):h(s));var v=V||d.configurable;A(n,s,{get:c,set:l,configurable:v,enumerable:d.enumerable})}else r&&(n[s]=f(s))}}}function v(e,t,n){if(null!=e){var r=e.prototype;g(r,t,n),o(t,e)}}function g(e,t,r){var o=t.prototype;n(void 0===R.get(e)),R.set(e,t),I.set(o,e),c(e,o),r&&l(o,r),a(o,"constructor",t),t.prototype=o}function b(e,t){return R.get(t.prototype)===e}function y(e){var t=Object.getPrototypeOf(e),n=s(t),r=E(n);return g(t,r,e),r}function E(e){function t(t){e.call(this,t)}var n=Object.create(e.prototype);return n.constructor=t,t.prototype=n,t}function _(e){return e&&e.__impl4cf1e782hg__}function S(e){return!_(e)}function T(e){if(null===e)return null;n(S(e));var t=e.__wrapper8e3dd93a60__;return null!=t?t:e.__wrapper8e3dd93a60__=new(s(e,e))(e)}function M(e){return null===e?null:(n(_(e)),e.__impl4cf1e782hg__)}function O(e){return e.__impl4cf1e782hg__}function L(e,t){t.__impl4cf1e782hg__=e,e.__wrapper8e3dd93a60__=t}function N(e){return e&&_(e)?M(e):e}function C(e){return e&&!_(e)?T(e):e}function j(e,t){null!==t&&(n(S(e)),n(void 0===t||_(t)),e.__wrapper8e3dd93a60__=t)}function D(e,t,n){G.get=n,A(e.prototype,t,G)}function H(e,t){D(e,t,function(){return T(this.__impl4cf1e782hg__[t])})}function x(e,t){e.forEach(function(e){t.forEach(function(t){e.prototype[t]=function(){var e=C(this);return e[t].apply(e,arguments)}})})}var R=new WeakMap,I=new WeakMap,P=Object.create(null),k=t(),A=Object.defineProperty,W=Object.getOwnPropertyNames,F=Object.getOwnPropertyDescriptor,U={value:void 0,configurable:!0,enumerable:!1,writable:!0};W(window);var q=/Firefox/.test(navigator.userAgent),B={get:function(){},set:function(e){},configurable:!0,enumerable:!0},V=function(){var e=Object.getOwnPropertyDescriptor(Node.prototype,"nodeType");return e&&!e.get&&!e.set}(),G={get:void 0,configurable:!0,enumerable:!0};e.addForwardingProperties=c,e.assert=n,e.constructorTable=R,e.defineGetter=D,e.defineWrapGetter=H,e.forwardMethodsToWrapper=x,e.isIdentifierName=d,e.isWrapper=_,e.isWrapperFor=b,e.mixin=r,e.nativePrototypeTable=I,e.oneOf=i,e.registerObject=y,e.registerWrapper=v,e.rewrap=j,e.setWrapper=L,e.unsafeUnwrap=O,e.unwrap=M,e.unwrapIfNeeded=N,e.wrap=T,e.wrapIfNeeded=C,e.wrappers=P}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t,n){return{index:e,removed:t,addedCount:n}}function n(){}var r=0,o=1,i=2,a=3;n.prototype={calcEditDistances:function(e,t,n,r,o,i){for(var a=i-o+1,s=n-t+1,c=new Array(a),l=0;l<a;l++)c[l]=new Array(s),c[l][0]=l;for(var u=0;u<s;u++)c[0][u]=u;for(var l=1;l<a;l++)for(var u=1;u<s;u++)if(this.equals(e[t+u-1],r[o+l-1]))c[l][u]=c[l-1][u-1];else{var d=c[l-1][u]+1,p=c[l][u-1]+1;c[l][u]=d<p?d:p}return c},spliceOperationsFromEditDistances:function(e){for(var t=e.length-1,n=e[0].length-1,s=e[t][n],c=[];t>0||n>0;)if(0!=t)if(0!=n){var l,u=e[t-1][n-1],d=e[t-1][n],p=e[t][n-1];l=d<p?d<u?d:u:p<u?p:u,l==u?(u==s?c.push(r):(c.push(o),s=u),t--,n--):l==d?(c.push(a),t--,s=d):(c.push(i),n--,s=p)}else c.push(a),t--;else c.push(i),n--;return c.reverse(),c},calcSplices:function(e,n,s,c,l,u){var d=0,p=0,h=Math.min(s-n,u-l);if(0==n&&0==l&&(d=this.sharedPrefix(e,c,h)),s==e.length&&u==c.length&&(p=this.sharedSuffix(e,c,h-d)),n+=d,l+=d,s-=p,u-=p,s-n==0&&u-l==0)return[];if(n==s){for(var f=t(n,[],0);l<u;)f.removed.push(c[l++]);return[f]}if(l==u)return[t(n,[],s-n)];for(var m=this.spliceOperationsFromEditDistances(this.calcEditDistances(e,n,s,c,l,u)),f=void 0,w=[],v=n,g=l,b=0;b<m.length;b++)switch(m[b]){case r:f&&(w.push(f),f=void 0),v++,g++;break;case o:f||(f=t(v,[],0)),f.addedCount++,v++,f.removed.push(c[g]),g++;break;case i:f||(f=t(v,[],0)),f.addedCount++,v++;break;case a:f||(f=t(v,[],0)),f.removed.push(c[g]),g++}return f&&w.push(f),w},sharedPrefix:function(e,t,n){for(var r=0;r<n;r++)if(!this.equals(e[r],t[r]))return r;return n},sharedSuffix:function(e,t,n){for(var r=e.length,o=t.length,i=0;i<n&&this.equals(e[--r],t[--o]);)i++;return i},calculateSplices:function(e,t){return this.calcSplices(e,0,e.length,t,0,t.length)},equals:function(e,t){return e===t}},e.ArraySplice=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(){a=!1;var e=i.slice(0);i=[];for(var t=0;t<e.length;t++)(0,e[t])()}function n(e){i.push(e),a||(a=!0,r(t,0))}var r,o=window.MutationObserver,i=[],a=!1;if(o){var s=1,c=new o(t),l=document.createTextNode(s);c.observe(l,{characterData:!0}),r=function(){s=(s+1)%2,l.data=s}}else r=window.setTimeout;e.setEndOfMicrotask=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){e.scheduled_||(e.scheduled_=!0,f.push(e),m||(u(n),m=!0))}function n(){for(m=!1;f.length;){var e=f;f=[],e.sort(function(e,t){return e.uid_-t.uid_});for(var t=0;t<e.length;t++){var n=e[t];n.scheduled_=!1;var r=n.takeRecords();i(n),r.length&&n.callback_(r,n)}}}function r(e,t){this.type=e,this.target=t,this.addedNodes=new p.NodeList,this.removedNodes=new p.NodeList,this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function o(e,t){for(;e;e=e.parentNode){var n=h.get(e);if(n)for(var r=0;r<n.length;r++){var o=n[r];o.options.subtree&&o.addTransientObserver(t)}}}function i(e){for(var t=0;t<e.nodes_.length;t++){var n=e.nodes_[t],r=h.get(n);if(!r)return;for(var o=0;o<r.length;o++){var i=r[o];i.observer===e&&i.removeTransientObservers()}}}function a(e,n,o){for(var i=Object.create(null),a=Object.create(null),s=e;s;s=s.parentNode){var c=h.get(s);if(c)for(var l=0;l<c.length;l++){var u=c[l],d=u.options;if((s===e||d.subtree)&&("attributes"!==n||d.attributes)&&("attributes"!==n||!d.attributeFilter||null===o.namespace&&d.attributeFilter.indexOf(o.name)!==-1)&&("characterData"!==n||d.characterData)&&("childList"!==n||d.childList)){var p=u.observer;i[p.uid_]=p,("attributes"===n&&d.attributeOldValue||"characterData"===n&&d.characterDataOldValue)&&(a[p.uid_]=o.oldValue)}}}for(var f in i){var p=i[f],m=new r(n,e);"name"in o&&"namespace"in o&&(m.attributeName=o.name,m.attributeNamespace=o.namespace),o.addedNodes&&(m.addedNodes=o.addedNodes),o.removedNodes&&(m.removedNodes=o.removedNodes),o.previousSibling&&(m.previousSibling=o.previousSibling),o.nextSibling&&(m.nextSibling=o.nextSibling),void 0!==a[f]&&(m.oldValue=a[f]),t(p),p.records_.push(m)}}function s(e){if(this.childList=!!e.childList,this.subtree=!!e.subtree,"attributes"in e||!("attributeOldValue"in e||"attributeFilter"in e)?this.attributes=!!e.attributes:this.attributes=!0,"characterDataOldValue"in e&&!("characterData"in e)?this.characterData=!0:this.characterData=!!e.characterData,!this.attributes&&(e.attributeOldValue||"attributeFilter"in e)||!this.characterData&&e.characterDataOldValue)throw new TypeError;if(this.characterData=!!e.characterData,this.attributeOldValue=!!e.attributeOldValue,this.characterDataOldValue=!!e.characterDataOldValue,"attributeFilter"in e){if(null==e.attributeFilter||"object"!=typeof e.attributeFilter)throw new TypeError;this.attributeFilter=w.call(e.attributeFilter)}else this.attributeFilter=null}function c(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++v,this.scheduled_=!1}function l(e,t,n){this.observer=e,this.target=t,this.options=n,this.transientObservedNodes=[]}var u=e.setEndOfMicrotask,d=e.wrapIfNeeded,p=e.wrappers,h=new WeakMap,f=[],m=!1,w=Array.prototype.slice,v=0;c.prototype={constructor:c,observe:function(e,t){e=d(e);var n,r=new s(t),o=h.get(e);o||h.set(e,o=[]);for(var i=0;i<o.length;i++)o[i].observer===this&&(n=o[i],n.removeTransientObservers(),n.options=r);n||(n=new l(this,e,r),o.push(n),this.nodes_.push(e))},disconnect:function(){this.nodes_.forEach(function(e){for(var t=h.get(e),n=0;n<t.length;n++){var r=t[n];if(r.observer===this){t.splice(n,1);break}}},this),this.records_=[]},takeRecords:function(){var e=this.records_;return this.records_=[],e}},l.prototype={addTransientObserver:function(e){if(e!==this.target){t(this.observer),this.transientObservedNodes.push(e);var n=h.get(e);n||h.set(e,n=[]),n.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[];for(var t=0;t<e.length;t++)for(var n=e[t],r=h.get(n),o=0;o<r.length;o++)if(r[o]===this){r.splice(o,1);break}}},e.enqueueMutation=a,e.registerTransientObservers=o,e.wrappers.MutationObserver=c,e.wrappers.MutationRecord=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t){this.root=e,this.parent=t}function n(e,t){if(e.treeScope_!==t){e.treeScope_=t;for(var r=e.shadowRoot;r;r=r.olderShadowRoot)r.treeScope_.parent=t;for(var o=e.firstChild;o;o=o.nextSibling)n(o,t)}}function r(n){if(n instanceof e.wrappers.Window,n.treeScope_)return n.treeScope_;var o,i=n.parentNode;return o=i?r(i):new t(n,null),n.treeScope_=o}t.prototype={get renderer(){return this.root instanceof e.wrappers.ShadowRoot?e.getRendererForHost(this.root.host):null},contains:function(e){for(;e;e=e.parent)if(e===this)return!0;return!1}},e.TreeScope=t,e.getTreeScope=r,e.setTreeScope=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return e instanceof G.ShadowRoot}function n(e){return A(e).root}function r(e,r){var s=[],c=e;for(s.push(c);c;){var l=a(c);if(l&&l.length>0){for(var u=0;u<l.length;u++){var p=l[u];if(i(p)){var h=n(p),f=h.olderShadowRoot;f&&s.push(f)}s.push(p)}c=l[l.length-1]}else if(t(c)){if(d(e,c)&&o(r))break;c=c.host,s.push(c)}else c=c.parentNode,c&&s.push(c)}return s}function o(e){if(!e)return!1;switch(e.type){case"abort":case"error":case"select":case"change":case"load":case"reset":case"resize":case"scroll":case"selectstart":return!0}return!1}function i(e){return e instanceof HTMLShadowElement}function a(t){return e.getDestinationInsertionPoints(t)}function s(e,t){if(0===e.length)return t;t instanceof G.Window&&(t=t.document);for(var n=A(t),r=e[0],o=A(r),i=l(n,o),a=0;a<e.length;a++){var s=e[a];if(A(s)===i)return s}return e[e.length-1]}function c(e){for(var t=[];e;e=e.parent)t.push(e);return t}function l(e,t){for(var n=c(e),r=c(t),o=null;n.length>0&&r.length>0;){var i=n.pop(),a=r.pop();if(i!==a)break;o=i}return o}function u(e,t,n){t instanceof G.Window&&(t=t.document);var o,i=A(t),a=A(n),s=r(n,e),o=l(i,a);o||(o=a.root);for(var c=o;c;c=c.parent)for(var u=0;u<s.length;u++){var d=s[u];if(A(d)===c)return d}return null}function d(e,t){return A(e)===A(t)}function p(e){if(!K.get(e)&&(K.set(e,!0),f(V(e),V(e.target)),P)){var t=P;throw P=null,t}}function h(e){switch(e.type){case"load":case"beforeunload":case"unload":return!0}return!1}function f(t,n){if($.get(t))throw new Error("InvalidStateError");$.set(t,!0),e.renderAllPending();var o,i,a;if(h(t)&&!t.bubbles){var s=n;s instanceof G.Document&&(a=s.defaultView)&&(i=s,o=[])}if(!o)if(n instanceof G.Window)a=n,o=[];else if(o=r(n,t),!h(t)){var s=o[o.length-1];s instanceof G.Document&&(a=s.defaultView)}return ne.set(t,o),m(t,o,a,i)&&w(t,o,a,i)&&v(t,o,a,i),J.set(t,re),Y["delete"](t,null),$["delete"](t),t.defaultPrevented}function m(e,t,n,r){var o=oe;if(n&&!g(n,e,o,t,r))return!1;for(var i=t.length-1;i>0;i--)if(!g(t[i],e,o,t,r))return!1;return!0}function w(e,t,n,r){var o=ie,i=t[0]||n;return g(i,e,o,t,r)}function v(e,t,n,r){for(var o=ae,i=1;i<t.length;i++)if(!g(t[i],e,o,t,r))return;n&&t.length>0&&g(n,e,o,t,r)}function g(e,t,n,r,o){var i=z.get(e);if(!i)return!0;var a=o||s(r,e);if(a===e){if(n===oe)return!0;n===ae&&(n=ie)}else if(n===ae&&!t.bubbles)return!0;if("relatedTarget"in t){var c=B(t),l=c.relatedTarget;if(l){if(l instanceof Object&&l.addEventListener){var d=V(l),p=u(t,e,d);if(p===a)return!0}else p=null;Z.set(t,p)}}J.set(t,n);var h=t.type,f=!1;X.set(t,a),Y.set(t,e),i.depth++;for(var m=0,w=i.length;m<w;m++){var v=i[m];if(v.removed)f=!0;else if(!(v.type!==h||!v.capture&&n===oe||v.capture&&n===ae))try{if("function"==typeof v.handler?v.handler.call(e,t):v.handler.handleEvent(t),ee.get(t))return!1}catch(g){P||(P=g)}}if(i.depth--,f&&0===i.depth){var b=i.slice();i.length=0;for(var m=0;m<b.length;m++)b[m].removed||i.push(b[m])}return!Q.get(t)}function b(e,t,n){this.type=e,this.handler=t,this.capture=Boolean(n)}function y(e,t){if(!(e instanceof se))return V(T(se,"Event",e,t));var n=e;return be||"beforeunload"!==n.type||this instanceof M?void U(n,this):new M(n)}function E(e){return e&&e.relatedTarget?Object.create(e,{relatedTarget:{value:B(e.relatedTarget)}}):e}function _(e,t,n){var r=window[e],o=function(t,n){return t instanceof r?void U(t,this):V(T(r,e,t,n))};if(o.prototype=Object.create(t.prototype),n&&W(o.prototype,n),r)try{F(r,o,new r("temp"))}catch(i){F(r,o,document.createEvent(e))}return o}function S(e,t){return function(){arguments[t]=B(arguments[t]);var n=B(this);n[e].apply(n,arguments)}}function T(e,t,n,r){if(ve)return new e(n,E(r));var o=B(document.createEvent(t)),i=we[t],a=[n];return Object.keys(i).forEach(function(e){var t=null!=r&&e in r?r[e]:i[e];"relatedTarget"===e&&(t=B(t)),a.push(t)}),o["init"+t].apply(o,a),o}function M(e){y.call(this,e)}function O(e){return"function"==typeof e||e&&e.handleEvent}function L(e){switch(e){case"DOMAttrModified":case"DOMAttributeNameChanged":case"DOMCharacterDataModified":case"DOMElementNameChanged":case"DOMNodeInserted":case"DOMNodeInsertedIntoDocument":case"DOMNodeRemoved":case"DOMNodeRemovedFromDocument":case"DOMSubtreeModified":return!0}return!1}function N(e){U(e,this)}function C(e){return e instanceof G.ShadowRoot&&(e=e.host),B(e)}function j(e,t){var n=z.get(e);if(n)for(var r=0;r<n.length;r++)if(!n[r].removed&&n[r].type===t)return!0;return!1}function D(e,t){for(var n=B(e);n;n=n.parentNode)if(j(V(n),t))return!0;return!1}function H(e){k(e,Ee)}function x(t,n,o,i){e.renderAllPending();var a=V(_e.call(q(n),o,i));if(!a)return null;var c=r(a,null),l=c.lastIndexOf(t);return l==-1?null:(c=c.slice(0,l),s(c,t))}function R(e){return function(){var t=te.get(this);return t&&t[e]&&t[e].value||null}}function I(e){var t=e.slice(2);return function(n){var r=te.get(this);r||(r=Object.create(null),te.set(this,r));var o=r[e];if(o&&this.removeEventListener(t,o.wrapped,!1),"function"==typeof n){var i=function(t){var r=n.call(this,t);r===!1?t.preventDefault():"onbeforeunload"===e&&"string"==typeof r&&(t.returnValue=r)};this.addEventListener(t,i,!1),r[e]={value:n,wrapped:i}}}}var P,k=e.forwardMethodsToWrapper,A=e.getTreeScope,W=e.mixin,F=e.registerWrapper,U=e.setWrapper,q=e.unsafeUnwrap,B=e.unwrap,V=e.wrap,G=e.wrappers,z=(new WeakMap,new WeakMap),K=new WeakMap,$=new WeakMap,X=new WeakMap,Y=new WeakMap,Z=new WeakMap,J=new WeakMap,Q=new WeakMap,ee=new WeakMap,te=new WeakMap,ne=new WeakMap,re=0,oe=1,ie=2,ae=3;b.prototype={equals:function(e){return this.handler===e.handler&&this.type===e.type&&this.capture===e.capture},get removed(){return null===this.handler},remove:function(){this.handler=null}};var se=window.Event;se.prototype.polymerBlackList_={returnValue:!0,keyLocation:!0},y.prototype={get target(){return X.get(this)},get currentTarget(){return Y.get(this)},get eventPhase(){return J.get(this)},get path(){var e=ne.get(this);return e?e.slice():[]},stopPropagation:function(){Q.set(this,!0)},stopImmediatePropagation:function(){Q.set(this,!0),ee.set(this,!0)}};var ce=function(){var e=document.createEvent("Event");return e.initEvent("test",!0,!0),e.preventDefault(),e.defaultPrevented}();ce||(y.prototype.preventDefault=function(){this.cancelable&&(q(this).preventDefault(),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}),F(se,y,document.createEvent("Event"));var le=_("UIEvent",y),ue=_("CustomEvent",y),de={get relatedTarget(){var e=Z.get(this);return void 0!==e?e:V(B(this).relatedTarget)}},pe=W({initMouseEvent:S("initMouseEvent",14)},de),he=W({initFocusEvent:S("initFocusEvent",5)},de),fe=_("MouseEvent",le,pe),me=_("FocusEvent",le,he),we=Object.create(null),ve=function(){try{new window.FocusEvent("focus")}catch(e){return!1}return!0}();if(!ve){var ge=function(e,t,n){if(n){var r=we[n];t=W(W({},r),t)}we[e]=t};ge("Event",{bubbles:!1,cancelable:!1}),ge("CustomEvent",{detail:null},"Event"),ge("UIEvent",{view:null,detail:0},"Event"),ge("MouseEvent",{screenX:0,screenY:0,clientX:0,clientY:0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null},"UIEvent"),ge("FocusEvent",{relatedTarget:null},"UIEvent")}var be=window.BeforeUnloadEvent;M.prototype=Object.create(y.prototype),W(M.prototype,{get returnValue(){return q(this).returnValue},set returnValue(e){q(this).returnValue=e}}),be&&F(be,M);var ye=window.EventTarget,Ee=["addEventListener","removeEventListener","dispatchEvent"];[Node,Window].forEach(function(e){var t=e.prototype;Ee.forEach(function(e){Object.defineProperty(t,e+"_",{value:t[e]})})}),N.prototype={addEventListener:function(e,t,n){if(O(t)&&!L(e)){var r=new b(e,t,n),o=z.get(this);if(o){for(var i=0;i<o.length;i++)if(r.equals(o[i]))return}else o=[],o.depth=0,z.set(this,o);o.push(r);var a=C(this);a.addEventListener_(e,p,!0)}},removeEventListener:function(e,t,n){n=Boolean(n);var r=z.get(this);if(r){for(var o=0,i=!1,a=0;a<r.length;a++)r[a].type===e&&r[a].capture===n&&(o++,r[a].handler===t&&(i=!0,r[a].remove()));if(i&&1===o){var s=C(this);s.removeEventListener_(e,p,!0)}}},dispatchEvent:function(t){var n=B(t),r=n.type;K.set(n,!1),e.renderAllPending();var o;D(this,r)||(o=function(){},this.addEventListener(r,o,!0));try{return B(this).dispatchEvent_(n)}finally{o&&this.removeEventListener(r,o,!0)}}},ye&&F(ye,N);var _e=document.elementFromPoint;e.elementFromPoint=x,e.getEventHandlerGetter=R,e.getEventHandlerSetter=I,e.wrapEventTargetMethods=H,e.wrappers.BeforeUnloadEvent=M,e.wrappers.CustomEvent=ue,e.wrappers.Event=y,e.wrappers.EventTarget=N,e.wrappers.FocusEvent=me,e.wrappers.MouseEvent=fe,e.wrappers.UIEvent=le}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t){Object.defineProperty(e,t,m)}function n(e){l(e,this)}function r(){this.length=0,t(this,"length")}function o(e){for(var t=new r,o=0;o<e.length;o++)t[o]=new n(e[o]);return t.length=o,t}function i(e){a.call(this,e)}var a=e.wrappers.UIEvent,s=e.mixin,c=e.registerWrapper,l=e.setWrapper,u=e.unsafeUnwrap,d=e.wrap,p=window.TouchEvent;if(p){var h;try{h=document.createEvent("TouchEvent")}catch(f){return}var m={enumerable:!1};n.prototype={get target(){return d(u(this).target)}};var w={configurable:!0,enumerable:!0,get:null};["clientX","clientY","screenX","screenY","pageX","pageY","identifier","webkitRadiusX","webkitRadiusY","webkitRotationAngle","webkitForce"].forEach(function(e){w.get=function(){return u(this)[e]},Object.defineProperty(n.prototype,e,w)}),r.prototype={item:function(e){return this[e]}},i.prototype=Object.create(a.prototype),s(i.prototype,{get touches(){return o(u(this).touches)},get targetTouches(){return o(u(this).targetTouches)},get changedTouches(){return o(u(this).changedTouches)},initTouchEvent:function(){throw new Error("Not implemented")}}),c(p,i,h),e.wrappers.Touch=n,e.wrappers.TouchEvent=i,e.wrappers.TouchList=r}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t){Object.defineProperty(e,t,s)}function n(){this.length=0,t(this,"length")}function r(e){if(null==e)return e;for(var t=new n,r=0,o=e.length;r<o;r++)t[r]=a(e[r]);return t.length=o,t}function o(e,t){e.prototype[t]=function(){return r(i(this)[t].apply(i(this),arguments))}}var i=e.unsafeUnwrap,a=e.wrap,s={enumerable:!1};n.prototype={item:function(e){return this[e]}},t(n.prototype,"item"),e.wrappers.NodeList=n,e.addWrapNodeListMethod=o,e.wrapNodeList=r}(window.ShadowDOMPolyfill),function(e){"use strict";e.wrapHTMLCollection=e.wrapNodeList,e.wrappers.HTMLCollection=e.wrappers.NodeList}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){O(e instanceof _)}function n(e){var t=new T;return t[0]=e,t.length=1,t}function r(e,t,n){N(t,"childList",{removedNodes:n,previousSibling:e.previousSibling,nextSibling:e.nextSibling})}function o(e,t){N(e,"childList",{removedNodes:t})}function i(e,t,r,o){if(e instanceof DocumentFragment){var i=s(e);U=!0;for(var a=i.length-1;a>=0;a--)e.removeChild(i[a]),i[a].parentNode_=t;U=!1;for(var a=0;a<i.length;a++)i[a].previousSibling_=i[a-1]||r,i[a].nextSibling_=i[a+1]||o;return r&&(r.nextSibling_=i[0]),o&&(o.previousSibling_=i[i.length-1]),i}var i=n(e),c=e.parentNode;return c&&c.removeChild(e),e.parentNode_=t,e.previousSibling_=r,e.nextSibling_=o,r&&(r.nextSibling_=e),o&&(o.previousSibling_=e),i}function a(e){if(e instanceof DocumentFragment)return s(e);var t=n(e),o=e.parentNode;return o&&r(e,o,t),t}function s(e){for(var t=new T,n=0,r=e.firstChild;r;r=r.nextSibling)t[n++]=r;return t.length=n,o(e,t),t}function c(e){return e}function l(e,t){R(e,t),e.nodeIsInserted_()}function u(e,t){for(var n=C(t),r=0;r<e.length;r++)l(e[r],n)}function d(e){R(e,new M(e,null))}function p(e){for(var t=0;t<e.length;t++)d(e[t])}function h(e,t){var n=e.nodeType===_.DOCUMENT_NODE?e:e.ownerDocument;n!==t.ownerDocument&&n.adoptNode(t)}function f(t,n){if(n.length){var r=t.ownerDocument;if(r!==n[0].ownerDocument)for(var o=0;o<n.length;o++)e.adoptNodeNoRemove(n[o],r)}}function m(e,t){f(e,t);var n=t.length;if(1===n)return P(t[0]);for(var r=P(e.ownerDocument.createDocumentFragment()),o=0;o<n;o++)r.appendChild(P(t[o]));return r}function w(e){if(void 0!==e.firstChild_)for(var t=e.firstChild_;t;){var n=t;t=t.nextSibling_,n.parentNode_=n.previousSibling_=n.nextSibling_=void 0}e.firstChild_=e.lastChild_=void 0}function v(e){if(e.invalidateShadowRenderer()){for(var t=e.firstChild;t;){O(t.parentNode===e);var n=t.nextSibling,r=P(t),o=r.parentNode;o&&X.call(o,r),t.previousSibling_=t.nextSibling_=t.parentNode_=null,t=n}e.firstChild_=e.lastChild_=null}else for(var n,i=P(e),a=i.firstChild;a;)n=a.nextSibling,X.call(i,a),a=n}function g(e){var t=e.parentNode;return t&&t.invalidateShadowRenderer()}function b(e){for(var t,n=0;n<e.length;n++)t=e[n],t.parentNode.removeChild(t)}function y(e,t,n){var r;if(r=A(n?q.call(n,I(e),!1):B.call(I(e),!1)),t){for(var o=e.firstChild;o;o=o.nextSibling)r.appendChild(y(o,!0,n));if(e instanceof F.HTMLTemplateElement)for(var i=r.content,o=e.content.firstChild;o;o=o.nextSibling)i.appendChild(y(o,!0,n))}return r}function E(e,t){if(!t||C(e)!==C(t))return!1;for(var n=t;n;n=n.parentNode)if(n===e)return!0;return!1}function _(e){O(e instanceof V),S.call(this,e),this.parentNode_=void 0,this.firstChild_=void 0,this.lastChild_=void 0,this.nextSibling_=void 0,this.previousSibling_=void 0,this.treeScope_=void 0}var S=e.wrappers.EventTarget,T=e.wrappers.NodeList,M=e.TreeScope,O=e.assert,L=e.defineWrapGetter,N=e.enqueueMutation,C=e.getTreeScope,j=e.isWrapper,D=e.mixin,H=e.registerTransientObservers,x=e.registerWrapper,R=e.setTreeScope,I=e.unsafeUnwrap,P=e.unwrap,k=e.unwrapIfNeeded,A=e.wrap,W=e.wrapIfNeeded,F=e.wrappers,U=!1,q=document.importNode,B=window.Node.prototype.cloneNode,V=window.Node,G=window.DocumentFragment,z=(V.prototype.appendChild,V.prototype.compareDocumentPosition),K=V.prototype.isEqualNode,$=V.prototype.insertBefore,X=V.prototype.removeChild,Y=V.prototype.replaceChild,Z=/Trident|Edge/.test(navigator.userAgent),J=Z?function(e,t){try{X.call(e,t)}catch(n){if(!(e instanceof G))throw n}}:function(e,t){X.call(e,t)};_.prototype=Object.create(S.prototype),D(_.prototype,{appendChild:function(e){return this.insertBefore(e,null)},insertBefore:function(e,n){t(e);var r;n?j(n)?r=P(n):(r=n,n=A(r)):(n=null,r=null),n&&O(n.parentNode===this);var o,s=n?n.previousSibling:this.lastChild,c=!this.invalidateShadowRenderer()&&!g(e);if(o=c?a(e):i(e,this,s,n),c)h(this,e),w(this),$.call(I(this),P(e),r);else{s||(this.firstChild_=o[0]),n||(this.lastChild_=o[o.length-1],void 0===this.firstChild_&&(this.firstChild_=this.firstChild));var l=r?r.parentNode:I(this);l?$.call(l,m(this,o),r):f(this,o)}return N(this,"childList",{addedNodes:o,nextSibling:n,previousSibling:s}),u(o,this),e},removeChild:function(e){if(t(e),e.parentNode!==this){for(var r=!1,o=(this.childNodes,this.firstChild);o;o=o.nextSibling)if(o===e){r=!0;break}if(!r)throw new Error("NotFoundError")}var i=P(e),a=e.nextSibling,s=e.previousSibling;if(this.invalidateShadowRenderer()){var c=this.firstChild,l=this.lastChild,u=i.parentNode;u&&J(u,i),c===e&&(this.firstChild_=a),l===e&&(this.lastChild_=s),s&&(s.nextSibling_=a),a&&(a.previousSibling_=s),e.previousSibling_=e.nextSibling_=e.parentNode_=void 0}else w(this),J(I(this),i);return U||N(this,"childList",{removedNodes:n(e),nextSibling:a,previousSibling:s}),H(this,e),e},replaceChild:function(e,r){t(e);var o;if(j(r)?o=P(r):(o=r,r=A(o)),r.parentNode!==this)throw new Error("NotFoundError");var s,c=r.nextSibling,l=r.previousSibling,p=!this.invalidateShadowRenderer()&&!g(e);return p?s=a(e):(c===e&&(c=e.nextSibling),s=i(e,this,l,c)),p?(h(this,e),w(this),Y.call(I(this),P(e),o)):(this.firstChild===r&&(this.firstChild_=s[0]),this.lastChild===r&&(this.lastChild_=s[s.length-1]),r.previousSibling_=r.nextSibling_=r.parentNode_=void 0,o.parentNode&&Y.call(o.parentNode,m(this,s),o)),N(this,"childList",{addedNodes:s,removedNodes:n(r),nextSibling:c,previousSibling:l}),d(r),u(s,this),r},nodeIsInserted_:function(){for(var e=this.firstChild;e;e=e.nextSibling)e.nodeIsInserted_()},hasChildNodes:function(){return null!==this.firstChild},get parentNode(){return void 0!==this.parentNode_?this.parentNode_:A(I(this).parentNode)},get firstChild(){return void 0!==this.firstChild_?this.firstChild_:A(I(this).firstChild)},get lastChild(){return void 0!==this.lastChild_?this.lastChild_:A(I(this).lastChild)},get nextSibling(){return void 0!==this.nextSibling_?this.nextSibling_:A(I(this).nextSibling)},get previousSibling(){return void 0!==this.previousSibling_?this.previousSibling_:A(I(this).previousSibling)},get parentElement(){for(var e=this.parentNode;e&&e.nodeType!==_.ELEMENT_NODE;)e=e.parentNode;return e},get textContent(){for(var e="",t=this.firstChild;t;t=t.nextSibling)t.nodeType!=_.COMMENT_NODE&&(e+=t.textContent);return e},set textContent(e){null==e&&(e="");var t=c(this.childNodes);if(this.invalidateShadowRenderer()){if(v(this),""!==e){var n=I(this).ownerDocument.createTextNode(e);this.appendChild(n)}}else w(this),I(this).textContent=e;var r=c(this.childNodes);N(this,"childList",{addedNodes:r,removedNodes:t}),p(t),u(r,this)},get childNodes(){for(var e=new T,t=0,n=this.firstChild;n;n=n.nextSibling)e[t++]=n;return e.length=t,e},cloneNode:function(e){return y(this,e)},contains:function(e){return E(this,W(e))},compareDocumentPosition:function(e){return z.call(I(this),k(e))},isEqualNode:function(e){return K.call(I(this),k(e))},normalize:function(){for(var e,t,n=c(this.childNodes),r=[],o="",i=0;i<n.length;i++)t=n[i],t.nodeType===_.TEXT_NODE?e||t.data.length?e?(o+=t.data,r.push(t)):e=t:this.removeChild(t):(e&&r.length&&(e.data+=o,b(r)),r=[],o="",e=null,t.childNodes.length&&t.normalize());e&&r.length&&(e.data+=o,b(r))}}),L(_,"ownerDocument"),x(V,_,document.createDocumentFragment()),delete _.prototype.querySelector,delete _.prototype.querySelectorAll,_.prototype=D(Object.create(S.prototype),_.prototype),e.cloneNode=y,e.nodeWasAdded=l,e.nodeWasRemoved=d,e.nodesWereAdded=u,e.nodesWereRemoved=p,e.originalInsertBefore=$,e.originalRemoveChild=X,e.snapshotNodeList=c,e.wrappers.Node=_}(window.ShadowDOMPolyfill),function(e){"use strict";function t(t,n,r,o){for(var i=null,a=null,s=0,c=t.length;s<c;s++)i=b(t[s]),!o&&(a=v(i).root)&&a instanceof e.wrappers.ShadowRoot||(r[n++]=i);return n}function n(e){return String(e).replace(/\/deep\/|::shadow|>>>/g," ")}function r(e){return String(e).replace(/:host\(([^\s]+)\)/g,"$1").replace(/([^\s]):host/g,"$1").replace(":host","*").replace(/\^|\/shadow\/|\/shadow-deep\/|::shadow|\/deep\/|::content|>>>/g," ")}function o(e,t){for(var n,r=e.firstElementChild;r;){if(r.matches(t))return r;if(n=o(r,t))return n;r=r.nextElementSibling}return null}function i(e,t){return e.matches(t)}function a(e,t,n){var r=e.localName;return r===t||r===n&&e.namespaceURI===j}function s(){return!0}function c(e,t,n){return e.localName===n}function l(e,t){return e.namespaceURI===t}function u(e,t,n){return e.namespaceURI===t&&e.localName===n}function d(e,t,n,r,o,i){for(var a=e.firstElementChild;a;)r(a,o,i)&&(n[t++]=a),t=d(a,t,n,r,o,i),a=a.nextElementSibling;return t}function p(n,r,o,i,a){var s,c=g(this),l=v(this).root;if(l instanceof e.wrappers.ShadowRoot)return d(this,r,o,n,i,null);if(c instanceof N)s=S.call(c,i);else{if(!(c instanceof C))return d(this,r,o,n,i,null);s=_.call(c,i)}return t(s,r,o,a)}function h(n,r,o,i,a){var s,c=g(this),l=v(this).root;if(l instanceof e.wrappers.ShadowRoot)return d(this,r,o,n,i,a);if(c instanceof N)s=M.call(c,i,a);else{if(!(c instanceof C))return d(this,r,o,n,i,a);s=T.call(c,i,a)}return t(s,r,o,!1)}function f(n,r,o,i,a){var s,c=g(this),l=v(this).root;if(l instanceof e.wrappers.ShadowRoot)return d(this,r,o,n,i,a);if(c instanceof N)s=L.call(c,i,a);else{if(!(c instanceof C))return d(this,r,o,n,i,a);s=O.call(c,i,a)}return t(s,r,o,!1)}var m=e.wrappers.HTMLCollection,w=e.wrappers.NodeList,v=e.getTreeScope,g=e.unsafeUnwrap,b=e.wrap,y=document.querySelector,E=document.documentElement.querySelector,_=document.querySelectorAll,S=document.documentElement.querySelectorAll,T=document.getElementsByTagName,M=document.documentElement.getElementsByTagName,O=document.getElementsByTagNameNS,L=document.documentElement.getElementsByTagNameNS,N=window.Element,C=window.HTMLDocument||window.Document,j="http://www.w3.org/1999/xhtml",D={-querySelector:function(t){var r=n(t),i=r!==t;t=r;var a,s=g(this),c=v(this).root;if(c instanceof e.wrappers.ShadowRoot)return o(this,t);if(s instanceof N)a=b(E.call(s,t));else{if(!(s instanceof C))return o(this,t);a=b(y.call(s,t))}return a&&!i&&(c=v(a).root)&&c instanceof e.wrappers.ShadowRoot?o(this,t):a},querySelectorAll:function(e){var t=n(e),r=t!==e;e=t;var o=new w;return o.length=p.call(this,i,0,o,e,r),o}},H={matches:function(t){return t=r(t),e.originalMatches.call(g(this),t)}},x={getElementsByTagName:function(e){var t=new m,n="*"===e?s:a;return t.length=h.call(this,n,0,t,e,e.toLowerCase()),t},getElementsByClassName:function(e){return this.querySelectorAll("."+e)},getElementsByTagNameNS:function(e,t){var n=new m,r=null;return r="*"===e?"*"===t?s:c:"*"===t?l:u,n.length=f.call(this,r,0,n,e||null,t),n}};e.GetElementsByInterface=x,e.SelectorsInterface=D,e.MatchesInterface=H}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){for(;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.nextSibling;return e}function n(e){for(;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.previousSibling;return e}var r=e.wrappers.NodeList,o={get firstElementChild(){return t(this.firstChild)},get lastElementChild(){return n(this.lastChild)},get childElementCount(){for(var e=0,t=this.firstElementChild;t;t=t.nextElementSibling)e++;return e},get children(){for(var e=new r,t=0,n=this.firstElementChild;n;n=n.nextElementSibling)e[t++]=n;return e.length=t,e},remove:function(){var e=this.parentNode;e&&e.removeChild(this)}},i={get nextElementSibling(){return t(this.nextSibling)},get previousElementSibling(){return n(this.previousSibling)}},a={getElementById:function(e){return/[ \t\n\r\f]/.test(e)?null:this.querySelector('[id="'+e+'"]')}};e.ChildNodeInterface=i,e.NonElementParentNodeInterface=a,e.ParentNodeInterface=o}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call(this,e)}var n=e.ChildNodeInterface,r=e.wrappers.Node,o=e.enqueueMutation,i=e.mixin,a=e.registerWrapper,s=e.unsafeUnwrap,c=window.CharacterData;t.prototype=Object.create(r.prototype),i(t.prototype,{get nodeValue(){return this.data},set nodeValue(e){this.data=e},get textContent(){return this.data},set textContent(e){this.data=e},get data(){return s(this).data},set data(e){var t=s(this).data;o(this,"characterData",{oldValue:t}),s(this).data=e}}),i(t.prototype,n),a(c,t,document.createTextNode("")),e.wrappers.CharacterData=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return e>>>0}function n(e){r.call(this,e)}var r=e.wrappers.CharacterData,o=(e.enqueueMutation,e.mixin),i=e.registerWrapper,a=window.Text;n.prototype=Object.create(r.prototype),o(n.prototype,{splitText:function(e){e=t(e);var n=this.data;if(e>n.length)throw new Error("IndexSizeError");var r=n.slice(0,e),o=n.slice(e);this.data=r;var i=this.ownerDocument.createTextNode(o);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}}),i(a,n,document.createTextNode("")),e.wrappers.Text=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return i(e).getAttribute("class")}function n(e,t){a(e,"attributes",{name:"class",namespace:null,oldValue:t})}function r(t){e.invalidateRendererBasedOnAttribute(t,"class")}function o(e,o,i){var a=e.ownerElement_;if(null==a)return o.apply(e,i);var s=t(a),c=o.apply(e,i);return t(a)!==s&&(n(a,s),r(a)),c}if(!window.DOMTokenList)return void console.warn("Missing DOMTokenList prototype, please include a compatible classList polyfill such as http://goo.gl/uTcepH.");var i=e.unsafeUnwrap,a=e.enqueueMutation,s=DOMTokenList.prototype.add;DOMTokenList.prototype.add=function(){o(this,s,arguments)};var c=DOMTokenList.prototype.remove;DOMTokenList.prototype.remove=function(){o(this,c,arguments)};var l=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(){return o(this,l,arguments)}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(t,n){var r=t.parentNode;if(r&&r.shadowRoot){var o=e.getRendererForHost(r);o.dependsOnAttribute(n)&&o.invalidate()}}function n(e,t,n){u(e,"attributes",{name:t,namespace:null,oldValue:n})}function r(e){a.call(this,e)}var o=e.ChildNodeInterface,i=e.GetElementsByInterface,a=e.wrappers.Node,s=e.ParentNodeInterface,c=e.SelectorsInterface,l=e.MatchesInterface,u=(e.addWrapNodeListMethod,e.enqueueMutation),d=e.mixin,p=(e.oneOf,e.registerWrapper),h=e.unsafeUnwrap,f=e.wrappers,m=window.Element,w=["matches","mozMatchesSelector","msMatchesSelector","webkitMatchesSelector"].filter(function(e){return m.prototype[e]}),v=w[0],g=m.prototype[v],b=new WeakMap;r.prototype=Object.create(a.prototype),d(r.prototype,{createShadowRoot:function(){var t=new f.ShadowRoot(this);h(this).polymerShadowRoot_=t;var n=e.getRendererForHost(this);return n.invalidate(),t},get shadowRoot(){return h(this).polymerShadowRoot_||null},setAttribute:function(e,r){var o=h(this).getAttribute(e);h(this).setAttribute(e,r),n(this,e,o),t(this,e)},removeAttribute:function(e){var r=h(this).getAttribute(e);h(this).removeAttribute(e),n(this,e,r),t(this,e)},get classList(){var e=b.get(this);if(!e){if(e=h(this).classList,!e)return;e.ownerElement_=this,b.set(this,e)}return e},get className(){return h(this).className},set className(e){this.setAttribute("class",e)},get id(){return h(this).id},set id(e){this.setAttribute("id",e)}}),w.forEach(function(e){"matches"!==e&&(r.prototype[e]=function(e){return this.matches(e)})}),m.prototype.webkitCreateShadowRoot&&(r.prototype.webkitCreateShadowRoot=r.prototype.createShadowRoot),d(r.prototype,o),d(r.prototype,i),d(r.prototype,s),d(r.prototype,c),d(r.prototype,l),p(m,r,document.createElementNS(null,"x")),e.invalidateRendererBasedOnAttribute=t,e.matchesNames=w,e.originalMatches=g,e.wrappers.Element=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case" ":return" "}}function n(e){return e.replace(L,t)}function r(e){return e.replace(N,t)}function o(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return t}function i(e){if(e.namespaceURI!==D)return!0;var t=e.ownerDocument.doctype;return t&&t.publicId&&t.systemId}function a(e,t){switch(e.nodeType){case Node.ELEMENT_NODE:for(var o,a=e.tagName.toLowerCase(),c="<"+a,l=e.attributes,u=0;o=l[u];u++)c+=" "+o.name+'="'+n(o.value)+'"';return C[a]?(i(e)&&(c+="/"),c+">"):c+">"+s(e)+"</"+a+">";case Node.TEXT_NODE:var d=e.data;return t&&j[t.localName]?d:r(d);case Node.COMMENT_NODE:return"<!--"+e.data+"-->";default:throw console.error(e),new Error("not implemented")}}function s(e){e instanceof O.HTMLTemplateElement&&(e=e.content);for(var t="",n=e.firstChild;n;n=n.nextSibling)t+=a(n,e);return t}function c(e,t,n){var r=n||"div";e.textContent="";var o=T(e.ownerDocument.createElement(r));o.innerHTML=t;for(var i;i=o.firstChild;)e.appendChild(M(i))}function l(e){m.call(this,e)}function u(e,t){var n=T(e.cloneNode(!1));n.innerHTML=t;for(var r,o=T(document.createDocumentFragment());r=n.firstChild;)o.appendChild(r);return M(o)}function d(t){return function(){return e.renderAllPending(),S(this)[t]}}function p(e){w(l,e,d(e))}function h(t){Object.defineProperty(l.prototype,t,{get:d(t),set:function(n){e.renderAllPending(),S(this)[t]=n},configurable:!0,enumerable:!0})}function f(t){Object.defineProperty(l.prototype,t,{value:function(){return e.renderAllPending(),S(this)[t].apply(S(this),arguments)},configurable:!0,enumerable:!0})}var m=e.wrappers.Element,w=e.defineGetter,v=e.enqueueMutation,g=e.mixin,b=e.nodesWereAdded,y=e.nodesWereRemoved,E=e.registerWrapper,_=e.snapshotNodeList,S=e.unsafeUnwrap,T=e.unwrap,M=e.wrap,O=e.wrappers,L=/[&\u00A0"]/g,N=/[&\u00A0<>]/g,C=o(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),j=o(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]),D="http://www.w3.org/1999/xhtml",H=/MSIE/.test(navigator.userAgent),x=window.HTMLElement,R=window.HTMLTemplateElement;l.prototype=Object.create(m.prototype),g(l.prototype,{get innerHTML(){return s(this)},set innerHTML(e){if(H&&j[this.localName])return void(this.textContent=e);var t=_(this.childNodes);this.invalidateShadowRenderer()?this instanceof O.HTMLTemplateElement?c(this.content,e):c(this,e,this.tagName):!R&&this instanceof O.HTMLTemplateElement?c(this.content,e):S(this).innerHTML=e;var n=_(this.childNodes);v(this,"childList",{addedNodes:n,removedNodes:t}),y(t),b(n,this)},get outerHTML(){return a(this,this.parentNode)},set outerHTML(e){var t=this.parentNode;if(t){t.invalidateShadowRenderer();var n=u(t,e);t.replaceChild(n,this)}},insertAdjacentHTML:function(e,t){var n,r;switch(String(e).toLowerCase()){case"beforebegin":n=this.parentNode,r=this;break;case"afterend":n=this.parentNode,r=this.nextSibling;break;case"afterbegin":n=this,r=this.firstChild;break;case"beforeend":n=this,r=null;break;default:return}var o=u(n,t);n.insertBefore(o,r)},get hidden(){return this.hasAttribute("hidden")},set hidden(e){e?this.setAttribute("hidden",""):this.removeAttribute("hidden")}}),["clientHeight","clientLeft","clientTop","clientWidth","offsetHeight","offsetLeft","offsetTop","offsetWidth","scrollHeight","scrollWidth"].forEach(p),["scrollLeft","scrollTop"].forEach(h),["focus","getBoundingClientRect","getClientRects","scrollIntoView"].forEach(f),E(x,l,document.createElement("b")),e.wrappers.HTMLElement=l,e.getInnerHTML=s,e.setInnerHTML=c}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.unsafeUnwrap,a=e.wrap,s=window.HTMLCanvasElement;t.prototype=Object.create(n.prototype),r(t.prototype,{getContext:function(){var e=i(this).getContext.apply(i(this),arguments);return e&&a(e)}}),o(s,t,document.createElement("canvas")),e.wrappers.HTMLCanvasElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=window.HTMLContentElement;t.prototype=Object.create(n.prototype),r(t.prototype,{constructor:t,get select(){return this.getAttribute("select")},set select(e){this.setAttribute("select",e)},setAttribute:function(e,t){n.prototype.setAttribute.call(this,e,t),"select"===String(e).toLowerCase()&&this.invalidateShadowRenderer(!0)}}),i&&o(i,t),e.wrappers.HTMLContentElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapHTMLCollection,a=e.unwrap,s=window.HTMLFormElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get elements(){return i(a(this).elements)}}),o(s,t,document.createElement("form")),e.wrappers.HTMLFormElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call(this,e)}function n(e,t){if(!(this instanceof n))throw new TypeError("DOM object constructor cannot be called as a function.");var o=i(document.createElement("img"));r.call(this,o),a(o,this),void 0!==e&&(o.width=e),void 0!==t&&(o.height=t)}var r=e.wrappers.HTMLElement,o=e.registerWrapper,i=e.unwrap,a=e.rewrap,s=window.HTMLImageElement;t.prototype=Object.create(r.prototype),o(s,t,document.createElement("img")),n.prototype=t.prototype,e.wrappers.HTMLImageElement=t,e.wrappers.Image=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=(e.mixin,e.wrappers.NodeList,e.registerWrapper),o=window.HTMLShadowElement;t.prototype=Object.create(n.prototype),t.prototype.constructor=t,o&&r(o,t),e.wrappers.HTMLShadowElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){if(!e.defaultView)return e;var t=d.get(e);if(!t){for(t=e.implementation.createHTMLDocument("");t.lastChild;)t.removeChild(t.lastChild);d.set(e,t)}return t}function n(e){for(var n,r=t(e.ownerDocument),o=c(r.createDocumentFragment());n=e.firstChild;)o.appendChild(n);return o}function r(e){if(o.call(this,e),!p){var t=n(e);u.set(this,l(t))}}var o=e.wrappers.HTMLElement,i=e.mixin,a=e.registerWrapper,s=e.unsafeUnwrap,c=e.unwrap,l=e.wrap,u=new WeakMap,d=new WeakMap,p=window.HTMLTemplateElement;r.prototype=Object.create(o.prototype),i(r.prototype,{constructor:r,get content(){return p?l(s(this).content):u.get(this)}}),p&&a(p,r),e.wrappers.HTMLTemplateElement=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.registerWrapper,o=window.HTMLMediaElement;o&&(t.prototype=Object.create(n.prototype),r(o,t,document.createElement("audio")),e.wrappers.HTMLMediaElement=t)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call(this,e)}function n(e){if(!(this instanceof n))throw new TypeError("DOM object constructor cannot be called as a function.");var t=i(document.createElement("audio"));r.call(this,t),a(t,this),t.setAttribute("preload","auto"),void 0!==e&&t.setAttribute("src",e)}var r=e.wrappers.HTMLMediaElement,o=e.registerWrapper,i=e.unwrap,a=e.rewrap,s=window.HTMLAudioElement;s&&(t.prototype=Object.create(r.prototype),o(s,t,document.createElement("audio")),n.prototype=t.prototype,e.wrappers.HTMLAudioElement=t,e.wrappers.Audio=n)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return e.replace(/\s+/g," ").trim()}function n(e){o.call(this,e)}function r(e,t,n,i){if(!(this instanceof r))throw new TypeError("DOM object constructor cannot be called as a function.");var a=c(document.createElement("option"));o.call(this,a),s(a,this),void 0!==e&&(a.text=e),void 0!==t&&a.setAttribute("value",t),n===!0&&a.setAttribute("selected",""),a.selected=i===!0}var o=e.wrappers.HTMLElement,i=e.mixin,a=e.registerWrapper,s=e.rewrap,c=e.unwrap,l=e.wrap,u=window.HTMLOptionElement;n.prototype=Object.create(o.prototype),i(n.prototype,{get text(){return t(this.textContent)},set text(e){this.textContent=t(String(e))},get form(){return l(c(this).form)}}),a(u,n,document.createElement("option")),r.prototype=n.prototype,e.wrappers.HTMLOptionElement=n,e.wrappers.Option=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.unwrap,a=e.wrap,s=window.HTMLSelectElement;t.prototype=Object.create(n.prototype),r(t.prototype,{add:function(e,t){"object"==typeof t&&(t=i(t)),i(this).add(i(e),t)},remove:function(e){return void 0===e?void n.prototype.remove.call(this):("object"==typeof e&&(e=i(e)),void i(this).remove(e))},get form(){return a(i(this).form)}}),o(s,t,document.createElement("select")),e.wrappers.HTMLSelectElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.unwrap,a=e.wrap,s=e.wrapHTMLCollection,c=window.HTMLTableElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get caption(){return a(i(this).caption)},createCaption:function(){return a(i(this).createCaption())},get tHead(){return a(i(this).tHead)},createTHead:function(){return a(i(this).createTHead())},createTFoot:function(){return a(i(this).createTFoot())},get tFoot(){return a(i(this).tFoot)},get tBodies(){return s(i(this).tBodies)},createTBody:function(){return a(i(this).createTBody())},get rows(){return s(i(this).rows)},insertRow:function(e){return a(i(this).insertRow(e))}}),o(c,t,document.createElement("table")),e.wrappers.HTMLTableElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapHTMLCollection,a=e.unwrap,s=e.wrap,c=window.HTMLTableSectionElement;t.prototype=Object.create(n.prototype),r(t.prototype,{constructor:t,get rows(){return i(a(this).rows)},insertRow:function(e){return s(a(this).insertRow(e))}}),o(c,t,document.createElement("thead")),e.wrappers.HTMLTableSectionElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapHTMLCollection,a=e.unwrap,s=e.wrap,c=window.HTMLTableRowElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get cells(){return i(a(this).cells)},insertCell:function(e){return s(a(this).insertCell(e))}}),o(c,t,document.createElement("tr")),e.wrappers.HTMLTableRowElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){switch(e.localName){case"content":return new n(e);case"shadow":return new o(e);case"template":return new i(e)}r.call(this,e)}var n=e.wrappers.HTMLContentElement,r=e.wrappers.HTMLElement,o=e.wrappers.HTMLShadowElement,i=e.wrappers.HTMLTemplateElement,a=(e.mixin,e.registerWrapper),s=window.HTMLUnknownElement;t.prototype=Object.create(r.prototype),a(s,t),e.wrappers.HTMLUnknownElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.Element,r=e.wrappers.HTMLElement,o=e.registerWrapper,i=(e.defineWrapGetter,e.unsafeUnwrap),a=e.wrap,s=e.mixin,c="http://www.w3.org/2000/svg",l=window.SVGElement,u=document.createElementNS(c,"title");if(!("classList"in u)){var d=Object.getOwnPropertyDescriptor(n.prototype,"classList");Object.defineProperty(r.prototype,"classList",d),delete n.prototype.classList}t.prototype=Object.create(n.prototype),s(t.prototype,{get ownerSVGElement(){return a(i(this).ownerSVGElement)}}),o(l,t,document.createElementNS(c,"title")),e.wrappers.SVGElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){p.call(this,e)}var n=e.mixin,r=e.registerWrapper,o=e.unwrap,i=e.wrap,a=window.SVGUseElement,s="http://www.w3.org/2000/svg",c=i(document.createElementNS(s,"g")),l=document.createElementNS(s,"use"),u=c.constructor,d=Object.getPrototypeOf(u.prototype),p=d.constructor;t.prototype=Object.create(d),"instanceRoot"in l&&n(t.prototype,{get instanceRoot(){return i(o(this).instanceRoot)},get animatedInstanceRoot(){return i(o(this).animatedInstanceRoot)}}),r(a,t,l),e.wrappers.SVGUseElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.EventTarget,r=e.mixin,o=e.registerWrapper,i=e.unsafeUnwrap,a=e.wrap,s=window.SVGElementInstance;s&&(t.prototype=Object.create(n.prototype),r(t.prototype,{get correspondingElement(){return a(i(this).correspondingElement)},get correspondingUseElement(){return a(i(this).correspondingUseElement)},get parentNode(){return a(i(this).parentNode)},get childNodes(){throw new Error("Not implemented")},get firstChild(){return a(i(this).firstChild)},get lastChild(){return a(i(this).lastChild)},get previousSibling(){return a(i(this).previousSibling)},get nextSibling(){return a(i(this).nextSibling)}}),o(s,t),e.wrappers.SVGElementInstance=t)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){o(e,this)}var n=e.mixin,r=e.registerWrapper,o=e.setWrapper,i=e.unsafeUnwrap,a=e.unwrap,s=e.unwrapIfNeeded,c=e.wrap,l=window.CanvasRenderingContext2D;n(t.prototype,{get canvas(){return c(i(this).canvas)},drawImage:function(){arguments[0]=s(arguments[0]),i(this).drawImage.apply(i(this),arguments)},createPattern:function(){return arguments[0]=a(arguments[0]),i(this).createPattern.apply(i(this),arguments)}}),r(l,t,document.createElement("canvas").getContext("2d")),e.wrappers.CanvasRenderingContext2D=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){i(e,this)}var n=e.addForwardingProperties,r=e.mixin,o=e.registerWrapper,i=e.setWrapper,a=e.unsafeUnwrap,s=e.unwrapIfNeeded,c=e.wrap,l=window.WebGLRenderingContext;if(l){r(t.prototype,{get canvas(){return c(a(this).canvas)},texImage2D:function(){arguments[5]=s(arguments[5]),a(this).texImage2D.apply(a(this),arguments)},texSubImage2D:function(){arguments[6]=s(arguments[6]),a(this).texSubImage2D.apply(a(this),arguments)}});var u=Object.getPrototypeOf(l.prototype);u!==Object.prototype&&n(u,t.prototype);var d=/WebKit/.test(navigator.userAgent)?{drawingBufferHeight:null,drawingBufferWidth:null}:{};o(l,t,d),e.wrappers.WebGLRenderingContext=t}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.Node,r=e.GetElementsByInterface,o=e.NonElementParentNodeInterface,i=e.ParentNodeInterface,a=e.SelectorsInterface,s=e.mixin,c=e.registerObject,l=e.registerWrapper,u=window.DocumentFragment;t.prototype=Object.create(n.prototype),s(t.prototype,i),s(t.prototype,a),s(t.prototype,r),s(t.prototype,o),l(u,t,document.createDocumentFragment()),e.wrappers.DocumentFragment=t;var d=c(document.createComment(""));e.wrappers.Comment=d}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t=d(u(e).ownerDocument.createDocumentFragment());n.call(this,t),c(t,this);var o=e.shadowRoot;f.set(this,o),this.treeScope_=new r(this,a(o||e)),h.set(this,e)}var n=e.wrappers.DocumentFragment,r=e.TreeScope,o=e.elementFromPoint,i=e.getInnerHTML,a=e.getTreeScope,s=e.mixin,c=e.rewrap,l=e.setInnerHTML,u=e.unsafeUnwrap,d=e.unwrap,p=e.wrap,h=new WeakMap,f=new WeakMap;t.prototype=Object.create(n.prototype),s(t.prototype,{constructor:t,get innerHTML(){return i(this)},set innerHTML(e){l(this,e),this.invalidateShadowRenderer()},get olderShadowRoot(){return f.get(this)||null},get host(){return h.get(this)||null},invalidateShadowRenderer:function(){return h.get(this).invalidateShadowRenderer()},elementFromPoint:function(e,t){return o(this,this.ownerDocument,e,t)},getSelection:function(){return document.getSelection()},get activeElement(){var e=d(this).ownerDocument.activeElement;if(!e||!e.nodeType)return null;for(var t=p(e);!this.contains(t);){for(;t.parentNode;)t=t.parentNode;if(!t.host)return null;t=t.host}return t}}),e.wrappers.ShadowRoot=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t=d(e).root;return t instanceof h?t.host:null}function n(t,n){if(t.shadowRoot){n=Math.min(t.childNodes.length-1,n);var r=t.childNodes[n];if(r){var o=e.getDestinationInsertionPoints(r);if(o.length>0){var i=o[0].parentNode;i.nodeType==Node.ELEMENT_NODE&&(t=i)}}}return t}function r(e){return e=u(e),t(e)||e}function o(e){a(e,this)}var i=e.registerWrapper,a=e.setWrapper,s=e.unsafeUnwrap,c=e.unwrap,l=e.unwrapIfNeeded,u=e.wrap,d=e.getTreeScope,p=window.Range,h=e.wrappers.ShadowRoot;o.prototype={get startContainer(){return r(s(this).startContainer)},get endContainer(){return r(s(this).endContainer)},get commonAncestorContainer(){return r(s(this).commonAncestorContainer)},setStart:function(e,t){e=n(e,t),s(this).setStart(l(e),t)},setEnd:function(e,t){e=n(e,t),s(this).setEnd(l(e),t)},setStartBefore:function(e){s(this).setStartBefore(l(e))},setStartAfter:function(e){s(this).setStartAfter(l(e))},setEndBefore:function(e){s(this).setEndBefore(l(e))},setEndAfter:function(e){s(this).setEndAfter(l(e))},selectNode:function(e){s(this).selectNode(l(e))},selectNodeContents:function(e){s(this).selectNodeContents(l(e))},compareBoundaryPoints:function(e,t){return s(this).compareBoundaryPoints(e,c(t))},extractContents:function(){return u(s(this).extractContents())},cloneContents:function(){return u(s(this).cloneContents())},insertNode:function(e){s(this).insertNode(l(e))},surroundContents:function(e){s(this).surroundContents(l(e))},cloneRange:function(){return u(s(this).cloneRange())},isPointInRange:function(e,t){return s(this).isPointInRange(l(e),t)},comparePoint:function(e,t){return s(this).comparePoint(l(e),t)},intersectsNode:function(e){return s(this).intersectsNode(l(e))},toString:function(){return s(this).toString()}},p.prototype.createContextualFragment&&(o.prototype.createContextualFragment=function(e){return u(s(this).createContextualFragment(e))}),i(window.Range,o,document.createRange()),e.wrappers.Range=o}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){e.previousSibling_=e.previousSibling,e.nextSibling_=e.nextSibling,e.parentNode_=e.parentNode}function n(n,o,i){var a=x(n),s=x(o),c=i?x(i):null;if(r(o),t(o),i)n.firstChild===i&&(n.firstChild_=i),i.previousSibling_=i.previousSibling;else{n.lastChild_=n.lastChild,n.lastChild===n.firstChild&&(n.firstChild_=n.firstChild);var l=R(a.lastChild);l&&(l.nextSibling_=l.nextSibling)}e.originalInsertBefore.call(a,s,c)}function r(n){var r=x(n),o=r.parentNode;if(o){var i=R(o);t(n),n.previousSibling&&(n.previousSibling.nextSibling_=n),n.nextSibling&&(n.nextSibling.previousSibling_=n),i.lastChild===n&&(i.lastChild_=n),i.firstChild===n&&(i.firstChild_=n),e.originalRemoveChild.call(o,r)}}function o(e){P.set(e,[])}function i(e){var t=P.get(e);return t||P.set(e,t=[]),t}function a(e){for(var t=[],n=0,r=e.firstChild;r;r=r.nextSibling)t[n++]=r;return t}function s(){for(var e=0;e<F.length;e++){var t=F[e],n=t.parentRenderer;n&&n.dirty||t.render()}F=[]}function c(){T=null,s()}function l(e){var t=A.get(e);return t||(t=new h(e),A.set(e,t)),t}function u(e){var t=j(e).root;return t instanceof C?t:null}function d(e){return l(e.host)}function p(e){this.skip=!1,this.node=e,this.childNodes=[]}function h(e){this.host=e,this.dirty=!1,this.invalidateAttributes(),this.associateNode(e)}function f(e){for(var t=[],n=e.firstChild;n;n=n.nextSibling)E(n)?t.push.apply(t,i(n)):t.push(n);return t}function m(e){if(e instanceof L)return e;if(e instanceof O)return null;for(var t=e.firstChild;t;t=t.nextSibling){var n=m(t);if(n)return n}return null}function w(e,t){i(t).push(e);var n=k.get(e);n?n.push(t):k.set(e,[t])}function v(e){return k.get(e)}function g(e){k.set(e,void 0)}function b(e,t){var n=t.getAttribute("select");if(!n)return!0;if(n=n.trim(),!n)return!0;if(!(e instanceof M))return!1;if(!q.test(n))return!1;try{return e.matches(n)}catch(r){return!1}}function y(e,t){var n=v(t);return n&&n[n.length-1]===e}function E(e){return e instanceof O||e instanceof L}function _(e){return e.shadowRoot}function S(e){for(var t=[],n=e.shadowRoot;n;n=n.olderShadowRoot)t.push(n);return t}var T,M=e.wrappers.Element,O=e.wrappers.HTMLContentElement,L=e.wrappers.HTMLShadowElement,N=e.wrappers.Node,C=e.wrappers.ShadowRoot,j=(e.assert,e.getTreeScope),D=(e.mixin,e.oneOf),H=e.unsafeUnwrap,x=e.unwrap,R=e.wrap,I=e.ArraySplice,P=new WeakMap,k=new WeakMap,A=new WeakMap,W=D(window,["requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","setTimeout"]),F=[],U=new I;U.equals=function(e,t){return x(e.node)===t},p.prototype={append:function(e){var t=new p(e);return this.childNodes.push(t),t},sync:function(e){if(!this.skip){for(var t=this.node,o=this.childNodes,i=a(x(t)),s=e||new WeakMap,c=U.calculateSplices(o,i),l=0,u=0,d=0,p=0;p<c.length;p++){for(var h=c[p];d<h.index;d++)u++,o[l++].sync(s);for(var f=h.removed.length,m=0;m<f;m++){var w=R(i[u++]);s.get(w)||r(w)}for(var v=h.addedCount,g=i[u]&&R(i[u]),m=0;m<v;m++){var b=o[l++],y=b.node;n(t,y,g),s.set(y,!0),b.sync(s)}d+=v}for(var p=d;p<o.length;p++)o[p].sync(s)}}},h.prototype={render:function(e){if(this.dirty){this.invalidateAttributes();var t=this.host;this.distribution(t);var n=e||new p(t);this.buildRenderTree(n,t);var r=!e;r&&n.sync(),this.dirty=!1}},get parentRenderer(){return j(this.host).renderer},invalidate:function(){if(!this.dirty){this.dirty=!0;var e=this.parentRenderer;if(e&&e.invalidate(),F.push(this),T)return;T=window[W](c,0)}},distribution:function(e){this.resetAllSubtrees(e),this.distributionResolution(e)},resetAll:function(e){E(e)?o(e):g(e),this.resetAllSubtrees(e)},resetAllSubtrees:function(e){for(var t=e.firstChild;t;t=t.nextSibling)this.resetAll(t);e.shadowRoot&&this.resetAll(e.shadowRoot),e.olderShadowRoot&&this.resetAll(e.olderShadowRoot)},distributionResolution:function(e){if(_(e)){for(var t=e,n=f(t),r=S(t),o=0;o<r.length;o++)this.poolDistribution(r[o],n);for(var o=r.length-1;o>=0;o--){var i=r[o],a=m(i);if(a){var s=i.olderShadowRoot;s&&(n=f(s));for(var c=0;c<n.length;c++)w(n[c],a)}this.distributionResolution(i)}}for(var l=e.firstChild;l;l=l.nextSibling)this.distributionResolution(l)},poolDistribution:function(e,t){if(!(e instanceof L))if(e instanceof O){var n=e;this.updateDependentAttributes(n.getAttribute("select"));for(var r=!1,o=0;o<t.length;o++){var e=t[o];e&&b(e,n)&&(w(e,n),t[o]=void 0,r=!0)}if(!r)for(var i=n.firstChild;i;i=i.nextSibling)w(i,n)}else for(var i=e.firstChild;i;i=i.nextSibling)this.poolDistribution(i,t)},buildRenderTree:function(e,t){for(var n=this.compose(t),r=0;r<n.length;r++){var o=n[r],i=e.append(o);this.buildRenderTree(i,o)}if(_(t)){var a=l(t);a.dirty=!1}},compose:function(e){for(var t=[],n=e.shadowRoot||e,r=n.firstChild;r;r=r.nextSibling)if(E(r)){this.associateNode(n);for(var o=i(r),a=0;a<o.length;a++){var s=o[a];y(r,s)&&t.push(s)}}else t.push(r);return t},invalidateAttributes:function(){this.attributes=Object.create(null)},updateDependentAttributes:function(e){if(e){var t=this.attributes;/\.\w+/.test(e)&&(t["class"]=!0),/#\w+/.test(e)&&(t.id=!0),e.replace(/\[\s*([^\s=\|~\]]+)/g,function(e,n){t[n]=!0})}},dependsOnAttribute:function(e){return this.attributes[e]},associateNode:function(e){H(e).polymerShadowRenderer_=this}};var q=/^(:not\()?[*.#[a-zA-Z_|]/;N.prototype.invalidateShadowRenderer=function(e){var t=H(this).polymerShadowRenderer_;return!!t&&(t.invalidate(),!0)},O.prototype.getDistributedNodes=L.prototype.getDistributedNodes=function(){return s(),i(this)},M.prototype.getDestinationInsertionPoints=function(){return s(),v(this)||[]},O.prototype.nodeIsInserted_=L.prototype.nodeIsInserted_=function(){this.invalidateShadowRenderer();var e,t=u(this);t&&(e=d(t)),H(this).polymerShadowRenderer_=e,e&&e.invalidate()},e.getRendererForHost=l,e.getShadowTrees=S,e.renderAllPending=s,e.getDestinationInsertionPoints=v,e.visual={insertBefore:n,remove:r}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(t){if(window[t]){r(!e.wrappers[t]);var c=function(e){n.call(this,e)};c.prototype=Object.create(n.prototype),o(c.prototype,{get form(){return s(a(this).form)}}),i(window[t],c,document.createElement(t.slice(4,-7))),e.wrappers[t]=c}}var n=e.wrappers.HTMLElement,r=e.assert,o=e.mixin,i=e.registerWrapper,a=e.unwrap,s=e.wrap,c=["HTMLButtonElement","HTMLFieldSetElement","HTMLInputElement","HTMLKeygenElement","HTMLLabelElement","HTMLLegendElement","HTMLObjectElement","HTMLOutputElement","HTMLTextAreaElement"];c.forEach(t)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r(e,this)}var n=e.registerWrapper,r=e.setWrapper,o=e.unsafeUnwrap,i=e.unwrap,a=e.unwrapIfNeeded,s=e.wrap,c=window.Selection;t.prototype={get anchorNode(){return s(o(this).anchorNode)},get focusNode(){return s(o(this).focusNode)},addRange:function(e){o(this).addRange(a(e))},collapse:function(e,t){o(this).collapse(a(e),t)},containsNode:function(e,t){return o(this).containsNode(a(e),t)},getRangeAt:function(e){return s(o(this).getRangeAt(e))},removeRange:function(e){o(this).removeRange(i(e))},selectAllChildren:function(e){o(this).selectAllChildren(e instanceof ShadowRoot?o(e.host):a(e))},toString:function(){return o(this).toString()}},c.prototype.extend&&(t.prototype.extend=function(e,t){o(this).extend(a(e),t)}),n(window.Selection,t,window.getSelection()),e.wrappers.Selection=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r(e,this)}var n=e.registerWrapper,r=e.setWrapper,o=e.unsafeUnwrap,i=e.unwrapIfNeeded,a=e.wrap,s=window.TreeWalker;t.prototype={get root(){return a(o(this).root)},get currentNode(){return a(o(this).currentNode)},set currentNode(e){o(this).currentNode=i(e)},get filter(){return o(this).filter},parentNode:function(){return a(o(this).parentNode())},firstChild:function(){return a(o(this).firstChild())},lastChild:function(){return a(o(this).lastChild())},previousSibling:function(){return a(o(this).previousSibling())},previousNode:function(){return a(o(this).previousNode())},nextNode:function(){return a(o(this).nextNode())}},n(s,t),e.wrappers.TreeWalker=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){u.call(this,e),this.treeScope_=new w(this,null)}function n(e){var n=document[e];t.prototype[e]=function(){return j(n.apply(N(this),arguments))}}function r(e,t){x.call(N(t),C(e)),o(e,t)}function o(e,t){e.shadowRoot&&t.adoptNode(e.shadowRoot),e instanceof m&&i(e,t);for(var n=e.firstChild;n;n=n.nextSibling)o(n,t)}function i(e,t){var n=e.olderShadowRoot;n&&t.adoptNode(n)}function a(e){L(e,this)}function s(e,t){var n=document.implementation[t];e.prototype[t]=function(){-return j(n.apply(N(this),arguments))}}function c(e,t){var n=document.implementation[t];e.prototype[t]=function(){return n.apply(N(this),arguments)}}var l=e.GetElementsByInterface,u=e.wrappers.Node,d=e.ParentNodeInterface,p=e.NonElementParentNodeInterface,h=e.wrappers.Selection,f=e.SelectorsInterface,m=e.wrappers.ShadowRoot,w=e.TreeScope,v=e.cloneNode,g=e.defineGetter,b=e.defineWrapGetter,y=e.elementFromPoint,E=e.forwardMethodsToWrapper,_=e.matchesNames,S=e.mixin,T=e.registerWrapper,M=e.renderAllPending,O=e.rewrap,L=e.setWrapper,N=e.unsafeUnwrap,C=e.unwrap,j=e.wrap,D=e.wrapEventTargetMethods,H=(e.wrapNodeList,new WeakMap);t.prototype=Object.create(u.prototype),b(t,"documentElement"),b(t,"body"),b(t,"head"),g(t,"activeElement",function(){var e=C(this).activeElement;if(!e||!e.nodeType)return null;for(var t=j(e);!this.contains(t);){for(;t.parentNode;)t=t.parentNode;if(!t.host)return null;t=t.host}return t}),["createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode"].forEach(n);var x=document.adoptNode,R=document.getSelection;S(t.prototype,{adoptNode:function(e){return e.parentNode&&e.parentNode.removeChild(e),r(e,this),e},elementFromPoint:function(e,t){return y(this,this,e,t)},importNode:function(e,t){return v(e,t,N(this))},getSelection:function(){return M(),new h(R.call(C(this)))},getElementsByName:function(e){return f.querySelectorAll.call(this,"[name="+JSON.stringify(String(e))+"]")}});var I=document.createTreeWalker,P=e.wrappers.TreeWalker;if(t.prototype.createTreeWalker=function(e,t,n,r){var o=null;return n&&(n.acceptNode&&"function"==typeof n.acceptNode?o={acceptNode:function(e){return n.acceptNode(j(e))}}:"function"==typeof n&&(o=function(e){return n(j(e))})),new P(I.call(C(this),C(e),t,o,r))},document.registerElement){var k=document.registerElement;t.prototype.registerElement=function(t,n){function r(e){return e?void L(e,this):i?document.createElement(i,t):document.createElement(t)}var o,i;if(void 0!==n&&(o=n.prototype,i=n["extends"]),o||(o=Object.create(HTMLElement.prototype)),e.nativePrototypeTable.get(o))throw new Error("NotSupportedError");for(var a,s=Object.getPrototypeOf(o),c=[];s&&!(a=e.nativePrototypeTable.get(s));)c.push(s),s=Object.getPrototypeOf(s);if(!a)throw new Error("NotSupportedError");for(var l=Object.create(a),u=c.length-1;u>=0;u--)l=Object.create(l);["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"].forEach(function(e){var t=o[e];t&&(l[e]=function(){j(this)instanceof r||O(this),t.apply(j(this),arguments)})});var d={prototype:l};i&&(d["extends"]=i),r.prototype=o,r.prototype.constructor=r,e.constructorTable.set(l,r),e.nativePrototypeTable.set(o,l);k.call(C(this),t,d);return r},E([window.HTMLDocument||window.Document],["registerElement"])}E([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement,window.HTMLHtmlElement],["appendChild","compareDocumentPosition","contains","getElementsByClassName","getElementsByTagName","getElementsByTagNameNS","insertBefore","querySelector","querySelectorAll","removeChild","replaceChild"]),E([window.HTMLBodyElement,window.HTMLHeadElement,window.HTMLHtmlElement],_),E([window.HTMLDocument||window.Document],["adoptNode","importNode","contains","createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode","createTreeWalker","elementFromPoint","getElementById","getElementsByName","getSelection"]),S(t.prototype,l),S(t.prototype,d),S(t.prototype,f),S(t.prototype,p),S(t.prototype,{get implementation(){var e=H.get(this);return e?e:(e=new a(C(this).implementation),H.set(this,e),e)},get defaultView(){return j(C(this).defaultView)}}),T(window.Document,t,document.implementation.createHTMLDocument("")),window.HTMLDocument&&T(window.HTMLDocument,t),D([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement]);var A=document.implementation.createDocument;a.prototype.createDocument=function(){return arguments[2]=C(arguments[2]),j(A.apply(N(this),arguments))},s(a,"createDocumentType"),s(a,"createHTMLDocument"),c(a,"hasFeature"),T(window.DOMImplementation,a),E([window.DOMImplementation],["createDocument","createDocumentType","createHTMLDocument","hasFeature"]),e.adoptNodeNoRemove=r,e.wrappers.DOMImplementation=a,e.wrappers.Document=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.EventTarget,r=e.wrappers.Selection,o=e.mixin,i=e.registerWrapper,a=e.renderAllPending,s=e.unwrap,c=e.unwrapIfNeeded,l=e.wrap,u=window.Window,d=window.getComputedStyle,p=window.getDefaultComputedStyle,h=window.getSelection;t.prototype=Object.create(n.prototype),u.prototype.getComputedStyle=function(e,t){return l(this||window).getComputedStyle(c(e),t)},p&&(u.prototype.getDefaultComputedStyle=function(e,t){return l(this||window).getDefaultComputedStyle(c(e),t)}),u.prototype.getSelection=function(){return l(this||window).getSelection()},delete window.getComputedStyle,delete window.getDefaultComputedStyle,delete window.getSelection,["addEventListener","removeEventListener","dispatchEvent"].forEach(function(e){u.prototype[e]=function(){var t=l(this||window);return t[e].apply(t,arguments)},delete window[e]}),o(t.prototype,{getComputedStyle:function(e,t){return a(),d.call(s(this),c(e),t)},getSelection:function(){return a(),new r(h.call(s(this)))},get document(){return l(s(this).document)}}),p&&(t.prototype.getDefaultComputedStyle=function(e,t){return a(),p.call(s(this),c(e),t)}),i(u,t,window),e.wrappers.Window=t}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.unwrap,n=window.DataTransfer||window.Clipboard,r=n.prototype.setDragImage;r&&(n.prototype.setDragImage=function(e,n,o){r.call(this,t(e),n,o)})}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t;t=e instanceof i?e:new i(e&&o(e)),r(t,this)}var n=e.registerWrapper,r=e.setWrapper,o=e.unwrap,i=window.FormData;i&&(n(i,t,new i),e.wrappers.FormData=t)}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.unwrapIfNeeded,n=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(e){return n.call(this,t(e))}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t=n[e],r=window[t];if(r){var o=document.createElement(e),i=o.constructor;window[t]=i}}var n=(e.isWrapperFor,{a:"HTMLAnchorElement",area:"HTMLAreaElement",audio:"HTMLAudioElement",base:"HTMLBaseElement",body:"HTMLBodyElement",br:"HTMLBRElement",button:"HTMLButtonElement",canvas:"HTMLCanvasElement",caption:"HTMLTableCaptionElement",col:"HTMLTableColElement",content:"HTMLContentElement",data:"HTMLDataElement",datalist:"HTMLDataListElement",del:"HTMLModElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",dl:"HTMLDListElement",embed:"HTMLEmbedElement",fieldset:"HTMLFieldSetElement",font:"HTMLFontElement",form:"HTMLFormElement",frame:"HTMLFrameElement",frameset:"HTMLFrameSetElement",h1:"HTMLHeadingElement",head:"HTMLHeadElement",hr:"HTMLHRElement",html:"HTMLHtmlElement",iframe:"HTMLIFrameElement",img:"HTMLImageElement",input:"HTMLInputElement",keygen:"HTMLKeygenElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",li:"HTMLLIElement",link:"HTMLLinkElement",map:"HTMLMapElement",marquee:"HTMLMarqueeElement",menu:"HTMLMenuElement",menuitem:"HTMLMenuItemElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",object:"HTMLObjectElement",ol:"HTMLOListElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",script:"HTMLScriptElement",select:"HTMLSelectElement",shadow:"HTMLShadowElement",source:"HTMLSourceElement",span:"HTMLSpanElement",style:"HTMLStyleElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",template:"HTMLTemplateElement",textarea:"HTMLTextAreaElement",thead:"HTMLTableSectionElement",time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",ul:"HTMLUListElement",video:"HTMLVideoElement"});Object.keys(n).forEach(t),Object.getOwnPropertyNames(e.wrappers).forEach(function(t){window[t]=e.wrappers[t]})}(window.ShadowDOMPolyfill),function(e){function t(e,t){var n="";return Array.prototype.forEach.call(e,function(e){n+=e.textContent+"\n\n"}),t||(n=n.replace(d,"")),n}function n(e){var t=document.createElement("style");return t.textContent=e,t}function r(e){var t=n(e);document.head.appendChild(t);var r=[];if(t.sheet)try{r=t.sheet.cssRules}catch(o){}else console.warn("sheet not found",t);return t.parentNode.removeChild(t),r}function o(){C.initialized=!0,document.body.appendChild(C);var e=C.contentDocument,t=e.createElement("base");t.href=document.baseURI,e.head.appendChild(t)}function i(e){C.initialized||o(),document.body.appendChild(C),e(C.contentDocument),document.body.removeChild(C)}function a(e,t){if(t){var o;if(e.match("@import")&&D){var a=n(e);i(function(e){e.head.appendChild(a.impl),o=Array.prototype.slice.call(a.sheet.cssRules,0),t(o)})}else o=r(e),t(o)}}function s(e){e&&l().appendChild(document.createTextNode(e))}function c(e,t){var r=n(e);r.setAttribute(t,""),r.setAttribute(x,""),document.head.appendChild(r)}function l(){return j||(j=document.createElement("style"),j.setAttribute(x,""),j[x]=!0),j}var u={strictStyling:!1,registry:{},shimStyling:function(e,n,r){var o=this.prepareRoot(e,n,r),i=this.isTypeExtension(r),a=this.makeScopeSelector(n,i),s=t(o,!0);s=this.scopeCssText(s,a),e&&(e.shimmedStyle=s),this.addCssToDocument(s,n)},shimStyle:function(e,t){return this.shimCssText(e.textContent,t)},shimCssText:function(e,t){return e=this.insertDirectives(e),this.scopeCssText(e,t)},makeScopeSelector:function(e,t){return e?t?"[is="+e+"]":e:""},isTypeExtension:function(e){return e&&e.indexOf("-")<0},prepareRoot:function(e,t,n){var r=this.registerRoot(e,t,n);return this.replaceTextInStyles(r.rootStyles,this.insertDirectives),this.removeStyles(e,r.rootStyles),this.strictStyling&&this.applyScopeToContent(e,t),r.scopeStyles},removeStyles:function(e,t){for(var n,r=0,o=t.length;r<o&&(n=t[r]);r++)n.parentNode.removeChild(n)},registerRoot:function(e,t,n){var r=this.registry[t]={root:e,name:t,extendsName:n},o=this.findStyles(e);r.rootStyles=o,r.scopeStyles=r.rootStyles;var i=this.registry[r.extendsName];return i&&(r.scopeStyles=i.scopeStyles.concat(r.scopeStyles)),r},findStyles:function(e){if(!e)return[];var t=e.querySelectorAll("style");return Array.prototype.filter.call(t,function(e){return!e.hasAttribute(R)})},applyScopeToContent:function(e,t){e&&(Array.prototype.forEach.call(e.querySelectorAll("*"),function(e){e.setAttribute(t,"")}),Array.prototype.forEach.call(e.querySelectorAll("template"),function(e){this.applyScopeToContent(e.content,t)},this))},insertDirectives:function(e){return e=this.insertPolyfillDirectivesInCssText(e),this.insertPolyfillRulesInCssText(e)},insertPolyfillDirectivesInCssText:function(e){return e=e.replace(p,function(e,t){return t.slice(0,-2)+"{"}),e.replace(h,function(e,t){return t+" {"})},insertPolyfillRulesInCssText:function(e){return e=e.replace(f,function(e,t){return t.slice(0,-1)}),e.replace(m,function(e,t,n,r){var o=e.replace(t,"").replace(n,"");return r+o})},scopeCssText:function(e,t){var n=this.extractUnscopedRulesFromCssText(e);if(e=this.insertPolyfillHostInCssText(e),e=this.convertColonHost(e),e=this.convertColonHostContext(e),e=this.convertShadowDOMSelectors(e),t){var e,r=this;a(e,function(n){e=r.scopeRules(n,t)})}return e=e+"\n"+n,e.trim()},extractUnscopedRulesFromCssText:function(e){for(var t,n="";t=w.exec(e);)n+=t[1].slice(0,-1)+"\n\n";for(;t=v.exec(e);)n+=t[0].replace(t[2],"").replace(t[1],t[3])+"\n\n";return n},convertColonHost:function(e){return this.convertColonRule(e,E,this.colonHostPartReplacer)},convertColonHostContext:function(e){return this.convertColonRule(e,_,this.colonHostContextPartReplacer)},convertColonRule:function(e,t,n){return e.replace(t,function(e,t,r,o){if(t=O,r){for(var i,a=r.split(","),s=[],c=0,l=a.length;c<l&&(i=a[c]);c++)i=i.trim(),s.push(n(t,i,o));return s.join(",")}return t+o})},colonHostContextPartReplacer:function(e,t,n){return t.match(g)?this.colonHostPartReplacer(e,t,n):e+t+n+", "+t+" "+e+n},colonHostPartReplacer:function(e,t,n){return e+t.replace(g,"")+n},convertShadowDOMSelectors:function(e){for(var t=0;t<N.length;t++)e=e.replace(N[t]," ");return e},scopeRules:function(e,t){var n="";return e&&Array.prototype.forEach.call(e,function(e){if(e.selectorText&&e.style&&void 0!==e.style.cssText)n+=this.scopeSelector(e.selectorText,t,this.strictStyling)+" {\n\t",n+=this.propertiesFromRule(e)+"\n}\n\n";else if(e.type===CSSRule.MEDIA_RULE)n+="@media "+e.media.mediaText+" {\n",n+=this.scopeRules(e.cssRules,t),n+="\n}\n\n";else try{e.cssText&&(n+=e.cssText+"\n\n")}catch(r){e.type===CSSRule.KEYFRAMES_RULE&&e.cssRules&&(n+=this.ieSafeCssTextFromKeyFrameRule(e))}},this),n},ieSafeCssTextFromKeyFrameRule:function(e){var t="@keyframes "+e.name+" {";return Array.prototype.forEach.call(e.cssRules,function(e){t+=" "+e.keyText+" {"+e.style.cssText+"}"}),t+=" }"},scopeSelector:function(e,t,n){var r=[],o=e.split(",");return o.forEach(function(e){e=e.trim(),this.selectorNeedsScoping(e,t)&&(e=n&&!e.match(O)?this.applyStrictSelectorScope(e,t):this.applySelectorScope(e,t)),r.push(e)},this),r.join(", ")},selectorNeedsScoping:function(e,t){if(Array.isArray(t))return!0;var n=this.makeScopeMatcher(t);return!e.match(n)},makeScopeMatcher:function(e){return e=e.replace(/\[/g,"\\[").replace(/\]/g,"\\]"),new RegExp("^("+e+")"+S,"m")},applySelectorScope:function(e,t){return Array.isArray(t)?this.applySelectorScopeList(e,t):this.applySimpleSelectorScope(e,t)},applySelectorScopeList:function(e,t){for(var n,r=[],o=0;n=t[o];o++)r.push(this.applySimpleSelectorScope(e,n));return r.join(", ")},applySimpleSelectorScope:function(e,t){return e.match(L)?(e=e.replace(O,t),e.replace(L,t+" ")):t+" "+e},applyStrictSelectorScope:function(e,t){t=t.replace(/\[is=([^\]]*)\]/g,"$1");var n=[" ",">","+","~"],r=e,o="["+t+"]";return n.forEach(function(e){var t=r.split(e);r=t.map(function(e){var t=e.trim().replace(L,"");return t&&n.indexOf(t)<0&&t.indexOf(o)<0&&(e=t.replace(/([^:]*)(:*)(.*)/,"$1"+o+"$2$3")),e}).join(e)}),r},insertPolyfillHostInCssText:function(e){return e.replace(M,b).replace(T,g)},propertiesFromRule:function(e){var t=e.style.cssText;e.style.content&&!e.style.content.match(/['"]+|attr/)&&(t=t.replace(/content:[^;]*;/g,"content: '"+e.style.content+"';"));var n=e.style;for(var r in n)"initial"===n[r]&&(t+=r+": initial; ");return t},replaceTextInStyles:function(e,t){e&&t&&(e instanceof Array||(e=[e]),Array.prototype.forEach.call(e,function(e){e.textContent=t.call(this,e.textContent)},this))},addCssToDocument:function(e,t){e.match("@import")?c(e,t):s(e)}},d=/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim,p=/\/\*\s*@polyfill ([^*]*\*+([^\/*][^*]*\*+)*\/)([^{]*?){/gim,h=/polyfill-next-selector[^}]*content\:[\s]*?['"](.*?)['"][;\s]*}([^{]*?){/gim,f=/\/\*\s@polyfill-rule([^*]*\*+([^\/*][^*]*\*+)*)\//gim,m=/(polyfill-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,w=/\/\*\s@polyfill-unscoped-rule([^*]*\*+([^\/*][^*]*\*+)*)\//gim,v=/(polyfill-unscoped-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,g="-shadowcsshost",b="-shadowcsscontext",y=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",E=new RegExp("("+g+y,"gim"),_=new RegExp("("+b+y,"gim"),S="([>\\s~+[.,{:][\\s\\S]*)?$",T=/\:host/gim,M=/\:host-context/gim,O=g+"-no-combinator",L=new RegExp(g,"gim"),N=(new RegExp(b,"gim"),[/>>>/g,/::shadow/g,/::content/g,/\/deep\//g,/\/shadow\//g,/\/shadow-deep\//g,/\^\^/g,/\^(?!=)/g]),C=document.createElement("iframe");C.style.display="none";var j,D=navigator.userAgent.match("Chrome"),H="shim-shadowdom",x="shim-shadowdom-css",R="no-shim";if(window.ShadowDOMPolyfill){s("style { display: none !important; }\n");var I=ShadowDOMPolyfill.wrap(document),P=I.querySelector("head");P.insertBefore(l(),P.childNodes[0]),document.addEventListener("DOMContentLoaded",function(){e.urlResolver;if(window.HTMLImports&&!HTMLImports.useNative){var t="link[rel=stylesheet]["+H+"]",n="style["+H+"]";HTMLImports.importer.documentPreloadSelectors+=","+t,HTMLImports.importer.importsPreloadSelectors+=","+t,HTMLImports.parser.documentSelectors=[HTMLImports.parser.documentSelectors,t,n].join(",");var r=HTMLImports.parser.parseGeneric;HTMLImports.parser.parseGeneric=function(e){if(!e[x]){var t=e.__importElement||e;if(!t.hasAttribute(H))return void r.call(this,e);e.__resource&&(t=e.ownerDocument.createElement("style"),t.textContent=e.__resource),HTMLImports.path.resolveUrlsInStyle(t,e.href),t.textContent=u.shimStyle(t),t.removeAttribute(H,""),t.setAttribute(x,""),t[x]=!0,t.parentNode!==P&&(e.parentNode===P?P.replaceChild(t,e):this.addElementToDocument(t)),t.__importParsed=!0,this.markParsingComplete(e),this.parseNext()}};var o=HTMLImports.parser.hasResource;HTMLImports.parser.hasResource=function(e){return"link"===e.localName&&"stylesheet"===e.rel&&e.hasAttribute(H)?e.__resource:o.call(this,e)}}})}e.ShadowCSS=u}(window.WebComponents)),function(e){window.ShadowDOMPolyfill?(window.wrap=ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}}(window.WebComponents),function(e){"use strict";function t(e){return void 0!==p[e]}function n(){s.call(this),this._isInvalid=!0}function r(e){return""==e&&n.call(this),e.toLowerCase()}function o(e){var t=e.charCodeAt(0);return t>32&&t<127&&[34,35,60,62,63,96].indexOf(t)==-1?e:encodeURIComponent(e)}function i(e){var t=e.charCodeAt(0);return t>32&&t<127&&[34,35,60,62,96].indexOf(t)==-1?e:encodeURIComponent(e)}function a(e,a,s){function c(e){b.push(e)}var l=a||"scheme start",u=0,d="",v=!1,g=!1,b=[];e:for(;(e[u-1]!=f||0==u)&&!this._isInvalid;){var y=e[u];switch(l){case"scheme start":if(!y||!m.test(y)){if(a){c("Invalid scheme.");break e}d="",l="no scheme";continue}d+=y.toLowerCase(),l="scheme";break;case"scheme":if(y&&w.test(y))d+=y.toLowerCase();else{if(":"!=y){if(a){if(f==y)break e;c("Code point not allowed in scheme: "+y);break e}d="",u=0,l="no scheme";continue}if(this._scheme=d,d="",a)break e;t(this._scheme)&&(this._isRelative=!0),l="file"==this._scheme?"relative":this._isRelative&&s&&s._scheme==this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"==y?(this._query="?",l="query"):"#"==y?(this._fragment="#",l="fragment"):f!=y&&"\t"!=y&&"\n"!=y&&"\r"!=y&&(this._schemeData+=o(y));break;case"no scheme":if(s&&t(s._scheme)){l="relative";continue}c("Missing scheme."),n.call(this);break;case"relative or authority":if("/"!=y||"/"!=e[u+1]){c("Expected /, got: "+y),l="relative";continue}l="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!=this._scheme&&(this._scheme=s._scheme),f==y){this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query=s._query,this._username=s._username,this._password=s._password;break e}if("/"==y||"\\"==y)"\\"==y&&c("\\ is an invalid code point."),l="relative slash";else if("?"==y)this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query="?",this._username=s._username,this._password=s._password,l="query";else{if("#"!=y){var E=e[u+1],_=e[u+2];("file"!=this._scheme||!m.test(y)||":"!=E&&"|"!=E||f!=_&&"/"!=_&&"\\"!=_&&"?"!=_&&"#"!=_)&&(this._host=s._host,this._port=s._port,this._username=s._username,this._password=s._password,this._path=s._path.slice(),this._path.pop()),l="relative path";continue}this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query=s._query,this._fragment="#",this._username=s._username,this._password=s._password,l="fragment"}break;case"relative slash":if("/"!=y&&"\\"!=y){"file"!=this._scheme&&(this._host=s._host,this._port=s._port,this._username=s._username,this._password=s._password),l="relative path";continue}"\\"==y&&c("\\ is an invalid code point."),l="file"==this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=y){c("Expected '/', got: "+y),l="authority ignore slashes";continue}l="authority second slash";break;case"authority second slash":if(l="authority ignore slashes","/"!=y){c("Expected '/', got: "+y);continue}break;case"authority ignore slashes":if("/"!=y&&"\\"!=y){l="authority";continue}c("Expected authority, got: "+y);break;case"authority":if("@"==y){v&&(c("@ already seen."),d+="%40"),v=!0;for(var S=0;S<d.length;S++){var T=d[S];if("\t"!=T&&"\n"!=T&&"\r"!=T)if(":"!=T||null!==this._password){var M=o(T);null!==this._password?this._password+=M:this._username+=M}else this._password="";else c("Invalid whitespace in authority.")}d=""}else{if(f==y||"/"==y||"\\"==y||"?"==y||"#"==y){u-=d.length,d="",l="host";continue}d+=y}break;case"file host":if(f==y||"/"==y||"\\"==y||"?"==y||"#"==y){2!=d.length||!m.test(d[0])||":"!=d[1]&&"|"!=d[1]?0==d.length?l="relative path start":(this._host=r.call(this,d),d="",l="relative path start"):l="relative path";continue}"\t"==y||"\n"==y||"\r"==y?c("Invalid whitespace in file host."):d+=y;break;case"host":case"hostname":if(":"!=y||g){if(f==y||"/"==y||"\\"==y||"?"==y||"#"==y){if(this._host=r.call(this,d),d="",l="relative path start",a)break e;continue}"\t"!=y&&"\n"!=y&&"\r"!=y?("["==y?g=!0:"]"==y&&(g=!1),d+=y):c("Invalid code point in host/hostname: "+y)}else if(this._host=r.call(this,d),d="",l="port","hostname"==a)break e;break;case"port":if(/[0-9]/.test(y))d+=y;else{if(f==y||"/"==y||"\\"==y||"?"==y||"#"==y||a){if(""!=d){var O=parseInt(d,10);O!=p[this._scheme]&&(this._port=O+""),d=""}if(a)break e;l="relative path start";continue}"\t"==y||"\n"==y||"\r"==y?c("Invalid code point in port: "+y):n.call(this)}break;case"relative path start":if("\\"==y&&c("'\\' not allowed in path."),l="relative path","/"!=y&&"\\"!=y)continue;break;case"relative path":if(f!=y&&"/"!=y&&"\\"!=y&&(a||"?"!=y&&"#"!=y))"\t"!=y&&"\n"!=y&&"\r"!=y&&(d+=o(y));else{"\\"==y&&c("\\ not allowed in relative path.");var L;(L=h[d.toLowerCase()])&&(d=L),".."==d?(this._path.pop(),"/"!=y&&"\\"!=y&&this._path.push("")):"."==d&&"/"!=y&&"\\"!=y?this._path.push(""):"."!=d&&("file"==this._scheme&&0==this._path.length&&2==d.length&&m.test(d[0])&&"|"==d[1]&&(d=d[0]+":"),this._path.push(d)),d="","?"==y?(this._query="?",l="query"):"#"==y&&(this._fragment="#",l="fragment")}break;case"query":a||"#"!=y?f!=y&&"\t"!=y&&"\n"!=y&&"\r"!=y&&(this._query+=i(y)):(this._fragment="#",l="fragment");break;case"fragment":f!=y&&"\t"!=y&&"\n"!=y&&"\r"!=y&&(this._fragment+=y)}u++}}function s(){this._scheme="",this._schemeData="",this._username="",this._password=null,this._host="",this._port="",this._path=[],this._query="",this._fragment="",this._isInvalid=!1,this._isRelative=!1}function c(e,t){void 0===t||t instanceof c||(t=new c(String(t))),this._url=e,s.call(this);var n=e.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g,"");a.call(this,n,null,t)}var l=!1;if(!e.forceJURL)try{var u=new URL("b","http://a");u.pathname="c%20d",l="http://a/c%20d"===u.href}catch(d){}if(!l){var p=Object.create(null);p.ftp=21,p.file=0,p.gopher=70,p.http=80,p.https=443,p.ws=80,p.wss=443;var h=Object.create(null);h["%2e"]=".",h[".%2e"]="..",h["%2e."]="..",h["%2e%2e"]="..";var f=void 0,m=/[a-zA-Z]/,w=/[a-zA-Z0-9\+\-\.]/;c.prototype={toString:function(){return this.href},get href(){if(this._isInvalid)return this._url;var e="";return""==this._username&&null==this._password||(e=this._username+(null!=this._password?":"+this._password:"")+"@"),this.protocol+(this._isRelative?"//"+e+this.host:"")+this.pathname+this._query+this._fragment},set href(e){s.call(this),a.call(this,e)},get protocol(){return this._scheme+":"},set protocol(e){this._isInvalid||a.call(this,e+":","scheme start")},get host(){return this._isInvalid?"":this._port?this._host+":"+this._port:this._host},set host(e){!this._isInvalid&&this._isRelative&&a.call(this,e,"host")},get hostname(){return this._host},set hostname(e){!this._isInvalid&&this._isRelative&&a.call(this,e,"hostname")},get port(){return this._port},set port(e){!this._isInvalid&&this._isRelative&&a.call(this,e,"port")},get pathname(){return this._isInvalid?"":this._isRelative?"/"+this._path.join("/"):this._schemeData},set pathname(e){!this._isInvalid&&this._isRelative&&(this._path=[],a.call(this,e,"relative path start"))},get search(){return this._isInvalid||!this._query||"?"==this._query?"":this._query},set search(e){!this._isInvalid&&this._isRelative&&(this._query="?","?"==e[0]&&(e=e.slice(1)),a.call(this,e,"query"))},get hash(){return this._isInvalid||!this._fragment||"#"==this._fragment?"":this._fragment},set hash(e){this._isInvalid||(this._fragment="#","#"==e[0]&&(e=e.slice(1)),a.call(this,e,"fragment"))},get origin(){var e;if(this._isInvalid||!this._scheme)return"";switch(this._scheme){case"data":case"file":case"javascript":case"mailto":return"null"}return e=this.host,e?this._scheme+"://"+e:""}};var v=e.URL;v&&(c.createObjectURL=function(e){return v.createObjectURL.apply(v,arguments)},c.revokeObjectURL=function(e){v.revokeObjectURL(e)}),e.URL=c}}(self),function(e){function t(e){y.push(e),b||(b=!0,m(r))}function n(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function r(){b=!1;var e=y;y=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var n=e.takeRecords();o(e),n.length&&(e.callback_(n,e),t=!0)}),t&&r()}function o(e){e.nodes_.forEach(function(t){var n=w.get(t);n&&n.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}function i(e,t){for(var n=e;n;n=n.parentNode){var r=w.get(n);if(r)for(var o=0;o<r.length;o++){var i=r[o],a=i.options;if(n===e||a.subtree){var s=t(a);s&&i.enqueue(s)}}}}function a(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++E}function s(e,t){this.type=e,this.target=t,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function c(e){var t=new s(e.type,e.target);return t.addedNodes=e.addedNodes.slice(),t.removedNodes=e.removedNodes.slice(),t.previousSibling=e.previousSibling,t.nextSibling=e.nextSibling,t.attributeName=e.attributeName,t.attributeNamespace=e.attributeNamespace,t.oldValue=e.oldValue,t}function l(e,t){return _=new s(e,t)}function u(e){return S?S:(S=c(_),S.oldValue=e,S)}function d(){_=S=void 0}function p(e){return e===S||e===_}function h(e,t){return e===t?e:S&&p(e)?S:null}function f(e,t,n){this.observer=e,this.target=t,this.options=n,this.transientObservedNodes=[]}if(!e.JsMutationObserver){var m,w=new WeakMap;if(/Trident|Edge/.test(navigator.userAgent))m=setTimeout;else if(window.setImmediate)m=window.setImmediate;else{var v=[],g=String(Math.random());window.addEventListener("message",function(e){if(e.data===g){var t=v;v=[],t.forEach(function(e){e()})}}),m=function(e){v.push(e),window.postMessage(g,"*")}}var b=!1,y=[],E=0;a.prototype={observe:function(e,t){if(e=n(e),!t.childList&&!t.attributes&&!t.characterData||t.attributeOldValue&&!t.attributes||t.attributeFilter&&t.attributeFilter.length&&!t.attributes||t.characterDataOldValue&&!t.characterData)throw new SyntaxError;var r=w.get(e);r||w.set(e,r=[]);for(var o,i=0;i<r.length;i++)if(r[i].observer===this){o=r[i],o.removeListeners(),o.options=t;break}o||(o=new f(this,e,t),r.push(o),this.nodes_.push(e)),o.addListeners()},disconnect:function(){this.nodes_.forEach(function(e){for(var t=w.get(e),n=0;n<t.length;n++){var r=t[n];if(r.observer===this){r.removeListeners(),t.splice(n,1);break}}},this),this.records_=[]},takeRecords:function(){var e=this.records_;return this.records_=[],e}};var _,S;f.prototype={enqueue:function(e){var n=this.observer.records_,r=n.length;if(n.length>0){var o=n[r-1],i=h(o,e);if(i)return void(n[r-1]=i)}else t(this.observer);n[r]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=w.get(e);t||w.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=w.get(e),n=0;n<t.length;n++)if(t[n]===this){t.splice(n,1);break}},this)},handleEvent:function(e){switch(e.stopImmediatePropagation(),e.type){case"DOMAttrModified":var t=e.attrName,n=e.relatedNode.namespaceURI,r=e.target,o=new l("attributes",r);o.attributeName=t,o.attributeNamespace=n;var a=e.attrChange===MutationEvent.ADDITION?null:e.prevValue;i(r,function(e){if(e.attributes&&(!e.attributeFilter||!e.attributeFilter.length||e.attributeFilter.indexOf(t)!==-1||e.attributeFilter.indexOf(n)!==-1))return e.attributeOldValue?u(a):o});break;case"DOMCharacterDataModified":var r=e.target,o=l("characterData",r),a=e.prevValue;i(r,function(e){if(e.characterData)return e.characterDataOldValue?u(a):o});break;case"DOMNodeRemoved":this.addTransientObserver(e.target);case"DOMNodeInserted":var s,c,p=e.target;"DOMNodeInserted"===e.type?(s=[p],c=[]):(s=[],c=[p]);var h=p.previousSibling,f=p.nextSibling,o=l("childList",e.target.parentNode);o.addedNodes=s,o.removedNodes=c,o.previousSibling=h,o.nextSibling=f,i(e.relatedNode,function(e){if(e.childList)return o})}d()}},e.JsMutationObserver=a,e.MutationObserver||(e.MutationObserver=a,a._isPolyfilled=!0)}}(self),function(e){"use strict";if(!window.performance||!window.performance.now){var t=Date.now();window.performance={now:function(){return Date.now()-t}}}window.requestAnimationFrame||(window.requestAnimationFrame=function(){var e=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;return e?function(t){return e(function(){t(performance.now())})}:function(e){return window.setTimeout(e,1e3/60)}}()),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(){return window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(e){clearTimeout(e)}}());var n=function(){var e=document.createEvent("Event");return e.initEvent("foo",!0,!0),e.preventDefault(),e.defaultPrevented}();if(!n){var r=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(r.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var o=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||o&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.Event||o&&"function"!=typeof window.Event){var i=window.Event;window.Event=function(e,t){t=t||{};var n=document.createEvent("Event");return n.initEvent(e,Boolean(t.bubbles),Boolean(t.cancelable)),n},window.Event.prototype=i.prototype}}(window.WebComponents),window.HTMLImports=window.HTMLImports||{flags:{}},function(e){function t(e,t){t=t||f,r(function(){i(e,t)},t)}function n(e){return"complete"===e.readyState||e.readyState===v}function r(e,t){if(n(t))e&&e();else{var o=function(){"complete"!==t.readyState&&t.readyState!==v||(t.removeEventListener(g,o),r(e,t))};t.addEventListener(g,o)}}function o(e){e.target.__loaded=!0}function i(e,t){function n(){c==l&&e&&e({allImports:s,loadedImports:u,errorImports:d})}function r(e){o(e),u.push(this),c++,n()}function i(e){-d.push(this),c++,n()}var s=t.querySelectorAll("link[rel=import]"),c=0,l=s.length,u=[],d=[];if(l)for(var p,h=0;h<l&&(p=s[h]);h++)a(p)?(u.push(this),c++,n()):(p.addEventListener("load",r),p.addEventListener("error",i));else n()}function a(e){return d?e.__loaded||e["import"]&&"loading"!==e["import"].readyState:e.__importParsed}function s(e){for(var t,n=0,r=e.length;n<r&&(t=e[n]);n++)c(t)&&l(t)}function c(e){return"link"===e.localName&&"import"===e.rel}function l(e){var t=e["import"];t?o({target:e}):(e.addEventListener("load",o),e.addEventListener("error",o))}var u="import",d=Boolean(u in document.createElement("link")),p=Boolean(window.ShadowDOMPolyfill),h=function(e){return p?window.ShadowDOMPolyfill.wrapIfNeeded(e):e},f=h(document),m={get:function(){var e=window.HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null);return h(e)},configurable:!0};Object.defineProperty(document,"_currentScript",m),Object.defineProperty(f,"_currentScript",m);var w=/Trident/.test(navigator.userAgent),v=w?"complete":"interactive",g="readystatechange";d&&(new MutationObserver(function(e){for(var t,n=0,r=e.length;n<r&&(t=e[n]);n++)t.addedNodes&&s(t.addedNodes)}).observe(document.head,{childList:!0}),function(){if("loading"===document.readyState)for(var e,t=document.querySelectorAll("link[rel=import]"),n=0,r=t.length;n<r&&(e=t[n]);n++)l(e)}()),t(function(e){window.HTMLImports.ready=!0,window.HTMLImports.readyTime=(new Date).getTime();var t=f.createEvent("CustomEvent");t.initCustomEvent("HTMLImportsLoaded",!0,!0,e),f.dispatchEvent(t)}),e.IMPORT_LINK_TYPE=u,e.useNative=d,e.rootDocument=f,e.whenReady=t,e.isIE=w}(window.HTMLImports),function(e){var t=[],n=function(e){t.push(e)},r=function(){t.forEach(function(t){t(e)})};e.addModule=n,e.initializeModules=r}(window.HTMLImports),window.HTMLImports.addModule(function(e){var t=/(url\()([^)]*)(\))/g,n=/(@import[\s]+(?!url\())([^;]*)(;)/g,r={resolveUrlsInStyle:function(e,t){var n=e.ownerDocument,r=n.createElement("a");return e.textContent=this.resolveUrlsInCssText(e.textContent,t,r),e},resolveUrlsInCssText:function(e,r,o){var i=this.replaceUrls(e,o,r,t);return i=this.replaceUrls(i,o,r,n)},replaceUrls:function(e,t,n,r){return e.replace(r,function(e,r,o,i){var a=o.replace(/["']/g,"");return n&&(a=new URL(a,n).href),t.href=a,a=t.href,r+"'"+a+"'"+i})}};e.path=r}),window.HTMLImports.addModule(function(e){var t={async:!0,ok:function(e){return e.status>=200&&e.status<300||304===e.status||0===e.status},load:function(n,r,o){var i=new XMLHttpRequest;return(e.flags.debug||e.flags.bust)&&(n+="?"+Math.random()),i.open("GET",n,t.async),i.addEventListener("readystatechange",function(e){if(4===i.readyState){var n=null;try{var a=i.getResponseHeader("Location");a&&(n="/"===a.substr(0,1)?location.origin+a:a)}catch(e){console.error(e.message)}r.call(o,!t.ok(i)&&i,i.response||i.responseText,n)}}),i.send(),i},loadDocument:function(e,t,n){this.load(e,t,n).responseType="document"}};e.xhr=t}),window.HTMLImports.addModule(function(e){var t=e.xhr,n=e.flags,r=function(e,t){this.cache={},this.onload=e,this.oncomplete=t,this.inflight=0,this.pending={}};r.prototype={addNodes:function(e){this.inflight+=e.length;for(var t,n=0,r=e.length;n<r&&(t=e[n]);n++)this.require(t);this.checkDone()},addNode:function(e){this.inflight++,this.require(e),this.checkDone()},require:function(e){var t=e.src||e.href;e.__nodeUrl=t,this.dedupe(t,e)||this.fetch(t,e)},dedupe:function(e,t){if(this.pending[e])return this.pending[e].push(t),!0;return this.cache[e]?(this.onload(e,t,this.cache[e]),this.tail(),!0):(this.pending[e]=[t],!1)},fetch:function(e,r){if(n.load&&console.log("fetch",e,r),e)if(e.match(/^data:/)){var o=e.split(","),i=o[0],a=o[1];a=i.indexOf(";base64")>-1?atob(a):decodeURIComponent(a),setTimeout(function(){this.receive(e,r,null,a)}.bind(this),0)}else{var s=function(t,n,o){this.receive(e,r,t,n,o)}.bind(this);t.load(e,s)}else setTimeout(function(){this.receive(e,r,{error:"href must be specified"},null)}.bind(this),0)},receive:function(e,t,n,r,o){this.cache[e]=r;for(var i,a=this.pending[e],s=0,c=a.length;s<c&&(i=a[s]);s++)this.onload(e,i,r,n,o),this.tail();this.pending[e]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},e.Loader=r}),window.HTMLImports.addModule(function(e){var t=function(e){this.addCallback=e,this.mo=new MutationObserver(this.handler.bind(this))};t.prototype={handler:function(e){for(var t,n=0,r=e.length;n<r&&(t=e[n]);n++)"childList"===t.type&&t.addedNodes.length&&this.addedNodes(t.addedNodes)},addedNodes:function(e){this.addCallback&&this.addCallback(e);for(var t,n=0,r=e.length;n<r&&(t=e[n]);n++)t.children&&t.children.length&&this.addedNodes(t.children)},observe:function(e){this.mo.observe(e,{childList:!0,subtree:!0})}},e.Observer=t}),window.HTMLImports.addModule(function(e){function t(e){return"link"===e.localName&&e.rel===u}function n(e){var t=r(e);return"data:text/javascript;charset=utf-8,"+encodeURIComponent(t)}function r(e){return e.textContent+o(e)}function o(e){var t=e.ownerDocument;t.__importedScripts=t.__importedScripts||0;var n=e.ownerDocument.baseURI,r=t.__importedScripts?"-"+t.__importedScripts:"";return t.__importedScripts++,"\n//# sourceURL="+n+r+".js\n"}function i(e){var t=e.ownerDocument.createElement("style");return t.textContent=e.textContent,a.resolveUrlsInStyle(t),t}var a=e.path,s=e.rootDocument,c=e.flags,l=e.isIE,u=e.IMPORT_LINK_TYPE,d="link[rel="+u+"]",p={documentSelectors:d,importsSelectors:[d,"link[rel=stylesheet]:not([type])","style:not([type])","script:not([type])",'script[type="application/javascript"]','script[type="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},dynamicElements:[],parseNext:function(){var e=this.nextToParse();e&&this.parse(e)},parse:function(e){if(this.isParsed(e))return void(c.parse&&console.log("[%s] is already parsed",e.localName));var t=this[this.map[e.localName]];t&&(this.markParsing(e),t.call(this,e))},parseDynamic:function(e,t){this.dynamicElements.push(e),t||this.parseNext()},markParsing:function(e){c.parse&&console.log("parsing",e),this.parsingElement=e},markParsingComplete:function(e){e.__importParsed=!0,this.markDynamicParsingComplete(e),e.__importElement&&(e.__importElement.__importParsed=!0,this.markDynamicParsingComplete(e.__importElement)),this.parsingElement=null,c.parse&&console.log("completed",e)},markDynamicParsingComplete:function(e){var t=this.dynamicElements.indexOf(e);t>=0&&this.dynamicElements.splice(t,1)},parseImport:function(e){if(e["import"]=e.__doc,window.HTMLImports.__importsParsingHook&&window.HTMLImports.__importsParsingHook(e),e["import"]&&(e["import"].__importParsed=!0),this.markParsingComplete(e),e.__resource&&!e.__error?e.dispatchEvent(new CustomEvent("load",{bubbles:!1})):e.dispatchEvent(new CustomEvent("error",{bubbles:!1})),e.__pending)for(var t;e.__pending.length;)t=e.__pending.shift(),t&&t({target:e});this.parseNext()},parseLink:function(e){t(e)?this.parseImport(e):(e.href=e.href,this.parseGeneric(e))},parseStyle:function(e){var t=e;e=i(e),t.__appliedElement=e,e.__importElement=t,this.parseGeneric(e)},parseGeneric:function(e){this.trackElement(e),this.addElementToDocument(e)},rootImportForElement:function(e){for(var t=e;t.ownerDocument.__importLink;)t=t.ownerDocument.__importLink;return t},addElementToDocument:function(e){var t=this.rootImportForElement(e.__importElement||e);t.parentNode.insertBefore(e,t)},trackElement:function(e,t){var n=this,r=function(o){e.removeEventListener("load",r),e.removeEventListener("error",r),t&&t(o),n.markParsingComplete(e),n.parseNext()};if(e.addEventListener("load",r),e.addEventListener("error",r),l&&"style"===e.localName){var o=!1;if(e.textContent.indexOf("@import")==-1)o=!0;else if(e.sheet){o=!0;for(var i,a=e.sheet.cssRules,s=a?a.length:0,c=0;c<s&&(i=a[c]);c++)i.type===CSSRule.IMPORT_RULE&&(o=o&&Boolean(i.styleSheet))}o&&setTimeout(function(){e.dispatchEvent(new CustomEvent("load",{bubbles:!1}))})}},parseScript:function(t){var r=document.createElement("script");r.__importElement=t,r.src=t.src?t.src:n(t),e.currentScript=t,this.trackElement(r,function(t){r.parentNode&&r.parentNode.removeChild(r),e.currentScript=null}),this.addElementToDocument(r)},nextToParse:function(){return this._mayParse=[],!this.parsingElement&&(this.nextToParseInDoc(s)||this.nextToParseDynamic())},nextToParseInDoc:function(e,n){if(e&&this._mayParse.indexOf(e)<0){this._mayParse.push(e);for(var r,o=e.querySelectorAll(this.parseSelectorsForNode(e)),i=0,a=o.length;i<a&&(r=o[i]);i++)if(!this.isParsed(r))return this.hasResource(r)?t(r)?this.nextToParseInDoc(r.__doc,r):r:void 0}return n},nextToParseDynamic:function(){return this.dynamicElements[0]},parseSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===s?this.documentSelectors:this.importsSelectors},isParsed:function(e){return e.__importParsed},needsDynamicParsing:function(e){return this.dynamicElements.indexOf(e)>=0},hasResource:function(e){return!t(e)||void 0!==e.__doc}};e.parser=p,e.IMPORT_SELECTOR=d}),window.HTMLImports.addModule(function(e){function t(e){return n(e,a)}function n(e,t){return"link"===e.localName&&e.getAttribute("rel")===t}function r(e){return!!Object.getOwnPropertyDescriptor(e,"baseURI")}function o(e,t){var n=document.implementation.createHTMLDocument(a);n._URL=t;var o=n.createElement("base");o.setAttribute("href",t),n.baseURI||r(n)||Object.defineProperty(n,"baseURI",{value:t});var i=n.createElement("meta");return i.setAttribute("charset","utf-8"),n.head.appendChild(i),n.head.appendChild(o),n.body.innerHTML=e,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(n),n}var i=e.flags,a=e.IMPORT_LINK_TYPE,s=e.IMPORT_SELECTOR,c=e.rootDocument,l=e.Loader,u=e.Observer,d=e.parser,p={documents:{},documentPreloadSelectors:s,importsPreloadSelectors:[s].join(","),loadNode:function(e){h.addNode(e)},loadSubtree:function(e){var t=this.marshalNodes(e);h.addNodes(t)},marshalNodes:function(e){return e.querySelectorAll(this.loadSelectorsForNode(e))},loadSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===c?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(e,n,r,a,s){if(i.load&&console.log("loaded",e,n),n.__resource=r,n.__error=a,t(n)){var c=this.documents[e];void 0===c&&(c=a?null:o(r,s||e),c&&(c.__importLink=n,this.bootDocument(c)),this.documents[e]=c),n.__doc=c}d.parseNext()},bootDocument:function(e){this.loadSubtree(e),this.observer.observe(e),d.parseNext()},loadedAll:function(){d.parseNext()}},h=new l(p.loaded.bind(p),p.loadedAll.bind(p));if(p.observer=new u,!document.baseURI){var f={get:function(){var e=document.querySelector("base");return e?e.href:window.location.href},configurable:!0};Object.defineProperty(document,"baseURI",f),Object.defineProperty(c,"baseURI",f)}e.importer=p,e.importLoader=h}),window.HTMLImports.addModule(function(e){var t=e.parser,n=e.importer,r={added:function(e){for(var r,o,i,a,s=0,c=e.length;s<c&&(a=e[s]);s++)r||(r=a.ownerDocument,o=t.isParsed(r)),i=this.shouldLoadNode(a),i&&n.loadNode(a),this.shouldParseNode(a)&&o&&t.parseDynamic(a,i)},shouldLoadNode:function(e){return 1===e.nodeType&&o.call(e,n.loadSelectorsForNode(e))},shouldParseNode:function(e){return 1===e.nodeType&&o.call(e,t.parseSelectorsForNode(e))}};n.observer.addCallback=r.added.bind(r);var o=HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector}),function(e){function t(){window.HTMLImports.importer.bootDocument(r)}var n=e.initializeModules;e.isIE;if(!e.useNative){n();var r=e.rootDocument;"complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?t():document.addEventListener("DOMContentLoaded",t)}}(window.HTMLImports),window.CustomElements=window.CustomElements||{flags:{}},function(e){var t=e.flags,n=[],r=function(e){n.push(e)},o=function(){n.forEach(function(t){t(e)})};e.addModule=r,e.initializeModules=o,e.hasNative=Boolean(document.registerElement),e.isIE=/Trident/.test(navigator.userAgent),e.useNative=!t.register&&e.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||window.HTMLImports.useNative)}(window.CustomElements),window.CustomElements.addModule(function(e){function t(e,t){n(e,function(e){return!!t(e)||void r(e,t)}),r(e,t)}function n(e,t,r){var o=e.firstElementChild;if(!o)for(o=e.firstChild;o&&o.nodeType!==Node.ELEMENT_NODE;)o=o.nextSibling;for(;o;)t(o,r)!==!0&&n(o,t,r),o=o.nextElementSibling;return null}function r(e,n){for(var r=e.shadowRoot;r;)t(r,n),r=r.olderShadowRoot}function o(e,t){i(e,t,[])}function i(e,t,n){if(e=window.wrap(e),!(n.indexOf(e)>=0)){n.push(e);for(var r,o=e.querySelectorAll("link[rel="+a+"]"),s=0,c=o.length;s<c&&(r=o[s]);s++)r["import"]&&i(r["import"],t,n);t(e)}}var a=window.HTMLImports?window.HTMLImports.IMPORT_LINK_TYPE:"none";e.forDocumentTree=o,e.forSubtree=t}),window.CustomElements.addModule(function(e){function t(e,t){return n(e,t)||r(e,t)}function n(t,n){return!!e.upgrade(t,n)||void(n&&a(t))}function r(e,t){b(e,function(e){if(n(e,t))return!0})}function o(e){S.push(e),_||(_=!0,setTimeout(i))}function i(){_=!1;for(var e,t=S,n=0,r=t.length;n<r&&(e=t[n]);n++)e();S=[]}function a(e){E?o(function(){s(e)}):s(e)}function s(e){e.__upgraded__&&!e.__attached&&(e.__attached=!0,e.attachedCallback&&e.attachedCallback())}function c(e){l(e),b(e,function(e){l(e)})}function l(e){E?o(function(){u(e)}):u(e)}function u(e){e.__upgraded__&&e.__attached&&(e.__attached=!1,e.detachedCallback&&e.detachedCallback())}function d(e){for(var t=e,n=window.wrap(document);t;){if(t==n)return!0;t=t.parentNode||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host}}function p(e){if(e.shadowRoot&&!e.shadowRoot.__watched){g.dom&&console.log("watching shadow-root for: ",e.localName);for(var t=e.shadowRoot;t;)m(t),t=t.olderShadowRoot}}function h(e,n){if(g.dom){var r=n[0];if(r&&"childList"===r.type&&r.addedNodes&&r.addedNodes){for(var o=r.addedNodes[0];o&&o!==document&&!o.host;)o=o.parentNode;var i=o&&(o.URL||o._URL||o.host&&o.host.localName)||"";i=i.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",n.length,i||"")}var a=d(e);n.forEach(function(e){"childList"===e.type&&(T(e.addedNodes,function(e){e.localName&&t(e,a)}),T(e.removedNodes,function(e){e.localName&&c(e)}))}),g.dom&&console.groupEnd()}function f(e){for(e=window.wrap(e),e||(e=window.wrap(document));e.parentNode;)e=e.parentNode;var t=e.__observer;t&&(h(e,t.takeRecords()),i())}function m(e){if(!e.__observer){var t=new MutationObserver(h.bind(this,e));t.observe(e,{childList:!0,subtree:!0}),e.__observer=t}}function w(e){e=window.wrap(e),g.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop());var n=e===window.wrap(document);t(e,n),m(e),g.dom&&console.groupEnd()}function v(e){y(e,w)}var g=e.flags,b=e.forSubtree,y=e.forDocumentTree,E=window.MutationObserver._isPolyfilled&&g["throttle-attached"];e.hasPolyfillMutations=E,e.hasThrottledAttached=E;var _=!1,S=[],T=Array.prototype.forEach.call.bind(Array.prototype.forEach),M=Element.prototype.createShadowRoot;M&&(Element.prototype.createShadowRoot=function(){var e=M.call(this);return window.CustomElements.watchShadow(this),e}),e.watchShadow=p,e.upgradeDocumentTree=v,e.upgradeDocument=w,e.upgradeSubtree=r,e.upgradeAll=t,e.attached=a,e.takeRecords=f}),window.CustomElements.addModule(function(e){function t(t,r){if("template"===t.localName&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t),!t.__upgraded__&&t.nodeType===Node.ELEMENT_NODE){var o=t.getAttribute("is"),i=e.getRegisteredDefinition(t.localName)||e.getRegisteredDefinition(o);if(i&&(o&&i.tag==t.localName||!o&&!i["extends"]))return n(t,i,r)}}function n(t,n,o){return a.upgrade&&console.group("upgrade:",t.localName),n.is&&t.setAttribute("is",n.is),r(t,n),t.__upgraded__=!0,i(t),o&&e.attached(t),e.upgradeSubtree(t,o),a.upgrade&&console.groupEnd(),t}function r(e,t){Object.__proto__?e.__proto__=t.prototype:(o(e,t.prototype,t["native"]),e.__proto__=t.prototype)}function o(e,t,n){for(var r={},o=t;o!==n&&o!==HTMLElement.prototype;){for(var i,a=Object.getOwnPropertyNames(o),s=0;i=a[s];s++)r[i]||(Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(o,i)),r[i]=1);o=Object.getPrototypeOf(o)}}function i(e){e.createdCallback&&e.createdCallback()}var a=e.flags;e.upgrade=t,e.upgradeWithDefinition=n,e.implementPrototype=r}),window.CustomElements.addModule(function(e){function t(t,r){var c=r||{};if(!t)throw new Error("document.registerElement: first argument `name` must not be empty");if(t.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(t)+"'.");if(o(t))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(t)+"'. The type name is invalid.");if(l(t))throw new Error("DuplicateDefinitionError: a type with name '"+String(t)+"' is already registered");return c.prototype||(c.prototype=Object.create(HTMLElement.prototype)),c.__name=t.toLowerCase(),c["extends"]&&(c["extends"]=c["extends"].toLowerCase()),c.lifecycle=c.lifecycle||{},c.ancestry=i(c["extends"]),a(c),s(c),n(c.prototype),u(c.__name,c),c.ctor=d(c),c.ctor.prototype=c.prototype,c.prototype.constructor=c.ctor,e.ready&&w(document),c.ctor}function n(e){if(!e.setAttribute._polyfilled){var t=e.setAttribute;e.setAttribute=function(e,n){r.call(this,e,n,t)};var n=e.removeAttribute;e.removeAttribute=function(e){r.call(this,e,null,n)},e.setAttribute._polyfilled=!0}}function r(e,t,n){e=e.toLowerCase();var r=this.getAttribute(e);n.apply(this,arguments);var o=this.getAttribute(e);this.attributeChangedCallback&&o!==r&&this.attributeChangedCallback(e,r,o)}function o(e){for(var t=0;t<E.length;t++)if(e===E[t])return!0}function i(e){var t=l(e);return t?i(t["extends"]).concat([t]):[]}function a(e){for(var t,n=e["extends"],r=0;t=e.ancestry[r];r++)n=t.is&&t.tag;e.tag=n||e.__name,n&&(e.is=e.__name)}function s(e){if(!Object.__proto__){var t=HTMLElement.prototype;if(e.is){var n=document.createElement(e.tag);t=Object.getPrototypeOf(n)}for(var r,o=e.prototype,i=!1;o;)o==t&&(i=!0),r=Object.getPrototypeOf(o),r&&(o.__proto__=r),o=r;i||console.warn(e.tag+" prototype not found in prototype chain for "+e.is),e["native"]=t}}function c(e){return g(T(e.tag),e)}function l(e){if(e)return _[e.toLowerCase()]}function u(e,t){_[e]=t}function d(e){return function(){return c(e)}}function p(e,t,n){return e===S?h(t,n):M(e,t)}function h(e,t){e&&(e=e.toLowerCase()),t&&(t=t.toLowerCase());var n=l(t||e);if(n){if(e==n.tag&&t==n.is)return new n.ctor;if(!t&&!n.is)return new n.ctor}var r;return t?(r=h(e),r.setAttribute("is",t),r):(r=T(e),e.indexOf("-")>=0&&b(r,HTMLElement),r)}function f(e,t){var n=e[t];e[t]=function(){var e=n.apply(this,arguments);return v(e),e}}var m,w=(e.isIE,e.upgradeDocumentTree),v=e.upgradeAll,g=e.upgradeWithDefinition,b=e.implementPrototype,y=e.useNative,E=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],_={},S="http://www.w3.org/1999/xhtml",T=document.createElement.bind(document),M=document.createElementNS.bind(document);m=Object.__proto__||y?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;for(var n=e;n;){if(n===t.prototype)return!0;n=n.__proto__}return!1},f(Node.prototype,"cloneNode"),f(document,"importNode"),document.registerElement=t,document.createElement=h,document.createElementNS=p,e.registry=_,e["instanceof"]=m,e.reservedTagList=E,e.getRegisteredDefinition=l,document.register=document.registerElement}),function(e){function t(){i(window.wrap(document)),window.CustomElements.ready=!0;var e=window.requestAnimationFrame||function(e){setTimeout(e,16)};e(function(){setTimeout(function(){window.CustomElements.readyTime=Date.now(),window.HTMLImports&&(window.CustomElements.elapsed=window.CustomElements.readyTime-window.HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}var n=e.useNative,r=e.initializeModules;e.isIE;if(n){var o=function(){};e.watchShadow=o,e.upgrade=o,e.upgradeAll=o,e.upgradeDocumentTree=o,e.upgradeSubtree=o,e.takeRecords=o,e["instanceof"]=function(e,t){return e instanceof t}}else r();var i=e.upgradeDocumentTree,a=e.upgradeDocument;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=window.ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=window.ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}),window.HTMLImports&&(window.HTMLImports.__importsParsingHook=function(e){e["import"]&&a(wrap(e["import"]))}),"complete"===document.readyState||e.flags.eager)t();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var s=window.HTMLImports&&!window.HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(s,t)}else t()}(window.CustomElements),function(e){Function.prototype.bind||(Function.prototype.bind=function(e){var t=this,n=Array.prototype.slice.call(arguments,1);return function(){var r=n.slice();return r.push.apply(r,arguments),t.apply(e,r)}})}(window.WebComponents),function(e){var t=document.createElement("style");t.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var n=document.querySelector("head");n.insertBefore(t,n.firstChild)}(window.WebComponents),function(e){window.Platform=e}(window.WebComponents);\ No newline at end of filediff --git a/manager/client/src/main/webapp/css/style.html b/manager/client/src/main/webapp/css/style.htmlindex 49f86feda..f6408d538 100644--- a/manager/client/src/main/webapp/css/style.html+++ b/manager/client/src/main/webapp/css/style.html@@ -1,4 +1,8 @@-<style is="custom-style" include="iron-flex iron-flex-alignment iron-flex-factors iron-positioning">+<link rel="import" href="/static/bower_components/iron-flex-layout/iron-flex-layout-classes.html">++<dom-module id="global-style">+ <template>+ <style include="iron-flex iron-flex-alignment iron-flex-factors iron-positioning">::-webkit-scrollbar {width: 1em;@@ -607,4 +611,6 @@.or-SimulatorElement {}-</style>\ No newline at end of file+</style>+</template>+</dom-module>\ No newline at end of filediff --git a/manager/client/src/main/webapp/css/theme.html b/manager/client/src/main/webapp/css/theme.htmlindex 8c4cd3de9..7596cabd7 100644--- a/manager/client/src/main/webapp/css/theme.html+++ b/manager/client/src/main/webapp/css/theme.html@@ -1,4 +1,6 @@-<style is="custom-style">+<dom-module id="global-theme">+ <template>+ <style>:root {--theme-white: #ffffff; /* rgb(255, 255, 255); */@@ -413,4 +415,6 @@.or-DatapointBrowser {}-</style>\ No newline at end of file+</style>+</template>+</dom-module>\ No newline at end of filediff --git a/manager/client/src/main/webapp/index.html b/manager/client/src/main/webapp/index.htmlindex f1dfc2ea3..2a191fa1b 100644--- a/manager/client/src/main/webapp/index.html+++ b/manager/client/src/main/webapp/index.html@@ -8,9 +8,15 @@<link rel="icon" type="image/png" href="/static/img/favicon.png"/><script src="/static/js/loader.js"></script>- <link rel="stylesheet" type="text/css" href="/static/css/loader.css"/>+ <link rel="stylesheet" type="text/css" href="/static/css/loader.css"><script src="/static/js/auth.js"></script>+ <link rel="import" href="/static/css/style.html">+ <link rel="import" href="/static/css/theme.html">+ <custom-style>+ <style include="global-style global-theme"></style>+ </custom-style>+<script>document.addEventListener("DOMContentLoaded", function () {var realm = window.location.pathname.split('/')[1];@@ -20,8 +26,7 @@function startApplication() {console.log("Loading application resources...");Promise.all([- load.js("/static/bower_components/webcomponentsjs/webcomponents-lite.min.js"),- load.import("/static/bower_components/iron-flex-layout/iron-flex-layout-classes.html"),+ load.js("/static/bower_components/webcomponentsjs/webcomponents-loader.js"),load.css("/static/bower_components/font-awesome/css/font-awesome.css"),load.css("/static/3rdparty/mapbox-gl-js/0.35.0/mapbox-gl.css"),@@ -31,9 +36,6 @@load.js("/static/3rdparty/sprintf/1.0.3/sprintf.min.js"),- load.import("/static/css/style.html"),- load.import("/static/css/theme.html"),-load.js("/jsapi")]).then(function () {console.log("Application resources loaded...");diff --git a/manager/client/src/main/webapp/js/loader.js b/manager/client/src/main/webapp/js/loader.jsindex be1f79d6f..5b37f25e6 100644--- a/manager/client/src/main/webapp/js/loader.js+++ b/manager/client/src/main/webapp/js/loader.js@@ -51,7 +51,6 @@ window.load = (function () {element.async = true;break;case 'link':- element.type = 'text/css';element.rel = rel;attr = 'href';parent = 'head';