Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/pdevty/polymer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpdevty <p.dev.ty@gmail.com>2015-06-30 16:41:33 +0300
committerpdevty <p.dev.ty@gmail.com>2015-06-30 16:41:33 +0300
commitd8be0028b80dcf7026489598f4f8905ecc291611 (patch)
tree4e15ba3cbd8f5daccb1305cd1ad171a431279cd9
initial commitHEADmaster
-rw-r--r--LICENSE.md20
-rw-r--r--README.md69
-rw-r--r--archetypes/default.md4
-rw-r--r--images/screenshot.pngbin0 -> 255760 bytes
-rw-r--r--images/tn.pngbin0 -> 108491 bytes
-rw-r--r--layouts/_default/list.html7
-rw-r--r--layouts/_default/single.html45
-rw-r--r--layouts/_default/terms.html12
-rw-r--r--layouts/index.html7
-rw-r--r--layouts/partials/content.html26
-rw-r--r--layouts/partials/disqus.html13
-rw-r--r--layouts/partials/footer.html21
-rw-r--r--layouts/partials/header.html165
-rw-r--r--layouts/partials/pagination.html13
-rw-r--r--static/bower.json14
-rw-r--r--static/bower_components/font-roboto/.bower.json31
-rw-r--r--static/bower_components/font-roboto/README.md1
-rw-r--r--static/bower_components/font-roboto/bower.json22
-rw-r--r--static/bower_components/font-roboto/roboto.html10
-rw-r--r--static/bower_components/iron-a11y-keys-behavior/.bower.json42
-rw-r--r--static/bower_components/iron-a11y-keys-behavior/.gitignore1
-rw-r--r--static/bower_components/iron-a11y-keys-behavior/README.md15
-rw-r--r--static/bower_components/iron-a11y-keys-behavior/bower.json32
-rw-r--r--static/bower_components/iron-a11y-keys-behavior/demo/index.html24
-rw-r--r--static/bower_components/iron-a11y-keys-behavior/demo/x-key-aware.html91
-rw-r--r--static/bower_components/iron-a11y-keys-behavior/index.html24
-rw-r--r--static/bower_components/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html421
-rw-r--r--static/bower_components/iron-a11y-keys-behavior/test/basic-test.html248
-rw-r--r--static/bower_components/iron-a11y-keys-behavior/test/index.html29
-rw-r--r--static/bower_components/iron-behaviors/.bower.json40
-rw-r--r--static/bower_components/iron-behaviors/.gitignore1
-rw-r--r--static/bower_components/iron-behaviors/README.md4
-rw-r--r--static/bower_components/iron-behaviors/bower.json30
-rw-r--r--static/bower_components/iron-behaviors/demo/index.html47
-rw-r--r--static/bower_components/iron-behaviors/demo/simple-button.html70
-rw-r--r--static/bower_components/iron-behaviors/index.html27
-rw-r--r--static/bower_components/iron-behaviors/iron-button-state.html186
-rw-r--r--static/bower_components/iron-behaviors/iron-control-state.html108
-rw-r--r--static/bower_components/iron-behaviors/test/active-state.html154
-rw-r--r--static/bower_components/iron-behaviors/test/disabled-state.html85
-rw-r--r--static/bower_components/iron-behaviors/test/focused-state.html120
-rw-r--r--static/bower_components/iron-behaviors/test/index.html25
-rw-r--r--static/bower_components/iron-behaviors/test/test-elements.html66
-rw-r--r--static/bower_components/iron-flex-layout/.bower.json36
-rw-r--r--static/bower_components/iron-flex-layout/.gitignore2
-rw-r--r--static/bower_components/iron-flex-layout/README.md4
-rw-r--r--static/bower_components/iron-flex-layout/bower.json26
-rw-r--r--static/bower_components/iron-flex-layout/classes/iron-flex-layout.html307
-rw-r--r--static/bower_components/iron-flex-layout/classes/iron-shadow-flex-layout.html302
-rw-r--r--static/bower_components/iron-flex-layout/demo/index.html42
-rw-r--r--static/bower_components/iron-flex-layout/demo/x-app.html118
-rw-r--r--static/bower_components/iron-flex-layout/iron-flex-layout.html313
-rw-r--r--static/bower_components/iron-icon/.bower.json43
-rw-r--r--static/bower_components/iron-icon/.gitignore1
-rw-r--r--static/bower_components/iron-icon/README.md56
-rw-r--r--static/bower_components/iron-icon/bower.json33
-rw-r--r--static/bower_components/iron-icon/demo/index.html48
-rw-r--r--static/bower_components/iron-icon/demo/location.pngbin0 -> 324 bytes
-rw-r--r--static/bower_components/iron-icon/hero.svg19
-rw-r--r--static/bower_components/iron-icon/index.html26
-rw-r--r--static/bower_components/iron-icon/iron-icon.html179
-rw-r--r--static/bower_components/iron-icon/test/index.html31
-rw-r--r--static/bower_components/iron-icon/test/iron-icon.html120
-rw-r--r--static/bower_components/iron-icons/.bower.json46
-rw-r--r--static/bower_components/iron-icons/.gitignore3
-rw-r--r--static/bower_components/iron-icons/README.md6
-rw-r--r--static/bower_components/iron-icons/av-icons.html73
-rw-r--r--static/bower_components/iron-icons/bower.json37
-rw-r--r--static/bower_components/iron-icons/communication-icons.html59
-rw-r--r--static/bower_components/iron-icons/demo/index.html132
-rw-r--r--static/bower_components/iron-icons/device-icons.html94
-rw-r--r--static/bower_components/iron-icons/editor-icons.html70
-rw-r--r--static/bower_components/iron-icons/hardware-icons.html61
-rw-r--r--static/bower_components/iron-icons/hero.svg35
-rw-r--r--static/bower_components/iron-icons/image-icons.html164
-rw-r--r--static/bower_components/iron-icons/index.html25
-rw-r--r--static/bower_components/iron-icons/iron-icons.html303
-rw-r--r--static/bower_components/iron-icons/maps-icons.html71
-rw-r--r--static/bower_components/iron-icons/notification-icons.html62
-rw-r--r--static/bower_components/iron-icons/social-icons.html40
-rw-r--r--static/bower_components/iron-iconset-svg/.bower.json41
-rw-r--r--static/bower_components/iron-iconset-svg/.gitignore1
-rw-r--r--static/bower_components/iron-iconset-svg/README.md4
-rw-r--r--static/bower_components/iron-iconset-svg/bower.json31
-rw-r--r--static/bower_components/iron-iconset-svg/demo/index.html65
-rw-r--r--static/bower_components/iron-iconset-svg/demo/svg-sample-icons.html69
-rw-r--r--static/bower_components/iron-iconset-svg/index.html26
-rw-r--r--static/bower_components/iron-iconset-svg/iron-iconset-svg.html192
-rw-r--r--static/bower_components/iron-iconset-svg/test/index.html30
-rw-r--r--static/bower_components/iron-iconset-svg/test/iron-iconset-svg.html107
-rw-r--r--static/bower_components/iron-image/.bower.json40
-rw-r--r--static/bower_components/iron-image/.gitignore1
-rw-r--r--static/bower_components/iron-image/README.md60
-rw-r--r--static/bower_components/iron-image/bower.json30
-rw-r--r--static/bower_components/iron-image/demo/index.html183
-rw-r--r--static/bower_components/iron-image/demo/polymer.svg175
-rw-r--r--static/bower_components/iron-image/index.html24
-rw-r--r--static/bower_components/iron-image/iron-image.html354
-rw-r--r--static/bower_components/iron-image/test/index.html25
-rw-r--r--static/bower_components/iron-image/test/iron-image.html78
-rw-r--r--static/bower_components/iron-media-query/.bower.json40
-rw-r--r--static/bower_components/iron-media-query/.gitignore1
-rw-r--r--static/bower_components/iron-media-query/README.md11
-rw-r--r--static/bower_components/iron-media-query/bower.json31
-rw-r--r--static/bower_components/iron-media-query/demo/index.html45
-rw-r--r--static/bower_components/iron-media-query/hero.svg29
-rw-r--r--static/bower_components/iron-media-query/index.html29
-rw-r--r--static/bower_components/iron-media-query/iron-media-query.html77
-rw-r--r--static/bower_components/iron-media-query/test/basic.html71
-rw-r--r--static/bower_components/iron-media-query/test/index.html30
-rw-r--r--static/bower_components/iron-menu-behavior/.bower.json41
-rw-r--r--static/bower_components/iron-menu-behavior/.gitignore1
-rw-r--r--static/bower_components/iron-menu-behavior/README.md3
-rw-r--r--static/bower_components/iron-menu-behavior/bower.json32
-rw-r--r--static/bower_components/iron-menu-behavior/demo/index.html100
-rw-r--r--static/bower_components/iron-menu-behavior/demo/simple-menu.html50
-rw-r--r--static/bower_components/iron-menu-behavior/demo/simple-menubar.html54
-rw-r--r--static/bower_components/iron-menu-behavior/index.html30
-rw-r--r--static/bower_components/iron-menu-behavior/iron-menu-behavior.html214
-rw-r--r--static/bower_components/iron-menu-behavior/iron-menubar-behavior.html65
-rw-r--r--static/bower_components/iron-menu-behavior/test/index.html35
-rw-r--r--static/bower_components/iron-menu-behavior/test/iron-menu-behavior.html108
-rw-r--r--static/bower_components/iron-menu-behavior/test/iron-menubar-behavior.html108
-rw-r--r--static/bower_components/iron-menu-behavior/test/test-menu.html40
-rw-r--r--static/bower_components/iron-menu-behavior/test/test-menubar.html40
-rw-r--r--static/bower_components/iron-meta/.bower.json38
-rw-r--r--static/bower_components/iron-meta/.gitignore1
-rw-r--r--static/bower_components/iron-meta/README.md46
-rw-r--r--static/bower_components/iron-meta/bower.json28
-rw-r--r--static/bower_components/iron-meta/demo/index.html46
-rw-r--r--static/bower_components/iron-meta/hero.svg33
-rw-r--r--static/bower_components/iron-meta/index.html27
-rw-r--r--static/bower_components/iron-meta/iron-meta.html317
-rw-r--r--static/bower_components/iron-meta/test/basic.html48
-rw-r--r--static/bower_components/iron-meta/test/index.html30
-rw-r--r--static/bower_components/iron-meta/test/iron-meta.html186
-rw-r--r--static/bower_components/iron-resizable-behavior/.bower.json40
-rw-r--r--static/bower_components/iron-resizable-behavior/.gitignore1
-rw-r--r--static/bower_components/iron-resizable-behavior/README.md16
-rw-r--r--static/bower_components/iron-resizable-behavior/bower.json30
-rw-r--r--static/bower_components/iron-resizable-behavior/demo/index.html29
-rw-r--r--static/bower_components/iron-resizable-behavior/demo/src/x-app.html114
-rw-r--r--static/bower_components/iron-resizable-behavior/index.html25
-rw-r--r--static/bower_components/iron-resizable-behavior/iron-resizable-behavior.html193
-rw-r--r--static/bower_components/iron-resizable-behavior/test/basic.html263
-rw-r--r--static/bower_components/iron-resizable-behavior/test/index.html32
-rw-r--r--static/bower_components/iron-resizable-behavior/test/iron-resizable-behavior.html87
-rw-r--r--static/bower_components/iron-resizable-behavior/test/test-elements.html193
-rw-r--r--static/bower_components/iron-selector/.bower.json41
-rw-r--r--static/bower_components/iron-selector/.gitignore2
-rw-r--r--static/bower_components/iron-selector/README.md50
-rw-r--r--static/bower_components/iron-selector/bower.json31
-rw-r--r--static/bower_components/iron-selector/demo/index.html66
-rw-r--r--static/bower_components/iron-selector/index.html28
-rw-r--r--static/bower_components/iron-selector/iron-multi-selectable.html120
-rw-r--r--static/bower_components/iron-selector/iron-selectable.html307
-rw-r--r--static/bower_components/iron-selector/iron-selection.html115
-rw-r--r--static/bower_components/iron-selector/iron-selector.html71
-rw-r--r--static/bower_components/iron-selector/test/activate-event.html138
-rw-r--r--static/bower_components/iron-selector/test/basic.html150
-rw-r--r--static/bower_components/iron-selector/test/content-element.html43
-rw-r--r--static/bower_components/iron-selector/test/content.html168
-rw-r--r--static/bower_components/iron-selector/test/index.html36
-rw-r--r--static/bower_components/iron-selector/test/multi.html135
-rw-r--r--static/bower_components/iron-selector/test/next-previous.html134
-rw-r--r--static/bower_components/iron-selector/test/selected-attribute.html72
-rw-r--r--static/bower_components/iron-selector/test/template-repeat.html110
-rw-r--r--static/bower_components/paper-behaviors/.bower.json48
-rw-r--r--static/bower_components/paper-behaviors/.gitignore1
-rw-r--r--static/bower_components/paper-behaviors/README.md4
-rw-r--r--static/bower_components/paper-behaviors/bower.json39
-rw-r--r--static/bower_components/paper-behaviors/demo/index.html57
-rw-r--r--static/bower_components/paper-behaviors/demo/paper-button.html71
-rw-r--r--static/bower_components/paper-behaviors/demo/paper-radio-button.html116
-rw-r--r--static/bower_components/paper-behaviors/index.html26
-rw-r--r--static/bower_components/paper-behaviors/paper-button-behavior.html56
-rw-r--r--static/bower_components/paper-behaviors/paper-inky-focus-behavior.html44
-rw-r--r--static/bower_components/paper-behaviors/test/index.html26
-rw-r--r--static/bower_components/paper-behaviors/test/paper-button-behavior.html82
-rw-r--r--static/bower_components/paper-behaviors/test/paper-radio-button-behavior.html62
-rw-r--r--static/bower_components/paper-behaviors/test/test-button.html34
-rw-r--r--static/bower_components/paper-behaviors/test/test-radio-button.html41
-rw-r--r--static/bower_components/paper-drawer-panel/.bower.json42
-rw-r--r--static/bower_components/paper-drawer-panel/.gitignore1
-rw-r--r--static/bower_components/paper-drawer-panel/README.md71
-rw-r--r--static/bower_components/paper-drawer-panel/bower.json33
-rw-r--r--static/bower_components/paper-drawer-panel/demo/index.html85
-rw-r--r--static/bower_components/paper-drawer-panel/hero.svg21
-rw-r--r--static/bower_components/paper-drawer-panel/index.html29
-rw-r--r--static/bower_components/paper-drawer-panel/paper-drawer-panel.css142
-rw-r--r--static/bower_components/paper-drawer-panel/paper-drawer-panel.html591
-rw-r--r--static/bower_components/paper-fab/.bower.json48
-rw-r--r--static/bower_components/paper-fab/.gitignore1
-rw-r--r--static/bower_components/paper-fab/README.md44
-rw-r--r--static/bower_components/paper-fab/bower.json39
-rw-r--r--static/bower_components/paper-fab/demo/index.html97
-rw-r--r--static/bower_components/paper-fab/index.html24
-rw-r--r--static/bower_components/paper-fab/paper-fab.html175
-rw-r--r--static/bower_components/paper-fab/test/a11y.html71
-rw-r--r--static/bower_components/paper-fab/test/basic.html76
-rw-r--r--static/bower_components/paper-fab/test/index.html26
-rw-r--r--static/bower_components/paper-icon-button/.bower.json43
-rw-r--r--static/bower_components/paper-icon-button/.gitignore1
-rw-r--r--static/bower_components/paper-icon-button/README.md49
-rw-r--r--static/bower_components/paper-icon-button/bower.json33
-rw-r--r--static/bower_components/paper-icon-button/demo/index.html154
-rw-r--r--static/bower_components/paper-icon-button/index.html23
-rw-r--r--static/bower_components/paper-icon-button/paper-icon-button.html156
-rw-r--r--static/bower_components/paper-icon-button/test/a11y.html94
-rw-r--r--static/bower_components/paper-icon-button/test/basic.html77
-rw-r--r--static/bower_components/paper-icon-button/test/index.html26
-rw-r--r--static/bower_components/paper-item/.bower.json49
-rw-r--r--static/bower_components/paper-item/.gitignore1
-rw-r--r--static/bower_components/paper-item/README.md4
-rw-r--r--static/bower_components/paper-item/all-imports.html13
-rw-r--r--static/bower_components/paper-item/bower.json40
-rw-r--r--static/bower_components/paper-item/demo/index.html285
-rw-r--r--static/bower_components/paper-item/index.html30
-rw-r--r--static/bower_components/paper-item/paper-icon-item.html86
-rw-r--r--static/bower_components/paper-item/paper-item-body.html93
-rw-r--r--static/bower_components/paper-item/paper-item-shared.css19
-rw-r--r--static/bower_components/paper-item/paper-item.html95
-rw-r--r--static/bower_components/paper-item/test/index.html34
-rw-r--r--static/bower_components/paper-item/test/paper-item.html66
-rw-r--r--static/bower_components/paper-material/.bower.json45
-rw-r--r--static/bower_components/paper-material/.gitignore1
-rw-r--r--static/bower_components/paper-material/README.md13
-rw-r--r--static/bower_components/paper-material/bower.json36
-rw-r--r--static/bower_components/paper-material/demo/index.html113
-rw-r--r--static/bower_components/paper-material/index.html30
-rw-r--r--static/bower_components/paper-material/paper-material.html98
-rw-r--r--static/bower_components/paper-material/test/index.html25
-rw-r--r--static/bower_components/paper-material/test/paper-material.html92
-rw-r--r--static/bower_components/paper-menu/.bower.json41
-rw-r--r--static/bower_components/paper-menu/.gitignore1
-rw-r--r--static/bower_components/paper-menu/README.md3
-rw-r--r--static/bower_components/paper-menu/bower.json32
-rw-r--r--static/bower_components/paper-menu/demo/index.html81
-rw-r--r--static/bower_components/paper-menu/hero.svg35
-rw-r--r--static/bower_components/paper-menu/index.html30
-rw-r--r--static/bower_components/paper-menu/paper-menu.html133
-rw-r--r--static/bower_components/paper-menu/test/index.html34
-rw-r--r--static/bower_components/paper-menu/test/paper-menu.html67
-rw-r--r--static/bower_components/paper-ripple/.bower.json39
-rw-r--r--static/bower_components/paper-ripple/.gitignore1
-rw-r--r--static/bower_components/paper-ripple/README.md65
-rw-r--r--static/bower_components/paper-ripple/bower.json29
-rw-r--r--static/bower_components/paper-ripple/demo/index.html413
-rw-r--r--static/bower_components/paper-ripple/hero.svg30
-rw-r--r--static/bower_components/paper-ripple/index.html27
-rw-r--r--static/bower_components/paper-ripple/paper-ripple.html716
-rw-r--r--static/bower_components/paper-ripple/test/index.html25
-rw-r--r--static/bower_components/paper-ripple/test/paper-ripple.html166
-rw-r--r--static/bower_components/paper-scroll-header-panel/.bower.json48
-rw-r--r--static/bower_components/paper-scroll-header-panel/.gitignore1
-rw-r--r--static/bower_components/paper-scroll-header-panel/README.md56
-rw-r--r--static/bower_components/paper-scroll-header-panel/bower.json38
-rw-r--r--static/bower_components/paper-scroll-header-panel/demo/demo1.html81
-rw-r--r--static/bower_components/paper-scroll-header-panel/demo/demo2.html78
-rw-r--r--static/bower_components/paper-scroll-header-panel/demo/demo3.html79
-rw-r--r--static/bower_components/paper-scroll-header-panel/demo/demo4.html114
-rw-r--r--static/bower_components/paper-scroll-header-panel/demo/demo5.html113
-rw-r--r--static/bower_components/paper-scroll-header-panel/demo/demo6.html117
-rw-r--r--static/bower_components/paper-scroll-header-panel/demo/demo7.html120
-rw-r--r--static/bower_components/paper-scroll-header-panel/demo/demo8.html126
-rw-r--r--static/bower_components/paper-scroll-header-panel/demo/demo9.html108
-rw-r--r--static/bower_components/paper-scroll-header-panel/demo/images/bg2.jpgbin0 -> 97102 bytes
-rw-r--r--static/bower_components/paper-scroll-header-panel/demo/images/bg3.jpgbin0 -> 80676 bytes
-rw-r--r--static/bower_components/paper-scroll-header-panel/demo/images/bg5.jpgbin0 -> 328472 bytes
-rw-r--r--static/bower_components/paper-scroll-header-panel/demo/images/bg6.jpgbin0 -> 179472 bytes
-rw-r--r--static/bower_components/paper-scroll-header-panel/demo/images/bg9.jpgbin0 -> 178111 bytes
-rw-r--r--static/bower_components/paper-scroll-header-panel/demo/index.html113
-rw-r--r--static/bower_components/paper-scroll-header-panel/demo/lorem-ipsum.html42
-rw-r--r--static/bower_components/paper-scroll-header-panel/demo/sample-content.html72
-rw-r--r--static/bower_components/paper-scroll-header-panel/hero.svg41
-rw-r--r--static/bower_components/paper-scroll-header-panel/index.html28
-rw-r--r--static/bower_components/paper-scroll-header-panel/paper-scroll-header-panel.html455
-rw-r--r--static/bower_components/paper-scroll-header-panel/test/basic.html112
-rw-r--r--static/bower_components/paper-scroll-header-panel/test/index.html25
-rw-r--r--static/bower_components/paper-styles/.bower.json40
-rw-r--r--static/bower_components/paper-styles/README.md3
-rw-r--r--static/bower_components/paper-styles/bower.json31
-rw-r--r--static/bower_components/paper-styles/classes/global.html96
-rw-r--r--static/bower_components/paper-styles/classes/shadow-layout.html302
-rw-r--r--static/bower_components/paper-styles/classes/shadow.html52
-rw-r--r--static/bower_components/paper-styles/classes/typography.html171
-rw-r--r--static/bower_components/paper-styles/color.html333
-rw-r--r--static/bower_components/paper-styles/default-theme.html39
-rw-r--r--static/bower_components/paper-styles/demo-pages.html72
-rw-r--r--static/bower_components/paper-styles/demo.css25
-rw-r--r--static/bower_components/paper-styles/demo/index.html358
-rw-r--r--static/bower_components/paper-styles/paper-styles-classes.html14
-rw-r--r--static/bower_components/paper-styles/paper-styles.html17
-rw-r--r--static/bower_components/paper-styles/shadow.html65
-rw-r--r--static/bower_components/paper-styles/typography.html238
-rw-r--r--static/bower_components/paper-toolbar/.bower.json45
-rw-r--r--static/bower_components/paper-toolbar/.gitignore1
-rw-r--r--static/bower_components/paper-toolbar/README.md51
-rw-r--r--static/bower_components/paper-toolbar/bower.json35
-rw-r--r--static/bower_components/paper-toolbar/demo/index.html81
-rw-r--r--static/bower_components/paper-toolbar/index.html38
-rw-r--r--static/bower_components/paper-toolbar/paper-toolbar.html368
-rw-r--r--static/bower_components/paper-toolbar/test/index.html24
-rw-r--r--static/bower_components/paper-toolbar/test/paper-toolbar.html147
-rw-r--r--static/bower_components/polymer/.bower.json36
-rw-r--r--static/bower_components/polymer/LICENSE.txt27
-rw-r--r--static/bower_components/polymer/bower.json26
-rw-r--r--static/bower_components/polymer/build.log26
-rw-r--r--static/bower_components/polymer/polymer-micro.html529
-rw-r--r--static/bower_components/polymer/polymer-mini.html1396
-rw-r--r--static/bower_components/polymer/polymer.html3985
-rw-r--r--static/bower_components/webcomponentsjs/.bower.json27
-rw-r--r--static/bower_components/webcomponentsjs/CustomElements.js963
-rw-r--r--static/bower_components/webcomponentsjs/CustomElements.min.js11
-rw-r--r--static/bower_components/webcomponentsjs/HTMLImports.js1085
-rw-r--r--static/bower_components/webcomponentsjs/HTMLImports.min.js11
-rw-r--r--static/bower_components/webcomponentsjs/MutationObserver.js344
-rw-r--r--static/bower_components/webcomponentsjs/MutationObserver.min.js11
-rw-r--r--static/bower_components/webcomponentsjs/README.md125
-rw-r--r--static/bower_components/webcomponentsjs/ShadowDOM.js4414
-rw-r--r--static/bower_components/webcomponentsjs/ShadowDOM.min.js15
-rw-r--r--static/bower_components/webcomponentsjs/bower.json18
-rw-r--r--static/bower_components/webcomponentsjs/build.log33
-rw-r--r--static/bower_components/webcomponentsjs/package.json31
-rw-r--r--static/bower_components/webcomponentsjs/webcomponents-lite.js2314
-rw-r--r--static/bower_components/webcomponentsjs/webcomponents-lite.min.js13
-rw-r--r--static/bower_components/webcomponentsjs/webcomponents.js7126
-rw-r--r--static/bower_components/webcomponentsjs/webcomponents.min.js15
-rw-r--r--static/images/cover.pngbin0 -> 17970 bytes
-rw-r--r--static/images/facebook-dreamstale25.pngbin0 -> 712 bytes
-rw-r--r--static/images/feed-dreamstale27.pngbin0 -> 1237 bytes
-rw-r--r--static/images/github2-dreamstale35.pngbin0 -> 1121 bytes
-rw-r--r--static/images/google+-dreamstale37.pngbin0 -> 1158 bytes
-rw-r--r--static/images/linkedin-dreamstale45.pngbin0 -> 817 bytes
-rw-r--r--static/images/photo.pngbin0 -> 1293 bytes
-rw-r--r--static/images/profile.pngbin0 -> 17970 bytes
-rw-r--r--static/images/twitter-dreamstale71.pngbin0 -> 997 bytes
-rw-r--r--theme.toml13
338 files changed, 45240 insertions, 0 deletions
diff --git a/LICENSE.md b/LICENSE.md
new file mode 100644
index 0000000..74b7d39
--- /dev/null
+++ b/LICENSE.md
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 pdevty
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..7755255
--- /dev/null
+++ b/README.md
@@ -0,0 +1,69 @@
+# Polymer
+
+Polymer is a web components material design theme for [Hugo](http://gohugo.io/).
+
+![](https://github.com/pdevty/polymer/blob/master/images/tn.png)
+
+## Features
+
+- Material Design by [polymer](https://www.polymer-project.org/1.0/)
+- Google Analytics (optional)
+- Pagination
+- Disqus (optional)
+- Twitter, Facebook, GitHub, Google+, LinkedIn links (optional)
+- Tags
+- Categories
+- Cover, Photo, Profile image (optional)
+- Highlighting source code
+
+## Installation
+
+```shell
+$ mkdir themes
+$ cd themes
+$ git clone https://github.com/pdevty/polymer
+```
+
+## Usage
+
+```shell
+$ hugo server -t polymer -w -D
+```
+
+## Configuration
+
+config.toml
+
+```toml
+theme="polymer"
+baseurl = "Your Site URL"
+languageCode = "en-us"
+title = "Your Site Title"
+MetaDataFormat = "toml"
+paginate = 10 # optional
+disqusShortname = "Your Disqus Name" # optional
+copyright = "© 2015 Copyright Text"
+
+[params]
+ author = "Your Name"
+ photo = "images/photo.png" # optional
+ profile = "images/profile.png" # optional
+ cover = "images/cover.png" # optional
+ twitter = "Your Twitter Name" # optional
+ github = "Your Github Name" # optional
+ facebook = "Your facebook Name" # optional
+ gplus = "Your Google+ Name" # optional
+ linkedin = "Your linkedin Name" # optional
+ googleAnalyticsUserID = "Your Analytics User Id" # optional
+
+[permalinks]
+ post = "/:year/:month/:day/:filename/" # optional
+```
+
+## Contributing
+
+1. Fork it
+2. Create your feature branch (`git checkout -b my-new-feature`)
+3. Commit your changes (`git commit -am 'Add some feature'`)
+4. Push to the branch (`git push origin my-new-feature`)
+5. Create new Pull Request \ No newline at end of file
diff --git a/archetypes/default.md b/archetypes/default.md
new file mode 100644
index 0000000..b03c0c1
--- /dev/null
+++ b/archetypes/default.md
@@ -0,0 +1,4 @@
++++
+Tags = []
+Categories = []
++++ \ No newline at end of file
diff --git a/images/screenshot.png b/images/screenshot.png
new file mode 100644
index 0000000..63394a5
--- /dev/null
+++ b/images/screenshot.png
Binary files differ
diff --git a/images/tn.png b/images/tn.png
new file mode 100644
index 0000000..46935ee
--- /dev/null
+++ b/images/tn.png
Binary files differ
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
new file mode 100644
index 0000000..b8b3d91
--- /dev/null
+++ b/layouts/_default/list.html
@@ -0,0 +1,7 @@
+{{ partial "header.html" . }}
+
+{{ partial "content.html" . }}
+
+{{ partial "pagination.html" .Paginator }}
+
+{{ partial "footer.html" . }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
new file mode 100644
index 0000000..65a2bbd
--- /dev/null
+++ b/layouts/_default/single.html
@@ -0,0 +1,45 @@
+{{ partial "header.html" . }}
+
+{{ $baseurl := .Site.BaseURL }}
+<div class="content">
+
+ <div class="article">
+ <div class="title">{{ .Title }}</div>
+ {{if .Params.categories }}
+ <div class="categories">
+ {{ range $index, $category := .Params.categories }}
+ <a href="{{$baseurl}}/categories/{{ $category | urlize }}/">{{ $category }}</a>
+ {{ end }}
+ </div>
+ {{end}}
+ <div class="description">{{ .Content }}</div>
+ <div class="tags">
+ {{ .Date.Format "2 Jan 2006" }}
+ {{if .Params.tags }}
+ {{ range $index, $tag := .Params.tags }}
+ <a href="{{$baseurl}}/tags/{{ $tag | urlize }}/">#{{ $tag }}</a>
+ {{ end }}
+ {{end}}
+ </div>
+ {{ with .Site.DisqusShortname }}
+ {{ partial "disqus.html" . }}
+ {{ end }}
+ </div>
+
+</div>
+
+<paper-item>
+ {{if .Prev}}
+ <a href="{{.Prev.Permalink}}"><paper-fab icon="chevron-left"><a></a></paper-fab></a>
+ {{else}}
+ <paper-fab disabled icon="chevron-left"></paper-fab>
+ {{end}}
+ <div class="flex"></div>
+ {{if .Next}}
+ <a href="{{.Next.Permalink}}"><paper-fab icon="chevron-right"></paper-fab></a>
+ {{else}}
+ <paper-fab disabled icon="chevron-right"></paper-fab>
+ {{end}}
+</paper-item>
+
+{{ partial "footer.html" . }}
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
new file mode 100644
index 0000000..458139b
--- /dev/null
+++ b/layouts/_default/terms.html
@@ -0,0 +1,12 @@
+{{ $baseurl := .Site.BaseURL }}
+{{ partial "header.html" . }}
+
+{{ $data := .Data }}
+
+<paper-menu>
+ {{ range $key, $value := .Data.Terms }}
+ <a href="{{$baseurl}}/{{ $data.Plural }}/{{ $key | urlize }}"><paper-item>{{ if eq $data.Plural "tags"}}<iron-icon icon="loyalty"></iron-icon>{{else}}<iron-icon icon="drafts"></iron-icon>{{end}} <div class="flex">{{ $key }}</div> {{ len $value }}</paper-item></a>
+ {{ end }}
+</paper-menu>
+
+{{ partial "footer.html" . }} \ No newline at end of file
diff --git a/layouts/index.html b/layouts/index.html
new file mode 100644
index 0000000..b8b3d91
--- /dev/null
+++ b/layouts/index.html
@@ -0,0 +1,7 @@
+{{ partial "header.html" . }}
+
+{{ partial "content.html" . }}
+
+{{ partial "pagination.html" .Paginator }}
+
+{{ partial "footer.html" . }}
diff --git a/layouts/partials/content.html b/layouts/partials/content.html
new file mode 100644
index 0000000..e93dde2
--- /dev/null
+++ b/layouts/partials/content.html
@@ -0,0 +1,26 @@
+{{ $baseurl := .Site.BaseURL }}
+<div class="content">
+
+{{range $index, $page := .Paginator.Pages}}
+ <div class="article">
+ <div class="title"><a href="{{ .Permalink }}">{{ .Title }}</a></div>
+ {{if .Params.categories }}
+ <div class="categories">
+ {{ range $index, $category := .Params.categories }}
+ <a href="{{$baseurl}}/categories/{{ $category | urlize }}/">{{ $category }}</a>
+ {{ end }}
+ </div>
+ {{end}}
+ <div class="description">{{ .Summary }}</div>
+ <div class="tags">
+ {{ .Date.Format "2 Jan 2006" }}
+ {{if .Params.tags }}
+ {{ range $index, $tag := .Params.tags }}
+ <a href="{{$baseurl}}/tags/{{ $tag | urlize }}/">#{{ $tag }}</a>
+ {{ end }}
+ {{end}}
+ </div>
+ </div>
+{{ end }}
+
+</div>
diff --git a/layouts/partials/disqus.html b/layouts/partials/disqus.html
new file mode 100644
index 0000000..a07c97a
--- /dev/null
+++ b/layouts/partials/disqus.html
@@ -0,0 +1,13 @@
+<div id="disqus_thread"></div>
+<script type="text/javascript">
+ /* * * CONFIGURATION VARIABLES * * */
+ var disqus_shortname = '{{ . }}';
+
+ /* * * DON'T EDIT BELOW THIS LINE * * */
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+</script>
+<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript> \ No newline at end of file
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
new file mode 100644
index 0000000..7f2c1c6
--- /dev/null
+++ b/layouts/partials/footer.html
@@ -0,0 +1,21 @@
+ <paper-item>
+ <div class="copyright">{{.Site.Copyright}}</div>
+ <div class="flex"></div>
+ <div class="design">Design <a href="http://pdevty.github.io/blog/">pdevty</a></div>
+ </paper-item>
+ </paper-scroll-header-panel>
+ </paper-drawer-panel>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.6/highlight.min.js"></script>
+ <script>hljs.initHighlightingOnLoad();</script>
+ {{with .Site.Params.googleAnalyticsUserID }}
+ <script>
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+ ga('create', '{{.}}', 'auto');
+ ga('send', 'pageview');
+ </script>
+ {{end}}
+</body>
+</html> \ No newline at end of file
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
new file mode 100644
index 0000000..f61d3c5
--- /dev/null
+++ b/layouts/partials/header.html
@@ -0,0 +1,165 @@
+{{ $baseurl := .Site.BaseURL }}
+<!doctype html>
+<html lang="{{.Site.LanguageCode}}">
+<head>
+ <meta charset="utf-8">
+ <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">
+ <title>{{ .Title }}</title>
+ <script src="{{$baseurl}}/bower_components/webcomponentsjs/webcomponents-lite.js"></script>
+ <link rel="import" href="{{$baseurl}}/bower_components/iron-icons/iron-icons.html">
+ <link rel="import" href="{{$baseurl}}/bower_components/paper-drawer-panel/paper-drawer-panel.html">
+ <link rel="import" href="{{$baseurl}}/bower_components/paper-icon-button/paper-icon-button.html">
+ <link rel="import" href="{{$baseurl}}/bower_components/paper-toolbar/paper-toolbar.html">
+ <link rel="import" href="{{$baseurl}}/bower_components/paper-scroll-header-panel/paper-scroll-header-panel.html">
+ <link rel="import" href="{{$baseurl}}/bower_components/paper-fab/paper-fab.html">
+ <link rel="import" href="{{$baseurl}}/bower_components/paper-item/paper-item.html">
+ <link rel="import" href="{{$baseurl}}/bower_components/paper-menu/paper-menu.html">
+ <link rel="import" href="{{$baseurl}}/bower_components/iron-image/iron-image.html">
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.6/styles/default.min.css">
+ <style is="custom-style">
+ body {
+ font-family: 'Roboto', sans-serif;
+ }
+ .nav {
+ border-right: 1px solid #ccc;
+ }
+ {{if .Site.Params.cover}}
+ paper-scroll-header-panel {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ background-color: var(--paper-grey-200, #eee);
+ /* background for toolbar when it is at its full size */
+ --paper-scroll-header-panel-full-header: {
+ background-image: url({{$baseurl}}/{{.Site.Params.cover}});
+ };
+ /* background for toolbar when it is condensed */
+ --paper-scroll-header-panel-condensed-header: {
+ background-image: url({{$baseurl}}/{{.Site.Params.cover}});
+ };
+ }
+ {{else}}
+ paper-scroll-header-panel {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ background-color: var(--paper-grey-200, #eee);
+ /* background for toolbar when it is at its full size */
+ --paper-scroll-header-panel-full-header: {
+ background-image: url({{$baseurl}}/images/cover.png);
+ };
+ /* background for toolbar when it is condensed */
+ --paper-scroll-header-panel-condensed-header: {
+ background-image: url({{$baseurl}}/images/cover.png);
+ };
+ }
+ {{end}}
+ paper-toolbar {
+ /* custom toolbar height */
+ height: 256px;
+ background-color: transparent;
+ }
+ .profile{
+ width: 100%;
+ padding-bottom: 20px;
+ }
+ .photo{
+ margin: 20px;
+ display: inline-block;
+ height: 64px; width: 64px;
+ border-radius: 50%;
+ }
+ .article{
+ border: 1px solid #bebebe;
+ padding: 16px;
+ margin: 16px;
+ border-radius: 5px;
+ background-color: #fff;
+ }
+ .title{
+ font-size: 22px;
+ padding: 8px 0 16px;
+ }
+ .description{
+ font-size: 16px;
+ padding-bottom: 8px;
+ }
+ .author{
+ font-size: 16px;
+ padding-left: 20px;
+ color: white;
+ }
+ .design{
+ font-size: 14px;
+ }
+ .copyright{
+ font-size: 16px;
+ }
+ paper-menu a {
+ text-decoration: none;
+ color: #212121;
+ }
+ </style>
+
+</head>
+<body>
+ <paper-drawer-panel id="drawerPanel" responsive-width="1280px">
+ <div class="nav scroll" drawer>
+ {{if .Site.Params.profile}}
+ <iron-image class="profile" sizing="cover" src="{{$baseurl}}/{{.Site.Params.profile}}">
+ {{else}}
+ <iron-image class="profile" sizing="cover" src="{{$baseurl}}/images/profile.png">
+ {{end}}
+ {{if .Site.Params.photo}}
+ <iron-image class="photo" sizing="cover" src="{{$baseurl}}/{{.Site.Params.photo}}"></iron-image>
+ {{else}}
+ <iron-image class="photo" sizing="cover" src="{{$baseurl}}/images/photo.png"></iron-image>
+ {{end}}
+ <div class="author">{{.Site.Params.author}}</div>
+ </iron-image>
+ <paper-menu>
+ <a href="{{$baseurl}}"><paper-item>
+ <iron-icon icon="home"></iron-icon> <div class="flex">Home</div>
+ <iron-icon icon="chevron-right"></iron-icon>
+ </paper-item></a>
+ <a href="{{$baseurl}}/categories/"><paper-item>
+ <iron-icon icon="drafts"></iron-icon> <div class="flex">Categories</div>
+ <iron-icon icon="chevron-right"></iron-icon>
+ </paper-item></a>
+ <a href="{{$baseurl}}/tags/"><paper-item>
+ <iron-icon icon="loyalty"></iron-icon> <div class="flex">Tags</div>
+ <iron-icon icon="chevron-right"></iron-icon>
+ </paper-item></a>
+ </paper-menu>
+ </div>
+
+ <paper-scroll-header-panel main condenses header-height="256" condensed-header-height="64">
+
+ <paper-toolbar>
+
+ <paper-icon-button icon="menu" paper-drawer-toggle></paper-icon-button>
+ <div class="bottom title">{{.Site.Title}}</div>
+ <div class="flex"></div>
+ {{with .Site.Params.facebook}}
+ <a href="https://www.facebook.com/{{ . }}"><paper-icon-button src="{{$baseurl}}/images/facebook-dreamstale25.png"></paper-icon-button></a>
+ {{end}}
+ {{with .Site.Params.twitter}}
+ <a href="https://twitter.com/{{ . }}"><paper-icon-button src="{{$baseurl}}/images/twitter-dreamstale71.png"></paper-icon-button></a>
+ {{end}}
+ {{with .Site.Params.gplus}}
+ <a href="https://google.com/+{{ . }}"><paper-icon-button src="{{$baseurl}}/images/google+-dreamstale37.png"></paper-icon-button></a>
+ {{end}}
+ {{with .Site.Params.linkedin}}
+ <a href="https://www.linkedin.com/in/{{ . }}"><paper-icon-button src="{{$baseurl}}/images/linkedin-dreamstale45.png"></paper-icon-button></a>
+ {{end}}
+ {{with .Site.Params.github}}
+ <a href="https://github.com/{{ . }}"><paper-icon-button src="{{$baseurl}}/images/github2-dreamstale35.png"></paper-icon-button></a>
+ {{end}}
+ <a href="{{$baseurl}}/index.xml"><paper-icon-button src="{{$baseurl}}/images/feed-dreamstale27.png"></paper-icon-button></a>
+
+ </paper-toolbar>
diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html
new file mode 100644
index 0000000..1b87b12
--- /dev/null
+++ b/layouts/partials/pagination.html
@@ -0,0 +1,13 @@
+<paper-item>
+ {{if .HasPrev}}
+ <a href="{{.Prev.URL}}"><paper-fab icon="chevron-left"><a></a></paper-fab></a>
+ {{else}}
+ <paper-fab disabled icon="chevron-left"></paper-fab>
+ {{end}}
+ <div class="flex"></div>
+ {{if .HasNext}}
+ <a href="{{.Next.URL}}"><paper-fab icon="chevron-right"></paper-fab></a>
+ {{else}}
+ <paper-fab disabled icon="chevron-right"></paper-fab>
+ {{end}}
+</paper-item>
diff --git a/static/bower.json b/static/bower.json
new file mode 100644
index 0000000..5ff3b4f
--- /dev/null
+++ b/static/bower.json
@@ -0,0 +1,14 @@
+{
+ "name": "polymer",
+ "dependencies": {
+ "polymer": "Polymer/polymer#^1.0.0",
+ "paper-scroll-header-panel": "PolymerElements/paper-scroll-header-panel#^1.0.0",
+ "iron-icons": "PolymerElements/iron-icons#^1.0.0",
+ "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0",
+ "paper-drawer-panel": "PolymerElements/paper-drawer-panel#^1.0.0",
+ "paper-menu": "PolymerElements/paper-menu#^1.0.0",
+ "paper-item": "PolymerElements/paper-item#^1.0.0",
+ "paper-fab": "PolymerElements/paper-fab#^1.0.0",
+ "iron-image": "PolymerElements/iron-image#^1.0.0"
+ }
+}
diff --git a/static/bower_components/font-roboto/.bower.json b/static/bower_components/font-roboto/.bower.json
new file mode 100644
index 0000000..432744c
--- /dev/null
+++ b/static/bower_components/font-roboto/.bower.json
@@ -0,0 +1,31 @@
+{
+ "name": "font-roboto",
+ "version": "1.0.0",
+ "description": "An HTML import for Roboto",
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "keywords": [
+ "font",
+ "roboto"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/font-roboto.git"
+ },
+ "main": "roboto.html",
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "homepage": "https://github.com/PolymerElements/font-roboto/",
+ "ignore": [
+ "/.*"
+ ],
+ "_release": "1.0.0",
+ "_resolution": {
+ "type": "version",
+ "tag": "1.0.0",
+ "commit": "b85b217e5f4b31f9c03b588e25c977b8104a40cd"
+ },
+ "_source": "git://github.com/PolymerElements/font-roboto.git",
+ "_target": "^1.0.0",
+ "_originalSource": "PolymerElements/font-roboto"
+} \ No newline at end of file
diff --git a/static/bower_components/font-roboto/README.md b/static/bower_components/font-roboto/README.md
new file mode 100644
index 0000000..61c6394
--- /dev/null
+++ b/static/bower_components/font-roboto/README.md
@@ -0,0 +1 @@
+# font-roboto
diff --git a/static/bower_components/font-roboto/bower.json b/static/bower_components/font-roboto/bower.json
new file mode 100644
index 0000000..0962916
--- /dev/null
+++ b/static/bower_components/font-roboto/bower.json
@@ -0,0 +1,22 @@
+{
+ "name": "font-roboto",
+ "version": "1.0.0",
+ "description": "An HTML import for Roboto",
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "keywords": [
+ "font",
+ "roboto"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/font-roboto.git"
+ },
+ "main": "roboto.html",
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "homepage": "https://github.com/PolymerElements/font-roboto/",
+ "ignore": [
+ "/.*"
+ ]
+}
diff --git a/static/bower_components/font-roboto/roboto.html b/static/bower_components/font-roboto/roboto.html
new file mode 100644
index 0000000..848d1da
--- /dev/null
+++ b/static/bower_components/font-roboto/roboto.html
@@ -0,0 +1,10 @@
+<!--
+@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="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic,500,500italic,700,700italic">
diff --git a/static/bower_components/iron-a11y-keys-behavior/.bower.json b/static/bower_components/iron-a11y-keys-behavior/.bower.json
new file mode 100644
index 0000000..f0a9c76
--- /dev/null
+++ b/static/bower_components/iron-a11y-keys-behavior/.bower.json
@@ -0,0 +1,42 @@
+{
+ "name": "iron-a11y-keys-behavior",
+ "version": "1.0.5",
+ "description": "A behavior that enables keybindings for greater a11y.",
+ "keywords": [
+ "web-components",
+ "web-component",
+ "polymer",
+ "a11y",
+ "input"
+ ],
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/iron-a11y-keys-behavior.git"
+ },
+ "main": "iron-a11y-keys-behavior.html",
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "dependencies": {
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "paper-styles": "PolymerElements/paper-styles#^1.0.2",
+ "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
+ "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0",
+ "test-fixture": "polymerelements/test-fixture#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ },
+ "homepage": "https://github.com/polymerelements/iron-a11y-keys-behavior",
+ "_release": "1.0.5",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.0.5",
+ "commit": "cf833eab5c55a26c5aa92e56d3fcb079120ce66a"
+ },
+ "_source": "git://github.com/polymerelements/iron-a11y-keys-behavior.git",
+ "_target": "^1.0.0",
+ "_originalSource": "polymerelements/iron-a11y-keys-behavior"
+} \ No newline at end of file
diff --git a/static/bower_components/iron-a11y-keys-behavior/.gitignore b/static/bower_components/iron-a11y-keys-behavior/.gitignore
new file mode 100644
index 0000000..8d4ae25
--- /dev/null
+++ b/static/bower_components/iron-a11y-keys-behavior/.gitignore
@@ -0,0 +1 @@
+bower_components
diff --git a/static/bower_components/iron-a11y-keys-behavior/README.md b/static/bower_components/iron-a11y-keys-behavior/README.md
new file mode 100644
index 0000000..2d16daa
--- /dev/null
+++ b/static/bower_components/iron-a11y-keys-behavior/README.md
@@ -0,0 +1,15 @@
+iron-a11y-keys-behavior
+=======================
+
+`Polymer.IronA11yKeysBehavior` provides a normalized interface for processing
+keyboard commands that pertain to [WAI-ARIA best practices](http://www.w3.org/TR/wai-aria-practices/#kbd_general_binding).
+The element takes care of browser differences with respect to Keyboard events
+and uses an expressive syntax to filter key presses.
+
+Use the `keyBindings` prototype property to express what combination of keys
+will trigger the event to fire.
+
+Use the `key-event-target` attribute to set up event handlers on a specific
+node.
+The `keys-pressed` event will fire when one of the key combinations set with the
+`keys` property is pressed.
diff --git a/static/bower_components/iron-a11y-keys-behavior/bower.json b/static/bower_components/iron-a11y-keys-behavior/bower.json
new file mode 100644
index 0000000..aa52718
--- /dev/null
+++ b/static/bower_components/iron-a11y-keys-behavior/bower.json
@@ -0,0 +1,32 @@
+{
+ "name": "iron-a11y-keys-behavior",
+ "version": "1.0.5",
+ "description": "A behavior that enables keybindings for greater a11y.",
+ "keywords": [
+ "web-components",
+ "web-component",
+ "polymer",
+ "a11y",
+ "input"
+ ],
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/iron-a11y-keys-behavior.git"
+ },
+ "main": "iron-a11y-keys-behavior.html",
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "dependencies": {
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "paper-styles": "PolymerElements/paper-styles#^1.0.2",
+ "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
+ "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0",
+ "test-fixture": "polymerelements/test-fixture#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ }
+}
diff --git a/static/bower_components/iron-a11y-keys-behavior/demo/index.html b/static/bower_components/iron-a11y-keys-behavior/demo/index.html
new file mode 100644
index 0000000..2c3fec7
--- /dev/null
+++ b/static/bower_components/iron-a11y-keys-behavior/demo/index.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+ <meta charset="UTF-8">
+ <title>Iron A11y Keys Behavior demo</title>
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <link rel="import" href="x-key-aware.html">
+ <link rel="import" href="../../paper-styles/demo-pages.html">
+</head>
+<body>
+ <div class="vertical-section vertical-section-container centered">
+ <x-key-aware></x-key-aware>
+ </div>
+</body>
+</html>
diff --git a/static/bower_components/iron-a11y-keys-behavior/demo/x-key-aware.html b/static/bower_components/iron-a11y-keys-behavior/demo/x-key-aware.html
new file mode 100644
index 0000000..a7f3205
--- /dev/null
+++ b/static/bower_components/iron-a11y-keys-behavior/demo/x-key-aware.html
@@ -0,0 +1,91 @@
+<!--
+@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="../../polymer/polymer.html">
+<link rel="import" href="../../paper-styles/paper-styles.html">
+<link rel="import" href="../iron-a11y-keys-behavior.html">
+
+<dom-module id="x-key-aware">
+ <style>
+ :host {
+ display: block;
+ position: relative;
+ }
+
+ pre {
+ color: var(--google-blue-700);
+ }
+
+ .keys {
+ line-height: 25px;
+ }
+
+ .keys span {
+ cursor: default;
+ background-color: var(--google-grey-100);
+ border: 1px solid var(--google-grey-300);
+ padding: 1px 5px;
+ border-radius: 5px;
+ }
+ </style>
+ <template>
+ <h4>Press any of these keys</h4>
+ <p class="keys">
+ <template is="dom-repeat" items="[[boundKeys]]">
+ <span>{{item}}</span>
+ </template>
+ </p>
+ <pre>[[pressed]]</pre>
+ </template>
+</dom-module>
+
+<script>
+ Polymer({
+ is: 'x-key-aware',
+
+ behaviors: [
+ Polymer.IronA11yKeysBehavior
+ ],
+
+ properties: {
+ pressed: {
+ type: String,
+ readOnly: true,
+ value: ''
+ },
+
+ boundKeys: {
+ type: Array,
+ value: function() {
+ return Object.keys(this.keyBindings).join(' ').split(' ');
+ }
+ },
+
+ keyEventTarget: {
+ type: Object,
+ value: function() {
+ return document.body;
+ }
+ }
+ },
+
+ keyBindings: {
+ '* pageup pagedown left right down up shift+a alt+a home end space enter': '_updatePressed'
+ },
+
+ _updatePressed: function(event) {
+ console.log(event.detail);
+
+ this._setPressed(
+ this.pressed + event.detail.combo + ' pressed!\n'
+ );
+ }
+ });
+</script>
diff --git a/static/bower_components/iron-a11y-keys-behavior/index.html b/static/bower_components/iron-a11y-keys-behavior/index.html
new file mode 100644
index 0000000..e533e79
--- /dev/null
+++ b/static/bower_components/iron-a11y-keys-behavior/index.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<!--
+@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
+The complete set of authors may be found at http://polymer.github.io/AUTHORS
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
+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
+-->
+<html>
+<head>
+
+ <title>iron-a11y-keys-behavior</title>
+ <script src="../webcomponentsjs/webcomponents-lite.js"></script>
+ <link rel="import" href="../iron-component-page/iron-component-page.html">
+
+</head>
+<body>
+
+ <iron-component-page></iron-component-page>
+
+</body>
+</html>
diff --git a/static/bower_components/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html b/static/bower_components/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html
new file mode 100644
index 0000000..e95a298
--- /dev/null
+++ b/static/bower_components/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html
@@ -0,0 +1,421 @@
+<!--
+@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="../polymer/polymer.html">
+
+<script>
+ (function() {
+ 'use strict';
+
+ /**
+ * Chrome uses an older version of DOM Level 3 Keyboard Events
+ *
+ * Most keys are labeled as text, but some are Unicode codepoints.
+ * Values taken from: http://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071221/keyset.html#KeySet-Set
+ */
+ var KEY_IDENTIFIER = {
+ 'U+0009': 'tab',
+ 'U+001B': 'esc',
+ 'U+0020': 'space',
+ 'U+002A': '*',
+ 'U+0030': '0',
+ 'U+0031': '1',
+ 'U+0032': '2',
+ 'U+0033': '3',
+ 'U+0034': '4',
+ 'U+0035': '5',
+ 'U+0036': '6',
+ 'U+0037': '7',
+ 'U+0038': '8',
+ 'U+0039': '9',
+ 'U+0041': 'a',
+ 'U+0042': 'b',
+ 'U+0043': 'c',
+ 'U+0044': 'd',
+ 'U+0045': 'e',
+ 'U+0046': 'f',
+ 'U+0047': 'g',
+ 'U+0048': 'h',
+ 'U+0049': 'i',
+ 'U+004A': 'j',
+ 'U+004B': 'k',
+ 'U+004C': 'l',
+ 'U+004D': 'm',
+ 'U+004E': 'n',
+ 'U+004F': 'o',
+ 'U+0050': 'p',
+ 'U+0051': 'q',
+ 'U+0052': 'r',
+ 'U+0053': 's',
+ 'U+0054': 't',
+ 'U+0055': 'u',
+ 'U+0056': 'v',
+ 'U+0057': 'w',
+ 'U+0058': 'x',
+ 'U+0059': 'y',
+ 'U+005A': 'z',
+ 'U+007F': 'del'
+ };
+
+ /**
+ * Special table for KeyboardEvent.keyCode.
+ * KeyboardEvent.keyIdentifier is better, and KeyBoardEvent.key is even better
+ * than that.
+ *
+ * Values from: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent.keyCode#Value_of_keyCode
+ */
+ var KEY_CODE = {
+ 9: 'tab',
+ 13: 'enter',
+ 27: 'esc',
+ 33: 'pageup',
+ 34: 'pagedown',
+ 35: 'end',
+ 36: 'home',
+ 32: 'space',
+ 37: 'left',
+ 38: 'up',
+ 39: 'right',
+ 40: 'down',
+ 46: 'del',
+ 106: '*'
+ };
+
+ /**
+ * MODIFIER_KEYS maps the short name for modifier keys used in a key
+ * combo string to the property name that references those same keys
+ * in a KeyboardEvent instance.
+ */
+ var MODIFIER_KEYS = {
+ 'shift': 'shiftKey',
+ 'ctrl': 'ctrlKey',
+ 'alt': 'altKey',
+ 'meta': 'metaKey'
+ };
+
+ /**
+ * KeyboardEvent.key is mostly represented by printable character made by
+ * the keyboard, with unprintable keys labeled nicely.
+ *
+ * However, on OS X, Alt+char can make a Unicode character that follows an
+ * Apple-specific mapping. In this case, we
+ * fall back to .keyCode.
+ */
+ var KEY_CHAR = /[a-z0-9*]/;
+
+ /**
+ * Matches a keyIdentifier string.
+ */
+ var IDENT_CHAR = /U\+/;
+
+ /**
+ * Matches arrow keys in Gecko 27.0+
+ */
+ var ARROW_KEY = /^arrow/;
+
+ /**
+ * Matches space keys everywhere (notably including IE10's exceptional name
+ * `spacebar`).
+ */
+ var SPACE_KEY = /^space(bar)?/;
+
+ function transformKey(key) {
+ var validKey = '';
+ if (key) {
+ var lKey = key.toLowerCase();
+ if (lKey.length == 1) {
+ if (KEY_CHAR.test(lKey)) {
+ validKey = lKey;
+ }
+ } else if (ARROW_KEY.test(lKey)) {
+ validKey = lKey.replace('arrow', '');
+ } else if (SPACE_KEY.test(lKey)) {
+ validKey = 'space';
+ } else if (lKey == 'multiply') {
+ // numpad '*' can map to Multiply on IE/Windows
+ validKey = '*';
+ } else {
+ validKey = lKey;
+ }
+ }
+ return validKey;
+ }
+
+ function transformKeyIdentifier(keyIdent) {
+ var validKey = '';
+ if (keyIdent) {
+ if (IDENT_CHAR.test(keyIdent)) {
+ validKey = KEY_IDENTIFIER[keyIdent];
+ } else {
+ validKey = keyIdent.toLowerCase();
+ }
+ }
+ return validKey;
+ }
+
+ function transformKeyCode(keyCode) {
+ var validKey = '';
+ if (Number(keyCode)) {
+ if (keyCode >= 65 && keyCode <= 90) {
+ // ascii a-z
+ // lowercase is 32 offset from uppercase
+ validKey = String.fromCharCode(32 + keyCode);
+ } else if (keyCode >= 112 && keyCode <= 123) {
+ // function keys f1-f12
+ validKey = 'f' + (keyCode - 112);
+ } else if (keyCode >= 48 && keyCode <= 57) {
+ // top 0-9 keys
+ validKey = String(48 - keyCode);
+ } else if (keyCode >= 96 && keyCode <= 105) {
+ // num pad 0-9
+ validKey = String(96 - keyCode);
+ } else {
+ validKey = KEY_CODE[keyCode];
+ }
+ }
+ return validKey;
+ }
+
+ function normalizedKeyForEvent(keyEvent) {
+ // fall back from .key, to .keyIdentifier, to .keyCode, and then to
+ // .detail.key to support artificial keyboard events
+ return transformKey(keyEvent.key) ||
+ transformKeyIdentifier(keyEvent.keyIdentifier) ||
+ transformKeyCode(keyEvent.keyCode) ||
+ transformKey(keyEvent.detail.key) || '';
+ }
+
+ function keyComboMatchesEvent(keyCombo, keyEvent) {
+ return normalizedKeyForEvent(keyEvent) === keyCombo.key &&
+ !!keyEvent.shiftKey === !!keyCombo.shiftKey &&
+ !!keyEvent.ctrlKey === !!keyCombo.ctrlKey &&
+ !!keyEvent.altKey === !!keyCombo.altKey &&
+ !!keyEvent.metaKey === !!keyCombo.metaKey;
+ }
+
+ function parseKeyComboString(keyComboString) {
+ return keyComboString.split('+').reduce(function(parsedKeyCombo, keyComboPart) {
+ var eventParts = keyComboPart.split(':');
+ var keyName = eventParts[0];
+ var event = eventParts[1];
+
+ if (keyName in MODIFIER_KEYS) {
+ parsedKeyCombo[MODIFIER_KEYS[keyName]] = true;
+ } else {
+ parsedKeyCombo.key = keyName;
+ parsedKeyCombo.event = event || 'keydown';
+ }
+
+ return parsedKeyCombo;
+ }, {
+ combo: keyComboString.split(':').shift()
+ });
+ }
+
+ function parseEventString(eventString) {
+ return eventString.split(' ').map(function(keyComboString) {
+ return parseKeyComboString(keyComboString);
+ });
+ }
+
+
+ /**
+ * `Polymer.IronA11yKeysBehavior` provides a normalized interface for processing
+ * keyboard commands that pertain to [WAI-ARIA best practices](http://www.w3.org/TR/wai-aria-practices/#kbd_general_binding).
+ * The element takes care of browser differences with respect to Keyboard events
+ * and uses an expressive syntax to filter key presses.
+ *
+ * Use the `keyBindings` prototype property to express what combination of keys
+ * will trigger the event to fire.
+ *
+ * Use the `key-event-target` attribute to set up event handlers on a specific
+ * node.
+ * The `keys-pressed` event will fire when one of the key combinations set with the
+ * `keys` property is pressed.
+ *
+ * @demo demo/index.html
+ * @polymerBehavior IronA11yKeysBehavior
+ */
+ Polymer.IronA11yKeysBehavior = {
+ properties: {
+ /**
+ * The HTMLElement that will be firing relevant KeyboardEvents.
+ */
+ keyEventTarget: {
+ type: Object,
+ value: function() {
+ return this;
+ }
+ },
+
+ _boundKeyHandlers: {
+ type: Array,
+ value: function() {
+ return [];
+ }
+ },
+
+ // We use this due to a limitation in IE10 where instances will have
+ // own properties of everything on the "prototype".
+ _imperativeKeyBindings: {
+ type: Object,
+ value: function() {
+ return {};
+ }
+ }
+ },
+
+ observers: [
+ '_resetKeyEventListeners(keyEventTarget, _boundKeyHandlers)'
+ ],
+
+ keyBindings: {},
+
+ registered: function() {
+ this._prepKeyBindings();
+ },
+
+ attached: function() {
+ this._listenKeyEventListeners();
+ },
+
+ detached: function() {
+ this._unlistenKeyEventListeners();
+ },
+
+ /**
+ * Can be used to imperatively add a key binding to the implementing
+ * element. This is the imperative equivalent of declaring a keybinding
+ * in the `keyBindings` prototype property.
+ */
+ addOwnKeyBinding: function(eventString, handlerName) {
+ this._imperativeKeyBindings[eventString] = handlerName;
+ this._prepKeyBindings();
+ this._resetKeyEventListeners();
+ },
+
+ /**
+ * When called, will remove all imperatively-added key bindings.
+ */
+ removeOwnKeyBindings: function() {
+ this._imperativeKeyBindings = {};
+ this._prepKeyBindings();
+ this._resetKeyEventListeners();
+ },
+
+ keyboardEventMatchesKeys: function(event, eventString) {
+ var keyCombos = parseEventString(eventString);
+ var index;
+
+ for (index = 0; index < keyCombos.length; ++index) {
+ if (keyComboMatchesEvent(keyCombos[index], event)) {
+ return true;
+ }
+ }
+
+ return false;
+ },
+
+ _collectKeyBindings: function() {
+ var keyBindings = this.behaviors.map(function(behavior) {
+ return behavior.keyBindings;
+ });
+
+ if (keyBindings.indexOf(this.keyBindings) === -1) {
+ keyBindings.push(this.keyBindings);
+ }
+
+ return keyBindings;
+ },
+
+ _prepKeyBindings: function() {
+ this._keyBindings = {};
+
+ this._collectKeyBindings().forEach(function(keyBindings) {
+ for (var eventString in keyBindings) {
+ this._addKeyBinding(eventString, keyBindings[eventString]);
+ }
+ }, this);
+
+ for (var eventString in this._imperativeKeyBindings) {
+ this._addKeyBinding(eventString, this._imperativeKeyBindings[eventString]);
+ }
+ },
+
+ _addKeyBinding: function(eventString, handlerName) {
+ parseEventString(eventString).forEach(function(keyCombo) {
+ this._keyBindings[keyCombo.event] =
+ this._keyBindings[keyCombo.event] || [];
+
+ this._keyBindings[keyCombo.event].push([
+ keyCombo,
+ handlerName
+ ]);
+ }, this);
+ },
+
+ _resetKeyEventListeners: function() {
+ this._unlistenKeyEventListeners();
+
+ if (this.isAttached) {
+ this._listenKeyEventListeners();
+ }
+ },
+
+ _listenKeyEventListeners: function() {
+ Object.keys(this._keyBindings).forEach(function(eventName) {
+ var keyBindings = this._keyBindings[eventName];
+ var boundKeyHandler = this._onKeyBindingEvent.bind(this, keyBindings);
+
+ this._boundKeyHandlers.push([this.keyEventTarget, eventName, boundKeyHandler]);
+
+ this.keyEventTarget.addEventListener(eventName, boundKeyHandler);
+ }, this);
+ },
+
+ _unlistenKeyEventListeners: function() {
+ var keyHandlerTuple;
+ var keyEventTarget;
+ var eventName;
+ var boundKeyHandler;
+
+ while (this._boundKeyHandlers.length) {
+ // My kingdom for block-scope binding and destructuring assignment..
+ keyHandlerTuple = this._boundKeyHandlers.pop();
+ keyEventTarget = keyHandlerTuple[0];
+ eventName = keyHandlerTuple[1];
+ boundKeyHandler = keyHandlerTuple[2];
+
+ keyEventTarget.removeEventListener(eventName, boundKeyHandler);
+ }
+ },
+
+ _onKeyBindingEvent: function(keyBindings, event) {
+ keyBindings.forEach(function(keyBinding) {
+ var keyCombo = keyBinding[0];
+ var handlerName = keyBinding[1];
+
+ if (!event.defaultPrevented && keyComboMatchesEvent(keyCombo, event)) {
+ this._triggerKeyHandler(keyCombo, handlerName, event);
+ }
+ }, this);
+ },
+
+ _triggerKeyHandler: function(keyCombo, handlerName, keyboardEvent) {
+ var detail = Object.create(keyCombo);
+ detail.keyboardEvent = keyboardEvent;
+
+ this[handlerName].call(this, new CustomEvent(keyCombo.event, {
+ detail: detail
+ }));
+ }
+ };
+ })();
+</script>
diff --git a/static/bower_components/iron-a11y-keys-behavior/test/basic-test.html b/static/bower_components/iron-a11y-keys-behavior/test/basic-test.html
new file mode 100644
index 0000000..8e50c92
--- /dev/null
+++ b/static/bower_components/iron-a11y-keys-behavior/test/basic-test.html
@@ -0,0 +1,248 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
+ <title>iron-a11y-keys</title>
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
+ <script src="../../iron-test-helpers/mock-interactions.js"></script>
+
+ <link rel="import" href="../../polymer/polymer.html">
+ <link rel="import" href="../../test-fixture/test-fixture.html">
+ <link rel="import" href="../iron-a11y-keys-behavior.html">
+</head>
+<body>
+ <test-fixture id="BasicKeys">
+ <template>
+ <x-a11y-basic-keys></x-a11y-basic-keys>
+ </template>
+ </test-fixture>
+
+ <test-fixture id="ComboKeys">
+ <template>
+ <x-a11y-combo-keys></x-a11y-combo-keys>
+ </template>
+ </test-fixture>
+
+ <test-fixture id="AlternativeEventKeys">
+ <template>
+ <x-a11y-alternate-event-keys></x-a11y-alternate-event-keys>
+ </template>
+ </test-fixture>
+
+ <test-fixture id="BehaviorKeys">
+ <template>
+ <x-a11y-behavior-keys></x-a11y-behavior-keys>
+ </template>
+ </test-fixture>
+
+ <script>
+suite('Polymer.IronA11yKeysBehavior', function() {
+ var keys;
+
+ suiteSetup(function() {
+ var KeysTestBehavior = [Polymer.IronA11yKeysBehavior, {
+ properties: {
+ keyCount: {
+ type: Number,
+ value: 0
+ }
+ },
+
+ _keyHandler: function(event) {
+ this.keyCount++;
+ this.lastEvent = event;
+ }
+ }];
+
+ Polymer({
+ is: 'x-a11y-basic-keys',
+
+ behaviors: [
+ KeysTestBehavior
+ ],
+
+ keyBindings: {
+ 'space': '_keyHandler'
+ }
+ });
+
+ Polymer({
+ is: 'x-a11y-combo-keys',
+
+ behaviors: [
+ KeysTestBehavior
+ ],
+
+ keyBindings: {
+ 'ctrl+shift+a': '_keyHandler'
+ }
+ });
+
+ Polymer({
+ is: 'x-a11y-alternate-event-keys',
+
+ behaviors: [
+ KeysTestBehavior
+ ],
+
+ keyBindings: {
+ 'space:keyup': '_keyHandler'
+ }
+ });
+
+ var XA11yBehavior = {
+ keyBindings: {
+ 'enter': '_keyHandler'
+ }
+ };
+
+ Polymer({
+ is: 'x-a11y-behavior-keys',
+
+ behaviors: [
+ KeysTestBehavior,
+ XA11yBehavior
+ ],
+
+ keyBindings: {
+ 'space': '_keyHandler'
+ }
+ });
+ });
+
+ suite('basic keys', function() {
+ setup(function() {
+ keys = fixture('BasicKeys');
+ });
+
+ test('trigger the handler when the specified key is pressed', function() {
+ MockInteractions.pressSpace(keys);
+
+ expect(keys.keyCount).to.be.equal(1);
+ });
+
+ test('do not trigger the handler for non-specified keys', function() {
+ MockInteractions.pressEnter(keys);
+
+ expect(keys.keyCount).to.be.equal(0);
+ });
+
+ test('can have bindings added imperatively', function() {
+ keys.addOwnKeyBinding('enter', '_keyHandler');
+
+ MockInteractions.pressEnter(keys);
+ expect(keys.keyCount).to.be.equal(1);
+
+ MockInteractions.pressSpace(keys);
+ expect(keys.keyCount).to.be.equal(2);
+ });
+
+ test('can remove imperatively added bindings', function() {
+ keys.addOwnKeyBinding('enter', '_keyHandler');
+ keys.removeOwnKeyBindings();
+
+ MockInteractions.pressEnter(keys);
+ expect(keys.keyCount).to.be.equal(0);
+
+ MockInteractions.pressSpace(keys);
+ expect(keys.keyCount).to.be.equal(1);
+ });
+
+ suite('edge cases', function() {
+ test('knows that `spacebar` is the same as `space`', function() {
+ var event = new CustomEvent('keydown');
+ event.key = 'spacebar';
+ expect(keys.keyboardEventMatchesKeys(event, 'space')).to.be.equal(true);
+ });
+ });
+
+ suite('matching keyboard events to keys', function() {
+ test('can be done imperatively', function() {
+ var event = new CustomEvent('keydown');
+ event.keyCode = 65;
+ expect(keys.keyboardEventMatchesKeys(event, 'a')).to.be.equal(true);
+ });
+
+ test('can be done with a provided keyboardEvent', function() {
+ var event;
+ MockInteractions.pressSpace(keys);
+ event = keys.lastEvent;
+
+ expect(event.detail.keyboardEvent).to.be.okay;
+ expect(keys.keyboardEventMatchesKeys(event, 'space')).to.be.equal(true);
+ });
+
+ test('can handle variations in arrow key names', function() {
+ var event = new CustomEvent('keydown');
+ event.key = 'up';
+ expect(keys.keyboardEventMatchesKeys(event, 'up')).to.be.equal(true);
+ event.key = 'ArrowUp';
+ expect(keys.keyboardEventMatchesKeys(event, 'up')).to.be.equal(true);
+ });
+ });
+ });
+
+ suite('combo keys', function() {
+ setup(function() {
+ keys = fixture('ComboKeys');
+ });
+
+ test('trigger the handler when the combo is pressed', function() {
+ var event = new CustomEvent('keydown');
+
+ event.ctrlKey = true;
+ event.shiftKey = true;
+ event.keyCode = event.code = 65;
+
+ keys.dispatchEvent(event);
+
+ expect(keys.keyCount).to.be.equal(1);
+ });
+ });
+
+ suite('alternative event keys', function() {
+ setup(function() {
+ keys = fixture('AlternativeEventKeys');
+ });
+
+ test('trigger on the specified alternative keyboard event', function() {
+ MockInteractions.keyDownOn(keys, 32);
+
+ expect(keys.keyCount).to.be.equal(0);
+
+ MockInteractions.keyUpOn(keys, 32);
+
+ expect(keys.keyCount).to.be.equal(1);
+ });
+ });
+
+ suite('behavior keys', function() {
+ setup(function() {
+ keys = fixture('BehaviorKeys');
+ });
+
+ test('bindings in other behaviors are transitive', function() {
+ MockInteractions.pressEnter(keys);
+ MockInteractions.pressSpace(keys);
+
+ expect(keys.keyCount).to.be.equal(2);
+ });
+ });
+
+});
+ </script>
+</body>
+</html>
diff --git a/static/bower_components/iron-a11y-keys-behavior/test/index.html b/static/bower_components/iron-a11y-keys-behavior/test/index.html
new file mode 100644
index 0000000..24f9e35
--- /dev/null
+++ b/static/bower_components/iron-a11y-keys-behavior/test/index.html
@@ -0,0 +1,29 @@
+<!--
+ @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
+-->
+<!doctype html>
+<html>
+ <head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
+ <title>Tests</title>
+
+ <script src="../../webcomponentsjs/webcomponents.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+ </head>
+
+ <body>
+ <script>
+ // Load and run all tests (.html, .js) as one suite:
+ WCT.loadSuites([
+ 'basic-test.html',
+ ]);
+ </script>
+ </body>
+</html>
diff --git a/static/bower_components/iron-behaviors/.bower.json b/static/bower_components/iron-behaviors/.bower.json
new file mode 100644
index 0000000..bf8b6cf
--- /dev/null
+++ b/static/bower_components/iron-behaviors/.bower.json
@@ -0,0 +1,40 @@
+{
+ "name": "iron-behaviors",
+ "version": "1.0.4",
+ "description": "Provides a set of behaviors for the iron elements",
+ "private": true,
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/iron-behaviors.git"
+ },
+ "main": [
+ "iron-button-state.html",
+ "iron-control-state.html"
+ ],
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "dependencies": {
+ "polymer": "Polymer/polymer#^1.0.0",
+ "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0"
+ },
+ "devDependencies": {
+ "paper-styles": "polymerelements/paper-styles#^1.0.2",
+ "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0",
+ "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
+ "test-fixture": "polymerelements/test-fixture#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ },
+ "homepage": "https://github.com/PolymerElements/iron-behaviors",
+ "_release": "1.0.4",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.0.4",
+ "commit": "8792edd457de697a74f398c09b67df30adf7d866"
+ },
+ "_source": "git://github.com/PolymerElements/iron-behaviors.git",
+ "_target": "^1.0.0",
+ "_originalSource": "PolymerElements/iron-behaviors"
+} \ No newline at end of file
diff --git a/static/bower_components/iron-behaviors/.gitignore b/static/bower_components/iron-behaviors/.gitignore
new file mode 100644
index 0000000..8d4ae25
--- /dev/null
+++ b/static/bower_components/iron-behaviors/.gitignore
@@ -0,0 +1 @@
+bower_components
diff --git a/static/bower_components/iron-behaviors/README.md b/static/bower_components/iron-behaviors/README.md
new file mode 100644
index 0000000..593986e
--- /dev/null
+++ b/static/bower_components/iron-behaviors/README.md
@@ -0,0 +1,4 @@
+iron-behaviors
+==============
+
+This repository collects shared behaviors that are mixed in to other elements.
diff --git a/static/bower_components/iron-behaviors/bower.json b/static/bower_components/iron-behaviors/bower.json
new file mode 100644
index 0000000..6a18575
--- /dev/null
+++ b/static/bower_components/iron-behaviors/bower.json
@@ -0,0 +1,30 @@
+{
+ "name": "iron-behaviors",
+ "version": "1.0.4",
+ "description": "Provides a set of behaviors for the iron elements",
+ "private": true,
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/iron-behaviors.git"
+ },
+ "main": [
+ "iron-button-state.html",
+ "iron-control-state.html"
+ ],
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "dependencies": {
+ "polymer": "Polymer/polymer#^1.0.0",
+ "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0"
+ },
+ "devDependencies": {
+ "paper-styles": "polymerelements/paper-styles#^1.0.2",
+ "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0",
+ "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
+ "test-fixture": "polymerelements/test-fixture#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ }
+}
diff --git a/static/bower_components/iron-behaviors/demo/index.html b/static/bower_components/iron-behaviors/demo/index.html
new file mode 100644
index 0000000..4001664
--- /dev/null
+++ b/static/bower_components/iron-behaviors/demo/index.html
@@ -0,0 +1,47 @@
+<!doctype html>
+<!--
+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
+-->
+<html>
+<head>
+
+ <meta charset="utf-8">
+ <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">
+
+ <title>simple-button</title>
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <link href="../../paper-styles/demo-pages.html" rel="import">
+ <link href="simple-button.html" rel="import">
+
+ <style>
+
+ .vertical-section {
+ text-align: center;
+ }
+
+ </style>
+
+</head>
+<body>
+ <div class="vertical-section vertical-section-container centered">
+ <h3>Normal</h3>
+
+ <simple-button tabindex="0">Hello World</simple-button>
+
+ <h3>Toggles</h3>
+
+ <simple-button toggles tabindex="0">Hello World</simple-button>
+
+ <h3>Disabled</h3>
+
+ <simple-button disabled tabindex="0">Hello World</simple-button>
+ </div>
+</body>
+</html>
diff --git a/static/bower_components/iron-behaviors/demo/simple-button.html b/static/bower_components/iron-behaviors/demo/simple-button.html
new file mode 100644
index 0000000..ab6432b
--- /dev/null
+++ b/static/bower_components/iron-behaviors/demo/simple-button.html
@@ -0,0 +1,70 @@
+<!--
+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="../../polymer/polymer.html">
+<link rel="import" href="../iron-button-state.html">
+<link rel="import" href="../iron-control-state.html">
+
+<dom-module id="simple-button">
+
+ <style>
+
+ :host {
+ display: inline-block;
+ background-color: #4285F4;
+ color: #fff;
+ min-height: 8px;
+ min-width: 8px;
+ padding: 16px;
+ text-transform: uppercase;
+ border-radius: 3px;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ -webkit-user-select: none;
+ user-select: none;
+ cursor: pointer;
+ }
+
+ :host([disabled]) {
+ opacity: 0.3;
+ pointer-events: none;
+ }
+
+ :host([active]),
+ :host([pressed]) {
+ background-color: #3367D6;
+ box-shadow: inset 0 3px 5px rgba(0,0,0,.2);
+ }
+
+ </style>
+
+ <template>
+
+ <content></content>
+
+ </template>
+
+ <script>
+
+ Polymer({
+
+ behaviors: [
+ Polymer.IronControlState,
+ Polymer.IronButtonState
+ ],
+
+ hostAttributes: {
+ role: 'button'
+ }
+ });
+
+ </script>
+
+</dom-module>
+
diff --git a/static/bower_components/iron-behaviors/index.html b/static/bower_components/iron-behaviors/index.html
new file mode 100644
index 0000000..220deb0
--- /dev/null
+++ b/static/bower_components/iron-behaviors/index.html
@@ -0,0 +1,27 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+
+ <title>Iron Behaviors</title>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+ <script src="../webcomponentsjs/webcomponents-lite.js"></script>
+ <link rel="import" href="../iron-component-page/iron-component-page.html">
+
+</head>
+<body>
+
+ <iron-component-page src="iron-button-state.html"></iron-component-page>
+
+</body>
+</html>
diff --git a/static/bower_components/iron-behaviors/iron-button-state.html b/static/bower_components/iron-behaviors/iron-button-state.html
new file mode 100644
index 0000000..fc52e17
--- /dev/null
+++ b/static/bower_components/iron-behaviors/iron-button-state.html
@@ -0,0 +1,186 @@
+<!--
+@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="../polymer/polymer.html">
+<link rel="import" href="../iron-a11y-keys-behavior/iron-a11y-keys-behavior.html">
+<link rel="import" href="iron-control-state.html">
+
+<script>
+
+ /**
+ * @demo demo/index.html
+ * @polymerBehavior Polymer.IronButtonState
+ */
+ Polymer.IronButtonStateImpl = {
+
+ properties: {
+
+ /**
+ * If true, the user is currently holding down the button.
+ */
+ pressed: {
+ type: Boolean,
+ readOnly: true,
+ value: false,
+ reflectToAttribute: true,
+ observer: '_pressedChanged'
+ },
+
+ /**
+ * If true, the button toggles the active state with each tap or press
+ * of the spacebar.
+ */
+ toggles: {
+ type: Boolean,
+ value: false,
+ reflectToAttribute: true
+ },
+
+ /**
+ * If true, the button is a toggle and is currently in the active state.
+ */
+ active: {
+ type: Boolean,
+ value: false,
+ notify: true,
+ reflectToAttribute: true,
+ observer: '_activeChanged'
+ },
+
+ /**
+ * True if the element is currently being pressed by a "pointer," which
+ * is loosely defined as mouse or touch input (but specifically excluding
+ * keyboard input).
+ */
+ pointerDown: {
+ type: Boolean,
+ readOnly: true,
+ value: false
+ },
+
+ /**
+ * True if the input device that caused the element to receive focus
+ * was a keyboard.
+ */
+ receivedFocusFromKeyboard: {
+ type: Boolean,
+ readOnly: true
+ }
+ },
+
+ listeners: {
+ down: '_downHandler',
+ up: '_upHandler',
+ tap: '_tapHandler'
+ },
+
+ observers: [
+ '_detectKeyboardFocus(focused)'
+ ],
+
+ keyBindings: {
+ 'enter:keydown': '_asyncClick',
+ 'space:keydown': '_spaceKeyDownHandler',
+ 'space:keyup': '_spaceKeyUpHandler',
+ },
+
+ _tapHandler: function() {
+ if (this.toggles) {
+ // a tap is needed to toggle the active state
+ this._userActivate(!this.active);
+ } else {
+ this.active = false;
+ }
+ },
+
+ _detectKeyboardFocus: function(focused) {
+ this._setReceivedFocusFromKeyboard(!this.pointerDown && focused);
+ },
+
+ // to emulate native checkbox, (de-)activations from a user interaction fire
+ // 'change' events
+ _userActivate: function(active) {
+ this.active = active;
+ this.fire('change');
+ },
+
+ _downHandler: function() {
+ this._setPointerDown(true);
+ this._setPressed(true);
+ this._setReceivedFocusFromKeyboard(false);
+ },
+
+ _upHandler: function() {
+ this._setPointerDown(false);
+ this._setPressed(false);
+ },
+
+ _spaceKeyDownHandler: function(event) {
+ var keyboardEvent = event.detail.keyboardEvent;
+ keyboardEvent.preventDefault();
+ keyboardEvent.stopImmediatePropagation();
+ this._setPressed(true);
+ },
+
+ _spaceKeyUpHandler: function() {
+ if (this.pressed) {
+ this._asyncClick();
+ }
+ this._setPressed(false);
+ },
+
+ // trigger click asynchronously, the asynchrony is useful to allow one
+ // event handler to unwind before triggering another event
+ _asyncClick: function() {
+ this.async(function() {
+ this.click();
+ }, 1);
+ },
+
+ // any of these changes are considered a change to button state
+
+ _pressedChanged: function(pressed) {
+ this._changedButtonState();
+ },
+
+ _activeChanged: function(active) {
+ if (this.toggles) {
+ this.setAttribute('aria-pressed', active ? 'true' : 'false');
+ } else {
+ this.removeAttribute('aria-pressed');
+ }
+ this._changedButtonState();
+ },
+
+ _controlStateChanged: function() {
+ if (this.disabled) {
+ this._setPressed(false);
+ } else {
+ this._changedButtonState();
+ }
+ },
+
+ // provide hook for follow-on behaviors to react to button-state
+
+ _changedButtonState: function() {
+ if (this._buttonStateChanged) {
+ this._buttonStateChanged(); // abstract
+ }
+ }
+
+ };
+
+ /** @polymerBehavior */
+ Polymer.IronButtonState = [
+ Polymer.IronA11yKeysBehavior,
+ Polymer.IronButtonStateImpl
+ ];
+
+</script>
diff --git a/static/bower_components/iron-behaviors/iron-control-state.html b/static/bower_components/iron-behaviors/iron-control-state.html
new file mode 100644
index 0000000..33e42ea
--- /dev/null
+++ b/static/bower_components/iron-behaviors/iron-control-state.html
@@ -0,0 +1,108 @@
+<!--
+@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="../polymer/polymer.html">
+
+<script>
+
+ /**
+ * @demo demo/index.html
+ * @polymerBehavior
+ */
+ Polymer.IronControlState = {
+
+ properties: {
+
+ /**
+ * If true, the element currently has focus.
+ */
+ focused: {
+ type: Boolean,
+ value: false,
+ notify: true,
+ readOnly: true,
+ reflectToAttribute: true
+ },
+
+ /**
+ * If true, the user cannot interact with this element.
+ */
+ disabled: {
+ type: Boolean,
+ value: false,
+ notify: true,
+ observer: '_disabledChanged',
+ reflectToAttribute: true
+ },
+
+ _oldTabIndex: {
+ type: Number
+ },
+
+ _boundFocusBlurHandler: {
+ type: Function,
+ value: function() {
+ return this._focusBlurHandler.bind(this);
+ }
+ }
+
+ },
+
+ observers: [
+ '_changedControlState(focused, disabled)'
+ ],
+
+ ready: function() {
+ // TODO(sjmiles): ensure read-only property is valued so the compound
+ // observer will fire
+ if (this.focused === undefined) {
+ this._setFocused(false);
+ }
+ this.addEventListener('focus', this._boundFocusBlurHandler, true);
+ this.addEventListener('blur', this._boundFocusBlurHandler, true);
+ },
+
+ _focusBlurHandler: function(event) {
+ var target = event.path ? event.path[0] : event.target;
+ if (target === this) {
+ var focused = event.type === 'focus';
+ this._setFocused(focused);
+ } else if (!this.shadowRoot) {
+ event.stopPropagation();
+ this.fire(event.type, {sourceEvent: event}, {
+ node: this,
+ bubbles: event.bubbles,
+ cancelable: event.cancelable
+ });
+ }
+ },
+
+ _disabledChanged: function(disabled, old) {
+ this.setAttribute('aria-disabled', disabled ? 'true' : 'false');
+ this.style.pointerEvents = disabled ? 'none' : '';
+ if (disabled) {
+ this._oldTabIndex = this.tabIndex;
+ this.focused = false;
+ this.tabIndex = -1;
+ } else if (this._oldTabIndex !== undefined) {
+ this.tabIndex = this._oldTabIndex;
+ }
+ },
+
+ _changedControlState: function() {
+ // _controlStateChanged is abstract, follow-on behaviors may implement it
+ if (this._controlStateChanged) {
+ this._controlStateChanged();
+ }
+ }
+
+ };
+
+</script>
diff --git a/static/bower_components/iron-behaviors/test/active-state.html b/static/bower_components/iron-behaviors/test/active-state.html
new file mode 100644
index 0000000..bffa727
--- /dev/null
+++ b/static/bower_components/iron-behaviors/test/active-state.html
@@ -0,0 +1,154 @@
+<!doctype html>
+<!--
+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
+-->
+<html>
+<head>
+ <title>active-state</title>
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
+ <script src="../../iron-test-helpers/mock-interactions.js"></script>
+
+ <link rel="import" href="../../polymer/polymer.html">
+ <link rel="import" href="../../test-fixture/test-fixture.html">
+ <link rel="import" href="test-elements.html">
+</head>
+<body>
+ <test-fixture id="TrivialActiveState">
+ <template>
+ <test-button></test-button>
+ </template>
+ </test-fixture>
+
+ <test-fixture id="ToggleActiveState">
+ <template>
+ <test-button toggles></test-button>
+ </template>
+ </test-fixture>
+
+ <script>
+ suite('active-state', function() {
+ var activeTarget;
+
+ setup(function() {
+ activeTarget = fixture('TrivialActiveState');
+ });
+
+ suite('active state with toggles attribute', function() {
+ setup(function() {
+ activeTarget = fixture('ToggleActiveState');
+ });
+
+ suite('when clicked', function() {
+ test('is activated', function(done) {
+ MockInteractions.downAndUp(activeTarget, function() {
+ try {
+ expect(activeTarget.hasAttribute('active')).to.be.eql(true);
+ done();
+ } catch (e) {
+ done(e);
+ }
+ });
+ });
+
+ test('is deactivated by a subsequent click', function(done) {
+ MockInteractions.downAndUp(activeTarget, function() {
+ MockInteractions.downAndUp(activeTarget, function() {
+ try {
+ expect(activeTarget.hasAttribute('active')).to.be.eql(false);
+ done();
+ } catch (e) {
+ done(e);
+ }
+ });
+ });
+ });
+ });
+ });
+
+ suite('without toggles attribute', function() {
+ suite('when mouse is down', function() {
+ test('does not get an active attribute', function() {
+ expect(activeTarget.hasAttribute('active')).to.be.eql(false);
+ MockInteractions.down(activeTarget);
+ expect(activeTarget.hasAttribute('active')).to.be.eql(false);
+ });
+ });
+
+ suite('when mouse is up', function() {
+ test('does not get an active attribute', function() {
+ MockInteractions.down(activeTarget);
+ expect(activeTarget.hasAttribute('active')).to.be.eql(false);
+ MockInteractions.up(activeTarget);
+ expect(activeTarget.hasAttribute('active')).to.be.eql(false);
+ });
+ });
+ });
+
+ suite('when space is pressed', function() {
+ test('triggers a click event', function(done) {
+ activeTarget.addEventListener('click', function() {
+ done();
+ });
+ MockInteractions.pressSpace(activeTarget);
+ });
+
+ test('only triggers click after the key is released', function(done) {
+ var keyupTriggered = false;
+
+ activeTarget.addEventListener('keyup', function() {
+ keyupTriggered = true;
+ });
+
+ activeTarget.addEventListener('click', function() {
+ try {
+ expect(keyupTriggered).to.be.eql(true);
+ done();
+ } catch (e) {
+ done(e);
+ }
+ });
+
+ MockInteractions.pressSpace(activeTarget);
+ });
+ });
+
+ suite('when enter is pressed', function() {
+ test('triggers a click event', function(done) {
+ activeTarget.addEventListener('click', function() {
+ done();
+ });
+
+ MockInteractions.pressEnter(activeTarget);
+ });
+
+ test('only triggers click before the key is released', function(done) {
+ var keyupTriggered = false;
+
+ activeTarget.addEventListener('keyup', function() {
+ keyupTriggered = true;
+ });
+
+ activeTarget.addEventListener('click', function() {
+ try {
+ expect(keyupTriggered).to.be.eql(false);
+ done();
+ } catch (e) {
+ done(e);
+ }
+ });
+
+ MockInteractions.pressEnter(activeTarget);
+ });
+ });
+ });
+ </script>
+</body>
+</html>
diff --git a/static/bower_components/iron-behaviors/test/disabled-state.html b/static/bower_components/iron-behaviors/test/disabled-state.html
new file mode 100644
index 0000000..af24ee2
--- /dev/null
+++ b/static/bower_components/iron-behaviors/test/disabled-state.html
@@ -0,0 +1,85 @@
+<!doctype html>
+<!--
+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
+-->
+<html>
+<head>
+ <title>disabled-state</title>
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
+
+ <link rel="import" href="../../polymer/polymer.html">
+ <link rel="import" href="../../test-fixture/test-fixture.html">
+ <link rel="import" href="test-elements.html">
+</head>
+<body>
+
+ <test-fixture id="TrivialDisabledState">
+ <template>
+ <test-control></test-control>
+ </template>
+ </test-fixture>
+
+ <test-fixture id="InitiallyDisabledState">
+ <template>
+ <test-control disabled></test-control>
+ </template>
+ </test-fixture>
+
+ <script>
+ suite('disabled-state', function() {
+ var disableTarget;
+
+ suite('a trivial disabled state', function() {
+ setup(function() {
+ disableTarget = fixture('TrivialDisabledState');
+ });
+
+ suite('when disabled is true', function() {
+ test('receives a disabled attribute', function() {
+ disableTarget.disabled = true;
+ expect(disableTarget.hasAttribute('disabled')).to.be.eql(true);
+ });
+
+ test('receives an appropriate aria attribute', function() {
+ disableTarget.disabled = true;
+ expect(disableTarget.getAttribute('aria-disabled')).to.be.eql('true');
+ });
+ });
+
+ suite('when disabled is false', function() {
+ test('loses the disabled attribute', function() {
+ disableTarget.disabled = true;
+ expect(disableTarget.hasAttribute('disabled')).to.be.eql(true);
+ disableTarget.disabled = false;
+ expect(disableTarget.hasAttribute('disabled')).to.be.eql(false);
+ });
+ });
+ });
+
+ suite('a state with an initially disabled target', function() {
+ setup(function() {
+ disableTarget = fixture('InitiallyDisabledState');
+ });
+
+ test('preserves the disabled attribute on target', function() {
+ expect(disableTarget.hasAttribute('disabled')).to.be.eql(true);
+ expect(disableTarget.disabled).to.be.eql(true);
+ });
+
+ test('adds `aria-disabled` to the target', function() {
+ expect(disableTarget.getAttribute('aria-disabled')).to.be.eql('true');
+ });
+ });
+ });
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/iron-behaviors/test/focused-state.html b/static/bower_components/iron-behaviors/test/focused-state.html
new file mode 100644
index 0000000..2d3af69
--- /dev/null
+++ b/static/bower_components/iron-behaviors/test/focused-state.html
@@ -0,0 +1,120 @@
+<!doctype html>
+<!--
+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
+-->
+<html>
+<head>
+ <title>focused-state</title>
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
+ <script src="../../iron-test-helpers/mock-interactions.js"></script>
+
+ <link rel="import" href="../../polymer/polymer.html">
+ <link rel="import" href="../../test-fixture/test-fixture.html">
+ <link rel="import" href="test-elements.html">
+</head>
+<body>
+
+ <test-fixture id="TrivialFocusedState">
+ <template>
+ <test-control tabindex="-1"></test-control>
+ </template>
+ </test-fixture>
+
+ <test-fixture id="NestedFocusedState">
+ <template>
+ <nested-focusable></nested-focusable>
+ </template>
+ </test-fixture>
+
+ <script>
+ suite('focused-state', function() {
+ var focusTarget;
+
+ setup(function() {
+ focusTarget = fixture('TrivialFocusedState');
+ });
+
+ suite('when is focused', function() {
+ test('receives a focused attribute', function() {
+ expect(focusTarget.hasAttribute('focused')).to.be.eql(false);
+ MockInteractions.focus(focusTarget);
+ expect(focusTarget.hasAttribute('focused')).to.be.eql(true);
+ });
+
+ test('focused property is true', function() {
+ expect(focusTarget.focused).to.not.be.eql(true);
+ MockInteractions.focus(focusTarget);
+ expect(focusTarget.focused).to.be.eql(true);
+ });
+ });
+
+ suite('when is blurred', function() {
+ test('loses the focused attribute', function() {
+ MockInteractions.focus(focusTarget);
+ expect(focusTarget.hasAttribute('focused')).to.be.eql(true);
+ MockInteractions.blur(focusTarget);
+ expect(focusTarget.hasAttribute('focused')).to.be.eql(false);
+ });
+
+ test('focused property is false', function() {
+ MockInteractions.focus(focusTarget);
+ expect(focusTarget.focused).to.be.eql(true);
+ MockInteractions.blur(focusTarget);
+ expect(focusTarget.focused).to.be.eql(false);
+ });
+ });
+
+ suite('when the focused state is disabled', function() {
+ setup(function() {
+ focusTarget.disabled = true;
+ });
+
+ test('will not be focusable', function() {
+ expect(focusTarget.getAttribute('tabindex')).to.be.eql('-1');
+ });
+ });
+ });
+
+ suite('nested focusable', function() {
+ var focusable;
+
+ setup(function() {
+ focusable = fixture('NestedFocusedState');
+ });
+
+ test('focus/blur events fired on host element', function(done) {
+ var nFocusEvents = 0;
+ var nBlurEvents = 0;
+ focusable.addEventListener('focus', function() {
+ nFocusEvents += 1;
+ // setTimeout to wait for potentially more, erroneous events
+ setTimeout(function() {
+ assert.equal(nFocusEvents, 1, 'one focus event fired');
+ MockInteractions.blur(focusable.$.input);
+ });
+ });
+ focusable.addEventListener('blur', function() {
+ nBlurEvents += 1;
+ // setTimeout to wait for potentially more, erroneous events
+ setTimeout(function() {
+ assert.equal(nBlurEvents, 1, 'one blur event fired');
+ done();
+ });
+ });
+ MockInteractions.focus(focusable.$.input);
+ });
+
+ });
+
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/iron-behaviors/test/index.html b/static/bower_components/iron-behaviors/test/index.html
new file mode 100644
index 0000000..0eef4d6
--- /dev/null
+++ b/static/bower_components/iron-behaviors/test/index.html
@@ -0,0 +1,25 @@
+<!doctype html>
+<!--
+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
+-->
+<html>
+<head>
+ <meta charset="utf-8">
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+</head>
+<body>
+ <script>
+ WCT.loadSuites([
+ 'focused-state.html',
+ 'active-state.html',
+ 'disabled-state.html'
+ ]);
+ </script>
+</body>
+</html>
diff --git a/static/bower_components/iron-behaviors/test/test-elements.html b/static/bower_components/iron-behaviors/test/test-elements.html
new file mode 100644
index 0000000..43bd8e5
--- /dev/null
+++ b/static/bower_components/iron-behaviors/test/test-elements.html
@@ -0,0 +1,66 @@
+<!--
+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-control-state.html">
+<link rel="import" href="../iron-button-state.html">
+
+<script>
+
+ Polymer({
+
+ is: 'test-control',
+
+ behaviors: [
+ Polymer.IronControlState
+ ]
+
+ });
+
+</script>
+
+<script>
+
+ Polymer({
+
+ is: 'test-button',
+
+ behaviors: [
+ Polymer.IronControlState,
+ Polymer.IronButtonState
+ ],
+
+ _buttonStateChanged: function() {
+
+ }
+
+ });
+
+</script>
+
+<dom-module id="nested-focusable">
+
+ <template>
+ <input id="input">
+ </template>
+
+</dom-module>
+
+<script>
+
+ Polymer({
+
+ is: 'nested-focusable',
+
+ behaviors: [
+ Polymer.IronControlState
+ ]
+
+ });
+
+</script>
diff --git a/static/bower_components/iron-flex-layout/.bower.json b/static/bower_components/iron-flex-layout/.bower.json
new file mode 100644
index 0000000..cfb5824
--- /dev/null
+++ b/static/bower_components/iron-flex-layout/.bower.json
@@ -0,0 +1,36 @@
+{
+ "name": "iron-flex-layout",
+ "version": "1.0.2",
+ "description": "Provide flexbox-based layouts",
+ "keywords": [
+ "web-components",
+ "polymer",
+ "layout"
+ ],
+ "private": true,
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/iron-flex-layout.git"
+ },
+ "dependencies": {
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "paper-styles": "polymerelements/paper-styles#^1.0.0",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ },
+ "homepage": "https://github.com/polymerelements/iron-flex-layout",
+ "_release": "1.0.2",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.0.2",
+ "commit": "50bcecf40ab23caa7c2cd90030555e00c5ba7154"
+ },
+ "_source": "git://github.com/polymerelements/iron-flex-layout.git",
+ "_target": "^1.0.0",
+ "_originalSource": "polymerelements/iron-flex-layout"
+} \ No newline at end of file
diff --git a/static/bower_components/iron-flex-layout/.gitignore b/static/bower_components/iron-flex-layout/.gitignore
new file mode 100644
index 0000000..1eb1fa5
--- /dev/null
+++ b/static/bower_components/iron-flex-layout/.gitignore
@@ -0,0 +1,2 @@
+bower_components
+
diff --git a/static/bower_components/iron-flex-layout/README.md b/static/bower_components/iron-flex-layout/README.md
new file mode 100644
index 0000000..895ed0f
--- /dev/null
+++ b/static/bower_components/iron-flex-layout/README.md
@@ -0,0 +1,4 @@
+iron-flex-layout
+================
+
+Layout styles for the iron elements.
diff --git a/static/bower_components/iron-flex-layout/bower.json b/static/bower_components/iron-flex-layout/bower.json
new file mode 100644
index 0000000..202fbe0
--- /dev/null
+++ b/static/bower_components/iron-flex-layout/bower.json
@@ -0,0 +1,26 @@
+{
+ "name": "iron-flex-layout",
+ "version": "1.0.2",
+ "description": "Provide flexbox-based layouts",
+ "keywords": [
+ "web-components",
+ "polymer",
+ "layout"
+ ],
+ "private": true,
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/iron-flex-layout.git"
+ },
+ "dependencies": {
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "paper-styles": "polymerelements/paper-styles#^1.0.0",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ }
+}
diff --git a/static/bower_components/iron-flex-layout/classes/iron-flex-layout.html b/static/bower_components/iron-flex-layout/classes/iron-flex-layout.html
new file mode 100644
index 0000000..283c2a8
--- /dev/null
+++ b/static/bower_components/iron-flex-layout/classes/iron-flex-layout.html
@@ -0,0 +1,307 @@
+<!--
+@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">
+
+<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.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/static/bower_components/iron-flex-layout/classes/iron-shadow-flex-layout.html b/static/bower_components/iron-flex-layout/classes/iron-shadow-flex-layout.html
new file mode 100644
index 0000000..c42067a
--- /dev/null
+++ b/static/bower_components/iron-flex-layout/classes/iron-shadow-flex-layout.html
@@ -0,0 +1,302 @@
+<!--
+@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
+-->
+<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.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;
+ botttom: 0;
+ }
+
+ html /deep/ .fixed-bottom {
+ right: 0;
+ bottom: 0;
+ left: 0;
+ }
+
+ html /deep/ .fixed-left {
+ top: 0;
+ botttom: 0;
+ left: 0;
+ }
+
+</style>
diff --git a/static/bower_components/iron-flex-layout/demo/index.html b/static/bower_components/iron-flex-layout/demo/index.html
new file mode 100644
index 0000000..ea4df38
--- /dev/null
+++ b/static/bower_components/iron-flex-layout/demo/index.html
@@ -0,0 +1,42 @@
+<!doctype html>
+<!--
+@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
+The complete set of authors may be found at http://polymer.github.io/AUTHORS
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
+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
+-->
+
+<html>
+<head>
+
+ <title>iron-flex-layout</title>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+
+ <link rel="import" href="../../paper-styles/paper-styles.html">
+ <link rel="import" href="x-app.html">
+
+ <style>
+
+ html, body, x-app {
+ height: 100%;
+ }
+
+ body {
+ margin: 0;
+ }
+
+ </style>
+
+</head>
+<body class="fullbleed">
+
+ <x-app></x-app>
+
+</body>
+</html>
diff --git a/static/bower_components/iron-flex-layout/demo/x-app.html b/static/bower_components/iron-flex-layout/demo/x-app.html
new file mode 100644
index 0000000..489a5f5
--- /dev/null
+++ b/static/bower_components/iron-flex-layout/demo/x-app.html
@@ -0,0 +1,118 @@
+<!--
+@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
+The complete set of authors may be found at http://polymer.github.io/AUTHORS
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
+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
+-->
+
+<link rel="import" href="../iron-flex-layout.html">
+
+<dom-module id="x-app">
+
+ <style>
+
+ :host {
+ @apply(--layout-horizontal);
+ @apply(--paper-font-body2);
+ }
+
+ [nav] {
+ @apply(--layout-vertical);
+
+ width: 200px;
+ background-color: var(--paper-grey-300);
+ }
+
+ [item] {
+ @apply(--layout-horizontal);
+ @apply(--layout-center);
+
+ height: 60px;
+ padding-left: 16px;
+ border-bottom: 1px solid var(--paper-grey-400);
+ }
+
+ [main] {
+ @apply(--layout-flex);
+ @apply(--layout-vertical);
+ }
+
+ [header] {
+ @apply(--layout-horizontal);
+ @apply(--layout-center);
+
+ @apply(--paper-font-subhead);
+
+ height: 60px;
+ background-color: var(--google-blue-700);
+ padding: 0 16px;
+ color: white;
+ }
+
+ [tool] {
+ @apply(--layout-inline);
+ }
+
+ [content] {
+ @apply(--layout-flex);
+
+ overflow: auto;
+ padding: 0 10px;
+ }
+
+ [card] {
+ @apply(--layout-vertical);
+ @apply(--layout-center-center);
+
+ @apply(--shadow-elevation-2dp);
+
+ height: 300px;
+ max-width: 800px;
+ margin: 16px auto;
+ font-weight: bold;
+ background-color: var(--paper-grey-200);
+ }
+
+ </style>
+
+ <template>
+
+ <div nav>
+ <div content>
+ <div item>ITEM 1</div>
+ <div item>ITEM 2</div>
+ <div item>ITEM 3</div>
+ <div item>ITEM 4</div>
+ <div item>ITEM 5</div>
+ </div>
+ </div>
+
+ <div main>
+ <div header>
+ <div tool>Foo</div>
+ <div class="flex"></div>
+ <div tool>Bar</div>
+ </div>
+ <div content>
+ <div card>CARD 1</div>
+ <div card>CARD 2</div>
+ <div card>CARD 3</div>
+ <div card>CARD 4</div>
+ <div card>CARD 5</div>
+ </div>
+ </div>
+
+ </template>
+
+</dom-module>
+<script>
+
+ Polymer({
+ is: 'x-app'
+ });
+
+</script>
+
diff --git a/static/bower_components/iron-flex-layout/iron-flex-layout.html b/static/bower_components/iron-flex-layout/iron-flex-layout.html
new file mode 100644
index 0000000..ed9cd7b
--- /dev/null
+++ b/static/bower_components/iron-flex-layout/iron-flex-layout.html
@@ -0,0 +1,313 @@
+<!--
+@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="../polymer/polymer.html">
+
+<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); */
+ display: -ms-flexbox;
+ display: -webkit-flex;
+ display: flex;
+
+ -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: {
+ /* @apply(--layout); */
+ display: -ms-flexbox;
+ display: -webkit-flex;
+ display: flex;
+
+ -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-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;
+ };
+
+ /* 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: 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;
+ };
+
+ --layout-center-center: {
+ /* @apply(--layout-center --layout-center-justified); */
+ -ms-flex-align: center;
+ -webkit-align-items: center;
+ align-items: center;
+ -ms-flex-pack: center;
+ -webkit-justify-content: center;
+ justify-content: center;
+ };
+
+ /* 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;
+ };
+
+ /*******************************
+ 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;
+ };
+
+ /* fixed position */
+
+ --layout-fixed-bottom:,
+ --layout-fixed-left:,
+ --layout-fixed-right:,
+ --layout-fixed-top: {
+ position: fixed;
+ };
+
+ --layout-fixed-top: {
+ top: 0;
+ left: 0;
+ right: 0;
+ };
+
+ --layout-fixed-right: {
+ top: 0;
+ right: 0;
+ bottom: 0;
+ };
+
+ --layout-fixed-bottom: {
+ right: 0;
+ bottom: 0;
+ left: 0;
+ };
+
+ --layout-fixed-left: {
+ top: 0;
+ bottom: 0;
+ left: 0;
+ };
+
+ }
+
+</style>
diff --git a/static/bower_components/iron-icon/.bower.json b/static/bower_components/iron-icon/.bower.json
new file mode 100644
index 0000000..8ce0fb3
--- /dev/null
+++ b/static/bower_components/iron-icon/.bower.json
@@ -0,0 +1,43 @@
+{
+ "name": "iron-icon",
+ "private": true,
+ "version": "1.0.2",
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "description": "An element that supports displaying an icon",
+ "main": "iron-icon.html",
+ "author": [
+ "The Polymer Authors"
+ ],
+ "keywords": [
+ "web-components",
+ "polymer",
+ "icon"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/iron-icon.git"
+ },
+ "dependencies": {
+ "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0",
+ "iron-meta": "polymerelements/iron-meta#^1.0.0",
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "test-fixture": "polymerelements/test-fixture#^1.0.0",
+ "iron-iconset": "polymerelements/iron-iconset#^1.0.0",
+ "iron-icons": "polymerelements/iron-icons#^1.0.0",
+ "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ },
+ "homepage": "https://github.com/polymerelements/iron-icon",
+ "_release": "1.0.2",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.0.2",
+ "commit": "f9246c47ecb1c682f0fb9ea48255d5f7debd1e03"
+ },
+ "_source": "git://github.com/polymerelements/iron-icon.git",
+ "_target": "^1.0.0",
+ "_originalSource": "polymerelements/iron-icon"
+} \ No newline at end of file
diff --git a/static/bower_components/iron-icon/.gitignore b/static/bower_components/iron-icon/.gitignore
new file mode 100644
index 0000000..8d4ae25
--- /dev/null
+++ b/static/bower_components/iron-icon/.gitignore
@@ -0,0 +1 @@
+bower_components
diff --git a/static/bower_components/iron-icon/README.md b/static/bower_components/iron-icon/README.md
new file mode 100644
index 0000000..27b65c0
--- /dev/null
+++ b/static/bower_components/iron-icon/README.md
@@ -0,0 +1,56 @@
+iron-icon
+=========
+
+The `iron-icon` element displays an icon. By default an icon renders as a 24px square.
+
+Example using src:
+
+```html
+<iron-icon src="star.png"></iron-icon>
+```
+
+Example setting size to 32px x 32px:
+
+```html
+<iron-icon class="big" src="big_star.png"></iron-icon>
+
+<style>
+ .big {
+ height: 32px;
+ width: 32px;
+ }
+</style>
+```
+
+The iron elements include several sets of icons.
+To use the default set of icons, import `iron-icons.html` and use the `icon` attribute to specify an icon:
+
+```html
+<!-- import default iconset and iron-icon -->
+<link rel="import" href="/components/iron-icons/iron-icons.html">
+
+<iron-icon icon="menu"></iron-icon>
+```
+
+To use a different built-in set of icons, import `iron-icons/<iconset>-icons.html`, and
+specify the icon as `<iconset>:<icon>`. For example:
+
+```html
+<!-- import communication iconset and iron-icon -->
+<link rel="import" href="/components/iron-icons/communication-icons.html">
+
+<iron-icon icon="communication:email"></iron-icon>
+```
+
+You can also create custom icon sets of bitmap or SVG icons.
+
+Example of using an icon named `cherry` from a custom iconset with the ID `fruit`:
+
+```html
+<iron-icon icon="fruit:cherry"></iron-icon>
+```
+
+See [iron-iconset](#iron-iconset) and [iron-iconset-svg](#iron-iconset-svg) for more information about
+how to create a custom iconset.
+
+See [iron-icons](http://www.polymer-project.org/components/iron-icons/demo.html) for the default set of icons.
diff --git a/static/bower_components/iron-icon/bower.json b/static/bower_components/iron-icon/bower.json
new file mode 100644
index 0000000..9361b56
--- /dev/null
+++ b/static/bower_components/iron-icon/bower.json
@@ -0,0 +1,33 @@
+{
+ "name": "iron-icon",
+ "private": true,
+ "version": "1.0.2",
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "description": "An element that supports displaying an icon",
+ "main": "iron-icon.html",
+ "author": [
+ "The Polymer Authors"
+ ],
+ "keywords": [
+ "web-components",
+ "polymer",
+ "icon"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/iron-icon.git"
+ },
+ "dependencies": {
+ "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0",
+ "iron-meta": "polymerelements/iron-meta#^1.0.0",
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "test-fixture": "polymerelements/test-fixture#^1.0.0",
+ "iron-iconset": "polymerelements/iron-iconset#^1.0.0",
+ "iron-icons": "polymerelements/iron-icons#^1.0.0",
+ "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ }
+}
diff --git a/static/bower_components/iron-icon/demo/index.html b/static/bower_components/iron-icon/demo/index.html
new file mode 100644
index 0000000..ff71239
--- /dev/null
+++ b/static/bower_components/iron-icon/demo/index.html
@@ -0,0 +1,48 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+ <title>iron-icon demo</title>
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <link rel="import" href="../iron-icon.html">
+ <link rel="import" href="../../iron-iconset/iron-iconset.html">
+ <link href="../../paper-styles/demo-pages.html" rel="import">
+
+ <style is="custom-style">
+ .vertical-section h4 {
+ border-left: 3px solid var(--paper-grey-300);
+ padding-left: 10px;
+ }
+
+ .vertical-section h4:hover {
+ border-left-color: var(--google-blue-700);
+ }
+ </style>
+</head>
+<body>
+ <div class="vertical-section-container centered">
+ <h4>This demo is for a single &lt;iron-icon&gt;. If you're looking for the
+ whole set of available icons, check out the &lt;iron-icons&gt; demo.</h4>
+
+ <div class="vertical-section">
+ <!-- iron-icon using a iron-iconset as its icon source -->
+ <iron-iconset name="example" icons="location" src="location.png" size="24" width="24"></iron-iconset>
+
+ <h4>&lt;iron-icon icon="example:location"&gt;</h4>
+ <iron-icon icon="example:location"></iron-icon>
+
+ <!-- iron-icon using an image url as its icon source -->
+ <h4>&lt;iron-icon src="location.png"&gt;</h4>
+ <iron-icon src="location.png"></iron-icon>
+ </div>
+ </div>
+</body>
+</html>
diff --git a/static/bower_components/iron-icon/demo/location.png b/static/bower_components/iron-icon/demo/location.png
new file mode 100644
index 0000000..9bb7423
--- /dev/null
+++ b/static/bower_components/iron-icon/demo/location.png
Binary files differ
diff --git a/static/bower_components/iron-icon/hero.svg b/static/bower_components/iron-icon/hero.svg
new file mode 100644
index 0000000..19f01c2
--- /dev/null
+++ b/static/bower_components/iron-icon/hero.svg
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
+<g id="background" display="none">
+ <rect display="inline" fill="#B0BEC5" width="225" height="126"/>
+</g>
+<g id="label">
+</g>
+<g id="art">
+ <circle cx="112" cy="61" r="8"/>
+ <path d="M129,78H95V44h34V78z M97,76h30V46H97V76z"/>
+ <g id="ic_x5F_add_x0D_">
+ </g>
+</g>
+<g id="Guides">
+</g>
+</svg>
diff --git a/static/bower_components/iron-icon/index.html b/static/bower_components/iron-icon/index.html
new file mode 100644
index 0000000..e871f17
--- /dev/null
+++ b/static/bower_components/iron-icon/index.html
@@ -0,0 +1,26 @@
+<!doctype html>
+<!--
+@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
+The complete set of authors may be found at http://polymer.github.io/AUTHORS
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
+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
+-->
+<html>
+<head>
+
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+ <script src="../webcomponentsjs/webcomponents-lite.js"></script>
+ <link rel="import" href="../iron-component-page/iron-component-page.html">
+
+</head>
+<body>
+
+ <iron-component-page></iron-component-page>
+
+</body>
+</html>
diff --git a/static/bower_components/iron-icon/iron-icon.html b/static/bower_components/iron-icon/iron-icon.html
new file mode 100644
index 0000000..bdb55c7
--- /dev/null
+++ b/static/bower_components/iron-icon/iron-icon.html
@@ -0,0 +1,179 @@
+<!--
+@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="../polymer/polymer.html">
+<link rel="import" href="../iron-meta/iron-meta.html">
+<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
+
+<!--
+
+The `iron-icon` element displays an icon. By default an icon renders as a 24px square.
+
+Example using src:
+
+ <iron-icon src="star.png"></iron-icon>
+
+Example setting size to 32px x 32px:
+
+ <iron-icon class="big" src="big_star.png"></iron-icon>
+
+ <style is="custom-style">
+ .big {
+ --iron-icon-height: 32px;
+ --iron-icon-width: 32px;
+ }
+ </style>
+
+The iron elements include several sets of icons.
+To use the default set of icons, import `iron-icons.html` and use the `icon` attribute to specify an icon:
+
+ &lt;!-- import default iconset and iron-icon --&gt;
+ <link rel="import" href="/components/iron-icons/iron-icons.html">
+
+ <iron-icon icon="menu"></iron-icon>
+
+To use a different built-in set of icons, import `iron-icons/<iconset>-icons.html`, and
+specify the icon as `<iconset>:<icon>`. For example:
+
+ &lt;!-- import communication iconset and iron-icon --&gt;
+ <link rel="import" href="/components/iron-icons/communication-icons.html">
+
+ <iron-icon icon="communication:email"></iron-icon>
+
+You can also create custom icon sets of bitmap or SVG icons.
+
+Example of using an icon named `cherry` from a custom iconset with the ID `fruit`:
+
+ <iron-icon icon="fruit:cherry"></iron-icon>
+
+See [iron-iconset](#iron-iconset) and [iron-iconset-svg](#iron-iconset-svg) for more information about
+how to create a custom iconset.
+
+See [iron-icons](https://elements.polymer-project.org/elements/iron-icons?view=demo:demo/index.html) for the default set of icons.
+
+
+### Styling
+
+The following custom properties are available for styling:
+
+Custom property | Description | Default
+----------------|-------------|----------
+`--iron-icon-width` | Width of the icon | `24px`
+`--iron-icon-height` | Height of the icon | `24px`
+
+@group Iron Elements
+@element iron-icon
+@demo demo/index.html
+@hero hero.svg
+@homepage polymer.github.io
+-->
+
+<dom-module id="iron-icon">
+
+ <style>
+ :host {
+ @apply(--layout-inline);
+ @apply(--layout-center-center);
+ position: relative;
+
+ vertical-align: middle;
+
+ fill: currentcolor;
+
+ width: var(--iron-icon-width, 24px);
+ height: var(--iron-icon-height, 24px);
+ }
+ </style>
+
+ <template>
+ <iron-meta id="meta" type="iconset"></iron-meta>
+ </template>
+
+ <script>
+
+ Polymer({
+
+ is: 'iron-icon',
+
+ properties: {
+
+ /**
+ * The name of the icon to use. The name should be of the form:
+ * `iconset_name:icon_name`.
+ */
+ icon: {
+ type: String,
+ observer: '_iconChanged'
+ },
+
+ /**
+ * The name of the theme to used, if one is specified by the
+ * iconset.
+ */
+ theme: {
+ type: String,
+ observer: '_updateIcon'
+ },
+
+ /**
+ * If using iron-icon without an iconset, you can set the src to be
+ * the URL of an individual icon image file. Note that this will take
+ * precedence over a given icon attribute.
+ */
+ src: {
+ type: String,
+ observer: '_srcChanged'
+ }
+ },
+
+ _DEFAULT_ICONSET: 'icons',
+
+ _iconChanged: function(icon) {
+ var parts = (icon || '').split(':');
+ this._iconName = parts.pop();
+ this._iconsetName = parts.pop() || this._DEFAULT_ICONSET;
+ this._updateIcon();
+ },
+
+ _srcChanged: function(src) {
+ this._updateIcon();
+ },
+
+ _usesIconset: function() {
+ return this.icon || !this.src;
+ },
+
+ _updateIcon: function() {
+ if (this._usesIconset()) {
+ if (this._iconsetName) {
+ this._iconset = this.$.meta.byKey(this._iconsetName);
+ if (this._iconset) {
+ this._iconset.applyIcon(this, this._iconName, this.theme);
+ } else {
+ this._warn(this._logf('_updateIcon', 'could not find iconset `'
+ + this._iconsetName + '`, did you import the iconset?'));
+ }
+ }
+ } else {
+ if (!this._img) {
+ this._img = document.createElement('img');
+ this._img.style.width = '100%';
+ this._img.style.height = '100%';
+ }
+ this._img.src = this.src;
+ Polymer.dom(this.root).appendChild(this._img);
+ }
+ }
+
+ });
+
+ </script>
+
+</dom-module>
diff --git a/static/bower_components/iron-icon/test/index.html b/static/bower_components/iron-icon/test/index.html
new file mode 100644
index 0000000..0a56bb7
--- /dev/null
+++ b/static/bower_components/iron-icon/test/index.html
@@ -0,0 +1,31 @@
+<!doctype html>
+<!--
+@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
+-->
+
+<html>
+<head>
+
+ <meta charset="utf-8">
+ <title>Tests</title>
+ <script src="../../web-component-tester/browser.js"></script>
+
+</head>
+<body>
+
+ <script>
+
+ WCT.loadSuites([
+ 'iron-icon.html'
+ ]);
+
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/iron-icon/test/iron-icon.html b/static/bower_components/iron-icon/test/iron-icon.html
new file mode 100644
index 0000000..3b8202f
--- /dev/null
+++ b/static/bower_components/iron-icon/test/iron-icon.html
@@ -0,0 +1,120 @@
+<!doctype html>
+<!--
+@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
+-->
+
+<html>
+<head>
+
+ <title>iron-icon</title>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
+
+ <link rel="import" href="../iron-icon.html">
+ <link rel="import" href="../../iron-iconset/iron-iconset.html">
+ <link rel="import" href="../../test-fixture/test-fixture.html">
+
+</head>
+<body>
+
+ <test-fixture id="TrivialIcon">
+ <template>
+ <iron-icon src="../demo/location.png"></iron-icon>
+ </template>
+ </test-fixture>
+
+ <test-fixture id="IconFromIconset">
+ <template>
+ <iron-iconset name="example" icons="location blank" src="location.png" size="24" width="48"></iron-iconset>
+ <iron-icon icon="example:location"></iron-icon>
+ </template>
+ </test-fixture>
+
+ <test-fixture id="WithoutAnIconSource">
+ <template>
+ <iron-icon icon=""></iron-icon>
+ <iron-icon></iron-icon>
+ <iron-icon src=""></iron-icon>
+ </template>
+ </test-fixture>
+
+ <script>
+function iconElementFor (node) {
+ var nodes = Polymer.dom(node.root).childNodes;
+
+ for (var i = 0; i < nodes.length; ++i) {
+ if (nodes[i].nodeName.match(/DIV|IMG/)) {
+ return nodes[i];
+ }
+ }
+}
+
+function hasIcon (node) {
+ return /png/.test(node.style.backgroundImage);
+}
+
+suite('<iron-icon>', function() {
+ suite('basic behavior', function() {
+ var icon;
+
+ setup(function() {
+ icon = fixture('TrivialIcon');
+ });
+
+ test('can be assigned an icon with the src attribute', function() {
+ expect(iconElementFor(icon)).to.be.ok;
+ expect(iconElementFor(icon).src).to.match(/demo\/location\.png/);
+ });
+
+ test('can change its src dynamically', function() {
+ icon.src = 'foo.png';
+
+ expect(iconElementFor(icon).src).to.match(/foo\.png/);
+ });
+ });
+
+ suite('when paired with an iconset', function() {
+ var icon;
+
+ setup(function() {
+ var elements = fixture('IconFromIconset');
+
+ icon = elements[1];
+ });
+
+ test('can be assigned an icon from the iconset', function() {
+ expect(hasIcon(icon)).to.be.ok;
+ });
+
+ test('can change its icon dynamically', function() {
+ var style = icon.style;
+
+ expect(style.backgroundPosition).to.match(/0(%|px) 0(%|px)/);
+
+ icon.icon = "example:blank";
+
+ expect(style.backgroundPosition).to.match(/-24px 0(%|px)/);
+ });
+ });
+
+ suite('when no icon source is provided', function() {
+ test('will politely wait for an icon source without throwing', function() {
+ document.createElement('iron-icon');
+ fixture('WithoutAnIconSource');
+ });
+ })
+});
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/iron-icons/.bower.json b/static/bower_components/iron-icons/.bower.json
new file mode 100644
index 0000000..93ce65e
--- /dev/null
+++ b/static/bower_components/iron-icons/.bower.json
@@ -0,0 +1,46 @@
+{
+ "name": "iron-icons",
+ "version": "1.0.3",
+ "description": "A set of icons for use with iron-icon",
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "keywords": [
+ "web-components",
+ "polymer",
+ "icon"
+ ],
+ "main": "iron-icons.html",
+ "private": true,
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/iron-icons"
+ },
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "homepage": "https://github.com/PolymerElements/paper-icons",
+ "dependencies": {
+ "iron-icon": "polymerelements/iron-icon#^1.0.0",
+ "iron-iconset-svg": "polymerelements/iron-iconset-svg#^1.0.0",
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "paper-styles": "polymerelements/paper-styles#^1.0.2",
+ "iron-component-page": "polymerelements/iron-component-page#1.0.0",
+ "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0",
+ "iron-meta": "polymerelements/iron-meta#^1.0.0",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ },
+ "ignore": [
+ "util",
+ "update-icons.sh"
+ ],
+ "_release": "1.0.3",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.0.3",
+ "commit": "036325be99c33c052ac807a705aacad70be1127f"
+ },
+ "_source": "git://github.com/PolymerElements/iron-icons.git",
+ "_target": "^1.0.0",
+ "_originalSource": "PolymerElements/iron-icons"
+} \ No newline at end of file
diff --git a/static/bower_components/iron-icons/.gitignore b/static/bower_components/iron-icons/.gitignore
new file mode 100644
index 0000000..bb1944e
--- /dev/null
+++ b/static/bower_components/iron-icons/.gitignore
@@ -0,0 +1,3 @@
+util/node_modules
+material-design-icons
+bower_components
diff --git a/static/bower_components/iron-icons/README.md b/static/bower_components/iron-icons/README.md
new file mode 100644
index 0000000..5502532
--- /dev/null
+++ b/static/bower_components/iron-icons/README.md
@@ -0,0 +1,6 @@
+iron-icons
+=========
+
+## Building
+Running `update-icons.sh` will checkout [material-design-icons](https://github.com/google/material-design-icons), reduce
+the fileset to 24px svgs, and compile the iconsets.
diff --git a/static/bower_components/iron-icons/av-icons.html b/static/bower_components/iron-icons/av-icons.html
new file mode 100644
index 0000000..0d6ff37
--- /dev/null
+++ b/static/bower_components/iron-icons/av-icons.html
@@ -0,0 +1,73 @@
+<!--
+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="../iron-icon/iron-icon.html">
+<link rel="import" href="../iron-iconset-svg/iron-iconset-svg.html">
+<iron-iconset-svg name="av" size="24">
+<svg><defs>
+<g id="airplay"><defs><path id="a" d="M0 0h24v24H0V0z"/></defs><defs><path id="c" d="M0 0h24v24H0V0z"/></defs><clipPath id="b"><use xlink:href="#a" overflow="visible"/></clipPath><clipPath id="d" clip-path="url(#b)"><use xlink:href="#c" overflow="visible"/></clipPath><path d="M6 22h12l-6-6zM21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h4v-2H3V5h18v12h-4v2h4c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" clip-path="url(#d)"/></g>
+<g id="album"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 14.5c-2.49 0-4.5-2.01-4.5-4.5S9.51 7.5 12 7.5s4.5 2.01 4.5 4.5-2.01 4.5-4.5 4.5zm0-5.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1z"/></g>
+<g id="av-timer"><path d="M11 17c0 .55.45 1 1 1s1-.45 1-1-.45-1-1-1-1 .45-1 1zm0-14v4h2V5.08c3.39.49 6 3.39 6 6.92 0 3.87-3.13 7-7 7s-7-3.13-7-7c0-1.68.59-3.22 1.58-4.42L12 13l1.41-1.41-6.8-6.8v.02C4.42 6.45 3 9.05 3 12c0 4.97 4.02 9 9 9 4.97 0 9-4.03 9-9s-4.03-9-9-9h-1zm7 9c0-.55-.45-1-1-1s-1 .45-1 1 .45 1 1 1 1-.45 1-1zM6 12c0 .55.45 1 1 1s1-.45 1-1-.45-1-1-1-1 .45-1 1z"/></g>
+<g id="closed-caption"><path d="M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 7H9.5v-.5h-2v3h2V13H11v1c0 .55-.45 1-1 1H7c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v1zm7 0h-1.5v-.5h-2v3h2V13H18v1c0 .55-.45 1-1 1h-3c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v1z"/></g>
+<g id="equalizer"><path d="M10 20h4V4h-4v16zm-6 0h4v-8H4v8zM16 9v11h4V9h-4z"/></g>
+<g id="explicit"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 6h-4v2h4v2h-4v2h4v2H9V7h6v2z"/></g>
+<g id="fast-forward"><path d="M4 18l8.5-6L4 6v12zm9-12v12l8.5-6L13 6z"/></g>
+<g id="fast-rewind"><path d="M11 18V6l-8.5 6 8.5 6zm.5-6l8.5 6V6l-8.5 6z"/></g>
+<g id="forward-10"><defs><path id="a" d="M24 24H0V0h24v24z"/></defs><clipPath id="b"><use xlink:href="#a" overflow="visible"/></clipPath><path d="M4 13c0 4.4 3.6 8 8 8s8-3.6 8-8h-2c0 3.3-2.7 6-6 6s-6-2.7-6-6 2.7-6 6-6v4l5-5-5-5v4c-4.4 0-8 3.6-8 8zm6.8 3H10v-3.3L9 13v-.7l1.8-.6h.1V16zm4.3-1.8c0 .3 0 .6-.1.8l-.3.6s-.3.3-.5.3-.4.1-.6.1-.4 0-.6-.1-.3-.2-.5-.3-.2-.3-.3-.6-.1-.5-.1-.8v-.7c0-.3 0-.6.1-.8l.3-.6s.3-.3.5-.3.4-.1.6-.1.4 0 .6.1.3.2.5.3.2.3.3.6.1.5.1.8v.7zm-.8-.8v-.5s-.1-.2-.1-.3-.1-.1-.2-.2-.2-.1-.3-.1-.2 0-.3.1l-.2.2s-.1.2-.1.3v2s.1.2.1.3.1.1.2.2.2.1.3.1.2 0 .3-.1l.2-.2s.1-.2.1-.3v-1.5z" clip-path="url(#b)"/></g>
+<g id="forward-30"><defs><path id="a" d="M24 24H0V0h24v24z"/></defs><clipPath id="b"><use xlink:href="#a" overflow="visible"/></clipPath><path d="M9.6 13.5h.4c.2 0 .4-.1.5-.2s.2-.2.2-.4v-.2s-.1-.1-.1-.2-.1-.1-.2-.1h-.5s-.1.1-.2.1-.1.1-.1.2v.2h-1c0-.2 0-.3.1-.5s.2-.3.3-.4.3-.2.4-.2.4-.1.5-.1c.2 0 .4 0 .6.1s.3.1.5.2.2.2.3.4.1.3.1.5v.3s-.1.2-.1.3-.1.2-.2.2-.2.1-.3.2c.2.1.4.2.5.4s.2.4.2.6c0 .2 0 .4-.1.5s-.2.3-.3.4-.3.2-.5.2-.4.1-.6.1c-.2 0-.4 0-.5-.1s-.3-.1-.5-.2-.2-.2-.3-.4-.1-.4-.1-.6h.8v.2s.1.1.1.2.1.1.2.1h.5s.1-.1.2-.1.1-.1.1-.2v-.5s-.1-.1-.1-.2-.1-.1-.2-.1h-.6v-.7zm5.7.7c0 .3 0 .6-.1.8l-.3.6s-.3.3-.5.3-.4.1-.6.1-.4 0-.6-.1-.3-.2-.5-.3-.2-.3-.3-.6-.1-.5-.1-.8v-.7c0-.3 0-.6.1-.8l.3-.6s.3-.3.5-.3.4-.1.6-.1.4 0 .6.1.3.2.5.3.2.3.3.6.1.5.1.8v.7zm-.9-.8v-.5s-.1-.2-.1-.3-.1-.1-.2-.2-.2-.1-.3-.1-.2 0-.3.1l-.2.2s-.1.2-.1.3v2s.1.2.1.3.1.1.2.2.2.1.3.1.2 0 .3-.1l.2-.2s.1-.2.1-.3v-1.5zM4 13c0 4.4 3.6 8 8 8s8-3.6 8-8h-2c0 3.3-2.7 6-6 6s-6-2.7-6-6 2.7-6 6-6v4l5-5-5-5v4c-4.4 0-8 3.6-8 8z" clip-path="url(#b)"/></g>
+<g id="forward-5"><defs><path id="a" d="M24 24H0V0h24v24z"/></defs><clipPath id="b"><use xlink:href="#a" overflow="visible"/></clipPath><path d="M4 13c0 4.4 3.6 8 8 8s8-3.6 8-8h-2c0 3.3-2.7 6-6 6s-6-2.7-6-6 2.7-6 6-6v4l5-5-5-5v4c-4.4 0-8 3.6-8 8zm6.7.9l.2-2.2h2.4v.7h-1.7l-.1.9s.1 0 .1-.1.1 0 .1-.1.1 0 .2 0h.2c.2 0 .4 0 .5.1s.3.2.4.3.2.3.3.5.1.4.1.6c0 .2 0 .4-.1.5s-.1.3-.3.5-.3.2-.5.3-.4.1-.6.1c-.2 0-.4 0-.5-.1s-.3-.1-.5-.2-.2-.2-.3-.4-.1-.3-.1-.5h.8c0 .2.1.3.2.4s.2.1.4.1c.1 0 .2 0 .3-.1l.2-.2s.1-.2.1-.3v-.6l-.1-.2-.2-.2s-.2-.1-.3-.1h-.2s-.1 0-.2.1-.1 0-.1.1-.1.1-.1.1h-.6z" clip-path="url(#b)"/></g>
+<g id="games"><path d="M15 7.5V2H9v5.5l3 3 3-3zM7.5 9H2v6h5.5l3-3-3-3zM9 16.5V22h6v-5.5l-3-3-3 3zM16.5 9l-3 3 3 3H22V9h-5.5z"/></g>
+<g id="hd"><path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z"/></g>
+<g id="hearing"><path d="M17 20c-.29 0-.56-.06-.76-.15-.71-.37-1.21-.88-1.71-2.38-.51-1.56-1.47-2.29-2.39-3-.79-.61-1.61-1.24-2.32-2.53C9.29 10.98 9 9.93 9 9c0-2.8 2.2-5 5-5s5 2.2 5 5h2c0-3.93-3.07-7-7-7S7 5.07 7 9c0 1.26.38 2.65 1.07 3.9.91 1.65 1.98 2.48 2.85 3.15.81.62 1.39 1.07 1.71 2.05.6 1.82 1.37 2.84 2.73 3.55.51.23 1.07.35 1.64.35 2.21 0 4-1.79 4-4h-2c0 1.1-.9 2-2 2zM7.64 2.64L6.22 1.22C4.23 3.21 3 5.96 3 9s1.23 5.79 3.22 7.78l1.41-1.41C6.01 13.74 5 11.49 5 9s1.01-4.74 2.64-6.36zM11.5 9c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5-1.12-2.5-2.5-2.5-2.5 1.12-2.5 2.5z"/></g>
+<g id="high-quality"><path d="M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 11H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm7-1c0 .55-.45 1-1 1h-.75v1.5h-1.5V15H14c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v4zm-3.5-.5h2v-3h-2v3z"/></g>
+<g id="library-add"><path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9h-4v4h-2v-4H9V9h4V5h2v4h4v2z"/></g>
+<g id="library-books"><path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9H9V9h10v2zm-4 4H9v-2h6v2zm4-8H9V5h10v2z"/></g>
+<g id="library-music"><path d="M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 5h-3v5.5c0 1.38-1.12 2.5-2.5 2.5S10 13.88 10 12.5s1.12-2.5 2.5-2.5c.57 0 1.08.19 1.5.51V5h4v2zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6z"/></g>
+<g id="loop"><path d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"/></g>
+<g id="mic"><path d="M12 14c1.66 0 2.99-1.34 2.99-3L15 5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3zm5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.48 6-3.3 6-6.72h-1.7z"/></g>
+<g id="mic-none"><path d="M12 14c1.66 0 2.99-1.34 2.99-3L15 5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3zm-1.2-9.1c0-.66.54-1.2 1.2-1.2.66 0 1.2.54 1.2 1.2l-.01 6.2c0 .66-.53 1.2-1.19 1.2-.66 0-1.2-.54-1.2-1.2V4.9zm6.5 6.1c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.48 6-3.3 6-6.72h-1.7z"/></g>
+<g id="mic-off"><path d="M19 11h-1.7c0 .74-.16 1.43-.43 2.05l1.23 1.23c.56-.98.9-2.09.9-3.28zm-4.02.17c0-.06.02-.11.02-.17V5c0-1.66-1.34-3-3-3S9 3.34 9 5v.18l5.98 5.99zM4.27 3L3 4.27l6.01 6.01V11c0 1.66 1.33 3 2.99 3 .22 0 .44-.03.65-.08l1.66 1.66c-.71.33-1.5.52-2.31.52-2.76 0-5.3-2.1-5.3-5.1H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c.91-.13 1.77-.45 2.54-.9L19.73 21 21 19.73 4.27 3z"/></g>
+<g id="movie"><path d="M18 4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4h-4z"/></g>
+<g id="new-releases"><path d="M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"/></g>
+<g id="not-interested"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z"/></g>
+<g id="pause"><path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z"/></g>
+<g id="pause-circle-filled"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 14H9V8h2v8zm4 0h-2V8h2v8z"/></g>
+<g id="pause-circle-outline"><path d="M9 16h2V8H9v8zm3-14C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm1-4h2V8h-2v8z"/></g>
+<g id="play-arrow"><path d="M8 5v14l11-7z"/></g>
+<g id="play-circle-filled"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 14.5v-9l6 4.5-6 4.5z"/></g>
+<g id="play-circle-outline"><path d="M10 16.5l6-4.5-6-4.5v9zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/></g>
+<g id="playlist-add"><path d="M14 10H2v2h12v-2zm0-4H2v2h12V6zm4 8v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zM2 16h8v-2H2v2z"/></g>
+<g id="queue"><path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9h-4v4h-2v-4H9V9h4V5h2v4h4v2z"/></g>
+<g id="queue-music"><path d="M15 6H3v2h12V6zm0 4H3v2h12v-2zM3 16h8v-2H3v2zM17 6v8.18c-.31-.11-.65-.18-1-.18-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3V8h3V6h-5z"/></g>
+<g id="radio"><path d="M3.24 6.15C2.51 6.43 2 7.17 2 8v12c0 1.1.89 2 2 2h16c1.11 0 2-.9 2-2V8c0-1.11-.89-2-2-2H8.3l8.26-3.34L15.88 1 3.24 6.15zM7 20c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm13-8h-2v-2h-2v2H4V8h16v4z"/></g>
+<g id="recent-actors"><path d="M21 5v14h2V5h-2zm-4 14h2V5h-2v14zM14 5H2c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zM8 7.75c1.24 0 2.25 1.01 2.25 2.25S9.24 12.25 8 12.25 5.75 11.24 5.75 10 6.76 7.75 8 7.75zM12.5 17h-9v-.75c0-1.5 3-2.25 4.5-2.25s4.5.75 4.5 2.25V17z"/></g>
+<g id="repeat"><path d="M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z"/></g>
+<g id="repeat-one"><path d="M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4zm-4-2V9h-1l-2 1v1h1.5v4H13z"/></g>
+<g id="replay"><path d="M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z"/></g>
+<g id="replay-10"><defs><path id="a" d="M0 0h24v24H0V0z"/></defs><clipPath id="b"><use xlink:href="#a" overflow="visible"/></clipPath><path d="M12 5V1L7 6l5 5V7c3.3 0 6 2.7 6 6s-2.7 6-6 6-6-2.7-6-6H4c0 4.4 3.6 8 8 8s8-3.6 8-8-3.6-8-8-8zm-1.1 11H10v-3.3L9 13v-.7l1.8-.6h.1V16zm4.3-1.8c0 .3 0 .6-.1.8l-.3.6s-.3.3-.5.3-.4.1-.6.1-.4 0-.6-.1-.3-.2-.5-.3-.2-.3-.3-.6-.1-.5-.1-.8v-.7c0-.3 0-.6.1-.8l.3-.6s.3-.3.5-.3.4-.1.6-.1.4 0 .6.1c.2.1.3.2.5.3s.2.3.3.6.1.5.1.8v.7zm-.9-.8v-.5s-.1-.2-.1-.3-.1-.1-.2-.2-.2-.1-.3-.1-.2 0-.3.1l-.2.2s-.1.2-.1.3v2s.1.2.1.3.1.1.2.2.2.1.3.1.2 0 .3-.1l.2-.2s.1-.2.1-.3v-1.5z" clip-path="url(#b)"/></g>
+<g id="replay-30"><defs><path id="a" d="M0 0h24v24H0V0z"/></defs><clipPath id="b"><use xlink:href="#a" overflow="visible"/></clipPath><path d="M12 5V1L7 6l5 5V7c3.3 0 6 2.7 6 6s-2.7 6-6 6-6-2.7-6-6H4c0 4.4 3.6 8 8 8s8-3.6 8-8-3.6-8-8-8zm-2.4 8.5h.4c.2 0 .4-.1.5-.2s.2-.2.2-.4v-.2s-.1-.1-.1-.2-.1-.1-.2-.1h-.5s-.1.1-.2.1-.1.1-.1.2v.2h-1c0-.2 0-.3.1-.5s.2-.3.3-.4.3-.2.4-.2.4-.1.5-.1c.2 0 .4 0 .6.1s.3.1.5.2.2.2.3.4.1.3.1.5v.3s-.1.2-.1.3-.1.2-.2.2-.2.1-.3.2c.2.1.4.2.5.4s.2.4.2.6c0 .2 0 .4-.1.5s-.2.3-.3.4-.3.2-.5.2-.4.1-.6.1c-.2 0-.4 0-.5-.1s-.3-.1-.5-.2-.2-.2-.3-.4-.1-.4-.1-.6h.8v.2s.1.1.1.2.1.1.2.1h.5s.1-.1.2-.1.1-.1.1-.2v-.5s-.1-.1-.1-.2-.1-.1-.2-.1h-.6v-.7zm5.7.7c0 .3 0 .6-.1.8l-.3.6s-.3.3-.5.3-.4.1-.6.1-.4 0-.6-.1-.3-.2-.5-.3-.2-.3-.3-.6-.1-.5-.1-.8v-.7c0-.3 0-.6.1-.8l.3-.6s.3-.3.5-.3.4-.1.6-.1.4 0 .6.1.3.2.5.3.2.3.3.6.1.5.1.8v.7zm-.8-.8v-.5c0-.1-.1-.2-.1-.3s-.1-.1-.2-.2-.2-.1-.3-.1-.2 0-.3.1l-.2.2s-.1.2-.1.3v2s.1.2.1.3.1.1.2.2.2.1.3.1.2 0 .3-.1l.2-.2s.1-.2.1-.3v-1.5z" clip-path="url(#b)"/></g>
+<g id="replay-5"><defs><path id="a" d="M0 0h24v24H0V0z"/></defs><clipPath id="b"><use xlink:href="#a" overflow="visible"/></clipPath><path d="M12 5V1L7 6l5 5V7c3.3 0 6 2.7 6 6s-2.7 6-6 6-6-2.7-6-6H4c0 4.4 3.6 8 8 8s8-3.6 8-8-3.6-8-8-8zm-1.3 8.9l.2-2.2h2.4v.7h-1.7l-.1.9s.1 0 .1-.1.1 0 .1-.1.1 0 .2 0h.2c.2 0 .4 0 .5.1s.3.2.4.3.2.3.3.5.1.4.1.6c0 .2 0 .4-.1.5s-.1.3-.3.5-.3.2-.4.3-.4.1-.6.1c-.2 0-.4 0-.5-.1s-.3-.1-.5-.2-.2-.2-.3-.4-.1-.3-.1-.5h.8c0 .2.1.3.2.4s.2.1.4.1c.1 0 .2 0 .3-.1l.2-.2s.1-.2.1-.3v-.6l-.1-.2-.2-.2s-.2-.1-.3-.1h-.2s-.1 0-.2.1-.1 0-.1.1-.1.1-.1.1h-.7z" clip-path="url(#b)"/></g>
+<g id="shuffle"><path d="M10.59 9.17L5.41 4 4 5.41l5.17 5.17 1.42-1.41zM14.5 4l2.04 2.04L4 18.59 5.41 20 17.96 7.46 20 9.5V4h-5.5zm.33 9.41l-1.41 1.41 3.13 3.13L14.5 20H20v-5.5l-2.04 2.04-3.13-3.13z"/></g>
+<g id="skip-next"><path d="M6 18l8.5-6L6 6v12zM16 6v12h2V6h-2z"/></g>
+<g id="skip-previous"><path d="M6 6h2v12H6zm3.5 6l8.5 6V6z"/></g>
+<g id="snooze"><path d="M7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7zm-3-9h3.63L9 15.2V17h6v-2h-3.63L15 10.8V9H9v2z"/></g>
+<g id="sort-by-alpha"><path d="M14.94 4.66h-4.72l2.36-2.36zm-4.69 14.71h4.66l-2.33 2.33zM6.1 6.27L1.6 17.73h1.84l.92-2.45h5.11l.92 2.45h1.84L7.74 6.27H6.1zm-1.13 7.37l1.94-5.18 1.94 5.18H4.97zm10.76 2.5h6.12v1.59h-8.53v-1.29l5.92-8.56h-5.88v-1.6h8.3v1.26l-5.93 8.6z"/></g>
+<g id="stop"><path d="M6 6h12v12H6z"/></g>
+<g id="subtitles"><path d="M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM4 12h4v2H4v-2zm10 6H4v-2h10v2zm6 0h-4v-2h4v2zm0-4H10v-2h10v2z"/></g>
+<g id="surround-sound"><path d="M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM7.76 16.24l-1.41 1.41C4.78 16.1 4 14.05 4 12c0-2.05.78-4.1 2.34-5.66l1.41 1.41C6.59 8.93 6 10.46 6 12s.59 3.07 1.76 4.24zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm5.66 1.66l-1.41-1.41C17.41 15.07 18 13.54 18 12s-.59-3.07-1.76-4.24l1.41-1.41C19.22 7.9 20 9.95 20 12c0 2.05-.78 4.1-2.34 5.66zM12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></g>
+<g id="video-library"><path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8 12.5v-9l6 4.5-6 4.5z"/></g>
+<g id="videocam"><path d="M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11l-4 4z"/></g>
+<g id="videocam-off"><path d="M21 6.5l-4 4V7c0-.55-.45-1-1-1H9.82L21 17.18V6.5zM3.27 2L2 3.27 4.73 6H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.21 0 .39-.08.54-.18L19.73 21 21 19.73 3.27 2z"/></g>
+<g id="volume-down"><path d="M18.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM5 9v6h4l5 5V4L9 9H5z"/></g>
+<g id="volume-mute"><path d="M7 9v6h4l5 5V4l-5 5H7z"/></g>
+<g id="volume-off"><path d="M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z"/></g>
+<g id="volume-up"><path d="M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z"/></g>
+<g id="web"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-5 14H4v-4h11v4zm0-5H4V9h11v4zm5 5h-4V9h4v9z"/></g>
+</defs></svg>
+</iron-iconset-svg>
diff --git a/static/bower_components/iron-icons/bower.json b/static/bower_components/iron-icons/bower.json
new file mode 100644
index 0000000..8ec25db
--- /dev/null
+++ b/static/bower_components/iron-icons/bower.json
@@ -0,0 +1,37 @@
+{
+ "name": "iron-icons",
+ "version": "1.0.3",
+ "description": "A set of icons for use with iron-icon",
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "keywords": [
+ "web-components",
+ "polymer",
+ "icon"
+ ],
+ "main": "iron-icons.html",
+ "private": true,
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/iron-icons"
+ },
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "homepage": "https://github.com/PolymerElements/paper-icons",
+ "dependencies": {
+ "iron-icon": "polymerelements/iron-icon#^1.0.0",
+ "iron-iconset-svg": "polymerelements/iron-iconset-svg#^1.0.0",
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "paper-styles": "polymerelements/paper-styles#^1.0.2",
+ "iron-component-page": "polymerelements/iron-component-page#1.0.0",
+ "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0",
+ "iron-meta": "polymerelements/iron-meta#^1.0.0",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ },
+ "ignore": [
+ "util",
+ "update-icons.sh"
+ ]
+}
diff --git a/static/bower_components/iron-icons/communication-icons.html b/static/bower_components/iron-icons/communication-icons.html
new file mode 100644
index 0000000..ec72704
--- /dev/null
+++ b/static/bower_components/iron-icons/communication-icons.html
@@ -0,0 +1,59 @@
+<!--
+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="../iron-icon/iron-icon.html">
+<link rel="import" href="../iron-iconset-svg/iron-iconset-svg.html">
+<iron-iconset-svg name="communication" size="24">
+<svg><defs>
+<g id="business"><path d="M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z"/></g>
+<g id="call"><path d="M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z"/></g>
+<g id="call-end"><path d="M12 9c-1.6 0-3.15.25-4.6.72v3.1c0 .39-.23.74-.56.9-.98.49-1.87 1.12-2.66 1.85-.18.18-.43.28-.7.28-.28 0-.53-.11-.71-.29L.29 13.08c-.18-.17-.29-.42-.29-.7 0-.28.11-.53.29-.71C3.34 8.78 7.46 7 12 7s8.66 1.78 11.71 4.67c.18.18.29.43.29.71 0 .28-.11.53-.29.71l-2.48 2.48c-.18.18-.43.29-.71.29-.27 0-.52-.11-.7-.28-.79-.74-1.69-1.36-2.67-1.85-.33-.16-.56-.5-.56-.9v-3.1C15.15 9.25 13.6 9 12 9z"/></g>
+<g id="call-made"><path d="M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5z"/></g>
+<g id="call-merge"><path d="M17 20.41L18.41 19 15 15.59 13.59 17 17 20.41zM7.5 8H11v5.59L5.59 19 7 20.41l6-6V8h3.5L12 3.5 7.5 8z"/></g>
+<g id="call-missed"><path d="M19.59 7L12 14.59 6.41 9H11V7H3v8h2v-4.59l7 7 9-9z"/></g>
+<g id="call-received"><path d="M20 5.41L18.59 4 7 15.59V9H5v10h10v-2H8.41z"/></g>
+<g id="call-split"><path d="M14 4l2.29 2.29-2.88 2.88 1.42 1.42 2.88-2.88L20 10V4zm-4 0H4v6l2.29-2.29 4.71 4.7V20h2v-8.41l-5.29-5.3z"/></g>
+<g id="chat"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 9h12v2H6V9zm8 5H6v-2h8v2zm4-6H6V6h12v2z"/></g>
+<g id="chat-bubble"><path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z"/></g>
+<g id="chat-bubble-outline"><path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H6l-2 2V4h16v12z"/></g>
+<g id="clear-all"><path d="M5 13h14v-2H5v2zm-2 4h14v-2H3v2zM7 7v2h14V7H7z"/></g>
+<g id="comment"><path d="M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4-.01-18zM18 14H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"/></g>
+<g id="contact-phone"><path d="M22 3H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm3.85-4h1.64L21 16l-1.99 1.99c-1.31-.98-2.28-2.38-2.73-3.99-.18-.64-.28-1.31-.28-2s.1-1.36.28-2c.45-1.62 1.42-3.01 2.73-3.99L21 8l-1.51 2h-1.64c-.22.63-.35 1.3-.35 2s.13 1.37.35 2z"/></g>
+<g id="contacts"><path d="M20 0H4v2h16V0zM4 24h16v-2H4v2zM20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 2.75c1.24 0 2.25 1.01 2.25 2.25s-1.01 2.25-2.25 2.25S9.75 10.24 9.75 9 10.76 6.75 12 6.75zM17 17H7v-1.5c0-1.67 3.33-2.5 5-2.5s5 .83 5 2.5V17z"/></g>
+<g id="dialer-sip"><path d="M17 3h-1v5h1V3zm-2 2h-2V4h2V3h-3v3h2v1h-2v1h3V5zm3-2v5h1V6h2V3h-3zm2 2h-1V4h1v1zm0 10.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.01.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.59l2.2-2.21c.27-.26.35-.65.24-1C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1z"/></g>
+<g id="dialpad"><path d="M12 19c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zM6 1c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12-8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm-6 8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></g>
+<g id="email"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></g>
+<g id="forum"><path d="M21 6h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1zm-4 6V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1z"/></g>
+<g id="import-export"><path d="M9 3L5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3z"/></g>
+<g id="invert-colors-off"><path d="M20.65 20.87l-2.35-2.35-6.3-6.29-3.56-3.57-1.42-1.41L4.27 4.5 3 5.77l2.78 2.78c-2.55 3.14-2.36 7.76.56 10.69C7.9 20.8 9.95 21.58 12 21.58c1.79 0 3.57-.59 5.03-1.78l2.7 2.7L21 21.23l-.35-.36zM12 19.59c-1.6 0-3.11-.62-4.24-1.76C6.62 16.69 6 15.19 6 13.59c0-1.32.43-2.57 1.21-3.6L12 14.77v4.82zM12 5.1v4.58l7.25 7.26c1.37-2.96.84-6.57-1.6-9.01L12 2.27l-3.7 3.7 1.41 1.41L12 5.1z"/></g>
+<g id="live-help"><path d="M19 2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h4l3 3 3-3h4c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-6 16h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 11.9 13 12.5 13 14h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"/></g>
+<g id="location-off"><path d="M12 6.5c1.38 0 2.5 1.12 2.5 2.5 0 .74-.33 1.39-.83 1.85l3.63 3.63c.98-1.86 1.7-3.8 1.7-5.48 0-3.87-3.13-7-7-7-1.98 0-3.76.83-5.04 2.15l3.19 3.19c.46-.52 1.11-.84 1.85-.84zm4.37 9.6l-4.63-4.63-.11-.11L3.27 3 2 4.27l3.18 3.18C5.07 7.95 5 8.47 5 9c0 5.25 7 13 7 13s1.67-1.85 3.38-4.35L18.73 21 20 19.73l-3.63-3.63z"/></g>
+<g id="location-on"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/></g>
+<g id="mail"><path d="M21 8V7l-3 2-3-2v1l3 2 3-2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm8-6h-8V6h8v6z"/></g>
+<g id="message"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"/></g>
+<g id="no-sim"><path d="M18.99 5c0-1.1-.89-2-1.99-2h-7L7.66 5.34 19 16.68 18.99 5zM3.65 3.88L2.38 5.15 5 7.77V19c0 1.1.9 2 2 2h10.01c.35 0 .67-.1.96-.26l1.88 1.88 1.27-1.27L3.65 3.88z"/></g>
+<g id="phone"><path d="M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z"/></g>
+<g id="phonelink-erase"><path d="M13 8.2l-1-1-4 4-4-4-1 1 4 4-4 4 1 1 4-4 4 4 1-1-4-4 4-4zM19 1H9c-1.1 0-2 .9-2 2v3h2V4h10v16H9v-2H7v3c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2z"/></g>
+<g id="phonelink-lock"><path d="M19 1H9c-1.1 0-2 .9-2 2v3h2V4h10v16H9v-2H7v3c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm-8.2 10V9.5C10.8 8.1 9.4 7 8 7S5.2 8.1 5.2 9.5V11c-.6 0-1.2.6-1.2 1.2v3.5c0 .7.6 1.3 1.2 1.3h5.5c.7 0 1.3-.6 1.3-1.2v-3.5c0-.7-.6-1.3-1.2-1.3zm-1.3 0h-3V9.5c0-.8.7-1.3 1.5-1.3s1.5.5 1.5 1.3V11z"/></g>
+<g id="phonelink-ring"><path d="M20.1 7.7l-1 1c1.8 1.8 1.8 4.6 0 6.5l1 1c2.5-2.3 2.5-6.1 0-8.5zM18 9.8l-1 1c.5.7.5 1.6 0 2.3l1 1c1.2-1.2 1.2-3 0-4.3zM14 1H4c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 19H4V4h10v16z"/></g>
+<g id="phonelink-setup"><path d="M11.8 12.5v-1l1.1-.8c.1-.1.1-.2.1-.3l-1-1.7c-.1-.1-.2-.2-.3-.1l-1.3.4c-.3-.2-.6-.4-.9-.5l-.2-1.3c0-.1-.1-.2-.3-.2H7c-.1 0-.2.1-.3.2l-.2 1.3c-.3.1-.6.3-.9.5l-1.3-.5c-.1 0-.2 0-.3.1l-1 1.7c-.1.1 0 .2.1.3l1.1.8v1l-1.1.8c-.1.2-.1.3-.1.4l1 1.7c.1.1.2.2.3.1l1.4-.4c.3.2.6.4.9.5l.2 1.3c-.1.1.1.2.2.2h2c.1 0 .2-.1.3-.2l.2-1.3c.3-.1.6-.3.9-.5l1.3.5c.1 0 .2 0 .3-.1l1-1.7c.1-.1 0-.2-.1-.3l-1.1-.9zM8 14c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zM19 1H9c-1.1 0-2 .9-2 2v3h2V4h10v16H9v-2H7v3c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2z"/></g>
+<g id="portable-wifi-off"><path d="M17.56 14.24c.28-.69.44-1.45.44-2.24 0-3.31-2.69-6-6-6-.79 0-1.55.16-2.24.44l1.62 1.62c.2-.03.41-.06.62-.06 2.21 0 4 1.79 4 4 0 .21-.02.42-.05.63l1.61 1.61zM12 4c4.42 0 8 3.58 8 8 0 1.35-.35 2.62-.95 3.74l1.47 1.47C21.46 15.69 22 13.91 22 12c0-5.52-4.48-10-10-10-1.91 0-3.69.55-5.21 1.47l1.46 1.46C9.37 4.34 10.65 4 12 4zM3.27 2.5L2 3.77l2.1 2.1C2.79 7.57 2 9.69 2 12c0 3.7 2.01 6.92 4.99 8.65l1-1.73C5.61 17.53 4 14.96 4 12c0-1.76.57-3.38 1.53-4.69l1.43 1.44C6.36 9.68 6 10.8 6 12c0 2.22 1.21 4.15 3 5.19l1-1.74c-1.19-.7-2-1.97-2-3.45 0-.65.17-1.25.44-1.79l1.58 1.58L10 12c0 1.1.9 2 2 2l.21-.02.01.01 7.51 7.51L21 20.23 4.27 3.5l-1-1z"/></g>
+<g id="present-to-all"><path d="M21 3H3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h18c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2zm0 16.02H3V4.98h18v14.04zM10 12H8l4-4 4 4h-2v4h-4v-4z"/></g>
+<g id="ring-volume"><path d="M23.71 16.67C20.66 13.78 16.54 12 12 12 7.46 12 3.34 13.78.29 16.67c-.18.18-.29.43-.29.71 0 .28.11.53.29.71l2.48 2.48c.18.18.43.29.71.29.27 0 .52-.11.7-.28.79-.74 1.69-1.36 2.66-1.85.33-.16.56-.5.56-.9v-3.1c1.45-.48 3-.73 4.6-.73s3.15.25 4.6.72v3.1c0 .39.23.74.56.9.98.49 1.87 1.12 2.66 1.85.18.18.43.28.7.28.28 0 .53-.11.71-.29l2.48-2.48c.18-.18.29-.43.29-.71 0-.27-.11-.52-.29-.7zM21.16 6.26l-1.41-1.41-3.56 3.55 1.41 1.41s3.45-3.52 3.56-3.55zM13 2h-2v5h2V2zM6.4 9.81L7.81 8.4 4.26 4.84 2.84 6.26c.11.03 3.56 3.55 3.56 3.55z"/></g>
+<g id="speaker-phone"><path d="M7 7.07L8.43 8.5c.91-.91 2.18-1.48 3.57-1.48s2.66.57 3.57 1.48L17 7.07C15.72 5.79 13.95 5 12 5s-3.72.79-5 2.07zM12 1C8.98 1 6.24 2.23 4.25 4.21l1.41 1.41C7.28 4 9.53 3 12 3s4.72 1 6.34 2.62l1.41-1.41C17.76 2.23 15.02 1 12 1zm2.86 9.01L9.14 10C8.51 10 8 10.51 8 11.14v9.71c0 .63.51 1.14 1.14 1.14h5.71c.63 0 1.14-.51 1.14-1.14v-9.71c.01-.63-.5-1.13-1.13-1.13zM15 20H9v-8h6v8z"/></g>
+<g id="stay-current-landscape"><path d="M1.01 7L1 17c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2H3c-1.1 0-1.99.9-1.99 2zM19 7v10H5V7h14z"/></g>
+<g id="stay-current-portrait"><path d="M17 1.01L7 1c-1.1 0-1.99.9-1.99 2v18c0 1.1.89 2 1.99 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM17 19H7V5h10v14z"/></g>
+<g id="stay-primary-landscape"><path d="M1.01 7L1 17c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2H3c-1.1 0-1.99.9-1.99 2zM19 7v10H5V7h14z"/></g>
+<g id="stay-primary-portrait"><path d="M17 1.01L7 1c-1.1 0-1.99.9-1.99 2v18c0 1.1.89 2 1.99 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM17 19H7V5h10v14z"/></g>
+<g id="swap-calls"><path d="M18 4l-4 4h3v7c0 1.1-.9 2-2 2s-2-.9-2-2V8c0-2.21-1.79-4-4-4S5 5.79 5 8v7H2l4 4 4-4H7V8c0-1.1.9-2 2-2s2 .9 2 2v7c0 2.21 1.79 4 4 4s4-1.79 4-4V8h3l-4-4z"/></g>
+<g id="textsms"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"/></g>
+<g id="voicemail"><path d="M18.5 6C15.46 6 13 8.46 13 11.5c0 1.33.47 2.55 1.26 3.5H9.74c.79-.95 1.26-2.17 1.26-3.5C11 8.46 8.54 6 5.5 6S0 8.46 0 11.5 2.46 17 5.5 17h13c3.04 0 5.5-2.46 5.5-5.5S21.54 6 18.5 6zm-13 9C3.57 15 2 13.43 2 11.5S3.57 8 5.5 8 9 9.57 9 11.5 7.43 15 5.5 15zm13 0c-1.93 0-3.5-1.57-3.5-3.5S16.57 8 18.5 8 22 9.57 22 11.5 20.43 15 18.5 15z"/></g>
+<g id="vpn-key"><path d="M12.65 10C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H17v4h4v-4h2v-4H12.65zM7 14c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"/></g>
+</defs></svg>
+</iron-iconset-svg>
diff --git a/static/bower_components/iron-icons/demo/index.html b/static/bower_components/iron-icons/demo/index.html
new file mode 100644
index 0000000..d5daf8f
--- /dev/null
+++ b/static/bower_components/iron-icons/demo/index.html
@@ -0,0 +1,132 @@
+<!doctype html>
+<!--
+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
+-->
+
+<html>
+<head>
+
+ <title>iron-icons</title>
+
+ <!-- polyfill WebComponents, if needed -->
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+
+ <!-- styles for the demo -->
+ <link href="../../paper-styles/demo-pages.html" rel="import">
+
+ <!-- load layout classes -->
+ <link rel="import" href="../../iron-flex-layout/classes/iron-flex-layout.html">
+
+ <!-- load default iconset -->
+ <link rel="import" href="../iron-icons.html">
+
+ <!-- load the rest -->
+ <link rel="import" href="../av-icons.html">
+ <link rel="import" href="../communication-icons.html">
+ <link rel="import" href="../device-icons.html">
+ <link rel="import" href="../editor-icons.html">
+ <link rel="import" href="../hardware-icons.html">
+ <link rel="import" href="../image-icons.html">
+ <link rel="import" href="../maps-icons.html">
+ <link rel="import" href="../notification-icons.html">
+ <link rel="import" href="../social-icons.html">
+
+ <style is="custom-style">
+
+ h2 {
+ text-transform: capitalize;
+ }
+
+ iron-icon {
+ transition: all 0.2s;
+ -webkit-transition: all 0.2s;
+ }
+
+ iron-icon:hover {
+ fill: var(--google-yellow-700);
+ }
+
+ .set {
+ margin: auto;
+ padding: 1em 0;
+ border-bottom: 1px solid silver;
+ }
+
+ .set:last-of-type {
+ border-bottom: none;
+ }
+
+ .set:nth-of-type(4n-3) {
+ color: var(--paper-grey-700);
+ }
+
+ .set:nth-of-type(4n-2) {
+ color: var(--google-yellow-300);
+ }
+
+ .set:nth-of-type(4n-1) {
+ color: var(--google-green-500);
+ }
+
+ .set:nth-of-type(4n) {
+ color: var( --google-blue-500);
+ }
+
+ .container {
+ min-width: 10em;
+ padding: 1em 0.5em;
+ text-align: center;
+ }
+
+ .container > div {
+ margin-top: 0.5em;
+ color: black;
+ font-size: 10px;
+ }
+
+ </style>
+
+</head>
+<body>
+
+
+ <template is="dom-bind">
+
+ <iron-meta type="iconset" list="{{iconsets}}"></iron-meta>
+
+ <template is="dom-repeat" items="{{iconsets}}">
+
+ <h2>{{item.name}}</h2>
+
+ <div class="set horizontal wrap layout">
+
+ <template is="dom-repeat" items="{{getIconNames(item)}}">
+
+ <span class="container vertical center layout flex-1">
+ <iron-icon icon="{{item}}"></iron-icon>
+ <div>{{item}}</div>
+ </span>
+
+ </template>
+
+ </div>
+
+ </template>
+
+ </template>
+
+ <script>
+
+ document.querySelector('[is=dom-bind]').getIconNames = function(iconset) {
+ return iconset.getIconNames();
+ };
+
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/iron-icons/device-icons.html b/static/bower_components/iron-icons/device-icons.html
new file mode 100644
index 0000000..e875a05
--- /dev/null
+++ b/static/bower_components/iron-icons/device-icons.html
@@ -0,0 +1,94 @@
+<!--
+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="../iron-icon/iron-icon.html">
+<link rel="import" href="../iron-iconset-svg/iron-iconset-svg.html">
+<iron-iconset-svg name="device" size="24">
+<svg><defs>
+<g id="access-alarm"><path d="M22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12.5 8H11v6l4.75 2.85.75-1.23-4-2.37V8zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"/></g>
+<g id="access-alarms"><path d="M22 5.7l-4.6-3.9-1.3 1.5 4.6 3.9L22 5.7zM7.9 3.4L6.6 1.9 2 5.7l1.3 1.5 4.6-3.8zM12.5 8H11v6l4.7 2.9.8-1.2-4-2.4V8zM12 4c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7z"/></g>
+<g id="access-time"><path fill-opacity=".9" d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zM12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"/></g>
+<g id="add-alarm"><path d="M7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7zm1-11h-2v3H8v2h3v3h2v-3h3v-2h-3V9z"/></g>
+<g id="airplanemode-active"><path d="M10.18 9"/><path d="M21 16v-2l-8-5V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5z"/></g>
+<g id="airplanemode-inactive"><path d="M13 9V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5v3.68l7.83 7.83L21 16v-2l-8-5zM3 5.27l4.99 4.99L2 14v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-3.73L18.73 21 20 19.73 4.27 4 3 5.27z"/></g>
+<g id="battery-20"><path d="M7 17v3.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V17H7z"/><path fill-opacity=".3" d="M17 5.33C17 4.6 16.4 4 15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V17h10V5.33z"/></g>
+<g id="battery-30"><path fill-opacity=".3" d="M17 5.33C17 4.6 16.4 4 15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V15h10V5.33z"/><path d="M7 15v5.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V15H7z"/></g>
+<g id="battery-50"><path fill-opacity=".3" d="M17 5.33C17 4.6 16.4 4 15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V13h10V5.33z"/><path d="M7 13v7.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V13H7z"/></g>
+<g id="battery-60"><path fill-opacity=".3" d="M17 5.33C17 4.6 16.4 4 15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V11h10V5.33z"/><path d="M7 11v9.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V11H7z"/></g>
+<g id="battery-80"><path fill-opacity=".3" d="M17 5.33C17 4.6 16.4 4 15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V9h10V5.33z"/><path d="M7 9v11.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V9H7z"/></g>
+<g id="battery-90"><path fill-opacity=".3" d="M17 5.33C17 4.6 16.4 4 15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V8h10V5.33z"/><path d="M7 8v12.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V8H7z"/></g>
+<g id="battery-alert"><path d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4zM13 18h-2v-2h2v2zm0-4h-2V9h2v5z"/></g>
+<g id="battery-charging-20"><path d="M11 20v-3H7v3.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V17h-4.4L11 20z"/><path fill-opacity=".3" d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V17h4v-2.5H9L13 7v5.5h2L12.6 17H17V5.33C17 4.6 16.4 4 15.67 4z"/></g>
+<g id="battery-charging-30"><path fill-opacity=".3" d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v9.17h2L13 7v5.5h2l-1.07 2H17V5.33C17 4.6 16.4 4 15.67 4z"/><path d="M11 20v-5.5H7v6.17C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V14.5h-3.07L11 20z"/></g>
+<g id="battery-charging-50"><path d="M14.47 13.5L11 20v-5.5H9l.53-1H7v7.17C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V13.5h-2.53z"/><path fill-opacity=".3" d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v8.17h2.53L13 7v5.5h2l-.53 1H17V5.33C17 4.6 16.4 4 15.67 4z"/></g>
+<g id="battery-charging-60"><path fill-opacity=".3" d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V11h3.87L13 7v4h4V5.33C17 4.6 16.4 4 15.67 4z"/><path d="M13 12.5h2L11 20v-5.5H9l1.87-3.5H7v9.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V11h-4v1.5z"/></g>
+<g id="battery-charging-80"><path fill-opacity=".3" d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V9h4.93L13 7v2h4V5.33C17 4.6 16.4 4 15.67 4z"/><path d="M13 12.5h2L11 20v-5.5H9L11.93 9H7v11.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V9h-4v3.5z"/></g>
+<g id="battery-charging-90"><path fill-opacity=".3" d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V8h5.47L13 7v1h4V5.33C17 4.6 16.4 4 15.67 4z"/><path d="M13 12.5h2L11 20v-5.5H9L12.47 8H7v12.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V8h-4v4.5z"/></g>
+<g id="battery-charging-full"><path d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4zM11 20v-5.5H9L13 7v5.5h2L11 20z"/></g>
+<g id="battery-full"><path d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4z"/></g>
+<g id="battery-std"><path d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4z"/></g>
+<g id="battery-unknown"><path d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4zm-2.72 13.95h-1.9v-1.9h1.9v1.9zm1.35-5.26s-.38.42-.67.71c-.48.48-.83 1.15-.83 1.6h-1.6c0-.83.46-1.52.93-2l.93-.94c.27-.27.44-.65.44-1.06 0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5H9c0-1.66 1.34-3 3-3s3 1.34 3 3c0 .66-.27 1.26-.7 1.69z"/></g>
+<g id="bluetooth"><path d="M17.71 7.71L12 2h-1v7.59L6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 11 14.41V22h1l5.71-5.71-4.3-4.29 4.3-4.29zM13 5.83l1.88 1.88L13 9.59V5.83zm1.88 10.46L13 18.17v-3.76l1.88 1.88z"/></g>
+<g id="bluetooth-connected"><path d="M7 12l-2-2-2 2 2 2 2-2zm10.71-4.29L12 2h-1v7.59L6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 11 14.41V22h1l5.71-5.71-4.3-4.29 4.3-4.29zM13 5.83l1.88 1.88L13 9.59V5.83zm1.88 10.46L13 18.17v-3.76l1.88 1.88zM19 10l-2 2 2 2 2-2-2-2z"/></g>
+<g id="bluetooth-disabled"><path d="M13 5.83l1.88 1.88-1.6 1.6 1.41 1.41 3.02-3.02L12 2h-1v5.03l2 2v-3.2zM5.41 4L4 5.41 10.59 12 5 17.59 6.41 19 11 14.41V22h1l4.29-4.29 2.3 2.29L20 18.59 5.41 4zM13 18.17v-3.76l1.88 1.88L13 18.17z"/></g>
+<g id="bluetooth-searching"><path d="M14.24 12.01l2.32 2.32c.28-.72.44-1.51.44-2.33 0-.82-.16-1.59-.43-2.31l-2.33 2.32zm5.29-5.3l-1.26 1.26c.63 1.21.98 2.57.98 4.02s-.36 2.82-.98 4.02l1.2 1.2c.97-1.54 1.54-3.36 1.54-5.31-.01-1.89-.55-3.67-1.48-5.19zm-3.82 1L10 2H9v7.59L4.41 5 3 6.41 8.59 12 3 17.59 4.41 19 9 14.41V22h1l5.71-5.71-4.3-4.29 4.3-4.29zM11 5.83l1.88 1.88L11 9.59V5.83zm1.88 10.46L11 18.17v-3.76l1.88 1.88z"/></g>
+<g id="brightness-auto"><path d="M10.85 12.65h2.3L12 9l-1.15 3.65zM20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69zM14.3 16l-.7-2h-3.2l-.7 2H7.8L11 7h2l3.2 9h-1.9z"/></g>
+<g id="brightness-high"><path d="M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6zm0-10c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4z"/></g>
+<g id="brightness-low"><path d="M20 15.31L23.31 12 20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6z"/></g>
+<g id="brightness-medium"><path d="M20 15.31L23.31 12 20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69zM12 18V6c3.31 0 6 2.69 6 6s-2.69 6-6 6z"/></g>
+<g id="data-usage"><path d="M13 2.05v3.03c3.39.49 6 3.39 6 6.92 0 .9-.18 1.75-.48 2.54l2.6 1.53c.56-1.24.88-2.62.88-4.07 0-5.18-3.95-9.45-9-9.95zM12 19c-3.87 0-7-3.13-7-7 0-3.53 2.61-6.43 6-6.92V2.05c-5.06.5-9 4.76-9 9.95 0 5.52 4.47 10 9.99 10 3.31 0 6.24-1.61 8.06-4.09l-2.6-1.53C16.17 17.98 14.21 19 12 19z"/></g>
+<g id="developer-mode"><path d="M7 5h10v2h2V3c0-1.1-.9-1.99-2-1.99L7 1c-1.1 0-2 .9-2 2v4h2V5zm8.41 11.59L20 12l-4.59-4.59L14 8.83 17.17 12 14 15.17l1.41 1.42zM10 15.17L6.83 12 10 8.83 8.59 7.41 4 12l4.59 4.59L10 15.17zM17 19H7v-2H5v4c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2v-4h-2v2z"/></g>
+<g id="devices"><path d="M4 6h18V4H4c-1.1 0-2 .9-2 2v11H0v3h14v-3H4V6zm19 2h-6c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1zm-1 9h-4v-7h4v7z"/></g>
+<g id="dvr"><path d="M21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.1-.9-2-2-2zm0 14H3V5h18v12zm-2-9H8v2h11V8zm0 4H8v2h11v-2zM7 8H5v2h2V8zm0 4H5v2h2v-2z"/></g>
+<g id="gps-fixed"><path d="M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06C6.83 3.52 3.52 6.83 3.06 11H1v2h2.06c.46 4.17 3.77 7.48 7.94 7.94V23h2v-2.06c4.17-.46 7.48-3.77 7.94-7.94H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"/></g>
+<g id="gps-not-fixed"><path d="M20.94 11c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06C6.83 3.52 3.52 6.83 3.06 11H1v2h2.06c.46 4.17 3.77 7.48 7.94 7.94V23h2v-2.06c4.17-.46 7.48-3.77 7.94-7.94H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"/></g>
+<g id="gps-off"><path d="M20.94 11c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06c-1.13.12-2.19.46-3.16.97l1.5 1.5C10.16 5.19 11.06 5 12 5c3.87 0 7 3.13 7 7 0 .94-.19 1.84-.52 2.65l1.5 1.5c.5-.96.84-2.02.97-3.15H23v-2h-2.06zM3 4.27l2.04 2.04C3.97 7.62 3.25 9.23 3.06 11H1v2h2.06c.46 4.17 3.77 7.48 7.94 7.94V23h2v-2.06c1.77-.2 3.38-.91 4.69-1.98L19.73 21 21 19.73 4.27 3 3 4.27zm13.27 13.27C15.09 18.45 13.61 19 12 19c-3.87 0-7-3.13-7-7 0-1.61.55-3.09 1.46-4.27l9.81 9.81z"/></g>
+<g id="graphic-eq"><path d="M7 18h2V6H7v12zm4 4h2V2h-2v20zm-8-8h2v-4H3v4zm12 4h2V6h-2v12zm4-8v4h2v-4h-2z"/></g>
+<g id="location-disabled"><path d="M20.94 11c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06c-1.13.12-2.19.46-3.16.97l1.5 1.5C10.16 5.19 11.06 5 12 5c3.87 0 7 3.13 7 7 0 .94-.19 1.84-.52 2.65l1.5 1.5c.5-.96.84-2.02.97-3.15H23v-2h-2.06zM3 4.27l2.04 2.04C3.97 7.62 3.25 9.23 3.06 11H1v2h2.06c.46 4.17 3.77 7.48 7.94 7.94V23h2v-2.06c1.77-.2 3.38-.91 4.69-1.98L19.73 21 21 19.73 4.27 3 3 4.27zm13.27 13.27C15.09 18.45 13.61 19 12 19c-3.87 0-7-3.13-7-7 0-1.61.55-3.09 1.46-4.27l9.81 9.81z"/></g>
+<g id="location-searching"><path d="M20.94 11c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06C6.83 3.52 3.52 6.83 3.06 11H1v2h2.06c.46 4.17 3.77 7.48 7.94 7.94V23h2v-2.06c4.17-.46 7.48-3.77 7.94-7.94H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"/></g>
+<g id="network-cell"><path fill-opacity=".3" d="M2 22h20V2z"/><path d="M17 7L2 22h15z"/></g>
+<g id="network-wifi"><path fill-opacity=".3" d="M12.01 21.49L23.64 7c-.45-.34-4.93-4-11.64-4C5.28 3 .81 6.66.36 7l11.63 14.49.01.01.01-.01z"/><path d="M3.53 10.95l8.46 10.54.01.01.01-.01 8.46-10.54C20.04 10.62 16.81 8 12 8c-4.81 0-8.04 2.62-8.47 2.95z"/></g>
+<g id="nfc"><path d="M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 18H4V4h16v16zM18 6h-5c-1.1 0-2 .9-2 2v2.28c-.6.35-1 .98-1 1.72 0 1.1.9 2 2 2s2-.9 2-2c0-.74-.4-1.38-1-1.72V8h3v8H8V8h2V6H6v12h12V6z"/></g>
+<g id="screen-lock-landscape"><path d="M21 5H3c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-2 12H5V7h14v10zm-9-1h4c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1v-1c0-1.11-.9-2-2-2-1.11 0-2 .9-2 2v1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1zm.8-6c0-.66.54-1.2 1.2-1.2.66 0 1.2.54 1.2 1.2v1h-2.4v-1z"/></g>
+<g id="screen-lock-portrait"><path d="M10 16h4c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1v-1c0-1.11-.9-2-2-2-1.11 0-2 .9-2 2v1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1zm.8-6c0-.66.54-1.2 1.2-1.2.66 0 1.2.54 1.2 1.2v1h-2.4v-1zM17 1H7c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 18H7V5h10v14z"/></g>
+<g id="screen-lock-rotation"><path d="M23.25 12.77l-2.57-2.57-1.41 1.41 2.22 2.22-5.66 5.66L4.51 8.17l5.66-5.66 2.1 2.1 1.41-1.41L11.23.75c-.59-.59-1.54-.59-2.12 0L2.75 7.11c-.59.59-.59 1.54 0 2.12l12.02 12.02c.59.59 1.54.59 2.12 0l6.36-6.36c.59-.59.59-1.54 0-2.12zM8.47 20.48C5.2 18.94 2.86 15.76 2.5 12H1c.51 6.16 5.66 11 11.95 11l.66-.03-3.81-3.82-1.33 1.33zM16 9h5c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1v-.5C21 1.12 19.88 0 18.5 0S16 1.12 16 2.5V3c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1zm.8-6.5c0-.94.76-1.7 1.7-1.7s1.7.76 1.7 1.7V3h-3.4v-.5z"/></g>
+<g id="screen-rotation"><path d="M16.48 2.52c3.27 1.55 5.61 4.72 5.97 8.48h1.5C23.44 4.84 18.29 0 12 0l-.66.03 3.81 3.81 1.33-1.32zm-6.25-.77c-.59-.59-1.54-.59-2.12 0L1.75 8.11c-.59.59-.59 1.54 0 2.12l12.02 12.02c.59.59 1.54.59 2.12 0l6.36-6.36c.59-.59.59-1.54 0-2.12L10.23 1.75zm4.6 19.44L2.81 9.17l6.36-6.36 12.02 12.02-6.36 6.36zm-7.31.29C4.25 19.94 1.91 16.76 1.55 13H.05C.56 19.16 5.71 24 12 24l.66-.03-3.81-3.81-1.33 1.32z"/></g>
+<g id="sd-storage"><path d="M18 2h-8L4.02 8 4 20c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-6 6h-2V4h2v4zm3 0h-2V4h2v4zm3 0h-2V4h2v4z"/></g>
+<g id="settings-system-daydream"><path d="M9 16h6.5c1.38 0 2.5-1.12 2.5-2.5S16.88 11 15.5 11h-.05c-.24-1.69-1.69-3-3.45-3-1.4 0-2.6.83-3.16 2.02h-.16C7.17 10.18 6 11.45 6 13c0 1.66 1.34 3 3 3zM21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16.01H3V4.99h18v14.02z"/></g>
+<g id="signal-cellular-0-bar"><path fill-opacity=".3" d="M2 22h20V2z"/></g>
+<g id="signal-cellular-1-bar"><path fill-opacity=".3" d="M2 22h20V2z"/><path d="M12 12L2 22h10z"/></g>
+<g id="signal-cellular-2-bar"><path fill-opacity=".3" d="M2 22h20V2z"/><path d="M14 10L2 22h12z"/></g>
+<g id="signal-cellular-3-bar"><path fill-opacity=".3" d="M2 22h20V2z"/><path d="M17 7L2 22h15z"/></g>
+<g id="signal-cellular-4-bar"><path d="M2 22h20V2z"/></g>
+<g id="signal-cellular-connected-no-internet-0-bar"><path fill-opacity=".3" d="M22 8V2L2 22h16V8z"/><path d="M20 22h2v-2h-2v2zm0-12v8h2v-8h-2z"/></g>
+<g id="signal-cellular-connected-no-internet-1-bar"><path fill-opacity=".3" d="M22 8V2L2 22h16V8z"/><path d="M20 10v8h2v-8h-2zm-8 12V12L2 22h10zm8 0h2v-2h-2v2z"/></g>
+<g id="signal-cellular-connected-no-internet-2-bar"><path fill-opacity=".3" d="M22 8V2L2 22h16V8z"/><path d="M14 22V10L2 22h12zm6-12v8h2v-8h-2zm0 12h2v-2h-2v2z"/></g>
+<g id="signal-cellular-connected-no-internet-3-bar"><path fill-opacity=".3" d="M22 8V2L2 22h16V8z"/><path d="M17 22V7L2 22h15zm3-12v8h2v-8h-2zm0 12h2v-2h-2v2z"/></g>
+<g id="signal-cellular-connected-no-internet-4-bar"><path d="M20 18h2v-8h-2v8zm0 4h2v-2h-2v2zM2 22h16V8h4V2L2 22z"/></g>
+<g id="signal-cellular-no-sim"><path d="M18.99 5c0-1.1-.89-2-1.99-2h-7L7.66 5.34 19 16.68 18.99 5zM3.65 3.88L2.38 5.15 5 7.77V19c0 1.1.9 2 2 2h10.01c.35 0 .67-.1.96-.26l1.88 1.88 1.27-1.27L3.65 3.88z"/></g>
+<g id="signal-cellular-null"><path d="M20 6.83V20H6.83L20 6.83M22 2L2 22h20V2z"/></g>
+<g id="signal-cellular-off"><path d="M21 1l-8.59 8.59L21 18.18V1zM4.77 4.5L3.5 5.77l6.36 6.36L1 21h17.73l2 2L22 21.73 4.77 4.5z"/></g>
+<g id="signal-wifi-0-bar"><path fill-opacity=".3" d="M12.01 21.49L23.64 7c-.45-.34-4.93-4-11.64-4C5.28 3 .81 6.66.36 7l11.63 14.49.01.01.01-.01z"/></g>
+<g id="signal-wifi-1-bar"><path fill-opacity=".3" d="M12.01 21.49L23.64 7c-.45-.34-4.93-4-11.64-4C5.28 3 .81 6.66.36 7l11.63 14.49.01.01.01-.01z"/><path d="M6.67 14.86L12 21.49v.01l.01-.01 5.33-6.63C17.06 14.65 15.03 13 12 13s-5.06 1.65-5.33 1.86z"/></g>
+<g id="signal-wifi-1-bar-lock"><path d="M23 16v-1.5c0-1.4-1.1-2.5-2.5-2.5S18 13.1 18 14.5V16c-.5 0-1 .5-1 1v4c0 .5.5 1 1 1h5c.5 0 1-.5 1-1v-4c0-.5-.5-1-1-1zm-1 0h-3v-1.5c0-.8.7-1.5 1.5-1.5s1.5.7 1.5 1.5V16z"/><path d="M15.5 14.5c0-2.8 2.2-5 5-5 .4 0 .7 0 1 .1L23.6 7c-.4-.3-4.9-4-11.6-4C5.3 3 .8 6.7.4 7L12 21.5l3.5-4.3v-2.7z" opacity=".3"/><path d="M6.7 14.9l5.3 6.6 3.5-4.3v-2.6c0-.2 0-.5.1-.7-.9-.5-2.2-.9-3.6-.9-3 0-5.1 1.7-5.3 1.9z"/></g>
+<g id="signal-wifi-2-bar"><path fill-opacity=".3" d="M12.01 21.49L23.64 7c-.45-.34-4.93-4-11.64-4C5.28 3 .81 6.66.36 7l11.63 14.49.01.01.01-.01z"/><path d="M4.79 12.52l7.2 8.98H12l.01-.01 7.2-8.98C18.85 12.24 16.1 10 12 10s-6.85 2.24-7.21 2.52z"/></g>
+<g id="signal-wifi-2-bar-lock"><path d="M23 16v-1.5c0-1.4-1.1-2.5-2.5-2.5S18 13.1 18 14.5V16c-.5 0-1 .5-1 1v4c0 .5.5 1 1 1h5c.5 0 1-.5 1-1v-4c0-.5-.5-1-1-1zm-1 0h-3v-1.5c0-.8.7-1.5 1.5-1.5s1.5.7 1.5 1.5V16z"/><path d="M15.5 14.5c0-2.8 2.2-5 5-5 .4 0 .7 0 1 .1L23.6 7c-.4-.3-4.9-4-11.6-4C5.3 3 .8 6.7.4 7L12 21.5l3.5-4.3v-2.7z" opacity=".3"/><path d="M4.8 12.5l7.2 9 3.5-4.4v-2.6c0-1.3.5-2.5 1.4-3.4C15.6 10.5 14 10 12 10c-4.1 0-6.8 2.2-7.2 2.5z"/></g>
+<g id="signal-wifi-3-bar"><path fill-opacity=".3" d="M12.01 21.49L23.64 7c-.45-.34-4.93-4-11.64-4C5.28 3 .81 6.66.36 7l11.63 14.49.01.01.01-.01z"/><path d="M3.53 10.95l8.46 10.54.01.01.01-.01 8.46-10.54C20.04 10.62 16.81 8 12 8c-4.81 0-8.04 2.62-8.47 2.95z"/></g>
+<g id="signal-wifi-3-bar-lock"><path opacity=".3" d="M12 3C5.3 3 .8 6.7.4 7l3.2 3.9L12 21.5l3.5-4.3v-2.6c0-2.2 1.4-4 3.3-4.7.3-.1.5-.2.8-.2.3-.1.6-.1.9-.1.4 0 .7 0 1 .1L23.6 7c-.4-.3-4.9-4-11.6-4z"/><path d="M23 16v-1.5c0-1.4-1.1-2.5-2.5-2.5S18 13.1 18 14.5V16c-.5 0-1 .5-1 1v4c0 .5.5 1 1 1h5c.5 0 1-.5 1-1v-4c0-.5-.5-1-1-1zm-1 0h-3v-1.5c0-.8.7-1.5 1.5-1.5s1.5.7 1.5 1.5V16zm-10 5.5l3.5-4.3v-2.6c0-2.2 1.4-4 3.3-4.7C17.3 9 14.9 8 12 8c-4.8 0-8 2.6-8.5 2.9"/></g>
+<g id="signal-wifi-4-bar"><path d="M12.01 21.49L23.64 7c-.45-.34-4.93-4-11.64-4C5.28 3 .81 6.66.36 7l11.63 14.49.01.01.01-.01z"/></g>
+<g id="signal-wifi-4-bar-lock"><path d="M23 16v-1.5c0-1.4-1.1-2.5-2.5-2.5S18 13.1 18 14.5V16c-.5 0-1 .5-1 1v4c0 .5.5 1 1 1h5c.5 0 1-.5 1-1v-4c0-.5-.5-1-1-1zm-1 0h-3v-1.5c0-.8.7-1.5 1.5-1.5s1.5.7 1.5 1.5V16zm-6.5-1.5c0-2.8 2.2-5 5-5 .4 0 .7 0 1 .1L23.6 7c-.4-.3-4.9-4-11.6-4C5.3 3 .8 6.7.4 7L12 21.5l3.5-4.4v-2.6z"/></g>
+<g id="signal-wifi-off"><path d="M23.64 7c-.45-.34-4.93-4-11.64-4-1.5 0-2.89.19-4.15.48L18.18 13.8 23.64 7zm-6.6 8.22L3.27 1.44 2 2.72l2.05 2.06C1.91 5.76.59 6.82.36 7l11.63 14.49.01.01.01-.01 3.9-4.86 3.32 3.32 1.27-1.27-3.46-3.46z"/></g>
+<g id="storage"><path d="M2 20h20v-4H2v4zm2-3h2v2H4v-2zM2 4v4h20V4H2zm4 3H4V5h2v2zm-4 7h20v-4H2v4zm2-3h2v2H4v-2z"/></g>
+<g id="usb"><path d="M15 7v4h1v2h-3V5h2l-3-4-3 4h2v8H8v-2.07c.7-.37 1.2-1.08 1.2-1.93 0-1.21-.99-2.2-2.2-2.2-1.21 0-2.2.99-2.2 2.2 0 .85.5 1.56 1.2 1.93V13c0 1.11.89 2 2 2h3v3.05c-.71.37-1.2 1.1-1.2 1.95 0 1.22.99 2.2 2.2 2.2 1.21 0 2.2-.98 2.2-2.2 0-.85-.49-1.58-1.2-1.95V15h3c1.11 0 2-.89 2-2v-2h1V7h-4z"/></g>
+<g id="wallpaper"><path d="M4 4h7V2H4c-1.1 0-2 .9-2 2v7h2V4zm6 9l-4 5h12l-3-4-2.03 2.71L10 13zm7-4.5c0-.83-.67-1.5-1.5-1.5S14 7.67 14 8.5s.67 1.5 1.5 1.5S17 9.33 17 8.5zM20 2h-7v2h7v7h2V4c0-1.1-.9-2-2-2zm0 18h-7v2h7c1.1 0 2-.9 2-2v-7h-2v7zM4 13H2v7c0 1.1.9 2 2 2h7v-2H4v-7z"/></g>
+<g id="widgets"><path d="M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"/></g>
+<g id="wifi-lock"><path d="M20.5 9.5c.28 0 .55.04.81.08L24 6c-3.34-2.51-7.5-4-12-4S3.34 3.49 0 6l12 16 3.5-4.67V14.5c0-2.76 2.24-5 5-5zM23 16v-1.5c0-1.38-1.12-2.5-2.5-2.5S18 13.12 18 14.5V16c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h5c.55 0 1-.45 1-1v-4c0-.55-.45-1-1-1zm-1 0h-3v-1.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V16z"/></g>
+<g id="wifi-tethering"><path d="M12 11c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 2c0-3.31-2.69-6-6-6s-6 2.69-6 6c0 2.22 1.21 4.15 3 5.19l1-1.74c-1.19-.7-2-1.97-2-3.45 0-2.21 1.79-4 4-4s4 1.79 4 4c0 1.48-.81 2.75-2 3.45l1 1.74c1.79-1.04 3-2.97 3-5.19zM12 3C6.48 3 2 7.48 2 13c0 3.7 2.01 6.92 4.99 8.65l1-1.73C5.61 18.53 4 15.96 4 13c0-4.42 3.58-8 8-8s8 3.58 8 8c0 2.96-1.61 5.53-4 6.92l1 1.73c2.99-1.73 5-4.95 5-8.65 0-5.52-4.48-10-10-10z"/></g>
+</defs></svg>
+</iron-iconset-svg>
diff --git a/static/bower_components/iron-icons/editor-icons.html b/static/bower_components/iron-icons/editor-icons.html
new file mode 100644
index 0000000..7fabfe0
--- /dev/null
+++ b/static/bower_components/iron-icons/editor-icons.html
@@ -0,0 +1,70 @@
+<!--
+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="../iron-icon/iron-icon.html">
+<link rel="import" href="../iron-iconset-svg/iron-iconset-svg.html">
+<iron-iconset-svg name="editor" size="24">
+<svg><defs>
+<g id="attach-file"><path d="M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"/></g>
+<g id="attach-money"><path d="M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4z"/></g>
+<g id="border-all"><path d="M3 3v18h18V3H3zm8 16H5v-6h6v6zm0-8H5V5h6v6zm8 8h-6v-6h6v6zm0-8h-6V5h6v6z"/></g>
+<g id="border-bottom"><path d="M9 11H7v2h2v-2zm4 4h-2v2h2v-2zM9 3H7v2h2V3zm4 8h-2v2h2v-2zM5 3H3v2h2V3zm8 4h-2v2h2V7zm4 4h-2v2h2v-2zm-4-8h-2v2h2V3zm4 0h-2v2h2V3zm2 10h2v-2h-2v2zm0 4h2v-2h-2v2zM5 7H3v2h2V7zm14-4v2h2V3h-2zm0 6h2V7h-2v2zM5 11H3v2h2v-2zM3 21h18v-2H3v2zm2-6H3v2h2v-2z"/></g>
+<g id="border-clear"><path d="M7 5h2V3H7v2zm0 8h2v-2H7v2zm0 8h2v-2H7v2zm4-4h2v-2h-2v2zm0 4h2v-2h-2v2zm-8 0h2v-2H3v2zm0-4h2v-2H3v2zm0-4h2v-2H3v2zm0-4h2V7H3v2zm0-4h2V3H3v2zm8 8h2v-2h-2v2zm8 4h2v-2h-2v2zm0-4h2v-2h-2v2zm0 8h2v-2h-2v2zm0-12h2V7h-2v2zm-8 0h2V7h-2v2zm8-6v2h2V3h-2zm-8 2h2V3h-2v2zm4 16h2v-2h-2v2zm0-8h2v-2h-2v2zm0-8h2V3h-2v2z"/></g>
+<g id="border-color"><path d="M17.75 7L14 3.25l-10 10V17h3.75l10-10zm2.96-2.96c.39-.39.39-1.02 0-1.41L18.37.29c-.39-.39-1.02-.39-1.41 0L15 2.25 18.75 6l1.96-1.96z"/><path fill-opacity=".36" d="M0 20h24v4H0z"/></g>
+<g id="border-horizontal"><path d="M3 21h2v-2H3v2zM5 7H3v2h2V7zM3 17h2v-2H3v2zm4 4h2v-2H7v2zM5 3H3v2h2V3zm4 0H7v2h2V3zm8 0h-2v2h2V3zm-4 4h-2v2h2V7zm0-4h-2v2h2V3zm6 14h2v-2h-2v2zm-8 4h2v-2h-2v2zm-8-8h18v-2H3v2zM19 3v2h2V3h-2zm0 6h2V7h-2v2zm-8 8h2v-2h-2v2zm4 4h2v-2h-2v2zm4 0h2v-2h-2v2z"/></g>
+<g id="border-inner"><path d="M3 21h2v-2H3v2zm4 0h2v-2H7v2zM5 7H3v2h2V7zM3 17h2v-2H3v2zM9 3H7v2h2V3zM5 3H3v2h2V3zm12 0h-2v2h2V3zm2 6h2V7h-2v2zm0-6v2h2V3h-2zm-4 18h2v-2h-2v2zM13 3h-2v8H3v2h8v8h2v-8h8v-2h-8V3zm6 18h2v-2h-2v2zm0-4h2v-2h-2v2z"/></g>
+<g id="border-left"><path d="M11 21h2v-2h-2v2zm0-4h2v-2h-2v2zm0-12h2V3h-2v2zm0 4h2V7h-2v2zm0 4h2v-2h-2v2zm-4 8h2v-2H7v2zM7 5h2V3H7v2zm0 8h2v-2H7v2zm-4 8h2V3H3v18zM19 9h2V7h-2v2zm-4 12h2v-2h-2v2zm4-4h2v-2h-2v2zm0-14v2h2V3h-2zm0 10h2v-2h-2v2zm0 8h2v-2h-2v2zm-4-8h2v-2h-2v2zm0-8h2V3h-2v2z"/></g>
+<g id="border-outer"><path d="M13 7h-2v2h2V7zm0 4h-2v2h2v-2zm4 0h-2v2h2v-2zM3 3v18h18V3H3zm16 16H5V5h14v14zm-6-4h-2v2h2v-2zm-4-4H7v2h2v-2z"/></g>
+<g id="border-right"><path d="M7 21h2v-2H7v2zM3 5h2V3H3v2zm4 0h2V3H7v2zm0 8h2v-2H7v2zm-4 8h2v-2H3v2zm8 0h2v-2h-2v2zm-8-8h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm8 8h2v-2h-2v2zm4-4h2v-2h-2v2zm4-10v18h2V3h-2zm-4 18h2v-2h-2v2zm0-16h2V3h-2v2zm-4 8h2v-2h-2v2zm0-8h2V3h-2v2zm0 4h2V7h-2v2z"/></g>
+<g id="border-style"><path d="M15 21h2v-2h-2v2zm4 0h2v-2h-2v2zM7 21h2v-2H7v2zm4 0h2v-2h-2v2zm8-4h2v-2h-2v2zm0-4h2v-2h-2v2zM3 3v18h2V5h16V3H3zm16 6h2V7h-2v2z"/></g>
+<g id="border-top"><path d="M7 21h2v-2H7v2zm0-8h2v-2H7v2zm4 0h2v-2h-2v2zm0 8h2v-2h-2v2zm-8-4h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2v-2H3v2zm0-4h2V7H3v2zm8 8h2v-2h-2v2zm8-8h2V7h-2v2zm0 4h2v-2h-2v2zM3 3v2h18V3H3zm16 14h2v-2h-2v2zm-4 4h2v-2h-2v2zM11 9h2V7h-2v2zm8 12h2v-2h-2v2zm-4-8h2v-2h-2v2z"/></g>
+<g id="border-vertical"><path d="M3 9h2V7H3v2zm0-4h2V3H3v2zm4 16h2v-2H7v2zm0-8h2v-2H7v2zm-4 0h2v-2H3v2zm0 8h2v-2H3v2zm0-4h2v-2H3v2zM7 5h2V3H7v2zm12 12h2v-2h-2v2zm-8 4h2V3h-2v18zm8 0h2v-2h-2v2zm0-8h2v-2h-2v2zm0-10v2h2V3h-2zm0 6h2V7h-2v2zm-4-4h2V3h-2v2zm0 16h2v-2h-2v2zm0-8h2v-2h-2v2z"/></g>
+<g id="format-align-center"><path d="M7 15v2h10v-2H7zm-4 6h18v-2H3v2zm0-8h18v-2H3v2zm4-6v2h10V7H7zM3 3v2h18V3H3z"/></g>
+<g id="format-align-justify"><path d="M3 21h18v-2H3v2zm0-4h18v-2H3v2zm0-4h18v-2H3v2zm0-4h18V7H3v2zm0-6v2h18V3H3z"/></g>
+<g id="format-align-left"><path d="M15 15H3v2h12v-2zm0-8H3v2h12V7zM3 13h18v-2H3v2zm0 8h18v-2H3v2zM3 3v2h18V3H3z"/></g>
+<g id="format-align-right"><path d="M3 21h18v-2H3v2zm6-4h12v-2H9v2zm-6-4h18v-2H3v2zm6-4h12V7H9v2zM3 3v2h18V3H3z"/></g>
+<g id="format-bold"><path d="M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z"/></g>
+<g id="format-clear"><path d="M3.27 5L2 6.27l6.97 6.97L6.5 19h3l1.57-3.66L16.73 21 18 19.73 3.55 5.27 3.27 5zM6 5v.18L8.82 8h2.4l-.72 1.68 2.1 2.1L14.21 8H20V5H6z"/></g>
+<g id="format-color-fill"><path d="M16.56 8.94L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.59-.59 1.54 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.58.59-1.53 0-2.12zM5.21 10L10 5.21 14.79 10H5.21zM19 11.5s-2 2.17-2 3.5c0 1.1.9 2 2 2s2-.9 2-2c0-1.33-2-3.5-2-3.5z"/><path fill-opacity=".36" d="M0 20h24v4H0z"/></g>
+<g id="format-color-reset"><path d="M18 14c0-4-6-10.8-6-10.8s-1.33 1.51-2.73 3.52l8.59 8.59c.09-.42.14-.86.14-1.31zm-.88 3.12L12.5 12.5 5.27 5.27 4 6.55l3.32 3.32C6.55 11.32 6 12.79 6 14c0 3.31 2.69 6 6 6 1.52 0 2.9-.57 3.96-1.5l2.63 2.63 1.27-1.27-2.74-2.74z"/></g>
+<g id="format-color-text"><path fill-opacity=".36" d="M0 20h24v4H0z"/><path d="M11 3L5.5 17h2.25l1.12-3h6.25l1.12 3h2.25L13 3h-2zm-1.38 9L12 5.67 14.38 12H9.62z"/></g>
+<g id="format-indent-decrease"><path d="M11 17h10v-2H11v2zm-8-5l4 4V8l-4 4zm0 9h18v-2H3v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H11v2z"/></g>
+<g id="format-indent-increase"><path d="M3 21h18v-2H3v2zM3 8v8l4-4-4-4zm8 9h10v-2H11v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H11v2z"/></g>
+<g id="format-italic"><path d="M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z"/></g>
+<g id="format-line-spacing"><path d="M6 7h2.5L5 3.5 1.5 7H4v10H1.5L5 20.5 8.5 17H6V7zm4-2v2h12V5H10zm0 14h12v-2H10v2zm0-6h12v-2H10v2z"/></g>
+<g id="format-list-bulleted"><path d="M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12.17c-.74 0-1.33.6-1.33 1.33s.6 1.33 1.33 1.33 1.33-.6 1.33-1.33-.59-1.33-1.33-1.33zM7 19h14v-2H7v2zm0-6h14v-2H7v2zm0-8v2h14V5H7z"/></g>
+<g id="format-list-numbered"><path d="M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z"/></g>
+<g id="format-paint"><path d="M18 4V3c0-.55-.45-1-1-1H5c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V6h1v4H9v11c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-9h8V4h-3z"/></g>
+<g id="format-quote"><path d="M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z"/></g>
+<g id="format-size"><path d="M9 4v3h5v12h3V7h5V4H9zm-6 8h3v7h3v-7h3V9H3v3z"/></g>
+<g id="format-strikethrough"><path d="M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z"/></g>
+<g id="format-textdirection-l-to-r"><path d="M9 10v5h2V4h2v11h2V4h2V2H9C6.79 2 5 3.79 5 6s1.79 4 4 4zm12 8l-4-4v3H5v2h12v3l4-4z"/></g>
+<g id="format-textdirection-r-to-l"><path d="M10 10v5h2V4h2v11h2V4h2V2h-8C7.79 2 6 3.79 6 6s1.79 4 4 4zm-2 7v-3l-4 4 4 4v-3h12v-2H8z"/></g>
+<g id="format-underlined"><path d="M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z"/></g>
+<g id="functions"><path d="M18 4H6v2l6.5 6L6 18v2h12v-3h-7l5-5-5-5h7z"/></g>
+<g id="insert-chart"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"/></g>
+<g id="insert-comment"><path d="M20 2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"/></g>
+<g id="insert-drive-file"><path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"/></g>
+<g id="insert-emoticon"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5zm-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11zm3.5 6.5c2.33 0 4.31-1.46 5.11-3.5H6.89c.8 2.04 2.78 3.5 5.11 3.5z"/></g>
+<g id="insert-invitation"><path d="M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"/></g>
+<g id="insert-link"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></g>
+<g id="insert-photo"><path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"/></g>
+<g id="merge-type"><path d="M17 20.41L18.41 19 15 15.59 13.59 17 17 20.41zM7.5 8H11v5.59L5.59 19 7 20.41l6-6V8h3.5L12 3.5 7.5 8z"/></g>
+<g id="mode-comment"><path d="M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4-.01-18z"/></g>
+<g id="mode-edit"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></g>
+<g id="money-off"><path d="M12.5 6.9c1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-.53.12-1.03.3-1.48.54l1.47 1.47c.41-.17.91-.27 1.51-.27zM5.33 4.06L4.06 5.33 7.5 8.77c0 2.08 1.56 3.21 3.91 3.91l3.51 3.51c-.34.48-1.05.91-2.42.91-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c.96-.18 1.82-.55 2.45-1.12l2.22 2.22 1.27-1.27L5.33 4.06z"/></g>
+<g id="publish"><path d="M5 4v2h14V4H5zm0 10h4v6h6v-6h4l-7-7-7 7z"/></g>
+<g id="space-bar"><path d="M18 9v4H6V9H4v6h16V9z"/></g>
+<g id="strikethrough-s"><path d="M5.9 10h6.3c-.8-.3-1.5-.6-2-.9-.7-.4-1-1-1-1.6 0-.3.1-.6.2-.9.1-.3.3-.5.6-.7.3-.2.6-.4 1-.5.4-.1.8-.2 1.4-.2.5 0 1 .1 1.4.2.4.1.7.3 1 .6.3.2.5.5.6.9.1.3.2.7.2 1.1h4c0-.9-.2-1.7-.5-2.4s-.8-1.4-1.4-1.9c-.6-.5-1.4-1-2.3-1.2-1-.4-2-.5-3.1-.5s-2 .1-2.9.4c-.9.3-1.6.6-2.3 1.1-.6.5-1.1 1-1.4 1.7-.4.7-.6 1.4-.6 2.2 0 .8.2 1.6.5 2.2.1.2.2.3.3.4zM23 12H1v2h11.9c.2.1.5.2.7.3.5.2.9.5 1.2.7.3.2.5.5.6.8.1.3.1.6.1.9 0 .3-.1.6-.2.9-.1.3-.3.5-.6.7-.2.2-.6.3-.9.5-.4.1-.8.2-1.4.2-.6 0-1.1-.1-1.6-.2s-.9-.3-1.2-.6c-.3-.3-.6-.6-.8-1-.2-.4-.3-1-.3-1.6h-4c0 .7.1 1.5.3 2.1.2.6.5 1.1.9 1.6s.8.9 1.3 1.2c.5.3 1 .6 1.6.9.6.2 1.2.4 1.8.5.6.1 1.3.2 1.9.2 1.1 0 2-.1 2.9-.4.9-.2 1.6-.6 2.2-1.1.6-.5 1.1-1 1.4-1.7.3-.7.5-1.4.5-2.3 0-.8-.1-1.5-.4-2.2-.1-.2-.1-.3-.2-.4H23v-2z"/></g>
+<g id="vertical-align-bottom"><path d="M16 13h-3V3h-2v10H8l4 4 4-4zM4 19v2h16v-2H4z"/></g>
+<g id="vertical-align-center"><path d="M8 19h3v4h2v-4h3l-4-4-4 4zm8-14h-3V1h-2v4H8l4 4 4-4zM4 11v2h16v-2H4z"/></g>
+<g id="vertical-align-top"><path d="M8 11h3v10h2V11h3l-4-4-4 4zM4 3v2h16V3H4z"/></g>
+<g id="wrap-text"><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"/></g>
+</defs></svg>
+</iron-iconset-svg>
diff --git a/static/bower_components/iron-icons/hardware-icons.html b/static/bower_components/iron-icons/hardware-icons.html
new file mode 100644
index 0000000..670cb07
--- /dev/null
+++ b/static/bower_components/iron-icons/hardware-icons.html
@@ -0,0 +1,61 @@
+<!--
+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="../iron-icon/iron-icon.html">
+<link rel="import" href="../iron-iconset-svg/iron-iconset-svg.html">
+<iron-iconset-svg name="hardware" size="24">
+<svg><defs>
+<g id="cast"><path d="M21 3H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0-4v2c4.97 0 9 4.03 9 9h2c0-6.08-4.93-11-11-11z"/></g>
+<g id="cast-connected"><path d="M1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm18-7H5v1.63c3.96 1.28 7.09 4.41 8.37 8.37H19V7zM1 10v2c4.97 0 9 4.03 9 9h2c0-6.08-4.93-11-11-11zm20-7H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></g>
+<g id="computer"><path d="M20 18c1.1 0 1.99-.9 1.99-2L22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2h-4zM4 6h16v10H4V6z"/></g>
+<g id="desktop-mac"><path d="M21 2H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h7l-2 3v1h8v-1l-2-3h7c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 12H3V4h18v10z"/></g>
+<g id="desktop-windows"><path d="M21 2H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h7v2H8v2h8v-2h-2v-2h7c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H3V4h18v12z"/></g>
+<g id="developer-board"><path d="M22 9V7h-2V5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-2h2v-2h-2v-2h2v-2h-2V9h2zm-4 10H4V5h14v14zM6 13h5v4H6zm6-6h4v3h-4zM6 7h5v5H6zm6 4h4v6h-4z"/></g>
+<g id="device-hub"><path d="M17 16l-4-4V8.82C14.16 8.4 15 7.3 15 6c0-1.66-1.34-3-3-3S9 4.34 9 6c0 1.3.84 2.4 2 2.82V12l-4 4H3v5h5v-3.05l4-4.2 4 4.2V21h5v-5h-4z"/></g>
+<g id="dock"><path d="M8 23h8v-2H8v2zm8-21.99L8 1c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM16 15H8V5h8v10z"/></g>
+<g id="gamepad"><path d="M15 7.5V2H9v5.5l3 3 3-3zM7.5 9H2v6h5.5l3-3-3-3zM9 16.5V22h6v-5.5l-3-3-3 3zM16.5 9l-3 3 3 3H22V9h-5.5z"/></g>
+<g id="headset"><path d="M12 1c-4.97 0-9 4.03-9 9v7c0 1.66 1.34 3 3 3h3v-8H5v-2c0-3.87 3.13-7 7-7s7 3.13 7 7v2h-4v8h3c1.66 0 3-1.34 3-3v-7c0-4.97-4.03-9-9-9z"/></g>
+<g id="headset-mic"><path d="M12 1c-4.97 0-9 4.03-9 9v7c0 1.66 1.34 3 3 3h3v-8H5v-2c0-3.87 3.13-7 7-7s7 3.13 7 7v2h-4v8h4v1h-7v2h6c1.66 0 3-1.34 3-3V10c0-4.97-4.03-9-9-9z"/></g>
+<g id="keyboard"><path d="M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-9 3h2v2h-2V8zm0 3h2v2h-2v-2zM8 8h2v2H8V8zm0 3h2v2H8v-2zm-1 2H5v-2h2v2zm0-3H5V8h2v2zm9 7H8v-2h8v2zm0-4h-2v-2h2v2zm0-3h-2V8h2v2zm3 3h-2v-2h2v2zm0-3h-2V8h2v2z"/></g>
+<g id="keyboard-arrow-down"><path d="M7.41 7.84L12 12.42l4.59-4.58L18 9.25l-6 6-6-6z"/></g>
+<g id="keyboard-arrow-left"><path d="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"/></g>
+<g id="keyboard-arrow-right"><path d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"/></g>
+<g id="keyboard-arrow-up"><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"/></g>
+<g id="keyboard-backspace"><path d="M21 11H6.83l3.58-3.59L9 6l-6 6 6 6 1.41-1.41L6.83 13H21z"/></g>
+<g id="keyboard-capslock"><path d="M12 8.41L16.59 13 18 11.59l-6-6-6 6L7.41 13 12 8.41zM6 18h12v-2H6v2z"/></g>
+<g id="keyboard-hide"><path d="M20 3H4c-1.1 0-1.99.9-1.99 2L2 15c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-9 3h2v2h-2V6zm0 3h2v2h-2V9zM8 6h2v2H8V6zm0 3h2v2H8V9zm-1 2H5V9h2v2zm0-3H5V6h2v2zm9 7H8v-2h8v2zm0-4h-2V9h2v2zm0-3h-2V6h2v2zm3 3h-2V9h2v2zm0-3h-2V6h2v2zm-7 15l4-4H8l4 4z"/></g>
+<g id="keyboard-return"><path d="M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z"/></g>
+<g id="keyboard-tab"><path d="M11.59 7.41L15.17 11H1v2h14.17l-3.59 3.59L13 18l6-6-6-6-1.41 1.41zM20 6v12h2V6h-2z"/></g>
+<g id="keyboard-voice"><path d="M12 15c1.66 0 2.99-1.34 2.99-3L15 6c0-1.66-1.34-3-3-3S9 4.34 9 6v6c0 1.66 1.34 3 3 3zm5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 15 6.7 12H5c0 3.42 2.72 6.23 6 6.72V22h2v-3.28c3.28-.48 6-3.3 6-6.72h-1.7z"/></g>
+<g id="laptop"><path d="M20 18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2h-4zM4 6h16v10H4V6z"/></g>
+<g id="laptop-chromebook"><path d="M22 18V3H2v15H0v2h24v-2h-2zm-8 0h-4v-1h4v1zm6-3H4V5h16v10z"/></g>
+<g id="laptop-mac"><path d="M20 18c1.1 0 1.99-.9 1.99-2L22 5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v11c0 1.1.9 2 2 2H0c0 1.1.9 2 2 2h20c1.1 0 2-.9 2-2h-4zM4 5h16v11H4V5zm8 14c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"/></g>
+<g id="laptop-windows"><path d="M20 18v-1c1.1 0 1.99-.9 1.99-2L22 5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2v1H0v2h24v-2h-4zM4 5h16v10H4V5z"/></g>
+<g id="memory"><path d="M15 9H9v6h6V9zm-2 4h-2v-2h2v2zm8-2V9h-2V7c0-1.1-.9-2-2-2h-2V3h-2v2h-2V3H9v2H7c-1.1 0-2 .9-2 2v2H3v2h2v2H3v2h2v2c0 1.1.9 2 2 2h2v2h2v-2h2v2h2v-2h2c1.1 0 2-.9 2-2v-2h2v-2h-2v-2h2zm-4 6H7V7h10v10z"/></g>
+<g id="mouse"><path d="M13 1.07V9h7c0-4.08-3.05-7.44-7-7.93zM4 15c0 4.42 3.58 8 8 8s8-3.58 8-8v-4H4v4zm7-13.93C7.05 1.56 4 4.92 4 9h7V1.07z"/></g>
+<g id="phone-android"><path d="M16 1H8C6.34 1 5 2.34 5 4v16c0 1.66 1.34 3 3 3h8c1.66 0 3-1.34 3-3V4c0-1.66-1.34-3-3-3zm-2 20h-4v-1h4v1zm3.25-3H6.75V4h10.5v14z"/></g>
+<g id="phone-iphone"><path d="M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38 0 2.5-1.12 2.5-2.5v-17C18 2.12 16.88 1 15.5 1zm-4 21c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm4.5-4H7V4h9v14z"/></g>
+<g id="phonelink"><path d="M4 6h18V4H4c-1.1 0-2 .9-2 2v11H0v3h14v-3H4V6zm19 2h-6c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1zm-1 9h-4v-7h4v7z"/></g>
+<g id="phonelink-off"><path d="M22 6V4H6.82l2 2H22zM1.92 1.65L.65 2.92l1.82 1.82C2.18 5.08 2 5.52 2 6v11H0v3h17.73l2.35 2.35 1.27-1.27L3.89 3.62 1.92 1.65zM4 6.27L14.73 17H4V6.27zM23 8h-6c-.55 0-1 .45-1 1v4.18l2 2V10h4v7h-2.18l3 3H23c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1z"/></g>
+<g id="power-input"><path d="M2 9v2h19V9H2zm0 6h5v-2H2v2zm7 0h5v-2H9v2zm7 0h5v-2h-5v2z"/></g>
+<g id="router"><path d="M20.2 5.9l.8-.8C19.6 3.7 17.8 3 16 3s-3.6.7-5 2.1l.8.8C13 4.8 14.5 4.2 16 4.2s3 .6 4.2 1.7zm-.9.8c-.9-.9-2.1-1.4-3.3-1.4s-2.4.5-3.3 1.4l.8.8c.7-.7 1.6-1 2.5-1 .9 0 1.8.3 2.5 1l.8-.8zM19 13h-2V9h-2v4H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zM8 18H6v-2h2v2zm3.5 0h-2v-2h2v2zm3.5 0h-2v-2h2v2z"/></g>
+<g id="scanner"><path d="M19.8 10.7L4.2 5l-.7 1.9L17.6 12H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-5.5c0-.8-.5-1.6-1.2-1.8zM7 17H5v-2h2v2zm12 0H9v-2h10v2z"/></g>
+<g id="security"><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"/></g>
+<g id="sim-card"><path d="M19.99 4c0-1.1-.89-2-1.99-2h-8L4 8v12c0 1.1.9 2 2 2h12.01c1.1 0 1.99-.9 1.99-2l-.01-16zM9 19H7v-2h2v2zm8 0h-2v-2h2v2zm-8-4H7v-4h2v4zm4 4h-2v-4h2v4zm0-6h-2v-2h2v2zm4 2h-2v-4h2v4z"/></g>
+<g id="smartphone"><path d="M17 1.01L7 1c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM17 19H7V5h10v14z"/></g>
+<g id="speaker"><path d="M17 2H7c-1.1 0-2 .9-2 2v16c0 1.1.9 1.99 2 1.99L17 22c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-5 2c1.1 0 2 .9 2 2s-.9 2-2 2c-1.11 0-2-.9-2-2s.89-2 2-2zm0 16c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/></g>
+<g id="speaker-group"><path d="M18.2 1H9.8C8.81 1 8 1.81 8 2.8v14.4c0 .99.81 1.79 1.8 1.79l8.4.01c.99 0 1.8-.81 1.8-1.8V2.8c0-.99-.81-1.8-1.8-1.8zM14 3c1.1 0 2 .89 2 2s-.9 2-2 2-2-.89-2-2 .9-2 2-2zm0 13.5c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4z"/><circle cx="14" cy="12.5" r="2.5"/><path d="M6 5H4v16c0 1.1.89 2 2 2h10v-2H6V5z"/></g>
+<g id="tablet"><path d="M21 4H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h18c1.1 0 1.99-.9 1.99-2L23 6c0-1.1-.9-2-2-2zm-2 14H5V6h14v12z"/></g>
+<g id="tablet-android"><path d="M18 0H6C4.34 0 3 1.34 3 3v18c0 1.66 1.34 3 3 3h12c1.66 0 3-1.34 3-3V3c0-1.66-1.34-3-3-3zm-4 22h-4v-1h4v1zm5.25-3H4.75V3h14.5v16z"/></g>
+<g id="tablet-mac"><path d="M18.5 0h-14C3.12 0 2 1.12 2 2.5v19C2 22.88 3.12 24 4.5 24h14c1.38 0 2.5-1.12 2.5-2.5v-19C21 1.12 19.88 0 18.5 0zm-7 23c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm7.5-4H4V3h15v16z"/></g>
+<g id="toys"><path d="M12 12c0-3 2.5-5.5 5.5-5.5S23 9 23 12H12zm0 0c0 3-2.5 5.5-5.5 5.5S1 15 1 12h11zm0 0c-3 0-5.5-2.5-5.5-5.5S9 1 12 1v11zm0 0c3 0 5.5 2.5 5.5 5.5S15 23 12 23V12z"/></g>
+<g id="tv"><path d="M21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.1-.9-2-2-2zm0 14H3V5h18v12z"/></g>
+<g id="watch"><path d="M20 12c0-2.54-1.19-4.81-3.04-6.27L16 0H8l-.95 5.73C5.19 7.19 4 9.45 4 12s1.19 4.81 3.05 6.27L8 24h8l.96-5.73C18.81 16.81 20 14.54 20 12zM6 12c0-3.31 2.69-6 6-6s6 2.69 6 6-2.69 6-6 6-6-2.69-6-6z"/></g>
+</defs></svg>
+</iron-iconset-svg>
diff --git a/static/bower_components/iron-icons/hero.svg b/static/bower_components/iron-icons/hero.svg
new file mode 100644
index 0000000..52949be
--- /dev/null
+++ b/static/bower_components/iron-icons/hero.svg
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
+<g id="background" display="none">
+ <rect display="inline" fill="#B0BEC5" width="225" height="126"/>
+</g>
+<g id="label">
+</g>
+<g id="art">
+ <circle cx="73" cy="24" r="4"/>
+ <path d="M82,33H64V15h18V33z M66,31h14V17H66V31z"/>
+ <circle cx="112.5" cy="24" r="4"/>
+ <circle cx="151" cy="24" r="4"/>
+ <path d="M121,33h-18V15h18V33z M105,31h14V17h-14V31z"/>
+ <path d="M160,33h-18V15h18V33z M144,31h14V17h-14V31z"/>
+ <circle cx="73" cy="62" r="4"/>
+ <path d="M82,71H64V53h18V71z M66,69h14V55H66V69z"/>
+ <circle cx="112.5" cy="62" r="4"/>
+ <path d="M121,71h-18V53h18V71z M105,69h14V55h-14V69z"/>
+ <circle cx="151" cy="62" r="4"/>
+ <path d="M160,71h-18V53h18V71z M144,69h14V55h-14V69z"/>
+ <circle cx="73" cy="102" r="4"/>
+ <path d="M82,111H64V93h18V111z M66,109h14V95H66V109z"/>
+ <circle cx="112.5" cy="102" r="4"/>
+ <path d="M121,111h-18V93h18V111z M105,109h14V95h-14V109z"/>
+ <circle cx="151" cy="102" r="4"/>
+ <path d="M160,111h-18V93h18V111z M144,109h14V95h-14V109z"/>
+ <g id="ic_x5F_add_x0D_">
+ </g>
+</g>
+<g id="Guides">
+</g>
+</svg>
diff --git a/static/bower_components/iron-icons/image-icons.html b/static/bower_components/iron-icons/image-icons.html
new file mode 100644
index 0000000..f6c45f5
--- /dev/null
+++ b/static/bower_components/iron-icons/image-icons.html
@@ -0,0 +1,164 @@
+<!--
+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="../iron-icon/iron-icon.html">
+<link rel="import" href="../iron-iconset-svg/iron-iconset-svg.html">
+<iron-iconset-svg name="image" size="24">
+<svg><defs>
+<g id="add-to-photos"><path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9h-4v4h-2v-4H9V9h4V5h2v4h4v2z"/></g>
+<g id="adjust"><path d="M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3-8c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3z"/></g>
+<g id="assistant"><path d="M19 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h4l3 3 3-3h4c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-5.12 10.88L12 17l-1.88-4.12L6 11l4.12-1.88L12 5l1.88 4.12L18 11l-4.12 1.88z"/></g>
+<g id="assistant-photo"><path d="M14.4 6L14 4H5v17h2v-7h5.6l.4 2h7V6z"/></g>
+<g id="audiotrack"><path d="M12 3v9.28c-.47-.17-.97-.28-1.5-.28C8.01 12 6 14.01 6 16.5S8.01 21 10.5 21c2.31 0 4.2-1.75 4.45-4H15V6h4V3h-7z"/></g>
+<g id="blur-circular"><path d="M10 9c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zM7 9.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm3 7c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm-3-3c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm3-6c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM14 9c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-1.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm3 6c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm0-4c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm2-3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm0-3.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1z"/></g>
+<g id="blur-linear"><path d="M5 17.5c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5-1.5.67-1.5 1.5.67 1.5 1.5 1.5zM9 13c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0-4c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zM3 21h18v-2H3v2zM5 9.5c.83 0 1.5-.67 1.5-1.5S5.83 6.5 5 6.5 3.5 7.17 3.5 8 4.17 9.5 5 9.5zm0 4c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5-1.5.67-1.5 1.5.67 1.5 1.5 1.5zM9 17c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm8-.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM3 3v2h18V3H3zm14 5.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm0 4c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM13 9c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0 4c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0 4c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1z"/></g>
+<g id="blur-off"><path d="M14 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm-.2 4.48l.2.02c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5-1.5.67-1.5 1.5l.02.2c.09.67.61 1.19 1.28 1.28zM14 3.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm-4 0c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm11 7c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM10 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm8 8c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0-4c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0-4c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm-4 13.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM2.5 5.27l3.78 3.78L6 9c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1c0-.1-.03-.19-.06-.28l2.81 2.81c-.71.11-1.25.73-1.25 1.47 0 .83.67 1.5 1.5 1.5.74 0 1.36-.54 1.47-1.25l2.81 2.81c-.09-.03-.18-.06-.28-.06-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1c0-.1-.03-.19-.06-.28l3.78 3.78L20 20.23 3.77 4 2.5 5.27zM10 17c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm11-3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM6 13c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zM3 9.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm7 11c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM6 17c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm-3-3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5z"/></g>
+<g id="blur-on"><path d="M6 13c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm-3 .5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM6 5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm15 5.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM14 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0-3.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm-11 10c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm7 7c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm0-17c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM10 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0 5.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm8 .5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm3 8.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM14 17c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm-4-12c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0 8.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm4-4.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-4c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5z"/></g>
+<g id="brightness-1"><circle cx="12" cy="12" r="10"/></g>
+<g id="brightness-2"><path d="M10 2c-1.82 0-3.53.5-5 1.35C7.99 5.08 10 8.3 10 12s-2.01 6.92-5 8.65C6.47 21.5 8.18 22 10 22c5.52 0 10-4.48 10-10S15.52 2 10 2z"/></g>
+<g id="brightness-3"><path d="M9 2c-1.05 0-2.05.16-3 .46 4.06 1.27 7 5.06 7 9.54 0 4.48-2.94 8.27-7 9.54.95.3 1.95.46 3 .46 5.52 0 10-4.48 10-10S14.52 2 9 2z"/></g>
+<g id="brightness-4"><path d="M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69zM12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6c3.31 0 6 2.69 6 6s-2.69 6-6 6z"/></g>
+<g id="brightness-5"><path d="M20 15.31L23.31 12 20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6z"/></g>
+<g id="brightness-6"><path d="M20 15.31L23.31 12 20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69zM12 18V6c3.31 0 6 2.69 6 6s-2.69 6-6 6z"/></g>
+<g id="brightness-7"><path d="M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6zm0-10c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4z"/></g>
+<g id="broken-image"><path d="M21 5v6.59l-3-3.01-4 4.01-4-4-4 4-3-3.01V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2zm-3 6.42l3 3.01V19c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2v-6.58l3 2.99 4-4 4 4 4-3.99z"/></g>
+<g id="brush"><path d="M7 14c-1.66 0-3 1.34-3 3 0 1.31-1.16 2-2 2 .92 1.22 2.49 2 4 2 2.21 0 4-1.79 4-4 0-1.66-1.34-3-3-3zm13.71-9.37l-1.34-1.34c-.39-.39-1.02-.39-1.41 0L9 12.25 11.75 15l8.96-8.96c.39-.39.39-1.02 0-1.41z"/></g>
+<g id="camera"><path d="M9.4 10.5l4.77-8.26C13.47 2.09 12.75 2 12 2c-2.4 0-4.6.85-6.32 2.25l3.66 6.35.06-.1zM21.54 9c-.92-2.92-3.15-5.26-6-6.34L11.88 9h9.66zm.26 1h-7.49l.29.5 4.76 8.25C21 16.97 22 14.61 22 12c0-.69-.07-1.35-.2-2zM8.54 12l-3.9-6.75C3.01 7.03 2 9.39 2 12c0 .69.07 1.35.2 2h7.49l-1.15-2zm-6.08 3c.92 2.92 3.15 5.26 6 6.34L12.12 15H2.46zm11.27 0l-3.9 6.76c.7.15 1.42.24 2.17.24 2.4 0 4.6-.85 6.32-2.25l-3.66-6.35-.93 1.6z"/></g>
+<g id="camera-alt"><circle cx="12" cy="12" r="3.2"/><path d="M9 2L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z"/></g>
+<g id="camera-front"><path d="M10 20H5v2h5v2l3-3-3-3v2zm4 0v2h5v-2h-5zM12 8c1.1 0 2-.9 2-2s-.9-2-2-2-1.99.9-1.99 2S10.9 8 12 8zm5-8H7C5.9 0 5 .9 5 2v14c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V2c0-1.1-.9-2-2-2zM7 2h10v10.5c0-1.67-3.33-2.5-5-2.5s-5 .83-5 2.5V2z"/></g>
+<g id="camera-rear"><path d="M10 20H5v2h5v2l3-3-3-3v2zm4 0v2h5v-2h-5zm3-20H7C5.9 0 5 .9 5 2v14c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V2c0-1.1-.9-2-2-2zm-5 6c-1.11 0-2-.9-2-2s.89-2 1.99-2 2 .9 2 2C14 5.1 13.1 6 12 6z"/></g>
+<g id="camera-roll"><path d="M14 5c0-1.1-.9-2-2-2h-1V2c0-.55-.45-1-1-1H6c-.55 0-1 .45-1 1v1H4c-1.1 0-2 .9-2 2v15c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2h8V5h-8zm-2 13h-2v-2h2v2zm0-9h-2V7h2v2zm4 9h-2v-2h2v2zm0-9h-2V7h2v2zm4 9h-2v-2h2v2zm0-9h-2V7h2v2z"/></g>
+<g id="center-focus-strong"><path d="M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm-7 7H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2zm0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4z"/></g>
+<g id="center-focus-weak"><path d="M5 15H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2zm0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"/></g>
+<g id="collections"><path d="M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"/></g>
+<g id="collections-bookmark"><path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zM20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 10l-2.5-1.5L15 12V4h5v8z"/></g>
+<g id="color-lens"><path d="M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"/></g>
+<g id="colorize"><path d="M20.71 5.63l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-3.12 3.12-1.93-1.91-1.41 1.41 1.42 1.42L3 16.25V21h4.75l8.92-8.92 1.42 1.42 1.41-1.41-1.92-1.92 3.12-3.12c.4-.4.4-1.03.01-1.42zM6.92 19L5 17.08l8.06-8.06 1.92 1.92L6.92 19z"/></g>
+<g id="compare"><path d="M10 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h5v2h2V1h-2v2zm0 15H5l5-6v6zm9-15h-5v2h5v13l-5-6v9h5c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></g>
+<g id="control-point"><path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/></g>
+<g id="control-point-duplicate"><path d="M16 8h-2v3h-3v2h3v3h2v-3h3v-2h-3zM2 12c0-2.79 1.64-5.2 4.01-6.32V3.52C2.52 4.76 0 8.09 0 12s2.52 7.24 6.01 8.48v-2.16C3.64 17.2 2 14.79 2 12zm13-9c-4.96 0-9 4.04-9 9s4.04 9 9 9 9-4.04 9-9-4.04-9-9-9zm0 16c-3.86 0-7-3.14-7-7s3.14-7 7-7 7 3.14 7 7-3.14 7-7 7z"/></g>
+<g id="crop"><path d="M17 15h2V7c0-1.1-.9-2-2-2H9v2h8v8zM7 17V1H5v4H1v2h4v10c0 1.1.9 2 2 2h10v4h2v-4h4v-2H7z"/></g>
+<g id="crop-16-9"><path d="M19 6H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H5V8h14v8z"/></g>
+<g id="crop-3-2"><path d="M19 4H5c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H5V6h14v12z"/></g>
+<g id="crop-5-4"><path d="M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 12H5V7h14v10z"/></g>
+<g id="crop-7-5"><path d="M19 7H5c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2zm0 8H5V9h14v6z"/></g>
+<g id="crop-din"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14z"/></g>
+<g id="crop-free"><path d="M3 5v4h2V5h4V3H5c-1.1 0-2 .9-2 2zm2 10H3v4c0 1.1.9 2 2 2h4v-2H5v-4zm14 4h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4zm0-16h-4v2h4v4h2V5c0-1.1-.9-2-2-2z"/></g>
+<g id="crop-landscape"><path d="M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 12H5V7h14v10z"/></g>
+<g id="crop-original"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zm-5.04-6.71l-2.75 3.54-1.96-2.36L6.5 17h11l-3.54-4.71z"/></g>
+<g id="crop-portrait"><path d="M17 3H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H7V5h10v14z"/></g>
+<g id="crop-square"><path d="M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H6V6h12v12z"/></g>
+<g id="dehaze"><path d="M2 15.5v2h20v-2H2zm0-5v2h20v-2H2zm0-5v2h20v-2H2z"/></g>
+<g id="details"><path d="M3 4l9 16 9-16H3zm3.38 2h11.25L12 16 6.38 6z"/></g>
+<g id="edit"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></g>
+<g id="exposure"><path d="M15 17v2h2v-2h2v-2h-2v-2h-2v2h-2v2h2zm5-15H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM5 5h6v2H5V5zm15 15H4L20 4v16z"/></g>
+<g id="exposure-neg-1"><path d="M4 11v2h8v-2H4zm15 7h-2V7.38L14 8.4V6.7L18.7 5h.3v13z"/></g>
+<g id="exposure-neg-2"><path d="M15.05 16.29l2.86-3.07c.38-.39.72-.79 1.04-1.18.32-.39.59-.78.82-1.17.23-.39.41-.78.54-1.17s.19-.79.19-1.18c0-.53-.09-1.02-.27-1.46-.18-.44-.44-.81-.78-1.11-.34-.31-.77-.54-1.26-.71-.51-.16-1.08-.24-1.72-.24-.69 0-1.31.11-1.85.32-.54.21-1 .51-1.36.88-.37.37-.65.8-.84 1.3-.18.47-.27.97-.28 1.5h2.14c.01-.31.05-.6.13-.87.09-.29.23-.54.4-.75.18-.21.41-.37.68-.49.27-.12.6-.18.96-.18.31 0 .58.05.81.15.23.1.43.25.59.43.16.18.28.4.37.65.08.25.13.52.13.81 0 .22-.03.43-.08.65-.06.22-.15.45-.29.7-.14.25-.32.53-.56.83-.23.3-.52.65-.88 1.03l-4.17 4.55V18H21v-1.71h-5.95zM2 11v2h8v-2H2z"/></g>
+<g id="exposure-plus-1"><path d="M10 7H8v4H4v2h4v4h2v-4h4v-2h-4V7zm10 11h-2V7.38L15 8.4V6.7L19.7 5h.3v13z"/></g>
+<g id="exposure-plus-2"><path d="M16.05 16.29l2.86-3.07c.38-.39.72-.79 1.04-1.18.32-.39.59-.78.82-1.17.23-.39.41-.78.54-1.17.13-.39.19-.79.19-1.18 0-.53-.09-1.02-.27-1.46-.18-.44-.44-.81-.78-1.11-.34-.31-.77-.54-1.26-.71-.51-.16-1.08-.24-1.72-.24-.69 0-1.31.11-1.85.32-.54.21-1 .51-1.36.88-.37.37-.65.8-.84 1.3-.18.47-.27.97-.28 1.5h2.14c.01-.31.05-.6.13-.87.09-.29.23-.54.4-.75.18-.21.41-.37.68-.49.27-.12.6-.18.96-.18.31 0 .58.05.81.15.23.1.43.25.59.43.16.18.28.4.37.65.08.25.13.52.13.81 0 .22-.03.43-.08.65-.06.22-.15.45-.29.7-.14.25-.32.53-.56.83-.23.3-.52.65-.88 1.03l-4.17 4.55V18H22v-1.71h-5.95zM8 7H6v4H2v2h4v4h2v-4h4v-2H8V7z"/></g>
+<g id="exposure-zero"><path d="M16.14 12.5c0 1-.1 1.85-.3 2.55-.2.7-.48 1.27-.83 1.7-.36.44-.79.75-1.3.95-.51.2-1.07.3-1.7.3-.62 0-1.18-.1-1.69-.3-.51-.2-.95-.51-1.31-.95-.36-.44-.65-1.01-.85-1.7-.2-.7-.3-1.55-.3-2.55v-2.04c0-1 .1-1.85.3-2.55.2-.7.48-1.26.84-1.69.36-.43.8-.74 1.31-.93C10.81 5.1 11.38 5 12 5c.63 0 1.19.1 1.7.29.51.19.95.5 1.31.93.36.43.64.99.84 1.69.2.7.3 1.54.3 2.55v2.04zm-2.11-2.36c0-.64-.05-1.18-.13-1.62-.09-.44-.22-.79-.4-1.06-.17-.27-.39-.46-.64-.58-.25-.13-.54-.19-.86-.19-.32 0-.61.06-.86.18s-.47.31-.64.58c-.17.27-.31.62-.4 1.06s-.13.98-.13 1.62v2.67c0 .64.05 1.18.14 1.62.09.45.23.81.4 1.09s.39.48.64.61.54.19.87.19c.33 0 .62-.06.87-.19s.46-.33.63-.61c.17-.28.3-.64.39-1.09.09-.45.13-.99.13-1.62v-2.66z"/></g>
+<g id="filter"><path d="M15.96 10.29l-2.75 3.54-1.96-2.36L8.5 15h11l-3.54-4.71zM3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"/></g>
+<g id="filter-1"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm11 10h2V5h-4v2h2v8zm7-14H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"/></g>
+<g id="filter-2"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zm-4-4h-4v-2h2c1.1 0 2-.89 2-2V7c0-1.11-.9-2-2-2h-4v2h4v2h-2c-1.1 0-2 .89-2 2v4h6v-2z"/></g>
+<g id="filter-3"><path d="M21 1H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zM3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm14 8v-1.5c0-.83-.67-1.5-1.5-1.5.83 0 1.5-.67 1.5-1.5V7c0-1.11-.9-2-2-2h-4v2h4v2h-2v2h2v2h-4v2h4c1.1 0 2-.89 2-2z"/></g>
+<g id="filter-4"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm12 10h2V5h-2v4h-2V5h-2v6h4v4zm6-14H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"/></g>
+<g id="filter-5"><path d="M21 1H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zM3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm14 8v-2c0-1.11-.9-2-2-2h-2V7h4V5h-6v6h4v2h-4v2h4c1.1 0 2-.89 2-2z"/></g>
+<g id="filter-6"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zm-8-2h2c1.1 0 2-.89 2-2v-2c0-1.11-.9-2-2-2h-2V7h4V5h-4c-1.1 0-2 .89-2 2v6c0 1.11.9 2 2 2zm0-4h2v2h-2v-2z"/></g>
+<g id="filter-7"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zm-8-2l4-8V5h-6v2h4l-4 8h2z"/></g>
+<g id="filter-8"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zm-8-2h2c1.1 0 2-.89 2-2v-1.5c0-.83-.67-1.5-1.5-1.5.83 0 1.5-.67 1.5-1.5V7c0-1.11-.9-2-2-2h-2c-1.1 0-2 .89-2 2v1.5c0 .83.67 1.5 1.5 1.5-.83 0-1.5.67-1.5 1.5V13c0 1.11.9 2 2 2zm0-8h2v2h-2V7zm0 4h2v2h-2v-2z"/></g>
+<g id="filter-9"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zM15 5h-2c-1.1 0-2 .89-2 2v2c0 1.11.9 2 2 2h2v2h-4v2h4c1.1 0 2-.89 2-2V7c0-1.11-.9-2-2-2zm0 4h-2V7h2v2z"/></g>
+<g id="filter-9-plus"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm11 7V8c0-1.11-.9-2-2-2h-1c-1.1 0-2 .89-2 2v1c0 1.11.9 2 2 2h1v1H9v2h3c1.1 0 2-.89 2-2zm-3-3V8h1v1h-1zm10-8H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 8h-2V7h-2v2h-2v2h2v2h2v-2h2v6H7V3h14v6z"/></g>
+<g id="filter-b-and-w"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16l-7-8v8H5l7-8V5h7v14z"/></g>
+<g id="filter-center-focus"><path d="M5 15H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2zm0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4zM12 9c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/></g>
+<g id="filter-drama"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.61 5.64 5.36 8.04 2.35 8.36 0 10.9 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4h2c0-2.76-1.86-5.08-4.4-5.78C8.61 6.88 10.2 6 12 6c3.03 0 5.5 2.47 5.5 5.5v.5H19c1.65 0 3 1.35 3 3s-1.35 3-3 3z"/></g>
+<g id="filter-frames"><path d="M20 4h-4l-4-4-4 4H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H4V6h4.52l3.52-3.5L15.52 6H20v14zM18 8H6v10h12"/></g>
+<g id="filter-hdr"><path d="M14 6l-3.75 5 2.85 3.8-1.6 1.2C9.81 13.75 7 10 7 10l-6 8h22L14 6z"/></g>
+<g id="filter-none"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"/></g>
+<g id="filter-tilt-shift"><path d="M11 4.07V2.05c-2.01.2-3.84 1-5.32 2.21L7.1 5.69c1.11-.86 2.44-1.44 3.9-1.62zm7.32.19C16.84 3.05 15.01 2.25 13 2.05v2.02c1.46.18 2.79.76 3.9 1.62l1.42-1.43zM19.93 11h2.02c-.2-2.01-1-3.84-2.21-5.32L18.31 7.1c.86 1.11 1.44 2.44 1.62 3.9zM5.69 7.1L4.26 5.68C3.05 7.16 2.25 8.99 2.05 11h2.02c.18-1.46.76-2.79 1.62-3.9zM4.07 13H2.05c.2 2.01 1 3.84 2.21 5.32l1.43-1.43c-.86-1.1-1.44-2.43-1.62-3.89zM15 12c0-1.66-1.34-3-3-3s-3 1.34-3 3 1.34 3 3 3 3-1.34 3-3zm3.31 4.9l1.43 1.43c1.21-1.48 2.01-3.32 2.21-5.32h-2.02c-.18 1.45-.76 2.78-1.62 3.89zM13 19.93v2.02c2.01-.2 3.84-1 5.32-2.21l-1.43-1.43c-1.1.86-2.43 1.44-3.89 1.62zm-7.32-.19C7.16 20.95 9 21.75 11 21.95v-2.02c-1.46-.18-2.79-.76-3.9-1.62l-1.42 1.43z"/></g>
+<g id="filter-vintage"><path d="M18.7 12.4c-.28-.16-.57-.29-.86-.4.29-.11.58-.24.86-.4 1.92-1.11 2.99-3.12 3-5.19-1.79-1.03-4.07-1.11-6 0-.28.16-.54.35-.78.54.05-.31.08-.63.08-.95 0-2.22-1.21-4.15-3-5.19C10.21 1.85 9 3.78 9 6c0 .32.03.64.08.95-.24-.2-.5-.39-.78-.55-1.92-1.11-4.2-1.03-6 0 0 2.07 1.07 4.08 3 5.19.28.16.57.29.86.4-.29.11-.58.24-.86.4-1.92 1.11-2.99 3.12-3 5.19 1.79 1.03 4.07 1.11 6 0 .28-.16.54-.35.78-.54-.05.32-.08.64-.08.96 0 2.22 1.21 4.15 3 5.19 1.79-1.04 3-2.97 3-5.19 0-.32-.03-.64-.08-.95.24.2.5.38.78.54 1.92 1.11 4.2 1.03 6 0-.01-2.07-1.08-4.08-3-5.19zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4z"/></g>
+<g id="flare"><path d="M7 11H1v2h6v-2zm2.17-3.24L7.05 5.64 5.64 7.05l2.12 2.12 1.41-1.41zM13 1h-2v6h2V1zm5.36 6.05l-1.41-1.41-2.12 2.12 1.41 1.41 2.12-2.12zM17 11v2h6v-2h-6zm-5-2c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3zm2.83 7.24l2.12 2.12 1.41-1.41-2.12-2.12-1.41 1.41zm-9.19.71l1.41 1.41 2.12-2.12-1.41-1.41-2.12 2.12zM11 23h2v-6h-2v6z"/></g>
+<g id="flash-auto"><path d="M3 2v12h3v9l7-12H9l4-9H3zm16 0h-2l-3.2 9h1.9l.7-2h3.2l.7 2h1.9L19 2zm-2.15 5.65L18 4l1.15 3.65h-2.3z"/></g>
+<g id="flash-off"><path d="M3.27 3L2 4.27l5 5V13h3v9l3.58-6.14L17.73 20 19 18.73 3.27 3zM17 10h-4l4-8H7v2.18l8.46 8.46L17 10z"/></g>
+<g id="flash-on"><path d="M7 2v11h3v9l7-12h-4l4-8z"/></g>
+<g id="flip"><path d="M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"/></g>
+<g id="gradient"><path d="M11 9h2v2h-2zm-2 2h2v2H9zm4 0h2v2h-2zm2-2h2v2h-2zM7 9h2v2H7zm12-6H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 18H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2zm2-7h-2v2h2v2h-2v-2h-2v2h-2v-2h-2v2H9v-2H7v2H5v-2h2v-2H5V5h14v6z"/></g>
+<g id="grain"><path d="M10 12c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zM6 8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12-8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm-4 8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm4-4c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-4-4c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-4-4c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></g>
+<g id="grid-off"><path d="M8 4v1.45l2 2V4h4v4h-3.45l2 2H14v1.45l2 2V10h4v4h-3.45l2 2H20v1.45l2 2V4c0-1.1-.9-2-2-2H4.55l2 2H8zm8 0h4v4h-4V4zM1.27 1.27L0 2.55l2 2V20c0 1.1.9 2 2 2h15.46l2 2 1.27-1.27L1.27 1.27zM10 12.55L11.45 14H10v-1.45zm-6-6L5.45 8H4V6.55zM8 20H4v-4h4v4zm0-6H4v-4h3.45l.55.55V14zm6 6h-4v-4h3.45l.55.54V20zm2 0v-1.46L17.46 20H16z"/></g>
+<g id="grid-on"><path d="M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 20H4v-4h4v4zm0-6H4v-4h4v4zm0-6H4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4z"/></g>
+<g id="hdr-off"><path d="M17.5 15v-2h1.1l.9 2H21l-.9-2.1c.5-.2.9-.8.9-1.4v-1c0-.8-.7-1.5-1.5-1.5H16v4.9l1.1 1.1h.4zm0-4.5h2v1h-2v-1zm-4.5 0v.4l1.5 1.5v-1.9c0-.8-.7-1.5-1.5-1.5h-1.9l1.5 1.5h.4zm-3.5-1l-7-7-1.1 1L6.9 9h-.4v2h-2V9H3v6h1.5v-2.5h2V15H8v-4.9l1.5 1.5V15h3.4l7.6 7.6 1.1-1.1-12.1-12z"/></g>
+<g id="hdr-on"><path d="M21 11.5v-1c0-.8-.7-1.5-1.5-1.5H16v6h1.5v-2h1.1l.9 2H21l-.9-2.1c.5-.3.9-.8.9-1.4zm-1.5 0h-2v-1h2v1zm-13-.5h-2V9H3v6h1.5v-2.5h2V15H8V9H6.5v2zM13 9H9.5v6H13c.8 0 1.5-.7 1.5-1.5v-3c0-.8-.7-1.5-1.5-1.5zm0 4.5h-2v-3h2v3z"/></g>
+<g id="hdr-strong"><path d="M17 6c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zM5 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"/></g>
+<g id="hdr-weak"><path d="M5 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm12-2c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm0 10c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4z"/></g>
+<g id="healing"><path d="M17.73 12.02l3.98-3.98c.39-.39.39-1.02 0-1.41l-4.34-4.34c-.39-.39-1.02-.39-1.41 0l-3.98 3.98L8 2.29C7.8 2.1 7.55 2 7.29 2c-.25 0-.51.1-.7.29L2.25 6.63c-.39.39-.39 1.02 0 1.41l3.98 3.98L2.25 16c-.39.39-.39 1.02 0 1.41l4.34 4.34c.39.39 1.02.39 1.41 0l3.98-3.98 3.98 3.98c.2.2.45.29.71.29.26 0 .51-.1.71-.29l4.34-4.34c.39-.39.39-1.02 0-1.41l-3.99-3.98zM12 9c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm-4.71 1.96L3.66 7.34l3.63-3.63 3.62 3.62-3.62 3.63zM10 13c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm2 2c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm2-4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm2.66 9.34l-3.63-3.62 3.63-3.63 3.62 3.62-3.62 3.63z"/></g>
+<g id="image"><path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"/></g>
+<g id="image-aspect-ratio"><path d="M16 10h-2v2h2v-2zm0 4h-2v2h2v-2zm-8-4H6v2h2v-2zm4 0h-2v2h2v-2zm8-6H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H4V6h16v12z"/></g>
+<g id="iso"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5.5 7.5h2v-2H9v2h2V9H9v2H7.5V9h-2V7.5zM19 19H5L19 5v14zm-2-2v-1.5h-5V17h5z"/></g>
+<g id="landscape"><path d="M14 6l-3.75 5 2.85 3.8-1.6 1.2C9.81 13.75 7 10 7 10l-6 8h22L14 6z"/></g>
+<g id="leak-add"><path d="M6 3H3v3c1.66 0 3-1.34 3-3zm8 0h-2c0 4.97-4.03 9-9 9v2c6.08 0 11-4.93 11-11zm-4 0H8c0 2.76-2.24 5-5 5v2c3.87 0 7-3.13 7-7zm0 18h2c0-4.97 4.03-9 9-9v-2c-6.07 0-11 4.93-11 11zm8 0h3v-3c-1.66 0-3 1.34-3 3zm-4 0h2c0-2.76 2.24-5 5-5v-2c-3.87 0-7 3.13-7 7z"/></g>
+<g id="leak-remove"><path d="M10 3H8c0 .37-.04.72-.12 1.06l1.59 1.59C9.81 4.84 10 3.94 10 3zM3 4.27l2.84 2.84C5.03 7.67 4.06 8 3 8v2c1.61 0 3.09-.55 4.27-1.46L8.7 9.97C7.14 11.24 5.16 12 3 12v2c2.71 0 5.19-.99 7.11-2.62l2.5 2.5C10.99 15.81 10 18.29 10 21h2c0-2.16.76-4.14 2.03-5.69l1.43 1.43C14.55 17.91 14 19.39 14 21h2c0-1.06.33-2.03.89-2.84L19.73 21 21 19.73 4.27 3 3 4.27zM14 3h-2c0 1.5-.37 2.91-1.02 4.16l1.46 1.46C13.42 6.98 14 5.06 14 3zm5.94 13.12c.34-.08.69-.12 1.06-.12v-2c-.94 0-1.84.19-2.66.52l1.6 1.6zm-4.56-4.56l1.46 1.46C18.09 12.37 19.5 12 21 12v-2c-2.06 0-3.98.58-5.62 1.56z"/></g>
+<g id="lens"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z"/></g>
+<g id="looks"><path d="M12 10c-3.86 0-7 3.14-7 7h2c0-2.76 2.24-5 5-5s5 2.24 5 5h2c0-3.86-3.14-7-7-7zm0-4C5.93 6 1 10.93 1 17h2c0-4.96 4.04-9 9-9s9 4.04 9 9h2c0-6.07-4.93-11-11-11z"/></g>
+<g id="looks-3"><path d="M19.01 3h-14c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 7.5c0 .83-.67 1.5-1.5 1.5.83 0 1.5.67 1.5 1.5V15c0 1.11-.9 2-2 2h-4v-2h4v-2h-2v-2h2V9h-4V7h4c1.1 0 2 .89 2 2v1.5z"/></g>
+<g id="looks-4"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 14h-2v-4H9V7h2v4h2V7h2v10z"/></g>
+<g id="looks-5"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 6h-4v2h2c1.1 0 2 .89 2 2v2c0 1.11-.9 2-2 2H9v-2h4v-2H9V7h6v2z"/></g>
+<g id="looks-6"><path d="M11 15h2v-2h-2v2zm8-12H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 6h-4v2h2c1.1 0 2 .89 2 2v2c0 1.11-.9 2-2 2h-2c-1.1 0-2-.89-2-2V9c0-1.11.9-2 2-2h4v2z"/></g>
+<g id="looks-one"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14h-2V9h-2V7h4v10z"/></g>
+<g id="looks-two"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 8c0 1.11-.9 2-2 2h-2v2h4v2H9v-4c0-1.11.9-2 2-2h2V9H9V7h4c1.1 0 2 .89 2 2v2z"/></g>
+<g id="loupe"><path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.49 2 2 6.49 2 12s4.49 10 10 10h8c1.1 0 2-.9 2-2v-8c0-5.51-4.49-10-10-10zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/></g>
+<g id="monochrome-photos"><path d="M20 5h-3.2L15 3H9L7.2 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 14h-8v-1c-2.8 0-5-2.2-5-5s2.2-5 5-5V7h8v12zm-3-6c0-2.8-2.2-5-5-5v1.8c1.8 0 3.2 1.4 3.2 3.2s-1.4 3.2-3.2 3.2V18c2.8 0 5-2.2 5-5zm-8.2 0c0 1.8 1.4 3.2 3.2 3.2V9.8c-1.8 0-3.2 1.4-3.2 3.2z"/></g>
+<g id="movie-creation"><path d="M18 4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4h-4z"/></g>
+<g id="music-note"><path d="M12 3v10.55c-.59-.34-1.27-.55-2-.55-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4V7h4V3h-6z"/></g>
+<g id="nature"><path d="M13 16.12c3.47-.41 6.17-3.36 6.17-6.95 0-3.87-3.13-7-7-7s-7 3.13-7 7c0 3.47 2.52 6.34 5.83 6.89V20H5v2h14v-2h-6v-3.88z"/></g>
+<g id="nature-people"><path d="M22.17 9.17c0-3.87-3.13-7-7-7s-7 3.13-7 7c0 3.47 2.52 6.34 5.83 6.89V20H6v-3h1v-4c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v4h1v5h16v-2h-3v-3.88c3.47-.41 6.17-3.36 6.17-6.95zM4.5 11c.83 0 1.5-.67 1.5-1.5S5.33 8 4.5 8 3 8.67 3 9.5 3.67 11 4.5 11z"/></g>
+<g id="navigate-before"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></g>
+<g id="navigate-next"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></g>
+<g id="palette"><path d="M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"/></g>
+<g id="panorama"><path d="M23 18V6c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zM8.5 12.5l2.5 3.01L14.5 11l4.5 6H5l3.5-4.5z"/></g>
+<g id="panorama-fish-eye"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/></g>
+<g id="panorama-horizontal"><path d="M20 6.54v10.91c-2.6-.77-5.28-1.16-8-1.16-2.72 0-5.4.39-8 1.16V6.54c2.6.77 5.28 1.16 8 1.16 2.72.01 5.4-.38 8-1.16M21.43 4c-.1 0-.2.02-.31.06C18.18 5.16 15.09 5.7 12 5.7c-3.09 0-6.18-.55-9.12-1.64-.11-.04-.22-.06-.31-.06-.34 0-.57.23-.57.63v14.75c0 .39.23.62.57.62.1 0 .2-.02.31-.06 2.94-1.1 6.03-1.64 9.12-1.64 3.09 0 6.18.55 9.12 1.64.11.04.21.06.31.06.33 0 .57-.23.57-.63V4.63c0-.4-.24-.63-.57-.63z"/></g>
+<g id="panorama-vertical"><path d="M19.94 21.12c-1.1-2.94-1.64-6.03-1.64-9.12 0-3.09.55-6.18 1.64-9.12.04-.11.06-.22.06-.31 0-.34-.23-.57-.63-.57H4.63c-.4 0-.63.23-.63.57 0 .1.02.2.06.31C5.16 5.82 5.71 8.91 5.71 12c0 3.09-.55 6.18-1.64 9.12-.05.11-.07.22-.07.31 0 .33.23.57.63.57h14.75c.39 0 .63-.24.63-.57-.01-.1-.03-.2-.07-.31zM6.54 20c.77-2.6 1.16-5.28 1.16-8 0-2.72-.39-5.4-1.16-8h10.91c-.77 2.6-1.16 5.28-1.16 8 0 2.72.39 5.4 1.16 8H6.54z"/></g>
+<g id="panorama-wide-angle"><path d="M12 6c2.45 0 4.71.2 7.29.64.47 1.78.71 3.58.71 5.36 0 1.78-.24 3.58-.71 5.36-2.58.44-4.84.64-7.29.64s-4.71-.2-7.29-.64C4.24 15.58 4 13.78 4 12c0-1.78.24-3.58.71-5.36C7.29 6.2 9.55 6 12 6m0-2c-2.73 0-5.22.24-7.95.72l-.93.16-.25.9C2.29 7.85 2 9.93 2 12s.29 4.15.87 6.22l.25.89.93.16c2.73.49 5.22.73 7.95.73s5.22-.24 7.95-.72l.93-.16.25-.89c.58-2.08.87-4.16.87-6.23s-.29-4.15-.87-6.22l-.25-.89-.93-.16C17.22 4.24 14.73 4 12 4z"/></g>
+<g id="photo"><path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"/></g>
+<g id="photo-album"><path d="M18 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 4h5v8l-2.5-1.5L6 12V4zm0 15l3-3.86 2.14 2.58 3-3.86L18 19H6z"/></g>
+<g id="photo-camera"><circle cx="12" cy="12" r="3.2"/><path d="M9 2L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z"/></g>
+<g id="photo-library"><path d="M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"/></g>
+<g id="photo-size-select-actual"><path d="M21 3H3C2 3 1 4 1 5v14c0 1.1.9 2 2 2h18c1 0 2-1 2-2V5c0-1-1-2-2-2zM5 17l3.5-4.5 2.5 3.01L14.5 11l4.5 6H5z"/></g>
+<g id="photo-size-select-large"><path d="M21 15h2v2h-2v-2zm0-4h2v2h-2v-2zm2 8h-2v2c1 0 2-1 2-2zM13 3h2v2h-2V3zm8 4h2v2h-2V7zm0-4v2h2c0-1-1-2-2-2zM1 7h2v2H1V7zm16-4h2v2h-2V3zm0 16h2v2h-2v-2zM3 3C2 3 1 4 1 5h2V3zm6 0h2v2H9V3zM5 3h2v2H5V3zm-4 8v8c0 1.1.9 2 2 2h12V11H1zm2 8l2.5-3.21 1.79 2.15 2.5-3.22L13 19H3z"/></g>
+<g id="photo-size-select-small"><path d="M23 15h-2v2h2v-2zm0-4h-2v2h2v-2zm0 8h-2v2c1 0 2-1 2-2zM15 3h-2v2h2V3zm8 4h-2v2h2V7zm-2-4v2h2c0-1-1-2-2-2zM3 21h8v-6H1v4c0 1.1.9 2 2 2zM3 7H1v2h2V7zm12 12h-2v2h2v-2zm4-16h-2v2h2V3zm0 16h-2v2h2v-2zM3 3C2 3 1 4 1 5h2V3zm0 8H1v2h2v-2zm8-8H9v2h2V3zM7 3H5v2h2V3z"/></g>
+<g id="picture-as-pdf"><path d="M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8.5 7.5c0 .83-.67 1.5-1.5 1.5H9v2H7.5V7H10c.83 0 1.5.67 1.5 1.5v1zm5 2c0 .83-.67 1.5-1.5 1.5h-2.5V7H15c.83 0 1.5.67 1.5 1.5v3zm4-3H19v1h1.5V11H19v2h-1.5V7h3v1.5zM9 9.5h1v-1H9v1zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm10 5.5h1v-3h-1v3z"/></g>
+<g id="portrait"><path d="M12 12.25c1.24 0 2.25-1.01 2.25-2.25S13.24 7.75 12 7.75 9.75 8.76 9.75 10s1.01 2.25 2.25 2.25zm4.5 4c0-1.5-3-2.25-4.5-2.25s-4.5.75-4.5 2.25V17h9v-.75zM19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14z"/></g>
+<g id="remove-red-eye"><path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/></g>
+<g id="rotate-90-degrees-ccw"><path d="M7.34 6.41L.86 12.9l6.49 6.48 6.49-6.48-6.5-6.49zM3.69 12.9l3.66-3.66L11 12.9l-3.66 3.66-3.65-3.66zm15.67-6.26C17.61 4.88 15.3 4 13 4V.76L8.76 5 13 9.24V6c1.79 0 3.58.68 4.95 2.05 2.73 2.73 2.73 7.17 0 9.9C16.58 19.32 14.79 20 13 20c-.97 0-1.94-.21-2.84-.61l-1.49 1.49C10.02 21.62 11.51 22 13 22c2.3 0 4.61-.88 6.36-2.64 3.52-3.51 3.52-9.21 0-12.72z"/></g>
+<g id="rotate-left"><path d="M7.11 8.53L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47zM6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47zm1.01 5.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32zM13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93z"/></g>
+<g id="rotate-right"><path d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/></g>
+<g id="slideshow"><path d="M10 8v8l5-4-5-4zm9-5H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14z"/></g>
+<g id="straighten"><path d="M21 6H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H3V8h2v4h2V8h2v4h2V8h2v4h2V8h2v4h2V8h2v8z"/></g>
+<g id="style"><path d="M2.53 19.65l1.34.56v-9.03l-2.43 5.86c-.41 1.02.08 2.19 1.09 2.61zm19.5-3.7L17.07 3.98c-.31-.75-1.04-1.21-1.81-1.23-.26 0-.53.04-.79.15L7.1 5.95c-.75.31-1.21 1.03-1.23 1.8-.01.27.04.54.15.8l4.96 11.97c.31.76 1.05 1.22 1.83 1.23.26 0 .52-.05.77-.15l7.36-3.05c1.02-.42 1.51-1.59 1.09-2.6zM7.88 8.75c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-2 11c0 1.1.9 2 2 2h1.45l-3.45-8.34v6.34z"/></g>
+<g id="switch-camera"><path d="M20 4h-3.17L15 2H9L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-5 11.5V13H9v2.5L5.5 12 9 8.5V11h6V8.5l3.5 3.5-3.5 3.5z"/></g>
+<g id="switch-video"><path d="M18 9.5V6c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h14c.55 0 1-.45 1-1v-3.5l4 4v-13l-4 4zm-5 6V13H7v2.5L3.5 12 7 8.5V11h6V8.5l3.5 3.5-3.5 3.5z"/></g>
+<g id="tag-faces"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5zm-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11zm3.5 6.5c2.33 0 4.31-1.46 5.11-3.5H6.89c.8 2.04 2.78 3.5 5.11 3.5z"/></g>
+<g id="texture"><path d="M19.51 3.08L3.08 19.51c.09.34.27.65.51.9.25.24.56.42.9.51L20.93 4.49c-.19-.69-.73-1.23-1.42-1.41zM11.88 3L3 11.88v2.83L14.71 3h-2.83zM5 3c-1.1 0-2 .9-2 2v2l4-4H5zm14 18c.55 0 1.05-.22 1.41-.59.37-.36.59-.86.59-1.41v-2l-4 4h2zm-9.71 0h2.83L21 12.12V9.29L9.29 21z"/></g>
+<g id="timelapse"><path d="M16.24 7.76C15.07 6.59 13.54 6 12 6v6l-4.24 4.24c2.34 2.34 6.14 2.34 8.49 0 2.34-2.34 2.34-6.14-.01-8.48zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/></g>
+<g id="timer"><path d="M15 1H9v2h6V1zm-4 13h2V8h-2v6zm8.03-6.61l1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM12 20c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"/></g>
+<g id="timer-10"><path d="M0 7.72V9.4l3-1V18h2V6h-.25L0 7.72zm23.78 6.65c-.14-.28-.35-.53-.63-.74-.28-.21-.61-.39-1.01-.53s-.85-.27-1.35-.38c-.35-.07-.64-.15-.87-.23-.23-.08-.41-.16-.55-.25-.14-.09-.23-.19-.28-.3-.05-.11-.08-.24-.08-.39 0-.14.03-.28.09-.41.06-.13.15-.25.27-.34.12-.1.27-.18.45-.24s.4-.09.64-.09c.25 0 .47.04.66.11.19.07.35.17.48.29.13.12.22.26.29.42.06.16.1.32.1.49h1.95c0-.39-.08-.75-.24-1.09-.16-.34-.39-.63-.69-.88-.3-.25-.66-.44-1.09-.59C21.49 9.07 21 9 20.46 9c-.51 0-.98.07-1.39.21-.41.14-.77.33-1.06.57-.29.24-.51.52-.67.84-.16.32-.23.65-.23 1.01s.08.69.23.96c.15.28.36.52.64.73.27.21.6.38.98.53.38.14.81.26 1.27.36.39.08.71.17.95.26s.43.19.57.29c.13.1.22.22.27.34.05.12.07.25.07.39 0 .32-.13.57-.4.77-.27.2-.66.29-1.17.29-.22 0-.43-.02-.64-.08-.21-.05-.4-.13-.56-.24-.17-.11-.3-.26-.41-.44-.11-.18-.17-.41-.18-.67h-1.89c0 .36.08.71.24 1.05.16.34.39.65.7.93.31.27.69.49 1.15.66.46.17.98.25 1.58.25.53 0 1.01-.06 1.44-.19.43-.13.8-.31 1.11-.54.31-.23.54-.51.71-.83.17-.32.25-.67.25-1.06-.02-.4-.09-.74-.24-1.02zm-9.96-7.32c-.34-.4-.75-.7-1.23-.88-.47-.18-1.01-.27-1.59-.27-.58 0-1.11.09-1.59.27-.48.18-.89.47-1.23.88-.34.41-.6.93-.79 1.59-.18.65-.28 1.45-.28 2.39v1.92c0 .94.09 1.74.28 2.39.19.66.45 1.19.8 1.6.34.41.75.71 1.23.89.48.18 1.01.28 1.59.28.59 0 1.12-.09 1.59-.28.48-.18.88-.48 1.22-.89.34-.41.6-.94.78-1.6.18-.65.28-1.45.28-2.39v-1.92c0-.94-.09-1.74-.28-2.39-.18-.66-.44-1.19-.78-1.59zm-.92 6.17c0 .6-.04 1.11-.12 1.53-.08.42-.2.76-.36 1.02-.16.26-.36.45-.59.57-.23.12-.51.18-.82.18-.3 0-.58-.06-.82-.18s-.44-.31-.6-.57c-.16-.26-.29-.6-.38-1.02-.09-.42-.13-.93-.13-1.53v-2.5c0-.6.04-1.11.13-1.52.09-.41.21-.74.38-1 .16-.25.36-.43.6-.55.24-.11.51-.17.81-.17.31 0 .58.06.81.17.24.11.44.29.6.55.16.25.29.58.37.99.08.41.13.92.13 1.52v2.51z"/></g>
+<g id="timer-3"><path d="M11.61 12.97c-.16-.24-.36-.46-.62-.65-.25-.19-.56-.35-.93-.48.3-.14.57-.3.8-.5.23-.2.42-.41.57-.64.15-.23.27-.46.34-.71.08-.24.11-.49.11-.73 0-.55-.09-1.04-.28-1.46-.18-.42-.44-.77-.78-1.06-.33-.28-.73-.5-1.2-.64-.45-.13-.97-.2-1.53-.2-.55 0-1.06.08-1.52.24-.47.17-.87.4-1.2.69-.33.29-.6.63-.78 1.03-.2.39-.29.83-.29 1.29h1.98c0-.26.05-.49.14-.69.09-.2.22-.38.38-.52.17-.14.36-.25.58-.33.22-.08.46-.12.73-.12.61 0 1.06.16 1.36.47.3.31.44.75.44 1.32 0 .27-.04.52-.12.74-.08.22-.21.41-.38.57-.17.16-.38.28-.63.37-.25.09-.55.13-.89.13H6.72v1.57H7.9c.34 0 .64.04.91.11.27.08.5.19.69.35.19.16.34.36.44.61.1.24.16.54.16.87 0 .62-.18 1.09-.53 1.42-.35.33-.84.49-1.45.49-.29 0-.56-.04-.8-.13-.24-.08-.44-.2-.61-.36-.17-.16-.3-.34-.39-.56-.09-.22-.14-.46-.14-.72H4.19c0 .55.11 1.03.32 1.45.21.42.5.77.86 1.05s.77.49 1.24.63.96.21 1.48.21c.57 0 1.09-.08 1.58-.23.49-.15.91-.38 1.26-.68.36-.3.64-.66.84-1.1.2-.43.3-.93.3-1.48 0-.29-.04-.58-.11-.86-.08-.25-.19-.51-.35-.76zm9.26 1.4c-.14-.28-.35-.53-.63-.74-.28-.21-.61-.39-1.01-.53s-.85-.27-1.35-.38c-.35-.07-.64-.15-.87-.23-.23-.08-.41-.16-.55-.25-.14-.09-.23-.19-.28-.3-.05-.11-.08-.24-.08-.39s.03-.28.09-.41c.06-.13.15-.25.27-.34.12-.1.27-.18.45-.24s.4-.09.64-.09c.25 0 .47.04.66.11.19.07.35.17.48.29.13.12.22.26.29.42.06.16.1.32.1.49h1.95c0-.39-.08-.75-.24-1.09-.16-.34-.39-.63-.69-.88-.3-.25-.66-.44-1.09-.59-.43-.15-.92-.22-1.46-.22-.51 0-.98.07-1.39.21-.41.14-.77.33-1.06.57-.29.24-.51.52-.67.84-.16.32-.23.65-.23 1.01s.08.68.23.96c.15.28.37.52.64.73.27.21.6.38.98.53.38.14.81.26 1.27.36.39.08.71.17.95.26s.43.19.57.29c.13.1.22.22.27.34.05.12.07.25.07.39 0 .32-.13.57-.4.77-.27.2-.66.29-1.17.29-.22 0-.43-.02-.64-.08-.21-.05-.4-.13-.56-.24-.17-.11-.3-.26-.41-.44-.11-.18-.17-.41-.18-.67h-1.89c0 .36.08.71.24 1.05.16.34.39.65.7.93.31.27.69.49 1.15.66.46.17.98.25 1.58.25.53 0 1.01-.06 1.44-.19.43-.13.8-.31 1.11-.54.31-.23.54-.51.71-.83.17-.32.25-.67.25-1.06-.02-.4-.09-.74-.24-1.02z"/></g>
+<g id="timer-off"><path d="M19.04 4.55l-1.42 1.42C16.07 4.74 14.12 4 12 4c-1.83 0-3.53.55-4.95 1.48l1.46 1.46C9.53 6.35 10.73 6 12 6c3.87 0 7 3.13 7 7 0 1.27-.35 2.47-.94 3.49l1.45 1.45C20.45 16.53 21 14.83 21 13c0-2.12-.74-4.07-1.97-5.61l1.42-1.42-1.41-1.42zM15 1H9v2h6V1zm-4 8.44l2 2V8h-2v1.44zM3.02 4L1.75 5.27 4.5 8.03C3.55 9.45 3 11.16 3 13c0 4.97 4.02 9 9 9 1.84 0 3.55-.55 4.98-1.5l2.5 2.5 1.27-1.27-7.71-7.71L3.02 4zM12 20c-3.87 0-7-3.13-7-7 0-1.28.35-2.48.95-3.52l9.56 9.56c-1.03.61-2.23.96-3.51.96z"/></g>
+<g id="tonality"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.94-.49-7-3.85-7-7.93s3.05-7.44 7-7.93v15.86zm2-15.86c1.03.13 2 .45 2.87.93H13v-.93zM13 7h5.24c.25.31.48.65.68 1H13V7zm0 3h6.74c.08.33.15.66.19 1H13v-1zm0 9.93V19h2.87c-.87.48-1.84.8-2.87.93zM18.24 17H13v-1h5.92c-.2.35-.43.69-.68 1zm1.5-3H13v-1h6.93c-.04.34-.11.67-.19 1z"/></g>
+<g id="transform"><path d="M22 18v-2H8V4h2L7 1 4 4h2v2H2v2h4v8c0 1.1.9 2 2 2h8v2h-2l3 3 3-3h-2v-2h4zM10 8h6v6h2V8c0-1.1-.9-2-2-2h-6v2z"/></g>
+<g id="tune"><path d="M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z"/></g>
+<g id="view-comfy"><path d="M3 9h4V5H3v4zm0 5h4v-4H3v4zm5 0h4v-4H8v4zm5 0h4v-4h-4v4zM8 9h4V5H8v4zm5-4v4h4V5h-4zm5 9h4v-4h-4v4zM3 19h4v-4H3v4zm5 0h4v-4H8v4zm5 0h4v-4h-4v4zm5 0h4v-4h-4v4zm0-14v4h4V5h-4z"/></g>
+<g id="view-compact"><path d="M3 19h6v-7H3v7zm7 0h12v-7H10v7zM3 5v6h19V5H3z"/></g>
+<g id="vignette"><path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-9 15c-4.42 0-8-2.69-8-6s3.58-6 8-6 8 2.69 8 6-3.58 6-8 6z"/></g>
+<g id="wb-auto"><path d="M6.85 12.65h2.3L8 9l-1.15 3.65zM22 7l-1.2 6.29L19.3 7h-1.6l-1.49 6.29L15 7h-.76C12.77 5.17 10.53 4 8 4c-4.42 0-8 3.58-8 8s3.58 8 8 8c3.13 0 5.84-1.81 7.15-4.43l.1.43H17l1.5-6.1L20 16h1.75l2.05-9H22zm-11.7 9l-.7-2H6.4l-.7 2H3.8L7 7h2l3.2 9h-1.9z"/></g>
+<g id="wb-cloudy"><path d="M19.36 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.64-4.96z"/></g>
+<g id="wb-incandescent"><path d="M3.55 18.54l1.41 1.41 1.79-1.8-1.41-1.41-1.79 1.8zM11 22.45h2V19.5h-2v2.95zM4 10.5H1v2h3v-2zm11-4.19V1.5H9v4.81C7.21 7.35 6 9.28 6 11.5c0 3.31 2.69 6 6 6s6-2.69 6-6c0-2.22-1.21-4.15-3-5.19zm5 4.19v2h3v-2h-3zm-2.76 7.66l1.79 1.8 1.41-1.41-1.8-1.79-1.4 1.4z"/></g>
+<g id="wb-iridescent"><path d="M5 14.5h14v-6H5v6zM11 .55V3.5h2V.55h-2zm8.04 2.5l-1.79 1.79 1.41 1.41 1.8-1.79-1.42-1.41zM13 22.45V19.5h-2v2.95h2zm7.45-3.91l-1.8-1.79-1.41 1.41 1.79 1.8 1.42-1.42zM3.55 4.46l1.79 1.79 1.41-1.41-1.79-1.79-1.41 1.41zm1.41 15.49l1.79-1.8-1.41-1.41-1.79 1.79 1.41 1.42z"/></g>
+<g id="wb-sunny"><path d="M6.76 4.84l-1.8-1.79-1.41 1.41 1.79 1.79 1.42-1.41zM4 10.5H1v2h3v-2zm9-9.95h-2V3.5h2V.55zm7.45 3.91l-1.41-1.41-1.79 1.79 1.41 1.41 1.79-1.79zm-3.21 13.7l1.79 1.8 1.41-1.41-1.8-1.79-1.4 1.4zM20 10.5v2h3v-2h-3zm-8-5c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm-1 16.95h2V19.5h-2v2.95zm-7.45-3.91l1.41 1.41 1.79-1.8-1.41-1.41-1.79 1.8z"/></g>
+</defs></svg>
+</iron-iconset-svg>
diff --git a/static/bower_components/iron-icons/index.html b/static/bower_components/iron-icons/index.html
new file mode 100644
index 0000000..95d1991
--- /dev/null
+++ b/static/bower_components/iron-icons/index.html
@@ -0,0 +1,25 @@
+<!doctype html>
+<!--
+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
+The complete set of authors may be found at http://polymer.github.io/AUTHORS
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
+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
+-->
+<html>
+<head>
+
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+ <script src="../webcomponentsjs/webcomponents-lite.js"></script>
+ <link rel="import" href="../iron-component-page/iron-component-page.html">
+
+</head>
+<body>
+
+ <iron-component-page></iron-component-page>
+
+</body>
+</html>
diff --git a/static/bower_components/iron-icons/iron-icons.html b/static/bower_components/iron-icons/iron-icons.html
new file mode 100644
index 0000000..922d4d8
--- /dev/null
+++ b/static/bower_components/iron-icons/iron-icons.html
@@ -0,0 +1,303 @@
+<!--
+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
+-->
+<!--
+`iron-icons` is a utility import that includes the definition for the `iron-icon` element, `iron-iconset-svg` element, as well as an import for the default icon set.
+
+The `iron-icons` directory also includes imports for additional icon sets that can be loaded into your project.
+
+Example loading icon set:
+
+ <link rel="import" href="../iron-icons/maps-icons.html">
+
+To use an icon from one of these sets, first prefix your `iron-icon` with the icon set name, followed by a colon, ":", and then the icon id.
+
+Example using the directions-bus icon from the maps icon set:
+
+ <iron-icon icon="maps:directions-bus"></iron-icon>
+
+
+See [iron-icon](#iron-icon) for more information about working with icons.
+
+See [iron-iconset](#iron-iconset) and [iron-iconset-svg](#iron-iconset-svg) for more information about how to create a custom iconset.
+
+@group Iron Elements
+@element iron-icons
+@demo demo/index.html
+-->
+
+<link rel="import" href="../iron-icon/iron-icon.html">
+<link rel="import" href="../iron-iconset-svg/iron-iconset-svg.html">
+<iron-iconset-svg name="icons" size="24">
+<svg><defs>
+<g id="3d-rotation"><path d="M7.52 21.48C4.25 19.94 1.91 16.76 1.55 13H.05C.56 19.16 5.71 24 12 24l.66-.03-3.81-3.81-1.33 1.32zm.89-6.52c-.19 0-.37-.03-.52-.08-.16-.06-.29-.13-.4-.24-.11-.1-.2-.22-.26-.37-.06-.14-.09-.3-.09-.47h-1.3c0 .36.07.68.21.95.14.27.33.5.56.69.24.18.51.32.82.41.3.1.62.15.96.15.37 0 .72-.05 1.03-.15.32-.1.6-.25.83-.44s.42-.43.55-.72c.13-.29.2-.61.2-.97 0-.19-.02-.38-.07-.56-.05-.18-.12-.35-.23-.51-.1-.16-.24-.3-.4-.43-.17-.13-.37-.23-.61-.31.2-.09.37-.2.52-.33.15-.13.27-.27.37-.42.1-.15.17-.3.22-.46.05-.16.07-.32.07-.48 0-.36-.06-.68-.18-.96-.12-.28-.29-.51-.51-.69-.2-.19-.47-.33-.77-.43C9.1 8.05 8.76 8 8.39 8c-.36 0-.69.05-1 .16-.3.11-.57.26-.79.45-.21.19-.38.41-.51.67-.12.26-.18.54-.18.85h1.3c0-.17.03-.32.09-.45s.14-.25.25-.34c.11-.09.23-.17.38-.22.15-.05.3-.08.48-.08.4 0 .7.1.89.31.19.2.29.49.29.86 0 .18-.03.34-.08.49-.05.15-.14.27-.25.37-.11.1-.25.18-.41.24-.16.06-.36.09-.58.09H7.5v1.03h.77c.22 0 .42.02.6.07s.33.13.45.23c.12.11.22.24.29.4.07.16.1.35.1.57 0 .41-.12.72-.35.93-.23.23-.55.33-.95.33zm8.55-5.92c-.32-.33-.7-.59-1.14-.77-.43-.18-.92-.27-1.46-.27H12v8h2.3c.55 0 1.06-.09 1.51-.27.45-.18.84-.43 1.16-.76.32-.33.57-.73.74-1.19.17-.47.26-.99.26-1.57v-.4c0-.58-.09-1.1-.26-1.57-.18-.47-.43-.87-.75-1.2zm-.39 3.16c0 .42-.05.79-.14 1.13-.1.33-.24.62-.43.85-.19.23-.43.41-.71.53-.29.12-.62.18-.99.18h-.91V9.12h.97c.72 0 1.27.23 1.64.69.38.46.57 1.12.57 1.99v.4zM12 0l-.66.03 3.81 3.81 1.33-1.33c3.27 1.55 5.61 4.72 5.96 8.48h1.5C23.44 4.84 18.29 0 12 0z"/></g>
+<g id="accessibility"><path d="M12 2c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm9 7h-6v13h-2v-6h-2v6H9V9H3V7h18v2z"/></g>
+<g id="account-balance"><path d="M4 10v7h3v-7H4zm6 0v7h3v-7h-3zM2 22h19v-3H2v3zm14-12v7h3v-7h-3zm-4.5-9L2 6v2h19V6l-9.5-5z"/></g>
+<g id="account-balance-wallet"><path d="M21 18v1c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2V5c0-1.1.89-2 2-2h14c1.1 0 2 .9 2 2v1h-9c-1.11 0-2 .9-2 2v8c0 1.1.89 2 2 2h9zm-9-2h10V8H12v8zm4-2.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"/></g>
+<g id="account-box"><path d="M3 5v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2zm12 4c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3zm-9 8c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1H6v-1z"/></g>
+<g id="account-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/></g>
+<g id="add"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></g>
+<g id="add-alert"><path d="M10.01 21.01c0 1.1.89 1.99 1.99 1.99s1.99-.89 1.99-1.99h-3.98zm8.87-4.19V11c0-3.25-2.25-5.97-5.29-6.69v-.72C13.59 2.71 12.88 2 12 2s-1.59.71-1.59 1.59v.72C7.37 5.03 5.12 7.75 5.12 11v5.82L3 18.94V20h18v-1.06l-2.12-2.12zM16 13.01h-3v3h-2v-3H8V11h3V8h2v3h3v2.01z"/></g>
+<g id="add-box"><path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"/></g>
+<g id="add-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"/></g>
+<g id="add-circle-outline"><path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/></g>
+<g id="add-shopping-cart"><path d="M11 9h2V6h3V4h-3V1h-2v3H8v2h3v3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-9.83-3.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25z"/></g>
+<g id="alarm"><path d="M22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12.5 8H11v6l4.75 2.85.75-1.23-4-2.37V8zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"/></g>
+<g id="alarm-add"><path d="M7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7zm1-11h-2v3H8v2h3v3h2v-3h3v-2h-3V9z"/></g>
+<g id="alarm-off"><path d="M12 6c3.87 0 7 3.13 7 7 0 .84-.16 1.65-.43 2.4l1.52 1.52c.58-1.19.91-2.51.91-3.92 0-4.97-4.03-9-9-9-1.41 0-2.73.33-3.92.91L9.6 6.43C10.35 6.16 11.16 6 12 6zm10-.28l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM2.92 2.29L1.65 3.57 2.98 4.9l-1.11.93 1.42 1.42 1.11-.94.8.8C3.83 8.69 3 10.75 3 13c0 4.97 4.02 9 9 9 2.25 0 4.31-.83 5.89-2.2l2.2 2.2 1.27-1.27L3.89 3.27l-.97-.98zm13.55 16.1C15.26 19.39 13.7 20 12 20c-3.87 0-7-3.13-7-7 0-1.7.61-3.26 1.61-4.47l9.86 9.86zM8.02 3.28L6.6 1.86l-.86.71 1.42 1.42.86-.71z"/></g>
+<g id="alarm-on"><path d="M22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7zm-1.46-5.47L8.41 12.4l-1.06 1.06 3.18 3.18 6-6-1.06-1.06-4.93 4.95z"/></g>
+<g id="android"><path d="M6 18c0 .55.45 1 1 1h1v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h2v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h1c.55 0 1-.45 1-1V8H6v10zM3.5 8C2.67 8 2 8.67 2 9.5v7c0 .83.67 1.5 1.5 1.5S5 17.33 5 16.5v-7C5 8.67 4.33 8 3.5 8zm17 0c-.83 0-1.5.67-1.5 1.5v7c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5v-7c0-.83-.67-1.5-1.5-1.5zm-4.97-5.84l1.3-1.3c.2-.2.2-.51 0-.71-.2-.2-.51-.2-.71 0l-1.48 1.48C13.85 1.23 12.95 1 12 1c-.96 0-1.86.23-2.66.63L7.85.15c-.2-.2-.51-.2-.71 0-.2.2-.2.51 0 .71l1.31 1.31C6.97 3.26 6 5.01 6 7h12c0-1.99-.97-3.75-2.47-4.84zM10 5H9V4h1v1zm5 0h-1V4h1v1z"/></g>
+<g id="announcement"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 9h-2V5h2v6zm0 4h-2v-2h2v2z"/></g>
+<g id="apps"><path d="M4 8h4V4H4v4zm6 12h4v-4h-4v4zm-6 0h4v-4H4v4zm0-6h4v-4H4v4zm6 0h4v-4h-4v4zm6-10v4h4V4h-4zm-6 4h4V4h-4v4zm6 6h4v-4h-4v4zm0 6h4v-4h-4v4z"/></g>
+<g id="archive"><path d="M20.54 5.23l-1.39-1.68C18.88 3.21 18.47 3 18 3H6c-.47 0-.88.21-1.16.55L3.46 5.23C3.17 5.57 3 6.02 3 6.5V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6.5c0-.48-.17-.93-.46-1.27zM12 17.5L6.5 12H10v-2h4v2h3.5L12 17.5zM5.12 5l.81-1h12l.94 1H5.12z"/></g>
+<g id="arrow-back"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></g>
+<g id="arrow-drop-down"><path d="M7 10l5 5 5-5z"/></g>
+<g id="arrow-drop-down-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 12l-4-4h8l-4 4z"/></g>
+<g id="arrow-drop-up"><path d="M7 14l5-5 5 5z"/></g>
+<g id="arrow-forward"><path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"/></g>
+<g id="aspect-ratio"><path d="M19 12h-2v3h-3v2h5v-5zM7 9h3V7H5v5h2V9zm14-6H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16.01H3V4.99h18v14.02z"/></g>
+<g id="assessment"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"/></g>
+<g id="assignment"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm2 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z"/></g>
+<g id="assignment-ind"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0 4c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H6v-1.4c0-2 4-3.1 6-3.1s6 1.1 6 3.1V19z"/></g>
+<g id="assignment-late"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-6 15h-2v-2h2v2zm0-4h-2V8h2v6zm-1-9c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"/></g>
+<g id="assignment-return"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm4 12h-4v3l-5-5 5-5v3h4v4z"/></g>
+<g id="assignment-returned"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0 15l-5-5h3V9h4v4h3l-5 5z"/></g>
+<g id="assignment-turned-in"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm-2 14l-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9l-8 8z"/></g>
+<g id="attachment"><path d="M7.5 18C4.46 18 2 15.54 2 12.5S4.46 7 7.5 7H18c2.21 0 4 1.79 4 4s-1.79 4-4 4H9.5C8.12 15 7 13.88 7 12.5S8.12 10 9.5 10H17v1.5H9.5c-.55 0-1 .45-1 1s.45 1 1 1H18c1.38 0 2.5-1.12 2.5-2.5S19.38 8.5 18 8.5H7.5c-2.21 0-4 1.79-4 4s1.79 4 4 4H17V18H7.5z"/></g>
+<g id="autorenew"><path d="M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"/></g>
+<g id="backspace"><path d="M22 3H7c-.69 0-1.23.35-1.59.88L0 12l5.41 8.11c.36.53.9.89 1.59.89h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-3 12.59L17.59 17 14 13.41 10.41 17 9 15.59 12.59 12 9 8.41 10.41 7 14 10.59 17.59 7 19 8.41 15.41 12 19 15.59z"/></g>
+<g id="backup"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"/></g>
+<g id="block"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12zm8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8z"/></g>
+<g id="book"><path d="M18 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 4h5v8l-2.5-1.5L6 12V4z"/></g>
+<g id="bookmark"><path d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2z"/></g>
+<g id="bookmark-border"><path d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2zm0 15l-5-2.18L7 18V5h10v13z"/></g>
+<g id="bug-report"><path d="M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-6 8h-4v-2h4v2zm0-4h-4v-2h4v2z"/></g>
+<g id="build"><path d="M22.7 19l-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4z"/></g>
+<g id="cached"><path d="M19 8l-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3l-4-4zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.57 4 12 4c-4.42 0-8 3.58-8 8H1l4 4 4-4H6z"/></g>
+<g id="camera-enhance"><path d="M9 3L7.17 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2h-3.17L15 3H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zM12 17l1.25-2.75L16 13l-2.75-1.25L12 9l-1.25 2.75L8 13l2.75 1.25z"/></g>
+<g id="cancel"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/></g>
+<g id="card-giftcard"><path d="M20 6h-2.18c.11-.31.18-.65.18-1 0-1.66-1.34-3-3-3-1.05 0-1.96.54-2.5 1.35l-.5.67-.5-.68C10.96 2.54 10.05 2 9 2 7.34 2 6 3.34 6 5c0 .35.07.69.18 1H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-5-2c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM9 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm11 15H4v-2h16v2zm0-5H4V8h5.08L7 10.83 8.62 12 11 8.76l1-1.36 1 1.36L15.38 12 17 10.83 14.92 8H20v6z"/></g>
+<g id="card-membership"><path d="M20 2H4c-1.11 0-2 .89-2 2v11c0 1.11.89 2 2 2h4v5l4-2 4 2v-5h4c1.11 0 2-.89 2-2V4c0-1.11-.89-2-2-2zm0 13H4v-2h16v2zm0-5H4V4h16v6z"/></g>
+<g id="card-travel"><path d="M20 6h-3V4c0-1.11-.89-2-2-2H9c-1.11 0-2 .89-2 2v2H4c-1.11 0-2 .89-2 2v11c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zM9 4h6v2H9V4zm11 15H4v-2h16v2zm0-5H4V8h3v2h2V8h6v2h2V8h3v6z"/></g>
+<g id="change-history"><path d="M12 7.77L18.39 18H5.61L12 7.77M12 4L2 20h20L12 4z"/></g>
+<g id="check"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></g>
+<g id="check-box"><path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></g>
+<g id="check-box-outline-blank"><path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></g>
+<g id="check-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></g>
+<g id="chevron-left"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></g>
+<g id="chevron-right"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></g>
+<g id="chrome-reader-mode"><path d="M13 12h7v1.5h-7zm0-2.5h7V11h-7zm0 5h7V16h-7zM21 4H3c-1.1 0-2 .9-2 2v13c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 15h-9V6h9v13z"/></g>
+<g id="class"><path d="M18 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 4h5v8l-2.5-1.5L6 12V4z"/></g>
+<g id="clear"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></g>
+<g id="close"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></g>
+<g id="cloud"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z"/></g>
+<g id="cloud-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.5 14H8c-1.66 0-3-1.34-3-3s1.34-3 3-3l.14.01C8.58 8.28 10.13 7 12 7c2.21 0 4 1.79 4 4h.5c1.38 0 2.5 1.12 2.5 2.5S17.88 16 16.5 16z"/></g>
+<g id="cloud-done"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM10 17l-3.5-3.5 1.41-1.41L10 14.17 15.18 9l1.41 1.41L10 17z"/></g>
+<g id="cloud-download"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z"/></g>
+<g id="cloud-off"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4c-1.48 0-2.85.43-4.01 1.17l1.46 1.46C10.21 6.23 11.08 6 12 6c3.04 0 5.5 2.46 5.5 5.5v.5H19c1.66 0 3 1.34 3 3 0 1.13-.64 2.11-1.56 2.62l1.45 1.45C23.16 18.16 24 16.68 24 15c0-2.64-2.05-4.78-4.65-4.96zM3 5.27l2.75 2.74C2.56 8.15 0 10.77 0 14c0 3.31 2.69 6 6 6h11.73l2 2L21 20.73 4.27 4 3 5.27zM7.73 10l8 8H6c-2.21 0-4-1.79-4-4s1.79-4 4-4h1.73z"/></g>
+<g id="cloud-queue"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4s1.79-4 4-4h.71C7.37 7.69 9.48 6 12 6c3.04 0 5.5 2.46 5.5 5.5v.5H19c1.66 0 3 1.34 3 3s-1.34 3-3 3z"/></g>
+<g id="cloud-upload"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"/></g>
+<g id="code"><path d="M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"/></g>
+<g id="content-copy"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></g>
+<g id="content-cut"><path d="M9.64 7.64c.23-.5.36-1.05.36-1.64 0-2.21-1.79-4-4-4S2 3.79 2 6s1.79 4 4 4c.59 0 1.14-.13 1.64-.36L10 12l-2.36 2.36C7.14 14.13 6.59 14 6 14c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4c0-.59-.13-1.14-.36-1.64L12 14l7 7h3v-1L9.64 7.64zM6 8c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2zm0 12c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2zm6-7.5c-.28 0-.5-.22-.5-.5s.22-.5.5-.5.5.22.5.5-.22.5-.5.5zM19 3l-6 6 2 2 7-7V3z"/></g>
+<g id="content-paste"><path d="M19 2h-4.18C14.4.84 13.3 0 12 0c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm7 18H5V4h2v3h10V4h2v16z"/></g>
+<g id="create"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></g>
+<g id="credit-card"><path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"/></g>
+<g id="dashboard"><path d="M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"/></g>
+<g id="delete"><path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"/></g>
+<g id="description"><path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z"/></g>
+<g id="dns"><path d="M20 13H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1zM7 19c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zM20 3H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zM7 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"/></g>
+<g id="done"><path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"/></g>
+<g id="done-all"><path d="M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z"/></g>
+<g id="drafts"><path d="M21.99 8c0-.72-.37-1.35-.94-1.7L12 1 2.95 6.3C2.38 6.65 2 7.28 2 8v10c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2l-.01-10zM12 13L3.74 7.84 12 3l8.26 4.84L12 13z"/></g>
+<g id="eject"><path d="M5 17h14v2H5zm7-12L5.33 15h13.34z"/></g>
+<g id="error"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/></g>
+<g id="error-outline"><path d="M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/></g>
+<g id="event"><path d="M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"/></g>
+<g id="event-seat"><defs><path id="a" d="M0 0h24v24H0V0z"/></defs><clipPath id="b"><use xlink:href="#a" overflow="visible"/></clipPath><path d="M4 18v3h3v-3h10v3h3v-6H4zm15-8h3v3h-3zM2 10h3v3H2zm15 3H7V5c0-1.1.9-2 2-2h6c1.1 0 2 .9 2 2v8z" clip-path="url(#b)"/></g>
+<g id="exit-to-app"><path d="M10.09 15.59L11.5 17l5-5-5-5-1.41 1.41L12.67 11H3v2h9.67l-2.58 2.59zM19 3H5c-1.11 0-2 .9-2 2v4h2V5h14v14H5v-4H3v4c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></g>
+<g id="expand-less"><path d="M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"/></g>
+<g id="expand-more"><path d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"/></g>
+<g id="explore"><path d="M12 10.9c-.61 0-1.1.49-1.1 1.1s.49 1.1 1.1 1.1c.61 0 1.1-.49 1.1-1.1s-.49-1.1-1.1-1.1zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm2.19 12.19L6 18l3.81-8.19L18 6l-3.81 8.19z"/></g>
+<g id="extension"><path d="M20.5 11H19V7c0-1.1-.9-2-2-2h-4V3.5C13 2.12 11.88 1 10.5 1S8 2.12 8 3.5V5H4c-1.1 0-1.99.9-1.99 2v3.8H3.5c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7H2V20c0 1.1.9 2 2 2h3.8v-1.5c0-1.49 1.21-2.7 2.7-2.7 1.49 0 2.7 1.21 2.7 2.7V22H17c1.1 0 2-.9 2-2v-4h1.5c1.38 0 2.5-1.12 2.5-2.5S21.88 11 20.5 11z"/></g>
+<g id="face"><path d="M9 11.75c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25zm6 0c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8 0-.29.02-.58.05-.86 2.36-1.05 4.23-2.98 5.21-5.37C11.07 8.33 14.05 10 17.42 10c.78 0 1.53-.09 2.25-.26.21.71.33 1.47.33 2.26 0 4.41-3.59 8-8 8z"/></g>
+<g id="favorite"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></g>
+<g id="favorite-border"><path d="M16.5 3c-1.74 0-3.41.81-4.5 2.09C10.91 3.81 9.24 3 7.5 3 4.42 3 2 5.42 2 8.5c0 3.78 3.4 6.86 8.55 11.54L12 21.35l1.45-1.32C18.6 15.36 22 12.28 22 8.5 22 5.42 19.58 3 16.5 3zm-4.4 15.55l-.1.1-.1-.1C7.14 14.24 4 11.39 4 8.5 4 6.5 5.5 5 7.5 5c1.54 0 3.04.99 3.57 2.36h1.87C13.46 5.99 14.96 5 16.5 5c2 0 3.5 1.5 3.5 3.5 0 2.89-3.14 5.74-7.9 10.05z"/></g>
+<g id="feedback"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 12h-2v-2h2v2zm0-4h-2V6h2v4z"/></g>
+<g id="file-download"><path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/></g>
+<g id="file-upload"><path d="M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z"/></g>
+<g id="filter-list"><path d="M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"/></g>
+<g id="find-in-page"><path d="M20 19.59V8l-6-6H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c.45 0 .85-.15 1.19-.4l-4.43-4.43c-.8.52-1.74.83-2.76.83-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5c0 1.02-.31 1.96-.83 2.75L20 19.59zM9 13c0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3-3 1.34-3 3z"/></g>
+<g id="find-replace"><path d="M11 6c1.38 0 2.63.56 3.54 1.46L12 10h6V4l-2.05 2.05C14.68 4.78 12.93 4 11 4c-3.53 0-6.43 2.61-6.92 6H6.1c.46-2.28 2.48-4 4.9-4zm5.64 9.14c.66-.9 1.12-1.97 1.28-3.14H15.9c-.46 2.28-2.48 4-4.9 4-1.38 0-2.63-.56-3.54-1.46L10 12H4v6l2.05-2.05C7.32 17.22 9.07 18 11 18c1.55 0 2.98-.51 4.14-1.36L20 21.49 21.49 20l-4.85-4.86z"/></g>
+<g id="flag"><path d="M14.4 6L14 4H5v17h2v-7h5.6l.4 2h7V6z"/></g>
+<g id="flight-land"><defs><path id="a" d="M0 0h24v24H0V0z"/></defs><defs><path id="c" d="M0 0h24v24H0V0z"/></defs><clipPath id="b"><use xlink:href="#a" overflow="visible"/></clipPath><clipPath id="d" clip-path="url(#b)"><use xlink:href="#c" overflow="visible"/></clipPath><path d="M2.5 19h19v2h-19zm7.18-5.73l4.35 1.16 5.31 1.42c.8.21 1.62-.26 1.84-1.06.21-.8-.26-1.62-1.06-1.84l-5.31-1.42-2.76-9.02L10.12 2v8.28L5.15 8.95l-.93-2.32-1.45-.39v5.17l1.6.43 5.31 1.43z" clip-path="url(#d)"/></g>
+<g id="flight-takeoff"><defs><path id="a" d="M0 0h24v24H0V0z"/></defs><clipPath id="b"><use xlink:href="#a" overflow="visible"/></clipPath><path d="M2.5 19h19v2h-19zm19.57-9.36c-.21-.8-1.04-1.28-1.84-1.06L14.92 10l-6.9-6.43-1.93.51 4.14 7.17-4.97 1.33-1.97-1.54-1.45.39 1.82 3.16.77 1.33 1.6-.43 5.31-1.42 4.35-1.16L21 11.49c.81-.23 1.28-1.05 1.07-1.85z" clip-path="url(#b)"/></g>
+<g id="flip-to-back"><path d="M9 7H7v2h2V7zm0 4H7v2h2v-2zm0-8c-1.11 0-2 .9-2 2h2V3zm4 12h-2v2h2v-2zm6-12v2h2c0-1.1-.9-2-2-2zm-6 0h-2v2h2V3zM9 17v-2H7c0 1.1.89 2 2 2zm10-4h2v-2h-2v2zm0-4h2V7h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zM5 7H3v12c0 1.1.89 2 2 2h12v-2H5V7zm10-2h2V3h-2v2zm0 12h2v-2h-2v2z"/></g>
+<g id="flip-to-front"><path d="M3 13h2v-2H3v2zm0 4h2v-2H3v2zm2 4v-2H3c0 1.1.89 2 2 2zM3 9h2V7H3v2zm12 12h2v-2h-2v2zm4-18H9c-1.11 0-2 .9-2 2v10c0 1.1.89 2 2 2h10c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 12H9V5h10v10zm-8 6h2v-2h-2v2zm-4 0h2v-2H7v2z"/></g>
+<g id="folder"><path d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"/></g>
+<g id="folder-open"><path d="M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z"/></g>
+<g id="folder-shared"><path d="M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-5 3c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm4 8h-8v-1c0-1.33 2.67-2 4-2s4 .67 4 2v1z"/></g>
+<g id="font-download"><path d="M9.93 13.5h4.14L12 7.98zM20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-4.05 16.5l-1.14-3H9.17l-1.12 3H5.96l5.11-13h1.86l5.11 13h-2.09z"/></g>
+<g id="forward"><path d="M12 8V4l8 8-8 8v-4H4V8z"/></g>
+<g id="fullscreen"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></g>
+<g id="fullscreen-exit"><path d="M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"/></g>
+<g id="gesture"><path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1H21v-2.5h-2.47c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3 5.12 3 3.97 4 3.72 4.25c-.36.36-.66.66-.88.93l1.75 1.71zm9.29 11.66c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"/></g>
+<g id="get-app"><path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/></g>
+<g id="gif"><defs><path id="a" d="M24 24H0V0h24v24z"/></defs><clipPath id="b"><use xlink:href="#a" overflow="visible"/></clipPath><path d="M11.5 9H13v6h-1.5zM9 9H6c-.6 0-1 .5-1 1v4c0 .5.4 1 1 1h3c.6 0 1-.5 1-1v-2H8.5v1.5h-2v-3H10V10c0-.5-.4-1-1-1zm10 1.5V9h-4.5v6H16v-2h2v-1.5h-2v-1z" clip-path="url(#b)"/></g>
+<g id="grade"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/></g>
+<g id="group-work"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM8 17.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zM9.5 8c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5S9.5 9.38 9.5 8zm6.5 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/></g>
+<g id="help"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"/></g>
+<g id="help-outline"><path d="M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4z"/></g>
+<g id="highlight-off"><path d="M14.59 8L12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41 14.59 8zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/></g>
+<g id="history"><path opacity=".9" d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"/></g>
+<g id="home"><path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></g>
+<g id="hourglass-empty"><path d="M6 2v6h.01L6 8.01 10 12l-4 4 .01.01H6V22h12v-5.99h-.01L18 16l-4-4 4-3.99-.01-.01H18V2H6zm10 14.5V20H8v-3.5l4-4 4 4zm-4-5l-4-4V4h8v3.5l-4 4z"/></g>
+<g id="hourglass-full"><path d="M6 2v6h.01L6 8.01 10 12l-4 4 .01.01H6V22h12v-5.99h-.01L18 16l-4-4 4-3.99-.01-.01H18V2H6z"/></g>
+<g id="http"><path d="M4.5 11h-2V9H1v6h1.5v-2.5h2V15H6V9H4.5v2zm2.5-.5h1.5V15H10v-4.5h1.5V9H7v1.5zm5.5 0H14V15h1.5v-4.5H17V9h-4.5v1.5zm9-1.5H18v6h1.5v-2h2c.8 0 1.5-.7 1.5-1.5v-1c0-.8-.7-1.5-1.5-1.5zm0 2.5h-2v-1h2v1z"/></g>
+<g id="https"><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"/></g>
+<g id="inbox"><path d="M19 3H4.99c-1.1 0-1.98.9-1.98 2L3 19c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 12h-4c0 1.66-1.34 3-3 3s-3-1.34-3-3H4.99V5H19v10zm-3-5h-2V7h-4v3H8l4 4 4-4z"/></g>
+<g id="indeterminate-check-box"><defs><path id="a" d="M0 0h24v24H0z"/></defs><clipPath id="b"><use xlink:href="#a" overflow="visible"/></clipPath><path clip-path="url(#b)" d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"/></g>
+<g id="info"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/></g>
+<g id="info-outline"><path d="M11 17h2v-6h-2v6zm1-15C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zM11 9h2V7h-2v2z"/></g>
+<g id="input"><path d="M21 3.01H3c-1.1 0-2 .9-2 2V9h2V4.99h18v14.03H3V15H1v4.01c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98v-14c0-1.11-.9-2-2-2zM11 16l4-4-4-4v3H1v2h10v3z"/></g>
+<g id="invert-colors"><path d="M17.66 7.93L12 2.27 6.34 7.93c-3.12 3.12-3.12 8.19 0 11.31C7.9 20.8 9.95 21.58 12 21.58c2.05 0 4.1-.78 5.66-2.34 3.12-3.12 3.12-8.19 0-11.31zM12 19.59c-1.6 0-3.11-.62-4.24-1.76C6.62 16.69 6 15.19 6 13.59s.62-3.11 1.76-4.24L12 5.1v14.49z"/></g>
+<g id="label"><path d="M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7v10c0 1.1.9 1.99 2 1.99L16 19c.67 0 1.27-.33 1.63-.84L22 12l-4.37-6.16z"/></g>
+<g id="label-outline"><path d="M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7v10c0 1.1.9 1.99 2 1.99L16 19c.67 0 1.27-.33 1.63-.84L22 12l-4.37-6.16zM16 17H5V7h11l3.55 5L16 17z"/></g>
+<g id="language"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"/></g>
+<g id="launch"><path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"/></g>
+<g id="link"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></g>
+<g id="list"><path d="M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z"/></g>
+<g id="lock"><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"/></g>
+<g id="lock-open"><path d="M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6h1.9c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm0 12H6V10h12v10z"/></g>
+<g id="lock-outline"><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6-5.1c1.71 0 3.1 1.39 3.1 3.1v2H9V6h-.1c0-1.71 1.39-3.1 3.1-3.1zM18 20H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"/></g>
+<g id="loyalty"><path d="M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7zm11.77 8.27L13 19.54l-4.27-4.27C8.28 14.81 8 14.19 8 13.5c0-1.38 1.12-2.5 2.5-2.5.69 0 1.32.28 1.77.74l.73.72.73-.73c.45-.45 1.08-.73 1.77-.73 1.38 0 2.5 1.12 2.5 2.5 0 .69-.28 1.32-.73 1.77z"/></g>
+<g id="mail"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></g>
+<g id="markunread"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></g>
+<g id="markunread-mailbox"><path d="M20 6H10v6H8V4h6V0H6v6H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2z"/></g>
+<g id="menu"><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></g>
+<g id="more-horiz"><path d="M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></g>
+<g id="more-vert"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></g>
+<g id="note-add"><path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 14h-3v3h-2v-3H8v-2h3v-3h2v3h3v2zm-3-7V3.5L18.5 9H13z"/></g>
+<g id="offline-pin"><defs><path id="a" d="M0 0h24v24H0V0z"/></defs><clipPath id="b"><use xlink:href="#a" overflow="visible"/></clipPath><path clip-path="url(#b)" d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm5 16H7v-2h10v2zm-6.7-4L7 10.7l1.4-1.4 1.9 1.9 5.3-5.3L17 7.3 10.3 14z"/></g>
+<g id="open-in-browser"><path d="M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h4v-2H5V8h14v10h-4v2h4c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2zm-7 6l-4 4h3v6h2v-6h3l-4-4z"/></g>
+<g id="open-in-new"><path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"/></g>
+<g id="open-with"><path d="M10 9h4V6h3l-5-5-5 5h3v3zm-1 1H6V7l-5 5 5 5v-3h3v-4zm14 2l-5-5v3h-3v4h3v3l5-5zm-9 3h-4v3H7l5 5 5-5h-3v-3z"/></g>
+<g id="pageview"><path d="M11.5 9C10.12 9 9 10.12 9 11.5s1.12 2.5 2.5 2.5 2.5-1.12 2.5-2.5S12.88 9 11.5 9zM20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-3.21 14.21l-2.91-2.91c-.69.44-1.51.7-2.39.7C9.01 16 7 13.99 7 11.5S9.01 7 11.5 7 16 9.01 16 11.5c0 .88-.26 1.69-.7 2.39l2.91 2.9-1.42 1.42z"/></g>
+<g id="payment"><path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"/></g>
+<g id="perm-camera-mic"><path d="M20 5h-3.17L15 3H9L7.17 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h7v-2.09c-2.83-.48-5-2.94-5-5.91h2c0 2.21 1.79 4 4 4s4-1.79 4-4h2c0 2.97-2.17 5.43-5 5.91V21h7c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-6 8c0 1.1-.9 2-2 2s-2-.9-2-2V9c0-1.1.9-2 2-2s2 .9 2 2v4z"/></g>
+<g id="perm-contact-calendar"><path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H6v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1z"/></g>
+<g id="perm-data-setting"><path d="M18.99 11.5c.34 0 .67.03 1 .07L20 0 0 20h11.56c-.04-.33-.07-.66-.07-1 0-4.14 3.36-7.5 7.5-7.5zm3.71 7.99c.02-.16.04-.32.04-.49 0-.17-.01-.33-.04-.49l1.06-.83c.09-.08.12-.21.06-.32l-1-1.73c-.06-.11-.19-.15-.31-.11l-1.24.5c-.26-.2-.54-.37-.85-.49l-.19-1.32c-.01-.12-.12-.21-.24-.21h-2c-.12 0-.23.09-.25.21l-.19 1.32c-.3.13-.59.29-.85.49l-1.24-.5c-.11-.04-.24 0-.31.11l-1 1.73c-.06.11-.04.24.06.32l1.06.83c-.02.16-.03.32-.03.49 0 .17.01.33.03.49l-1.06.83c-.09.08-.12.21-.06.32l1 1.73c.06.11.19.15.31.11l1.24-.5c.26.2.54.37.85.49l.19 1.32c.02.12.12.21.25.21h2c.12 0 .23-.09.25-.21l.19-1.32c.3-.13.59-.29.84-.49l1.25.5c.11.04.24 0 .31-.11l1-1.73c.06-.11.03-.24-.06-.32l-1.07-.83zm-3.71 1.01c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"/></g>
+<g id="perm-device-information"><path d="M13 7h-2v2h2V7zm0 4h-2v6h2v-6zm4-9.99L7 1c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM17 19H7V5h10v14z"/></g>
+<g id="perm-identity"><path d="M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4z"/></g>
+<g id="perm-media"><path d="M2 6H0v5h.01L0 20c0 1.1.9 2 2 2h18v-2H2V6zm20-2h-8l-2-2H6c-1.1 0-1.99.9-1.99 2L4 16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM7 15l4.5-6 3.5 4.51 2.5-3.01L21 15H7z"/></g>
+<g id="perm-phone-msg"><path d="M20 15.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.58l2.2-2.21c.28-.27.36-.66.25-1.01C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1zM12 3v10l3-3h6V3h-9z"/></g>
+<g id="perm-scan-wifi"><path d="M12 3C6.95 3 3.15 4.85 0 7.23L12 22 24 7.25C20.85 4.87 17.05 3 12 3zm1 13h-2v-6h2v6zm-2-8V6h2v2h-2z"/></g>
+<g id="picture-in-picture"><path d="M19 7h-8v6h8V7zm2-4H3c-1.1 0-2 .9-2 2v14c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98V5c0-1.1-.9-2-2-2zm0 16.01H3V4.98h18v14.03z"/></g>
+<g id="play-for-work"><path fill="#010101" d="M11 5v5.59H7.5l4.5 4.5 4.5-4.5H13V5h-2zm-5 9c0 3.31 2.69 6 6 6s6-2.69 6-6h-2c0 2.21-1.79 4-4 4s-4-1.79-4-4H6z"/></g>
+<g id="polymer"><path d="M19 4h-4L7.11 16.63 4.5 12 9 4H5L.5 12 5 20h4l7.89-12.63L19.5 12 15 20h4l4.5-8z"/></g>
+<g id="power-settings-new"><path d="M13 3h-2v10h2V3zm4.83 2.17l-1.42 1.42C17.99 7.86 19 9.81 19 12c0 3.87-3.13 7-7 7s-7-3.13-7-7c0-2.19 1.01-4.14 2.58-5.42L6.17 5.17C4.23 6.82 3 9.26 3 12c0 4.97 4.03 9 9 9s9-4.03 9-9c0-2.74-1.23-5.18-3.17-6.83z"/></g>
+<g id="print"><path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"/></g>
+<g id="query-builder"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zM12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"/></g>
+<g id="question-answer"><path d="M21 6h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1zm-4 6V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1z"/></g>
+<g id="radio-button-checked"><path d="M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/></g>
+<g id="radio-button-unchecked"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/></g>
+<g id="receipt"><path d="M18 17H6v-2h12v2zm0-4H6v-2h12v2zm0-4H6V7h12v2zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2v20z"/></g>
+<g id="redeem"><path d="M20 6h-2.18c.11-.31.18-.65.18-1 0-1.66-1.34-3-3-3-1.05 0-1.96.54-2.5 1.35l-.5.67-.5-.68C10.96 2.54 10.05 2 9 2 7.34 2 6 3.34 6 5c0 .35.07.69.18 1H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-5-2c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM9 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm11 15H4v-2h16v2zm0-5H4V8h5.08L7 10.83 8.62 12 11 8.76l1-1.36 1 1.36L15.38 12 17 10.83 14.92 8H20v6z"/></g>
+<g id="redo"><path d="M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></g>
+<g id="refresh"><path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"/></g>
+<g id="remove"><path d="M19 13H5v-2h14v2z"/></g>
+<g id="remove-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11H7v-2h10v2z"/></g>
+<g id="remove-circle-outline"><path d="M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/></g>
+<g id="reorder"><path d="M3 15h18v-2H3v2zm0 4h18v-2H3v2zm0-8h18V9H3v2zm0-6v2h18V5H3z"/></g>
+<g id="reply"><path d="M10 9V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z"/></g>
+<g id="reply-all"><path d="M7 8V5l-7 7 7 7v-3l-4-4 4-4zm6 1V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z"/></g>
+<g id="report"><path d="M15.73 3H8.27L3 8.27v7.46L8.27 21h7.46L21 15.73V8.27L15.73 3zM12 17.3c-.72 0-1.3-.58-1.3-1.3 0-.72.58-1.3 1.3-1.3.72 0 1.3.58 1.3 1.3 0 .72-.58 1.3-1.3 1.3zm1-4.3h-2V7h2v6z"/></g>
+<g id="report-problem"><path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"/></g>
+<g id="restore"><path d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"/></g>
+<g id="room"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/></g>
+<g id="save"><path d="M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"/></g>
+<g id="schedule"><path fill-opacity=".9" d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zM12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"/></g>
+<g id="search"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></g>
+<g id="select-all"><path d="M3 5h2V3c-1.1 0-2 .9-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2zM7 17h10V7H7v10zm2-8h6v6H9V9z"/></g>
+<g id="send"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></g>
+<g id="settings"><path d="M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z"/></g>
+<g id="settings-applications"><path d="M12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm7-7H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-1.75 9c0 .23-.02.46-.05.68l1.48 1.16c.13.11.17.3.08.45l-1.4 2.42c-.09.15-.27.21-.43.15l-1.74-.7c-.36.28-.76.51-1.18.69l-.26 1.85c-.03.17-.18.3-.35.3h-2.8c-.17 0-.32-.13-.35-.29l-.26-1.85c-.43-.18-.82-.41-1.18-.69l-1.74.7c-.16.06-.34 0-.43-.15l-1.4-2.42c-.09-.15-.05-.34.08-.45l1.48-1.16c-.03-.23-.05-.46-.05-.69 0-.23.02-.46.05-.68l-1.48-1.16c-.13-.11-.17-.3-.08-.45l1.4-2.42c.09-.15.27-.21.43-.15l1.74.7c.36-.28.76-.51 1.18-.69l.26-1.85c.03-.17.18-.3.35-.3h2.8c.17 0 .32.13.35.29l.26 1.85c.43.18.82.41 1.18.69l1.74-.7c.16-.06.34 0 .43.15l1.4 2.42c.09.15.05.34-.08.45l-1.48 1.16c.03.23.05.46.05.69z"/></g>
+<g id="settings-backup-restore"><path d="M14 12c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2zm-2-9c-4.97 0-9 4.03-9 9H0l4 4 4-4H5c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.51 0-2.91-.49-4.06-1.3l-1.42 1.44C8.04 20.3 9.94 21 12 21c4.97 0 9-4.03 9-9s-4.03-9-9-9z"/></g>
+<g id="settings-bluetooth"><path d="M11 24h2v-2h-2v2zm-4 0h2v-2H7v2zm8 0h2v-2h-2v2zm2.71-18.29L12 0h-1v7.59L6.41 3 5 4.41 10.59 10 5 15.59 6.41 17 11 12.41V20h1l5.71-5.71-4.3-4.29 4.3-4.29zM13 3.83l1.88 1.88L13 7.59V3.83zm1.88 10.46L13 16.17v-3.76l1.88 1.88z"/></g>
+<g id="settings-brightness"><path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16.01H3V4.99h18v14.02zM8 16h2.5l1.5 1.5 1.5-1.5H16v-2.5l1.5-1.5-1.5-1.5V8h-2.5L12 6.5 10.5 8H8v2.5L6.5 12 8 13.5V16zm4-7c1.66 0 3 1.34 3 3s-1.34 3-3 3V9z"/></g>
+<g id="settings-cell"><path d="M7 24h2v-2H7v2zm4 0h2v-2h-2v2zm4 0h2v-2h-2v2zM16 .01L8 0C6.9 0 6 .9 6 2v16c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V2c0-1.1-.9-1.99-2-1.99zM16 16H8V4h8v12z"/></g>
+<g id="settings-ethernet"><path d="M7.77 6.76L6.23 5.48.82 12l5.41 6.52 1.54-1.28L3.42 12l4.35-5.24zM7 13h2v-2H7v2zm10-2h-2v2h2v-2zm-6 2h2v-2h-2v2zm6.77-7.52l-1.54 1.28L20.58 12l-4.35 5.24 1.54 1.28L23.18 12l-5.41-6.52z"/></g>
+<g id="settings-input-antenna"><path d="M12 5c-3.87 0-7 3.13-7 7h2c0-2.76 2.24-5 5-5s5 2.24 5 5h2c0-3.87-3.13-7-7-7zm1 9.29c.88-.39 1.5-1.26 1.5-2.29 0-1.38-1.12-2.5-2.5-2.5S9.5 10.62 9.5 12c0 1.02.62 1.9 1.5 2.29v3.3L7.59 21 9 22.41l3-3 3 3L16.41 21 13 17.59v-3.3zM12 1C5.93 1 1 5.93 1 12h2c0-4.97 4.03-9 9-9s9 4.03 9 9h2c0-6.07-4.93-11-11-11z"/></g>
+<g id="settings-input-component"><path d="M5 2c0-.55-.45-1-1-1s-1 .45-1 1v4H1v6h6V6H5V2zm4 14c0 1.3.84 2.4 2 2.82V23h2v-4.18c1.16-.41 2-1.51 2-2.82v-2H9v2zm-8 0c0 1.3.84 2.4 2 2.82V23h2v-4.18C6.16 18.4 7 17.3 7 16v-2H1v2zM21 6V2c0-.55-.45-1-1-1s-1 .45-1 1v4h-2v6h6V6h-2zm-8-4c0-.55-.45-1-1-1s-1 .45-1 1v4H9v6h6V6h-2V2zm4 14c0 1.3.84 2.4 2 2.82V23h2v-4.18c1.16-.41 2-1.51 2-2.82v-2h-6v2z"/></g>
+<g id="settings-input-composite"><path d="M5 2c0-.55-.45-1-1-1s-1 .45-1 1v4H1v6h6V6H5V2zm4 14c0 1.3.84 2.4 2 2.82V23h2v-4.18c1.16-.41 2-1.51 2-2.82v-2H9v2zm-8 0c0 1.3.84 2.4 2 2.82V23h2v-4.18C6.16 18.4 7 17.3 7 16v-2H1v2zM21 6V2c0-.55-.45-1-1-1s-1 .45-1 1v4h-2v6h6V6h-2zm-8-4c0-.55-.45-1-1-1s-1 .45-1 1v4H9v6h6V6h-2V2zm4 14c0 1.3.84 2.4 2 2.82V23h2v-4.18c1.16-.41 2-1.51 2-2.82v-2h-6v2z"/></g>
+<g id="settings-input-hdmi"><path d="M18 7V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v3H5v6l3 6v3h8v-3l3-6V7h-1zM8 4h8v3h-2V5h-1v2h-2V5h-1v2H8V4z"/></g>
+<g id="settings-input-svideo"><path d="M8 11.5c0-.83-.67-1.5-1.5-1.5S5 10.67 5 11.5 5.67 13 6.5 13 8 12.33 8 11.5zm7-5c0-.83-.67-1.5-1.5-1.5h-3C9.67 5 9 5.67 9 6.5S9.67 8 10.5 8h3c.83 0 1.5-.67 1.5-1.5zM8.5 15c-.83 0-1.5.67-1.5 1.5S7.67 18 8.5 18s1.5-.67 1.5-1.5S9.33 15 8.5 15zM12 1C5.93 1 1 5.93 1 12s4.93 11 11 11 11-4.93 11-11S18.07 1 12 1zm0 20c-4.96 0-9-4.04-9-9s4.04-9 9-9 9 4.04 9 9-4.04 9-9 9zm5.5-11c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm-2 5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5z"/></g>
+<g id="settings-overscan"><path d="M12.01 5.5L10 8h4l-1.99-2.5zM18 10v4l2.5-1.99L18 10zM6 10l-2.5 2.01L6 14v-4zm8 6h-4l2.01 2.5L14 16zm7-13H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16.01H3V4.99h18v14.02z"/></g>
+<g id="settings-phone"><path d="M13 9h-2v2h2V9zm4 0h-2v2h2V9zm3 6.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.58l2.2-2.21c.28-.27.36-.66.25-1.01C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1zM19 9v2h2V9h-2z"/></g>
+<g id="settings-power"><path d="M7 24h2v-2H7v2zm4 0h2v-2h-2v2zm2-22h-2v10h2V2zm3.56 2.44l-1.45 1.45C16.84 6.94 18 8.83 18 11c0 3.31-2.69 6-6 6s-6-2.69-6-6c0-2.17 1.16-4.06 2.88-5.12L7.44 4.44C5.36 5.88 4 8.28 4 11c0 4.42 3.58 8 8 8s8-3.58 8-8c0-2.72-1.36-5.12-3.44-6.56zM15 24h2v-2h-2v2z"/></g>
+<g id="settings-remote"><path d="M15 9H9c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V10c0-.55-.45-1-1-1zm-3 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zM7.05 6.05l1.41 1.41C9.37 6.56 10.62 6 12 6s2.63.56 3.54 1.46l1.41-1.41C15.68 4.78 13.93 4 12 4s-3.68.78-4.95 2.05zM12 0C8.96 0 6.21 1.23 4.22 3.22l1.41 1.41C7.26 3.01 9.51 2 12 2s4.74 1.01 6.36 2.64l1.41-1.41C17.79 1.23 15.04 0 12 0z"/></g>
+<g id="settings-voice"><path d="M7 24h2v-2H7v2zm5-11c1.66 0 2.99-1.34 2.99-3L15 4c0-1.66-1.34-3-3-3S9 2.34 9 4v6c0 1.66 1.34 3 3 3zm-1 11h2v-2h-2v2zm4 0h2v-2h-2v2zm4-14h-1.7c0 3-2.54 5.1-5.3 5.1S6.7 13 6.7 10H5c0 3.41 2.72 6.23 6 6.72V20h2v-3.28c3.28-.49 6-3.31 6-6.72z"/></g>
+<g id="shop"><path d="M16 6V4c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H2v13c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6h-6zm-6-2h4v2h-4V4zM9 18V9l7.5 4L9 18z"/></g>
+<g id="shop-two"><path d="M3 9H1v11c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2H3V9zm15-4V3c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H5v11c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5h-5zm-6-2h4v2h-4V3zm0 12V8l5.5 3-5.5 4z"/></g>
+<g id="shopping-basket"><path d="M17.21 9l-4.38-6.56c-.19-.28-.51-.42-.83-.42-.32 0-.64.14-.83.43L6.79 9H2c-.55 0-1 .45-1 1 0 .09.01.18.04.27l2.54 9.27c.23.84 1 1.46 1.92 1.46h13c.92 0 1.69-.62 1.93-1.46l2.54-9.27L23 10c0-.55-.45-1-1-1h-4.79zM9 9l3-4.4L15 9H9zm3 8c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"/></g>
+<g id="shopping-cart"><path d="M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48 0-.55-.45-1-1-1H5.21l-.94-2H1zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"/></g>
+<g id="sort"><path d="M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"/></g>
+<g id="speaker-notes"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 14H6v-2h2v2zm0-3H6V9h2v2zm0-3H6V6h2v2zm7 6h-5v-2h5v2zm3-3h-8V9h8v2zm0-3h-8V6h8v2z"/></g>
+<g id="spellcheck"><path d="M12.45 16h2.09L9.43 3H7.57L2.46 16h2.09l1.12-3h5.64l1.14 3zm-6.02-5L8.5 5.48 10.57 11H6.43zm15.16.59l-8.09 8.09L9.83 16l-1.41 1.41 5.09 5.09L23 13l-1.41-1.41z"/></g>
+<g id="star"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/></g>
+<g id="star-border"><path d="M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"/></g>
+<g id="star-half"><path d="M22 9.74l-7.19-.62L12 2.5 9.19 9.13 2 9.74l5.46 4.73-1.64 7.03L12 17.77l6.18 3.73-1.63-7.03L22 9.74zM12 15.9V6.6l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.9z"/></g>
+<g id="stars"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm4.24 16L12 15.45 7.77 18l1.12-4.81-3.73-3.23 4.92-.42L12 5l1.92 4.53 4.92.42-3.73 3.23L16.23 18z"/></g>
+<g id="store"><path d="M20 4H4v2h16V4zm1 10v-2l-1-5H4l-1 5v2h1v6h10v-6h4v6h2v-6h1zm-9 4H6v-4h6v4z"/></g>
+<g id="subject"><path d="M14 17H4v2h10v-2zm6-8H4v2h16V9zM4 15h16v-2H4v2zM4 5v2h16V5H4z"/></g>
+<g id="supervisor-account"><path d="M16.5 12c1.38 0 2.49-1.12 2.49-2.5S17.88 7 16.5 7C15.12 7 14 8.12 14 9.5s1.12 2.5 2.5 2.5zM9 11c1.66 0 2.99-1.34 2.99-3S10.66 5 9 5C7.34 5 6 6.34 6 8s1.34 3 3 3zm7.5 3c-1.83 0-5.5.92-5.5 2.75V19h11v-2.25c0-1.83-3.67-2.75-5.5-2.75zM9 13c-2.33 0-7 1.17-7 3.5V19h7v-2.25c0-.85.33-2.34 2.37-3.47C10.5 13.1 9.66 13 9 13z"/></g>
+<g id="swap-horiz"><path d="M6.99 11L3 15l3.99 4v-3H14v-2H6.99v-3zM21 9l-3.99-4v3H10v2h7.01v3L21 9z"/></g>
+<g id="swap-vert"><path d="M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3L5 6.99h3V14h2V6.99h3L9 3z"/></g>
+<g id="swap-vertical-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM6.5 9L10 5.5 13.5 9H11v4H9V9H6.5zm11 6L14 18.5 10.5 15H13v-4h2v4h2.5z"/></g>
+<g id="system-update-alt"><path d="M12 16.5l4-4h-3v-9h-2v9H8l4 4zm9-13h-6v1.99h6v14.03H3V5.49h6V3.5H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2v-14c0-1.1-.9-2-2-2z"/></g>
+<g id="tab"><path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H3V5h10v4h8v10z"/></g>
+<g id="tab-unselected"><path d="M1 9h2V7H1v2zm0 4h2v-2H1v2zm0-8h2V3c-1.1 0-2 .9-2 2zm8 16h2v-2H9v2zm-8-4h2v-2H1v2zm2 4v-2H1c0 1.1.9 2 2 2zM21 3h-8v6h10V5c0-1.1-.9-2-2-2zm0 14h2v-2h-2v2zM9 5h2V3H9v2zM5 21h2v-2H5v2zM5 5h2V3H5v2zm16 16c1.1 0 2-.9 2-2h-2v2zm0-8h2v-2h-2v2zm-8 8h2v-2h-2v2zm4 0h2v-2h-2v2z"/></g>
+<g id="text-format"><path d="M5 17v2h14v-2H5zm4.5-4.2h5l.9 2.2h2.1L12.75 4h-1.5L6.5 15h2.1l.9-2.2zM12 5.98L13.87 11h-3.74L12 5.98z"/></g>
+<g id="theaters"><path d="M18 3v2h-2V3H8v2H6V3H4v18h2v-2h2v2h8v-2h2v2h2V3h-2zM8 17H6v-2h2v2zm0-4H6v-2h2v2zm0-4H6V7h2v2zm10 8h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V7h2v2z"/></g>
+<g id="thumb-down"><path d="M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v1.91l.01.01L1 14c0 1.1.9 2 2 2h6.31l-.95 4.57-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2zm4 0v12h4V3h-4z"/></g>
+<g id="thumb-up"><path d="M1 21h4V9H1v12zm22-11c0-1.1-.9-2-2-2h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 1 7.59 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-1.91l-.01-.01L23 10z"/></g>
+<g id="thumbs-up-down"><path d="M12 6c0-.55-.45-1-1-1H5.82l.66-3.18.02-.23c0-.31-.13-.59-.33-.8L5.38 0 .44 4.94C.17 5.21 0 5.59 0 6v6.5c0 .83.67 1.5 1.5 1.5h6.75c.62 0 1.15-.38 1.38-.91l2.26-5.29c.07-.17.11-.36.11-.55V6zm10.5 4h-6.75c-.62 0-1.15.38-1.38.91l-2.26 5.29c-.07.17-.11.36-.11.55V18c0 .55.45 1 1 1h5.18l-.66 3.18-.02.24c0 .31.13.59.33.8l.79.78 4.94-4.94c.27-.27.44-.65.44-1.06v-6.5c0-.83-.67-1.5-1.5-1.5z"/></g>
+<g id="toc"><path d="M3 9h14V7H3v2zm0 4h14v-2H3v2zm0 4h14v-2H3v2zm16 0h2v-2h-2v2zm0-10v2h2V7h-2zm0 6h2v-2h-2v2z"/></g>
+<g id="today"><path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"/></g>
+<g id="toll"><path d="M15 4c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6zM3 12c0-2.61 1.67-4.83 4-5.65V4.26C3.55 5.15 1 8.27 1 12s2.55 6.85 6 7.74v-2.09c-2.33-.82-4-3.04-4-5.65z"/></g>
+<g id="track-changes"><path fill="#231F20" d="M19.07 4.93l-1.41 1.41C19.1 7.79 20 9.79 20 12c0 4.42-3.58 8-8 8s-8-3.58-8-8c0-4.08 3.05-7.44 7-7.93v2.02C8.16 6.57 6 9.03 6 12c0 3.31 2.69 6 6 6s6-2.69 6-6c0-1.66-.67-3.16-1.76-4.24l-1.41 1.41C15.55 9.9 16 10.9 16 12c0 2.21-1.79 4-4 4s-4-1.79-4-4c0-1.86 1.28-3.41 3-3.86v2.14c-.6.35-1 .98-1 1.72 0 1.1.9 2 2 2s2-.9 2-2c0-.74-.4-1.38-1-1.72V2h-1C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10c0-2.76-1.12-5.26-2.93-7.07z"/></g>
+<g id="translate"><path d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"/></g>
+<g id="trending-down"><path d="M16 18l2.29-2.29-4.88-4.88-4 4L2 7.41 3.41 6l6 6 4-4 6.3 6.29L22 12v6z"/></g>
+<g id="trending-flat"><path d="M22 12l-4-4v3H3v2h15v3z"/></g>
+<g id="trending-up"><path d="M16 6l2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z"/></g>
+<g id="turned-in"><path d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2z"/></g>
+<g id="turned-in-not"><path d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2zm0 15l-5-2.18L7 18V5h10v13z"/></g>
+<g id="undo"><path d="M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></g>
+<g id="unfold-less"><path d="M7.41 18.59L8.83 20 12 16.83 15.17 20l1.41-1.41L12 14l-4.59 4.59zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10l4.59-4.59z"/></g>
+<g id="unfold-more"><path d="M12 5.83L15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z"/></g>
+<g id="verified-user"><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm-2 16l-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9l-8 8z"/></g>
+<g id="view-agenda"><path d="M20 13H3c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h17c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1zm0-10H3c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h17c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1z"/></g>
+<g id="view-array"><path d="M4 18h3V5H4v13zM18 5v13h3V5h-3zM8 18h9V5H8v13z"/></g>
+<g id="view-carousel"><path d="M7 19h10V4H7v15zm-5-2h4V6H2v11zM18 6v11h4V6h-4z"/></g>
+<g id="view-column"><path d="M10 18h5V5h-5v13zm-6 0h5V5H4v13zM16 5v13h5V5h-5z"/></g>
+<g id="view-day"><path d="M2 21h19v-3H2v3zM20 8H3c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h17c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1zM2 3v3h19V3H2z"/></g>
+<g id="view-headline"><path d="M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"/></g>
+<g id="view-list"><path d="M4 14h4v-4H4v4zm0 5h4v-4H4v4zM4 9h4V5H4v4zm5 5h12v-4H9v4zm0 5h12v-4H9v4zM9 5v4h12V5H9z"/></g>
+<g id="view-module"><path d="M4 11h5V5H4v6zm0 7h5v-6H4v6zm6 0h5v-6h-5v6zm6 0h5v-6h-5v6zm-6-7h5V5h-5v6zm6-6v6h5V5h-5z"/></g>
+<g id="view-quilt"><path d="M10 18h5v-6h-5v6zm-6 0h5V5H4v13zm12 0h5v-6h-5v6zM10 5v6h11V5H10z"/></g>
+<g id="view-stream"><path d="M4 18h17v-6H4v6zM4 5v6h17V5H4z"/></g>
+<g id="view-week"><path d="M6 5H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm14 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm-7 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1z"/></g>
+<g id="visibility"><path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/></g>
+<g id="visibility-off"><path d="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"/></g>
+<g id="warning"><path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"/></g>
+<g id="work"><path d="M20 6h-4V4c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-6 0h-4V4h4v2z"/></g>
+<g id="youtube-searched-for"><path d="M17.01 14h-.8l-.27-.27c.98-1.14 1.57-2.61 1.57-4.23 0-3.59-2.91-6.5-6.5-6.5s-6.5 3-6.5 6.5H2l3.84 4 4.16-4H6.51C6.51 7 8.53 5 11.01 5s4.5 2.01 4.5 4.5c0 2.48-2.02 4.5-4.5 4.5-.65 0-1.26-.14-1.82-.38L7.71 15.1c.97.57 2.09.9 3.3.9 1.61 0 3.08-.59 4.22-1.57l.27.27v.79l5.01 4.99L22 19l-4.99-5z"/></g>
+<g id="zoom-in"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></g>
+<g id="zoom-out"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z"/></g>
+</defs></svg>
+</iron-iconset-svg>
diff --git a/static/bower_components/iron-icons/maps-icons.html b/static/bower_components/iron-icons/maps-icons.html
new file mode 100644
index 0000000..008a0ef
--- /dev/null
+++ b/static/bower_components/iron-icons/maps-icons.html
@@ -0,0 +1,71 @@
+<!--
+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="../iron-icon/iron-icon.html">
+<link rel="import" href="../iron-iconset-svg/iron-iconset-svg.html">
+<iron-iconset-svg name="maps" size="24">
+<svg><defs>
+<g id="beenhere"><path d="M19 1H5c-1.1 0-1.99.9-1.99 2L3 15.93c0 .69.35 1.3.88 1.66L12 23l8.11-5.41c.53-.36.88-.97.88-1.66L21 3c0-1.1-.9-2-2-2zm-9 15l-5-5 1.41-1.41L10 13.17l7.59-7.59L19 7l-9 9z"/></g>
+<g id="directions"><path d="M21.71 11.29l-9-9c-.39-.39-1.02-.39-1.41 0l-9 9c-.39.39-.39 1.02 0 1.41l9 9c.39.39 1.02.39 1.41 0l9-9c.39-.38.39-1.01 0-1.41zM14 14.5V12h-4v3H8v-4c0-.55.45-1 1-1h5V7.5l3.5 3.5-3.5 3.5z"/></g>
+<g id="directions-bike"><path d="M15.5 5.5c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zM5 12c-2.8 0-5 2.2-5 5s2.2 5 5 5 5-2.2 5-5-2.2-5-5-5zm0 8.5c-1.9 0-3.5-1.6-3.5-3.5s1.6-3.5 3.5-3.5 3.5 1.6 3.5 3.5-1.6 3.5-3.5 3.5zm5.8-10l2.4-2.4.8.8c1.3 1.3 3 2.1 5.1 2.1V9c-1.5 0-2.7-.6-3.6-1.5l-1.9-1.9c-.5-.4-1-.6-1.6-.6s-1.1.2-1.4.6L7.8 8.4c-.4.4-.6.9-.6 1.4 0 .6.2 1.1.6 1.4L11 14v5h2v-6.2l-2.2-2.3zM19 12c-2.8 0-5 2.2-5 5s2.2 5 5 5 5-2.2 5-5-2.2-5-5-5zm0 8.5c-1.9 0-3.5-1.6-3.5-3.5s1.6-3.5 3.5-3.5 3.5 1.6 3.5 3.5-1.6 3.5-3.5 3.5z"/></g>
+<g id="directions-boat"><path d="M20 21c-1.39 0-2.78-.47-4-1.32-2.44 1.71-5.56 1.71-8 0C6.78 20.53 5.39 21 4 21H2v2h2c1.38 0 2.74-.35 4-.99 2.52 1.29 5.48 1.29 8 0 1.26.65 2.62.99 4 .99h2v-2h-2zM3.95 19H4c1.6 0 3.02-.88 4-2 .98 1.12 2.4 2 4 2s3.02-.88 4-2c.98 1.12 2.4 2 4 2h.05l1.89-6.68c.08-.26.06-.54-.06-.78s-.34-.42-.6-.5L20 10.62V6c0-1.1-.9-2-2-2h-3V1H9v3H6c-1.1 0-2 .9-2 2v4.62l-1.29.42c-.26.08-.48.26-.6.5s-.15.52-.06.78L3.95 19zM6 6h12v3.97L12 8 6 9.97V6z"/></g>
+<g id="directions-bus"><path d="M4 16c0 .88.39 1.67 1 2.22V20c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h8v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1.78c.61-.55 1-1.34 1-2.22V6c0-3.5-3.58-4-8-4s-8 .5-8 4v10zm3.5 1c-.83 0-1.5-.67-1.5-1.5S6.67 14 7.5 14s1.5.67 1.5 1.5S8.33 17 7.5 17zm9 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm1.5-6H6V6h12v5z"/></g>
+<g id="directions-car"><path d="M18.92 6.01C18.72 5.42 18.16 5 17.5 5h-11c-.66 0-1.21.42-1.42 1.01L3 12v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-8l-2.08-5.99zM6.5 16c-.83 0-1.5-.67-1.5-1.5S5.67 13 6.5 13s1.5.67 1.5 1.5S7.33 16 6.5 16zm11 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM5 11l1.5-4.5h11L19 11H5z"/></g>
+<g id="directions-railway"><path d="M4 15.5C4 17.43 5.57 19 7.5 19L6 20.5v.5h12v-.5L16.5 19c1.93 0 3.5-1.57 3.5-3.5V5c0-3.5-3.58-4-8-4s-8 .5-8 4v10.5zm8 1.5c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm6-7H6V5h12v5z"/></g>
+<g id="directions-run"><path d="M13.49 5.48c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm-3.6 13.9l1-4.4 2.1 2v6h2v-7.5l-2.1-2 .6-3c1.3 1.5 3.3 2.5 5.5 2.5v-2c-1.9 0-3.5-1-4.3-2.4l-1-1.6c-.4-.6-1-1-1.7-1-.3 0-.5.1-.8.1l-5.2 2.2v4.7h2v-3.4l1.8-.7-1.6 8.1-4.9-1-.4 2 7 1.4z"/></g>
+<g id="directions-subway"><path d="M12 2c-4.42 0-8 .5-8 4v9.5C4 17.43 5.57 19 7.5 19L6 20.5v.5h12v-.5L16.5 19c1.93 0 3.5-1.57 3.5-3.5V6c0-3.5-3.58-4-8-4zM7.5 17c-.83 0-1.5-.67-1.5-1.5S6.67 14 7.5 14s1.5.67 1.5 1.5S8.33 17 7.5 17zm3.5-6H6V6h5v5zm5.5 6c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm1.5-6h-5V6h5v5z"/></g>
+<g id="directions-transit"><path d="M12 2c-4.42 0-8 .5-8 4v9.5C4 17.43 5.57 19 7.5 19L6 20.5v.5h12v-.5L16.5 19c1.93 0 3.5-1.57 3.5-3.5V6c0-3.5-3.58-4-8-4zM7.5 17c-.83 0-1.5-.67-1.5-1.5S6.67 14 7.5 14s1.5.67 1.5 1.5S8.33 17 7.5 17zm3.5-6H6V6h5v5zm5.5 6c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm1.5-6h-5V6h5v5z"/></g>
+<g id="directions-walk"><path d="M13.5 5.5c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zM9.8 8.9L7 23h2.1l1.8-8 2.1 2v6h2v-7.5l-2.1-2 .6-3C14.8 12 16.8 13 19 13v-2c-1.9 0-3.5-1-4.3-2.4l-1-1.6c-.4-.6-1-1-1.7-1-.3 0-.5.1-.8.1L6 8.3V13h2V9.6l1.8-.7"/></g>
+<g id="flight"><path d="M10.18 9"/><path d="M21 16v-2l-8-5V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5z"/></g>
+<g id="hotel"><path d="M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3zm12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4z"/></g>
+<g id="layers"><path d="M11.99 18.54l-7.37-5.73L3 14.07l9 7 9-7-1.63-1.27-7.38 5.74zM12 16l7.36-5.73L21 9l-9-7-9 7 1.63 1.27L12 16z"/></g>
+<g id="layers-clear"><path d="M19.81 14.99l1.19-.92-1.43-1.43-1.19.92 1.43 1.43zm-.45-4.72L21 9l-9-7-2.91 2.27 7.87 7.88 2.4-1.88zM3.27 1L2 2.27l4.22 4.22L3 9l1.63 1.27L12 16l2.1-1.63 1.43 1.43L12 18.54l-7.37-5.73L3 14.07l9 7 4.95-3.85L20.73 21 22 19.73 3.27 1z"/></g>
+<g id="local-activity"><path d="M20 12c0-1.1.9-2 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-1.99.9-1.99 2v4c1.1 0 1.99.9 1.99 2s-.89 2-2 2v4c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-4c-1.1 0-2-.9-2-2zm-4.42 4.8L12 14.5l-3.58 2.3 1.08-4.12-3.29-2.69 4.24-.25L12 5.8l1.54 3.95 4.24.25-3.29 2.69 1.09 4.11z"/></g>
+<g id="local-airport"><path d="M21 16v-2l-8-5V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5z"/></g>
+<g id="local-atm"><path d="M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"/></g>
+<g id="local-bar"><path d="M11 13v6H6v2h12v-2h-5v-6l8-8V3H3v2l8 8zM7.5 7l-2-2h13l-2 2h-9z"/></g>
+<g id="local-cafe"><path d="M20 3H4v10c0 2.21 1.79 4 4 4h6c2.21 0 4-1.79 4-4v-3h2c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2zm0 5h-2V5h2v3zM2 21h18v-2H2v2z"/></g>
+<g id="local-car-wash"><path d="M17 5c.83 0 1.5-.67 1.5-1.5 0-1-1.5-2.7-1.5-2.7s-1.5 1.7-1.5 2.7c0 .83.67 1.5 1.5 1.5zm-5 0c.83 0 1.5-.67 1.5-1.5 0-1-1.5-2.7-1.5-2.7s-1.5 1.7-1.5 2.7c0 .83.67 1.5 1.5 1.5zM7 5c.83 0 1.5-.67 1.5-1.5C8.5 2.5 7 .8 7 .8S5.5 2.5 5.5 3.5C5.5 4.33 6.17 5 7 5zm11.92 3.01C18.72 7.42 18.16 7 17.5 7h-11c-.66 0-1.21.42-1.42 1.01L3 14v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-8l-2.08-5.99zM6.5 18c-.83 0-1.5-.67-1.5-1.5S5.67 15 6.5 15s1.5.67 1.5 1.5S7.33 18 6.5 18zm11 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM5 13l1.5-4.5h11L19 13H5z"/></g>
+<g id="local-convenience-store"><path d="M19 7V4H5v3H2v13h8v-4h4v4h8V7h-3zm-8 3H9v1h2v1H8V9h2V8H8V7h3v3zm5 2h-1v-2h-2V7h1v2h1V7h1v5z"/></g>
+<g id="local-dining"><path d="M8.1 13.34l2.83-2.83L3.91 3.5c-1.56 1.56-1.56 4.09 0 5.66l4.19 4.18zm6.78-1.81c1.53.71 3.68.21 5.27-1.38 1.91-1.91 2.28-4.65.81-6.12-1.46-1.46-4.2-1.1-6.12.81-1.59 1.59-2.09 3.74-1.38 5.27L3.7 19.87l1.41 1.41L12 14.41l6.88 6.88 1.41-1.41L13.41 13l1.47-1.47z"/></g>
+<g id="local-drink"><path d="M3 2l2.01 18.23C5.13 21.23 5.97 22 7 22h10c1.03 0 1.87-.77 1.99-1.77L21 2H3zm9 17c-1.66 0-3-1.34-3-3 0-2 3-5.4 3-5.4s3 3.4 3 5.4c0 1.66-1.34 3-3 3zm6.33-11H5.67l-.44-4h13.53l-.43 4z"/></g>
+<g id="local-florist"><path d="M12 22c4.97 0 9-4.03 9-9-4.97 0-9 4.03-9 9zM5.6 10.25c0 1.38 1.12 2.5 2.5 2.5.53 0 1.01-.16 1.42-.44l-.02.19c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5l-.02-.19c.4.28.89.44 1.42.44 1.38 0 2.5-1.12 2.5-2.5 0-1-.59-1.85-1.43-2.25.84-.4 1.43-1.25 1.43-2.25 0-1.38-1.12-2.5-2.5-2.5-.53 0-1.01.16-1.42.44l.02-.19C14.5 2.12 13.38 1 12 1S9.5 2.12 9.5 3.5l.02.19c-.4-.28-.89-.44-1.42-.44-1.38 0-2.5 1.12-2.5 2.5 0 1 .59 1.85 1.43 2.25-.84.4-1.43 1.25-1.43 2.25zM12 5.5c1.38 0 2.5 1.12 2.5 2.5s-1.12 2.5-2.5 2.5S9.5 9.38 9.5 8s1.12-2.5 2.5-2.5zM3 13c0 4.97 4.03 9 9 9 0-4.97-4.03-9-9-9z"/></g>
+<g id="local-gas-station"><path d="M19.77 7.23l.01-.01-3.72-3.72L15 4.56l2.11 2.11c-.94.36-1.61 1.26-1.61 2.33 0 1.38 1.12 2.5 2.5 2.5.36 0 .69-.08 1-.21v7.21c0 .55-.45 1-1 1s-1-.45-1-1V14c0-1.1-.9-2-2-2h-1V5c0-1.1-.9-2-2-2H6c-1.1 0-2 .9-2 2v16h10v-7.5h1.5v5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V9c0-.69-.28-1.32-.73-1.77zM12 10H6V5h6v5zm6 0c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"/></g>
+<g id="local-grocery-store"><path d="M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48 0-.55-.45-1-1-1H5.21l-.94-2H1zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"/></g>
+<g id="local-hospital"><path d="M19 3H5c-1.1 0-1.99.9-1.99 2L3 19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-1 11h-4v4h-4v-4H6v-4h4V6h4v4h4v4z"/></g>
+<g id="local-hotel"><path d="M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3zm12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4z"/></g>
+<g id="local-laundry-service"><path d="M9.17 16.83c1.56 1.56 4.1 1.56 5.66 0 1.56-1.56 1.56-4.1 0-5.66l-5.66 5.66zM18 2.01L6 2c-1.11 0-2 .89-2 2v16c0 1.11.89 2 2 2h12c1.11 0 2-.89 2-2V4c0-1.11-.89-1.99-2-1.99zM10 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM7 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm5 16c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6z"/></g>
+<g id="local-library"><path d="M12 11.55C9.64 9.35 6.48 8 3 8v11c3.48 0 6.64 1.35 9 3.55 2.36-2.19 5.52-3.55 9-3.55V8c-3.48 0-6.64 1.35-9 3.55zM12 8c1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3 1.34 3 3 3z"/></g>
+<g id="local-mall"><path d="M19 6h-2c0-2.76-2.24-5-5-5S7 3.24 7 6H5c-1.1 0-1.99.9-1.99 2L3 20c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-7-3c1.66 0 3 1.34 3 3H9c0-1.66 1.34-3 3-3zm0 10c-2.76 0-5-2.24-5-5h2c0 1.66 1.34 3 3 3s3-1.34 3-3h2c0 2.76-2.24 5-5 5z"/></g>
+<g id="local-movies"><path d="M18 3v2h-2V3H8v2H6V3H4v18h2v-2h2v2h8v-2h2v2h2V3h-2zM8 17H6v-2h2v2zm0-4H6v-2h2v2zm0-4H6V7h2v2zm10 8h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V7h2v2z"/></g>
+<g id="local-offer"><path d="M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7z"/></g>
+<g id="local-parking"><path d="M13 3H6v18h4v-6h3c3.31 0 6-2.69 6-6s-2.69-6-6-6zm.2 8H10V7h3.2c1.1 0 2 .9 2 2s-.9 2-2 2z"/></g>
+<g id="local-pharmacy"><path d="M21 5h-2.64l1.14-3.14L17.15 1l-1.46 4H3v2l2 6-2 6v2h18v-2l-2-6 2-6V5zm-5 9h-3v3h-2v-3H8v-2h3V9h2v3h3v2z"/></g>
+<g id="local-phone"><path d="M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z"/></g>
+<g id="local-pizza"><path d="M12 2C8.43 2 5.23 3.54 3.01 6L12 22l8.99-16C18.78 3.55 15.57 2 12 2zM7 7c0-1.1.9-2 2-2s2 .9 2 2-.9 2-2 2-2-.9-2-2zm5 8c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"/></g>
+<g id="local-play"><path d="M20 12c0-1.1.9-2 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-1.99.9-1.99 2v4c1.1 0 1.99.9 1.99 2s-.89 2-2 2v4c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-4c-1.1 0-2-.9-2-2zm-4.42 4.8L12 14.5l-3.58 2.3 1.08-4.12-3.29-2.69 4.24-.25L12 5.8l1.54 3.95 4.24.25-3.29 2.69 1.09 4.11z"/></g>
+<g id="local-post-office"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></g>
+<g id="local-printshop"><path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"/></g>
+<g id="local-see"><circle cx="12" cy="12" r="3.2"/><path d="M9 2L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z"/></g>
+<g id="local-shipping"><path d="M20 8h-3V4H3c-1.1 0-2 .9-2 2v11h2c0 1.66 1.34 3 3 3s3-1.34 3-3h6c0 1.66 1.34 3 3 3s3-1.34 3-3h2v-5l-3-4zM6 18.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm13.5-9l1.96 2.5H17V9.5h2.5zm-1.5 9c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"/></g>
+<g id="local-taxi"><path d="M18.92 6.01C18.72 5.42 18.16 5 17.5 5H15V3H9v2H6.5c-.66 0-1.21.42-1.42 1.01L3 12v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-8l-2.08-5.99zM6.5 16c-.83 0-1.5-.67-1.5-1.5S5.67 13 6.5 13s1.5.67 1.5 1.5S7.33 16 6.5 16zm11 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM5 11l1.5-4.5h11L19 11H5z"/></g>
+<g id="map"><path d="M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM15 19l-6-2.11V5l6 2.11V19z"/></g>
+<g id="my-location"><path d="M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06C6.83 3.52 3.52 6.83 3.06 11H1v2h2.06c.46 4.17 3.77 7.48 7.94 7.94V23h2v-2.06c4.17-.46 7.48-3.77 7.94-7.94H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"/></g>
+<g id="navigation"><path d="M12 2L4.5 20.29l.71.71L12 18l6.79 3 .71-.71z"/></g>
+<g id="person-pin"><path d="M19 2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h4l3 3 3-3h4c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 3.3c1.49 0 2.7 1.21 2.7 2.7 0 1.49-1.21 2.7-2.7 2.7-1.49 0-2.7-1.21-2.7-2.7 0-1.49 1.21-2.7 2.7-2.7zM18 16H6v-.9c0-2 4-3.1 6-3.1s6 1.1 6 3.1v.9z"/></g>
+<g id="pin-drop"><path d="M18 8c0-3.31-2.69-6-6-6S6 4.69 6 8c0 4.5 6 11 6 11s6-6.5 6-11zm-8 0c0-1.1.9-2 2-2s2 .9 2 2-.89 2-2 2c-1.1 0-2-.9-2-2zM5 20v2h14v-2H5z"/></g>
+<g id="place"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/></g>
+<g id="rate-review"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 14v-2.47l6.88-6.88c.2-.2.51-.2.71 0l1.77 1.77c.2.2.2.51 0 .71L8.47 14H6zm12 0h-7.5l2-2H18v2z"/></g>
+<g id="restaurant-menu"><path d="M8.1 13.34l2.83-2.83L3.91 3.5c-1.56 1.56-1.56 4.09 0 5.66l4.19 4.18zm6.78-1.81c1.53.71 3.68.21 5.27-1.38 1.91-1.91 2.28-4.65.81-6.12-1.46-1.46-4.2-1.1-6.12.81-1.59 1.59-2.09 3.74-1.38 5.27L3.7 19.87l1.41 1.41L12 14.41l6.88 6.88 1.41-1.41L13.41 13l1.47-1.47z"/></g>
+<g id="satellite"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.99h3C8 6.65 6.66 8 5 8V4.99zM5 12v-2c2.76 0 5-2.25 5-5.01h2C12 8.86 8.87 12 5 12zm0 6l3.5-4.5 2.5 3.01L14.5 12l4.5 6H5z"/></g>
+<g id="store-mall-directory"><path d="M20 4H4v2h16V4zm1 10v-2l-1-5H4l-1 5v2h1v6h10v-6h4v6h2v-6h1zm-9 4H6v-4h6v4z"/></g>
+<g id="terrain"><path d="M14 6l-3.75 5 2.85 3.8-1.6 1.2C9.81 13.75 7 10 7 10l-6 8h22L14 6z"/></g>
+<g id="traffic"><path d="M20 10h-3V8.86c1.72-.45 3-2 3-3.86h-3V4c0-.55-.45-1-1-1H8c-.55 0-1 .45-1 1v1H4c0 1.86 1.28 3.41 3 3.86V10H4c0 1.86 1.28 3.41 3 3.86V15H4c0 1.86 1.28 3.41 3 3.86V20c0 .55.45 1 1 1h8c.55 0 1-.45 1-1v-1.14c1.72-.45 3-2 3-3.86h-3v-1.14c1.72-.45 3-2 3-3.86zm-8 9c-1.11 0-2-.9-2-2s.89-2 2-2c1.1 0 2 .9 2 2s-.89 2-2 2zm0-5c-1.11 0-2-.9-2-2s.89-2 2-2c1.1 0 2 .9 2 2s-.89 2-2 2zm0-5c-1.11 0-2-.9-2-2 0-1.11.89-2 2-2 1.1 0 2 .89 2 2 0 1.1-.89 2-2 2z"/></g>
+</defs></svg>
+</iron-iconset-svg>
diff --git a/static/bower_components/iron-icons/notification-icons.html b/static/bower_components/iron-icons/notification-icons.html
new file mode 100644
index 0000000..39db434
--- /dev/null
+++ b/static/bower_components/iron-icons/notification-icons.html
@@ -0,0 +1,62 @@
+<!--
+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="../iron-icon/iron-icon.html">
+<link rel="import" href="../iron-iconset-svg/iron-iconset-svg.html">
+<iron-iconset-svg name="notification" size="24">
+<svg><defs>
+<g id="adb"><path d="M5 16c0 3.87 3.13 7 7 7s7-3.13 7-7v-4H5v4zM16.12 4.37l2.1-2.1-.82-.83-2.3 2.31C14.16 3.28 13.12 3 12 3s-2.16.28-3.09.75L6.6 1.44l-.82.83 2.1 2.1C6.14 5.64 5 7.68 5 10v1h14v-1c0-2.32-1.14-4.36-2.88-5.63zM9 9c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm6 0c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"/></g>
+<g id="airline-seat-flat"><path d="M22 11v2H9V7h9c2.21 0 4 1.79 4 4zM2 14v2h6v2h8v-2h6v-2H2zm5.14-1.9c1.16-1.19 1.14-3.08-.04-4.24-1.19-1.16-3.08-1.14-4.24.04-1.16 1.19-1.14 3.08.04 4.24 1.19 1.16 3.08 1.14 4.24-.04z"/></g>
+<g id="airline-seat-flat-angled"><path d="M22.25 14.29l-.69 1.89L9.2 11.71l2.08-5.66 8.56 3.09c2.1.76 3.18 3.06 2.41 5.15zM1.5 12.14L8 14.48V19h8v-1.63L20.52 19l.69-1.89-19.02-6.86-.69 1.89zm5.8-1.94c1.49-.72 2.12-2.51 1.41-4C7.99 4.71 6.2 4.08 4.7 4.8c-1.49.71-2.12 2.5-1.4 4 .71 1.49 2.5 2.12 4 1.4z"/></g>
+<g id="airline-seat-individual-suite"><path d="M7 13c1.65 0 3-1.35 3-3S8.65 7 7 7s-3 1.35-3 3 1.35 3 3 3zm12-6h-8v7H3V7H1v10h22v-6c0-2.21-1.79-4-4-4z"/></g>
+<g id="airline-seat-legroom-extra"><path d="M4 12V3H2v9c0 2.76 2.24 5 5 5h6v-2H7c-1.66 0-3-1.34-3-3zm18.83 5.24c-.38-.72-1.29-.97-2.03-.63l-1.09.5-3.41-6.98c-.34-.68-1.03-1.12-1.79-1.12L11 9V3H5v8c0 1.66 1.34 3 3 3h7l3.41 7 3.72-1.7c.77-.36 1.1-1.3.7-2.06z"/></g>
+<g id="airline-seat-legroom-normal"><path d="M5 12V3H3v9c0 2.76 2.24 5 5 5h6v-2H8c-1.66 0-3-1.34-3-3zm15.5 6H19v-7c0-1.1-.9-2-2-2h-5V3H6v8c0 1.65 1.35 3 3 3h7v7h4.5c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5z"/></g>
+<g id="airline-seat-legroom-reduced"><path d="M19.97 19.2c.18.96-.55 1.8-1.47 1.8H14v-3l1-4H9c-1.65 0-3-1.35-3-3V3h6v6h5c1.1 0 2 .9 2 2l-2 7h1.44c.73 0 1.39.49 1.53 1.2zM5 12V3H3v9c0 2.76 2.24 5 5 5h4v-2H8c-1.66 0-3-1.34-3-3z"/></g>
+<g id="airline-seat-recline-extra"><path d="M5.35 5.64c-.9-.64-1.12-1.88-.49-2.79.63-.9 1.88-1.12 2.79-.49.9.64 1.12 1.88.49 2.79-.64.9-1.88 1.12-2.79.49zM16 19H8.93c-1.48 0-2.74-1.08-2.96-2.54L4 7H2l1.99 9.76C4.37 19.2 6.47 21 8.94 21H16v-2zm.23-4h-4.88l-1.03-4.1c1.58.89 3.28 1.54 5.15 1.22V9.99c-1.63.31-3.44-.27-4.69-1.25L9.14 7.47c-.23-.18-.49-.3-.76-.38-.32-.09-.66-.12-.99-.06h-.02c-1.23.22-2.05 1.39-1.84 2.61l1.35 5.92C7.16 16.98 8.39 18 9.83 18h6.85l3.82 3 1.5-1.5-5.77-4.5z"/></g>
+<g id="airline-seat-recline-normal"><path d="M7.59 5.41c-.78-.78-.78-2.05 0-2.83.78-.78 2.05-.78 2.83 0 .78.78.78 2.05 0 2.83-.79.79-2.05.79-2.83 0zM6 16V7H4v9c0 2.76 2.24 5 5 5h6v-2H9c-1.66 0-3-1.34-3-3zm14 4.07L14.93 15H11.5v-3.68c1.4 1.15 3.6 2.16 5.5 2.16v-2.16c-1.66.02-3.61-.87-4.67-2.04l-1.4-1.55c-.19-.21-.43-.38-.69-.5-.29-.14-.62-.23-.96-.23h-.03C8.01 7 7 8.01 7 9.25V15c0 1.66 1.34 3 3 3h5.07l3.5 3.5L20 20.07z"/></g>
+<g id="bluetooth-audio"><path d="M14.24 12.01l2.32 2.32c.28-.72.44-1.51.44-2.33 0-.82-.16-1.59-.43-2.31l-2.33 2.32zm5.29-5.3l-1.26 1.26c.63 1.21.98 2.57.98 4.02s-.36 2.82-.98 4.02l1.2 1.2c.97-1.54 1.54-3.36 1.54-5.31-.01-1.89-.55-3.67-1.48-5.19zm-3.82 1L10 2H9v7.59L4.41 5 3 6.41 8.59 12 3 17.59 4.41 19 9 14.41V22h1l5.71-5.71-4.3-4.29 4.3-4.29zM11 5.83l1.88 1.88L11 9.59V5.83zm1.88 10.46L11 18.17v-3.76l1.88 1.88z"/></g>
+<g id="confirmation-number"><defs><path id="a" d="M0 0h24v24H0z"/></defs><clipPath id="b"><use xlink:href="#a" overflow="visible"/></clipPath><path d="M22 10V6c0-1.11-.9-2-2-2H4c-1.1 0-1.99.89-1.99 2v4c1.1 0 1.99.9 1.99 2s-.89 2-2 2v4c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-4c-1.1 0-2-.9-2-2s.9-2 2-2zm-9 7.5h-2v-2h2v2zm0-4.5h-2v-2h2v2zm0-4.5h-2v-2h2v2z" clip-path="url(#b)"/></g>
+<g id="disc-full"><path d="M20 16h2v-2h-2v2zm0-9v5h2V7h-2zM10 4c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm0 10c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"/></g>
+<g id="do-not-disturb"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z"/></g>
+<g id="do-not-disturb-alt"><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zM4 12c0-4.4 3.6-8 8-8 1.8 0 3.5.6 4.9 1.7L5.7 16.9C4.6 15.5 4 13.8 4 12zm8 8c-1.8 0-3.5-.6-4.9-1.7L18.3 7.1C19.4 8.5 20 10.2 20 12c0 4.4-3.6 8-8 8z"/></g>
+<g id="drive-eta"><path d="M18.92 5.01C18.72 4.42 18.16 4 17.5 4h-11c-.66 0-1.21.42-1.42 1.01L3 11v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-8l-2.08-5.99zM6.5 15c-.83 0-1.5-.67-1.5-1.5S5.67 12 6.5 12s1.5.67 1.5 1.5S7.33 15 6.5 15zm11 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM5 10l1.5-4.5h11L19 10H5z"/></g>
+<g id="event-available"><path d="M16.53 11.06L15.47 10l-4.88 4.88-2.12-2.12-1.06 1.06L10.59 17l5.94-5.94zM19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11z"/></g>
+<g id="event-busy"><path d="M9.31 17l2.44-2.44L14.19 17l1.06-1.06-2.44-2.44 2.44-2.44L14.19 10l-2.44 2.44L9.31 10l-1.06 1.06 2.44 2.44-2.44 2.44L9.31 17zM19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11z"/></g>
+<g id="event-note"><path d="M17 10H7v2h10v-2zm2-7h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zm-5-5H7v2h7v-2z"/></g>
+<g id="folder-special"><path d="M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-6.42 12L10 15.9 6.42 18l.95-4.07-3.16-2.74 4.16-.36L10 7l1.63 3.84 4.16.36-3.16 2.74.95 4.06z"/></g>
+<g id="live-tv"><path d="M21 6h-7.59l3.29-3.29L16 2l-4 4-4-4-.71.71L10.59 6H3c-1.1 0-2 .89-2 2v12c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.11-.9-2-2-2zm0 14H3V8h18v12zM9 10v8l7-4z"/></g>
+<g id="mms"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM5 14l3.5-4.5 2.5 3.01L14.5 8l4.5 6H5z"/></g>
+<g id="more"><path d="M22 3H7c-.69 0-1.23.35-1.59.88L0 12l5.41 8.11c.36.53.97.89 1.66.89H22c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 13.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm5 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm5 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"/></g>
+<g id="network-locked"><path d="M19.5 10c.17 0 .33.03.5.05V1L1 20h13v-3c0-.89.39-1.68 1-2.23v-.27c0-2.48 2.02-4.5 4.5-4.5zm2.5 6v-1.5c0-1.38-1.12-2.5-2.5-2.5S17 13.12 17 14.5V16c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h5c.55 0 1-.45 1-1v-4c0-.55-.45-1-1-1zm-1 0h-3v-1.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V16z"/></g>
+<g id="ondemand-video"><path d="M21 3H3c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.11-.9-2-2-2zm0 14H3V5h18v12zm-5-6l-7 4V7z"/></g>
+<g id="personal-video"><path d="M21 3H3c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.11-.9-2-2-2zm0 14H3V5h18v12z"/></g>
+<g id="phone-bluetooth-speaker"><path d="M14.71 9.5L17 7.21V11h.5l2.85-2.85L18.21 6l2.15-2.15L17.5 1H17v3.79L14.71 2.5l-.71.71L16.79 6 14 8.79l.71.71zM18 2.91l.94.94-.94.94V2.91zm0 4.3l.94.94-.94.94V7.21zm2 8.29c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.59l2.2-2.21c.28-.26.36-.65.25-1C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1z"/></g>
+<g id="phone-forwarded"><path d="M18 11l5-5-5-5v3h-4v4h4v3zm2 4.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.59l2.2-2.21c.28-.26.36-.65.25-1C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1z"/></g>
+<g id="phone-in-talk"><path d="M20 15.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.59l2.2-2.21c.28-.26.36-.65.25-1C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1zM19 12h2c0-4.97-4.03-9-9-9v2c3.87 0 7 3.13 7 7zm-4 0h2c0-2.76-2.24-5-5-5v2c1.66 0 3 1.34 3 3z"/></g>
+<g id="phone-locked"><path d="M20 15.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.59l2.2-2.21c.28-.26.36-.65.25-1C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1zM20 4v-.5C20 2.12 18.88 1 17.5 1S15 2.12 15 3.5V4c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h5c.55 0 1-.45 1-1V5c0-.55-.45-1-1-1zm-.8 0h-3.4v-.5c0-.94.76-1.7 1.7-1.7s1.7.76 1.7 1.7V4z"/></g>
+<g id="phone-missed"><path d="M6.5 5.5L12 11l7-7-1-1-6 6-4.5-4.5H11V3H5v6h1.5V5.5zm17.21 11.17C20.66 13.78 16.54 12 12 12 7.46 12 3.34 13.78.29 16.67c-.18.18-.29.43-.29.71s.11.53.29.71l2.48 2.48c.18.18.43.29.71.29.27 0 .52-.11.7-.28.79-.74 1.69-1.36 2.66-1.85.33-.16.56-.5.56-.9v-3.1c1.45-.48 3-.73 4.6-.73 1.6 0 3.15.25 4.6.72v3.1c0 .39.23.74.56.9.98.49 1.87 1.12 2.67 1.85.18.18.43.28.7.28.28 0 .53-.11.71-.29l2.48-2.48c.18-.18.29-.43.29-.71s-.12-.52-.3-.7z"/></g>
+<g id="phone-paused"><path d="M17 3h-2v7h2V3zm3 12.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.59l2.2-2.21c.28-.26.36-.65.25-1C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1zM19 3v7h2V3h-2z"/></g>
+<g id="power"><path d="M16.01 7L16 3h-2v4h-4V3H8v4h-.01C7 6.99 6 7.99 6 8.99v5.49L9.5 18v3h5v-3l3.5-3.51v-5.5c0-1-1-2-1.99-1.99z"/></g>
+<g id="sd-card"><path d="M18 2h-8L4.02 8 4 20c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-6 6h-2V4h2v4zm3 0h-2V4h2v4zm3 0h-2V4h2v4z"/></g>
+<g id="sim-card-alert"><path d="M18 2h-8L4.02 8 4 20c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-5 15h-2v-2h2v2zm0-4h-2V8h2v5z"/></g>
+<g id="sms"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"/></g>
+<g id="sms-failed"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 12h-2v-2h2v2zm0-4h-2V6h2v4z"/></g>
+<g id="sync"><path d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"/></g>
+<g id="sync-disabled"><path d="M10 6.35V4.26c-.8.21-1.55.54-2.23.96l1.46 1.46c.25-.12.5-.24.77-.33zm-7.14-.94l2.36 2.36C4.45 8.99 4 10.44 4 12c0 2.21.91 4.2 2.36 5.64L4 20h6v-6l-2.24 2.24C6.68 15.15 6 13.66 6 12c0-1 .25-1.94.68-2.77l8.08 8.08c-.25.13-.5.25-.77.34v2.09c.8-.21 1.55-.54 2.23-.96l2.36 2.36 1.27-1.27L4.14 4.14 2.86 5.41zM20 4h-6v6l2.24-2.24C17.32 8.85 18 10.34 18 12c0 1-.25 1.94-.68 2.77l1.46 1.46C19.55 15.01 20 13.56 20 12c0-2.21-.91-4.2-2.36-5.64L20 4z"/></g>
+<g id="sync-problem"><path d="M3 12c0 2.21.91 4.2 2.36 5.64L3 20h6v-6l-2.24 2.24C5.68 15.15 5 13.66 5 12c0-2.61 1.67-4.83 4-5.65V4.26C5.55 5.15 3 8.27 3 12zm8 5h2v-2h-2v2zM21 4h-6v6l2.24-2.24C18.32 8.85 19 10.34 19 12c0 2.61-1.67 4.83-4 5.65v2.09c3.45-.89 6-4.01 6-7.74 0-2.21-.91-4.2-2.36-5.64L21 4zm-10 9h2V7h-2v6z"/></g>
+<g id="system-update"><path d="M17 1.01L7 1c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM17 19H7V5h10v14zm-1-6h-3V8h-2v5H8l4 4 4-4z"/></g>
+<g id="tap-and-play"><path d="M2 16v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0 4v3h3c0-1.66-1.34-3-3-3zm0-8v2c4.97 0 9 4.03 9 9h2c0-6.08-4.92-11-11-11zM17 1.01L7 1c-1.1 0-2 .9-2 2v7.37c.69.16 1.36.37 2 .64V5h10v13h-3.03c.52 1.25.84 2.59.95 4H17c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99z"/></g>
+<g id="time-to-leave"><path d="M18.92 5.01C18.72 4.42 18.16 4 17.5 4h-11c-.66 0-1.21.42-1.42 1.01L3 11v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-8l-2.08-5.99zM6.5 15c-.83 0-1.5-.67-1.5-1.5S5.67 12 6.5 12s1.5.67 1.5 1.5S7.33 15 6.5 15zm11 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM5 10l1.5-4.5h11L19 10H5z"/></g>
+<g id="vibration"><path d="M0 15h2V9H0v6zm3 2h2V7H3v10zm19-8v6h2V9h-2zm-3 8h2V7h-2v10zM16.5 3h-9C6.67 3 6 3.67 6 4.5v15c0 .83.67 1.5 1.5 1.5h9c.83 0 1.5-.67 1.5-1.5v-15c0-.83-.67-1.5-1.5-1.5zM16 19H8V5h8v14z"/></g>
+<g id="voice-chat"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12l-4-3.2V14H6V6h8v3.2L18 6v8z"/></g>
+<g id="vpn-lock"><path d="M22 4v-.5C22 2.12 20.88 1 19.5 1S17 2.12 17 3.5V4c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h5c.55 0 1-.45 1-1V5c0-.55-.45-1-1-1zm-.8 0h-3.4v-.5c0-.94.76-1.7 1.7-1.7s1.7.76 1.7 1.7V4zm-2.28 8c.04.33.08.66.08 1 0 2.08-.8 3.97-2.1 5.39-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H7v-2h2c.55 0 1-.45 1-1V8h2c1.1 0 2-.9 2-2V3.46c-.95-.3-1.95-.46-3-.46C5.48 3 1 7.48 1 13s4.48 10 10 10 10-4.48 10-10c0-.34-.02-.67-.05-1h-2.03zM10 20.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L8 16v1c0 1.1.9 2 2 2v1.93z"/></g>
+<g id="wc"><path d="M5.5 22v-7.5H4V9c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v5.5H9.5V22h-4zM18 22v-6h3l-2.54-7.63C18.18 7.55 17.42 7 16.56 7h-.12c-.86 0-1.63.55-1.9 1.37L12 16h3v6h3zM7.5 6c1.11 0 2-.89 2-2s-.89-2-2-2-2 .89-2 2 .89 2 2 2zm9 0c1.11 0 2-.89 2-2s-.89-2-2-2-2 .89-2 2 .89 2 2 2z"/></g>
+<g id="wifi"><path d="M1 9l2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9zm8 8l3 3 3-3c-1.65-1.66-4.34-1.66-6 0zm-4-4l2 2c2.76-2.76 7.24-2.76 10 0l2-2C15.14 9.14 8.87 9.14 5 13z"/></g>
+</defs></svg>
+</iron-iconset-svg>
diff --git a/static/bower_components/iron-icons/social-icons.html b/static/bower_components/iron-icons/social-icons.html
new file mode 100644
index 0000000..5553caa
--- /dev/null
+++ b/static/bower_components/iron-icons/social-icons.html
@@ -0,0 +1,40 @@
+<!--
+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="../iron-icon/iron-icon.html">
+<link rel="import" href="../iron-iconset-svg/iron-iconset-svg.html">
+<iron-iconset-svg name="social" size="24">
+<svg><defs>
+<g id="cake"><path d="M12 6c1.11 0 2-.9 2-2 0-.38-.1-.73-.29-1.03L12 0l-1.71 2.97c-.19.3-.29.65-.29 1.03 0 1.1.9 2 2 2zm4.6 9.99l-1.07-1.07-1.08 1.07c-1.3 1.3-3.58 1.31-4.89 0l-1.07-1.07-1.09 1.07C6.75 16.64 5.88 17 4.96 17c-.73 0-1.4-.23-1.96-.61V21c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-4.61c-.56.38-1.23.61-1.96.61-.92 0-1.79-.36-2.44-1.01zM18 9h-5V7h-2v2H6c-1.66 0-3 1.34-3 3v1.54c0 1.08.88 1.96 1.96 1.96.52 0 1.02-.2 1.38-.57l2.14-2.13 2.13 2.13c.74.74 2.03.74 2.77 0l2.14-2.13 2.13 2.13c.37.37.86.57 1.38.57 1.08 0 1.96-.88 1.96-1.96V12C21 10.34 19.66 9 18 9z"/></g>
+<g id="domain"><path d="M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z"/></g>
+<g id="group"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></g>
+<g id="group-add"><path d="M8 10H5V7H3v3H0v2h3v3h2v-3h3v-2zm10 1c1.66 0 2.99-1.34 2.99-3S19.66 5 18 5c-.32 0-.63.05-.91.14.57.81.9 1.79.9 2.86s-.34 2.04-.9 2.86c.28.09.59.14.91.14zm-5 0c1.66 0 2.99-1.34 2.99-3S14.66 5 13 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm6.62 2.16c.83.73 1.38 1.66 1.38 2.84v2h3v-2c0-1.54-2.37-2.49-4.38-2.84zM13 13c-2 0-6 1-6 3v2h12v-2c0-2-4-3-6-3z"/></g>
+<g id="location-city"><path d="M15 11V5l-3-3-3 3v2H3v14h18V11h-6zm-8 8H5v-2h2v2zm0-4H5v-2h2v2zm0-4H5V9h2v2zm6 8h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V9h2v2zm0-4h-2V5h2v2zm6 12h-2v-2h2v2zm0-4h-2v-2h2v2z"/></g>
+<g id="mood"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5zm-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11zm3.5 6.5c2.33 0 4.31-1.46 5.11-3.5H6.89c.8 2.04 2.78 3.5 5.11 3.5z"/></g>
+<g id="mood-bad"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5zm-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11zm3.5 3c-2.33 0-4.31 1.46-5.11 3.5h10.22c-.8-2.04-2.78-3.5-5.11-3.5z"/></g>
+<g id="notifications"><path d="M11.5 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2zm6.5-6v-5.5c0-3.07-2.13-5.64-5-6.32V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5v.68c-2.87.68-5 3.25-5 6.32V16l-2 2v1h17v-1l-2-2z"/></g>
+<g id="notifications-active"><path d="M6.58 3.58L5.15 2.15C2.76 3.97 1.18 6.8 1.03 10h2c.15-2.65 1.51-4.97 3.55-6.42zM19.97 10h2c-.15-3.2-1.73-6.03-4.13-7.85l-1.43 1.43c2.05 1.45 3.41 3.77 3.56 6.42zm-1.97.5c0-3.07-2.13-5.64-5-6.32V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5v.68c-2.87.68-5 3.25-5 6.32V16l-2 2v1h17v-1l-2-2v-5.5zM11.5 22c.14 0 .27-.01.4-.04.65-.13 1.19-.58 1.44-1.18.1-.24.16-.5.16-.78h-4c0 1.1.9 2 2 2z"/></g>
+<g id="notifications-none"><path d="M11.5 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2zm6.5-6v-5.5c0-3.07-2.13-5.64-5-6.32V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5v.68c-2.87.68-5 3.25-5 6.32V16l-2 2v1h17v-1l-2-2zm-2 1H7v-6.5C7 8.01 9.01 6 11.5 6S16 8.01 16 10.5V17z"/></g>
+<g id="notifications-off"><path d="M11.5 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2zM18 10.5c0-3.07-2.13-5.64-5-6.32V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5v.68c-.51.12-.99.32-1.45.56L18 14.18V10.5zm-.27 8.5l2 2L21 19.73 4.27 3 3 4.27l2.92 2.92C5.34 8.16 5 9.29 5 10.5V16l-2 2v1h14.73z"/></g>
+<g id="notifications-paused"><path d="M11.5 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2zm6.5-6v-5.5c0-3.07-2.13-5.64-5-6.32V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5v.68c-2.87.68-5 3.25-5 6.32V16l-2 2v1h17v-1l-2-2zm-4-6.2l-2.8 3.4H14V15H9v-1.8l2.8-3.4H9V8h5v1.8z"/></g>
+<g id="pages"><path d="M3 5v6h5L7 7l4 1V3H5c-1.1 0-2 .9-2 2zm5 8H3v6c0 1.1.9 2 2 2h6v-5l-4 1 1-4zm9 4l-4-1v5h6c1.1 0 2-.9 2-2v-6h-5l1 4zm2-14h-6v5l4-1-1 4h5V5c0-1.1-.9-2-2-2z"/></g>
+<g id="party-mode"><path d="M20 4h-3.17L15 2H9L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 3c1.63 0 3.06.79 3.98 2H12c-1.66 0-3 1.34-3 3 0 .35.07.69.18 1H7.1c-.06-.32-.1-.66-.1-1 0-2.76 2.24-5 5-5zm0 10c-1.63 0-3.06-.79-3.98-2H12c1.66 0 3-1.34 3-3 0-.35-.07-.69-.18-1h2.08c.07.32.1.66.1 1 0 2.76-2.24 5-5 5z"/></g>
+<g id="people"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></g>
+<g id="people-outline"><path d="M16.5 13c-1.2 0-3.07.34-4.5 1-1.43-.67-3.3-1-4.5-1C5.33 13 1 14.08 1 16.25V19h22v-2.75c0-2.17-4.33-3.25-6.5-3.25zm-4 4.5h-10v-1.25c0-.54 2.56-1.75 5-1.75s5 1.21 5 1.75v1.25zm9 0H14v-1.25c0-.46-.2-.86-.52-1.22.88-.3 1.96-.53 3.02-.53 2.44 0 5 1.21 5 1.75v1.25zM7.5 12c1.93 0 3.5-1.57 3.5-3.5S9.43 5 7.5 5 4 6.57 4 8.5 5.57 12 7.5 12zm0-5.5c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm9 5.5c1.93 0 3.5-1.57 3.5-3.5S18.43 5 16.5 5 13 6.57 13 8.5s1.57 3.5 3.5 3.5zm0-5.5c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2z"/></g>
+<g id="person"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></g>
+<g id="person-add"><path d="M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm-9-2V7H4v3H1v2h3v3h2v-3h3v-2H6zm9 4c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></g>
+<g id="person-outline"><path d="M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4z"/></g>
+<g id="plus-one"><path d="M10 8H8v4H4v2h4v4h2v-4h4v-2h-4zm4.5-1.92V7.9l2.5-.5V18h2V5z"/></g>
+<g id="poll"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"/></g>
+<g id="public"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"/></g>
+<g id="school"><path d="M5 13.18v4L12 21l7-3.82v-4L12 17l-7-3.82zM12 3L1 9l11 6 9-4.91V17h2V9L12 3z"/></g>
+<g id="share"><path d="M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92z"/></g>
+<g id="whatshot"><path d="M13.5.67s.74 2.65.74 4.8c0 2.06-1.35 3.73-3.41 3.73-2.07 0-3.63-1.67-3.63-3.73l.03-.36C5.21 7.51 4 10.62 4 14c0 4.42 3.58 8 8 8s8-3.58 8-8C20 8.61 17.41 3.8 13.5.67zM11.71 19c-1.78 0-3.22-1.4-3.22-3.14 0-1.62 1.05-2.76 2.81-3.12 1.77-.36 3.6-1.21 4.62-2.58.39 1.29.59 2.65.59 4.04 0 2.65-2.15 4.8-4.8 4.8z"/></g>
+</defs></svg>
+</iron-iconset-svg>
diff --git a/static/bower_components/iron-iconset-svg/.bower.json b/static/bower_components/iron-iconset-svg/.bower.json
new file mode 100644
index 0000000..7031e24
--- /dev/null
+++ b/static/bower_components/iron-iconset-svg/.bower.json
@@ -0,0 +1,41 @@
+{
+ "name": "iron-iconset-svg",
+ "description": "Manages a set of svg icons",
+ "version": "1.0.4",
+ "keywords": [
+ "web-components",
+ "polymer",
+ "icon"
+ ],
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "private": true,
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/iron-iconset-svg.git"
+ },
+ "dependencies": {
+ "polymer": "polymer/polymer#^1.0.0",
+ "iron-meta": "polymerelements/iron-meta#^1.0.0"
+ },
+ "devDependencies": {
+ "paper-styles": "polymerelements/paper-styles#^1.0.2",
+ "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
+ "iron-icon": "polymerelements/iron-icon#^1.0.0",
+ "test-fixture": "polymerelements/test-fixture#^1.0.0",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
+ "web-component-tester": "*"
+ },
+ "homepage": "https://github.com/polymerelements/iron-iconset-svg",
+ "_release": "1.0.4",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.0.4",
+ "commit": "795aa82ac22971421bc4375efbd2419ebba9099f"
+ },
+ "_source": "git://github.com/polymerelements/iron-iconset-svg.git",
+ "_target": "^1.0.0",
+ "_originalSource": "polymerelements/iron-iconset-svg"
+} \ No newline at end of file
diff --git a/static/bower_components/iron-iconset-svg/.gitignore b/static/bower_components/iron-iconset-svg/.gitignore
new file mode 100644
index 0000000..8d4ae25
--- /dev/null
+++ b/static/bower_components/iron-iconset-svg/.gitignore
@@ -0,0 +1 @@
+bower_components
diff --git a/static/bower_components/iron-iconset-svg/README.md b/static/bower_components/iron-iconset-svg/README.md
new file mode 100644
index 0000000..37d603a
--- /dev/null
+++ b/static/bower_components/iron-iconset-svg/README.md
@@ -0,0 +1,4 @@
+iron-iconset-svg
+=========
+
+See the [component page](http://polymer-project.org/docs/elements/iron-elements.html#iron-iconset-svg) for more information.
diff --git a/static/bower_components/iron-iconset-svg/bower.json b/static/bower_components/iron-iconset-svg/bower.json
new file mode 100644
index 0000000..b58569c
--- /dev/null
+++ b/static/bower_components/iron-iconset-svg/bower.json
@@ -0,0 +1,31 @@
+{
+ "name": "iron-iconset-svg",
+ "description": "Manages a set of svg icons",
+ "version": "1.0.4",
+ "keywords": [
+ "web-components",
+ "polymer",
+ "icon"
+ ],
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "private": true,
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/iron-iconset-svg.git"
+ },
+ "dependencies": {
+ "polymer": "polymer/polymer#^1.0.0",
+ "iron-meta": "polymerelements/iron-meta#^1.0.0"
+ },
+ "devDependencies": {
+ "paper-styles": "polymerelements/paper-styles#^1.0.2",
+ "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
+ "iron-icon": "polymerelements/iron-icon#^1.0.0",
+ "test-fixture": "polymerelements/test-fixture#^1.0.0",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
+ "web-component-tester": "*"
+ }
+}
diff --git a/static/bower_components/iron-iconset-svg/demo/index.html b/static/bower_components/iron-iconset-svg/demo/index.html
new file mode 100644
index 0000000..efe8478
--- /dev/null
+++ b/static/bower_components/iron-iconset-svg/demo/index.html
@@ -0,0 +1,65 @@
+<!doctype html>
+<!--
+@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
+-->
+
+<html>
+<head>
+
+ <title>iron-iconset-svg</title>
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+
+ <link href="../../paper-styles/demo-pages.html" rel="import">
+
+ <link rel="import" href="svg-sample-icons.html">
+ <style is="custom-style">
+
+ .centered {
+ text-align: center;
+ }
+
+ iron-icon {
+ height: 64px;
+ width: 64px;
+ margin: auto 1em;
+ }
+
+ iron-icon:nth-of-type(1) {
+ fill: orange;
+ }
+
+ iron-icon:nth-of-type(2) {
+ fill: green;
+ }
+
+ iron-icon:nth-of-type(3) {
+ fill: navy;
+ }
+
+ iron-icon {
+ transition: all 0.5s;
+ -webkit-transition: all 0.5s;
+ }
+
+ iron-icon:hover {
+ -webkit-filter: drop-shadow( 2px 2px 2px var(--google-grey-700) );
+ filter: drop-shadow( 2px 2px 2px var(--google-grey-700) );
+ }
+ </style>
+</head>
+<body>
+
+ <div class="vertical-section vertical-section-container centered">
+ <iron-icon icon="svg-sample-icons:codepen"></iron-icon>
+ <iron-icon icon="svg-sample-icons:twitter"></iron-icon>
+ <iron-icon icon="svg-sample-icons:youtube"></iron-icon>
+ </div>
+
+</body>
+</html>
diff --git a/static/bower_components/iron-iconset-svg/demo/svg-sample-icons.html b/static/bower_components/iron-iconset-svg/demo/svg-sample-icons.html
new file mode 100644
index 0000000..94c930d
--- /dev/null
+++ b/static/bower_components/iron-iconset-svg/demo/svg-sample-icons.html
@@ -0,0 +1,69 @@
+
+<!--
+@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-icon/iron-icon.html">
+<link rel="import" href="../iron-iconset-svg.html">
+
+<iron-iconset-svg name="svg-sample-icons" size="100">
+ <svg>
+ <defs>
+ <g id="codepen">
+ <path class="outer-ring" d="M50,0C22.385,0,0,22.385,0,50c0,27.615,22.385,50,50,50c27.614,0,50-22.385,50-50C100,22.385,77.615,0,50,0z M50,91.789
+ C26.958,91.789,8.212,73.042,8.212,50C8.212,26.958,26.958,8.212,50,8.212c23.042,0,41.788,18.747,41.788,41.789
+ C91.788,73.042,73.042,91.789,50,91.789z"></path>
+ <path class="inner-logo" d="M80.893,40.234c-0.006-0.039-0.016-0.076-0.022-0.115c-0.013-0.075-0.027-0.15-0.046-0.223
+ c-0.012-0.044-0.028-0.086-0.042-0.128c-0.021-0.065-0.042-0.13-0.068-0.193c-0.018-0.044-0.039-0.088-0.059-0.13
+ c-0.028-0.06-0.057-0.119-0.09-0.175c-0.024-0.042-0.051-0.083-0.076-0.124c-0.036-0.055-0.073-0.109-0.112-0.161
+ c-0.029-0.039-0.06-0.078-0.091-0.115c-0.042-0.049-0.086-0.098-0.132-0.143c-0.035-0.036-0.069-0.072-0.106-0.104
+ c-0.049-0.044-0.099-0.086-0.15-0.127c-0.04-0.031-0.079-0.062-0.12-0.091c-0.016-0.01-0.029-0.023-0.044-0.033L51.474,19.531
+ c-0.893-0.595-2.055-0.595-2.947,0L20.267,38.371c-0.015,0.01-0.028,0.023-0.044,0.033c-0.042,0.029-0.081,0.06-0.12,0.091
+ c-0.052,0.041-0.102,0.083-0.15,0.127c-0.037,0.032-0.071,0.068-0.106,0.104c-0.046,0.045-0.09,0.094-0.132,0.143
+ c-0.031,0.038-0.062,0.077-0.092,0.115c-0.039,0.052-0.076,0.106-0.111,0.161c-0.027,0.041-0.052,0.082-0.076,0.124
+ c-0.033,0.057-0.062,0.115-0.09,0.175c-0.021,0.042-0.042,0.086-0.06,0.13c-0.026,0.063-0.047,0.128-0.068,0.193
+ c-0.014,0.042-0.029,0.084-0.042,0.128c-0.02,0.073-0.032,0.148-0.046,0.223c-0.006,0.039-0.016,0.076-0.021,0.115
+ c-0.016,0.114-0.024,0.229-0.024,0.346V59.42c0,0.117,0.009,0.233,0.024,0.348c0.005,0.038,0.015,0.077,0.021,0.114
+ c0.014,0.075,0.027,0.149,0.046,0.223c0.012,0.043,0.028,0.086,0.042,0.128c0.021,0.065,0.042,0.13,0.068,0.195
+ c0.018,0.044,0.039,0.086,0.06,0.129c0.028,0.06,0.058,0.118,0.09,0.177c0.024,0.041,0.049,0.082,0.076,0.122
+ c0.035,0.056,0.072,0.109,0.111,0.161c0.029,0.041,0.061,0.078,0.092,0.115c0.042,0.049,0.086,0.098,0.132,0.144
+ c0.035,0.036,0.069,0.071,0.106,0.104c0.048,0.044,0.099,0.086,0.15,0.127c0.039,0.031,0.078,0.062,0.12,0.091
+ c0.016,0.01,0.029,0.023,0.044,0.032l28.259,18.84c0.446,0.297,0.96,0.447,1.474,0.447c0.513,0,1.027-0.149,1.473-0.447
+ l28.259-18.84c0.015-0.009,0.028-0.022,0.044-0.032c0.042-0.029,0.081-0.06,0.12-0.091c0.051-0.041,0.102-0.083,0.15-0.127
+ c0.037-0.033,0.071-0.068,0.106-0.104c0.046-0.046,0.09-0.095,0.132-0.144c0.031-0.037,0.062-0.075,0.091-0.115
+ c0.04-0.052,0.076-0.105,0.112-0.161c0.025-0.041,0.051-0.081,0.076-0.122c0.033-0.059,0.062-0.117,0.09-0.177
+ c0.02-0.042,0.041-0.085,0.059-0.129c0.026-0.065,0.047-0.13,0.068-0.195c0.014-0.042,0.03-0.085,0.042-0.128
+ c0.02-0.074,0.033-0.148,0.046-0.223c0.006-0.037,0.016-0.076,0.022-0.114c0.014-0.115,0.023-0.231,0.023-0.348V40.581
+ C80.916,40.464,80.907,40.348,80.893,40.234z M52.657,26.707l20.817,13.877l-9.298,6.221l-11.519-7.706V26.707z M47.343,26.707
+ v12.393l-11.518,7.706l-9.299-6.221L47.343,26.707z M24.398,45.554L31.046,50l-6.648,4.446V45.554z M47.343,73.294L26.525,59.417
+ l9.299-6.219l11.518,7.704V73.294z M50,56.286L40.603,50L50,43.715L59.397,50L50,56.286z M52.657,73.294V60.902l11.519-7.704
+ l9.298,6.219L52.657,73.294z M75.602,54.447L68.955,50l6.647-4.446V54.447z"></path>
+ </g>
+
+ <path id="twitter" d="M100.001,17.942c-3.681,1.688-7.633,2.826-11.783,3.339
+ c4.236-2.624,7.49-6.779,9.021-11.73c-3.965,2.432-8.354,4.193-13.026,5.146C80.47,10.575,75.138,8,69.234,8
+ c-11.33,0-20.518,9.494-20.518,21.205c0,1.662,0.183,3.281,0.533,4.833c-17.052-0.884-32.168-9.326-42.288-22.155
+ c-1.767,3.133-2.778,6.773-2.778,10.659c0,7.357,3.622,13.849,9.127,17.65c-3.363-0.109-6.525-1.064-9.293-2.651
+ c-0.002,0.089-0.002,0.178-0.002,0.268c0,10.272,7.072,18.845,16.458,20.793c-1.721,0.484-3.534,0.744-5.405,0.744
+ c-1.322,0-2.606-0.134-3.859-0.379c2.609,8.424,10.187,14.555,19.166,14.726c-7.021,5.688-15.867,9.077-25.48,9.077
+ c-1.656,0-3.289-0.102-4.895-0.297C9.08,88.491,19.865,92,31.449,92c37.737,0,58.374-32.312,58.374-60.336
+ c0-0.92-0.02-1.834-0.059-2.743C93.771,25.929,97.251,22.195,100.001,17.942L100.001,17.942z"></path>
+
+ <g id="youtube">
+ <path class="youtube" d="M98.77,27.492c-1.225-5.064-5.576-8.799-10.811-9.354C75.561,16.818,63.01,15.993,50.514,16
+ c-12.495-0.007-25.045,0.816-37.446,2.139c-5.235,0.557-9.583,4.289-10.806,9.354C0.522,34.704,0.5,42.574,0.5,50.001
+ c0,7.426,0,15.296,1.741,22.509c1.224,5.061,5.572,8.799,10.807,9.352c12.399,1.32,24.949,2.145,37.446,2.14
+ c12.494,0.005,25.047-0.817,37.443-2.14c5.234-0.555,9.586-4.291,10.81-9.352c1.741-7.213,1.753-15.083,1.753-22.509
+ S100.51,34.704,98.77,27.492 M67.549,52.203L43.977,64.391c-2.344,1.213-4.262,0.119-4.262-2.428V38.036
+ c0-2.548,1.917-3.644,4.262-2.429l23.572,12.188C69.896,49.008,69.896,50.992,67.549,52.203"></path>
+ </g>
+
+ </defs>
+ </svg>
+</iron-iconset-svg>
diff --git a/static/bower_components/iron-iconset-svg/index.html b/static/bower_components/iron-iconset-svg/index.html
new file mode 100644
index 0000000..e871f17
--- /dev/null
+++ b/static/bower_components/iron-iconset-svg/index.html
@@ -0,0 +1,26 @@
+<!doctype html>
+<!--
+@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
+The complete set of authors may be found at http://polymer.github.io/AUTHORS
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
+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
+-->
+<html>
+<head>
+
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+ <script src="../webcomponentsjs/webcomponents-lite.js"></script>
+ <link rel="import" href="../iron-component-page/iron-component-page.html">
+
+</head>
+<body>
+
+ <iron-component-page></iron-component-page>
+
+</body>
+</html>
diff --git a/static/bower_components/iron-iconset-svg/iron-iconset-svg.html b/static/bower_components/iron-iconset-svg/iron-iconset-svg.html
new file mode 100644
index 0000000..3cebc2c
--- /dev/null
+++ b/static/bower_components/iron-iconset-svg/iron-iconset-svg.html
@@ -0,0 +1,192 @@
+<!--
+@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="../polymer/polymer.html">
+<link rel="import" href="../iron-meta/iron-meta.html">
+
+<script>
+ /**
+ * The `iron-iconset-svg` element allows users to define their own icon sets
+ * that contain svg icons. The svg icon elements should be children of the
+ * `iron-iconset-svg` element. Multiple icons should be given distinct id's.
+ *
+ * Using svg elements to create icons has a few advantages over traditional
+ * bitmap graphics like jpg or png. Icons that use svg are vector based so they
+ * are resolution independent and should look good on any device. They are
+ * stylable via css. Icons can be themed, colorized, and even animated.
+ *
+ * Example:
+ *
+ * <iron-iconset-svg name="my-svg-icons" size="24">
+ * <svg>
+ * <defs>
+ * <g id="shape">
+ * <rect x="50" y="50" width="50" height="50" />
+ * <circle cx="50" cy="50" r="50" />
+ * </g>
+ * </defs>
+ * </svg>
+ * </iron-iconset-svg>
+ *
+ * This will automatically register the icon set "my-svg-icons" to the iconset
+ * database. To use these icons from within another element, make a
+ * `iron-iconset` element and call the `byId` method
+ * to retrieve a given iconset. To apply a particular icon inside an
+ * element use the `applyIcon` method. For example:
+ *
+ * iconset.applyIcon(iconNode, 'car');
+ *
+ * @element iron-iconset-svg
+ * @demo demo/index.html
+ */
+ Polymer({
+
+ is: 'iron-iconset-svg',
+
+ properties: {
+
+ /**
+ * The name of the iconset.
+ *
+ * @attribute name
+ * @type string
+ */
+ name: {
+ type: String,
+ observer: '_nameChanged'
+ },
+
+ /**
+ * The size of an individual icon. Note that icons must be square.
+ *
+ * @attribute iconSize
+ * @type number
+ * @default 24
+ */
+ size: {
+ type: Number,
+ value: 24
+ }
+
+ },
+
+ /**
+ * Construct an array of all icon names in this iconset.
+ *
+ * @return {!Array} Array of icon names.
+ */
+ getIconNames: function() {
+ this._icons = this._createIconMap();
+ return Object.keys(this._icons).map(function(n) {
+ return this.name + ':' + n;
+ }, this);
+ },
+
+ /**
+ * Applies an icon to the given element.
+ *
+ * An svg icon is prepended to the element's shadowRoot if it exists,
+ * otherwise to the element itself.
+ *
+ * @method applyIcon
+ * @param {Element} element Element to which the icon is applied.
+ * @param {string} iconName Name of the icon to apply.
+ * @return {Element} The svg element which renders the icon.
+ */
+ applyIcon: function(element, iconName) {
+ // insert svg element into shadow root, if it exists
+ element = element.root || element;
+ // Remove old svg element
+ this.removeIcon(element);
+ // install new svg element
+ var svg = this._cloneIcon(iconName);
+ if (svg) {
+ var pde = Polymer.dom(element);
+ pde.insertBefore(svg, pde.childNodes[0]);
+ return element._svgIcon = svg;
+ }
+ return null;
+ },
+
+ /**
+ * Remove an icon from the given element by undoing the changes effected
+ * by `applyIcon`.
+ *
+ * @param {Element} element The element from which the icon is removed.
+ */
+ removeIcon: function(element) {
+ // Remove old svg element
+ if (element._svgIcon) {
+ Polymer.dom(element).removeChild(element._svgIcon);
+ element._svgIcon = null;
+ }
+ },
+
+ /**
+ *
+ * When name is changed, register iconset metadata
+ *
+ */
+ _nameChanged: function() {
+ new Polymer.IronMeta({type: 'iconset', key: this.name, value: this});
+ },
+
+ /**
+ * Create a map of child SVG elements by id.
+ *
+ * @return {!Object} Map of id's to SVG elements.
+ */
+ _createIconMap: function() {
+ // Objects chained to Object.prototype (`{}`) have members. Specifically,
+ // on FF there is a `watch` method that confuses the icon map, so we
+ // need to use a null-based object here.
+ var icons = Object.create(null);
+ Polymer.dom(this).querySelectorAll('[id]')
+ .forEach(function(icon) {
+ icons[icon.id] = icon;
+ });
+ return icons;
+ },
+
+ /**
+ * Produce installable clone of the SVG element matching `id` in this
+ * iconset, or `undefined` if there is no matching element.
+ *
+ * @return {Element} Returns an installable clone of the SVG element
+ * matching `id`.
+ */
+ _cloneIcon: function(id) {
+ // create the icon map on-demand, since the iconset itself has no discrete
+ // signal to know when it's children are fully parsed
+ this._icons = this._icons || this._createIconMap();
+ return this._prepareSvgClone(this._icons[id], this.size);
+ },
+
+ /**
+ * @param {Element} sourceSvg
+ * @param {number} size
+ * @return {Element}
+ */
+ _prepareSvgClone: function(sourceSvg, size) {
+ if (sourceSvg) {
+ var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
+ svg.setAttribute('viewBox', ['0', '0', size, size].join(' '));
+ svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');
+ // TODO(dfreedm): `pointer-events: none` works around https://crbug.com/370136
+ // TODO(sjmiles): inline style may not be ideal, but avoids requiring a shadow-root
+ svg.style.cssText = 'pointer-events: none; display: block; width: 100%; height: 100%;';
+ svg.appendChild(sourceSvg.cloneNode(true)).removeAttribute('id');
+ return svg;
+ }
+ return null;
+ }
+
+ });
+</script>
diff --git a/static/bower_components/iron-iconset-svg/test/index.html b/static/bower_components/iron-iconset-svg/test/index.html
new file mode 100644
index 0000000..db4a3f6
--- /dev/null
+++ b/static/bower_components/iron-iconset-svg/test/index.html
@@ -0,0 +1,30 @@
+<!doctype html>
+<!--
+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
+-->
+
+<html>
+<head>
+
+ <meta charset="utf-8">
+ <title>Tests</title>
+ <script src="../../web-component-tester/browser.js"></script>
+
+</head>
+<body>
+
+ <script>
+
+ WCT.loadSuites([
+ 'iron-iconset-svg.html'
+ ]);
+
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/iron-iconset-svg/test/iron-iconset-svg.html b/static/bower_components/iron-iconset-svg/test/iron-iconset-svg.html
new file mode 100644
index 0000000..4af6f8b
--- /dev/null
+++ b/static/bower_components/iron-iconset-svg/test/iron-iconset-svg.html
@@ -0,0 +1,107 @@
+<!doctype html>
+<!--
+@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
+-->
+
+<html>
+<head>
+
+ <title>iron-iconset-svg</title>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
+
+ <link rel="import" href="../iron-iconset-svg.html">
+ <link rel="import" href="../../iron-meta/iron-meta.html">
+ <link rel="import" href="../../test-fixture/test-fixture.html">
+
+</head>
+<body>
+
+ <test-fixture id="TrivialIconsetSvg">
+ <template>
+ <iron-iconset-svg name="foo"></iron-iconset-svg>
+ <iron-meta type="iconset"></iron-meta>
+ </template>
+ </test-fixture>
+
+ <test-fixture id="StandardIconsetSvg">
+ <template>
+ <iron-iconset-svg name="my-icons" size="20">
+ <svg>
+ <defs>
+ <circle id="circle" cx="20" cy="20" r="10"></circle>
+ <rect id="square" x="0" y="0" width="20" height="20"></rect>
+ </defs>
+ </svg>
+ </iron-iconset-svg>
+ <div></div>
+ </template>
+ </test-fixture>
+
+ <script>
+
+ suite('<iron-iconset>', function () {
+
+ suite('basic behavior', function () {
+ var iconset;
+ var meta;
+
+ setup(function () {
+ var elements = fixture('TrivialIconsetSvg');
+ iconset = elements[0];
+ meta = elements[1];
+ });
+
+ test('it can be accessed via iron-meta', function () {
+ expect(meta.byKey('foo')).to.be.equal(iconset);
+ });
+ });
+
+ suite('when paired with a size and SVG definition', function () {
+ var iconset;
+ var div;
+
+ setup(function () {
+ var elements = fixture('StandardIconsetSvg');
+ iconset = elements[0];
+ div = elements[1];
+ });
+
+ test('appends a child to the target element', function () {
+ expect(div.firstElementChild).to.not.be.ok;
+ iconset.applyIcon(div, 'circle');
+ expect(div.firstElementChild).to.be.ok;
+ });
+
+ test('can be queried for all available icons', function () {
+ expect(iconset.getIconNames()).to.deep.eql(['my-icons:circle', 'my-icons:square']);
+ });
+
+ test('supports any icon defined in the svg', function () {
+ var lastSvgIcon;
+
+ iconset.getIconNames().forEach(function (iconName) {
+ iconset.applyIcon(div, iconName.split(':').pop());
+ expect(div.firstElementChild).to.not.be.equal(lastSvgIcon);
+ lastSvgIcon = div.firstElementChild;
+ });
+ });
+
+ });
+
+ });
+
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/iron-image/.bower.json b/static/bower_components/iron-image/.bower.json
new file mode 100644
index 0000000..6431717
--- /dev/null
+++ b/static/bower_components/iron-image/.bower.json
@@ -0,0 +1,40 @@
+{
+ "name": "iron-image",
+ "version": "1.0.2",
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "description": "An image-displaying element with lots of convenient features",
+ "private": true,
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "keywords": [
+ "web-components",
+ "polymer",
+ "media"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/iron-image.git"
+ },
+ "dependencies": {
+ "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0",
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "paper-styles": "polymerelements/paper-styles#^1.0.4",
+ "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
+ "test-fixture": "polymerelements/test-fixture#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ },
+ "homepage": "https://github.com/PolymerElements/iron-image",
+ "_release": "1.0.2",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.0.2",
+ "commit": "f3d3090dc9a59b662f67c9c7dd1fc61e716f353d"
+ },
+ "_source": "git://github.com/PolymerElements/iron-image.git",
+ "_target": "^1.0.0",
+ "_originalSource": "PolymerElements/iron-image"
+} \ No newline at end of file
diff --git a/static/bower_components/iron-image/.gitignore b/static/bower_components/iron-image/.gitignore
new file mode 100644
index 0000000..8d4ae25
--- /dev/null
+++ b/static/bower_components/iron-image/.gitignore
@@ -0,0 +1 @@
+bower_components
diff --git a/static/bower_components/iron-image/README.md b/static/bower_components/iron-image/README.md
new file mode 100644
index 0000000..04fda7a
--- /dev/null
+++ b/static/bower_components/iron-image/README.md
@@ -0,0 +1,60 @@
+iron-image
+==========
+
+`iron-image` is an element for displaying an image that provides useful sizing and
+preloading options not found on the standard `<img>` tag.
+
+The `sizing` option allows the image to be either cropped (`cover`) or
+letterboxed (`contain`) to fill a fixed user-size placed on the element.
+
+The `preload` option prevents the browser from rendering the image until the
+image is fully loaded. In the interim, either the element's CSS `background-color`
+can be be used as the placeholder, or the `placeholder` property can be
+set to a URL (preferably a data-URI, for instant rendering) for an
+placeholder image.
+
+The `fade` option (only valid when `preload` is set) will cause the placeholder
+image/color to be faded out once the image is rendered.
+
+Examples:
+
+Basically identical to `<img src="...">` tag:
+
+```html
+<iron-image src="http://lorempixel.com/400/400"></iron-image>
+```
+
+Will letterbox the image to fit:
+
+```html
+<iron-image style="width:400px; height:400px;" sizing="contain"
+ src="http://lorempixel.com/600/400"></iron-image>
+```
+
+Will crop the image to fit:
+
+```html
+<iron-image style="width:400px; height:400px;" sizing="cover"
+ src="http://lorempixel.com/600/400"></iron-image>
+```
+
+Will show light-gray background until the image loads:
+
+```html
+<iron-image style="width:400px; height:400px; background-color: lightgray;"
+ sizing="cover" preload src="http://lorempixel.com/600/400"></iron-image>
+```
+
+Will show a base-64 encoded placeholder image until the image loads:
+
+```html
+<iron-image style="width:400px; height:400px;" placeholder="data:image/gif;base64,..."
+ sizing="cover" preload src="http://lorempixel.com/600/400"></iron-image>
+```
+
+Will fade the light-gray background out once the image is loaded:
+
+```html
+<iron-image style="width:400px; height:400px; background-color: lightgray;"
+ sizing="cover" preload fade src="http://lorempixel.com/600/400"></iron-image>
+```
diff --git a/static/bower_components/iron-image/bower.json b/static/bower_components/iron-image/bower.json
new file mode 100644
index 0000000..8e3d0ac
--- /dev/null
+++ b/static/bower_components/iron-image/bower.json
@@ -0,0 +1,30 @@
+{
+ "name": "iron-image",
+ "version": "1.0.2",
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "description": "An image-displaying element with lots of convenient features",
+ "private": true,
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "keywords": [
+ "web-components",
+ "polymer",
+ "media"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/iron-image.git"
+ },
+ "dependencies": {
+ "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0",
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "paper-styles": "polymerelements/paper-styles#^1.0.4",
+ "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
+ "test-fixture": "polymerelements/test-fixture#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ }
+}
diff --git a/static/bower_components/iron-image/demo/index.html b/static/bower_components/iron-image/demo/index.html
new file mode 100644
index 0000000..b29f9cb
--- /dev/null
+++ b/static/bower_components/iron-image/demo/index.html
@@ -0,0 +1,183 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+ <head>
+
+ <title>iron-image</title>
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+
+ <link rel="stylesheet" href="../../paper-styles/demo.css">
+ <link rel="import" href="../iron-image.html">
+
+ <style>
+ .sized {
+ width: 200px;
+ height: 200px;
+ }
+ .gray {
+ background-color: lightgray;
+ }
+ .group {
+ display: inline-block;
+ vertical-align: top;
+ }
+
+ [hidden] {
+ display: none;
+ }
+
+ .controls {
+ display: block;
+ margin-bottom: 1em;
+ }
+ </style>
+
+ </head>
+ <body unresolved>
+
+ <template is="dom-bind">
+ <h3>Sizing: none (naturally sized)</h3>
+ <iron-image src="./polymer.svg"></iron-image>
+
+ <h3>Sizing: cover</h3>
+ <iron-image class="sized" sizing="cover" src="./polymer.svg"></iron-image>
+ <iron-image class="sized" sizing="cover" src="./polymer.svg"></iron-image>
+
+ <h3>Sizing: contain</h3>
+ <iron-image class="sized gray" sizing="contain" src="./polymer.svg"></iron-image>
+ <iron-image class="sized gray" sizing="contain" src="./polymer.svg"></iron-image>
+
+ <h3>Preload: none</h3>
+ <div class="group">
+ <div>No sizing</div>
+ <div class="controls">
+ <button on-click="preload" target="preload1a">Load image</button>
+ </div>
+ <iron-image id="preload1a" class="sized gray" ></iron-image>
+ </div>
+ <div class="group">
+ <div>Cover</div>
+ <div class="controls"><button on-click="preload" target="preload1b">Load image</button></div>
+ <iron-image id="preload1b" class="sized gray" sizing="cover" ></iron-image>
+ </div>
+ <div class="group">
+ <div>Contain</div>
+ <div class="controls"><button on-click="preload" target="preload1c">Load image</button></div>
+ <iron-image id="preload1c" class="sized gray" sizing="contain" ></iron-image>
+ </div>
+
+ <h3>Preload: color as placeholder</h3>
+ <div class="group">
+ <div>No sizing</div>
+ <div class="controls"><button on-click="preload" target="preload2a">Load image</button>
+ <span hidden$="[[!loading2a]]">Loading...</span></div>
+
+ <iron-image loading="{{loading2a}}" id="preload2a" class="sized gray" preload></iron-image>
+ </div>
+ <div class="group">
+ <div>Cover</div>
+ <div class="controls"><button on-click="preload" target="preload2b">Load image</button>
+ <span hidden$="[[!loading2b]]">Loading...</span></div>
+
+ <iron-image loading="{{loading2b}}" id="preload2b" class="sized gray" sizing="cover" preload ></iron-image>
+ </div>
+ <div class="group">
+ <div>Contain</div>
+ <div class="controls"><button on-click="preload" target="preload2c">Load image</button>
+ <span hidden$="[[!loading2c]]">Loading...</span></div>
+
+ <iron-image loading="{{loading2c}}" id="preload2c" class="sized gray" sizing="contain" preload ></iron-image>
+ </div>
+
+ <h3>Preload: image as placeholder</h3>
+ <div class="group">
+ <div>No sizing</div>
+ <div class="controls"><button on-click="preload" target="preload3a">Load image</button>
+ <span hidden$="[[!loading3a]]">Loading...</span></div>
+
+ <iron-image loading="{{loading3a}}" id="preload3a" class="sized gray" preload placeholder="data:image/gif;base64,R0lGODdhyADIAOMAAO7u/5aWlqGho9jY5OPj8cLCyqyssLe3vc3N1wAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAyADIAAAE/hDISau9OOvNu/9gKI5kaZ5oqq5s675wLM90bd94ru987//AoHBILBqPyKRyyWw6n9CodEqtWq/YrHbL7Xq/4LB4TC6bz+i0es1uu9/wuHxOr9vv+Lx+z+/7/4CBgoOEhYaHiImKi4yNjo+QkZKTlJWWl5iZmpucnZ6foKGio6SlpqeoqaqrrK2ur7CxsrO0tba3uLm6u7y9vr/AwcLDxMXGx8jJysvMzc7P0NHS06kB1tYqA9cUBQEFrgLWAgIqBOEBFNuu1gMs2ugT3d/rAe0r77bsFwMGAQLzEggc8AcQAIJwA+EBuKbQmgF+3iocDHBAXiZ9Fd6dAxhuo4R3/gwnGDgnkqE1BBM0XrN3CSOFgQYM+ouHEsFMAP1i2lQIAN8EhwS6kZPQ74BMnpZcTgiHkoA1AhKxAWDaU+pHqwvrVVVI1ScmpRIwYjxwTqo+r1vTafV6FmtSrRXEak0ooB+8tjzR4v251m0llwSgUnUaAOrJtFMDoESrty9XxYi/wk0sMEBMoRKo7iRK8SiFxu285vQMoIDR0qdNN+rmbxxJlRFLi7u22OG1mDjP4bYb2uFVf+r0CZ+cyOS1oRD/cUM4cN5EA3bDhszqWOHEhBLIZh+qHdnmaFABwIwm9BxLZxAtn6fGvr379/Djy59Pv779+/jz69/Pv7///wAGQyjggAQWaOCBCCao4IIMNujggxBGKOGEFFZo4YUYZqjhhhx26OGHIIYo4ogklmjiiSimqOKKLLbo4oswxijjjDRKEQEAOw=="></iron-image>
+ </div>
+
+ <div class="group">
+ <div>Cover</div>
+ <div class="controls"><button on-click="preload" target="preload3b">Load image</button>
+ <span hidden$="[[!loading3b]]">Loading...</span></div>
+
+ <iron-image loading="{{loading3b}}" id="preload3b" class="sized gray" sizing="cover" preload placeholder="data:image/gif;base64,R0lGODdhyADIAOMAAO7u/5aWlqGho9jY5OPj8cLCyqyssLe3vc3N1wAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAyADIAAAE/hDISau9OOvNu/9gKI5kaZ5oqq5s675wLM90bd94ru987//AoHBILBqPyKRyyWw6n9CodEqtWq/YrHbL7Xq/4LB4TC6bz+i0es1uu9/wuHxOr9vv+Lx+z+/7/4CBgoOEhYaHiImKi4yNjo+QkZKTlJWWl5iZmpucnZ6foKGio6SlpqeoqaqrrK2ur7CxsrO0tba3uLm6u7y9vr/AwcLDxMXGx8jJysvMzc7P0NHS06kB1tYqA9cUBQEFrgLWAgIqBOEBFNuu1gMs2ugT3d/rAe0r77bsFwMGAQLzEggc8AcQAIJwA+EBuKbQmgF+3iocDHBAXiZ9Fd6dAxhuo4R3/gwnGDgnkqE1BBM0XrN3CSOFgQYM+ouHEsFMAP1i2lQIAN8EhwS6kZPQ74BMnpZcTgiHkoA1AhKxAWDaU+pHqwvrVVVI1ScmpRIwYjxwTqo+r1vTafV6FmtSrRXEak0ooB+8tjzR4v251m0llwSgUnUaAOrJtFMDoESrty9XxYi/wk0sMEBMoRKo7iRK8SiFxu285vQMoIDR0qdNN+rmbxxJlRFLi7u22OG1mDjP4bYb2uFVf+r0CZ+cyOS1oRD/cUM4cN5EA3bDhszqWOHEhBLIZh+qHdnmaFABwIwm9BxLZxAtn6fGvr379/Djy59Pv779+/jz69/Pv7///wAGQyjggAQWaOCBCCao4IIMNujggxBGKOGEFFZo4YUYZqjhhhx26OGHIIYo4ogklmjiiSimqOKKLLbo4oswxijjjDRKEQEAOw=="></iron-image>
+ </div>
+
+ <div class="group">
+ <div>Contain</div>
+ <div class="controls"><button on-click="preload" target="preload3c">Load image</button>
+ <span hidden$="[[!loading3c]]">Loading...</span></div>
+
+ <iron-image loading="{{loading3c}}" id="preload3c" class="sized gray" sizing="contain" preload placeholder="data:image/gif;base64,R0lGODdhyADIAOMAAO7u/5aWlqGho9jY5OPj8cLCyqyssLe3vc3N1wAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAyADIAAAE/hDISau9OOvNu/9gKI5kaZ5oqq5s675wLM90bd94ru987//AoHBILBqPyKRyyWw6n9CodEqtWq/YrHbL7Xq/4LB4TC6bz+i0es1uu9/wuHxOr9vv+Lx+z+/7/4CBgoOEhYaHiImKi4yNjo+QkZKTlJWWl5iZmpucnZ6foKGio6SlpqeoqaqrrK2ur7CxsrO0tba3uLm6u7y9vr/AwcLDxMXGx8jJysvMzc7P0NHS06kB1tYqA9cUBQEFrgLWAgIqBOEBFNuu1gMs2ugT3d/rAe0r77bsFwMGAQLzEggc8AcQAIJwA+EBuKbQmgF+3iocDHBAXiZ9Fd6dAxhuo4R3/gwnGDgnkqE1BBM0XrN3CSOFgQYM+ouHEsFMAP1i2lQIAN8EhwS6kZPQ74BMnpZcTgiHkoA1AhKxAWDaU+pHqwvrVVVI1ScmpRIwYjxwTqo+r1vTafV6FmtSrRXEak0ooB+8tjzR4v251m0llwSgUnUaAOrJtFMDoESrty9XxYi/wk0sMEBMoRKo7iRK8SiFxu285vQMoIDR0qdNN+rmbxxJlRFLi7u22OG1mDjP4bYb2uFVf+r0CZ+cyOS1oRD/cUM4cN5EA3bDhszqWOHEhBLIZh+qHdnmaFABwIwm9BxLZxAtn6fGvr379/Djy59Pv779+/jz69/Pv7///wAGQyjggAQWaOCBCCao4IIMNujggxBGKOGEFFZo4YUYZqjhhhx26OGHIIYo4ogklmjiiSimqOKKLLbo4oswxijjjDRKEQEAOw=="></iron-image>
+ </div>
+
+ <h3>Preload: color as placeholder, with Fade-in</h3>
+ <div class="group">
+ <div>No sizing</div>
+ <div class="controls"><button on-click="preload" target="preload2afade">Load image</button>
+ <span hidden$="[[!loading2aFade]]">Loading...</span></div>
+
+ <iron-image loading="{{loading2aFade}}" id="preload2afade" class="sized gray" preload fade></iron-image>
+ </div>
+ <div class="group">
+ <div>Cover</div>
+ <div class="controls"><button on-click="preload" target="preload2bfade">Load image</button>
+ <span hidden$="[[!loading2bFade]]">Loading...</span></div>
+
+ <iron-image loading="{{loading2bFade}}" id="preload2bfade" class="sized gray" sizing="cover" preload fade></iron-image>
+ </div>
+ <div class="group">
+ <div>Contain</div>
+ <div class="controls"><button on-click="preload" target="preload2cfade">Load image</button>
+ <span hidden$="[[!loading2cFade]]">Loading...</span></div>
+
+ <iron-image loading="{{loading2cFade}}" id="preload2cfade" class="sized gray" sizing="contain" preload fade></iron-image>
+ </div>
+
+ <h3>Preload: image as placeholder, with Fade-in</h3>
+ <div class="group">
+ <div>No sizing</div>
+ <div class="controls"><button on-click="preload" target="preload3afade">Load image</button>
+ <span hidden$="[[!loading3aFade]]">Loading...</span></div>
+
+ <iron-image loading="{{loading3aFade}}" id="preload3afade" class="sized gray" preload placeholder="data:image/gif;base64,R0lGODdhyADIAOMAAO7u/5aWlqGho9jY5OPj8cLCyqyssLe3vc3N1wAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAyADIAAAE/hDISau9OOvNu/9gKI5kaZ5oqq5s675wLM90bd94ru987//AoHBILBqPyKRyyWw6n9CodEqtWq/YrHbL7Xq/4LB4TC6bz+i0es1uu9/wuHxOr9vv+Lx+z+/7/4CBgoOEhYaHiImKi4yNjo+QkZKTlJWWl5iZmpucnZ6foKGio6SlpqeoqaqrrK2ur7CxsrO0tba3uLm6u7y9vr/AwcLDxMXGx8jJysvMzc7P0NHS06kB1tYqA9cUBQEFrgLWAgIqBOEBFNuu1gMs2ugT3d/rAe0r77bsFwMGAQLzEggc8AcQAIJwA+EBuKbQmgF+3iocDHBAXiZ9Fd6dAxhuo4R3/gwnGDgnkqE1BBM0XrN3CSOFgQYM+ouHEsFMAP1i2lQIAN8EhwS6kZPQ74BMnpZcTgiHkoA1AhKxAWDaU+pHqwvrVVVI1ScmpRIwYjxwTqo+r1vTafV6FmtSrRXEak0ooB+8tjzR4v251m0llwSgUnUaAOrJtFMDoESrty9XxYi/wk0sMEBMoRKo7iRK8SiFxu285vQMoIDR0qdNN+rmbxxJlRFLi7u22OG1mDjP4bYb2uFVf+r0CZ+cyOS1oRD/cUM4cN5EA3bDhszqWOHEhBLIZh+qHdnmaFABwIwm9BxLZxAtn6fGvr379/Djy59Pv779+/jz69/Pv7///wAGQyjggAQWaOCBCCao4IIMNujggxBGKOGEFFZo4YUYZqjhhhx26OGHIIYo4ogklmjiiSimqOKKLLbo4oswxijjjDRKEQEAOw==" fade></iron-image>
+ </div>
+ <div class="group">
+ <div>Cover</div>
+ <div class="controls"><button on-click="preload" target="preload3bfade">Load image</button>
+ <span hidden$="[[!loading3bFade]]">Loading...</span></div>
+
+ <iron-image loading="{{loading3bFade}}" id="preload3bfade" class="sized gray" sizing="cover" preload placeholder="data:image/gif;base64,R0lGODdhyADIAOMAAO7u/5aWlqGho9jY5OPj8cLCyqyssLe3vc3N1wAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAyADIAAAE/hDISau9OOvNu/9gKI5kaZ5oqq5s675wLM90bd94ru987//AoHBILBqPyKRyyWw6n9CodEqtWq/YrHbL7Xq/4LB4TC6bz+i0es1uu9/wuHxOr9vv+Lx+z+/7/4CBgoOEhYaHiImKi4yNjo+QkZKTlJWWl5iZmpucnZ6foKGio6SlpqeoqaqrrK2ur7CxsrO0tba3uLm6u7y9vr/AwcLDxMXGx8jJysvMzc7P0NHS06kB1tYqA9cUBQEFrgLWAgIqBOEBFNuu1gMs2ugT3d/rAe0r77bsFwMGAQLzEggc8AcQAIJwA+EBuKbQmgF+3iocDHBAXiZ9Fd6dAxhuo4R3/gwnGDgnkqE1BBM0XrN3CSOFgQYM+ouHEsFMAP1i2lQIAN8EhwS6kZPQ74BMnpZcTgiHkoA1AhKxAWDaU+pHqwvrVVVI1ScmpRIwYjxwTqo+r1vTafV6FmtSrRXEak0ooB+8tjzR4v251m0llwSgUnUaAOrJtFMDoESrty9XxYi/wk0sMEBMoRKo7iRK8SiFxu285vQMoIDR0qdNN+rmbxxJlRFLi7u22OG1mDjP4bYb2uFVf+r0CZ+cyOS1oRD/cUM4cN5EA3bDhszqWOHEhBLIZh+qHdnmaFABwIwm9BxLZxAtn6fGvr379/Djy59Pv779+/jz69/Pv7///wAGQyjggAQWaOCBCCao4IIMNujggxBGKOGEFFZo4YUYZqjhhhx26OGHIIYo4ogklmjiiSimqOKKLLbo4oswxijjjDRKEQEAOw==" fade></iron-image>
+ </div>
+ <div class="group">
+ <div>Contain</div>
+ <div class="controls"><button on-click="preload" target="preload3cfade">Load image</button>
+ <span hidden$="[[!loading3cFade]]">Loading...</span></div>
+
+ <iron-image loading="{{loading3cFade}}" id="preload3cfade" class="sized gray" sizing="contain" preload placeholder="data:image/gif;base64,R0lGODdhyADIAOMAAO7u/5aWlqGho9jY5OPj8cLCyqyssLe3vc3N1wAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAyADIAAAE/hDISau9OOvNu/9gKI5kaZ5oqq5s675wLM90bd94ru987//AoHBILBqPyKRyyWw6n9CodEqtWq/YrHbL7Xq/4LB4TC6bz+i0es1uu9/wuHxOr9vv+Lx+z+/7/4CBgoOEhYaHiImKi4yNjo+QkZKTlJWWl5iZmpucnZ6foKGio6SlpqeoqaqrrK2ur7CxsrO0tba3uLm6u7y9vr/AwcLDxMXGx8jJysvMzc7P0NHS06kB1tYqA9cUBQEFrgLWAgIqBOEBFNuu1gMs2ugT3d/rAe0r77bsFwMGAQLzEggc8AcQAIJwA+EBuKbQmgF+3iocDHBAXiZ9Fd6dAxhuo4R3/gwnGDgnkqE1BBM0XrN3CSOFgQYM+ouHEsFMAP1i2lQIAN8EhwS6kZPQ74BMnpZcTgiHkoA1AhKxAWDaU+pHqwvrVVVI1ScmpRIwYjxwTqo+r1vTafV6FmtSrRXEak0ooB+8tjzR4v251m0llwSgUnUaAOrJtFMDoESrty9XxYi/wk0sMEBMoRKo7iRK8SiFxu285vQMoIDR0qdNN+rmbxxJlRFLi7u22OG1mDjP4bYb2uFVf+r0CZ+cyOS1oRD/cUM4cN5EA3bDhszqWOHEhBLIZh+qHdnmaFABwIwm9BxLZxAtn6fGvr379/Djy59Pv779+/jz69/Pv7///wAGQyjggAQWaOCBCCao4IIMNujggxBGKOGEFFZo4YUYZqjhhhx26OGHIIYo4ogklmjiiSimqOKKLLbo4oswxijjjDRKEQEAOw==" fade></iron-image>
+ </div>
+ </template>
+
+ <script>
+ var scope = document.querySelector('template[is=dom-bind]');
+
+ scope.preload = function(e) {
+ var img = document.querySelector('#' + e.target.getAttribute('target'));
+ img.src = './polymer.svg?' + Math.random();
+ e.target.textContent = 'Reload image';
+ };
+ </script>
+ </body>
+</html>
diff --git a/static/bower_components/iron-image/demo/polymer.svg b/static/bower_components/iron-image/demo/polymer.svg
new file mode 100644
index 0000000..70735e7
--- /dev/null
+++ b/static/bower_components/iron-image/demo/polymer.svg
@@ -0,0 +1,175 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ width="416px" height="286px" viewBox="0 0 416 286" enable-background="new 0 0 416 286" xml:space="preserve">
+<g>
+ <g>
+ <polygon fill="#303F9F" points="84.157,143 42.878,214.5 84.157,286 125.436,214.5 "/>
+ <polygon fill="#3F51B5" points="331.842,0 290.561,71.5 331.842,143 373.121,71.5 "/>
+ <polygon fill="#7986CB" points="373.121,71.5 249.278,286 331.842,286 414.4,143 "/>
+ <polygon fill="#FF4081" points="249.278,0 84.157,286 166.721,286 331.842,0 "/>
+ <polygon fill="#536DFE" points="84.157,0 1.596,143 42.878,214.5 166.721,0 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0.2" points="249.278,0 290.561,71.5 331.842,0 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0.1" points="208,71.5 249.278,0 290.561,71.5 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0" points="208,71.5 249.278,143 290.561,71.5 "/>
+ <polygon fill-opacity="0.1" points="166.721,143 208,71.5 249.278,143 "/>
+ <polygon fill-opacity="0.2" points="166.721,143 208,214.5 249.278,143 "/>
+ <polygon fill-opacity="0.3" points="125.438,214.5 166.721,143 208,214.5 "/>
+ <polygon fill-opacity="0.4" points="125.438,214.5 166.721,286 208,214.5 "/>
+ <polygon fill-opacity="0.5" points="84.157,286 125.438,214.5 166.721,286 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0.2" points="84.157,0 125.438,71.5 166.721,0 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0.1" points="42.878,71.5 84.157,0 125.438,71.5 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0" points="42.878,71.5 84.157,143 125.438,71.5 "/>
+ <polygon fill-opacity="0.1" points="1.598,143 42.878,71.5 84.157,143 "/>
+ <polygon fill-opacity="0.2" points="1.598,143 42.878,214.5 84.157,143 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0" points="125.438,214.5 84.157,143 42.878,214.5 "/>
+ <polygon fill-opacity="0.2" points="125.438,214.5 84.157,286 42.878,214.5 "/>
+ <polygon fill-opacity="0.2" points="373.121,71.5 331.842,0 290.561,71.5 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0" points="373.121,71.5 331.842,143 290.561,71.5 "/>
+ <g>
+ <polygon fill="#FFFFFF" fill-opacity="0.2" points="331.842,143 373.121,71.5 414.4,143 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0.1" points="331.842,143 373.121,214.5 414.4,143 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0" points="290.561,214.5 331.842,143 373.121,214.5 "/>
+ <polygon fill-opacity="0.1" points="290.561,214.5 331.842,286 373.121,214.5 "/>
+ <polygon fill-opacity="0.2" points="249.278,286 290.561,214.5 331.842,286 "/>
+ </g>
+ </g>
+ <rect y="-65" fill="none" width="416" height="416"/>
+</g>
+<g display="none">
+ <g display="inline">
+ <polygon fill="#303F9F" points="84.157,143 42.878,214.5 84.157,286 166.721,286 "/>
+ <polygon fill="#3F51B5" points="331.842,0 249.278,0 331.842,143 373.121,71.5 "/>
+ <polygon fill="#7986CB" points="373.121,71.5 249.278,286 331.842,286 414.4,143 "/>
+ <polygon fill="#536DFE" points="84.157,0 1.596,143 42.878,214.5 166.721,0 "/>
+ <polygon fill-opacity="0.5" points="249.278,0 290.561,71.5 331.842,0 "/>
+ <polygon fill-opacity="0.5" points="84.157,286 125.438,214.5 166.721,286 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0.2" points="84.157,0 125.438,71.5 166.721,0 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0.1" points="42.878,71.5 84.157,0 125.438,71.5 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0" points="42.878,71.5 84.157,143 125.438,71.5 "/>
+ <polygon fill-opacity="0.1" points="1.598,143 42.878,71.5 84.157,143 "/>
+ <polygon fill-opacity="0.2" points="1.598,143 42.878,214.5 84.157,143 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0" points="125.438,214.5 84.157,143 42.878,214.5 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0" points="373.121,71.5 331.842,143 290.561,71.5 "/>
+ <g>
+ <polygon fill="#FFFFFF" fill-opacity="0.2" points="331.842,143 373.121,71.5 414.4,143 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0.1" points="331.842,143 373.121,214.5 414.4,143 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0" points="290.561,214.5 331.842,143 373.121,214.5 "/>
+ <polygon fill-opacity="0.1" points="290.561,214.5 331.842,286 373.121,214.5 "/>
+ <polygon fill-opacity="0.2" points="249.278,286 290.561,214.5 331.842,286 "/>
+ </g>
+ <polygon fill-opacity="0.2" points="125.438,214.5 84.157,286 42.878,214.5 "/>
+ <polygon fill-opacity="0.2" points="373.121,71.5 331.842,0 290.561,71.5 "/>
+ </g>
+ <rect y="-65" display="inline" fill="none" width="416" height="416"/>
+</g>
+<g display="none">
+ <g display="inline">
+ <polygon fill="#FF4081" points="249.279,0 84.157,286 166.721,286 331.843,0 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0.2" points="249.279,0 290.558,71.5 331.843,0 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0.1" points="208,71.5 249.279,0 290.558,71.5 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0" points="208,71.5 249.279,143 290.558,71.5 "/>
+ <polygon fill-opacity="0.2" points="166.721,143 208,214.5 249.279,143 "/>
+ <polygon fill-opacity="0.3" points="125.439,214.5 166.721,143 208,214.5 "/>
+ <polygon fill-opacity="0.4" points="125.439,214.5 166.721,286 208,214.5 "/>
+ <polygon fill-opacity="0.5" points="84.157,286 125.439,214.5 166.721,286 "/>
+ <polygon fill-opacity="0.1" points="166.721,143 208,71.5 249.279,143 "/>
+ </g>
+ <g display="inline">
+ <polygon fill="#FF4081" points="331.84,0 166.718,286 249.279,286 373.121,71.5 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0.1" points="290.558,71.5 331.84,0 373.121,71.5 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0" points="290.558,71.5 331.84,143 373.121,71.5 "/>
+ <polygon fill-opacity="0.2" points="249.279,143 290.558,214.5 331.84,143 "/>
+ <polygon fill-opacity="0.3" points="208,214.5 249.279,143 290.558,214.5 "/>
+ <polygon fill-opacity="0.4" points="208,214.5 249.279,286 290.558,214.5 "/>
+ <polygon fill-opacity="0.5" points="166.718,286 208,214.5 249.279,286 "/>
+ <polygon fill-opacity="0.1" points="249.279,143 290.558,71.5 331.84,143 "/>
+ </g>
+ <g display="inline">
+ <polygon fill="#FF4081" points="166.718,0 42.878,214.5 84.16,286 249.279,0 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0.2" points="166.718,0 208,71.5 249.279,0 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0.1" points="125.439,71.5 166.718,0 208,71.5 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0" points="125.439,71.5 166.718,143 208,71.5 "/>
+ <polygon fill-opacity="0.2" points="84.16,143 125.439,214.5 166.718,143 "/>
+ <polygon fill-opacity="0.3" points="42.878,214.5 84.16,143 125.439,214.5 "/>
+ <polygon fill-opacity="0.4" points="42.878,214.5 84.16,286 125.439,214.5 "/>
+ <polygon fill-opacity="0.1" points="84.16,143 125.439,71.5 166.718,143 "/>
+ </g>
+ <rect y="-65" display="inline" fill="none" width="416" height="416"/>
+ <g display="inline">
+ <polygon fill="#303F9F" points="84.157,143 42.878,214.5 84.157,286 166.721,286 "/>
+ <polygon fill="#3F51B5" points="331.843,0 249.279,0 331.843,143 373.121,71.5 "/>
+ <polygon fill="#7986CB" points="373.121,71.5 249.279,286 331.843,286 414.4,143 "/>
+ <polygon fill="#536DFE" points="84.157,0 1.597,143 42.878,214.5 166.721,0 "/>
+ <polygon fill-opacity="0.5" points="249.279,0 290.558,71.5 331.843,0 "/>
+ <polygon fill-opacity="0.5" points="84.157,286 125.439,214.5 166.721,286 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0.2" points="84.157,0 125.439,71.5 166.721,0 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0.1" points="42.878,71.5 84.157,0 125.439,71.5 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0" points="42.878,71.5 84.157,143 125.439,71.5 "/>
+ <polygon fill-opacity="0.1" points="1.6,143 42.878,71.5 84.157,143 "/>
+ <polygon fill-opacity="0.2" points="1.6,143 42.878,214.5 84.157,143 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0" points="125.439,214.5 84.157,143 42.878,214.5 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0" points="373.121,71.5 331.843,143 290.558,71.5 "/>
+ <g>
+ <polygon fill="#FFFFFF" fill-opacity="0.2" points="331.843,143 373.121,71.5 414.4,143 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0.1" points="331.843,143 373.121,214.5 414.4,143 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0" points="290.558,214.5 331.843,143 373.121,214.5 "/>
+ <polygon fill-opacity="0.1" points="290.558,214.5 331.843,286 373.121,214.5 "/>
+ <polygon fill-opacity="0.2" points="249.279,286 290.558,214.5 331.843,286 "/>
+ </g>
+ <polygon fill-opacity="0.2" points="125.439,214.5 84.157,286 42.878,214.5 "/>
+ <polygon fill-opacity="0.2" points="373.121,71.5 331.843,0 290.558,71.5 "/>
+ </g>
+</g>
+<g display="none">
+ <g display="inline">
+ <polygon fill="#9F499B" points="249.279,0 84.157,286 166.721,286 331.843,0 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0.2" points="249.279,0 290.558,71.5 331.843,0 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0.1" points="208,71.5 249.279,0 290.558,71.5 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0" points="208,71.5 249.279,143 290.558,71.5 "/>
+ <polygon fill-opacity="0.2" points="166.721,143 208,214.5 249.279,143 "/>
+ <polygon fill-opacity="0.3" points="125.439,214.5 166.721,143 208,214.5 "/>
+ <polygon fill-opacity="0.4" points="125.439,214.5 166.721,286 208,214.5 "/>
+ <polygon fill-opacity="0.5" points="84.157,286 125.439,214.5 166.721,286 "/>
+ <polygon fill-opacity="0.1" points="166.721,143 208,71.5 249.279,143 "/>
+ </g>
+ <g display="inline">
+ <polygon fill="#9F499B" points="331.84,0 166.718,286 249.279,286 373.121,71.5 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0.1" points="290.558,71.5 331.84,0 373.121,71.5 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0" points="290.558,71.5 331.84,143 373.121,71.5 "/>
+ <polygon fill-opacity="0.2" points="249.279,143 290.558,214.5 331.84,143 "/>
+ <polygon fill-opacity="0.3" points="208,214.5 249.279,143 290.558,214.5 "/>
+ <polygon fill-opacity="0.4" points="208,214.5 249.279,286 290.558,214.5 "/>
+ <polygon fill-opacity="0.5" points="166.718,286 208,214.5 249.279,286 "/>
+ <polygon fill-opacity="0.1" points="249.279,143 290.558,71.5 331.84,143 "/>
+ </g>
+ <g display="inline">
+ <polygon fill="#9F499B" points="373.121,71.5 249.279,286 331.843,286 414.4,143 "/>
+ <polygon fill-opacity="0.2" points="331.843,143 373.121,214.5 414.4,143 "/>
+ <polygon fill-opacity="0.3" points="290.558,214.5 331.843,143 373.121,214.5 "/>
+ <polygon fill-opacity="0.4" points="290.558,214.5 331.843,286 373.121,214.5 "/>
+ <polygon fill-opacity="0.5" points="249.279,286 290.558,214.5 331.843,286 "/>
+ <polygon fill-opacity="0.1" points="331.843,143 373.121,71.5 414.4,143 "/>
+ </g>
+ <g display="inline">
+ <polygon fill="#9F499B" points="166.718,0 42.878,214.5 84.16,286 249.279,0 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0.2" points="166.718,0 208,71.5 249.279,0 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0.1" points="125.439,71.5 166.718,0 208,71.5 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0" points="125.439,71.5 166.718,143 208,71.5 "/>
+ <polygon fill-opacity="0.2" points="84.16,143 125.439,214.5 166.718,143 "/>
+ <polygon fill-opacity="0.3" points="42.878,214.5 84.16,143 125.439,214.5 "/>
+ <polygon fill-opacity="0.4" points="42.878,214.5 84.16,286 125.439,214.5 "/>
+ <polygon fill-opacity="0.1" points="84.16,143 125.439,71.5 166.718,143 "/>
+ </g>
+ <g display="inline">
+ <polygon fill="#9F499B" points="84.157,0 1.6,143 42.878,214.5 166.721,0 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0.2" points="84.157,0 125.439,71.5 166.721,0 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0.1" points="42.878,71.5 84.157,0 125.439,71.5 "/>
+ <polygon fill="#FFFFFF" fill-opacity="0" points="42.878,71.5 84.157,143 125.439,71.5 "/>
+ <polygon fill-opacity="0.2" points="1.6,143 42.878,214.5 84.157,143 "/>
+ <polygon fill-opacity="0.1" points="1.6,143 42.878,71.5 84.157,143 "/>
+ </g>
+ <rect y="-65" display="inline" fill="none" width="416" height="416"/>
+</g>
+</svg>
diff --git a/static/bower_components/iron-image/index.html b/static/bower_components/iron-image/index.html
new file mode 100644
index 0000000..b12d417
--- /dev/null
+++ b/static/bower_components/iron-image/index.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<!--
+@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
+The complete set of authors may be found at http://polymer.github.io/AUTHORS
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
+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
+-->
+<html>
+<head>
+
+ <title>iron-image</title>
+ <script src="../webcomponentsjs/webcomponents-lite.js"></script>
+ <link rel="import" href="../iron-component-page/iron-component-page.html">
+
+</head>
+<body>
+
+ <iron-component-page></iron-component-page>
+
+</body>
+</html>
diff --git a/static/bower_components/iron-image/iron-image.html b/static/bower_components/iron-image/iron-image.html
new file mode 100644
index 0000000..7eba73f
--- /dev/null
+++ b/static/bower_components/iron-image/iron-image.html
@@ -0,0 +1,354 @@
+<!--
+@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="../polymer/polymer.html">
+<link rel="import" href="../iron-flex-layout/classes/iron-flex-layout.html">
+
+<!--
+`iron-image` is an element for displaying an image that provides useful sizing and
+preloading options not found on the standard `<img>` tag.
+
+The `sizing` option allows the image to be either cropped (`cover`) or
+letterboxed (`contain`) to fill a fixed user-size placed on the element.
+
+The `preload` option prevents the browser from rendering the image until the
+image is fully loaded. In the interim, either the element's CSS `background-color`
+can be be used as the placeholder, or the `placeholder` property can be
+set to a URL (preferably a data-URI, for instant rendering) for an
+placeholder image.
+
+The `fade` option (only valid when `preload` is set) will cause the placeholder
+image/color to be faded out once the image is rendered.
+
+Examples:
+
+ Basically identical to &lt;img src="..."&gt; tag:
+
+ <iron-image src="http://lorempixel.com/400/400"></iron-image>
+
+ Will letterbox the image to fit:
+
+ <iron-image style="width:400px; height:400px;" sizing="contain"
+ src="http://lorempixel.com/600/400"></iron-image>
+
+ Will crop the image to fit:
+
+ <iron-image style="width:400px; height:400px;" sizing="cover"
+ src="http://lorempixel.com/600/400"></iron-image>
+
+ Will show light-gray background until the image loads:
+
+ <iron-image style="width:400px; height:400px; background-color: lightgray;"
+ sizing="cover" preload src="http://lorempixel.com/600/400"></iron-image>
+
+ Will show a base-64 encoded placeholder image until the image loads:
+
+ <iron-image style="width:400px; height:400px;" placeholder="data:image/gif;base64,..."
+ sizing="cover" preload src="http://lorempixel.com/600/400"></iron-image>
+
+ Will fade the light-gray background out once the image is loaded:
+
+ <iron-image style="width:400px; height:400px; background-color: lightgray;"
+ sizing="cover" preload fade src="http://lorempixel.com/600/400"></iron-image>
+
+
+@group Iron Elements
+@element iron-image
+@demo demo/index.html
+-->
+
+<dom-module id="iron-image">
+
+ <style>
+
+ :host {
+ display: inline-block;
+ overflow: hidden;
+ position: relative;
+ }
+
+ :host([sizing]) #img {
+ display: none;
+ }
+
+ #placeholder {
+ background-color: inherit;
+ opacity: 1;
+ }
+
+ #placeholder.faded-out {
+ transition: opacity 0.5s linear;
+ opacity: 0;
+ }
+
+ </style>
+
+ <template>
+
+ <img id="img" role="none" hidden$="[[_computeImageVisibility(sizing)]]">
+ <div id="placeholder" hidden$="[[_computePlaceholderVisibility(fade,loaded,preload)]]" class$="[[_computePlaceholderClassName(fade,loaded,preload)]]"></div>
+ <content></content>
+
+ </template>
+
+</dom-module>
+
+<script>
+
+ Polymer({
+
+ is: 'iron-image',
+
+ properties: {
+ /**
+ * The URL of an image.
+ */
+ src: {
+ observer: '_srcChanged',
+ type: String,
+ value: ''
+ },
+
+ /**
+ * When true, the image is prevented from loading and any placeholder is
+ * shown. This may be useful when a binding to the src property is known to
+ * be invalid, to prevent 404 requests.
+ */
+ preventLoad: {
+ type: Boolean,
+ value: false
+ },
+
+ /**
+ * Sets a sizing option for the image. Valid values are `contain` (full
+ * aspect ratio of the image is contained within the element and
+ * letterboxed) or `cover` (image is cropped in order to fully cover the
+ * bounds of the element), or `null` (default: image takes natural size).
+ */
+ sizing: {
+ type: String,
+ value: null
+ },
+
+ /**
+ * When a sizing option is uzed (`cover` or `contain`), this determines
+ * how the image is aligned within the element bounds.
+ */
+ position: {
+ type: String,
+ value: 'center'
+ },
+
+ /**
+ * When `true`, any change to the `src` property will cause the `placeholder`
+ * image to be shown until the
+ */
+ preload: {
+ type: Boolean,
+ value: false
+ },
+
+ /**
+ * This image will be used as a background/placeholder until the src image has
+ * loaded. Use of a data-URI for placeholder is encouraged for instant rendering.
+ */
+ placeholder: {
+ type: String,
+ value: null
+ },
+
+ /**
+ * When `preload` is true, setting `fade` to true will cause the image to
+ * fade into place.
+ */
+ fade: {
+ type: Boolean,
+ value: false
+ },
+
+ /**
+ * Read-only value that is true when the image is loaded.
+ */
+ loaded: {
+ notify: true,
+ type: Boolean,
+ value: false
+ },
+
+ /**
+ * Read-only value that tracks the loading state of the image when the `preload`
+ * option is used.
+ */
+ loading: {
+ notify: true,
+ type: Boolean,
+ value: false
+ },
+
+ /**
+ * Can be used to set the width of image (e.g. via binding); size may also be
+ * set via CSS.
+ */
+ width: {
+ observer: '_widthChanged',
+ type: Number,
+ value: null
+ },
+
+ /**
+ * Can be used to set the height of image (e.g. via binding); size may also be
+ * set via CSS.
+ *
+ * @attribute height
+ * @type number
+ * @default null
+ */
+ height: {
+ observer: '_heightChanged',
+ type: Number,
+ value: null
+ },
+
+ _placeholderBackgroundUrl: {
+ type: String,
+ computed: '_computePlaceholderBackgroundUrl(preload,placeholder)',
+ observer: '_placeholderBackgroundUrlChanged'
+ },
+
+ requiresPreload: {
+ type: Boolean,
+ computed: '_computeRequiresPreload(preload,loaded)'
+ },
+
+ canLoad: {
+ type: Boolean,
+ computed: '_computeCanLoad(preventLoad, src)'
+ }
+
+ },
+
+ observers: [
+ '_transformChanged(sizing, position)',
+ '_loadBehaviorChanged(canLoad, preload, loaded)',
+ '_loadStateChanged(src, preload, loaded)',
+ ],
+
+ ready: function() {
+ if (!this.hasAttribute('role')) {
+ this.setAttribute('role', 'img');
+ }
+ },
+
+ _computeImageVisibility: function() {
+ return !!this.sizing;
+ },
+
+ _computePlaceholderVisibility: function() {
+ return !this.preload || (this.loaded && !this.fade);
+ },
+
+ _computePlaceholderClassName: function() {
+ if (!this.preload) {
+ return '';
+ }
+
+ var className = 'fit';
+ if (this.loaded && this.fade) {
+ className += ' faded-out';
+ }
+ return className;
+ },
+
+ _computePlaceholderBackgroundUrl: function() {
+ if (this.preload && this.placeholder) {
+ return 'url(' + this.placeholder + ')';
+ }
+
+ return null;
+ },
+
+ _computeRequiresPreload: function() {
+ return this.preload && !this.loaded;
+ },
+
+ _computeCanLoad: function() {
+ return Boolean(!this.preventLoad && this.src);
+ },
+
+ _widthChanged: function() {
+ this.style.width = isNaN(this.width) ? this.width : this.width + 'px';
+ },
+
+ _heightChanged: function() {
+ this.style.height = isNaN(this.height) ? this.height : this.height + 'px';
+ },
+
+ _srcChanged: function(newSrc, oldSrc) {
+ if (newSrc !== oldSrc) {
+ this.loaded = false;
+ }
+ },
+
+ _placeholderBackgroundUrlChanged: function() {
+ this.$.placeholder.style.backgroundImage =
+ this._placeholderBackgroundUrl;
+ },
+
+ _transformChanged: function() {
+ var placeholderStyle = this.$.placeholder.style;
+
+ this.style.backgroundSize =
+ placeholderStyle.backgroundSize = this.sizing;
+
+ this.style.backgroundPosition =
+ placeholderStyle.backgroundPosition =
+ this.sizing ? this.position : '';
+
+ this.style.backgroundRepeat =
+ placeholderStyle.backgroundRepeat =
+ this.sizing ? 'no-repeat' : '';
+ },
+
+ _loadBehaviorChanged: function() {
+ var img;
+
+ if (!this.canLoad) {
+ return;
+ }
+
+ if (this.requiresPreload) {
+ img = new Image();
+ img.src = this.src;
+
+ this.loading = true;
+
+ img.onload = function() {
+ this.loading = false;
+ this.loaded = true;
+ }.bind(this);
+ } else {
+ this.loaded = true;
+ }
+ },
+
+ _loadStateChanged: function() {
+ if (this.requiresPreload) {
+ return;
+ }
+
+ if (this.sizing) {
+ this.style.backgroundImage = this.src ? 'url(' + this.src + ')': '';
+ } else {
+ this.$.img.src = this.src || '';
+ }
+ }
+ });
+
+</script>
diff --git a/static/bower_components/iron-image/test/index.html b/static/bower_components/iron-image/test/index.html
new file mode 100644
index 0000000..fa31e17
--- /dev/null
+++ b/static/bower_components/iron-image/test/index.html
@@ -0,0 +1,25 @@
+<!doctype html>
+<!--
+@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
+-->
+
+<html>
+ <head>
+ <meta charset="utf-8">
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+ </head>
+ <body>
+ <script>
+ WCT.loadSuites([
+ 'iron-image.html'
+ ]);
+ </script>
+ </body>
+</html>
diff --git a/static/bower_components/iron-image/test/iron-image.html b/static/bower_components/iron-image/test/iron-image.html
new file mode 100644
index 0000000..0e06fe3
--- /dev/null
+++ b/static/bower_components/iron-image/test/iron-image.html
@@ -0,0 +1,78 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+ <head>
+ <title>iron-image</title>
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
+
+ <link rel="import" href="../../polymer/polymer.html">
+ <link rel="import" href="../../test-fixture/test-fixture.html">
+ <link rel="import" href="../iron-image.html">
+ </head>
+ <body>
+ <test-fixture id="TrivialImage">
+ <template>
+ <iron-image></iron-image>
+ </template>
+ </test-fixture>
+ <script>
+ suite('<iron-image>', function() {
+ function randomImageUrl () {
+ return '../demo/polymer.svg?' + Math.random();
+ }
+
+ var image;
+
+ suite('basic behavior', function() {
+ setup(function() {
+ image = fixture('TrivialImage');
+ });
+
+ test('can load images given a src', function(done) {
+ image.addEventListener('loaded-changed', function onLoadedChanged() {
+ image.removeEventListener('loaded-changed', onLoadedChanged);
+
+ try {
+ expect(image.loaded).to.be.eql(true);
+ done();
+ } catch (e) {
+ done(e);
+ }
+ });
+ image.src = randomImageUrl();
+ });
+
+ test('will reload images when src changes', function(done) {
+ var loadCount = 0;
+
+ image.addEventListener('loaded-changed', function onLoadedChanged() {
+ if (image.loaded === true) {
+ loadCount++;
+
+ if (loadCount === 2) {
+ done();
+ } else {
+ image.src = randomImageUrl();
+ image.removeEventListener('loaded-changed', onLoadedChanged);
+ }
+ }
+ });
+
+ image.src = randomImageUrl();
+ });
+ });
+ });
+ </script>
+ </body>
+</html>
diff --git a/static/bower_components/iron-media-query/.bower.json b/static/bower_components/iron-media-query/.bower.json
new file mode 100644
index 0000000..ce32680
--- /dev/null
+++ b/static/bower_components/iron-media-query/.bower.json
@@ -0,0 +1,40 @@
+{
+ "name": "iron-media-query",
+ "version": "1.0.2",
+ "description": "Lets you bind to a CSS media query",
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "keywords": [
+ "web-components",
+ "polymer",
+ "media"
+ ],
+ "private": true,
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/iron-media-query"
+ },
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "homepage": "https://github.com/PolymerElements/iron-media-query",
+ "ignore": [],
+ "dependencies": {
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "paper-styles": "polymerelements/paper-styles#^1.0.2",
+ "web-component-tester": "*",
+ "test-fixture": "PolymerElements/test-fixture#^1.0.0",
+ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ },
+ "_release": "1.0.2",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.0.2",
+ "commit": "34abf0a3b8bf9e9e478352dbb3d9e6a76bf3669a"
+ },
+ "_source": "git://github.com/PolymerElements/iron-media-query.git",
+ "_target": "^1.0.0",
+ "_originalSource": "PolymerElements/iron-media-query"
+} \ No newline at end of file
diff --git a/static/bower_components/iron-media-query/.gitignore b/static/bower_components/iron-media-query/.gitignore
new file mode 100644
index 0000000..8d4ae25
--- /dev/null
+++ b/static/bower_components/iron-media-query/.gitignore
@@ -0,0 +1 @@
+bower_components
diff --git a/static/bower_components/iron-media-query/README.md b/static/bower_components/iron-media-query/README.md
new file mode 100644
index 0000000..f577b3c
--- /dev/null
+++ b/static/bower_components/iron-media-query/README.md
@@ -0,0 +1,11 @@
+# iron-media-query
+
+`iron-media-query` can be used to data bind to a CSS media query.
+The `query` property is a bare CSS media query.
+The `query-matches` property is a boolean representing if the page matches that media query.
+
+Example:
+
+```html
+<iron-media-query query="(min-width: 600px)" query-matches="{{queryMatches}}"></iron-media-query>
+```
diff --git a/static/bower_components/iron-media-query/bower.json b/static/bower_components/iron-media-query/bower.json
new file mode 100644
index 0000000..48c342a
--- /dev/null
+++ b/static/bower_components/iron-media-query/bower.json
@@ -0,0 +1,31 @@
+{
+ "name": "iron-media-query",
+ "version": "1.0.2",
+ "description": "Lets you bind to a CSS media query",
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "keywords": [
+ "web-components",
+ "polymer",
+ "media"
+ ],
+ "private": true,
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/iron-media-query"
+ },
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "homepage": "https://github.com/PolymerElements/iron-media-query",
+ "ignore": [],
+ "dependencies": {
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "paper-styles": "polymerelements/paper-styles#^1.0.2",
+ "web-component-tester": "*",
+ "test-fixture": "PolymerElements/test-fixture#^1.0.0",
+ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ }
+}
diff --git a/static/bower_components/iron-media-query/demo/index.html b/static/bower_components/iron-media-query/demo/index.html
new file mode 100644
index 0000000..2f3856f
--- /dev/null
+++ b/static/bower_components/iron-media-query/demo/index.html
@@ -0,0 +1,45 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+ <head>
+
+ <title>iron-media-query demo</title>
+
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+
+ <link rel="import" href="../../paper-styles/paper-styles.html">
+ <link rel="import" href="../../paper-styles/demo-pages.html">
+ <link rel="import" href="../iron-media-query.html">
+
+ </head>
+ <body>
+
+ <div class="vertical-section vertical-section-container centered">
+ <h1>&lt;iron-media-query&gt;</h1>
+
+ <template is="dom-bind">
+ <iron-media-query query="(min-width: 600px)" query-matches="{{queryMatches}}"></iron-media-query>
+
+ <template is="dom-if" if="{{queryMatches}}">
+ <p>The viewport’s width is greater than <code>600px</code></p>
+ </template>
+
+ <template is="dom-if" if="{{!queryMatches}}">
+ <p>The viewport’s width is less than <code>600px</code></p>
+ </template>
+ </template>
+ </div>
+
+ </body>
+</html>
diff --git a/static/bower_components/iron-media-query/hero.svg b/static/bower_components/iron-media-query/hero.svg
new file mode 100644
index 0000000..0a7982b
--- /dev/null
+++ b/static/bower_components/iron-media-query/hero.svg
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
+<g id="background" display="none">
+ <rect display="inline" fill="#B0BEC5" width="225" height="126"/>
+</g>
+<g id="label">
+</g>
+<g id="art">
+ <path d="M173,99H91V41h82V99z M93,97h78V43H93V97z"/>
+ <path d="M77,89H51V42h26V89z M53,87h22V44H53V87z"/>
+ <rect x="52" y="56" width="24" height="2"/>
+ <rect x="92" y="58" width="80" height="2"/>
+ <path d="M65.3,42h-2c0-10,8.7-18.7,18.7-18.7v2C73,25.3,65.3,33,65.3,42z"/>
+ <path d="M105.3,42h-2c0-9-7.3-16.7-16.3-16.7v-2C97,23.3,105.3,32,105.3,42z"/>
+ <circle cx="84.3" cy="24.3" r="4"/>
+ <circle cx="69.3" cy="80.3" r="4"/>
+ <circle cx="160.3" cy="59.3" r="4"/>
+ <path d="M49,41v49c0,1.1,0.9,2,2,2h26c1.1,0,2-0.9,2-2V41c0-1.1-0.9-2-2-2H51C49.9,39,49,39.9,49,41z M76,88H52V43h24V88z"/>
+ <path d="M88.9,40.7v59c0,1.1,0.9,2,2,2h82c1.1,0,2-0.9,2-2v-59c0-1.1-0.9-2-2-2h-82C89.8,38.7,88.9,39.6,88.9,40.7z M172,98H93V42
+ h79V98z"/>
+ <g id="ic_x5F_add_x0D_">
+ </g>
+</g>
+<g id="Guides">
+</g>
+</svg>
diff --git a/static/bower_components/iron-media-query/index.html b/static/bower_components/iron-media-query/index.html
new file mode 100644
index 0000000..7aee5c1
--- /dev/null
+++ b/static/bower_components/iron-media-query/index.html
@@ -0,0 +1,29 @@
+<!doctype html>
+<!--
+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
+The complete set of authors may be found at http://polymer.github.io/AUTHORS
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
+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
+-->
+<html>
+ <head>
+
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
+
+ <title>iron-media-query</title>
+
+ <script src="../webcomponentsjs/webcomponents-lite.js"></script>
+
+ <link rel="import" href="../polymer/polymer.html">
+ <link rel="import" href="../iron-component-page/iron-component-page.html">
+
+ </head>
+ <body>
+
+ <iron-component-page></iron-component-page>
+
+ </body>
+</html>
diff --git a/static/bower_components/iron-media-query/iron-media-query.html b/static/bower_components/iron-media-query/iron-media-query.html
new file mode 100644
index 0000000..8325eb2
--- /dev/null
+++ b/static/bower_components/iron-media-query/iron-media-query.html
@@ -0,0 +1,77 @@
+<!--
+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="../polymer/polymer.html">
+
+<!--
+`iron-media-query` can be used to data bind to a CSS media query.
+The `query` property is a bare CSS media query.
+The `query-matches` property is a boolean representing whether the page matches that media query.
+
+Example:
+
+ <iron-media-query query="(min-width: 600px)" query-matches="{{queryMatches}}"></iron-media-query>
+
+@group Iron Elements
+@demo demo/index.html
+@hero hero.svg
+@element iron-media-query
+-->
+
+<script>
+
+ Polymer({
+
+ is: 'iron-media-query',
+
+ properties: {
+
+ /**
+ * The Boolean return value of the media query.
+ */
+ queryMatches: {
+ type: Boolean,
+ value: false,
+ readOnly: true,
+ notify: true
+ },
+
+ /**
+ * The CSS media query to evaluate.
+ */
+ query: {
+ type: String,
+ observer: 'queryChanged'
+ }
+
+ },
+
+ created: function() {
+ this._mqHandler = this.queryHandler.bind(this);
+ },
+
+ queryChanged: function(query) {
+ if (this._mq) {
+ this._mq.removeListener(this._mqHandler);
+ }
+ if (query[0] !== '(') {
+ query = '(' + query + ')';
+ }
+ this._mq = window.matchMedia(query);
+ this._mq.addListener(this._mqHandler);
+ this.queryHandler(this._mq);
+ },
+
+ queryHandler: function(mq) {
+ this._setQueryMatches(mq.matches);
+ }
+
+ });
+
+</script>
diff --git a/static/bower_components/iron-media-query/test/basic.html b/static/bower_components/iron-media-query/test/basic.html
new file mode 100644
index 0000000..34346c2
--- /dev/null
+++ b/static/bower_components/iron-media-query/test/basic.html
@@ -0,0 +1,71 @@
+<!doctype html>
+<!--
+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
+-->
+
+<html>
+ <head>
+
+ <title>iron-media-query-basic</title>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
+
+ <link rel="import" href="../iron-media-query.html">
+ <link rel="import" href="../../test-fixture/test-fixture.html">
+
+ </head>
+ <body>
+
+ <test-fixture id="basic">
+ <template>
+ <iron-media-query></iron-media-query>
+ </template>
+ </test-fixture>
+
+ <script>
+
+ suite('basic', function() {
+ var mq;
+
+ suite('set query with different values', function() {
+ setup(function () {
+ mq = fixture('basic');
+ });
+
+ test('small min-width value', function() {
+ mq.query = '(min-width: 1px)';
+ assert.equal(mq.queryMatches, true);
+ });
+
+ test('large min-width value', function() {
+ mq.query = '(min-width: 10000px)';
+ assert.equal(mq.queryMatches, false);
+ });
+
+ test('small max-width value', function() {
+ mq.query = '(max-width: 1px)';
+ assert.equal(mq.queryMatches, false);
+ });
+
+ test('large max-width value', function() {
+ mq.query = '(max-width: 10000px)';
+ assert.equal(mq.queryMatches, true);
+ });
+
+ });
+
+ });
+
+ </script>
+
+ </body>
+</html>
diff --git a/static/bower_components/iron-media-query/test/index.html b/static/bower_components/iron-media-query/test/index.html
new file mode 100644
index 0000000..7baa57f
--- /dev/null
+++ b/static/bower_components/iron-media-query/test/index.html
@@ -0,0 +1,30 @@
+<!doctype html>
+<!--
+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
+-->
+
+<html>
+ <head>
+
+ <meta charset="utf-8">
+ <title>Tests</title>
+ <script src="../../web-component-tester/browser.js"></script>
+
+ </head>
+ <body>
+
+ <script>
+
+ WCT.loadSuites([
+ 'basic.html'
+ ]);
+
+ </script>
+
+ </body>
+</html>
diff --git a/static/bower_components/iron-menu-behavior/.bower.json b/static/bower_components/iron-menu-behavior/.bower.json
new file mode 100644
index 0000000..7ca24d4
--- /dev/null
+++ b/static/bower_components/iron-menu-behavior/.bower.json
@@ -0,0 +1,41 @@
+{
+ "name": "iron-menu-behavior",
+ "version": "1.0.1",
+ "description": "Provides accessible menu behavior",
+ "authors": "The Polymer Authors",
+ "keywords": [
+ "web-components",
+ "polymer",
+ "behavior",
+ "menu"
+ ],
+ "main": "iron-menu-behavior.html",
+ "private": true,
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/iron-menu-behavior"
+ },
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "homepage": "https://github.com/PolymerElements/iron-menu-behavior",
+ "ignore": [],
+ "dependencies": {
+ "iron-selector": "PolymerElements/iron-selector#^1.0.0",
+ "polymer": "Polymer/polymer#^1.0.0",
+ "iron-a11y-keys-behavior": "polymerelements/iron-a11y-keys-behavior#^1.0.0"
+ },
+ "devDependencies": {
+ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
+ "test-fixture": "PolymerElements/test-fixture#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ },
+ "_release": "1.0.1",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.0.1",
+ "commit": "3809f0eb7461c8ca63640aaa238775b3a25aa578"
+ },
+ "_source": "git://github.com/PolymerElements/iron-menu-behavior.git",
+ "_target": "^1.0.0",
+ "_originalSource": "PolymerElements/iron-menu-behavior"
+} \ No newline at end of file
diff --git a/static/bower_components/iron-menu-behavior/.gitignore b/static/bower_components/iron-menu-behavior/.gitignore
new file mode 100644
index 0000000..8d4ae25
--- /dev/null
+++ b/static/bower_components/iron-menu-behavior/.gitignore
@@ -0,0 +1 @@
+bower_components
diff --git a/static/bower_components/iron-menu-behavior/README.md b/static/bower_components/iron-menu-behavior/README.md
new file mode 100644
index 0000000..42ab7fa
--- /dev/null
+++ b/static/bower_components/iron-menu-behavior/README.md
@@ -0,0 +1,3 @@
+# iron-menu-behavior
+
+`Polymer.IronMenuBehavior` implements accessible menu behavior.
diff --git a/static/bower_components/iron-menu-behavior/bower.json b/static/bower_components/iron-menu-behavior/bower.json
new file mode 100644
index 0000000..f0d453c
--- /dev/null
+++ b/static/bower_components/iron-menu-behavior/bower.json
@@ -0,0 +1,32 @@
+{
+ "name": "iron-menu-behavior",
+ "version": "1.0.1",
+ "description": "Provides accessible menu behavior",
+ "authors": "The Polymer Authors",
+ "keywords": [
+ "web-components",
+ "polymer",
+ "behavior",
+ "menu"
+ ],
+ "main": "iron-menu-behavior.html",
+ "private": true,
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/iron-menu-behavior"
+ },
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "homepage": "https://github.com/PolymerElements/iron-menu-behavior",
+ "ignore": [],
+ "dependencies": {
+ "iron-selector": "PolymerElements/iron-selector#^1.0.0",
+ "polymer": "Polymer/polymer#^1.0.0",
+ "iron-a11y-keys-behavior": "polymerelements/iron-a11y-keys-behavior#^1.0.0"
+ },
+ "devDependencies": {
+ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
+ "test-fixture": "PolymerElements/test-fixture#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ }
+}
diff --git a/static/bower_components/iron-menu-behavior/demo/index.html b/static/bower_components/iron-menu-behavior/demo/index.html
new file mode 100644
index 0000000..6e64d2a
--- /dev/null
+++ b/static/bower_components/iron-menu-behavior/demo/index.html
@@ -0,0 +1,100 @@
+<!doctype html>
+<!--
+ @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
+-->
+<html>
+<head>
+
+ <meta charset="utf-8">
+ <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">
+
+ <title>iron-menu-behavior demo</title>
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+
+ <link rel="import" href="simple-menu.html">
+ <link rel="import" href="simple-menubar.html">
+
+ <link rel="stylesheet" href="../../paper-styles/demo.css">
+
+ <style>
+
+ .list {
+ display: inline-block;
+ border: 1px solid #ccc;
+ padding: 8px 0;
+ }
+
+ .list li {
+ display: block;
+ padding: 8px;
+ }
+
+ .list li[disabled] {
+ color: #ccc;
+ }
+
+ </style>
+</head>
+<body>
+
+ <section>
+
+ <div>Simple menu</div>
+
+ <simple-menu class="list">
+ <li>item 0</li>
+ <li>item 1</li>
+ <li disabled>item 2</li>
+ <li>item 3</li>
+ </simple-menu>
+
+ </section>
+
+ <section>
+
+ <div>Multi-select menu</div>
+
+ <simple-menu class="list" multi>
+ <li>item 0</li>
+ <li>item 1</li>
+ <li>item 2</li>
+ <li>item 3</li>
+ <li>item 4</li>
+ </simple-menu>
+
+ </section>
+
+ <section>
+
+ <div>Simple menubar</div>
+
+ <simple-menubar class="list">
+ <li>item 0</li>
+ <li>item 1</li>
+ <li disabled>item 2</li>
+ <li>item 3</li>
+ </simple-menubar>
+
+ </section>
+
+ <section>
+ <div>Multi-select menubar</div>
+
+ <simple-menubar class="list" multi>
+ <li>item 0</li>
+ <li>item 1</li>
+ <li>item 2</li>
+ <li>item 3</li>
+ <li>item 4</li>
+ </simple-menubar>
+ </section>
+</body>
+</html>
diff --git a/static/bower_components/iron-menu-behavior/demo/simple-menu.html b/static/bower_components/iron-menu-behavior/demo/simple-menu.html
new file mode 100644
index 0000000..cd1c7cf
--- /dev/null
+++ b/static/bower_components/iron-menu-behavior/demo/simple-menu.html
@@ -0,0 +1,50 @@
+<!--
+@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="../../polymer/polymer.html">
+<link rel="import" href="../iron-menu-behavior.html">
+
+<dom-module id="simple-menu">
+
+ <style>
+
+ .content ::content > .iron-selected {
+ color: red;
+ }
+
+ </style>
+
+ <template>
+
+ <div class="content">
+ <content></content>
+ </div>
+
+ </template>
+
+</dom-module>
+
+<script>
+
+(function() {
+
+ Polymer({
+
+ is: 'simple-menu',
+
+ behaviors: [
+ Polymer.IronMenuBehavior
+ ]
+
+ });
+
+})();
+
+</script>
diff --git a/static/bower_components/iron-menu-behavior/demo/simple-menubar.html b/static/bower_components/iron-menu-behavior/demo/simple-menubar.html
new file mode 100644
index 0000000..ad38ecf
--- /dev/null
+++ b/static/bower_components/iron-menu-behavior/demo/simple-menubar.html
@@ -0,0 +1,54 @@
+<!--
+@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="../../polymer/polymer.html">
+<link rel="import" href="../iron-menubar-behavior.html">
+
+<dom-module id="simple-menubar">
+
+ <style>
+
+ .content ::content > .iron-selected {
+ color: red;
+ }
+
+ .content ::content > * {
+ display: inline-block;
+ }
+
+ </style>
+
+ <template>
+
+ <div class="content">
+ <content></content>
+ </div>
+
+ </template>
+
+</dom-module>
+
+<script>
+
+(function() {
+
+ Polymer({
+
+ is: 'simple-menubar',
+
+ behaviors: [
+ Polymer.IronMenubarBehavior
+ ]
+
+ });
+
+})();
+
+</script>
diff --git a/static/bower_components/iron-menu-behavior/index.html b/static/bower_components/iron-menu-behavior/index.html
new file mode 100644
index 0000000..2c643c4
--- /dev/null
+++ b/static/bower_components/iron-menu-behavior/index.html
@@ -0,0 +1,30 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
+
+ <title>iron-menu-behavior</title>
+
+ <script src="../webcomponentsjs/webcomponents-lite.js"></script>
+
+ <link rel="import" href="../polymer/polymer.html">
+ <link rel="import" href="../iron-component-page/iron-component-page.html">
+
+</head>
+<body>
+
+ <iron-component-page src="iron-menubar-behavior.html"></iron-component-page>
+
+</body>
+</html>
diff --git a/static/bower_components/iron-menu-behavior/iron-menu-behavior.html b/static/bower_components/iron-menu-behavior/iron-menu-behavior.html
new file mode 100644
index 0000000..aa58c7f
--- /dev/null
+++ b/static/bower_components/iron-menu-behavior/iron-menu-behavior.html
@@ -0,0 +1,214 @@
+<!--
+@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="../polymer/polymer.html">
+<link rel="import" href="../iron-selector/iron-multi-selectable.html">
+<link rel="import" href="../iron-a11y-keys-behavior/iron-a11y-keys-behavior.html">
+
+<script>
+
+ /**
+ * `Polymer.IronMenuBehavior` implements accessible menu behavior.
+ *
+ * @demo demo/index.html
+ * @polymerBehavior Polymer.IronMenuBehavior
+ */
+ Polymer.IronMenuBehaviorImpl = {
+
+ properties: {
+
+ /**
+ * Returns the currently focused item.
+ *
+ * @attribute focusedItem
+ * @type Object
+ */
+ focusedItem: {
+ observer: '_focusedItemChanged',
+ readOnly: true,
+ type: Object
+ },
+
+ /**
+ * The attribute to use on menu items to look up the item title. Typing the first
+ * letter of an item when the menu is open focuses that item. If unset, `textContent`
+ * will be used.
+ *
+ * @attribute attrForItemTitle
+ * @type String
+ */
+ attrForItemTitle: {
+ type: String
+ }
+ },
+
+ hostAttributes: {
+ 'role': 'menu',
+ 'tabindex': '0'
+ },
+
+ observers: [
+ '_updateMultiselectable(multi)'
+ ],
+
+ listeners: {
+ 'focus': '_onFocus',
+ 'keydown': '_onKeydown'
+ },
+
+ keyBindings: {
+ 'up': '_onUpKey',
+ 'down': '_onDownKey',
+ 'esc': '_onEscKey',
+ 'enter': '_onEnterKey',
+ 'shift+tab:keydown': '_onShiftTabDown'
+ },
+
+ _updateMultiselectable: function(multi) {
+ if (multi) {
+ this.setAttribute('aria-multiselectable', 'true');
+ } else {
+ this.removeAttribute('aria-multiselectable');
+ }
+ },
+
+ _onShiftTabDown: function() {
+ var oldTabIndex;
+
+ Polymer.IronMenuBehaviorImpl._shiftTabPressed = true;
+
+ oldTabIndex = this.getAttribute('tabindex');
+
+ this.setAttribute('tabindex', '-1');
+
+ this.async(function() {
+ this.setAttribute('tabindex', oldTabIndex);
+ Polymer.IronMenuBehaviorImpl._shiftTabPressed = false;
+ // Note: polymer/polymer#1305
+ }, 1);
+ },
+
+ _applySelection: function(item, isSelected) {
+ if (isSelected) {
+ item.setAttribute('aria-selected', 'true');
+ } else {
+ item.removeAttribute('aria-selected');
+ }
+
+ Polymer.IronSelectableBehavior._applySelection.apply(this, arguments);
+ },
+
+ _focusedItemChanged: function(focusedItem, old) {
+ old && old.setAttribute('tabindex', '-1');
+ if (focusedItem) {
+ focusedItem.setAttribute('tabindex', '0');
+ focusedItem.focus();
+ }
+ },
+
+ select: function(value) {
+ if (this._defaultFocusAsync) {
+ this.cancelAsync(this._defaultFocusAsync);
+ this._defaultFocusAsync = null;
+ }
+ var item = this._valueToItem(value);
+ this._setFocusedItem(item);
+ Polymer.IronMultiSelectableBehaviorImpl.select.apply(this, arguments);
+ },
+
+ _onFocus: function(event) {
+ if (Polymer.IronMenuBehaviorImpl._shiftTabPressed) {
+ return;
+ }
+ // do not focus the menu itself
+ this.blur();
+ // clear the cached focus item
+ this._setFocusedItem(null);
+ this._defaultFocusAsync = this.async(function() {
+ // focus the selected item when the menu receives focus, or the first item
+ // if no item is selected
+ var selectedItem = this.multi ? (this.selectedItems && this.selectedItems[0]) : this.selectedItem;
+ if (selectedItem) {
+ this._setFocusedItem(selectedItem);
+ } else {
+ this._setFocusedItem(this.items[0]);
+ }
+ // async 100ms to wait for `select` to get called from `_itemActivate`
+ }, 100);
+ },
+
+ _onUpKey: function() {
+ // up and down arrows moves the focus
+ this._focusPrevious();
+ },
+
+ _onDownKey: function() {
+ this._focusNext();
+ },
+
+ _onEscKey: function() {
+ // esc blurs the control
+ this.focusedItem.blur();
+ },
+
+ _onEnterKey: function(event) {
+ // enter activates the item unless it is disabled
+ this._activateFocused(event.detail.keyboardEvent);
+ },
+
+ _onKeydown: function(event) {
+ if (this.keyboardEventMatchesKeys(event, 'up down esc enter')) {
+ return;
+ }
+
+ // all other keys focus the menu item starting with that character
+ this._focusWithKeyboardEvent(event);
+ },
+
+ _focusWithKeyboardEvent: function(event) {
+ for (var i = 0, item; item = this.items[i]; i++) {
+ var attr = this.attrForItemTitle || 'textContent';
+ var title = item[attr] || item.getAttribute(attr);
+ if (title && title.trim().charAt(0).toLowerCase() === String.fromCharCode(event.keyCode).toLowerCase()) {
+ this._setFocusedItem(item);
+ break;
+ }
+ }
+ },
+
+ _activateFocused: function(event) {
+ if (!this.focusedItem.hasAttribute('disabled')) {
+ this._activateHandler(event);
+ }
+ },
+
+ _focusPrevious: function() {
+ var length = this.items.length;
+ var index = (Number(this.indexOf(this.focusedItem)) - 1 + length) % length;
+ this._setFocusedItem(this.items[index]);
+ },
+
+ _focusNext: function() {
+ var index = (Number(this.indexOf(this.focusedItem)) + 1) % this.items.length;
+ this._setFocusedItem(this.items[index]);
+ }
+
+ };
+
+ Polymer.IronMenuBehaviorImpl._shiftTabPressed = false;
+
+ /** @polymerBehavior Polymer.IronMenuBehavior */
+ Polymer.IronMenuBehavior = [
+ Polymer.IronMultiSelectableBehavior,
+ Polymer.IronA11yKeysBehavior,
+ Polymer.IronMenuBehaviorImpl
+ ];
+
+</script>
diff --git a/static/bower_components/iron-menu-behavior/iron-menubar-behavior.html b/static/bower_components/iron-menu-behavior/iron-menubar-behavior.html
new file mode 100644
index 0000000..e25304a
--- /dev/null
+++ b/static/bower_components/iron-menu-behavior/iron-menubar-behavior.html
@@ -0,0 +1,65 @@
+<!--
+@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="../polymer/polymer.html">
+<link rel="import" href="iron-menu-behavior.html">
+
+<script>
+
+ /**
+ * `Polymer.IronMenubarBehavior` implements accessible menubar behavior.
+ *
+ * @polymerBehavior Polymer.IronMenubarBehavior
+ */
+ Polymer.IronMenubarBehaviorImpl = {
+
+ hostAttributes: {
+ 'role': 'menubar'
+ },
+
+ keyBindings: {
+ 'left': '_onLeftKey',
+ 'right': '_onRightKey'
+ },
+
+ _onUpKey: function(event) {
+ this._activateFocused(event.detail.keyboardEvent);
+ },
+
+ _onDownKey: function(event) {
+ this._activateFocused(event.detail.keyboardEvent);
+ },
+
+ _onLeftKey: function() {
+ this._focusPrevious();
+ },
+
+ _onRightKey: function() {
+ this._focusNext();
+ },
+
+ _onKeydown: function(event) {
+ if (this.keyboardEventMatchesKeys(event, 'up down left right esc enter')) {
+ return;
+ }
+
+ // all other keys focus the menu item starting with that character
+ this._focusWithKeyboardEvent(event);
+ }
+
+ };
+
+ /** @polymerBehavior Polymer.IronMenubarBehavior */
+ Polymer.IronMenubarBehavior = [
+ Polymer.IronMenuBehavior,
+ Polymer.IronMenubarBehaviorImpl
+ ];
+
+</script>
diff --git a/static/bower_components/iron-menu-behavior/test/index.html b/static/bower_components/iron-menu-behavior/test/index.html
new file mode 100644
index 0000000..4b1c82f
--- /dev/null
+++ b/static/bower_components/iron-menu-behavior/test/index.html
@@ -0,0 +1,35 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+ <head>
+
+ <title>iron-menu-behavior tests</title>
+
+ <meta charset="utf-8">
+ <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="../../web-component-tester/browser.js"></script>
+
+ </head>
+ <body>
+
+ <script>
+
+ WCT.loadSuites([
+ 'iron-menu-behavior.html',
+ 'iron-menubar-behavior.html'
+ ]);
+
+ </script>
+
+ </body>
+</html>
diff --git a/static/bower_components/iron-menu-behavior/test/iron-menu-behavior.html b/static/bower_components/iron-menu-behavior/test/iron-menu-behavior.html
new file mode 100644
index 0000000..309dbb1
--- /dev/null
+++ b/static/bower_components/iron-menu-behavior/test/iron-menu-behavior.html
@@ -0,0 +1,108 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+ <head>
+
+ <title>iron-menu-behavior tests</title>
+
+ <meta charset="utf-8">
+ <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-lite.js"></script>
+
+ <script src="../../web-component-tester/browser.js"></script>
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
+
+ <link rel="import" href="../../test-fixture/test-fixture.html">
+ <link rel="import" href="test-menu.html">
+
+ </head>
+ <body>
+
+ <test-fixture id="basic">
+ <template>
+ <test-menu>
+ <div>item 1</div>
+ <div>item 2</div>
+ <div>item 3</div>
+ </test-menu>
+ </template>
+ </test-fixture>
+
+ <test-fixture id="multi">
+ <template>
+ <test-menu multi>
+ <div>item 1</div>
+ <div>item 2</div>
+ <div>item 3</div>
+ </test-menu>
+ </template>
+ </test-fixture>
+
+ <script>
+
+ suite('menu a11y tests', function() {
+
+ test('menu has role="menu"', function() {
+ var menu = fixture('basic');
+ assert.equal(menu.getAttribute('role'), 'menu', 'has role="menu"');
+ });
+
+ test('first item gets focus when menu is focused', function(done) {
+ var menu = fixture('basic');
+ menu.focus();
+ setTimeout(function() {
+ assert.equal(document.activeElement, menu.firstElementChild, 'document.activeElement is first item')
+ done();
+ // wait for async in _onFocus
+ }, 200);
+ });
+
+ test('selected item gets focus when menu is focused', function(done) {
+ var menu = fixture('basic');
+ menu.selected = 1;
+ menu.focus();
+ setTimeout(function() {
+ assert.equal(document.activeElement, menu.selectedItem, 'document.activeElement is selected item');
+ done();
+ // wait for async in _onFocus
+ }, 200);
+ });
+
+ test('last activated item in a multi select menu is focused', function(done) {
+ var menu = fixture('multi');
+ menu.selected = 0;
+ menu.items[1].click();
+ setTimeout(function() {
+ assert.equal(document.activeElement, menu.items[1], 'document.activeElement is last activated item');
+ done();
+ // wait for async in _onFocus
+ }, 200);
+ });
+
+ test('deselection in a multi select menu focuses deselected item', function(done) {
+ var menu = fixture('multi');
+ menu.selected = 0;
+ menu.items[0].click();
+ setTimeout(function() {
+ assert.equal(document.activeElement, menu.items[0], 'document.activeElement is last activated item');
+ done();
+ // wait for async in _onFocus
+ }, 200);
+ });
+
+ });
+
+ </script>
+
+ </body>
+</html>
diff --git a/static/bower_components/iron-menu-behavior/test/iron-menubar-behavior.html b/static/bower_components/iron-menu-behavior/test/iron-menubar-behavior.html
new file mode 100644
index 0000000..b007b1c
--- /dev/null
+++ b/static/bower_components/iron-menu-behavior/test/iron-menubar-behavior.html
@@ -0,0 +1,108 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+ <head>
+
+ <title>iron-menubar-behavior tests</title>
+
+ <meta charset="utf-8">
+ <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-lite.js"></script>
+
+ <script src="../../web-component-tester/browser.js"></script>
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
+
+ <link rel="import" href="../../test-fixture/test-fixture.html">
+ <link rel="import" href="test-menubar.html">
+
+ </head>
+ <body>
+
+ <test-fixture id="basic">
+ <template>
+ <test-menubar>
+ <div>item 1</div>
+ <div>item 2</div>
+ <div>item 3</div>
+ </test-menubar>
+ </template>
+ </test-fixture>
+
+ <test-fixture id="multi">
+ <template>
+ <test-menubar multi>
+ <div>item 1</div>
+ <div>item 2</div>
+ <div>item 3</div>
+ </test-menubar>
+ </template>
+ </test-fixture>
+
+ <script>
+
+ suite('menubar a11y tests', function() {
+
+ test('menubar has role="menubar"', function() {
+ var menubar = fixture('basic');
+ assert.equal(menubar.getAttribute('role'), 'menubar', 'has role="menubar"');
+ });
+
+ test('first item gets focus when menubar is focused', function(done) {
+ var menubar = fixture('basic');
+ menubar.focus();
+ setTimeout(function() {
+ assert.equal(document.activeElement, menubar.firstElementChild, 'document.activeElement is first item')
+ done();
+ // wait for async in _onFocus
+ }, 200);
+ });
+
+ test('selected item gets focus when menubar is focused', function(done) {
+ var menubar = fixture('basic');
+ menubar.selected = 1;
+ menubar.focus();
+ setTimeout(function() {
+ assert.equal(document.activeElement, menubar.selectedItem, 'document.activeElement is selected item');
+ done();
+ // wait for async in _onFocus
+ }, 200);
+ });
+
+ test('last activated item in a multi select menubar is focused', function(done) {
+ var menubar = fixture('multi');
+ menubar.selected = 0;
+ menubar.items[1].click();
+ setTimeout(function() {
+ assert.equal(document.activeElement, menubar.items[1], 'document.activeElement is last activated item');
+ done();
+ // wait for async in _onFocus
+ }, 200);
+ });
+
+ test('deselection in a multi select menubar focuses deselected item', function(done) {
+ var menubar = fixture('multi');
+ menubar.selected = 0;
+ menubar.items[0].click();
+ setTimeout(function() {
+ assert.equal(document.activeElement, menubar.items[0], 'document.activeElement is last activated item');
+ done();
+ // wait for async in _onFocus
+ }, 200);
+ });
+
+ });
+
+ </script>
+
+ </body>
+</html>
diff --git a/static/bower_components/iron-menu-behavior/test/test-menu.html b/static/bower_components/iron-menu-behavior/test/test-menu.html
new file mode 100644
index 0000000..19b1662
--- /dev/null
+++ b/static/bower_components/iron-menu-behavior/test/test-menu.html
@@ -0,0 +1,40 @@
+<!--
+@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="../../polymer/polymer.html">
+<link rel="import" href="../iron-menu-behavior.html">
+
+<dom-module id="test-menu">
+
+ <template>
+
+ <content></content>
+
+ </template>
+
+</dom-module>
+
+<script>
+
+(function() {
+
+ Polymer({
+
+ is: 'test-menu',
+
+ behaviors: [
+ Polymer.IronMenuBehavior
+ ]
+
+ });
+
+})();
+
+</script>
diff --git a/static/bower_components/iron-menu-behavior/test/test-menubar.html b/static/bower_components/iron-menu-behavior/test/test-menubar.html
new file mode 100644
index 0000000..5f7ecbc
--- /dev/null
+++ b/static/bower_components/iron-menu-behavior/test/test-menubar.html
@@ -0,0 +1,40 @@
+<!--
+@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="../../polymer/polymer.html">
+<link rel="import" href="../iron-menubar-behavior.html">
+
+<dom-module id="test-menubar">
+
+ <template>
+
+ <content></content>
+
+ </template>
+
+</dom-module>
+
+<script>
+
+(function() {
+
+ Polymer({
+
+ is: 'test-menubar',
+
+ behaviors: [
+ Polymer.IronMenubarBehavior
+ ]
+
+ });
+
+})();
+
+</script>
diff --git a/static/bower_components/iron-meta/.bower.json b/static/bower_components/iron-meta/.bower.json
new file mode 100644
index 0000000..8119ebc
--- /dev/null
+++ b/static/bower_components/iron-meta/.bower.json
@@ -0,0 +1,38 @@
+{
+ "name": "iron-meta",
+ "version": "1.0.3",
+ "keywords": [
+ "web-components",
+ "polymer"
+ ],
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "description": "Useful for sharing information across a DOM tree",
+ "private": true,
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/iron-meta.git"
+ },
+ "dependencies": {
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "paper-styles": "polymerelements/paper-styles#^1.0.4",
+ "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
+ "test-fixture": "polymerelements/test-fixture#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ },
+ "homepage": "https://github.com/polymerelements/iron-meta",
+ "_release": "1.0.3",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.0.3",
+ "commit": "91529259262b0d8f33fed44bc3fd47aedf35cb04"
+ },
+ "_source": "git://github.com/polymerelements/iron-meta.git",
+ "_target": "^1.0.0",
+ "_originalSource": "polymerelements/iron-meta"
+} \ No newline at end of file
diff --git a/static/bower_components/iron-meta/.gitignore b/static/bower_components/iron-meta/.gitignore
new file mode 100644
index 0000000..8d4ae25
--- /dev/null
+++ b/static/bower_components/iron-meta/.gitignore
@@ -0,0 +1 @@
+bower_components
diff --git a/static/bower_components/iron-meta/README.md b/static/bower_components/iron-meta/README.md
new file mode 100644
index 0000000..26e2ddf
--- /dev/null
+++ b/static/bower_components/iron-meta/README.md
@@ -0,0 +1,46 @@
+iron-meta
+=========
+
+`iron-meta` is a generic element you can use for sharing information across the DOM tree.
+It uses [monostate pattern](http://c2.com/cgi/wiki?MonostatePattern) such that any
+instance of iron-meta has access to the shared
+information. You can use `iron-meta` to share whatever you want (or create an extension
+[like x-meta] for enhancements).
+
+The `iron-meta` instances containing your actual data can be loaded in an import,
+or constructed in any way you see fit. The only requirement is that you create them
+before you try to access them.
+
+Examples:
+
+If I create an instance like this:
+
+```html
+<iron-meta key="info" value="foo/bar"></iron-meta>
+```
+
+Note that value="foo/bar" is the metadata I've defined. I could define more
+attributes or use child nodes to define additional metadata.
+
+Now I can access that element (and it's metadata) from any iron-meta instance
+via the byKey method, e.g.
+
+```javascript
+meta.byKey('info').getAttribute('value');
+```
+
+Pure imperative form would be like:
+
+```javascript
+document.createElement('iron-meta').byKey('info').getAttribute('value');
+```
+
+Or, in a Polymer element, you can include a meta in your template:
+
+```html
+<iron-meta id="meta"></iron-meta>
+```
+
+```javascript
+this.$.meta.byKey('info').getAttribute('value');
+```
diff --git a/static/bower_components/iron-meta/bower.json b/static/bower_components/iron-meta/bower.json
new file mode 100644
index 0000000..65a1f8f
--- /dev/null
+++ b/static/bower_components/iron-meta/bower.json
@@ -0,0 +1,28 @@
+{
+ "name": "iron-meta",
+ "version": "1.0.3",
+ "keywords": [
+ "web-components",
+ "polymer"
+ ],
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "description": "Useful for sharing information across a DOM tree",
+ "private": true,
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/iron-meta.git"
+ },
+ "dependencies": {
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "paper-styles": "polymerelements/paper-styles#^1.0.4",
+ "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
+ "test-fixture": "polymerelements/test-fixture#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ }
+}
diff --git a/static/bower_components/iron-meta/demo/index.html b/static/bower_components/iron-meta/demo/index.html
new file mode 100644
index 0000000..3deee3c
--- /dev/null
+++ b/static/bower_components/iron-meta/demo/index.html
@@ -0,0 +1,46 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+ <title>iron-meta</title>
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <link rel="import" href="../../paper-styles/demo-pages.html">
+ <link rel="import" href="../iron-meta.html">
+</head>
+<body>
+
+ <div class="vertical-section vertical-section-container centered">
+ <h1>&lt;iron-meta&gt;</h1>
+ <iron-meta key="info" value="foo/bar"></iron-meta>
+ The <code>value</code> stored at <code>key="info"</code> is <code><meta-test></meta-test></code>.
+ </div>
+
+ <script>
+
+ Polymer({
+
+ is: 'meta-test',
+
+ ready: function() {
+ this.textContent = new Polymer.IronMetaQuery({key: 'info'}).value;
+ }
+
+ });
+
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/iron-meta/hero.svg b/static/bower_components/iron-meta/hero.svg
new file mode 100644
index 0000000..8d36c50
--- /dev/null
+++ b/static/bower_components/iron-meta/hero.svg
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
+<g id="background" display="none">
+ <rect display="inline" fill="#B0BEC5" width="225" height="126"/>
+</g>
+<g id="label">
+</g>
+<g id="art">
+ <circle cx="22" cy="85" r="4"/>
+ <circle cx="88" cy="98" r="4"/>
+ <path d="M87.5,100c-3.8-0.3-5.5-2.8-7-5c-1.4-2.1-2.7-3.9-5.5-4.2c-2.8-0.3-4.4,1.3-6.2,3.1c-1.9,1.9-4,4-7.8,3.7
+ c-3.8-0.3-5.5-2.8-7-5c-1.4-2.1-2.7-3.9-5.5-4.2c-2.8-0.3-4.4,1.3-6.2,3.1c-1.9,1.9-4,4-7.8,3.7c-3.8-0.3-5.5-2.8-7-5
+ c-1.4-2.1-2.7-3.9-5.5-4.2l0.2-2c3.8,0.3,5.5,2.8,7,5c1.4,2.1,2.7,3.9,5.5,4.2c2.8,0.3,4.4-1.3,6.2-3.1c1.9-1.9,4-4,7.8-3.7
+ c3.8,0.3,5.5,2.8,7,5c1.4,2.1,2.7,3.9,5.5,4.2c2.8,0.3,4.4-1.3,6.2-3.1c1.9-1.9,4-4,7.8-3.7c3.8,0.3,5.5,2.8,7,5
+ c1.4,2.1,2.7,3.9,5.5,4.2L87.5,100z"/>
+ <circle cx="96" cy="86" r="4"/>
+ <circle cx="162" cy="98" r="4"/>
+ <rect x="95.5" y="91" transform="matrix(0.9839 0.1789 -0.1789 0.9839 18.5382 -21.5923)" width="67.1" height="2"/>
+ <g>
+ <path d="M27,41.5l4.5,13.4l4.9-13.4h5.4v32h-4.4V61l0.4-13.4l-5.4,14.5h-2L25.6,48L26,61v12.5h-4.4v-32H27z"/>
+ <path d="M67.5,58.7H53.4V70h16.4v3.5H49v-32h20.6V45H53.4v10.2h14.2V58.7z"/>
+ <path d="M98.5,45H88.3v28.5h-4.4V45H73.6v-3.5h24.9V45z"/>
+ <path d="M116.2,65.3H105l-2.6,8.2h-4.5l10.9-32h3.8l10.6,32h-4.5L116.2,65.3z M106.2,61.6h8.9l-4.4-14.2L106.2,61.6z"/>
+ </g>
+ <g id="ic_x5F_add_x0D_">
+ </g>
+</g>
+<g id="Guides">
+</g>
+</svg>
diff --git a/static/bower_components/iron-meta/index.html b/static/bower_components/iron-meta/index.html
new file mode 100644
index 0000000..c70dc6e
--- /dev/null
+++ b/static/bower_components/iron-meta/index.html
@@ -0,0 +1,27 @@
+<!doctype html>
+<!--
+@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
+The complete set of authors may be found at http://polymer.github.io/AUTHORS
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
+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
+-->
+<html>
+<head>
+
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>iron-meta</title>
+
+ <script src="../webcomponentsjs/webcomponents-lite.js"></script>
+ <link rel="import" href="../iron-component-page/iron-component-page.html">
+
+</head>
+<body>
+
+ <iron-component-page></iron-component-page>
+
+</body>
+</html>
diff --git a/static/bower_components/iron-meta/iron-meta.html b/static/bower_components/iron-meta/iron-meta.html
new file mode 100644
index 0000000..4b34311
--- /dev/null
+++ b/static/bower_components/iron-meta/iron-meta.html
@@ -0,0 +1,317 @@
+<!--
+@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="../polymer/polymer.html">
+
+<!--
+`iron-meta` is a generic element you can use for sharing information across the DOM tree.
+It uses [monostate pattern](http://c2.com/cgi/wiki?MonostatePattern) such that any
+instance of iron-meta has access to the shared
+information. You can use `iron-meta` to share whatever you want (or create an extension
+[like x-meta] for enhancements).
+
+The `iron-meta` instances containing your actual data can be loaded in an import,
+or constructed in any way you see fit. The only requirement is that you create them
+before you try to access them.
+
+Examples:
+
+If I create an instance like this:
+
+ <iron-meta key="info" value="foo/bar"></iron-meta>
+
+Note that value="foo/bar" is the metadata I've defined. I could define more
+attributes or use child nodes to define additional metadata.
+
+Now I can access that element (and it's metadata) from any iron-meta instance
+via the byKey method, e.g.
+
+ meta.byKey('info').getAttribute('value').
+
+Pure imperative form would be like:
+
+ document.createElement('iron-meta').byKey('info').getAttribute('value');
+
+Or, in a Polymer element, you can include a meta in your template:
+
+ <iron-meta id="meta"></iron-meta>
+ ...
+ this.$.meta.byKey('info').getAttribute('value');
+
+@group Iron Elements
+@demo demo/index.html
+@hero hero.svg
+@element iron-meta
+-->
+
+<script>
+
+ (function() {
+
+ // monostate data
+ var metaDatas = {};
+ var metaArrays = {};
+
+ Polymer.IronMeta = Polymer({
+
+ is: 'iron-meta',
+
+ properties: {
+
+ /**
+ * The type of meta-data. All meta-data of the same type is stored
+ * together.
+ */
+ type: {
+ type: String,
+ value: 'default',
+ observer: '_typeChanged'
+ },
+
+ /**
+ * The key used to store `value` under the `type` namespace.
+ */
+ key: {
+ type: String,
+ observer: '_keyChanged'
+ },
+
+ /**
+ * The meta-data to store or retrieve.
+ */
+ value: {
+ type: Object,
+ notify: true,
+ observer: '_valueChanged'
+ },
+
+ /**
+ * If true, `value` is set to the iron-meta instance itself.
+ */
+ self: {
+ type: Boolean,
+ observer: '_selfChanged'
+ },
+
+ /**
+ * Array of all meta-data values for the given type.
+ */
+ list: {
+ type: Array,
+ notify: true
+ }
+
+ },
+
+ /**
+ * Only runs if someone invokes the factory/constructor directly
+ * e.g. `new Polymer.IronMeta()`
+ */
+ factoryImpl: function(config) {
+ if (config) {
+ for (var n in config) {
+ switch(n) {
+ case 'type':
+ case 'key':
+ case 'value':
+ this[n] = config[n];
+ break;
+ }
+ }
+ }
+ },
+
+ created: function() {
+ // TODO(sjmiles): good for debugging?
+ this._metaDatas = metaDatas;
+ this._metaArrays = metaArrays;
+ },
+
+ _keyChanged: function(key, old) {
+ this._resetRegistration(old);
+ },
+
+ _valueChanged: function(value) {
+ this._resetRegistration(this.key);
+ },
+
+ _selfChanged: function(self) {
+ if (self) {
+ this.value = this;
+ }
+ },
+
+ _typeChanged: function(type) {
+ this._unregisterKey(this.key);
+ if (!metaDatas[type]) {
+ metaDatas[type] = {};
+ }
+ this._metaData = metaDatas[type];
+ if (!metaArrays[type]) {
+ metaArrays[type] = [];
+ }
+ this.list = metaArrays[type];
+ this._registerKeyValue(this.key, this.value);
+ },
+
+ /**
+ * Retrieves meta data value by key.
+ *
+ * @method byKey
+ * @param {string} key The key of the meta-data to be returned.
+ * @return {*}
+ */
+ byKey: function(key) {
+ return this._metaData && this._metaData[key];
+ },
+
+ _resetRegistration: function(oldKey) {
+ this._unregisterKey(oldKey);
+ this._registerKeyValue(this.key, this.value);
+ },
+
+ _unregisterKey: function(key) {
+ this._unregister(key, this._metaData, this.list);
+ },
+
+ _registerKeyValue: function(key, value) {
+ this._register(key, value, this._metaData, this.list);
+ },
+
+ _register: function(key, value, data, list) {
+ if (key && data && value !== undefined) {
+ data[key] = value;
+ list.push(value);
+ }
+ },
+
+ _unregister: function(key, data, list) {
+ if (key && data) {
+ if (key in data) {
+ var value = data[key];
+ delete data[key];
+ this.arrayDelete(list, value);
+ }
+ }
+ }
+
+ });
+
+ /**
+ `iron-meta-query` can be used to access infomation stored in `iron-meta`.
+
+ Examples:
+
+ If I create an instance like this:
+
+ <iron-meta key="info" value="foo/bar"></iron-meta>
+
+ Note that value="foo/bar" is the metadata I've defined. I could define more
+ attributes or use child nodes to define additional metadata.
+
+ Now I can access that element (and it's metadata) from any `iron-meta-query` instance:
+
+ var value = new Polymer.IronMetaQuery({key: 'info'}).value;
+
+ @group Polymer Iron Elements
+ @element iron-meta-query
+ */
+ Polymer.IronMetaQuery = Polymer({
+
+ is: 'iron-meta-query',
+
+ properties: {
+
+ /**
+ * The type of meta-data. All meta-data of the same type is stored
+ * together.
+ */
+ type: {
+ type: String,
+ value: 'default',
+ observer: '_typeChanged'
+ },
+
+ /**
+ * Specifies a key to use for retrieving `value` from the `type`
+ * namespace.
+ */
+ key: {
+ type: String,
+ observer: '_keyChanged'
+ },
+
+ /**
+ * The meta-data to store or retrieve.
+ */
+ value: {
+ type: Object,
+ notify: true,
+ readOnly: true
+ },
+
+ /**
+ * Array of all meta-data values for the given type.
+ */
+ list: {
+ type: Array,
+ notify: true
+ }
+
+ },
+
+ /**
+ * Actually a factory method, not a true constructor. Only runs if
+ * someone invokes it directly (via `new Polymer.IronMeta()`);
+ */
+ factoryImpl: function(config) {
+ if (config) {
+ for (var n in config) {
+ switch(n) {
+ case 'type':
+ case 'key':
+ this[n] = config[n];
+ break;
+ }
+ }
+ }
+ },
+
+ created: function() {
+ // TODO(sjmiles): good for debugging?
+ this._metaDatas = metaDatas;
+ this._metaArrays = metaArrays;
+ },
+
+ _keyChanged: function(key) {
+ this._setValue(this._metaData && this._metaData[key]);
+ },
+
+ _typeChanged: function(type) {
+ this._metaData = metaDatas[type];
+ this.list = metaArrays[type];
+ if (this.key) {
+ this._keyChanged(this.key);
+ }
+ },
+
+ /**
+ * Retrieves meta data value by key.
+ * @param {string} key The key of the meta-data to be returned.
+ * @return {*}
+ */
+ byKey: function(key) {
+ return this._metaData && this._metaData[key];
+ }
+
+ });
+
+ })();
+</script>
diff --git a/static/bower_components/iron-meta/test/basic.html b/static/bower_components/iron-meta/test/basic.html
new file mode 100644
index 0000000..c561dc3
--- /dev/null
+++ b/static/bower_components/iron-meta/test/basic.html
@@ -0,0 +1,48 @@
+<!doctype html>
+<!--
+@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
+-->
+
+<html>
+<head>
+
+ <title>iron-meta-basic</title>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+
+ <link rel="import" href="../iron-meta.html">
+
+</head>
+<body>
+
+ <iron-meta key="info" value="foo/bar"></iron-meta>
+
+ <script>
+
+ suite('basic', function() {
+
+ test('byKey', function() {
+ var meta = document.createElement('iron-meta');
+ assert.equal(meta.byKey('info'), 'foo/bar');
+ });
+
+ test('list', function() {
+ var meta = document.createElement('iron-meta');
+ assert.equal(meta.list.length, 1);
+ });
+
+ });
+
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/iron-meta/test/index.html b/static/bower_components/iron-meta/test/index.html
new file mode 100644
index 0000000..2b9541b
--- /dev/null
+++ b/static/bower_components/iron-meta/test/index.html
@@ -0,0 +1,30 @@
+<!doctype html>
+<!--
+@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
+-->
+
+<html>
+<head>
+
+ <meta charset="utf-8">
+ <title>Tests</title>
+ <script src="../../web-component-tester/browser.js"></script>
+
+</head>
+<body>
+
+ <script>
+ WCT.loadSuites([
+ 'basic.html',
+ 'iron-meta.html'
+ ]);
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/iron-meta/test/iron-meta.html b/static/bower_components/iron-meta/test/iron-meta.html
new file mode 100644
index 0000000..c1a4028
--- /dev/null
+++ b/static/bower_components/iron-meta/test/iron-meta.html
@@ -0,0 +1,186 @@
+<!doctype html>
+<!--
+@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
+-->
+
+<html>
+ <head>
+
+ <title>iron-meta</title>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
+
+ <link rel="import" href="../iron-meta.html">
+ <link rel="import" href="../../test-fixture/test-fixture.html">
+
+ </head>
+ <body>
+
+ <test-fixture id="TrivialMeta">
+ <template>
+ <iron-meta self key="info"></iron-meta>
+ </template>
+ </test-fixture>
+
+ <test-fixture id="ManyMetas">
+ <template>
+ <iron-meta self key="default1"></iron-meta>
+ <iron-meta self key="default2"></iron-meta>
+ <iron-meta self key="default3"></iron-meta>
+ </template>
+ </test-fixture>
+
+ <test-fixture id="DifferentTypedMetas">
+ <template>
+ <iron-meta self type="foo" key="foobarKey"></iron-meta>
+ <iron-meta self type="bar" key="foobarKey"></iron-meta>
+ <iron-meta self key="defaultKey"></iron-meta>
+ </template>
+ </test-fixture>
+
+ <test-fixture id="ClashingMetas">
+ <template>
+ <iron-meta self key="baz"></iron-meta>
+ <iron-meta self key="baz"></iron-meta>
+ </template>
+ </test-fixture>
+
+ <script>
+suite('<iron-meta>', function () {
+ suite('basic behavior', function () {
+ var meta;
+
+ setup(function () {
+ meta = fixture('TrivialMeta');
+ });
+
+ teardown(function () {
+ meta.key = null;
+ });
+
+ test('uses itself as the default value', function () {
+ expect(meta.value).to.be.equal(meta);
+ });
+
+ test('can be assigned alternative values', function () {
+ meta.value = 'foobar';
+
+ expect(meta.list[0]).to.be.equal('foobar');
+ });
+
+ test('can access same-type meta values by key', function () {
+ expect(meta.byKey(meta.key)).to.be.equal(meta.value);
+ });
+
+ test('yields a list of same-type meta data', function () {
+ expect(meta.list).to.be.ok;
+ expect(meta.list.length).to.be.equal(1);
+ expect(meta.list[0]).to.be.equal(meta);
+ });
+ });
+
+ suite('many same-typed metas', function () {
+ var metas;
+
+ setup(function () {
+ metas = fixture('ManyMetas');
+ });
+
+ teardown(function () {
+ metas.forEach(function (meta) {
+ meta.key = null;
+ });
+ });
+
+ test('all cache all meta values', function () {
+ metas.forEach(function (meta, index) {
+ expect(meta.list.length).to.be.equal(metas.length);
+ expect(meta.list[index].value).to.be.equal(meta.value);
+ });
+ });
+
+ test('can be unregistered individually', function () {
+ metas[0].key = null;
+
+ expect(metas[0].list.length).to.be.equal(2);
+ expect(metas[0].list).to.be.deep.equal([metas[1], metas[2]])
+ });
+
+ test('can access each others value by key', function () {
+ expect(metas[0].byKey('default2')).to.be.equal(metas[1].value);
+ });
+ });
+
+ suite('different-typed metas', function () {
+ var metas;
+
+ setup(function () {
+ metas = fixture('DifferentTypedMetas');
+ });
+
+ teardown(function () {
+ metas.forEach(function (meta) {
+ meta.key = null;
+ });
+ });
+
+ test('cache their values separately', function () {
+ var fooMeta = metas[0];
+ var barMeta = metas[1];
+
+ expect(fooMeta.value).to.not.be.equal(barMeta.value);
+ expect(fooMeta.byKey('foobarKey')).to.be.equal(fooMeta.value);
+ expect(barMeta.byKey('foobarKey')).to.be.equal(barMeta.value);
+ });
+
+ test('cannot access values of other types', function () {
+ var defaultMeta = metas[2];
+
+ expect(defaultMeta.byKey('foobarKey')).to.be.equal(undefined);
+ });
+
+ test('only list values of their type', function () {
+ metas.forEach(function (meta) {
+ expect(meta.list.length).to.be.equal(1);
+ expect(meta.list[0]).to.be.equal(meta.value);
+ })
+ });
+ });
+
+ suite('metas with clashing keys', function () {
+ var metaPair;
+
+ setup(function () {
+ metaPair = fixture('ClashingMetas');
+ });
+
+ teardown(function () {
+ metaPair.forEach(function (meta) {
+ meta.key = null;
+ });
+ });
+
+ test('let the last value win registration against the key', function () {
+ var registeredValue = metaPair[0].byKey(metaPair[0].key);
+ var firstValue = metaPair[0].value;
+ var secondValue = metaPair[1].value;
+
+ expect(registeredValue).to.not.be.equal(firstValue);
+ expect(registeredValue).to.be.equal(secondValue);
+ });
+ });
+});
+ </script>
+
+ </body>
+</html>
diff --git a/static/bower_components/iron-resizable-behavior/.bower.json b/static/bower_components/iron-resizable-behavior/.bower.json
new file mode 100644
index 0000000..9ae5e84
--- /dev/null
+++ b/static/bower_components/iron-resizable-behavior/.bower.json
@@ -0,0 +1,40 @@
+{
+ "name": "iron-resizable-behavior",
+ "version": "1.0.2",
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "description": "Coordinates the flow of resizeable elements",
+ "private": true,
+ "main": "iron-resizable-behavior.html",
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "keywords": [
+ "web-components",
+ "polymer",
+ "iron",
+ "behavior"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/iron-resizable-behavior.git"
+ },
+ "dependencies": {
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
+ "test-fixture": "polymerelements/test-fixture#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ },
+ "homepage": "https://github.com/PolymerElements/iron-resizable-behavior",
+ "_release": "1.0.2",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.0.2",
+ "commit": "85de8ba28be2bf17c81d6436ef1119022b003674"
+ },
+ "_source": "git://github.com/PolymerElements/iron-resizable-behavior.git",
+ "_target": "^1.0.0",
+ "_originalSource": "PolymerElements/iron-resizable-behavior"
+} \ No newline at end of file
diff --git a/static/bower_components/iron-resizable-behavior/.gitignore b/static/bower_components/iron-resizable-behavior/.gitignore
new file mode 100644
index 0000000..8d4ae25
--- /dev/null
+++ b/static/bower_components/iron-resizable-behavior/.gitignore
@@ -0,0 +1 @@
+bower_components
diff --git a/static/bower_components/iron-resizable-behavior/README.md b/static/bower_components/iron-resizable-behavior/README.md
new file mode 100644
index 0000000..72be6de
--- /dev/null
+++ b/static/bower_components/iron-resizable-behavior/README.md
@@ -0,0 +1,16 @@
+iron-resizable-behavior
+=======================
+
+`IronResizableBehavior` is a behavior that can be used in Polymer elements to
+coordinate the flow of resize events between "resizers" (elements that control the
+size or hidden state of their children) and "resizables" (elements that need to be
+notified when they are resized or un-hidden by their parents in order to take
+action on their new measurements).
+
+Elements that perform measurement should add the `IronResizableBehavior` behavior to
+their element definition and listen for the `iron-resize` event on themselves.
+This event will be fired when they become showing after having been hidden,
+when they are resized explicitly by another resizable, or when the window has been
+resized.
+
+Note, the `iron-resize` event is non-bubbling.
diff --git a/static/bower_components/iron-resizable-behavior/bower.json b/static/bower_components/iron-resizable-behavior/bower.json
new file mode 100644
index 0000000..d0591a3
--- /dev/null
+++ b/static/bower_components/iron-resizable-behavior/bower.json
@@ -0,0 +1,30 @@
+{
+ "name": "iron-resizable-behavior",
+ "version": "1.0.2",
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "description": "Coordinates the flow of resizeable elements",
+ "private": true,
+ "main": "iron-resizable-behavior.html",
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "keywords": [
+ "web-components",
+ "polymer",
+ "iron",
+ "behavior"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/iron-resizable-behavior.git"
+ },
+ "dependencies": {
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
+ "test-fixture": "polymerelements/test-fixture#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ }
+}
diff --git a/static/bower_components/iron-resizable-behavior/demo/index.html b/static/bower_components/iron-resizable-behavior/demo/index.html
new file mode 100644
index 0000000..2896c50
--- /dev/null
+++ b/static/bower_components/iron-resizable-behavior/demo/index.html
@@ -0,0 +1,29 @@
+<!doctype html>
+<!--
+@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
+-->
+
+<html>
+<head>
+
+ <title>iron-resizable-behavior demo</title>
+
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <link rel="import" href="src/x-app.html">
+
+</head>
+<body>
+
+ <x-app></x-app>
+
+</body>
+</html>
diff --git a/static/bower_components/iron-resizable-behavior/demo/src/x-app.html b/static/bower_components/iron-resizable-behavior/demo/src/x-app.html
new file mode 100644
index 0000000..c334ad3
--- /dev/null
+++ b/static/bower_components/iron-resizable-behavior/demo/src/x-app.html
@@ -0,0 +1,114 @@
+<!--
+@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-resizable-behavior.html">
+
+<dom-module id="x-puck">
+
+ <style>
+
+ :host {
+ display: inline-block;
+ border: 3px solid lightblue;
+ }
+
+ </style>
+
+ <template>
+
+ <b>I'm a resize-aware, thirdifying puck at (<span>{{x}}</span> x <span>{{y}}</span>).</b>
+
+ </template>
+
+</dom-module>
+
+<script>
+
+ Polymer({
+
+ is: 'x-puck',
+
+ behaviors: [
+ Polymer.IronResizableBehavior
+ ],
+
+ properties: {
+ x: {
+ type: Number,
+ value: 0
+ },
+
+ y: {
+ type: Number,
+ value: 0
+ }
+ },
+
+ listeners: {
+ 'iron-resize': '_onIronResize'
+ },
+
+ attached: function() {
+ this.async(this.notifyResize, 1);
+ },
+
+ get parent() {
+ if (this.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
+ return this.parentNode.host;
+ }
+
+ return this.parentNode;
+ },
+
+ _onIronResize: function() {
+ var x = this.x = Math.floor(this.parent.offsetWidth / 3);
+ var y = this.y = Math.floor(this.parent.offsetHeight / 3);
+
+ this.translate3d(x + 'px', y + 'px', 0);
+ }
+ });
+
+</script>
+
+<dom-module id="x-app">
+
+ <style>
+
+ :host {
+ display: block;
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ }
+
+ </style>
+
+ <template>
+
+ <x-puck></x-puck>
+
+ </template>
+
+</dom-module>
+
+<script>
+
+ Polymer({
+
+ is: 'x-app',
+
+ behaviors: [
+ Polymer.IronResizableBehavior
+ ]
+ });
+
+</script>
diff --git a/static/bower_components/iron-resizable-behavior/index.html b/static/bower_components/iron-resizable-behavior/index.html
new file mode 100644
index 0000000..b9b8809
--- /dev/null
+++ b/static/bower_components/iron-resizable-behavior/index.html
@@ -0,0 +1,25 @@
+<!doctype html>
+<!--
+@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
+-->
+
+<html>
+<head>
+
+ <title>iron-resizable-behavior</title>
+ <script src="../webcomponentsjs/webcomponents-lite.js"></script>
+ <link rel="import" href="../iron-component-page/iron-component-page.html">
+
+</head>
+<body>
+
+ <iron-component-page></iron-component-page>
+
+</body>
+</html>
diff --git a/static/bower_components/iron-resizable-behavior/iron-resizable-behavior.html b/static/bower_components/iron-resizable-behavior/iron-resizable-behavior.html
new file mode 100644
index 0000000..19b8c02
--- /dev/null
+++ b/static/bower_components/iron-resizable-behavior/iron-resizable-behavior.html
@@ -0,0 +1,193 @@
+<!--
+@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="../polymer/polymer.html">
+
+<script>
+ /**
+ * `IronResizableBehavior` is a behavior that can be used in Polymer elements to
+ * coordinate the flow of resize events between "resizers" (elements that control the
+ * size or hidden state of their children) and "resizables" (elements that need to be
+ * notified when they are resized or un-hidden by their parents in order to take
+ * action on their new measurements).
+ * Elements that perform measurement should add the `IronResizableBehavior` behavior to
+ * their element definition and listen for the `iron-resize` event on themselves.
+ * This event will be fired when they become showing after having been hidden,
+ * when they are resized explicitly by another resizable, or when the window has been
+ * resized.
+ * Note, the `iron-resize` event is non-bubbling.
+ *
+ * @polymerBehavior Polymer.IronResizableBehavior
+ * @demo demo/index.html
+ **/
+ Polymer.IronResizableBehavior = {
+ properties: {
+ /**
+ * The closest ancestor element that implements `IronResizableBehavior`.
+ */
+ _parentResizable: {
+ type: Object,
+ observer: '_parentResizableChanged'
+ },
+
+ /**
+ * True if this element is currently notifying its descedant elements of
+ * resize.
+ */
+ _notifyingDescendant: {
+ type: Boolean,
+ value: false
+ }
+ },
+
+ listeners: {
+ 'iron-request-resize-notifications': '_onIronRequestResizeNotifications'
+ },
+
+ created: function() {
+ // We don't really need property effects on these, and also we want them
+ // to be created before the `_parentResizable` observer fires:
+ this._interestedResizables = [];
+ this._boundNotifyResize = this.notifyResize.bind(this);
+ },
+
+ attached: function() {
+ this.fire('iron-request-resize-notifications', null, {
+ node: this,
+ bubbles: true,
+ cancelable: true
+ });
+
+ if (!this._parentResizable) {
+ window.addEventListener('resize', this._boundNotifyResize);
+ this.notifyResize();
+ }
+ },
+
+ detached: function() {
+ if (this._parentResizable) {
+ this._parentResizable.stopResizeNotificationsFor(this);
+ } else {
+ window.removeEventListener('resize', this._boundNotifyResize);
+ }
+
+ this._parentResizable = null;
+ },
+
+ /**
+ * Can be called to manually notify a resizable and its descendant
+ * resizables of a resize change.
+ */
+ notifyResize: function() {
+ if (!this.isAttached) {
+ return;
+ }
+
+ this._interestedResizables.forEach(function(resizable) {
+ if (this.resizerShouldNotify(resizable)) {
+ this._notifyDescendant(resizable);
+ }
+ }, this);
+
+ this._fireResize();
+ },
+
+ /**
+ * Used to assign the closest resizable ancestor to this resizable
+ * if the ancestor detects a request for notifications.
+ */
+ assignParentResizable: function(parentResizable) {
+ this._parentResizable = parentResizable;
+ },
+
+ /**
+ * Used to remove a resizable descendant from the list of descendants
+ * that should be notified of a resize change.
+ */
+ stopResizeNotificationsFor: function(target) {
+ var index = this._interestedResizables.indexOf(target);
+
+ if (index > -1) {
+ this._interestedResizables.splice(index, 1);
+ this.unlisten(target, 'iron-resize', '_onDescendantIronResize');
+ }
+ },
+
+ /**
+ * This method can be overridden to filter nested elements that should or
+ * should not be notified by the current element. Return true if an element
+ * should be notified, or false if it should not be notified.
+ *
+ * @param {HTMLElement} element A candidate descendant element that
+ * implements `IronResizableBehavior`.
+ * @return {boolean} True if the `element` should be notified of resize.
+ */
+ resizerShouldNotify: function(element) { return true; },
+
+ _onDescendantIronResize: function(event) {
+ if (this._notifyingDescendant) {
+ event.stopPropagation();
+ return;
+ }
+
+ // NOTE(cdata): In ShadowDOM, event retargetting makes echoing of the
+ // otherwise non-bubbling event "just work." We do it manually here for
+ // the case where Polymer is not using shadow roots for whatever reason:
+ if (!Polymer.Settings.useShadow) {
+ this._fireResize();
+ }
+ },
+
+ _fireResize: function() {
+ this.fire('iron-resize', null, {
+ node: this,
+ bubbles: false
+ });
+ },
+
+ _onIronRequestResizeNotifications: function(event) {
+ var target = event.path ? event.path[0] : event.target;
+
+ if (target === this) {
+ return;
+ }
+
+ if (this._interestedResizables.indexOf(target) === -1) {
+ this._interestedResizables.push(target);
+ this.listen(target, 'iron-resize', '_onDescendantIronResize');
+ }
+
+ target.assignParentResizable(this);
+ this._notifyDescendant(target);
+
+ event.stopPropagation();
+ },
+
+ _parentResizableChanged: function(parentResizable) {
+ if (parentResizable) {
+ window.removeEventListener('resize', this._boundNotifyResize);
+ }
+ },
+
+ _notifyDescendant: function(descendant) {
+ // NOTE(cdata): In IE10, attached is fired on children first, so it's
+ // important not to notify them if the parent is not attached yet (or
+ // else they will get redundantly notified when the parent attaches).
+ if (!this.isAttached) {
+ return;
+ }
+
+ this._notifyingDescendant = true;
+ descendant.notifyResize();
+ this._notifyingDescendant = false;
+ }
+ };
+</script>
+
diff --git a/static/bower_components/iron-resizable-behavior/test/basic.html b/static/bower_components/iron-resizable-behavior/test/basic.html
new file mode 100644
index 0000000..0ae890d
--- /dev/null
+++ b/static/bower_components/iron-resizable-behavior/test/basic.html
@@ -0,0 +1,263 @@
+<!doctype html>
+<!--
+@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
+-->
+
+<html>
+<head>
+
+ <title>iron-resizable-behavior tests</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
+
+ <link rel="import" href="../../test-fixture/test-fixture.html">
+ <link rel="import" href="../iron-resizable-behavior.html">
+ <link rel="import" href="test-elements.html">
+
+</head>
+<body>
+
+<!--
+
+Notes on Polyfill compatibility in tests:
+- Test elements loaded via imports, to ensure load order correctness
+ w.r.t. Polymer.mixin being availbale
+- Resize notifications and asserts are done asynchronously, since
+ there are timing differences w.r.t. when detached callbacks occur
+
+-->
+
+ <test-fixture id="TestElement">
+ <template>
+ <test-element></test-element>
+ </template>
+ </test-fixture>
+
+
+ <script>
+
+ suite('iron-resizable-behavior', function() {
+ function ListenForResize(el, expectsResize) {
+ var listener = function(event) {
+ var target = event.path ? event.path[0] : event.target;
+ pendingNotifications--;
+ };
+
+ if (expectsResize !== false) {
+ pendingNotifications++;
+ }
+
+ el.addEventListener('iron-resize', listener);
+
+ return {
+ el: el,
+ remove: function() {
+ el.removeEventListener('iron-resize', listener);
+ }
+ };
+ }
+
+ function RemoveListeners(listeners) {
+ listeners.forEach(function(listener) {
+ listener.remove();
+ });
+ }
+
+ var pendingNotifications;
+ var testEl;
+
+ setup(function() {
+ pendingNotifications = 0;
+ testEl = fixture('TestElement');
+ });
+
+ suite('x-resizer-parent', function() {
+
+ test('notify resizables from window', function(done) {
+ var listeners = [
+ ListenForResize(testEl.$.parent),
+ ListenForResize(testEl.$.child1a),
+ ListenForResize(testEl.$.child1b),
+ ListenForResize(testEl.$.shadow1c.$.resizable),
+ ListenForResize(testEl.$.shadow1d.$.resizable)
+ ];
+
+ setTimeout(function() {
+ try {
+ window.dispatchEvent(new CustomEvent('resize', { bubbles: false }));
+
+ expect(pendingNotifications).to.be.eql(0);
+
+ RemoveListeners(listeners);
+
+ done();
+ } catch (e) {
+ done(e);
+ }
+ }, 0);
+ });
+
+ test('notify resizables from parent', function(done) {
+ var listeners = [
+ ListenForResize(testEl.$.parent),
+ ListenForResize(testEl.$.child1a),
+ ListenForResize(testEl.$.child1b),
+ ListenForResize(testEl.$.shadow1c.$.resizable),
+ ListenForResize(testEl.$.shadow1d.$.resizable)
+ ];
+
+ setTimeout(function() {
+ try {
+ testEl.$.parent.notifyResize();
+ expect(pendingNotifications).to.be.eql(0);
+ RemoveListeners(listeners);
+ done();
+ } catch (e) {
+ done(e);
+ }
+ }, 0);
+ });
+
+ test('detach resizables then notify parent', function(done) {
+ var listeners = [
+ ListenForResize(testEl.$.parent),
+ ListenForResize(testEl.$.child1a, false),
+ ListenForResize(testEl.$.child1b),
+ ListenForResize(testEl.$.shadow1c.$.resizable, false),
+ ListenForResize(testEl.$.shadow1d.$.resizable)
+ ];
+
+ var el = Polymer.dom(testEl.root).querySelector('#child1a');
+
+ el.parentNode.removeChild(el);
+ el = Polymer.dom(testEl.root).querySelector('#shadow1c');
+ el.parentNode.removeChild(el);
+
+ setTimeout(function() {
+ try {
+ testEl.$.parent.notifyResize();
+ expect(pendingNotifications).to.be.eql(0);
+ RemoveListeners(listeners);
+ done();
+ } catch (e) {
+ done(e);
+ }
+ }, 0);
+ });
+
+ test('detach parent then notify window', function(done) {
+ var listeners = [
+ ListenForResize(testEl.$.parent, false),
+ ListenForResize(testEl.$.child1a, false),
+ ListenForResize(testEl.$.child1b, false),
+ ListenForResize(testEl.$.shadow1c.$.resizable, false),
+ ListenForResize(testEl.$.shadow1d.$.resizable, false)
+ ];
+
+ var el = Polymer.dom(testEl.root).querySelector('#parent');
+
+ el.parentNode.removeChild(el);
+
+ setTimeout(function() {
+ try {
+ window.dispatchEvent(new CustomEvent('resize', { bubbles: false }));
+ expect(pendingNotifications).to.be.eql(0);
+ RemoveListeners(listeners);
+ done();
+ } catch (e) {
+ done(e);
+ }
+ }, 0);
+ });
+
+ });
+
+ suite('x-resizer-parent-filtered', function() {
+
+ test('notify resizables from window', function(done) {
+ var listeners = [
+ ListenForResize(testEl.$.parentFiltered),
+ ListenForResize(testEl.$.child2a),
+ ListenForResize(testEl.$.child2b, false),
+ ListenForResize(testEl.$.shadow2c.$.resizable, false),
+ ListenForResize(testEl.$.shadow2d.$.resizable, false)
+ ];
+
+ testEl.$.parentFiltered.active = testEl.$.child2a;
+
+ setTimeout(function() {
+ try {
+ window.dispatchEvent(new CustomEvent('resize', { bubbles: false }));
+ expect(pendingNotifications).to.be.eql(0);
+ RemoveListeners(listeners);
+ done();
+ } catch (e) {
+ done(e);
+ }
+ }, 0);
+ });
+
+ test('notify resizables from parent', function(done) {
+ var listeners = [
+ ListenForResize(testEl.$.parentFiltered),
+ ListenForResize(testEl.$.child2a),
+ ListenForResize(testEl.$.child2b, false),
+ ListenForResize(testEl.$.shadow2c.$.resizable, false),
+ ListenForResize(testEl.$.shadow2d.$.resizable, false)
+ ];
+
+ testEl.$.parentFiltered.active = testEl.$.child2a;
+
+ setTimeout(function() {
+ try {
+ testEl.$.parentFiltered.notifyResize();
+ expect(pendingNotifications).to.be.eql(0);
+ RemoveListeners(listeners);
+ done();
+ } catch (e) {
+ done(e);
+ }
+ }, 0);
+ });
+
+ test('detach resizables then notify parent', function(done) {
+ var listeners = [
+ ListenForResize(testEl.$.parentFiltered),
+ ListenForResize(testEl.$.child2a, false),
+ ListenForResize(testEl.$.child2b, false),
+ ListenForResize(testEl.$.shadow2c.$.resizable, false),
+ ListenForResize(testEl.$.shadow2d.$.resizable)
+ ];
+
+ var el = Polymer.dom(testEl.root).querySelector('#child2a');
+ el.parentNode.removeChild(el);
+ el = Polymer.dom(testEl.root).querySelector('#shadow2c');
+ el.parentNode.removeChild(el);
+
+ testEl.$.parentFiltered.active = testEl.$.shadow2d.$.resizable;
+
+ setTimeout(function() {
+ try {
+ testEl.$.parentFiltered.notifyResize();
+ expect(pendingNotifications).to.be.eql(0);
+ RemoveListeners(listeners);
+ done();
+ } catch (e) {
+ done(e);
+ }
+ }, 0);
+ });
+ });
+ });
+ </script>
+</body>
+</html>
diff --git a/static/bower_components/iron-resizable-behavior/test/index.html b/static/bower_components/iron-resizable-behavior/test/index.html
new file mode 100644
index 0000000..e1d3fca
--- /dev/null
+++ b/static/bower_components/iron-resizable-behavior/test/index.html
@@ -0,0 +1,32 @@
+<!doctype html>
+<!--
+@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
+-->
+
+<html>
+<head>
+
+ <meta charset="utf-8">
+ <title>Tests</title>
+ <script src="../../web-component-tester/browser.js"></script>
+
+</head>
+<body>
+
+ <script>
+
+ WCT.loadSuites([
+ 'basic.html',
+ 'iron-resizable-behavior.html'
+ ]);
+
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/iron-resizable-behavior/test/iron-resizable-behavior.html b/static/bower_components/iron-resizable-behavior/test/iron-resizable-behavior.html
new file mode 100644
index 0000000..695b977
--- /dev/null
+++ b/static/bower_components/iron-resizable-behavior/test/iron-resizable-behavior.html
@@ -0,0 +1,87 @@
+<!doctype html>
+<!--
+@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
+-->
+
+<html>
+<head>
+
+ <title>iron-resizable-behavior tests</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
+
+ <link rel="import" href="../../test-fixture/test-fixture.html">
+ <link rel="import" href="../iron-resizable-behavior.html">
+ <link rel="import" href="test-elements.html">
+
+</head>
+<body>
+
+ <test-fixture id="ResizableAndShadowBoundaries">
+ <template>
+ <x-light-resizable></x-light-resizable>
+ </template>
+ </test-fixture>
+
+ <script>
+
+ suite('iron-resizable-behavior', function() {
+ var resizable;
+
+ suite('events across shadow boundaries', function() {
+ setup(function() {
+ resizable = fixture('ResizableAndShadowBoundaries');
+ });
+
+ suite('ancestor\'s iron-resize', function() {
+ test('only fires once for a notifying shadow descendent', function() {
+ resizable.$.childResizable1.notifyResize();
+
+ expect(resizable.ironResizeCount).to.be.equal(2);
+ });
+
+ test('only fires once when notifying descendent observables', function() {
+ resizable.notifyResize();
+
+ expect(resizable.ironResizeCount).to.be.equal(2);
+ });
+ });
+
+ suite('descendant\'s iron-resize', function() {
+ test('only fires once for a notifying shadow root', function() {
+ resizable.notifyResize();
+
+ expect(resizable.$.childResizable1.ironResizeCount).to.be.equal(2);
+ expect(resizable.$.childResizable2.ironResizeCount).to.be.equal(2);
+ });
+
+ test('only fires once for a notifying descendent observable', function() {
+ resizable.$.childResizable1.notifyResize();
+
+ expect(resizable.$.childResizable1.ironResizeCount).to.be.equal(2);
+ });
+ });
+
+ suite('window\'s resize', function() {
+ test('causes all iron-resize events to fire once', function() {
+ window.dispatchEvent(new CustomEvent('resize'));
+ expect(resizable.ironResizeCount).to.be.equal(2);
+ expect(resizable.$.childResizable1.ironResizeCount).to.be.equal(2);
+ expect(resizable.$.childResizable2.ironResizeCount).to.be.equal(2);
+ });
+ });
+ });
+
+ });
+ </script>
+</body>
+</html>
diff --git a/static/bower_components/iron-resizable-behavior/test/test-elements.html b/static/bower_components/iron-resizable-behavior/test/test-elements.html
new file mode 100644
index 0000000..d70561e
--- /dev/null
+++ b/static/bower_components/iron-resizable-behavior/test/test-elements.html
@@ -0,0 +1,193 @@
+<!--
+@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-resizable-behavior.html">
+
+<script>
+
+ Polymer({
+
+ is: 'x-resizer-parent',
+
+ behaviors: [
+ Polymer.IronResizableBehavior
+ ],
+
+ listeners: {
+ 'core-resize': 'resizeHandler'
+ },
+
+ resizeHandler: function() {
+ }
+
+ });
+
+</script>
+
+<script>
+
+ Polymer({
+
+ is: 'x-resizer-parent-filtered',
+
+ active: null,
+
+ behaviors: [
+ Polymer.IronResizableBehavior
+ ],
+
+ listeners: {
+ 'core-resize': 'resizeHandler'
+ },
+
+ resizeHandler: function() {
+ },
+
+ resizerShouldNotify: function(el) {
+ return (el == this.active);
+ }
+
+ });
+
+</script>
+
+<script>
+
+ Polymer({
+
+ is: 'x-resizable',
+
+ behaviors: [
+ Polymer.IronResizableBehavior
+ ],
+
+ listeners: {
+ 'core-resize': 'resizeHandler'
+ },
+
+ resizeHandler: function() {
+ }
+
+ });
+
+</script>
+
+<dom-module id="x-resizable-in-shadow">
+
+ <template>
+
+ <div>
+ <x-resizable id="resizable"></x-resizable>
+ </div>
+
+ </template>
+
+</dom-module>
+
+<script>
+
+ Polymer({
+
+ is: 'x-resizable-in-shadow'
+
+ });
+
+</script>
+
+<dom-module id='test-element'>
+
+ <template>
+
+ <!-- Normal resizable parent with child resizables -->
+ <x-resizer-parent id="parent">
+ <x-resizable id="child1a"></x-resizable>
+ <div>
+ <x-resizable id="child1b"></x-resizable>
+ </div>
+ <x-resizable-in-shadow id="shadow1c"></x-resizable-in-shadow>
+ <div>
+ <x-resizable-in-shadow id="shadow1d"></x-resizable-in-shadow>
+ </div>
+ </x-resizer-parent>
+
+ <!-- Resizable parent using resizerShouldNotify, with child resizables -->
+ <x-resizer-parent-filtered id="parentFiltered">
+ <x-resizable id="child2a"></x-resizable>
+ <div>
+ <x-resizable id="child2b"></x-resizable>
+ </div>
+ <x-resizable-in-shadow id="shadow2c"></x-resizable-in-shadow>
+ <div>
+ <x-resizable-in-shadow id="shadow2d"></x-resizable-in-shadow>
+ </div>
+ </x-resizer-parent-filtered>
+
+ </template>
+
+</dom-module>
+
+<script>
+
+ Polymer({
+
+ is: 'test-element'
+
+ });
+
+</script>
+<script>
+ Polymer.ObserveIronResizeBehavior = {
+ properties: {
+ ironResizeCount: {
+ type: Number,
+ value: 0
+ }
+ },
+
+ listeners: {
+ 'iron-resize': '_incrementIronResizeCount'
+ },
+
+ _incrementIronResizeCount: function() {
+ this.ironResizeCount++;
+ }
+ };
+</script>
+<dom-module id="x-shadow-resizable">
+ <template>
+ <div></div>
+ </template>
+</dom-module>
+<script>
+ Polymer({
+ is: 'x-shadow-resizable',
+
+ behaviors: [
+ Polymer.IronResizableBehavior,
+ Polymer.ObserveIronResizeBehavior
+ ]
+ });
+</script>
+
+<dom-module id="x-light-resizable">
+ <template>
+ <x-shadow-resizable id="childResizable1"></x-shadow-resizable>
+ <x-shadow-resizable id="childResizable2"></x-shadow-resizable>
+ </template>
+</dom-module>
+<script>
+ Polymer({
+ is: 'x-light-resizable',
+
+ behaviors: [
+ Polymer.IronResizableBehavior,
+ Polymer.ObserveIronResizeBehavior
+ ]
+ });
+</script>
diff --git a/static/bower_components/iron-selector/.bower.json b/static/bower_components/iron-selector/.bower.json
new file mode 100644
index 0000000..3105082
--- /dev/null
+++ b/static/bower_components/iron-selector/.bower.json
@@ -0,0 +1,41 @@
+{
+ "name": "iron-selector",
+ "version": "1.0.2",
+ "description": "Manages a set of elements that can be selected",
+ "private": true,
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "main": [
+ "iron-selector.html"
+ ],
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "keywords": [
+ "web-components",
+ "polymer",
+ "selector"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/iron-selector.git"
+ },
+ "dependencies": {
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
+ "test-fixture": "PolymerElements/test-fixture#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ },
+ "homepage": "https://github.com/PolymerElements/iron-selector",
+ "_release": "1.0.2",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.0.2",
+ "commit": "ea22d91d11ba6f72c01faa952d5e600f9d1773cf"
+ },
+ "_source": "git://github.com/PolymerElements/iron-selector.git",
+ "_target": "^1.0.0",
+ "_originalSource": "PolymerElements/iron-selector"
+} \ No newline at end of file
diff --git a/static/bower_components/iron-selector/.gitignore b/static/bower_components/iron-selector/.gitignore
new file mode 100644
index 0000000..b13058c
--- /dev/null
+++ b/static/bower_components/iron-selector/.gitignore
@@ -0,0 +1,2 @@
+bower_components
+.DS_Store
diff --git a/static/bower_components/iron-selector/README.md b/static/bower_components/iron-selector/README.md
new file mode 100644
index 0000000..6bece29
--- /dev/null
+++ b/static/bower_components/iron-selector/README.md
@@ -0,0 +1,50 @@
+iron-selector
+=============
+
+`iron-selector` is an element which can be used to manage a list of elements
+that can be selected. Tapping on the item will make the item selected. The `selected` indicates
+which item is being selected. The default is to use the index of the item.
+
+Example:
+
+```html
+<iron-selector selected="0">
+ <div>Item 1</div>
+ <div>Item 2</div>
+ <div>Item 3</div>
+</iron-selector>
+```
+
+If you want to use the attribute value of an element for `selected` instead of the index,
+set `attrForSelected` to the name of the attribute. For example, if you want to select item by
+`name`, set `attrForSelected` to `name`.
+
+Example:
+
+```html
+<iron-selector attr-for-selected="name" selected="foo">
+ <div name="foo">Foo</div>
+ <div name="bar">Bar</div>
+ <div name="zot">Zot</div>
+</iron-selector>
+```
+
+`iron-selector` is not styled. Use the `iron-selected` CSS class to style the selected element.
+
+Example:
+
+```html
+<style>
+ .iron-selected {
+ background: #eee;
+ }
+</style>
+
+...
+
+<iron-selector selected="0">
+ <div>Item 1</div>
+ <div>Item 2</div>
+ <div>Item 3</div>
+</iron-selector>
+```
diff --git a/static/bower_components/iron-selector/bower.json b/static/bower_components/iron-selector/bower.json
new file mode 100644
index 0000000..b9751df
--- /dev/null
+++ b/static/bower_components/iron-selector/bower.json
@@ -0,0 +1,31 @@
+{
+ "name": "iron-selector",
+ "version": "1.0.2",
+ "description": "Manages a set of elements that can be selected",
+ "private": true,
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "main": [
+ "iron-selector.html"
+ ],
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "keywords": [
+ "web-components",
+ "polymer",
+ "selector"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/iron-selector.git"
+ },
+ "dependencies": {
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
+ "test-fixture": "PolymerElements/test-fixture#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ }
+}
diff --git a/static/bower_components/iron-selector/demo/index.html b/static/bower_components/iron-selector/demo/index.html
new file mode 100644
index 0000000..cdb7f99
--- /dev/null
+++ b/static/bower_components/iron-selector/demo/index.html
@@ -0,0 +1,66 @@
+<!doctype html>
+<!--
+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
+-->
+
+<html>
+ <head>
+
+ <title>iron-selector</title>
+
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <link rel="import" href="../iron-selector.html">
+
+ <style>
+
+ iron-selector > * {
+ padding: 8px;
+ }
+
+ .iron-selected {
+ background-color: #ddd;
+ }
+
+ </style>
+
+ </head>
+ <body>
+
+ <h3>Basic</h3>
+
+ <iron-selector selected="0">
+ <div>Item 0</div>
+ <div>Item 1</div>
+ <div>Item 2</div>
+ <div>Item 3</div>
+ <div>Item 4</div>
+ </iron-selector>
+
+ <h3>Multi-select</h3>
+
+ <iron-selector multi selected-values='[0,2]'>
+ <div>Item 0</div>
+ <div>Item 1</div>
+ <div>Item 2</div>
+ <div>Item 3</div>
+ <div>Item 4</div>
+ </iron-selector>
+
+ <h3>Example</h3>
+
+ <iron-selector selected="foo" attr-for-selected="name">
+ <div name="foo">Foo</div>
+ <div name="bar">Bar</div>
+ <div name="zot">Zot</div>
+ </iron-selector>
+
+ </body>
+</html>
diff --git a/static/bower_components/iron-selector/index.html b/static/bower_components/iron-selector/index.html
new file mode 100644
index 0000000..a27840b
--- /dev/null
+++ b/static/bower_components/iron-selector/index.html
@@ -0,0 +1,28 @@
+<!doctype html>
+<!--
+@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
+-->
+
+<html>
+<head>
+
+ <title>iron-selector</title>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+ <script src="../webcomponentsjs/webcomponents-lite.js"></script>
+ <link rel="import" href="../iron-component-page/iron-component-page.html">
+
+</head>
+<body>
+
+ <iron-component-page></iron-component-page>
+
+</body>
+</html>
diff --git a/static/bower_components/iron-selector/iron-multi-selectable.html b/static/bower_components/iron-selector/iron-multi-selectable.html
new file mode 100644
index 0000000..ba9455d
--- /dev/null
+++ b/static/bower_components/iron-selector/iron-multi-selectable.html
@@ -0,0 +1,120 @@
+<!--
+@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="../polymer/polymer.html">
+<link rel="import" href="iron-selectable.html">
+
+<script>
+ /** @polymerBehavior Polymer.IronMultiSelectableBehavior */
+ Polymer.IronMultiSelectableBehaviorImpl = {
+ properties: {
+
+ /**
+ * If true, multiple selections are allowed.
+ */
+ multi: {
+ type: Boolean,
+ value: false,
+ observer: 'multiChanged'
+ },
+
+ /**
+ * Gets or sets the selected elements. This is used instead of `selected` when `multi`
+ * is true.
+ */
+ selectedValues: {
+ type: Array,
+ notify: true
+ },
+
+ /**
+ * Returns an array of currently selected items.
+ */
+ selectedItems: {
+ type: Array,
+ readOnly: true,
+ notify: true
+ },
+
+ },
+
+ observers: [
+ '_updateSelected(attrForSelected, selectedValues)'
+ ],
+
+ /**
+ * Selects the given value. If the `multi` property is true, then the selected state of the
+ * `value` will be toggled; otherwise the `value` will be selected.
+ *
+ * @method select
+ * @param {string} value the value to select.
+ */
+ select: function(value) {
+ if (this.multi) {
+ if (this.selectedValues) {
+ this._toggleSelected(value);
+ } else {
+ this.selectedValues = [value];
+ }
+ } else {
+ this.selected = value;
+ }
+ },
+
+ multiChanged: function(multi) {
+ this._selection.multi = multi;
+ },
+
+ _updateSelected: function() {
+ if (this.multi) {
+ this._selectMulti(this.selectedValues);
+ } else {
+ this._selectSelected(this.selected);
+ }
+ },
+
+ _selectMulti: function(values) {
+ this._selection.clear();
+ if (values) {
+ for (var i = 0; i < values.length; i++) {
+ this._selection.setItemSelected(this._valueToItem(values[i]), true);
+ }
+ }
+ },
+
+ _selectionChange: function() {
+ var s = this._selection.get();
+ if (this.multi) {
+ this._setSelectedItems(s);
+ } else {
+ this._setSelectedItems([s]);
+ this._setSelectedItem(s);
+ }
+ },
+
+ _toggleSelected: function(value) {
+ var i = this.selectedValues.indexOf(value);
+ var unselected = i < 0;
+ if (unselected) {
+ this.selectedValues.push(value);
+ } else {
+ this.selectedValues.splice(i, 1);
+ }
+ this._selection.setItemSelected(this._valueToItem(value), unselected);
+ }
+ };
+
+ /** @polymerBehavior */
+ Polymer.IronMultiSelectableBehavior = [
+ Polymer.IronSelectableBehavior,
+ Polymer.IronMultiSelectableBehaviorImpl
+ ];
+
+</script>
diff --git a/static/bower_components/iron-selector/iron-selectable.html b/static/bower_components/iron-selector/iron-selectable.html
new file mode 100644
index 0000000..f0506d5
--- /dev/null
+++ b/static/bower_components/iron-selector/iron-selectable.html
@@ -0,0 +1,307 @@
+<!--
+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="../polymer/polymer.html">
+<link rel="import" href="iron-selection.html">
+
+<script>
+
+ /** @polymerBehavior */
+ Polymer.IronSelectableBehavior = {
+
+ properties: {
+
+ /**
+ * If you want to use the attribute value of an element for `selected` instead of the index,
+ * set this to the name of the attribute.
+ *
+ * @attribute attrForSelected
+ * @type {string}
+ */
+ attrForSelected: {
+ type: String,
+ value: null
+ },
+
+ /**
+ * Gets or sets the selected element. The default is to use the index of the item.
+ *
+ * @attribute selected
+ * @type {string}
+ */
+ selected: {
+ type: String,
+ notify: true
+ },
+
+ /**
+ * Returns the currently selected item.
+ *
+ * @attribute selectedItem
+ * @type {Object}
+ */
+ selectedItem: {
+ type: Object,
+ readOnly: true,
+ notify: true
+ },
+
+ /**
+ * The event that fires from items when they are selected. Selectable
+ * will listen for this event from items and update the selection state.
+ * Set to empty string to listen to no events.
+ *
+ * @attribute activateEvent
+ * @type {string}
+ * @default 'tap'
+ */
+ activateEvent: {
+ type: String,
+ value: 'tap',
+ observer: '_activateEventChanged'
+ },
+
+ /**
+ * This is a CSS selector sting. If this is set, only items that matches the CSS selector
+ * are selectable.
+ *
+ * @attribute selectable
+ * @type {string}
+ */
+ selectable: String,
+
+ /**
+ * The class to set on elements when selected.
+ *
+ * @attribute selectedClass
+ * @type {string}
+ */
+ selectedClass: {
+ type: String,
+ value: 'iron-selected'
+ },
+
+ /**
+ * The attribute to set on elements when selected.
+ *
+ * @attribute selectedAttribute
+ * @type {string}
+ */
+ selectedAttribute: {
+ type: String,
+ value: null
+ }
+
+ },
+
+ observers: [
+ '_updateSelected(attrForSelected, selected)'
+ ],
+
+ excludedLocalNames: {
+ 'template': 1
+ },
+
+ created: function() {
+ this._bindFilterItem = this._filterItem.bind(this);
+ this._selection = new Polymer.IronSelection(this._applySelection.bind(this));
+ },
+
+ attached: function() {
+ this._observer = this._observeItems(this);
+ this._contentObserver = this._observeContent(this);
+ },
+
+ detached: function() {
+ if (this._observer) {
+ this._observer.disconnect();
+ }
+ if (this._contentObserver) {
+ this._contentObserver.disconnect();
+ }
+ this._removeListener(this.activateEvent);
+ },
+
+ /**
+ * Returns an array of selectable items.
+ *
+ * @property items
+ * @type Array
+ */
+ get items() {
+ var nodes = Polymer.dom(this).queryDistributedElements(this.selectable || '*');
+ return Array.prototype.filter.call(nodes, this._bindFilterItem);
+ },
+
+ /**
+ * Returns the index of the given item.
+ *
+ * @method indexOf
+ * @param {Object} item
+ * @returns Returns the index of the item
+ */
+ indexOf: function(item) {
+ return this.items.indexOf(item);
+ },
+
+ /**
+ * Selects the given value.
+ *
+ * @method select
+ * @param {string} value the value to select.
+ */
+ select: function(value) {
+ this.selected = value;
+ },
+
+ /**
+ * Selects the previous item.
+ *
+ * @method selectPrevious
+ */
+ selectPrevious: function() {
+ var length = this.items.length;
+ var index = (Number(this._valueToIndex(this.selected)) - 1 + length) % length;
+ this.selected = this._indexToValue(index);
+ },
+
+ /**
+ * Selects the next item.
+ *
+ * @method selectNext
+ */
+ selectNext: function() {
+ var index = (Number(this._valueToIndex(this.selected)) + 1) % this.items.length;
+ this.selected = this._indexToValue(index);
+ },
+
+ _addListener: function(eventName) {
+ this.listen(this, eventName, '_activateHandler');
+ },
+
+ _removeListener: function(eventName) {
+ // There is no unlisten yet...
+ // https://github.com/Polymer/polymer/issues/1639
+ //this.removeEventListener(eventName, this._bindActivateHandler);
+ },
+
+ _activateEventChanged: function(eventName, old) {
+ this._removeListener(old);
+ this._addListener(eventName);
+ },
+
+ _updateSelected: function() {
+ this._selectSelected(this.selected);
+ },
+
+ _selectSelected: function(selected) {
+ this._selection.select(this._valueToItem(this.selected));
+ },
+
+ _filterItem: function(node) {
+ return !this.excludedLocalNames[node.localName];
+ },
+
+ _valueToItem: function(value) {
+ return (value == null) ? null : this.items[this._valueToIndex(value)];
+ },
+
+ _valueToIndex: function(value) {
+ if (this.attrForSelected) {
+ for (var i = 0, item; item = this.items[i]; i++) {
+ if (this._valueForItem(item) == value) {
+ return i;
+ }
+ }
+ } else {
+ return Number(value);
+ }
+ },
+
+ _indexToValue: function(index) {
+ if (this.attrForSelected) {
+ var item = this.items[index];
+ if (item) {
+ return this._valueForItem(item);
+ }
+ } else {
+ return index;
+ }
+ },
+
+ _valueForItem: function(item) {
+ return item[this.attrForSelected] || item.getAttribute(this.attrForSelected);
+ },
+
+ _applySelection: function(item, isSelected) {
+ if (this.selectedClass) {
+ this.toggleClass(this.selectedClass, isSelected, item);
+ }
+ if (this.selectedAttribute) {
+ this.toggleAttribute(this.selectedAttribute, isSelected, item);
+ }
+ this._selectionChange();
+ this.fire('iron-' + (isSelected ? 'select' : 'deselect'), {item: item});
+ },
+
+ _selectionChange: function() {
+ this._setSelectedItem(this._selection.get());
+ },
+
+ // observe content changes under the given node.
+ _observeContent: function(node) {
+ var content = node.querySelector('content');
+ if (content && content.parentElement === node) {
+ return this._observeItems(node.domHost);
+ }
+ },
+
+ // observe items change under the given node.
+ _observeItems: function(node) {
+ var observer = new MutationObserver(function() {
+ if (this.selected != null) {
+ this._updateSelected();
+ }
+ }.bind(this));
+ observer.observe(node, {
+ childList: true,
+ subtree: true
+ });
+ return observer;
+ },
+
+ _activateHandler: function(e) {
+ // TODO: remove this when https://github.com/Polymer/polymer/issues/1639 is fixed so we
+ // can just remove the old event listener.
+ if (e.type !== this.activateEvent) {
+ return;
+ }
+ var t = e.target;
+ var items = this.items;
+ while (t && t != this) {
+ var i = items.indexOf(t);
+ if (i >= 0) {
+ var value = this._indexToValue(i);
+ this._itemActivate(value, t);
+ return;
+ }
+ t = t.parentNode;
+ }
+ },
+
+ _itemActivate: function(value, item) {
+ if (!this.fire('iron-activate',
+ {selected: value, item: item}, {cancelable: true}).defaultPrevented) {
+ this.select(value);
+ }
+ }
+
+ };
+
+</script>
diff --git a/static/bower_components/iron-selector/iron-selection.html b/static/bower_components/iron-selector/iron-selection.html
new file mode 100644
index 0000000..0ff04cf
--- /dev/null
+++ b/static/bower_components/iron-selector/iron-selection.html
@@ -0,0 +1,115 @@
+
+<!--
+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="../polymer/polymer.html">
+
+<script>
+
+ /**
+ * @param {!Function} selectCallback
+ * @constructor
+ */
+ Polymer.IronSelection = function(selectCallback) {
+ this.selection = [];
+ this.selectCallback = selectCallback;
+ };
+
+ Polymer.IronSelection.prototype = {
+
+ /**
+ * Retrieves the selected item(s).
+ *
+ * @method get
+ * @returns Returns the selected item(s). If the multi property is true,
+ * `get` will return an array, otherwise it will return
+ * the selected item or undefined if there is no selection.
+ */
+ get: function() {
+ return this.multi ? this.selection : this.selection[0];
+ },
+
+ /**
+ * Clears all the selection except the ones indicated.
+ *
+ * @method clear
+ * @param {Array} excludes items to be excluded.
+ */
+ clear: function(excludes) {
+ this.selection.slice().forEach(function(item) {
+ if (!excludes || excludes.indexOf(item) < 0) {
+ this.setItemSelected(item, false);
+ }
+ }, this);
+ },
+
+ /**
+ * Indicates if a given item is selected.
+ *
+ * @method isSelected
+ * @param {*} item The item whose selection state should be checked.
+ * @returns Returns true if `item` is selected.
+ */
+ isSelected: function(item) {
+ return this.selection.indexOf(item) >= 0;
+ },
+
+ /**
+ * Sets the selection state for a given item to either selected or deselected.
+ *
+ * @method setItemSelected
+ * @param {*} item The item to select.
+ * @param {boolean} isSelected True for selected, false for deselected.
+ */
+ setItemSelected: function(item, isSelected) {
+ if (item != null) {
+ if (isSelected) {
+ this.selection.push(item);
+ } else {
+ var i = this.selection.indexOf(item);
+ if (i >= 0) {
+ this.selection.splice(i, 1);
+ }
+ }
+ if (this.selectCallback) {
+ this.selectCallback(item, isSelected);
+ }
+ }
+ },
+
+ /**
+ * Sets the selection state for a given item. If the `multi` property
+ * is true, then the selected state of `item` will be toggled; otherwise
+ * the `item` will be selected.
+ *
+ * @method select
+ * @param {*} item The item to select.
+ */
+ select: function(item) {
+ if (this.multi) {
+ this.toggle(item);
+ } else if (this.get() !== item) {
+ this.setItemSelected(this.get(), false);
+ this.setItemSelected(item, true);
+ }
+ },
+
+ /**
+ * Toggles the selection state for `item`.
+ *
+ * @method toggle
+ * @param {*} item The item to toggle.
+ */
+ toggle: function(item) {
+ this.setItemSelected(item, !this.isSelected(item));
+ }
+
+ };
+
+</script>
diff --git a/static/bower_components/iron-selector/iron-selector.html b/static/bower_components/iron-selector/iron-selector.html
new file mode 100644
index 0000000..92abe04
--- /dev/null
+++ b/static/bower_components/iron-selector/iron-selector.html
@@ -0,0 +1,71 @@
+<!--
+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="../polymer/polymer.html">
+<link rel="import" href="iron-multi-selectable.html">
+
+<script>
+ /**
+ `iron-selector` is an element which can be used to manage a list of elements
+ that can be selected. Tapping on the item will make the item selected. The `selected` indicates
+ which item is being selected. The default is to use the index of the item.
+
+ Example:
+
+ <iron-selector selected="0">
+ <div>Item 1</div>
+ <div>Item 2</div>
+ <div>Item 3</div>
+ </iron-selector>
+
+ If you want to use the attribute value of an element for `selected` instead of the index,
+ set `attrForSelected` to the name of the attribute. For example, if you want to select item by
+ `name`, set `attrForSelected` to `name`.
+
+ Example:
+
+ <iron-selector attr-for-selected="name" selected="foo">
+ <div name="foo">Foo</div>
+ <div name="bar">Bar</div>
+ <div name="zot">Zot</div>
+ </iron-selector>
+
+ `iron-selector` is not styled. Use the `iron-selected` CSS class to style the selected element.
+
+ Example:
+
+ <style>
+ .iron-selected {
+ background: #eee;
+ }
+ </style>
+
+ ...
+
+ <iron-selector selected="0">
+ <div>Item 1</div>
+ <div>Item 2</div>
+ <div>Item 3</div>
+ </iron-selector>
+
+ @demo demo/index.html
+ */
+
+ Polymer({
+
+ is: 'iron-selector',
+
+ behaviors: [
+ Polymer.IronMultiSelectableBehavior
+ ]
+
+ });
+
+</script>
diff --git a/static/bower_components/iron-selector/test/activate-event.html b/static/bower_components/iron-selector/test/activate-event.html
new file mode 100644
index 0000000..8390548
--- /dev/null
+++ b/static/bower_components/iron-selector/test/activate-event.html
@@ -0,0 +1,138 @@
+<!doctype html>
+<!--
+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
+-->
+
+<html>
+<head>
+
+ <title>iron-selector-activate-event</title>
+ <meta charset="UTF-8">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
+
+ <link rel="import" href="../../test-fixture/test-fixture.html">
+ <link rel="import" href="../iron-selector.html">
+
+ <style>
+ .iron-selected {
+ background: #ccc;
+ }
+ </style>
+
+</head>
+<body>
+
+ <test-fixture id="test">
+ <template>
+ <iron-selector id="selector" selected="0">
+ <div>Item 0</div>
+ <div>Item 1</div>
+ <div>Item 2</div>
+ <div>Item 3</div>
+ <div>Item 4</div>
+ </iron-selector>
+ </template>
+ </test-fixture>
+
+ <script>
+
+ suite('activate event', function() {
+
+ var s;
+
+ setup(function () {
+ s = fixture('test');
+ });
+
+ test('activates on tap', function() {
+ assert.equal(s.selected, '0');
+
+ // select Item 1
+ s.children[1].dispatchEvent(new CustomEvent('tap', {bubbles: true}));
+ assert.equal(s.selected, '1');
+ });
+
+ test('activates on tap and fires iron-activate', function(done) {
+ assert.equal(s.selected, '0');
+
+ // attach iron-activate listener
+ s.addEventListener("iron-activate", function(event) {
+ assert.equal(event.detail.selected, '1');
+ assert.equal(event.detail.item, s.children[1]);
+ done();
+ });
+
+ // select Item 1
+ s.children[1].dispatchEvent(new CustomEvent('tap', {bubbles: true}));
+ });
+
+ test('tap on already selected and fires iron-activate', function(done) {
+ assert.equal(s.selected, '0');
+
+ // attach iron-activate listener
+ s.addEventListener("iron-activate", function(event) {
+ assert.equal(event.detail.selected, '0');
+ assert.equal(event.detail.item, s.children[0]);
+ done();
+ });
+
+ // select Item 0
+ s.children[0].dispatchEvent(new CustomEvent('tap', {bubbles: true}));
+ });
+
+ test('activates on mousedown', function() {
+ // set activateEvent to mousedown
+ s.activateEvent = 'mousedown';
+ // select Item 2
+ s.children[2].dispatchEvent(new CustomEvent('mousedown', {bubbles: true}));
+ assert.equal(s.selected, '2');
+ });
+
+ test('activates on mousedown and fires iron-activate', function(done) {
+ // attach iron-activate listener
+ s.addEventListener("iron-activate", function(event) {
+ assert.equal(event.detail.selected, '2');
+ assert.equal(event.detail.item, s.children[2]);
+ done();
+ });
+
+ // set activateEvent to mousedown
+ s.activateEvent = 'mousedown';
+ // select Item 2
+ s.children[2].dispatchEvent(new CustomEvent('mousedown', {bubbles: true}));
+ });
+
+ test('no activation', function() {
+ assert.equal(s.selected, '0');
+ // set activateEvent to null
+ s.activateEvent = null;
+ // select Item 2
+ s.children[2].dispatchEvent(new CustomEvent('mousedown', {bubbles: true}));
+ assert.equal(s.selected, '0');
+ });
+
+ test('activates on tap and preventDefault', function() {
+ // attach iron-activate listener
+ s.addEventListener("iron-activate", function(event) {
+ event.preventDefault();
+ });
+ // select Item 2
+ s.children[2].dispatchEvent(new CustomEvent('tap', {bubbles: true}));
+ // shouldn't got selected since we preventDefault in iron-activate
+ assert.equal(s.selected, '0');
+ });
+
+ });
+
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/iron-selector/test/basic.html b/static/bower_components/iron-selector/test/basic.html
new file mode 100644
index 0000000..602de18
--- /dev/null
+++ b/static/bower_components/iron-selector/test/basic.html
@@ -0,0 +1,150 @@
+<!doctype html>
+<!--
+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
+-->
+
+<html>
+<head>
+
+ <title>iron-selector-basic</title>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
+
+ <link rel="import" href="../../test-fixture/test-fixture.html">
+ <link rel="import" href="../iron-selector.html">
+
+ <style>
+ .iron-selected {
+ background: #ccc;
+ }
+
+ .my-selected {
+ background: red;
+ }
+ </style>
+
+</head>
+<body>
+
+ <test-fixture id="defaults">
+ <template>
+ <iron-selector>
+ <div>Item 0</div>
+ <div>Item 1</div>
+ <div>Item 2</div>
+ <div>Item 3</div>
+ <div>Item 4</div>
+ </iron-selector>
+ </template>
+ </test-fixture>
+
+ <br><br>
+
+ <test-fixture id="basic">
+ <template>
+ <iron-selector selected="item2" attr-for-selected="id">
+ <div id="item0">Item 0</div>
+ <div id="item1">Item 1</div>
+ <div id="item2">Item 2</div>
+ <div id="item3">Item 3</div>
+ <div id="item4">Item 4</div>
+ </iron-selector>
+ </template>
+ </test-fixture>
+
+ <script>
+
+ suite('defaults', function() {
+
+ var s1;
+
+ setup(function () {
+ s1 = fixture('defaults');
+ });
+
+ test('to nothing selected', function() {
+ assert.equal(s1.selected, null);
+ });
+
+ test('to iron-selected as selectedClass', function() {
+ assert.equal(s1.selectedClass, 'iron-selected');
+ });
+
+ test('to false as multi', function() {
+ assert.isFalse(s1.multi);
+ });
+
+ test('to tap as activateEvent', function() {
+ assert.equal(s1.activateEvent, 'tap');
+ });
+
+ test('to nothing as attrForSelected', function() {
+ assert.equal(s1.attrForSelected, null);
+ });
+
+ test('as many items as children', function() {
+ assert.equal(s1.items.length, s1.querySelectorAll('div').length);
+ });
+ });
+
+ suite('basic', function() {
+
+ var s2;
+
+ setup(function () {
+ s2 = fixture('basic');
+ });
+
+ test('honors the attrForSelected attribute', function() {
+ assert.equal(s2.attrForSelected, 'id');
+ assert.equal(s2.selected, 'item2');
+ assert.equal(s2.selectedItem, document.querySelector('#item2'));
+ });
+
+ test('allows assignment to selected', function() {
+ // set selected
+ s2.selected = 'item4';
+ // check selected class
+ assert.isTrue(s2.children[4].classList.contains('iron-selected'));
+ // check item
+ assert.equal(s2.selectedItem, s2.children[4]);
+ });
+
+ test('fire iron-select when selected is set', function() {
+ // setup listener for iron-select event
+ var selectedEventCounter = 0;
+ s2.addEventListener('iron-select', function(e) {
+ selectedEventCounter++;
+ });
+ // set selected
+ s2.selected = 'item4';
+ // check iron-select event
+ assert.equal(selectedEventCounter, 1);
+ });
+
+ test('set selected to old value', function() {
+ // setup listener for iron-select event
+ var selectedEventCounter = 0;
+ s2.addEventListener('iron-select', function(e) {
+ selectedEventCounter++;
+ });
+ // selecting the same value shouldn't fire iron-select
+ s2.selected = 'item2';
+ assert.equal(selectedEventCounter, 0);
+ });
+
+ });
+
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/iron-selector/test/content-element.html b/static/bower_components/iron-selector/test/content-element.html
new file mode 100644
index 0000000..d0cd6d7
--- /dev/null
+++ b/static/bower_components/iron-selector/test/content-element.html
@@ -0,0 +1,43 @@
+<!--
+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-selector.html">
+
+<dom-module id="test-content-element">
+
+ <template>
+
+ <iron-selector id="selector" selected="{{selected}}" selectable="[[selectable]]" attr-for-selected="id">
+ <content></content>
+ </iron-selector>
+
+ </template>
+
+</dom-module>
+
+<script>
+
+ Polymer({
+
+ is: 'test-content-element',
+
+ properties: {
+
+ selectable: String,
+
+ selected: {
+ type: String,
+ notify: true
+ }
+
+ }
+
+ });
+
+</script>
diff --git a/static/bower_components/iron-selector/test/content.html b/static/bower_components/iron-selector/test/content.html
new file mode 100644
index 0000000..e869f98
--- /dev/null
+++ b/static/bower_components/iron-selector/test/content.html
@@ -0,0 +1,168 @@
+<!doctype html>
+<!--
+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
+-->
+
+<html>
+<head>
+
+ <title>iron-selector-content</title>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
+
+ <link rel="import" href="../../test-fixture/test-fixture.html">
+ <link rel="import" href="content-element.html">
+
+ <style>
+ .iron-selected {
+ background: #ccc;
+ }
+ </style>
+
+</head>
+<body>
+
+ <test-content-element id="selector1" selected="item0">
+ <div id="item0">item0</div>
+ <div id="item1">item1</div>
+ <div id="item2">item2</div>
+ <div id="item3">item3</div>
+ </test-content-element>
+
+ <test-content-element id="selector2" selected="item0" selectable="item">
+ <item id="item0">item0</item>
+ <hr>
+ <item id="item1">item1</item>
+ <item id="item2">item2</item>
+ <hr>
+ <item id="item3">item3</item>
+ </test-content-element>
+
+ <test-content-element id="selector3" selected="item0">
+ <template is="dom-repeat" id="t">
+ <div id$="[[item.name]]">[[item.name]]</div>
+ </template>
+ </test-content-element>
+
+ <script>
+
+ var s1 = document.querySelector('#selector1');
+ var s2 = document.querySelector('#selector2');
+ var s3 = document.querySelector('#selector3');
+
+ var t = document.querySelector('#t');
+
+ suite('content', function() {
+
+ test('attribute selected', function() {
+ // check selected class
+ assert.isTrue(s1.querySelector('#item0').classList.contains('iron-selected'));
+ });
+
+ test('set selected', function() {
+ // set selected
+ s1.selected = 'item1';
+ // check selected class
+ assert.isTrue(s1.querySelector('#item1').classList.contains('iron-selected'));
+ });
+
+ test('get items', function() {
+ assert.equal(s1.$.selector.items.length, 4);
+ });
+
+ test('activate event', function() {
+ var item = s1.querySelector('#item2');
+ item.dispatchEvent(new CustomEvent('tap', {bubbles: true}));
+ // check selected class
+ assert.isTrue(item.classList.contains('iron-selected'));
+ });
+
+ test('add item dynamically', function() {
+ var item = document.createElement('div');
+ item.id = 'item4';
+ item.textContent = 'item4';
+ Polymer.dom(s1).appendChild(item);
+ Polymer.dom.flush();
+ // set selected
+ s1.selected = 'item4';
+ // check items length
+ assert.equal(s1.$.selector.items.length, 5);
+ // check selected class
+ assert.isTrue(s1.querySelector('#item4').classList.contains('iron-selected'));
+ });
+
+ });
+
+ suite('content with selectable', function() {
+
+ test('attribute selected', function() {
+ // check selected class
+ assert.isTrue(s2.querySelector('#item0').classList.contains('iron-selected'));
+ });
+
+ test('set selected', function() {
+ // set selected
+ s2.selected = 'item1';
+ // check selected class
+ assert.isTrue(s2.querySelector('#item1').classList.contains('iron-selected'));
+ });
+
+ test('get items', function() {
+ assert.equal(s2.$.selector.items.length, 4);
+ });
+
+ test('activate event', function() {
+ var item = s2.querySelector('#item2');
+ item.dispatchEvent(new CustomEvent('tap', {bubbles: true}));
+ // check selected class
+ assert.isTrue(item.classList.contains('iron-selected'));
+ });
+
+ test('add item dynamically', function() {
+ var item = document.createElement('item');
+ item.id = 'item4';
+ item.textContent = 'item4';
+ Polymer.dom(s2).appendChild(item);
+ Polymer.dom.flush();
+ // set selected
+ s2.selected = 'item4';
+ // check items length
+ assert.equal(s2.$.selector.items.length, 5);
+ // check selected class
+ assert.isTrue(s2.querySelector('#item4').classList.contains('iron-selected'));
+ });
+
+ });
+
+ suite('content with dom-repeat', function() {
+
+ test('supports repeated children', function(done) {
+ t.items = [{name:'item0'}, {name: 'item1'}, {name: 'item2'}, {name: 'item3'}];
+ setTimeout(function() {
+ // check selected
+ assert.equal(s3.selected, 'item0');
+ // check selected class
+ assert.isTrue(s3.querySelector('#item0').classList.contains('iron-selected'));
+ // set selected
+ s3.selected = 'item2';
+ // check selected class
+ assert.isTrue(s3.querySelector('#item2').classList.contains('iron-selected'));
+ done();
+ });
+ });
+
+ });
+
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/iron-selector/test/index.html b/static/bower_components/iron-selector/test/index.html
new file mode 100644
index 0000000..17d7e4b
--- /dev/null
+++ b/static/bower_components/iron-selector/test/index.html
@@ -0,0 +1,36 @@
+<!doctype html>
+<!--
+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
+-->
+
+<html>
+<head>
+
+ <meta charset="utf-8">
+ <title>Tests</title>
+ <script src="../../web-component-tester/browser.js"></script>
+
+</head>
+<body>
+
+ <script>
+
+ WCT.loadSuites([
+ 'activate-event.html',
+ 'basic.html',
+ 'multi.html',
+ 'next-previous.html',
+ 'selected-attribute.html',
+ 'template-repeat.html',
+ 'content.html'
+ ]);
+
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/iron-selector/test/multi.html b/static/bower_components/iron-selector/test/multi.html
new file mode 100644
index 0000000..fdc31c7
--- /dev/null
+++ b/static/bower_components/iron-selector/test/multi.html
@@ -0,0 +1,135 @@
+<!doctype html>
+<!--
+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
+-->
+
+<html>
+<head>
+
+ <title>iron-selector-multi</title>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
+
+ <link rel="import" href="../../test-fixture/test-fixture.html">
+ <link rel="import" href="../iron-selector.html">
+
+ <style>
+ .iron-selected {
+ background: #ccc;
+ }
+ </style>
+
+</head>
+<body>
+
+ <test-fixture id="test">
+ <template>
+ <iron-selector multi>
+ <div>Item 0</div>
+ <div>Item 1</div>
+ <div>Item 2</div>
+ <div>Item 3</div>
+ <div>Item 4</div>
+ </iron-selector>
+ </template>
+ </test-fixture>
+
+ <script>
+
+ suite('multi', function() {
+
+ var s;
+
+ setup(function () {
+ s = fixture('test');
+ });
+
+ test('honors the multi attribute', function() {
+ assert.isTrue(s.multi);
+ });
+
+ test('has sane defaults', function() {
+ assert.equal(s.selectedValues, undefined);
+ assert.equal(s.selectedClass, 'iron-selected');
+ assert.equal(s.items.length, 5);
+ });
+
+ test('set multi-selection via selected property', function() {
+ // set selectedValues
+ s.selectedValues = [0, 2];
+ // check selected class
+ assert.isTrue(s.children[0].classList.contains('iron-selected'));
+ assert.isTrue(s.children[2].classList.contains('iron-selected'));
+ // check selectedItems
+ assert.equal(s.selectedItems.length, 2);
+ assert.equal(s.selectedItems[0], s.children[0]);
+ assert.equal(s.selectedItems[1], s.children[2]);
+ });
+
+ test('set multi-selection via tap', function() {
+ // set selectedValues
+ s.children[0].dispatchEvent(new CustomEvent('tap', {bubbles: true}));
+ s.children[2].dispatchEvent(new CustomEvent('tap', {bubbles: true}));
+ // check selected class
+ assert.isTrue(s.children[0].classList.contains('iron-selected'));
+ assert.isTrue(s.children[2].classList.contains('iron-selected'));
+ // check selectedItems
+ assert.equal(s.selectedItems.length, 2);
+ assert.equal(s.selectedItems[0], s.children[0]);
+ assert.equal(s.selectedItems[1], s.children[2]);
+ });
+
+ test('fire iron-select/deselect events', function() {
+ // setup listener for iron-select event
+ var selectEventCounter = 0;
+ s.addEventListener('iron-select', function(e) {
+ selectEventCounter++;
+ });
+ // setup listener for core-deselect event
+ var deselectEventCounter = 0;
+ s.addEventListener('iron-deselect', function(e) {
+ deselectEventCounter++;
+ });
+ // tap to select an item
+ s.children[0].dispatchEvent(new CustomEvent('tap', {bubbles: true}));
+ // check events
+ assert.equal(selectEventCounter, 1);
+ assert.equal(deselectEventCounter, 0);
+ // tap on already selected item should deselect it
+ s.children[0].dispatchEvent(new CustomEvent('tap', {bubbles: true}));
+ // check selectedValues
+ assert.equal(s.selectedValues.length, 0);
+ // check class
+ assert.isFalse(s.children[0].classList.contains('iron-selected'));
+ // check events
+ assert.equal(selectEventCounter, 1);
+ assert.equal(deselectEventCounter, 1);
+ });
+
+ /* test('toggle multi from true to false', function() {
+ // set selected
+ s.selected = [0, 2];
+ var first = s.selected[0];
+ // set mutli to false, so to make it single-selection
+ s.multi = false;
+ // selected should not be an array
+ assert.isNotArray(s.selected);
+ // selected should be the first value from the old array
+ assert.equal(s.selected, first);
+ }); */
+
+ });
+
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/iron-selector/test/next-previous.html b/static/bower_components/iron-selector/test/next-previous.html
new file mode 100644
index 0000000..3a830c2
--- /dev/null
+++ b/static/bower_components/iron-selector/test/next-previous.html
@@ -0,0 +1,134 @@
+<!doctype html>
+<!--
+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
+-->
+
+<html>
+<head>
+
+ <title>iron-selector-next-previous</title>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
+
+ <link rel="import" href="../../test-fixture/test-fixture.html">
+ <link rel="import" href="../iron-selector.html">
+
+ <style>
+ .iron-selected {
+ background: #ccc;
+ }
+ </style>
+
+</head>
+<body>
+
+ <test-fixture id="test1">
+ <template>
+ <iron-selector selected="0">
+ <div>Item 0</div>
+ <div>Item 1</div>
+ <div>Item 2</div>
+ </iron-selector>
+ </template>
+ </test-fixture>
+
+ <test-fixture id="test2">
+ <template>
+ <iron-selector selected="foo" attr-for-selected="name">
+ <div name="foo">Item Foo</div>
+ <div name="bar">Item Bar</div>
+ <div name="zot">Item Zot</div>
+ </iron-selector>
+ </template>
+ </test-fixture>
+
+ <script>
+
+ var s;
+
+ function assertAndSelect(method, expectedIndex) {
+ assert.equal(s.selected, expectedIndex);
+ s[method]();
+ }
+
+ suite('next/previous', function() {
+
+ setup(function () {
+ s = fixture('test1');
+ });
+
+ test('selectNext', function() {
+ assert.equal(s.selected, 0);
+ assertAndSelect('selectNext', 0);
+ assertAndSelect('selectNext', 1);
+ assertAndSelect('selectNext', 2);
+ assert.equal(s.selected, 0);
+ });
+
+ test('selectPrevious', function() {
+ assert.equal(s.selected, 0);
+ assertAndSelect('selectPrevious', 0);
+ assertAndSelect('selectPrevious', 2);
+ assertAndSelect('selectPrevious', 1);
+ assert.equal(s.selected, 0);
+ });
+
+ test('selectNext/Previous', function() {
+ assert.equal(s.selected, 0);
+ assertAndSelect('selectNext', 0);
+ assertAndSelect('selectNext', 1);
+ assertAndSelect('selectPrevious', 2);
+ assertAndSelect('selectNext', 1);
+ assertAndSelect('selectPrevious', 2);
+ assert.equal(s.selected, 1);
+ });
+
+ });
+
+ suite('next/previous attrForSelected', function() {
+
+ setup(function () {
+ s = fixture('test2');
+ });
+
+ test('selectNext', function() {
+ assert.equal(s.selected, 'foo');
+ assertAndSelect('selectNext', 'foo');
+ assertAndSelect('selectNext', 'bar');
+ assertAndSelect('selectNext', 'zot');
+ assert.equal(s.selected, 'foo');
+ });
+
+ test('selectPrevious', function() {
+ assert.equal(s.selected, 'foo');
+ assertAndSelect('selectPrevious', 'foo');
+ assertAndSelect('selectPrevious', 'zot');
+ assertAndSelect('selectPrevious', 'bar');
+ assert.equal(s.selected, 'foo');
+ });
+
+ test('selectNext/Previous', function() {
+ assert.equal(s.selected, 'foo');
+ assertAndSelect('selectNext', 'foo');
+ assertAndSelect('selectNext', 'bar');
+ assertAndSelect('selectPrevious', 'zot');
+ assertAndSelect('selectNext', 'bar');
+ assertAndSelect('selectPrevious', 'zot');
+ assert.equal(s.selected, 'bar');
+ });
+
+ });
+
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/iron-selector/test/selected-attribute.html b/static/bower_components/iron-selector/test/selected-attribute.html
new file mode 100644
index 0000000..3e1ecaf
--- /dev/null
+++ b/static/bower_components/iron-selector/test/selected-attribute.html
@@ -0,0 +1,72 @@
+<!doctype html>
+<!--
+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
+-->
+
+<html>
+<head>
+
+ <title>iron-selector-selected-attribute</title>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
+
+ <link rel="import" href="../../test-fixture/test-fixture.html">
+ <link rel="import" href="../iron-selector.html">
+
+ <style>
+ .iron-selected {
+ background: #ccc;
+ }
+ </style>
+
+</head>
+<body>
+
+ <test-fixture id="test">
+ <template>
+ <iron-selector id="selector">
+ <div>Item 0</div>
+ <div>Item 1</div>
+ <div>Item 2</div>
+ <div>Item 3</div>
+ <div>Item 4</div>
+ </iron-selector>
+ </template>
+ </test-fixture>
+
+ <script>
+
+ suite('selected attributes', function() {
+
+ var s;
+
+ setup(function () {
+ s = fixture('test');
+ });
+
+ test('custom selectedAttribute', function() {
+ // set selectedAttribute
+ s.selectedAttribute = 'myattr';
+ // check selected attribute (should not be there)
+ assert.isFalse(s.children[4].hasAttribute('myattr'));
+ // set selected
+ s.selected = 4;
+ // now selected attribute should be there
+ assert.isTrue(s.children[4].hasAttribute('myattr'));
+ });
+
+ });
+
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/iron-selector/test/template-repeat.html b/static/bower_components/iron-selector/test/template-repeat.html
new file mode 100644
index 0000000..eae2729
--- /dev/null
+++ b/static/bower_components/iron-selector/test/template-repeat.html
@@ -0,0 +1,110 @@
+<!doctype html>
+<!--
+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
+-->
+
+<html>
+<head>
+
+ <title>iron-selector-template-repeat</title>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+
+ <link rel="import" href="../iron-selector.html">
+
+ <style>
+ .iron-selected {
+ background: #ccc;
+ }
+ </style>
+
+</head>
+<body>
+
+ <template is="dom-bind">
+ <iron-selector id="selector" selected="1">
+ <template id="t" is="dom-repeat">
+ <div id$="[[item.name]]">{{item.name}}</div>
+ </template>
+ </iron-selector>
+ </template>
+
+ <script>
+
+ suite('dom-repeat', function() {
+
+ var scope, s, t;
+
+ setup(function() {
+ scope = document.querySelector('template[is="dom-bind"]');
+ s = scope.$.selector;
+ t = scope.$.t;
+ t.items = [{name:'item0'}, {name: 'item1'}, {name: 'item2'}, {name: 'item3'}];
+ });
+
+ teardown(function() {
+ t.items = [];
+ });
+
+ test('supports repeated items', function(done) {
+ setTimeout(function() {
+ // check items
+ assert.equal(s.items.length, 4);
+ // check selected
+ assert.equal(s.selected, 1);
+ // check selected item
+ var item = s.selectedItem;
+ assert.equal(s.items[1], item);
+ // check selected class
+ assert.isTrue(item.classList.contains('iron-selected'));
+ done();
+ });
+ });
+
+ test('update items', function(done) {
+ setTimeout(function() {
+ // check items
+ assert.equal(s.items.length, 4);
+ // check selected
+ assert.equal(s.selected, 1);
+ // update items
+ t.items = [{name:'foo'}, {name: 'bar'}];
+ setTimeout(function() {
+ // check items
+ assert.equal(s.items.length, 2);
+ // check selected (should still honor the selected)
+ assert.equal(s.selected, 1);
+ // check selected class
+ assert.isTrue(s.querySelector('#bar').classList.contains('iron-selected'));
+ done();
+ });
+ });
+ });
+
+ test('set selected to something else', function(done) {
+ setTimeout(function() {
+ // set selected to something else
+ s.selected = 3;
+ // check selected item
+ var item = s.selectedItem;
+ assert.equal(s.items[3], item);
+ // check selected class
+ assert.isTrue(item.classList.contains('iron-selected'));
+ done();
+ });
+ });
+
+ });
+
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/paper-behaviors/.bower.json b/static/bower_components/paper-behaviors/.bower.json
new file mode 100644
index 0000000..7c969e4
--- /dev/null
+++ b/static/bower_components/paper-behaviors/.bower.json
@@ -0,0 +1,48 @@
+{
+ "name": "paper-behaviors",
+ "version": "1.0.2",
+ "description": "Common behaviors across the paper elements",
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "main": [
+ "paper-button-behavior.html",
+ "paper-radio-button-behavior.html"
+ ],
+ "keywords": [
+ "web-components",
+ "web-component",
+ "polymer",
+ "paper",
+ "behavior"
+ ],
+ "private": true,
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/paper-behaviors"
+ },
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "homepage": "https://github.com/PolymerElements/paper-behaviors",
+ "dependencies": {
+ "iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0",
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
+ "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0",
+ "paper-material": "PolymerElements/paper-material#^1.0.0",
+ "paper-ripple": "PolymerElements/paper-ripple#^1.0.0",
+ "test-fixture": "PolymerElements/test-fixture#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ },
+ "_release": "1.0.2",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.0.2",
+ "commit": "4dd226a2cc5b780a73d0058cd9998b6e0af1cb2c"
+ },
+ "_source": "git://github.com/polymerelements/paper-behaviors.git",
+ "_target": "^1.0.0",
+ "_originalSource": "polymerelements/paper-behaviors"
+} \ No newline at end of file
diff --git a/static/bower_components/paper-behaviors/.gitignore b/static/bower_components/paper-behaviors/.gitignore
new file mode 100644
index 0000000..8d4ae25
--- /dev/null
+++ b/static/bower_components/paper-behaviors/.gitignore
@@ -0,0 +1 @@
+bower_components
diff --git a/static/bower_components/paper-behaviors/README.md b/static/bower_components/paper-behaviors/README.md
new file mode 100644
index 0000000..e793a62
--- /dev/null
+++ b/static/bower_components/paper-behaviors/README.md
@@ -0,0 +1,4 @@
+paper-behaviors
+===============
+
+These are common behaviors used across `paper-*` elements.
diff --git a/static/bower_components/paper-behaviors/bower.json b/static/bower_components/paper-behaviors/bower.json
new file mode 100644
index 0000000..d4cae45
--- /dev/null
+++ b/static/bower_components/paper-behaviors/bower.json
@@ -0,0 +1,39 @@
+{
+ "name": "paper-behaviors",
+ "version": "1.0.2",
+ "description": "Common behaviors across the paper elements",
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "main": [
+ "paper-button-behavior.html",
+ "paper-radio-button-behavior.html"
+ ],
+ "keywords": [
+ "web-components",
+ "web-component",
+ "polymer",
+ "paper",
+ "behavior"
+ ],
+ "private": true,
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/paper-behaviors"
+ },
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "homepage": "https://github.com/PolymerElements/paper-behaviors",
+ "dependencies": {
+ "iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0",
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
+ "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0",
+ "paper-material": "PolymerElements/paper-material#^1.0.0",
+ "paper-ripple": "PolymerElements/paper-ripple#^1.0.0",
+ "test-fixture": "PolymerElements/test-fixture#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ }
+}
diff --git a/static/bower_components/paper-behaviors/demo/index.html b/static/bower_components/paper-behaviors/demo/index.html
new file mode 100644
index 0000000..d6b775b
--- /dev/null
+++ b/static/bower_components/paper-behaviors/demo/index.html
@@ -0,0 +1,57 @@
+<!doctype html>
+<!--
+@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
+-->
+
+<html>
+<head>
+
+ <meta charset="utf-8">
+ <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">
+
+ <title>paper-behaviors demo</title>
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+
+ <link href="paper-button.html" rel="import">
+ <link href="paper-radio-button.html" rel="import">
+
+ <style>
+
+ body {
+ font-family: sans-serif;
+ padding: 24px;
+ margin: 0;
+ }
+
+ </style>
+
+</head>
+<body>
+
+ <h3>Normal</h3>
+
+ <paper-button tabindex="0">Hello World</paper-button>
+
+ <h3>Toggles</h3>
+
+ <paper-button toggles tabindex="0">Hello World</paper-button>
+
+ <h3>Disabled</h3>
+
+ <paper-button disabled tabindex="0">Hello World</paper-button>
+
+ <h3>Radio button with focus state</h3>
+
+ <paper-radio-button tabindex="0" title="Radio button with focus state"></paper-radio-button>
+
+
+</body>
+</html>
diff --git a/static/bower_components/paper-behaviors/demo/paper-button.html b/static/bower_components/paper-behaviors/demo/paper-button.html
new file mode 100644
index 0000000..c38bd00
--- /dev/null
+++ b/static/bower_components/paper-behaviors/demo/paper-button.html
@@ -0,0 +1,71 @@
+<!--
+@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="../../polymer/polymer.html">
+<link rel="import" href="../../paper-material/paper-material.html">
+<link rel="import" href="../paper-button-behavior.html">
+
+<dom-module id="paper-button">
+
+ <style>
+
+ :host {
+ display: inline-block;
+ background-color: #4285F4;
+ color: #fff;
+ border-radius: 3px;
+ text-transform: uppercase;
+ outline: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ -webkit-user-select: none;
+ user-select: none;
+ cursor: pointer;
+ }
+
+ paper-material {
+ border-radius: inherit;
+ padding: 16px;
+ }
+
+ :host([disabled]) {
+ background-color: #888;
+ pointer-events: none;
+ }
+
+ :host([active]),
+ :host([pressed]) {
+ background-color: #3367D6;
+ box-shadow: inset 0 3px 5px rgba(0,0,0,.2);
+ }
+
+ </style>
+
+ <template>
+
+ <paper-material class="content" elevation="[[_elevation]]" animated>
+ <content></content>
+ </paper-material>
+
+ </template>
+
+ <script>
+
+ Polymer({
+ is: 'paper-button',
+
+ behaviors: [
+ Polymer.PaperButtonBehavior
+ ]
+ });
+
+ </script>
+
+</dom-module>
diff --git a/static/bower_components/paper-behaviors/demo/paper-radio-button.html b/static/bower_components/paper-behaviors/demo/paper-radio-button.html
new file mode 100644
index 0000000..93af175
--- /dev/null
+++ b/static/bower_components/paper-behaviors/demo/paper-radio-button.html
@@ -0,0 +1,116 @@
+<!--
+@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="../../polymer/polymer.html">
+<link rel="import" href="../../paper-ripple/paper-ripple.html">
+<link rel="import" href="../paper-inky-focus-behavior.html">
+
+<dom-module id="paper-radio-button">
+
+ <style>
+ :host {
+ display: inline-block;
+ white-space: nowrap;
+ }
+
+ :host(:focus) {
+ outline: none
+ }
+
+ #radioContainer {
+ display: inline-block;
+ position: relative;
+ width: 16px;
+ height: 16px;
+ cursor: pointer;
+ vertical-align: middle;
+ }
+
+ #offRadio {
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ width: 12px;
+ height: 12px;
+ border-radius: 50%;
+ border: solid 2px;
+ border-color: black;
+ transition: border-color 0.28s;
+ }
+
+ #onRadio {
+ position: absolute;
+ top: 4px;
+ left: 4px;
+ width: 8px;
+ height: 8px;
+ border-radius: 50%;
+ background-color: red;
+ -webkit-transform: scale(0);
+ transform: scale(0);
+ transition: -webkit-transform ease 0.28s;
+ transition: transform ease 0.28s;
+ }
+
+ :host([disabled]) {
+ opacity: 0.3;
+ pointer-events: none;
+ }
+
+ :host([pressed]) #offRadio,
+ :host([active]) #offRadio {
+ border-color: red;
+ }
+
+ :host([pressed]) #onRadio,
+ :host([active]) #onRadio {
+ -webkit-transform: scale(1);
+ transform: scale(1);
+ }
+
+ #ink {
+ position: absolute;
+ top: -16px;
+ left: -16px;
+ width: 48px;
+ height: 48px;
+ }
+
+ </style>
+
+ <template>
+ <div id="radioContainer">
+ <div id="offRadio"></div>
+ <div id="onRadio"></div>
+ <paper-ripple id="ink" class="circle" center></paper-ripple>
+ </div>
+ </template>
+
+ <script>
+
+ Polymer({
+
+ behaviors: [
+ Polymer.PaperInkyFocusBehavior
+ ],
+
+ hostAttributes: {
+ role: 'radio'
+ },
+
+ ready: function() {
+ this.toggles = true;
+ }
+
+ });
+
+ </script>
+
+</dom-module>
diff --git a/static/bower_components/paper-behaviors/index.html b/static/bower_components/paper-behaviors/index.html
new file mode 100644
index 0000000..3e003cb
--- /dev/null
+++ b/static/bower_components/paper-behaviors/index.html
@@ -0,0 +1,26 @@
+<!doctype html>
+<!--
+@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
+The complete set of authors may be found at http://polymer.github.io/AUTHORS
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
+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
+-->
+<html>
+<head>
+
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+ <script src="../webcomponentsjs/webcomponents-lite.js"></script>
+ <link rel="import" href="../iron-component-page/iron-component-page.html">
+
+</head>
+<body>
+
+ <iron-component-page src="paper-button-behavior.html"></iron-component-page>
+
+</body>
+</html>
diff --git a/static/bower_components/paper-behaviors/paper-button-behavior.html b/static/bower_components/paper-behaviors/paper-button-behavior.html
new file mode 100644
index 0000000..bbe508f
--- /dev/null
+++ b/static/bower_components/paper-behaviors/paper-button-behavior.html
@@ -0,0 +1,56 @@
+<!--
+@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="../polymer/polymer.html">
+<link rel="import" href="../iron-behaviors/iron-button-state.html">
+
+<script>
+
+ /** @polymerBehavior */
+ Polymer.PaperButtonBehaviorImpl = {
+
+ properties: {
+
+ _elevation: {
+ type: Number
+ }
+
+ },
+
+ observers: [
+ '_calculateElevation(focused, disabled, active, pressed, receivedFocusFromKeyboard)'
+ ],
+
+ hostAttributes: {
+ role: 'button',
+ tabindex: '0'
+ },
+
+ _calculateElevation: function() {
+ var e = 1;
+ if (this.disabled) {
+ e = 0;
+ } else if (this.active || this.pressed) {
+ e = 4;
+ } else if (this.receivedFocusFromKeyboard) {
+ e = 3;
+ }
+ this._elevation = e;
+ }
+ };
+
+ /** @polymerBehavior */
+ Polymer.PaperButtonBehavior = [
+ Polymer.IronButtonState,
+ Polymer.IronControlState,
+ Polymer.PaperButtonBehaviorImpl
+ ];
+
+</script>
diff --git a/static/bower_components/paper-behaviors/paper-inky-focus-behavior.html b/static/bower_components/paper-behaviors/paper-inky-focus-behavior.html
new file mode 100644
index 0000000..4f6e9f8
--- /dev/null
+++ b/static/bower_components/paper-behaviors/paper-inky-focus-behavior.html
@@ -0,0 +1,44 @@
+<!--
+@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="../polymer/polymer.html">
+<link rel="import" href="../iron-behaviors/iron-button-state.html">
+
+<script>
+
+ /**
+ * `Polymer.PaperInkyFocusBehavior` implements a ripple when the element has keyboard focus.
+ *
+ * @polymerBehavior Polymer.PaperInkyFocusBehavior
+ */
+ Polymer.PaperInkyFocusBehaviorImpl = {
+
+ observers: [
+ '_focusedChanged(receivedFocusFromKeyboard)'
+ ],
+
+ _focusedChanged: function(receivedFocusFromKeyboard) {
+ if (!this.$.ink) {
+ return;
+ }
+
+ this.$.ink.holdDown = receivedFocusFromKeyboard;
+ }
+
+ };
+
+ /** @polymerBehavior Polymer.PaperInkyFocusBehavior */
+ Polymer.PaperInkyFocusBehavior = [
+ Polymer.IronButtonState,
+ Polymer.IronControlState,
+ Polymer.PaperInkyFocusBehaviorImpl
+ ];
+
+</script>
diff --git a/static/bower_components/paper-behaviors/test/index.html b/static/bower_components/paper-behaviors/test/index.html
new file mode 100644
index 0000000..c58bfee
--- /dev/null
+++ b/static/bower_components/paper-behaviors/test/index.html
@@ -0,0 +1,26 @@
+<!doctype html>
+<!--
+@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
+-->
+
+<html>
+<head>
+ <meta charset="utf-8">
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+</head>
+<body>
+ <script>
+ WCT.loadSuites([
+ 'paper-button-behavior.html',
+ 'paper-radio-button-behavior.html'
+ ]);
+ </script>
+</body>
+</html>
diff --git a/static/bower_components/paper-behaviors/test/paper-button-behavior.html b/static/bower_components/paper-behaviors/test/paper-button-behavior.html
new file mode 100644
index 0000000..9663938
--- /dev/null
+++ b/static/bower_components/paper-behaviors/test/paper-button-behavior.html
@@ -0,0 +1,82 @@
+<!doctype html>
+<!--
+@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
+-->
+
+<html>
+<head>
+ <title>paper-button-behavior</title>
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
+ <script src="../../iron-test-helpers/mock-interactions.js"></script>
+
+ <link rel="import" href="../../polymer/polymer.html">
+ <link rel="import" href="../../test-fixture/test-fixture.html">
+ <link rel="import" href="test-button.html">
+</head>
+<body>
+
+ <test-fixture id="basic">
+ <template>
+ <test-button></test-button>
+ </template>
+ </test-fixture>
+
+ <script>
+ suite('basic', function() {
+ var button;
+
+ setup(function() {
+ button = fixture('basic');
+ });
+
+ test('normal (no states)', function() {
+ assert.equal(button._elevation, 1);
+ });
+
+ test('set disabled property', function() {
+ button.disabled = true;
+ assert.equal(button._elevation, 0);
+ });
+
+ test('pressed and released', function() {
+ MockInteractions.down(button);
+ assert.equal(button._elevation, 4);
+ MockInteractions.up(button);
+ assert.equal(button._elevation, 1);
+ });
+
+ suite('a button with toggles', function() {
+ setup(function() {
+ button.toggles = true;
+ });
+
+ test('activated by tap', function(done) {
+ MockInteractions.downAndUp(button, function() {
+ try {
+ assert.equal(button._elevation, 4);
+ done();
+ } catch (e) {
+ done(e);
+ }
+ });
+ });
+ });
+
+ test('receives focused', function() {
+ MockInteractions.focus(button);
+ assert.equal(button._elevation, 3);
+ });
+ });
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/paper-behaviors/test/paper-radio-button-behavior.html b/static/bower_components/paper-behaviors/test/paper-radio-button-behavior.html
new file mode 100644
index 0000000..890d0bb
--- /dev/null
+++ b/static/bower_components/paper-behaviors/test/paper-radio-button-behavior.html
@@ -0,0 +1,62 @@
+<!doctype html>
+<!--
+@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
+-->
+
+<html>
+<head>
+ <title>paper-radio-button-behavior</title>
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
+ <script src="../../iron-test-helpers/mock-interactions.js"></script>
+
+ <link rel="import" href="../../polymer/polymer.html">
+ <link rel="import" href="../../test-fixture/test-fixture.html">
+ <link rel="import" href="test-radio-button.html">
+</head>
+<body>
+
+ <test-fixture id="basic">
+ <template>
+ <test-radio-button></test-radio-button>
+ </template>
+ </test-fixture>
+
+ <script>
+ suite('basic', function() {
+ var button;
+ var ink;
+
+ setup(function() {
+ button = fixture('basic');
+ ink = button.querySelector('paper-ripple');
+ MockInteractions.blur(button);
+ });
+
+ test('normal (no states)', function() {
+ assert.isFalse(button.focused);
+ assert.isFalse(ink._animating);
+ assert.equal(ink.ripples.length, 0);
+ });
+
+ test('receives focus', function() {
+ MockInteractions.focus(button);
+
+ assert.isTrue(button.focused);
+ assert.isTrue(ink._animating);
+ assert.equal(ink.ripples.length, 1);
+ });
+
+ });
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/paper-behaviors/test/test-button.html b/static/bower_components/paper-behaviors/test/test-button.html
new file mode 100644
index 0000000..3bbf356
--- /dev/null
+++ b/static/bower_components/paper-behaviors/test/test-button.html
@@ -0,0 +1,34 @@
+<!--
+@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="../../polymer/polymer.html">
+<link rel="import" href="../paper-button-behavior.html">
+
+<dom-module id="test-button">
+
+ <template>
+ <content></content>
+ </template>
+
+ <script>
+
+ Polymer({
+
+ is: 'test-button',
+
+ behaviors: [
+ Polymer.PaperButtonBehavior
+ ]
+
+ });
+
+ </script>
+
+</dom-module>
diff --git a/static/bower_components/paper-behaviors/test/test-radio-button.html b/static/bower_components/paper-behaviors/test/test-radio-button.html
new file mode 100644
index 0000000..afeabbb
--- /dev/null
+++ b/static/bower_components/paper-behaviors/test/test-radio-button.html
@@ -0,0 +1,41 @@
+<!--
+@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="../../polymer/polymer.html">
+<link rel="import" href="../paper-inky-focus-behavior.html">
+<link rel="import" href="../../paper-ripple/paper-ripple.html">
+
+<dom-module id="test-radio-button">
+ <style>
+ :host #ink {
+ position: absolute;
+ top: -16px;
+ left: -16px;
+ width: 48px;
+ height: 48px;
+ }
+
+ </style>
+ <template>
+ <div id="container">
+ <paper-ripple id="ink" class="circle" center></paper-ripple>
+ </div>
+ </template>
+</dom-module>
+
+<script>
+ Polymer({
+ is: 'test-radio-button',
+
+ behaviors: [
+ Polymer.PaperInkyFocusBehavior
+ ]
+ });
+</script>
diff --git a/static/bower_components/paper-drawer-panel/.bower.json b/static/bower_components/paper-drawer-panel/.bower.json
new file mode 100644
index 0000000..e49fa46
--- /dev/null
+++ b/static/bower_components/paper-drawer-panel/.bower.json
@@ -0,0 +1,42 @@
+{
+ "name": "paper-drawer-panel",
+ "version": "1.0.2",
+ "description": "A responsive drawer panel",
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "keywords": [
+ "web-components",
+ "polymer",
+ "drawer",
+ "responsive",
+ "layout"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/paper-drawer-panel.git"
+ },
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "homepage": "https://github.com/PolymerElements/paper-drawer-panel",
+ "dependencies": {
+ "polymer": "Polymer/polymer#^1.0.0",
+ "iron-selector": "PolymerElements/iron-selector#^1.0.0",
+ "iron-media-query": "PolymerElements/iron-media-query#^1.0.0"
+ },
+ "devDependencies": {
+ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
+ "paper-button": "PolymerElements/paper-button#^1.0.0",
+ "paper-styles": "PolymerElements/paper-styles#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ },
+ "_release": "1.0.2",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.0.2",
+ "commit": "691739c877914f7231eaca16b724bdca295dfe8d"
+ },
+ "_source": "git://github.com/PolymerElements/paper-drawer-panel.git",
+ "_target": "^1.0.0",
+ "_originalSource": "PolymerElements/paper-drawer-panel"
+} \ No newline at end of file
diff --git a/static/bower_components/paper-drawer-panel/.gitignore b/static/bower_components/paper-drawer-panel/.gitignore
new file mode 100644
index 0000000..fbe05fc
--- /dev/null
+++ b/static/bower_components/paper-drawer-panel/.gitignore
@@ -0,0 +1 @@
+bower_components/
diff --git a/static/bower_components/paper-drawer-panel/README.md b/static/bower_components/paper-drawer-panel/README.md
new file mode 100644
index 0000000..2828663
--- /dev/null
+++ b/static/bower_components/paper-drawer-panel/README.md
@@ -0,0 +1,71 @@
+# paper-drawer-panel
+
+`paper-drawer-panel` contains a drawer panel and a main panel. The drawer
+and the main panel are side-by-side with drawer on the left. When the browser
+window size is smaller than the `responsiveWidth`, `paper-drawer-panel`
+changes to narrow layout. In narrow layout, the drawer will be stacked on top
+of the main panel. The drawer will slide in/out to hide/reveal the main
+panel.
+
+Use the attribute `drawer` to indicate that the element is the drawer panel and
+`main` to indicate that the element is the main panel.
+
+Example:
+
+```html
+<paper-drawer-panel>
+ <div drawer> Drawer panel... </div>
+ <div main> Main panel... </div>
+</paper-drawer-panel>
+```
+
+The drawer and the main panels are not scrollable. You can set CSS overflow
+property on the elements to make them scrollable or use `paper-header-panel`.
+
+Example:
+
+```html
+<paper-drawer-panel>
+ <paper-header-panel drawer>
+ <paper-toolbar></paper-toolbar>
+ <div> Drawer content... </div>
+ </paper-header-panel>
+ <paper-header-panel main>
+ <paper-toolbar></paper-toolbar>
+ <div> Main content... </div>
+ </paper-header-panel>
+</paper-drawer-panel>
+```
+
+An element that should toggle the drawer will automatically do so if it's
+given the `paper-drawer-toggle` attribute. Also this element will automatically
+be hidden in wide layout.
+
+Example:
+
+```html
+<paper-drawer-panel>
+ <paper-header-panel drawer>
+ <paper-toolbar>
+ <div>Application</div>
+ </paper-toolbar>
+ <div> Drawer content... </div>
+ </paper-header-panel>
+ <paper-header-panel main>
+ <paper-toolbar>
+ <paper-icon-button icon="menu" paper-drawer-toggle></paper-icon-button>
+ <div>Title</div>
+ </paper-toolbar>
+ <div> Main content... </div>
+ </paper-header-panel>
+</paper-drawer-panel>
+```
+
+To position the drawer to the right, add `right-drawer` attribute.
+
+```html
+<paper-drawer-panel right-drawer>
+ <div drawer> Drawer panel... </div>
+ <div main> Main panel... </div>
+</paper-drawer-panel>
+```
diff --git a/static/bower_components/paper-drawer-panel/bower.json b/static/bower_components/paper-drawer-panel/bower.json
new file mode 100644
index 0000000..f87cca9
--- /dev/null
+++ b/static/bower_components/paper-drawer-panel/bower.json
@@ -0,0 +1,33 @@
+{
+ "name": "paper-drawer-panel",
+ "version": "1.0.2",
+ "description": "A responsive drawer panel",
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "keywords": [
+ "web-components",
+ "polymer",
+ "drawer",
+ "responsive",
+ "layout"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/paper-drawer-panel.git"
+ },
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "homepage": "https://github.com/PolymerElements/paper-drawer-panel",
+ "dependencies": {
+ "polymer": "Polymer/polymer#^1.0.0",
+ "iron-selector": "PolymerElements/iron-selector#^1.0.0",
+ "iron-media-query": "PolymerElements/iron-media-query#^1.0.0"
+ },
+ "devDependencies": {
+ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
+ "paper-button": "PolymerElements/paper-button#^1.0.0",
+ "paper-styles": "PolymerElements/paper-styles#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ }
+}
diff --git a/static/bower_components/paper-drawer-panel/demo/index.html b/static/bower_components/paper-drawer-panel/demo/index.html
new file mode 100644
index 0000000..f69df9f
--- /dev/null
+++ b/static/bower_components/paper-drawer-panel/demo/index.html
@@ -0,0 +1,85 @@
+<!doctype html>
+<!--
+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
+-->
+<html>
+ <head>
+ <title>paper-drawer-panel demo</title>
+
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
+ <meta name="mobile-web-app-capable" content="yes">
+ <meta name="apple-mobile-web-app-capable" content="yes">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+
+ <link rel="import" href="../../paper-styles/paper-styles.html">
+ <link rel="stylesheet" href="../../paper-styles/demo.css">
+
+ <link rel="import" href="../../paper-button/paper-button.html">
+ <link rel="import" href="../paper-drawer-panel.html">
+
+ <style is="custom-style">
+
+ #paperDrawerPanel [main] {
+ background-color: var(--google-grey-100);
+ }
+
+ #paperDrawerPanel [drawer] {
+ border-right: 1px solid var(--google-grey-300);
+ }
+
+ #paperDrawerPanel[right-drawer] [drawer] {
+ border-left: 1px solid var(--google-grey-300);
+ }
+
+ paper-button {
+ color: white;
+ margin: 10px;
+ background-color: var(--google-blue-700);
+ white-space: nowrap;
+ }
+
+ </style>
+ </head>
+
+ <body unresolved>
+
+ <paper-drawer-panel id="paperDrawerPanel">
+ <div drawer></div>
+ <div main>
+ <div>
+ <paper-button onclick="flipDrawer()" raised>flip drawer</paper-button>
+ </div>
+ <div>
+ <paper-button paper-drawer-toggle raised>toggle drawer</paper-button>
+ </div>
+ </div>
+ </paper-drawer-panel>
+
+ <script>
+ (function(global) {
+
+ 'use strict';
+
+ var DRAWER_ATTR = 'right-drawer';
+
+ var pdp = document.getElementById('paperDrawerPanel');
+
+ global.flipDrawer = function() {
+ if (pdp.hasAttribute(DRAWER_ATTR)) {
+ pdp.removeAttribute(DRAWER_ATTR);
+ } else {
+ pdp.setAttribute(DRAWER_ATTR, '');
+ }
+ }
+
+ }(this));
+ </script>
+
+ </body>
+</html>
diff --git a/static/bower_components/paper-drawer-panel/hero.svg b/static/bower_components/paper-drawer-panel/hero.svg
new file mode 100644
index 0000000..b53bf75
--- /dev/null
+++ b/static/bower_components/paper-drawer-panel/hero.svg
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
+<g id="background" display="none">
+ <rect display="inline" fill="#B0BEC5" width="225" height="126"/>
+</g>
+<g id="label">
+</g>
+<g id="art">
+ <path d="M175,102H61V24h114V102z M63,100h110V26H63V100z"/>
+ <path d="M91,102H61V24h30V102z M63,100h26V26H63V100z"/>
+ <circle cx="123" cy="63" r="4"/>
+ <rect x="90" y="62" width="33" height="2"/>
+ <g id="ic_x5F_add_x0D_">
+ </g>
+</g>
+<g id="Guides">
+</g>
+</svg>
diff --git a/static/bower_components/paper-drawer-panel/index.html b/static/bower_components/paper-drawer-panel/index.html
new file mode 100644
index 0000000..1390ecc
--- /dev/null
+++ b/static/bower_components/paper-drawer-panel/index.html
@@ -0,0 +1,29 @@
+<!doctype html>
+<!--
+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
+-->
+<html>
+<head>
+
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
+
+ <title>paper-drawer-panel</title>
+
+ <script src="../webcomponentsjs/webcomponents-lite.js"></script>
+
+ <link rel="import" href="../polymer/polymer.html">
+ <link rel="import" href="../iron-component-page/iron-component-page.html">
+
+</head>
+<body>
+
+ <iron-component-page></iron-component-page>
+
+</body>
+</html>
diff --git a/static/bower_components/paper-drawer-panel/paper-drawer-panel.css b/static/bower_components/paper-drawer-panel/paper-drawer-panel.css
new file mode 100644
index 0000000..ab7c568
--- /dev/null
+++ b/static/bower_components/paper-drawer-panel/paper-drawer-panel.css
@@ -0,0 +1,142 @@
+/**
+@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
+
+*/
+:host {
+ display: block;
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+}
+
+iron-selector > #drawer {
+ position: absolute;
+ top: 0;
+ left: 0;
+ height: 100%;
+ background-color: white;
+ will-change: transform;
+ box-sizing: border-box;
+ -moz-box-sizing: border-box;
+
+ @apply(--paper-drawer-panel-drawer-container);
+}
+
+.transition > #drawer {
+ transition: -webkit-transform ease-in-out 0.3s, width ease-in-out 0.3s;
+ transition: transform ease-in-out 0.3s, width ease-in-out 0.3s;
+}
+
+.left-drawer > #drawer {
+ @apply(--paper-drawer-panel-left-drawer-container);
+}
+
+.right-drawer > #drawer {
+ left: auto;
+ right: 0;
+
+ @apply(--paper-drawer-panel-right-drawer-container);
+}
+
+iron-selector > #main {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+
+ @apply(--paper-drawer-panel-main-container);
+}
+
+.transition > #main {
+ transition: left ease-in-out 0.3s, padding ease-in-out 0.3s;
+}
+
+.right-drawer > #main {
+ left: 0;
+}
+
+.right-drawer.transition > #main {
+ transition: right ease-in-out 0.3s, padding ease-in-out 0.3s;
+}
+
+#main > ::content > [main] {
+ height: 100%;
+}
+
+#drawer > ::content > [drawer] {
+ height: 100%;
+}
+
+#scrim {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ visibility: hidden;
+ opacity: 0;
+ transition: opacity ease-in-out 0.38s, visibility ease-in-out 0.38s;
+ background-color: rgba(0, 0, 0, 0.3);
+}
+
+.narrow-layout > #drawer.iron-selected {
+ box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
+}
+
+.right-drawer.narrow-layout > #drawer.iron-selected {
+ box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.15);
+}
+
+.narrow-layout > #drawer > ::content > [drawer] {
+ border: 0;
+}
+
+.left-drawer.narrow-layout > #drawer:not(.iron-selected) {
+ -webkit-transform: translateX(-100%);
+ transform: translateX(-100%);
+}
+
+.right-drawer.narrow-layout > #drawer:not(.iron-selected) {
+ left: auto;
+ -webkit-transform: translateX(100%);
+ transform: translateX(100%);
+}
+
+.narrow-layout > #main {
+ left: 0 !important;
+ padding: 0;
+}
+
+.right-drawer.narrow-layout > #main {
+ left: 0;
+ right: 0;
+ padding: 0;
+}
+
+.narrow-layout > #main:not(.iron-selected) > #scrim,
+.dragging > #main > #scrim {
+ visibility: visible;
+ opacity: var(--paper-drawer-panel-scrim-opacity, 1);
+}
+
+.narrow-layout > #main > * {
+ margin: 0;
+ min-height: 100%;
+ left: 0;
+ right: 0;
+ box-sizing: border-box;
+ -moz-box-sizing: border-box;
+}
+
+iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] {
+ display: none;
+} \ No newline at end of file
diff --git a/static/bower_components/paper-drawer-panel/paper-drawer-panel.html b/static/bower_components/paper-drawer-panel/paper-drawer-panel.html
new file mode 100644
index 0000000..148cfeb
--- /dev/null
+++ b/static/bower_components/paper-drawer-panel/paper-drawer-panel.html
@@ -0,0 +1,591 @@
+<!--
+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="../polymer/polymer.html">
+<link rel="import" href="../iron-media-query/iron-media-query.html">
+<link rel="import" href="../iron-selector/iron-selector.html">
+
+<!--
+`paper-drawer-panel` contains a drawer panel and a main panel. The drawer
+and the main panel are side-by-side with drawer on the left. When the browser
+window size is smaller than the `responsiveWidth`, `paper-drawer-panel`
+changes to narrow layout. In narrow layout, the drawer will be stacked on top
+of the main panel. The drawer will slide in/out to hide/reveal the main
+panel.
+
+Use the attribute `drawer` to indicate that the element is the drawer panel and
+`main` to indicate that the element is the main panel.
+
+Example:
+
+ <paper-drawer-panel>
+ <div drawer> Drawer panel... </div>
+ <div main> Main panel... </div>
+ </paper-drawer-panel>
+
+The drawer and the main panels are not scrollable. You can set CSS overflow
+property on the elements to make them scrollable or use `paper-header-panel`.
+
+Example:
+
+ <paper-drawer-panel>
+ <paper-header-panel drawer>
+ <paper-toolbar></paper-toolbar>
+ <div> Drawer content... </div>
+ </paper-header-panel>
+ <paper-header-panel main>
+ <paper-toolbar></paper-toolbar>
+ <div> Main content... </div>
+ </paper-header-panel>
+ </paper-drawer-panel>
+
+An element that should toggle the drawer will automatically do so if it's
+given the `paper-drawer-toggle` attribute. Also this element will automatically
+be hidden in wide layout.
+
+Example:
+
+ <paper-drawer-panel>
+ <paper-header-panel drawer>
+ <paper-toolbar>
+ <div>Application</div>
+ </paper-toolbar>
+ <div> Drawer content... </div>
+ </paper-header-panel>
+ <paper-header-panel main>
+ <paper-toolbar>
+ <paper-icon-button icon="menu" paper-drawer-toggle></paper-icon-button>
+ <div>Title</div>
+ </paper-toolbar>
+ <div> Main content... </div>
+ </paper-header-panel>
+ </paper-drawer-panel>
+
+To position the drawer to the right, add `right-drawer` attribute.
+
+ <paper-drawer-panel right-drawer>
+ <div drawer> Drawer panel... </div>
+ <div main> Main panel... </div>
+ </paper-drawer-panel>
+
+Styling paper-drawer-panel:
+
+To change the main container:
+ paper-drawer-panel {
+ --paper-drawer-panel-main-container: {
+ background-color: gray;
+ };
+ }
+
+To change the drawer container when it's in the left side:
+ paper-drawer-panel {
+ --paper-drawer-panel-left-drawer-container: {
+ background-color: white;
+ };
+ }
+
+To change the drawer container when it's in the right side:
+
+ paper-drawer-panel {
+ --paper-drawer-panel-right-drawer-container: {
+ background-color: white;
+ };
+ }
+
+@group Paper elements
+@element paper-drawer-panel
+@demo demo/index.html
+@hero hero.svg
+-->
+
+<dom-module id="paper-drawer-panel">
+ <link rel="import" type="css" href="paper-drawer-panel.css">
+
+ <template>
+ <iron-media-query
+ id="mq"
+ on-query-matches-changed="_onQueryMatchesChanged"
+ query="[[_computeMediaQuery(forceNarrow, responsiveWidth)]]">
+ </iron-media-query>
+
+ <iron-selector
+ attr-for-selected="id"
+ class$="[[_computeIronSelectorClass(narrow, transition, dragging, rightDrawer)]]"
+ activate-event=""
+ selected="[[selected]]">
+
+ <div id="main" style$="[[_computeMainStyle(narrow, rightDrawer, drawerWidth)]]">
+ <content select="[main]"></content>
+ <div id="scrim" on-tap="closeDrawer"></div>
+ </div>
+
+ <div id="drawer" style$="[[_computeDrawerStyle(drawerWidth)]]">
+ <content select="[drawer]"></content>
+ </div>
+
+ </iron-selector>
+ </template>
+
+</dom-module>
+
+<script>
+
+ (function() {
+
+ 'use strict';
+
+ // this would be the only `paper-drawer-panel` in
+ // the whole app that can be in `dragging` state
+ var sharedPanel = null;
+
+ function classNames(obj) {
+ var classes = [];
+ for (var key in obj) {
+ if (obj.hasOwnProperty(key) && obj[key]) {
+ classes.push(key);
+ }
+ }
+
+ return classes.join(' ');
+ }
+
+ Polymer({
+
+ is: 'paper-drawer-panel',
+
+ /**
+ * Fired when the narrow layout changes.
+ *
+ * @event paper-responsive-change {{narrow: boolean}} detail -
+ * narrow: true if the panel is in narrow layout.
+ */
+
+ /**
+ * Fired when the selected panel changes.
+ *
+ * Listening for this event is an alternative to observing changes in the `selected` attribute.
+ * This event is fired both when a panel is selected and deselected.
+ * The `isSelected` detail property contains the selection state.
+ *
+ * @event paper-select {{isSelected: boolean, item: Object}} detail -
+ * isSelected: True for selection and false for deselection.
+ * item: The panel that the event refers to.
+ */
+
+ properties: {
+
+ /**
+ * The panel to be selected when `paper-drawer-panel` changes to narrow
+ * layout.
+ */
+ defaultSelected: {
+ type: String,
+ value: 'main'
+ },
+
+ /**
+ * If true, swipe from the edge is disable.
+ */
+ disableEdgeSwipe: {
+ type: Boolean,
+ value: false
+ },
+
+ /**
+ * If true, swipe to open/close the drawer is disabled.
+ */
+ disableSwipe: {
+ type: Boolean,
+ value: false
+ },
+
+ /**
+ * Whether the user is dragging the drawer interactively.
+ */
+ dragging: {
+ type: Boolean,
+ value: false,
+ readOnly: true,
+ notify: true
+ },
+
+ /**
+ * Width of the drawer panel.
+ */
+ drawerWidth: {
+ type: String,
+ value: '256px'
+ },
+
+ /**
+ * How many pixels on the side of the screen are sensitive to edge
+ * swipes and peek.
+ */
+ edgeSwipeSensitivity: {
+ type: Number,
+ value: 30
+ },
+
+ /**
+ * If true, ignore `responsiveWidth` setting and force the narrow layout.
+ */
+ forceNarrow: {
+ type: Boolean,
+ value: false
+ },
+
+ /**
+ * Whether the browser has support for the transform CSS property.
+ */
+ hasTransform: {
+ type: Boolean,
+ value: function() {
+ return 'transform' in this.style;
+ }
+ },
+
+ /**
+ * Whether the browser has support for the will-change CSS property.
+ */
+ hasWillChange: {
+ type: Boolean,
+ value: function() {
+ return 'willChange' in this.style;
+ }
+ },
+
+ /**
+ * Returns true if the panel is in narrow layout. This is useful if you
+ * need to show/hide elements based on the layout.
+ */
+ narrow: {
+ reflectToAttribute: true,
+ type: Boolean,
+ value: false,
+ readOnly: true,
+ notify: true
+ },
+
+ /**
+ * Whether the drawer is peeking out from the edge.
+ */
+ peeking: {
+ type: Boolean,
+ value: false,
+ readOnly: true,
+ notify: true
+ },
+
+ /**
+ * Max-width when the panel changes to narrow layout.
+ */
+ responsiveWidth: {
+ type: String,
+ value: '640px'
+ },
+
+ /**
+ * If true, position the drawer to the right.
+ */
+ rightDrawer: {
+ type: Boolean,
+ value: false
+ },
+
+ /**
+ * The panel that is being selected. `drawer` for the drawer panel and
+ * `main` for the main panel.
+ */
+ selected: {
+ reflectToAttribute: true,
+ notify: true,
+ type: String,
+ value: null
+ },
+
+ /**
+ * The attribute on elements that should toggle the drawer on tap, also elements will
+ * automatically be hidden in wide layout.
+ */
+ drawerToggleAttribute: {
+ type: String,
+ value: 'paper-drawer-toggle'
+ },
+
+ /**
+ * Whether the transition is enabled.
+ */
+ transition: {
+ type: Boolean,
+ value: false
+ },
+
+ },
+
+ listeners: {
+ tap: '_onTap',
+ track: '_onTrack',
+ down: '_downHandler',
+ up: '_upHandler'
+ },
+
+ observers: [
+ '_forceNarrowChanged(forceNarrow, defaultSelected)'
+ ],
+
+ /**
+ * Toggles the panel open and closed.
+ *
+ * @method togglePanel
+ */
+ togglePanel: function() {
+ if (this._isMainSelected()) {
+ this.openDrawer();
+ } else {
+ this.closeDrawer();
+ }
+ },
+
+ /**
+ * Opens the drawer.
+ *
+ * @method openDrawer
+ */
+ openDrawer: function() {
+ this.selected = 'drawer';
+ },
+
+ /**
+ * Closes the drawer.
+ *
+ * @method closeDrawer
+ */
+ closeDrawer: function() {
+ this.selected = 'main';
+ },
+
+ ready: function() {
+ // Avoid transition at the beginning e.g. page loads and enable
+ // transitions only after the element is rendered and ready.
+ this.transition = true;
+ },
+
+ _computeIronSelectorClass: function(narrow, transition, dragging, rightDrawer) {
+ return classNames({
+ dragging: dragging,
+ 'narrow-layout': narrow,
+ 'right-drawer': rightDrawer,
+ 'left-drawer': !rightDrawer,
+ transition: transition
+ });
+ },
+
+ _computeDrawerStyle: function(drawerWidth) {
+ return 'width:' + drawerWidth + ';';
+ },
+
+ _computeMainStyle: function(narrow, rightDrawer, drawerWidth) {
+ var style = '';
+
+ style += 'left:' + ((narrow || rightDrawer) ? '0' : drawerWidth) + ';';
+
+ if (rightDrawer) {
+ style += 'right:' + (narrow ? '' : drawerWidth) + ';';
+ } else {
+ style += 'right:;';
+ }
+
+ return style;
+ },
+
+ _computeMediaQuery: function(forceNarrow, responsiveWidth) {
+ return forceNarrow ? '' : '(max-width: ' + responsiveWidth + ')';
+ },
+
+ _computeSwipeOverlayHidden: function(narrow, disableEdgeSwipe) {
+ return !narrow || disableEdgeSwipe;
+ },
+
+ _onTrack: function(e) {
+ if (sharedPanel && this !== sharedPanel) {
+ return;
+ }
+ switch (e.detail.state) {
+ case 'start':
+ this._trackStart(e);
+ break;
+ case 'track':
+ this._trackX(e);
+ break;
+ case 'end':
+ this._trackEnd(e);
+ break;
+ }
+
+ },
+
+ _responsiveChange: function(narrow) {
+ this._setNarrow(narrow);
+
+ if (this.narrow) {
+ this.selected = this.defaultSelected;
+ }
+
+ this.setScrollDirection(this._swipeAllowed() ? 'y' : 'all');
+ this.fire('paper-responsive-change', {narrow: this.narrow});
+ },
+
+ _onQueryMatchesChanged: function(e) {
+ this._responsiveChange(e.detail.value);
+ },
+
+ _forceNarrowChanged: function() {
+ // set the narrow mode only if we reached the `responsiveWidth`
+ this._responsiveChange(this.forceNarrow || this.$.mq.queryMatches);
+ },
+
+ _swipeAllowed: function() {
+ return this.narrow && !this.disableSwipe;
+ },
+
+ _isMainSelected: function() {
+ return this.selected === 'main';
+ },
+
+ _startEdgePeek: function() {
+ this.width = this.$.drawer.offsetWidth;
+ this._moveDrawer(this._translateXForDeltaX(this.rightDrawer ?
+ -this.edgeSwipeSensitivity : this.edgeSwipeSensitivity));
+ this._setPeeking(true);
+ },
+
+ _stopEdgePeek: function() {
+ if (this.peeking) {
+ this._setPeeking(false);
+ this._moveDrawer(null);
+ }
+ },
+
+ _downHandler: function(e) {
+ if (!this.dragging && this._isMainSelected() && this._isEdgeTouch(e) && !sharedPanel) {
+ this._startEdgePeek();
+ // grab this panel
+ sharedPanel = this;
+ }
+ },
+
+ _upHandler: function() {
+ this._stopEdgePeek();
+ // release the panel
+ sharedPanel = null;
+ },
+
+ _onTap: function(e) {
+ var targetElement = Polymer.dom(e).localTarget;
+ var isTargetToggleElement = targetElement &&
+ this.drawerToggleAttribute &&
+ targetElement.hasAttribute(this.drawerToggleAttribute);
+
+ if (isTargetToggleElement) {
+ this.togglePanel();
+ }
+ },
+
+ _isEdgeTouch: function(e) {
+ var x = e.detail.x;
+
+ return !this.disableEdgeSwipe && this._swipeAllowed() &&
+ (this.rightDrawer ?
+ x >= this.offsetWidth - this.edgeSwipeSensitivity :
+ x <= this.edgeSwipeSensitivity);
+ },
+
+ _trackStart: function(event) {
+ if (this._swipeAllowed()) {
+ sharedPanel = this;
+ this._setDragging(true);
+
+ if (this._isMainSelected()) {
+ this._setDragging(this.peeking || this._isEdgeTouch(event));
+ }
+
+ if (this.dragging) {
+ this.width = this.$.drawer.offsetWidth;
+ this.transition = false;
+ }
+ }
+ },
+
+ _translateXForDeltaX: function(deltaX) {
+ var isMain = this._isMainSelected();
+
+ if (this.rightDrawer) {
+ return Math.max(0, isMain ? this.width + deltaX : deltaX);
+ } else {
+ return Math.min(0, isMain ? deltaX - this.width : deltaX);
+ }
+ },
+
+ _trackX: function(e) {
+ if (this.dragging) {
+ var dx = e.detail.dx;
+
+ if (this.peeking) {
+ if (Math.abs(dx) <= this.edgeSwipeSensitivity) {
+ // Ignore trackx until we move past the edge peek.
+ return;
+ }
+ this._setPeeking(false);
+ }
+
+ this._moveDrawer(this._translateXForDeltaX(dx));
+ }
+ },
+
+ _trackEnd: function(e) {
+ if (this.dragging) {
+ var xDirection = e.detail.dx > 0;
+
+ this._setDragging(false);
+ this.transition = true;
+ sharedPanel = null;
+ this._moveDrawer(null);
+
+ if (this.rightDrawer) {
+ this[xDirection ? 'closeDrawer' : 'openDrawer']();
+ } else {
+ this[xDirection ? 'openDrawer' : 'closeDrawer']();
+ }
+ }
+ },
+
+ _transformForTranslateX: function(translateX) {
+ if (translateX === null) {
+ return '';
+ }
+
+ return this.hasWillChange ? 'translateX(' + translateX + 'px)' :
+ 'translate3d(' + translateX + 'px, 0, 0)';
+ },
+
+ _moveDrawer: function(translateX) {
+ var s = this.$.drawer.style;
+
+ if (this.hasTransform) {
+ s.transform = this._transformForTranslateX(translateX);
+ } else {
+ s.webkitTransform = this._transformForTranslateX(translateX);
+ }
+ }
+
+ });
+
+ }());
+
+</script>
diff --git a/static/bower_components/paper-fab/.bower.json b/static/bower_components/paper-fab/.bower.json
new file mode 100644
index 0000000..15e922a
--- /dev/null
+++ b/static/bower_components/paper-fab/.bower.json
@@ -0,0 +1,48 @@
+{
+ "name": "paper-fab",
+ "version": "1.0.2",
+ "description": "A material design floating action button",
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "keywords": [
+ "web-components",
+ "polymer",
+ "button"
+ ],
+ "main": "paper-fab.html",
+ "ignore": [],
+ "private": true,
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/paper-fab"
+ },
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "homepage": "https://github.com/PolymerElements/paper-fab",
+ "dependencies": {
+ "paper-ripple": "polymerelements/paper-ripple#^1.0.0",
+ "paper-material": "polymerelements/paper-material#^1.0.0",
+ "paper-behaviors": "polymerelements/paper-behaviors#^1.0.0",
+ "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0",
+ "iron-icon": "polymerelements/iron-icon#^1.0.0",
+ "iron-icons": "polymerelements/iron-icons#^1.0.0",
+ "paper-styles": "polymerelements/paper-styles#^1.0.0",
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
+ "test-fixture": "polymerelements/test-fixture#^1.0.0",
+ "paper-styles": "polymerelements/paper-styles#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ },
+ "_release": "1.0.2",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.0.2",
+ "commit": "59d2f77f456271f1ae4059b92d83ba7655fb1580"
+ },
+ "_source": "git://github.com/PolymerElements/paper-fab.git",
+ "_target": "^1.0.0",
+ "_originalSource": "PolymerElements/paper-fab"
+} \ No newline at end of file
diff --git a/static/bower_components/paper-fab/.gitignore b/static/bower_components/paper-fab/.gitignore
new file mode 100644
index 0000000..8d4ae25
--- /dev/null
+++ b/static/bower_components/paper-fab/.gitignore
@@ -0,0 +1 @@
+bower_components
diff --git a/static/bower_components/paper-fab/README.md b/static/bower_components/paper-fab/README.md
new file mode 100644
index 0000000..5da43e2
--- /dev/null
+++ b/static/bower_components/paper-fab/README.md
@@ -0,0 +1,44 @@
+paper-fab
+=========
+
+Material Design: <a href="http://www.google.com/design/spec/components/buttons.html">Button</a>
+
+`paper-fab` is a floating action button. It contains an image placed in the center and
+comes in two sizes: regular size and a smaller size by applying the attribute `mini`. When
+the user touches the button, a ripple effect emanates from the center of the button.
+
+You may import `iron-icons` to use with this element, or provide a URL to a custom icon.
+See `iron-iconset` for more information about how to use a custom icon set.
+
+Example:
+
+```html
+<link href="path/to/iron-icons/iron-icons.html" rel="import">
+
+<paper-fab icon="add"></paper-fab>
+<paper-fab mini icon="favorite"></paper-fab>
+<paper-fab src="star.png"></paper-fab>
+```
+
+Styling
+-------
+
+Style the button with CSS as you would a normal DOM element. If you are using the icons
+provided by `iron-icons`, the icon will inherit the foreground color of the button.
+
+```html
+<!-- make a blue "cloud" button -->
+<paper-fab icon="cloud" style="color: blue;"></paper-fab>
+```
+
+By default, the ripple is the same color as the foreground at 25% opacity. You may
+customize the color using this selector:
+
+```css
+/* make #my-button use a blue ripple instead of foreground color */
+#my-button::shadow #ripple {
+ color: blue;
+}
+```
+
+The opacity of the ripple is not customizable via CSS.
diff --git a/static/bower_components/paper-fab/bower.json b/static/bower_components/paper-fab/bower.json
new file mode 100644
index 0000000..f3738a2
--- /dev/null
+++ b/static/bower_components/paper-fab/bower.json
@@ -0,0 +1,39 @@
+{
+ "name": "paper-fab",
+ "version": "1.0.2",
+ "description": "A material design floating action button",
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "keywords": [
+ "web-components",
+ "polymer",
+ "button"
+ ],
+ "main": "paper-fab.html",
+ "ignore": [],
+ "private": true,
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/paper-fab"
+ },
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "homepage": "https://github.com/PolymerElements/paper-fab",
+ "dependencies": {
+ "paper-ripple": "polymerelements/paper-ripple#^1.0.0",
+ "paper-material": "polymerelements/paper-material#^1.0.0",
+ "paper-behaviors": "polymerelements/paper-behaviors#^1.0.0",
+ "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0",
+ "iron-icon": "polymerelements/iron-icon#^1.0.0",
+ "iron-icons": "polymerelements/iron-icons#^1.0.0",
+ "paper-styles": "polymerelements/paper-styles#^1.0.0",
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
+ "test-fixture": "polymerelements/test-fixture#^1.0.0",
+ "paper-styles": "polymerelements/paper-styles#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ }
+}
diff --git a/static/bower_components/paper-fab/demo/index.html b/static/bower_components/paper-fab/demo/index.html
new file mode 100644
index 0000000..3bd9935
--- /dev/null
+++ b/static/bower_components/paper-fab/demo/index.html
@@ -0,0 +1,97 @@
+<!doctype html>
+<!--
+@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
+The complete set of authors may be found at http://polymer.github.io/AUTHORS
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
+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
+-->
+<html>
+<head>
+
+ <meta charset="utf-8">
+ <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">
+
+ <title>paper-fab demo</title>
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <link rel="import" href="../../paper-styles/paper-styles.html">
+ <link rel="import" href="../../paper-styles/demo-pages.html">
+ <link rel="import" href="../../iron-icons/iron-icons.html">
+ <link rel="import" href="../paper-fab.html">
+
+ <style is="custom-style">
+ .horizontal-section {
+ min-width: 200px;
+ }
+
+ paper-fab {
+ display: block;
+ margin-bottom:24px;
+ margin-left: auto;
+ margin-right: auto;
+ }
+
+ paper-fab.blue {
+ --paper-fab-background: var(--paper-light-blue-500);
+ --paper-fab-keyboard-focus-background: var(--paper-light-blue-900);
+ }
+
+ paper-fab.red {
+ --paper-fab-background: var(--paper-red-500);
+ --paper-fab-keyboard-focus-background: var(--paper-red-900);
+ }
+
+ paper-fab.green {
+ --paper-fab-background: var(--paper-green-500);
+ --paper-fab-keyboard-focus-background: var(--paper-green-900);
+ }
+
+ paper-fab.orange {
+ --paper-fab-background: var(--paper-orange-500);
+ --paper-fab-keyboard-focus-background: var(--paper-orange-900);
+ }
+
+ </style>
+
+</head>
+<body>
+ <div class="horizontal center-justified layout">
+ <div>
+ <h4>Enabled</h4>
+ <div class="horizontal-section">
+ <paper-fab icon="arrow-forward" title="arrow-forward" tabindex="0"></paper-fab>
+ <paper-fab icon="create" title="create" tabindex="0"></paper-fab>
+ <paper-fab icon="favorite" title="heart" tabindex="0"></paper-fab>
+ <paper-fab mini icon="done" title="done" tabindex="0"></paper-fab>
+ <paper-fab mini icon="reply" title="reply" tabindex="0"></paper-fab>
+ </div>
+ </div>
+
+ <div>
+ <h4>Disabled</h4>
+ <div class="horizontal-section">
+ <paper-fab disabled icon="arrow-forward" title="arrow-forward" tabindex="0"></paper-fab>
+ <paper-fab disabled icon="create" title="create" tabindex="0"></paper-fab>
+ <paper-fab disabled icon="favorite" title="heart" tabindex="0"></paper-fab>
+ <paper-fab disabled mini icon="done" title="done" tabindex="0"></paper-fab>
+ <paper-fab disabled mini icon="reply" title="reply" tabindex="0"></paper-fab>
+ </div>
+ </div>
+
+ <div>
+ <h4>Colors</h4>
+ <div class="horizontal-section">
+ <paper-fab icon="arrow-forward" title="arrow-forward" tabindex="0" class="blue"></paper-fab>
+ <paper-fab icon="create" title="create" tabindex="0" class="red"></paper-fab>
+ <paper-fab icon="favorite" title="heart" tabindex="0" class="orange"></paper-fab>
+ <paper-fab mini icon="done" title="done" tabindex="0" class="green"></paper-fab>
+ <paper-fab mini icon="reply" title="reply" tabindex="0" class="blue"></paper-fab>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
diff --git a/static/bower_components/paper-fab/index.html b/static/bower_components/paper-fab/index.html
new file mode 100644
index 0000000..c98a658
--- /dev/null
+++ b/static/bower_components/paper-fab/index.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<!--
+@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
+The complete set of authors may be found at http://polymer.github.io/AUTHORS
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
+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
+-->
+<html>
+<head>
+
+ <title>paper-fab</title>
+ <script src="../webcomponentsjs/webcomponents-lite.js"></script>
+ <link rel="import" href="../iron-component-page/iron-component-page.html">
+
+</head>
+<body>
+
+ <iron-component-page></iron-component-page>
+
+</body>
+</html>
diff --git a/static/bower_components/paper-fab/paper-fab.html b/static/bower_components/paper-fab/paper-fab.html
new file mode 100644
index 0000000..f607ca4
--- /dev/null
+++ b/static/bower_components/paper-fab/paper-fab.html
@@ -0,0 +1,175 @@
+<!--
+@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="../polymer/polymer.html">
+<link rel="import" href="../iron-icon/iron-icon.html">
+<link rel="import" href="../iron-flex-layout/classes/iron-flex-layout.html">
+<link rel="import" href="../paper-styles/default-theme.html">
+<link rel="import" href="../paper-styles/color.html">
+<link rel="import" href="../paper-material/paper-material.html">
+<link rel="import" href="../paper-ripple/paper-ripple.html">
+<link rel="import" href="../paper-behaviors/paper-button-behavior.html">
+
+<!--
+Material Design: <a href="http://www.google.com/design/spec/components/buttons.html">Button</a>
+
+`paper-fab` is a floating action button. It contains an image placed in the center and
+comes in two sizes: regular size and a smaller size by applying the attribute `mini`. When
+the user touches the button, a ripple effect emanates from the center of the button.
+
+You may import `iron-icons` to use with this element, or provide a URL to a custom icon.
+See `iron-iconset` for more information about how to use a custom icon set.
+
+Example:
+
+ <link href="path/to/iron-icons/iron-icons.html" rel="import">
+
+ <paper-fab icon="add"></paper-fab>
+ <paper-fab mini icon="favorite"></paper-fab>
+ <paper-fab src="star.png"></paper-fab>
+
+
+### Styling
+
+The following custom properties and mixins are available for styling:
+
+Custom property | Description | Default
+----------------|-------------|----------
+`--paper-fab-background` | The background color of the button | `--accent-color`
+`--paper-fab-keyboard-focus-background` | The background color of the button when focused | `--paper-pink-900`
+`--paper-fab-disabled-background` | The background color of the button when it's disabled | `--paper-grey-300`
+`--paper-fab-disabled-text` | The text color of the button when it's disabled | `--paper-grey-500`
+`--paper-fab` | Mixin applied to the button | `{}`
+`--paper-fab-mini` | Mixin applied to a mini button | `{}`
+`--paper-fab-disabled` | Mixin applied to a disabled button | `{}`
+
+@group Paper Elements
+@demo demo/index.html
+
+-->
+
+<dom-module id="paper-fab">
+ <style>
+
+ :host {
+ display: inline-block;
+ position: relative;
+ outline: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ -webkit-user-select: none;
+ user-select: none;
+ cursor: pointer;
+
+ box-sizing: border-box;
+ min-width: 0;
+ width: 56px;
+ height: 56px;
+ background: var(--paper-fab-background, --accent-color);
+ color: var(--text-primary-color);
+ border-radius: 50%;
+ padding: 16px;
+
+ z-index: 0;
+
+ @apply(--paper-fab);
+ }
+
+ :host([mini]) {
+ width: 40px;
+ height: 40px;
+ padding: 8px;
+
+ @apply(--paper-fab-mini);
+ }
+
+ :host([disabled]) {
+ color: var(--paper-fab-disabled-text, --paper-grey-500);
+ background: var(--paper-fab-disabled-background, --paper-grey-300);
+ @apply(--paper-fab-disabled);
+ }
+
+ paper-material {
+ border-radius: inherit;
+ @apply(--layout-fit);
+ @apply(--layout-vertical);
+ @apply(--layout-center-center);
+ }
+
+ .keyboard-focus {
+ background: var(--paper-fab-keyboard-focus-background, --paper-pink-900);
+ }
+ </style>
+ <template>
+ <paper-ripple></paper-ripple>
+ <paper-material class$="[[_computeContentClass(receivedFocusFromKeyboard)]]" elevation="[[_elevation]]" animated>
+ <iron-icon id="icon" src="[[src]]" icon="[[icon]]"></iron-icon>
+ </paper-material>
+ </template>
+</dom-module>
+<script>
+ Polymer({
+ is: 'paper-fab',
+
+ behaviors: [
+ Polymer.PaperButtonBehavior
+ ],
+
+ properties: {
+ /**
+ * The URL of an image for the icon. If the src property is specified,
+ * the icon property should not be.
+ *
+ * @attribute src
+ * @type string
+ * @default ''
+ */
+ src: {
+ type: String,
+ value: ''
+ },
+
+ /**
+ * Specifies the icon name or index in the set of icons available in
+ * the icon's icon set. If the icon property is specified,
+ * the src property should not be.
+ *
+ * @attribute icon
+ * @type string
+ * @default ''
+ */
+ icon: {
+ type: String,
+ value: ''
+ },
+
+ /**
+ * Set this to true to style this is a "mini" FAB.
+ *
+ * @attribute mini
+ * @type boolean
+ * @default false
+ */
+ mini: {
+ type: Boolean,
+ value: false
+ }
+ },
+
+ _computeContentClass: function(receivedFocusFromKeyboard) {
+ var className = 'content';
+ if (receivedFocusFromKeyboard) {
+ className += ' keyboard-focus';
+ }
+ return className;
+ }
+
+ });
+</script>
diff --git a/static/bower_components/paper-fab/test/a11y.html b/static/bower_components/paper-fab/test/a11y.html
new file mode 100644
index 0000000..2a2cbe3
--- /dev/null
+++ b/static/bower_components/paper-fab/test/a11y.html
@@ -0,0 +1,71 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+ <meta charset="UTF-8">
+ <title>paper-fab a11y tests</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
+
+ <link rel="import" href="../../core-icons/core-icons.html">
+ <link rel="import" href="../../test-fixture/test-fixture.html">
+ <link rel="import" href="../paper-fab.html">
+
+</head>
+<body>
+
+ <test-fixture id="A11yFabs">
+ <template>
+ <paper-fab id="fab1" icon="add"></paper-fab>
+ <paper-fab id="fab2" icon="add" disabled></paper-fab>
+ <paper-fab id="fab3" icon="add" aria-label="custom"></paper-fab>
+ </template>
+ </test-fixture>
+
+ <script>
+
+ var f1;
+ var f2;
+ var f3;
+
+ setup(function() {
+ var fabs = fixture('A11yFabs');
+
+ f1 = fabs[0];
+ f2 = fabs[1];
+ f3 = fabs[2];
+ });
+
+ test('aria role is a button', function() {
+ assert.strictEqual(f1.getAttribute('role'), 'button');
+ });
+
+ test('aria-disabled is set', function() {
+ assert.ok(f2.hasAttribute('aria-disabled'));
+ f2.removeAttribute('disabled');
+ assert.strictEqual(f2.getAttribute('aria-disabled'), 'false');
+ });
+
+ test('aria-label is set');
+
+ test('user-defined aria-label is preserved', function() {
+ assert.strictEqual(f3.getAttribute('aria-label'), 'custom');
+ f3.icon = 'arrow-forward';
+ assert.strictEqual(f3.getAttribute('aria-label'), 'custom');
+ });
+
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/paper-fab/test/basic.html b/static/bower_components/paper-fab/test/basic.html
new file mode 100644
index 0000000..6c8a48a
--- /dev/null
+++ b/static/bower_components/paper-fab/test/basic.html
@@ -0,0 +1,76 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+ <meta charset="UTF-8">
+ <title>paper-fab basic tests</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
+
+ <link rel="import" href="../../test-fixture/test-fixture.html">
+ <link rel="import" href="../../iron-icons/iron-icons.html">
+ <link rel="import" href="../paper-fab.html">
+
+</head>
+<body>
+
+ <test-fixture id="TrivialFab">
+ <template>
+ <div style="line-height:30px;">
+ <paper-fab id="fab1" icon="add"></paper-fab>
+ </div>
+ </template>
+ </test-fixture>
+
+ <test-fixture id="SrcFab">
+ <template>
+ <paper-fab src="add.png"></paper-fab>
+ </template>
+ </test-fixture>
+
+ <script>
+
+ var f1;
+ var f2;
+
+ function centerOf(element) {
+ var rect = element.getBoundingClientRect();
+ return {left: rect.left + rect.width / 2, top: rect.top + rect.height / 2};
+ }
+
+ function approxEqual(p1, p2) {
+ return Math.round(p1.left) == Math.round(p2.left) && Math.round(p1.top) == Math.round(p2.top);
+ }
+
+ setup(function() {
+ f1 = fixture('TrivialFab').querySelector('#fab1');
+ f2 = fixture('SrcFab');
+ });
+
+ test('applies an icon specified by the `icon` attribute', function() {
+ assert.strictEqual(!!f1.$.icon.usesSrcAttribute, false);
+ assert.ok(Polymer.dom(f1.$.icon.root).querySelector('svg'));
+ });
+
+ test('applies an icon specified by the `src` attribute', function() {
+ assert.strictEqual(f2.$.icon._usesIconset(), false);
+ assert.ok(f2.$.icon._img);
+ });
+
+ test('renders correctly independent of line height', function() {
+ assert.ok(approxEqual(centerOf(f1.$.icon), centerOf(f1)));
+ });
+ </script>
+</body>
+</html>
diff --git a/static/bower_components/paper-fab/test/index.html b/static/bower_components/paper-fab/test/index.html
new file mode 100644
index 0000000..9f90214
--- /dev/null
+++ b/static/bower_components/paper-fab/test/index.html
@@ -0,0 +1,26 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
+ <title>paper-fab tests</title>
+ <script src="../../web-component-tester/browser.js"></script>
+</head>
+<body>
+ <script>
+ WCT.loadSuites([
+ 'basic.html',
+ 'a11y.html'
+ ]);
+ </script>
+</body>
+</html>
diff --git a/static/bower_components/paper-icon-button/.bower.json b/static/bower_components/paper-icon-button/.bower.json
new file mode 100644
index 0000000..71c8d45
--- /dev/null
+++ b/static/bower_components/paper-icon-button/.bower.json
@@ -0,0 +1,43 @@
+{
+ "name": "paper-icon-button",
+ "private": true,
+ "version": "1.0.2",
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "description": "A material design icon button",
+ "main": "paper-icon-button.html",
+ "author": [
+ "The Polymer Authors"
+ ],
+ "keywords": [
+ "web-components",
+ "polymer",
+ "button",
+ "icon",
+ "control"
+ ],
+ "dependencies": {
+ "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0",
+ "iron-icon": "polymerelements/iron-icon#^1.0.0",
+ "iron-icons": "polymerelements/iron-icons#^1.0.0",
+ "paper-behaviors": "polymerelements/paper-behaviors#^1.0.0",
+ "paper-ripple": "polymerelements/paper-ripple#^1.0.0",
+ "paper-styles": "polymerelements/paper-styles#^1.0.0",
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
+ "test-fixture": "polymerelements/test-fixture#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ },
+ "homepage": "https://github.com/PolymerElements/paper-icon-button",
+ "_release": "1.0.2",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.0.2",
+ "commit": "b22ade2080f2527760eae41e4700c52d4689a866"
+ },
+ "_source": "git://github.com/PolymerElements/paper-icon-button.git",
+ "_target": "^1.0.0",
+ "_originalSource": "PolymerElements/paper-icon-button"
+} \ No newline at end of file
diff --git a/static/bower_components/paper-icon-button/.gitignore b/static/bower_components/paper-icon-button/.gitignore
new file mode 100644
index 0000000..8d4ae25
--- /dev/null
+++ b/static/bower_components/paper-icon-button/.gitignore
@@ -0,0 +1 @@
+bower_components
diff --git a/static/bower_components/paper-icon-button/README.md b/static/bower_components/paper-icon-button/README.md
new file mode 100644
index 0000000..96dbf8e
--- /dev/null
+++ b/static/bower_components/paper-icon-button/README.md
@@ -0,0 +1,49 @@
+paper-icon-button
+=================
+
+Material Design: <a href="http://www.google.com/design/spec/components/buttons.html">Buttons</a>
+
+`paper-icon-button` is a button with an image placed at the center. When the user touches
+the button, a ripple effect emanates from the center of the button.
+
+`paper-icon-button` includes a default icon set. Use `icon` to specify which icon
+from the icon set to use.
+
+```html
+<paper-icon-button icon="menu"></paper-icon-button>
+```
+
+See [`iron-iconset`](#iron-iconset) for more information about
+how to use a custom icon set.
+
+Example:
+
+```html
+<link href="path/to/iron-icons/iron-icons.html" rel="import">
+
+<paper-icon-button icon="favorite"></paper-icon-button>
+<paper-icon-button src="star.png"></paper-icon-button>
+```
+
+Styling
+-------
+
+Style the button with CSS as you would a normal DOM element. If you are using the icons
+provided by `iron-icons`, they will inherit the foreground color of the button.
+
+```html
+<!-- make a red "favorite" button -->
+<paper-icon-button icon="favorite" style="color: red;"></paper-icon-button>
+```
+
+By default, the ripple is the same color as the foreground at 25% opacity. You may
+customize the color using this selector:
+
+```css
+/* make #my-button use a blue ripple instead of foreground color */
+#my-button::shadow #ripple {
+ color: blue;
+}
+```
+
+The opacity of the ripple is not customizable via CSS.
diff --git a/static/bower_components/paper-icon-button/bower.json b/static/bower_components/paper-icon-button/bower.json
new file mode 100644
index 0000000..6886757
--- /dev/null
+++ b/static/bower_components/paper-icon-button/bower.json
@@ -0,0 +1,33 @@
+{
+ "name": "paper-icon-button",
+ "private": true,
+ "version": "1.0.2",
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "description": "A material design icon button",
+ "main": "paper-icon-button.html",
+ "author": [
+ "The Polymer Authors"
+ ],
+ "keywords": [
+ "web-components",
+ "polymer",
+ "button",
+ "icon",
+ "control"
+ ],
+ "dependencies": {
+ "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0",
+ "iron-icon": "polymerelements/iron-icon#^1.0.0",
+ "iron-icons": "polymerelements/iron-icons#^1.0.0",
+ "paper-behaviors": "polymerelements/paper-behaviors#^1.0.0",
+ "paper-ripple": "polymerelements/paper-ripple#^1.0.0",
+ "paper-styles": "polymerelements/paper-styles#^1.0.0",
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
+ "test-fixture": "polymerelements/test-fixture#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ }
+}
diff --git a/static/bower_components/paper-icon-button/demo/index.html b/static/bower_components/paper-icon-button/demo/index.html
new file mode 100644
index 0000000..cbe6795
--- /dev/null
+++ b/static/bower_components/paper-icon-button/demo/index.html
@@ -0,0 +1,154 @@
+<!doctype html>
+<!--
+@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
+The complete set of authors may be found at http://polymer.github.io/AUTHORS
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
+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
+-->
+<html>
+ <head>
+ <title>paper-icon-button</title>
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+
+ <link rel="import" href="../../iron-icons/iron-icons.html">
+ <link rel="import" href="../../paper-styles/paper-styles.html">
+ <link rel="import" href="../../paper-styles/demo-pages.html">
+ <link rel="import" href="../paper-icon-button.html">
+
+ <style is="custom-style">
+ .horizontal-section {
+ min-width: 100px;
+ }
+
+ paper-icon-button {
+ margin-left: 30px;
+ display: block;
+ width: 24px;
+ text-align: center;
+ }
+
+ paper-icon-button.blue {
+ color: var(--paper-light-blue-500);
+ }
+
+ paper-icon-button.red {
+ color: var(--paper-red-500);
+ }
+
+ paper-icon-button.orange {
+ color: var(--paper-orange-500);
+ }
+
+ paper-icon-button.green {
+ color: var(--paper-green-500);
+ }
+
+ paper-icon-button.blue:hover {
+ background: var(--paper-light-blue-50);
+ border-radius: 50%;
+ }
+
+ paper-icon-button.red:hover {
+ background: var(--paper-red-50);
+ border-radius: 50%;
+ }
+
+ paper-icon-button.orange:hover {
+ background: var(--paper-orange-50);
+ border-radius: 50%;
+ }
+
+ paper-icon-button.green:hover {
+ background: var(--paper-green-50);
+ border-radius: 50%;
+ }
+
+ paper-icon-button.huge {
+ margin-left: 0px;
+ width: 100px;
+ --paper-icon-button-ink-color: var(--paper-indigo-500);
+ }
+
+ paper-icon-button.huge::shadow #icon {
+ width: 100px;
+ height: 100px;
+ }
+
+ paper-icon-button.huge #icon {
+ width: 100px;
+ height: 100px;
+ }
+ </style>
+
+ </head>
+
+ <body onclick="clickAction(event);">
+
+ <div class="horizontal center-justified layout">
+ <div>
+ <h4>Enabled</h4>
+ <div class="horizontal-section">
+ <paper-icon-button icon="menu" alt="menu" title="menu"></paper-icon-button>
+ <paper-icon-button icon="favorite" alt="heart" title="heart"></paper-icon-button>
+ <paper-icon-button icon="arrow-back" alt="arrow-back" title="arrow-back"></paper-icon-button>
+ <paper-icon-button icon="arrow-forward" alt="arrow-forward" title="arrow-forward"></paper-icon-button>
+ <paper-icon-button icon="clear" alt="clear" title="clear"></paper-icon-button>
+ <paper-icon-button icon="polymer" alt="polymer" title="polymer"></paper-icon-button>
+ <paper-icon-button src="https://assets-cdn.github.com/images/modules/logos_page/Octocat.png" alt="octocat" title="octocat"></paper-icon-button>
+ </div>
+ </div>
+
+ <div>
+ <h4>Disabled</h4>
+ <div class="horizontal-section">
+ <paper-icon-button icon="menu" alt="menu" disabled></paper-icon-button>
+ <paper-icon-button icon="favorite" alt="heart" disabled></paper-icon-button>
+ <paper-icon-button icon="arrow-back" alt="arrow-back" disabled></paper-icon-button>
+ <paper-icon-button icon="arrow-forward" alt="arrow-forward" disabled></paper-icon-button>
+ <paper-icon-button icon="clear" alt="clear" disabled></paper-icon-button>
+ <paper-icon-button icon="polymer" alt="polymer" disabled></paper-icon-button>
+ <paper-icon-button src="https://assets-cdn.github.com/images/modules/logos_page/Octocat.png" alt="octocat" disabled></paper-icon-button>
+ </div>
+ </div>
+
+ <div>
+ <h4>Color</h4>
+ <div class="horizontal-section">
+ <paper-icon-button icon="menu" alt="menu" class="blue"></paper-icon-button>
+ <paper-icon-button icon="favorite" alt="heart" class="red"></paper-icon-button>
+ <paper-icon-button icon="arrow-back" alt="arrow-back" class="orange"></paper-icon-button>
+ <paper-icon-button icon="arrow-forward" alt="arrow-forward" class="green"></paper-icon-button>
+ <paper-icon-button icon="clear" alt="clear" class="blue"></paper-icon-button>
+ <paper-icon-button icon="polymer" alt="polymer" class="red"></paper-icon-button>
+ <paper-icon-button class="blue" src="https://assets-cdn.github.com/images/modules/logos_page/Octocat.png" alt="octocat"></paper-icon-button>
+ </div>
+ </div>
+
+ <div>
+ <h4>Size</h4>
+ <div class="horizontal-section">
+ <paper-icon-button icon="favorite" alt="heart" class="huge"></paper-icon-button>
+ <br><br><br>
+ <paper-icon-button icon="polymer" alt="polymer" class="huge"></paper-icon-button>
+ </div>
+ </div>
+ </div>
+
+ <script>
+ function clickAction(e) {
+ var t = e.target;
+ if (t.localName === 'paper-icon-button') {
+ if (t.hasAttribute('disabled')) {
+ console.error('should not be able to click disabled button', t);
+ } else {
+ console.log('click', t);
+ }
+ }
+ }
+ </script>
+ </body>
+</html>
diff --git a/static/bower_components/paper-icon-button/index.html b/static/bower_components/paper-icon-button/index.html
new file mode 100644
index 0000000..94c3720
--- /dev/null
+++ b/static/bower_components/paper-icon-button/index.html
@@ -0,0 +1,23 @@
+<!doctype html>
+<!--
+@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
+The complete set of authors may be found at http://polymer.github.io/AUTHORS
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
+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
+-->
+<html>
+<head>
+
+ <script src="../webcomponentsjs/webcomponents.js"></script>
+ <link rel="import" href="../iron-component-page/iron-component-page.html">
+
+</head>
+<body>
+
+ <iron-component-page></iron-component-page>
+
+</body>
+</html>
diff --git a/static/bower_components/paper-icon-button/paper-icon-button.html b/static/bower_components/paper-icon-button/paper-icon-button.html
new file mode 100644
index 0000000..f4164ce
--- /dev/null
+++ b/static/bower_components/paper-icon-button/paper-icon-button.html
@@ -0,0 +1,156 @@
+<!--
+@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
+The complete set of authors may be found at http://polymer.github.io/AUTHORS
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
+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
+-->
+
+<link rel="import" href="../polymer/polymer.html">
+<link rel="import" href="../iron-icon/iron-icon.html">
+<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
+<link rel="import" href="../paper-styles/default-theme.html">
+<link rel="import" href="../paper-behaviors/paper-button-behavior.html">
+<link rel="import" href="../paper-behaviors/paper-inky-focus-behavior.html">
+<link rel="import" href="../paper-ripple/paper-ripple.html">
+
+<!--
+Material Design: <a href="http://www.google.com/design/spec/components/buttons.html">Buttons</a>
+
+`paper-icon-button` is a button with an image placed at the center. When the user touches
+the button, a ripple effect emanates from the center of the button.
+
+`paper-icon-button` includes a default icon set. Use `icon` to specify which icon
+from the icon set to use.
+
+ <paper-icon-button icon="menu"></paper-icon-button>
+
+See [`iron-iconset`](#iron-iconset) for more information about
+how to use a custom icon set.
+
+Example:
+
+ <link href="path/to/iron-icons/iron-icons.html" rel="import">
+
+ <paper-icon-button icon="favorite"></paper-icon-button>
+ <paper-icon-button src="star.png"></paper-icon-button>
+
+###Styling
+
+Style the button with CSS as you would a normal DOM element. If you are using the icons
+provided by `iron-icons`, they will inherit the foreground color of the button.
+
+ /* make a red "favorite" button */
+ <paper-icon-button icon="favorite" style="color: red;"></paper-icon-button>
+
+By default, the ripple is the same color as the foreground at 25% opacity. You may
+customize the color using this selector:
+
+ /* make #my-button use a blue ripple instead of foreground color */
+ #my-button::shadow #ripple {
+ color: blue;
+ }
+
+The opacity of the ripple is not customizable via CSS.
+
+The following custom properties and mixins are available for styling:
+
+Custom property | Description | Default
+----------------|-------------|----------
+`--paper-icon-button-disabled-text` | The color of the disabled button | `--primary-text-color`
+`--paper-icon-button-ink-color` | Selected/focus ripple color | `--default-primary-color`
+`--paper-icon-button` | Mixin for a button | `{}`
+`--paper-icon-button-disabled` | Mixin for a disabled button | `{}`
+
+@group Paper Elements
+@element paper-icon-button
+@demo demo/index.html
+-->
+
+<dom-module id="paper-icon-button">
+ <style>
+
+ :host {
+ display: inline-block;
+ position: relative;
+ padding: 8px;
+ outline: none;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ cursor: pointer;
+ z-index: 0;
+
+ @apply(--paper-icon-button);
+ }
+
+ :host #ink {
+ color: var(--paper-icon-button-ink-color, --primary-text-color);
+ opacity: 0.6;
+ }
+
+ :host([disabled]) {
+ color: var(--paper-icon-button-disabled-text, --disabled-text-color);
+ pointer-events: none;
+ cursor: auto;
+ @apply(--paper-icon-button-disabled);
+ }
+ </style>
+ <template>
+ <paper-ripple id="ink" class="circle" center></paper-ripple>
+ <iron-icon id="icon" src="[[src]]" icon="[[icon]]" alt$="[[alt]]"></iron-icon>
+ </template>
+</dom-module>
+<script>
+ Polymer({
+ is: 'paper-icon-button',
+
+ hostAttributes: {
+ role: 'button',
+ tabindex: '0'
+ },
+
+ behaviors: [
+ Polymer.PaperInkyFocusBehavior
+ ],
+
+ properties: {
+ /**
+ * The URL of an image for the icon. If the src property is specified,
+ * the icon property should not be.
+ */
+ src: {
+ type: String
+ },
+
+ /**
+ * Specifies the icon name or index in the set of icons available in
+ * the icon's icon set. If the icon property is specified,
+ * the src property should not be.
+ */
+ icon: {
+ type: String
+ },
+
+ /**
+ * Specifies the alternate text for the button, for accessibility.
+ */
+ alt: {
+ type: String,
+ observer: "_altChanged"
+ }
+ },
+
+ _altChanged: function(newValue, oldValue) {
+ var label = this.getAttribute('aria-label');
+
+ // Don't stomp over a user-set aria-label.
+ if (!label || oldValue == label) {
+ this.setAttribute('aria-label', newValue);
+ }
+ }
+ });
+</script>
diff --git a/static/bower_components/paper-icon-button/test/a11y.html b/static/bower_components/paper-icon-button/test/a11y.html
new file mode 100644
index 0000000..f6bf6fd
--- /dev/null
+++ b/static/bower_components/paper-icon-button/test/a11y.html
@@ -0,0 +1,94 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+ <meta charset="UTF-8">
+ <title>paper-icon-button a11y tests</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
+
+ <link rel="import" href="../../iron-icons/iron-icons.html">
+ <link rel="import" href="../../test-fixture/test-fixture.html">
+ <link rel="import" href="../paper-icon-button.html">
+
+</head>
+<body>
+
+ <test-fixture id="A11yIconButtons">
+ <template>
+ <paper-icon-button id="iconButton1" icon="add"></paper-icon-button>
+ <paper-icon-button id="iconButton2" icon="add" disabled></paper-icon-button>
+ <paper-icon-button id="iconButton3" icon="add" aria-label="custom"></paper-icon-button>
+ <paper-icon-button id="iconButton4" icon="add" alt="alt text"></paper-icon-button>
+ <paper-icon-button id="iconButton5" icon="add" aria-label="custom" alt="alt text" ></paper-icon-button>
+ </template>
+ </test-fixture>
+
+ <script>
+
+ var b1;
+ var b2;
+ var b3;
+ var b4;
+ var b5;
+
+ setup(function() {
+ var iconButtons = fixture('A11yIconButtons');
+
+ b1 = iconButtons[0];
+ b2 = iconButtons[1];
+ b3 = iconButtons[2];
+ b4 = iconButtons[3];
+ b5 = iconButtons[4];
+ });
+
+ test('aria role is a button', function() {
+ assert.strictEqual(b1.getAttribute('role'), 'button');
+ });
+
+ test('aria-disabled is set', function() {
+ assert.strictEqual(b2.getAttribute('aria-disabled'), 'true');
+ b2.removeAttribute('disabled');
+ assert.strictEqual(b2.getAttribute('aria-disabled'), 'false');
+ });
+
+ test('user-defined aria-label is preserved', function() {
+ assert.strictEqual(b3.getAttribute('aria-label'), 'custom');
+ b3.icon = 'arrow-forward';
+ assert.strictEqual(b3.getAttribute('aria-label'), 'custom');
+ });
+
+ test('alt attribute is used for the aria-label', function() {
+ assert.strictEqual(b4.getAttribute('aria-label'), 'alt text');
+ b4.icon = 'arrow-forward';
+ assert.strictEqual(b4.getAttribute('aria-label'), 'alt text');
+ });
+
+ test('aria-label wins over alt attribute', function() {
+ assert.strictEqual(b5.getAttribute('aria-label'), 'custom');
+ b5.icon = 'arrow-forward';
+ b5.alt = 'other alt'
+ assert.strictEqual(b5.getAttribute('aria-label'), 'custom');
+ });
+
+ test('alt attribute can be updated', function() {
+ assert.strictEqual(b4.getAttribute('aria-label'), 'alt text');
+ b4.alt = 'alt again';
+ assert.strictEqual(b4.getAttribute('aria-label'), 'alt again');
+ });
+
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/paper-icon-button/test/basic.html b/static/bower_components/paper-icon-button/test/basic.html
new file mode 100644
index 0000000..e98689c
--- /dev/null
+++ b/static/bower_components/paper-icon-button/test/basic.html
@@ -0,0 +1,77 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+ <meta charset="UTF-8">
+ <title>paper-icon-button basic tests</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
+
+ <link rel="import" href="../../test-fixture/test-fixture.html">
+ <link rel="import" href="../../iron-icons/iron-icons.html">
+ <link rel="import" href="../paper-icon-button.html">
+
+</head>
+<body>
+
+ <test-fixture id="TrivialIconButton">
+ <template>
+ <div style="line-height:30px;">
+ <paper-icon-button id="fab1" icon="add"></paper-icon-button>
+ </div>
+ </template>
+ </test-fixture>
+
+ <test-fixture id="SrcIconButton">
+ <template>
+ <paper-icon-button src="add.png"></paper-icon-button>
+ </template>
+ </test-fixture>
+
+ <script>
+
+ var b1;
+ var b2;
+
+ function centerOf(element) {
+ var rect = element.getBoundingClientRect();
+ return {left: rect.left + rect.width / 2, top: rect.top + rect.height / 2};
+ }
+
+ function approxEqual(p1, p2) {
+ return Math.abs(p1.left - p2.left) <= 2 && Math.abs(p1.top-p2.top) <= 2;
+ }
+
+ setup(function() {
+ b1 = fixture('TrivialIconButton').querySelector('#fab1');
+ b2 = fixture('SrcIconButton');
+ });
+
+ test('applies an icon specified by the `icon` attribute', function() {
+ assert.strictEqual(!!b1.$.icon.src, false);
+ assert.ok(Polymer.dom(b1.$.icon.root).querySelector('svg'));
+ });
+
+ test('applies an icon specified by the `src` attribute', function() {
+
+ assert.strictEqual(!!b2.$.icon.src, true);
+ assert.ok(b2.$.icon.src);
+ });
+
+ test('renders correctly independent of line height', function() {
+ assert.ok(approxEqual(centerOf(b1.$.icon), centerOf(b1)));
+ });
+ </script>
+</body>
+</html>
diff --git a/static/bower_components/paper-icon-button/test/index.html b/static/bower_components/paper-icon-button/test/index.html
new file mode 100644
index 0000000..321c261
--- /dev/null
+++ b/static/bower_components/paper-icon-button/test/index.html
@@ -0,0 +1,26 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
+ <title>paper-icon-button tests</title>
+ <script src="../../web-component-tester/browser.js"></script>
+</head>
+<body>
+ <script>
+ WCT.loadSuites([
+ 'basic.html',
+ 'a11y.html'
+ ]);
+ </script>
+</body>
+</html>
diff --git a/static/bower_components/paper-item/.bower.json b/static/bower_components/paper-item/.bower.json
new file mode 100644
index 0000000..00391bb
--- /dev/null
+++ b/static/bower_components/paper-item/.bower.json
@@ -0,0 +1,49 @@
+{
+ "name": "paper-item",
+ "version": "1.0.1",
+ "description": "A material-design styled list item",
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "keywords": [
+ "web-components",
+ "polymer",
+ "item"
+ ],
+ "main": [
+ "paper-item.html",
+ "paper-icon-item.html",
+ "paper-item-body.html"
+ ],
+ "private": true,
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/paper-item"
+ },
+ "license": "MIT",
+ "homepage": "https://github.com/PolymerElements/paper-item",
+ "ignore": [],
+ "dependencies": {
+ "paper-styles": "PolymerElements/paper-styles#^1.0.0",
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "iron-icon": "PolymerElements/iron-icon#^1.0.0",
+ "iron-icons": "PolymerElements/iron-icons#^1.0.0",
+ "paper-checkbox": "PolymerElements/paper-checkbox#^1.0.0",
+ "paper-toggle-button": "PolymerElements/paper-toggle-button#^1.0.0",
+ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
+ "test-fixture": "PolymerElements/test-fixture#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ },
+ "_release": "1.0.1",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.0.1",
+ "commit": "645ebae475ab4fc28698da253ccc3aa2c48341d7"
+ },
+ "_source": "git://github.com/PolymerElements/paper-item.git",
+ "_target": "^1.0.0",
+ "_originalSource": "PolymerElements/paper-item"
+} \ No newline at end of file
diff --git a/static/bower_components/paper-item/.gitignore b/static/bower_components/paper-item/.gitignore
new file mode 100644
index 0000000..fbe05fc
--- /dev/null
+++ b/static/bower_components/paper-item/.gitignore
@@ -0,0 +1 @@
+bower_components/
diff --git a/static/bower_components/paper-item/README.md b/static/bower_components/paper-item/README.md
new file mode 100644
index 0000000..02f8202
--- /dev/null
+++ b/static/bower_components/paper-item/README.md
@@ -0,0 +1,4 @@
+paper-item
+=========
+
+A non-interactive list item.
diff --git a/static/bower_components/paper-item/all-imports.html b/static/bower_components/paper-item/all-imports.html
new file mode 100644
index 0000000..4b1583f
--- /dev/null
+++ b/static/bower_components/paper-item/all-imports.html
@@ -0,0 +1,13 @@
+<!--
+@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="paper-item.html">
+<link rel="import" href="paper-item-body.html">
+<link rel="import" href="paper-icon-item.html">
diff --git a/static/bower_components/paper-item/bower.json b/static/bower_components/paper-item/bower.json
new file mode 100644
index 0000000..f077268
--- /dev/null
+++ b/static/bower_components/paper-item/bower.json
@@ -0,0 +1,40 @@
+{
+ "name": "paper-item",
+ "version": "1.0.1",
+ "description": "A material-design styled list item",
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "keywords": [
+ "web-components",
+ "polymer",
+ "item"
+ ],
+ "main": [
+ "paper-item.html",
+ "paper-icon-item.html",
+ "paper-item-body.html"
+ ],
+ "private": true,
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/paper-item"
+ },
+ "license": "MIT",
+ "homepage": "https://github.com/PolymerElements/paper-item",
+ "ignore": [],
+ "dependencies": {
+ "paper-styles": "PolymerElements/paper-styles#^1.0.0",
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "iron-icon": "PolymerElements/iron-icon#^1.0.0",
+ "iron-icons": "PolymerElements/iron-icons#^1.0.0",
+ "paper-checkbox": "PolymerElements/paper-checkbox#^1.0.0",
+ "paper-toggle-button": "PolymerElements/paper-toggle-button#^1.0.0",
+ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
+ "test-fixture": "PolymerElements/test-fixture#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ }
+}
diff --git a/static/bower_components/paper-item/demo/index.html b/static/bower_components/paper-item/demo/index.html
new file mode 100644
index 0000000..cdedb31
--- /dev/null
+++ b/static/bower_components/paper-item/demo/index.html
@@ -0,0 +1,285 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+
+ <meta charset="utf-8">
+ <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">
+
+ <title>paper-item demo</title>
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+
+ <link rel="import" href="../../iron-icon/iron-icon.html">
+ <link rel="import" href="../../iron-icons/iron-icons.html">
+ <link rel="import" href="../../iron-icons/communication-icons.html">
+ <link rel="import" href="../../paper-checkbox/paper-checkbox.html">
+ <link rel="import" href="../../paper-toggle-button/paper-toggle-button.html">
+ <link rel="import" href="../paper-icon-item.html">
+ <link rel="import" href="../paper-item.html">
+ <link rel="import" href="../paper-item-body.html">
+ <link rel="import" href="../../paper-styles/paper-styles.html">
+ <link rel="import" href="../../paper-styles/demo-pages.html">
+
+ <style is="custom-style">
+ .list {
+ padding-top: 12px;
+ background-color: white;
+ display: inline-block;
+ width: 240px;
+ height: 228px;
+ margin: 12px;
+ @apply(--shadow-elevation-2dp);
+ }
+
+ .short {
+ padding-top: 12px;
+ height: 216px;
+ }
+
+ h4 {
+ margin-left: 24px;
+ }
+
+ .avatar {
+ display: inline-block;
+ width: 40px;
+ height: 40px;
+ border-radius: 50%;
+ overflow: hidden;
+ background: #ccc;
+ }
+
+ .blue {
+ background-color: var(--paper-light-blue-300);
+ }
+ .red {
+ background-color: var(--paper-red-300);
+ }
+ .orange {
+ background-color: var(--paper-amber-300);
+ }
+ .green {
+ background-color: var(--paper-green-300);
+ }
+ </style>
+</head>
+<body>
+ <div class="layout wrap inline center-center">
+ <div>
+ <h4>Single line items</h4>
+ <div class="list short">
+ <paper-item>Inbox</paper-item>
+ <paper-item>Starred</paper-item>
+ <paper-item>Sent mail</paper-item>
+ <paper-item>Drafts</paper-item>
+ </div>
+ </div>
+
+ <div>
+ <h4>Icon with text</h4>
+ <div class="list short">
+ <paper-icon-item>
+ <iron-icon icon="inbox" item-icon></iron-icon> Inbox
+ </paper-icon-item>
+ <paper-icon-item>
+ <iron-icon icon="send" item-icon></iron-icon> Outbox
+ </paper-icon-item>
+ <paper-icon-item>
+ <iron-icon icon="delete" item-icon></iron-icon> Trash
+ </paper-icon-item>
+ <paper-icon-item>
+ <iron-icon icon="report" item-icon></iron-icon> Spam
+ </paper-icon-item>
+ </div>
+ </div>
+
+ <div>
+ <h4>Avatar with text</h4>
+ <div class="list short">
+ <paper-icon-item>
+ <div class="avatar blue" item-icon></div> Alphonso Engelking
+ </paper-icon-item>
+ <paper-icon-item>
+ <div class="avatar red" item-icon></div> Andrews Boyd
+ </paper-icon-item>
+ <paper-icon-item>
+ <div class="avatar orange" item-icon></div> Angela Decker
+ </paper-icon-item>
+ <paper-icon-item>
+ <div class="avatar green" item-icon></div> Lorem Ipsum
+ </paper-icon-item>
+ </div>
+ </div>
+
+ <div>
+ <h4>Avatar with text and icon</h4>
+ <div class="list short">
+ <paper-icon-item>
+ <div class="avatar red" item-icon></div>
+ <div class="flex">Alphonso</div>
+ <iron-icon icon="communication:messenger"></iron-icon>
+ </paper-icon-item>
+ <paper-icon-item>
+ <div class="avatar orange" item-icon></div>
+ <div class="flex">Andrews</div>
+ <iron-icon icon="communication:messenger"></iron-icon>
+ </paper-icon-item>
+ <paper-icon-item>
+ <div class="avatar green" item-icon></div>
+ <div class="flex">Angela</div>
+ <iron-icon icon="communication:messenger"></iron-icon>
+ </paper-icon-item>
+ <paper-icon-item>
+ <div class="avatar blue" item-icon></div>
+ <div class="flex">Lorem</div>
+ <iron-icon icon="communication:messenger"></iron-icon>
+ </paper-icon-item>
+ </div>
+ </div>
+
+ <div>
+ <h4>Avatar with text and control</h4>
+ <div class="list short">
+ <paper-icon-item>
+ <div class="avatar orange" item-icon></div>
+ <div class="flex">Alphonso</div>
+ <paper-checkbox></paper-checkbox>
+ </paper-icon-item>
+ <paper-icon-item>
+ <div class="avatar green" item-icon></div>
+ <div class="flex">Andrews</div>
+ <paper-checkbox checked></paper-checkbox>
+ </paper-icon-item>
+ <paper-icon-item>
+ <div class="avatar blue" item-icon></div>
+ <div class="flex">Angela</div>
+ <paper-checkbox></paper-checkbox>
+ </paper-icon-item>
+ <paper-icon-item>
+ <div class="avatar red" item-icon></div>
+ <div class="flex">Lorem</div>
+ <paper-checkbox></paper-checkbox>
+ </paper-icon-item>
+ </div>
+ </div>
+
+ <div>
+ <h4>Control with text and icon</h4>
+ <div class="list short">
+ <paper-icon-item>
+ <paper-checkbox item-icon></paper-checkbox>
+ <div class="flex">Alphonso</div>
+ <iron-icon icon="communication:messenger"></iron-icon>
+ </paper-icon-item>
+ <paper-icon-item>
+ <paper-checkbox checked item-icon></paper-checkbox>
+ <div class="flex">Andrews</div>
+ <iron-icon icon="communication:messenger"></iron-icon>
+ </paper-icon-item>
+ <paper-icon-item>
+ <paper-checkbox item-icon></paper-checkbox>
+ <div class="flex">Angela</div>
+ <iron-icon icon="communication:messenger"></iron-icon>
+ </paper-icon-item>
+ <paper-icon-item>
+ <paper-checkbox item-icon></paper-checkbox>
+ <div class="flex">Lorem</div>
+ <iron-icon icon="communication:messenger"></iron-icon>
+ </paper-icon-item>
+ </div>
+ </div>
+
+ <div>
+ <h4>Two-line items</h4>
+ <div class="list">
+ <paper-item>
+ <paper-item-body two-line class="layout vertical">
+ <div>Profile Photo</div>
+ <div secondary>Change your Google+ profile photo</div>
+ </paper-item-body>
+ </paper-item>
+ <paper-item>
+ <paper-item-body two-line>
+ <div>Show your status</div>
+ <div secondary>Your status is visible to everyone you use with</div>
+ </paper-item-body>
+ </paper-item>
+ <paper-item>
+ <paper-item-body two-line class="layout vertical">
+ <div>Settings</div>
+ <div secondary>Change your account settings</div>
+ </paper-item-body>
+ </paper-item>
+ </div>
+ </div>
+
+ <div>
+ <h4>Icon with two-line text</h4>
+ <div class="list">
+ <paper-icon-item>
+ <div class="avatar green" item-icon></div>
+ <paper-item-body two-line>
+ <div>Alphonso Engelking</div>
+ <div secondary>Change photo</div>
+ </paper-item-body>
+ </paper-icon-item>
+ <paper-icon-item>
+ <iron-icon icon="communication:phone" item-icon></iron-icon>
+ <paper-item-body two-line>
+ <div>(650) 555-1234</div>
+ <div secondary>Mobile</div>
+ </paper-item-body>
+ </paper-icon-item>
+ <paper-icon-item>
+ <iron-icon icon="communication:email" item-icon></iron-icon>
+ <paper-item-body two-line>
+ <div>alphonso@example.com</div>
+ <div secondary>Personal</div>
+ </paper-item-body>
+ </paper-icon-item>
+ <paper-icon-item>
+ </div>
+ </div>
+
+ <div>
+ <h4>Avatar with text and icon</h4>
+ <div class="list">
+ <paper-icon-item>
+ <div class="avatar blue" item-icon></div>
+ <paper-item-body two-line>
+ <div>Photos</div>
+ <div secondary>Jan 9, 2014</div>
+ </paper-item-body>
+ <iron-icon icon="star"></iron-icon>
+ </paper-icon-item>
+ <paper-icon-item>
+ <div class="avatar red" item-icon></div>
+ <paper-item-body two-line>
+ <div>Recipes</div>
+ <div secondary>Jan 17, 2014</div>
+ </paper-item-body>
+ <iron-icon icon="star"></iron-icon>
+ </paper-icon-item>
+ <paper-icon-item>
+ <div class="avatar orange" item-icon></div>
+ <paper-item-body two-line>
+ <div>Work</div>
+ <div secondary>Jan 28, 2014</div>
+ </paper-item-body>
+ <iron-icon icon="star"></iron-icon>
+ </paper-icon-item>
+ </div>
+ </div>
+
+</body>
+</html>
diff --git a/static/bower_components/paper-item/index.html b/static/bower_components/paper-item/index.html
new file mode 100644
index 0000000..b409ed1
--- /dev/null
+++ b/static/bower_components/paper-item/index.html
@@ -0,0 +1,30 @@
+<!--
+@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
+-->
+<!doctype html>
+<html>
+<head>
+
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
+
+ <title>paper-item</title>
+
+ <script src="../webcomponentsjs/webcomponents-lite.js"></script>
+
+ <link rel="import" href="../polymer/polymer.html">
+ <link rel="import" href="../iron-component-page/iron-component-page.html">
+
+</head>
+<body>
+
+ <iron-component-page src="all-imports.html"></iron-component-page>
+
+</body>
+</html>
diff --git a/static/bower_components/paper-item/paper-icon-item.html b/static/bower_components/paper-item/paper-icon-item.html
new file mode 100644
index 0000000..231159c
--- /dev/null
+++ b/static/bower_components/paper-item/paper-icon-item.html
@@ -0,0 +1,86 @@
+<!--
+@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="../polymer/polymer.html">
+<link rel="import" href="../paper-styles/paper-styles.html">
+
+<!--
+`<paper-icon-item>` is a convenience element to make an item with icon. It is a non interactive list
+item with a fixed-width icon area, according to Material Design. This is useful if the icons are of
+varying widths, but you want the item bodies to line up. Use this like a `<paper-item>`. The child
+node with the attribute `item-icon` is placed in the icon area.
+
+ <paper-icon-item>
+ <iron-icon icon="favorite" item-icon></iron-icon>
+ Favorite
+ </paper-icon-item>
+ <paper-icon-item>
+ <div class="avatar" item-icon></div>
+ Avatar
+ </paper-icon-item>
+
+### Styling
+
+The following custom properties and mixins are available for styling:
+
+Custom property | Description | Default
+----------------|-------------|----------
+`--paper-item-icon-width` | Width of the icon area | `56px`
+`--paper-icon-item` | Mixin applied to the item | `{}`
+
+-->
+
+<dom-module id="paper-icon-item">
+
+ <link rel="import" type="css" href="paper-item-shared.css">
+
+ <style>
+
+ :host {
+ @apply(--layout-horizontal);
+ @apply(--layout-center);
+ @apply(--paper-font-subhead);
+
+ @apply(--paper-item);
+ @apply(--paper-icon-item);
+ }
+
+ .content-icon {
+ width: var(--paper-item-icon-width, 56px);
+ }
+
+ </style>
+
+ <template>
+ <div id="contentIcon" class="content-icon layout horizontal center">
+ <content select="[item-icon]"></content>
+ </div>
+ <content></content>
+ </template>
+
+</dom-module>
+
+<script>
+
+(function() {
+
+ Polymer({
+
+ is: 'paper-icon-item',
+
+ hostAttributes: {
+ 'role': 'listitem'
+ }
+
+ });
+
+})();
+
+</script>
diff --git a/static/bower_components/paper-item/paper-item-body.html b/static/bower_components/paper-item/paper-item-body.html
new file mode 100644
index 0000000..6345830
--- /dev/null
+++ b/static/bower_components/paper-item/paper-item-body.html
@@ -0,0 +1,93 @@
+<!--
+ @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="../polymer/polymer.html">
+<link rel="import" href="../paper-styles/paper-styles.html">
+
+<!--
+Use `<paper-item-body>` in a `<paper-item>` or `<paper-icon-item>` to make two- or
+three- line items. It is a flex item that is a vertical flexbox.
+
+ <paper-item>
+ <paper-item-body two-line>
+ <div>Show your status</div>
+ <div secondary>Your status is visible to everyone</div>
+ </paper-item-body>
+ </paper-item>
+
+The child elements with the `secondary` attribute is given secondary text styling.
+
+### Styling
+
+The following custom properties and mixins are available for styling:
+
+Custom property | Description | Default
+----------------|-------------|----------
+`--paper-item-body-two-line-min-height` | Minimum height of a two-line item | `72px`
+`--paper-item-body-three-line-min-height` | Minimum height of a three-line item | `88px`
+`--paper-item-body-secondary-color` | Foreground color for the `secondary` area | `--secondary-text-color`
+`--paper-item-body-secondary` | Mixin applied to the `secondary` area | `{}`
+
+-->
+
+<dom-module id="paper-item-body">
+
+ <style>
+
+ :host {
+ overflow: hidden; /* needed for text-overflow: ellipsis to work on ff */
+ @apply(--layout-vertical);
+ @apply(--layout-center-justified);
+ @apply(--layout-flex);
+ }
+
+ :host([two-line]) {
+ min-height: var(--paper-item-body-two-line-min-height, 72px);
+ }
+
+ :host([three-line]) {
+ min-height: var(--paper-item-body-three-line-min-height, 88px);
+ }
+
+ :host > ::content > * {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+
+ :host > ::content [secondary] {
+ color: var(--paper-item-body-secondary-color, --secondary-text-color);
+ @apply(--paper-font-body1);
+
+ @apply(--paper-item-body-secondary);
+ }
+
+
+ </style>
+
+ <template>
+ <content></content>
+ </template>
+
+</dom-module>
+
+<script>
+
+(function() {
+
+ Polymer({
+
+ is: 'paper-item-body'
+
+ });
+
+})();
+
+</script>
diff --git a/static/bower_components/paper-item/paper-item-shared.css b/static/bower_components/paper-item/paper-item-shared.css
new file mode 100644
index 0000000..8528d1a
--- /dev/null
+++ b/static/bower_components/paper-item/paper-item-shared.css
@@ -0,0 +1,19 @@
+/*
+ @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
+*/
+
+:host {
+ display: block;
+ min-height: var(--paper-item-min-height, 48px);
+ padding: 0px 16px;
+}
+
+:host > ::content > *:not(:first-child):not(:last-child) {
+ margin-right: 16px;
+}
diff --git a/static/bower_components/paper-item/paper-item.html b/static/bower_components/paper-item/paper-item.html
new file mode 100644
index 0000000..50b89fe
--- /dev/null
+++ b/static/bower_components/paper-item/paper-item.html
@@ -0,0 +1,95 @@
+<!--
+@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="../polymer/polymer.html">
+<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
+<link rel="import" href="../paper-styles/paper-styles.html">
+
+<!--
+`<paper-item>` is a non-interactive list item. By default, it is a horizontal flexbox.
+
+ <paper-item>Item</paper-item>
+
+Use this element with `<paper-item-body>` to make Material Design styled two-line and three-line
+items.
+
+ <paper-item>
+ <paper-item-body two-line>
+ <div>Show your status</div>
+ <div secondary>Your status is visible to everyone</div>
+ </paper-item-body>
+ <iron-icon icon="warning"></iron-icon>
+ </paper-item>
+
+### Styling
+
+The following custom properties and mixins are available for styling:
+
+Custom property | Description | Default
+----------------|-------------|----------
+`--paper-item-min-height` | Minimum height of the item | `48px`
+`--paper-item` | Mixin applied to the item | `{}`
+
+### Accessibility
+
+This element has `role="listitem"` by default. Depending on usage, it may be more appropriate to set
+`role="menuitem"`, `role="menuitemcheckbox"` or `role="menuitemradio"`.
+
+ <paper-item role="menuitemcheckbox">
+ <paper-item-body>
+ Show your status
+ </paper-item-body>
+ <paper-checkbox></paper-checkbox>
+ </paper-item>
+
+@group Paper Elements
+@element paper-item
+@demo demo/index.html
+-->
+
+<dom-module id="paper-item">
+
+ <link rel="import" type="css" href="paper-item-shared.css">
+
+ <style>
+
+ :host {
+ @apply(--layout-horizontal);
+ @apply(--layout-center);
+ @apply(--paper-font-subhead);
+
+ @apply(--paper-item);
+ }
+
+ </style>
+
+ <template>
+ <content></content>
+ </template>
+
+</dom-module>
+
+<script>
+
+(function() {
+
+ Polymer({
+
+ is: 'paper-item',
+
+ hostAttributes: {
+ role: 'listitem'
+ }
+
+ });
+
+})();
+
+</script>
diff --git a/static/bower_components/paper-item/test/index.html b/static/bower_components/paper-item/test/index.html
new file mode 100644
index 0000000..6f5314c
--- /dev/null
+++ b/static/bower_components/paper-item/test/index.html
@@ -0,0 +1,34 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+ <head>
+
+ <title>paper-item tests</title>
+
+ <meta charset="utf-8">
+ <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="../../web-component-tester/browser.js"></script>
+
+ </head>
+ <body>
+
+ <script>
+
+ WCT.loadSuites([
+ 'paper-item.html'
+ ]);
+
+ </script>
+
+ </body>
+</html>
diff --git a/static/bower_components/paper-item/test/paper-item.html b/static/bower_components/paper-item/test/paper-item.html
new file mode 100644
index 0000000..3c77ce3
--- /dev/null
+++ b/static/bower_components/paper-item/test/paper-item.html
@@ -0,0 +1,66 @@
+<!--
+@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
+-->
+<!doctype html>
+<html>
+ <head>
+
+ <title>paper-item tests</title>
+
+ <meta charset="utf-8">
+ <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-lite.js"></script>
+
+ <script src="../../web-component-tester/browser.js"></script>
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
+
+ <link rel="import" href="../../test-fixture/test-fixture.html">
+ <link rel="import" href="../paper-item.html">
+ <link rel="import" href="../paper-icon-item.html">
+
+ </head>
+ <body>
+
+ <test-fixture id="item">
+ <template>
+ <paper-item>item</paper-item>
+ </template>
+ </test-fixture>
+
+ <test-fixture id="iconItem">
+ <template>
+ <paper-icon-item>item</paper-icon-item>
+ </template>
+ </test-fixture>
+
+ <script>
+
+ suite('item a11y tests', function() {
+ var item, iconItem;
+
+ setup(function() {
+ item = fixture('item');
+ iconItem = fixture('iconItem');
+ });
+
+ test('item has role="listitem"', function() {
+ assert.equal(item.getAttribute('role'), 'listitem', 'has role="item"');
+ });
+
+ test('icon item has role="listitem"', function() {
+ assert.equal(iconItem.getAttribute('role'), 'listitem', 'has role="item"');
+ });
+ });
+
+ </script>
+
+ </body>
+</html>
diff --git a/static/bower_components/paper-material/.bower.json b/static/bower_components/paper-material/.bower.json
new file mode 100644
index 0000000..1933706
--- /dev/null
+++ b/static/bower_components/paper-material/.bower.json
@@ -0,0 +1,45 @@
+{
+ "name": "paper-material",
+ "version": "1.0.0",
+ "description": "A material design container that looks like a lifted sheet of paper",
+ "private": true,
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "keywords": [
+ "web-components",
+ "web-component",
+ "polymer",
+ "paper",
+ "container"
+ ],
+ "main": [
+ "paper-material.html"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/paper-material"
+ },
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "homepage": "https://github.com/PolymerElements/paper-material",
+ "ignore": [],
+ "dependencies": {
+ "paper-styles": "polymerelements/paper-styles#^1.0.0",
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
+ "test-fixture": "polymerelements/test-fixture#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ },
+ "_release": "1.0.0",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.0.0",
+ "commit": "bd769d2b8c4f9ab000aee22582d76b5935793dc1"
+ },
+ "_source": "git://github.com/polymerelements/paper-material.git",
+ "_target": "^1.0.0",
+ "_originalSource": "polymerelements/paper-material"
+} \ No newline at end of file
diff --git a/static/bower_components/paper-material/.gitignore b/static/bower_components/paper-material/.gitignore
new file mode 100644
index 0000000..8d4ae25
--- /dev/null
+++ b/static/bower_components/paper-material/.gitignore
@@ -0,0 +1 @@
+bower_components
diff --git a/static/bower_components/paper-material/README.md b/static/bower_components/paper-material/README.md
new file mode 100644
index 0000000..1105102
--- /dev/null
+++ b/static/bower_components/paper-material/README.md
@@ -0,0 +1,13 @@
+# paper-material
+A Material Design container that looks like a lifted piece of paper.
+
+`paper-material` is a container that renders two shadows on top of each other to
+create the effect of a lifted piece of paper.
+
+Example:
+
+```html
+<paper-material elevation="1">
+ ... content ...
+</paper-material>
+```
diff --git a/static/bower_components/paper-material/bower.json b/static/bower_components/paper-material/bower.json
new file mode 100644
index 0000000..e6f78bc
--- /dev/null
+++ b/static/bower_components/paper-material/bower.json
@@ -0,0 +1,36 @@
+{
+ "name": "paper-material",
+ "version": "1.0.0",
+ "description": "A material design container that looks like a lifted sheet of paper",
+ "private": true,
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "keywords": [
+ "web-components",
+ "web-component",
+ "polymer",
+ "paper",
+ "container"
+ ],
+ "main": [
+ "paper-material.html"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/paper-material"
+ },
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "homepage": "https://github.com/PolymerElements/paper-material",
+ "ignore": [],
+ "dependencies": {
+ "paper-styles": "polymerelements/paper-styles#^1.0.0",
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
+ "test-fixture": "polymerelements/test-fixture#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ }
+}
diff --git a/static/bower_components/paper-material/demo/index.html b/static/bower_components/paper-material/demo/index.html
new file mode 100644
index 0000000..864f696
--- /dev/null
+++ b/static/bower_components/paper-material/demo/index.html
@@ -0,0 +1,113 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+ <title>paper-material demo</title>
+
+ <meta charset="utf-8">
+ <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-lite.js"></script>
+ <link rel="import" href="../../iron-flex-layout/classes/iron-flex-layout.html">
+ <link rel="import" href="../../paper-styles/typography.html">
+ <link rel="import" href="../paper-material.html">
+
+ <link rel="stylesheet" href="../../paper-styles/demo.css">
+
+</head>
+<body>
+ <template is="dom-bind" id="demo">
+ <style>
+ paper-material {
+ display: inline-block;
+ background: white;
+ box-sizing: border-box;
+ margin: 16px;
+ padding: 16px;
+ border-radius: 2px;
+ }
+
+ .fab {
+ display: inline-block;
+ background: white;
+ box-sizing: border-box;
+ width: 56px;
+ height: 56px;
+ margin: 16px;
+ padding: 16px;
+ border-radius: 50%;
+ text-align: center;
+ cursor: pointer;
+ }
+ </style>
+ <section>
+ <div>Paper Elevations</div>
+
+ <paper-material elevation="0">
+ elevation = 0
+ </paper-material>
+
+ <paper-material elevation="1">
+ elevation = 1
+ </paper-material>
+
+ <paper-material elevation="2">
+ elevation = 2
+ </paper-material>
+
+ <paper-material elevation="3">
+ elevation = 3
+ </paper-material>
+
+ <paper-material elevation="4">
+ elevation = 4
+ </paper-material>
+
+ <paper-material elevation="5">
+ elevation = 5
+ </paper-material>
+ </section>
+
+ <section on-click="tapAction">
+ <div>Animated</div>
+
+ <paper-material elevation="0" animated>
+ tap
+ </paper-material>
+
+ <paper-material class="fab layout center-center" elevation="0" animated>
+ tap
+ </paper-material>
+ </section>
+ </template>
+
+ <script>
+
+ demo.tapAction = function(e) {
+ var target = e.target;
+ if (!target.down) {
+ target.elevation += 1;
+ if (target.elevation === 5) {
+ target.down = true;
+ }
+ } else {
+ target.elevation -= 1;
+ if (target.elevation === 0) {
+ target.down = false;
+ }
+ }
+ };
+
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/paper-material/index.html b/static/bower_components/paper-material/index.html
new file mode 100644
index 0000000..7209e6d
--- /dev/null
+++ b/static/bower_components/paper-material/index.html
@@ -0,0 +1,30 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
+
+ <title>paper-material</title>
+
+ <script src="../webcomponentsjs/webcomponents-lite.js"></script>
+
+ <link rel="import" href="../polymer/polymer.html">
+ <link rel="import" href="../iron-component-page/iron-component-page.html">
+
+</head>
+<body>
+
+ <iron-component-page></iron-component-page>
+
+</body>
+</html>
diff --git a/static/bower_components/paper-material/paper-material.html b/static/bower_components/paper-material/paper-material.html
new file mode 100644
index 0000000..60f87ba
--- /dev/null
+++ b/static/bower_components/paper-material/paper-material.html
@@ -0,0 +1,98 @@
+<!--
+@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="../polymer/polymer.html">
+<link rel="import" href="../paper-styles/shadow.html">
+
+<!--
+
+`paper-material` is a container that renders two shadows on top of each other to
+create the effect of a lifted piece of paper.
+
+Example:
+
+ <paper-material elevation="1">
+ ... content ...
+ </paper-material>
+
+@group Paper Elements
+@class paper-material
+@demo demo/index.html
+-->
+
+<dom-module id="paper-material">
+ <style>
+ :host {
+ display: block;
+ position: relative;
+ @apply(--shadow-transition);
+ }
+
+ :host([elevation="1"]) {
+ @apply(--shadow-elevation-2dp);
+ }
+
+ :host([elevation="2"]) {
+ @apply(--shadow-elevation-4dp);
+ }
+
+ :host([elevation="3"]) {
+ @apply(--shadow-elevation-6dp);
+ }
+
+ :host([elevation="4"]) {
+ @apply(--shadow-elevation-8dp);
+ }
+
+ :host([elevation="5"]) {
+ @apply(--shadow-elevation-16dp);
+ }
+ </style>
+ <template>
+ <content></content>
+ </template>
+</dom-module>
+<script>
+ Polymer({
+ is: 'paper-material',
+
+ properties: {
+
+ /**
+ * The z-depth of this element, from 0-5. Setting to 0 will remove the
+ * shadow, and each increasing number greater than 0 will be "deeper"
+ * than the last.
+ *
+ * @attribute elevation
+ * @type number
+ * @default 1
+ */
+ elevation: {
+ type: Number,
+ reflectToAttribute: true,
+ value: 1
+ },
+
+ /**
+ * Set this to true to animate the shadow when setting a new
+ * `elevation` value.
+ *
+ * @attribute animated
+ * @type boolean
+ * @default false
+ */
+ animated: {
+ type: Boolean,
+ reflectToAttribute: true,
+ value: false
+ }
+ }
+ });
+</script>
diff --git a/static/bower_components/paper-material/test/index.html b/static/bower_components/paper-material/test/index.html
new file mode 100644
index 0000000..492a567
--- /dev/null
+++ b/static/bower_components/paper-material/test/index.html
@@ -0,0 +1,25 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
+ <title>paper-material tests</title>
+ <script src="../../web-component-tester/browser.js"></script>
+</head>
+<body>
+ <script>
+ WCT.loadSuites([
+ 'paper-material.html'
+ ]);
+ </script>
+</body>
+</html>
diff --git a/static/bower_components/paper-material/test/paper-material.html b/static/bower_components/paper-material/test/paper-material.html
new file mode 100644
index 0000000..0a593fb
--- /dev/null
+++ b/static/bower_components/paper-material/test/paper-material.html
@@ -0,0 +1,92 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+ <meta charset="UTF-8">
+ <title>paper-material basic tests</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
+
+ <script src="../../webcomponentsjs/webcomponents.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
+
+ <link href="../../test-fixture/test-fixture.html" rel="import">
+ <link href="../../layout/layout.html" rel="import">
+ <link href="../paper-material.html" rel="import">
+
+</head>
+<body>
+ <test-fixture id="TrivialCard">
+ <template>
+ <paper-material elevation="1"></paper-material>
+ </template>
+ </test-fixture>
+
+ <test-fixture id="ProgressiveElevations">
+ <template>
+ <paper-material elevation="1"></paper-material>
+ <paper-material elevation="2"></paper-material>
+ <paper-material elevation="3"></paper-material>
+ <paper-material elevation="4"></paper-material>
+ <paper-material elevation="5"></paper-material>
+ </template>
+ </test-fixture>
+
+ <script>
+ suite('<paper-material>', function() {
+ suite('with a non-zero elevation attribute', function() {
+ var style;
+ var card;
+
+ setup(function() {
+ card = fixture('TrivialCard');
+ style = window.getComputedStyle(card);
+ });
+
+ test('has a shadow', function() {
+ expect(style.boxShadow).to.be.ok;
+ expect(style.boxShadow).to.not.be.eql('none');
+ });
+
+ test('loses shadow with elevation value 0', function() {
+ card.elevation = 0;
+ expect(style.boxShadow).to.be.eql('none');
+ });
+ });
+
+ suite('progressively increasing values of elevation', function() {
+ var cards;
+
+ setup(function() {
+ cards = fixture('ProgressiveElevations');
+ });
+
+ test('yield progressively "deeper" cards', function() {
+ var lastStyle;
+ var style;
+
+ expect(cards.length).to.be.eql(5);
+
+ cards.forEach(function (card) {
+ style = window.getComputedStyle(card);
+
+ expect(style.boxShadow).to.be.ok;
+ expect(style.boxShadow).to.not.be.eql('none');
+ expect(style.boxShadow).to.not.be.eql(lastStyle && lastStyle.boxShadow);
+
+ lastStyle = style;
+ });
+ });
+ });
+ });
+ </script>
+</body>
+</html>
diff --git a/static/bower_components/paper-menu/.bower.json b/static/bower_components/paper-menu/.bower.json
new file mode 100644
index 0000000..0e4dff9
--- /dev/null
+++ b/static/bower_components/paper-menu/.bower.json
@@ -0,0 +1,41 @@
+{
+ "name": "paper-menu",
+ "version": "1.0.0",
+ "description": "Implements an accessible material design menu",
+ "authors": "The Polymer Authors",
+ "keywords": [
+ "web-components",
+ "polymer",
+ "menu"
+ ],
+ "main": "paper-menu.html",
+ "private": true,
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/paper-menu"
+ },
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "homepage": "https://github.com/PolymerElements/paper-menu",
+ "ignore": [],
+ "dependencies": {
+ "iron-menu-behavior": "PolymerElements/iron-menu-behavior#^1.0.0",
+ "paper-styles": "PolymerElements/paper-styles#^1.0.0",
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
+ "paper-item": "PolymerElements/paper-item#^1.0.0",
+ "test-fixture": "PolymerElements/test-fixture#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ },
+ "_release": "1.0.0",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.0.0",
+ "commit": "0642450ec9df0fc0b1d909842f436c3dea79ed1e"
+ },
+ "_source": "git://github.com/PolymerElements/paper-menu.git",
+ "_target": "^1.0.0",
+ "_originalSource": "PolymerElements/paper-menu"
+} \ No newline at end of file
diff --git a/static/bower_components/paper-menu/.gitignore b/static/bower_components/paper-menu/.gitignore
new file mode 100644
index 0000000..fbe05fc
--- /dev/null
+++ b/static/bower_components/paper-menu/.gitignore
@@ -0,0 +1 @@
+bower_components/
diff --git a/static/bower_components/paper-menu/README.md b/static/bower_components/paper-menu/README.md
new file mode 100644
index 0000000..9991680
--- /dev/null
+++ b/static/bower_components/paper-menu/README.md
@@ -0,0 +1,3 @@
+# paper-menu
+
+`<paper-menu>` implements an accessible menu control with Material Design styling.
diff --git a/static/bower_components/paper-menu/bower.json b/static/bower_components/paper-menu/bower.json
new file mode 100644
index 0000000..dd2a5cd
--- /dev/null
+++ b/static/bower_components/paper-menu/bower.json
@@ -0,0 +1,32 @@
+{
+ "name": "paper-menu",
+ "version": "1.0.0",
+ "description": "Implements an accessible material design menu",
+ "authors": "The Polymer Authors",
+ "keywords": [
+ "web-components",
+ "polymer",
+ "menu"
+ ],
+ "main": "paper-menu.html",
+ "private": true,
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/paper-menu"
+ },
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "homepage": "https://github.com/PolymerElements/paper-menu",
+ "ignore": [],
+ "dependencies": {
+ "iron-menu-behavior": "PolymerElements/iron-menu-behavior#^1.0.0",
+ "paper-styles": "PolymerElements/paper-styles#^1.0.0",
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
+ "paper-item": "PolymerElements/paper-item#^1.0.0",
+ "test-fixture": "PolymerElements/test-fixture#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ }
+}
diff --git a/static/bower_components/paper-menu/demo/index.html b/static/bower_components/paper-menu/demo/index.html
new file mode 100644
index 0000000..9734cac
--- /dev/null
+++ b/static/bower_components/paper-menu/demo/index.html
@@ -0,0 +1,81 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+
+ <meta charset="utf-8">
+ <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">
+
+ <title>paper-menu demo</title>
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+
+ <link rel="import" href="../../paper-item/paper-item.html">
+ <link rel="import" href="../paper-menu.html">
+ <link rel="import" href="../../paper-styles/paper-styles.html">
+ <link rel="import" href="../../paper-styles/demo-pages.html">
+
+ <style>
+ .horizontal-section {
+ padding: 0 !important;
+ }
+
+ .avatar {
+ display: inline-block;
+ width: 40px;
+ height: 40px;
+ border-radius: 50%;
+ overflow: hidden;
+ background: #ccc;
+ }
+ </style>
+</head>
+<body>
+ <div class="horizontal center-justified layout">
+ <div>
+ <h4>Standard</h4>
+ <div class="horizontal-section">
+ <paper-menu class="list">
+ <paper-item>Inbox</paper-item>
+ <paper-item>Starred</paper-item>
+ <paper-item>Sent mail</paper-item>
+ <paper-item>Drafts</paper-item>
+ </paper-menu>
+ </div>
+ </div>
+
+ <div>
+ <h4>Pre-selected</h4>
+ <div class="horizontal-section">
+ <paper-menu class="list" selected="0">
+ <paper-item>Inbox</paper-item>
+ <paper-item disabled>Starred</paper-item>
+ <paper-item>Sent mail</paper-item>
+ <paper-item>Drafts</paper-item>
+ </paper-menu>
+ </div>
+ </div>
+
+ <div>
+ <h4>Multi-select</h4>
+ <div class="horizontal-section">
+ <paper-menu class="list" multi>
+ <paper-item>Bold</paper-item>
+ <paper-item>Italic</paper-item>
+ <paper-item>Underline</paper-item>
+ <paper-item>Strikethrough</paper-item>
+ </paper-menu>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
diff --git a/static/bower_components/paper-menu/hero.svg b/static/bower_components/paper-menu/hero.svg
new file mode 100644
index 0000000..eaa0fb5
--- /dev/null
+++ b/static/bower_components/paper-menu/hero.svg
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
+<g id="background" display="none">
+ <rect display="inline" fill="#B0BEC5" width="225" height="126"/>
+</g>
+<g id="label">
+</g>
+<g id="art">
+ <g>
+ <circle cx="86.5" cy="39" r="4"/>
+ <path d="M138,44c-2,0-3.6-2.4-4.6-4.6c-1.1-2.1-1.7-3.4-3-3.4s-2,1.3-3,3.4c-1.1,2.1-2.2,4.6-4.9,4.6c-2.6,0-3.8-2.4-4.9-4.6
+ c-1.1-2.1-1.8-3.4-3.1-3.4c-1.3,0-2,1.3-3.1,3.4c-1.1,2.1-2.3,4.6-4.9,4.6c-2.6,0-4.1-2.4-5.1-4.6C100.3,37.3,100,36,98,36v-2
+ c3,0,4.1,2.4,5.1,4.6c1.1,2.1,1.9,3.4,3.2,3.4c1.3,0,2.1-1.3,3.2-3.4c1.1-2.1,2.3-4.6,4.9-4.6c2.6,0,3.8,2.4,4.9,4.6
+ c1.1,2.1,1.8,3.4,3.1,3.4c1.3,0,2-1.3,3.1-3.4c1.1-2.1,2.3-4.6,4.9-4.6s3.6,2.4,4.6,4.6c1.1,2.1,1.9,3.4,2.9,3.4V44z"/>
+ <circle cx="86.5" cy="63" r="4"/>
+ <path d="M138,68c-2,0-3.6-2.4-4.6-4.6c-1.1-2.1-1.7-3.4-3-3.4s-2,1.3-3,3.4c-1.1,2.1-2.2,4.6-4.9,4.6c-2.6,0-3.8-2.4-4.9-4.6
+ c-1.1-2.1-1.8-3.4-3.1-3.4c-1.3,0-2,1.3-3.1,3.4c-1.1,2.1-2.3,4.6-4.9,4.6c-2.6,0-4.1-2.4-5.1-4.6C100.3,61.3,100,60,98,60v-2
+ c3,0,4.1,2.4,5.1,4.6c1.1,2.1,1.9,3.4,3.2,3.4c1.3,0,2.1-1.3,3.2-3.4c1.1-2.1,2.3-4.6,4.9-4.6c2.6,0,3.8,2.4,4.9,4.6
+ c1.1,2.1,1.8,3.4,3.1,3.4c1.3,0,2-1.3,3.1-3.4c1.1-2.1,2.3-4.6,4.9-4.6s3.6,2.4,4.6,4.6c1.1,2.1,1.9,3.4,2.9,3.4V68z"/>
+ <circle cx="86.5" cy="88" r="4"/>
+ <path d="M138,93c-2,0-3.6-2.4-4.6-4.6c-1.1-2.1-1.7-3.4-3-3.4s-2,1.3-3,3.4c-1.1,2.1-2.2,4.6-4.9,4.6c-2.6,0-3.8-2.4-4.9-4.6
+ c-1.1-2.1-1.8-3.4-3.1-3.4c-1.3,0-2,1.3-3.1,3.4c-1.1,2.1-2.3,4.6-4.9,4.6c-2.6,0-4.1-2.4-5.1-4.6C100.3,86.3,100,85,98,85v-2
+ c3,0,4.1,2.4,5.1,4.6c1.1,2.1,1.9,3.4,3.2,3.4c1.3,0,2.1-1.3,3.2-3.4c1.1-2.1,2.3-4.6,4.9-4.6c2.6,0,3.8,2.4,4.9,4.6
+ c1.1,2.1,1.8,3.4,3.1,3.4c1.3,0,2-1.3,3.1-3.4c1.1-2.1,2.3-4.6,4.9-4.6s3.6,2.4,4.6,4.6c1.1,2.1,1.9,3.4,2.9,3.4V93z"/>
+ <path d="M151,102H73V24h78V102z M75,100h74V26H75V100z"/>
+ </g>
+ <g id="ic_x5F_add_x0D_">
+ </g>
+</g>
+<g id="Guides">
+</g>
+</svg>
diff --git a/static/bower_components/paper-menu/index.html b/static/bower_components/paper-menu/index.html
new file mode 100644
index 0000000..fc88411
--- /dev/null
+++ b/static/bower_components/paper-menu/index.html
@@ -0,0 +1,30 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
+
+ <title>paper-menu</title>
+
+ <script src="../webcomponentsjs/webcomponents-lite.js"></script>
+
+ <link rel="import" href="../polymer/polymer.html">
+ <link rel="import" href="../iron-component-page/iron-component-page.html">
+
+</head>
+<body>
+
+ <iron-component-page></iron-component-page>
+
+</body>
+</html>
diff --git a/static/bower_components/paper-menu/paper-menu.html b/static/bower_components/paper-menu/paper-menu.html
new file mode 100644
index 0000000..45ecd72
--- /dev/null
+++ b/static/bower_components/paper-menu/paper-menu.html
@@ -0,0 +1,133 @@
+<!--
+@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="../polymer/polymer.html">
+<link rel="import" href="../iron-menu-behavior/iron-menu-behavior.html">
+<link rel="import" href="../paper-styles/paper-styles.html">
+
+<!--
+`<paper-menu>` implements an accessible menu control with Material Design styling. The focused item
+is highlighted, and the selected item has bolded text.
+
+ <paper-menu>
+ <paper-item>Item 1</paper-item>
+ <paper-item>Item 2</paper-item>
+ </paper-menu>
+
+Make a multi-select menu with the `multi` attribute. Items in a multi-select menu can be deselected,
+and multiple item can be selected.
+
+ <paper-menu multi>
+ <paper-item>Item 1</paper-item>
+ <paper-item>Item 2</paper-item>
+ </paper-menu>
+
+### Styling
+
+The following custom properties and mixins are available for styling:
+
+Custom property | Description | Default
+----------------|-------------|----------
+`--paper-menu-background-color` | Menu background color | `--primary-background-color`
+`-paper-menu-color` | Menu foreground color | `--primary-text-color`
+`--paper-menu-disabled-color` | Foreground color for a disabled item | `--disabled-text-color`
+`--paper-menu` | Mixin applied to the menu | `{}`
+`--paper-menu-selected-item` | Mixin applied to the selected item | `{}`
+`--paper-menu-focused-item` | Mixin applied to the focused item | `{}`
+`--paper-menu-focused-item-after` | Mixin applied to the ::after pseudo-element for the focused item | `{}`
+
+### Accessibility
+
+`<paper-menu>` has `role="menu"` by default. A multi-select menu will also have
+`aria-multiselectable` set. It implements key bindings to navigate through the menu with the up and
+down arrow keys, esc to exit the menu, and enter to activate a menu item. Typing the first letter
+of a menu item will also focus it.
+
+@group Paper Elements
+@element paper-menu
+@hero hero.svg
+@demo demo/index.html
+-->
+
+<dom-module id="paper-menu">
+
+ <style>
+
+ :host {
+ display: block;
+ padding: 8px 0;
+
+ background: var(--paper-menu-background-color, --primary-background-color);
+ color: var(--paper-menu-color, --primary-text-color);
+
+ @apply(--paper-menu);
+ }
+
+ /* need a wrapper element to make this higher specificity than the :host rule in paper-item */
+ .content > ::content > .iron-selected {
+ font-weight: bold;
+
+ @apply(--paper-menu-selected-item);
+ }
+
+ .content > ::content > [disabled] {
+ color: var(--paper-menu-disabled-color, --disabled-text-color);
+ }
+
+ .content > ::content > *:focus {
+ position: relative;
+ outline: 0;
+
+ @apply(--paper-menu-colored-focused-item);
+ }
+
+ .content > ::content > *:focus:after {
+ @apply(--layout-fit);
+ background: currentColor;
+ /* FIXME move to paper-styles for next widget */
+ opacity: 0.12;
+ content: '';
+
+ @apply(--paper-menu-colored-focused-item-after);
+ }
+
+ .content > ::content > *[colored]:focus:after {
+ opacity: 0.26;
+ }
+
+ </style>
+
+ <template>
+
+ <div class="content">
+ <content></content>
+ </div>
+
+ </template>
+
+</dom-module>
+
+<script>
+
+(function() {
+
+ Polymer({
+
+ is: 'paper-menu',
+
+ behaviors: [
+ Polymer.IronMenuBehavior
+ ]
+
+ });
+
+})();
+
+</script>
diff --git a/static/bower_components/paper-menu/test/index.html b/static/bower_components/paper-menu/test/index.html
new file mode 100644
index 0000000..e6b26d5
--- /dev/null
+++ b/static/bower_components/paper-menu/test/index.html
@@ -0,0 +1,34 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+ <head>
+
+ <title>paper-menu tests</title>
+
+ <meta charset="utf-8">
+ <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="../../web-component-tester/browser.js"></script>
+
+ </head>
+ <body>
+
+ <script>
+
+ WCT.loadSuites([
+ 'paper-menu.html'
+ ]);
+
+ </script>
+
+ </body>
+</html>
diff --git a/static/bower_components/paper-menu/test/paper-menu.html b/static/bower_components/paper-menu/test/paper-menu.html
new file mode 100644
index 0000000..5856775
--- /dev/null
+++ b/static/bower_components/paper-menu/test/paper-menu.html
@@ -0,0 +1,67 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+ <head>
+
+ <title>paper-menu tests</title>
+
+ <meta charset="utf-8">
+ <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-lite.js"></script>
+
+ <script src="../../web-component-tester/browser.js"></script>
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
+
+ <link rel="import" href="../../test-fixture/test-fixture.html">
+ <link rel="import" href="../paper-menu.html">
+
+ </head>
+ <body>
+
+ <test-fixture id="basic">
+ <template>
+ <paper-menu>
+ <div>item 1</div>
+ <div>item 2</div>
+ <div>item 3</div>
+ </paper-menu>
+ </template>
+ </test-fixture>
+
+ <script>
+
+ suite('<paper-menu>', function() {
+ var menu;
+
+ setup(function() {
+ menu = fixture('basic');
+ });
+
+ test('selected item is styled', function() {
+
+ var boldDiv = document.createElement('div');
+ boldDiv.style.fontWeight = 'bold';
+ document.body.appendChild(boldDiv);
+
+ menu.selected = 1;
+
+ assert.equal(getComputedStyle(menu.selectedItem).fontWeight,
+ getComputedStyle(boldDiv).fontWeight, 'selected item is bold');
+ });
+
+ });
+
+ </script>
+
+ </body>
+</html>
diff --git a/static/bower_components/paper-ripple/.bower.json b/static/bower_components/paper-ripple/.bower.json
new file mode 100644
index 0000000..0cbf50c
--- /dev/null
+++ b/static/bower_components/paper-ripple/.bower.json
@@ -0,0 +1,39 @@
+{
+ "name": "paper-ripple",
+ "version": "1.0.1",
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "description": "Adds a material design ripple to any container",
+ "private": true,
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "keywords": [
+ "web-components",
+ "polymer",
+ "ripple"
+ ],
+ "main": "paper-ripple.html",
+ "dependencies": {
+ "polymer": "Polymer/polymer#^1.0.0",
+ "iron-a11y-keys-behavior": "polymerelements/iron-a11y-keys-behavior#^1.0.0"
+ },
+ "devDependencies": {
+ "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
+ "iron-icon": "polymerelements/iron-icon#^1.0.0",
+ "iron-icons": "polymerelements/iron-icons#^1.0.0",
+ "paper-styles": "polymerelements/paper-styles#^1.0.0",
+ "test-fixture": "polymerelements/test-fixture#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ },
+ "homepage": "https://github.com/polymerelements/paper-ripple",
+ "_release": "1.0.1",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.0.1",
+ "commit": "af19d904802437c305390bb03415c11661de3d0a"
+ },
+ "_source": "git://github.com/polymerelements/paper-ripple.git",
+ "_target": "^1.0.0",
+ "_originalSource": "polymerelements/paper-ripple"
+} \ No newline at end of file
diff --git a/static/bower_components/paper-ripple/.gitignore b/static/bower_components/paper-ripple/.gitignore
new file mode 100644
index 0000000..8d4ae25
--- /dev/null
+++ b/static/bower_components/paper-ripple/.gitignore
@@ -0,0 +1 @@
+bower_components
diff --git a/static/bower_components/paper-ripple/README.md b/static/bower_components/paper-ripple/README.md
new file mode 100644
index 0000000..b9bde23
--- /dev/null
+++ b/static/bower_components/paper-ripple/README.md
@@ -0,0 +1,65 @@
+paper-ripple
+============
+
+`paper-ripple` provides a visual effect that other paper elements can
+use to simulate a rippling effect emanating from the point of contact. The
+effect can be visualized as a concentric circle with motion.
+
+Example:
+
+```html
+<paper-ripple></paper-ripple>
+```
+
+`paper-ripple` listens to "mousedown" and "mouseup" events so it would display ripple
+effect when touches on it. You can also defeat the default behavior and
+manually route the down and up actions to the ripple element. Note that it is
+important if you call downAction() you will have to make sure to call
+upAction() so that `paper-ripple` would end the animation loop.
+
+Example:
+
+```html
+<paper-ripple id="ripple" style="pointer-events: none;"></paper-ripple>
+...
+<script>
+ downAction: function(e) {
+ this.$.ripple.downAction({x: e.x, y: e.y});
+ },
+ upAction: function(e) {
+ this.$.ripple.upAction();
+ }
+</script>
+```
+
+Styling ripple effect:
+
+Use CSS color property to style the ripple:
+
+```css
+paper-ripple {
+ color: #4285f4;
+}
+```
+
+Note that CSS color property is inherited so it is not required to set it on
+the `paper-ripple` element directly.
+
+
+By default, the ripple is centered on the point of contact. Apply the ``recenters`` attribute to have the ripple grow toward the center of its container.
+
+```html
+<paper-ripple recenters></paper-ripple>
+```
+
+Apply `center` to center the ripple inside its container from the start.
+
+```html
+<paper-ripple center></paper-ripple>
+```
+
+Apply `circle` class to make the rippling effect within a circle.
+
+```html
+<paper-ripple class="circle"></paper-ripple>
+```
diff --git a/static/bower_components/paper-ripple/bower.json b/static/bower_components/paper-ripple/bower.json
new file mode 100644
index 0000000..b9bb0d9
--- /dev/null
+++ b/static/bower_components/paper-ripple/bower.json
@@ -0,0 +1,29 @@
+{
+ "name": "paper-ripple",
+ "version": "1.0.1",
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "description": "Adds a material design ripple to any container",
+ "private": true,
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "keywords": [
+ "web-components",
+ "polymer",
+ "ripple"
+ ],
+ "main": "paper-ripple.html",
+ "dependencies": {
+ "polymer": "Polymer/polymer#^1.0.0",
+ "iron-a11y-keys-behavior": "polymerelements/iron-a11y-keys-behavior#^1.0.0"
+ },
+ "devDependencies": {
+ "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
+ "iron-icon": "polymerelements/iron-icon#^1.0.0",
+ "iron-icons": "polymerelements/iron-icons#^1.0.0",
+ "paper-styles": "polymerelements/paper-styles#^1.0.0",
+ "test-fixture": "polymerelements/test-fixture#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ }
+}
diff --git a/static/bower_components/paper-ripple/demo/index.html b/static/bower_components/paper-ripple/demo/index.html
new file mode 100644
index 0000000..365eb3e
--- /dev/null
+++ b/static/bower_components/paper-ripple/demo/index.html
@@ -0,0 +1,413 @@
+<!--
+@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
+-->
+<!doctype html>
+<html>
+<head>
+ <title>paper-ripple demo</title>
+
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
+ <meta name="mobile-web-app-capable" content="yes">
+ <meta name="apple-mobile-web-app-capable" content="yes">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+
+ <link rel="import" href="../../iron-icons/iron-icons.html">
+ <link rel="import" href="../paper-ripple.html">
+ <link rel="import" href="../../paper-styles/classes/typography.html">
+ <link rel="import" href="../../iron-icon/iron-icon.html">
+
+ <style>
+
+ body {
+ background-color: #f9f9f9;
+ font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial;
+ -webkit-tap-highlight-color: rgba(0,0,0,0);
+ -webkit-touch-callout: none;
+ }
+
+ section {
+ padding: 30px 25px;
+ }
+
+ section > * {
+ margin: 10px
+ }
+
+ /* Button */
+ .button {
+ display: inline-block;
+ position: relative;
+ width: 120px;
+ height: 32px;
+ line-height: 32px;
+ border-radius: 2px;
+ font-size: 0.9em;
+ background-color: #fff;
+ color: #646464;
+ }
+
+ .button > paper-ripple {
+ border-radius: 2px;
+ overflow: hidden;
+ }
+
+ .button.narrow {
+ width: 60px;
+ }
+
+ .button.grey {
+ background-color: #eee;
+ }
+
+ .button.blue {
+ background-color: #4285f4;
+ color: #fff;
+ }
+
+ .button.green {
+ background-color: #0f9d58;
+ color: #fff;
+ }
+
+ .button.raised {
+ transition: box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
+ transition-delay: 0.2s;
+ box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
+ }
+
+ .button.raised:active {
+ box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2);
+ transition-delay: 0s;
+ }
+
+ /* Icon Button */
+ .icon-button {
+ position: relative;
+ display: inline-block;
+ width: 56px;
+ height: 56px;
+ }
+
+ .icon-button > iron-icon {
+ margin: 16px;
+ transition: -webkit-transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
+ transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
+ }
+
+ .icon-button:hover > iron-icon {
+ -webkit-transform: scale(1.2);
+ transform: scale(1.2);
+ }
+
+ .icon-button > paper-ripple {
+ overflow: hidden;
+ color: #646464;
+ }
+
+ .icon-button.red > iron-icon::shadow path {
+ fill: #db4437;
+ }
+
+ .icon-button.red > paper-ripple {
+ color: #db4437;
+ }
+
+ .icon-button.blue > iron-icon::shadow path {
+ fill: #4285f4;
+ }
+
+ .icon-button.blue > paper-ripple {
+ color: #4285f4;
+ }
+
+ /* FAB */
+ .fab {
+ position: relative;
+ display: inline-block;
+ width: 56px;
+ height: 56px;
+ border-radius: 50%;
+ color: #fff;
+ overflow: hidden;
+ transition: box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
+ transition-delay: 0.2s;
+ box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
+ }
+
+ .fab.red {
+ background-color: #d23f31;
+ }
+
+ .fab.blue {
+ background-color: #4285f4;
+ }
+
+ .fab.green {
+ background-color: #0f9d58;
+ }
+
+ .fab:active {
+ box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2);
+ transition-delay: 0s;
+ }
+
+ .fab > iron-icon {
+ margin: 16px;
+ }
+
+ .fab > iron-icon::shadow path {
+ fill: #fff;
+ }
+
+ /* Menu */
+ .menu {
+ display: inline-block;
+ width: 180px;
+ background-color: #fff;
+ box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2);
+ }
+
+ .item {
+ position: relative;
+ height: 48px;
+ line-height: 48px;
+ color: #646464;
+ font-size: 0.9em;
+ }
+
+ .menu.blue > .item {
+ color: #4285f4;
+ }
+
+ /* Card, Dialog */
+ .card, .dialog {
+ position: relative;
+ display: inline-block;
+ width: 300px;
+ height: 240px;
+ vertical-align: top;
+ background-color: #fff;
+ box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.24);
+ }
+
+ .dialog {
+ box-sizing: border-box;
+ padding: 16px;
+ }
+
+ .dialog > .content {
+ height: 170px;
+ font-size: 0.9em;
+ }
+
+ .dialog > .content > .title {
+ font-size: 1.3em;
+ }
+
+ .dialog > .button {
+ width: 90px;
+ float: right;
+ }
+
+ .card.image {
+ background: url(http://lorempixel.com/300/240/nature/);
+ color: #fff;
+ }
+
+ /* Misc */
+ .center {
+ text-align: center;
+ }
+
+ .label {
+ padding: 0 16px;
+ }
+
+ .label-blue {
+ color: #4285f4;
+ }
+
+ .label-red {
+ color: #d23f31;
+ }
+
+ </style>
+
+</head>
+<body>
+
+ <section>
+
+ <div class="button raised">
+ <div class="center" fit>SUBMIT</div>
+ <paper-ripple></paper-ripple>
+ </div>
+
+ <div class="button raised grey">
+ <div class="center" fit>CANCEL</div>
+ <paper-ripple></paper-ripple>
+ </div>
+
+ <div class="button raised blue">
+ <div class="center" fit>COMPOSE</div>
+ <paper-ripple></paper-ripple>
+ </div>
+
+ <div class="button raised green">
+ <div class="center" fit>OK</div>
+ <paper-ripple></paper-ripple>
+ </div>
+
+ </section>
+
+ <section>
+
+ <div class="button raised grey narrow">
+ <div class="center" fit>+1</div>
+ <paper-ripple></paper-ripple>
+ </div>
+
+ <div class="button raised grey narrow label-blue">
+ <div class="center" fit>+1</div>
+ <paper-ripple></paper-ripple>
+ </div>
+
+ <div class="button raised grey narrow label-red">
+ <div class="center" fit>+1</div>
+ <paper-ripple></paper-ripple>
+ </div>
+
+ </section>
+
+ <section>
+
+ <div class="icon-button">
+ <iron-icon icon="menu"></iron-icon>
+ <paper-ripple class="circle" recenters></paper-ripple>
+ </div>
+
+ <div class="icon-button">
+ <iron-icon icon="more-vert"></iron-icon>
+ <paper-ripple class="circle" recenters></paper-ripple>
+ </div>
+
+ <div class="icon-button red">
+ <iron-icon icon="delete"></iron-icon>
+ <paper-ripple class="circle" recenters></paper-ripple>
+ </div>
+
+ <div class="icon-button blue">
+ <iron-icon icon="account-box"></iron-icon>
+ <paper-ripple class="circle" recenters></paper-ripple>
+ </div>
+
+ </section>
+
+ <section>
+
+ <div class="fab red">
+ <iron-icon icon="add"></iron-icon>
+ <paper-ripple class="circle" recenters></paper-ripple>
+ </div>
+
+ <div class="fab blue">
+ <iron-icon icon="mail"></iron-icon>
+ <paper-ripple class="circle" recenters></paper-ripple>
+ </div>
+
+ <div class="fab green">
+ <iron-icon icon="create"></iron-icon>
+ <paper-ripple class="circle" recenters></paper-ripple>
+ </div>
+
+ </section>
+
+ <section>
+
+ <div class="menu">
+
+ <div class="item">
+ <div class="label" fit>Mark as unread</div>
+ <paper-ripple></paper-ripple>
+ </div>
+ <div class="item">
+ <div class="label" fit>Mark as important</div>
+ <paper-ripple></paper-ripple>
+ </div>
+ <div class="item">
+ <div class="label" fit>Add to Tasks</div>
+ <paper-ripple></paper-ripple>
+ </div>
+ <div class="item">
+ <div class="label" fit>Create event</div>
+ <paper-ripple></paper-ripple>
+ </div>
+
+ </div>
+
+ <div class="menu blue">
+
+ <div class="item">
+ <div class="label" fit>Import</div>
+ <paper-ripple></paper-ripple>
+ </div>
+ <div class="item">
+ <div class="label" fit>Export</div>
+ <paper-ripple></paper-ripple>
+ </div>
+ <div class="item">
+ <div class="label" fit>Print</div>
+ <paper-ripple></paper-ripple>
+ </div>
+ <div class="item">
+ <div class="label" fit>Restore contacts</div>
+ <paper-ripple></paper-ripple>
+ </div>
+
+ </div>
+
+ </section>
+
+ <section>
+
+ <div class="dialog">
+
+ <div class="content">
+ <div class="title">Permission</div><br>
+ <div>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.</div>
+ </div>
+
+ <div class="button label-blue">
+ <div class="center" fit>ACCEPT</div>
+ <paper-ripple></paper-ripple>
+ </div>
+
+ <div class="button">
+ <div class="center" fit>DECLINE</div>
+ <paper-ripple></paper-ripple>
+ </div>
+
+ </div>
+
+ <div class="card">
+ <paper-ripple recenters></paper-ripple>
+ </div>
+
+ <div class="card image">
+
+ <paper-ripple recenters></paper-ripple>
+
+ </div>
+
+ </section>
+
+</body>
+</html>
+
diff --git a/static/bower_components/paper-ripple/hero.svg b/static/bower_components/paper-ripple/hero.svg
new file mode 100644
index 0000000..96f0b4c
--- /dev/null
+++ b/static/bower_components/paper-ripple/hero.svg
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
+<g id="background" display="none">
+ <rect display="inline" fill="#B0BEC5" width="225" height="126"/>
+</g>
+<g id="label">
+</g>
+<g id="art">
+ <path d="M175,81H49V45h126V81z M51,79h122V47H51V79z"/>
+ <g>
+ <defs>
+ <rect id="SVGID_5_" x="50" y="46" width="124" height="34"/>
+ </defs>
+ <clipPath id="SVGID_2_">
+ <use xlink:href="#SVGID_5_" overflow="visible"/>
+ </clipPath>
+ <circle opacity="0.5" clip-path="url(#SVGID_2_)" cx="84.4" cy="62.7" r="41.9"/>
+ <circle opacity="0.6" clip-path="url(#SVGID_2_)" cx="84.4" cy="62.7" r="26.3"/>
+ <circle opacity="0.6" clip-path="url(#SVGID_2_)" cx="66.4" cy="62.7" r="26.3"/>
+ </g>
+ <circle cx="50" cy="80" r="4"/>
+ <g id="ic_x5F_add_x0D_">
+ </g>
+</g>
+<g id="Guides">
+</g>
+</svg>
diff --git a/static/bower_components/paper-ripple/index.html b/static/bower_components/paper-ripple/index.html
new file mode 100644
index 0000000..3c371fa
--- /dev/null
+++ b/static/bower_components/paper-ripple/index.html
@@ -0,0 +1,27 @@
+<!doctype html>
+<!--
+@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
+The complete set of authors may be found at http://polymer.github.io/AUTHORS
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
+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
+-->
+<html>
+<head>
+
+ <title>paper-ripple</title>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
+
+ <script src="../webcomponentsjs/webcomponents-lite.js"></script>
+ <link rel="import" href="../iron-component-page/iron-component-page.html">
+
+</head>
+<body>
+
+ <iron-component-page></iron-component-page>
+
+</body>
+</html>
diff --git a/static/bower_components/paper-ripple/paper-ripple.html b/static/bower_components/paper-ripple/paper-ripple.html
new file mode 100644
index 0000000..08d3da1
--- /dev/null
+++ b/static/bower_components/paper-ripple/paper-ripple.html
@@ -0,0 +1,716 @@
+<!--
+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/polymer.html">
+<link rel="import" href="../iron-a11y-keys-behavior/iron-a11y-keys-behavior.html">
+
+<!--
+`paper-ripple` provides a visual effect that other paper elements can
+use to simulate a rippling effect emanating from the point of contact. The
+effect can be visualized as a concentric circle with motion.
+
+Example:
+
+ <paper-ripple></paper-ripple>
+
+`paper-ripple` listens to "mousedown" and "mouseup" events so it would display ripple
+effect when touches on it. You can also defeat the default behavior and
+manually route the down and up actions to the ripple element. Note that it is
+important if you call downAction() you will have to make sure to call
+upAction() so that `paper-ripple` would end the animation loop.
+
+Example:
+
+ <paper-ripple id="ripple" style="pointer-events: none;"></paper-ripple>
+ ...
+ downAction: function(e) {
+ this.$.ripple.downAction({x: e.x, y: e.y});
+ },
+ upAction: function(e) {
+ this.$.ripple.upAction();
+ }
+
+Styling ripple effect:
+
+ Use CSS color property to style the ripple:
+
+ paper-ripple {
+ color: #4285f4;
+ }
+
+ Note that CSS color property is inherited so it is not required to set it on
+ the `paper-ripple` element directly.
+
+By default, the ripple is centered on the point of contact. Apply the `recenters`
+attribute to have the ripple grow toward the center of its container.
+
+ <paper-ripple recenters></paper-ripple>
+
+You can also center the ripple inside its container from the start.
+
+ <paper-ripple center></paper-ripple>
+
+Apply `circle` class to make the rippling effect within a circle.
+
+ <paper-ripple class="circle"></paper-ripple>
+
+@group Paper Elements
+@element paper-ripple
+@hero hero.svg
+@demo demo/index.html
+-->
+
+<dom-module id="paper-ripple">
+
+ <!--
+ Fired when the animation finishes. This is useful if you want to wait until the ripple
+ animation finishes to perform some action.
+
+ @event transitionend
+ @param {Object} detail
+ @param {Object} detail.node The animated node
+ -->
+
+ <style>
+ :host {
+ display: block;
+ position: absolute;
+ border-radius: inherit;
+ overflow: hidden;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ }
+
+ :host([animating]) {
+ /* This resolves a rendering issue in Chrome (as of 40) where the
+ ripple is not properly clipped by its parent (which may have
+ rounded corners). See: http://jsbin.com/temexa/4
+
+ Note: We only apply this style conditionally. Otherwise, the browser
+ will create a new compositing layer for every ripple element on the
+ page, and that would be bad. */
+ -webkit-transform: translate(0, 0);
+ transform: translate3d(0, 0, 0);
+ }
+
+ :host([noink]) {
+ pointer-events: none;
+ }
+
+ #background,
+ #waves,
+ .wave-container,
+ .wave {
+ pointer-events: none;
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ }
+
+ #background,
+ .wave {
+ opacity: 0;
+ }
+
+ #waves,
+ .wave {
+ overflow: hidden;
+ }
+
+ .wave-container,
+ .wave {
+ border-radius: 50%;
+ }
+
+ :host(.circle) #background,
+ :host(.circle) #waves {
+ border-radius: 50%;
+ }
+
+ :host(.circle) .wave-container {
+ overflow: hidden;
+ }
+
+ </style>
+ <template>
+ <div id="background"></div>
+ <div id="waves"></div>
+ </template>
+</dom-module>
+<script>
+ (function() {
+ var Utility = {
+ cssColorWithAlpha: function(cssColor, alpha) {
+ var parts = cssColor.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
+
+ if (typeof alpha == 'undefined') {
+ alpha = 1;
+ }
+
+ if (!parts) {
+ return 'rgba(255, 255, 255, ' + alpha + ')';
+ }
+
+ return 'rgba(' + parts[1] + ', ' + parts[2] + ', ' + parts[3] + ', ' + alpha + ')';
+ },
+
+ distance: function(x1, y1, x2, y2) {
+ var xDelta = (x1 - x2);
+ var yDelta = (y1 - y2);
+
+ return Math.sqrt(xDelta * xDelta + yDelta * yDelta);
+ },
+
+ now: (function() {
+ if (window.performance && window.performance.now) {
+ return window.performance.now.bind(window.performance);
+ }
+
+ return Date.now;
+ })()
+ };
+
+ /**
+ * @param {HTMLElement} element
+ * @constructor
+ */
+ function ElementMetrics(element) {
+ this.element = element;
+ this.width = this.boundingRect.width;
+ this.height = this.boundingRect.height;
+
+ this.size = Math.max(this.width, this.height);
+ }
+
+ ElementMetrics.prototype = {
+ get boundingRect () {
+ return this.element.getBoundingClientRect();
+ },
+
+ furthestCornerDistanceFrom: function(x, y) {
+ var topLeft = Utility.distance(x, y, 0, 0);
+ var topRight = Utility.distance(x, y, this.width, 0);
+ var bottomLeft = Utility.distance(x, y, 0, this.height);
+ var bottomRight = Utility.distance(x, y, this.width, this.height);
+
+ return Math.max(topLeft, topRight, bottomLeft, bottomRight);
+ }
+ };
+
+ /**
+ * @param {HTMLElement} element
+ * @constructor
+ */
+ function Ripple(element) {
+ this.element = element;
+ this.color = window.getComputedStyle(element).color;
+
+ this.wave = document.createElement('div');
+ this.waveContainer = document.createElement('div');
+ this.wave.style.backgroundColor = this.color;
+ this.wave.classList.add('wave');
+ this.waveContainer.classList.add('wave-container');
+ Polymer.dom(this.waveContainer).appendChild(this.wave);
+
+ this.resetInteractionState();
+ }
+
+ Ripple.MAX_RADIUS = 300;
+
+ Ripple.prototype = {
+ get recenters() {
+ return this.element.recenters;
+ },
+
+ get center() {
+ return this.element.center;
+ },
+
+ get mouseDownElapsed() {
+ var elapsed;
+
+ if (!this.mouseDownStart) {
+ return 0;
+ }
+
+ elapsed = Utility.now() - this.mouseDownStart;
+
+ if (this.mouseUpStart) {
+ elapsed -= this.mouseUpElapsed;
+ }
+
+ return elapsed;
+ },
+
+ get mouseUpElapsed() {
+ return this.mouseUpStart ?
+ Utility.now () - this.mouseUpStart : 0;
+ },
+
+ get mouseDownElapsedSeconds() {
+ return this.mouseDownElapsed / 1000;
+ },
+
+ get mouseUpElapsedSeconds() {
+ return this.mouseUpElapsed / 1000;
+ },
+
+ get mouseInteractionSeconds() {
+ return this.mouseDownElapsedSeconds + this.mouseUpElapsedSeconds;
+ },
+
+ get initialOpacity() {
+ return this.element.initialOpacity;
+ },
+
+ get opacityDecayVelocity() {
+ return this.element.opacityDecayVelocity;
+ },
+
+ get radius() {
+ var width2 = this.containerMetrics.width * this.containerMetrics.width;
+ var height2 = this.containerMetrics.height * this.containerMetrics.height;
+ var waveRadius = Math.min(
+ Math.sqrt(width2 + height2),
+ Ripple.MAX_RADIUS
+ ) * 1.1 + 5;
+
+ var duration = 1.1 - 0.2 * (waveRadius / Ripple.MAX_RADIUS);
+ var timeNow = this.mouseInteractionSeconds / duration;
+ var size = waveRadius * (1 - Math.pow(80, -timeNow));
+
+ return Math.abs(size);
+ },
+
+ get opacity() {
+ if (!this.mouseUpStart) {
+ return this.initialOpacity;
+ }
+
+ return Math.max(
+ 0,
+ this.initialOpacity - this.mouseUpElapsedSeconds * this.opacityDecayVelocity
+ );
+ },
+
+ get outerOpacity() {
+ // Linear increase in background opacity, capped at the opacity
+ // of the wavefront (waveOpacity).
+ var outerOpacity = this.mouseUpElapsedSeconds * 0.3;
+ var waveOpacity = this.opacity;
+
+ return Math.max(
+ 0,
+ Math.min(outerOpacity, waveOpacity)
+ );
+ },
+
+ get isOpacityFullyDecayed() {
+ return this.opacity < 0.01 &&
+ this.radius >= Math.min(this.maxRadius, Ripple.MAX_RADIUS);
+ },
+
+ get isRestingAtMaxRadius() {
+ return this.opacity >= this.initialOpacity &&
+ this.radius >= Math.min(this.maxRadius, Ripple.MAX_RADIUS);
+ },
+
+ get isAnimationComplete() {
+ return this.mouseUpStart ?
+ this.isOpacityFullyDecayed : this.isRestingAtMaxRadius;
+ },
+
+ get translationFraction() {
+ return Math.min(
+ 1,
+ this.radius / this.containerMetrics.size * 2 / Math.sqrt(2)
+ );
+ },
+
+ get xNow() {
+ if (this.xEnd) {
+ return this.xStart + this.translationFraction * (this.xEnd - this.xStart);
+ }
+
+ return this.xStart;
+ },
+
+ get yNow() {
+ if (this.yEnd) {
+ return this.yStart + this.translationFraction * (this.yEnd - this.yStart);
+ }
+
+ return this.yStart;
+ },
+
+ get isMouseDown() {
+ return this.mouseDownStart && !this.mouseUpStart;
+ },
+
+ resetInteractionState: function() {
+ this.maxRadius = 0;
+ this.mouseDownStart = 0;
+ this.mouseUpStart = 0;
+
+ this.xStart = 0;
+ this.yStart = 0;
+ this.xEnd = 0;
+ this.yEnd = 0;
+ this.slideDistance = 0;
+
+ this.containerMetrics = new ElementMetrics(this.element);
+ },
+
+ draw: function() {
+ var scale;
+ var translateString;
+ var dx;
+ var dy;
+
+ this.wave.style.opacity = this.opacity;
+
+ scale = this.radius / (this.containerMetrics.size / 2);
+ dx = this.xNow - (this.containerMetrics.width / 2);
+ dy = this.yNow - (this.containerMetrics.height / 2);
+
+
+ // 2d transform for safari because of border-radius and overflow:hidden clipping bug.
+ // https://bugs.webkit.org/show_bug.cgi?id=98538
+ this.waveContainer.style.webkitTransform = 'translate(' + dx + 'px, ' + dy + 'px)';
+ this.waveContainer.style.transform = 'translate3d(' + dx + 'px, ' + dy + 'px, 0)';
+ this.wave.style.webkitTransform = 'scale(' + scale + ',' + scale + ')';
+ this.wave.style.transform = 'scale3d(' + scale + ',' + scale + ',1)';
+ },
+
+ /** @param {Event=} event */
+ downAction: function(event) {
+ var xCenter = this.containerMetrics.width / 2;
+ var yCenter = this.containerMetrics.height / 2;
+
+ this.resetInteractionState();
+ this.mouseDownStart = Utility.now();
+
+ if (this.center) {
+ this.xStart = xCenter;
+ this.yStart = yCenter;
+ this.slideDistance = Utility.distance(
+ this.xStart, this.yStart, this.xEnd, this.yEnd
+ );
+ } else {
+ this.xStart = event ?
+ event.detail.x - this.containerMetrics.boundingRect.left :
+ this.containerMetrics.width / 2;
+ this.yStart = event ?
+ event.detail.y - this.containerMetrics.boundingRect.top :
+ this.containerMetrics.height / 2;
+ }
+
+ if (this.recenters) {
+ this.xEnd = xCenter;
+ this.yEnd = yCenter;
+ this.slideDistance = Utility.distance(
+ this.xStart, this.yStart, this.xEnd, this.yEnd
+ );
+ }
+
+ this.maxRadius = this.containerMetrics.furthestCornerDistanceFrom(
+ this.xStart,
+ this.yStart
+ );
+
+ this.waveContainer.style.top =
+ (this.containerMetrics.height - this.containerMetrics.size) / 2 + 'px';
+ this.waveContainer.style.left =
+ (this.containerMetrics.width - this.containerMetrics.size) / 2 + 'px';
+
+ this.waveContainer.style.width = this.containerMetrics.size + 'px';
+ this.waveContainer.style.height = this.containerMetrics.size + 'px';
+ },
+
+ /** @param {Event=} event */
+ upAction: function(event) {
+ if (!this.isMouseDown) {
+ return;
+ }
+
+ this.mouseUpStart = Utility.now();
+ },
+
+ remove: function() {
+ Polymer.dom(this.waveContainer.parentNode).removeChild(
+ this.waveContainer
+ );
+ }
+ };
+
+ Polymer({
+ is: 'paper-ripple',
+
+ behaviors: [
+ Polymer.IronA11yKeysBehavior
+ ],
+
+ properties: {
+ /**
+ * The initial opacity set on the wave.
+ *
+ * @attribute initialOpacity
+ * @type number
+ * @default 0.25
+ */
+ initialOpacity: {
+ type: Number,
+ value: 0.25
+ },
+
+ /**
+ * How fast (opacity per second) the wave fades out.
+ *
+ * @attribute opacityDecayVelocity
+ * @type number
+ * @default 0.8
+ */
+ opacityDecayVelocity: {
+ type: Number,
+ value: 0.8
+ },
+
+ /**
+ * If true, ripples will exhibit a gravitational pull towards
+ * the center of their container as they fade away.
+ *
+ * @attribute recenters
+ * @type boolean
+ * @default false
+ */
+ recenters: {
+ type: Boolean,
+ value: false
+ },
+
+ /**
+ * If true, ripples will center inside its container
+ *
+ * @attribute recenters
+ * @type boolean
+ * @default false
+ */
+ center: {
+ type: Boolean,
+ value: false
+ },
+
+ /**
+ * A list of the visual ripples.
+ *
+ * @attribute ripples
+ * @type Array
+ * @default []
+ */
+ ripples: {
+ type: Array,
+ value: function() {
+ return [];
+ }
+ },
+
+ /**
+ * True when there are visible ripples animating within the
+ * element.
+ */
+ animating: {
+ type: Boolean,
+ readOnly: true,
+ reflectToAttribute: true,
+ value: false
+ },
+
+ /**
+ * If true, the ripple will remain in the "down" state until `holdDown`
+ * is set to false again.
+ */
+ holdDown: {
+ type: Boolean,
+ value: false,
+ observer: '_holdDownChanged'
+ },
+
+ _animating: {
+ type: Boolean
+ },
+
+ _boundAnimate: {
+ type: Function,
+ value: function() {
+ return this.animate.bind(this);
+ }
+ }
+ },
+
+ get target () {
+ var ownerRoot = Polymer.dom(this).getOwnerRoot();
+ var target;
+
+ if (this.parentNode.nodeType == 11) { // DOCUMENT_FRAGMENT_NODE
+ target = ownerRoot.host;
+ } else {
+ target = this.parentNode;
+ }
+
+ return target;
+ },
+
+ keyBindings: {
+ 'enter:keydown': '_onEnterKeydown',
+ 'space:keydown': '_onSpaceKeydown',
+ 'space:keyup': '_onSpaceKeyup'
+ },
+
+ attached: function() {
+ this.listen(this.target, 'up', 'upAction');
+ this.listen(this.target, 'down', 'downAction');
+
+ if (!this.target.hasAttribute('noink')) {
+ this.keyEventTarget = this.target;
+ }
+ },
+
+ get shouldKeepAnimating () {
+ for (var index = 0; index < this.ripples.length; ++index) {
+ if (!this.ripples[index].isAnimationComplete) {
+ return true;
+ }
+ }
+
+ return false;
+ },
+
+ simulatedRipple: function() {
+ this.downAction(null);
+
+ // Please see polymer/polymer#1305
+ this.async(function() {
+ this.upAction();
+ }, 1);
+ },
+
+ /** @param {Event=} event */
+ downAction: function(event) {
+ if (this.holdDown && this.ripples.length > 0) {
+ return;
+ }
+
+ var ripple = this.addRipple();
+
+ ripple.downAction(event);
+
+ if (!this._animating) {
+ this.animate();
+ }
+ },
+
+ /** @param {Event=} event */
+ upAction: function(event) {
+ if (this.holdDown) {
+ return;
+ }
+
+ this.ripples.forEach(function(ripple) {
+ ripple.upAction(event);
+ });
+
+ this.animate();
+ },
+
+ onAnimationComplete: function() {
+ this._animating = false;
+ this.$.background.style.backgroundColor = null;
+ this.fire('transitionend');
+ },
+
+ addRipple: function() {
+ var ripple = new Ripple(this);
+
+ Polymer.dom(this.$.waves).appendChild(ripple.waveContainer);
+ this.$.background.style.backgroundColor = ripple.color;
+ this.ripples.push(ripple);
+
+ this._setAnimating(true);
+
+ return ripple;
+ },
+
+ removeRipple: function(ripple) {
+ var rippleIndex = this.ripples.indexOf(ripple);
+
+ if (rippleIndex < 0) {
+ return;
+ }
+
+ this.ripples.splice(rippleIndex, 1);
+
+ ripple.remove();
+
+ if (!this.ripples.length) {
+ this._setAnimating(false);
+ }
+ },
+
+ animate: function() {
+ var index;
+ var ripple;
+
+ this._animating = true;
+
+ for (index = 0; index < this.ripples.length; ++index) {
+ ripple = this.ripples[index];
+
+ ripple.draw();
+
+ this.$.background.style.opacity = ripple.outerOpacity;
+
+ if (ripple.isOpacityFullyDecayed && !ripple.isRestingAtMaxRadius) {
+ this.removeRipple(ripple);
+ }
+ }
+
+ if (!this.shouldKeepAnimating && this.ripples.length === 0) {
+ this.onAnimationComplete();
+ } else {
+ window.requestAnimationFrame(this._boundAnimate);
+ }
+ },
+
+ _onEnterKeydown: function() {
+ this.downAction();
+ this.async(this.upAction, 1);
+ },
+
+ _onSpaceKeydown: function() {
+ this.downAction();
+ },
+
+ _onSpaceKeyup: function() {
+ this.upAction();
+ },
+
+ _holdDownChanged: function(holdDown) {
+ if (holdDown) {
+ this.downAction();
+ } else {
+ this.upAction();
+ }
+ }
+ });
+ })();
+</script>
diff --git a/static/bower_components/paper-ripple/test/index.html b/static/bower_components/paper-ripple/test/index.html
new file mode 100644
index 0000000..48197c0
--- /dev/null
+++ b/static/bower_components/paper-ripple/test/index.html
@@ -0,0 +1,25 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
+ <title>Tests</title>
+ <script src="../../web-component-tester/browser.js"></script>
+</head>
+<body>
+ <script>
+ WCT.loadSuites([
+ 'paper-ripple.html'
+ ]);
+ </script>
+</body>
+</html>
diff --git a/static/bower_components/paper-ripple/test/paper-ripple.html b/static/bower_components/paper-ripple/test/paper-ripple.html
new file mode 100644
index 0000000..8123206
--- /dev/null
+++ b/static/bower_components/paper-ripple/test/paper-ripple.html
@@ -0,0 +1,166 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+
+ <meta charset="UTF-8">
+ <title>paper-ripple</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
+
+ <link rel="import" href="../../test-fixture/test-fixture.html">
+ <link rel="import" href="../paper-ripple.html">
+
+ <style>
+ #RippleContainer {
+ display: block;
+ position: relative;
+ width: 100px;
+ height: 50px;
+ }
+ </style>
+</head>
+<body>
+ <test-fixture id="TrivialRipple">
+ <template>
+ <div id="RippleContainer">
+ <paper-ripple></paper-ripple>
+ </div>
+ </template>
+ </test-fixture>
+
+ <test-fixture id="CenteringRipple">
+ <template>
+ <div id="RippleContainer">
+ <paper-ripple center></paper-ripple>
+ </div>
+ </template>
+ </test-fixture>
+
+ <test-fixture id="RecenteringRipple">
+ <template>
+ <div id="RippleContainer">
+ <paper-ripple recenters></paper-ripple>
+ </div>
+ </template>
+ </test-fixture>
+
+ <script>
+ function FakeMouseEvent (target, relativeX, relativeX) {
+ var rect = target.getBoundingClientRect();
+
+ return {
+ detail: {
+ x: rect.left + relativeX,
+ y: rect.top + relativeX
+ }
+ };
+ }
+
+ suite('<paper-ripple>', function () {
+ var mouseEvent;
+ var rippleContainer;
+ var ripple;
+
+ suite('when tapped', function () {
+ setup(function () {
+ rippleContainer = fixture('TrivialRipple');
+ ripple = rippleContainer.firstElementChild;
+
+ mouseEvent = new FakeMouseEvent(ripple, 10, 10);
+ });
+
+ test('creates a ripple', function () {
+ expect(ripple.ripples.length).to.be.eql(0);
+ ripple.downAction(mouseEvent);
+ expect(ripple.ripples.length).to.be.eql(1);
+ });
+
+ test('may create multiple ripples that overlap', function () {
+ expect(ripple.ripples.length).to.be.eql(0);
+
+ for (var i = 0; i < 3; ++i) {
+ ripple.downAction(mouseEvent);
+ expect(ripple.ripples.length).to.be.eql(i + 1);
+ }
+ });
+ });
+
+ suite('with the `center` attribute set to true', function () {
+ setup(function () {
+ rippleContainer = fixture('CenteringRipple');
+ ripple = rippleContainer.firstElementChild;
+
+ mouseEvent = new FakeMouseEvent(ripple, 10, 10);
+ });
+
+ test('ripples will center', function (done) {
+ var waveContainerElement;
+ // let's ask the browser what `translate3d(0px, 0px, 0)` will actually look like
+ var div = document.createElement('div');
+ div.style.webkitTransform = 'translate3d(0px, 0px, 0px)';
+ div.style.transform = 'translate3d(0px, 0px, 0)';
+
+ ripple.downAction(mouseEvent);
+
+ waveContainerElement = ripple.ripples[0].waveContainer;
+
+ ripple.upAction(mouseEvent);
+
+ window.requestAnimationFrame(function () {
+ var currentTransform = waveContainerElement.style.transform;
+ try {
+ expect(div.style.transform).to.be.ok;
+ expect(currentTransform).to.be.ok;
+ expect(currentTransform).to.be.eql(div.style.transform);
+
+ done();
+ } catch (e) {
+ done(e);
+ }
+ });
+ });
+ });
+
+ suite('with the `recenters` attribute set to true', function () {
+ setup(function () {
+ rippleContainer = fixture('RecenteringRipple');
+ ripple = rippleContainer.firstElementChild;
+ mouseEvent = new FakeMouseEvent(ripple, 10, 10);
+ });
+ test('ripples will gravitate towards the center', function (done) {
+ var waveContainerElement;
+ var waveTranslateString;
+ ripple.downAction(mouseEvent);
+ waveContainerElement = ripple.ripples[0].waveContainer;
+ waveTranslateString = waveContainerElement.style.transform;
+ ripple.upAction(mouseEvent);
+ window.requestAnimationFrame(function () {
+ try {
+ expect(waveTranslateString).to.be.ok;
+ expect(waveContainerElement.style.transform).to.be.ok;
+ expect(waveContainerElement.style.transform).to.not.be.eql(waveTranslateString);
+ done();
+ } catch (e) {
+ done(e);
+ }
+ });
+ });
+ });
+
+ });
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/paper-scroll-header-panel/.bower.json b/static/bower_components/paper-scroll-header-panel/.bower.json
new file mode 100644
index 0000000..422d641
--- /dev/null
+++ b/static/bower_components/paper-scroll-header-panel/.bower.json
@@ -0,0 +1,48 @@
+{
+ "name": "paper-scroll-header-panel",
+ "description": "A header bar with scrolling behavior",
+ "version": "1.0.4",
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "private": true,
+ "authors": "The Polymer Authors",
+ "keywords": [
+ "web-components",
+ "polymer",
+ "layout",
+ "responsive"
+ ],
+ "main": [
+ "paper-scroll-header-panel.html"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/paper-scroll-header-panel.git"
+ },
+ "dependencies": {
+ "polymer": "Polymer/polymer#^1.0.0",
+ "paper-toolbar": "PolymerElements/paper-toolbar#^1.0.0",
+ "iron-resizable-behavior": "PolymerElements/iron-resizable-behavior#^1.0.0"
+ },
+ "devDependencies": {
+ "paper-styles": "PolymerElements/paper-styles#^1.0.0",
+ "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
+ "iron-media-query": "PolymerElements/iron-media-query#^1.0.0",
+ "iron-icons": "PolymerElements/iron-icons#^1.0.0",
+ "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0",
+ "paper-input": "PolymerElements/paper-input#^1.0.0",
+ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
+ "test-fixture": "PolymerElements/test-fixture#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ },
+ "homepage": "https://github.com/PolymerElements/paper-scroll-header-panel",
+ "_release": "1.0.4",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.0.4",
+ "commit": "13f17709ce666adf2ab25161bc180816c53e7583"
+ },
+ "_source": "git://github.com/PolymerElements/paper-scroll-header-panel.git",
+ "_target": "^1.0.0",
+ "_originalSource": "PolymerElements/paper-scroll-header-panel"
+} \ No newline at end of file
diff --git a/static/bower_components/paper-scroll-header-panel/.gitignore b/static/bower_components/paper-scroll-header-panel/.gitignore
new file mode 100644
index 0000000..8d4ae25
--- /dev/null
+++ b/static/bower_components/paper-scroll-header-panel/.gitignore
@@ -0,0 +1 @@
+bower_components
diff --git a/static/bower_components/paper-scroll-header-panel/README.md b/static/bower_components/paper-scroll-header-panel/README.md
new file mode 100644
index 0000000..78f6376
--- /dev/null
+++ b/static/bower_components/paper-scroll-header-panel/README.md
@@ -0,0 +1,56 @@
+paper-scroll-header-panel
+========================
+
+`paper-scroll-header-panel` contains a header section and a content section. The header is initially on the top part of the view but it scrolls away with the rest of the scrollable content. Upon scrolling slightly up at any point, the header scrolls back into view. This saves screen space and allows users to access important controls by easily moving them back to the view.
+
+Important: The `paper-scroll-header-panel` will not display if its parent does not have a height. Using layout classes, you can easily make the `paper-scroll-header-panel` fill the screen
+
+```html
+<body class="fullbleed layout vertical">
+ <paper-scroll-header-panel class="flex">
+ <paper-toolbar>
+ Hello World!
+ </paper-toolbar>
+ </paper-scroll-header-panel>
+</body>
+```
+or, if you would prefer to do it in CSS, just give html, body, and `paper-scroll-header-panel` a height of 100%:
+```css
+html, body {
+ height: 100%;
+ margin: 0;
+}
+paper-scroll-header-panel {
+ height: 100%;
+}
+```
+`paper-scroll-header-panel` works well with `paper-toolbar` but can use any element that represents a header by adding a `paper-header` class to it.
+
+```html
+<paper-scroll-header-panel>
+ <paper-toolbar>Header</paper-toolbar>
+ <div>Content goes here...</div>
+</paper-scroll-header-panel>
+```
+
+### Styling scroll-header-panel:
+
+To change background for toolbar when it is at its full size:
+
+```css
+paper-scroll-header-panel {
+ --paper-scroll-header-panel-full-header: {
+ background-color: red;
+ };
+}
+```
+
+To change the background for toolbar when it is condensed:
+
+```css
+paper-scroll-header-panel {
+ --paper-scroll-header-panel-condensed-header: {
+ background-color: #f4b400;
+ };
+}
+```
diff --git a/static/bower_components/paper-scroll-header-panel/bower.json b/static/bower_components/paper-scroll-header-panel/bower.json
new file mode 100644
index 0000000..007cc44
--- /dev/null
+++ b/static/bower_components/paper-scroll-header-panel/bower.json
@@ -0,0 +1,38 @@
+{
+ "name": "paper-scroll-header-panel",
+ "description": "A header bar with scrolling behavior",
+ "version": "1.0.4",
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "private": true,
+ "authors": "The Polymer Authors",
+ "keywords": [
+ "web-components",
+ "polymer",
+ "layout",
+ "responsive"
+ ],
+ "main": [
+ "paper-scroll-header-panel.html"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/paper-scroll-header-panel.git"
+ },
+ "dependencies": {
+ "polymer": "Polymer/polymer#^1.0.0",
+ "paper-toolbar": "PolymerElements/paper-toolbar#^1.0.0",
+ "iron-resizable-behavior": "PolymerElements/iron-resizable-behavior#^1.0.0"
+ },
+ "devDependencies": {
+ "paper-styles": "PolymerElements/paper-styles#^1.0.0",
+ "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
+ "iron-media-query": "PolymerElements/iron-media-query#^1.0.0",
+ "iron-icons": "PolymerElements/iron-icons#^1.0.0",
+ "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0",
+ "paper-input": "PolymerElements/paper-input#^1.0.0",
+ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
+ "test-fixture": "PolymerElements/test-fixture#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ }
+}
diff --git a/static/bower_components/paper-scroll-header-panel/demo/demo1.html b/static/bower_components/paper-scroll-header-panel/demo/demo1.html
new file mode 100644
index 0000000..b14b0e7
--- /dev/null
+++ b/static/bower_components/paper-scroll-header-panel/demo/demo1.html
@@ -0,0 +1,81 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+ <title>paper-scroll-header-panel: demo1</title>
+
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
+ <meta name="mobile-web-app-capable" content="yes">
+ <meta name="apple-mobile-web-app-capable" content="yes">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+
+ <link rel="import" href="../paper-scroll-header-panel.html">
+ <link rel="import" href="../../paper-toolbar/paper-toolbar.html">
+ <link rel="import" href="../../iron-icons/iron-icons.html">
+ <link rel="import" href="../../paper-icon-button/paper-icon-button.html">
+ <link rel="import" href="sample-content.html">
+
+ <link rel="stylesheet" href="../../paper-styles/demo.css">
+
+ <style is="custom-style">
+
+ paper-scroll-header-panel {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ background-color: var(--paper-grey-200, #eee);;
+ }
+
+ paper-toolbar {
+ background-color: var(--google-blue-500, #4285f4);
+ }
+
+ paper-toolbar iron-icon {
+ margin: 0 8px;
+ }
+
+ paper-toolbar .title {
+ margin: 0 8px;
+ }
+
+ paper-scroll-header-panel .content {
+ padding: 8px;
+ }
+
+ </style>
+
+</head>
+<body>
+
+ <paper-scroll-header-panel>
+
+ <paper-toolbar>
+
+ <paper-icon-button icon="arrow-back"></paper-icon-button>
+ <div class="flex title">Title</div>
+ <paper-icon-button icon="search"></paper-icon-button>
+ <paper-icon-button icon="more-vert"></paper-icon-button>
+
+ </paper-toolbar>
+
+ <div class="content">
+
+ <sample-content size="100"></sample-content>
+
+ </div>
+
+ </paper-scroll-header-panel>
+
+</body>
+</html>
diff --git a/static/bower_components/paper-scroll-header-panel/demo/demo2.html b/static/bower_components/paper-scroll-header-panel/demo/demo2.html
new file mode 100644
index 0000000..81c9484
--- /dev/null
+++ b/static/bower_components/paper-scroll-header-panel/demo/demo2.html
@@ -0,0 +1,78 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+ <title>paper-scroll-header-panel: demo2</title>
+
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
+ <meta name="mobile-web-app-capable" content="yes">
+ <meta name="apple-mobile-web-app-capable" content="yes">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+
+ <link rel="import" href="../paper-scroll-header-panel.html">
+ <link rel="import" href="../../paper-toolbar/paper-toolbar.html">
+ <link rel="import" href="../../iron-icons/iron-icons.html">
+ <link rel="import" href="../../paper-icon-button/paper-icon-button.html">
+ <link rel="stylesheet" href="../../paper-styles/demo.css">
+ <link rel="import" href="sample-content.html">
+
+ <style is="custom-style">
+
+ paper-scroll-header-panel {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ background-color: var(--paper-grey-200, #eee);
+ }
+
+ paper-toolbar {
+ background-color: var(--google-blue-500, #4285f4);
+ }
+
+ paper-toolbar .title {
+ margin-left: 60px;
+ }
+
+ .content {
+ padding: 8px;
+ }
+
+ </style>
+
+</head>
+<body>
+
+ <paper-scroll-header-panel condenses>
+
+ <paper-toolbar class="tall">
+
+ <paper-icon-button icon="arrow-back"></paper-icon-button>
+ <div class="flex"></div>
+ <paper-icon-button icon="search"></paper-icon-button>
+ <paper-icon-button icon="more-vert"></paper-icon-button>
+
+ <div class="bottom title">Title</div>
+
+ </paper-toolbar>
+
+ <div class="content">
+
+ <sample-content size="100"></sample-content>
+
+ </div>
+
+ </paper-scroll-header-panel>
+
+</body>
+</html>
diff --git a/static/bower_components/paper-scroll-header-panel/demo/demo3.html b/static/bower_components/paper-scroll-header-panel/demo/demo3.html
new file mode 100644
index 0000000..eb41f1b
--- /dev/null
+++ b/static/bower_components/paper-scroll-header-panel/demo/demo3.html
@@ -0,0 +1,79 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+ <title>paper-scroll-header-panel: demo3</title>
+
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
+ <meta name="mobile-web-app-capable" content="yes">
+ <meta name="apple-mobile-web-app-capable" content="yes">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+
+ <link rel="import" href="../paper-scroll-header-panel.html">
+ <link rel="import" href="../../paper-toolbar/paper-toolbar.html">
+ <link rel="import" href="../../iron-icons/iron-icons.html">
+ <link rel="import" href="../../paper-icon-button/paper-icon-button.html">
+ <link rel="stylesheet" href="../../paper-styles/demo.css">
+ <link rel="import" href="sample-content.html">
+
+ <style is="custom-style">
+
+ paper-scroll-header-panel {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ background-color: var(--paper-grey-200, #eee);
+
+ /* background for toolbar when it is at its full size */
+ --paper-scroll-header-panel-full-header: {
+ background-image: url(images/bg3.jpg);
+ };
+ }
+
+ paper-toolbar {
+ background-color: transparent;
+ }
+
+ paper-toolbar iron-icon {
+ margin: 0 8px;
+ }
+
+ .content {
+ padding: 8px;
+ }
+
+ </style>
+
+</head>
+<body>
+
+ <paper-scroll-header-panel condenses no-reveal no-dissolve>
+
+ <paper-toolbar class="tall">
+
+ <div class="flex"></div>
+ <paper-icon-button icon="search"></paper-icon-button>
+
+ </paper-toolbar>
+
+ <div class="content">
+
+ <sample-content size="100"></sample-content>
+
+ </div>
+
+ </paper-scroll-header-panel>
+
+</body>
+</html>
diff --git a/static/bower_components/paper-scroll-header-panel/demo/demo4.html b/static/bower_components/paper-scroll-header-panel/demo/demo4.html
new file mode 100644
index 0000000..9b865d7
--- /dev/null
+++ b/static/bower_components/paper-scroll-header-panel/demo/demo4.html
@@ -0,0 +1,114 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+ <title>paper-scroll-header-panel: demo4</title>
+
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
+ <meta name="mobile-web-app-capable" content="yes">
+ <meta name="apple-mobile-web-app-capable" content="yes">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+
+ <link rel="import" href="../paper-scroll-header-panel.html">
+ <link rel="import" href="../../paper-toolbar/paper-toolbar.html">
+ <link rel="import" href="../../iron-icons/iron-icons.html">
+ <link rel="import" href="../../paper-icon-button/paper-icon-button.html">
+ <link rel="import" href="sample-content.html">
+
+ <link rel="stylesheet" href="../../paper-styles/demo.css">
+
+
+ <style is="custom-style">
+
+ paper-scroll-header-panel {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ background-color: var(--paper-grey-200, #eee);
+
+ /* background for toolbar when it is at its full size */
+ --paper-scroll-header-panel-full-header: {
+ background-image: url(images/bg6.jpg);
+ };
+
+ /* background for toolbar when it is condensed */
+ --paper-scroll-header-panel-condensed-header: {
+ background-color: var(--paper-deep-orange-500, #ff5722);
+ };
+ }
+
+ paper-toolbar.tall {
+ background-color: transparent;
+ }
+
+ paper-toolbar.tall .title {
+ font-size: 40px;
+ margin-left: 60px;
+
+ -webkit-transform-origin: left center;
+ transform-origin: left center;
+
+ /* Issue #15 */
+ isolation: isolate;
+ }
+
+ paper-toolbar.tall iron-icon {
+ margin: 0 8px;
+ }
+
+ .content {
+ padding: 8px;
+ }
+
+ </style>
+
+</head>
+<body>
+
+ <paper-scroll-header-panel condenses>
+
+ <paper-toolbar class="tall">
+
+ <paper-icon-button icon="arrow-back"></paper-icon-button>
+ <div class="flex"></div>
+ <paper-icon-button icon="search"></paper-icon-button>
+ <paper-icon-button icon="more-vert"></paper-icon-button>
+ <div class="bottom title">Title</div>
+
+ </paper-toolbar>
+
+ <div class="content">
+
+ <sample-content size="100"></sample-content>
+
+ </div>
+
+ </paper-scroll-header-panel>
+
+ <script>
+
+ // custom transformation: scale header's title
+ var title = document.querySelector('.title');
+ addEventListener('paper-header-transform', function(e) {
+ var d = e.detail;
+ var m = d.height - d.condensedHeight;
+ var scale = Math.max(0.75, (m - d.y) / (m / 0.25) + 0.75);
+
+ Polymer.Base.transform('scale(' + scale + ') translateZ(0)', title);
+ });
+
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/paper-scroll-header-panel/demo/demo5.html b/static/bower_components/paper-scroll-header-panel/demo/demo5.html
new file mode 100644
index 0000000..5cb2048
--- /dev/null
+++ b/static/bower_components/paper-scroll-header-panel/demo/demo5.html
@@ -0,0 +1,113 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+ <title>paper-scroll-header-panel: demo5</title>
+
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
+ <meta name="mobile-web-app-capable" content="yes">
+ <meta name="apple-mobile-web-app-capable" content="yes">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+
+ <link rel="import" href="../paper-scroll-header-panel.html">
+ <link rel="import" href="../../paper-toolbar/paper-toolbar.html">
+ <link rel="import" href="../../iron-icons/iron-icons.html">
+ <link rel="import" href="../../paper-icon-button/paper-icon-button.html">
+ <link rel="import" href="sample-content.html">
+
+ <link rel="stylesheet" href="../../paper-styles/demo.css">
+
+ <style is="custom-style">
+
+ paper-scroll-header-panel {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ background-color: var(--paper-grey-200, #eee);
+
+ /* background for toolbar when it is at its full size */
+ --paper-scroll-header-panel-full-header: {
+ background-image: url(images/bg6.jpg);
+ };
+
+ /* background for toolbar when it is condensed */
+ --paper-scroll-header-panel-condensed-header: {
+ background-color: var(--google-yellow-500, #f4b400);
+ };
+ }
+
+ paper-toolbar.tall {
+ background-color: transparent;
+ }
+
+ paper-toolbar.tall .title {
+ font-size: 40px;
+ margin-left: 60px;
+
+ -webkit-transform-origin: left center;
+ transform-origin: left center;
+
+ /* Issue #15 */
+ isolation: isolate;
+ }
+
+ paper-toolbar.tall iron-icon {
+ margin: 0 8px;
+ }
+
+ .content {
+ padding: 8px;
+ }
+
+ </style>
+
+</head>
+<body>
+
+ <paper-scroll-header-panel condenses>
+
+ <paper-toolbar class="tall">
+
+ <paper-icon-button icon="arrow-back"></paper-icon-button>
+ <div class="flex"></div>
+ <paper-icon-button icon="search"></paper-icon-button>
+ <paper-icon-button icon="more-vert"></paper-icon-button>
+ <div class="bottom title">Title</div>
+
+ </paper-toolbar>
+
+ <div class="content">
+
+ <sample-content size="100"></sample-content>
+
+ </div>
+
+ </paper-scroll-header-panel>
+
+ <script>
+
+ // custom transformation: scale header's title
+ var title = document.querySelector('.title');
+ addEventListener('paper-header-transform', function(e) {
+ var d = e.detail;
+ var m = d.height - d.condensedHeight;
+ var scale = Math.max(0.75, (m - d.y) / (m / 0.25) + 0.75);
+
+ Polymer.Base.transform('scale(' + scale + ') translateZ(0)', title);
+ });
+
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/paper-scroll-header-panel/demo/demo6.html b/static/bower_components/paper-scroll-header-panel/demo/demo6.html
new file mode 100644
index 0000000..c1524ab
--- /dev/null
+++ b/static/bower_components/paper-scroll-header-panel/demo/demo6.html
@@ -0,0 +1,117 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+ <title>paper-scroll-header-panel: demo6</title>
+
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
+ <meta name="mobile-web-app-capable" content="yes">
+ <meta name="apple-mobile-web-app-capable" content="yes">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+
+ <link rel="import" href="../paper-scroll-header-panel.html">
+ <link rel="import" href="../../paper-toolbar/paper-toolbar.html">
+ <link rel="import" href="../../iron-icons/iron-icons.html">
+ <link rel="import" href="../../paper-icon-button/paper-icon-button.html">
+ <link rel="import" href="sample-content.html">
+
+ <link rel="stylesheet" href="../../paper-styles/demo.css">
+
+ <style is="custom-style">
+
+ paper-scroll-header-panel {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ background-color: var(--paper-grey-200, #eee);
+
+ /* background for toolbar when it is at its full size */
+ --paper-scroll-header-panel-full-header: {
+ background-image: url(images/bg6.jpg);
+ };
+
+ /* background for toolbar when it is condensed */
+ --paper-scroll-header-panel-condensed-header: {
+ background-image: url(images/bg2.jpg);
+ };
+ }
+
+ paper-toolbar.tall {
+ /* custom toolbar height */
+ height: 256px;
+ background-color: transparent;
+ }
+
+ paper-toolbar.tall .title {
+ font-size: 40px;
+ margin-left: 60px;
+
+ -webkit-transform-origin: left center;
+ transform-origin: left center;
+
+ /* Issue #15 */
+ isolation: isolate;
+ }
+
+ paper-toolbar.tall iron-icon {
+ margin: 0 8px;
+ }
+
+ .content {
+ padding: 8px;
+ }
+
+ </style>
+
+</head>
+<body>
+
+ <!-- By default condensedHeaderHeight is 1/3 of the header's height. Here
+ we want to set the condensed header's height to be 64px. -->
+ <paper-scroll-header-panel condenses header-height="256" condensed-header-height="64">
+
+ <paper-toolbar class="tall">
+
+ <paper-icon-button icon="arrow-back"></paper-icon-button>
+ <div class="flex"></div>
+ <paper-icon-button icon="search"></paper-icon-button>
+ <paper-icon-button icon="more-vert"></paper-icon-button>
+ <div class="bottom title">Title</div>
+
+ </paper-toolbar>
+
+ <div class="content">
+
+ <sample-content size="100"></sample-content>
+
+ </div>
+
+ </paper-scroll-header-panel>
+
+ <script>
+
+ // custom transformation: scale header's title
+ var title = document.querySelector('.title');
+ addEventListener('paper-header-transform', function(e) {
+ var d = e.detail;
+ var m = d.height - d.condensedHeight;
+ var scale = Math.max(0.75, (m - d.y) / (m / 0.25) + 0.75);
+
+ Polymer.Base.transform('scale(' + scale + ') translateZ(0)', title);
+ });
+
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/paper-scroll-header-panel/demo/demo7.html b/static/bower_components/paper-scroll-header-panel/demo/demo7.html
new file mode 100644
index 0000000..4b5710b
--- /dev/null
+++ b/static/bower_components/paper-scroll-header-panel/demo/demo7.html
@@ -0,0 +1,120 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+ <title>paper-scroll-header-panel: demo7</title>
+
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
+ <meta name="mobile-web-app-capable" content="yes">
+ <meta name="apple-mobile-web-app-capable" content="yes">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+
+ <link rel="import" href="../paper-scroll-header-panel.html">
+ <link rel="import" href="../../paper-toolbar/paper-toolbar.html">
+ <link rel="import" href="../../iron-icons/iron-icons.html">
+ <link rel="import" href="../../paper-icon-button/paper-icon-button.html">
+ <link rel="import" href="../../iron-media-query/iron-media-query.html">
+ <link rel="import" href="sample-content.html">
+
+ <link rel="stylesheet" href="../../paper-styles/demo.css">
+
+ <style is="custom-style">
+
+ paper-scroll-header-panel {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ background-color: var(--paper-grey-200, #eee);
+
+ /* background for toolbar when it is at its full size */
+ --paper-scroll-header-panel-full-header: {
+ background-image: url(images/bg2.jpg);
+ };
+
+ /* background for toolbar when it is condensed */
+ --paper-scroll-header-panel-condensed-header: {
+ background-color: var(--google-yellow-500, #f4b400);
+ };
+ }
+
+ paper-toolbar.tall {
+ background-color: transparent;
+ }
+
+ paper-toolbar.tall .title {
+ font-size: 40px;
+ margin-left: 60px;
+
+ -webkit-transform-origin: left center;
+ transform-origin: left center;
+
+ /* Issue #15 */
+ isolation: isolate;
+ }
+
+ .content {
+ padding: 8px;
+ }
+
+ </style>
+
+</head>
+<body>
+
+ <paper-scroll-header-panel condenses>
+
+ <paper-toolbar class="tall">
+
+ <paper-icon-button icon="arrow-back"></paper-icon-button>
+ <div class="flex"></div>
+ <paper-icon-button icon="search"></paper-icon-button>
+ <paper-icon-button icon="more-vert"></paper-icon-button>
+ <div class="bottom indent title">Title</div>
+
+ </paper-toolbar>
+
+ <div class="content">
+
+ <h3>Resize window to toggle between fixed header and scrolled header</h3>
+ <sample-content size="100"></sample-content>
+
+ </div>
+
+ </paper-scroll-header-panel>
+
+ <iron-media-query id="mquery" query="min-width: 600px"></iron-media-query>
+
+ <script>
+
+ // toggle fixed header based on screen size
+ var panel = document.querySelector('paper-scroll-header-panel');
+ var mquery = document.querySelector('#mquery');
+ mquery.addEventListener('query-matches-changed', function() {
+ panel.fixed = mquery.queryMatches;
+ });
+
+ // custom transformation: scale header's title
+ var title = document.querySelector('.title');
+ addEventListener('paper-header-transform', function(e) {
+ var d = e.detail;
+ var m = d.height - d.condensedHeight;
+ var scale = Math.max(0.75, (m - d.y) / (m / 0.25) + 0.75);
+
+ Polymer.Base.transform('scale(' + scale + ') translateZ(0)', title);
+ });
+
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/paper-scroll-header-panel/demo/demo8.html b/static/bower_components/paper-scroll-header-panel/demo/demo8.html
new file mode 100644
index 0000000..ffc24e6
--- /dev/null
+++ b/static/bower_components/paper-scroll-header-panel/demo/demo8.html
@@ -0,0 +1,126 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+ <title>paper-scroll-header-panel: demo8</title>
+
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
+ <meta name="mobile-web-app-capable" content="yes">
+ <meta name="apple-mobile-web-app-capable" content="yes">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+
+ <link rel="import" href="../paper-scroll-header-panel.html">
+ <link rel="import" href="../../paper-toolbar/paper-toolbar.html">
+ <link rel="import" href="../../iron-icon/iron-icon.html">
+ <link rel="import" href="../../iron-icons/iron-icons.html">
+ <link rel="import" href="../../paper-icon-button/paper-icon-button.html">
+ <link rel="import" href="sample-content.html">
+
+ <link rel="stylesheet" href="../../paper-styles/demo.css">
+
+ <style is="custom-style">
+
+ paper-scroll-header-panel {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ background-color: var(--paper-grey-200, #eee);
+
+ /* background for toolbar when it is at its full size */
+ --paper-scroll-header-panel-full-header: {
+ background-image: url(images/bg9.jpg);
+ };
+
+ /* background for toolbar when it is condensed */
+ --paper-scroll-header-panel-condensed-header: {
+ background-color: var(--paper-purple-800, #6a1b9a);
+ };
+ }
+
+ paper-toolbar {
+ /* custom toolbar height */
+ height: 256px;
+ background-color: transparent;
+ overflow: visible;
+ }
+
+ paper-toolbar paper-icon-button {
+ margin: 0 8px;
+ }
+
+ .bottom-text {
+ -webkit-transform: translateZ(0);
+ transform: translateZ(0);
+
+ font-size: 20px;
+ padding-bottom: 10px;
+ }
+
+ .subtitle {
+ padding-top: 4px;
+ font-size: 16px;
+ color: #ccc;
+ }
+
+ .bookmark {
+ position: absolute;
+ bottom: -24px;
+ right: 24px;
+ fill: #4285f4;
+ height: 48px;
+ width: 48px;
+ }
+
+ .content {
+ padding: 16px 10px 16px 50px;
+ }
+
+ .indent {
+ margin-left: 60px;
+ }
+
+ </style>
+
+</head>
+<body>
+
+ <!-- `keepCondensedHeader` makes the condensed header to not scroll away -->
+ <paper-scroll-header-panel condenses keep-condensed-header header-height="256" condensed-header-height="140">
+
+ <paper-toolbar>
+
+ <paper-icon-button icon="arrow-back"></paper-icon-button>
+ <div class="flex"></div>
+ <paper-icon-button icon="thumb-up"></paper-icon-button>
+ <paper-icon-button icon="mail"></paper-icon-button>
+
+ <div class="bottom indent bottom-text" self-end>
+ <div>Lorem ipsum dolor sit amet</div>
+ <div class="subtitle">Iisque perfecto dissentiet cum et</div>
+ </div>
+
+ <iron-icon class="bottom bookmark" icon="bookmark"></iron-icon>
+
+ </paper-toolbar>
+
+ <div class="content">
+
+ <sample-content size="100"></sample-content>
+
+ </div>
+
+ </paper-scroll-header-panel>
+
+</body>
+</html>
diff --git a/static/bower_components/paper-scroll-header-panel/demo/demo9.html b/static/bower_components/paper-scroll-header-panel/demo/demo9.html
new file mode 100644
index 0000000..3c0d691
--- /dev/null
+++ b/static/bower_components/paper-scroll-header-panel/demo/demo9.html
@@ -0,0 +1,108 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+ <title>paper-scroll-header-panel: demo9</title>
+
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
+ <meta name="mobile-web-app-capable" content="yes">
+ <meta name="apple-mobile-web-app-capable" content="yes">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+
+ <link rel="import" href="../paper-scroll-header-panel.html">
+ <link rel="import" href="../../iron-icon/iron-icon.html">
+ <link rel="import" href="../../iron-icons/iron-icons.html">
+ <link rel="import" href="../../iron-icons/av-icons.html">
+ <link rel="import" href="../../paper-toolbar/paper-toolbar.html">
+ <link rel="import" href="../../paper-input/paper-input.html">
+ <link rel="import" href="sample-content.html">
+
+ <link rel="stylesheet" href="../../paper-styles/demo.css">
+
+
+ <style is="custom-style">
+
+ paper-scroll-header-panel {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ background-color: var(--paper-grey-200, #eee);
+
+ /* background for toolbar when it is at its full size */
+ --paper-scroll-header-panel-full-header: {
+ background-image: url(images/bg9.jpg);
+ };
+
+ /* background for toolbar when it is condensed */
+ --paper-scroll-header-panel-condensed-header: {
+ background-color: transparent;
+ };
+ }
+
+ paper-toolbar {
+ background-color: transparent;
+ }
+
+ .field {
+ background-color: #fff;
+ border: 1px solid #eee;
+ box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
+ height: 40px;
+ }
+
+ .field iron-icon {
+ color: var(--google-grey-700);
+ fill: var(--google-grey-700);
+ margin: 0 8px;
+ }
+
+ .field input {
+ font-size: 20px;
+ outline: 0;
+ border: none;
+ margin-left: 20px;
+ }
+
+ .content {
+ padding: 8px;
+ }
+
+ </style>
+
+</head>
+<body>
+
+ <!-- Instead of using 1/3 of the header's height, we want to manually set the
+ condensed header's height to 64px -->
+ <paper-scroll-header-panel condenses condensed-header-height="64">
+
+ <paper-toolbar class="medium-tall">
+
+ <div class="flex center horizontal layout bottom field">
+ <iron-icon icon="menu"></iron-icon>
+ <input class="flex">
+ <iron-icon icon="av:mic"></iron-icon>
+ </div>
+ </paper-toolbar>
+
+ <div class="content">
+
+ <sample-content size="100"></sample-content>
+
+ </div>
+
+ </paper-scroll-header-panel>
+
+</body>
+</html>
diff --git a/static/bower_components/paper-scroll-header-panel/demo/images/bg2.jpg b/static/bower_components/paper-scroll-header-panel/demo/images/bg2.jpg
new file mode 100644
index 0000000..9aad0a9
--- /dev/null
+++ b/static/bower_components/paper-scroll-header-panel/demo/images/bg2.jpg
Binary files differ
diff --git a/static/bower_components/paper-scroll-header-panel/demo/images/bg3.jpg b/static/bower_components/paper-scroll-header-panel/demo/images/bg3.jpg
new file mode 100644
index 0000000..5079b4e
--- /dev/null
+++ b/static/bower_components/paper-scroll-header-panel/demo/images/bg3.jpg
Binary files differ
diff --git a/static/bower_components/paper-scroll-header-panel/demo/images/bg5.jpg b/static/bower_components/paper-scroll-header-panel/demo/images/bg5.jpg
new file mode 100644
index 0000000..979ef17
--- /dev/null
+++ b/static/bower_components/paper-scroll-header-panel/demo/images/bg5.jpg
Binary files differ
diff --git a/static/bower_components/paper-scroll-header-panel/demo/images/bg6.jpg b/static/bower_components/paper-scroll-header-panel/demo/images/bg6.jpg
new file mode 100644
index 0000000..1dec3f3
--- /dev/null
+++ b/static/bower_components/paper-scroll-header-panel/demo/images/bg6.jpg
Binary files differ
diff --git a/static/bower_components/paper-scroll-header-panel/demo/images/bg9.jpg b/static/bower_components/paper-scroll-header-panel/demo/images/bg9.jpg
new file mode 100644
index 0000000..c9a2e65
--- /dev/null
+++ b/static/bower_components/paper-scroll-header-panel/demo/images/bg9.jpg
Binary files differ
diff --git a/static/bower_components/paper-scroll-header-panel/demo/index.html b/static/bower_components/paper-scroll-header-panel/demo/index.html
new file mode 100644
index 0000000..f2119b4
--- /dev/null
+++ b/static/bower_components/paper-scroll-header-panel/demo/index.html
@@ -0,0 +1,113 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+ <title>paper-scroll-header-panel: demo4</title>
+
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
+ <meta name="mobile-web-app-capable" content="yes">
+ <meta name="apple-mobile-web-app-capable" content="yes">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+
+ <link rel="import" href="../paper-scroll-header-panel.html">
+ <link rel="import" href="../../paper-toolbar/paper-toolbar.html">
+ <link rel="import" href="../../iron-icons/iron-icons.html">
+ <link rel="import" href="../../paper-icon-button/paper-icon-button.html">
+ <link rel="import" href="sample-content.html">
+
+ <link rel="stylesheet" href="../../paper-styles/demo.css">
+
+ <style is="custom-style">
+
+ paper-scroll-header-panel {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ background-color: var(--paper-grey-200, #eee);
+
+ /* background for toolbar when it is at its full size */
+ --paper-scroll-header-panel-full-header: {
+ background-image: url(images/bg6.jpg);
+ };
+
+ /* background for toolbar when it is condensed */
+ --paper-scroll-header-panel-condensed-header: {
+ background-color: var(--paper-deep-orange-500, #ff5722);
+ };
+ }
+
+ paper-toolbar.tall {
+ background-color: transparent;
+ }
+
+ paper-toolbar.tall .title {
+ font-size: 40px;
+ margin-left: 60px;
+
+ -webkit-transform-origin: left center;
+ transform-origin: left center;
+
+ /* Issue #15 */
+ isolation: isolate;
+ }
+
+ paper-toolbar.tall iron-icon {
+ margin: 0 8px;
+ }
+
+ .content {
+ padding: 8px;
+ }
+
+ </style>
+
+</head>
+<body unresolved>
+
+ <paper-scroll-header-panel condenses>
+
+ <paper-toolbar class="tall">
+
+ <paper-icon-button icon="arrow-back"></paper-icon-button>
+ <div class="flex"></div>
+ <paper-icon-button icon="search"></paper-icon-button>
+ <paper-icon-button icon="more-vert"></paper-icon-button>
+ <div class="bottom title">Title</div>
+
+ </paper-toolbar>
+
+ <div class="content">
+
+ <sample-content size="100"></sample-content>
+
+ </div>
+
+ </paper-scroll-header-panel>
+
+ <script>
+
+ // custom transformation: scale header's title
+ var title = document.querySelector('.title');
+ addEventListener('paper-header-transform', function(e) {
+ var d = e.detail;
+ var m = d.height - d.condensedHeight;
+ var scale = Math.max(0.75, (m - d.y) / (m / 0.25) + 0.75);
+
+ Polymer.Base.transform('scale(' + scale + ') translateZ(0)', title);
+ });
+
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/paper-scroll-header-panel/demo/lorem-ipsum.html b/static/bower_components/paper-scroll-header-panel/demo/lorem-ipsum.html
new file mode 100644
index 0000000..ed4fb4c
--- /dev/null
+++ b/static/bower_components/paper-scroll-header-panel/demo/lorem-ipsum.html
@@ -0,0 +1,42 @@
+<!--
+ @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
+-->
+<dom-module name="lorem-ipsum" attributes="paragraphs">
+<script>
+
+ (function() {
+ var strings = [
+ 'Lorem ipsum dolor sit amet, per in nusquam nominavi periculis, sit elit oportere ea, id minim maiestatis incorrupte duo. Dolorum verterem ad ius, his et nullam verterem. Eu alia debet usu, an doming tritani est. Vix ad ponderum petentium suavitate, eum eu tempor populo, graece sententiae constituam vim ex. Cu torquatos reprimique neglegentur nec, voluptua periculis has ut, at eos discere deleniti sensibus.',
+ 'Ut labores minimum atomorum pro. Laudem tibique ut has. No nam ipsum lorem aliquip, accumsan quaerendum ei usu. Maiestatis vituperatoribus qui at, ne suscipit volutpat tractatos nam. Nonumy semper mollis vis an, nam et harum detracto. An pri dolor percipitur, vel maluisset disputationi te.',
+ 'Fugit adolescens vis et, ei graeci forensibus sed. Denique argumentum comprehensam ei vis, id has facete accommodare, quo scripta utroque id. Autem nullam doming ad eam, te nam dicam iriure periculis. Quem vocent veritus eu vis, nam ut hinc idque feugait.',
+ 'Convenire definiebas scriptorem eu cum. Sit dolor dicunt consectetuer no, in vix nisl velit, duo ridens abhorreant delicatissimi ut. Pro ei libris omnium scripserit, natum volumus propriae no eam. Suscipit pericula explicari sed ei, te usu iudicabit forensibus efficiantur. Has quot dicam animal id.',
+ 'Ea duis bonorum nec, falli paulo aliquid ei eum. Cu mei vide viris gloriatur, at populo eripuit sit. Idque molestiae duo ne. Qui id tempor accusamus sadipscing. His odio feugait et. Ne vis vide labitur, eu corpora appareat interpretaris mel.',
+ 'Usu eu novum principes, vel quodsi aliquip ea. Labore mandamus persequeris id mea, has eripuit neglegentur id, illum noster nec in. Ea nam quod quando cetero, per qualisque tincidunt in. Qui ne meliore commune voluptatibus, qui justo labores no. Et dicat cotidieque eos, vis homero legere et, eam timeam nominavi in. Pri dicam option placerat an, cu qui aliquam adipiscing signiferumque. Vis euismod accusamus no, soluta vocibus ei cum.',
+ 'Has at minim mucius aliquam, est id tempor laoreet. Ius officiis convenire ex, in vim iuvaret patrioque similique, veritus detraxit sed ad. Mel no admodum abhorreant cotidieque, et duo possim postulant, consul convenire adolescens cu mel. Duo in decore soleat doming. Fabellas interpretaris eos at. No cum unum novum dicit.',
+ 'Pro saepe pertinax ei, ad pri animal labores suscipiantur. Modus commodo minimum eum te, vero utinam assueverit per eu, zril oportere suscipiantur pri te. Partem percipitur deterruisset ad sea, at eam suas luptatum dissentiunt. No error alienum pro, erant senserit ex mei, pri semper alterum no. Ut habemus menandri vulputate mea. Feugiat verterem ut sed. Dolores maiestatis id per.',
+ 'Detracto suavitate repudiandae no eum. Id adhuc minim soluta nam, novum denique ad eum. At mucius malorum meliore his, te ferri tritani cum, eu mel legendos ocurreret. His te ludus aperiam malorum, mundi nominati deseruisse pro ne, mel discere intellegat in. Vero dissentiunt quo in, vel cu meis maiestatis adversarium. In sit summo nostrum petentium, ea vix amet nullam minimum, ornatus sensibus theophrastus ex nam.',
+ 'Iisque perfecto dissentiet cum et, sit ut quot mandamus, ut vim tibique splendide instructior. Id nam odio natum malorum, tibique copiosae expetenda mel ea. Mea melius malorum ut. Ut nec tollit vocent timeam. Facer nonumy numquam id his, munere salutatus consequuntur eum et, eum cotidieque definitionem signiferumque id. Ei oblique graecis patrioque vis, et probatus dignissim inciderint vel. Sed id paulo erroribus, autem semper accusamus in mel.'
+ ];
+
+ Polymer('lorem-ipsum', {
+
+ paragraphs: 0,
+
+ paragraphsChanged: function() {
+ this.innerHTML = '';
+ for (var i = 0; i < this.paragraphs; i++) {
+ this.innerHTML += '<p>' + strings[Math.floor(Math.random() * strings.length)] + '</p>';
+ }
+ }
+
+ });
+ })();
+
+</script>
+</dom-module>
diff --git a/static/bower_components/paper-scroll-header-panel/demo/sample-content.html b/static/bower_components/paper-scroll-header-panel/demo/sample-content.html
new file mode 100644
index 0000000..e325fe2
--- /dev/null
+++ b/static/bower_components/paper-scroll-header-panel/demo/sample-content.html
@@ -0,0 +1,72 @@
+<!--
+@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
+-->
+<dom-module id="sample-content">
+ <template>
+ <div id="content"></div>
+ </template>
+</dom-module>
+
+<script>
+
+ (function() {
+
+ var strings = [
+ 'Lorem ipsum dolor sit amet, per in nusquam nominavi periculis, sit elit oportere ea.',
+ 'Ut labores minimum atomorum pro. Laudem tibique ut has.',
+ 'Fugit adolescens vis et, ei graeci forensibus sed.',
+ 'Convenire definiebas scriptorem eu cum. Sit dolor dicunt consectetuer no.',
+ 'Ea duis bonorum nec, falli paulo aliquid ei eum.',
+ 'Usu eu novum principes, vel quodsi aliquip ea.',
+ 'Has at minim mucius aliquam, est id tempor laoreet.',
+ 'Pro saepe pertinax ei, ad pri animal labores suscipiantur.',
+ 'Detracto suavitate repudiandae no eum. Id adhuc minim soluta nam.',
+ 'Iisque perfecto dissentiet cum et, sit ut quot mandamus, ut vim tibique splendide instructior.',
+ 'Id nam odio natum malorum, tibique copiosae expetenda mel ea.',
+ 'Cu mei vide viris gloriatur, at populo eripuit sit.',
+ 'Modus commodo minimum eum te, vero utinam assueverit per eu.',
+ 'No nam ipsum lorem aliquip, accumsan quaerendum ei usu.'
+ ];
+
+ function randomString() {
+ return strings[Math.floor(Math.random() * strings.length)];
+ }
+
+ function randomLetter() {
+ return String.fromCharCode(65 + Math.floor(Math.random() * 26));
+ }
+
+ Polymer({
+ is: 'sample-content',
+
+ properties: {
+ size: {
+ type: Number,
+ value: 0,
+ observer: 'sizeChanged'
+ }
+ },
+
+ sizeChanged: function() {
+ var html = '';
+ for (var i = 0; i < this.size; i++) {
+ html +=
+ '<div style="border: 1px solid #bebebe; padding: 16px; margin: 16px; border-radius: 5px; background-color: #fff; color: #555;">' +
+ '<div style="display: inline-block; height: 64px; width: 64px; border-radius: 50%; background: #ddd; line-height: 64px; font-size: 30px; color: #666; text-align: center;">'+ randomLetter() + '</div>' +
+ '<div style="font-size: 22px; padding: 8px 0 16px; color: #888;">' + randomString() + '</div>' +
+ '<div style="font-size: 16px; padding-bottom: 8px;">' + randomString() + '</div>' +
+ '<div style="font-size: 12px;">' + randomString() + '</div>' +
+ '<div style="font-size: 12px;">' + randomString() + '</div>' +
+ '</div>';
+ this.$.content.innerHTML = html;
+ }
+ }
+ });
+ })();
+</script>
diff --git a/static/bower_components/paper-scroll-header-panel/hero.svg b/static/bower_components/paper-scroll-header-panel/hero.svg
new file mode 100644
index 0000000..25710e9
--- /dev/null
+++ b/static/bower_components/paper-scroll-header-panel/hero.svg
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
+<g id="background" display="none">
+ <rect display="inline" fill="#B0BEC5" width="225" height="126"/>
+</g>
+<g id="label">
+</g>
+<g id="art">
+ <circle cx="170.6" cy="28.5" r="4"/>
+ <circle cx="170.6" cy="58.5" r="4"/>
+ <rect x="170" y="29" width="2" height="30"/>
+ <path d="M163,102H73V24h90V102z M75,100h86V26H75V100z"/>
+ <rect x="74" y="62" width="88" height="2"/>
+ <g id="ic_x5F_add_x0D_">
+ </g>
+ <g>
+ <polygon points="74,59.6 74,62.5 74.5,63 77.4,63 "/>
+ <polygon points="74,51.9 74,54.7 82.3,63 85.1,63 "/>
+ <polygon points="74,44.1 74,46.9 90.1,63 92.9,63 "/>
+ <polygon points="74,36.3 74,39.2 97.8,63 100.7,63 "/>
+ <polygon points="74,28.6 74,31.4 105.6,63 108.4,63 "/>
+ <polygon points="78.2,25 75.4,25 113.4,63 116.2,63 "/>
+ <polygon points="86,25 83.1,25 121.1,63 124,63 "/>
+ <polygon points="93.7,25 90.9,25 128.9,63 131.7,63 "/>
+ <polygon points="101.5,25 98.7,25 136.7,63 139.5,63 "/>
+ <polygon points="109.2,25 106.4,25 144.4,63 147.2,63 "/>
+ <polygon points="117,25 114.2,25 152.2,63 155,63 "/>
+ <polygon points="124.8,25 122,25 160,63 162,63 162,62.2 "/>
+ <polygon points="132.5,25 129.7,25 162,57.3 162,54.5 "/>
+ <polygon points="140.3,25 137.5,25 162,49.5 162,46.7 "/>
+ <polygon points="148.1,25 145.2,25 162,41.8 162,38.9 "/>
+ <polygon points="155.8,25 153,25 162,34 162,31.2 "/>
+ <polygon points="162,26.2 162,25 160.8,25 "/>
+ </g>
+</g>
+<g id="Guides">
+</g>
+</svg>
diff --git a/static/bower_components/paper-scroll-header-panel/index.html b/static/bower_components/paper-scroll-header-panel/index.html
new file mode 100644
index 0000000..e2e7712
--- /dev/null
+++ b/static/bower_components/paper-scroll-header-panel/index.html
@@ -0,0 +1,28 @@
+<!doctype html>
+<!--
+@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
+-->
+<html>
+<head>
+
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+ <title>paper-scroll-header-panel</title>
+
+ <script src="../webcomponentsjs/webcomponents-lite.js"></script>
+ <link rel="import" href="../iron-component-page/iron-component-page.html">
+
+</head>
+<body>
+
+ <iron-component-page></iron-component-page>
+
+</body>
+</html>
diff --git a/static/bower_components/paper-scroll-header-panel/paper-scroll-header-panel.html b/static/bower_components/paper-scroll-header-panel/paper-scroll-header-panel.html
new file mode 100644
index 0000000..ba6b5cd
--- /dev/null
+++ b/static/bower_components/paper-scroll-header-panel/paper-scroll-header-panel.html
@@ -0,0 +1,455 @@
+<!--
+@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="../polymer/polymer.html">
+<link rel="import" href="../iron-resizable-behavior/iron-resizable-behavior.html">
+
+<!--
+`paper-scroll-header-panel` contains a header section and a content section. The
+header is initially on the top part of the view but it scrolls away with the
+rest of the scrollable content. Upon scrolling slightly up at any point, the
+header scrolls back into view. This saves screen space and allows users to
+access important controls by easily moving them back to the view.
+
+__Important:__ The `paper-scroll-header-panel` will not display if its parent does not have a height.
+
+Using [layout classes](https://www.polymer-project.org/1.0/docs/migration.html#layout-attributes) or custom properties, you can easily make the `paper-scroll-header-panel` fill the screen
+
+ <body class="fullbleed layout vertical">
+ <paper-scroll-header-panel class="flex">
+ <paper-toolbar>
+ <div>Hello World!</div>
+ </paper-toolbar>
+ </paper-scroll-header-panel>
+ </body>
+
+or, if you would prefer to do it in CSS, just give `html`, `body`, and `paper-scroll-header-panel` a height of 100%:
+
+ html, body {
+ height: 100%;
+ margin: 0;
+ }
+ paper-scroll-header-panel {
+ height: 100%;
+ }
+
+`paper-scroll-header-panel` works well with `paper-toolbar` but can use any element
+that represents a header by adding a `paper-header` class to it.
+
+ <paper-scroll-header-panel>
+ <paper-toolbar>Header</paper-toolbar>
+ <div>Content goes here...</div>
+ </paper-scroll-header-panel>
+
+Styling scroll-header-panel:
+
+To change background for toolbar when it is at its full size:
+
+ paper-scroll-header-panel {
+ --paper-scroll-header-panel-full-header: {
+ background-color: red;
+ };
+ }
+
+To change the background for toolbar when it is condensed:
+
+ paper-scroll-header-panel {
+ --paper-scroll-header-panel-condensed-header: {
+ background-color: #f4b400;
+ };
+ }
+
+@group Paper Element
+@element paper-scroll-header-panel
+@demo demo/index.html
+@hero hero.svg
+-->
+
+<dom-module id="paper-scroll-header-panel">
+
+ <style>
+ :host {
+ display: block;
+ position: relative;
+ overflow: hidden;
+ }
+
+ #mainContainer {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ -webkit-overflow-scrolling: touch;
+ overflow-x: hidden;
+ overflow-y: auto;
+ -webkit-transform: translateZ(0);
+ transform: translateZ(0);
+ }
+
+ #headerContainer {
+ position: absolute;
+ top: 0;
+ right: 0;
+ left: 0;
+ }
+
+ .bg-container {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+ }
+
+ #headerBg {
+ @apply(--paper-scroll-header-panel-full-header);
+ }
+
+ #condensedHeaderBg {
+ @apply(--paper-scroll-header-panel-condensed-header);
+ }
+
+ #headerBg, #condensedHeaderBg {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-repeat: no-repeat;
+ background-size: cover;
+ background-position: center center;
+ }
+
+ #condensedHeaderBg {
+ opacity: 0;
+ }
+ </style>
+ <template>
+ <div id="mainContainer">
+ <content id="mainContent" select=":not(paper-toolbar):not(.paper-header)"></content>
+ </div>
+ <div id="headerContainer">
+ <div class="bg-container">
+ <div id="condensedHeaderBg"></div>
+ <div id="headerBg"></div>
+ </div>
+ <content id="headerContent" select="paper-toolbar, .paper-header"></content>
+ </div>
+ </template>
+</dom-module>
+
+<script>
+(function() {
+
+ 'use strict';
+
+ Polymer({
+
+ /**
+ * Fired when the content has been scrolled.
+ *
+ * @event content-scroll
+ */
+
+ /**
+ * Fired when the header is transformed.
+ *
+ * @event paper-header-transform
+ */
+
+ is: 'paper-scroll-header-panel',
+
+ behaviors: [
+ Polymer.IronResizableBehavior
+ ],
+
+ properties: {
+
+ /**
+ * If true, the header's height will condense to `condensedHeaderHeight`
+ * as the user scrolls down from the top of the content area.
+ */
+ condenses: {
+ type: Boolean,
+ value: false,
+ observer: '_condensesChanged'
+ },
+
+ /**
+ * If true, no cross-fade transition from one background to another.
+ */
+ noDissolve: {
+ type: Boolean,
+ value: false
+ },
+
+ /**
+ * If true, the header doesn't slide back in when scrolling back up.
+ */
+ noReveal: {
+ type: Boolean,
+ value: false
+ },
+
+ /**
+ * If true, the header is fixed to the top and never moves away.
+ */
+ fixed: {
+ type: Boolean,
+ value: false
+ },
+
+ /**
+ * If true, the condensed header is always shown and does not move away.
+ */
+ keepCondensedHeader: {
+ type: Boolean,
+ value: false
+ },
+
+ /**
+ * The height of the header when it is at its full size.
+ *
+ * By default, the height will be measured when it is ready. If the height
+ * changes later the user needs to either set this value to reflect the
+ * new height or invoke `measureHeaderHeight()`.
+ */
+ headerHeight: {
+ type: Number,
+ value: 0
+ },
+
+ /**
+ * The height of the header when it is condensed.
+ *
+ * By default, `condensedHeaderHeight` is 1/3 of `headerHeight` unless
+ * this is specified.
+ */
+ condensedHeaderHeight: {
+ type: Number,
+ value: 0
+ },
+
+ /**
+ * By default, the top part of the header stays when the header is being
+ * condensed. Set this to true if you want the top part of the header
+ * to be scrolled away.
+ */
+ scrollAwayTopbar: {
+ type: Boolean,
+ value: false
+ },
+
+ _headerMargin: {
+ type: Number
+ },
+
+ _prevScrollTop: {
+ type: Number
+ },
+
+ _y: {
+ type: Number
+ }
+
+ },
+
+ observers: [
+ '_setup(_headerMargin, headerHeight, fixed)',
+ '_headerHeightChanged(headerHeight, condensedHeaderHeight)',
+ '_condensedHeaderHeightChanged(headerHeight, condensedHeaderHeight)'
+ ],
+
+ listeners: {
+ 'iron-resize': 'measureHeaderHeight'
+ },
+
+ ready: function() {
+ this.async(this.measureHeaderHeight, 5);
+ this._scrollHandler = this._scroll.bind(this);
+ this.scroller.addEventListener('scroll', this._scrollHandler);
+ },
+
+ detached: function() {
+ this.scroller.removeEventListener('scroll', this._scrollHandler);
+ },
+
+ /**
+ * Returns the header element.
+ *
+ * @property header
+ * @type Object
+ */
+ get header() {
+ return Polymer.dom(this.$.headerContent).getDistributedNodes()[0];
+ },
+
+ /**
+ * Returns the content element.
+ *
+ * @property content
+ * @type Object
+ */
+ get content() {
+ return Polymer.dom(this.$.mainContent).getDistributedNodes()[0];
+ },
+
+ /**
+ * Returns the scrollable element.
+ *
+ * @property scroller
+ * @type Object
+ */
+ get scroller() {
+ return this.$.mainContainer;
+ },
+
+ /**
+ * Invoke this to tell `paper-scroll-header-panel` to re-measure the header's
+ * height.
+ *
+ * @method measureHeaderHeight
+ */
+ measureHeaderHeight: function() {
+ var header = this.header;
+ if (header && header.offsetHeight) {
+ this.headerHeight = header.offsetHeight;
+ }
+ },
+
+ _headerHeightChanged: function() {
+ if (!this.condensedHeaderHeight) {
+ // assume condensedHeaderHeight is 1/3 of the headerHeight
+ this.condensedHeaderHeight = this.headerHeight * 1 / 3;
+ }
+ },
+
+ _condensedHeaderHeightChanged: function() {
+ if (this.headerHeight) {
+ this._headerMargin = this.headerHeight - this.condensedHeaderHeight;
+ }
+ },
+
+ _condensesChanged: function() {
+ if (this.condenses) {
+ this._scroll();
+ } else {
+ // reset transform/opacity set on the header
+ this._condenseHeader(null);
+ }
+ },
+
+ _setup: function() {
+ var s = this.scroller.style;
+ s.paddingTop = this.fixed ? '' : this.headerHeight + 'px';
+
+ s.top = this.fixed ? this.headerHeight + 'px' : '';
+
+ if (this.fixed) {
+ this._transformHeader(null);
+ } else {
+ this._scroll();
+ }
+ },
+
+ _transformHeader: function(y) {
+ var s = this.$.headerContainer.style;
+ this._translateY(s, -y);
+
+ if (this.condenses) {
+ this._condenseHeader(y);
+ }
+
+ this.fire('paper-header-transform', {y: y, height: this.headerHeight,
+ condensedHeight: this.condensedHeaderHeight});
+ },
+
+ _condenseHeader: function(y) {
+ var reset = (y === null);
+
+ // adjust top bar in paper-header so the top bar stays at the top
+ if (!this.scrollAwayTopbar && this.header.$ && this.header.$.topBar) {
+ this._translateY(this.header.$.topBar.style,
+ reset ? null : Math.min(y, this._headerMargin));
+ }
+ // transition header bg
+ var hbg = this.$.headerBg.style;
+ if (!this.noDissolve) {
+ hbg.opacity = reset ? '' : (this._headerMargin - y) / this._headerMargin;
+ }
+ // adjust header bg so it stays at the center
+ this._translateY(hbg, reset ? null : y / 2);
+ // transition condensed header bg
+ if (!this.noDissolve) {
+ var chbg = this.$.condensedHeaderBg.style;
+ chbg = this.$.condensedHeaderBg.style;
+ chbg.opacity = reset ? '' : y / this._headerMargin;
+
+ // adjust condensed header bg so it stays at the center
+ this._translateY(chbg, reset ? null : y / 2);
+ }
+ },
+
+ _translateY: function(s, y) {
+ var t = (y === null) ? '' : 'translate3d(0, ' + y + 'px, 0)';
+ setTransform(s, t);
+ },
+
+ /** @param {Event=} event */
+ _scroll: function(event) {
+ if (!this.header) {
+ return;
+ }
+
+ var sTop = this.scroller.scrollTop;
+
+ this._y = this._y || 0;
+ this._prevScrollTop = this._prevScrollTop || 0;
+
+ var y = Math.min(this.keepCondensedHeader ?
+ this._headerMargin : this.headerHeight, Math.max(0,
+ (this.noReveal ? sTop : this._y + sTop - this._prevScrollTop)));
+
+ if (this.condenses && this._prevScrollTop >= sTop && sTop > this._headerMargin) {
+ y = Math.max(y, this._headerMargin);
+ }
+
+ if (!event || !this.fixed && y !== this._y) {
+ this._transformHeader(y);
+ }
+
+ this._prevScrollTop = Math.max(sTop, 0);
+ this._y = y;
+
+ if (event) {
+ this.fire('content-scroll', {target: this.scroller}, {cancelable: false});
+ }
+ }
+
+ });
+
+ //determine proper transform mechanizm
+ if (document.documentElement.style.transform !== undefined) {
+ var setTransform = function(style, string) {
+ style.transform = string;
+ }
+ } else {
+ var setTransform = function(style, string) {
+ style.webkitTransform = string;
+ }
+ }
+
+})();
+
+</script>
diff --git a/static/bower_components/paper-scroll-header-panel/test/basic.html b/static/bower_components/paper-scroll-header-panel/test/basic.html
new file mode 100644
index 0000000..9017654
--- /dev/null
+++ b/static/bower_components/paper-scroll-header-panel/test/basic.html
@@ -0,0 +1,112 @@
+<!doctype html>
+<!--
+@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
+The complete set of authors may be found at http://polymer.github.io/AUTHORS
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
+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
+-->
+<html>
+<head>
+ <meta charset="UTF-8">
+ <title>paper-scroll-header-panel test</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
+
+ <link rel="import" href="../paper-scroll-header-panel.html">
+ <link rel="import" href="../demo/sample-content.html">
+ <link rel="import" href="../../paper-toolbar/paper-toolbar.html">
+ <link rel="import" href="../../test-fixture/test-fixture.html">
+</head>
+<body>
+
+ <test-fixture id="trivialProgress">
+ <template>
+ <paper-scroll-header-panel>
+ <paper-toolbar>
+ </paper-toolbar>
+ <div class="content">
+ <sample-content size="100"></sample-content>
+ </div>
+ </paper-scroll-header-panel>
+ </template>
+ </test-fixture>
+
+ <script>
+
+ suite('<paper-scroll-header-panel>', function() {
+ var scrollHeaderPanel, toolbar, content;
+
+ setup(function() {
+ scrollHeaderPanel = fixture('trivialProgress');
+
+ toolbar = Polymer.dom(scrollHeaderPanel).querySelector('paper-toolbar');
+ content = Polymer.dom(scrollHeaderPanel).querySelector('.content');
+ });
+
+ test('check default', function() {
+ assert.equal(scrollHeaderPanel.header, toolbar);
+ assert.equal(scrollHeaderPanel.content, content);
+ assert.equal(scrollHeaderPanel.condenses, false);
+ assert.equal(scrollHeaderPanel.noReveal, false);
+ assert.equal(scrollHeaderPanel.fixed, false);
+ assert.typeOf(scrollHeaderPanel.scroller, 'object');
+ assert.equal(scrollHeaderPanel.keepCondensedHeader, false);
+ assert.equal(scrollHeaderPanel.keepCondensedHeader, false);
+ assert.equal(scrollHeaderPanel.headerHeight, toolbar.offsetHeight);
+ assert.equal(scrollHeaderPanel.condensedHeaderHeight, toolbar.offsetHeight * 1 / 3);
+ });
+
+ test('condensation', function(done) {
+ var top1 = toolbar.getBoundingClientRect().top;
+
+ scrollHeaderPanel.condenses = true;
+ scrollHeaderPanel.headerHeight = 150;
+ scrollHeaderPanel.condensedHeaderHeight = 50;
+ scrollHeaderPanel.scroller.scrollTop = 300;
+
+ flush(function() {
+ assert.notEqual(top1, toolbar.getBoundingClientRect().top)
+ done();
+ });
+ });
+
+ test('paper-header-transform event', function(done) {
+ scrollHeaderPanel.condenses = false;
+ scrollHeaderPanel.headerHeight = scrollHeaderPanel.headerHeight || 150;
+
+ scrollHeaderPanel.addEventListener('paper-header-transform', function(e) {
+ assert.typeOf(e.detail.y, 'number');
+ assert.equal(e.detail.height, scrollHeaderPanel.headerHeight);
+ assert.equal(e.detail.condensedHeight, scrollHeaderPanel.condensedHeaderHeight);
+ done();
+ });
+
+ flush(function() {
+ scrollHeaderPanel.scroller.scrollTop = 300;
+ });
+ });
+
+ test('content-scroll event', function(done) {
+ scrollHeaderPanel.condenses = false;
+
+ scrollHeaderPanel.addEventListener('content-scroll', function(e) {
+ assert.equal(e.detail.target, scrollHeaderPanel.scroller);
+ done();
+ });
+
+ flush(function() {
+ scrollHeaderPanel.scroller.scrollTop = 300;
+ });
+ });
+ });
+
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/paper-scroll-header-panel/test/index.html b/static/bower_components/paper-scroll-header-panel/test/index.html
new file mode 100644
index 0000000..f07aca9
--- /dev/null
+++ b/static/bower_components/paper-scroll-header-panel/test/index.html
@@ -0,0 +1,25 @@
+<!doctype html>
+<!--
+@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
+The complete set of authors may be found at http://polymer.github.io/AUTHORS
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
+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
+-->
+<html>
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
+ <title>Tests</title>
+ <script src="../../web-component-tester/browser.js"></script>
+</head>
+<body>
+ <script>
+ WCT.loadSuites([
+ 'basic.html'
+ ]);
+ </script>
+</body>
+</html>
diff --git a/static/bower_components/paper-styles/.bower.json b/static/bower_components/paper-styles/.bower.json
new file mode 100644
index 0000000..32205aa
--- /dev/null
+++ b/static/bower_components/paper-styles/.bower.json
@@ -0,0 +1,40 @@
+{
+ "name": "paper-styles",
+ "version": "1.0.7",
+ "description": "Common (global) styles for Material Design elements.",
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "keywords": [
+ "web-component",
+ "polymer",
+ "style"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/paper-styles.git"
+ },
+ "main": "paper-styles.html",
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "homepage": "https://github.com/polymerelements/paper-styles/",
+ "ignore": [
+ "/.*"
+ ],
+ "dependencies": {
+ "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
+ "font-roboto": "PolymerElements/font-roboto#^1.0.0",
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ },
+ "_release": "1.0.7",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.0.7",
+ "commit": "c65f5ce6b898bb756fca35cedaa53c3e8011abeb"
+ },
+ "_source": "git://github.com/PolymerElements/paper-styles.git",
+ "_target": "^1.0.0",
+ "_originalSource": "PolymerElements/paper-styles"
+} \ No newline at end of file
diff --git a/static/bower_components/paper-styles/README.md b/static/bower_components/paper-styles/README.md
new file mode 100644
index 0000000..82a7847
--- /dev/null
+++ b/static/bower_components/paper-styles/README.md
@@ -0,0 +1,3 @@
+# paper-styles
+
+Material design CSS styles.
diff --git a/static/bower_components/paper-styles/bower.json b/static/bower_components/paper-styles/bower.json
new file mode 100644
index 0000000..576dc4c
--- /dev/null
+++ b/static/bower_components/paper-styles/bower.json
@@ -0,0 +1,31 @@
+{
+ "name": "paper-styles",
+ "version": "1.0.7",
+ "description": "Common (global) styles for Material Design elements.",
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "keywords": [
+ "web-component",
+ "polymer",
+ "style"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/paper-styles.git"
+ },
+ "main": "paper-styles.html",
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "homepage": "https://github.com/polymerelements/paper-styles/",
+ "ignore": [
+ "/.*"
+ ],
+ "dependencies": {
+ "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
+ "font-roboto": "PolymerElements/font-roboto#^1.0.0",
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ }
+}
diff --git a/static/bower_components/paper-styles/classes/global.html b/static/bower_components/paper-styles/classes/global.html
new file mode 100644
index 0000000..6f0d5dd
--- /dev/null
+++ b/static/bower_components/paper-styles/classes/global.html
@@ -0,0 +1,96 @@
+<!--
+@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="../paper-styles-classes.html">
+
+<!--
+A set of base styles that are applied to the document and standard elements that
+match the Material Design spec.
+-->
+<style>
+/*
+Note that there is a lot of style duplication here. The hope is that the Polymer
+0.8 styling solution will allow for inheritance of properties so that we can
+eventually avoid it.
+*/
+
+/* Mixins */
+
+/* [paper-font] */
+body {
+ font-family: 'Roboto', 'Noto', sans-serif;
+ -webkit-font-smoothing: antialiased; /* OS X subpixel AA bleed bug */
+}
+
+/* [paper-font=display2] */
+h1 {
+ font-size: 45px;
+ font-weight: 400;
+ letter-spacing: -.018em;
+ line-height: 48px;
+}
+
+/* [paper-font=display1] */
+h2 {
+ font-size: 34px;
+ font-weight: 400;
+ letter-spacing: -.01em;
+ line-height: 40px;
+}
+
+/* [paper-font=headline] */
+h3 {
+ font-size: 24px;
+ font-weight: 400;
+ letter-spacing: -.012em;
+ line-height: 32px;
+}
+
+/* [paper-font=subhead] */
+h4 {
+ font-size: 16px;
+ font-weight: 400;
+ line-height: 24px;
+}
+
+/* [paper-font=body2] */
+h5, h6 {
+ font-size: 14px;
+ font-weight: 500;
+ line-height: 24px;
+}
+
+/* [paper-font=button] */
+a {
+ font-size: 14px;
+ font-weight: 500;
+ letter-spacing: 0.018em;
+ line-height: 24px;
+ text-transform: uppercase;
+}
+
+/* Overrides */
+
+body, a {
+ color: #212121;
+}
+
+h1, h2, h3, h4, h5, h6, p {
+ margin: 0 0 20px 0;
+}
+
+h1, h2, h3, h4, h5, h6, a {
+ text-rendering: optimizeLegibility;
+}
+
+a {
+ text-decoration: none;
+}
+
+</style>
diff --git a/static/bower_components/paper-styles/classes/shadow-layout.html b/static/bower_components/paper-styles/classes/shadow-layout.html
new file mode 100644
index 0000000..fc69fb3
--- /dev/null
+++ b/static/bower_components/paper-styles/classes/shadow-layout.html
@@ -0,0 +1,302 @@
+<!--
+@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
+-->
+<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.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;
+ botttom: 0;
+ }
+
+ html /deep/ .fixed-bottom {
+ right: 0;
+ bottom: 0;
+ left: 0;
+ }
+
+ html /deep/ .fixed-left {
+ top: 0;
+ botttom: 0;
+ left: 0;
+ }
+
+</style>
diff --git a/static/bower_components/paper-styles/classes/shadow.html b/static/bower_components/paper-styles/classes/shadow.html
new file mode 100644
index 0000000..4c40a14
--- /dev/null
+++ b/static/bower_components/paper-styles/classes/shadow.html
@@ -0,0 +1,52 @@
+<!--
+@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
+-->
+
+<style>
+.shadow-transition {
+ transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
+}
+
+.shadow-elevation-2dp {
+ box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
+ 0 1px 5px 0 rgba(0, 0, 0, 0.12),
+ 0 3px 1px -2px rgba(0, 0, 0, 0.2);
+}
+
+.shadow-elevation-3dp {
+ box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.14),
+ 0 1px 8px 0 rgba(0, 0, 0, 0.12),
+ 0 3px 3px -2px rgba(0, 0, 0, 0.4);
+}
+
+.shadow-elevation-4dp {
+ box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14),
+ 0 1px 10px 0 rgba(0, 0, 0, 0.12),
+ 0 2px 4px -1px rgba(0, 0, 0, 0.4);
+}
+
+.shadow-elevation-6dp {
+ box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.14),
+ 0 1px 18px 0 rgba(0, 0, 0, 0.12),
+ 0 3px 5px -1px rgba(0, 0, 0, 0.4);
+}
+
+.shadow-elevation-8dp {
+ box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14),
+ 0 3px 14px 2px rgba(0, 0, 0, 0.12),
+ 0 5px 5px -3px rgba(0, 0, 0, 0.4);
+}
+
+.shadow-elevation-16dp {
+ box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14),
+ 0 6px 30px 5px rgba(0, 0, 0, 0.12),
+ 0 8px 10px -5px rgba(0, 0, 0, 0.4);
+}
+
+</style>
diff --git a/static/bower_components/paper-styles/classes/typography.html b/static/bower_components/paper-styles/classes/typography.html
new file mode 100644
index 0000000..5514abb
--- /dev/null
+++ b/static/bower_components/paper-styles/classes/typography.html
@@ -0,0 +1,171 @@
+<!--
+@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
+-->
+<!-- TODO(nevir): Should we upgrade Polymer/font-roboto to the final font? -->
+<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic,500,500italic,700,700italic">
+<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Inconsolata:400,700">
+
+<!--
+Typographic styles are provided matching the Material Design standard styles:
+http://www.google.com/design/spec/style/typography.html#typography-standard-styles
+
+To make use of them, apply a `paper-font-<style>` class to elements, matching
+the font style you wish it to inherit.
+
+ <header class="paper-font-display2">Hey there!</header>
+
+Note that these are English/Latin centric styles. You may need to further adjust
+line heights and weights for CJK typesetting. See the notes in the Material
+Design typography section.
+-->
+<style>
+
+.paper-font-display4,
+.paper-font-display3,
+.paper-font-display2,
+.paper-font-display1,
+.paper-font-headline,
+.paper-font-title,
+.paper-font-subhead,
+.paper-font-body2,
+.paper-font-body1,
+.paper-font-caption,
+.paper-font-menu,
+.paper-font-button {
+ font-family: 'Roboto', 'Noto', sans-serif;
+ -webkit-font-smoothing: antialiased; /* OS X subpixel AA bleed bug */
+}
+
+.paper-font-code2,
+.paper-font-code1 {
+ font-family: 'Inconsolata', 'Consolas', 'Source Code Pro', 'Monaco', 'Menlo', monospace;
+ -webkit-font-smoothing: antialiased; /* OS X subpixel AA bleed bug */
+}
+
+/* Opt for better kerning for headers & other short labels. */
+.paper-font-display4,
+.paper-font-display3,
+.paper-font-display2,
+.paper-font-display1,
+.paper-font-headline,
+.paper-font-title,
+.paper-font-subhead,
+.paper-font-menu,
+.paper-font-button {
+ text-rendering: optimizeLegibility;
+}
+
+/*
+"Line wrapping only applies to Body, Subhead, Headline, and the smaller Display
+styles. All other styles should exist as single lines."
+*/
+.paper-font-display4,
+.paper-font-display3,
+.paper-font-title,
+.paper-font-caption,
+.paper-font-menu,
+.paper-font-button {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.paper-font-display4 {
+ font-size: 112px;
+ font-weight: 300;
+ letter-spacing: -.044em;
+ line-height: 120px;
+}
+
+.paper-font-display3 {
+ font-size: 56px;
+ font-weight: 400;
+ letter-spacing: -.026em;
+ line-height: 60px;
+}
+
+.paper-font-display2 {
+ font-size: 45px;
+ font-weight: 400;
+ letter-spacing: -.018em;
+ line-height: 48px;
+}
+
+.paper-font-display1 {
+ font-size: 34px;
+ font-weight: 400;
+ letter-spacing: -.01em;
+ line-height: 40px;
+}
+
+.paper-font-headline {
+ font-size: 24px;
+ font-weight: 400;
+ letter-spacing: -.012em;
+ line-height: 32px;
+}
+
+.paper-font-title {
+ font-size: 20px;
+ font-weight: 500;
+ line-height: 28px;
+}
+
+.paper-font-subhead {
+ font-size: 16px;
+ font-weight: 400;
+ line-height: 24px;
+}
+
+.paper-font-body2 {
+ font-size: 14px;
+ font-weight: 500;
+ line-height: 24px;
+}
+
+.paper-font-body1 {
+ font-size: 14px;
+ font-weight: 400;
+ line-height: 20px;
+}
+
+.paper-font-caption {
+ font-size: 12px;
+ font-weight: 400;
+ letter-spacing: 0.011em;
+ line-height: 20px;
+}
+
+.paper-font-menu {
+ font-size: 13px;
+ font-weight: 500;
+ line-height: 24px;
+}
+
+.paper-font-button {
+ font-size: 14px;
+ font-weight: 500;
+ letter-spacing: 0.018em;
+ line-height: 24px;
+ text-transform: uppercase;
+}
+
+.paper-font-code2 {
+ font-size: 14px;
+ font-weight: 700;
+ line-height: 20px;
+}
+
+.paper-font-code1 {
+ font-size: 14px;
+ font-weight: 700;
+ line-height: 20px;
+}
+
+</style>
diff --git a/static/bower_components/paper-styles/color.html b/static/bower_components/paper-styles/color.html
new file mode 100644
index 0000000..f0be341
--- /dev/null
+++ b/static/bower_components/paper-styles/color.html
@@ -0,0 +1,333 @@
+<!--
+@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="../polymer/polymer.html">
+
+<style is="custom-style">
+
+ :root {
+
+ /* Material Design color palette for Google products */
+
+ --google-red-100: #f4c7c3;
+ --google-red-300: #e67c73;
+ --google-red-500: #db4437;
+ --google-red-700: #c53929;
+
+ --google-blue-100: #c6dafc;
+ --google-blue-300: #7baaf7;
+ --google-blue-500: #4285f4;
+ --google-blue-700: #3367d6;
+
+ --google-green-100: #b7e1cd;
+ --google-green-300: #57bb8a;
+ --google-green-500: #0f9d58;
+ --google-green-700: #0b8043;
+
+ --google-yellow-100: #fce8b2;
+ --google-yellow-300: #f7cb4d;
+ --google-yellow-500: #f4b400;
+ --google-yellow-700: #f09300;
+
+ --google-grey-100: #f5f5f5;
+ --google-grey-300: #e0e0e0;
+ --google-grey-500: #9e9e9e;
+ --google-grey-700: #616161;
+
+ /* Material Design color palette from online spec document */
+
+ --paper-red-50: #ffebee;
+ --paper-red-100: #ffcdd2;
+ --paper-red-200: #ef9a9a;
+ --paper-red-300: #e57373;
+ --paper-red-400: #ef5350;
+ --paper-red-500: #f44336;
+ --paper-red-600: #e53935;
+ --paper-red-700: #d32f2f;
+ --paper-red-800: #c62828;
+ --paper-red-900: #b71c1c;
+ --paper-red-a100: #ff8a80;
+ --paper-red-a200: #ff5252;
+ --paper-red-a400: #ff1744;
+ --paper-red-a700: #d50000;
+
+ --paper-pink-50: #fce4ec;
+ --paper-pink-100: #f8bbd0;
+ --paper-pink-200: #f48fb1;
+ --paper-pink-300: #f06292;
+ --paper-pink-400: #ec407a;
+ --paper-pink-500: #e91e63;
+ --paper-pink-600: #d81b60;
+ --paper-pink-700: #c2185b;
+ --paper-pink-800: #ad1457;
+ --paper-pink-900: #880e4f;
+ --paper-pink-a100: #ff80ab;
+ --paper-pink-a200: #ff4081;
+ --paper-pink-a400: #f50057;
+ --paper-pink-a700: #c51162;
+
+ --paper-purple-50: #f3e5f5;
+ --paper-purple-100: #e1bee7;
+ --paper-purple-200: #ce93d8;
+ --paper-purple-300: #ba68c8;
+ --paper-purple-400: #ab47bc;
+ --paper-purple-500: #9c27b0;
+ --paper-purple-600: #8e24aa;
+ --paper-purple-700: #7b1fa2;
+ --paper-purple-800: #6a1b9a;
+ --paper-purple-900: #4a148c;
+ --paper-purple-a100: #ea80fc;
+ --paper-purple-a200: #e040fb;
+ --paper-purple-a400: #d500f9;
+ --paper-purple-a700: #aa00ff;
+
+ --paper-deep-purple-50: #ede7f6;
+ --paper-deep-purple-100: #d1c4e9;
+ --paper-deep-purple-200: #b39ddb;
+ --paper-deep-purple-300: #9575cd;
+ --paper-deep-purple-400: #7e57c2;
+ --paper-deep-purple-500: #673ab7;
+ --paper-deep-purple-600: #5e35b1;
+ --paper-deep-purple-700: #512da8;
+ --paper-deep-purple-800: #4527a0;
+ --paper-deep-purple-900: #311b92;
+ --paper-deep-purple-a100: #b388ff;
+ --paper-deep-purple-a200: #7c4dff;
+ --paper-deep-purple-a400: #651fff;
+ --paper-deep-purple-a700: #6200ea;
+
+ --paper-indigo-50: #e8eaf6;
+ --paper-indigo-100: #c5cae9;
+ --paper-indigo-200: #9fa8da;
+ --paper-indigo-300: #7986cb;
+ --paper-indigo-400: #5c6bc0;
+ --paper-indigo-500: #3f51b5;
+ --paper-indigo-600: #3949ab;
+ --paper-indigo-700: #303f9f;
+ --paper-indigo-800: #283593;
+ --paper-indigo-900: #1a237e;
+ --paper-indigo-a100: #8c9eff;
+ --paper-indigo-a200: #536dfe;
+ --paper-indigo-a400: #3d5afe;
+ --paper-indigo-a700: #304ffe;
+
+ --paper-blue-50: #e3f2fd;
+ --paper-blue-100: #bbdefb;
+ --paper-blue-200: #90caf9;
+ --paper-blue-300: #64b5f6;
+ --paper-blue-400: #42a5f5;
+ --paper-blue-500: #2196f3;
+ --paper-blue-600: #1e88e5;
+ --paper-blue-700: #1976d2;
+ --paper-blue-800: #1565c0;
+ --paper-blue-900: #0d47a1;
+ --paper-blue-a100: #82b1ff;
+ --paper-blue-a200: #448aff;
+ --paper-blue-a400: #2979ff;
+ --paper-blue-a700: #2962ff;
+
+ --paper-light-blue-50: #e1f5fe;
+ --paper-light-blue-100: #b3e5fc;
+ --paper-light-blue-200: #81d4fa;
+ --paper-light-blue-300: #4fc3f7;
+ --paper-light-blue-400: #29b6f6;
+ --paper-light-blue-500: #03a9f4;
+ --paper-light-blue-600: #039be5;
+ --paper-light-blue-700: #0288d1;
+ --paper-light-blue-800: #0277bd;
+ --paper-light-blue-900: #01579b;
+ --paper-light-blue-a100: #80d8ff;
+ --paper-light-blue-a200: #40c4ff;
+ --paper-light-blue-a400: #00b0ff;
+ --paper-light-blue-a700: #0091ea;
+
+ --paper-cyan-50: #e0f7fa;
+ --paper-cyan-100: #b2ebf2;
+ --paper-cyan-200: #80deea;
+ --paper-cyan-300: #4dd0e1;
+ --paper-cyan-400: #26c6da;
+ --paper-cyan-500: #00bcd4;
+ --paper-cyan-600: #00acc1;
+ --paper-cyan-700: #0097a7;
+ --paper-cyan-800: #00838f;
+ --paper-cyan-900: #006064;
+ --paper-cyan-a100: #84ffff;
+ --paper-cyan-a200: #18ffff;
+ --paper-cyan-a400: #00e5ff;
+ --paper-cyan-a700: #00b8d4;
+
+ --paper-teal-50: #e0f2f1;
+ --paper-teal-100: #b2dfdb;
+ --paper-teal-200: #80cbc4;
+ --paper-teal-300: #4db6ac;
+ --paper-teal-400: #26a69a;
+ --paper-teal-500: #009688;
+ --paper-teal-600: #00897b;
+ --paper-teal-700: #00796b;
+ --paper-teal-800: #00695c;
+ --paper-teal-900: #004d40;
+ --paper-teal-a100: #a7ffeb;
+ --paper-teal-a200: #64ffda;
+ --paper-teal-a400: #1de9b6;
+ --paper-teal-a700: #00bfa5;
+
+ --paper-green-50: #e8f5e9;
+ --paper-green-100: #c8e6c9;
+ --paper-green-200: #a5d6a7;
+ --paper-green-300: #81c784;
+ --paper-green-400: #66bb6a;
+ --paper-green-500: #4caf50;
+ --paper-green-600: #43a047;
+ --paper-green-700: #388e3c;
+ --paper-green-800: #2e7d32;
+ --paper-green-900: #1b5e20;
+ --paper-green-a100: #b9f6ca;
+ --paper-green-a200: #69f0ae;
+ --paper-green-a400: #00e676;
+ --paper-green-a700: #00c853;
+
+ --paper-light-green-50: #f1f8e9;
+ --paper-light-green-100: #dcedc8;
+ --paper-light-green-200: #c5e1a5;
+ --paper-light-green-300: #aed581;
+ --paper-light-green-400: #9ccc65;
+ --paper-light-green-500: #8bc34a;
+ --paper-light-green-600: #7cb342;
+ --paper-light-green-700: #689f38;
+ --paper-light-green-800: #558b2f;
+ --paper-light-green-900: #33691e;
+ --paper-light-green-a100: #ccff90;
+ --paper-light-green-a200: #b2ff59;
+ --paper-light-green-a400: #76ff03;
+ --paper-light-green-a700: #64dd17;
+
+ --paper-lime-50: #f9fbe7;
+ --paper-lime-100: #f0f4c3;
+ --paper-lime-200: #e6ee9c;
+ --paper-lime-300: #dce775;
+ --paper-lime-400: #d4e157;
+ --paper-lime-500: #cddc39;
+ --paper-lime-600: #c0ca33;
+ --paper-lime-700: #afb42b;
+ --paper-lime-800: #9e9d24;
+ --paper-lime-900: #827717;
+ --paper-lime-a100: #f4ff81;
+ --paper-lime-a200: #eeff41;
+ --paper-lime-a400: #c6ff00;
+ --paper-lime-a700: #aeea00;
+
+ --paper-yellow-50: #fffde7;
+ --paper-yellow-100: #fff9c4;
+ --paper-yellow-200: #fff59d;
+ --paper-yellow-300: #fff176;
+ --paper-yellow-400: #ffee58;
+ --paper-yellow-500: #ffeb3b;
+ --paper-yellow-600: #fdd835;
+ --paper-yellow-700: #fbc02d;
+ --paper-yellow-800: #f9a825;
+ --paper-yellow-900: #f57f17;
+ --paper-yellow-a100: #ffff8d;
+ --paper-yellow-a200: #ffff00;
+ --paper-yellow-a400: #ffea00;
+ --paper-yellow-a700: #ffd600;
+
+ --paper-amber-50: #fff8e1;
+ --paper-amber-100: #ffecb3;
+ --paper-amber-200: #ffe082;
+ --paper-amber-300: #ffd54f;
+ --paper-amber-400: #ffca28;
+ --paper-amber-500: #ffc107;
+ --paper-amber-600: #ffb300;
+ --paper-amber-700: #ffa000;
+ --paper-amber-800: #ff8f00;
+ --paper-amber-900: #ff6f00;
+ --paper-amber-a100: #ffe57f;
+ --paper-amber-a200: #ffd740;
+ --paper-amber-a400: #ffc400;
+ --paper-amber-a700: #ffab00;
+
+ --paper-orange-50: #fff3e0;
+ --paper-orange-100: #ffe0b2;
+ --paper-orange-200: #ffcc80;
+ --paper-orange-300: #ffb74d;
+ --paper-orange-400: #ffa726;
+ --paper-orange-500: #ff9800;
+ --paper-orange-600: #fb8c00;
+ --paper-orange-700: #f57c00;
+ --paper-orange-800: #ef6c00;
+ --paper-orange-900: #e65100;
+ --paper-orange-a100: #ffd180;
+ --paper-orange-a200: #ffab40;
+ --paper-orange-a400: #ff9100;
+ --paper-orange-a700: #ff6500;
+
+ --paper-deep-orange-50: #ff5722;
+ --paper-deep-orange-100: #fbe9e7;
+ --paper-deep-orange-200: #ffccbc;
+ --paper-deep-orange-300: #ff8a65;
+ --paper-deep-orange-400: #ff7043;
+ --paper-deep-orange-500: #ff5722;
+ --paper-deep-orange-600: #f4511e;
+ --paper-deep-orange-700: #e64a19;
+ --paper-deep-orange-800: #d84315;
+ --paper-deep-orange-900: #bf360c;
+ --paper-deep-orange-a100: #ff9e80;
+ --paper-deep-orange-a200: #ff6e40;
+ --paper-deep-orange-a400: #ff3d00;
+ --paper-deep-orange-a700: #dd2c00;
+
+ --paper-brown-50: #efebe9;
+ --paper-brown-100: #d7ccc8;
+ --paper-brown-200: #bcaaa4;
+ --paper-brown-300: #a1887f;
+ --paper-brown-400: #8d6e63;
+ --paper-brown-500: #795548;
+ --paper-brown-600: #6d4c41;
+ --paper-brown-700: #5d4037;
+ --paper-brown-800: #4e342e;
+ --paper-brown-900: #3e2723;
+
+ --paper-grey-50: #fafafa;
+ --paper-grey-100: #f5f5f5;
+ --paper-grey-200: #eeeeee;
+ --paper-grey-300: #e0e0e0;
+ --paper-grey-400: #bdbdbd;
+ --paper-grey-500: #9e9e9e;
+ --paper-grey-600: #757575;
+ --paper-grey-700: #616161;
+ --paper-grey-800: #424242;
+ --paper-grey-900: #212121;
+
+ --paper-blue-grey-50: #eceff1;
+ --paper-blue-grey-100: #cfd8dc;
+ --paper-blue-grey-200: #b0bec5;
+ --paper-blue-grey-300: #90a4ae;
+ --paper-blue-grey-400: #78909c;
+ --paper-blue-grey-500: #607d8b;
+ --paper-blue-grey-600: #546e7a;
+ --paper-blue-grey-700: #455a64;
+ --paper-blue-grey-800: #37474f;
+ --paper-blue-grey-900: #263238;
+
+ /* opacity for dark text on a light background */
+ --dark-divider-opacity: 0.12;
+ --dark-disabled-opacity: 0.26; /* or hint text */
+ --dark-secondary-opacity: 0.54; /* or icon */
+ --dark-primary-opacity: 0.87;
+
+ /* opacity for light text on a dark background */
+ --light-divider-opacity: 0.12;
+ --light-disabled-opacity: 0.3; /* or hint text */
+ --light-secondary-opacity: 0.7; /* or icon */
+ --light-primary-opacity: 1.0;
+
+ }
+
+</style>
diff --git a/static/bower_components/paper-styles/default-theme.html b/static/bower_components/paper-styles/default-theme.html
new file mode 100644
index 0000000..add581c
--- /dev/null
+++ b/static/bower_components/paper-styles/default-theme.html
@@ -0,0 +1,39 @@
+<!--
+@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="../polymer/polymer.html">
+
+<style is="custom-style">
+
+ :root {
+
+ --dark-primary-color: #303f9f;
+
+ --default-primary-color: #3f51b5;
+
+ --light-primary-color: #c5cae9;
+
+ --text-primary-color: #ffffff;
+
+ --accent-color: #ff4081;
+
+ --primary-background-color: #ffffff;
+
+ --primary-text-color: #212121;
+
+ --secondary-text-color: #757575;
+
+ --disabled-text-color: #bdbdbd;
+
+ --divider-color: #e0e0e0;
+
+ }
+
+</style>
diff --git a/static/bower_components/paper-styles/demo-pages.html b/static/bower_components/paper-styles/demo-pages.html
new file mode 100644
index 0000000..44f2288
--- /dev/null
+++ b/static/bower_components/paper-styles/demo-pages.html
@@ -0,0 +1,72 @@
+<!--
+@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="../polymer/polymer.html">
+
+<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
+
+<link rel="import" href="color.html">
+<link rel="import" href="typography.html">
+<link rel="import" href="shadow.html">
+
+<style is="custom-style">
+
+ body {
+ font-family: 'Roboto', 'Noto', sans-serif;
+ font-size: 14px;
+ margin: 0;
+ padding: 24px;
+ background-color: var(--paper-grey-50);
+ }
+
+ .horizontal-section-container {
+ @apply(--layout-horizontal);
+ @apply(--layout-center-justified);
+ @apply(--layout-wrap);
+ }
+
+ .vertical-section-container {
+ @apply(--layout-vertical);
+ @apply(--center-justified);
+ }
+
+ .horizontal-section {
+ background-color: white;
+ padding: 24px;
+ margin-right: 24px;
+ min-width: 200px;
+
+ @apply(--shadow-elevation-2dp);
+ }
+
+ .vertical-section {
+ background-color: white;
+ padding: 24px;
+ margin: 0 24px 24px 24px;
+
+ @apply(--shadow-elevation-2dp);
+ }
+
+ .centered {
+ max-width: 400px;
+ margin-left: auto;
+ margin-right: auto;
+ }
+
+ code {
+ color: var(--google-grey-700);
+ }
+
+ /* TODO: remove this hack and use horizontal-section-container instead */
+ body > div.layout.horizontal.center-justified {
+ @apply(--layout-wrap);
+ }
+
+</style>
diff --git a/static/bower_components/paper-styles/demo.css b/static/bower_components/paper-styles/demo.css
new file mode 100644
index 0000000..efd8b47
--- /dev/null
+++ b/static/bower_components/paper-styles/demo.css
@@ -0,0 +1,25 @@
+/**
+@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
+
+*/
+body {
+ font-family: 'Roboto', 'Noto', sans-serif;
+ font-size: 14px;
+ margin: 0;
+ padding: 24px;
+}
+
+section {
+ padding: 20px 0;
+}
+
+section > div {
+ padding: 14px;
+ font-size: 16px;
+}
diff --git a/static/bower_components/paper-styles/demo/index.html b/static/bower_components/paper-styles/demo/index.html
new file mode 100644
index 0000000..42f449f
--- /dev/null
+++ b/static/bower_components/paper-styles/demo/index.html
@@ -0,0 +1,358 @@
+<!doctype html>
+
+<!--
+ @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
+-->
+
+<html>
+ <head>
+
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
+
+ <title>paper-styles demo</title>
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+
+ <link rel="import" href="../paper-styles.html">
+ <link rel="import" href="../demo-pages.html">
+
+ <style>
+
+ .redlines {
+ background: linear-gradient(0deg, transparent, transparent 3.5px, rgba(255,0,0,0.2) 3.5px, rgba(255,0,0,0.2) 4px);
+ background-size: 100% 4px;
+ }
+
+ .paragraph {
+ margin-bottom: 20px;
+ }
+
+ </style>
+
+ </head>
+ <body>
+
+ <!-- FIXME remove when https://github.com/Polymer/polymer/issues/1415 is resolved -->
+ <dom-module id="x-demo">
+
+ <style>
+
+ .paper-font-display4 {
+ @apply(--paper-font-display4);
+ }
+
+ .paper-font-display3 {
+ @apply(--paper-font-display3);
+ }
+
+ .paper-font-display2 {
+ @apply(--paper-font-display2);
+ }
+
+ .paper-font-display1 {
+ @apply(--paper-font-display1);
+ }
+
+ .paper-font-headline {
+ @apply(--paper-font-headline);
+ }
+
+ .paper-font-title {
+ @apply(--paper-font-title);
+ }
+
+ .paper-font-subhead {
+ @apply(--paper-font-subhead);
+ }
+
+ .paper-font-body2 {
+ @apply(--paper-font-body1);
+ }
+
+ .paper-font-body1 {
+ @apply(--paper-font-body1);
+ }
+
+ .paper-font-caption {
+ @apply(--paper-font-caption);
+ }
+
+ .paper-font-menu {
+ @apply(--paper-font-menu);
+ }
+
+ .paper-font-button {
+ @apply(--paper-font-button);
+ }
+
+ .mobile-app {
+ max-width: 320px;
+ }
+
+ .toolbar {
+ height: 144px;
+ padding: 16px;
+
+ background: var(--default-primary-color);
+ color: var(--text-primary-color);
+ @apply(--paper-font-display1);
+ }
+
+ .item, .disabled-item {
+ position: relative;
+ padding: 8px;
+ border: 1px solid;
+ border-color: var(--divider-color);
+ border-top: 0;
+ }
+
+ .item .primary {
+ color: var(--primary-text-color);
+
+ @apply(--paper-font-body2);
+ }
+
+ .item .secondary {
+ color: var(--secondary-text-color);
+
+ @apply(--paper-font-body1);
+ }
+
+ .disabled-item {
+ color: var(--disabled-text-color);
+
+ @apply(--paper-font-body2);
+ }
+
+ .fab {
+ position: absolute;
+ box-sizing: border-box;
+ padding: 8px;
+ width: 56px;
+ height: 56px;
+ right: 16px;
+ top: -28px;
+ border-radius: 50%;
+ text-align: center;
+
+ background: var(--accent-color);
+ color: var(--text-primary-color);
+ @apply(--paper-font-display1);
+ }
+
+ .shadow {
+ display: inline-block;
+ padding: 8px;
+ margin: 16px;
+ height: 50px;
+ width: 50px;
+ }
+
+ .shadow-2dp {
+ @apply(--shadow-elevation-2dp);
+ }
+
+ .shadow-3dp {
+ @apply(--shadow-elevation-3dp);
+ }
+
+ .shadow-4dp {
+ @apply(--shadow-elevation-4dp);
+ }
+
+ .shadow-6dp {
+ @apply(--shadow-elevation-6dp);
+ }
+
+ .shadow-8dp {
+ @apply(--shadow-elevation-8dp);
+ }
+
+ .shadow-16dp {
+ @apply(--shadow-elevation-16dp);
+ }
+
+ </style>
+
+ <template>
+
+ <h1>paper-styles</h1>
+
+ <section id="default-theme">
+ <h2>default-theme.html</h2>
+
+ <section class="mobile-app">
+ <div class="toolbar">
+ Title
+ </div>
+ <div class="item">
+ <div class="fab">+</div>
+ <div class="primary">Primary text</div>
+ <div class="secondary">Secondary text</div>
+ </div>
+ <div class="disabled-item">
+ Disabled
+ </div>
+ </section>
+ </section>
+
+ <section id="typography">
+ <h2>typography.html</h2>
+ <p>
+ Grumpy wizards make toxic brew for the evil Queen and Jack.
+ </p>
+ <section class="redlines paragraph">
+ <div class="paper-font-display4">Display 4</div>
+ <div class="paper-font-display3">Display 3</div>
+ <div class="paper-font-display2">Display 2</div>
+ <div class="paper-font-display1">Display 1</div>
+ <div class="paper-font-headline">Headline</div>
+ <div class="paper-font-title">Title</div>
+ <div class="paper-font-subhead">Subhead</div>
+ <div class="paper-font-body2">Body 2</div>
+ <div class="paper-font-body1">Body 1</div>
+ <div class="paper-font-caption">Caption</div>
+ <div class="paper-font-menu">Menu</div>
+ <div class="paper-font-button">Button</div>
+ </section>
+
+ <h3>Paragraphs</h3>
+
+ <h4>body2</h4>
+ <section class="paper-font-body2 redlines">
+ <p>
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi
+ tincidunt dui sit amet mi auctor, ac gravida magna aliquam. Fusce quis
+ purus elementum, tempus nisi vel, volutpat nulla. Vestibulum mollis
+ dictum tellus, vulputate porttitor arcu. Curabitur imperdiet risus id
+ egestas accumsan. Donec lectus felis, dignissim id iaculis sit amet,
+ faucibus in leo.
+ </p>
+ <p>
+ Mauris id urna ac ante ultrices commodo a imperdiet elit. Vivamus
+ interdum neque magna, eget dapibus est auctor et. Donec accumsan
+ libero nec augue scelerisque, ac egestas ante tincidunt. Proin
+ sollicitudin, mi eget sagittis mollis, arcu orci scelerisque turpis, a
+ sollicitudin tellus quam non sapien.
+ </p>
+ </section>
+
+ <h4>body1</h4>
+ <section class="paper-font-body1 redlines">
+ <p>
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi
+ tincidunt dui sit amet mi auctor, ac gravida magna aliquam. Fusce quis
+ purus elementum, tempus nisi vel, volutpat nulla. Vestibulum mollis
+ dictum tellus, vulputate porttitor arcu. Curabitur imperdiet risus id
+ egestas accumsan. Donec lectus felis, dignissim id iaculis sit amet,
+ faucibus in leo.
+ </p>
+ <p>
+ Mauris id urna ac ante ultrices commodo a imperdiet elit. Vivamus
+ interdum neque magna, eget dapibus est auctor et. Donec accumsan
+ libero nec augue scelerisque, ac egestas ante tincidunt. Proin
+ sollicitudin, mi eget sagittis mollis, arcu orci scelerisque turpis, a
+ sollicitudin tellus quam non sapien.
+ </p>
+ </section>
+ </section>
+
+ <section id="shadow">
+ <h2>shadow.html</h2>
+ <div class="shadow shadow-2dp">2dp</div>
+ <div class="shadow shadow-3dp">3dp</div>
+ <div class="shadow shadow-4dp">4dp</div>
+ <div class="shadow shadow-6dp">6dp</div>
+ <div class="shadow shadow-8dp">8dp</div>
+ <div class="shadow shadow-16dp">16dp</div>
+ </section>
+
+ </template>
+ </dom-module>
+
+ <script>
+ document.addEventListener('HTMLImportsLoaded', function() {
+ Polymer({
+ is: 'x-demo',
+ enableCustomStyleProperties: true
+ });
+ });
+ </script>
+
+ <x-demo></x-demo>
+
+ <section id="demo-page">
+ <h2>demo-pages.html</h2>
+
+ <h3>Horizontal sections</h3>
+ <div class="horizontal-section-container">
+ <div>
+ <h4>Column 1</h4>
+ <div class="horizontal-section">
+ <div>Oxygen</div>
+ <div>Carbon</div>
+ <div>Hydrogen</div>
+ <div>Nitrogen</div>
+ <div>Calcium</div>
+ </div>
+ </div>
+
+ <div>
+ <h4>Column 2</h4>
+ <div class="horizontal-section">
+ <div>Oxygen</div>
+ <div>Carbon</div>
+ <div>Hydrogen</div>
+ <div>Nitrogen</div>
+ <div>Calcium</div>
+ </div>
+ </div>
+
+ <div>
+ <h4>Column 3</h4>
+ <div class="horizontal-section">
+ <div>Oxygen</div>
+ <div>Carbon</div>
+ <div>Hydrogen</div>
+ <div>Nitrogen</div>
+ <div>Calcium</div>
+ </div>
+ </div>
+ </div>
+
+ <h3>Vertical sections</h3>
+ <div class="vertical-section-container">
+ <div>
+ <h4>Section 1</h4>
+ <div class="vertical-section">
+ <div>Oxygen</div>
+ <div>Carbon</div>
+ <div>Hydrogen</div>
+ <div>Nitrogen</div>
+ <div>Calcium</div>
+ </div>
+ </div>
+ </div>
+
+ <div class="vertical-section-container centered">
+ <h4>Section 2 (centered)</h4>
+ <div class="vertical-section">
+ <div>Oxygen</div>
+ <div>Carbon</div>
+ <div>Hydrogen</div>
+ <div>Nitrogen</div>
+ <div>Calcium</div>
+ </div>
+ </div>
+
+ </section>
+
+ </body>
+</html>
diff --git a/static/bower_components/paper-styles/paper-styles-classes.html b/static/bower_components/paper-styles/paper-styles-classes.html
new file mode 100644
index 0000000..ae315a5
--- /dev/null
+++ b/static/bower_components/paper-styles/paper-styles-classes.html
@@ -0,0 +1,14 @@
+<!--
+@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-flex-layout/classes/iron-flex-layout.html">
+
+<link rel="import" href="classes/typography.html">
+<link rel="import" href="classes/shadow.html">
diff --git a/static/bower_components/paper-styles/paper-styles.html b/static/bower_components/paper-styles/paper-styles.html
new file mode 100644
index 0000000..1e4fce5
--- /dev/null
+++ b/static/bower_components/paper-styles/paper-styles.html
@@ -0,0 +1,17 @@
+<!--
+@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-flex-layout/iron-flex-layout.html">
+<link rel="import" href="../iron-flex-layout/classes/iron-flex-layout.html">
+
+<link rel="import" href="color.html">
+<link rel="import" href="default-theme.html">
+<link rel="import" href="shadow.html">
+<link rel="import" href="typography.html">
diff --git a/static/bower_components/paper-styles/shadow.html b/static/bower_components/paper-styles/shadow.html
new file mode 100644
index 0000000..dfb7e8a
--- /dev/null
+++ b/static/bower_components/paper-styles/shadow.html
@@ -0,0 +1,65 @@
+<!--
+@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="../polymer/polymer.html">
+
+<style is="custom-style">
+
+ :root {
+
+ --shadow-transition: {
+ transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
+ };
+
+ --shadow-none: {
+ box-shadow: none;
+ };
+
+ /* from http://codepen.io/shyndman/pen/c5394ddf2e8b2a5c9185904b57421cdb */
+
+ --shadow-elevation-2dp: {
+ box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
+ 0 1px 5px 0 rgba(0, 0, 0, 0.12),
+ 0 3px 1px -2px rgba(0, 0, 0, 0.2);
+ };
+
+ --shadow-elevation-3dp: {
+ box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.14),
+ 0 1px 8px 0 rgba(0, 0, 0, 0.12),
+ 0 3px 3px -2px rgba(0, 0, 0, 0.4);
+ };
+
+ --shadow-elevation-4dp: {
+ box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14),
+ 0 1px 10px 0 rgba(0, 0, 0, 0.12),
+ 0 2px 4px -1px rgba(0, 0, 0, 0.4);
+ };
+
+ --shadow-elevation-6dp: {
+ box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.14),
+ 0 1px 18px 0 rgba(0, 0, 0, 0.12),
+ 0 3px 5px -1px rgba(0, 0, 0, 0.4);
+ };
+
+ --shadow-elevation-8dp: {
+ box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14),
+ 0 3px 14px 2px rgba(0, 0, 0, 0.12),
+ 0 5px 5px -3px rgba(0, 0, 0, 0.4);
+ };
+
+ --shadow-elevation-16dp: {
+ box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14),
+ 0 6px 30px 5px rgba(0, 0, 0, 0.12),
+ 0 8px 10px -5px rgba(0, 0, 0, 0.4);
+ };
+
+ }
+
+</style>
diff --git a/static/bower_components/paper-styles/typography.html b/static/bower_components/paper-styles/typography.html
new file mode 100644
index 0000000..15ae115
--- /dev/null
+++ b/static/bower_components/paper-styles/typography.html
@@ -0,0 +1,238 @@
+<!--
+@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="../polymer/polymer.html">
+<link rel="import" href="../font-roboto/roboto.html">
+
+<style is="custom-style">
+
+ :root {
+
+ /* Shared Styles */
+
+ /*
+ Unfortunately, we can't use nested rules
+ See https://github.com/Polymer/polymer/issues/1399
+ */
+ --paper-font-common-base: {
+ font-family: 'Roboto', 'Noto', sans-serif;
+ -webkit-font-smoothing: antialiased;
+ };
+
+ --paper-font-common-code: {
+ font-family: 'Inconsolata', 'Consolas', 'Source Code Pro', 'Monaco', 'Menlo', monospace;
+ -webkit-font-smoothing: antialiased;
+ };
+
+ --paper-font-common-expensive-kerning: {
+ text-rendering: optimizeLegibility;
+ };
+
+ --paper-font-common-nowrap: {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ };
+
+ /* Material Font Styles */
+
+ --paper-font-display4: {
+ /* @apply(--paper-font-common-base) */
+ font-family: 'Roboto', 'Noto', sans-serif;
+ -webkit-font-smoothing: antialiased;
+ /* @apply(--paper-font-common-expensive-kerning); */
+ text-rendering: optimizeLegibility;
+ /* @apply(--paper-font-common-nowrap); */
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+
+ font-size: 112px;
+ font-weight: 300;
+ letter-spacing: -.044em;
+ line-height: 120px;
+ };
+
+ --paper-font-display3: {
+ /* @apply(--paper-font-common-base) */
+ font-family: 'Roboto', 'Noto', sans-serif;
+ -webkit-font-smoothing: antialiased;
+ /* @apply(--paper-font-common-expensive-kerning); */
+ text-rendering: optimizeLegibility;
+ /* @apply(--paper-font-common-nowrap); */
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+
+ font-size: 56px;
+ font-weight: 400;
+ letter-spacing: -.026em;
+ line-height: 60px;
+ };
+
+ --paper-font-display2: {
+ /* @apply(--paper-font-common-base) */
+ font-family: 'Roboto', 'Noto', sans-serif;
+ -webkit-font-smoothing: antialiased;
+ /* @apply(--paper-font-common-expensive-kerning); */
+ text-rendering: optimizeLegibility;
+
+ font-size: 45px;
+ font-weight: 400;
+ letter-spacing: -.018em;
+ line-height: 48px;
+ };
+
+ --paper-font-display1: {
+ /* @apply(--paper-font-common-base) */
+ font-family: 'Roboto', 'Noto', sans-serif;
+ -webkit-font-smoothing: antialiased;
+ /* @apply(--paper-font-common-expensive-kerning); */
+ text-rendering: optimizeLegibility;
+
+ font-size: 34px;
+ font-weight: 400;
+ letter-spacing: -.01em;
+ line-height: 40px;
+ };
+
+ --paper-font-headline: {
+ /* @apply(--paper-font-common-base) */
+ font-family: 'Roboto', 'Noto', sans-serif;
+ -webkit-font-smoothing: antialiased;
+ /* @apply(--paper-font-common-expensive-kerning); */
+ text-rendering: optimizeLegibility;
+
+ font-size: 24px;
+ font-weight: 400;
+ letter-spacing: -.012em;
+ line-height: 32px;
+ };
+
+ --paper-font-title: {
+ /* @apply(--paper-font-common-base) */
+ font-family: 'Roboto', 'Noto', sans-serif;
+ -webkit-font-smoothing: antialiased;
+ /* @apply(--paper-font-common-expensive-kerning); */
+ text-rendering: optimizeLegibility;
+ /* @apply(--paper-font-common-nowrap); */
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+
+ font-size: 20px;
+ font-weight: 500;
+ line-height: 28px;
+ };
+
+ --paper-font-subhead: {
+ /* @apply(--paper-font-common-base) */
+ font-family: 'Roboto', 'Noto', sans-serif;
+ -webkit-font-smoothing: antialiased;
+ /* @apply(--paper-font-common-expensive-kerning); */
+ text-rendering: optimizeLegibility;
+
+ font-size: 16px;
+ font-weight: 400;
+ line-height: 24px;
+ };
+
+ --paper-font-body2: {
+ /* @apply(--paper-font-common-base) */
+ font-family: 'Roboto', 'Noto', sans-serif;
+ -webkit-font-smoothing: antialiased;
+
+ font-size: 14px;
+ font-weight: 500;
+ line-height: 24px;
+ };
+
+ --paper-font-body1: {
+ /* @apply(--paper-font-common-base) */
+ font-family: 'Roboto', 'Noto', sans-serif;
+ -webkit-font-smoothing: antialiased;
+
+ font-size: 14px;
+ font-weight: 400;
+ line-height: 20px;
+ };
+
+ --paper-font-caption: {
+ /* @apply(--paper-font-common-base) */
+ font-family: 'Roboto', 'Noto', sans-serif;
+ -webkit-font-smoothing: antialiased;
+ /* @apply(--paper-font-common-nowrap); */
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+
+ font-size: 12px;
+ font-weight: 400;
+ letter-spacing: 0.011em;
+ line-height: 20px;
+ };
+
+ --paper-font-menu: {
+ /* @apply(--paper-font-common-base) */
+ font-family: 'Roboto', 'Noto', sans-serif;
+ -webkit-font-smoothing: antialiased;
+ /* @apply(--paper-font-common-expensive-kerning); */
+ text-rendering: optimizeLegibility;
+ /* @apply(--paper-font-common-nowrap); */
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+
+ font-size: 13px;
+ font-weight: 500;
+ line-height: 24px;
+ };
+
+ --paper-font-button: {
+ /* @apply(--paper-font-common-base) */
+ font-family: 'Roboto', 'Noto', sans-serif;
+ -webkit-font-smoothing: antialiased;
+ /* @apply(--paper-font-common-expensive-kerning); */
+ text-rendering: optimizeLegibility;
+ /* @apply(--paper-font-common-nowrap); */
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+
+ font-size: 14px;
+ font-weight: 500;
+ letter-spacing: 0.018em;
+ line-height: 24px;
+ text-transform: uppercase;
+ };
+
+ --paper-font-code2: {
+ /* @apply(--paper-font-common-code); */
+ font-family: 'Inconsolata', 'Consolas', 'Source Code Pro', 'Monaco', 'Menlo', monospace;
+ -webkit-font-smoothing: antialiased;
+
+ font-size: 14px;
+ font-weight: 700;
+ line-height: 20px;
+ };
+
+ --paper-font-code1: {
+ /* @apply(--paper-font-common-code); */
+ font-family: 'Inconsolata', 'Consolas', 'Source Code Pro', 'Monaco', 'Menlo', monospace;
+ -webkit-font-smoothing: antialiased;
+
+ font-size: 14px;
+ font-weight: 500;
+ line-height: 20px;
+ };
+
+ }
+
+</style>
diff --git a/static/bower_components/paper-toolbar/.bower.json b/static/bower_components/paper-toolbar/.bower.json
new file mode 100644
index 0000000..de532ef
--- /dev/null
+++ b/static/bower_components/paper-toolbar/.bower.json
@@ -0,0 +1,45 @@
+{
+ "name": "paper-toolbar",
+ "version": "1.0.2",
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "description": "A material design toolbar that is easily customizable",
+ "private": true,
+ "main": [
+ "paper-toolbar.html"
+ ],
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "keywords": [
+ "web-components",
+ "polymer",
+ "toolbar",
+ "layout"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/paper-toolbar.git"
+ },
+ "dependencies": {
+ "paper-styles": "PolymerElements/paper-styles#^1.0.0",
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "iron-icons": "PolymerElements/iron-icons#^1.0.0",
+ "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0",
+ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
+ "test-fixture": "PolymerElements/test-fixture#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ },
+ "homepage": "https://github.com/PolymerElements/paper-toolbar",
+ "_release": "1.0.2",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.0.2",
+ "commit": "402eb11da736a5ae19713748bfa04cd96f3f7a0c"
+ },
+ "_source": "git://github.com/PolymerElements/paper-toolbar.git",
+ "_target": "^1.0.0",
+ "_originalSource": "PolymerElements/paper-toolbar"
+} \ No newline at end of file
diff --git a/static/bower_components/paper-toolbar/.gitignore b/static/bower_components/paper-toolbar/.gitignore
new file mode 100644
index 0000000..fbe05fc
--- /dev/null
+++ b/static/bower_components/paper-toolbar/.gitignore
@@ -0,0 +1 @@
+bower_components/
diff --git a/static/bower_components/paper-toolbar/README.md b/static/bower_components/paper-toolbar/README.md
new file mode 100644
index 0000000..4356276
--- /dev/null
+++ b/static/bower_components/paper-toolbar/README.md
@@ -0,0 +1,51 @@
+paper-toolbar
+============
+
+`paper-toolbar` is a horizontal bar containing items that can be used for
+label, navigation, search and actions. The items place inside the
+`paper-toolbar` are projected into a `class="horizontal center layout"` container inside of
+`paper-toolbar`'s Shadow DOM. You can use flex attributes to control the items'
+sizing.
+
+Example:
+
+```html
+<paper-toolbar>
+ <paper-icon-button icon="menu" on-tap="{{menuAction}}"></paper-icon-button>
+ <div class="title">Title</div>
+ <paper-icon-button icon="more" on-tap="{{moreAction}}"></paper-icon-button>
+</paper-toolbar>
+```
+
+`paper-toolbar` has a standard height, but can made be taller by setting `tall`
+class on the `paper-toolbar`. This will make the toolbar 3x the normal height.
+
+```html
+<paper-toolbar class="tall">
+ <paper-icon-button icon="menu"></paper-icon-button>
+</paper-toolbar>
+```
+
+Apply `medium-tall` class to make the toolbar medium tall. This will make the
+toolbar 2x the normal height.
+
+```html
+<paper-toolbar class="medium-tall">
+ <paper-icon-button icon="menu"></paper-icon-button>
+</paper-toolbar>
+```
+
+When `tall`, items can pin to either the top (default), middle or bottom. Use
+`middle` class for middle content and `bottom` class for bottom content.
+
+```html
+<paper-toolbar class="tall">
+ <paper-icon-button icon="menu"></paper-icon-button>
+ <div class="title middle">Middle Title</div>
+ <div class="title bottom">Bottom Title</div>
+</paper-toolbar>
+```
+
+For `medium-tall` toolbar, the middle and bottom contents overlap and are
+pinned to the bottom. But `middleJustify` and `bottomJustify` attributes are
+still honored separately.
diff --git a/static/bower_components/paper-toolbar/bower.json b/static/bower_components/paper-toolbar/bower.json
new file mode 100644
index 0000000..26a02b6
--- /dev/null
+++ b/static/bower_components/paper-toolbar/bower.json
@@ -0,0 +1,35 @@
+{
+ "name": "paper-toolbar",
+ "version": "1.0.2",
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "description": "A material design toolbar that is easily customizable",
+ "private": true,
+ "main": [
+ "paper-toolbar.html"
+ ],
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "keywords": [
+ "web-components",
+ "polymer",
+ "toolbar",
+ "layout"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/PolymerElements/paper-toolbar.git"
+ },
+ "dependencies": {
+ "paper-styles": "PolymerElements/paper-styles#^1.0.0",
+ "polymer": "Polymer/polymer#^1.0.0"
+ },
+ "devDependencies": {
+ "iron-icons": "PolymerElements/iron-icons#^1.0.0",
+ "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0",
+ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
+ "test-fixture": "PolymerElements/test-fixture#^1.0.0",
+ "web-component-tester": "*",
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
+ }
+}
diff --git a/static/bower_components/paper-toolbar/demo/index.html b/static/bower_components/paper-toolbar/demo/index.html
new file mode 100644
index 0000000..104bb14
--- /dev/null
+++ b/static/bower_components/paper-toolbar/demo/index.html
@@ -0,0 +1,81 @@
+<!doctype html>
+<!--
+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
+-->
+<html>
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
+
+ <title>paper-toolbar demo</title>
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+
+ <link rel="import" href="../../iron-icons/iron-icons.html">
+ <link rel="import" href="../../paper-icon-button/paper-icon-button.html">
+ <link rel="import" href="../../paper-styles/paper-styles.html">
+ <link rel="import" href="../paper-toolbar.html">
+
+ <style>
+ paper-toolbar + paper-toolbar {
+ margin-top: 20px;
+ }
+ </style>
+
+</head>
+<body>
+
+ <paper-toolbar>
+ <paper-icon-button icon="menu"></paper-icon-button>
+ <span class="title">Toolbar</span>
+ <paper-icon-button icon="refresh"></paper-icon-button>
+ <paper-icon-button icon="add">+</paper-icon-button>
+ </paper-toolbar>
+
+ <paper-toolbar class="tall">
+ <paper-icon-button icon="menu"></paper-icon-button>
+ <span class="title">Toolbar: tall</span>
+ <paper-icon-button icon="refresh"></paper-icon-button>
+ <paper-icon-button icon="add">+</paper-icon-button>
+ </paper-toolbar>
+
+ <paper-toolbar class="tall">
+ <paper-icon-button icon="menu" class="bottom"></paper-icon-button>
+ <span class="bottom title">Toolbar: tall with elements pin to the bottom</span>
+ <paper-icon-button icon="refresh" class="bottom"></paper-icon-button>
+ <paper-icon-button icon="add" class="bottom">+</paper-icon-button>
+ </paper-toolbar>
+
+ <paper-toolbar class="medium-tall">
+ <paper-icon-button icon="menu"></paper-icon-button>
+ <span class="flex"></span>
+ <paper-icon-button icon="refresh"></paper-icon-button>
+ <paper-icon-button icon="add">+</paper-icon-button>
+ <span class="bottom title">Toolbar: medium-tall with label aligns to the bottom</span>
+ </paper-toolbar>
+
+ <paper-toolbar class="tall">
+ <paper-icon-button icon="menu"></paper-icon-button>
+ <div class="flex"></div>
+ <paper-icon-button icon="refresh"></paper-icon-button>
+ <paper-icon-button icon="add">+</paper-icon-button>
+ <div class="middle title">label aligns to the middle</div>
+ <div class="bottom title">some stuffs align to the bottom</div>
+ </paper-toolbar>
+
+ <paper-toolbar class="tall">
+ <paper-icon-button icon="menu"></paper-icon-button>
+ <div class="flex"></div>
+ <paper-icon-button icon="refresh"></paper-icon-button>
+ <paper-icon-button icon="add">+</paper-icon-button>
+ <div class="middle title">element (e.g. progress) fits at the bottom of the toolbar</div>
+ <div class="bottom flex" style="height: 20px; background-color: #0f9d58;"></div>
+ </paper-toolbar>
+
+</body>
+</html>
diff --git a/static/bower_components/paper-toolbar/index.html b/static/bower_components/paper-toolbar/index.html
new file mode 100644
index 0000000..6533b73
--- /dev/null
+++ b/static/bower_components/paper-toolbar/index.html
@@ -0,0 +1,38 @@
+<!doctype html>
+<!--
+ @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
+-->
+<html>
+<head>
+
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
+
+ <title>paper-toolbar</title>
+
+ <script src="../webcomponentsjs/webcomponents-lite.js"></script>
+
+ <link rel="import" href="../polymer/polymer.html">
+ <link rel="import" href="../iron-component-page/iron-component-page.html">
+
+ <style>
+
+ body {
+ margin: 16px;
+ }
+
+ </style>
+
+</head>
+<body>
+
+ <iron-component-page></iron-component-page>
+
+</body>
+</html>
diff --git a/static/bower_components/paper-toolbar/paper-toolbar.html b/static/bower_components/paper-toolbar/paper-toolbar.html
new file mode 100644
index 0000000..153305e
--- /dev/null
+++ b/static/bower_components/paper-toolbar/paper-toolbar.html
@@ -0,0 +1,368 @@
+<!--
+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="../polymer/polymer.html">
+<link rel="import" href="../paper-styles/paper-styles.html">
+
+<!--
+`paper-toolbar` is a horizontal bar containing items that can be used for
+label, navigation, search and actions. The items place inside the
+`paper-toolbar` are projected into a `class="horizontal center layout"` container inside of
+`paper-toolbar`'s Shadow DOM. You can use flex attributes to control the items'
+sizing.
+
+Example:
+
+ <paper-toolbar>
+ <paper-icon-button icon="menu" on-tap="menuAction"></paper-icon-button>
+ <div class="title">Title</div>
+ <paper-icon-button icon="more-vert" on-tap="moreAction"></paper-icon-button>
+ </paper-toolbar>
+
+`paper-toolbar` has a standard height, but can made be taller by setting `tall`
+class on the `paper-toolbar`. This will make the toolbar 3x the normal height.
+
+ <paper-toolbar class="tall">
+ <paper-icon-button icon="menu"></paper-icon-button>
+ </paper-toolbar>
+
+Apply `medium-tall` class to make the toolbar medium tall. This will make the
+toolbar 2x the normal height.
+
+ <paper-toolbar class="medium-tall">
+ <paper-icon-button icon="menu"></paper-icon-button>
+ </paper-toolbar>
+
+When `tall`, items can pin to either the top (default), middle or bottom. Use
+`middle` class for middle content and `bottom` class for bottom content.
+
+ <paper-toolbar class="tall">
+ <paper-icon-button icon="menu"></paper-icon-button>
+ <div class="middle title">Middle Title</div>
+ <div class="bottom title">Bottom Title</div>
+ </paper-toolbar>
+
+For `medium-tall` toolbar, the middle and bottom contents overlap and are
+pinned to the bottom. But `middleJustify` and `bottomJustify` attributes are
+still honored separately.
+
+### Styling
+
+The following custom properties and mixins are available for styling:
+
+Custom property | Description | Default
+----------------|-------------|----------
+`--paper-toolbar-background` | Toolbar background color | `--default-primary-color`
+`--paper-toolbar-color` | Toolbar foreground color | `--text-primary-color`
+`--paper-toolbar` | Mixin applied to the toolbar | `{}`
+
+### Accessibility
+
+`<paper-toolbar>` has `role="toolbar"` by default. Any elements with the class `title` will
+be used as the label of the toolbar via `aria-labelledby`.
+
+@demo demo/index.html
+-->
+
+<dom-module id="paper-toolbar">
+
+ <style>
+ :host {
+ /* technical */
+ display: block;
+ position: relative;
+ box-sizing: border-box;
+ -moz-box-sizing: border-box;
+
+ /* size */
+ height: 64px;
+
+ background: var(--paper-toolbar-background, --default-primary-color);
+ color: var(--paper-toolbar-color, --text-primary-color);
+
+ @apply(--paper-toolbar);
+ }
+
+ :host(.animate) {
+ /* transition */
+ transition: height 0.18s ease-in;
+ }
+
+ :host(.medium-tall) {
+ height: 128px;
+ }
+
+ :host(.tall) {
+ height: 192px;
+ }
+
+ .toolbar-tools {
+ position: relative;
+ height: 64px;
+ padding: 0 16px;
+ pointer-events: none;
+ }
+
+ /*
+ * TODO: Where should media query breakpoints live so they can be shared between elements?
+ */
+
+ @media (max-width: 639px) {
+ :host {
+ height: 56px;
+ }
+
+ :host(.medium-tall) {
+ height: 112px;
+ }
+
+ :host(.tall) {
+ height: 168px;
+ }
+
+ .toolbar-tools {
+ height: 56px;
+ }
+ }
+
+ #topBar {
+ position: relative;
+ }
+
+ /* middle bar */
+ #middleBar {
+ position: absolute;
+ top: 0;
+ right: 0;
+ left: 0;
+ }
+
+ :host(.tall) #middleBar,
+ :host(.medium-tall) #middleBar {
+ -webkit-transform: translateY(100%);
+ transform: translateY(100%);
+ }
+
+ /* bottom bar */
+ #bottomBar {
+ position: absolute;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ }
+
+ /*
+ * make elements (e.g. buttons) respond to mouse/touch events
+ *
+ * `.toolbar-tools` disables touch events so multiple toolbars can stack and not
+ * absorb events. All children must have pointer events re-enabled to work as
+ * expected.
+ */
+ .toolbar-tools > ::content > *:not([disabled]) {
+ pointer-events: auto;
+ }
+
+ .toolbar-tools > ::content .title {
+ @apply(--paper-font-title);
+ @apply(--layout-flex);
+
+ pointer-events: none;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
+
+ /*
+ * Polymer/polymer/issues/1525
+ * --paper-font-title defines a `font-weight`
+ * let's override its value, but we need `important!`
+ * because all mixins are resolved in rule's selector that has higher precedence
+ * than the current selector.
+ */
+ font-weight: 400 !important;
+ }
+
+ /**
+ * TODO: Refactor these selectors
+ * Work in progress.
+ */
+ .toolbar-tools > ::content paper-icon-button[icon=menu] {
+ margin-right: 24px;
+ }
+
+ .toolbar-tools > ::content > .title,
+ .toolbar-tools > ::content[select=".middle"] > .title,
+ .toolbar-tools > ::content[select=".bottom"] > .title {
+ margin-left: 56px;
+ }
+
+ .toolbar-tools > ::content > paper-icon-button + .title,
+ .toolbar-tools > ::content[select=".middle"] paper-icon-button + .title,
+ .toolbar-tools > ::content[select=".bottom"] paper-icon-button + .title {
+ margin-left: 0;
+ }
+ </style>
+
+ <template>
+
+ <div id="topBar" class$="[[_computeBarClassName(justify)]]">
+ <content select=":not(.middle):not(.bottom)"></content>
+ </div>
+
+ <div id="middleBar" class$="[[_computeBarClassName(middleJustify)]]">
+ <content select=".middle"></content>
+ </div>
+
+ <div id="bottomBar" class$="[[_computeBarClassName(bottomJustify)]]">
+ <content select=".bottom"></content>
+ </div>
+
+ </template>
+
+</dom-module>
+
+<script>
+
+ (function() {
+
+ 'use strict';
+
+ function classNames(obj) {
+ var classNames = [];
+ for (var key in obj) {
+ if (obj.hasOwnProperty(key) && obj[key]) {
+ classNames.push(key);
+ }
+ }
+
+ return classNames.join(' ');
+ }
+
+ Polymer({
+
+ is: 'paper-toolbar',
+
+ hostAttributes: {
+ 'role': 'toolbar'
+ },
+
+ properties: {
+
+ /**
+ * Controls how the items are aligned horizontally when they are placed
+ * at the bottom.
+ * Options are `start`, `center`, `end`, `justified` and `around`.
+ *
+ * @attribute bottomJustify
+ * @type string
+ * @default ''
+ */
+ bottomJustify: {
+ type: String,
+ value: ''
+ },
+
+ /**
+ * Controls how the items are aligned horizontally.
+ * Options are `start`, `center`, `end`, `justified` and `around`.
+ *
+ * @attribute justify
+ * @type string
+ * @default ''
+ */
+ justify: {
+ type: String,
+ value: ''
+ },
+
+ /**
+ * Controls how the items are aligned horizontally when they are placed
+ * in the middle.
+ * Options are `start`, `center`, `end`, `justified` and `around`.
+ *
+ * @attribute middleJustify
+ * @type string
+ * @default ''
+ */
+ middleJustify: {
+ type: String,
+ value: ''
+ }
+
+ },
+
+ attached: function() {
+ this._observer = this._observe(this);
+ this._updateAriaLabelledBy();
+ },
+
+ detached: function() {
+ if (this._observer) {
+ this._observer.disconnect();
+ }
+ },
+
+ _observe: function(node) {
+ var observer = new MutationObserver(function() {
+ this._updateAriaLabelledBy();
+ }.bind(this));
+ observer.observe(node, {
+ childList: true,
+ subtree: true
+ });
+ return observer;
+ },
+
+ _updateAriaLabelledBy: function() {
+ var labelledBy = [];
+ var contents = Polymer.dom(this.root).querySelectorAll('content');
+ for (var content, index = 0; content = contents[index]; index++) {
+ var nodes = Polymer.dom(content).getDistributedNodes();
+ for (var node, jndex = 0; node = nodes[jndex]; jndex++) {
+ if (node.classList && node.classList.contains('title')) {
+ if (node.id) {
+ labelledBy.push(node.id);
+ } else {
+ var id = 'paper-toolbar-label-' + Math.floor(Math.random() * 10000);
+ node.id = id;
+ labelledBy.push(id);
+ }
+ }
+ }
+ }
+ if (labelledBy.length > 0) {
+ this.setAttribute('aria-labelledby', labelledBy.join(' '));
+ }
+ },
+
+ _computeBarClassName: function(barJustify) {
+ var classObj = {
+ center: true,
+ horizontal: true,
+ layout: true,
+ 'toolbar-tools': true
+ };
+
+ // If a blank string or any falsy value is given, no other class name is
+ // added.
+ if (barJustify) {
+ var justifyClassName = (barJustify === 'justified') ?
+ barJustify :
+ barJustify + '-justified';
+
+ classObj[justifyClassName] = true;
+ }
+
+ return classNames(classObj);
+ }
+
+ });
+
+ }());
+
+</script>
diff --git a/static/bower_components/paper-toolbar/test/index.html b/static/bower_components/paper-toolbar/test/index.html
new file mode 100644
index 0000000..a1bd42a
--- /dev/null
+++ b/static/bower_components/paper-toolbar/test/index.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<!--
+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
+-->
+<html>
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
+ <title>paper-toolbar tests</title>
+ <script src="../../web-component-tester/browser.js"></script>
+</head>
+<body>
+ <script>
+ WCT.loadSuites([
+ 'paper-toolbar.html'
+ ]);
+ </script>
+</body>
+</html>
diff --git a/static/bower_components/paper-toolbar/test/paper-toolbar.html b/static/bower_components/paper-toolbar/test/paper-toolbar.html
new file mode 100644
index 0000000..a5998c1
--- /dev/null
+++ b/static/bower_components/paper-toolbar/test/paper-toolbar.html
@@ -0,0 +1,147 @@
+<!doctype html>
+<!--
+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
+-->
+<html>
+<head>
+ <meta charset="UTF-8">
+ <title>paper-toolbar basic tests</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
+
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
+ <script src="../../web-component-tester/browser.js"></script>
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
+
+ <link rel="import" href="../../test-fixture/test-fixture.html">
+ <link rel="import" href="../../polymer/polymer.html">
+ <link rel="import" href="../paper-toolbar.html">
+
+</head>
+<body>
+
+ <test-fixture id="basic">
+ <template>
+ <paper-toolbar></paper-toolbar>
+ </template>
+ </test-fixture>
+
+ <test-fixture id="title">
+ <template>
+ <paper-toolbar>
+ <span class="title">Title</span>
+ </paper-toolbar>
+ </template>
+ </test-fixture>
+
+ <test-fixture id="title-with-id">
+ <template>
+ <paper-toolbar>
+ <span class="title" id="title">Title</span>
+ </paper-toolbar>
+ </template>
+ </test-fixture>
+
+ <test-fixture id="multiple-titles">
+ <template>
+ <paper-toolbar>
+ <span class="title">Title 1</span>
+ <span class="title">Title 2</span>
+ </paper-toolbar>
+ </template>
+ </test-fixture>
+
+ <script>
+ 'use strict';
+
+ suite('basic', function() {
+
+ var toolbar;
+
+ setup(function() {
+ toolbar = fixture('basic');
+ });
+
+ test('has expected medium-tall height', function() {
+ var old = toolbar.offsetHeight;
+ toolbar.classList.add('medium-tall');
+ expect(toolbar.offsetHeight).to.be.eql(old * 2);
+ });
+
+ test('has expected tall height', function() {
+ var old = toolbar.offsetHeight;
+ toolbar.classList.add('tall');
+ expect(toolbar.offsetHeight).to.be.eql(old * 3);
+ });
+
+ test('distributes nodes to topBar by default', function() {
+ var item = document.createElement('div');
+ Polymer.dom(toolbar).appendChild(item);
+ Polymer.dom.flush();
+
+ var insertionPoint = Polymer.dom(item).getDestinationInsertionPoints()[0];
+ expect(Polymer.dom(insertionPoint).parentNode).to.be.eql(toolbar.$.topBar);
+ });
+
+ test('distributes nodes with "middle" class to middleBar', function() {
+ var item = document.createElement('div');
+ item.classList.add('middle');
+ Polymer.dom(toolbar).appendChild(item);
+ Polymer.dom.flush();
+
+ var insertionPoint = Polymer.dom(item).getDestinationInsertionPoints()[0];
+ expect(Polymer.dom(insertionPoint).parentNode).to.be.eql(toolbar.$.middleBar);
+ });
+
+ test('distributes nodes with "bottom" class to bottombar', function() {
+ var item = document.createElement('div');
+ item.classList.add('bottom');
+ Polymer.dom(toolbar).appendChild(item);
+ Polymer.dom.flush();
+
+ var insertionPoint = Polymer.dom(item).getDestinationInsertionPoints()[0];
+ expect(Polymer.dom(insertionPoint).parentNode).to.be.eql(toolbar.$.bottomBar);
+ });
+
+ });
+
+ suite('a11y', function() {
+
+ test('has role="toolbar"', function() {
+ var toolbar = fixture('basic');
+ assert.equal(toolbar.getAttribute('role'), 'toolbar', 'has role="toolbar"');
+ });
+
+ test('children with .title becomes the label', function() {
+ var toolbar = fixture('title');
+ assert.isTrue(toolbar.hasAttribute('aria-labelledby'), 'has aria-labelledby');
+ assert.equal(toolbar.getAttribute('aria-labelledby'), Polymer.dom(toolbar).querySelector('.title').id, 'aria-labelledby has the id of the .title element');
+ });
+
+ test('existing ids on titles are preserved', function() {
+ var toolbar = fixture('title-with-id');
+ assert.isTrue(toolbar.hasAttribute('aria-labelledby'), 'has aria-labelledby');
+ assert.equal(Polymer.dom(toolbar).querySelector('.title').id, 'title', 'id is preserved');
+ });
+
+ test('multiple children with .title becomes the label', function() {
+ var toolbar = fixture('multiple-titles');
+ assert.isTrue(toolbar.hasAttribute('aria-labelledby'), 'has aria-labelledby');
+ var ids = [];
+ var titles = Polymer.dom(toolbar).querySelectorAll('.title');
+ for (var title, index = 0; title = titles[index]; index++) {
+ ids.push(title.id);
+ }
+ assert.equal(toolbar.getAttribute('aria-labelledby'), ids.join(' '), 'aria-labelledby has the id of all .title elements');
+ });
+
+ });
+
+ </script>
+
+</body>
+</html>
diff --git a/static/bower_components/polymer/.bower.json b/static/bower_components/polymer/.bower.json
new file mode 100644
index 0000000..d0373ee
--- /dev/null
+++ b/static/bower_components/polymer/.bower.json
@@ -0,0 +1,36 @@
+{
+ "name": "polymer",
+ "version": "1.0.5",
+ "main": [
+ "polymer.html"
+ ],
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "ignore": [
+ "/.*",
+ "/test/"
+ ],
+ "authors": [
+ "The Polymer Authors (http://polymer.github.io/AUTHORS.txt)"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/Polymer/polymer.git"
+ },
+ "dependencies": {
+ "webcomponentsjs": "^0.7.2"
+ },
+ "devDependencies": {
+ "web-component-tester": "*"
+ },
+ "private": true,
+ "homepage": "https://github.com/Polymer/polymer",
+ "_release": "1.0.5",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.0.5",
+ "commit": "b93f076d7b2606733d7166f311b77550deb98a39"
+ },
+ "_source": "git://github.com/Polymer/polymer.git",
+ "_target": "^1.0.0",
+ "_originalSource": "Polymer/polymer"
+} \ No newline at end of file
diff --git a/static/bower_components/polymer/LICENSE.txt b/static/bower_components/polymer/LICENSE.txt
new file mode 100644
index 0000000..95987ba
--- /dev/null
+++ b/static/bower_components/polymer/LICENSE.txt
@@ -0,0 +1,27 @@
+// Copyright (c) 2014 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 are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/static/bower_components/polymer/bower.json b/static/bower_components/polymer/bower.json
new file mode 100644
index 0000000..a8799d3
--- /dev/null
+++ b/static/bower_components/polymer/bower.json
@@ -0,0 +1,26 @@
+{
+ "name": "polymer",
+ "version": "1.0.5",
+ "main": [
+ "polymer.html"
+ ],
+ "license": "http://polymer.github.io/LICENSE.txt",
+ "ignore": [
+ "/.*",
+ "/test/"
+ ],
+ "authors": [
+ "The Polymer Authors (http://polymer.github.io/AUTHORS.txt)"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/Polymer/polymer.git"
+ },
+ "dependencies": {
+ "webcomponentsjs": "^0.7.2"
+ },
+ "devDependencies": {
+ "web-component-tester": "*"
+ },
+ "private": true
+}
diff --git a/static/bower_components/polymer/build.log b/static/bower_components/polymer/build.log
new file mode 100644
index 0000000..4e4c0d8
--- /dev/null
+++ b/static/bower_components/polymer/build.log
@@ -0,0 +1,26 @@
+BUILD LOG
+---------
+Build Time: 2015-06-25T16:47:16-0700
+
+NODEJS INFORMATION
+==================
+nodejs: v0.12.2
+del: 1.2.0
+gulp: 3.9.0
+gulp-audit: 1.0.0
+gulp-rename: 1.2.2
+gulp-replace: 0.5.3
+gulp-vulcanize: 6.0.1
+polyclean: 1.2.0
+run-sequence: 1.1.1
+lazypipe: 0.2.4
+
+REPO REVISIONS
+==============
+polymer: e859b532a7fb5b10ae1311c22988b76cc6cbc04a
+
+BUILD HASHES
+============
+polymer-mini.html: 93f4b283ba95fd687562b965bf7651eab7a66a1f
+polymer-micro.html: db73818583996fe27b9f1119f0e4ef46ccadc859
+polymer.html: 9b0cd22e821422a8afe809ca5715612e682e5622 \ No newline at end of file
diff --git a/static/bower_components/polymer/polymer-micro.html b/static/bower_components/polymer/polymer-micro.html
new file mode 100644
index 0000000..4bf4234
--- /dev/null
+++ b/static/bower_components/polymer/polymer-micro.html
@@ -0,0 +1,529 @@
+<!--
+@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);
+}
+}
+}());
+Polymer = {
+Settings: function () {
+var user = window.Polymer || {};
+location.search.slice(1).split('&').forEach(function (o) {
+o = o.split('=');
+o[0] && (user[o[0]] = o[1] || true);
+});
+var wantShadow = user.dom === 'shadow';
+var hasShadow = Boolean(Element.prototype.createShadowRoot);
+var nativeShadow = hasShadow && !window.ShadowDOMPolyfill;
+var useShadow = wantShadow && hasShadow;
+var hasNativeImports = Boolean('import' in document.createElement('link'));
+var useNativeImports = hasNativeImports;
+var useNativeCustomElements = !window.CustomElements || window.CustomElements.useNative;
+return {
+wantShadow: wantShadow,
+hasShadow: hasShadow,
+nativeShadow: nativeShadow,
+useShadow: useShadow,
+useNativeShadow: useShadow && nativeShadow,
+useNativeImports: useNativeImports,
+useNativeCustomElements: useNativeCustomElements
+};
+}()
+};
+(function () {
+var userPolymer = window.Polymer;
+window.Polymer = function (prototype) {
+var ctor = desugar(prototype);
+prototype = ctor.prototype;
+var options = { prototype: prototype };
+if (prototype.extends) {
+options.extends = prototype.extends;
+}
+Polymer.telemetry._registrate(prototype);
+document.registerElement(prototype.is, options);
+return ctor;
+};
+var desugar = function (prototype) {
+prototype = Polymer.Base.chainObject(prototype, Polymer.Base);
+prototype.registerCallback();
+return prototype.constructor;
+};
+window.Polymer = Polymer;
+if (userPolymer) {
+for (var i in userPolymer) {
+Polymer[i] = userPolymer[i];
+}
+}
+Polymer.Class = desugar;
+}());
+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.Base = {
+_addFeature: function (feature) {
+this.extend(this, feature);
+},
+registerCallback: function () {
+this._registerFeatures();
+this._doBehavior('registered');
+},
+createdCallback: function () {
+Polymer.telemetry.instanceCount++;
+this.root = this;
+this._doBehavior('created');
+this._initFeatures();
+},
+attachedCallback: function () {
+this.isAttached = true;
+this._doBehavior('attached');
+},
+detachedCallback: function () {
+this.isAttached = false;
+this._doBehavior('detached');
+},
+attributeChangedCallback: function (name) {
+this._setAttributeToProperty(this, name);
+this._doBehavior('attributeChanged', arguments);
+},
+extend: function (prototype, api) {
+if (prototype && api) {
+Object.getOwnPropertyNames(api).forEach(function (n) {
+this.copyOwnProperty(n, api, prototype);
+}, this);
+}
+return prototype || api;
+},
+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);
+}
+},
+_log: console.log.apply.bind(console.log, console),
+_warn: console.warn.apply.bind(console.warn, console),
+_error: console.error.apply.bind(console.error, console),
+_logf: function () {
+return this._logPrefix.concat([this.is]).concat(Array.prototype.slice.call(arguments, 0));
+}
+};
+Polymer.Base._logPrefix = function () {
+var color = window.chrome || /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.telemetry.instanceCount = 0;
+(function () {
+var modules = {};
+var DomModule = function () {
+return document.createElement('dom-module');
+};
+DomModule.prototype = Object.create(HTMLElement.prototype);
+DomModule.prototype.constructor = DomModule;
+DomModule.prototype.createdCallback = function () {
+var id = this.id || this.getAttribute('name') || this.getAttribute('is');
+if (id) {
+this.id = id;
+modules[id] = this;
+}
+};
+DomModule.prototype.import = function (id, slctr) {
+var m = modules[id];
+if (!m) {
+forceDocumentUpgrade();
+m = modules[id];
+}
+if (m && slctr) {
+m = m.querySelector(slctr);
+}
+return m;
+};
+var cePolyfill = window.CustomElements && !CustomElements.useNative;
+if (cePolyfill) {
+var ready = CustomElements.ready;
+CustomElements.ready = true;
+}
+document.registerElement('dom-module', DomModule);
+if (cePolyfill) {
+CustomElements.ready = ready;
+}
+function forceDocumentUpgrade() {
+if (cePolyfill) {
+var script = document._currentScript || document.currentScript;
+if (script) {
+CustomElements.upgradeAll(script.ownerDocument);
+}
+}
+}
+}());
+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;
+}
+}
+}
+});
+Polymer.Base._addFeature({
+behaviors: [],
+_prepBehaviors: function () {
+if (this.behaviors.length) {
+this.behaviors = this._flattenBehaviorsList(this.behaviors);
+}
+this._prepAllBehaviors(this.behaviors);
+},
+_flattenBehaviorsList: function (behaviors) {
+var flat = [];
+behaviors.forEach(function (b) {
+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'));
+}
+}, this);
+return flat;
+},
+_prepAllBehaviors: function (behaviors) {
+for (var i = behaviors.length - 1; i >= 0; i--) {
+this._mixinBehavior(behaviors[i]);
+}
+for (var i = 0, l = behaviors.length; i < l; i++) {
+this._prepBehavior(behaviors[i]);
+}
+this._prepBehavior(this);
+},
+_mixinBehavior: function (b) {
+Object.getOwnPropertyNames(b).forEach(function (n) {
+switch (n) {
+case 'hostAttributes':
+case 'registered':
+case 'properties':
+case 'observers':
+case 'listeners':
+case 'created':
+case 'attached':
+case 'detached':
+case 'attributeChanged':
+case 'configure':
+case 'ready':
+break;
+default:
+if (!this.hasOwnProperty(n)) {
+this.copyOwnProperty(n, b, this);
+}
+break;
+}
+}, this);
+},
+_doBehavior: function (name, args) {
+this.behaviors.forEach(function (b) {
+this._invokeBehavior(b, name, args);
+}, this);
+this._invokeBehavior(this, name, args);
+},
+_invokeBehavior: function (b, name, args) {
+var fn = b[name];
+if (fn) {
+fn.apply(this, args || Polymer.nar);
+}
+},
+_marshalBehaviors: function () {
+this.behaviors.forEach(function (b) {
+this._marshalBehavior(b);
+}, this);
+this._marshalBehavior(this);
+}
+});
+Polymer.Base._addFeature({
+_prepExtends: function () {
+if (this.extends) {
+this.__proto__ = this._getExtendedPrototype(this.extends);
+}
+},
+_getExtendedPrototype: function (tag) {
+return this._getExtendedNativePrototype(tag);
+},
+_nativePrototypes: {},
+_getExtendedNativePrototype: function (tag) {
+var p = this._nativePrototypes[tag];
+if (!p) {
+var np = this.getNativePrototype(tag);
+p = this.extend(Object.create(np), Polymer.Base);
+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({
+properties: {},
+getPropertyInfo: function (property) {
+var info = this._getPropertyInfo(property, this.properties);
+if (!info) {
+this.behaviors.some(function (b) {
+return info = this._getPropertyInfo(property, b.properties);
+}, this);
+}
+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;
+}
+});
+Polymer.CaseMap = {
+_caseMap: {},
+dashToCamelCase: function (dash) {
+var mapped = Polymer.CaseMap._caseMap[dash];
+if (mapped) {
+return mapped;
+}
+if (dash.indexOf('-') < 0) {
+return Polymer.CaseMap._caseMap[dash] = dash;
+}
+return Polymer.CaseMap._caseMap[dash] = dash.replace(/-([a-z])/g, function (m) {
+return m[1].toUpperCase();
+});
+},
+camelToDashCase: function (camel) {
+var mapped = Polymer.CaseMap._caseMap[camel];
+if (mapped) {
+return mapped;
+}
+return Polymer.CaseMap._caseMap[camel] = camel.replace(/([a-z][A-Z])/g, function (g) {
+return g[0] + '-' + g[1].toLowerCase();
+});
+}
+};
+Polymer.Base._addFeature({
+_prepAttributes: function () {
+this._aggregatedAttributes = {};
+},
+_addHostAttributes: function (attributes) {
+if (attributes) {
+this.mixin(this._aggregatedAttributes, attributes);
+}
+},
+_marshalHostAttributes: function () {
+this._applyAttributes(this, this._aggregatedAttributes);
+},
+_applyAttributes: function (node, attr$) {
+for (var n in attr$) {
+if (!this.hasAttribute(n) && n !== 'class') {
+this.serializeValueToAttribute(attr$[n], n, this);
+}
+}
+},
+_marshalAttributes: function () {
+this._takeAttributesToModel(this);
+},
+_takeAttributesToModel: function (model) {
+for (var i = 0, l = this.attributes.length; i < l; i++) {
+this._setAttributeToProperty(model, this.attributes[i].name);
+}
+},
+_setAttributeToProperty: function (model, attrName) {
+if (!this._serializing) {
+var propName = Polymer.CaseMap.dashToCamelCase(attrName);
+var info = this.getPropertyInfo(propName);
+if (info.defined || this._propertyEffects && this._propertyEffects[propName]) {
+var val = this.getAttribute(attrName);
+model[propName] = this.deserialize(val, info.type);
+}
+}
+},
+_serializing: false,
+reflectPropertyToAttribute: function (name) {
+this._serializing = true;
+this.serializeValueToAttribute(this[name], Polymer.CaseMap.camelToDashCase(name));
+this._serializing = false;
+},
+serializeValueToAttribute: function (value, attribute, node) {
+var str = this.serialize(value);
+(node || this)[str === undefined ? 'removeAttribute' : '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;
+} else if (value) {
+try {
+return JSON.stringify(value);
+} catch (x) {
+return '';
+}
+}
+default:
+return value != null ? value : undefined;
+}
+}
+});
+Polymer.Base._addFeature({
+_setupDebouncers: function () {
+this._debouncers = {};
+},
+debounce: function (jobName, callback, wait) {
+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.version = '1.0.5';
+Polymer.Base._addFeature({
+_registerFeatures: function () {
+this._prepIs();
+this._prepAttributes();
+this._prepBehaviors();
+this._prepExtends();
+this._prepConstructor();
+},
+_prepBehavior: function (b) {
+this._addHostAttributes(b.hostAttributes);
+},
+_marshalBehavior: function (b) {
+},
+_initFeatures: function () {
+this._marshalHostAttributes();
+this._setupDebouncers();
+this._marshalBehaviors();
+}
+});</script>
+
diff --git a/static/bower_components/polymer/polymer-mini.html b/static/bower_components/polymer/polymer-mini.html
new file mode 100644
index 0000000..da6e750
--- /dev/null
+++ b/static/bower_components/polymer/polymer-mini.html
@@ -0,0 +1,1396 @@
+<!--
+@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>Polymer.Base._addFeature({
+_prepTemplate: function () {
+this._template = this._template || Polymer.DomModule.import(this.is, 'template');
+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>.'));
+}
+},
+_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 () {
+},
+_pushHost: function (host) {
+this.dataHost = host = host || Polymer.Base._hostStack[Polymer.Base._hostStack.length - 1];
+if (host && host._clients) {
+host._clients.push(this);
+}
+this._beginHost();
+},
+_beginHost: function () {
+Polymer.Base._hostStack.push(this);
+if (!this._clients) {
+this._clients = [];
+}
+},
+_popHost: function () {
+Polymer.Base._hostStack.pop();
+},
+_tryReady: function () {
+if (this._canReady()) {
+this._ready();
+}
+},
+_canReady: function () {
+return !this.dataHost || this.dataHost._clientsReadied;
+},
+_ready: function () {
+this._beforeClientsReady();
+this._setupRoot();
+this._readyClients();
+this._afterClientsReady();
+this._readySelf();
+},
+_readyClients: function () {
+this._beginDistribute();
+var c$ = this._clients;
+for (var i = 0, l = c$.length, c; i < l && (c = c$[i]); i++) {
+c._ready();
+}
+this._finishDistribute();
+this._clientsReadied = true;
+this._clients = null;
+},
+_readySelf: function () {
+this._doBehavior('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 (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;
+}
+};
+return new ArraySplice();
+}();
+Polymer.EventApi = function () {
+var Settings = Polymer.Settings;
+var EventApi = function (event) {
+this.event = event;
+};
+if (Settings.useShadow) {
+EventApi.prototype = {
+get rootTarget() {
+return this.event.path[0];
+},
+get localTarget() {
+return this.event.target;
+},
+get path() {
+return this.event.path;
+}
+};
+} else {
+EventApi.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 o = this.rootTarget;
+while (o) {
+path.push(o);
+o = Polymer.dom(o).parentNode || o.host;
+}
+path.push(window);
+this.event._path = path;
+}
+return this.event._path;
+}
+};
+}
+var factory = function (event) {
+if (!event.__eventApi) {
+event.__eventApi = new EventApi(event);
+}
+return event.__eventApi;
+};
+return { factory: factory };
+}();
+Polymer.domInnerHTML = function () {
+var escapeAttrRegExp = /[&\u00A0"]/g;
+var escapeDataRegExp = /[&\u00A0<>]/g;
+function escapeReplace(c) {
+switch (c) {
+case '&':
+return '&amp;';
+case '<':
+return '&lt;';
+case '>':
+return '&gt;';
+case '"':
+return '&quot;';
+case '\xA0':
+return '&nbsp;';
+}
+}
+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;
+c$ = composed ? node._composedChildren : c$;
+for (var i = 0, l = c$.length, child; i < l && (child = c$[i]); i++) {
+s += getOuterHTML(child, node, composed);
+}
+return s;
+}
+return { getInnerHTML: getInnerHTML };
+}();
+Polymer.DomApi = function () {
+'use strict';
+var Settings = Polymer.Settings;
+var getInnerHTML = Polymer.domInnerHTML.getInnerHTML;
+var nativeInsertBefore = Element.prototype.insertBefore;
+var nativeRemoveChild = Element.prototype.removeChild;
+var nativeAppendChild = Element.prototype.appendChild;
+var dirtyRoots = [];
+var DomApi = function (node) {
+this.node = node;
+if (this.patch) {
+this.patch();
+}
+};
+DomApi.prototype = {
+flush: function () {
+for (var i = 0, host; i < dirtyRoots.length; i++) {
+host = dirtyRoots[i];
+host.flushDebouncer('_distribute');
+}
+dirtyRoots = [];
+},
+_lazyDistribute: function (host) {
+if (host.shadyRoot && host.shadyRoot._distributionClean) {
+host.shadyRoot._distributionClean = false;
+host.debounce('_distribute', host._distributeContent);
+dirtyRoots.push(host);
+}
+},
+appendChild: function (node) {
+var handled;
+this._removeNodeFromHost(node, true);
+if (this._nodeIsInLogicalTree(this.node)) {
+this._addLogicalInfo(node, this.node);
+this._addNodeToHost(node);
+handled = this._maybeDistribute(node, this.node);
+}
+if (!handled && !this._tryRemoveUndistributedNode(node)) {
+var container = this.node._isShadyRoot ? this.node.host : this.node;
+addToComposedParent(container, node);
+nativeAppendChild.call(container, node);
+}
+return node;
+},
+insertBefore: function (node, ref_node) {
+if (!ref_node) {
+return this.appendChild(node);
+}
+var handled;
+this._removeNodeFromHost(node, true);
+if (this._nodeIsInLogicalTree(this.node)) {
+saveLightChildrenIfNeeded(this.node);
+var children = this.childNodes;
+var index = children.indexOf(ref_node);
+if (index < 0) {
+throw Error('The ref_node to be inserted before is not a child ' + 'of this node');
+}
+this._addLogicalInfo(node, this.node, index);
+this._addNodeToHost(node);
+handled = this._maybeDistribute(node, this.node);
+}
+if (!handled && !this._tryRemoveUndistributedNode(node)) {
+ref_node = ref_node.localName === CONTENT ? this._firstComposedNode(ref_node) : ref_node;
+var container = this.node._isShadyRoot ? this.node.host : this.node;
+addToComposedParent(container, node, ref_node);
+nativeInsertBefore.call(container, node, ref_node);
+}
+return node;
+},
+removeChild: function (node) {
+if (factory(node).parentNode !== this.node) {
+console.warn('The node to be removed is not a child of this node', node);
+}
+var handled;
+if (this._nodeIsInLogicalTree(this.node)) {
+this._removeNodeFromHost(node);
+handled = this._maybeDistribute(node, this.node);
+}
+if (!handled) {
+var container = this.node._isShadyRoot ? this.node.host : this.node;
+if (container === node.parentNode) {
+removeFromComposedParent(container, node);
+nativeRemoveChild.call(container, node);
+}
+}
+return node;
+},
+replaceChild: function (node, ref_node) {
+this.insertBefore(node, ref_node);
+this.removeChild(ref_node);
+return node;
+},
+getOwnerRoot: function () {
+return this._ownerShadyRootForNode(this.node);
+},
+_ownerShadyRootForNode: function (node) {
+if (!node) {
+return;
+}
+if (node._ownerShadyRoot === undefined) {
+var root;
+if (node._isShadyRoot) {
+root = node;
+} else {
+var parent = Polymer.dom(node).parentNode;
+if (parent) {
+root = parent._isShadyRoot ? parent : this._ownerShadyRootForNode(parent);
+} else {
+root = null;
+}
+}
+node._ownerShadyRoot = root;
+}
+return node._ownerShadyRoot;
+},
+_maybeDistribute: function (node, parent) {
+var fragContent = node.nodeType === Node.DOCUMENT_FRAGMENT_NODE && !node.__noContent && Polymer.dom(node).querySelector(CONTENT);
+var wrappedContent = fragContent && Polymer.dom(fragContent).parentNode.nodeType !== Node.DOCUMENT_FRAGMENT_NODE;
+var hasContent = fragContent || node.localName === CONTENT;
+if (hasContent) {
+var root = this._ownerShadyRootForNode(parent);
+if (root) {
+var host = root.host;
+this._updateInsertionPoints(host);
+this._lazyDistribute(host);
+}
+}
+var parentNeedsDist = this._parentNeedsDistribution(parent);
+if (parentNeedsDist) {
+this._lazyDistribute(parent);
+}
+return parentNeedsDist || hasContent && !wrappedContent;
+},
+_tryRemoveUndistributedNode: function (node) {
+if (this.node.shadyRoot) {
+if (node.parentNode) {
+nativeRemoveChild.call(node.parentNode, node);
+}
+return true;
+}
+},
+_updateInsertionPoints: function (host) {
+host.shadyRoot._insertionPoints = factory(host.shadyRoot).querySelectorAll(CONTENT);
+},
+_nodeIsInLogicalTree: function (node) {
+return Boolean(node._lightParent || node._isShadyRoot || this._ownerShadyRootForNode(node) || node.shadyRoot);
+},
+_parentNeedsDistribution: function (parent) {
+return parent && parent.shadyRoot && hasInsertionPoint(parent.shadyRoot);
+},
+_removeNodeFromHost: function (node, ensureComposedRemoval) {
+var hostNeedsDist;
+var root;
+var parent = node._lightParent;
+if (parent) {
+root = this._ownerShadyRootForNode(node);
+if (root) {
+root.host._elementRemove(node);
+hostNeedsDist = this._removeDistributedChildren(root, node);
+}
+this._removeLogicalInfo(node, node._lightParent);
+}
+this._removeOwnerShadyRoot(node);
+if (root && hostNeedsDist) {
+this._updateInsertionPoints(root.host);
+this._lazyDistribute(root.host);
+} else if (ensureComposedRemoval) {
+removeFromComposedParent(parent || node.parentNode, 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$ = factory(content).getDistributedNodes();
+for (var j = 0; j < dc$.length; j++) {
+hostNeedsDist = true;
+var node = dc$[j];
+var parent = node.parentNode;
+if (parent) {
+removeFromComposedParent(parent, node);
+nativeRemoveChild.call(parent, node);
+}
+}
+}
+}
+return hostNeedsDist;
+},
+_contains: function (container, node) {
+while (node) {
+if (node == container) {
+return true;
+}
+node = factory(node).parentNode;
+}
+},
+_addNodeToHost: function (node) {
+var checkNode = node.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? node.firstChild : node;
+var root = this._ownerShadyRootForNode(checkNode);
+if (root) {
+root.host._elementAdd(node);
+}
+},
+_addLogicalInfo: function (node, container, index) {
+saveLightChildrenIfNeeded(container);
+var children = factory(container).childNodes;
+index = index === undefined ? children.length : index;
+if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
+var c$ = Array.prototype.slice.call(node.childNodes);
+for (var i = 0, n; i < c$.length && (n = c$[i]); i++) {
+children.splice(index++, 0, n);
+n._lightParent = container;
+}
+} else {
+children.splice(index, 0, node);
+node._lightParent = container;
+}
+},
+_removeLogicalInfo: function (node, container) {
+var children = factory(container).childNodes;
+var index = children.indexOf(node);
+if (index < 0 || container !== node._lightParent) {
+throw Error('The node to be removed is not a child of this node');
+}
+children.splice(index, 1);
+node._lightParent = null;
+},
+_removeOwnerShadyRoot: function (node) {
+var hasCachedRoot = factory(node).getOwnerRoot() !== undefined;
+if (hasCachedRoot) {
+var c$ = factory(node).childNodes;
+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$ = factory(content).getDistributedNodes();
+for (var i = 0, l = n$.length, n, p$; i < l && (n = n$[i]); i++) {
+p$ = factory(n).getDestinationInsertionPoints();
+if (p$[p$.length - 1] === content) {
+return n;
+}
+}
+},
+querySelector: function (selector) {
+return this.querySelectorAll(selector)[0];
+},
+querySelectorAll: function (selector) {
+return this._query(function (n) {
+return matchesSelector.call(n, selector);
+}, this.node);
+},
+_query: function (matcher, node) {
+node = node || this.node;
+var list = [];
+this._queryElements(factory(node).childNodes, matcher, list);
+return list;
+},
+_queryElements: function (elements, matcher, list) {
+for (var i = 0, l = elements.length, c; i < l && (c = elements[i]); i++) {
+if (c.nodeType === Node.ELEMENT_NODE) {
+this._queryElement(c, matcher, list);
+}
+}
+},
+_queryElement: function (node, matcher, list) {
+if (matcher(node)) {
+list.push(node);
+}
+this._queryElements(factory(node).childNodes, matcher, list);
+},
+getDestinationInsertionPoints: function () {
+return this.node._destinationInsertionPoints || [];
+},
+getDistributedNodes: function () {
+return this.node._distributedNodes || [];
+},
+queryDistributedElements: function (selector) {
+var c$ = this.childNodes;
+var list = [];
+this._distributedFilter(selector, c$, list);
+for (var i = 0, l = c$.length, c; i < l && (c = c$[i]); i++) {
+if (c.localName === CONTENT) {
+this._distributedFilter(selector, factory(c).getDistributedNodes(), list);
+}
+}
+return list;
+},
+_distributedFilter: function (selector, list, results) {
+results = results || [];
+for (var i = 0, l = list.length, d; i < l && (d = list[i]); i++) {
+if (d.nodeType === Node.ELEMENT_NODE && d.localName !== CONTENT && matchesSelector.call(d, selector)) {
+results.push(d);
+}
+}
+return results;
+},
+_clear: function () {
+while (this.childNodes.length) {
+this.removeChild(this.childNodes[0]);
+}
+},
+setAttribute: function (name, value) {
+this.node.setAttribute(name, value);
+this._distributeParent();
+},
+removeAttribute: function (name) {
+this.node.removeAttribute(name);
+this._distributeParent();
+},
+_distributeParent: function () {
+if (this._parentNeedsDistribution(this.parentNode)) {
+this._lazyDistribute(this.parentNode);
+}
+}
+};
+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.domApi._distributeParent();
+},
+remove: function () {
+this.node.classList.remove.apply(this.node.classList, arguments);
+this.domApi._distributeParent();
+},
+toggle: function () {
+this.node.classList.toggle.apply(this.node.classList, arguments);
+this.domApi._distributeParent();
+},
+contains: function () {
+return this.node.classList.contains.apply(this.node.classList, arguments);
+}
+};
+if (!Settings.useShadow) {
+Object.defineProperties(DomApi.prototype, {
+childNodes: {
+get: function () {
+var c$ = getLightChildren(this.node);
+return Array.isArray(c$) ? c$ : Array.prototype.slice.call(c$);
+},
+configurable: true
+},
+children: {
+get: function () {
+return Array.prototype.filter.call(this.childNodes, function (n) {
+return n.nodeType === Node.ELEMENT_NODE;
+});
+},
+configurable: true
+},
+parentNode: {
+get: function () {
+return this.node._lightParent || (this.node.__patched ? this.node._composedParent : this.node.parentNode);
+},
+configurable: true
+},
+firstChild: {
+get: function () {
+return this.childNodes[0];
+},
+configurable: true
+},
+lastChild: {
+get: function () {
+var c$ = this.childNodes;
+return c$[c$.length - 1];
+},
+configurable: true
+},
+nextSibling: {
+get: function () {
+var c$ = this.parentNode && factory(this.parentNode).childNodes;
+if (c$) {
+return c$[Array.prototype.indexOf.call(c$, this.node) + 1];
+}
+},
+configurable: true
+},
+previousSibling: {
+get: function () {
+var c$ = this.parentNode && factory(this.parentNode).childNodes;
+if (c$) {
+return c$[Array.prototype.indexOf.call(c$, this.node) - 1];
+}
+},
+configurable: true
+},
+firstElementChild: {
+get: function () {
+return this.children[0];
+},
+configurable: true
+},
+lastElementChild: {
+get: function () {
+var c$ = this.children;
+return c$[c$.length - 1];
+},
+configurable: true
+},
+nextElementSibling: {
+get: function () {
+var c$ = this.parentNode && factory(this.parentNode).children;
+if (c$) {
+return c$[Array.prototype.indexOf.call(c$, this.node) + 1];
+}
+},
+configurable: true
+},
+previousElementSibling: {
+get: function () {
+var c$ = this.parentNode && factory(this.parentNode).children;
+if (c$) {
+return c$[Array.prototype.indexOf.call(c$, this.node) - 1];
+}
+},
+configurable: true
+},
+textContent: {
+get: function () {
+if (this.node.nodeType === Node.TEXT_NODE) {
+return this.node.textContent;
+} else {
+return Array.prototype.map.call(this.childNodes, function (c) {
+return c.textContent;
+}).join('');
+}
+},
+set: function (text) {
+this._clear();
+if (text) {
+this.appendChild(document.createTextNode(text));
+}
+},
+configurable: true
+},
+innerHTML: {
+get: function () {
+if (this.node.nodeType === Node.TEXT_NODE) {
+return null;
+} else {
+return getInnerHTML(this.node);
+}
+},
+set: function (text) {
+if (this.node.nodeType !== Node.TEXT_NODE) {
+this._clear();
+var d = document.createElement('div');
+d.innerHTML = text;
+for (var e = d.firstChild; e; e = e.nextSibling) {
+this.appendChild(e);
+}
+}
+},
+configurable: true
+}
+});
+DomApi.prototype._getComposedInnerHTML = function () {
+return getInnerHTML(this.node, true);
+};
+} else {
+DomApi.prototype.querySelectorAll = function (selector) {
+return Array.prototype.slice.call(this.node.querySelectorAll(selector));
+};
+DomApi.prototype.getOwnerRoot = function () {
+var n = this.node;
+while (n) {
+if (n.nodeType === Node.DOCUMENT_FRAGMENT_NODE && n.host) {
+return n;
+}
+n = n.parentNode;
+}
+};
+DomApi.prototype.getDestinationInsertionPoints = function () {
+var n$ = this.node.getDestinationInsertionPoints();
+return n$ ? Array.prototype.slice.call(n$) : [];
+};
+DomApi.prototype.getDistributedNodes = function () {
+var n$ = this.node.getDistributedNodes();
+return n$ ? Array.prototype.slice.call(n$) : [];
+};
+DomApi.prototype._distributeParent = function () {
+};
+Object.defineProperties(DomApi.prototype, {
+childNodes: {
+get: function () {
+return Array.prototype.slice.call(this.node.childNodes);
+},
+configurable: true
+},
+children: {
+get: function () {
+return Array.prototype.slice.call(this.node.children);
+},
+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 forwards = [
+'parentNode',
+'firstChild',
+'lastChild',
+'nextSibling',
+'previousSibling',
+'firstElementChild',
+'lastElementChild',
+'nextElementSibling',
+'previousElementSibling'
+];
+forwards.forEach(function (name) {
+Object.defineProperty(DomApi.prototype, name, {
+get: function () {
+return this.node[name];
+},
+configurable: true
+});
+});
+}
+var CONTENT = 'content';
+var factory = function (node, patch) {
+node = node || document;
+if (!node.__domApi) {
+node.__domApi = new DomApi(node, patch);
+}
+return node.__domApi;
+};
+Polymer.dom = function (obj, patch) {
+if (obj instanceof Event) {
+return Polymer.EventApi.factory(obj);
+} else {
+return factory(obj, patch);
+}
+};
+Polymer.dom.flush = DomApi.prototype.flush;
+function getLightChildren(node) {
+var children = node._lightChildren;
+return children ? children : node.childNodes;
+}
+function getComposedChildren(node) {
+if (!node._composedChildren) {
+node._composedChildren = Array.prototype.slice.call(node.childNodes);
+}
+return node._composedChildren;
+}
+function addToComposedParent(parent, node, ref_node) {
+var children = getComposedChildren(parent);
+var i = ref_node ? children.indexOf(ref_node) : -1;
+if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
+var fragChildren = getComposedChildren(node);
+for (var j = 0; j < fragChildren.length; j++) {
+addNodeToComposedChildren(fragChildren[j], parent, children, i + j);
+}
+node._composedChildren = null;
+} else {
+addNodeToComposedChildren(node, parent, children, i);
+}
+}
+function addNodeToComposedChildren(node, parent, children, i) {
+node._composedParent = parent;
+children.splice(i >= 0 ? i : children.length, 0, node);
+}
+function removeFromComposedParent(parent, node) {
+node._composedParent = null;
+if (parent) {
+var children = getComposedChildren(parent);
+var i = children.indexOf(node);
+if (i >= 0) {
+children.splice(i, 1);
+}
+}
+}
+function saveLightChildrenIfNeeded(node) {
+if (!node._lightChildren) {
+var c$ = Array.prototype.slice.call(node.childNodes);
+for (var i = 0, l = c$.length, child; i < l && (child = c$[i]); i++) {
+child._lightParent = child._lightParent || node;
+}
+node._lightChildren = c$;
+}
+}
+function hasInsertionPoint(root) {
+return Boolean(root._insertionPoints.length);
+}
+var p = Element.prototype;
+var matchesSelector = p.matches || p.matchesSelector || p.mozMatchesSelector || p.msMatchesSelector || p.oMatchesSelector || p.webkitMatchesSelector;
+return {
+getLightChildren: getLightChildren,
+getComposedChildren: getComposedChildren,
+removeFromComposedParent: removeFromComposedParent,
+saveLightChildrenIfNeeded: saveLightChildrenIfNeeded,
+matchesSelector: matchesSelector,
+hasInsertionPoint: hasInsertionPoint,
+ctor: DomApi,
+factory: factory
+};
+}();
+(function () {
+Polymer.Base._addFeature({
+_prepShady: function () {
+this._useContent = this._useContent || Boolean(this._template);
+},
+_poolContent: function () {
+if (this._useContent) {
+saveLightChildrenIfNeeded(this);
+}
+},
+_setupRoot: function () {
+if (this._useContent) {
+this._createLocalRoot();
+if (!this.dataHost) {
+upgradeLightChildren(this._lightChildren);
+}
+}
+},
+_createLocalRoot: function () {
+this.shadyRoot = this.root;
+this.shadyRoot._distributionClean = false;
+this.shadyRoot._isShadyRoot = true;
+this.shadyRoot._dirtyRoots = [];
+this.shadyRoot._insertionPoints = !this._notes || this._notes._hasContent ? this.shadyRoot.querySelectorAll('content') : [];
+saveLightChildrenIfNeeded(this.shadyRoot);
+this.shadyRoot.host = this;
+},
+get domHost() {
+var root = Polymer.dom(this).getOwnerRoot();
+return root && root.host;
+},
+distributeContent: function (updateInsertionPoints) {
+if (this.shadyRoot) {
+var dom = Polymer.dom(this);
+if (updateInsertionPoints) {
+dom._updateInsertionPoints(this);
+}
+var host = getTopDistributingHost(this);
+dom._lazyDistribute(host);
+}
+},
+_distributeContent: function () {
+if (this._useContent && !this.shadyRoot._distributionClean) {
+this._beginDistribute();
+this._distributeDirtyRoots();
+this._finishDistribute();
+}
+},
+_beginDistribute: function () {
+if (this._useContent && 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) {
+if (hasInsertionPoint(this.shadyRoot)) {
+this._composeTree();
+} else {
+if (!this.shadyRoot._hasDistributed) {
+this.textContent = '';
+this._composedChildren = null;
+this.appendChild(this.shadyRoot);
+} else {
+var children = this._composeNode(this);
+this._updateChildNodes(this, children);
+}
+}
+this.shadyRoot._hasDistributed = true;
+this.shadyRoot._distributionClean = true;
+}
+},
+elementMatches: function (selector, node) {
+node = node || this;
+return matchesSelector.call(node, selector);
+},
+_resetDistribution: function () {
+var children = getLightChildren(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 = getLightChildren(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 = getLightChildren(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 = p._lightParent || p.parentNode;
+if (!parent._useContent && parent !== this && parent !== this.shadyRoot) {
+this._updateChildNodes(parent, this._composeNode(parent));
+}
+}
+},
+_composeNode: function (node) {
+var children = [];
+var c$ = getLightChildren(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 = getComposedChildren(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++) {
+remove(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 (var j = s.index, n; j < s.index + s.addedCount; j++) {
+n = children[j];
+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 saveLightChildrenIfNeeded = Polymer.DomApi.saveLightChildrenIfNeeded;
+var getLightChildren = Polymer.DomApi.getLightChildren;
+var matchesSelector = Polymer.DomApi.matchesSelector;
+var hasInsertionPoint = Polymer.DomApi.hasInsertionPoint;
+var getComposedChildren = Polymer.DomApi.getComposedChildren;
+var removeFromComposedParent = Polymer.DomApi.removeFromComposedParent;
+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 = content._lightParent;
+if (parent && parent.shadyRoot && 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';
+}
+var nativeInsertBefore = Element.prototype.insertBefore;
+var nativeRemoveChild = Element.prototype.removeChild;
+function insertBefore(parentNode, newChild, refChild) {
+var newChildParent = getComposedParent(newChild);
+if (newChildParent !== parentNode) {
+removeFromComposedParent(newChildParent, newChild);
+}
+remove(newChild);
+saveLightChildrenIfNeeded(parentNode);
+nativeInsertBefore.call(parentNode, newChild, refChild || null);
+newChild._composedParent = parentNode;
+}
+function remove(node) {
+var parentNode = getComposedParent(node);
+if (parentNode) {
+saveLightChildrenIfNeeded(parentNode);
+node._composedParent = null;
+nativeRemoveChild.call(parentNode, node);
+}
+}
+function getComposedParent(node) {
+return node.__patched ? node._composedParent : node.parentNode;
+}
+function getTopDistributingHost(host) {
+while (host && hostNeedsRedistribution(host)) {
+host = host.domHost;
+}
+return host;
+}
+function hostNeedsRedistribution(host) {
+var c$ = Polymer.dom(host).children;
+for (var i = 0, c; i < c$.length; i++) {
+c = c$[i];
+if (c.localName === 'content') {
+return host.domHost;
+}
+}
+}
+var needsUpgrade = window.CustomElements && !CustomElements.useNative;
+function upgradeLightChildren(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.DomModule = document.createElement('dom-module');
+Polymer.Base._addFeature({
+_registerFeatures: function () {
+this._prepIs();
+this._prepAttributes();
+this._prepBehaviors();
+this._prepExtends();
+this._prepConstructor();
+this._prepTemplate();
+this._prepShady();
+},
+_prepBehavior: function (b) {
+this._addHostAttributes(b.hostAttributes);
+},
+_initFeatures: function () {
+this._poolContent();
+this._pushHost();
+this._stampTemplate();
+this._popHost();
+this._marshalHostAttributes();
+this._setupDebouncers();
+this._marshalBehaviors();
+this._tryReady();
+},
+_marshalBehavior: function (b) {
+}
+});</script>
+
diff --git a/static/bower_components/polymer/polymer.html b/static/bower_components/polymer/polymer.html
new file mode 100644
index 0000000..9d7e47c
--- /dev/null
+++ b/static/bower_components/polymer/polymer.html
@@ -0,0 +1,3985 @@
+<!--
+@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
+--><!--
+@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>Polymer.nar = [];
+Polymer.Annotations = {
+parseAnnotations: function (template) {
+var list = [];
+var content = template._content || template.content;
+this._parseNodeAnnotations(content, list);
+return list;
+},
+_parseNodeAnnotations: function (node, list) {
+return node.nodeType === Node.TEXT_NODE ? this._parseTextNodeAnnotation(node, list) : this._parseElementAnnotations(node, list);
+},
+_testEscape: function (value) {
+var escape = value.slice(0, 2);
+if (escape === '{{' || escape === '[[') {
+return escape;
+}
+},
+_parseTextNodeAnnotation: function (node, list) {
+var v = node.textContent;
+var escape = this._testEscape(v);
+if (escape) {
+node.textContent = ' ';
+var annote = {
+bindings: [{
+kind: 'text',
+mode: escape[0],
+value: v.slice(2, -2).trim()
+}]
+};
+list.push(annote);
+return annote;
+}
+},
+_parseElementAnnotations: function (element, list) {
+var annote = {
+bindings: [],
+events: []
+};
+if (element.localName === 'content') {
+list._hasContent = true;
+}
+this._parseChildNodesAnnotations(element, annote, list);
+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, callback) {
+if (root.firstChild) {
+for (var i = 0, node = root.firstChild; node; node = node.nextSibling, i++) {
+if (node.localName === 'template' && !node.hasAttribute('preserve-content')) {
+this._parseTemplate(node, i, list, annote);
+}
+var childAnnotation = this._parseNodeAnnotations(node, list, callback);
+if (childAnnotation) {
+childAnnotation.parent = annote;
+childAnnotation.index = i;
+}
+}
+}
+},
+_parseTemplate: function (node, index, list, parent) {
+var content = document.createDocumentFragment();
+content._notes = this.parseAnnotations(node);
+content.appendChild(node.content);
+list.push({
+bindings: Polymer.nar,
+events: Polymer.nar,
+templateContent: content,
+parent: parent,
+index: index
+});
+},
+_parseNodeAttributeAnnotations: function (node, annotation) {
+for (var i = node.attributes.length - 1, a; a = node.attributes[i]; i--) {
+var n = a.name, v = a.value;
+if (n === 'id' && !this._testEscape(v)) {
+annotation.id = v;
+} else if (n.slice(0, 3) === 'on-') {
+node.removeAttribute(n);
+annotation.events.push({
+name: n.slice(3),
+value: v
+});
+} else {
+var b = this._parseNodeAttributeAnnotation(node, n, v);
+if (b) {
+annotation.bindings.push(b);
+}
+}
+}
+},
+_parseNodeAttributeAnnotation: function (node, n, v) {
+var escape = this._testEscape(v);
+if (escape) {
+var customEvent;
+var name = n;
+var mode = escape[0];
+v = v.slice(2, -2).trim();
+var not = false;
+if (v[0] == '!') {
+v = v.substring(1);
+not = true;
+}
+var kind = 'property';
+if (n[n.length - 1] == '$') {
+name = n.slice(0, -1);
+kind = 'attribute';
+}
+var notifyEvent, colon;
+if (mode == '{' && (colon = v.indexOf('::')) > 0) {
+notifyEvent = v.substring(colon + 2);
+v = v.substring(0, colon);
+customEvent = true;
+}
+if (node.localName == 'input' && n == 'value') {
+node.setAttribute(n, '');
+}
+node.removeAttribute(n);
+if (kind === 'property') {
+name = Polymer.CaseMap.dashToCamelCase(name);
+}
+return {
+kind: kind,
+mode: mode,
+name: name,
+value: v,
+negate: not,
+event: notifyEvent,
+customEvent: customEvent
+};
+}
+},
+_localSubTree: function (node, host) {
+return node === host ? node.childNodes : node._lightChildren || node.childNodes;
+},
+findAnnotatedNode: function (root, annote) {
+var parent = annote.parent && Polymer.Annotations.findAnnotatedNode(root, annote.parent);
+return !parent ? root : Polymer.Annotations._localSubTree(parent, root)[annote.index];
+}
+};
+(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 && url[0] === '#') {
+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.__urlResolver || (ownerDocument.__urlResolver = ownerDocument.createElement('a'));
+}
+var CSS_URL_RX = /(url\()([^)]*)(\))/g;
+var URL_ATTRS = {
+'*': [
+'href',
+'src',
+'style',
+'url'
+],
+form: ['action']
+};
+var BINDING_RX = /\{\{|\[\[/;
+Polymer.ResolveUrl = {
+resolveCss: resolveCss,
+resolveAttrs: resolveAttrs,
+resolveUrl: resolveUrl
+};
+}());
+Polymer.Base._addFeature({
+_prepAnnotations: function () {
+if (!this._template) {
+this._notes = [];
+} else {
+Polymer.Annotations.prepElement = this._prepElement.bind(this);
+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];
+b.signature = this._parseMethod(b.value);
+if (!b.signature) {
+b.model = this._modelForPath(b.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) {
+bindings.push({
+index: note.index,
+kind: 'property',
+mode: '{',
+name: '_parent_' + prop,
+model: prop,
+value: prop
+});
+}
+note.bindings = note.bindings.concat(bindings);
+}
+}
+},
+_discoverTemplateParentProps: function (notes) {
+var pp = {};
+notes.forEach(function (n) {
+n.bindings.forEach(function (b) {
+if (b.signature) {
+var args = b.signature.args;
+for (var k = 0; k < args.length; k++) {
+pp[args[k].model] = true;
+}
+} else {
+pp[b.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 () {
+this._configureTemplateContent();
+},
+_configureTemplateContent: function () {
+this._notes.forEach(function (note, i) {
+if (note.templateContent) {
+this._nodes[i]._content = note.templateContent;
+}
+}, this);
+},
+_marshalIdNodes: function () {
+this.$ = {};
+this._notes.forEach(function (a) {
+if (a.id) {
+this.$[a.id] = this._findAnnotatedNode(this.root, a);
+}
+}, this);
+},
+_marshalAnnotatedNodes: function () {
+if (this._nodes) {
+this._nodes = this._nodes.map(function (a) {
+return this._findAnnotatedNode(this.root, a);
+}, this);
+}
+},
+_marshalAnnotatedListeners: function () {
+this._notes.forEach(function (a) {
+if (a.events && a.events.length) {
+var node = this._findAnnotatedNode(this.root, a);
+a.events.forEach(function (e) {
+this.listen(node, e.name, e.value);
+}, this);
+}
+}, this);
+}
+});
+Polymer.Base._addFeature({
+listeners: {},
+_listenListeners: function (listeners) {
+var node, name, key;
+for (key in listeners) {
+if (key.indexOf('.') < 0) {
+node = this;
+name = key;
+} else {
+name = key.split('.');
+node = this.$[name[0]];
+name = name[1];
+}
+this.listen(node, name, listeners[key]);
+}
+},
+listen: function (node, eventName, methodName) {
+this._listen(node, eventName, this._createEventHandler(node, eventName, methodName));
+},
+_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 = {};
+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'));
+}
+};
+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);
+}
+},
+_listen: function (node, eventName, handler) {
+node.addEventListener(eventName, handler);
+},
+_unlisten: function (node, eventName, handler) {
+node.removeEventListener(eventName, handler);
+}
+});
+(function () {
+'use strict';
+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 mouseCanceller = function (mouseEvent) {
+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) {
+for (var i = 0, en; i < MOUSE_EVENTS.length; i++) {
+en = MOUSE_EVENTS[i];
+if (setup) {
+document.addEventListener(en, mouseCanceller, true);
+} else {
+document.removeEventListener(en, mouseCanceller, true);
+}
+}
+}
+function ignoreMouse() {
+if (!POINTERSTATE.mouse.mouseIgnoreJob) {
+setupTeardownMouseCanceller(true);
+}
+var unset = function () {
+setupTeardownMouseCanceller();
+POINTERSTATE.mouse.target = null;
+POINTERSTATE.mouse.mouseIgnoreJob = null;
+};
+POINTERSTATE.mouse.mouseIgnoreJob = Polymer.Debounce(POINTERSTATE.mouse.mouseIgnoreJob, unset, MOUSE_TIMEOUT);
+}
+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;
+}
+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;
+},
+handleNative: function (ev) {
+var handled;
+var type = ev.type;
+var node = ev.currentTarget;
+var gobj = node[GESTURE_KEY];
+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);
+}
+}
+if (type === 'touchend') {
+POINTERSTATE.mouse.target = Polymer.dom(ev).rootTarget;
+ignoreMouse(true);
+}
+}
+}
+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]) {
+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();
+}
+}
+},
+add: function (node, evType, handler) {
+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];
+gd = gobj[dep];
+if (!gd) {
+gobj[dep] = gd = {};
+node.addEventListener(dep, this.handleNative);
+}
+gd[name] = (gd[name] || 0) + 1;
+}
+node.addEventListener(evType, handler);
+if (recognizer.touchAction) {
+this.setTouchAction(node, recognizer.touchAction);
+}
+},
+remove: function (node, evType, handler) {
+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;
+if (gd[name] === 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 se = detail.sourceEvent;
+if (se && se.preventDefault) {
+se.preventDefault();
+}
+}
+},
+prevent: function (evName) {
+var recognizer = this.findRecognizerByEvent(evName);
+if (recognizer.info) {
+recognizer.info.prevent = true;
+}
+}
+};
+Gestures.register({
+name: 'downup',
+deps: [
+'mousedown',
+'touchstart',
+'touchend'
+],
+emits: [
+'down',
+'up'
+],
+mousedown: function (e) {
+var t = e.currentTarget;
+var self = this;
+var upfn = function upfn(e) {
+self.fire('up', t, e);
+document.removeEventListener('mouseup', upfn);
+};
+document.addEventListener('mouseup', upfn);
+this.fire('down', t, e);
+},
+touchstart: function (e) {
+this.fire('down', e.currentTarget, e.changedTouches[0]);
+},
+touchend: function (e) {
+this.fire('up', e.currentTarget, e.changedTouches[0]);
+},
+fire: function (type, target, event) {
+var self = this;
+Gestures.fire(target, type, {
+x: event.clientX,
+y: event.clientY,
+sourceEvent: event,
+prevent: Gestures.prevent.bind(Gestures)
+});
+}
+});
+Gestures.register({
+name: 'track',
+touchAction: 'none',
+deps: [
+'mousedown',
+'touchstart',
+'touchmove',
+'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);
+},
+prevent: false
+},
+clearInfo: function () {
+this.info.state = 'start';
+this.info.started = false;
+this.info.moves = [];
+this.info.x = 0;
+this.info.y = 0;
+this.info.prevent = false;
+},
+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) {
+var t = e.currentTarget;
+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';
+self.info.addMove({
+x: x,
+y: y
+});
+self.fire(t, e);
+self.info.started = true;
+}
+};
+var upfn = function upfn(e) {
+if (self.info.started) {
+Gestures.prevent('tap');
+movefn(e);
+}
+self.clearInfo();
+document.removeEventListener('mousemove', movefn);
+document.removeEventListener('mouseup', upfn);
+};
+document.addEventListener('mousemove', movefn);
+document.addEventListener('mouseup', 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 = e.currentTarget;
+var ct = e.changedTouches[0];
+var x = ct.clientX, y = ct.clientY;
+if (this.hasMovedEnough(x, y)) {
+this.info.addMove({
+x: x,
+y: y
+});
+this.fire(t, ct);
+this.info.state = 'track';
+this.info.started = true;
+}
+},
+touchend: function (e) {
+var t = e.currentTarget;
+var ct = e.changedTouches[0];
+if (this.info.started) {
+Gestures.prevent('tap');
+this.info.state = 'end';
+this.info.addMove({
+x: ct.clientX,
+y: ct.clientY
+});
+this.fire(t, ct);
+}
+this.clearInfo();
+},
+fire: function (target, touch) {
+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,
+hover: function () {
+return Gestures.deepTargetFind(touch.clientX, touch.clientY);
+}
+});
+}
+});
+Gestures.register({
+name: 'tap',
+deps: [
+'mousedown',
+'click',
+'touchstart',
+'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) {
+this.save(e);
+},
+click: function (e) {
+this.forward(e);
+},
+touchstart: function (e) {
+this.save(e.changedTouches[0]);
+},
+touchend: function (e) {
+this.forward(e.changedTouches[0]);
+},
+forward: function (e) {
+var dx = Math.abs(e.clientX - this.info.x);
+var dy = Math.abs(e.clientY - this.info.y);
+if (isNaN(dx) || isNaN(dy) || dx <= TAP_DISTANCE && dy <= TAP_DISTANCE) {
+if (!this.info.prevent) {
+Gestures.fire(e.target, 'tap', {
+x: e.clientX,
+y: e.clientY,
+sourceEvent: e
+});
+}
+}
+this.reset();
+}
+});
+var DIRECTION_MAP = {
+x: 'pan-x',
+y: 'pan-y',
+none: 'none',
+all: 'auto'
+};
+Polymer.Base._addFeature({
+_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;
+}());
+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 || JsMutationObserver)(Polymer.Async._atEndOfMicrotask.bind(Polymer.Async)).observe(Polymer.Async._twiddle, { characterData: true });
+Polymer.Debounce = function () {
+var Async = Polymer.Async;
+var Debouncer = function (context) {
+this.context = context;
+this.boundComplete = this.complete.bind(this);
+};
+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;
+}
+},
+complete: function () {
+if (this.finish) {
+this.stop();
+this.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({
+$$: 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, '');
+}
+},
+getContentChildNodes: function (slctr) {
+return Polymer.dom(Polymer.dom(this.root).querySelector(slctr || '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;
+var detail = detail === null || detail === undefined ? Polymer.nob : detail;
+var bubbles = options.bubbles === undefined ? true : options.bubbles;
+var cancelable = Boolean(options.cancelable);
+var event = new CustomEvent(type, {
+bubbles: Boolean(bubbles),
+cancelable: cancelable,
+detail: detail
+});
+node.dispatchEvent(event);
+return event;
+},
+async: function (callback, waitTime) {
+return Polymer.Async.run(callback.bind(this), 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) {
+var l = document.createElement('link');
+l.rel = 'import';
+l.href = href;
+if (onload) {
+l.onload = onload.bind(this);
+}
+if (onerror) {
+l.onerror = onerror.bind(this);
+}
+document.head.appendChild(l);
+return l;
+},
+create: function (tag, props) {
+var elt = document.createElement(tag);
+if (props) {
+for (var n in props) {
+elt[n] = props[n];
+}
+}
+return elt;
+}
+});
+Polymer.Bind = {
+prepareModel: function (model) {
+model._propertyEffects = {};
+model._bindListeners = [];
+var api = this._modelApi;
+for (var n in api) {
+model[n] = api[n];
+}
+},
+_modelApi: {
+_notifyChange: function (property) {
+var eventName = Polymer.CaseMap.camelToDashCase(property) + '-changed';
+this.fire(eventName, { value: this[property] }, { bubbles: false });
+},
+_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 {
+node[property] = value;
+}
+},
+_effectEffects: function (property, value, effects, old, fromAbove) {
+effects.forEach(function (fx) {
+var fn = Polymer.Bind['_' + fx.kind + 'Effect'];
+if (fn) {
+fn.call(this, property, value, fx.effect, old, fromAbove);
+}
+}, this);
+},
+_clearPath: function (path) {
+for (var prop in this.__data__) {
+if (prop.indexOf(path + '.') === 0) {
+this.__data__[prop] = undefined;
+}
+}
+}
+},
+ensurePropertyEffects: function (model, property) {
+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);
+fx.push({
+kind: kind,
+effect: effect
+});
+},
+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,
+'computedAnnotation': 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);
+};
+if (model.getPropertyInfo && model.getPropertyInfo(property).readOnly) {
+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) {
+var fn = this._notedListenerFactory(property, path, this._isStructured(path), this._isEventBogus);
+var eventName = event || Polymer.CaseMap.camelToDashCase(property) + '-changed';
+model._bindListeners.push({
+index: index,
+property: property,
+path: path,
+changedFn: fn,
+event: eventName
+});
+},
+_isStructured: function (path) {
+return path.indexOf('.') > 0;
+},
+_isEventBogus: function (e, target) {
+return e.path && e.path[0] !== target;
+},
+_notedListenerFactory: function (property, path, isStructured, bogusTest) {
+return function (e, target) {
+if (!bogusTest(e, target)) {
+if (e.detail && e.detail.path) {
+this.notifyPath(this._fixPath(path, property, e.detail.path), e.detail.value);
+} else {
+var value = target[property];
+if (!isStructured) {
+this[path] = target[property];
+} else {
+if (this.__data__[path] != value) {
+this.set(path, value);
+}
+}
+}
+}
+};
+},
+prepareInstance: function (inst) {
+inst.__data__ = Object.create(null);
+},
+setupBindListeners: function (inst) {
+inst._bindListeners.forEach(function (info) {
+var node = inst._nodes[info.index];
+node.addEventListener(info.event, inst._notifyListener.bind(inst, info.changedFn));
+});
+}
+};
+Polymer.Base.extend(Polymer.Bind, {
+_shouldAddListener: function (effect) {
+return effect.name && effect.mode === '{' && !effect.negate && effect.kind != 'attribute';
+},
+_annotationEffect: function (source, value, effect) {
+if (source != effect.value) {
+value = this.get(effect.value);
+this.__data__[effect.value] = value;
+}
+var calc = effect.negate ? !value : value;
+if (!effect.customEvent || this._nodes[effect.index][effect.name] !== calc) {
+return this._applyEffectValue(calc, effect);
+}
+},
+_reflectEffect: function (source) {
+this.reflectPropertyToAttribute(source);
+},
+_notifyEffect: function (source, value, effect, old, fromAbove) {
+if (!fromAbove) {
+this._notifyChange(source);
+}
+},
+_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 {
+this._warn(this._logf('_complexObserverEffect', 'observer method `' + effect.method + '` not defined'));
+}
+},
+_computeEffect: function (source, value, effect) {
+var args = Polymer.Bind._marshalArgs(this.__data__, effect, source, value);
+if (args) {
+var fn = this[effect.method];
+if (fn) {
+this.__setProperty(effect.property, fn.apply(this, args));
+} 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);
+if (effect.negate) {
+computedvalue = !computedvalue;
+}
+this._applyEffectValue(computedvalue, effect);
+}
+} else {
+computedHost._warn(computedHost._logf('_annotatedComputationEffect', 'compute method `' + effect.method + '` not defined'));
+}
+},
+_marshalArgs: function (model, effect, path, value) {
+var values = [];
+var args = effect.args;
+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 (arg.structured) {
+v = Polymer.Base.get(name, model);
+} else {
+v = model[name];
+}
+if (args.length > 1 && v === undefined) {
+return;
+}
+if (arg.wildcard) {
+var baseChanged = name.indexOf(path + '.') === 0;
+var matches = effect.trigger.name.indexOf(name) === 0 && !baseChanged;
+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) {
+Polymer.Bind.addPropertyEffect(this, property, kind, effect);
+},
+_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');
+}
+if (prop.reflectToAttribute) {
+this._addPropertyEffect(p, 'reflect');
+}
+if (prop.readOnly) {
+Polymer.Bind.ensurePropertyEffects(this, p);
+}
+}
+}
+},
+_addComputedEffect: function (name, expression) {
+var sig = this._parseMethod(expression);
+sig.args.forEach(function (arg) {
+this._addPropertyEffect(arg.model, 'compute', {
+method: sig.method,
+args: sig.args,
+trigger: arg,
+property: name
+});
+}, this);
+},
+_addObserverEffect: function (property, observer) {
+this._addPropertyEffect(property, 'observer', {
+method: observer,
+property: property
+});
+},
+_addComplexObserverEffects: function (observers) {
+if (observers) {
+observers.forEach(function (observer) {
+this._addComplexObserverEffect(observer);
+}, this);
+}
+},
+_addComplexObserverEffect: function (observer) {
+var sig = this._parseMethod(observer);
+sig.args.forEach(function (arg) {
+this._addPropertyEffect(arg.model, 'complexObserver', {
+method: sig.method,
+args: sig.args,
+trigger: arg
+});
+}, this);
+},
+_addAnnotationEffects: function (notes) {
+this._nodes = [];
+notes.forEach(function (note) {
+var index = this._nodes.push(note) - 1;
+note.bindings.forEach(function (binding) {
+this._addAnnotationEffect(binding, index);
+}, this);
+}, this);
+},
+_addAnnotationEffect: function (note, index) {
+if (Polymer.Bind._shouldAddListener(note)) {
+Polymer.Bind._addAnnotatedListener(this, index, note.name, note.value, note.event);
+}
+if (note.signature) {
+this._addAnnotatedComputationEffect(note, index);
+} else {
+note.index = index;
+this._addPropertyEffect(note.model, 'annotation', note);
+}
+},
+_addAnnotatedComputationEffect: function (note, index) {
+var sig = note.signature;
+if (sig.static) {
+this.__addAnnotatedComputationEffect('__static__', index, note, sig, null);
+} else {
+sig.args.forEach(function (arg) {
+if (!arg.literal) {
+this.__addAnnotatedComputationEffect(arg.model, index, note, sig, arg);
+}
+}, this);
+}
+},
+__addAnnotatedComputationEffect: function (property, index, note, sig, trigger) {
+this._addPropertyEffect(property, 'annotatedComputation', {
+index: index,
+kind: note.kind,
+property: note.name,
+negate: note.negate,
+method: sig.method,
+args: sig.args,
+trigger: trigger
+});
+},
+_parseMethod: function (expression) {
+var m = expression.match(/(\w*)\((.*)\)/);
+if (m) {
+var sig = {
+method: m[1],
+static: true
+};
+if (m[2].trim()) {
+var args = m[2].replace(/\\,/g, '&comma;').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(/&comma;/g, ',').replace(/\\(.)/g, '$1');
+var a = {
+name: arg,
+model: this._modelForPath(arg)
+};
+var fc = arg[0];
+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.structured = arg.indexOf('.') > 0;
+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);
+Polymer.Bind.setupBindListeners(this);
+},
+_applyEffectValue: function (value, info) {
+var node = this._nodes[info.index];
+var property = info.property || info.name || 'textContent';
+if (info.kind == 'attribute') {
+this.serializeValueToAttribute(value, property, node);
+} else {
+if (property === 'className') {
+value = this._scopeElementClass(node, value);
+}
+if (property === 'textContent' || node.localName == 'input' && property == 'value') {
+value = value == undefined ? '' : value;
+}
+return node[property] = value;
+}
+},
+_executeStaticEffects: function () {
+if (this._propertyEffects.__static__) {
+this._effectEffects('__static__', null, this._propertyEffects.__static__);
+}
+}
+});
+Polymer.Base._addFeature({
+_setupConfigure: function (initialConfig) {
+this._config = initialConfig || {};
+this._handlers = [];
+},
+_marshalAttributes: function () {
+this._takeAttributesToModel(this._config);
+},
+_configValue: function (name, value) {
+this._config[name] = value;
+},
+_beforeClientsReady: function () {
+this._configure();
+},
+_configure: function () {
+this._configureAnnotationReferences();
+this._aboveConfig = this.mixin({}, this._config);
+var config = {};
+this.behaviors.forEach(function (b) {
+this._configureProperties(b.properties, config);
+}, this);
+this._configureProperties(this.properties, config);
+this._mixinConfigure(config, this._aboveConfig);
+this._config = config;
+this._distributeConfig(this._config);
+},
+_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;
+}
+}
+},
+_mixinConfigure: function (a, b) {
+for (var prop in b) {
+if (!this.getPropertyInfo(prop).readOnly) {
+a[prop] = b[prop];
+}
+}
+},
+_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];
+if (node._configValue) {
+var value = p === x.effect.value ? config[p] : this.get(x.effect.value, config);
+node._configValue(x.effect.name, value);
+}
+}
+}
+}
+}
+}
+},
+_afterClientsReady: function () {
+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 (!this._clientsReadied) {
+this._queueHandler([
+fn,
+e,
+e.target
+]);
+} else {
+return fn.call(this, e, e.target);
+}
+},
+_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]);
+}
+}
+});
+(function () {
+'use strict';
+Polymer.Base._addFeature({
+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._notifyPath(path, value);
+}
+}
+},
+_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++) {
+prop = prop[parts[i]];
+if (array) {
+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 = prop[last];
+var key = coll.getKey(old);
+if (key) {
+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) {
+var prop = root || this;
+var parts = this._getPathParts(path);
+var last = parts.pop();
+while (parts.length) {
+prop = prop[parts.shift()];
+if (!prop) {
+return;
+}
+}
+return prop[last];
+},
+_pathEffector: function (path, value) {
+var model = this._modelForPath(path);
+var fx$ = this._propertyEffects[model];
+if (fx$) {
+fx$.forEach(function (fx) {
+var fxFn = this['_' + fx.kind + 'PathEffect'];
+if (fxFn) {
+fxFn.call(this, path, value, fx.effect);
+}
+}, this);
+}
+if (this._boundPaths) {
+this._notifyBoundPaths(path, value);
+}
+},
+_annotationPathEffect: function (path, value, effect) {
+if (effect.value === path || effect.value.indexOf(path + '.') === 0) {
+Polymer.Bind._annotationEffect.call(this, path, value, effect);
+} else if (path.indexOf(effect.value + '.') === 0 && !effect.negate) {
+var node = this._nodes[effect.index];
+if (node && node.notifyPath) {
+var p = this._fixPath(effect.name, effect.value, path);
+node.notifyPath(p, value, true);
+}
+}
+},
+_complexObserverPathEffect: function (path, value, effect) {
+if (this._pathMatchesEffect(path, effect)) {
+Polymer.Bind._complexObserverEffect.call(this, path, value, effect);
+}
+},
+_computePathEffect: function (path, value, effect) {
+if (this._pathMatchesEffect(path, effect)) {
+Polymer.Bind._computeEffect.call(this, path, value, effect);
+}
+},
+_annotatedComputationPathEffect: function (path, value, effect) {
+if (this._pathMatchesEffect(path, effect)) {
+Polymer.Bind._annotatedComputationEffect.call(this, path, value, effect);
+}
+},
+_pathMatchesEffect: function (path, effect) {
+var effectArg = effect.trigger.name;
+return effectArg == path || effectArg.indexOf(path + '.') === 0 || effect.trigger.wildcard && path.indexOf(effectArg) === 0;
+},
+linkPaths: function (to, from) {
+this._boundPaths = this._boundPaths || {};
+if (from) {
+this._boundPaths[to] = from;
+} else {
+this.unbindPath(to);
+}
+},
+unlinkPaths: function (path) {
+if (this._boundPaths) {
+delete this._boundPaths[path];
+}
+},
+_notifyBoundPaths: function (path, value) {
+var from, to;
+for (var a in this._boundPaths) {
+var b = this._boundPaths[a];
+if (path.indexOf(a + '.') == 0) {
+from = a;
+to = b;
+break;
+}
+if (path.indexOf(b + '.') == 0) {
+from = b;
+to = a;
+break;
+}
+}
+if (from && to) {
+var p = this._fixPath(to, from, path);
+this.notifyPath(p, value);
+}
+},
+_fixPath: function (property, root, path) {
+return property + path.slice(root.length);
+},
+_notifyPath: function (path, value) {
+var rootName = this._modelForPath(path);
+var dashCaseName = Polymer.CaseMap.camelToDashCase(rootName);
+var eventName = dashCaseName + this._EVENT_CHANGED;
+this.fire(eventName, {
+path: path,
+value: value
+}, { bubbles: false });
+},
+_modelForPath: function (path) {
+var dot = path.indexOf('.');
+return dot < 0 ? path : path.slice(0, dot);
+},
+_EVENT_CHANGED: '-changed',
+_notifySplice: function (array, path, index, added, removed) {
+var splices = [{
+index: index,
+addedCount: added,
+removed: removed,
+object: array,
+type: 'splice'
+}];
+var change = {
+keySplices: Polymer.Collection.applySplices(array, splices),
+indexSplices: splices
+};
+this.set(path + '.splices', change);
+if (added != removed.length) {
+this.notifyPath(path + '.length', array.length);
+}
+change.keySplices = null;
+change.indexSplices = null;
+},
+push: function (path) {
+var array = this.get(path);
+var args = Array.prototype.slice.call(arguments, 1);
+var len = array.length;
+var ret = array.push.apply(array, args);
+this._notifySplice(array, path, len, args.length, []);
+return ret;
+},
+pop: function (path) {
+var array = this.get(path);
+var args = Array.prototype.slice.call(arguments, 1);
+var rem = array.slice(-1);
+var ret = array.pop.apply(array, args);
+this._notifySplice(array, path, array.length, 0, rem);
+return ret;
+},
+splice: function (path, start, deleteCount) {
+var array = this.get(path);
+var args = Array.prototype.slice.call(arguments, 1);
+var ret = array.splice.apply(array, args);
+this._notifySplice(array, path, start, args.length - 2, ret);
+return ret;
+},
+shift: function (path) {
+var array = this.get(path);
+var args = Array.prototype.slice.call(arguments, 1);
+var ret = array.shift.apply(array, args);
+this._notifySplice(array, path, 0, 0, [ret]);
+return ret;
+},
+unshift: function (path) {
+var array = this.get(path);
+var args = Array.prototype.slice.call(arguments, 1);
+var ret = array.unshift.apply(array, args);
+this._notifySplice(array, path, 0, args.length, []);
+return ret;
+}
+});
+}());
+Polymer.Base._addFeature({
+resolveUrl: function (url) {
+var module = Polymer.DomModule.import(this.is);
+var root = '';
+if (module) {
+var assetPath = module.getAttribute('assetpath') || '';
+root = Polymer.ResolveUrl.resolveUrl(assetPath, module.ownerDocument.baseURI);
+}
+return Polymer.ResolveUrl.resolveUrl(url, root);
+}
+});
+Polymer.CssParse = function () {
+var api = {
+parse: function (text) {
+text = this._clean(text);
+return this._parseCss(this._lex(text), text);
+},
+_clean: function (cssText) {
+return cssText.replace(rx.comments, '').replace(rx.port, '');
+},
+_lex: function (text) {
+var root = {
+start: 0,
+end: text.length
+};
+var n = root;
+for (var i = 0, s = 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 = t.substring(t.lastIndexOf(';') + 1);
+var s = node.parsedSelector = node.selector = t.trim();
+node.atRule = s.indexOf(AT_START) === 0;
+if (node.atRule) {
+if (s.indexOf(MEDIA_START) === 0) {
+node.type = this.types.MEDIA_RULE;
+} else if (s.match(rx.keyframesRule)) {
+node.type = this.types.KEYFRAMES_RULE;
+}
+} else {
+if (s.indexOf(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;
+},
+stringify: function (node, preserveProperties, text) {
+text = text || '';
+var cssText = '';
+if (node.cssText || node.rules) {
+var r$ = node.rules;
+if (r$ && (preserveProperties || !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 : 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;
+},
+types: {
+STYLE_RULE: 1,
+KEYFRAMES_RULE: 7,
+MEDIA_RULE: 4,
+MIXIN_RULE: 1000
+},
+OPEN_BRACE: '{',
+CLOSE_BRACE: '}'
+};
+function hasMixinRules(rules) {
+return rules[0].selector.indexOf(VAR_START) >= 0;
+}
+function removeCustomProps(cssText) {
+return cssText.replace(rx.customProp, '').replace(rx.mixinProp, '').replace(rx.mixinApply, '').replace(rx.varApply, '');
+}
+var VAR_START = '--';
+var MEDIA_START = '@media';
+var AT_START = '@';
+var 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/
+};
+return api;
+}();
+Polymer.StyleUtil = function () {
+return {
+MODULE_STYLES_SELECTOR: 'style, link[rel=import][type~=css]',
+toCssText: function (rules, callback, preserveProperties) {
+if (typeof rules === 'string') {
+rules = this.parser.parse(rules);
+}
+if (callback) {
+this.forEachStyleRule(rules, callback);
+}
+return this.parser.stringify(rules, preserveProperties);
+},
+forRulesInStyles: function (styles, callback) {
+for (var i = 0, l = styles.length, s; i < l && (s = styles[i]); i++) {
+this.forEachStyleRule(this.rulesForStyle(s), callback);
+}
+},
+rulesForStyle: function (style) {
+if (!style.__cssRules && style.textContent) {
+style.__cssRules = this.parser.parse(style.textContent);
+}
+return style.__cssRules;
+},
+clearStyleRules: function (style) {
+style.__cssRules = null;
+},
+forEachStyleRule: function (node, callback) {
+var s = node.selector;
+var skipRules = false;
+if (node.type === this.ruleTypes.STYLE_RULE) {
+callback(node);
+} else if (node.type === this.ruleTypes.KEYFRAMES_RULE || 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.forEachStyleRule(r, callback);
+}
+}
+},
+applyCss: function (cssText, moniker, target, afterNode) {
+var style = document.createElement('style');
+if (moniker) {
+style.setAttribute('scope', moniker);
+}
+style.textContent = cssText;
+target = target || document.head;
+if (!afterNode) {
+var n$ = target.querySelectorAll('style[scope]');
+afterNode = n$[n$.length - 1];
+}
+target.insertBefore(style, afterNode && afterNode.nextSibling || target.firstChild);
+return style;
+},
+cssFromModule: function (moduleId) {
+var m = Polymer.DomModule.import(moduleId);
+if (m && !m._cssText) {
+var cssText = '';
+var e$ = Array.prototype.slice.call(m.querySelectorAll(this.MODULE_STYLES_SELECTOR));
+for (var i = 0, e; i < e$.length; i++) {
+e = e$[i];
+if (e.localName === 'style') {
+e = e.__appliedElement || e;
+e.parentNode.removeChild(e);
+} else {
+e = e.import && e.import.body;
+}
+if (e) {
+cssText += Polymer.ResolveUrl.resolveCss(e.textContent, e.ownerDocument);
+}
+}
+m._cssText = cssText;
+}
+return m && m._cssText || '';
+},
+parser: Polymer.CssParse,
+ruleTypes: Polymer.CssParse.types
+};
+}();
+Polymer.StyleTransformer = function () {
+var nativeShadow = Polymer.Settings.useNativeShadow;
+var styleUtil = Polymer.StyleUtil;
+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 = '';
+for (var i = 0, l = styles.length, s, text; i < l && (s = styles[i]); i++) {
+var rules = styleUtil.rulesForStyle(s);
+cssText += nativeShadow ? styleUtil.toCssText(rules, callback) : 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) {
+var p$ = rule.selector.split(COMPLEX_SELECTOR_SEP);
+for (var i = 0, l = p$.length, p; i < l && (p = p$[i]); i++) {
+p$[i] = transformer.call(this, p, scope, hostScope);
+}
+rule.selector = p$.join(COMPLEX_SELECTOR_SEP);
+},
+_transformComplexSelector: function (selector, scope, hostScope) {
+var stop = false;
+var hostContext = false;
+var self = this;
+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 = selector.replace(HOST_PAREN, function (m, host, paren) {
+return hostScope + paren;
+});
+selector = selector.replace(HOST, 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);
+},
+documentRule: function (rule) {
+rule.selector = rule.parsedSelector;
+this.normalizeRootSelector(rule);
+if (!nativeShadow) {
+this._transformRule(rule, this._transformDocumentSelector);
+}
+},
+normalizeRootSelector: function (rule) {
+if (rule.selector === ROOT) {
+rule.selector = 'body';
+}
+},
+_transformDocumentSelector: function (selector) {
+return selector.match(SCOPE_JUMP) ? this._transformComplexSelector(selector, SCOPE_DOC_SELECTOR) : this._transformSimpleSelector(selector.trim(), SCOPE_DOC_SELECTOR);
+},
+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 HOST = ':host';
+var ROOT = ':root';
+var HOST_PAREN = /(\:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/g;
+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';
+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.forEachStyleRule(rules, function (rule) {
+var map = self._mapRule(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);
+},
+_mapRule: 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 = []);
+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: /%[^,]*$/
+}
+};
+}();
+(function () {
+var prepElement = Polymer.Base._prepElement;
+var nativeShadow = Polymer.Settings.useNativeShadow;
+var styleUtil = Polymer.StyleUtil;
+var styleTransformer = Polymer.StyleTransformer;
+var styleExtends = Polymer.StyleExtends;
+Polymer.Base._addFeature({
+_prepElement: function (element) {
+if (this._encapsulateStyle) {
+styleTransformer.element(element, this.is, this._scopeCssViaAttr);
+}
+prepElement.call(this, element);
+},
+_prepStyles: function () {
+if (this._encapsulateStyle === undefined) {
+this._encapsulateStyle = !nativeShadow && Boolean(this._template);
+}
+this._styles = this._collectStyles();
+var cssText = styleTransformer.elementStyles(this);
+if (cssText && this._template) {
+var style = styleUtil.applyCss(cssText, this.is, nativeShadow ? this._template.content : null);
+if (!nativeShadow) {
+this._scopeStyle = style;
+}
+}
+},
+_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);
+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) {
+node.className = self._scopeElementClass(node, node.className);
+var n$ = node.querySelectorAll('*');
+Array.prototype.forEach.call(n$, function (n) {
+n.className = self._scopeElementClass(n, n.className);
+});
+}
+};
+scopify(container);
+if (shouldObserve) {
+var mo = new MutationObserver(function (mxns) {
+mxns.forEach(function (m) {
+if (m.addedNodes) {
+for (var i = 0; i < m.addedNodes.length; i++) {
+scopify(m.addedNodes[i]);
+}
+}
+});
+});
+mo.observe(container, {
+childList: true,
+subtree: true
+});
+return mo;
+}
+}
+});
+}());
+Polymer.StyleProperties = function () {
+'use strict';
+var nativeShadow = Polymer.Settings.useNativeShadow;
+var matchesSelector = Polymer.DomApi.matchesSelector;
+var styleUtil = Polymer.StyleUtil;
+var styleTransformer = Polymer.StyleTransformer;
+return {
+decorateStyles: function (styles) {
+var self = this, props = {};
+styleUtil.forRulesInStyles(styles, function (rule) {
+self.decorateRule(rule);
+self.collectPropertiesInCssText(rule.propertyInfo.cssText, props);
+});
+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 any;
+while (m = rx.exec(cssText)) {
+properties[m[1]] = (m[2] || m[3]).trim();
+any = true;
+}
+return any;
+}
+},
+collectCssText: function (rule) {
+var customCssText = '';
+var cssText = rule.parsedCssText;
+cssText = cssText.replace(this.rx.BRACKETED, '').replace(this.rx.VAR_ASSIGN, '');
+var parts = cssText.split(';');
+for (var i = 0, p; i < parts.length; i++) {
+p = parts[i];
+if (p.match(this.rx.MIXIN_MATCH) || p.match(this.rx.VAR_MATCH)) {
+customCssText += p + ';\n';
+}
+}
+return customCssText;
+},
+collectPropertiesInCssText: function (cssText, props) {
+var m;
+while (m = this.rx.VAR_CAPTURE.exec(cssText)) {
+props[m[1]] = true;
+var def = m[2];
+if (def && def.match(this.rx.IS_VAR)) {
+props[def] = 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 (all, prefix, value, fallback) {
+var propertyValue = self.valueForProperty(props[value], props) || (props[fallback] ? self.valueForProperty(props[fallback], props) : fallback);
+return prefix + (propertyValue || '');
+};
+property = property.replace(this.rx.VAR_MATCH, fn);
+}
+}
+return property && property.trim() || '';
+},
+valueForProperties: function (property, props) {
+var parts = property.split(';');
+for (var i = 0, p, m; i < parts.length && (p = parts[i]); i++) {
+m = p.match(this.rx.MIXIN_MATCH);
+if (m) {
+p = this.valueForProperty(props[m[1]], props);
+} else {
+var pp = p.split(':');
+if (pp[1]) {
+pp[1] = pp[1].trim();
+pp[1] = this.valueForProperty(pp[1], props) || pp[1];
+}
+p = pp.join(':');
+}
+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;
+},
+propertyDataFromStyles: function (styles, element) {
+var props = {}, self = this;
+var o = [], i = 0;
+styleUtil.forRulesInStyles(styles, function (rule) {
+if (!rule.propertyInfo) {
+self.decorateRule(rule);
+}
+if (element && rule.propertyInfo.properties && matchesSelector.call(element, rule.selector)) {
+self.collectProperties(rule, props);
+addToBitMask(i, o);
+}
+i++;
+});
+return {
+properties: props,
+key: o
+};
+},
+scopePropertiesFromStyles: function (styles) {
+if (!styles._scopeStyleProperties) {
+styles._scopeStyleProperties = this.selectedPropertiesFromStyles(styles, this.SCOPE_SELECTORS);
+}
+return styles._scopeStyleProperties;
+},
+hostPropertiesFromStyles: function (styles) {
+if (!styles._hostStyleProperties) {
+styles._hostStyleProperties = this.selectedPropertiesFromStyles(styles, this.HOST_SELECTORS);
+}
+return styles._hostStyleProperties;
+},
+selectedPropertiesFromStyles: function (styles, selectors) {
+var props = {}, self = this;
+styleUtil.forRulesInStyles(styles, function (rule) {
+if (!rule.propertyInfo) {
+self.decorateRule(rule);
+}
+for (var i = 0; i < selectors.length; i++) {
+if (rule.parsedSelector === selectors[i]) {
+self.collectProperties(rule, props);
+return;
+}
+}
+});
+return props;
+},
+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);
+return styleTransformer.elementStyles(element, function (rule) {
+self.applyProperties(rule, properties);
+if (rule.cssText && !nativeShadow) {
+self._scopeSelector(rule, hostRx, hostSelector, element._scopeCssViaAttr, scopeSelector);
+}
+});
+},
+_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, hostSelector + scope) : scope + ' ' + p;
+}
+rule.selector = parts.join(',');
+},
+applyElementScopeSelector: function (element, selector, old, viaAttr) {
+var c = viaAttr ? element.getAttribute(styleTransformer.SCOPE_NAME) : element.className;
+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.className = v;
+}
+}
+},
+applyElementStyle: function (element, properties, selector, style) {
+var cssText = style ? style.textContent || '' : this.transformStyles(element, properties, selector);
+var s = element._customStyle;
+if (s && !nativeShadow && s !== style) {
+s._useCount--;
+if (s._useCount <= 0 && s.parentNode) {
+s.parentNode.removeChild(s);
+}
+}
+if (nativeShadow || (!style || !style.parentNode)) {
+if (nativeShadow && element._customStyle) {
+element._customStyle.textContent = cssText;
+style = element._customStyle;
+} else if (cssText) {
+style = styleUtil.applyCss(cssText, selector, nativeShadow ? element.root : 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;
+}
+}
+},
+rx: {
+VAR_ASSIGN: /(?:^|[;\n]\s*)(--[\w-]*?):\s*?(?:([^;{]*?)|{([^}]*)})(?:(?=[;\n])|$)/gim,
+MIXIN_MATCH: /(?:^|\W+)@apply[\s]*\(([^)]*)\)/im,
+VAR_MATCH: /(^|\W+)var\([\s]*([^,)]*)[\s]*,?[\s]*((?:[^,)]*)|(?:[^;]*\([^;)]*\)))[\s]*?\)/gim,
+VAR_CAPTURE: /\([\s]*(--[^,\s)]*)(?:,[\s]*(--[^,\s)]*))?(?:\)|,)/gim,
+IS_VAR: /^--/,
+BRACKETED: /\{[^}]*\}/g,
+HOST_PREFIX: '(?:^|[^.#[:])',
+HOST_SUFFIX: '($|[.:[\\s>+~])'
+},
+HOST_SELECTORS: [':host'],
+SCOPE_SELECTORS: [':root'],
+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 styleUtil = Polymer.StyleUtil;
+var StyleCache = Polymer.StyleCache;
+var api = {
+_styles: [],
+_properties: null,
+customStyle: {},
+_styleCache: new StyleCache(),
+addStyle: function (style) {
+this._styles.push(style);
+this._properties = null;
+},
+get _styleProperties() {
+if (!this._properties) {
+styleProperties.decorateStyles(this._styles);
+this._styles._scopeStyleProperties = null;
+this._properties = styleProperties.scopePropertiesFromStyles(this._styles);
+styleProperties.mixinCustomStyle(this._properties, this.customStyle);
+styleProperties.reify(this._properties);
+}
+return 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();
+}
+}
+};
+return api;
+}();
+(function () {
+'use strict';
+var serializeValueToAttribute = Polymer.Base.serializeValueToAttribute;
+var propertyUtils = Polymer.StyleProperties;
+var styleTransformer = Polymer.StyleTransformer;
+var styleUtil = Polymer.StyleUtil;
+var styleDefaults = Polymer.StyleDefaults;
+var nativeShadow = Polymer.Settings.useNativeShadow;
+Polymer.Base._addFeature({
+_prepStyleProperties: function () {
+this._ownStylePropertyNames = this._styles ? propertyUtils.decorateStyles(this._styles) : [];
+},
+_setupStyleProperties: function () {
+this.customStyle = {};
+},
+_needsStyleProperties: function () {
+return Boolean(this._ownStylePropertyNames && this._ownStylePropertyNames.length);
+},
+_beforeAttached: function () {
+if (!this._scopeSelector && this._needsStyleProperties()) {
+this._updateStyleProperties();
+}
+},
+_updateStyleProperties: function () {
+var info, scope = this.domHost || styleDefaults;
+if (!scope._styleCache) {
+scope._styleCache = new Polymer.StyleCache();
+}
+var scopeData = propertyUtils.propertyDataFromStyles(scope._styles, this);
+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
+};
+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.domHost || styleDefaults;
+if (!scope._styleProperties) {
+scope._computeStyleProperties();
+}
+var props = Object.create(scope._styleProperties);
+this.mixin(props, propertyUtils.hostPropertiesFromStyles(this._styles));
+scopeProps = scopeProps || propertyUtils.propertyDataFromStyles(scope._styles, this).properties;
+this.mixin(props, scopeProps);
+this.mixin(props, propertyUtils.scopePropertiesFromStyles(this._styles));
+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') {
+var host = node === this ? this.domHost || this.dataHost : this;
+if (host) {
+value = host._scopeElementClass(node, value);
+}
+}
+node = Polymer.dom(node);
+serializeValueToAttribute.call(this, value, attribute, node);
+},
+_scopeElementClass: function (element, selector) {
+if (!nativeShadow && !this._scopeCssViaAttr) {
+selector += (selector ? ' ' : '') + SCOPE_NAME + ' ' + this.is + (element._scopeSelector ? ' ' + XSCOPE_NAME + ' ' + element._scopeSelector : '');
+}
+return selector;
+},
+updateStyles: function (properties) {
+if (this.isAttached) {
+if (properties) {
+this.mixin(this.customStyle, properties);
+}
+if (this._needsStyleProperties()) {
+this._updateStyleProperties();
+} else {
+this._styleProperties = null;
+}
+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();
+this._prepAttributes();
+this._prepExtends();
+this._prepConstructor();
+this._prepTemplate();
+this._prepStyles();
+this._prepStyleProperties();
+this._prepAnnotations();
+this._prepEffects();
+this._prepBehaviors();
+this._prepBindings();
+this._prepShady();
+},
+_prepBehavior: function (b) {
+this._addPropertyEffects(b.properties);
+this._addComplexObserverEffects(b.observers);
+this._addHostAttributes(b.hostAttributes);
+},
+_initFeatures: function () {
+this._poolContent();
+this._setupConfigure();
+this._setupStyleProperties();
+this._pushHost();
+this._stampTemplate();
+this._popHost();
+this._marshalAnnotationReferences();
+this._marshalHostAttributes();
+this._setupDebouncers();
+this._marshalInstanceEffects();
+this._marshalBehaviors();
+this._marshalAttributes();
+this._tryReady();
+},
+_marshalBehavior: function (b) {
+this._listenListeners(b.listeners);
+}
+});
+(function () {
+var nativeShadow = Polymer.Settings.useNativeShadow;
+var propertyUtils = Polymer.StyleProperties;
+var styleUtil = Polymer.StyleUtil;
+var styleDefaults = Polymer.StyleDefaults;
+var styleTransformer = Polymer.StyleTransformer;
+Polymer({
+is: 'custom-style',
+extends: 'style',
+created: function () {
+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 || this;
+styleDefaults.addStyle(e);
+if (e.textContent) {
+this._apply();
+} else {
+var observer = new MutationObserver(function () {
+observer.disconnect();
+this._apply();
+}.bind(this));
+observer.observe(e, { childList: true });
+}
+}
+}
+},
+_apply: function () {
+var e = this.__appliedElement || this;
+this._computeStyleProperties();
+var props = this._styleProperties;
+var self = this;
+e.textContent = styleUtil.toCssText(styleUtil.rulesForStyle(e), function (rule) {
+var css = rule.cssText = rule.parsedCssText;
+if (rule.propertyInfo && rule.propertyInfo.cssText) {
+css = css.replace(propertyUtils.rx.VAR_ASSIGN, '');
+rule.cssText = propertyUtils.valueForProperties(css, props);
+}
+styleTransformer.documentRule(rule);
+});
+}
+});
+}());
+Polymer.Templatizer = {
+properties: { _hideTemplateChildren: { observer: '_showHideChildren' } },
+_templatizerStatic: {
+count: 0,
+callbacks: {},
+debouncer: null
+},
+_instanceProps: Polymer.nob,
+created: function () {
+this._templatizerId = this._templatizerStatic.count++;
+},
+templatize: function (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);
+archetype._prepEffects();
+this._customPrepEffects(archetype);
+archetype._prepBehaviors();
+archetype._prepBindings();
+this._prepParentProperties(archetype, template);
+archetype._notifyPath = this._notifyPathImpl;
+archetype._scopeElementClass = this._scopeElementClassImpl;
+archetype.listen = this._listenImpl;
+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;
+},
+_showHideChildren: function (hidden) {
+},
+_debounceTemplate: function (fn) {
+this._templatizerStatic.callbacks[this._templatizerId] = fn.bind(this);
+this._templatizerStatic.debouncer = Polymer.Debounce(this._templatizerStatic.debouncer, this._flushTemplates.bind(this, true));
+},
+_flushTemplates: function (debouncerExpired) {
+var db = this._templatizerStatic.debouncer;
+while (debouncerExpired || db && db.finish) {
+db.stop();
+var cbs = this._templatizerStatic.callbacks;
+this._templatizerStatic.callbacks = {};
+for (var id in cbs) {
+cbs[id]();
+}
+debouncerExpired = false;
+}
+},
+_customPrepEffects: function (archetype) {
+var parentProps = archetype._parentProps;
+for (var prop in parentProps) {
+archetype._addPropertyEffect(prop, 'function', this._createHostPropEffector(prop));
+}
+for (var 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 = rootDataHost._prepElement.bind(rootDataHost);
+}
+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);
+}
+for (prop in parentProps) {
+var parentProp = '_parent_' + prop;
+var effects = [
+{
+kind: 'function',
+effect: this._createForwardPropEffector(prop)
+},
+{ kind: 'notify' }
+];
+Polymer.Bind._createAccessors(proto, parentProp, effects);
+}
+}
+if (template != this) {
+Polymer.Bind.prepareInstance(template);
+template._forwardParentProp = this._forwardParentProp.bind(this);
+}
+this._extendTemplate(template, proto);
+}
+},
+_createForwardPropEffector: function (prop) {
+return function (source, value) {
+this._forwardParentProp(prop, value);
+};
+},
+_createHostPropEffector: function (prop) {
+return function (source, value) {
+this.dataHost['_parent_' + prop] = value;
+};
+},
+_createInstancePropEffector: function (prop) {
+return function (source, value, old, fromAbove) {
+if (!fromAbove) {
+this.dataHost._forwardInstanceProp(this, prop, value);
+}
+};
+},
+_extendTemplate: function (template, proto) {
+Object.getOwnPropertyNames(proto).forEach(function (n) {
+var val = template[n];
+var pd = Object.getOwnPropertyDescriptor(proto, n);
+Object.defineProperty(template, n, pd);
+if (val !== undefined) {
+template._propertySetter(n, val);
+}
+});
+},
+_forwardInstancePath: function (inst, path, value) {
+},
+_forwardInstanceProp: function (inst, prop, value) {
+},
+_notifyPathImpl: function (path, value) {
+var dataHost = this.dataHost;
+var dot = path.indexOf('.');
+var root = dot < 0 ? path : path.slice(0, dot);
+dataHost._forwardInstancePath.call(dataHost, this, path, value);
+if (root in dataHost._parentProps) {
+dataHost.notifyPath('_parent_' + path, value);
+}
+},
+_pathEffector: function (path, value, fromAbove) {
+if (this._forwardParentPath) {
+if (path.indexOf('_parent_') === 0) {
+this._forwardParentPath(path.substring(8), value);
+}
+}
+Polymer.Base._pathEffector.apply(this, arguments);
+},
+_constructorImpl: function (model, host) {
+this._rootDataHost = host._getRootDataHost();
+this._setupConfigure(model);
+this._pushHost(host);
+this.root = this.instanceTemplate(this._template);
+this.root.__noContent = !this._notes._hasContent;
+this.root.__styleScoped = true;
+this._popHost();
+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;
+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);
+}
+},
+stamp: function (model) {
+model = model || {};
+if (this._parentProps) {
+for (var prop in this._parentProps) {
+model[prop] = this['_parent_' + prop];
+}
+}
+return new this.ctor(model, this);
+}
+};
+Polymer({
+is: 'dom-template',
+extends: 'template',
+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) {
+this._removeFromMap(this.store[key]);
+delete this.store[key];
+},
+_removeFromMap: function (item) {
+if (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) {
+if (typeof item == 'object') {
+return this.omap.get(item);
+} else {
+return this.pmap[item];
+}
+},
+getKeys: function () {
+return Object.keys(this.store);
+},
+setItem: function (key, item) {
+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) {
+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 keySplices = [];
+for (var i = 0; i < splices.length; i++) {
+var j, o, key, s = splices[i];
+var removed = [];
+for (j = 0; j < s.removed.length; j++) {
+o = s.removed[j];
+key = this.remove(o);
+removed.push(key);
+}
+var added = [];
+for (j = 0; j < s.addedCount; j++) {
+o = this.userArray[s.index + j];
+key = this.add(o);
+added.push(key);
+}
+keySplices.push({
+index: s.index,
+removed: removed,
+removedItems: s.removed,
+added: added
+});
+}
+return keySplices;
+}
+};
+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',
+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
+},
+behaviors: [Polymer.Templatizer],
+observers: ['_itemsChanged(items.*)'],
+detached: function () {
+if (this.rows) {
+for (var i = 0; i < this.rows.length; i++) {
+this._detachRow(i);
+}
+}
+},
+attached: function () {
+if (this.rows) {
+var parentNode = Polymer.dom(this).parentNode;
+for (var i = 0; i < this.rows.length; i++) {
+Polymer.dom(parentNode).insertBefore(this.rows[i].root, this);
+}
+}
+},
+ready: function () {
+this._instanceProps = { __key__: true };
+this._instanceProps[this.as] = true;
+this._instanceProps[this.indexAs] = true;
+if (!this.ctor) {
+this.templatize(this);
+}
+},
+_sortChanged: function () {
+var dataHost = this._getRootDataHost();
+var sort = this.sort;
+this._sortFn = sort && (typeof sort == 'function' ? sort : function () {
+return dataHost[sort].apply(dataHost, arguments);
+});
+this._fullRefresh = true;
+if (this.items) {
+this._debounceTemplate(this._render);
+}
+},
+_filterChanged: function () {
+var dataHost = this._getRootDataHost();
+var filter = this.filter;
+this._filterFn = filter && (typeof filter == 'function' ? filter : function () {
+return dataHost[filter].apply(dataHost, arguments);
+});
+this._fullRefresh = true;
+if (this.items) {
+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._splices = [];
+this._fullRefresh = true;
+this._debounceTemplate(this._render);
+} else if (change.path == 'items.splices') {
+this._splices = this._splices.concat(change.value.keySplices);
+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._fullRefresh = true;
+if (this.delay) {
+this.debounce('render', this._render, this.delay);
+} else {
+this._debounceTemplate(this._render);
+}
+return;
+}
+}
+}
+},
+render: function () {
+this._fullRefresh = true;
+this._debounceTemplate(this._render);
+this._flushTemplates();
+},
+_render: function () {
+var c = this.collection;
+if (!this._fullRefresh) {
+if (this._sortFn) {
+this._applySplicesViewSort(this._splices);
+} else {
+if (this._filterFn) {
+this._fullRefresh = true;
+} else {
+this._applySplicesArraySort(this._splices);
+}
+}
+}
+if (this._fullRefresh) {
+this._sortAndFilter();
+this._fullRefresh = false;
+}
+this._splices = [];
+var rowForKey = this._rowForKey = {};
+var keys = this._orderedKeys;
+this.rows = this.rows || [];
+for (var i = 0; i < keys.length; i++) {
+var key = keys[i];
+var item = c.getItem(key);
+var row = this.rows[i];
+rowForKey[key] = i;
+if (!row) {
+this.rows.push(row = this._insertRow(i, null, item));
+}
+row.__setProperty(this.as, item, true);
+row.__setProperty('__key__', key, true);
+row.__setProperty(this.indexAs, i, true);
+}
+for (; i < this.rows.length; i++) {
+this._detachRow(i);
+}
+this.rows.splice(keys.length, this.rows.length - keys.length);
+this.fire('dom-change');
+},
+_sortAndFilter: function () {
+var c = this.collection;
+if (!this._sortFn) {
+this._orderedKeys = [];
+var items = this.items;
+if (items) {
+for (var i = 0; i < items.length; i++) {
+this._orderedKeys.push(c.getKey(items[i]));
+}
+}
+} else {
+this._orderedKeys = c ? c.getKeys() : [];
+}
+if (this._filterFn) {
+this._orderedKeys = this._orderedKeys.filter(function (a) {
+return this._filterFn(c.getItem(a));
+}, this);
+}
+if (this._sortFn) {
+this._orderedKeys.sort(function (a, b) {
+return this._sortFn(c.getItem(a), c.getItem(b));
+}.bind(this));
+}
+},
+_keySort: function (a, b) {
+return this.collection.getKey(a) - this.collection.getKey(b);
+},
+_applySplicesViewSort: function (splices) {
+var c = this.collection;
+var keys = this._orderedKeys;
+var rows = this.rows;
+var removedRows = [];
+var addedKeys = [];
+var pool = [];
+var sortFn = this._sortFn || this._keySort.bind(this);
+splices.forEach(function (s) {
+for (var i = 0; i < s.removed.length; i++) {
+var idx = this._rowForKey[s.removed[i]];
+if (idx != null) {
+removedRows.push(idx);
+}
+}
+for (var i = 0; i < s.added.length; i++) {
+addedKeys.push(s.added[i]);
+}
+}, this);
+if (removedRows.length) {
+removedRows.sort();
+for (var i = removedRows.length - 1; i >= 0; i--) {
+var idx = removedRows[i];
+pool.push(this._detachRow(idx));
+rows.splice(idx, 1);
+keys.splice(idx, 1);
+}
+}
+if (addedKeys.length) {
+if (this._filterFn) {
+addedKeys = addedKeys.filter(function (a) {
+return this._filterFn(c.getItem(a));
+}, this);
+}
+addedKeys.sort(function (a, b) {
+return this._sortFn(c.getItem(a), c.getItem(b));
+}.bind(this));
+var start = 0;
+for (var i = 0; i < addedKeys.length; i++) {
+start = this._insertRowIntoViewSort(start, addedKeys[i], pool);
+}
+}
+},
+_insertRowIntoViewSort: function (start, key, pool) {
+var c = this.collection;
+var item = c.getItem(key);
+var end = this.rows.length - 1;
+var idx = -1;
+var sortFn = this._sortFn || this._keySort.bind(this);
+while (start <= end) {
+var mid = start + end >> 1;
+var midKey = this._orderedKeys[mid];
+var cmp = 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._orderedKeys.splice(idx, 0, key);
+this.rows.splice(idx, 0, this._insertRow(idx, pool, c.getItem(key)));
+return idx;
+},
+_applySplicesArraySort: function (splices) {
+var keys = this._orderedKeys;
+var pool = [];
+splices.forEach(function (s) {
+for (var i = 0; i < s.removed.length; i++) {
+pool.push(this._detachRow(s.index + i));
+}
+this.rows.splice(s.index, s.removed.length);
+}, this);
+var c = this.collection;
+splices.forEach(function (s) {
+var args = [
+s.index,
+s.removed.length
+].concat(s.added);
+keys.splice.apply(keys, args);
+for (var i = 0; i < s.added.length; i++) {
+var item = c.getItem(s.added[i]);
+var row = this._insertRow(s.index + i, pool, item);
+this.rows.splice(s.index + i, 0, row);
+}
+}, this);
+},
+_detachRow: function (idx) {
+var row = this.rows[idx];
+var parentNode = Polymer.dom(this).parentNode;
+for (var i = 0; i < row._children.length; i++) {
+var el = row._children[i];
+Polymer.dom(row.root).appendChild(el);
+}
+return row;
+},
+_insertRow: function (idx, pool, item) {
+var row = pool && pool.pop() || this._generateRow(idx, item);
+var beforeRow = this.rows[idx];
+var beforeNode = beforeRow ? beforeRow._children[0] : this;
+var parentNode = Polymer.dom(this).parentNode;
+Polymer.dom(parentNode).insertBefore(row.root, beforeNode);
+return row;
+},
+_generateRow: function (idx, item) {
+var model = { __key__: this.collection.getKey(item) };
+model[this.as] = item;
+model[this.indexAs] = idx;
+var row = this.stamp(model);
+return row;
+},
+_showHideChildren: function (hidden) {
+if (this.rows) {
+for (var i = 0; i < this.rows.length; i++) {
+var c$ = this.rows[i]._children;
+for (var j = 0; j < c$.length; j++) {
+var c = c$[j];
+if (c.style) {
+c.style.display = hidden ? 'none' : '';
+}
+c._hideTemplateChildren = hidden;
+}
+}
+}
+},
+_forwardInstanceProp: function (row, prop, value) {
+if (prop == this.as) {
+var idx;
+if (this._sortFn || this._filterFn) {
+idx = this.items.indexOf(this.collection.getItem(row.__key__));
+} else {
+idx = row[this.indexAs];
+}
+this.set('items.' + idx, value);
+}
+},
+_forwardInstancePath: function (row, path, value) {
+if (path.indexOf(this.as + '.') === 0) {
+this.notifyPath('items.' + row.__key__ + '.' + path.slice(this.as.length + 1), value);
+}
+},
+_forwardParentProp: function (prop, value) {
+if (this.rows) {
+this.rows.forEach(function (row) {
+row.__setProperty(prop, value, true);
+}, this);
+}
+},
+_forwardParentPath: function (path, value) {
+if (this.rows) {
+this.rows.forEach(function (row) {
+row.notifyPath(path, value, true);
+}, this);
+}
+},
+_forwardItemPath: function (path, value) {
+if (this._rowForKey) {
+var dot = path.indexOf('.');
+var key = path.substring(0, dot < 0 ? path.length : dot);
+var idx = this._rowForKey[key];
+var row = this.rows[idx];
+if (row) {
+if (dot >= 0) {
+path = this.as + '.' + path.substring(dot + 1);
+row.notifyPath(path, value, true);
+} else {
+row.__setProperty(this.as, value, true);
+}
+}
+}
+},
+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;
+}
+}
+},
+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',
+properties: {
+items: {
+type: Array,
+observer: '_itemsChanged'
+},
+selected: {
+type: Object,
+notify: true
+},
+toggle: Boolean,
+multi: Boolean
+},
+_itemsChanged: function () {
+if (Array.isArray(this.selected)) {
+for (var i = 0; i < this.selected.length; i++) {
+this.unlinkPaths('selected.' + i);
+}
+} else {
+this.unlinkPaths('selected');
+}
+if (this.multi) {
+this.selected = [];
+} else {
+this.selected = null;
+}
+},
+deselect: function (item) {
+if (this.multi) {
+var scol = Polymer.Collection.get(this.selected);
+var sidx = this.selected.indexOf(item);
+if (sidx >= 0) {
+var skey = scol.getKey(item);
+this.splice('selected', sidx, 1);
+this.unlinkPaths('selected.' + skey);
+return true;
+}
+} else {
+this.selected = null;
+this.unlinkPaths('selected');
+}
+},
+select: function (item) {
+var icol = Polymer.Collection.get(this.items);
+var key = icol.getKey(item);
+if (this.multi) {
+var scol = Polymer.Collection.get(this.selected);
+var skey = scol.getKey(item);
+if (skey >= 0) {
+if (this.toggle) {
+this.deselect(item);
+}
+} else {
+this.push('selected', item);
+this.async(function () {
+skey = scol.getKey(item);
+this.linkPaths('selected.' + skey, 'items.' + key);
+});
+}
+} else {
+if (this.toggle && item == this.selected) {
+this.deselect();
+} else {
+this.linkPaths('selected', 'items.' + key);
+this.selected = item;
+}
+}
+}
+});
+Polymer({
+is: 'dom-if',
+extends: 'template',
+properties: {
+'if': {
+type: Boolean,
+value: false,
+observer: '_queueRender'
+},
+restamp: {
+type: Boolean,
+value: false,
+observer: '_queueRender'
+}
+},
+behaviors: [Polymer.Templatizer],
+_queueRender: function () {
+this._debounceTemplate(this._render);
+},
+detached: function () {
+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._wrapTextNodes(this._content || this.content);
+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) {
+this.fire('dom-change');
+this._lastIf = this.if;
+}
+},
+_ensureInstance: function () {
+if (!this._instance) {
+this._instance = this.stamp();
+var root = this._instance.root;
+var parent = Polymer.dom(Polymer.dom(this).parentNode);
+parent.insertBefore(root, this);
+}
+},
+_teardownInstance: function () {
+if (this._instance) {
+var c = this._instance._children;
+if (c) {
+var parent = Polymer.dom(Polymer.dom(c[0]).parentNode);
+c.forEach(function (n) {
+parent.removeChild(n);
+});
+}
+this._instance = null;
+}
+},
+_wrapTextNodes: function (root) {
+for (var n = root.firstChild; n; n = n.nextSibling) {
+if (n.nodeType === Node.TEXT_NODE) {
+var s = document.createElement('span');
+root.insertBefore(s, n);
+s.appendChild(n);
+n = s;
+}
+}
+},
+_showHideChildren: function () {
+var hidden = this._hideTemplateChildren || !this.if;
+if (this._instance) {
+var c$ = this._instance._children;
+for (var i = 0; i < c$.length; i++) {
+var c = c$[i];
+c.style.display = hidden ? 'none' : '';
+c._hideTemplateChildren = hidden;
+}
+}
+},
+_forwardParentProp: function (prop, value) {
+if (this._instance) {
+this._instance[prop] = value;
+}
+},
+_forwardParentPath: function (path, value) {
+if (this._instance) {
+this._instance.notifyPath(path, value, true);
+}
+}
+});
+Polymer.ImportStatus = {
+_ready: false,
+_callbacks: [],
+whenLoaded: function (cb) {
+if (this._ready) {
+cb();
+} else {
+this._callbacks.push(cb);
+}
+},
+_importsLoaded: function () {
+this._ready = true;
+this._callbacks.forEach(function (cb) {
+cb();
+});
+this._callbacks = [];
+}
+};
+window.addEventListener('load', function () {
+Polymer.ImportStatus._importsLoaded();
+});
+if (window.HTMLImports) {
+HTMLImports.whenReady(function () {
+Polymer.ImportStatus._importsLoaded();
+});
+}
+Polymer({
+is: 'dom-bind',
+extends: 'template',
+created: function () {
+Polymer.ImportStatus.whenLoaded(this._readySelf.bind(this));
+},
+_registerFeatures: function () {
+this._prepExtends();
+this._prepConstructor();
+},
+_insertChildren: function () {
+var parentDom = Polymer.dom(Polymer.dom(this).parentNode);
+parentDom.insertBefore(this.root, this);
+},
+_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;
+}
+},
+_prepConfigure: function () {
+var config = {};
+for (var prop in this._propertyEffects) {
+config[prop] = this[prop];
+}
+this._setupConfigure = this._setupConfigure.bind(this, config);
+},
+attached: function () {
+if (!this._children) {
+this._template = this;
+this._prepAnnotations();
+this._prepEffects();
+this._prepBehaviors();
+this._prepConfigure();
+this._prepBindings();
+Polymer.Base._initFeatures.call(this);
+this._children = Array.prototype.slice.call(this.root.childNodes);
+}
+this._insertChildren();
+this.fire('dom-change');
+},
+detached: function () {
+this._removeChildren();
+}
+});</script>
diff --git a/static/bower_components/webcomponentsjs/.bower.json b/static/bower_components/webcomponentsjs/.bower.json
new file mode 100644
index 0000000..161ba54
--- /dev/null
+++ b/static/bower_components/webcomponentsjs/.bower.json
@@ -0,0 +1,27 @@
+{
+ "name": "webcomponentsjs",
+ "main": "webcomponents.js",
+ "version": "0.7.5",
+ "homepage": "http://webcomponents.org",
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/webcomponents/webcomponentsjs.git"
+ },
+ "keywords": [
+ "webcomponents"
+ ],
+ "license": "BSD",
+ "ignore": [],
+ "_release": "0.7.5",
+ "_resolution": {
+ "type": "version",
+ "tag": "v0.7.5",
+ "commit": "6e2fd746392a9fbec95711872e21fa22bff22fae"
+ },
+ "_source": "git://github.com/Polymer/webcomponentsjs.git",
+ "_target": "^0.7.2",
+ "_originalSource": "webcomponentsjs"
+} \ No newline at end of file
diff --git a/static/bower_components/webcomponentsjs/CustomElements.js b/static/bower_components/webcomponentsjs/CustomElements.js
new file mode 100644
index 0000000..ae4af3b
--- /dev/null
+++ b/static/bower_components/webcomponentsjs/CustomElements.js
@@ -0,0 +1,963 @@
+/**
+ * @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.5
+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) {
+ 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;
+})(this);
+
+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.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) {
+ return added(node) || addedSubtree(node);
+ }
+ function added(node) {
+ if (scope.upgrade(node)) {
+ return true;
+ }
+ attached(node);
+ }
+ function addedSubtree(node) {
+ forSubtree(node, function(e) {
+ if (added(e)) {
+ return true;
+ }
+ });
+ }
+ function attachedNode(node) {
+ attached(node);
+ if (inDocument(node)) {
+ forSubtree(node, function(e) {
+ attached(e);
+ });
+ }
+ }
+ var hasPolyfillMutations = !window.MutationObserver || window.MutationObserver === window.JsMutationObserver;
+ scope.hasPolyfillMutations = hasPolyfillMutations;
+ 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 (hasPolyfillMutations) {
+ deferMutation(function() {
+ _attached(element);
+ });
+ } else {
+ _attached(element);
+ }
+ }
+ function _attached(element) {
+ if (element.__upgraded__ && (element.attachedCallback || element.detachedCallback)) {
+ if (!element.__attached && inDocument(element)) {
+ element.__attached = true;
+ if (element.attachedCallback) {
+ element.attachedCallback();
+ }
+ }
+ }
+ }
+ function detachedNode(node) {
+ detached(node);
+ forSubtree(node, function(e) {
+ detached(e);
+ });
+ }
+ function detached(element) {
+ if (hasPolyfillMutations) {
+ deferMutation(function() {
+ _detached(element);
+ });
+ } else {
+ _detached(element);
+ }
+ }
+ function _detached(element) {
+ if (element.__upgraded__ && (element.attachedCallback || element.detachedCallback)) {
+ if (element.__attached && !inDocument(element)) {
+ element.__attached = false;
+ if (element.detachedCallback) {
+ element.detachedCallback();
+ }
+ }
+ }
+ }
+ function inDocument(element) {
+ var p = element;
+ var doc = 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(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 || "");
+ }
+ mutations.forEach(function(mx) {
+ if (mx.type === "childList") {
+ forEach(mx.addedNodes, function(n) {
+ if (!n.localName) {
+ return;
+ }
+ addedNode(n);
+ });
+ 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(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);
+ 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());
+ addedNode(doc);
+ 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.upgradeSubtree = addedSubtree;
+ scope.upgradeAll = addedNode;
+ scope.attachedNode = attachedNode;
+ scope.takeRecords = takeRecords;
+});
+
+window.CustomElements.addModule(function(scope) {
+ var flags = scope.flags;
+ function upgrade(node) {
+ if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) {
+ var is = node.getAttribute("is");
+ var definition = scope.getRegisteredDefinition(is || node.localName);
+ if (definition) {
+ if (is && definition.tag == node.localName) {
+ return upgradeWithDefinition(node, definition);
+ } else if (!is && !definition.extends) {
+ return upgradeWithDefinition(node, definition);
+ }
+ }
+ }
+ }
+ function upgradeWithDefinition(element, definition) {
+ flags.upgrade && console.group("upgrade:", element.localName);
+ if (definition.is) {
+ element.setAttribute("is", definition.is);
+ }
+ implementPrototype(element, definition);
+ element.__upgraded__ = true;
+ created(element);
+ scope.attachedNode(element);
+ scope.upgradeSubtree(element);
+ 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 isIE11OrOlder = scope.isIE11OrOlder;
+ 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();
+ 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);
+ var expectedPrototype = Object.getPrototypeOf(inst);
+ if (expectedPrototype === definition.prototype) {
+ nativePrototype = expectedPrototype;
+ }
+ }
+ var proto = definition.prototype, ancestor;
+ while (proto && proto !== nativePrototype) {
+ ancestor = Object.getPrototypeOf(proto);
+ proto.__proto__ = ancestor;
+ proto = ancestor;
+ }
+ 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) {
+ 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");
+ if (isIE11OrOlder) {
+ (function() {
+ var importNode = document.importNode;
+ document.importNode = function() {
+ var n = importNode.apply(document, arguments);
+ if (n.nodeType == n.DOCUMENT_FRAGMENT_NODE) {
+ var f = document.createDocumentFragment();
+ f.appendChild(n);
+ return f;
+ } else {
+ return n;
+ }
+ };
+ })();
+ }
+ 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 isIE11OrOlder = /Trident/.test(navigator.userAgent);
+ 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;
+ 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;
+ };
+ }
+ }
+ function bootstrap() {
+ upgradeDocumentTree(window.wrap(document));
+ if (window.HTMLImports) {
+ window.HTMLImports.__importsParsingHook = function(elt) {
+ upgradeDocumentTree(wrap(elt.import));
+ };
+ }
+ window.CustomElements.ready = true;
+ 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 (isIE11OrOlder && 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);
+ e.preventDefault = function() {
+ Object.defineProperty(this, "defaultPrevented", {
+ get: function() {
+ return true;
+ }
+ });
+ };
+ return e;
+ };
+ window.CustomEvent.prototype = window.Event.prototype;
+ }
+ 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);
+ }
+ scope.isIE11OrOlder = isIE11OrOlder;
+})(window.CustomElements); \ No newline at end of file
diff --git a/static/bower_components/webcomponentsjs/CustomElements.min.js b/static/bower_components/webcomponentsjs/CustomElements.min.js
new file mode 100644
index 0000000..c4eff21
--- /dev/null
+++ b/static/bower_components/webcomponentsjs/CustomElements.min.js
@@ -0,0 +1,11 @@
+/**
+ * @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.5
+"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):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=n}(),function(e){function t(e){_.push(e),b||(b=!0,h(o))}function n(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function o(){b=!1;var 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_=++E}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 m(e,t,n){this.observer=e,this.target=t,this.options=n,this.transientObservedNodes=[]}var h,v=new WeakMap;if(/Trident|Edge/.test(navigator.userAgent))h=setTimeout;else if(window.setImmediate)h=window.setImmediate;else{var w=[],g=String(Math.random());window.addEventListener("message",function(e){if(e.data===g){var t=w;w=[],t.forEach(function(e){e()})}}),h=function(e){w.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 m(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;m.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){return!e.attributes||e.attributeFilter&&e.attributeFilter.length&&-1===e.attributeFilter.indexOf(t)&&-1===e.attributeFilter.indexOf(n)?void 0:e.attributeOldValue?c(a):r});break;case"DOMCharacterDataModified":var o=e.target,r=u("characterData",o),a=e.prevValue;i(o,function(e){return e.characterData?e.characterDataOldValue?c(a):r:void 0});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,m=f.nextSibling,r=u("childList",e.target.parentNode);r.addedNodes=d,r.removedNodes=s,r.previousSibling=p,r.nextSibling=m,i(e.relatedNode,function(e){return e.childList?r:void 0})}l()}},e.JsMutationObserver=a,e.MutationObserver||(e.MutationObserver=a)}(this),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.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)?!0: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;s>d&&(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){return n(e)||o(e)}function n(t){return e.upgrade(t)?!0:void d(t)}function o(e){_(e,function(e){return n(e)?!0:void 0})}function r(e){d(e),f(e)&&_(e,function(e){d(e)})}function i(e){O.push(e),N||(N=!0,setTimeout(a))}function a(){N=!1;for(var e,t=O,n=0,o=t.length;o>n&&(e=t[n]);n++)e();O=[]}function d(e){y?i(function(){s(e)}):s(e)}function s(e){e.__upgraded__&&(e.attachedCallback||e.detachedCallback)&&!e.__attached&&f(e)&&(e.__attached=!0,e.attachedCallback&&e.attachedCallback())}function u(e){c(e),_(e,function(e){c(e)})}function c(e){y?i(function(){l(e)}):l(e)}function l(e){e.__upgraded__&&(e.attachedCallback||e.detachedCallback)&&e.__attached&&!f(e)&&(e.__attached=!1,e.detachedCallback&&e.detachedCallback())}function f(e){for(var t=e,n=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){b.dom&&console.log("watching shadow-root for: ",e.localName);for(var t=e.shadowRoot;t;)v(t),t=t.olderShadowRoot}}function m(e){if(b.dom){var n=e[0];if(n&&"childList"===n.type&&n.addedNodes&&n.addedNodes){for(var o=n.addedNodes[0];o&&o!==document&&!o.host;)o=o.parentNode;var r=o&&(o.URL||o._URL||o.host&&o.host.localName)||"";r=r.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",e.length,r||"")}e.forEach(function(e){"childList"===e.type&&(M(e.addedNodes,function(e){e.localName&&t(e)}),M(e.removedNodes,function(e){e.localName&&u(e)}))}),b.dom&&console.groupEnd()}function h(e){for(e=window.wrap(e),e||(e=window.wrap(document));e.parentNode;)e=e.parentNode;var t=e.__observer;t&&(m(t.takeRecords()),a())}function v(e){if(!e.__observer){var t=new MutationObserver(m);t.observe(e,{childList:!0,subtree:!0}),e.__observer=t}}function w(e){e=window.wrap(e),b.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop()),t(e),v(e),b.dom&&console.groupEnd()}function g(e){E(e,w)}var b=e.flags,_=e.forSubtree,E=e.forDocumentTree,y=!window.MutationObserver||window.MutationObserver===window.JsMutationObserver;e.hasPolyfillMutations=y;var N=!1,O=[],M=Array.prototype.forEach.call.bind(Array.prototype.forEach),L=Element.prototype.createShadowRoot;L&&(Element.prototype.createShadowRoot=function(){var e=L.call(this);return window.CustomElements.watchShadow(this),e}),e.watchShadow=p,e.upgradeDocumentTree=g,e.upgradeSubtree=o,e.upgradeAll=t,e.attachedNode=r,e.takeRecords=h}),window.CustomElements.addModule(function(e){function t(t){if(!t.__upgraded__&&t.nodeType===Node.ELEMENT_NODE){var o=t.getAttribute("is"),r=e.getRegisteredDefinition(o||t.localName);if(r){if(o&&r.tag==t.localName)return n(t,r);if(!o&&!r["extends"])return n(t,r)}}}function n(t,n){return a.upgrade&&console.group("upgrade:",t.localName),n.is&&t.setAttribute("is",n.is),o(t,n),t.__upgraded__=!0,i(t),e.attachedNode(t),e.upgradeSubtree(t),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.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&&w(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<y.length;t++)if(e===y[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),o=Object.getPrototypeOf(n);o===e.prototype&&(t=o)}for(var r,i=e.prototype;i&&i!==t;)r=Object.getPrototypeOf(i),i.__proto__=r,i=r;e["native"]=t}}function s(e){return b(M(e.tag),e)}function u(e){return e?N[e.toLowerCase()]:void 0}function c(e,t){N[e]=t}function l(e){return function(){return s(e)}}function f(e,t,n){return e===O?p(t,n):L(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&&_(o,HTMLElement),o)}function m(e,t){var n=e[t];e[t]=function(){var e=n.apply(this,arguments);return g(e),e}}var h,v=e.isIE11OrOlder,w=e.upgradeDocumentTree,g=e.upgradeAll,b=e.upgradeWithDefinition,_=e.implementPrototype,E=e.useNative,y=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],N={},O="http://www.w3.org/1999/xhtml",M=document.createElement.bind(document),L=document.createElementNS.bind(document);h=Object.__proto__||E?function(e,t){return e instanceof t}:function(e,t){for(var n=e;n;){if(n===t.prototype)return!0;n=n.__proto__}return!1},m(Node.prototype,"cloneNode"),m(document,"importNode"),v&&!function(){var e=document.importNode;document.importNode=function(){var t=e.apply(document,arguments);if(t.nodeType==t.DOCUMENT_FRAGMENT_NODE){var n=document.createDocumentFragment();return n.appendChild(t),n}return t}}(),document.registerElement=t,document.createElement=p,document.createElementNS=f,e.registry=N,e["instanceof"]=h,e.reservedTagList=y,e.getRegisteredDefinition=u,document.register=document.registerElement}),function(e){function t(){a(window.wrap(document)),window.HTMLImports&&(window.HTMLImports.__importsParsingHook=function(e){a(wrap(e["import"]))}),window.CustomElements.ready=!0,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,r=/Trident/.test(navigator.userAgent);if(n){var i=function(){};e.watchShadow=i,e.upgrade=i,e.upgradeAll=i,e.upgradeDocumentTree=i,e.upgradeSubtree=i,e.takeRecords=i,e["instanceof"]=function(e,t){return e instanceof t}}else o();var a=e.upgradeDocumentTree;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=window.ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=window.ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}),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.preventDefault=function(){Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})},n},window.CustomEvent.prototype=window.Event.prototype),"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();e.isIE11OrOlder=r}(window.CustomElements); \ No newline at end of file
diff --git a/static/bower_components/webcomponentsjs/HTMLImports.js b/static/bower_components/webcomponentsjs/HTMLImports.js
new file mode 100644
index 0000000..e9f03ec
--- /dev/null
+++ b/static/bower_components/webcomponentsjs/HTMLImports.js
@@ -0,0 +1,1085 @@
+/**
+ * @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.5
+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) {
+ 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;
+})(this);
+
+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)) {
+ 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 locationHeader = request.getResponseHeader("Location");
+ var redirectedUrl = null;
+ if (locationHeader) {
+ var redirectedUrl = locationHeader.substr(0, 1) === "/" ? location.origin + locationHeader : locationHeader;
+ }
+ 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]", "style", "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) {
+ 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) {
+ 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) {
+ 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, p = 0, n; i < l && (n = nodes[i]); i++) {
+ if (!this.isParsed(n)) {
+ if (this.hasResource(n)) {
+ return nodeIsImport(n) ? this.nextToParseInDoc(n.import, 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.import === 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.import = 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;
+ }
+ if (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);
+ e.preventDefault = function() {
+ Object.defineProperty(this, "defaultPrevented", {
+ get: function() {
+ return true;
+ }
+ });
+ };
+ return e;
+ };
+ window.CustomEvent.prototype = window.Event.prototype;
+ }
+ 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 file
diff --git a/static/bower_components/webcomponentsjs/HTMLImports.min.js b/static/bower_components/webcomponentsjs/HTMLImports.min.js
new file mode 100644
index 0000000..c13580a
--- /dev/null
+++ b/static/bower_components/webcomponentsjs/HTMLImports.min.js
@@ -0,0 +1,11 @@
+/**
+ * @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.5
+"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):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=n}(),function(e){function t(e){_.push(e),w||(w=!0,f(r))}function n(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function r(){w=!1;var 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_=++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 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 L=new s(e,t)}function u(e){return y?y:(y=d(L),y.oldValue=e,y)}function l(){L=y=void 0}function h(e){return e===y||e===L}function m(e,t){return e===t?e:y&&h(e)?y:null}function p(e,t,n){this.observer=e,this.target=t,this.options=n,this.transientObservedNodes=[]}var f,v=new WeakMap;if(/Trident|Edge/.test(navigator.userAgent))f=setTimeout;else if(window.setImmediate)f=window.setImmediate;else{var b=[],g=String(Math.random());window.addEventListener("message",function(e){if(e.data===g){var t=b;b=[],t.forEach(function(e){e()})}}),f=function(e){b.push(e),window.postMessage(g,"*")}}var w=!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 L,y;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){return!e.attributes||e.attributeFilter&&e.attributeFilter.length&&-1===e.attributeFilter.indexOf(t)&&-1===e.attributeFilter.indexOf(n)?void 0:e.attributeOldValue?u(a):o});break;case"DOMCharacterDataModified":var r=e.target,o=c("characterData",r),a=e.prevValue;i(r,function(e){return e.characterData?e.characterDataOldValue?u(a):o:void 0});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){return e.childList?o:void 0})}l()}},e.JsMutationObserver=a,e.MutationObserver||(e.MutationObserver=a)}(this),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===b}function r(e,t){if(n(t))e&&e();else{var o=function(){("complete"===t.readyState||t.readyState===b)&&(t.removeEventListener(g,o),r(e,t))};t.addEventListener(g,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;c>m&&(h=s[m]);m++)a(h)?(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;r>n&&(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),b=v?"complete":"interactive",g="readystatechange";l&&(new MutationObserver(function(e){for(var t,n=0,r=e.length;r>n&&(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;r>n&&(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=i.getResponseHeader("Location"),a=null;if(n)var a="/"===n.substr(0,1)?location.origin+n:n;r.call(o,!t.ok(i)&&i,i.response||i.responseText,a)}}),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;r>n&&(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;d>s&&(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;r>n&&(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;r>n&&(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]","style","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(window.HTMLImports.__importsParsingHook&&window.HTMLImports.__importsParsingHook(e),e["import"]&&(e["import"].__importParsed=!0),this.markParsingComplete(e),e.dispatchEvent(e.__resource&&!e.__error?new CustomEvent("load",{bubbles:!1}):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(r){t&&t(r),n.markParsingComplete(e),n.parseNext()};if(e.addEventListener("load",r),e.addEventListener("error",r),c&&"style"===e.localName){var o=!1;if(-1==e.textContent.indexOf("@import"))o=!0;else if(e.sheet){o=!0;for(var i,a=e.sheet.cssRules,s=a?a.length:0,d=0;s>d&&(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.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;a>i&&(r=o[i]);i++)if(!this.isParsed(r))return this.hasResource(r)?t(r)?this.nextToParseInDoc(r["import"],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["import"]?!1:!0}};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["import"]=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;d>s&&(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(o)}var n=e.initializeModules,r=e.isIE;if(!e.useNative){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.preventDefault=function(){Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})},n},window.CustomEvent.prototype=window.Event.prototype),n();var o=e.rootDocument;"complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?t():document.addEventListener("DOMContentLoaded",t)}}(window.HTMLImports); \ No newline at end of file
diff --git a/static/bower_components/webcomponentsjs/MutationObserver.js b/static/bower_components/webcomponentsjs/MutationObserver.js
new file mode 100644
index 0000000..b8fb3cf
--- /dev/null
+++ b/static/bower_components/webcomponentsjs/MutationObserver.js
@@ -0,0 +1,344 @@
+/**
+ * @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.5
+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) {
+ 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;
+})(this); \ No newline at end of file
diff --git a/static/bower_components/webcomponentsjs/MutationObserver.min.js b/static/bower_components/webcomponentsjs/MutationObserver.min.js
new file mode 100644
index 0000000..45b4cbf
--- /dev/null
+++ b/static/bower_components/webcomponentsjs/MutationObserver.min.js
@@ -0,0 +1,11 @@
+/**
+ * @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.5
+"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):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=r}(),function(e){function t(e){O.push(e),N||(N=!0,b(i))}function r(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function i(){N=!1;var e=O;O=[],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=[]}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 N=!1,O=[],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){return!e.attributes||e.attributeFilter&&e.attributeFilter.length&&-1===e.attributeFilter.indexOf(t)&&-1===e.attributeFilter.indexOf(r)?void 0:e.attributeOldValue?h(s):n});break;case"DOMCharacterDataModified":var i=e.target,n=u("characterData",i),s=e.prevValue;a(i,function(e){return e.characterData?e.characterDataOldValue?h(s):n:void 0});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){return e.childList?n:void 0})}c()}},e.JsMutationObserver=s,e.MutationObserver||(e.MutationObserver=s)}(this); \ No newline at end of file
diff --git a/static/bower_components/webcomponentsjs/README.md b/static/bower_components/webcomponentsjs/README.md
new file mode 100644
index 0000000..9cf692f
--- /dev/null
+++ b/static/bower_components/webcomponentsjs/README.md
@@ -0,0 +1,125 @@
+webcomponents.js
+================
+
+[![Join the chat at https://gitter.im/webcomponents/webcomponentsjs](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/webcomponents/webcomponentsjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+
+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/)).
+
+This also folds in polyfills for `MutationObserver` and `WeakMap`.
+
+
+## Releases
+
+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:
+
+`webcomponents.js` includes all of the polyfills.
+
+`webcomponents-lite.js` includes all polyfills except for shadow DOM.
+
+
+## Browser Support
+
+Our polyfills are intended to work in the latest versions of evergreen browsers. See below
+for our complete browser support matrix:
+
+| Polyfill | IE10 | IE11+ | Chrome* | Firefox* | Safari 7+* | Chrome Android* | Mobile Safari* |
+| ---------- |:----:|:-----:|:-------:|:--------:|:----------:|:---------------:|:--------------:|
+| Custom Elements | ~ | ✓ | ✓ | ✓ | ✓ | ✓| ✓ |
+| HTML Imports | ~ | ✓ | ✓ | ✓ | ✓| ✓| ✓ |
+| Shadow DOM | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
+| Templates | ✓ | ✓ | ✓ | ✓| ✓ | ✓ | ✓ |
+
+
+*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.
+
+
+### Manually Building
+
+If you wish to build the polyfills yourself, you'll need `node` and `gulp` 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`
+
+Now you are ready to build the polyfills with:
+
+ # install dependencies
+ npm install
+ # build
+ gulp build
+
+The builds will be placed into the `dist/` directory.
+
+## Contribute
+
+See the [contributing guide](CONTRIBUTING.md)
+
+## License
+
+Everything in this repository is BSD style license unless otherwise specified.
+
+Copyright (c) 2015 The Polymer Authors. All rights reserved.
+
+## Helper utilities
+
+### `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.
+
+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`.
+
+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.
+
+```js
+window.addEventListener('WebComponentsReady', function(e) {
+ // imports are loaded and elements have been registered
+ console.log('Components are ready');
+});
+```
+
+## Known Issues
+
+ * [Custom element's constructor property is unreliable](#constructor)
+ * [Contenteditable elements do not trigger MutationObserver](#contentedit)
+ * [ShadowCSS: :host-context(...):host(...) doesn't work](#hostcontext)
+ * [execCommand isn't supported under Shadow DOM](#execcommand)
+
+### Custom element's constructor property is unreliable <a id="constructor"></a>
+See [#215](https://github.com/webcomponents/webcomponentsjs/issues/215) for background.
+
+In Safari and IE, instances of Custom Elements have a `constructor` property of `HTMLUnknownElementConstructor` and `HTMLUnknownElement`, respectively. It's unsafe to rely on this property for checking element types.
+
+It's worth noting that `customElement.__proto__.__proto__.constructor` is `HTMLElementPrototype` and that the prototype chain isn't modified by the polyfills(onto `ElementPrototype`, etc.)
+
+### Contenteditable elements do not trigger MutationObserver <a id="contentedit"></a>
+Using 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'; }
+```
+
+### 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.
diff --git a/static/bower_components/webcomponentsjs/ShadowDOM.js b/static/bower_components/webcomponentsjs/ShadowDOM.js
new file mode 100644
index 0000000..dc67ad9
--- /dev/null
+++ b/static/bower_components/webcomponentsjs/ShadowDOM.js
@@ -0,0 +1,4414 @@
+/**
+ * @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.5
+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 {
+ 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.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);
+ }
+ };
+ 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 isIe = /Trident|Edge/.test(navigator.userAgent);
+ var removeChildOriginalHelper = isIe ? 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 "&amp;";
+
+ case "<":
+ return "&lt;";
+
+ case ">":
+ return "&gt;";
+
+ case '"':
+ return "&quot;";
+
+ case " ":
+ return "&nbsp;";
+ }
+ }
+ 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
+ });
+ }
+ [ "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 registerObject = scope.registerObject;
+ var defineWrapGetter = scope.defineWrapGetter;
+ var SVG_NS = "http://www.w3.org/2000/svg";
+ var svgTitleElement = document.createElementNS(SVG_NS, "title");
+ var SVGTitleElement = registerObject(svgTitleElement);
+ var SVGElement = Object.getPrototypeOf(SVGTitleElement.prototype).constructor;
+ if (!("classList" in svgTitleElement)) {
+ var descr = Object.getOwnPropertyDescriptor(Element.prototype, "classList");
+ Object.defineProperty(HTMLElement.prototype, "classList", descr);
+ delete Element.prototype.classList;
+ }
+ defineWrapGetter(SVGElement, "ownerSVGElement");
+ 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 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 instanceProperties = /WebKit/.test(navigator.userAgent) ? {
+ drawingBufferHeight: null,
+ drawingBufferWidth: null
+ } : {};
+ registerWrapper(OriginalWebGLRenderingContext, WebGLRenderingContext, instanceProperties);
+ scope.wrappers.WebGLRenderingContext = WebGLRenderingContext;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+ "use strict";
+ 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 DocumentFragment = registerObject(document.createDocumentFragment());
+ mixin(DocumentFragment.prototype, ParentNodeInterface);
+ mixin(DocumentFragment.prototype, SelectorsInterface);
+ mixin(DocumentFragment.prototype, GetElementsByInterface);
+ mixin(DocumentFragment.prototype, NonElementParentNodeInterface);
+ var Comment = registerObject(document.createComment(""));
+ scope.wrappers.Comment = Comment;
+ scope.wrappers.DocumentFragment = DocumentFragment;
+})(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 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);
+ }
+ });
+ 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(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 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");
+ 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 file
diff --git a/static/bower_components/webcomponentsjs/ShadowDOM.min.js b/static/bower_components/webcomponentsjs/ShadowDOM.min.js
new file mode 100644
index 0000000..1380d54
--- /dev/null
+++ b/static/bower_components/webcomponentsjs/ShadowDOM.min.js
@@ -0,0 +1,15 @@
+/**
+ * @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.5
+"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):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},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 v(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 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 g=V||p.configurable;A(n,s,{get:c,set:u,configurable:g,enumerable:p.enumerable})}else r&&(n[s]=h(s))}}}function g(e,t,n){if(null!=e){var r=e.prototype;v(r,t,n),o(t,e)}}function v(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 v(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 C(e,t){null!==t&&(n(M(e)),n(void 0===t||S(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=_(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.assert=n,e.constructorTable=R,e.defineGetter=D,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=g,e.rewrap=C,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;a>u;u++)c[u]=new Array(s),c[u][0]=u;for(var l=0;s>l;l++)c[0][l]=l;for(var u=1;a>u;u++)for(var l=1;s>l;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]=d>p?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=d>p?l>p?p:l:l>d?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);l>u;)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=[],g=n,v=u,b=0;b<w.length;b++)switch(w[b]){case r:h&&(m.push(h),h=void 0),g++,v++;break;case o:h||(h=t(g,[],0)),h.addedCount++,g++,h.removed.push(c[v]),v++;break;case i:h||(h=t(g,[],0)),h.addedCount++,g++;break;case a:h||(h=t(g,[],0)),h.removed.push(c[v]),v++}return h&&m.push(h),m},sharedPrefix:function(e,t,n){for(var r=0;n>r;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;n>i&&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++)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||-1===p.attributeFilter.indexOf(o.name))||"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,this.attributes="attributes"in e||!("attributeOldValue"in e||"attributeFilter"in e)?!!e.attributes:!0,this.characterData="characterDataOldValue"in e&&!("characterData"in e)?!0:!!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_=++g,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,g=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)&&g(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&&!v(n,e,o,t,r))return!1;for(var i=t.length-1;i>0;i--)if(!v(t[i],e,o,t,r))return!1;return!0}function m(e,t,n,r){var o=ie,i=t[0]||n;return v(i,e,o,t,r)}function g(e,t,n,r){for(var o=ae,i=1;i<t.length;i++)if(!v(t[i],e,o,t,r))return;n&&t.length>0&&v(n,e,o,t,r)}function v(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;m>w;w++){var g=i[w];if(g.removed)h=!0;else if(!(g.type!==f||!g.capture&&n===oe||g.capture&&n===ae))try{if("function"==typeof g.handler?g.handler.call(e,t):g.handler.handleEvent(t),ee.get(t))return!1}catch(v){W||(W=v)}}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 ve||"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(me)return new e(n,E(r));var o=q(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=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?!0: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 C(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=q(e);n;n=n.parentNode)if(C(V(n),t))return!0;return!1}function H(e){I(e,ye)}function x(t,n,o,i){e.renderAllPending();var a=V(Ee.call(U(n),o,i));if(!a)return null;var c=r(a,null),u=c.lastIndexOf(t);return-1==u?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)}},F(se,y,document.createEvent("Event"));var ce=S("UIEvent",y),ue=S("CustomEvent",y),le={get relatedTarget(){var e=Z.get(this);return void 0!==e?e:V(q(this).relatedTarget)}},pe=k({initMouseEvent:M("initMouseEvent",14)},le),de=k({initFocusEvent:M("initFocusEvent",5)},le),fe=S("MouseEvent",ce,pe),he=S("FocusEvent",ce,de),we=Object.create(null),me=function(){try{new window.FocusEvent("focus")}catch(e){return!1}return!0}();if(!me){var ge=function(e,t,n){if(n){var r=we[n];t=k(k({},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 ve=window.BeforeUnloadEvent;O.prototype=Object.create(y.prototype),k(O.prototype,{get returnValue(){return U(this).returnValue},set returnValue(e){U(this).returnValue=e}}),ve&&F(ve,O);var be=window.EventTarget,ye=["addEventListener","removeEventListener","dispatchEvent"];[Node,Window].forEach(function(e){var t=e.prototype;ye.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;D(this,r)||(o=function(){},this.addEventListener(r,o,!0));try{return q(this).dispatchEvent_(n)}finally{o&&this.removeEventListener(r,o,!0)}}},be&&F(be,L);var Ee=document.elementFromPoint;e.elementFromPoint=x,e.getEventHandlerGetter=R,e.getEventHandlerSetter=P,e.wrapEventTargetMethods=H,e.wrappers.BeforeUnloadEvent=O,e.wrappers.CustomEvent=ue,e.wrappers.Event=y,e.wrappers.EventTarget=L,e.wrappers.FocusEvent=he,e.wrappers.MouseEvent=fe,e.wrappers.UIEvent=ce}(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;o>r;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;n>o;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 g(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 v(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,C=e.isWrapper,D=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),D(S.prototype,{appendChild:function(e){return this.insertBefore(e,null)},insertBefore:function(e,n){t(e);var r;n?C(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()&&!v(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(C(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()&&!v(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(g(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=D(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;c>s;s++)i=b(t[s]),!o&&(a=g(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===C}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=v(this),u=g(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=v(this),u=g(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=v(this),u=g(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,g=e.getTreeScope,v=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,C="http://www.w3.org/1999/xhtml",D={querySelector:function(t){var r=n(t),i=r!==t;t=r;var a,s=v(this),c=g(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=g(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(v(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=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 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]}),g=m[0],v=w.prototype[g],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=v,e.wrappers.Element=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){switch(e){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";case" ":return"&nbsp;"}}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!==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,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&&C[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,g=e.enqueueMutation,v=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"]),C=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;u.prototype=Object.create(w.prototype),v(u.prototype,{get innerHTML(){return s(this)},set innerHTML(e){if(H&&C[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);g(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),["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";var t=e.wrappers.Element,n=e.wrappers.HTMLElement,r=e.registerObject,o=e.defineWrapGetter,i="http://www.w3.org/2000/svg",a=document.createElementNS(i,"title"),s=r(a),c=Object.getPrototypeOf(s.prototype).constructor;if(!("classList"in a)){var u=Object.getOwnPropertyDescriptor(t.prototype,"classList");Object.defineProperty(n.prototype,"classList",u),delete t.prototype.classList}o(c,"ownerSVGElement"),e.wrappers.SVGElement=c}(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){o(e,this)}var n=e.mixin,r=e.registerWrapper,o=e.setWrapper,i=e.unsafeUnwrap,a=e.unwrapIfNeeded,s=e.wrap,c=window.WebGLRenderingContext;if(c){n(t.prototype,{get canvas(){return s(i(this).canvas)},texImage2D:function(){arguments[5]=a(arguments[5]),i(this).texImage2D.apply(i(this),arguments)},texSubImage2D:function(){arguments[6]=a(arguments[6]),i(this).texSubImage2D.apply(i(this),arguments)}});var u=/WebKit/.test(navigator.userAgent)?{drawingBufferHeight:null,drawingBufferWidth:null}:{};r(c,t,u),e.wrappers.WebGLRenderingContext=t}}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.GetElementsByInterface,n=e.NonElementParentNodeInterface,r=e.ParentNodeInterface,o=e.SelectorsInterface,i=e.mixin,a=e.registerObject,s=a(document.createDocumentFragment());i(s.prototype,r),i(s.prototype,o),i(s.prototype,t),i(s.prototype,n);var c=a(document.createComment(""));e.wrappers.Comment=c,e.wrappers.DocumentFragment=s}(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;f.set(this,o),this.treeScope_=new r(this,a(o||e)),d.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=new WeakMap,f=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 f.get(this)||null},get host(){return d.get(this)||null},invalidateShadowRenderer:function(){return d.get(this).invalidateShadowRenderer()},elementFromPoint:function(e,t){return o(this,this.ownerDocument,e,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=C(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 g(e){return I.get(e)}function v(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=g(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,C=(e.assert,e.getTreeScope),D=(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=D(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;h>w;w++){var m=R(i[l++]);s.get(m)||r(m)}for(var g=f.addedCount,v=i[l]&&R(i[l]),w=0;g>w;w++){var b=o[u++],y=b.node;n(t,y,v),s.set(y,!0),b.sync(s)}p+=g}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 C(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):v(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):!1},N.prototype.getDistributedNodes=j.prototype.getDistributedNodes=function(){return s(),i(this)},O.prototype.getDestinationInsertionPoints=function(){return s(),g(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=g,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(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 _(n.apply(j(this),arguments))}}function r(e,t){H.call(j(t),L(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){N(e,this)}function s(e,t){var n=document.implementation[t];e.prototype[t]=function(){return _(n.apply(j(this),arguments))}}function c(e,t){var n=document.implementation[t];e.prototype[t]=function(){return n.apply(j(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,g=e.cloneNode,v=e.defineWrapGetter,b=e.elementFromPoint,y=e.forwardMethodsToWrapper,E=e.matchesNames,S=e.mixin,M=e.registerWrapper,T=e.renderAllPending,O=e.rewrap,N=e.setWrapper,j=e.unsafeUnwrap,L=e.unwrap,_=e.wrap,C=e.wrapEventTargetMethods,D=(e.wrapNodeList,new WeakMap);t.prototype=Object.create(l.prototype),v(t,"documentElement"),v(t,"body"),v(t,"head"),["createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode"].forEach(n);var H=document.adoptNode,x=document.getSelection;S(t.prototype,{adoptNode:function(e){return e.parentNode&&e.parentNode.removeChild(e),r(e,this),e},elementFromPoint:function(e,t){return b(this,this,e,t)},importNode:function(e,t){return g(e,t,j(this))},getSelection:function(){return T(),new f(x.call(L(this)))},getElementsByName:function(e){return h.querySelectorAll.call(this,"[name="+JSON.stringify(String(e))+"]")}});var R=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(_(e))}}:"function"==typeof n&&(o=function(e){return n(_(e))})),new P(R.call(L(this),L(e),t,o,r))},document.registerElement){var W=document.registerElement;t.prototype.registerElement=function(t,n){function r(e){return e?void N(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(){_(this)instanceof r||O(this),t.apply(_(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);W.call(L(this),t,p);return r},y([window.HTMLDocument||window.Document],["registerElement"])}y([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement,window.HTMLHtmlElement],["appendChild","compareDocumentPosition","contains","getElementsByClassName","getElementsByTagName","getElementsByTagNameNS","insertBefore","querySelector","querySelectorAll","removeChild","replaceChild"]),y([window.HTMLBodyElement,window.HTMLHeadElement,window.HTMLHtmlElement],E),y([window.HTMLDocument||window.Document],["adoptNode","importNode","contains","createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode","createTreeWalker","elementFromPoint","getElementById","getElementsByName","getSelection"]),S(t.prototype,u),S(t.prototype,p),S(t.prototype,h),S(t.prototype,d),S(t.prototype,{get implementation(){var e=D.get(this);return e?e:(e=new a(L(this).implementation),D.set(this,e),e)},get defaultView(){return _(L(this).defaultView)}}),M(window.Document,t,document.implementation.createHTMLDocument("")),window.HTMLDocument&&M(window.HTMLDocument,t),C([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement]);var I=document.implementation.createDocument;a.prototype.createDocument=function(){return arguments[2]=L(arguments[2]),_(I.apply(j(this),arguments))},s(a,"createDocumentType"),s(a,"createHTMLDocument"),c(a,"hasFeature"),M(window.DOMImplementation,a),y([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 file
diff --git a/static/bower_components/webcomponentsjs/bower.json b/static/bower_components/webcomponentsjs/bower.json
new file mode 100644
index 0000000..aede49c
--- /dev/null
+++ b/static/bower_components/webcomponentsjs/bower.json
@@ -0,0 +1,18 @@
+{
+ "name": "webcomponentsjs",
+ "main": "webcomponents.js",
+ "version": "0.7.5",
+ "homepage": "http://webcomponents.org",
+ "authors": [
+ "The Polymer Authors"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/webcomponents/webcomponentsjs.git"
+ },
+ "keywords": [
+ "webcomponents"
+ ],
+ "license": "BSD",
+ "ignore": []
+}
diff --git a/static/bower_components/webcomponentsjs/build.log b/static/bower_components/webcomponentsjs/build.log
new file mode 100644
index 0000000..722c9f7
--- /dev/null
+++ b/static/bower_components/webcomponentsjs/build.log
@@ -0,0 +1,33 @@
+BUILD LOG
+---------
+Build Time: 2015-06-17T19:01:18-0700
+
+NODEJS INFORMATION
+==================
+nodejs: v2.3.0
+gulp: 3.9.0
+gulp-audit: 1.0.0
+gulp-concat: 2.5.2
+gulp-header: 1.2.2
+gulp-uglify: 1.2.0
+run-sequence: 1.1.1
+web-component-tester: 3.2.0
+
+REPO REVISIONS
+==============
+webcomponentsjs: 1ee61faca40f109f2f5b6ddc8fa15de0319a6e61
+
+BUILD HASHES
+============
+CustomElements.js: f3f0c7f3c65aeb5cc56c64300fe89003a4c7fa31
+CustomElements.min.js: 557ccd338ab463c9bcd1e3c0fc4102455432214a
+HTMLImports.js: 8c1f33a777d7ff8ee3a22fce8d35e5b927285724
+HTMLImports.min.js: f4ba44076c40f408c661caa8baf81f9e3740689b
+MutationObserver.js: 81934731acd4175701d678dbef11aaefa7d701f5
+MutationObserver.min.js: 6202537174240ba28bf71e22cddf90ce80cf73f8
+ShadowDOM.js: 5e901cfe7eb384f15a39b1bf4e510a06ae03b43e
+ShadowDOM.min.js: 397715836fdd0cfe15a5e966f5ab187ccc1bec15
+webcomponents-lite.js: 5c38f87a645eea9d282de74340c101e5531cb2c0
+webcomponents-lite.min.js: 2a744443fbfba6b30fde7b17606f68cae6036e52
+webcomponents.js: 637cf33c1ee108fb376891eed0b5b47deed8c238
+webcomponents.min.js: c2841b948265560478872747618cad207a693c4f \ No newline at end of file
diff --git a/static/bower_components/webcomponentsjs/package.json b/static/bower_components/webcomponentsjs/package.json
new file mode 100644
index 0000000..493782f
--- /dev/null
+++ b/static/bower_components/webcomponentsjs/package.json
@@ -0,0 +1,31 @@
+{
+ "name": "webcomponents.js",
+ "version": "0.7.5",
+ "description": "webcomponents.js",
+ "main": "webcomponents.js",
+ "directories": {
+ "test": "tests"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/webcomponents/webcomponentsjs.git"
+ },
+ "author": "The Polymer Authors",
+ "license": {
+ "type": "BSD-3-Clause",
+ "url": "http://polymer.github.io/LICENSE.txt"
+ },
+ "bugs": {
+ "url": "https://github.com/webcomponents/webcomponentsjs/issues"
+ },
+ "homepage": "http://webcomponents.org",
+ "devDependencies": {
+ "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": "*"
+ }
+}
diff --git a/static/bower_components/webcomponentsjs/webcomponents-lite.js b/static/bower_components/webcomponentsjs/webcomponents-lite.js
new file mode 100644
index 0000000..47a7d9d
--- /dev/null
+++ b/static/bower_components/webcomponentsjs/webcomponents-lite.js
@@ -0,0 +1,2314 @@
+/**
+ * @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.5
+window.WebComponents = window.WebComponents || {};
+
+(function(scope) {
+ var flags = scope.flags || {};
+ var file = "webcomponents-lite.js";
+ var script = document.querySelector('script[src*="' + file + '"]');
+ 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) {
+ 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;
+ }
+ scope.flags = flags;
+})(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 && " " != 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 (" " == 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 (" " == 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 (" " != 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 (" " == 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 (" " != c && "\n" != c && "\r" != c) {
+ buffer += percentEscape(c);
+ }
+ break;
+
+ case "query":
+ if (!stateOverride && "#" == c) {
+ this._fragment = "#";
+ state = "fragment";
+ } else if (EOF != c && " " != c && "\n" != c && "\r" != c) {
+ this._query += percentEscapeQuery(c);
+ }
+ break;
+
+ case "fragment":
+ if (EOF != c && " " != 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;
+})(this);
+
+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) {
+ 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;
+})(this);
+
+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)) {
+ 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 locationHeader = request.getResponseHeader("Location");
+ var redirectedUrl = null;
+ if (locationHeader) {
+ var redirectedUrl = locationHeader.substr(0, 1) === "/" ? location.origin + locationHeader : locationHeader;
+ }
+ 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]", "style", "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) {
+ 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) {
+ 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) {
+ 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, p = 0, n; i < l && (n = nodes[i]); i++) {
+ if (!this.isParsed(n)) {
+ if (this.hasResource(n)) {
+ return nodeIsImport(n) ? this.nextToParseInDoc(n.import, 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.import === 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.import = 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;
+ }
+ if (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);
+ e.preventDefault = function() {
+ Object.defineProperty(this, "defaultPrevented", {
+ get: function() {
+ return true;
+ }
+ });
+ };
+ return e;
+ };
+ window.CustomEvent.prototype = window.Event.prototype;
+ }
+ 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.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) {
+ return added(node) || addedSubtree(node);
+ }
+ function added(node) {
+ if (scope.upgrade(node)) {
+ return true;
+ }
+ attached(node);
+ }
+ function addedSubtree(node) {
+ forSubtree(node, function(e) {
+ if (added(e)) {
+ return true;
+ }
+ });
+ }
+ function attachedNode(node) {
+ attached(node);
+ if (inDocument(node)) {
+ forSubtree(node, function(e) {
+ attached(e);
+ });
+ }
+ }
+ var hasPolyfillMutations = !window.MutationObserver || window.MutationObserver === window.JsMutationObserver;
+ scope.hasPolyfillMutations = hasPolyfillMutations;
+ 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 (hasPolyfillMutations) {
+ deferMutation(function() {
+ _attached(element);
+ });
+ } else {
+ _attached(element);
+ }
+ }
+ function _attached(element) {
+ if (element.__upgraded__ && (element.attachedCallback || element.detachedCallback)) {
+ if (!element.__attached && inDocument(element)) {
+ element.__attached = true;
+ if (element.attachedCallback) {
+ element.attachedCallback();
+ }
+ }
+ }
+ }
+ function detachedNode(node) {
+ detached(node);
+ forSubtree(node, function(e) {
+ detached(e);
+ });
+ }
+ function detached(element) {
+ if (hasPolyfillMutations) {
+ deferMutation(function() {
+ _detached(element);
+ });
+ } else {
+ _detached(element);
+ }
+ }
+ function _detached(element) {
+ if (element.__upgraded__ && (element.attachedCallback || element.detachedCallback)) {
+ if (element.__attached && !inDocument(element)) {
+ element.__attached = false;
+ if (element.detachedCallback) {
+ element.detachedCallback();
+ }
+ }
+ }
+ }
+ function inDocument(element) {
+ var p = element;
+ var doc = 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(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 || "");
+ }
+ mutations.forEach(function(mx) {
+ if (mx.type === "childList") {
+ forEach(mx.addedNodes, function(n) {
+ if (!n.localName) {
+ return;
+ }
+ addedNode(n);
+ });
+ 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(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);
+ 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());
+ addedNode(doc);
+ 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.upgradeSubtree = addedSubtree;
+ scope.upgradeAll = addedNode;
+ scope.attachedNode = attachedNode;
+ scope.takeRecords = takeRecords;
+});
+
+window.CustomElements.addModule(function(scope) {
+ var flags = scope.flags;
+ function upgrade(node) {
+ if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) {
+ var is = node.getAttribute("is");
+ var definition = scope.getRegisteredDefinition(is || node.localName);
+ if (definition) {
+ if (is && definition.tag == node.localName) {
+ return upgradeWithDefinition(node, definition);
+ } else if (!is && !definition.extends) {
+ return upgradeWithDefinition(node, definition);
+ }
+ }
+ }
+ }
+ function upgradeWithDefinition(element, definition) {
+ flags.upgrade && console.group("upgrade:", element.localName);
+ if (definition.is) {
+ element.setAttribute("is", definition.is);
+ }
+ implementPrototype(element, definition);
+ element.__upgraded__ = true;
+ created(element);
+ scope.attachedNode(element);
+ scope.upgradeSubtree(element);
+ 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 isIE11OrOlder = scope.isIE11OrOlder;
+ 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();
+ 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);
+ var expectedPrototype = Object.getPrototypeOf(inst);
+ if (expectedPrototype === definition.prototype) {
+ nativePrototype = expectedPrototype;
+ }
+ }
+ var proto = definition.prototype, ancestor;
+ while (proto && proto !== nativePrototype) {
+ ancestor = Object.getPrototypeOf(proto);
+ proto.__proto__ = ancestor;
+ proto = ancestor;
+ }
+ 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) {
+ 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");
+ if (isIE11OrOlder) {
+ (function() {
+ var importNode = document.importNode;
+ document.importNode = function() {
+ var n = importNode.apply(document, arguments);
+ if (n.nodeType == n.DOCUMENT_FRAGMENT_NODE) {
+ var f = document.createDocumentFragment();
+ f.appendChild(n);
+ return f;
+ } else {
+ return n;
+ }
+ };
+ })();
+ }
+ 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 isIE11OrOlder = /Trident/.test(navigator.userAgent);
+ 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;
+ 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;
+ };
+ }
+ }
+ function bootstrap() {
+ upgradeDocumentTree(window.wrap(document));
+ if (window.HTMLImports) {
+ window.HTMLImports.__importsParsingHook = function(elt) {
+ upgradeDocumentTree(wrap(elt.import));
+ };
+ }
+ window.CustomElements.ready = true;
+ 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 (isIE11OrOlder && 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);
+ e.preventDefault = function() {
+ Object.defineProperty(this, "defaultPrevented", {
+ get: function() {
+ return true;
+ }
+ });
+ };
+ return e;
+ };
+ window.CustomEvent.prototype = window.Event.prototype;
+ }
+ 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);
+ }
+ scope.isIE11OrOlder = isIE11OrOlder;
+})(window.CustomElements);
+
+if (typeof HTMLTemplateElement === "undefined") {
+ (function() {
+ var TEMPLATE_TAG = "template";
+ HTMLTemplateElement = function() {};
+ HTMLTemplateElement.prototype = Object.create(HTMLElement.prototype);
+ HTMLTemplateElement.decorate = function(template) {
+ if (!template.content) {
+ template.content = template.ownerDocument.createDocumentFragment();
+ }
+ var child;
+ while (child = template.firstChild) {
+ template.content.appendChild(child);
+ }
+ };
+ HTMLTemplateElement.bootstrap = function(doc) {
+ var templates = doc.querySelectorAll(TEMPLATE_TAG);
+ for (var i = 0, l = templates.length, t; i < l && (t = templates[i]); i++) {
+ HTMLTemplateElement.decorate(t);
+ }
+ };
+ window.addEventListener("DOMContentLoaded", function() {
+ HTMLTemplateElement.bootstrap(document);
+ });
+ var createElement = document.createElement;
+ document.createElement = function() {
+ "use strict";
+ var el = createElement.apply(document, arguments);
+ if (el.localName == "template") {
+ HTMLTemplateElement.decorate(el);
+ }
+ return el;
+ };
+ })();
+}
+
+(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
diff --git a/static/bower_components/webcomponentsjs/webcomponents-lite.min.js b/static/bower_components/webcomponentsjs/webcomponents-lite.min.js
new file mode 100644
index 0000000..abb6ff6
--- /dev/null
+++ b/static/bower_components/webcomponentsjs/webcomponents-lite.min.js
@@ -0,0 +1,13 @@
+/**
+ * @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.5
+window.WebComponents=window.WebComponents||{},function(e){var t=e.flags||{},n="webcomponents-lite.js",r=document.querySelector('script[src*="'+n+'"]');if(!t.noOpts){if(location.search.slice(1).split("&").forEach(function(e){var n,r=e.split("=");r[0]&&(n=r[0].match(/wc-(.+)/))&&(t[n[1]]=r[1]||!0)}),r)for(var o,i=0;o=r.attributes[i];i++)"src"!==o.name&&(t[o.name]=o.value||!0);if(t.log){var a=t.log.split(",");t.log={},a.forEach(function(e){t.log[e]=!0})}else t.log={}}t.shadow=t.shadow||t.shadowdom||t.polyfill,t.shadow="native"===t.shadow?!1:t.shadow||!HTMLElement.prototype.createShadowRoot,t.register&&(window.CustomElements=window.CustomElements||{flags:{}},window.CustomElements.flags.register=t.register),e.flags=t}(window.WebComponents),function(e){"use strict";function t(e){return void 0!==h[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&&127>t&&-1==[34,35,60,62,63,96].indexOf(t)?e:encodeURIComponent(e)}function i(e){var t=e.charCodeAt(0);return t>32&&127>t&&-1==[34,35,60,62,96].indexOf(t)?e:encodeURIComponent(e)}function a(e,a,s){function c(e){b.push(e)}var d=a||"scheme start",u=0,l="",_=!1,w=!1,b=[];e:for(;(e[u-1]!=f||0==u)&&!this._isInvalid;){var g=e[u];switch(d){case"scheme start":if(!g||!m.test(g)){if(a){c("Invalid scheme.");break e}l="",d="no scheme";continue}l+=g.toLowerCase(),d="scheme";break;case"scheme":if(g&&v.test(g))l+=g.toLowerCase();else{if(":"!=g){if(a){if(f==g)break e;c("Code point not allowed in scheme: "+g);break e}l="",u=0,d="no scheme";continue}if(this._scheme=l,l="",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":"?"==g?(this._query="?",d="query"):"#"==g?(this._fragment="#",d="fragment"):f!=g&&" "!=g&&"\n"!=g&&"\r"!=g&&(this._schemeData+=o(g));break;case"no scheme":if(s&&t(s._scheme)){d="relative";continue}c("Missing scheme."),n.call(this);break;case"relative or authority":if("/"!=g||"/"!=e[u+1]){c("Expected /, got: "+g),d="relative";continue}d="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!=this._scheme&&(this._scheme=s._scheme),f==g){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("/"==g||"\\"==g)"\\"==g&&c("\\ is an invalid code point."),d="relative slash";else if("?"==g)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("#"!=g){var y=e[u+1],E=e[u+2];("file"!=this._scheme||!m.test(g)||":"!=y&&"|"!=y||f!=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("/"!=g&&"\\"!=g){"file"!=this._scheme&&(this._host=s._host,this._port=s._port,this._username=s._username,this._password=s._password),d="relative path";continue}"\\"==g&&c("\\ is an invalid code point."),d="file"==this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=g){c("Expected '/', got: "+g),d="authority ignore slashes";continue}d="authority second slash";break;case"authority second slash":if(d="authority ignore slashes","/"!=g){c("Expected '/', got: "+g);continue}break;case"authority ignore slashes":if("/"!=g&&"\\"!=g){d="authority";continue}c("Expected authority, got: "+g);break;case"authority":if("@"==g){_&&(c("@ already seen."),l+="%40"),_=!0;for(var L=0;L<l.length;L++){var M=l[L];if(" "!=M&&"\n"!=M&&"\r"!=M)if(":"!=M||null!==this._password){var T=o(M);null!==this._password?this._password+=T:this._username+=T}else this._password="";else c("Invalid whitespace in authority.")}l=""}else{if(f==g||"/"==g||"\\"==g||"?"==g||"#"==g){u-=l.length,l="",d="host";continue}l+=g}break;case"file host":if(f==g||"/"==g||"\\"==g||"?"==g||"#"==g){2!=l.length||!m.test(l[0])||":"!=l[1]&&"|"!=l[1]?0==l.length?d="relative path start":(this._host=r.call(this,l),l="",d="relative path start"):d="relative path";continue}" "==g||"\n"==g||"\r"==g?c("Invalid whitespace in file host."):l+=g;break;case"host":case"hostname":if(":"!=g||w){if(f==g||"/"==g||"\\"==g||"?"==g||"#"==g){if(this._host=r.call(this,l),l="",d="relative path start",a)break e;continue}" "!=g&&"\n"!=g&&"\r"!=g?("["==g?w=!0:"]"==g&&(w=!1),l+=g):c("Invalid code point in host/hostname: "+g)}else if(this._host=r.call(this,l),l="",d="port","hostname"==a)break e;break;case"port":if(/[0-9]/.test(g))l+=g;else{if(f==g||"/"==g||"\\"==g||"?"==g||"#"==g||a){if(""!=l){var N=parseInt(l,10);N!=h[this._scheme]&&(this._port=N+""),l=""}if(a)break e;d="relative path start";continue}" "==g||"\n"==g||"\r"==g?c("Invalid code point in port: "+g):n.call(this)}break;case"relative path start":if("\\"==g&&c("'\\' not allowed in path."),d="relative path","/"!=g&&"\\"!=g)continue;break;case"relative path":if(f!=g&&"/"!=g&&"\\"!=g&&(a||"?"!=g&&"#"!=g))" "!=g&&"\n"!=g&&"\r"!=g&&(l+=o(g));else{"\\"==g&&c("\\ not allowed in relative path.");var O;(O=p[l.toLowerCase()])&&(l=O),".."==l?(this._path.pop(),"/"!=g&&"\\"!=g&&this._path.push("")):"."==l&&"/"!=g&&"\\"!=g?this._path.push(""):"."!=l&&("file"==this._scheme&&0==this._path.length&&2==l.length&&m.test(l[0])&&"|"==l[1]&&(l=l[0]+":"),this._path.push(l)),l="","?"==g?(this._query="?",d="query"):"#"==g&&(this._fragment="#",d="fragment")}break;case"query":a||"#"!=g?f!=g&&" "!=g&&"\n"!=g&&"\r"!=g&&(this._query+=i(g)):(this._fragment="#",d="fragment");break;case"fragment":f!=g&&" "!=g&&"\n"!=g&&"\r"!=g&&(this._fragment+=g)}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 d=!1;if(!e.forceJURL)try{var u=new URL("b","http://a");u.pathname="c%20d",d="http://a/c%20d"===u.href}catch(l){}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 p=Object.create(null);p["%2e"]=".",p[".%2e"]="..",p["%2e."]="..",p["%2e%2e"]="..";var f=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 _=e.URL;_&&(c.createObjectURL=function(e){return _.createObjectURL.apply(_,arguments)},c.revokeObjectURL=function(e){_.revokeObjectURL(e)}),e.URL=c}}(this),"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):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=n}(),function(e){function t(e){g.push(e),b||(b=!0,m(r))}function n(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function r(){b=!1;var e=g;g=[],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_=++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 u(e){return L?L:(L=c(E),L.oldValue=e,L)}function l(){E=L=void 0}function h(e){return e===L||e===E}function p(e,t){return e===t?e:L&&h(e)?L:null}function f(e,t,n){this.observer=e,this.target=t,this.options=n,this.transientObservedNodes=[]}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===w){var t=_;_=[],t.forEach(function(e){e()})}}),m=function(e){_.push(e),window.postMessage(w,"*")}}var b=!1,g=[],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 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 f(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 E,L;f.prototype={enqueue:function(e){var n=this.observer.records_,r=n.length;if(n.length>0){var o=n[r-1],i=p(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 d("attributes",r);o.attributeName=t,o.attributeNamespace=n;var a=e.attrChange===MutationEvent.ADDITION?null:e.prevValue;i(r,function(e){return!e.attributes||e.attributeFilter&&e.attributeFilter.length&&-1===e.attributeFilter.indexOf(t)&&-1===e.attributeFilter.indexOf(n)?void 0:e.attributeOldValue?u(a):o});break;case"DOMCharacterDataModified":var r=e.target,o=d("characterData",r),a=e.prevValue;i(r,function(e){return e.characterData?e.characterDataOldValue?u(a):o:void 0});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 p=h.previousSibling,f=h.nextSibling,o=d("childList",e.target.parentNode);o.addedNodes=s,o.removedNodes=c,o.previousSibling=p,o.nextSibling=f,i(e.relatedNode,function(e){return e.childList?o:void 0})}l()}},e.JsMutationObserver=a,e.MutationObserver||(e.MutationObserver=a)}(this),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===_}function r(e,t){if(n(t))e&&e();else{var o=function(){("complete"===t.readyState||t.readyState===_)&&(t.removeEventListener(w,o),r(e,t))};t.addEventListener(w,o)}}function o(e){e.target.__loaded=!0}function i(e,t){function n(){c==d&&e&&e({allImports:s,loadedImports:u,errorImports:l})}function r(e){o(e),u.push(this),c++,n()}function i(e){l.push(this),c++,n()}var s=t.querySelectorAll("link[rel=import]"),c=0,d=s.length,u=[],l=[];if(d)for(var h,p=0;d>p&&(h=s[p]);p++)a(h)?(c++,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;r>n&&(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?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),p=function(e){return h?window.ShadowDOMPolyfill.wrapIfNeeded(e):e},f=p(document),m={get:function(){var e=window.HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null);return p(e)},configurable:!0};Object.defineProperty(document,"_currentScript",m),Object.defineProperty(f,"_currentScript",m);var v=/Trident/.test(navigator.userAgent),_=v?"complete":"interactive",w="readystatechange";l&&(new MutationObserver(function(e){for(var t,n=0,r=e.length;r>n&&(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;r>n&&(e=t[n]);n++)d(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=l,e.rootDocument=f,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=i.getResponseHeader("Location"),a=null;if(n)var a="/"===n.substr(0,1)?location.origin+n:n;r.call(o,!t.ok(i)&&i,i.response||i.responseText,a)}}),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;r>n&&(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;c>s&&(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;r>n&&(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;r>n&&(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,d=e.isIE,u=e.IMPORT_LINK_TYPE,l="link[rel="+u+"]",h={documentSelectors:l,importsSelectors:[l,"link[rel=stylesheet]","style","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(window.HTMLImports.__importsParsingHook&&window.HTMLImports.__importsParsingHook(e),e["import"]&&(e["import"].__importParsed=!0),this.markParsingComplete(e),e.dispatchEvent(e.__resource&&!e.__error?new CustomEvent("load",{bubbles:!1}):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(r){t&&t(r),n.markParsingComplete(e),n.parseNext()};if(e.addEventListener("load",r),e.addEventListener("error",r),d&&"style"===e.localName){var o=!1;if(-1==e.textContent.indexOf("@import"))o=!0;else if(e.sheet){o=!0;for(var i,a=e.sheet.cssRules,s=a?a.length:0,c=0;s>c&&(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.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;a>i&&(r=o[i]);i++)if(!this.isParsed(r))return this.hasResource(r)?t(r)?this.nextToParseInDoc(r["import"],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["import"]?!1:!0}};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,c=e.rootDocument,d=e.Loader,u=e.Observer,l=e.parser,h={documents:{},documentPreloadSelectors:s,importsPreloadSelectors:[s].join(","),loadNode:function(e){p.addNode(e)},loadSubtree:function(e){var t=this.marshalNodes(e);p.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["import"]=c}l.parseNext()},bootDocument:function(e){this.loadSubtree(e),this.observer.observe(e),l.parseNext()},loadedAll:function(){l.parseNext()}},p=new d(h.loaded.bind(h),h.loadedAll.bind(h));if(h.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=h,e.importLoader=p}),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;c>s&&(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(o)}var n=e.initializeModules,r=e.isIE;if(!e.useNative){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.preventDefault=function(){Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})},n},window.CustomEvent.prototype=window.Event.prototype),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=[],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.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)?!0: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;c>s&&(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){return n(e)||r(e)}function n(t){return e.upgrade(t)?!0:void s(t)}function r(e){g(e,function(e){return n(e)?!0:void 0})}function o(e){s(e),h(e)&&g(e,function(e){s(e)})}function i(e){M.push(e),L||(L=!0,setTimeout(a))}function a(){L=!1;for(var e,t=M,n=0,r=t.length;r>n&&(e=t[n]);n++)e();M=[]}function s(e){E?i(function(){c(e)}):c(e)}function c(e){e.__upgraded__&&(e.attachedCallback||e.detachedCallback)&&!e.__attached&&h(e)&&(e.__attached=!0,e.attachedCallback&&e.attachedCallback())}function d(e){u(e),g(e,function(e){u(e)})}function u(e){E?i(function(){l(e)}):l(e)}function l(e){e.__upgraded__&&(e.attachedCallback||e.detachedCallback)&&e.__attached&&!h(e)&&(e.__attached=!1,e.detachedCallback&&e.detachedCallback())}function h(e){for(var t=e,n=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){b.dom&&console.log("watching shadow-root for: ",e.localName);for(var t=e.shadowRoot;t;)v(t),t=t.olderShadowRoot}}function f(e){if(b.dom){var n=e[0];if(n&&"childList"===n.type&&n.addedNodes&&n.addedNodes){for(var r=n.addedNodes[0];r&&r!==document&&!r.host;)r=r.parentNode;var o=r&&(r.URL||r._URL||r.host&&r.host.localName)||"";o=o.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",e.length,o||"")}e.forEach(function(e){"childList"===e.type&&(T(e.addedNodes,function(e){e.localName&&t(e)}),T(e.removedNodes,function(e){e.localName&&d(e)}))}),b.dom&&console.groupEnd()}function m(e){for(e=window.wrap(e),e||(e=window.wrap(document));e.parentNode;)e=e.parentNode;var t=e.__observer;t&&(f(t.takeRecords()),a())}function v(e){if(!e.__observer){var t=new MutationObserver(f);t.observe(e,{childList:!0,subtree:!0}),e.__observer=t}}function _(e){e=window.wrap(e),b.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop()),t(e),v(e),b.dom&&console.groupEnd()}function w(e){y(e,_)}var b=e.flags,g=e.forSubtree,y=e.forDocumentTree,E=!window.MutationObserver||window.MutationObserver===window.JsMutationObserver;e.hasPolyfillMutations=E;var L=!1,M=[],T=Array.prototype.forEach.call.bind(Array.prototype.forEach),N=Element.prototype.createShadowRoot;N&&(Element.prototype.createShadowRoot=function(){var e=N.call(this);return window.CustomElements.watchShadow(this),e}),e.watchShadow=p,e.upgradeDocumentTree=w,e.upgradeSubtree=r,e.upgradeAll=t,e.attachedNode=o,e.takeRecords=m}),window.CustomElements.addModule(function(e){function t(t){if(!t.__upgraded__&&t.nodeType===Node.ELEMENT_NODE){var r=t.getAttribute("is"),o=e.getRegisteredDefinition(r||t.localName);if(o){if(r&&o.tag==t.localName)return n(t,o);if(!r&&!o["extends"])return n(t,o)}}}function n(t,n){return a.upgrade&&console.group("upgrade:",t.localName),n.is&&t.setAttribute("is",n.is),r(t,n),t.__upgraded__=!0,i(t),e.attachedNode(t),e.upgradeSubtree(t),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(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.lifecycle=c.lifecycle||{},c.ancestry=i(c["extends"]),a(c),s(c),n(c.prototype),u(c.__name,c),c.ctor=l(c),c.ctor.prototype=c.prototype,c.prototype.constructor=c.ctor,e.ready&&_(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=d(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),r=Object.getPrototypeOf(n);r===e.prototype&&(t=r)}for(var o,i=e.prototype;i&&i!==t;)o=Object.getPrototypeOf(i),i.__proto__=o,i=o;e["native"]=t}}function c(e){return b(T(e.tag),e)}function d(e){return e?L[e.toLowerCase()]:void 0}function u(e,t){L[e]=t}function l(e){return function(){return c(e)}}function h(e,t,n){return e===M?p(t,n):N(e,t)}function p(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 r;return t?(r=p(e),r.setAttribute("is",t),r):(r=T(e),e.indexOf("-")>=0&&g(r,HTMLElement),r)}function f(e,t){var n=e[t];e[t]=function(){var e=n.apply(this,arguments);return w(e),e}}var m,v=e.isIE11OrOlder,_=e.upgradeDocumentTree,w=e.upgradeAll,b=e.upgradeWithDefinition,g=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"],L={},M="http://www.w3.org/1999/xhtml",T=document.createElement.bind(document),N=document.createElementNS.bind(document);m=Object.__proto__||y?function(e,t){return e instanceof t}:function(e,t){for(var n=e;n;){if(n===t.prototype)return!0;n=n.__proto__}return!1},f(Node.prototype,"cloneNode"),f(document,"importNode"),v&&!function(){var e=document.importNode;document.importNode=function(){var t=e.apply(document,arguments);if(t.nodeType==t.DOCUMENT_FRAGMENT_NODE){var n=document.createDocumentFragment();return n.appendChild(t),n}return t}}(),document.registerElement=t,document.createElement=p,document.createElementNS=h,e.registry=L,e["instanceof"]=m,e.reservedTagList=E,e.getRegisteredDefinition=d,document.register=document.registerElement}),function(e){function t(){a(window.wrap(document)),window.HTMLImports&&(window.HTMLImports.__importsParsingHook=function(e){a(wrap(e["import"]))}),window.CustomElements.ready=!0,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,o=/Trident/.test(navigator.userAgent);if(n){var i=function(){};e.watchShadow=i,e.upgrade=i,e.upgradeAll=i,e.upgradeDocumentTree=i,e.upgradeSubtree=i,e.takeRecords=i,e["instanceof"]=function(e,t){return e instanceof t}}else r();var a=e.upgradeDocumentTree;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=window.ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=window.ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}),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.preventDefault=function(){Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})},n},window.CustomEvent.prototype=window.Event.prototype),"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();e.isIE11OrOlder=o}(window.CustomElements),"undefined"==typeof HTMLTemplateElement&&!function(){var e="template";HTMLTemplateElement=function(){},HTMLTemplateElement.prototype=Object.create(HTMLElement.prototype),HTMLTemplateElement.decorate=function(e){e.content||(e.content=e.ownerDocument.createDocumentFragment());for(var t;t=e.firstChild;)e.content.appendChild(t)},HTMLTemplateElement.bootstrap=function(t){for(var n,r=t.querySelectorAll(e),o=0,i=r.length;i>o&&(n=r[o]);o++)HTMLTemplateElement.decorate(n)},window.addEventListener("DOMContentLoaded",function(){HTMLTemplateElement.bootstrap(document)});var t=document.createElement;document.createElement=function(){"use strict";var e=t.apply(document,arguments);return"template"==e.localName&&HTMLTemplateElement.decorate(e),e}}(),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 file
diff --git a/static/bower_components/webcomponentsjs/webcomponents.js b/static/bower_components/webcomponentsjs/webcomponents.js
new file mode 100644
index 0000000..6d71541
--- /dev/null
+++ b/static/bower_components/webcomponentsjs/webcomponents.js
@@ -0,0 +1,7126 @@
+/**
+ * @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.5
+window.WebComponents = window.WebComponents || {};
+
+(function(scope) {
+ var flags = scope.flags || {};
+ var file = "webcomponents.js";
+ var script = document.querySelector('script[src*="' + file + '"]');
+ 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;
+ }
+ scope.flags = flags;
+})(WebComponents);
+
+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 {
+ 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.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);
+ }
+ };
+ 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 isIe = /Trident|Edge/.test(navigator.userAgent);
+ var removeChildOriginalHelper = isIe ? 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 "&amp;";
+
+ case "<":
+ return "&lt;";
+
+ case ">":
+ return "&gt;";
+
+ case '"':
+ return "&quot;";
+
+ case " ":
+ return "&nbsp;";
+ }
+ }
+ 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
+ });
+ }
+ [ "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 registerObject = scope.registerObject;
+ var defineWrapGetter = scope.defineWrapGetter;
+ var SVG_NS = "http://www.w3.org/2000/svg";
+ var svgTitleElement = document.createElementNS(SVG_NS, "title");
+ var SVGTitleElement = registerObject(svgTitleElement);
+ var SVGElement = Object.getPrototypeOf(SVGTitleElement.prototype).constructor;
+ if (!("classList" in svgTitleElement)) {
+ var descr = Object.getOwnPropertyDescriptor(Element.prototype, "classList");
+ Object.defineProperty(HTMLElement.prototype, "classList", descr);
+ delete Element.prototype.classList;
+ }
+ defineWrapGetter(SVGElement, "ownerSVGElement");
+ 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 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 instanceProperties = /WebKit/.test(navigator.userAgent) ? {
+ drawingBufferHeight: null,
+ drawingBufferWidth: null
+ } : {};
+ registerWrapper(OriginalWebGLRenderingContext, WebGLRenderingContext, instanceProperties);
+ scope.wrappers.WebGLRenderingContext = WebGLRenderingContext;
+ })(window.ShadowDOMPolyfill);
+ (function(scope) {
+ "use strict";
+ 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 DocumentFragment = registerObject(document.createDocumentFragment());
+ mixin(DocumentFragment.prototype, ParentNodeInterface);
+ mixin(DocumentFragment.prototype, SelectorsInterface);
+ mixin(DocumentFragment.prototype, GetElementsByInterface);
+ mixin(DocumentFragment.prototype, NonElementParentNodeInterface);
+ var Comment = registerObject(document.createComment(""));
+ scope.wrappers.Comment = Comment;
+ scope.wrappers.DocumentFragment = DocumentFragment;
+ })(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 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);
+ }
+ });
+ 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(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 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");
+ 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 ";
+ 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 && " " != 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 (" " == 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 (" " == 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 (" " != 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 (" " == 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 (" " != c && "\n" != c && "\r" != c) {
+ buffer += percentEscape(c);
+ }
+ break;
+
+ case "query":
+ if (!stateOverride && "#" == c) {
+ this._fragment = "#";
+ state = "fragment";
+ } else if (EOF != c && " " != c && "\n" != c && "\r" != c) {
+ this._query += percentEscapeQuery(c);
+ }
+ break;
+
+ case "fragment":
+ if (EOF != c && " " != 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;
+})(this);
+
+(function(global) {
+ 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;
+})(this);
+
+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)) {
+ 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 locationHeader = request.getResponseHeader("Location");
+ var redirectedUrl = null;
+ if (locationHeader) {
+ var redirectedUrl = locationHeader.substr(0, 1) === "/" ? location.origin + locationHeader : locationHeader;
+ }
+ 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]", "style", "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) {
+ 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) {
+ 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) {
+ 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, p = 0, n; i < l && (n = nodes[i]); i++) {
+ if (!this.isParsed(n)) {
+ if (this.hasResource(n)) {
+ return nodeIsImport(n) ? this.nextToParseInDoc(n.import, 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.import === 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.import = 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;
+ }
+ if (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);
+ e.preventDefault = function() {
+ Object.defineProperty(this, "defaultPrevented", {
+ get: function() {
+ return true;
+ }
+ });
+ };
+ return e;
+ };
+ window.CustomEvent.prototype = window.Event.prototype;
+ }
+ 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.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) {
+ return added(node) || addedSubtree(node);
+ }
+ function added(node) {
+ if (scope.upgrade(node)) {
+ return true;
+ }
+ attached(node);
+ }
+ function addedSubtree(node) {
+ forSubtree(node, function(e) {
+ if (added(e)) {
+ return true;
+ }
+ });
+ }
+ function attachedNode(node) {
+ attached(node);
+ if (inDocument(node)) {
+ forSubtree(node, function(e) {
+ attached(e);
+ });
+ }
+ }
+ var hasPolyfillMutations = !window.MutationObserver || window.MutationObserver === window.JsMutationObserver;
+ scope.hasPolyfillMutations = hasPolyfillMutations;
+ 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 (hasPolyfillMutations) {
+ deferMutation(function() {
+ _attached(element);
+ });
+ } else {
+ _attached(element);
+ }
+ }
+ function _attached(element) {
+ if (element.__upgraded__ && (element.attachedCallback || element.detachedCallback)) {
+ if (!element.__attached && inDocument(element)) {
+ element.__attached = true;
+ if (element.attachedCallback) {
+ element.attachedCallback();
+ }
+ }
+ }
+ }
+ function detachedNode(node) {
+ detached(node);
+ forSubtree(node, function(e) {
+ detached(e);
+ });
+ }
+ function detached(element) {
+ if (hasPolyfillMutations) {
+ deferMutation(function() {
+ _detached(element);
+ });
+ } else {
+ _detached(element);
+ }
+ }
+ function _detached(element) {
+ if (element.__upgraded__ && (element.attachedCallback || element.detachedCallback)) {
+ if (element.__attached && !inDocument(element)) {
+ element.__attached = false;
+ if (element.detachedCallback) {
+ element.detachedCallback();
+ }
+ }
+ }
+ }
+ function inDocument(element) {
+ var p = element;
+ var doc = 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(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 || "");
+ }
+ mutations.forEach(function(mx) {
+ if (mx.type === "childList") {
+ forEach(mx.addedNodes, function(n) {
+ if (!n.localName) {
+ return;
+ }
+ addedNode(n);
+ });
+ 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(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);
+ 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());
+ addedNode(doc);
+ 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.upgradeSubtree = addedSubtree;
+ scope.upgradeAll = addedNode;
+ scope.attachedNode = attachedNode;
+ scope.takeRecords = takeRecords;
+});
+
+window.CustomElements.addModule(function(scope) {
+ var flags = scope.flags;
+ function upgrade(node) {
+ if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) {
+ var is = node.getAttribute("is");
+ var definition = scope.getRegisteredDefinition(is || node.localName);
+ if (definition) {
+ if (is && definition.tag == node.localName) {
+ return upgradeWithDefinition(node, definition);
+ } else if (!is && !definition.extends) {
+ return upgradeWithDefinition(node, definition);
+ }
+ }
+ }
+ }
+ function upgradeWithDefinition(element, definition) {
+ flags.upgrade && console.group("upgrade:", element.localName);
+ if (definition.is) {
+ element.setAttribute("is", definition.is);
+ }
+ implementPrototype(element, definition);
+ element.__upgraded__ = true;
+ created(element);
+ scope.attachedNode(element);
+ scope.upgradeSubtree(element);
+ 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 isIE11OrOlder = scope.isIE11OrOlder;
+ 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();
+ 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);
+ var expectedPrototype = Object.getPrototypeOf(inst);
+ if (expectedPrototype === definition.prototype) {
+ nativePrototype = expectedPrototype;
+ }
+ }
+ var proto = definition.prototype, ancestor;
+ while (proto && proto !== nativePrototype) {
+ ancestor = Object.getPrototypeOf(proto);
+ proto.__proto__ = ancestor;
+ proto = ancestor;
+ }
+ 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) {
+ 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");
+ if (isIE11OrOlder) {
+ (function() {
+ var importNode = document.importNode;
+ document.importNode = function() {
+ var n = importNode.apply(document, arguments);
+ if (n.nodeType == n.DOCUMENT_FRAGMENT_NODE) {
+ var f = document.createDocumentFragment();
+ f.appendChild(n);
+ return f;
+ } else {
+ return n;
+ }
+ };
+ })();
+ }
+ 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 isIE11OrOlder = /Trident/.test(navigator.userAgent);
+ 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;
+ 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;
+ };
+ }
+ }
+ function bootstrap() {
+ upgradeDocumentTree(window.wrap(document));
+ if (window.HTMLImports) {
+ window.HTMLImports.__importsParsingHook = function(elt) {
+ upgradeDocumentTree(wrap(elt.import));
+ };
+ }
+ window.CustomElements.ready = true;
+ 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 (isIE11OrOlder && 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);
+ e.preventDefault = function() {
+ Object.defineProperty(this, "defaultPrevented", {
+ get: function() {
+ return true;
+ }
+ });
+ };
+ return e;
+ };
+ window.CustomEvent.prototype = window.Event.prototype;
+ }
+ 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);
+ }
+ scope.isIE11OrOlder = isIE11OrOlder;
+})(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) {
+ "use strict";
+ if (!window.performance) {
+ 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 elementDeclarations = [];
+ var polymerStub = function(name, dictionary) {
+ if (typeof name !== "string" && arguments.length === 1) {
+ Array.prototype.push.call(arguments, document._currentScript);
+ }
+ elementDeclarations.push(arguments);
+ };
+ window.Polymer = polymerStub;
+ scope.consumeDeclarations = function(callback) {
+ scope.consumeDeclarations = function() {
+ throw "Possible attempt to load Polymer twice";
+ };
+ if (callback) {
+ callback(elementDeclarations);
+ }
+ elementDeclarations = null;
+ };
+ function installPolymerWarning() {
+ if (window.Polymer === polymerStub) {
+ window.Polymer = function() {
+ throw new Error("You tried to use polymer without loading it first. To " + 'load polymer, <link rel="import" href="' + 'components/polymer/polymer.html">');
+ };
+ }
+ }
+ if (HTMLImports.useNative) {
+ installPolymerWarning();
+ } else {
+ window.addEventListener("DOMContentLoaded", installPolymerWarning);
+ }
+})(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 file
diff --git a/static/bower_components/webcomponentsjs/webcomponents.min.js b/static/bower_components/webcomponentsjs/webcomponents.min.js
new file mode 100644
index 0000000..4870c72
--- /dev/null
+++ b/static/bower_components/webcomponentsjs/webcomponents.min.js
@@ -0,0 +1,15 @@
+/**
+ * @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.5
+window.WebComponents=window.WebComponents||{},function(e){var t=e.flags||{},n="webcomponents.js",r=document.querySelector('script[src*="'+n+'"]');if(!t.noOpts){if(location.search.slice(1).split("&").forEach(function(e){var n,r=e.split("=");r[0]&&(n=r[0].match(/wc-(.+)/))&&(t[n[1]]=r[1]||!0)}),r)for(var o,i=0;o=r.attributes[i];i++)"src"!==o.name&&(t[o.name]=o.value||!0);if(t.log&&t.log.split){var a=t.log.split(",");t.log={},a.forEach(function(e){t.log[e]=!0})}else t.log={}}t.shadow=t.shadow||t.shadowdom||t.polyfill,t.shadow="native"===t.shadow?!1:t.shadow||!HTMLElement.prototype.createShadowRoot,t.register&&(window.CustomElements=window.CustomElements||{flags:{}},window.CustomElements.flags.register=t.register),e.flags=t}(WebComponents),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):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},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 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.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;a>l;l++)c[l]=new Array(s),c[l][0]=l;for(var u=0;s>u;u++)c[0][u]=u;for(var l=1;a>l;l++)for(var u=1;s>u;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]=p>d?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=p>d?u>d?d:u:u>p?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);u>l;)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;n>r;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;n>i&&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++)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||-1===d.attributeFilter.indexOf(o.name))||"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,this.attributes="attributes"in e||!("attributeOldValue"in e||"attributeFilter"in e)?!!e.attributes:!0,this.characterData="characterDataOldValue"in e&&!("characterData"in e)?!0:!!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(Y.get(t))throw new Error("InvalidStateError");Y.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),X["delete"](t,null),Y["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;$.set(t,a),X.set(t,e),i.depth++;for(var m=0,w=i.length;w>m;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 ge||"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(we)return new e(n,E(r));var o=B(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=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?!0: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,ye)}function x(t,n,o,i){e.renderAllPending();var a=V(Ee.call(q(n),o,i));if(!a)return null;var c=r(a,null),l=c.lastIndexOf(t);return-1==l?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,Y=new WeakMap,$=new WeakMap,X=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 $.get(this)},get currentTarget(){return X.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)}},F(se,y,document.createEvent("Event"));var ce=_("UIEvent",y),le=_("CustomEvent",y),ue={get relatedTarget(){var e=Z.get(this);return void 0!==e?e:V(B(this).relatedTarget)}},de=W({initMouseEvent:S("initMouseEvent",14)},ue),pe=W({initFocusEvent:S("initFocusEvent",5)},ue),he=_("MouseEvent",ce,de),fe=_("FocusEvent",ce,pe),me=Object.create(null),we=function(){try{new window.FocusEvent("focus")}catch(e){return!1}return!0}();if(!we){var ve=function(e,t,n){if(n){var r=me[n];t=W(W({},r),t)}me[e]=t};ve("Event",{bubbles:!1,cancelable:!1}),ve("CustomEvent",{detail:null},"Event"),ve("UIEvent",{view:null,detail:0},"Event"),ve("MouseEvent",{screenX:0,screenY:0,clientX:0,clientY:0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null},"UIEvent"),ve("FocusEvent",{relatedTarget:null},"UIEvent")}var ge=window.BeforeUnloadEvent;M.prototype=Object.create(y.prototype),W(M.prototype,{get returnValue(){return q(this).returnValue},set returnValue(e){q(this).returnValue=e}}),ge&&F(ge,M);var be=window.EventTarget,ye=["addEventListener","removeEventListener","dispatchEvent"];[Node,Window].forEach(function(e){var t=e.prototype;ye.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)}}},be&&F(be,N);var Ee=document.elementFromPoint;e.elementFromPoint=x,e.getEventHandlerGetter=R,e.getEventHandlerSetter=I,e.wrapEventTargetMethods=H,e.wrappers.BeforeUnloadEvent=M,e.wrappers.CustomEvent=le,e.wrappers.Event=y,e.wrappers.EventTarget=N,e.wrappers.FocusEvent=fe,e.wrappers.MouseEvent=he,e.wrappers.UIEvent=ce}(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;o>r;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;n>o;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&&$.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,$.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,Y=V.prototype.insertBefore,$=V.prototype.removeChild,X=V.prototype.replaceChild,Z=/Trident|Edge/.test(navigator.userAgent),J=Z?function(e,t){try{$.call(e,t)}catch(n){if(!(e instanceof G))throw n}}:function(e,t){$.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),Y.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?Y.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),X.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&&X.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=Y,e.originalRemoveChild=$,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;c>s;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"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";case" ":return"&nbsp;"}}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),["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";var t=e.wrappers.Element,n=e.wrappers.HTMLElement,r=e.registerObject,o=e.defineWrapGetter,i="http://www.w3.org/2000/svg",a=document.createElementNS(i,"title"),s=r(a),c=Object.getPrototypeOf(s.prototype).constructor;if(!("classList"in a)){var l=Object.getOwnPropertyDescriptor(t.prototype,"classList");Object.defineProperty(n.prototype,"classList",l),delete t.prototype.classList}o(c,"ownerSVGElement"),e.wrappers.SVGElement=c}(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){o(e,this)}var n=e.mixin,r=e.registerWrapper,o=e.setWrapper,i=e.unsafeUnwrap,a=e.unwrapIfNeeded,s=e.wrap,c=window.WebGLRenderingContext;if(c){n(t.prototype,{get canvas(){return s(i(this).canvas)},texImage2D:function(){arguments[5]=a(arguments[5]),i(this).texImage2D.apply(i(this),arguments)},texSubImage2D:function(){arguments[6]=a(arguments[6]),i(this).texSubImage2D.apply(i(this),arguments)}});var l=/WebKit/.test(navigator.userAgent)?{drawingBufferHeight:null,drawingBufferWidth:null}:{};r(c,t,l),e.wrappers.WebGLRenderingContext=t}}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.GetElementsByInterface,n=e.NonElementParentNodeInterface,r=e.ParentNodeInterface,o=e.SelectorsInterface,i=e.mixin,a=e.registerObject,s=a(document.createDocumentFragment());i(s.prototype,r),i(s.prototype,o),i(s.prototype,t),i(s.prototype,n);var c=a(document.createComment(""));e.wrappers.Comment=c,e.wrappers.DocumentFragment=s}(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;h.set(this,o),this.treeScope_=new r(this,a(o||e)),p.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=new WeakMap,h=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 h.get(this)||null},get host(){return p.get(this)||null},invalidateShadowRenderer:function(){return p.get(this).invalidateShadowRenderer()},elementFromPoint:function(e,t){return o(this,this.ownerDocument,e,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;f>m;m++){var w=R(i[u++]);s.get(w)||r(w)}for(var v=h.addedCount,g=i[u]&&R(i[u]),m=0;v>m;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):!1},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(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 C(n.apply(L(this),arguments))}}function r(e,t){H.call(L(t),N(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){O(e,this)}function s(e,t){var n=document.implementation[t];e.prototype[t]=function(){return C(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 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.defineWrapGetter,b=e.elementFromPoint,y=e.forwardMethodsToWrapper,E=e.matchesNames,_=e.mixin,S=e.registerWrapper,T=e.renderAllPending,M=e.rewrap,O=e.setWrapper,L=e.unsafeUnwrap,N=e.unwrap,C=e.wrap,j=e.wrapEventTargetMethods,D=(e.wrapNodeList,new WeakMap);t.prototype=Object.create(u.prototype),g(t,"documentElement"),g(t,"body"),g(t,"head"),["createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode"].forEach(n);var H=document.adoptNode,x=document.getSelection;_(t.prototype,{
+adoptNode:function(e){return e.parentNode&&e.parentNode.removeChild(e),r(e,this),e},elementFromPoint:function(e,t){return b(this,this,e,t)},importNode:function(e,t){return v(e,t,L(this))},getSelection:function(){return T(),new h(x.call(N(this)))},getElementsByName:function(e){return f.querySelectorAll.call(this,"[name="+JSON.stringify(String(e))+"]")}});var R=document.createTreeWalker,I=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(C(e))}}:"function"==typeof n&&(o=function(e){return n(C(e))})),new I(R.call(N(this),N(e),t,o,r))},document.registerElement){var P=document.registerElement;t.prototype.registerElement=function(t,n){function r(e){return e?void O(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(){C(this)instanceof r||M(this),t.apply(C(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);P.call(N(this),t,d);return r},y([window.HTMLDocument||window.Document],["registerElement"])}y([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement,window.HTMLHtmlElement],["appendChild","compareDocumentPosition","contains","getElementsByClassName","getElementsByTagName","getElementsByTagNameNS","insertBefore","querySelector","querySelectorAll","removeChild","replaceChild"]),y([window.HTMLBodyElement,window.HTMLHeadElement,window.HTMLHtmlElement],E),y([window.HTMLDocument||window.Document],["adoptNode","importNode","contains","createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode","createTreeWalker","elementFromPoint","getElementById","getElementsByName","getSelection"]),_(t.prototype,l),_(t.prototype,d),_(t.prototype,f),_(t.prototype,p),_(t.prototype,{get implementation(){var e=D.get(this);return e?e:(e=new a(N(this).implementation),D.set(this,e),e)},get defaultView(){return C(N(this).defaultView)}}),S(window.Document,t,document.implementation.createHTMLDocument("")),window.HTMLDocument&&S(window.HTMLDocument,t),j([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement]);var k=document.implementation.createDocument;a.prototype.createDocument=function(){return arguments[2]=N(arguments[2]),C(k.apply(L(this),arguments))},s(a,"createDocumentType"),s(a,"createHTMLDocument"),c(a,"hasFeature"),S(window.DOMImplementation,a),y([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;o>r&&(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;l>c&&(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 ",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&&127>t&&-1==[34,35,60,62,63,96].indexOf(t)?e:encodeURIComponent(e)}function i(e){var t=e.charCodeAt(0);return t>32&&127>t&&-1==[34,35,60,62,96].indexOf(t)?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&&" "!=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&&"\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}" "==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}" "!=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}" "==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))" "!=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&&" "!=y&&"\n"!=y&&"\r"!=y&&(this._query+=i(y)):(this._fragment="#",l="fragment");break;case"fragment":f!=y&&" "!=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}}(this),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=[]}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){return!e.attributes||e.attributeFilter&&e.attributeFilter.length&&-1===e.attributeFilter.indexOf(t)&&-1===e.attributeFilter.indexOf(n)?void 0:e.attributeOldValue?u(a):o});break;case"DOMCharacterDataModified":var r=e.target,o=l("characterData",r),a=e.prevValue;i(r,function(e){return e.characterData?e.characterDataOldValue?u(a):o:void 0});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){return e.childList?o:void 0})}d()}},e.JsMutationObserver=a,e.MutationObserver||(e.MutationObserver=a)}(this),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;l>h&&(p=s[h]);h++)a(p)?(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;r>n&&(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;r>n&&(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;r>n&&(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=i.getResponseHeader("Location"),a=null;if(n)var a="/"===n.substr(0,1)?location.origin+n:n;r.call(o,!t.ok(i)&&i,i.response||i.responseText,a)}}),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;r>n&&(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;c>s&&(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;r>n&&(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;r>n&&(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]","style","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(window.HTMLImports.__importsParsingHook&&window.HTMLImports.__importsParsingHook(e),e["import"]&&(e["import"].__importParsed=!0),this.markParsingComplete(e),e.dispatchEvent(e.__resource&&!e.__error?new CustomEvent("load",{bubbles:!1}):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(r){t&&t(r),n.markParsingComplete(e),n.parseNext()};if(e.addEventListener("load",r),e.addEventListener("error",r),l&&"style"===e.localName){var o=!1;if(-1==e.textContent.indexOf("@import"))o=!0;else if(e.sheet){o=!0;for(var i,a=e.sheet.cssRules,s=a?a.length:0,c=0;s>c&&(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.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;a>i&&(r=o[i]);i++)if(!this.isParsed(r))return this.hasResource(r)?t(r)?this.nextToParseInDoc(r["import"],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["import"]?!1:!0}};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["import"]=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;c>s&&(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(o)}var n=e.initializeModules,r=e.isIE;if(!e.useNative){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.preventDefault=function(){Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})},n},window.CustomEvent.prototype=window.Event.prototype),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=[],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.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)?!0: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;c>s&&(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){return n(e)||r(e)}function n(t){return e.upgrade(t)?!0:void s(t)}function r(e){y(e,function(e){return n(e)?!0:void 0})}function o(e){s(e),p(e)&&y(e,function(e){s(e)})}function i(e){T.push(e),S||(S=!0,setTimeout(a))}function a(){S=!1;for(var e,t=T,n=0,r=t.length;r>n&&(e=t[n]);n++)e();T=[]}function s(e){_?i(function(){c(e)}):c(e)}function c(e){e.__upgraded__&&(e.attachedCallback||e.detachedCallback)&&!e.__attached&&p(e)&&(e.__attached=!0,e.attachedCallback&&e.attachedCallback())}function l(e){u(e),y(e,function(e){u(e)})}function u(e){_?i(function(){d(e)}):d(e)}function d(e){e.__upgraded__&&(e.attachedCallback||e.detachedCallback)&&e.__attached&&!p(e)&&(e.__attached=!1,e.detachedCallback&&e.detachedCallback())}function p(e){for(var t=e,n=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){b.dom&&console.log("watching shadow-root for: ",e.localName);for(var t=e.shadowRoot;t;)w(t),t=t.olderShadowRoot}}function f(e){if(b.dom){var n=e[0];if(n&&"childList"===n.type&&n.addedNodes&&n.addedNodes){for(var r=n.addedNodes[0];r&&r!==document&&!r.host;)r=r.parentNode;var o=r&&(r.URL||r._URL||r.host&&r.host.localName)||"";o=o.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",e.length,o||"")}e.forEach(function(e){"childList"===e.type&&(M(e.addedNodes,function(e){e.localName&&t(e)}),M(e.removedNodes,function(e){e.localName&&l(e)}))}),b.dom&&console.groupEnd()}function m(e){for(e=window.wrap(e),e||(e=window.wrap(document));e.parentNode;)e=e.parentNode;var t=e.__observer;t&&(f(t.takeRecords()),a())}function w(e){if(!e.__observer){var t=new MutationObserver(f);t.observe(e,{childList:!0,subtree:!0}),e.__observer=t}}function v(e){e=window.wrap(e),b.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop()),t(e),w(e),b.dom&&console.groupEnd()}function g(e){E(e,v)}var b=e.flags,y=e.forSubtree,E=e.forDocumentTree,_=!window.MutationObserver||window.MutationObserver===window.JsMutationObserver;e.hasPolyfillMutations=_;var S=!1,T=[],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=h,e.upgradeDocumentTree=g,e.upgradeSubtree=r,e.upgradeAll=t,e.attachedNode=o,e.takeRecords=m}),window.CustomElements.addModule(function(e){function t(t){if(!t.__upgraded__&&t.nodeType===Node.ELEMENT_NODE){var r=t.getAttribute("is"),o=e.getRegisteredDefinition(r||t.localName);if(o){if(r&&o.tag==t.localName)return n(t,o);if(!r&&!o["extends"])return n(t,o)}}}function n(t,n){return a.upgrade&&console.group("upgrade:",t.localName),n.is&&t.setAttribute("is",n.is),r(t,n),t.__upgraded__=!0,i(t),e.attachedNode(t),e.upgradeSubtree(t),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.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&&v(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<_.length;t++)if(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),r=Object.getPrototypeOf(n);r===e.prototype&&(t=r)}for(var o,i=e.prototype;i&&i!==t;)o=Object.getPrototypeOf(i),i.__proto__=o,i=o;e["native"]=t}}function c(e){return b(M(e.tag),e)}function l(e){return e?S[e.toLowerCase()]:void 0}function u(e,t){S[e]=t}function d(e){return function(){return c(e)}}function p(e,t,n){return e===T?h(t,n):O(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=M(e),e.indexOf("-")>=0&&y(r,HTMLElement),r)}function f(e,t){var n=e[t];e[t]=function(){var e=n.apply(this,arguments);return g(e),e}}var m,w=e.isIE11OrOlder,v=e.upgradeDocumentTree,g=e.upgradeAll,b=e.upgradeWithDefinition,y=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"],S={},T="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){for(var n=e;n;){if(n===t.prototype)return!0;n=n.__proto__}return!1},f(Node.prototype,"cloneNode"),f(document,"importNode"),w&&!function(){var e=document.importNode;document.importNode=function(){var t=e.apply(document,arguments);if(t.nodeType==t.DOCUMENT_FRAGMENT_NODE){var n=document.createDocumentFragment();return n.appendChild(t),n}return t}}(),document.registerElement=t,document.createElement=h,document.createElementNS=p,e.registry=S,e["instanceof"]=m,e.reservedTagList=_,e.getRegisteredDefinition=l,document.register=document.registerElement}),function(e){function t(){a(window.wrap(document)),window.HTMLImports&&(window.HTMLImports.__importsParsingHook=function(e){a(wrap(e["import"]))}),window.CustomElements.ready=!0,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,o=/Trident/.test(navigator.userAgent);if(n){var i=function(){};e.watchShadow=i,e.upgrade=i,e.upgradeAll=i,e.upgradeDocumentTree=i,e.upgradeSubtree=i,e.takeRecords=i,e["instanceof"]=function(e,t){return e instanceof t}}else r();var a=e.upgradeDocumentTree;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=window.ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=window.ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}),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.preventDefault=function(){Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})},n},window.CustomEvent.prototype=window.Event.prototype),"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();e.isIE11OrOlder=o}(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){"use strict";function t(){window.Polymer===o&&(window.Polymer=function(){throw new Error('You tried to use polymer without loading it first. To load polymer, <link rel="import" href="components/polymer/polymer.html">')})}if(!window.performance){var n=Date.now();window.performance={now:function(){return Date.now()-n}}}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 r=[],o=function(e,t){"string"!=typeof e&&1===arguments.length&&Array.prototype.push.call(arguments,document._currentScript),r.push(arguments)};window.Polymer=o,e.consumeDeclarations=function(t){e.consumeDeclarations=function(){throw"Possible attempt to load Polymer twice"},t&&t(r),r=null},HTMLImports.useNative?t():window.addEventListener("DOMContentLoaded",t)}(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 file
diff --git a/static/images/cover.png b/static/images/cover.png
new file mode 100644
index 0000000..004414f
--- /dev/null
+++ b/static/images/cover.png
Binary files differ
diff --git a/static/images/facebook-dreamstale25.png b/static/images/facebook-dreamstale25.png
new file mode 100644
index 0000000..911f3ae
--- /dev/null
+++ b/static/images/facebook-dreamstale25.png
Binary files differ
diff --git a/static/images/feed-dreamstale27.png b/static/images/feed-dreamstale27.png
new file mode 100644
index 0000000..387361c
--- /dev/null
+++ b/static/images/feed-dreamstale27.png
Binary files differ
diff --git a/static/images/github2-dreamstale35.png b/static/images/github2-dreamstale35.png
new file mode 100644
index 0000000..21216ec
--- /dev/null
+++ b/static/images/github2-dreamstale35.png
Binary files differ
diff --git a/static/images/google+-dreamstale37.png b/static/images/google+-dreamstale37.png
new file mode 100644
index 0000000..17f985b
--- /dev/null
+++ b/static/images/google+-dreamstale37.png
Binary files differ
diff --git a/static/images/linkedin-dreamstale45.png b/static/images/linkedin-dreamstale45.png
new file mode 100644
index 0000000..dfd9b2a
--- /dev/null
+++ b/static/images/linkedin-dreamstale45.png
Binary files differ
diff --git a/static/images/photo.png b/static/images/photo.png
new file mode 100644
index 0000000..72c861c
--- /dev/null
+++ b/static/images/photo.png
Binary files differ
diff --git a/static/images/profile.png b/static/images/profile.png
new file mode 100644
index 0000000..004414f
--- /dev/null
+++ b/static/images/profile.png
Binary files differ
diff --git a/static/images/twitter-dreamstale71.png b/static/images/twitter-dreamstale71.png
new file mode 100644
index 0000000..27779fc
--- /dev/null
+++ b/static/images/twitter-dreamstale71.png
Binary files differ
diff --git a/theme.toml b/theme.toml
new file mode 100644
index 0000000..a1f16a8
--- /dev/null
+++ b/theme.toml
@@ -0,0 +1,13 @@
+name = "Polymer"
+license = "MIT"
+licenselink = "https://github.com/pdevty/polymer/blob/master/LICENSE.md"
+description = "Material Design theme by polymer (web components)"
+homepage = "https://github.com/pdevty/polymer"
+tags = ["blog"]
+features = ["Polymer Material Design","Google Analytics","Pagination",
+"Disqus","Tags","Categories","Highlighting source code","Cover image","Social links"]
+min_version = 0.13
+
+[author]
+ name = "pdevty"
+ homepage = "http://pdevty.github.io/blog/"