summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-03-22 19:19:26 +0100
committerschneefux <schneefux+commit@schneefux.xyz>2017-03-22 19:19:26 +0100
commitd42c8b528eb595101954f478e0024e3f079f6fbf (patch)
tree61a528cf94f1f6941f4683ae8736a4a0135c035e
downloadminionlivesmatter-d42c8b528eb595101954f478e0024e3f079f6fbf.tar.gz
minionlivesmatter-d42c8b528eb595101954f478e0024e3f079f6fbf.zip
first implementation of fun stats site
-rw-r--r--.gitignore91
-rw-r--r--app.py62
-rw-r--r--templates/assets/.DS_Storebin0 -> 10244 bytes
-rw-r--r--templates/assets/bootstrap-material-design/.bower.json40
-rw-r--r--templates/assets/bootstrap-material-design/.travis.yml29
-rw-r--r--templates/assets/bootstrap-material-design/LICENSE.md30
-rw-r--r--templates/assets/bootstrap-material-design/README.md6
-rw-r--r--templates/assets/bootstrap-material-design/bower.json29
-rw-r--r--templates/assets/bootstrap-material-design/js/autofill.js109
-rw-r--r--templates/assets/bootstrap-material-design/js/base.js88
-rw-r--r--templates/assets/bootstrap-material-design/js/baseFormControl.js36
-rw-r--r--templates/assets/bootstrap-material-design/js/baseInput.js321
-rw-r--r--templates/assets/bootstrap-material-design/js/baseLayout.js122
-rw-r--r--templates/assets/bootstrap-material-design/js/baseSelection.js93
-rw-r--r--templates/assets/bootstrap-material-design/js/bootstrapMaterialDesign.js205
-rw-r--r--templates/assets/bootstrap-material-design/js/checkbox.js94
-rw-r--r--templates/assets/bootstrap-material-design/js/checkboxInline.js89
-rw-r--r--templates/assets/bootstrap-material-design/js/collapseInline.js113
-rw-r--r--templates/assets/bootstrap-material-design/js/drawer.js170
-rw-r--r--templates/assets/bootstrap-material-design/js/file.js139
-rw-r--r--templates/assets/bootstrap-material-design/js/index.js32
-rw-r--r--templates/assets/bootstrap-material-design/js/radio.js95
-rw-r--r--templates/assets/bootstrap-material-design/js/radioInline.js77
-rw-r--r--templates/assets/bootstrap-material-design/js/ripples.js311
-rw-r--r--templates/assets/bootstrap-material-design/js/select.js94
-rw-r--r--templates/assets/bootstrap-material-design/js/switch.js72
-rw-r--r--templates/assets/bootstrap-material-design/js/text.js89
-rw-r--r--templates/assets/bootstrap-material-design/js/textarea.js89
-rw-r--r--templates/assets/bootstrap-material-design/js/util.js105
-rw-r--r--templates/assets/bootstrap-material-design/package.json60
-rw-r--r--templates/assets/bootstrap-material-design/scss/_alerts.scss4
-rw-r--r--templates/assets/bootstrap-material-design/scss/_buttons.scss233
-rw-r--r--templates/assets/bootstrap-material-design/scss/_cards.scss58
-rw-r--r--templates/assets/bootstrap-material-design/scss/_checkboxes.scss256
-rw-r--r--templates/assets/bootstrap-material-design/scss/_core-bootstrap.scss68
-rw-r--r--templates/assets/bootstrap-material-design/scss/_core.scss33
-rw-r--r--templates/assets/bootstrap-material-design/scss/_custom-forms.scss10
-rw-r--r--templates/assets/bootstrap-material-design/scss/_drawer.scss122
-rw-r--r--templates/assets/bootstrap-material-design/scss/_dropdown.scss126
-rw-r--r--templates/assets/bootstrap-material-design/scss/_extensions.scss3
-rw-r--r--templates/assets/bootstrap-material-design/scss/_forms.scss221
-rw-r--r--templates/assets/bootstrap-material-design/scss/_input-group.scss39
-rw-r--r--templates/assets/bootstrap-material-design/scss/_layout.scss80
-rw-r--r--templates/assets/bootstrap-material-design/scss/_list-group.scss100
-rw-r--r--templates/assets/bootstrap-material-design/scss/_mixins.scss10
-rw-r--r--templates/assets/bootstrap-material-design/scss/_modal.scss26
-rw-r--r--templates/assets/bootstrap-material-design/scss/_nav.scss54
-rw-r--r--templates/assets/bootstrap-material-design/scss/_navbar.scss31
-rw-r--r--templates/assets/bootstrap-material-design/scss/_pagination.scss52
-rw-r--r--templates/assets/bootstrap-material-design/scss/_popover.scss19
-rw-r--r--templates/assets/bootstrap-material-design/scss/_progress.scss11
-rw-r--r--templates/assets/bootstrap-material-design/scss/_radios.scss119
-rw-r--r--templates/assets/bootstrap-material-design/scss/_reboot.scss25
-rw-r--r--templates/assets/bootstrap-material-design/scss/_ripples.scss40
-rw-r--r--templates/assets/bootstrap-material-design/scss/_switches.scss83
-rw-r--r--templates/assets/bootstrap-material-design/scss/_tables.scss26
-rw-r--r--templates/assets/bootstrap-material-design/scss/_themes.scss6
-rw-r--r--templates/assets/bootstrap-material-design/scss/_type.scss6
-rw-r--r--templates/assets/bootstrap-material-design/scss/_variables.scss139
-rw-r--r--templates/assets/bootstrap-material-design/scss/bootstrap-material-design.scss3
-rw-r--r--templates/assets/bootstrap-material-design/scss/extensions/_selectize.scss91
-rw-r--r--templates/assets/bootstrap-material-design/scss/extensions/_snackbarjs.scss27
-rw-r--r--templates/assets/bootstrap-material-design/scss/mixins/_animations.scss21
-rw-r--r--templates/assets/bootstrap-material-design/scss/mixins/_breakpoints.scss34
-rw-r--r--templates/assets/bootstrap-material-design/scss/mixins/_buttons.scss218
-rw-r--r--templates/assets/bootstrap-material-design/scss/mixins/_drawer.scss237
-rw-r--r--templates/assets/bootstrap-material-design/scss/mixins/_forms.scss283
-rw-r--r--templates/assets/bootstrap-material-design/scss/mixins/_hover.scss9
-rw-r--r--templates/assets/bootstrap-material-design/scss/mixins/_layout.scss17
-rw-r--r--templates/assets/bootstrap-material-design/scss/mixins/_navs.scss23
-rw-r--r--templates/assets/bootstrap-material-design/scss/mixins/_type.scss11
-rw-r--r--templates/assets/bootstrap-material-design/scss/mixins/_utilities.scss35
-rw-r--r--templates/assets/bootstrap-material-design/scss/variables/_colors-map.scss311
-rw-r--r--templates/assets/bootstrap-material-design/scss/variables/_colors.scss356
-rw-r--r--templates/assets/bootstrap-material-design/scss/variables/_drawer.scss5
-rw-r--r--templates/assets/bootstrap-material-design/scss/variables/_layout.scss1
-rw-r--r--templates/assets/bootstrap-material-design/scss/variables/_menu.scss18
-rw-r--r--templates/assets/bootstrap-material-design/scss/variables/_shadow.scss35
-rw-r--r--templates/assets/bootstrap-material-design/scss/variables/bootstrap/_body.scss6
-rw-r--r--templates/assets/bootstrap-material-design/scss/variables/bootstrap/_brand.scss6
-rw-r--r--templates/assets/bootstrap-material-design/scss/variables/bootstrap/_buttons.scss77
-rw-r--r--templates/assets/bootstrap-material-design/scss/variables/bootstrap/_card.scss13
-rw-r--r--templates/assets/bootstrap-material-design/scss/variables/bootstrap/_code.scss12
-rw-r--r--templates/assets/bootstrap-material-design/scss/variables/bootstrap/_components.scss16
-rw-r--r--templates/assets/bootstrap-material-design/scss/variables/bootstrap/_custom-forms.scss5
-rw-r--r--templates/assets/bootstrap-material-design/scss/variables/bootstrap/_dropdown.scss20
-rw-r--r--templates/assets/bootstrap-material-design/scss/variables/bootstrap/_forms.scss47
-rw-r--r--templates/assets/bootstrap-material-design/scss/variables/bootstrap/_list-group.scss21
-rw-r--r--templates/assets/bootstrap-material-design/scss/variables/bootstrap/_modals.scss20
-rw-r--r--templates/assets/bootstrap-material-design/scss/variables/bootstrap/_nav.scss62
-rw-r--r--templates/assets/bootstrap-material-design/scss/variables/bootstrap/_pagination.scss6
-rw-r--r--templates/assets/bootstrap-material-design/scss/variables/bootstrap/_spacing.scss26
-rw-r--r--templates/assets/bootstrap-material-design/scss/variables/bootstrap/_state.scss15
-rw-r--r--templates/assets/bootstrap-material-design/scss/variables/bootstrap/_type.scss66
-rw-r--r--templates/assets/bootstrap/.bower.json44
-rw-r--r--templates/assets/bootstrap/CHANGELOG.md5
-rw-r--r--templates/assets/bootstrap/Gemfile8
-rw-r--r--templates/assets/bootstrap/Gemfile.lock58
-rw-r--r--templates/assets/bootstrap/Gruntfile.js321
-rw-r--r--templates/assets/bootstrap/ISSUE_TEMPLATE.md22
-rw-r--r--templates/assets/bootstrap/LICENSE22
-rw-r--r--templates/assets/bootstrap/README.md149
-rw-r--r--templates/assets/bootstrap/bower.json35
-rwxr-xr-xtemplates/assets/bootstrap/grunt/change-version.js110
-rw-r--r--templates/assets/bootstrap/grunt/gcp-key.json.encbin0 -> 2304 bytes
-rw-r--r--templates/assets/bootstrap/grunt/npm-shrinkwrap.json4164
-rw-r--r--templates/assets/bootstrap/grunt/postcss.config.js41
-rw-r--r--templates/assets/bootstrap/grunt/sauce_browsers.yml84
-rwxr-xr-xtemplates/assets/bootstrap/grunt/upload-preview.sh27
-rw-r--r--templates/assets/bootstrap/js/.eslintrc.json240
-rw-r--r--templates/assets/bootstrap/js/src/alert.js193
-rw-r--r--templates/assets/bootstrap/js/src/button.js176
-rw-r--r--templates/assets/bootstrap/js/src/carousel.js497
-rw-r--r--templates/assets/bootstrap/js/src/collapse.js393
-rw-r--r--templates/assets/bootstrap/js/src/dropdown.js307
-rw-r--r--templates/assets/bootstrap/js/src/modal.js545
-rw-r--r--templates/assets/bootstrap/js/src/popover.js179
-rw-r--r--templates/assets/bootstrap/js/src/scrollspy.js335
-rw-r--r--templates/assets/bootstrap/js/src/tab.js284
-rw-r--r--templates/assets/bootstrap/js/src/tooltip.js675
-rw-r--r--templates/assets/bootstrap/js/src/util.js164
-rw-r--r--templates/assets/bootstrap/nuget/MyGet.ps118
-rw-r--r--templates/assets/bootstrap/nuget/bootstrap.nuspec27
-rw-r--r--templates/assets/bootstrap/nuget/bootstrap.sass.nuspec27
-rw-r--r--templates/assets/bootstrap/package.js19
-rw-r--r--templates/assets/bootstrap/package.json114
-rw-r--r--templates/assets/bootstrap/sache.json5
-rw-r--r--templates/assets/bootstrap/scss/.scss-lint.yml536
-rw-r--r--templates/assets/bootstrap/scss/_alert.scss55
-rw-r--r--templates/assets/bootstrap/scss/_badge.scss76
-rw-r--r--templates/assets/bootstrap/scss/_breadcrumb.scss38
-rw-r--r--templates/assets/bootstrap/scss/_button-group.scss204
-rw-r--r--templates/assets/bootstrap/scss/_buttons.scss170
-rw-r--r--templates/assets/bootstrap/scss/_card.scss276
-rw-r--r--templates/assets/bootstrap/scss/_carousel.scss177
-rw-r--r--templates/assets/bootstrap/scss/_close.scss29
-rw-r--r--templates/assets/bootstrap/scss/_code.scss64
-rw-r--r--templates/assets/bootstrap/scss/_custom-forms.scss258
-rw-r--r--templates/assets/bootstrap/scss/_custom.scss4
-rw-r--r--templates/assets/bootstrap/scss/_dropdown.scss156
-rw-r--r--templates/assets/bootstrap/scss/_forms.scss387
-rw-r--r--templates/assets/bootstrap/scss/_grid.scss52
-rw-r--r--templates/assets/bootstrap/scss/_images.scss43
-rw-r--r--templates/assets/bootstrap/scss/_input-group.scss175
-rw-r--r--templates/assets/bootstrap/scss/_jumbotron.scss20
-rw-r--r--templates/assets/bootstrap/scss/_list-group.scss116
-rw-r--r--templates/assets/bootstrap/scss/_media.scss8
-rw-r--r--templates/assets/bootstrap/scss/_mixins.scss43
-rw-r--r--templates/assets/bootstrap/scss/_modal.scss142
-rw-r--r--templates/assets/bootstrap/scss/_nav.scss120
-rw-r--r--templates/assets/bootstrap/scss/_navbar.scss276
-rw-r--r--templates/assets/bootstrap/scss/_pagination.scss67
-rw-r--r--templates/assets/bootstrap/scss/_popover.scss171
-rw-r--r--templates/assets/bootstrap/scss/_print.scss119
-rw-r--r--templates/assets/bootstrap/scss/_progress.scss30
-rw-r--r--templates/assets/bootstrap/scss/_reboot.scss484
-rw-r--r--templates/assets/bootstrap/scss/_responsive-embed.scss52
-rw-r--r--templates/assets/bootstrap/scss/_tables.scss169
-rw-r--r--templates/assets/bootstrap/scss/_tooltip.scss90
-rw-r--r--templates/assets/bootstrap/scss/_transitions.scss34
-rw-r--r--templates/assets/bootstrap/scss/_type.scss143
-rw-r--r--templates/assets/bootstrap/scss/_utilities.scss13
-rw-r--r--templates/assets/bootstrap/scss/_variables.scss921
-rw-r--r--templates/assets/bootstrap/scss/bootstrap-grid.scss37
-rw-r--r--templates/assets/bootstrap/scss/bootstrap-reboot.scss9
-rw-r--r--templates/assets/bootstrap/scss/bootstrap.scss52
-rw-r--r--templates/assets/bootstrap/scss/mixins/_alert.scss14
-rw-r--r--templates/assets/bootstrap/scss/mixins/_background-variant.scss12
-rw-r--r--templates/assets/bootstrap/scss/mixins/_badge.scss11
-rw-r--r--templates/assets/bootstrap/scss/mixins/_border-radius.scss35
-rw-r--r--templates/assets/bootstrap/scss/mixins/_box-shadow.scss5
-rw-r--r--templates/assets/bootstrap/scss/mixins/_breakpoints.scss95
-rw-r--r--templates/assets/bootstrap/scss/mixins/_buttons.scss86
-rw-r--r--templates/assets/bootstrap/scss/mixins/_cards.scss47
-rw-r--r--templates/assets/bootstrap/scss/mixins/_clearfix.scss7
-rw-r--r--templates/assets/bootstrap/scss/mixins/_float.scss9
-rw-r--r--templates/assets/bootstrap/scss/mixins/_forms.scss55
-rw-r--r--templates/assets/bootstrap/scss/mixins/_gradients.scss37
-rw-r--r--templates/assets/bootstrap/scss/mixins/_grid-framework.scss65
-rw-r--r--templates/assets/bootstrap/scss/mixins/_grid.scss100
-rw-r--r--templates/assets/bootstrap/scss/mixins/_hover.scss60
-rw-r--r--templates/assets/bootstrap/scss/mixins/_image.scss36
-rw-r--r--templates/assets/bootstrap/scss/mixins/_list-group.scss26
-rw-r--r--templates/assets/bootstrap/scss/mixins/_lists.scss7
-rw-r--r--templates/assets/bootstrap/scss/mixins/_nav-divider.scss10
-rw-r--r--templates/assets/bootstrap/scss/mixins/_navbar-align.scss9
-rw-r--r--templates/assets/bootstrap/scss/mixins/_pagination.scss21
-rw-r--r--templates/assets/bootstrap/scss/mixins/_reset-text.scss18
-rw-r--r--templates/assets/bootstrap/scss/mixins/_resize.scss6
-rw-r--r--templates/assets/bootstrap/scss/mixins/_screen-reader.scss35
-rw-r--r--templates/assets/bootstrap/scss/mixins/_size.scss6
-rw-r--r--templates/assets/bootstrap/scss/mixins/_table-row.scss30
-rw-r--r--templates/assets/bootstrap/scss/mixins/_text-emphasis.scss12
-rw-r--r--templates/assets/bootstrap/scss/mixins/_text-hide.scss8
-rw-r--r--templates/assets/bootstrap/scss/mixins/_text-truncate.scss8
-rw-r--r--templates/assets/bootstrap/scss/mixins/_transforms.scss14
-rw-r--r--templates/assets/bootstrap/scss/mixins/_transition.scss9
-rw-r--r--templates/assets/bootstrap/scss/mixins/_visibility.scss5
-rw-r--r--templates/assets/bootstrap/scss/utilities/_align.scss6
-rw-r--r--templates/assets/bootstrap/scss/utilities/_background.scss19
-rw-r--r--templates/assets/bootstrap/scss/utilities/_borders.scss37
-rw-r--r--templates/assets/bootstrap/scss/utilities/_clearfix.scss3
-rw-r--r--templates/assets/bootstrap/scss/utilities/_display.scss53
-rw-r--r--templates/assets/bootstrap/scss/utilities/_flex.scss48
-rw-r--r--templates/assets/bootstrap/scss/utilities/_float.scss9
-rw-r--r--templates/assets/bootstrap/scss/utilities/_position.scss23
-rw-r--r--templates/assets/bootstrap/scss/utilities/_screenreaders.scss11
-rw-r--r--templates/assets/bootstrap/scss/utilities/_sizing.scss10
-rw-r--r--templates/assets/bootstrap/scss/utilities/_spacing.scss41
-rw-r--r--templates/assets/bootstrap/scss/utilities/_text.scss61
-rw-r--r--templates/assets/bootstrap/scss/utilities/_visibility.scss11
-rw-r--r--templates/assets/images/items/aegis.pngbin0 -> 19322 bytes
-rw-r--r--templates/assets/images/items/aftershock.pngbin0 -> 22083 bytes
-rw-r--r--templates/assets/images/items/alternating-current.pngbin0 -> 22617 bytes
-rw-r--r--templates/assets/images/items/atlas-pauldron.pngbin0 -> 23389 bytes
-rw-r--r--templates/assets/images/items/barbed-needle.pngbin0 -> 21230 bytes
-rw-r--r--templates/assets/images/items/blazing-salvo.pngbin0 -> 18369 bytes
-rw-r--r--templates/assets/images/items/bonesaw.pngbin0 -> 23268 bytes
-rw-r--r--templates/assets/images/items/book-of-eulogies.pngbin0 -> 21908 bytes
-rw-r--r--templates/assets/images/items/breaking-point.pngbin0 -> 22995 bytes
-rw-r--r--templates/assets/images/items/broken-myth.pngbin0 -> 20976 bytes
-rw-r--r--templates/assets/images/items/chronograph.pngbin0 -> 22940 bytes
-rw-r--r--templates/assets/images/items/clockwork.pngbin0 -> 25189 bytes
-rw-r--r--templates/assets/images/items/coat-of-plates.pngbin0 -> 23762 bytes
-rw-r--r--templates/assets/images/items/contraption.pngbin0 -> 39535 bytes
-rw-r--r--templates/assets/images/items/crucible.pngbin0 -> 22502 bytes
-rw-r--r--templates/assets/images/items/crystal-bit.pngbin0 -> 17129 bytes
-rw-r--r--templates/assets/images/items/crystal-infusion.pngbin0 -> 22131 bytes
-rw-r--r--templates/assets/images/items/dragon-heart.pngbin0 -> 39947 bytes
-rw-r--r--templates/assets/images/items/dragonblood-contract.pngbin0 -> 30790 bytes
-rw-r--r--templates/assets/images/items/echo.pngbin0 -> 46264 bytes
-rw-r--r--templates/assets/images/items/eclipse-prism.pngbin0 -> 20643 bytes
-rw-r--r--templates/assets/images/items/energy-battery.pngbin0 -> 16888 bytes
-rw-r--r--templates/assets/images/items/eve-of-harvest.pngbin0 -> 20851 bytes
-rw-r--r--templates/assets/images/items/flare-gun.pngbin0 -> 30178 bytes
-rw-r--r--templates/assets/images/items/flare.pngbin0 -> 16840 bytes
-rw-r--r--templates/assets/images/items/fountain-of-renewal.pngbin0 -> 21872 bytes
-rw-r--r--templates/assets/images/items/frostburn.pngbin0 -> 23201 bytes
-rw-r--r--templates/assets/images/items/halcyon-chargers.pngbin0 -> 29937 bytes
-rw-r--r--templates/assets/images/items/halcyon-potion.pngbin0 -> 18093 bytes
-rw-r--r--templates/assets/images/items/heavy-prism.pngbin0 -> 20052 bytes
-rw-r--r--templates/assets/images/items/heavy-steel.pngbin0 -> 19149 bytes
-rw-r--r--templates/assets/images/items/hour-glass.pngbin0 -> 19167 bytes
-rw-r--r--templates/assets/images/items/ironguard-contract.pngbin0 -> 30429 bytes
-rw-r--r--templates/assets/images/items/journey-boots.pngbin0 -> 21534 bytes
-rw-r--r--templates/assets/images/items/kinetic-shield.pngbin0 -> 19986 bytes
-rw-r--r--templates/assets/images/items/level-juice.pngbin0 -> 39265 bytes
-rw-r--r--templates/assets/images/items/lifespring.pngbin0 -> 22698 bytes
-rw-r--r--templates/assets/images/items/light-armor.pngbin0 -> 23137 bytes
-rw-r--r--templates/assets/images/items/light-shield.pngbin0 -> 19073 bytes
-rw-r--r--templates/assets/images/items/lucky-strike.pngbin0 -> 20864 bytes
-rw-r--r--templates/assets/images/items/metal-jacket.pngbin0 -> 23441 bytes
-rw-r--r--templates/assets/images/items/minion-candy.pngbin0 -> 18688 bytes
-rw-r--r--templates/assets/images/items/minions-foot.pngbin0 -> 31219 bytes
-rw-r--r--templates/assets/images/items/nullwave-gauntlet.pngbin0 -> 40802 bytes
-rw-r--r--templates/assets/images/items/oak-heart.pngbin0 -> 36045 bytes
-rw-r--r--templates/assets/images/items/piercing-shard.pngbin0 -> 20772 bytes
-rw-r--r--templates/assets/images/items/piercing-spear.pngbin0 -> 20240 bytes
-rw-r--r--templates/assets/images/items/poisoned-shiv.pngbin0 -> 38375 bytes
-rw-r--r--templates/assets/images/items/pot-of-gold.pngbin0 -> 37175 bytes
-rw-r--r--templates/assets/images/items/protector-contract.pngbin0 -> 27988 bytes
-rw-r--r--templates/assets/images/items/reflex-block.pngbin0 -> 23995 bytes
-rw-r--r--templates/assets/images/items/scout-trap.pngbin0 -> 17566 bytes
-rw-r--r--templates/assets/images/items/serpent-mask.pngbin0 -> 23338 bytes
-rw-r--r--templates/assets/images/items/shatter-glass.pngbin0 -> 20011 bytes
-rw-r--r--templates/assets/images/items/shiversteel.pngbin0 -> 21307 bytes
-rw-r--r--templates/assets/images/items/six-sins.pngbin0 -> 21977 bytes
-rw-r--r--templates/assets/images/items/slumbering-husk.pngbin0 -> 41172 bytes
-rw-r--r--templates/assets/images/items/sorrow-blade.pngbin0 -> 23440 bytes
-rw-r--r--templates/assets/images/items/sprint-boots.pngbin0 -> 19904 bytes
-rw-r--r--templates/assets/images/items/stormcrown.pngbin0 -> 30233 bytes
-rw-r--r--templates/assets/images/items/stormguard-banner.pngbin0 -> 23057 bytes
-rw-r--r--templates/assets/images/items/swift-shooter.pngbin0 -> 17836 bytes
-rw-r--r--templates/assets/images/items/tension-bow.pngbin0 -> 21725 bytes
-rw-r--r--templates/assets/images/items/tornado-trigger.pngbin0 -> 21436 bytes
-rw-r--r--templates/assets/images/items/travel-boots.pngbin0 -> 21182 bytes
-rw-r--r--templates/assets/images/items/tyrants-monocle.pngbin0 -> 23363 bytes
-rw-r--r--templates/assets/images/items/void-battery.pngbin0 -> 20194 bytes
-rw-r--r--templates/assets/images/items/war-treads.pngbin0 -> 29666 bytes
-rw-r--r--templates/assets/images/items/weapon-blade.pngbin0 -> 15893 bytes
-rw-r--r--templates/assets/images/items/weapon-infusion.pngbin0 -> 22134 bytes
-rw-r--r--templates/assets/jquery/.bower.json25
-rw-r--r--templates/assets/jquery/AUTHORS.txt278
-rw-r--r--templates/assets/jquery/LICENSE.txt36
-rw-r--r--templates/assets/jquery/README.md65
-rw-r--r--templates/assets/jquery/bower.json14
-rw-r--r--templates/assets/jquery/external/sizzle/LICENSE.txt36
-rw-r--r--templates/assets/jquery/src/.jshintrc29
-rw-r--r--templates/assets/jquery/src/ajax.js845
-rw-r--r--templates/assets/jquery/src/ajax/jsonp.js100
-rw-r--r--templates/assets/jquery/src/ajax/load.js83
-rw-r--r--templates/assets/jquery/src/ajax/parseJSON.js13
-rw-r--r--templates/assets/jquery/src/ajax/parseXML.js27
-rw-r--r--templates/assets/jquery/src/ajax/script.js68
-rw-r--r--templates/assets/jquery/src/ajax/xhr.js167
-rw-r--r--templates/assets/jquery/src/attributes.js11
-rw-r--r--templates/assets/jquery/src/attributes/attr.js142
-rw-r--r--templates/assets/jquery/src/attributes/classes.js177
-rw-r--r--templates/assets/jquery/src/attributes/prop.js125
-rw-r--r--templates/assets/jquery/src/attributes/support.js36
-rw-r--r--templates/assets/jquery/src/attributes/val.js177
-rw-r--r--templates/assets/jquery/src/callbacks.js232
-rw-r--r--templates/assets/jquery/src/core.js494
-rw-r--r--templates/assets/jquery/src/core/access.js65
-rw-r--r--templates/assets/jquery/src/core/init.js134
-rw-r--r--templates/assets/jquery/src/core/parseHTML.js41
-rw-r--r--templates/assets/jquery/src/core/ready.js103
-rw-r--r--templates/assets/jquery/src/css.js502
-rw-r--r--templates/assets/jquery/src/css/addGetHookIf.js24
-rw-r--r--templates/assets/jquery/src/css/adjustCSS.js65
-rw-r--r--templates/assets/jquery/src/css/curCSS.js60
-rw-r--r--templates/assets/jquery/src/css/defaultDisplay.js72
-rw-r--r--templates/assets/jquery/src/css/hiddenVisibleSelectors.js18
-rw-r--r--templates/assets/jquery/src/css/showHide.js48
-rw-r--r--templates/assets/jquery/src/css/support.js121
-rw-r--r--templates/assets/jquery/src/data.js187
-rw-r--r--templates/assets/jquery/src/data/Data.js200
-rw-r--r--templates/assets/jquery/src/deferred.js158
-rw-r--r--templates/assets/jquery/src/deprecated.js32
-rw-r--r--templates/assets/jquery/src/dimensions.js54
-rw-r--r--templates/assets/jquery/src/effects.js629
-rw-r--r--templates/assets/jquery/src/effects/Tween.js121
-rw-r--r--templates/assets/jquery/src/effects/animatedSelector.js13
-rw-r--r--templates/assets/jquery/src/event.js711
-rw-r--r--templates/assets/jquery/src/event/ajax.js20
-rw-r--r--templates/assets/jquery/src/event/alias.js27
-rw-r--r--templates/assets/jquery/src/event/focusin.js53
-rw-r--r--templates/assets/jquery/src/event/support.js9
-rw-r--r--templates/assets/jquery/src/event/trigger.js183
-rw-r--r--templates/assets/jquery/src/exports/amd.js24
-rw-r--r--templates/assets/jquery/src/exports/global.js26
-rw-r--r--templates/assets/jquery/src/intro.js44
-rw-r--r--templates/assets/jquery/src/jquery.js37
-rw-r--r--templates/assets/jquery/src/manipulation.js481
-rw-r--r--templates/assets/jquery/src/manipulation/_evalUrl.js20
-rw-r--r--templates/assets/jquery/src/manipulation/buildFragment.js102
-rw-r--r--templates/assets/jquery/src/manipulation/getAll.js21
-rw-r--r--templates/assets/jquery/src/manipulation/setGlobalEval.js20
-rw-r--r--templates/assets/jquery/src/manipulation/support.js33
-rw-r--r--templates/assets/jquery/src/manipulation/wrapMap.js27
-rw-r--r--templates/assets/jquery/src/offset.js218
-rw-r--r--templates/assets/jquery/src/outro.js2
-rw-r--r--templates/assets/jquery/src/queue.js143
-rw-r--r--templates/assets/jquery/src/queue/delay.js22
-rw-r--r--templates/assets/jquery/src/selector-native.js211
-rw-r--r--templates/assets/jquery/src/selector-sizzle.js14
-rw-r--r--templates/assets/jquery/src/selector.js1
-rw-r--r--templates/assets/jquery/src/serialize.js125
-rw-r--r--templates/assets/jquery/src/traversing.js175
-rw-r--r--templates/assets/jquery/src/traversing/findFilter.js100
-rw-r--r--templates/assets/jquery/src/wrap.js79
-rw-r--r--templates/assets/sass/.DS_Storebin0 -> 6148 bytes
-rwxr-xr-xtemplates/assets/sass/material-kit.scss24
-rw-r--r--templates/assets/sass/material-kit/.DS_Storebin0 -> 6148 bytes
-rwxr-xr-xtemplates/assets/sass/material-kit/_alerts.scss41
-rwxr-xr-xtemplates/assets/sass/material-kit/_buttons.scss245
-rwxr-xr-xtemplates/assets/sass/material-kit/_cards.scss164
-rw-r--r--templates/assets/sass/material-kit/_carousel.scss52
-rwxr-xr-xtemplates/assets/sass/material-kit/_checkboxes.scss195
-rwxr-xr-xtemplates/assets/sass/material-kit/_colors.scss326
-rwxr-xr-xtemplates/assets/sass/material-kit/_core.scss115
-rwxr-xr-xtemplates/assets/sass/material-kit/_dialogs.scss69
-rwxr-xr-xtemplates/assets/sass/material-kit/_dividers.scss73
-rw-r--r--templates/assets/sass/material-kit/_dropdown.scss58
-rw-r--r--templates/assets/sass/material-kit/_example-pages.scss236
-rw-r--r--templates/assets/sass/material-kit/_footers.scss38
-rwxr-xr-xtemplates/assets/sass/material-kit/_form.scss42
-rw-r--r--templates/assets/sass/material-kit/_images.scss6
-rwxr-xr-xtemplates/assets/sass/material-kit/_import-bs-less.scss4
-rwxr-xr-xtemplates/assets/sass/material-kit/_import-bs-sass.scss2
-rw-r--r--templates/assets/sass/material-kit/_info-areas.scss38
-rwxr-xr-xtemplates/assets/sass/material-kit/_inputs-size.scss223
-rwxr-xr-xtemplates/assets/sass/material-kit/_inputs.scss369
-rwxr-xr-xtemplates/assets/sass/material-kit/_labels.scss10
-rwxr-xr-xtemplates/assets/sass/material-kit/_lists.scss104
-rwxr-xr-xtemplates/assets/sass/material-kit/_mixins.scss326
-rwxr-xr-xtemplates/assets/sass/material-kit/_navbar.scss287
-rw-r--r--templates/assets/sass/material-kit/_pagination.scss91
-rwxr-xr-xtemplates/assets/sass/material-kit/_panels.scss23
-rw-r--r--templates/assets/sass/material-kit/_pills.scss91
-rwxr-xr-xtemplates/assets/sass/material-kit/_popups.scss72
-rwxr-xr-xtemplates/assets/sass/material-kit/_progress.scss28
-rwxr-xr-xtemplates/assets/sass/material-kit/_radios.scss114
-rwxr-xr-xtemplates/assets/sass/material-kit/_ripples.scss36
-rw-r--r--templates/assets/sass/material-kit/_sections.scss13
-rwxr-xr-xtemplates/assets/sass/material-kit/_shadows.scss138
-rwxr-xr-xtemplates/assets/sass/material-kit/_tabs.scss53
-rwxr-xr-xtemplates/assets/sass/material-kit/_togglebutton.scss87
-rwxr-xr-xtemplates/assets/sass/material-kit/_typography.scss66
-rwxr-xr-xtemplates/assets/sass/material-kit/_variables.scss198
-rw-r--r--templates/assets/sass/material-kit/_variables_bootstrap.scss882
-rwxr-xr-xtemplates/assets/sass/material-kit/_welljumbo.scss28
-rw-r--r--templates/assets/sass/material-kit/plugins/_plugin-datepicker.scss220
-rwxr-xr-xtemplates/assets/sass/material-kit/plugins/_plugin-dropdownjs.scss17
-rwxr-xr-xtemplates/assets/sass/material-kit/plugins/_plugin-nouislider.scss161
-rwxr-xr-xtemplates/assets/sass/material-kit/plugins/_plugin-selectize.scss93
-rwxr-xr-xtemplates/assets/sass/material-kit/plugins/_plugin-snackbarjs.scss34
-rw-r--r--templates/assets/tether/.bower.json35
-rw-r--r--templates/assets/tether/CHANGELOG.md13
-rw-r--r--templates/assets/tether/CONTRIBUTING.md59
-rw-r--r--templates/assets/tether/LICENSE8
-rw-r--r--templates/assets/tether/README.md106
-rw-r--r--templates/assets/tether/bower.json26
-rw-r--r--templates/assets/tether/component.json22
-rw-r--r--templates/assets/tether/docs/1-Overview/1-why_you_should_use_tether.md43
-rw-r--r--templates/assets/tether/docs/1-Overview/2-repositioning.md46
-rw-r--r--templates/assets/tether/docs/1-Overview/3-why_we_dont_support_IE_8.md47
-rw-r--r--templates/assets/tether/docs/2-Examples/1-list_of_examples.md27
-rw-r--r--templates/assets/tether/docs/2-Examples/2-projects_using_tether.md37
-rw-r--r--templates/assets/tether/docs/3-Advanced/1-embedding_tether.md9
-rw-r--r--templates/assets/tether/docs/3-Advanced/2-extending_tether.md54
-rw-r--r--templates/assets/tether/docs/coffee/intro.coffee113
-rw-r--r--templates/assets/tether/docs/css/intro.css218
-rw-r--r--templates/assets/tether/docs/intro.md591
-rw-r--r--templates/assets/tether/docs/js/intro.js117
-rw-r--r--templates/assets/tether/docs/js/markAttachment.js51
-rw-r--r--templates/assets/tether/docs/sass/intro.sass233
-rw-r--r--templates/assets/tether/docs/welcome/browser-demo.html76
-rw-r--r--templates/assets/tether/docs/welcome/coffee/welcome.coffee212
-rw-r--r--templates/assets/tether/docs/welcome/css/browser-demo.css86
-rw-r--r--templates/assets/tether/docs/welcome/css/prism.css2
-rw-r--r--templates/assets/tether/docs/welcome/css/welcome.css247
-rw-r--r--templates/assets/tether/docs/welcome/index.html226
-rw-r--r--templates/assets/tether/docs/welcome/js/drop.js239
-rw-r--r--templates/assets/tether/docs/welcome/js/jquery.js9597
-rw-r--r--templates/assets/tether/docs/welcome/js/log.js134
-rw-r--r--templates/assets/tether/docs/welcome/js/tether-v0.1.3.js2
-rw-r--r--templates/assets/tether/docs/welcome/js/welcome.js193
-rw-r--r--templates/assets/tether/docs/welcome/sass/_inline-block.sass6
-rw-r--r--templates/assets/tether/docs/welcome/sass/browser-demo.sass93
-rw-r--r--templates/assets/tether/docs/welcome/sass/welcome.sass285
-rw-r--r--templates/assets/tether/examples/chosen/chosen-sprite.pngbin0 -> 646 bytes
-rw-r--r--templates/assets/tether/examples/chosen/chosen-sprite@2x.pngbin0 -> 738 bytes
-rw-r--r--templates/assets/tether/examples/chosen/chosen.css430
-rw-r--r--templates/assets/tether/examples/chosen/chosen.js1166
-rw-r--r--templates/assets/tether/examples/chosen/index.html110
-rw-r--r--templates/assets/tether/examples/common/css/style.css48
-rw-r--r--templates/assets/tether/examples/content-visible/index.html64
-rw-r--r--templates/assets/tether/examples/dolls/dolls.css18
-rw-r--r--templates/assets/tether/examples/dolls/dolls.js83
-rw-r--r--templates/assets/tether/examples/dolls/index.html7
-rw-r--r--templates/assets/tether/examples/element-scroll/index.html499
-rw-r--r--templates/assets/tether/examples/enable-disable/index.html37
-rw-r--r--templates/assets/tether/examples/facebook/facebook.css86
-rw-r--r--templates/assets/tether/examples/facebook/index.html209
-rw-r--r--templates/assets/tether/examples/out-of-bounds/index.html38
-rw-r--r--templates/assets/tether/examples/pin/index.html30
-rw-r--r--templates/assets/tether/examples/resources/css/base.css10
-rw-r--r--templates/assets/tether/examples/resources/js/jquery.js9597
-rw-r--r--templates/assets/tether/examples/resources/js/log.js134
-rw-r--r--templates/assets/tether/examples/scroll/index.html922
-rw-r--r--templates/assets/tether/examples/simple/index.html30
-rw-r--r--templates/assets/tether/examples/testbed/index.html36
-rw-r--r--templates/assets/tether/examples/tooltip/index.html86
-rw-r--r--templates/assets/tether/examples/viewport/colors.css145
-rw-r--r--templates/assets/tether/examples/viewport/index.html70
-rw-r--r--templates/assets/tether/gulpfile.js96
-rw-r--r--templates/assets/tether/package.json40
-rw-r--r--templates/assets/tether/src/css/helpers/_tether-theme-arrows.sass192
-rw-r--r--templates/assets/tether/src/css/helpers/_tether-theme-basic.sass14
-rw-r--r--templates/assets/tether/src/css/helpers/_tether.sass12
-rw-r--r--templates/assets/tether/src/css/mixins/_inline-block.sass6
-rw-r--r--templates/assets/tether/src/css/mixins/_pie-clearfix.sass7
-rw-r--r--templates/assets/tether/src/css/tether-theme-arrows-dark.sass12
-rw-r--r--templates/assets/tether/src/css/tether-theme-arrows.sass12
-rw-r--r--templates/assets/tether/src/css/tether-theme-basic.sass10
-rw-r--r--templates/assets/tether/src/css/tether.sass5
-rw-r--r--templates/assets/tether/src/js/abutment.js61
-rw-r--r--templates/assets/tether/src/js/constraint.js366
-rw-r--r--templates/assets/tether/src/js/markAttachment.js46
-rw-r--r--templates/assets/tether/src/js/shift.js32
-rw-r--r--templates/assets/tether/src/js/tether.js809
-rw-r--r--templates/assets/tether/src/js/utils.js370
-rw-r--r--templates/index.html115
474 files changed, 66937 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..9a05e2d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,91 @@
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+env/
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+wheels/
+*.egg-info/
+.installed.cfg
+*.egg
+
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*,cover
+.hypothesis/
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+local_settings.py
+
+# Flask stuff:
+instance/
+.webassets-cache
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+target/
+
+# Jupyter Notebook
+.ipynb_checkpoints
+
+# pyenv
+.python-version
+
+# celery beat schedule file
+celerybeat-schedule
+
+# dotenv
+.env
+
+# virtualenv
+.venv/
+venv/
+ENV/
+
+# Spyder project settings
+.spyderproject
+
+# Rope project settings
+.ropeproject
diff --git a/app.py b/app.py
new file mode 100644
index 0000000..3eaafb2
--- /dev/null
+++ b/app.py
@@ -0,0 +1,62 @@
+#!/usr/bin/python3
+
+import os
+import psycopg2
+import psycopg2.pool
+import psycopg2.extras
+from flask import Flask, g, render_template, send_from_directory
+from werkzeug.contrib.cache import SimpleCache
+
+app = Flask(__name__)
+cache = SimpleCache()
+
+db_config = {
+ "host": os.environ.get("POSTGRESQL_DEST_HOST") or "localhost",
+ "port": os.environ.get("POSTGRESQL_DEST_PORT") or 5432,
+ "user": os.environ.get("POSTGRESQL_DEST_USER") or "vainweb",
+ "password": os.environ.get("POSTGRESQL_DEST_PASSWORD") or "vainweb",
+ "dbname": os.environ.get("POSTGRESQL_DEST_DB") or "vainsocial-web"
+}
+
+def dbpool():
+ if not hasattr(g, "db_pool"):
+ g.db_pool = psycopg2.pool.ThreadedConnectionPool(
+ **db_config, minconn=1, maxconn=10)
+ return g.db_pool
+
+@app.teardown_appcontext
+def db_disconnect(err):
+ if hasattr(g, "db_pool"):
+ g.db_pool.closeall()
+
+@app.context_processor
+def sql_processor():
+ def sql_val(query):
+ val = cache.get(query)
+ if val is not None:
+ return val.get(0)
+
+ con = dbpool().getconn()
+ c = con.cursor(cursor_factory=psycopg2.extras.DictCursor)
+
+ c.execute(query)
+ val = c.fetchone()
+ cache.set(query, val, timeout=60*60) # seconds
+
+ c.close()
+ dbpool().putconn(con)
+
+ return val.get(0)
+
+ return dict(sql_val=sql_val)
+
+@app.route("/")
+def index():
+ return render_template("index.html")
+
+@app.route("/assets/<path:path>")
+def send_assets(path):
+ return send_from_directory("templates/assets", path)
+
+if __name__ == "__main__":
+ app.run(debug=True)
diff --git a/templates/assets/.DS_Store b/templates/assets/.DS_Store
new file mode 100644
index 0000000..00e8144
--- /dev/null
+++ b/templates/assets/.DS_Store
Binary files differ
diff --git a/templates/assets/bootstrap-material-design/.bower.json b/templates/assets/bootstrap-material-design/.bower.json
new file mode 100644
index 0000000..cc4d06b
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/.bower.json
@@ -0,0 +1,40 @@
+{
+ "name": "bootstrap-material-design",
+ "description": "Bootstrap Material Design 4",
+ "keywords": [
+ "material",
+ "design",
+ "bootstrap",
+ "css",
+ "js",
+ "sass",
+ "mobile-first",
+ "responsive",
+ "front-end",
+ "framework",
+ "web"
+ ],
+ "homepage": "http://fezvrasta.github.io/bootstrap-material-design",
+ "license": "MIT",
+ "moduleType": "globals",
+ "main": [
+ "scss/_core.scss",
+ "dist/bootstrap-material-design.iife.js"
+ ],
+ "dependencies": {
+ "jquery": "^2.2",
+ "tether": "^1.2",
+ "bootstrap": "v4-dev"
+ },
+ "version": "4.0.2",
+ "_release": "4.0.2",
+ "_resolution": {
+ "type": "version",
+ "tag": "v4.0.2",
+ "commit": "ec3a7ffc23d1f18ac822442fe06d3688d29cbbea"
+ },
+ "_source": "https://github.com/FezVrasta/bootstrap-material-design.git",
+ "_target": "v4.0.2",
+ "_originalSource": "bootstrap-material-design",
+ "_direct": true
+} \ No newline at end of file
diff --git a/templates/assets/bootstrap-material-design/.travis.yml b/templates/assets/bootstrap-material-design/.travis.yml
new file mode 100644
index 0000000..34b0d78
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/.travis.yml
@@ -0,0 +1,29 @@
+sudo: false
+git:
+ depth: 10
+
+# remove the dist branch and dist tags from travis builds
+branches:
+ except:
+ - dist
+ - /^v(\d+\.)?(\d+\.)?(\*|\d+)$/
+
+language: node_js
+node_js:
+ - "5" # "node" (v6.x) yielded v8::ObjectTemplate::Set() with non-primitive values is deprecated
+
+# enable this once we have reliable builds
+cache:
+ directories:
+ - node_modules
+ - vendor/bundle
+
+before_install:
+ - rvm install 2.2
+ - rvm use 2.2 --fuzzy
+ - gem install scss-lint
+
+before_script:
+ - npm install -g gulp-cli
+
+script: gulp all
diff --git a/templates/assets/bootstrap-material-design/LICENSE.md b/templates/assets/bootstrap-material-design/LICENSE.md
new file mode 100644
index 0000000..4199bf6
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/LICENSE.md
@@ -0,0 +1,30 @@
+The MIT License (MIT)
+
+Copyright (c) 2015-2016, Federico Zivolo and contributors - https://github.com/FezVrasta/bootstrap-material-design
+
+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.
+
+
+## Acknowledgements:
+
+- Some original Bootstrap code and documentation http://getbootstrap.com
+`Copyright (c) 2011-2015 Twitter, Inc`
+
+- Some original MDL code http://www.getmdl.io/
+`Copyright 2015 Google Inc. All Rights Reserved.`
diff --git a/templates/assets/bootstrap-material-design/README.md b/templates/assets/bootstrap-material-design/README.md
new file mode 100644
index 0000000..9fe60b2
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/README.md
@@ -0,0 +1,6 @@
+# bootstrap-material-design
+
+[`v4.0.2`](../../releases/tag/v4.0.2) built from commit [`f2ac8b1`](../../commit/f2ac8b142aba7e0cda5c945b04649269d1ff3d5a) on branch `v4-dev`. See the [README](../..) for more details
+
+---
+<sup>Built and published by [gulp-pipeline](https://github.com/alienfast/gulp-pipeline) using [build-control](https://github.com/alienfast/build-control)</sup>
diff --git a/templates/assets/bootstrap-material-design/bower.json b/templates/assets/bootstrap-material-design/bower.json
new file mode 100644
index 0000000..a312e33
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/bower.json
@@ -0,0 +1,29 @@
+{
+ "name": "bootstrap-material-design",
+ "description": "Bootstrap Material Design 4",
+ "keywords": [
+ "material",
+ "design",
+ "bootstrap",
+ "css",
+ "js",
+ "sass",
+ "mobile-first",
+ "responsive",
+ "front-end",
+ "framework",
+ "web"
+ ],
+ "homepage": "http://fezvrasta.github.io/bootstrap-material-design",
+ "license": "MIT",
+ "moduleType": "globals",
+ "main": [
+ "scss/_core.scss",
+ "dist/bootstrap-material-design.iife.js"
+ ],
+ "dependencies": {
+ "jquery": "^2.2",
+ "tether": "^1.2",
+ "bootstrap": "v4-dev"
+ }
+}
diff --git a/templates/assets/bootstrap-material-design/js/autofill.js b/templates/assets/bootstrap-material-design/js/autofill.js
new file mode 100644
index 0000000..2ada9ec
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/js/autofill.js
@@ -0,0 +1,109 @@
+import Base from './base'
+
+const Autofill = (($) => {
+
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+ const NAME = 'autofill'
+ const DATA_KEY = `bmd.${NAME}`
+ const JQUERY_NAME = `bmd${NAME.charAt(0).toUpperCase() + NAME.slice(1)}`
+ const JQUERY_NO_CONFLICT = $.fn[JQUERY_NAME]
+
+ const Default = {}
+
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+ class Autofill extends Base {
+
+ constructor($element, config) {
+ super($element, $.extend(true, {}, Default, config))
+
+ this._watchLoading()
+ this._attachEventHandlers()
+ }
+
+ dispose() {
+ super.dispose(DATA_KEY)
+ }
+
+ // ------------------------------------------------------------------------
+ // private
+
+ _watchLoading() {
+ // After 10 seconds we are quite sure all the needed inputs are autofilled then we can stop checking them
+ setTimeout(() => {
+ clearInterval(this._onLoading)
+ }, 10000)
+ }
+
+ // This part of code will detect autofill when the page is loading (username and password inputs for example)
+ _onLoading() {
+ setInterval(() => {
+ $('input[type!=checkbox]').each((index, element) => {
+ let $element = $(element)
+ if ($element.val() && $element.val() !== $element.attr('value')) {
+ $element.trigger('change')
+ }
+ })
+ }, 100)
+ }
+
+ _attachEventHandlers() {
+ // Listen on inputs of the focused form
+ // (because user can select from the autofill dropdown only when the input has focus)
+ let focused = null
+ $(document)
+ .on('focus', 'input', (event) => {
+ let $inputs = $(event.currentTarget).closest('form').find('input').not('[type=file]')
+ focused = setInterval(() => {
+ $inputs.each((index, element) => {
+ let $element = $(element)
+ if ($element.val() !== $element.attr('value')) {
+ $element.trigger('change')
+ }
+ })
+ }, 100)
+ })
+ .on('blur', '.form-group input', () => {
+ clearInterval(focused)
+ })
+ }
+
+ // ------------------------------------------------------------------------
+ // static
+ static _jQueryInterface(config) {
+ return this.each(function () {
+ let $element = $(this)
+ let data = $element.data(DATA_KEY)
+
+ if (!data) {
+ data = new Autofill($element, config)
+ $element.data(DATA_KEY, data)
+ }
+ })
+ }
+ }
+
+ /**
+ * ------------------------------------------------------------------------
+ * jQuery
+ * ------------------------------------------------------------------------
+ */
+ $.fn[JQUERY_NAME] = Autofill._jQueryInterface
+ $.fn[JQUERY_NAME].Constructor = Autofill
+ $.fn[JQUERY_NAME].noConflict = () => {
+ $.fn[JQUERY_NAME] = JQUERY_NO_CONFLICT
+ return Autofill._jQueryInterface
+ }
+
+ return Autofill
+
+})(jQuery)
+
+export default Autofill
diff --git a/templates/assets/bootstrap-material-design/js/base.js b/templates/assets/bootstrap-material-design/js/base.js
new file mode 100644
index 0000000..283b976
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/js/base.js
@@ -0,0 +1,88 @@
+import Util from './util'
+
+const Base = (($) => {
+
+ const ClassName = {
+ BMD_FORM_GROUP: 'bmd-form-group',
+ IS_FILLED: 'is-filled',
+ IS_FOCUSED: 'is-focused'
+ }
+
+ const Selector = {
+ BMD_FORM_GROUP: `.${ClassName.BMD_FORM_GROUP}`
+ }
+
+ const Default = {}
+
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+ class Base {
+
+ /**
+ *
+ * @param element
+ * @param config
+ * @param properties - anything that needs to be set as this[key] = value. Works around the need to call `super` before using `this`
+ */
+ constructor($element, config, properties = {}) {
+ this.$element = $element
+ this.config = $.extend(true, {}, Default, config)
+
+ // set properties for use in the constructor initialization
+ for (let key in properties) {
+ this[key] = properties[key]
+ }
+ }
+
+ dispose(dataKey) {
+ this.$element.data(dataKey, null)
+ this.$element = null
+ this.config = null
+ }
+
+ // ------------------------------------------------------------------------
+ // protected
+
+ addFormGroupFocus() {
+ if (!this.$element.prop('disabled')) {
+ this.$bmdFormGroup.addClass(ClassName.IS_FOCUSED)
+ }
+ }
+
+ removeFormGroupFocus() {
+ this.$bmdFormGroup.removeClass(ClassName.IS_FOCUSED)
+ }
+
+ removeIsFilled() {
+ this.$bmdFormGroup.removeClass(ClassName.IS_FILLED)
+ }
+
+ addIsFilled() {
+ this.$bmdFormGroup.addClass(ClassName.IS_FILLED)
+ }
+
+ // Find bmd-form-group
+ findMdbFormGroup(raiseError = true) {
+ let mfg = this.$element.closest(Selector.BMD_FORM_GROUP)
+ if (mfg.length === 0 && raiseError) {
+ $.error(`Failed to find ${Selector.BMD_FORM_GROUP} for ${Util.describe(this.$element)}`)
+ }
+ return mfg
+ }
+
+ // ------------------------------------------------------------------------
+ // private
+
+ // ------------------------------------------------------------------------
+ // static
+
+ }
+
+ return Base
+
+})(jQuery)
+
+export default Base
diff --git a/templates/assets/bootstrap-material-design/js/baseFormControl.js b/templates/assets/bootstrap-material-design/js/baseFormControl.js
new file mode 100644
index 0000000..8481070
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/js/baseFormControl.js
@@ -0,0 +1,36 @@
+import BaseInput from './baseInput'
+
+const BaseFormControl = (($) => {
+
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+ const Default = {
+ requiredClasses: ['form-control']
+ }
+
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+ class BaseFormControl extends BaseInput {
+
+ constructor($element, config) {
+ super($element, $.extend(true, Default, config))
+
+ // Initially mark as empty
+ if (this.isEmpty()) {
+ this.removeIsFilled()
+ }
+ }
+ }
+
+
+ return BaseFormControl
+
+})(jQuery)
+
+export default BaseFormControl
diff --git a/templates/assets/bootstrap-material-design/js/baseInput.js b/templates/assets/bootstrap-material-design/js/baseInput.js
new file mode 100644
index 0000000..5396ccb
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/js/baseInput.js
@@ -0,0 +1,321 @@
+import Base from './base'
+import Util from './util'
+
+const BaseInput = (($) => {
+
+ const ClassName = {
+ FORM_GROUP: 'form-group',
+ BMD_FORM_GROUP: 'bmd-form-group',
+ BMD_LABEL: 'bmd-label',
+ BMD_LABEL_STATIC: 'bmd-label-static',
+ BMD_LABEL_PLACEHOLDER: 'bmd-label-placeholder',
+ BMD_LABEL_FLOATING: 'bmd-label-floating',
+ HAS_DANGER: 'has-danger',
+ IS_FILLED: 'is-filled',
+ IS_FOCUSED: 'is-focused',
+ INPUT_GROUP: 'input-group'
+ }
+
+ const Selector = {
+ FORM_GROUP: `.${ClassName.FORM_GROUP}`,
+ BMD_FORM_GROUP: `.${ClassName.BMD_FORM_GROUP}`,
+ BMD_LABEL_WILDCARD: `label[class^='${ClassName.BMD_LABEL}'], label[class*=' ${ClassName.BMD_LABEL}']` // match any label variant if specified
+ }
+
+ const Default = {
+ validate: false,
+ formGroup: {
+ required: false
+ },
+ bmdFormGroup: {
+ template: `<span class='${ClassName.BMD_FORM_GROUP}'></span>`,
+ create: true, // create a wrapper if form-group not found
+ required: true // not recommended to turn this off, only used for inline components
+ },
+ label: {
+ required: false,
+
+ // Prioritized find order for resolving the label to be used as an bmd-label if not specified in the markup
+ // - a function(thisComponent); or
+ // - a string selector used like $bmdFormGroup.find(selector)
+ //
+ // Note this only runs if $bmdFormGroup.find(Selector.BMD_LABEL_WILDCARD) fails to find a label (as authored in the markup)
+ //
+ selectors: [
+ `.form-control-label`, // in the case of horizontal or inline forms, this will be marked
+ `> label` // usual case for text inputs, first child. Deeper would find toggle labels so don't do that.
+ ],
+ className: ClassName.BMD_LABEL_STATIC
+ },
+ requiredClasses: [],
+ invalidComponentMatches: [],
+ convertInputSizeVariations: true
+ }
+
+ const FormControlSizeMarkers = {
+ 'form-control-lg': 'bmd-form-group-lg',
+ 'form-control-sm': 'bmd-form-group-sm'
+ }
+
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+ class BaseInput extends Base {
+
+ /**
+ *
+ * @param element
+ * @param config
+ * @param properties - anything that needs to be set as this[key] = value. Works around the need to call `super` before using `this`
+ */
+ constructor($element, config, properties = {}) {
+ super($element, $.extend(true, {}, Default, config), properties)
+
+ // Enforce no overlap between components to prevent side effects
+ this._rejectInvalidComponentMatches()
+
+ // Enforce expected structure (if any)
+ this.rejectWithoutRequiredStructure()
+
+ // Enforce required classes for a consistent rendering
+ this._rejectWithoutRequiredClasses()
+
+ // Resolve the form-group first, it will be used for bmd-form-group if possible
+ // note: different components have different rules
+ this.$formGroup = this.findFormGroup(this.config.formGroup.required)
+
+ // Will add bmd-form-group to form-group or create an bmd-form-group
+ // Performance Note: for those forms that are really performance driven, create the markup with the .bmd-form-group to avoid
+ // rendering changes once added.
+ this.$bmdFormGroup = this.resolveMdbFormGroup()
+
+ // Resolve and mark the bmdLabel if necessary as defined by the config
+ this.$bmdLabel = this.resolveMdbLabel()
+
+ // Signal to the bmd-form-group that a form-control-* variation is being used
+ this.resolveMdbFormGroupSizing()
+
+ this.addFocusListener()
+ this.addChangeListener()
+
+ if(this.$element.val() != ''){
+ this.addIsFilled()
+ }
+ }
+
+ dispose(dataKey) {
+ super.dispose(dataKey)
+ this.$bmdFormGroup = null
+ this.$formGroup = null
+ }
+
+ // ------------------------------------------------------------------------
+ // protected
+
+ rejectWithoutRequiredStructure() {
+ // implement
+ }
+
+ addFocusListener() {
+ this.$element
+ .on('focus', () => {
+ this.addFormGroupFocus()
+ })
+ .on('blur', () => {
+ this.removeFormGroupFocus()
+ })
+ }
+
+ addChangeListener() {
+ this.$element
+ .on('keydown paste', (event) => {
+ if (Util.isChar(event)) {
+ this.addIsFilled()
+ }
+ })
+ .on('keyup change', () => {
+
+ // make sure empty is added back when there is a programmatic value change.
+ // NOTE: programmatic changing of value using $.val() must trigger the change event i.e. $.val('x').trigger('change')
+ if (this.isEmpty()) {
+ this.removeIsFilled()
+ } else {
+ this.addIsFilled()
+ }
+
+ if (this.config.validate) {
+ // Validation events do not bubble, so they must be attached directly to the text: http://jsfiddle.net/PEpRM/1/
+ // Further, even the bind method is being caught, but since we are already calling #checkValidity here, just alter
+ // the form-group on change.
+ //
+ // NOTE: I'm not sure we should be intervening regarding validation, this seems better as a README and snippet of code.
+ // BUT, I've left it here for backwards compatibility.
+ let isValid = (typeof this.$element[0].checkValidity === 'undefined' || this.$element[0].checkValidity())
+ if (isValid) {
+ this.removeHasDanger()
+ } else {
+ this.addHasDanger()
+ }
+ }
+ })
+ }
+
+ addHasDanger() {
+ this.$bmdFormGroup.addClass(ClassName.HAS_DANGER)
+ }
+
+ removeHasDanger() {
+ this.$bmdFormGroup.removeClass(ClassName.HAS_DANGER)
+ }
+
+ isEmpty() {
+ return (this.$element.val() === null || this.$element.val() === undefined || this.$element.val() === '')
+ }
+
+ // Will add bmd-form-group to form-group or create a bmd-form-group if necessary
+ resolveMdbFormGroup() {
+ let mfg = this.findMdbFormGroup(false)
+ if (mfg === undefined || mfg.length === 0) {
+ if (this.config.bmdFormGroup.create && (this.$formGroup === undefined || this.$formGroup.length === 0)) {
+ // If a form-group doesn't exist (not recommended), take a guess and wrap the element (assuming no label).
+ // note: it's possible to make this smarter, but I need to see valid cases before adding any complexity.
+
+ // this may be an input-group, wrap that instead
+ if(this.outerElement().parent().hasClass(ClassName.INPUT_GROUP)){
+ this.outerElement().parent().wrap(this.config.bmdFormGroup.template)
+ }
+ else{
+ this.outerElement().wrap(this.config.bmdFormGroup.template)
+ }
+ } else {
+ // a form-group does exist, add our marker class to it
+ this.$formGroup.addClass(ClassName.BMD_FORM_GROUP)
+
+ // OLD: may want to implement this after all, see how the styling turns out, but using an existing form-group is less manipulation of the dom and therefore preferable
+ // A form-group does exist, so add an bmd-form-group wrapping it's internal contents
+ //fg.wrapInner(this.config.bmdFormGroup.template)
+ }
+
+ mfg = this.findMdbFormGroup(this.config.bmdFormGroup.required)
+ }
+
+ return mfg
+ }
+
+ // Demarcation element (e.g. first child of a form-group)
+ // Subclasses such as file inputs may have different structures
+ outerElement() {
+ return this.$element
+ }
+
+ // Will add bmd-label to bmd-form-group if not already specified
+ resolveMdbLabel() {
+
+ let label = this.$bmdFormGroup.find(Selector.BMD_LABEL_WILDCARD)
+ if (label === undefined || label.length === 0) {
+ // we need to find it based on the configured selectors
+ label = this.findMdbLabel(this.config.label.required)
+
+ if (label === undefined || label.length === 0) {
+ // no label found, and finder did not require one
+ } else {
+ // a candidate label was found, add the configured default class name
+ label.addClass(this.config.label.className)
+ }
+ }
+
+ return label
+ }
+
+ // Find bmd-label variant based on the config selectors
+ findMdbLabel(raiseError = true) {
+ let label = null
+
+ // use the specified selector order
+ for (let selector of this.config.label.selectors) {
+ if ($.isFunction(selector)) {
+ label = selector(this)
+ } else {
+ label = this.$bmdFormGroup.find(selector)
+ }
+
+ if (label !== undefined && label.length > 0) {
+ break
+ }
+ }
+
+ if (label.length === 0 && raiseError) {
+ $.error(`Failed to find ${Selector.BMD_LABEL_WILDCARD} within form-group for ${Util.describe(this.$element)}`)
+ }
+ return label
+ }
+
+ // Find bmd-form-group
+ findFormGroup(raiseError = true) {
+ let fg = this.$element.closest(Selector.FORM_GROUP)
+ if (fg.length === 0 && raiseError) {
+ $.error(`Failed to find ${Selector.FORM_GROUP} for ${Util.describe(this.$element)}`)
+ }
+ return fg
+ }
+
+ // Due to the interconnected nature of labels/inputs/help-blocks, signal the bmd-form-group-* size variation based on
+ // a found form-control-* size
+ resolveMdbFormGroupSizing() {
+ if (!this.config.convertInputSizeVariations) {
+ return
+ }
+
+ // Modification - Change text-sm/lg to form-group-sm/lg instead (preferred standard and simpler css/less variants)
+ for (let inputSize in FormControlSizeMarkers) {
+ if (this.$element.hasClass(inputSize)) {
+ //this.$element.removeClass(inputSize)
+ this.$bmdFormGroup.addClass(FormControlSizeMarkers[inputSize])
+ }
+ }
+ }
+
+ // ------------------------------------------------------------------------
+ // private
+ _rejectInvalidComponentMatches() {
+ for (let otherComponent of this.config.invalidComponentMatches) {
+ otherComponent.rejectMatch(this.constructor.name, this.$element)
+ }
+ }
+
+ _rejectWithoutRequiredClasses() {
+ for (let requiredClass of this.config.requiredClasses) {
+
+ let found = false
+ // allow one of several classes to be passed in x||y
+ if (requiredClass.indexOf('||') !== -1) {
+ let oneOf = requiredClass.split('||')
+ for (let requiredClass of oneOf) {
+ if (this.$element.hasClass(requiredClass)) {
+ found = true
+ break
+ }
+ }
+ } else if (this.$element.hasClass(requiredClass)) {
+ found = true
+ }
+
+ // error if not found
+ if (!found) {
+ $.error(`${this.constructor.name} element: ${Util.describe(this.$element)} requires class: ${requiredClass}`)
+ }
+ }
+ }
+
+ // ------------------------------------------------------------------------
+ // static
+
+ }
+
+ return BaseInput
+
+})(jQuery)
+
+export default BaseInput
diff --git a/templates/assets/bootstrap-material-design/js/baseLayout.js b/templates/assets/bootstrap-material-design/js/baseLayout.js
new file mode 100644
index 0000000..8dc87ed
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/js/baseLayout.js
@@ -0,0 +1,122 @@
+import Base from './base'
+import Util from './util'
+
+const BaseLayout = (($) => {
+
+ const ClassName = {
+ CANVAS: 'bmd-layout-canvas',
+ CONTAINER: 'bmd-layout-container',
+ BACKDROP: `bmd-layout-backdrop`
+ }
+
+ const Selector = {
+ CANVAS: `.${ClassName.CANVAS}`,
+ CONTAINER: `.${ClassName.CONTAINER}`,
+ BACKDROP: `.${ClassName.BACKDROP}`
+ }
+
+ const Default = {
+ canvas: {
+ create: true,
+ required: true,
+ template: `<div class="${ClassName.CANVAS}"></div>`
+ },
+ backdrop: {
+ create: true,
+ required: true,
+ template: `<div class="${ClassName.BACKDROP}"></div>`
+ }
+ }
+
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+ class BaseLayout extends Base {
+
+ constructor($element, config, properties = {}) {
+ super($element, $.extend(true, {}, Default, config), properties)
+
+ this.$container = this.findContainer(true)
+ this.$backdrop = this.resolveBackdrop()
+ this.resolveCanvas();
+ }
+
+ dispose(dataKey) {
+ super.dispose(dataKey)
+ this.$container = null
+ this.$backdrop = null
+ }
+
+ // ------------------------------------------------------------------------
+ // protected
+
+ // Will wrap container in bmd-layout-canvas if necessary
+ resolveCanvas() {
+ let bd = this.findCanvas(false)
+ if (bd === undefined || bd.length === 0) {
+ if (this.config.canvas.create) {
+ this.$container.wrap(this.config.canvas.template)
+ }
+
+ bd = this.findCanvas(this.config.canvas.required)
+ }
+
+ return bd
+ }
+
+ // Find closest bmd-layout-container based on the given context
+ findCanvas(raiseError = true, context = this.$container) {
+ let canvas = context.closest(Selector.CANVAS)
+ if (canvas.length === 0 && raiseError) {
+ $.error(`Failed to find ${Selector.CANVAS} for ${Util.describe(context)}`)
+ }
+ return canvas
+ }
+
+ // Will add bmd-layout-backdrop to bmd-layout-container if necessary
+ resolveBackdrop() {
+ let bd = this.findBackdrop(false)
+ if (bd === undefined || bd.length === 0) {
+ if (this.config.backdrop.create) {
+ this.$container.append(this.config.backdrop.template)
+ }
+
+ bd = this.findBackdrop(this.config.backdrop.required)
+ }
+
+ return bd
+ }
+
+ // Find closest bmd-layout-container based on the given context
+ findBackdrop(raiseError = true, context = this.$container) {
+ let backdrop = context.find(`> ${Selector.BACKDROP}`)
+ if (backdrop.length === 0 && raiseError) {
+ $.error(`Failed to find ${Selector.BACKDROP} for ${Util.describe(context)}`)
+ }
+ return backdrop
+ }
+
+ // Find closest bmd-layout-container based on the given context
+ findContainer(raiseError = true, context = this.$element) {
+ let container = context.closest(Selector.CONTAINER)
+ if (container.length === 0 && raiseError) {
+ $.error(`Failed to find ${Selector.CONTAINER} for ${Util.describe(context)}`)
+ }
+ return container
+ }
+
+ // ------------------------------------------------------------------------
+ // private
+
+ // ------------------------------------------------------------------------
+ // static
+
+ }
+
+ return BaseLayout
+
+})(jQuery)
+
+export default BaseLayout
diff --git a/templates/assets/bootstrap-material-design/js/baseSelection.js b/templates/assets/bootstrap-material-design/js/baseSelection.js
new file mode 100644
index 0000000..765d1c3
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/js/baseSelection.js
@@ -0,0 +1,93 @@
+import BaseInput from './baseInput'
+import Util from './util'
+
+const BaseSelection = (($) => {
+
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+ const Default = {
+ label: {
+ required: false
+
+ // Prioritized find order for resolving the label to be used as an bmd-label if not specified in the markup
+ // - a function(thisComponent); or
+ // - a string selector used like $bmdFormGroup.find(selector)
+ //
+ // Note this only runs if $bmdFormGroup.find(Selector.BMD_LABEL_WILDCARD) fails to find a label (as authored in the markup)
+ //
+ //selectors: [
+ // `.form-control-label`, // in the case of horizontal or inline forms, this will be marked
+ // `> label` // usual case for text inputs
+ //]
+ }
+ }
+
+ const Selector = {
+ LABEL: 'label'
+ }
+
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+ class BaseSelection extends BaseInput {
+
+ constructor($element, config, properties) {
+ // properties = {inputType: checkbox, outerClass: checkbox-inline}
+ // '.checkbox|switch|radio > label > input[type=checkbox|radio]'
+ // '.${this.outerClass} > label > input[type=${this.inputType}]'
+
+ super($element, $.extend(true, {}, Default, config), properties)
+ this.decorateMarkup()
+ }
+
+ // ------------------------------------------------------------------------
+ // protected
+
+ decorateMarkup() {
+ this.$element.after(this.config.template)
+ }
+
+ // Demarcation element (e.g. first child of a form-group)
+ outerElement() {
+ // .checkbox|switch|radio > label > input[type=checkbox|radio]
+ // label.checkbox-inline > input[type=checkbox|radio]
+ // .${this.outerClass} > label > input[type=${this.inputType}]
+ return this.$element.parent().closest(`.${this.outerClass}`)
+ }
+
+ rejectWithoutRequiredStructure() {
+ // '.checkbox|switch|radio > label > input[type=checkbox|radio]'
+ // '.${this.outerClass} > label > input[type=${this.inputType}]'
+ Util.assert(this.$element, !this.$element.parent().prop('tagName') === 'label', `${this.constructor.name}'s ${Util.describe(this.$element)} parent element should be <label>.`)
+ Util.assert(this.$element, !this.outerElement().hasClass(this.outerClass), `${this.constructor.name}'s ${Util.describe(this.$element)} outer element should have class ${this.outerClass}.`)
+ }
+
+ addFocusListener() {
+ // checkboxes didn't appear to bubble to the document, so we'll bind these directly
+ this.$element.closest(Selector.LABEL).hover(() => {
+ this.addFormGroupFocus()
+ }, () => {
+ this.removeFormGroupFocus()
+ })
+ }
+
+ addChangeListener() {
+ this.$element.change(() => {
+ this.$element.blur()
+ })
+ }
+
+ // ------------------------------------------------------------------------
+ // private
+ }
+
+ return BaseSelection
+
+})(jQuery)
+
+export default BaseSelection
diff --git a/templates/assets/bootstrap-material-design/js/bootstrapMaterialDesign.js b/templates/assets/bootstrap-material-design/js/bootstrapMaterialDesign.js
new file mode 100644
index 0000000..b3be531
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/js/bootstrapMaterialDesign.js
@@ -0,0 +1,205 @@
+/**
+ * $.bootstrapMaterialDesign(config) is a macro class to configure the components generally
+ * used in Bootstrap Material Design. You may pass overrides to the configurations
+ * which will be passed into each component, or you may omit use of this class and
+ * configure each component separately.
+ */
+const BootstrapMaterialDesign = (($) => {
+
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+ const NAME = 'bootstrapMaterialDesign'
+ const DATA_KEY = `bmd.${NAME}`
+ const JQUERY_NAME = NAME // retain this full name since it is long enough not to conflict
+ const JQUERY_NO_CONFLICT = $.fn[JQUERY_NAME]
+
+ /**
+ * Global configuration:
+ * The global configuration hash will be mixed in to each components' config.
+ * e.g. calling $.bootstrapMaterialDesign({global: { validate: true } }) would pass `validate:true` to every component
+ *
+ *
+ * Component configuration:
+ * - selector: may be a string or an array. Any array will be joined with a comma to generate the selector
+ * - disable any component by defining it as false with an override. e.g. $.bootstrapMaterialDesign({ autofill: false })
+ *
+ * @see each individual component for more configuration settings.
+ */
+ const Default = {
+ global: {
+ validate: false,
+ label: {
+ className: 'bmd-label-static' // default style of label to be used if not specified in the html markup
+ }
+ },
+ autofill: {
+ selector: 'body'
+ },
+ checkbox: {
+ selector: '.checkbox > label > input[type=checkbox]'
+ },
+ checkboxInline: {
+ selector: 'label.checkbox-inline > input[type=checkbox]'
+ },
+ collapseInline: {
+ selector: '.bmd-collapse-inline [data-toggle="collapse"]'
+ },
+ drawer: {
+ selector: '.bmd-layout-drawer'
+ },
+ file: {
+ selector: 'input[type=file]'
+ },
+ radio: {
+ selector: '.radio > label > input[type=radio]'
+ },
+ radioInline: {
+ selector: 'label.radio-inline > input[type=radio]'
+ },
+ ripples: {
+ //selector: ['.btn:not(.btn-link):not(.ripple-none)'] // testing only
+ selector: [
+ '.btn:not(.btn-link):not(.ripple-none)',
+ '.card-image:not(.ripple-none)',
+ '.navbar a:not(.ripple-none)',
+ '.dropdown-menu a:not(.ripple-none)',
+ '.nav-tabs a:not(.ripple-none)',
+ '.pagination li:not(.active):not(.disabled) a:not(.ripple-none)',
+ '.ripple' // generic marker class to add ripple to elements
+ ]
+ },
+ select: {
+ selector: ['select']
+ },
+ switch: {
+ selector: '.switch > label > input[type=checkbox]'
+ },
+ text: {
+ // omit inputs we have specialized components to handle - we need to match text, email, etc. The easiest way to do this appears to be just omit the ones we don't want to match and let the rest fall through to this.
+ selector: [`input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=file]):not([type=button]):not([type=submit]):not([type=reset])`]
+ },
+ textarea: {
+ selector: ['textarea']
+ },
+ arrive: true,
+ // create an ordered component list for instantiation
+ instantiation: [
+ 'ripples',
+ 'checkbox',
+ 'checkboxInline',
+ 'collapseInline',
+ 'drawer',
+ //'file',
+ 'radio',
+ 'radioInline',
+ 'switch',
+ 'text',
+ 'textarea',
+ 'select',
+ 'autofill'
+ ]
+ }
+
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+ class BootstrapMaterialDesign {
+
+ constructor($element, config) {
+ this.$element = $element
+ this.config = $.extend(true, {}, Default, config)
+ let $document = $(document)
+
+ for (let component of this.config.instantiation) {
+
+ // the component's config fragment is passed in directly, allowing users to override
+ let componentConfig = this.config[component]
+
+ // check to make sure component config is enabled (not `false`)
+ if (componentConfig) {
+
+ // assemble the selector as it may be an array
+ let selector = this._resolveSelector(componentConfig)
+
+ // mix in global options
+ componentConfig = $.extend(true, {}, this.config.global, componentConfig)
+
+ // create the jquery fn name e.g. 'bmdText' for 'text'
+ let componentName = `${component.charAt(0).toUpperCase() + component.slice(1)}`
+ let jqueryFn = `bmd${componentName}`
+
+ try {
+ // safely instantiate component on selector elements with config, report errors and move on.
+ // console.debug(`instantiating: $('${selector}')[${jqueryFn}](${componentConfig})`) // eslint-disable-line no-console
+ $(selector)[jqueryFn](componentConfig)
+
+ // add to arrive if present and enabled
+ if (document.arrive && this.config.arrive) {
+ $document.arrive(selector, function(){ // eslint-disable-line no-loop-func
+ $(this)[jqueryFn](componentConfig)
+ })
+ }
+ } catch (e) {
+ let message = `Failed to instantiate component: $('${selector}')[${jqueryFn}](${componentConfig})`
+ console.error(message, e, `\nSelected elements: `, $(selector)) // eslint-disable-line no-console
+ throw e
+ }
+ }
+ }
+ }
+
+ dispose() {
+ this.$element.data(DATA_KEY, null)
+ this.$element = null
+ this.config = null
+ }
+
+ // ------------------------------------------------------------------------
+ // private
+
+ _resolveSelector(componentConfig) {
+ let selector = componentConfig.selector
+ if (Array.isArray(selector)) {
+ selector = selector.join(', ')
+ }
+
+ return selector
+ }
+
+ // ------------------------------------------------------------------------
+ // static
+ static _jQueryInterface(config) {
+ return this.each(function () {
+ let $element = $(this)
+ let data = $element.data(DATA_KEY)
+
+ if (!data) {
+ data = new BootstrapMaterialDesign($element, config)
+ $element.data(DATA_KEY, data)
+ }
+ })
+ }
+ }
+
+ /**
+ * ------------------------------------------------------------------------
+ * jQuery
+ * ------------------------------------------------------------------------
+ */
+ $.fn[JQUERY_NAME] = BootstrapMaterialDesign._jQueryInterface
+ $.fn[JQUERY_NAME].Constructor = BootstrapMaterialDesign
+ $.fn[JQUERY_NAME].noConflict = () => {
+ $.fn[JQUERY_NAME] = JQUERY_NO_CONFLICT
+ return BootstrapMaterialDesign._jQueryInterface
+ }
+
+ return BootstrapMaterialDesign
+
+})(jQuery)
+
+export default BootstrapMaterialDesign
diff --git a/templates/assets/bootstrap-material-design/js/checkbox.js b/templates/assets/bootstrap-material-design/js/checkbox.js
new file mode 100644
index 0000000..9b93f40
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/js/checkbox.js
@@ -0,0 +1,94 @@
+import BaseSelection from './baseSelection'
+//import Text from './text'
+//import File from './file'
+//import Radio from './radio'
+//import Textarea from './textarea'
+//import Select from './select'
+import Util from './util'
+
+const Checkbox = (($) => {
+
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+ const NAME = 'checkbox'
+ const DATA_KEY = `bmd.${NAME}`
+ const JQUERY_NAME = `bmd${NAME.charAt(0).toUpperCase() + NAME.slice(1)}`
+ const JQUERY_NO_CONFLICT = $.fn[JQUERY_NAME]
+
+ const Default = {
+ template: `<span class='checkbox-decorator'><span class='check'></span></span>`
+ }
+
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+ class Checkbox extends BaseSelection {
+
+ constructor($element, config, properties = {inputType: NAME, outerClass: NAME}) {
+ super($element, $.extend(true,
+ //{invalidComponentMatches: [File, Radio, Text, Textarea, Select]},
+ Default, config), properties)
+ }
+
+ dispose(dataKey = DATA_KEY) {
+ super.dispose(dataKey)
+ }
+
+ static matches($element) {
+ // '.checkbox > label > input[type=checkbox]'
+ if ($element.attr('type') === 'checkbox') {
+ return true
+ }
+ return false
+ }
+
+ static rejectMatch(component, $element) {
+ Util.assert(this.$element, this.matches($element), `${component} component element ${Util.describe($element)} is invalid for type='checkbox'.`)
+ }
+
+ // ------------------------------------------------------------------------
+ // protected
+
+ // ------------------------------------------------------------------------
+ // protected
+
+ // ------------------------------------------------------------------------
+ // private
+
+ // ------------------------------------------------------------------------
+ // static
+ static _jQueryInterface(config) {
+ return this.each(function () {
+ let $element = $(this)
+ let data = $element.data(DATA_KEY)
+
+ if (!data) {
+ data = new Checkbox($element, config)
+ $element.data(DATA_KEY, data)
+ }
+ })
+ }
+ }
+
+ /**
+ * ------------------------------------------------------------------------
+ * jQuery
+ * ------------------------------------------------------------------------
+ */
+ $.fn[JQUERY_NAME] = Checkbox._jQueryInterface
+ $.fn[JQUERY_NAME].Constructor = Checkbox
+ $.fn[JQUERY_NAME].noConflict = () => {
+ $.fn[JQUERY_NAME] = JQUERY_NO_CONFLICT
+ return Checkbox._jQueryInterface
+ }
+
+ return Checkbox
+
+})(jQuery)
+
+export default Checkbox
diff --git a/templates/assets/bootstrap-material-design/js/checkboxInline.js b/templates/assets/bootstrap-material-design/js/checkboxInline.js
new file mode 100644
index 0000000..4ad32d0
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/js/checkboxInline.js
@@ -0,0 +1,89 @@
+import Checkbox from './checkbox'
+
+const CheckboxInline = (($) => {
+
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+ const NAME = 'checkboxInline'
+ const DATA_KEY = `bmd.${NAME}`
+ const JQUERY_NAME = `bmd${NAME.charAt(0).toUpperCase() + NAME.slice(1)}`
+ const JQUERY_NO_CONFLICT = $.fn[JQUERY_NAME]
+
+ const Default = {
+ bmdFormGroup: {
+ create: false, // no bmd-form-group creation if form-group not present. It messes with the layout.
+ required: false
+ }
+ }
+
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+ class CheckboxInline extends Checkbox {
+
+ constructor($element, config, properties = {inputType: 'checkbox', outerClass: 'checkbox-inline'}) {
+ super($element, $.extend(true, {}, Default, config), properties)
+ }
+
+ dispose() {
+ super.dispose(DATA_KEY)
+ }
+
+ //static matches($element) {
+ // // '.checkbox-inline > input[type=checkbox]'
+ // if ($element.attr('type') === 'checkbox') {
+ // return true
+ // }
+ // return false
+ //}
+ //
+ //static rejectMatch(component, $element) {
+ // Util.assert(this.$element, this.matches($element), `${component} component element ${Util.describe($element)} is invalid for type='checkbox'.`)
+ //}
+
+ // ------------------------------------------------------------------------
+ // protected
+
+ // ------------------------------------------------------------------------
+ // protected
+
+ // ------------------------------------------------------------------------
+ // private
+
+ // ------------------------------------------------------------------------
+ // static
+ static _jQueryInterface(config) {
+ return this.each(function () {
+ let $element = $(this)
+ let data = $element.data(DATA_KEY)
+
+ if (!data) {
+ data = new CheckboxInline($element, config)
+ $element.data(DATA_KEY, data)
+ }
+ })
+ }
+ }
+
+ /**
+ * ------------------------------------------------------------------------
+ * jQuery
+ * ------------------------------------------------------------------------
+ */
+ $.fn[JQUERY_NAME] = CheckboxInline._jQueryInterface
+ $.fn[JQUERY_NAME].Constructor = CheckboxInline
+ $.fn[JQUERY_NAME].noConflict = () => {
+ $.fn[JQUERY_NAME] = JQUERY_NO_CONFLICT
+ return CheckboxInline._jQueryInterface
+ }
+
+ return CheckboxInline
+
+})(jQuery)
+
+export default CheckboxInline
diff --git a/templates/assets/bootstrap-material-design/js/collapseInline.js b/templates/assets/bootstrap-material-design/js/collapseInline.js
new file mode 100644
index 0000000..10d813f
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/js/collapseInline.js
@@ -0,0 +1,113 @@
+import Base from './base'
+import Util from './util'
+
+const CollapseInline = (($) => {
+
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+ const NAME = 'collapseInline'
+ const DATA_KEY = `bmd.${NAME}`
+ const JQUERY_NAME = `bmd${NAME.charAt(0).toUpperCase() + NAME.slice(1)}`
+ const JQUERY_NO_CONFLICT = $.fn[JQUERY_NAME]
+
+ const Selector = {
+ ANY_INPUT: 'input, select, textarea'
+ }
+
+ const ClassName = {
+ IN: 'in',
+ COLLAPSE: 'collapse',
+ COLLAPSING: 'collapsing',
+ COLLAPSED: 'collapsed',
+ WIDTH: 'width'
+ }
+ const Default = {}
+
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+ class CollapseInline extends Base {
+
+ // $element is expected to be the trigger
+ // i.e. <button class="btn bmd-btn-icon" for="search" data-toggle="collapse" data-target="#search-field" aria-expanded="false" aria-controls="search-field">
+ constructor($element, config) {
+ super($element, $.extend(true, {}, Default, config))
+ this.$bmdFormGroup = this.findMdbFormGroup(true)
+
+ let collapseSelector = $element.data('target')
+ this.$collapse = $(collapseSelector)
+
+ Util.assert($element, this.$collapse.length === 0, `Cannot find collapse target for ${Util.describe($element)}`)
+ Util.assert(this.$collapse, !this.$collapse.hasClass(ClassName.COLLAPSE), `${Util.describe(this.$collapse)} is expected to have the '${ClassName.COLLAPSE}' class. It is being targeted by ${Util.describe($element)}`)
+
+ // find the first input for focusing
+ let $inputs = this.$bmdFormGroup.find(Selector.ANY_INPUT)
+ if ($inputs.length > 0) {
+ this.$input = $inputs.first()
+ }
+
+ // automatically add the marker class to collapse width instead of height - nice convenience because it is easily forgotten
+ if (!this.$collapse.hasClass(ClassName.WIDTH)) {
+ this.$collapse.addClass(ClassName.WIDTH)
+ }
+
+ if (this.$input) {
+ // add a listener to set focus
+ this.$collapse.on('shown.bs.collapse', () => {
+ this.$input.focus()
+ })
+
+ // add a listener to collapse field
+ this.$input.blur(() => {
+ this.$collapse.collapse('hide')
+ })
+ }
+ }
+
+ dispose() {
+ super.dispose(DATA_KEY)
+ this.$bmdFormGroup = null
+ this.$collapse = null
+ this.$input = null
+ }
+
+ // ------------------------------------------------------------------------
+ // private
+
+ // ------------------------------------------------------------------------
+ // static
+ static _jQueryInterface(config) {
+ return this.each(function () {
+ let $element = $(this)
+ let data = $element.data(DATA_KEY)
+
+ if (!data) {
+ data = new CollapseInline($element, config)
+ $element.data(DATA_KEY, data)
+ }
+ })
+ }
+ }
+
+ /**
+ * ------------------------------------------------------------------------
+ * jQuery
+ * ------------------------------------------------------------------------
+ */
+ $.fn[JQUERY_NAME] = CollapseInline._jQueryInterface
+ $.fn[JQUERY_NAME].Constructor = CollapseInline
+ $.fn[JQUERY_NAME].noConflict = () => {
+ $.fn[JQUERY_NAME] = JQUERY_NO_CONFLICT
+ return CollapseInline._jQueryInterface
+ }
+
+ return CollapseInline
+
+})(jQuery)
+
+export default CollapseInline
diff --git a/templates/assets/bootstrap-material-design/js/drawer.js b/templates/assets/bootstrap-material-design/js/drawer.js
new file mode 100644
index 0000000..ef0586e
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/js/drawer.js
@@ -0,0 +1,170 @@
+import BaseLayout from './baseLayout'
+
+const Drawer = (($) => {
+
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+ const NAME = 'drawer'
+ const DATA_KEY = `bmd.${NAME}`
+ const JQUERY_NAME = `bmd${NAME.charAt(0).toUpperCase() + NAME.slice(1)}`
+ const JQUERY_NO_CONFLICT = $.fn[JQUERY_NAME]
+
+ const Keycodes = {
+ ESCAPE: 27
+ //ENTER: 13,
+ //SPACE: 32
+ }
+
+ const ClassName = {
+ IN: 'in',
+ DRAWER_IN: `bmd-drawer-in`,
+ DRAWER_OUT: `bmd-drawer-out`,
+ DRAWER: 'bmd-layout-drawer',
+ CONTAINER: 'bmd-layout-container'
+ }
+
+ const Default = {
+ focusSelector: `a, button, input`
+ }
+
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+ class Drawer extends BaseLayout {
+
+ // $element is expected to be the trigger
+ // i.e. <button class="btn bmd-btn-icon" for="search" data-toggle="drawer" data-target="#my-side-nav-drawer" aria-expanded="false" aria-controls="my-side-nav-drawer">
+ constructor($element, config) {
+ super($element, $.extend(true, {}, Default, config))
+
+ this.$toggles = $(`[data-toggle="drawer"][href="#${this.$element[0].id}"], [data-toggle="drawer"][data-target="#${this.$element[0].id}"]`)
+
+ this._addAria()
+
+ // click or escape on the backdrop closes the drawer
+ this.$backdrop.keydown((ev) => {
+ if (ev.which === Keycodes.ESCAPE) {
+ this.hide()
+ }
+ }).click(() => {
+ this.hide()
+ })
+
+ // escape on the drawer closes it
+ this.$element.keydown((ev) => {
+ if (ev.which === Keycodes.ESCAPE) {
+ this.hide()
+ }
+ })
+
+ // any toggle button clicks
+ this.$toggles.click(() => {
+ this.toggle()
+ })
+ }
+
+ dispose() {
+ super.dispose(DATA_KEY)
+ this.$toggles = null
+ }
+
+ toggle() {
+ if (this._isOpen()) {
+ this.hide()
+ } else {
+ this.show()
+ }
+ }
+
+ show() {
+ if (this._isForcedClosed() || this._isOpen()) {
+ return
+ }
+
+ this.$toggles.attr('aria-expanded', true)
+ this.$element.attr('aria-expanded', true)
+ this.$element.attr('aria-hidden', false)
+
+ // focus on the first focusable item
+ let $focusOn = this.$element.find(this.config.focusSelector)
+ if ($focusOn.length > 0) {
+ $focusOn.first().focus()
+ }
+
+ this.$container.addClass(ClassName.DRAWER_IN)
+ // backdrop is responsively styled based on bmd-drawer-overlay, therefore style is none of our concern, simply add the marker class and let the scss determine if it should be displayed or not.
+ this.$backdrop.addClass(ClassName.IN)
+ }
+
+ hide() {
+ if (!this._isOpen()) {
+ return
+ }
+
+ this.$toggles.attr('aria-expanded', false)
+ this.$element.attr('aria-expanded', false)
+ this.$element.attr('aria-hidden', true)
+
+ this.$container.removeClass(ClassName.DRAWER_IN)
+ this.$backdrop.removeClass(ClassName.IN)
+ }
+
+
+ // ------------------------------------------------------------------------
+ // private
+
+ _isOpen() {
+ return this.$container.hasClass(ClassName.DRAWER_IN)
+ }
+
+ _isForcedClosed() {
+ return this.$container.hasClass(ClassName.DRAWER_OUT)
+ }
+
+ _addAria() {
+ let isOpen = this._isOpen()
+ this.$element.attr('aria-expanded', isOpen)
+ this.$element.attr('aria-hidden', isOpen)
+
+ if (this.$toggles.length) {
+ this.$toggles.attr('aria-expanded', isOpen)
+ }
+ }
+
+ // ------------------------------------------------------------------------
+ // static
+ static _jQueryInterface(config) {
+ return this.each(function () {
+ let $element = $(this)
+ let data = $element.data(DATA_KEY)
+
+ if (!data) {
+ data = new Drawer($element, config)
+ $element.data(DATA_KEY, data)
+ }
+ })
+ }
+ }
+
+ /**
+ * ------------------------------------------------------------------------
+ * jQuery
+ * ------------------------------------------------------------------------
+ */
+ $.fn[JQUERY_NAME] = Drawer._jQueryInterface
+ $.fn[JQUERY_NAME].Constructor = Drawer
+ $.fn[JQUERY_NAME].noConflict = () => {
+ $.fn[JQUERY_NAME] = JQUERY_NO_CONFLICT
+ return Drawer._jQueryInterface
+ }
+
+ return Drawer
+
+})(jQuery)
+
+export default Drawer
diff --git a/templates/assets/bootstrap-material-design/js/file.js b/templates/assets/bootstrap-material-design/js/file.js
new file mode 100644
index 0000000..ba75a93
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/js/file.js
@@ -0,0 +1,139 @@
+import BaseInput from './baseInput'
+//import Checkbox from './checkbox'
+//import Radio from './radio'
+//import Switch from './switch'
+//import Text from './text'
+//import Textarea from './textarea'
+//import Select from './select'
+import Util from './util'
+
+const File = (($) => {
+
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+ const NAME = 'file'
+ const DATA_KEY = `bmd.${NAME}`
+ const JQUERY_NAME = `bmd${NAME.charAt(0).toUpperCase() + NAME.slice(1)}`
+ const JQUERY_NO_CONFLICT = $.fn[JQUERY_NAME]
+
+ const Default = {}
+
+ const ClassName = {
+ FILE: NAME,
+ IS_FILE: 'is-file'
+ }
+
+ const Selector = {
+ FILENAMES: 'input.form-control[readonly]'
+ }
+
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+ class File extends BaseInput {
+
+ constructor($element, config) {
+ super($element, $.extend(true,
+ //{invalidComponentMatches: [Checkbox, Radio, Text, Textarea, Select, Switch]},
+ Default, config))
+
+ this.$bmdFormGroup.addClass(ClassName.IS_FILE)
+ }
+
+ dispose() {
+ super.dispose(DATA_KEY)
+ }
+
+ static matches($element) {
+ if ($element.attr('type') === 'file') {
+ return true
+ }
+ return false
+ }
+
+ static rejectMatch(component, $element) {
+ Util.assert(this.$element, this.matches($element), `${component} component element ${Util.describe($element)} is invalid for type='file'.`)
+ }
+
+ // ------------------------------------------------------------------------
+ // protected
+
+ // Demarcation element (e.g. first child of a form-group)
+ outerElement() {
+ // label.file > input[type=file]
+ return this.$element.parent().closest(`.${ClassName.FILE}`)
+ }
+
+ rejectWithoutRequiredStructure() {
+ // label.file > input[type=file]
+ Util.assert(this.$element, !this.outerElement().prop('tagName') === 'label', `${this.constructor.name}'s ${Util.describe(this.$element)} parent element ${Util.describe(this.outerElement())} should be <label>.`)
+ Util.assert(this.$element, !this.outerElement().hasClass(ClassName.FILE), `${this.constructor.name}'s ${Util.describe(this.$element)} parent element ${Util.describe(this.outerElement())} should have class .${ClassName.FILE}.`)
+ }
+
+ addFocusListener() {
+ this.$bmdFormGroup
+ .on('focus', () => {
+ this.addFormGroupFocus()
+ })
+ .on('blur', () => {
+ this.removeFormGroupFocus()
+ })
+ }
+
+ addChangeListener() {
+ // set the fileinput readonly field with the name of the file
+ this.$element.on('change', () => {
+ let value = ''
+ $.each(this.$element.files, (i, file) => {
+ value += `${file.name} , `
+ })
+ value = value.substring(0, value.length - 2)
+ if (value) {
+ this.addIsFilled()
+ } else {
+ this.removeIsFilled()
+ }
+ this.$bmdFormGroup.find(Selector.FILENAMES).val(value)
+ })
+ }
+
+ // ------------------------------------------------------------------------
+ // private
+
+ // ------------------------------------------------------------------------
+ // static
+ static _jQueryInterface(config) {
+ return this.each(function () {
+ let $element = $(this)
+ let data = $element.data(DATA_KEY)
+
+ if (!data) {
+ data = new File($element, config)
+ $element.data(DATA_KEY, data)
+ }
+ })
+ }
+ }
+
+ /**
+ * ------------------------------------------------------------------------
+ * jQuery
+ * ------------------------------------------------------------------------
+ */
+ $.fn[JQUERY_NAME] = File._jQueryInterface
+ $.fn[JQUERY_NAME].Constructor = File
+ $.fn[JQUERY_NAME].noConflict = () => {
+ $.fn[JQUERY_NAME] = JQUERY_NO_CONFLICT
+ return File._jQueryInterface
+ }
+
+ return File
+
+})(jQuery)
+
+export default File
diff --git a/templates/assets/bootstrap-material-design/js/index.js b/templates/assets/bootstrap-material-design/js/index.js
new file mode 100644
index 0000000..b90a2c0
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/js/index.js
@@ -0,0 +1,32 @@
+/*
+ * This is the main entry point.
+ *
+ * You can import other modules here, including external packages. When bundling using rollup you can mark those modules as external and have them excluded or, if they have a jsnext:main entry in their package.json (like this package does), let rollup bundle them into your dist file.
+ *
+ * IMPORTANT NOTE: If you are ultimately creating an iife/self executing bundle for the browser, be sure to:
+ * import 'babel-polyfill'
+ *
+ * at your application entry point. This is necessary for browsers that do not yet support some ES2015 runtime necessities such as Symbol. We do this in `index-iife.js` for our iife rollup bundle.
+ */
+import 'babel-polyfill'
+
+// Bootstrap components
+import 'bootstrap/dist/js/bootstrap'
+
+// invalidComponentMatches is currently disabled due to https://github.com/rollup/rollup/issues/428#issuecomment-170066452
+import './checkbox'
+import './checkboxInline'
+import './collapseInline'
+import './file'
+import './radio'
+import './radioInline'
+import './select'
+import './switch'
+import './text'
+import './textarea'
+
+import './drawer'
+
+import './ripples'
+import './autofill'
+import './bootstrapMaterialDesign'
diff --git a/templates/assets/bootstrap-material-design/js/radio.js b/templates/assets/bootstrap-material-design/js/radio.js
new file mode 100644
index 0000000..8ceb6a9
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/js/radio.js
@@ -0,0 +1,95 @@
+import BaseSelection from './baseSelection'
+//import Text from './text'
+//import File from './file'
+//import Checkbox from './checkbox'
+//import Switch from './switch'
+import Util from './util'
+
+const Radio = (($) => {
+
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+ const NAME = 'radio'
+ const DATA_KEY = `bmd.${NAME}`
+ const JQUERY_NAME = `bmd${NAME.charAt(0).toUpperCase() + NAME.slice(1)}`
+ const JQUERY_NO_CONFLICT = $.fn[JQUERY_NAME]
+
+ const Default = {
+ template: `<span class='bmd-radio-outer-circle'></span><span class='bmd-radio-inner-circle'></span>`
+ }
+
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+ class Radio extends BaseSelection {
+
+ constructor($element, config, properties = {inputType: NAME, outerClass: NAME}) {
+ super($element, $.extend(true,
+ //{invalidComponentMatches: [Checkbox, File, Switch, Text]},
+ Default, config), properties)
+ }
+
+ dispose(dataKey = DATA_KEY) {
+ super.dispose(dataKey)
+ }
+
+ static matches($element) {
+ // '.radio > label > input[type=radio]'
+ if ($element.attr('type') === 'radio') {
+ return true
+ }
+ return false
+ }
+
+ static rejectMatch(component, $element) {
+ Util.assert(this.$element, this.matches($element), `${component} component element ${Util.describe($element)} is invalid for type='radio'.`)
+ }
+
+ // ------------------------------------------------------------------------
+ // protected
+
+ //decorateMarkup() {
+ // this.$element.after(this.config.template)
+ //}
+
+
+ // ------------------------------------------------------------------------
+ // private
+
+ // ------------------------------------------------------------------------
+ // static
+ static _jQueryInterface(config) {
+ return this.each(function () {
+ let $element = $(this)
+ let data = $element.data(DATA_KEY)
+
+ if (!data) {
+ data = new Radio($element, config)
+ $element.data(DATA_KEY, data)
+ }
+ })
+ }
+ }
+
+ /**
+ * ------------------------------------------------------------------------
+ * jQuery
+ * ------------------------------------------------------------------------
+ */
+ $.fn[JQUERY_NAME] = Radio._jQueryInterface
+ $.fn[JQUERY_NAME].Constructor = Radio
+ $.fn[JQUERY_NAME].noConflict = () => {
+ $.fn[JQUERY_NAME] = JQUERY_NO_CONFLICT
+ return Radio._jQueryInterface
+ }
+
+ return Radio
+
+})(jQuery)
+
+export default Radio
diff --git a/templates/assets/bootstrap-material-design/js/radioInline.js b/templates/assets/bootstrap-material-design/js/radioInline.js
new file mode 100644
index 0000000..679c303
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/js/radioInline.js
@@ -0,0 +1,77 @@
+import Radio from './radio'
+
+const RadioInline = (($) => {
+
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+ const NAME = 'radioInline'
+ const DATA_KEY = `bmd.${NAME}`
+ const JQUERY_NAME = `bmd${NAME.charAt(0).toUpperCase() + NAME.slice(1)}`
+ const JQUERY_NO_CONFLICT = $.fn[JQUERY_NAME]
+
+ const Default = {
+ bmdFormGroup: {
+ create: false, // no bmd-form-group creation if form-group not present. It messes with the layout.
+ required: false
+ }
+ }
+
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+ class RadioInline extends Radio {
+
+ constructor($element, config, properties = {inputType: 'radio', outerClass: 'radio-inline'}) {
+ super($element, $.extend(true, {}, Default, config), properties)
+ }
+
+ dispose() {
+ super.dispose(DATA_KEY)
+ }
+
+ // ------------------------------------------------------------------------
+ // protected
+
+ // ------------------------------------------------------------------------
+ // protected
+
+ // ------------------------------------------------------------------------
+ // private
+
+ // ------------------------------------------------------------------------
+ // static
+ static _jQueryInterface(config) {
+ return this.each(function () {
+ let $element = $(this)
+ let data = $element.data(DATA_KEY)
+
+ if (!data) {
+ data = new RadioInline($element, config)
+ $element.data(DATA_KEY, data)
+ }
+ })
+ }
+ }
+
+ /**
+ * ------------------------------------------------------------------------
+ * jQuery
+ * ------------------------------------------------------------------------
+ */
+ $.fn[JQUERY_NAME] = RadioInline._jQueryInterface
+ $.fn[JQUERY_NAME].Constructor = RadioInline
+ $.fn[JQUERY_NAME].noConflict = () => {
+ $.fn[JQUERY_NAME] = JQUERY_NO_CONFLICT
+ return RadioInline._jQueryInterface
+ }
+
+ return RadioInline
+
+})(jQuery)
+
+export default RadioInline
diff --git a/templates/assets/bootstrap-material-design/js/ripples.js b/templates/assets/bootstrap-material-design/js/ripples.js
new file mode 100644
index 0000000..c28d287
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/js/ripples.js
@@ -0,0 +1,311 @@
+import Util from './util'
+
+const Ripples = (($) => {
+
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+ const NAME = 'ripples'
+ const DATA_KEY = `bmd.${NAME}`
+ const JQUERY_NAME = `bmd${NAME.charAt(0).toUpperCase() + NAME.slice(1)}`
+ const JQUERY_NO_CONFLICT = $.fn[JQUERY_NAME]
+
+ const ClassName = {
+ CONTAINER: 'ripple-container',
+ DECORATOR: 'ripple-decorator'
+ }
+
+ const Selector = {
+ CONTAINER: `.${ClassName.CONTAINER}`,
+ DECORATOR: `.${ClassName.DECORATOR}` //,
+ }
+
+
+ const Default = {
+ container: {
+ template: `<div class='${ClassName.CONTAINER}'></div>`
+ },
+ decorator: {
+ template: `<div class='${ClassName.DECORATOR}'></div>`
+ },
+ trigger: {
+ start: 'mousedown touchstart',
+ end: 'mouseup mouseleave touchend'
+ },
+ touchUserAgentRegex: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i,
+ duration: 500
+ }
+
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+ class Ripples {
+
+ constructor($element, config) {
+ this.$element = $element
+
+ //console.log(`Adding ripples to ${Util.describe(this.$element)}`) // eslint-disable-line no-console
+ this.config = $.extend(true, {}, Default, config)
+
+ // attach initial listener
+ this.$element.on(this.config.trigger.start, (event) => {
+ this._onStartRipple(event)
+ })
+ }
+
+
+ dispose() {
+ this.$element.data(DATA_KEY, null)
+ this.$element = null
+ this.$container = null
+ this.$decorator = null
+ this.config = null
+ }
+
+ // ------------------------------------------------------------------------
+ // private
+
+ _onStartRipple(event) {
+
+ // Verify if the user is just touching on a device and return if so
+ if (this._isTouch() && event.type === 'mousedown') {
+ return
+ }
+
+ // Find or create the ripple container element
+ this._findOrCreateContainer()
+
+ // Get relY and relX positions of the container element
+ let relY = this._getRelY(event)
+ let relX = this._getRelX(event)
+
+ // If relY and/or relX are false, return the event
+ if (!relY && !relX) {
+ return
+ }
+
+ // set the location and color each time (even if element is cached)
+ this.$decorator.css({
+ left: relX,
+ top: relY,
+ 'background-color': this._getRipplesColor()
+ })
+
+ // Make sure the ripple has the styles applied (ugly hack but it works)
+ this._forceStyleApplication()
+
+ // Turn on the ripple animation
+ this.rippleOn()
+
+ // Call the rippleEnd function when the transition 'on' ends
+ setTimeout(() => {
+ this.rippleEnd()
+ }, this.config.duration)
+
+ // Detect when the user leaves the element to cleanup if not already done?
+ this.$element.on(this.config.trigger.end, () => {
+ if (this.$decorator) { // guard against race condition/mouse attack
+ this.$decorator.data('mousedown', 'off')
+
+ if (this.$decorator.data('animating') === 'off') {
+ this.rippleOut()
+ }
+ }
+ })
+ }
+
+ _findOrCreateContainer() {
+ if (!this.$container || !this.$container.length > 0) {
+ this.$element.append(this.config.container.template)
+ this.$container = this.$element.find(Selector.CONTAINER)
+ }
+
+ // always add the rippleElement, it is always removed
+ this.$container.append(this.config.decorator.template)
+ this.$decorator = this.$container.find(Selector.DECORATOR)
+ }
+
+ // Make sure the ripple has the styles applied (ugly hack but it works)
+ _forceStyleApplication() {
+ return window.getComputedStyle(this.$decorator[0]).opacity
+ }
+
+
+ /**
+ * Get the relX
+ */
+ _getRelX(event) {
+ let wrapperOffset = this.$container.offset()
+
+ let result = null
+ if (!this._isTouch()) {
+ // Get the mouse position relative to the ripple wrapper
+ result = event.pageX - wrapperOffset.left
+ } else {
+ // Make sure the user is using only one finger and then get the touch
+ // position relative to the ripple wrapper
+ event = event.originalEvent
+
+ if (event.touches.length === 1) {
+ result = event.touches[0].pageX - wrapperOffset.left
+ } else {
+ result = false
+ }
+ }
+
+ return result
+ }
+
+ /**
+ * Get the relY
+ */
+ _getRelY(event) {
+ let containerOffset = this.$container.offset()
+ let result = null
+
+ if (!this._isTouch()) {
+ /**
+ * Get the mouse position relative to the ripple wrapper
+ */
+ result = event.pageY - containerOffset.top
+ } else {
+ /**
+ * Make sure the user is using only one finger and then get the touch
+ * position relative to the ripple wrapper
+ */
+ event = event.originalEvent
+
+ if (event.touches.length === 1) {
+ result = event.touches[0].pageY - containerOffset.top
+ } else {
+ result = false
+ }
+ }
+
+ return result
+ }
+
+ /**
+ * Get the ripple color
+ */
+ _getRipplesColor() {
+ let color = this.$element.data('ripple-color') ? this.$element.data('ripple-color') : window.getComputedStyle(this.$element[0]).color
+ return color
+ }
+
+ /**
+ * Verify if the client is using a mobile device
+ */
+ _isTouch() {
+ return this.config.touchUserAgentRegex.test(navigator.userAgent)
+ }
+
+ /**
+ * End the animation of the ripple
+ */
+ rippleEnd() {
+ if (this.$decorator) { // guard against race condition/mouse attack
+ this.$decorator.data('animating', 'off')
+
+ if (this.$decorator.data('mousedown') === 'off') {
+ this.rippleOut(this.$decorator)
+ }
+ }
+ }
+
+ /**
+ * Turn off the ripple effect
+ */
+ rippleOut() {
+ this.$decorator.off()
+
+ if (Util.transitionEndSupported()) {
+ this.$decorator.addClass('ripple-out')
+ } else {
+ this.$decorator.animate({opacity: 0}, 100, () => {
+ this.$decorator.trigger('transitionend')
+ })
+ }
+
+ this.$decorator.on(Util.transitionEndSelector(), () => {
+ if (this.$decorator) {
+ this.$decorator.remove()
+ this.$decorator = null
+ }
+ })
+ }
+
+ /**
+ * Turn on the ripple effect
+ */
+ rippleOn() {
+ let size = this._getNewSize()
+
+ if (Util.transitionEndSupported()) {
+ this.$decorator
+ .css({
+ '-ms-transform': `scale(${size})`,
+ '-moz-transform': `scale(${size})`,
+ '-webkit-transform': `scale(${size})`,
+ transform: `scale(${size})`
+ })
+ .addClass('ripple-on')
+ .data('animating', 'on')
+ .data('mousedown', 'on')
+ } else {
+ this.$decorator.animate({
+ width: Math.max(this.$element.outerWidth(), this.$element.outerHeight()) * 2,
+ height: Math.max(this.$element.outerWidth(), this.$element.outerHeight()) * 2,
+ 'margin-left': Math.max(this.$element.outerWidth(), this.$element.outerHeight()) * (-1),
+ 'margin-top': Math.max(this.$element.outerWidth(), this.$element.outerHeight()) * (-1),
+ opacity: 0.2
+ }, this.config.duration, () => {
+ this.$decorator.trigger('transitionend')
+ })
+ }
+ }
+
+ /**
+ * Get the new size based on the element height/width and the ripple width
+ */
+ _getNewSize() {
+ return (Math.max(this.$element.outerWidth(), this.$element.outerHeight()) / this.$decorator.outerWidth()) * 2.5
+ }
+
+ // ------------------------------------------------------------------------
+ // static
+
+ static _jQueryInterface(config) {
+ return this.each(function () {
+ let $element = $(this)
+ let data = $element.data(DATA_KEY)
+
+ if (!data) {
+ data = new Ripples($element, config)
+ $element.data(DATA_KEY, data)
+ }
+ })
+ }
+ }
+
+ /**
+ * ------------------------------------------------------------------------
+ * jQuery
+ * ------------------------------------------------------------------------
+ */
+ $.fn[JQUERY_NAME] = Ripples._jQueryInterface
+ $.fn[JQUERY_NAME].Constructor = Ripples
+ $.fn[JQUERY_NAME].noConflict = () => {
+ $.fn[JQUERY_NAME] = JQUERY_NO_CONFLICT
+ return Ripples._jQueryInterface
+ }
+
+ return Ripples
+
+})(jQuery)
+
+export default Ripples
diff --git a/templates/assets/bootstrap-material-design/js/select.js b/templates/assets/bootstrap-material-design/js/select.js
new file mode 100644
index 0000000..765f411
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/js/select.js
@@ -0,0 +1,94 @@
+import BaseFormControl from './baseFormControl'
+//import Checkbox from './checkbox'
+//import File from './file'
+//import Radio from './radio'
+//import Switch from './switch'
+//import Text from './text'
+//import Textarea from './textarea'
+import Util from './util'
+
+const Select = (($) => {
+
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+ const NAME = 'select'
+ const DATA_KEY = `bmd.${NAME}`
+ const JQUERY_NAME = `bmd${NAME.charAt(0).toUpperCase() + NAME.slice(1)}`
+ const JQUERY_NO_CONFLICT = $.fn[JQUERY_NAME]
+
+ const Default = {
+ requiredClasses: ['form-control||custom-select']
+ }
+
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+ class Select extends BaseFormControl {
+
+ constructor($element, config) {
+ super($element, $.extend(true,
+ //{invalidComponentMatches: [Checkbox, File, Radio, Switch, Text, Textarea]},
+ Default, config))
+
+ // floating labels will cover the options, so trigger them to be above (if used)
+ this.addIsFilled()
+ }
+
+ dispose() {
+ super.dispose(DATA_KEY)
+ }
+
+ static matches($element) {
+ if ($element.prop('tagName') === 'select') {
+ return true
+ }
+ return false
+ }
+
+ static rejectMatch(component, $element) {
+ Util.assert(this.$element, this.matches($element), `${component} component element ${Util.describe($element)} is invalid for <select>.`)
+ }
+
+ // ------------------------------------------------------------------------
+ // protected
+
+ // ------------------------------------------------------------------------
+ // private
+
+ // ------------------------------------------------------------------------
+ // static
+ static _jQueryInterface(config) {
+ return this.each(function () {
+ let $element = $(this)
+ let data = $element.data(DATA_KEY)
+
+ if (!data) {
+ data = new Select($element, config)
+ $element.data(DATA_KEY, data)
+ }
+ })
+ }
+ }
+
+ /**
+ * ------------------------------------------------------------------------
+ * jQuery
+ * ------------------------------------------------------------------------
+ */
+ $.fn[JQUERY_NAME] = Select._jQueryInterface
+ $.fn[JQUERY_NAME].Constructor = Select
+ $.fn[JQUERY_NAME].noConflict = () => {
+ $.fn[JQUERY_NAME] = JQUERY_NO_CONFLICT
+ return Select._jQueryInterface
+ }
+
+ return Select
+
+})(jQuery)
+
+export default Select
diff --git a/templates/assets/bootstrap-material-design/js/switch.js b/templates/assets/bootstrap-material-design/js/switch.js
new file mode 100644
index 0000000..cad4806
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/js/switch.js
@@ -0,0 +1,72 @@
+import Checkbox from './checkbox'
+
+const Switch = (($) => {
+
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+ const NAME = 'switch'
+ const DATA_KEY = `bmd.${NAME}`
+ const JQUERY_NAME = `bmd${NAME.charAt(0).toUpperCase() + NAME.slice(1)}`
+ const JQUERY_NO_CONFLICT = $.fn[JQUERY_NAME]
+
+ const Default = {
+ template: `<span class='bmd-switch-track'></span>`
+ }
+
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+ class Switch extends Checkbox {
+
+ constructor($element, config, properties = {inputType: 'checkbox', outerClass: 'switch'}) {
+ super($element, $.extend(true, {}, Default, config), properties)
+ // selector: '.switch > label > input[type=checkbox]'
+ }
+
+ dispose() {
+ super.dispose(DATA_KEY)
+ }
+
+ // ------------------------------------------------------------------------
+ // protected
+
+ // ------------------------------------------------------------------------
+ // private
+
+ // ------------------------------------------------------------------------
+ // static
+ static _jQueryInterface(config) {
+ return this.each(function () {
+ let $element = $(this)
+ let data = $element.data(DATA_KEY)
+
+ if (!data) {
+ data = new Switch($element, config)
+ $element.data(DATA_KEY, data)
+ }
+ })
+ }
+ }
+
+ /**
+ * ------------------------------------------------------------------------
+ * jQuery
+ * ------------------------------------------------------------------------
+ */
+ $.fn[JQUERY_NAME] = Switch._jQueryInterface
+ $.fn[JQUERY_NAME].Constructor = Switch
+ $.fn[JQUERY_NAME].noConflict = () => {
+ $.fn[JQUERY_NAME] = JQUERY_NO_CONFLICT
+ return Switch._jQueryInterface
+ }
+
+ return Switch
+
+})(jQuery)
+
+export default Switch
diff --git a/templates/assets/bootstrap-material-design/js/text.js b/templates/assets/bootstrap-material-design/js/text.js
new file mode 100644
index 0000000..f9bbd12
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/js/text.js
@@ -0,0 +1,89 @@
+import BaseFormControl from './baseFormControl'
+//import Checkbox from './checkbox'
+//import File from './file'
+//import Radio from './radio'
+//import Switch from './switch'
+//import Textarea from './textarea'
+//import Select from './select'
+import Util from './util'
+
+const Text = (($) => {
+
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+ const NAME = 'text'
+ const DATA_KEY = `bmd.${NAME}`
+ const JQUERY_NAME = `bmd${NAME.charAt(0).toUpperCase() + NAME.slice(1)}`
+ const JQUERY_NO_CONFLICT = $.fn[JQUERY_NAME]
+
+ const Default = {}
+
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+ class Text extends BaseFormControl {
+
+ constructor($element, config) {
+ super($element, $.extend(true,
+ //{invalidComponentMatches: [Checkbox, File, Radio, Switch, Select, Textarea]},
+ Default, config))
+ }
+
+ dispose(dataKey = DATA_KEY) {
+ super.dispose(dataKey)
+ }
+
+ static matches($element) {
+ if ($element.attr('type') === 'text') {
+ return true
+ }
+ return false
+ }
+
+ static rejectMatch(component, $element) {
+ Util.assert(this.$element, this.matches($element), `${component} component element ${Util.describe($element)} is invalid for type='text'.`)
+ }
+
+ // ------------------------------------------------------------------------
+ // protected
+
+ // ------------------------------------------------------------------------
+ // private
+
+ // ------------------------------------------------------------------------
+ // static
+ static _jQueryInterface(config) {
+ return this.each(function () {
+ let $element = $(this)
+ let data = $element.data(DATA_KEY)
+
+ if (!data) {
+ data = new Text($element, config)
+ $element.data(DATA_KEY, data)
+ }
+ })
+ }
+ }
+
+ /**
+ * ------------------------------------------------------------------------
+ * jQuery
+ * ------------------------------------------------------------------------
+ */
+ $.fn[JQUERY_NAME] = Text._jQueryInterface
+ $.fn[JQUERY_NAME].Constructor = Text
+ $.fn[JQUERY_NAME].noConflict = () => {
+ $.fn[JQUERY_NAME] = JQUERY_NO_CONFLICT
+ return Text._jQueryInterface
+ }
+
+ return Text
+
+})(jQuery)
+
+export default Text
diff --git a/templates/assets/bootstrap-material-design/js/textarea.js b/templates/assets/bootstrap-material-design/js/textarea.js
new file mode 100644
index 0000000..d5596a0
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/js/textarea.js
@@ -0,0 +1,89 @@
+import BaseFormControl from './baseFormControl'
+//import Checkbox from './checkbox'
+//import File from './file'
+//import Radio from './radio'
+//import Switch from './switch'
+//import Text from './text'
+//import Select from './select'
+import Util from './util'
+
+const Textarea = (($) => {
+
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+ const NAME = 'textarea'
+ const DATA_KEY = `bmd.${NAME}`
+ const JQUERY_NAME = `bmd${NAME.charAt(0).toUpperCase() + NAME.slice(1)}`
+ const JQUERY_NO_CONFLICT = $.fn[JQUERY_NAME]
+
+ const Default = {}
+
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+ class Textarea extends BaseFormControl {
+
+ constructor($element, config) {
+ super($element, $.extend(true,
+ //{invalidComponentMatches: [Checkbox, File, Radio, Text, Select, Switch]},
+ Default, config))
+ }
+
+ dispose() {
+ super.dispose(DATA_KEY)
+ }
+
+ static matches($element) {
+ if ($element.prop('tagName') === 'textarea') {
+ return true
+ }
+ return false
+ }
+
+ static rejectMatch(component, $element) {
+ Util.assert(this.$element, this.matches($element), `${component} component element ${Util.describe($element)} is invalid for <textarea>.`)
+ }
+
+ // ------------------------------------------------------------------------
+ // protected
+
+ // ------------------------------------------------------------------------
+ // private
+
+ // ------------------------------------------------------------------------
+ // static
+ static _jQueryInterface(config) {
+ return this.each(function () {
+ let $element = $(this)
+ let data = $element.data(DATA_KEY)
+
+ if (!data) {
+ data = new Textarea($element, config)
+ $element.data(DATA_KEY, data)
+ }
+ })
+ }
+ }
+
+ /**
+ * ------------------------------------------------------------------------
+ * jQuery
+ * ------------------------------------------------------------------------
+ */
+ $.fn[JQUERY_NAME] = Textarea._jQueryInterface
+ $.fn[JQUERY_NAME].Constructor = Textarea
+ $.fn[JQUERY_NAME].noConflict = () => {
+ $.fn[JQUERY_NAME] = JQUERY_NO_CONFLICT
+ return Textarea._jQueryInterface
+ }
+
+ return Textarea
+
+})(jQuery)
+
+export default Textarea
diff --git a/templates/assets/bootstrap-material-design/js/util.js b/templates/assets/bootstrap-material-design/js/util.js
new file mode 100644
index 0000000..3cd2e77
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/js/util.js
@@ -0,0 +1,105 @@
+const Util = (() => {
+
+ /**
+ * ------------------------------------------------------------------------
+ * Private TransitionEnd Helpers
+ * ------------------------------------------------------------------------
+ */
+
+ let transitionEnd = false
+ let transitionEndSelector = ''
+
+ const TransitionEndEvent = {
+ WebkitTransition: 'webkitTransitionEnd',
+ MozTransition: 'transitionend',
+ OTransition: 'oTransitionEnd otransitionend',
+ transition: 'transitionend'
+ }
+
+ function transitionEndTest() {
+ if (window.QUnit) {
+ return false
+ }
+
+ let el = document.createElement('bmd')
+
+ for (let name in TransitionEndEvent) {
+ if (el.style[name] !== undefined) {
+ return TransitionEndEvent[name] // { end: TransitionEndEvent[name] }
+ }
+ }
+
+ return false
+ }
+
+ function setTransitionEndSupport() {
+ transitionEnd = transitionEndTest()
+
+ // generate a concatenated transition end event selector
+ for (let name in TransitionEndEvent) {
+ transitionEndSelector += ` ${TransitionEndEvent[name]}`
+ }
+ }
+
+ /**
+ * --------------------------------------------------------------------------
+ * Public Util Api
+ * --------------------------------------------------------------------------
+ */
+
+ let Util = {
+
+ transitionEndSupported() {
+ return transitionEnd
+ },
+
+ transitionEndSelector() {
+ return transitionEndSelector
+ },
+
+ isChar(event) {
+ if (typeof event.which === 'undefined') {
+ return true
+ } else if (typeof event.which === 'number' && event.which > 0) {
+ return (
+ !event.ctrlKey
+ && !event.metaKey
+ && !event.altKey
+ && event.which !== 8 // backspace
+ && event.which !== 9 // tab
+ && event.which !== 13 // enter
+ && event.which !== 16 // shift
+ && event.which !== 17 // ctrl
+ && event.which !== 20 // caps lock
+ && event.which !== 27 // escape
+ )
+ }
+ return false
+ },
+
+ assert($element, invalidTest, message) {
+ if (invalidTest) {
+ if (!$element === undefined) {
+ $element.css('border', '1px solid red')
+ }
+ console.error(message, $element) // eslint-disable-line no-console
+ throw message
+ }
+ },
+
+ describe($element) {
+ if ($element === undefined) {
+ return 'undefined'
+ } else if ($element.length === 0) {
+ return '(no matching elements)'
+ }
+ return `${$element[0].outerHTML.split('>')[0]}>`
+ }
+ }
+
+ setTransitionEndSupport()
+ return Util
+
+})(jQuery)
+
+export default Util
diff --git a/templates/assets/bootstrap-material-design/package.json b/templates/assets/bootstrap-material-design/package.json
new file mode 100644
index 0000000..19a8aeb
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/package.json
@@ -0,0 +1,60 @@
+{
+ "name": "bootstrap-material-design",
+ "description": "Bootstrap Material Design 4",
+ "version": "4.0.2",
+ "keywords": [
+ "material",
+ "design",
+ "bootstrap",
+ "css",
+ "js",
+ "sass",
+ "mobile-first",
+ "responsive",
+ "front-end",
+ "framework",
+ "web"
+ ],
+ "homepage": "https://github.com/FezVrasta/bootstrap-material-design",
+ "author": "Federico Zivolo",
+ "scripts": {
+ "test": "grunt test"
+ },
+ "style": "dist/css/bootstrap-material-design.css",
+ "sass": "scss/_core.scss",
+ "main": "dist/bootstrap-material-design.umd.js",
+ "jsnext:main": "js/index.js",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/FezVrasta/bootstrap-material-design.git"
+ },
+ "bugs": {
+ "url": "https://github.com/FezVrasta/bootstrap-material-design/issues"
+ },
+ "license": "MIT",
+ "dependencies": {
+ "babel-polyfill": "^6.9.1"
+ },
+ "devDependencies": {
+ "babel-core": "^6.11.4",
+ "babel-eslint": ">=6.1.2",
+ "babel-preset-es2015": "^6.9.0",
+ "bootstrap": "twbs/bootstrap#v4-dev",
+ "extend": "^3.0.0",
+ "gulp": "github:gulpjs/gulp#4.0",
+ "gulp-pipeline": "^4.0.43",
+ "jquery": "^3.1",
+ "moment": "^2.14.1",
+ "tether": "^1.3.3"
+ },
+ "engines": {
+ "node": "<6",
+ "npm": "^3.0.0"
+ },
+ "files": [
+ "dist",
+ "js/*.js",
+ "scss/**/*.scss",
+ "LICENSE"
+ ]
+}
diff --git a/templates/assets/bootstrap-material-design/scss/_alerts.scss b/templates/assets/bootstrap-material-design/scss/_alerts.scss
new file mode 100644
index 0000000..0073242
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/_alerts.scss
@@ -0,0 +1,4 @@
+.alert {
+ border: 0;
+ border-radius: 0;
+}
diff --git a/templates/assets/bootstrap-material-design/scss/_buttons.scss b/templates/assets/bootstrap-material-design/scss/_buttons.scss
new file mode 100644
index 0000000..ee3defc
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/_buttons.scss
@@ -0,0 +1,233 @@
+// specification: https://www.google.com/design/spec/components/buttons.html
+
+// bmd default buttons are flat by default
+.btn {
+ position: relative;
+ margin-bottom: $bmd-btn-margin-bottom; // just enough room so that focus shadows aren't covered up
+ font-size: $bmd-btn-font-size;
+ text-decoration: none;
+ text-transform: uppercase;
+ letter-spacing: 0;
+ cursor: pointer;
+ background-color: transparent;
+ border: 0;
+ outline: 0;
+ transition: box-shadow 0.2s $bmd-animation-curve-fast-out-linear-in, background-color 0.2s $bmd-animation-curve-default, color 0.2s $bmd-animation-curve-default;
+ will-change: box-shadow, transform;
+
+ @include undo-bs-tab-focus();
+
+ //--
+ // Colors
+
+ // flat removes bg, add color variations to text
+ @include bmd-flat-button-color();
+
+ // fab and raised
+ // - colored, add their text and bg
+ // - hover color contrasted
+ // - shared shadow state on hover/active/focus
+ &.bmd-btn-fab,
+ &.btn-raised,
+ .btn-group-raised & {
+ @include bmd-raised-button-color();
+
+ // enlarged shadow on hover, focus
+ @include hover-focus() {
+ //border: 1px solid $blue;
+ z-index: 1; // add to the z-index so that the expanded shadow is above anything below it i.e. another button
+ @include box-shadow($bmd-shadow-4dp);
+ }
+
+ // :active - momentary press: big shadow, release and it is gone
+ // .active - persistent big shadow
+ &.active,
+ &:active {
+ z-index: 1; // add to the z-index so that the expanded shadow is above anything below it i.e. another button
+ @include box-shadow($bmd-shadow-focus);
+ //border: 1px solid $green;
+ }
+ }
+
+ //---
+ // btn-raised
+ &.btn-raised,
+ .btn-group-raised & {
+
+ // baseline shadow
+ @include box-shadow($bmd-shadow-2dp);
+
+ // reverse any of the above for links
+ &.btn-link {
+ box-shadow: none;
+ @include bmd-hover-focus-active() {
+ box-shadow: none;
+ }
+ }
+
+ @include bmd-disabled() {
+ box-shadow: none;
+ }
+ }
+
+ //---
+ // btn-outline
+ @include bmd-outline-button-color();
+
+ // https://www.google.com/design/spec/components/buttons-floating-action-button.html
+ &.bmd-btn-fab,
+ &.bmd-btn-icon {
+ overflow: hidden;
+ font-size: $bmd-btn-fab-font-size;
+ line-height: normal;
+
+ .btn-group-lg &,
+ .btn-group-sm &,
+ & {
+ padding: 0; // need specificity
+ border-radius: 50%;
+ }
+
+ .material-icons {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ width: $bmd-btn-fab-font-size;
+ line-height: $bmd-btn-fab-font-size;
+ transform: translate(-($bmd-btn-fab-font-size / 2), -($bmd-btn-fab-font-size / 2));
+ }
+ }
+
+ &.bmd-btn-fab {
+ // see above for color variations
+ width: $bmd-btn-fab-size;
+ min-width: $bmd-btn-fab-size;
+ height: $bmd-btn-fab-size;
+ //margin: auto;
+ //margin: 2px; // use z-index focus/hover/active instead. This is not called for in the spec, but it ensures room for the box-shadow, which is nice to have.
+ box-shadow: 0 1px 1.5px 0 $gray-lighter, 0 1px 1px 0 $gray-light;
+
+ .ripple-container {
+ border-radius: 50%;
+ }
+
+ &.bmd-btn-fab-sm,
+ .btn-group-sm & {
+ width: $bmd-btn-fab-size-sm;
+ min-width: $bmd-btn-fab-size-sm;
+ height: $bmd-btn-fab-size-sm;
+ //margin: 1px; // use z-index focus/hover/active instead. This is not called for in the spec, but it ensures room for the box-shadow, which is nice to have.
+
+ //.material-icons {
+ // top: ($bmd-btn-icon-size-sm - $bmd-btn-fab-font-size) / 2;
+ // left: ($bmd-btn-icon-size-sm - $bmd-btn-fab-font-size) / 2;
+ //}
+ }
+ }
+
+ // Icon buttons
+ &.bmd-btn-icon {
+ width: $bmd-btn-icon-size;
+ min-width: $bmd-btn-icon-size;
+ height: $bmd-btn-icon-size;
+ margin: 0;
+ color: inherit;
+
+ &.bmd-btn-icon-sm,
+ .btn-group-sm & {
+ width: $bmd-btn-icon-size-sm;
+ min-width: $bmd-btn-icon-size-sm;
+ height: $bmd-btn-icon-size-sm;
+ font-size: $bmd-btn-icon-font-size-sm;
+
+ .material-icons {
+ //$position: ($bmd-btn-icon-size-sm - $bmd-btn-icon-font-size-sm) / 2;
+ //top: $position;
+ //left: $position;
+ width: $bmd-btn-icon-font-size-sm;
+ font-size: $bmd-btn-icon-font-size-sm;
+ line-height: 1;
+ transform: translate(-($bmd-btn-icon-font-size-sm / 2), -($bmd-btn-icon-font-size-sm / 2));
+ }
+ }
+ }
+
+ // Align icons inside buttons with text
+ .material-icons {
+ position: relative;
+ top: .25em;
+ margin-top: -1em;
+ margin-bottom: -1em;
+ font-size: 1.5em;
+ }
+
+ // Size variations
+ &.btn-lg,
+ .btn-group-lg & {
+ @include button-size($btn-padding-y-lg, $btn-padding-x-lg, $bmd-btn-font-size-lg, $btn-border-radius-lg);
+ }
+ &.btn-sm,
+ .btn-group-sm & {
+ @include button-size($btn-padding-y-sm, $btn-padding-x-sm, $bmd-btn-font-size-sm, $btn-border-radius-sm);
+ font-size: $bmd-btn-font-size-sm;
+ }
+}
+
+// Disabled buttons and button groups
+.btn,
+.input-group-btn .btn,
+.btn-group,
+.btn-group-vertical {
+ // have to ratchet up the specificity to kill drop shadows on disabled raised buttons
+ @include bmd-disabled() {
+ color: $bmd-btn-disabled;
+ .bg-inverse & {
+ color: $bmd-inverse-btn-disabled;
+ }
+
+ // flat buttons shouldn't lose transparency on disabled hover/focus
+ &,
+ &:hover,
+ &:focus {
+ background: transparent;
+ }
+ }
+}
+
+// btn-group variations
+.btn-group,
+.btn-group-vertical {
+
+ position: relative;
+ margin: 10px 1px;
+
+ // spec: https://www.google.com/design/spec/components/buttons.html#buttons-toggle-buttons
+ //&.open {
+ // .dropdown-toggle {
+ // }
+ //
+ // > .dropdown-toggle.btn {
+ // @include bmd-raised-button-color-bg();
+ // }
+ //}
+
+ .dropdown-menu {
+ border-radius: 0 0 $border-radius $border-radius;
+ }
+
+ &.btn-group-raised {
+ @include box-shadow($bmd-shadow-2dp);
+ }
+
+ .btn + .btn,
+ .btn,
+ .btn:active,
+ .btn-group {
+ margin: 0;
+ }
+
+ // remove margin from nested btn-group(s) to properly align them with the outer buttons
+ > .btn-group {
+ margin: 0;
+ }
+}
diff --git a/templates/assets/bootstrap-material-design/scss/_cards.scss b/templates/assets/bootstrap-material-design/scss/_cards.scss
new file mode 100644
index 0000000..b68e2cb
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/_cards.scss
@@ -0,0 +1,58 @@
+//https://www.google.com/design/spec/components/cards.html#cards-content-blocks
+// Card resting elevation: 2dp
+.card {
+ border: 0;
+
+ // Cards have a default elevation of 2dp.
+ @include box-shadow($bmd-shadow-2dp);
+ @extend %std-font;
+
+ // spec: see "Avatar, Title, and Subtitle area"
+ // Height: 72dp
+ // Padding: 16dp
+ // Top and bottom padding: 16dp
+ .card-header {
+ padding: 1rem;
+ }
+
+ .card-block {
+ padding: 1.5rem 1rem 1rem;
+ //@extend %std-font;
+ }
+
+ // Primary title/text
+ // - Title: 24sp or 14sp
+ // - Subtitle: 14sp
+
+ // non-h* card-titles will be 14sp
+ //&.card-title {
+ // @extend %std-font;
+ //}
+
+ // any h* will signal the larger size should render as 24sp
+ @include headings() {
+ &.card-title {
+ font-size: 1.5rem;
+ font-weight: 300;
+ }
+ }
+
+ .bmd-card-actions, // needed? if you have actions in the middle of the card (see spec), it may be necessary
+ .card-footer { // assume footer is the set of actions?
+ padding: .5rem;
+ }
+
+ &.bmd-card-raised {
+ // Card raised elevation: 8dp
+ @include box-shadow($bmd-shadow-8dp);
+ }
+
+ @include media-breakpoint-up(lg) {
+ // On desktop, cards can have a resting elevation of 0dp and gain an elevation of 8dp on hover.
+ &.bmd-card-flat {
+ box-shadow: none;
+ }
+ }
+}
+
+
diff --git a/templates/assets/bootstrap-material-design/scss/_checkboxes.scss b/templates/assets/bootstrap-material-design/scss/_checkboxes.scss
new file mode 100644
index 0000000..cb0099a
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/_checkboxes.scss
@@ -0,0 +1,256 @@
+// http://www.google.com/design/spec/components/selection-controls.html#selection-controls-checkbox
+.checkbox label,
+label.checkbox-inline {
+ padding-left: $bmd-checkbox-size + $bmd-checkbox-label-padding; // absolutely positioned so add the radio size
+ cursor: pointer;
+
+ .checkbox-decorator {
+ position: absolute;
+ top: 0.125rem;
+ left: 0;
+ vertical-align: middle;
+
+ &::before { // FIXME: document why this is necessary (doesn't seem to be on chrome)
+ position: absolute;
+ left: 0;
+ z-index: 1;
+ display: block;
+ width: $bmd-checkbox-size;
+ height: $bmd-checkbox-size;
+ margin: 0;
+ content: "";
+ background-color: rgba($black, .84);
+ border-radius: 100%;
+ opacity: 0;
+ transform: scale3d(2.3, 2.3, 1);
+ }
+
+ .check {
+ position: relative;
+ z-index: 1;
+ display: inline-block;
+ width: $bmd-checkbox-size;
+ height: $bmd-checkbox-size;
+ overflow: hidden;
+ border: $bmd-checkbox-border-size solid $bmd-checkbox-border-color;
+ border-radius: $border-radius;
+
+ // checkbox outline
+ &::before {
+ position: absolute;
+ display: block;
+ width: 0;
+ height: 0;
+ margin-top: -4px;
+ margin-left: 6px;
+ content: "";
+ box-shadow: 0 0 0 0,
+ 0 0 0 0,
+ 0 0 0 0,
+ 0 0 0 0,
+ 0 0 0 0,
+ 0 0 0 0,
+ 0 0 0 0 inset;
+ transform: rotate(45deg);
+ animation: checkbox-off;
+
+ .is-focused & {
+ // Prevent checkbox animation and ripple effect on page load
+ animation: checkbox-off $bmd-checkbox-animation-check forwards;
+ }
+ }
+ }
+ }
+
+ input[type=checkbox] {
+
+ // Hide native checkbox
+ position: absolute;
+ left: 0;
+ z-index: -1;
+ width: 0;
+ height: 0;
+ margin: 0;
+ overflow: hidden;
+ pointer-events: none;
+ opacity: 0;
+
+ &:focus + .checkbox-decorator .check::after {
+ opacity: 0.2;
+ }
+
+ &:checked {
+
+ // FIXME: once working - combine further to reduce code
+ + .checkbox-decorator .check {
+ color: $bmd-checkbox-checked-color;
+ border-color: $bmd-checkbox-checked-color;
+ }
+
+ + .checkbox-decorator .check::before {
+ color: $bmd-checkbox-checked-color;
+ box-shadow: 0 0 0 10px,
+ 10px -10px 0 10px,
+ 32px 0 0 20px,
+ 032px 0 20px,
+ -5px 5px 0 10px,
+ 20px -12px 0 11px;
+ animation: checkbox-on $bmd-checkbox-animation-check forwards;
+ }
+
+ + .checkbox-decorator::before {
+ animation: rippleOn;
+ .is-focused & {
+ // Prevent checkbox animation and ripple effect on page load
+ animation: rippleOn $bmd-checkbox-animation-ripple;
+ }
+ }
+
+ + .checkbox-decorator .check::after {
+ //background-color: $brand-success; // FIXME: seems like tho wrong color, test and make sure it can be removed
+ animation: rippleOn $bmd-checkbox-animation-ripple forwards; // Ripple effect on check
+ }
+ }
+
+ &:not(:checked) {
+ + .checkbox-decorator::before {
+ animation: rippleOff;
+ .is-focused & {
+ // Prevent checkbox animation and ripple effect on page load
+ animation: rippleOff $bmd-checkbox-animation-ripple;
+ }
+ }
+
+ + .checkbox-decorator .check::after {
+ animation: rippleOff $bmd-checkbox-animation-ripple forwards; // Ripple effect on uncheck
+ }
+ }
+
+ &[disabled],
+ fieldset[disabled] & {
+ + .checkbox-decorator .check::after,
+ .check::after {
+ background-color: $gray-dark;
+ transform: rotate(-45deg);
+ }
+ + .checkbox-decorator .check,
+ .check {
+ border-color: $bmd-checkbox-border-color-disabled;
+ }
+ }
+ }
+}
+
+@keyframes checkbox-on {
+ 0% {
+ box-shadow: 0 0 0 10px,
+ 10px -10px 0 10px,
+ 32px 0 0 20px,
+ 0 32px 0 20px,
+ -5px 5px 0 10px,
+ 15px 2px 0 11px;
+ }
+ 50% {
+ box-shadow: 0 0 0 10px,
+ 10px -10px 0 10px,
+ 32px 0 0 20px,
+ 0 32px 0 20px,
+ -5px 5px 0 10px,
+ 20px 2px 0 11px;
+ }
+ 100% {
+ box-shadow: 0 0 0 10px,
+ 10px -10px 0 10px,
+ 32px 0 0 20px,
+ 0 32px 0 20px,
+ -5px 5px 0 10px,
+ 20px -12px 0 11px;
+ }
+}
+
+@keyframes checkbox-off {
+ 0% {
+ box-shadow: 0 0 0 10px,
+ 10px -10px 0 10px,
+ 32px 0 0 20px,
+ 0 32px 0 20px,
+ -5px 5px 0 10px,
+ 20px -12px 0 11px,
+ 0 0 0 0 inset;
+ }
+ 25% {
+ box-shadow: 0 0 0 10px,
+ 10px -10px 0 10px,
+ 32px 0 0 20px,
+ 0 32px 0 20px,
+ -5px 5px 0 10px,
+ 20px -12px 0 11px,
+ 0 0 0 0 inset;
+ }
+ 50% {
+ width: 0;
+ height: 0;
+ margin-top: -4px;
+ margin-left: 6px;
+ box-shadow: 0 0 0 10px,
+ 10px -10px 0 10px,
+ 32px 0 0 20px,
+ 0 32px 0 20px,
+ -5px 5px 0 10px,
+ 15px 2px 0 11px,
+ 0 0 0 0 inset;
+ transform: rotate(45deg);
+ }
+ 51% {
+ width: 20px;
+ height: 20px;
+ margin-top: -2px;
+ margin-left: -2px;
+ box-shadow: 0 0 0 0,
+ 0 0 0 0,
+ 0 0 0 0,
+ 0 0 0 0,
+ 0 0 0 0,
+ 0 0 0 0,
+ 0 0 0 10px inset;
+ transform: rotate(0deg);
+ }
+ 100% {
+ width: 20px;
+ height: 20px;
+ margin-top: -2px;
+ margin-left: -2px;
+ box-shadow: 0 0 0 0,
+ 0 0 0 0,
+ 0 0 0 0,
+ 0 0 0 0,
+ 0 0 0 0,
+ 0 0 0 0,
+ 0 0 0 0 inset;
+ transform: rotate(0deg);
+ }
+}
+
+@keyframes rippleOn {
+ 0% {
+ opacity: 0;
+ }
+ 50% {
+ opacity: 0.2;
+ }
+ 100% {
+ opacity: 0;
+ }
+}
+
+@keyframes rippleOff {
+ 0% {
+ opacity: 0;
+ }
+ 50% {
+ opacity: 0.2;
+ }
+ 100% {
+ opacity: 0;
+ }
+}
diff --git a/templates/assets/bootstrap-material-design/scss/_core-bootstrap.scss b/templates/assets/bootstrap-material-design/scss/_core-bootstrap.scss
new file mode 100644
index 0000000..95f6238
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/_core-bootstrap.scss
@@ -0,0 +1,68 @@
+// FIXME: only necessary because there isn't an underscored file - see https://github.com/twbs/bootstrap/issues/18350
+//@import "../bower_components/bootstrap/scss/
+//@import "../../bootstrap/scss/
+
+// Core variables and mixins
+@import "bootstrap/scss/custom";
+@import "bootstrap/scss/variables";
+@import "bootstrap/scss/mixins";
+
+// #853 start - https://github.com/twbs/bootstrap/pull/18976/files
+// hack
+@mixin pull-left {
+ float: left !important;
+ @if $enable-flex {
+ margin-right: auto;
+ }
+}
+@mixin pull-right {
+ float: right !important;
+ @if $enable-flex {
+ margin-left: auto;
+ }
+}
+// #853 end - https://github.com/twbs/bootstrap/pull/18976/files
+
+
+// Reset and dependencies
+@import "bootstrap/scss/normalize";
+@import "bootstrap/scss/print";
+
+// Core CSS
+@import "bootstrap/scss/reboot";
+@import "bootstrap/scss/type";
+@import "bootstrap/scss/images";
+@import "bootstrap/scss/code";
+@import "bootstrap/scss/grid";
+@import "bootstrap/scss/tables";
+@import "bootstrap/scss/forms";
+@import "bootstrap/scss/buttons";
+
+// Components
+@import "bootstrap/scss/animation";
+@import "bootstrap/scss/dropdown";
+@import "bootstrap/scss/button-group";
+@import "bootstrap/scss/input-group";
+@import "bootstrap/scss/custom-forms";
+@import "bootstrap/scss/nav";
+@import "bootstrap/scss/navbar";
+@import "bootstrap/scss/card";
+@import "bootstrap/scss/breadcrumb";
+@import "bootstrap/scss/pagination";
+@import "bootstrap/scss/tags";
+@import "bootstrap/scss/jumbotron";
+@import "bootstrap/scss/alert";
+@import "bootstrap/scss/progress";
+@import "bootstrap/scss/media";
+@import "bootstrap/scss/list-group";
+@import "bootstrap/scss/responsive-embed";
+@import "bootstrap/scss/close";
+
+// Components w/ JavaScript
+@import "bootstrap/scss/modal";
+@import "bootstrap/scss/tooltip";
+@import "bootstrap/scss/popover";
+@import "bootstrap/scss/carousel";
+
+// Utility classes
+@import "bootstrap/scss/utilities";
diff --git a/templates/assets/bootstrap-material-design/scss/_core.scss b/templates/assets/bootstrap-material-design/scss/_core.scss
new file mode 100644
index 0000000..57ca53f
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/_core.scss
@@ -0,0 +1,33 @@
+// This is the main scss file, provided as an underscored file so that variable contexts remain in-tact when importing from the source.
+@import "variables";
+@import "mixins";
+@import "core-bootstrap"; // FIXME: V4 SCSS inclusion via an underscored file https://github.com/twbs/bootstrap/issues/18350
+
+@import "reboot";
+
+@import "layout";
+@import "buttons";
+@import "checkboxes";
+@import "custom-forms";
+@import "switches";
+@import "radios";
+@import "forms";
+@import "input-group";
+@import "list-group";
+@import "tables";
+@import "nav";
+@import "navbar";
+@import "alerts";
+@import "progress";
+@import "pagination";
+@import "type";
+@import "popover";
+@import "cards";
+@import "modal";
+@import "dropdown";
+@import "drawer";
+@import "themes";
+
+@import "ripples";
+
+@import "extensions";
diff --git a/templates/assets/bootstrap-material-design/scss/_custom-forms.scss b/templates/assets/bootstrap-material-design/scss/_custom-forms.scss
new file mode 100644
index 0000000..3cf5ddd
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/_custom-forms.scss
@@ -0,0 +1,10 @@
+.custom-file-control {
+ @extend .form-control;
+ @include bmd-form-color($bmd-label-color, $bmd-label-color-focus, $input-border-color);
+
+ &::before {
+ @extend .btn;
+ position: absolute;
+ height: calc(100% - 1px);
+ }
+}
diff --git a/templates/assets/bootstrap-material-design/scss/_drawer.scss b/templates/assets/bootstrap-material-design/scss/_drawer.scss
new file mode 100644
index 0000000..34d115e
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/_drawer.scss
@@ -0,0 +1,122 @@
+// Implementation specification in https://github.com/FezVrasta/bootstrap-material-design/issues/822
+
+// Drawer.
+.bmd-layout-drawer {
+ position: absolute;
+ z-index: 5; // over a header and content
+ box-sizing: border-box;
+ display: flex;
+
+ flex-direction: column;
+ flex-wrap: nowrap;
+
+ max-height: 100%;
+ overflow: visible;
+ overflow-y: auto;
+ font-size: .875rem;
+ //color: $bmd-layout-drawer-text-color;
+ //background: $bmd-layout-drawer-bg-color;
+
+ // Transform offscreen.
+ transition: transform;
+ will-change: transform;
+ transform-style: preserve-3d;
+ @include box-shadow($bmd-shadow-2dp);
+ @include material-animation-default();
+
+ > * {
+ flex-shrink: 0;
+ }
+
+ // Placement of common components within the drawer
+ // You might say this is opinionated - feedback welcome.
+ > header {
+ display: flex;
+ flex-direction: column;
+ justify-content: flex-end;
+ padding: 1rem;
+
+ .navbar-brand {
+ padding-left: 1.5rem;
+ font-size: 1.25rem;
+ }
+ }
+
+ > .list-group {
+ padding-top: 1rem;
+
+ .list-group-item {
+ padding-right: 2.5rem;
+ padding-left: 2.5rem;
+ font-size: .8125rem;
+ font-weight: 500;
+ }
+ }
+}
+
+//----------------
+// Sizing and positioning below here
+
+// for left or right drawers, setup widths, heights and positions
+@include bmd-drawer-x-out($bmd-drawer-x-size);
+
+// for top or bottom drawers, setup widths, heights and positions
+@include bmd-drawer-y-out($bmd-drawer-y-size);
+
+// Marker class for both triggering the opening of the drawer (i.e. javascript #addClass('.bmd-drawer-in')), as well
+// as responsive sizes (i.e. bmd-drawer-in-md will open once the browser is wider than 768px).
+//
+//
+// bmd-drawer-in, bmd-drawer-in-sm, bmd-drawer-in-md, bmd-drawer-in-lg
+// We iterate over the standard grid breakpoints, but we also need styles for the simpler `bmd-drawer-in`
+// without a size (for triggered openings). Since the xs size is 0, instead of using `bmd-drawer-in-xs`
+// (which is mostly meaningless), we create `bmd-drawer-in` meaning always open.
+//
+// NOTE: bmd-drawer-in-* uses media-breakpoint-up()
+//
+// bmd-drawer-out
+// A marker class that will _force_ the drawer closed regardless of the responsive class present. If (for some
+// strange reason) both bmd-drawer-out and bmd-drawer-in are present, it appears that the closed option wins.
+//
+// bmd-drawer-overlay, bmd-drawer-overlay-sm, bmd-drawer-overlay-md, bmd-drawer-overlay-lg
+// We iterate over the standard grid breakpoints, but we also need styles for the simpler `bmd-drawer-overlay`.
+// Since the xs size is 0, instead of using `bmd-drawer-overlay-xs`, we create `bmd-drawer-overlay` meaning always overlay.
+//
+// NOTE: bmd-drawer-overlay-* uses media-breakpoint-down() - this is because we usually want a responsive overlay to be used in small screen scenarios.
+//
+
+//
+// Drawer open positioning, and style options (push is default, overlay is optional)
+:not(.bmd-drawer-out) { // first eliminate positioning or sizing rules if the drawer is already forced closed
+ @each $breakpoint in map-keys($grid-breakpoints) {
+
+ @include bmd-drawer-x-in-up($bmd-drawer-x-size, $breakpoint);
+ @include bmd-drawer-y-in-up($bmd-drawer-y-size, $breakpoint);
+
+ @include bmd-drawer-x-overlay-down($breakpoint);
+ @include bmd-drawer-y-overlay-down($breakpoint);
+ }
+}
+
+////----
+//// Example 1: creates a media responsive kitchen-sink-drawer that pairs with bmd-drawer-in-lg and allows for the bmd-drawer-in trigger
+//.kitchen-sink-drawer {
+// $custom-size: 500px;
+// @include bmd-drawer-x-out($custom-size);
+// &:not(.bmd-drawer-out) {
+// @each $breakpoint in map-keys($grid-breakpoints) {
+// @include bmd-drawer-x-in-up($custom-size, $breakpoint);
+// }
+// }
+//}
+//
+////
+////----
+//// Example 2: creates a NON-responsive kitchen-sink-drawer and allows for the bmd-drawer-in trigger
+//.kitchen-sink-drawer-static {
+// $custom-size: 500px;
+// @include bmd-drawer-x-out($custom-size); // closed by default
+// @include bmd-drawer-x-in($custom-size); // triggered with bmd-drawer-in
+// @include bmd-drawer-x-overlay(); // overlay by default, no other classes necessary
+//}
+
diff --git a/templates/assets/bootstrap-material-design/scss/_dropdown.scss b/templates/assets/bootstrap-material-design/scss/_dropdown.scss
new file mode 100644
index 0000000..e5dd23e
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/_dropdown.scss
@@ -0,0 +1,126 @@
+// Menus https://www.google.com/design/spec/components/menus.html#menus-specs
+// Dropdown buttons (mobile and desktop) https://www.google.com/design/spec/components/buttons.html#buttons-dropdown-buttons
+
+@mixin menu-bottom-left {
+ top: 100%;
+ left: 0;
+ transform-origin: 0 0;
+}
+
+@mixin menu-bottom-right {
+ right: 0;
+ left: auto;
+ transform-origin: 100% 0;
+}
+
+.dropdown-menu {
+ display: block; // utilize transition transform instead of flipping display
+ padding: .25rem 0;
+ border: 0;
+ opacity: 0;
+ transition: transform $bmd-menu-expand-duration $bmd-animation-curve-default, opacity $bmd-menu-fade-duration $bmd-animation-curve-default;
+ transform: scale(0);
+ transform-origin: 0 0;
+ will-change: transform;
+
+ @include media-breakpoint-up(md) {
+ padding: .5rem 0;
+ }
+
+ .open > & {
+ //z-index: 999;
+ opacity: 1;
+ transform: scale(1);
+ }
+
+ // Default the alignment of the dropdown to originate on the bottom right of the button
+ @include menu-bottom-right();
+ // FIXME: bootstrap alignment issue - https://github.com/twbs/bootstrap/issues/18852
+
+ &.dropdown-menu-left {
+ @include menu-bottom-left();
+ }
+
+ &.dropdown-menu-right {
+ @include menu-bottom-right();
+ }
+
+ //&.dropdown-menu-top-left {
+ // top: auto;
+ // bottom: 0; // needs to be overridden with the toggle-button height, see bmd-btn-icon above
+ // transform-origin: 0 100%;
+ //}
+ //
+ //&.dropdown-menu-top-right {
+ // top: auto;
+ // right: 0;
+ // bottom: 0; // needs to be overridden with the toggle-button height, see bmd-btn-icon above
+ // left: auto;
+ // transform-origin: 100% 100%;
+ //}
+
+ // https://www.google.com/design/spec/components/menus.html#menus-specs
+ .dropdown-item {
+ // used to properly size the ripple container
+ position: relative;
+
+ display: flex;
+ flex-flow: row wrap;
+ align-items: center;
+
+ min-width: $bmd-menu-item-min-width;
+ max-width: $bmd-menu-item-max-width;
+ min-height: $bmd-menu-item-min-height;
+
+ padding: $bmd-menu-item-padding-top $bmd-menu-item-padding-right $bmd-menu-item-padding-bottom $bmd-menu-item-padding-left;
+
+ // FIXME: multi-line menu word wrapping doesn't work - see the maximum width example in menus.md
+ overflow: hidden;
+ line-height: $bmd-menu-line-height;
+ text-overflow: ellipsis;
+ word-wrap: break-word;
+
+
+ // Simple menus always maintain a 16dp margin (phone) or 24dp margin (tablet) to the left and right edges of the screen.
+ @include media-breakpoint-up(md) {
+ padding-right: $bmd-menu-item-padding-right-md;
+ padding-left: $bmd-menu-item-padding-left-md;
+ }
+ }
+}
+
+
+// this could be in a .btn-group or .dropdown
+.dropdown-toggle {
+
+ &.bmd-btn-icon,
+ &.bmd-btn-fab {
+ // remove the dropdown icon
+ &::after {
+ display: none;
+ }
+
+ ~ .dropdown-menu {
+ &.dropdown-menu-top-left,
+ &.dropdown-menu-top-right {
+ bottom: $bmd-btn-icon-size; // push up the bottom of the menu the height of the button
+ }
+ }
+ }
+
+ &.bmd-btn-fab-sm {
+ ~ .dropdown-menu {
+ &.dropdown-menu-top-left,
+ &.dropdown-menu-top-right {
+ bottom: $bmd-btn-fab-size-sm; // push up the bottom of the menu the height of the button
+ }
+ }
+ }
+
+ &.bmd-btn-icon {
+ ~ .dropdown-menu {
+ // collapse some spacing
+ margin: 0;
+ }
+ }
+}
diff --git a/templates/assets/bootstrap-material-design/scss/_extensions.scss b/templates/assets/bootstrap-material-design/scss/_extensions.scss
new file mode 100644
index 0000000..ea69117
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/_extensions.scss
@@ -0,0 +1,3 @@
+// External plugins
+@import "extensions/snackbarjs";
+@import "extensions/selectize";
diff --git a/templates/assets/bootstrap-material-design/scss/_forms.scss b/templates/assets/bootstrap-material-design/scss/_forms.scss
new file mode 100644
index 0000000..2961f0b
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/_forms.scss
@@ -0,0 +1,221 @@
+form {
+ // ensure enough room at the bottom of any form to display a one-line bmd-help
+ margin-bottom: ($bmd-help-size-ratio * $font-size-base) * $line-height-base;
+
+ // reverse the above for navbars (no help expected in a navbar form)
+ .navbar & {
+ margin-bottom: 0; // only adjust bottom so that pull-xs-right flexed margin-left: auto works
+
+ .bmd-form-group {
+ display: inline-block;
+ padding-top: 0;
+ }
+
+ .btn {
+ margin-bottom: 0;
+ }
+ }
+}
+
+// -----
+// Inputs
+//
+// Reference http://www.google.com/design/spec/components/text-fields.html
+// MDL implementation: http://www.getmdl.io/components/index.html#textfields-section
+.form-control {
+ background: $bmd-form-control-bg-repeat-y $bmd-form-control-bg-position;
+ background-size: $bmd-form-control-bg-size;
+ border: 0;
+ transition: background 0s ease-out;
+
+ // The border bottom should be static in all states, the decorator will be animated over this.
+ &:focus,
+ .bmd-form-group.is-focused & {
+ background-size: $bmd-form-control-bg-size-active;
+ //border-bottom: $input-btn-border-width solid $input-border-color;
+ transition-duration: 0.3s;
+ }
+}
+
+// Help blocks (not in v4)
+// position: absolute approach - uses no vertical space and there is no form jumping, but text wrapping - not so good.
+// FIXME: width/wrapping isn't automatic and overflows occur. What are some solutions?
+//
+.bmd-help {
+ position: absolute;
+ display: none;
+ font-size: .8rem;
+ font-weight: normal;
+ @extend .text-muted;
+
+ .bmd-form-group.is-focused & {
+ display: block;
+ }
+
+ //--------------------------------------
+ // Multiple help blocks
+ // - absolute positioning is used above to prevent bouncing
+ // - when there is more than one, this will bounce but will at least show
+ &:nth-of-type(2) {
+ padding-top: 1rem; // the first one requires top padding to push it below the first one which is absolute positioned
+ }
+
+ + .bmd-help {
+ position: relative;
+ margin-bottom: 0;
+ }
+}
+
+// -----
+// State coloring: default, success, info, warning, danger
+//
+@include bmd-selection-color();
+@include bmd-form-color($bmd-label-color, $bmd-label-color-focus, $input-border-color);
+
+.has-success {
+ @include bmd-form-color($brand-success, $brand-success, $brand-success);
+}
+
+.has-info {
+ @include bmd-form-color($brand-info, $brand-info, $brand-info);
+}
+
+.has-warning {
+ @include bmd-form-color($brand-warning, $brand-warning, $brand-warning);
+}
+
+.has-danger {
+ @include bmd-form-color($brand-danger, $brand-danger, $brand-danger);
+}
+
+// Reference http://www.google.com/design/spec/components/text-fields.html
+// MDL implementation: http://www.getmdl.io/components/index.html#textfields-section
+//.variations(unquote(" label"), color, $bmd-input-placeholder-color); // default label color variations
+
+// Whereas .form-group adds structure, bmd-form-group just needs to make sure we have enough padding for our labels to work. That's the only purpose.
+.bmd-form-group {
+ position: relative;
+
+ // -----
+ // Labels
+ //
+ // Reference http://www.google.com/design/spec/components/text-fields.html
+ // MDL implementation: http://www.getmdl.io/components/index.html#textfields-section
+ [class^='bmd-label'],
+ [class*=' bmd-label'] {
+ position: absolute;
+ pointer-events: none;
+ transition: 0.3s ease all;
+
+ // hint to browser for optimization
+ &.bmd-label-floating {
+ will-change: left, top, contents; // TODO: evaluate effectiveness - looking for community feedback
+ }
+ }
+
+ // hide label-placeholders when the field is filled
+ &.is-filled .bmd-label-placeholder {
+ display: none;
+ }
+
+ // Optional class to make the text field inline collapsible/expandable (collapsed by default)
+ // This uses the BS collapse js to make the width expand.
+ // `width` class must also be on the element FIXME: do this with JS, it is a marker class and should be implicit because after all, we are an bmd-collapse-inline
+ // FIXME: js needs to do the focus on shown.bs.collapse event http://v4-alpha.getbootstrap.com/components/collapse/#events
+ &.bmd-collapse-inline {
+ padding: 0; // get rid of any padding as this is a width transition
+
+ // Expandable Holder.
+ .collapse {
+ &.in {
+ // This is an unfortunate hack. Animating between widths in percent (%)
+ // in many browsers (Chrome, Firefox) only animates the inner visual style
+ // of the input - the outer bounding box still 'jumps'.
+ // Thus assume a sensible maximum, and animate to/from that value.
+ max-width: 600px;
+ }
+ }
+
+ .collapsing,
+ .width:not(.collapse), // collapsing is removed and momentarily only width is present
+ .collapse.in {
+ display: inline-block;
+ }
+
+ .collapsing {
+ @include material-animation-default();
+ }
+ }
+
+ // default floating size/location with an bmd-form-group
+ @include bmd-form-size-variant($font-size-base, $bmd-label-top-margin-base, $input-padding-y, $bmd-form-line-height, "bmd-form-group default");
+
+ // sm floating size/location
+ &.bmd-form-group-sm {
+ @include bmd-form-size-variant($font-size-sm, $bmd-label-top-margin-sm, $input-padding-y-sm, $bmd-form-line-height-sm, "bmd-form-group sm");
+ }
+
+ // lg floating size/location
+ &.bmd-form-group-lg {
+ @include bmd-form-size-variant($font-size-lg, $bmd-label-top-margin-lg, $input-padding-y-lg, $bmd-form-line-height-sm, "bmd-form-group lg");
+ }
+}
+
+// default floating size/location without a form-group (will skip form-group styles, and just render default sizing variation) - IMPORTANT for non-form-group spacing such as radio/checkbox/switch
+@include bmd-form-size-variant($font-size-base, $bmd-label-top-margin-base, $input-padding-y, $bmd-form-line-height);
+
+select {
+ &,
+ &.form-control {
+ // Use vendor prefixes as `appearance` isn't part of the CSS spec. OSX doesn't obey the border-radius: 0 without this.
+ -moz-appearance: none;
+ -webkit-appearance: none;
+ }
+}
+
+// Input files - hide actual input - requires specific markup in the sample.
+//.bmd-form-group input[type=file] {
+// opacity: 0;
+// position: absolute;
+// top: 0;
+// right: 0;
+// bottom: 0;
+// left: 0;
+// width: 100%;
+// height: 100%;
+// z-index: 100;
+//}
+
+//
+//
+//.form-horizontal {
+//
+// // Consistent vertical alignment of radios and checkboxes
+// .radio,
+// .checkbox,
+// .radio-inline,
+// .checkbox-inline {
+// padding-top: 0;
+// }
+//
+// .radio {
+// margin-bottom: 10px;
+// }
+//
+// label {
+// text-align: right;
+// }
+//
+// label {
+// margin: 0;
+// }
+//}
+
+.form-inline {
+ @include media-breakpoint-up(sm) {
+ .input-group {
+ display: inline-flex;
+ align-items: center;
+ }
+ }
+}
diff --git a/templates/assets/bootstrap-material-design/scss/_input-group.scss b/templates/assets/bootstrap-material-design/scss/_input-group.scss
new file mode 100644
index 0000000..7c72cf9
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/_input-group.scss
@@ -0,0 +1,39 @@
+// -----------------------------------------
+// input-group and input-group-addon styles
+// note: form-groups are not required
+//
+@mixin input-group-button-variation($vertical-padding) {
+ .input-group-btn {
+ .btn {
+ //margin: 0 0 $vertical-padding 0;
+ }
+ }
+}
+
+// default margin - no form-group required
+@include input-group-button-variation(input-padding-y);
+
+&.bmd-form-group-sm {
+ @include input-group-button-variation($input-padding-y-sm);
+}
+
+&.bmd-form-group-lg {
+ @include input-group-button-variation($input-padding-y-lg);
+}
+
+.input-group { // may be in or outside of form-group
+
+ .input-group-addon {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ background-color: transparent;
+ border-color: transparent;
+ }
+
+ .input-group-addon + input,
+ input + .input-group-addon {
+ margin-left: .75rem;
+ }
+}
diff --git a/templates/assets/bootstrap-material-design/scss/_layout.scss b/templates/assets/bootstrap-material-design/scss/_layout.scss
new file mode 100644
index 0000000..82faef0
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/_layout.scss
@@ -0,0 +1,80 @@
+// This is a set of flex-based layout containers necessary for components such as the drawer.
+// It allows for flex based positioning such as sticky header and footer inside an bmd-layout, with a
+// bmd-layout-content that scrolls.
+
+// mobile webkit smooth scrolling: http://stackoverflow.com/a/15147497/2363935
+
+// First element
+.bmd-layout-canvas { // added by js?
+ position: absolute;
+ width: 100%;
+ height: 100%;
+}
+
+// Primary layout container, belongs inside a bmd-layout-canvas.
+.bmd-layout-container {
+ position: relative;
+ display: flex;
+ flex-direction: column; // allows for sticky header and footer
+ width: 100%;
+ height: 100%;
+ overflow-x: hidden;
+ overflow-y: auto;
+ -webkit-overflow-scrolling: touch; // mobile webkit smooth scrolling
+}
+
+// Header layout (fixed top), belongs in a bmd-layout-container
+.bmd-layout-header {
+ z-index: 3;
+ display: flex;
+ flex-direction: column; // since this is a column, it is necessary that something like an actual navbar is a child
+ flex-wrap: nowrap;
+ flex-shrink: 0;
+ justify-content: flex-start;
+ width: 100%;
+ max-height: 1000px;
+ transform: translateZ(0); // mobile webkit smooth scrolling
+ @include material-animation-default();
+}
+
+// Content layout, belongs in a bmd-layout-container
+.bmd-layout-content {
+ position: relative;
+ z-index: 1; // under a header
+ display: inline-block;
+ //-ms-flex: 0 1 auto; // Fix IE10 bug.
+ flex-grow: 1;
+ overflow-x: hidden;
+ overflow-y: auto; // mobile webkit smooth scrolling may need scroll, but auto seems to be working and omits the scroll border
+ -webkit-overflow-scrolling: touch; // mobile webkit smooth scrolling
+ @include material-animation-default();
+}
+
+// Pushes flex-based content to the other end (x or y)
+.bmd-layout-spacer {
+ flex-grow: 1;
+}
+
+// Backdrop - generic backdrop to be used by other components i.e. drawer in overlay mode
+.bmd-layout-backdrop {
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 4;
+ width: 100%;
+ height: 100%;
+ visibility: hidden;
+ background-color: transparent;
+ transition-property: background-color;
+ @include material-animation-default();
+
+ @supports (pointer-events: auto) {
+ background-color: rgba(0, 0, 0, 0.5);
+ opacity: 0;
+ transition-property: opacity;
+ visibility: visible;
+ pointer-events: none;
+ }
+
+ // NOTE: the &.in style is responsive, generated by @mixin bmd-layout-backdrop-in() where needed.
+}
diff --git a/templates/assets/bootstrap-material-design/scss/_list-group.scss b/templates/assets/bootstrap-material-design/scss/_list-group.scss
new file mode 100644
index 0000000..1f36c64
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/_list-group.scss
@@ -0,0 +1,100 @@
+// https://www.google.com/design/spec/components/lists.html#lists-specs
+
+// - single line 48dp
+// - single line avatar 56dp
+// - double line (with and w/o avatar) 72dp
+// - triple line 88dp
+
+.list-group {
+ // #853 start -- https://github.com/twbs/bootstrap/pull/18981/files
+ @if $enable-flex {
+ display: flex;
+ flex-direction: column;
+ }
+ // #853 end -- https://github.com/twbs/bootstrap/pull/18981/files
+
+ flex-grow: 1;
+
+ // Add 8dp of padding at the top and bottom of a list. One exception is at the top of a list with a subheader, because subheaders contain their own padding.
+ padding: .5rem 0;
+
+ // dense size variation
+ &.bmd-list-group-sm {
+ padding: .25rem 0;
+
+ .list-group-item {
+ padding: .5rem 1rem;
+ }
+ }
+}
+
+.bmd-list-group-col {
+ display: flex;
+ flex-direction: column;
+ min-width: 0;
+ //flex-shrink: 0;
+}
+
+.list-group-item {
+ // #853 start -- https://github.com/twbs/bootstrap/pull/18981/files
+ @if $enable-flex {
+ display: flex;
+ flex-flow: row wrap;
+ align-items: center;
+ } @else {
+ display: block;
+ }
+ // #853 end -- https://github.com/twbs/bootstrap/pull/18981/files
+ padding: 1rem;
+ line-height: 1;
+
+ .list-group-item-text { // word wrap? http://stackoverflow.com/a/26535469/2363935
+ //flex-flow: row wrap;
+ min-width: 0;
+ max-height: 2.188rem; // 88dp tile total height
+ // FIXME: text overflow with ellipsis is not working
+ //flex: 0 1 auto; // http://stackoverflow.com/questions/12022288/how-to-keep-a-flex-item-from-overflowing-due-to-its-text
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+
+ //------
+ // NOTE: there are many variations of icons/labels in a list, each one of these rules exist for a reason.
+
+ // first icon/label on the left
+ :first-child {
+ margin-right: 2rem; // single line icon is 72dp to text (16 pad + 24 icon + 32 margin)
+ }
+
+ // second icon/label, or only icon/label marked as 'pull-*-right', or any direct child element marked as right
+ > .pull-xs-right,
+ > .pull-sm-right,
+ > .pull-md-right,
+ > .pull-lg-right,
+ > .pull-xl-right,
+ > * ~ .label:last-child,
+ > * ~ .material-icons:last-child {
+ margin-right: 0; // some variations actually match the first-child
+ margin-left: auto;
+ }
+
+ // add the padding to icons (margin-left is used for alignment)
+ .material-icons.pull-xs-right, // need the specificity
+ .material-icons.pull-sm-right,
+ .material-icons.pull-md-right,
+ .material-icons.pull-lg-right,
+ .material-icons.pull-xl-right,
+ .material-icons ~ .material-icons:last-child {
+ padding-left: 1rem; // guarantee space per spec
+ }
+ //------
+
+ .list-group-item-heading {
+ //font-size: 1rem;
+ }
+
+ .list-group-item-text {
+ font-size: .875rem;
+ color: $gray;
+ }
+}
diff --git a/templates/assets/bootstrap-material-design/scss/_mixins.scss b/templates/assets/bootstrap-material-design/scss/_mixins.scss
new file mode 100644
index 0000000..a322dcb
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/_mixins.scss
@@ -0,0 +1,10 @@
+@import "mixins/utilities";
+@import "mixins/breakpoints";
+@import "mixins/animations";
+@import "mixins/type";
+@import "mixins/layout";
+@import "mixins/drawer";
+@import "mixins/forms";
+@import "mixins/buttons";
+@import "mixins/hover";
+@import "mixins/navs";
diff --git a/templates/assets/bootstrap-material-design/scss/_modal.scss b/templates/assets/bootstrap-material-design/scss/_modal.scss
new file mode 100644
index 0000000..152591e
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/_modal.scss
@@ -0,0 +1,26 @@
+// Modals
+// https://www.google.com/design/spec/components/dialogs.html#dialogs-specs
+
+.modal-content {
+ border: 0;
+ border-radius: $border-radius;
+
+ .modal-header {
+ padding: 24px 24px 0;
+ border-bottom: 0;
+ }
+ .modal-body {
+ padding: 20px 24px 24px;
+ }
+ .modal-footer {
+ padding: 8px 8px 8px 24px;
+ border-top: 0;
+ .btn {
+ margin: 0;
+ }
+
+ .btn + .btn {
+ margin-left: 8px;
+ }
+ }
+}
diff --git a/templates/assets/bootstrap-material-design/scss/_nav.scss b/templates/assets/bootstrap-material-design/scss/_nav.scss
new file mode 100644
index 0000000..5df047e
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/_nav.scss
@@ -0,0 +1,54 @@
+// https://www.google.com/design/spec/components/tabs.html#tabs-specs
+
+.nav-link {
+ //line-height: $bmd-nav-link-line-height; // set baseline line-height and font sizes
+ text-transform: uppercase;
+}
+
+// navbars
+.navbar-nav {
+ .nav-link {
+ padding: $bmd-navbar-link-padding;
+ font-size: $bmd-navbar-link-font-size;
+ font-weight: $bmd-navbar-link-font-weight;
+ }
+}
+
+
+// pills and tabs
+.nav-tabs,
+.nav-pills {
+ border: 0;
+
+ .nav-link {
+ padding: $bmd-nav-tabs-pills-link-padding;
+ font-size: $bmd-nav-tabs-pills-font-size;
+ font-weight: $bmd-nav-tabs-pills-font-weight;
+ border: 0;
+ }
+}
+
+// tabs only
+.nav-tabs {
+ .nav-link {
+ border-bottom: $bmd-nav-tabs-border-size solid transparent;
+ }
+
+ // colors
+ @include bmd-tabs-color($bmd-nav-tabs-color, $bmd-nav-tabs-active-color, $bmd-nav-tabs-active-border-color, $bmd-nav-tabs-disabled-link-color, $bmd-nav-tabs-disabled-link-color-hover);
+
+ &.bg-primary {
+ @include bmd-tabs-color($bmd-nav-tabs-primary-color, $bmd-nav-tabs-primary-active-color, $bmd-nav-tabs-primary-active-border-color, $bmd-nav-tabs-primary-disabled-link-color, $bmd-nav-tabs-primary-disabled-link-color-hover);
+ }
+
+ &.bg-inverse {
+ @include bmd-tabs-color($bmd-nav-tabs-inverse-color, $bmd-nav-tabs-inverse-active-color, $bmd-nav-tabs-inverse-active-border-color, $bmd-nav-tabs-inverse-disabled-link-color, $bmd-nav-tabs-inverse-disabled-link-color-hover);
+ }
+}
+
+// used to correctly size ripple container
+.nav {
+ .nav-item {
+ position: relative;
+ }
+}
diff --git a/templates/assets/bootstrap-material-design/scss/_navbar.scss b/templates/assets/bootstrap-material-design/scss/_navbar.scss
new file mode 100644
index 0000000..dfb01bc
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/_navbar.scss
@@ -0,0 +1,31 @@
+.navbar {
+ z-index: 1; // required to make the shadow overlap the below content (need is visible in mobile drawer overlay)
+ border: 0;
+ border-radius: 0;
+ @include box-shadow($bmd-shadow-2dp);
+
+ // give correct size to ripple container
+ .navbar-brand {
+ position: relative;
+ }
+
+ // #853 start - https://github.com/twbs/bootstrap/pull/18976/files
+ @if $enable-flex {
+ display: flex;
+ flex-flow: row nowrap;
+ flex-shrink: 0;
+ align-items: center;
+ align-self: stretch;
+
+ > * {
+ flex-shrink: 0;
+ }
+ } @else {
+ @include clearfix;
+ }
+ // #853 end - https://github.com/twbs/bootstrap/pull/18976/files
+
+ > .container {
+ flex: 1;
+ }
+}
diff --git a/templates/assets/bootstrap-material-design/scss/_pagination.scss b/templates/assets/bootstrap-material-design/scss/_pagination.scss
new file mode 100644
index 0000000..ee4a7a2
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/_pagination.scss
@@ -0,0 +1,52 @@
+.page-item {
+ &:first-child .page-link {
+ @include border-left-radius(4em);
+ }
+ &:last-child .page-link {
+ @include border-right-radius(4em);
+ margin-right: 0;
+ }
+
+ &:first-child,
+ &:last-child {
+ .page-link {
+ display: flex;
+ justify-content: center;
+ padding-right: 0;
+ padding-left: 0;
+ > .material-icons {
+ font-size: 1.5em;
+ }
+ }
+ }
+}
+
+.page-link {
+ min-width: 2.6em;
+ margin-right: 0.5em;
+ text-align: center;
+ border-radius: 4em;
+
+ @include hover-focus {
+ text-decoration: none;
+ }
+}
+
+
+//
+// Sizing
+//
+
+.pagination-lg {
+ .page-link {
+ min-width: 2.8em;
+ }
+ @include pagination-size($pagination-padding-y-lg, $pagination-padding-x-lg, $font-size-lg, $line-height-lg, 4em);
+}
+
+.pagination-sm {
+ .page-link {
+ min-width: 2.2em;
+ }
+ @include pagination-size($pagination-padding-y-sm, $pagination-padding-x-sm, $font-size-sm, $line-height-sm, 4em);
+}
diff --git a/templates/assets/bootstrap-material-design/scss/_popover.scss b/templates/assets/bootstrap-material-design/scss/_popover.scss
new file mode 100644
index 0000000..2f347ae
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/_popover.scss
@@ -0,0 +1,19 @@
+//
+//.popover, .tooltip-inner {
+// line-height: 1em;
+// color: $bmd-popover-color;
+// background: $bmd-popover-background;
+// border: 0;
+// border-radius: $border-radius;
+// @include box-shadow($bmd-shadow-2dp);
+//}
+//
+//.tooltip, .tooltip.in {
+// opacity: 1;
+//}
+//
+//.popover, .tooltip {
+// .arrow, .tooltip-arrow {
+// display: none;
+// }
+//}
diff --git a/templates/assets/bootstrap-material-design/scss/_progress.scss b/templates/assets/bootstrap-material-design/scss/_progress.scss
new file mode 100644
index 0000000..3a3b48c
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/_progress.scss
@@ -0,0 +1,11 @@
+
+.progress {
+ height: 4px;
+ background: #c8c8c8;
+ border-radius: 0;
+ box-shadow: none;
+ .progress-bar {
+ box-shadow: none;
+ //@include variations(unquote(".progress-bar"), unquote(""), background-color, $brand-primary);
+ }
+}
diff --git a/templates/assets/bootstrap-material-design/scss/_radios.scss b/templates/assets/bootstrap-material-design/scss/_radios.scss
new file mode 100644
index 0000000..6c70f45
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/_radios.scss
@@ -0,0 +1,119 @@
+.radio label,
+label.radio-inline {
+ position: relative;
+ padding-left: $bmd-radio-size + $bmd-radio-label-padding; // absolutely positioned so add the radio size
+
+ .bmd-radio-outer-circle, // don't use generic span, it may conflict with span in user markup #693
+ .bmd-radio-inner-circle {
+ position: absolute;
+ top: calc-top($line-height-base, $font-size-base, $bmd-radio-size); // vertical center of line-height
+ left: 0;
+ display: inline-block;
+ width: $bmd-radio-size;
+ height: $bmd-radio-size;
+ cursor: pointer;
+ transition-duration: 0.2s;
+
+ &.bmd-radio-outer-circle {
+ border: $bmd-radio-border solid $bmd-radio-color-off;
+ border-radius: 50%;
+ transition: border-color ease .28s;
+ }
+ &.bmd-radio-inner-circle {
+ display: inline-block;
+ background-color: $bmd-radio-color-on;
+ border-radius: 50%;
+ transition: transform ease .28s;
+ transform: scale3d(0, 0, 0);
+
+ // focus/press ripple
+ &::after {
+ position: absolute;
+ top: -#{$bmd-radio-ripple-offset};
+ left: -#{$bmd-radio-ripple-offset};
+ z-index: 1;
+ display: block;
+ width: 50px;
+ height: 50px;
+ margin: 0;
+ content: "";
+ background-color: $gray-dark;
+ border-radius: 100%;
+ opacity: 0;
+ transform: scale3d(1.5, 1.5, 1);
+ }
+ }
+ }
+
+ input[type=radio] {
+ // Hide native radio
+ position: absolute;
+ left: 0;
+ z-index: -1;
+ width: 0;
+ height: 0;
+ margin: 0;
+ overflow: hidden;
+ pointer-events: none;
+ opacity: 0;
+
+ &:checked {
+ @include bmd-radio-color($bmd-radio-color-on);
+
+ ~ .bmd-radio-inner-circle {
+ transform: scale3d(0.55, 0.55, 1);
+ &::after {
+ animation: rippleOn;
+
+ .is-focused & {
+ // Prevent ripple effect on page load
+ animation: rippleOn 500ms;
+ }
+ }
+ }
+ }
+
+ &:not(:checked) ~ .bmd-radio-inner-circle::after {
+ animation: rippleOff 500ms;
+ }
+
+ &[disabled],
+ &:disabled,
+ fieldset[disabled] & {
+
+ + .bmd-radio-outer-circle {
+ cursor: default;
+ }
+
+ @include bmd-radio-color($bmd-radio-color-disabled);
+
+ .bg-inverse & {
+ @include bmd-radio-color($bmd-radio-color-disabled-inverse);
+ }
+ }
+ }
+}
+
+@keyframes rippleOn {
+ 0% {
+ opacity: 0;
+ }
+ 50% {
+ opacity: 0.2;
+ }
+ 100% {
+ opacity: 0;
+ }
+}
+
+@keyframes rippleOff {
+ 0% {
+ opacity: 0;
+ }
+ 50% {
+ opacity: 0.2;
+ }
+ 100% {
+ opacity: 0;
+ }
+}
diff --git a/templates/assets/bootstrap-material-design/scss/_reboot.scss b/templates/assets/bootstrap-material-design/scss/_reboot.scss
new file mode 100644
index 0000000..8e503fa
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/_reboot.scss
@@ -0,0 +1,25 @@
+body {
+ font-weight: $bmd-font-weight-base;
+}
+
+a {
+ &:focus {
+ outline: none; // remove the terrible @include tab-focus();
+ }
+}
+
+button:focus {
+ outline: none;
+ //outline: 1px dotted;
+ //outline: 5px auto -webkit-focus-ring-color;
+}
+
+
+//// Prevent highlight on mobile
+//* {
+// -webkit-tap-highlight-color: rgba($white, 0);
+// -webkit-tap-highlight-color: transparent;
+// &:focus {
+// outline: 0;
+// }
+//}
diff --git a/templates/assets/bootstrap-material-design/scss/_ripples.scss b/templates/assets/bootstrap-material-design/scss/_ripples.scss
new file mode 100644
index 0000000..7d7a45a
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/_ripples.scss
@@ -0,0 +1,40 @@
+// marker class (used as a selector for one-off elements to decorate)
+.ripple {
+ position: relative;
+}
+
+.ripple-container {
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 1;
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+ pointer-events: none;
+ border-radius: inherit;
+
+ .ripple-decorator {
+ position: absolute;
+ width: 20px;
+ height: 20px;
+ margin-top: -10px;
+ margin-left: -10px;
+ pointer-events: none;
+ background-color: rgba($black, 0.05);
+ border-radius: 100%;
+ opacity: 0;
+ transform: scale(1);
+ transform-origin: 50%;
+
+ &.ripple-on {
+ opacity: 0.1;
+ transition: opacity 0.15s ease-in 0s, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
+ }
+
+ &.ripple-out {
+ opacity: 0;
+ transition: opacity 0.1s linear 0s !important;
+ }
+ }
+}
diff --git a/templates/assets/bootstrap-material-design/scss/_switches.scss b/templates/assets/bootstrap-material-design/scss/_switches.scss
new file mode 100644
index 0000000..b06444d
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/_switches.scss
@@ -0,0 +1,83 @@
+// http://codepen.io/rosskevin/pen/EPPwRR?editors=110
+.switch {
+ label {
+ position: relative;
+ padding-left: $bmd-switch-width + $bmd-switch-label-padding; // absolutely positioned so add the radio size
+
+ .bmd-switch-track {
+ position: absolute;
+ top: calc-top($line-height-base, $font-size-base, $bmd-switch-height);
+ left: 0;
+ display: inline-block;
+ width: $bmd-switch-width;
+ height: $bmd-switch-height;
+ cursor: pointer;
+ background-image: linear-gradient(
+ to right,
+ $bmd-switch-unchecked-bg 0%,
+ $bmd-switch-unchecked-bg 50%,
+ $bmd-switch-checked-bg 50%,
+ $bmd-switch-checked-bg 100%
+ );
+ background-position: 0%;
+ background-size: $bmd-switch-width * 2 $bmd-switch-height;
+ border-radius: $bmd-switch-width;
+ transition: background-position 0.2s ease-in;
+
+ &::after {
+ position: absolute;
+ top: 50%;
+ left: 0;
+ display: block;
+ align-self: center;
+ width: $bmd-switch-handle-size;
+ height: $bmd-switch-handle-size;
+ content: "";
+ background: $bmd-switch-handle-unchecked-bg;
+ border-radius: 100%;
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
+ transition: left 0.2s ease-in, background-color 0.2s ease-in, transform 0.3s ease;
+ transform: translateY(-50%);
+ }
+
+ // Jelly effect on click
+ &:active::after {
+ transform: translateY(-50%) scale3d(1.15, 0.85, 1);
+ }
+ }
+
+ input {
+ // Hide original checkbox, but don't use `display: none` to allow focus on it using keyboard
+ position: absolute;
+ display: block;
+ width: 0;
+ height: 0;
+ opacity: 0;
+
+ &:checked {
+ + .bmd-switch-track {
+ background-position: -100%;
+ &::after {
+ left: unquote("calc(100% - #{$bmd-switch-handle-size})"); //calc(100% - $bmd-switch-handle-size);
+ background-color: $bmd-switch-handle-checked-bg;
+ }
+ }
+ }
+
+ &:disabled {
+ // No jelly effect on disabled switchs
+ + .bmd-switch-track:active::after {
+ transform: translateY(-50%);
+ }
+
+ + .bmd-switch-track {
+ cursor: default;
+ background: $bmd-switch-disabled-bg;
+ &::after {
+ background: $bmd-switch-handle-disabled-bg;
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/templates/assets/bootstrap-material-design/scss/_tables.scss b/templates/assets/bootstrap-material-design/scss/_tables.scss
new file mode 100644
index 0000000..258aa90
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/_tables.scss
@@ -0,0 +1,26 @@
+// BS4 has not yet converted the following to variables - keep an eye on it and move to variables when possible.
+.thead-inverse {
+ th {
+ //color: $bmd-inverse; // #fff;
+ //background-color: $gray-dark;
+ }
+}
+.thead-default {
+ th {
+ //color: $gray;
+ //background-color: $bmd-inverse-lighter; //$gray-lighter;
+ }
+}
+
+.table-inverse {
+ color: $bmd-inverse-light; //$gray-lighter;
+ //background-color: $gray-dark;
+
+ //th,
+ //td,
+ //thead th {
+ // border-color: $gray;
+ //}
+}
+
+
diff --git a/templates/assets/bootstrap-material-design/scss/_themes.scss b/templates/assets/bootstrap-material-design/scss/_themes.scss
new file mode 100644
index 0000000..8bb532c
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/_themes.scss
@@ -0,0 +1,6 @@
+// by default, assume light-theme, no need for a marker class.
+
+// this is mostly a marker class, add it to something like the body or container. Subordinates will look for this marker - see buttons
+.bg-inverse {
+ // foo
+}
diff --git a/templates/assets/bootstrap-material-design/scss/_type.scss b/templates/assets/bootstrap-material-design/scss/_type.scss
new file mode 100644
index 0000000..aaee361
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/_type.scss
@@ -0,0 +1,6 @@
+// This needs review, including colors: https://www.google.com/design/spec/style/typography.html#typography-styles
+
+// adjust up the h6 weight
+h6 {
+ font-weight: 500;
+}
diff --git a/templates/assets/bootstrap-material-design/scss/_variables.scss b/templates/assets/bootstrap-material-design/scss/_variables.scss
new file mode 100644
index 0000000..bb2ae79
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/_variables.scss
@@ -0,0 +1,139 @@
+// FIXME: re-examine organization of variables, files, ordering etc. While the ordering works, we need to be sure this is more comprehensible.
+@import "variables/colors";
+@import "variables/shadow";
+
+// redefine ? TODO: do we need this bmd variant? This is used as $body-color
+$gray-lighter: rgba($black, 0.12) !default;
+$gray-light: rgba($black, 0.26) !default;
+$gray: rgba($black, .54) !default; // spec color
+$gray-dark: rgba($black, 0.87) !default; // used for text color - others use grey-600 which is considerably lighter
+
+$bmd-font-weight-base: 400;
+
+// wondering if any of these could still be refactored out, but are definitely in use.
+$bmd-inverse: rgba($white, 1) !default;
+$bmd-inverse-light: rgba($white, 0.84) !default;
+$bmd-inverse-lighter: rgba($white, 0.54) !default;
+
+$bmd-label-color: $gray-light !default;
+$bmd-label-color-inner-focus: $gray !default; // e.g. radio label or text-muted not a control-label which is primary
+
+// Customized BS variables
+@import "variables/bootstrap/components";
+@import "variables/bootstrap/custom-forms";
+@import "variables/bootstrap/spacing";
+@import "variables/bootstrap/body";
+@import "variables/bootstrap/brand";
+@import "variables/bootstrap/buttons";
+@import "variables/bootstrap/card";
+@import "variables/bootstrap/code";
+@import "variables/bootstrap/dropdown";
+@import "variables/bootstrap/forms";
+@import "variables/bootstrap/list-group";
+@import "variables/bootstrap/nav";
+@import "variables/bootstrap/pagination";
+@import "variables/bootstrap/state";
+@import "variables/bootstrap/type";
+@import "variables/bootstrap/modals";
+
+// import their vars after customization for use below
+$enable-flex: true; // fully adopt flexbox layouts
+$enable-shadows: true; // enable shadows, set to false to turn off shadows
+@import "bootstrap/scss/variables"; // from bootstrap node_module
+
+
+//
+@import "variables/layout";
+@import "variables/menu";
+@import "variables/drawer";
+
+$bmd-label-color-focus: $brand-primary !default;
+$bmd-invalid-underline: $red-a700 !default;
+$bmd-readonly-underline: $input-border-color !default;
+
+//---
+// verified in use with refactoring to v4
+
+//---
+//-- unverified below here
+$bmd-brand-inverse: $indigo !default;
+// Typography elements FIXME: review to see if we actually need these
+$icon-color: rgba($black, 0.5) !default;
+
+
+//---
+// FIXME: Similar but not quite the same as Bootstrap variables
+// FIXME: these need to either a) be converted to $bmd- or b) converted to bs variables
+//---
+
+// --------------------
+// inputs
+$bmd-bmd-label-static-size-ratio: 75 / 100 !default;
+$bmd-help-size-ratio: 75 / 100 !default;
+
+//$bmd-form-control-bg-repeat-y: repeat-y !default; // it could work with no-repeat, but on Safari it's bugged and repeat-y is needed, but repeat-y is bugged on the warning icon.
+$bmd-form-control-bg-repeat-y: no-repeat !default;
+$bmd-form-control-bg-position: center bottom, center calc(100% - 1px) !default;
+$bmd-form-control-bg-size: 0 100%, 100% 100% !default;
+$bmd-form-control-bg-size-active: 100% 100%, 100% 100% !default;
+
+// expandable
+$input-text-button-size: 32px !default;
+
+// sizing
+$bmd-form-line-height: 1 !default; // set as 1x font-size so that padding is easier calculated to match the spec.
+$bmd-label-top-margin-base: 1rem !default;
+
+$bmd-form-line-height-lg: 1 !default; // set as 1x font-size so that padding is easier calculated to match the spec.
+$bmd-label-top-margin-lg: 1rem !default; // 16px
+
+$bmd-form-line-height-sm: 1 !default; // set as 1x font-size so that padding is easier calculated to match the spec.
+$bmd-label-top-margin-sm: .75rem !default; // 12px
+
+$text-disabled: #a8a8a8 !default;
+$background-disabled: #eaeaea !default;
+
+// Checkboxes
+$bmd-checkbox-size: 1.25rem !default;
+$bmd-checkbox-animation-ripple: 500ms !default;
+$bmd-checkbox-animation-check: 0.3s !default;
+$bmd-checkbox-checked-color: $brand-primary !default;
+$bmd-checkbox-label-padding: .3125rem !default; // 5px
+
+$bmd-checkbox-border-size: .125rem !default;
+$bmd-checkbox-border-color: $bmd-label-color-inner-focus !default;
+$bmd-checkbox-border-color-disabled: $gray-light !default; //#bdbdbd !default;
+
+// Switches
+$bmd-switch-label-padding: .3125rem !default; // 5px
+$bmd-switch-width: 2.125rem !default; // 34px
+$bmd-switch-height: .875rem !default; // 14px
+$bmd-switch-handle-size: 1.25rem !default; // 20px (was 18px)
+
+$bmd-switch-handle-checked-bg: $brand-primary !default;
+$bmd-switch-handle-unchecked-bg: #f1f1f1 !default;
+$bmd-switch-handle-disabled-bg: #bdbdbd !default;
+$bmd-switch-unchecked-bg: $gray-light !default;
+$bmd-switch-checked-bg: desaturate(lighten($bmd-switch-handle-checked-bg, 28%), 32%); // kind of magic recipe
+$bmd-switch-disabled-bg: $gray-lighter !default;
+
+// Popovers and Popups
+$bmd-popover-background: rgba(101, 101, 101, 0.9) !default;
+$bmd-popover-color: #ececec !default;
+
+// Radio:
+$bmd-radio-border: .125rem !default; // 2px
+$bmd-radio-size: 1.25rem !default;
+$bmd-radio-ripple-offset: 1em !default;
+$bmd-radio-label-padding: .3125rem !default; // 5px
+
+$bmd-radio-color-off: $bmd-label-color-inner-focus !default; // FIXME seems inconsistent, check spec
+$bmd-radio-color-on: $brand-primary !default;
+$bmd-radio-color-disabled: $gray-light; // light theme spec: Disabled: #000000, Opacity 26%
+$bmd-radio-color-disabled-inverse: rgba($white, 0.30); // dark theme spec: Disabled: #FFFFFF, Opacity 30%
+
+// Animations
+$bmd-animation-curve-fast-out-slow-in: cubic-bezier(0.4, 0, 0.2, 1) !default;
+$bmd-animation-curve-linear-out-slow-in: cubic-bezier(0, 0, 0.2, 1) !default;
+$bmd-animation-curve-fast-out-linear-in: cubic-bezier(0.4, 0, 1, 1) !default;
+$bmd-animation-curve-default: $bmd-animation-curve-fast-out-slow-in !default;
diff --git a/templates/assets/bootstrap-material-design/scss/bootstrap-material-design.scss b/templates/assets/bootstrap-material-design/scss/bootstrap-material-design.scss
new file mode 100644
index 0000000..f5f94c7
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/bootstrap-material-design.scss
@@ -0,0 +1,3 @@
+// IMPORTANT: For use of source and variable overrides, import the following file directly, *NOT* this one.
+// This file primarily exists to create the static css distribution.
+@import "core";
diff --git a/templates/assets/bootstrap-material-design/scss/extensions/_selectize.scss b/templates/assets/bootstrap-material-design/scss/extensions/_selectize.scss
new file mode 100644
index 0000000..5117c32
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/extensions/_selectize.scss
@@ -0,0 +1,91 @@
+//// Support for Selectize plugin
+//// http://brianreavis.github.io/selectize.js/
+//
+//.selectize-control.single, .selectize-control.multi {
+// padding: 0;
+// .selectize-input, .selectize-input.input-active {
+//
+// cursor: text;
+// background: transparent;
+// box-shadow: none;
+// border: 0;
+// padding: 0;
+// height: 100%;
+// font-size: 14px;
+// line-height: 30px;
+// .has-items {
+// padding: 0;
+// }
+// &:after {
+// right: 5px;
+// position: absolute;
+// font-size: 7px;
+// content: "\e894";
+// font-family: "Material-Design-Icons";
+// speak: none;
+// font-style: normal;
+// font-weight: normal;
+// font-variant: normal;
+// text-transform: none;
+// line-height: 4;
+// -webkit-font-smoothing: antialiased;
+// -moz-osx-font-smoothing: grayscale;
+// }
+// input {
+// font-size: 14px;
+// outline: 0;
+// border: 0;
+// background: transparent;
+// }
+// &.bmd-label-floating-fix input {
+// opacity: 0;
+// }
+// > div, > .item {
+// display: inline-block;
+// margin: 0 8px 3px 0;
+// padding: 0;
+// background: transparent;
+// border: 0;
+// &:after {
+// content: ",";
+// }
+// &:last-of-type:after {
+// content: "";
+// }
+// &.active {
+// font-weight: bold;
+// background: transparent;
+// border: 0;
+// }
+// }
+// }
+// .selectize-dropdown {
+// position: absolute;
+// z-index: 1000;
+// border: 0;
+// width: 100% !important;
+// left: 0 !important;
+// height: auto;
+// background-color: #FFF;
+// box-shadow: 0 1px 3px rgba($black, 0.12), 0 1px 2px rgba($black, 0.24);
+// border-radius: $border-radius;
+// padding: 0;
+// margin-top: 3px;
+// .active {
+// background-color: inherit;
+// }
+// .highlight {
+// background-color: #d5d8ff;
+// }
+// .selected, .selected.active {
+// background-color: #EEEEEE;
+// }
+// [data-selectable], .optgroup-header {
+// padding: 10px 20px;
+// cursor: pointer;
+// }
+// }
+// .dropdown-active ~ .selectize-dropdown {
+// display: block;
+// }
+//}
diff --git a/templates/assets/bootstrap-material-design/scss/extensions/_snackbarjs.scss b/templates/assets/bootstrap-material-design/scss/extensions/_snackbarjs.scss
new file mode 100644
index 0000000..8d51741
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/extensions/_snackbarjs.scss
@@ -0,0 +1,27 @@
+//// Support for SnackbarJS plugin
+//// https://github.com/FezVrasta/snackbarjs
+//
+//.snackbar {
+// height: 0;
+// font-size: 14px;
+// color: $bmd-inverse;
+// background-color: #323232;
+// border-radius: $border-radius;
+// transition: transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0s linear 0.2s, padding 0s linear 0.2s, height 0s linear 0.2s;
+// transform: translateY(200%);
+//
+// @include box-shadow($bmd-shadow-2dp);
+//}
+//
+//.snackbar.snackbar-opened {
+// height: auto;
+// padding: 14px 15px;
+// margin-bottom: 20px;
+// transition: transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0s linear 0.2s, height 0s linear 0.2s;
+// transform: none;
+//}
+//
+//// Variations
+//.snackbar.toast {
+// border-radius: 200px;
+//}
diff --git a/templates/assets/bootstrap-material-design/scss/mixins/_animations.scss b/templates/assets/bootstrap-material-design/scss/mixins/_animations.scss
new file mode 100644
index 0000000..d382165
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/mixins/_animations.scss
@@ -0,0 +1,21 @@
+// Animations (from mdl http://www.getmdl.io/)
+
+@mixin material-animation-fast-out-slow-in($duration:0.2s) {
+ transition-duration: $duration;
+ transition-timing-function: $bmd-animation-curve-fast-out-slow-in;
+}
+
+@mixin material-animation-linear-out-slow-in($duration:0.2s) {
+ transition-duration: $duration;
+ transition-timing-function: $bmd-animation-curve-linear-out-slow-in;
+}
+
+@mixin material-animation-fast-out-linear-in($duration:0.2s) {
+ transition-duration: $duration;
+ transition-timing-function: $bmd-animation-curve-fast-out-linear-in;
+}
+
+@mixin material-animation-default($duration:0.2s) {
+ transition-duration: $duration;
+ transition-timing-function: $bmd-animation-curve-default;
+}
diff --git a/templates/assets/bootstrap-material-design/scss/mixins/_breakpoints.scss b/templates/assets/bootstrap-material-design/scss/mixins/_breakpoints.scss
new file mode 100644
index 0000000..441435a
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/mixins/_breakpoints.scss
@@ -0,0 +1,34 @@
+//// case where behavior is responsive, or with a marker class
+//@mixin media-breakpoint-down-or($breakpoint, $name) {
+// #{unquote($name)} {
+// @content
+// }
+//
+// @include media-breakpoint-down($breakpoint) {
+// @content
+// }
+//}
+//
+//// case where behavior is responsive, or with a marker class
+//@mixin media-breakpoint-up-or($breakpoint, $name) {
+// #{unquote($name)} {
+// @content
+// }
+//
+// @include media-breakpoint-up($breakpoint) {
+// @content
+// }
+//}
+//
+//// Name of the previous breakpoint, or null
+////
+//// >> breakpoint-next(sm)
+//// xs
+//// >> breakpoint-next(sm, (xs: 0, sm: 544px, md: 768px))
+//// xs
+//// >> breakpoint-next(sm, $breakpoint-names: (xs sm md))
+//// xs
+//@function breakpoint-previous($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map-keys($breakpoints)) {
+// $n: index($breakpoint-names, $name);
+// @return if($n > 1, nth($breakpoint-names, $n - 1), null);
+//}
diff --git a/templates/assets/bootstrap-material-design/scss/mixins/_buttons.scss b/templates/assets/bootstrap-material-design/scss/mixins/_buttons.scss
new file mode 100644
index 0000000..9d849f1
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/mixins/_buttons.scss
@@ -0,0 +1,218 @@
+// from bs mixins/buttons button-variant
+@mixin bmd-button-variant($color, $background, $focus-background, $active-background, $border, $focus-border, $active-border) {
+ color: $color;
+ background-color: $background;
+ border-color: $border;
+
+ @include hover {
+ color: $color;
+ background-color: $focus-background;
+ border-color: $focus-border;
+ }
+
+ &:focus,
+ &.focus {
+ color: $color;
+ background-color: $focus-background;
+ border-color: $focus-border;
+ }
+
+ &:active,
+ &.active,
+ .open > &.dropdown-toggle {
+ color: $color;
+ background-color: $focus-background;
+ border-color: $focus-border;
+
+ &:hover,
+ &:focus,
+ &.focus {
+ color: $color;
+ background-color: $active-background;
+ border-color: $active-border;
+ }
+ }
+
+ // when it is an icon, kill the active bg on open dropdown, but stabilize on hover
+ .open > &.dropdown-toggle.bmd-btn-icon {
+ color: inherit;
+ background-color: $background;
+
+ // leave hover on with the lighter focus color
+ &:hover {
+ background-color: $focus-background;
+ }
+ }
+
+ &.disabled,
+ &:disabled {
+ &:focus,
+ &.focus {
+ background-color: $background;
+ border-color: $border;
+ }
+ @include hover {
+ background-color: $background;
+ border-color: $border;
+ }
+ }
+}
+
+@mixin bmd-flat-button-variant(
+ $color,
+ $border: $bmd-btn-border,
+ $focus-border: $bmd-btn-focus-bg,
+ $active-border: $bmd-btn-active-bg
+) {
+
+ $background: $bmd-btn-bg;
+ $focus-background: $bmd-btn-focus-bg;
+ $active-background: $bmd-btn-active-bg;
+
+ @include bmd-button-variant($color,
+ $background,
+ $focus-background,
+ $active-background,
+ $border,
+ $focus-border,
+ $active-border);
+
+ // inverse color scheme
+ .bg-inverse & {
+ $focus-background: $bmd-inverse-btn-focus-bg;
+ $focus-border: $bmd-inverse-btn-focus-bg;
+
+ $active-background: $bmd-inverse-btn-active-bg;
+ $active-border: $bmd-inverse-btn-active-bg;
+
+ @include bmd-button-variant($color,
+ $background,
+ $focus-background,
+ $active-background,
+ $border,
+ $focus-border,
+ $active-border);
+ }
+
+ // reverse the above for links
+ &.btn-link {
+ background-color: transparent;
+ }
+}
+
+@mixin bmd-flat-button-color() {
+
+ @include bmd-flat-button-variant($bmd-btn-color);
+
+ // flat bg with text color variations
+ &.btn-primary {
+ @include bmd-flat-button-variant($btn-primary-bg);
+ }
+ &.btn-secondary {
+ @include bmd-flat-button-variant($btn-secondary-color);
+ }
+ &.btn-info {
+ @include bmd-flat-button-variant($btn-info-bg);
+ }
+ &.btn-success {
+ @include bmd-flat-button-variant($btn-success-bg);
+ }
+ &.btn-warning {
+ @include bmd-flat-button-variant($btn-warning-bg);
+ }
+ &.btn-danger {
+ @include bmd-flat-button-variant($btn-danger-bg);
+ }
+}
+
+@mixin bmd-outline-button-color() {
+ &.btn-outline,
+ &.btn-outline-primary,
+ &.btn-outline-secondary,
+ &.btn-outline-info,
+ &.btn-outline-success,
+ &.btn-outline-warning,
+ &.btn-outline-danger {
+ border-color: currentColor;
+ border-style: solid;
+ border-width: 1px;
+ }
+
+ // flat bg with text and border color variations
+ &.btn-outline {
+ @include bmd-flat-button-variant($bmd-btn-color, $bmd-btn-color, $bmd-btn-color, $bmd-btn-color);
+ }
+ &.btn-outline-primary {
+ @include bmd-flat-button-variant($btn-primary-bg, $btn-primary-bg, $btn-primary-bg, $btn-primary-bg);
+ }
+ &.btn-outline-secondary {
+ @include bmd-flat-button-variant($btn-secondary-color, $btn-secondary-color, $btn-secondary-color, $btn-secondary-color);
+ }
+ &.btn-outline-info {
+ @include bmd-flat-button-variant($btn-info-bg, $btn-info-bg, $btn-info-bg, $btn-info-bg);
+ }
+ &.btn-outline-success {
+ @include bmd-flat-button-variant($btn-success-bg, $btn-success-bg, $btn-success-bg, $btn-success-bg);
+ }
+ &.btn-outline-warning {
+ @include bmd-flat-button-variant($btn-warning-bg, $btn-warning-bg, $btn-warning-bg, $btn-warning-bg);
+ }
+ &.btn-outline-danger {
+ @include bmd-flat-button-variant($btn-danger-bg, $btn-danger-bg, $btn-danger-bg, $btn-danger-bg);
+ }
+}
+
+@mixin bmd-raised-button-variant($color, $background, $border) {
+
+ // FIXME: SPEC - this should be the 600 color, how can we get that programmatically if at all? Or are we limited to the color palette only?
+ $focus-background: contrast-color($background, darken($background, 4%), lighten($background, 4%));
+ //$focus-background: darken($background, 10%); // default bootstrap
+ $focus-border: darken($border, 12%);
+
+ $active-background: $focus-background;
+ //$active-background: darken($background, 17%);
+ $active-border: darken($border, 25%);
+
+ @include bmd-button-variant($color,
+ $background,
+ $focus-background,
+ $active-background,
+ $border,
+ $focus-border,
+ $active-border);
+}
+
+@mixin bmd-raised-button-color() {
+
+ &.btn-primary {
+ @include bmd-raised-button-variant($btn-primary-color, $btn-primary-bg, $btn-primary-border);
+ }
+ &.btn-secondary {
+ @include bmd-raised-button-variant($btn-secondary-color, $btn-secondary-bg, $btn-secondary-border);
+ }
+ &.btn-info {
+ @include bmd-raised-button-variant($btn-info-color, $btn-info-bg, $btn-info-border);
+ }
+ &.btn-success {
+ @include bmd-raised-button-variant($btn-success-color, $btn-success-bg, $btn-success-border);
+ }
+ &.btn-warning {
+ @include bmd-raised-button-variant($btn-warning-color, $btn-warning-bg, $btn-warning-border);
+ }
+ &.btn-danger {
+ @include bmd-raised-button-variant($btn-danger-color, $btn-danger-bg, $btn-danger-border);
+ }
+}
+
+@mixin undo-bs-tab-focus() {
+ // clear out the tab-focus() from BS
+ &,
+ &:active,
+ &.active {
+ &:focus,
+ &.focus {
+ //@include tab-focus();
+ outline: 0;
+ }
+ }
+}
diff --git a/templates/assets/bootstrap-material-design/scss/mixins/_drawer.scss b/templates/assets/bootstrap-material-design/scss/mixins/_drawer.scss
new file mode 100644
index 0000000..21c49da
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/mixins/_drawer.scss
@@ -0,0 +1,237 @@
+// Mixins to allow creation of additional custom drawer sizes when using the defaults at the same time
+
+@mixin bmd-drawer-x-out($size) {
+ @each $side, $abbrev in (left: l, right: r) {
+ &.bmd-drawer-f-#{$abbrev} {
+ > .bmd-layout-drawer {
+ // position
+ top: 0;
+ #{$side}: 0;
+
+ width: $size;
+ height: 100%;
+
+ @if $side == left {
+ transform: translateX(-$size - 10px); // initial position of drawer (closed), way off screen
+ } @else {
+ transform: translateX($size + 10px); // initial position of drawer (closed), way off screen
+ }
+ }
+
+ > .bmd-layout-header,
+ > .bmd-layout-content {
+ margin-#{$side}: 0;
+ }
+ }
+ }
+}
+
+@mixin bmd-drawer-y-out($size) {
+ @each $side, $abbrev in (top: t, bottom: b) {
+ &.bmd-drawer-f-#{$abbrev} {
+ > .bmd-layout-drawer {
+ // position
+ #{$side}: 0;
+ left: 0;
+
+ width: 100%;
+ height: $size;
+
+ @if $side == top {
+ transform: translateY(-$size - 10px); // initial position of drawer (closed), way off screen
+ } @else {
+ transform: translateY($size + 10px); // initial position of drawer (closed), way off screen
+ }
+ }
+
+ > .bmd-layout-content {
+ margin-#{$side}: 0;
+ }
+ }
+ }
+}
+
+@function bmd-drawer-breakpoint-name($breakpoint, $suffix: "") {
+ // e.g. &, &-sm, &-md, &-lg
+ $name: "&-#{$breakpoint}#{$suffix}";
+ @if $breakpoint == xs {
+ $name: "&";
+ }
+ @return $name;
+}
+
+@mixin bmd-drawer-x-in($size) {
+ @each $side, $abbrev in (left: l, right: r) {
+ &.bmd-drawer-f-#{$abbrev} {
+ // Push - drawer will push the header and content (default behavior)
+ > .bmd-layout-header {
+ width: calc(100% - #{$size});
+ margin-#{$side}: $size;
+ }
+
+ > .bmd-layout-drawer {
+ transform: translateX(0);
+ }
+
+ > .bmd-layout-content {
+ margin-#{$side}: $size;
+ }
+ }
+ }
+}
+
+@mixin bmd-drawer-y-in($size) {
+ @each $side, $abbrev in (top: t, bottom: b) {
+ &.bmd-drawer-f-#{$abbrev} {
+
+ // 1. Push - drawer will push the header or content
+ > .bmd-layout-header {
+ @if $side == top { // only add margin-top on a header when the drawer is at the top
+ margin-#{$side}: $size;
+ }
+ }
+
+ > .bmd-layout-drawer {
+ transform: translateY(0);
+ }
+
+ > .bmd-layout-content {
+ @if $side == bottom { // only add margin-bottom on content when the drawer is at the bottom
+ margin-#{$side}: $size;
+ }
+ }
+ }
+ }
+}
+
+// breakpoint based open to a particular size
+@mixin bmd-drawer-x-in-up($size, $breakpoint) {
+ // e.g. &, &-sm, &-md, &-lg
+ $name: bmd-drawer-breakpoint-name($breakpoint, "-up");
+
+ &.bmd-drawer-in {
+ #{unquote($name)} { // bmd-drawer-in, bmd-drawer-in-sm, bmd-drawer-in-md, bmd-drawer-in-lg
+
+ @if $breakpoint == xs {
+ // bmd-drawer-in marker class (non-responsive)
+ @include bmd-drawer-x-in($size);
+ } @else {
+
+ // responsive class
+ @include media-breakpoint-up($breakpoint) {
+ // bmd-drawer-f-(left and right) styles
+ @include bmd-drawer-x-in($size);
+ }
+ }
+ }
+ }
+}
+
+// breakpoint based open to a particular size
+@mixin bmd-drawer-y-in-up($size, $breakpoint) {
+ // e.g. &, &-sm, &-md, &-lg
+ $name: bmd-drawer-breakpoint-name($breakpoint, "-up");
+
+ &.bmd-drawer-in {
+ #{unquote($name)} { // bmd-drawer-in, bmd-drawer-in-sm, bmd-drawer-in-md, bmd-drawer-in-lg
+
+ @if $breakpoint == xs {
+ // bmd-drawer-in marker class (non-responsive)
+ @include bmd-drawer-y-in($size);
+ } @else {
+
+ // responsive class
+ @include media-breakpoint-up($breakpoint) {
+ // bmd-drawer-f-(left and right) styles
+ @include bmd-drawer-y-in($size);
+ }
+ }
+ }
+ }
+}
+
+@mixin bmd-drawer-x-overlay() {
+ @include bmd-layout-backdrop-in();
+
+ @each $side, $abbrev in (left: l, right: r) {
+ &.bmd-drawer-f-#{$abbrev} {
+ > .bmd-layout-header,
+ > .bmd-layout-content {
+ width: 100%;
+ margin-#{$side}: 0;
+ }
+ }
+ }
+}
+
+@mixin bmd-drawer-y-overlay() {
+ @include bmd-layout-backdrop-in();
+
+ @each $side, $abbrev in (top: t, bottom: b) {
+ &.bmd-drawer-f-#{$abbrev} {
+ > .bmd-layout-header {
+ @if $side == top { // only add margin-top on a header when the drawer is at the top
+ margin-#{$side}: 0;
+ }
+ }
+
+ > .bmd-layout-content {
+ @if $side == bottom { // only add margin-bottom on content when the drawer is at the bottom
+ margin-#{$side}: 0;
+ }
+ }
+ }
+ }
+}
+
+// Overlay - left/right responsive overlay classes and marker class
+@mixin bmd-drawer-x-overlay-down($breakpoint) {
+ // e.g. &, &-sm, &-md, &-lg
+ $name: bmd-drawer-breakpoint-name($breakpoint, "-down");
+
+ &.bmd-drawer-overlay {
+ #{unquote($name)} { // bmd-drawer-overlay, bmd-drawer-overlay-sm, bmd-drawer-overlay-md, bmd-drawer-overlay-lg
+
+ // x - left/right
+
+ @if $breakpoint == xs { // overlay marker class (non-responsive)
+
+ // Must double up on the .bmd-drawer-overlay class to increase specificity otherwise the
+ // responsive bmd-drawer-in-* media queries above win (and overlay is ignored)
+ &.bmd-drawer-overlay {
+ @include bmd-drawer-x-overlay();
+ }
+ } @else {
+ @include media-breakpoint-down($breakpoint) { // overlay responsive class
+ @include bmd-drawer-x-overlay();
+ }
+ }
+ }
+ }
+}
+
+// Overlay - top/bottom responsive overlay classes and marker class
+@mixin bmd-drawer-y-overlay-down($breakpoint) {
+ // e.g. &, &-sm, &-md, &-lg
+ $name: bmd-drawer-breakpoint-name($breakpoint, "-down");
+
+ &.bmd-drawer-overlay {
+ #{unquote($name)} { // bmd-drawer-overlay, bmd-drawer-overlay-sm, bmd-drawer-overlay-md, bmd-drawer-overlay-lg
+ //// y - top/bottom
+
+ @if $breakpoint == xs { // overlay marker class (non-responsive)
+
+ // Must double up on the .bmd-drawer-overlay class to increase specificity otherwise the
+ // responsive bmd-drawer-in-* media queries above win (and overlay is ignored)
+ &.bmd-drawer-overlay {
+ @include bmd-drawer-y-overlay();
+ }
+ } @else {
+ @include media-breakpoint-down($breakpoint) { // overlay responsive class
+ @include bmd-drawer-y-overlay();
+ }
+ }
+ }
+ }
+}
+
diff --git a/templates/assets/bootstrap-material-design/scss/mixins/_forms.scss b/templates/assets/bootstrap-material-design/scss/mixins/_forms.scss
new file mode 100644
index 0000000..bdb79bc
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/mixins/_forms.scss
@@ -0,0 +1,283 @@
+@mixin bmd-disabled() {
+ fieldset[disabled][disabled] &,
+ &.disabled,
+ &:disabled,
+ &[disabled] {
+ @content
+ }
+}
+
+@mixin bmd-selection-color() {
+ .radio label,
+ .radio-inline,
+ .checkbox label,
+ .checkbox-inline,
+ .switch label {
+
+ // override bootstrap focus and keep all the standard color (could be multiple radios in the form group)
+ //color: $bmd-label-color;
+
+ &,
+ .is-focused & {
+ // form-group focus could change multiple checkboxes/radios, disable that change by using the same color as non-form-group is-focused
+ color: $bmd-label-color;
+
+ // on focus just darken the specific labels, do not turn them to the brand-primary
+ @include hover-focus-active() {
+ //&:hover,
+ //&:focus {
+ color: $bmd-label-color-inner-focus;
+ }
+
+ // correct the above focus color for disabled items
+ label:has(input[type=radio][disabled]), // css 4 which is unlikely to work for a while, but no other pure css way.
+ label:has(input[type=checkbox][disabled]), // css 4
+ fieldset[disabled] & {
+ &,
+ &:hover,
+ &:focus {
+ color: $bmd-label-color;
+ }
+ }
+ }
+ }
+
+ // Style for disabled inputs OLD, use color approach with opacity built in, see radios
+ //fieldset[disabled] &,
+ //fieldset[disabled] & input[type=checkbox],
+ //input[type=checkbox][disabled]:not(:checked) ~ .checkbox-decorator .check::before,
+ //input[type=checkbox][disabled]:not(:checked) ~ .checkbox-decorator .check,
+ //input[type=checkbox][disabled] + .bmd-radio-outer-circle {
+ // opacity: 0.5;
+ //}
+}
+
+@mixin bmd-radio-color($color) {
+
+ ~ .bmd-radio-inner-circle {
+ background-color: $color;
+ }
+
+ ~ .bmd-radio-outer-circle {
+ border-color: $color;
+ }
+}
+
+@mixin bmd-form-color($label-color, $label-color-focus, $border-color) {
+
+ [class^='bmd-label'],
+ [class*=' bmd-label'] {
+ color: $label-color;
+ }
+
+ // override BS and keep the border-color normal/grey so that overlaid focus animation draws attention
+ .form-control {
+
+ // underline animation color on focus
+ $underline-background-image: linear-gradient(to top, $label-color-focus 2px, fade-out($label-color-focus, 1) 2px), linear-gradient(to top, $input-border-color 1px, fade-out($input-border-color, 1) 1px);
+ $underline-background-image-invalid: linear-gradient(to top, $bmd-invalid-underline 2px, fade-out($bmd-invalid-underline, 1) 2px), linear-gradient(to top, $input-border-color 1px, fade-out($input-border-color, 1) 1px);
+ $underline-background-image-readonly: linear-gradient(to top, $bmd-readonly-underline 1px, fade-out($bmd-readonly-underline, 1) 1px), linear-gradient(to top, $input-border-color 1px, fade-out($input-border-color, 1) 1px);
+ $underline-background-image-disabled: linear-gradient(to right, $input-border-color 0%, $input-border-color 30%, transparent 30%, transparent 100%);
+
+ // bg image is always there, we just need to reveal it
+ &,
+ .is-focused & {
+ background-image: $underline-background-image;
+ }
+
+ &:invalid {
+ background-image: $underline-background-image-invalid;
+ }
+
+ &:read-only {
+ background-image: $underline-background-image-readonly;
+ }
+
+ @include bmd-disabled() {
+ background-image: $underline-background-image-disabled;
+ background-repeat: repeat-x;
+ background-size: 3px 1px;
+ }
+
+ // allow underline focus image and validation images to coexist
+ &.form-control-success {
+ &,
+ .is-focused & {
+ background-image: $underline-background-image, $form-icon-success;
+ }
+ }
+ &.form-control-warning {
+ &,
+ .is-focused & {
+ background-image: $underline-background-image, $form-icon-warning;
+ }
+ }
+ &.form-control-danger {
+ &,
+ .is-focused & {
+ background-image: $underline-background-image, $form-icon-danger;
+ }
+ }
+ }
+
+ .is-focused, // may or may not be a form-group or bmd-form-group
+ &.is-focused {
+ // on focus set borders and labels to the validation color
+
+ // Use the BS provided mixin for the bulk of the color
+ @include form-control-validation($label-color);
+
+ [class^='bmd-label'],
+ [class*=' bmd-label'] {
+ color: $label-color-focus;
+ }
+
+ .bmd-label-placeholder {
+ color: $label-color; // keep the placeholder color
+ }
+
+ // Set the border and box shadow on specific inputs to match
+ .form-control {
+ border-color: $border-color;
+ }
+
+ // Set validation states also for addons
+ //.input-group-addon {
+ // border-color: $border-color;
+ //}
+
+ .bmd-help {
+ color: $bmd-label-color-inner-focus;
+ }
+ }
+}
+
+// must be broken out for reuse - webkit selector breaks firefox
+@mixin bmd-label-static($label-top, $static-font-size) {
+ top: $label-top;
+ left: 0;
+ // must repeat because the previous (more generic) selectors
+ font-size: $static-font-size;
+}
+
+@mixin bmd-form-size-variant($font-size, $label-top-margin, $variant-padding-y, $variant-line-height, $form-group-context: null) {
+
+ $variant-input-height: (($font-size * $variant-line-height) + ($variant-padding-y * 2));
+ $static-font-size: ($bmd-bmd-label-static-size-ratio * $font-size);
+ $help-font-size: ($bmd-help-size-ratio * $font-size);
+
+ $label-static-top: $label-top-margin;
+ $label-placeholder-top: $label-top-margin + $static-font-size + $variant-padding-y;
+
+ //@debug "font-size: #{$font-size} static-font-size: #{$static-font-size} help-font-size: #{$help-font-size} form-group-context: #{$form-group-context} ";
+
+ //Label height: 72dp
+ //Padding above label text: 16dp
+ //Padding between label and input text: 8dp
+ //Padding below input text (including divider): 16dp
+ //Padding below text divider: 8dp
+
+ @if $form-group-context {
+ // Create a space at the top of the bmd-form-group for the label.
+ // The label is absolutely positioned, so we use top padding to make space. This padding extends over the label down to the top of the input (padding).
+ padding-top: ($label-top-margin + $static-font-size);
+ // note: bottom-margin of this is determined by $spacer. @see _spacer.scss
+ //margin-bottom: (1.5 * $help-font-size);
+ }
+
+ // TODO: remove this when known stable. https://github.com/FezVrasta/bootstrap-material-design/issues/849
+ //@else {
+ //
+ // // for radios and checkboxes without a form-group, add some extra vertical spacing to pad down so that
+ // // any help text above is not encroached upon, or so that it appears more evenly spaced vs form-groups
+ // .radio,
+ // label.radio-inline,
+ // .checkbox,
+ // label.checkbox-inline,
+ // .switch {
+ // padding-top: $spacer-y;
+ // }
+ //}
+
+ // Set all line-heights preferably to 1 so that we can space out everything manually without additional added space
+ // from the default line-height of 1.5
+ .form-control,
+ label,
+ input::placeholder {
+ line-height: $variant-line-height;
+ }
+
+ .radio label,
+ label.radio-inline,
+ .checkbox label,
+ label.checkbox-inline,
+ .switch label {
+ line-height: $line-height-base; // keep the same line height for radios and checkboxes
+ }
+
+ // Note: this may be inside or outside a form-group, may be .bmd-form-group.bmd-form-group-sm or .bmd-form-group.bmd-form-group-lg
+ input::placeholder {
+ font-size: $font-size;
+ }
+
+ // generic labels used anywhere in the form
+ .checkbox label,
+ .radio label,
+ label {
+ font-size: $font-size;
+ }
+
+ // floating/placeholder default (no focus)
+ .bmd-label-floating,
+ .bmd-label-placeholder {
+ //@debug "top: #{$label-as-placeholder-top}";
+ top: $label-placeholder-top; // place the floating label to look like a placeholder with input padding
+ }
+
+ // floating focused/filled will look like static
+ &.is-focused,
+ .is-focused,
+ &.is-filled,
+ .is-filled {
+ .bmd-label-floating {
+ @include bmd-label-static($label-static-top, $static-font-size);
+ }
+ }
+
+ // static
+ .bmd-label-static {
+ @include bmd-label-static($label-static-top, $static-font-size);
+ }
+ // #559 Fix for webkit/chrome autofill - rule must be separate because it breaks firefox otherwise #731
+ //input:-webkit-autofill ~ .bmd-label-floating { FIXME: confirm that the autofill js generation of change event makes this unnecessary
+ // @include bmd-label-static($label-top, $static-font-size, $static-line-height);
+ //}
+
+ .bmd-help {
+ margin-top: 0; // allow the input margin to set-off the top of the help-block
+ font-size: $help-font-size;
+ }
+
+ // validation icon placement
+ .form-control {
+ &.form-control-success,
+ &.form-control-warning,
+ &.form-control-danger {
+ $icon-bg-size: ($variant-input-height * .5) ($variant-input-height * .5);
+ background-size: $bmd-form-control-bg-size, $icon-bg-size;
+
+ &,
+ &:focus,
+ .bmd-form-group.is-focused & {
+ padding-right: ($input-padding-x * 3);
+ background-repeat: $bmd-form-control-bg-repeat-y, no-repeat;
+ background-position: $bmd-form-control-bg-position, center right ($variant-input-height * .25);
+ }
+
+ &:focus,
+ .bmd-form-group.is-focused & {
+ background-size: $bmd-form-control-bg-size-active, $icon-bg-size;
+ }
+ }
+ }
+}
diff --git a/templates/assets/bootstrap-material-design/scss/mixins/_hover.scss b/templates/assets/bootstrap-material-design/scss/mixins/_hover.scss
new file mode 100644
index 0000000..ae92b2a
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/mixins/_hover.scss
@@ -0,0 +1,9 @@
+@mixin bmd-hover-focus-active {
+ // add the .active to the whole mix of hover-focus-active
+ &.active {
+ @content
+ }
+ @include hover-focus-active() {
+ @content;
+ }
+}
diff --git a/templates/assets/bootstrap-material-design/scss/mixins/_layout.scss b/templates/assets/bootstrap-material-design/scss/mixins/_layout.scss
new file mode 100644
index 0000000..1a2394c
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/mixins/_layout.scss
@@ -0,0 +1,17 @@
+// Generates the `.in` style for the generic backdrop used components such as the drawer in overlay mode
+@mixin bmd-layout-backdrop-in() {
+
+ > .bmd-layout-backdrop {
+ .in {
+ visibility: visible;
+ background-color: rgba(0, 0, 0, 0.5);
+ }
+
+ @supports (pointer-events: auto) {
+ &.in {
+ pointer-events: auto;
+ opacity: 1;
+ }
+ }
+ }
+}
diff --git a/templates/assets/bootstrap-material-design/scss/mixins/_navs.scss b/templates/assets/bootstrap-material-design/scss/mixins/_navs.scss
new file mode 100644
index 0000000..d1edace
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/mixins/_navs.scss
@@ -0,0 +1,23 @@
+@mixin bmd-tabs-color($color, $active-color, $active-border, $disabled-link-color, $disabled-link-hover-color) {
+ .nav-link {
+
+ color: $color;
+
+ &.active {
+ color: $active-color;
+ border-color: $active-border;
+ @include hover-focus {
+ border-color: $active-border;
+ }
+ }
+
+ // Disabled state lightens text and removes hover/tab effects
+ &.disabled {
+ color: $disabled-link-color;
+
+ @include plain-hover-focus {
+ color: $disabled-link-hover-color;
+ }
+ }
+ }
+}
diff --git a/templates/assets/bootstrap-material-design/scss/mixins/_type.scss b/templates/assets/bootstrap-material-design/scss/mixins/_type.scss
new file mode 100644
index 0000000..8d8873b
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/mixins/_type.scss
@@ -0,0 +1,11 @@
+@mixin headings() {
+ h1, h2, h3, h4, h5, h6 {
+ @content;
+ }
+}
+
+// 14sp font
+%std-font {
+ font-size: .875rem;
+ font-weight: normal;
+}
diff --git a/templates/assets/bootstrap-material-design/scss/mixins/_utilities.scss b/templates/assets/bootstrap-material-design/scss/mixins/_utilities.scss
new file mode 100644
index 0000000..1a22d77
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/mixins/_utilities.scss
@@ -0,0 +1,35 @@
+@function calc-top($line-height-base, $font-size, $component-height) {
+ @return (($line-height-base * $font-size) - $component-height) / 2; // vertical center of line-height
+}
+
+
+
+
+// Emulate the less #contrast function
+// TODO: this may be useful for the inverse theme, but if not, remove (it is unused after the removal of fullpalette)
+// contrast-color and brightness borrowed from compass
+// Copyright (c) 2009-2014 Christopher M. Eppstein
+// Complies with license: https://github.com/Compass/compass/blob/stable/LICENSE.markdown
+@function contrast-color($color, $dark: $contrasted-dark-default, $light: $contrasted-light-default, $threshold: null) {
+ @if $threshold {
+ // Deprecated in Compass 0.13
+ @warn "The $threshold argment to contrast-color is no longer needed and will be removed in the next release.";
+ }
+
+ @if $color == null {
+ @return null;
+ } @else {
+ $color-brightness: brightness($color);
+ $dark-text-brightness: brightness($dark);
+ $light-text-brightness: brightness($light);
+ @return if(abs($color-brightness - $light-text-brightness) > abs($color-brightness - $dark-text-brightness), $light, $dark);
+ }
+}
+
+@function brightness($color) {
+ @if type-of($color) == color {
+ @return (red($color) * 0.299 + green($color) * 0.587 + blue($color) * 0.114) / 255 * 100%;
+ } @else {
+ @return unquote("brightness(#{$color})");
+ }
+}
diff --git a/templates/assets/bootstrap-material-design/scss/variables/_colors-map.scss b/templates/assets/bootstrap-material-design/scss/variables/_colors-map.scss
new file mode 100644
index 0000000..b20e34a
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/variables/_colors-map.scss
@@ -0,0 +1,311 @@
+// these might be useful in a switch to sass...at some point.
+
+//$bmd-colors: (
+// "red": $red,
+// "pink": $pink,
+// "purple": $purple,
+// "deep-purple": $deep-purple,
+// "indigo": $indigo,
+// "blue": $blue,
+// "light-blue": $light-blue,
+// "cyan": $cyan,
+// "teal": $teal,
+// "green": $green,
+// "light-green": $light-green,
+// "lime": $lime,
+// "yellow": $yellow,
+// "amber": $amber,
+// "orange": $orange,
+// "deep-orange": $deep-orange,
+// "brown": $brown,
+// "grey": $grey,
+// "blue-grey": $blue-grey
+//);
+//
+//$bmd-colors-map: (
+// "red-50": (name: "red", color: $red-50, number: "-50"),
+// "red-100": (name: "red", color: $red-100, number: "-100"),
+// "red-200": (name: "red", color: $red-200, number: "-200"),
+// "red-300": (name: "red", color: $red-300, number: "-300"),
+// "red-400": (name: "red", color: $red-400, number: "-400"),
+// "red-500": (name: "red", color: $red-500, number: "-500"),
+// "red-600": (name: "red", color: $red-600, number: "-600"),
+// "red-700": (name: "red", color: $red-700, number: "-700"),
+// "red-800": (name: "red", color: $red-800, number: "-800"),
+// "red-900": (name: "red", color: $red-900, number: "-900"),
+// "red-a100": (name: "red", color: $red-a100, number: "-a100"),
+// "red-a200": (name: "red", color: $red-a200, number: "-a200"),
+// "red-a400": (name: "red", color: $red-a400, number: "-a400"),
+// "red-a700": (name: "red", color: $red-a700, number: "-a700"),
+// "red": (name: "red", color: $red, number: ""),
+// "pink-50": (name: "pink", color: $pink-50, number: "-50"),
+// "pink-100": (name: "pink", color: $pink-100, number: "-100"),
+// "pink-200": (name: "pink", color: $pink-200, number: "-200"),
+// "pink-300": (name: "pink", color: $pink-300, number: "-300"),
+// "pink-400": (name: "pink", color: $pink-400, number: "-400"),
+// "pink-500": (name: "pink", color: $pink-500, number: "-500"),
+// "pink-600": (name: "pink", color: $pink-600, number: "-600"),
+// "pink-700": (name: "pink", color: $pink-700, number: "-700"),
+// "pink-800": (name: "pink", color: $pink-800, number: "-800"),
+// "pink-900": (name: "pink", color: $pink-900, number: "-900"),
+// "pink-a100": (name: "pink", color: $pink-a100, number: "-a100"),
+// "pink-a200": (name: "pink", color: $pink-a200, number: "-a200"),
+// "pink-a400": (name: "pink", color: $pink-a400, number: "-a400"),
+// "pink-a700": (name: "pink", color: $pink-a700, number: "-a700"),
+// "pink": (name: "pink", color: $pink, number: ""),
+// "purple-50": (name: "purple", color: $purple-50, number: "-50"),
+// "purple-100": (name: "purple", color: $purple-100, number: "-100"),
+// "purple-200": (name: "purple", color: $purple-200, number: "-200"),
+// "purple-300": (name: "purple", color: $purple-300, number: "-300"),
+// "purple-400": (name: "purple", color: $purple-400, number: "-400"),
+// "purple-500": (name: "purple", color: $purple-500, number: "-500"),
+// "purple-600": (name: "purple", color: $purple-600, number: "-600"),
+// "purple-700": (name: "purple", color: $purple-700, number: "-700"),
+// "purple-800": (name: "purple", color: $purple-800, number: "-800"),
+// "purple-900": (name: "purple", color: $purple-900, number: "-900"),
+// "purple-a100": (name: "purple", color: $purple-a100, number: "-a100"),
+// "purple-a200": (name: "purple", color: $purple-a200, number: "-a200"),
+// "purple-a400": (name: "purple", color: $purple-a400, number: "-a400"),
+// "purple-a700": (name: "purple", color: $purple-a700, number: "-a700"),
+// "purple": (name: "purple", color: $purple, number: ""),
+// "deep-purple-50": (name: "deep-purple", color: $deep-purple-50, number: "-50"),
+// "deep-purple-100": (name: "deep-purple", color: $deep-purple-100, number: "-100"),
+// "deep-purple-200": (name: "deep-purple", color: $deep-purple-200, number: "-200"),
+// "deep-purple-300": (name: "deep-purple", color: $deep-purple-300, number: "-300"),
+// "deep-purple-400": (name: "deep-purple", color: $deep-purple-400, number: "-400"),
+// "deep-purple-500": (name: "deep-purple", color: $deep-purple-500, number: "-500"),
+// "deep-purple-600": (name: "deep-purple", color: $deep-purple-600, number: "-600"),
+// "deep-purple-700": (name: "deep-purple", color: $deep-purple-700, number: "-700"),
+// "deep-purple-800": (name: "deep-purple", color: $deep-purple-800, number: "-800"),
+// "deep-purple-900": (name: "deep-purple", color: $deep-purple-900, number: "-900"),
+// "deep-purple-a100": (name: "deep-purple", color: $deep-purple-a100, number: "-a100"),
+// "deep-purple-a200": (name: "deep-purple", color: $deep-purple-a200, number: "-a200"),
+// "deep-purple-a400": (name: "deep-purple", color: $deep-purple-a400, number: "-a400"),
+// "deep-purple-a700": (name: "deep-purple", color: $deep-purple-a700, number: "-a700"),
+// "deep-purple": (name: "deep-purple", color: $deep-purple, number: ""),
+// "indigo-50": (name: "indigo", color: $indigo-50, number: "-50"),
+// "indigo-100": (name: "indigo", color: $indigo-100, number: "-100"),
+// "indigo-200": (name: "indigo", color: $indigo-200, number: "-200"),
+// "indigo-300": (name: "indigo", color: $indigo-300, number: "-300"),
+// "indigo-400": (name: "indigo", color: $indigo-400, number: "-400"),
+// "indigo-500": (name: "indigo", color: $indigo-500, number: "-500"),
+// "indigo-600": (name: "indigo", color: $indigo-600, number: "-600"),
+// "indigo-700": (name: "indigo", color: $indigo-700, number: "-700"),
+// "indigo-800": (name: "indigo", color: $indigo-800, number: "-800"),
+// "indigo-900": (name: "indigo", color: $indigo-900, number: "-900"),
+// "indigo-a100": (name: "indigo", color: $indigo-a100, number: "-a100"),
+// "indigo-a200": (name: "indigo", color: $indigo-a200, number: "-a200"),
+// "indigo-a400": (name: "indigo", color: $indigo-a400, number: "-a400"),
+// "indigo-a700": (name: "indigo", color: $indigo-a700, number: "-a700"),
+// "indigo": (name: "indigo", color: $indigo, number: ""),
+// "blue-50": (name: "blue", color: $blue-50, number: "-50"),
+// "blue-100": (name: "blue", color: $blue-100, number: "-100"),
+// "blue-200": (name: "blue", color: $blue-200, number: "-200"),
+// "blue-300": (name: "blue", color: $blue-300, number: "-300"),
+// "blue-400": (name: "blue", color: $blue-400, number: "-400"),
+// "blue-500": (name: "blue", color: $blue-500, number: "-500"),
+// "blue-600": (name: "blue", color: $blue-600, number: "-600"),
+// "blue-700": (name: "blue", color: $blue-700, number: "-700"),
+// "blue-800": (name: "blue", color: $blue-800, number: "-800"),
+// "blue-900": (name: "blue", color: $blue-900, number: "-900"),
+// "blue-a100": (name: "blue", color: $blue-a100, number: "-a100"),
+// "blue-a200": (name: "blue", color: $blue-a200, number: "-a200"),
+// "blue-a400": (name: "blue", color: $blue-a400, number: "-a400"),
+// "blue-a700": (name: "blue", color: $blue-a700, number: "-a700"),
+// "blue": (name: "blue", color: $blue, number: ""),
+// "light-blue-50": (name: "light-blue", color: $light-blue-50, number: "-50"),
+// "light-blue-100": (name: "light-blue", color: $light-blue-100, number: "-100"),
+// "light-blue-200": (name: "light-blue", color: $light-blue-200, number: "-200"),
+// "light-blue-300": (name: "light-blue", color: $light-blue-300, number: "-300"),
+// "light-blue-400": (name: "light-blue", color: $light-blue-400, number: "-400"),
+// "light-blue-500": (name: "light-blue", color: $light-blue-500, number: "-500"),
+// "light-blue-600": (name: "light-blue", color: $light-blue-600, number: "-600"),
+// "light-blue-700": (name: "light-blue", color: $light-blue-700, number: "-700"),
+// "light-blue-800": (name: "light-blue", color: $light-blue-800, number: "-800"),
+// "light-blue-900": (name: "light-blue", color: $light-blue-900, number: "-900"),
+// "light-blue-a100": (name: "light-blue", color: $light-blue-a100, number: "-a100"),
+// "light-blue-a200": (name: "light-blue", color: $light-blue-a200, number: "-a200"),
+// "light-blue-a400": (name: "light-blue", color: $light-blue-a400, number: "-a400"),
+// "light-blue-a700": (name: "light-blue", color: $light-blue-a700, number: "-a700"),
+// "light-blue": (name: "light-blue", color: $light-blue, number: ""),
+// "cyan-50": (name: "cyan", color: $cyan-50, number: "-50"),
+// "cyan-100": (name: "cyan", color: $cyan-100, number: "-100"),
+// "cyan-200": (name: "cyan", color: $cyan-200, number: "-200"),
+// "cyan-300": (name: "cyan", color: $cyan-300, number: "-300"),
+// "cyan-400": (name: "cyan", color: $cyan-400, number: "-400"),
+// "cyan-500": (name: "cyan", color: $cyan-500, number: "-500"),
+// "cyan-600": (name: "cyan", color: $cyan-600, number: "-600"),
+// "cyan-700": (name: "cyan", color: $cyan-700, number: "-700"),
+// "cyan-800": (name: "cyan", color: $cyan-800, number: "-800"),
+// "cyan-900": (name: "cyan", color: $cyan-900, number: "-900"),
+// "cyan-a100": (name: "cyan", color: $cyan-a100, number: "-a100"),
+// "cyan-a200": (name: "cyan", color: $cyan-a200, number: "-a200"),
+// "cyan-a400": (name: "cyan", color: $cyan-a400, number: "-a400"),
+// "cyan-a700": (name: "cyan", color: $cyan-a700, number: "-a700"),
+// "cyan": (name: "cyan", color: $cyan, number: ""),
+// "teal-50": (name: "teal", color: $teal-50, number: "-50"),
+// "teal-100": (name: "teal", color: $teal-100, number: "-100"),
+// "teal-200": (name: "teal", color: $teal-200, number: "-200"),
+// "teal-300": (name: "teal", color: $teal-300, number: "-300"),
+// "teal-400": (name: "teal", color: $teal-400, number: "-400"),
+// "teal-500": (name: "teal", color: $teal-500, number: "-500"),
+// "teal-600": (name: "teal", color: $teal-600, number: "-600"),
+// "teal-700": (name: "teal", color: $teal-700, number: "-700"),
+// "teal-800": (name: "teal", color: $teal-800, number: "-800"),
+// "teal-900": (name: "teal", color: $teal-900, number: "-900"),
+// "teal-a100": (name: "teal", color: $teal-a100, number: "-a100"),
+// "teal-a200": (name: "teal", color: $teal-a200, number: "-a200"),
+// "teal-a400": (name: "teal", color: $teal-a400, number: "-a400"),
+// "teal-a700": (name: "teal", color: $teal-a700, number: "-a700"),
+// "teal": (name: "teal", color: $teal, number: ""),
+// "green-50": (name: "green", color: $green-50, number: "-50"),
+// "green-100": (name: "green", color: $green-100, number: "-100"),
+// "green-200": (name: "green", color: $green-200, number: "-200"),
+// "green-300": (name: "green", color: $green-300, number: "-300"),
+// "green-400": (name: "green", color: $green-400, number: "-400"),
+// "green-500": (name: "green", color: $green-500, number: "-500"),
+// "green-600": (name: "green", color: $green-600, number: "-600"),
+// "green-700": (name: "green", color: $green-700, number: "-700"),
+// "green-800": (name: "green", color: $green-800, number: "-800"),
+// "green-900": (name: "green", color: $green-900, number: "-900"),
+// "green-a100": (name: "green", color: $green-a100, number: "-a100"),
+// "green-a200": (name: "green", color: $green-a200, number: "-a200"),
+// "green-a400": (name: "green", color: $green-a400, number: "-a400"),
+// "green-a700": (name: "green", color: $green-a700, number: "-a700"),
+// "green": (name: "green", color: $green, number: ""),
+// "light-green-50": (name: "light-green", color: $light-green-50, number: "-50"),
+// "light-green-100": (name: "light-green", color: $light-green-100, number: "-100"),
+// "light-green-200": (name: "light-green", color: $light-green-200, number: "-200"),
+// "light-green-300": (name: "light-green", color: $light-green-300, number: "-300"),
+// "light-green-400": (name: "light-green", color: $light-green-400, number: "-400"),
+// "light-green-500": (name: "light-green", color: $light-green-500, number: "-500"),
+// "light-green-600": (name: "light-green", color: $light-green-600, number: "-600"),
+// "light-green-700": (name: "light-green", color: $light-green-700, number: "-700"),
+// "light-green-800": (name: "light-green", color: $light-green-800, number: "-800"),
+// "light-green-900": (name: "light-green", color: $light-green-900, number: "-900"),
+// "light-green-a100": (name: "light-green", color: $light-green-a100, number: "-a100"),
+// "light-green-a200": (name: "light-green", color: $light-green-a200, number: "-a200"),
+// "light-green-a400": (name: "light-green", color: $light-green-a400, number: "-a400"),
+// "light-green-a700": (name: "light-green", color: $light-green-a700, number: "-a700"),
+// "light-green": (name: "light-green", color: $light-green, number: ""),
+// "lime-50": (name: "lime", color: $lime-50, number: "-50"),
+// "lime-100": (name: "lime", color: $lime-100, number: "-100"),
+// "lime-200": (name: "lime", color: $lime-200, number: "-200"),
+// "lime-300": (name: "lime", color: $lime-300, number: "-300"),
+// "lime-400": (name: "lime", color: $lime-400, number: "-400"),
+// "lime-500": (name: "lime", color: $lime-500, number: "-500"),
+// "lime-600": (name: "lime", color: $lime-600, number: "-600"),
+// "lime-700": (name: "lime", color: $lime-700, number: "-700"),
+// "lime-800": (name: "lime", color: $lime-800, number: "-800"),
+// "lime-900": (name: "lime", color: $lime-900, number: "-900"),
+// "lime-a100": (name: "lime", color: $lime-a100, number: "-a100"),
+// "lime-a200": (name: "lime", color: $lime-a200, number: "-a200"),
+// "lime-a400": (name: "lime", color: $lime-a400, number: "-a400"),
+// "lime-a700": (name: "lime", color: $lime-a700, number: "-a700"),
+// "lime": (name: "lime", color: $lime, number: ""),
+// "yellow-50": (name: "yellow", color: $yellow-50, number: "-50"),
+// "yellow-100": (name: "yellow", color: $yellow-100, number: "-100"),
+// "yellow-200": (name: "yellow", color: $yellow-200, number: "-200"),
+// "yellow-300": (name: "yellow", color: $yellow-300, number: "-300"),
+// "yellow-400": (name: "yellow", color: $yellow-400, number: "-400"),
+// "yellow-500": (name: "yellow", color: $yellow-500, number: "-500"),
+// "yellow-600": (name: "yellow", color: $yellow-600, number: "-600"),
+// "yellow-700": (name: "yellow", color: $yellow-700, number: "-700"),
+// "yellow-800": (name: "yellow", color: $yellow-800, number: "-800"),
+// "yellow-900": (name: "yellow", color: $yellow-900, number: "-900"),
+// "yellow-a100": (name: "yellow", color: $yellow-a100, number: "-a100"),
+// "yellow-a200": (name: "yellow", color: $yellow-a200, number: "-a200"),
+// "yellow-a400": (name: "yellow", color: $yellow-a400, number: "-a400"),
+// "yellow-a700": (name: "yellow", color: $yellow-a700, number: "-a700"),
+// "yellow": (name: "yellow", color: $yellow, number: ""),
+// "amber-50": (name: "amber", color: $amber-50, number: "-50"),
+// "amber-100": (name: "amber", color: $amber-100, number: "-100"),
+// "amber-200": (name: "amber", color: $amber-200, number: "-200"),
+// "amber-300": (name: "amber", color: $amber-300, number: "-300"),
+// "amber-400": (name: "amber", color: $amber-400, number: "-400"),
+// "amber-500": (name: "amber", color: $amber-500, number: "-500"),
+// "amber-600": (name: "amber", color: $amber-600, number: "-600"),
+// "amber-700": (name: "amber", color: $amber-700, number: "-700"),
+// "amber-800": (name: "amber", color: $amber-800, number: "-800"),
+// "amber-900": (name: "amber", color: $amber-900, number: "-900"),
+// "amber-a100": (name: "amber", color: $amber-a100, number: "-a100"),
+// "amber-a200": (name: "amber", color: $amber-a200, number: "-a200"),
+// "amber-a400": (name: "amber", color: $amber-a400, number: "-a400"),
+// "amber-a700": (name: "amber", color: $amber-a700, number: "-a700"),
+// "amber": (name: "amber", color: $amber, number: ""),
+// "orange-50": (name: "orange", color: $orange-50, number: "-50"),
+// "orange-100": (name: "orange", color: $orange-100, number: "-100"),
+// "orange-200": (name: "orange", color: $orange-200, number: "-200"),
+// "orange-300": (name: "orange", color: $orange-300, number: "-300"),
+// "orange-400": (name: "orange", color: $orange-400, number: "-400"),
+// "orange-500": (name: "orange", color: $orange-500, number: "-500"),
+// "orange-600": (name: "orange", color: $orange-600, number: "-600"),
+// "orange-700": (name: "orange", color: $orange-700, number: "-700"),
+// "orange-800": (name: "orange", color: $orange-800, number: "-800"),
+// "orange-900": (name: "orange", color: $orange-900, number: "-900"),
+// "orange-a100": (name: "orange", color: $orange-a100, number: "-a100"),
+// "orange-a200": (name: "orange", color: $orange-a200, number: "-a200"),
+// "orange-a400": (name: "orange", color: $orange-a400, number: "-a400"),
+// "orange-a700": (name: "orange", color: $orange-a700, number: "-a700"),
+// "orange": (name: "orange", color: $orange, number: ""),
+// "deep-orange-50": (name: "deep-orange", color: $deep-orange-50, number: "-50"),
+// "deep-orange-100": (name: "deep-orange", color: $deep-orange-100, number: "-100"),
+// "deep-orange-200": (name: "deep-orange", color: $deep-orange-200, number: "-200"),
+// "deep-orange-300": (name: "deep-orange", color: $deep-orange-300, number: "-300"),
+// "deep-orange-400": (name: "deep-orange", color: $deep-orange-400, number: "-400"),
+// "deep-orange-500": (name: "deep-orange", color: $deep-orange-500, number: "-500"),
+// "deep-orange-600": (name: "deep-orange", color: $deep-orange-600, number: "-600"),
+// "deep-orange-700": (name: "deep-orange", color: $deep-orange-700, number: "-700"),
+// "deep-orange-800": (name: "deep-orange", color: $deep-orange-800, number: "-800"),
+// "deep-orange-900": (name: "deep-orange", color: $deep-orange-900, number: "-900"),
+// "deep-orange-a100": (name: "deep-orange", color: $deep-orange-a100, number: "-a100"),
+// "deep-orange-a200": (name: "deep-orange", color: $deep-orange-a200, number: "-a200"),
+// "deep-orange-a400": (name: "deep-orange", color: $deep-orange-a400, number: "-a400"),
+// "deep-orange-a700": (name: "deep-orange", color: $deep-orange-a700, number: "-a700"),
+// "deep-orange": (name: "deep-orange", color: $deep-orange, number: ""),
+// "brown-50": (name: "brown", color: $brown-50, number: "-50"),
+// "brown-100": (name: "brown", color: $brown-100, number: "-100"),
+// "brown-200": (name: "brown", color: $brown-200, number: "-200"),
+// "brown-300": (name: "brown", color: $brown-300, number: "-300"),
+// "brown-400": (name: "brown", color: $brown-400, number: "-400"),
+// "brown-500": (name: "brown", color: $brown-500, number: "-500"),
+// "brown-600": (name: "brown", color: $brown-600, number: "-600"),
+// "brown-700": (name: "brown", color: $brown-700, number: "-700"),
+// "brown-800": (name: "brown", color: $brown-800, number: "-800"),
+// "brown-900": (name: "brown", color: $brown-900, number: "-900"),
+// "brown-a100": (name: "brown", color: $brown-a100, number: "-a100"),
+// "brown-a200": (name: "brown", color: $brown-a200, number: "-a200"),
+// "brown-a400": (name: "brown", color: $brown-a400, number: "-a400"),
+// "brown-a700": (name: "brown", color: $brown-a700, number: "-a700"),
+// "brown": (name: "brown", color: $brown, number: ""),
+// "grey-50": (name: "grey", color: $grey-50, number: "-50"),
+// "grey-100": (name: "grey", color: $grey-100, number: "-100"),
+// "grey-200": (name: "grey", color: $grey-200, number: "-200"),
+// "grey-300": (name: "grey", color: $grey-300, number: "-300"),
+// "grey-400": (name: "grey", color: $grey-400, number: "-400"),
+// "grey-500": (name: "grey", color: $grey-500, number: "-500"),
+// "grey-600": (name: "grey", color: $grey-600, number: "-600"),
+// "grey-700": (name: "grey", color: $grey-700, number: "-700"),
+// "grey-800": (name: "grey", color: $grey-800, number: "-800"),
+// "grey-900": (name: "grey", color: $grey-900, number: "-900"),
+// "grey-a100": (name: "grey", color: $grey-a100, number: "-a100"),
+// "grey-a200": (name: "grey", color: $grey-a200, number: "-a200"),
+// "grey-a400": (name: "grey", color: $grey-a400, number: "-a400"),
+// "grey-a700": (name: "grey", color: $grey-a700, number: "-a700"),
+// "grey": (name: "grey", color: $grey, number: ""),
+// "blue-grey-50": (name: "blue-grey", color: $blue-grey-50, number: "-50"),
+// "blue-grey-100": (name: "blue-grey", color: $blue-grey-100, number: "-100"),
+// "blue-grey-200": (name: "blue-grey", color: $blue-grey-200, number: "-200"),
+// "blue-grey-300": (name: "blue-grey", color: $blue-grey-300, number: "-300"),
+// "blue-grey-400": (name: "blue-grey", color: $blue-grey-400, number: "-400"),
+// "blue-grey-500": (name: "blue-grey", color: $blue-grey-500, number: "-500"),
+// "blue-grey-600": (name: "blue-grey", color: $blue-grey-600, number: "-600"),
+// "blue-grey-700": (name: "blue-grey", color: $blue-grey-700, number: "-700"),
+// "blue-grey-800": (name: "blue-grey", color: $blue-grey-800, number: "-800"),
+// "blue-grey-900": (name: "blue-grey", color: $blue-grey-900, number: "-900"),
+// "blue-grey-a100": (name: "blue-grey", color: $blue-grey-a100, number: "-a100"),
+// "blue-grey-a200": (name: "blue-grey", color: $blue-grey-a200, number: "-a200"),
+// "blue-grey-a400": (name: "blue-grey", color: $blue-grey-a400, number: "-a400"),
+// "blue-grey-a700": (name: "blue-grey", color: $blue-grey-a700, number: "-a700"),
+// "blue-grey": (name: "blue-grey", color: $blue-grey, number: "")
+//);
diff --git a/templates/assets/bootstrap-material-design/scss/variables/_colors.scss b/templates/assets/bootstrap-material-design/scss/variables/_colors.scss
new file mode 100644
index 0000000..c805cc5
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/variables/_colors.scss
@@ -0,0 +1,356 @@
+//
+//To get this list of colors inject jQuery at http://www.google.com/design/spec/style/color.html#color-color-palette
+//
+//Then, run this script to get the list@mixin (function(){
+// var colors = {}, main = {};
+// $(".color-group")@mixin each(function(){
+// var color = $(this).find(".name").text().trim().toLowerCase().replace(" ", "-");
+// colors[color] = {};
+//
+// $(this)@mixin find(".color").not(".main-color").each(function(){
+// var shade = $(this).find(".shade").text().trim(),
+// hex = $(this).find(".hex").text().trim();
+//
+// colors[color][shade] = hex;
+// });
+// main[color] = color + "-" + $(this).find(".main-color .shade").text().trim();
+//
+// });
+// var LESS = "";
+// $@mixin each(colors, function(name, shades){
+// LESS += "\n\n";
+// $@mixin each(shades, function(shade, hex){
+// LESS += "$" + name + "-" + shade + ": " + hex + ";\n" !default;
+// });
+// if (main[name]) {
+// LESS += "$" + name + ": " + main[name] + ";\n" !default;
+// }
+// });
+// console.log(LESS);
+//})();
+
+$red-50: #ffebee !default;
+$red-100: #ffcdd2 !default;
+$red-200: #ef9a9a !default;
+$red-300: #e57373 !default;
+$red-400: #ef5350 !default;
+$red-500: #f44336 !default;
+$red-600: #e53935 !default;
+$red-700: #d32f2f !default;
+$red-800: #c62828 !default;
+$red-900: #b71c1c !default;
+$red-a100: #ff8a80 !default;
+$red-a200: #ff5252 !default;
+$red-a400: #ff1744 !default;
+$red-a700: #d50000 !default;
+$red: $red-500 !default;
+
+
+$pink-50: #fce4ec !default;
+$pink-100: #f8bbd0 !default;
+$pink-200: #f48fb1 !default;
+$pink-300: #f06292 !default;
+$pink-400: #ec407a !default;
+$pink-500: #e91e63 !default;
+$pink-600: #d81b60 !default;
+$pink-700: #c2185b !default;
+$pink-800: #ad1457 !default;
+$pink-900: #880e4f !default;
+$pink-a100: #ff80ab !default;
+$pink-a200: #ff4081 !default;
+$pink-a400: #f50057 !default;
+$pink-a700: #c51162 !default;
+$pink: $pink-500 !default;
+
+
+$purple-50: #f3e5f5 !default;
+$purple-100: #e1bee7 !default;
+$purple-200: #ce93d8 !default;
+$purple-300: #ba68c8 !default;
+$purple-400: #ab47bc !default;
+$purple-500: #9c27b0 !default;
+$purple-600: #8e24aa !default;
+$purple-700: #7b1fa2 !default;
+$purple-800: #6a1b9a !default;
+$purple-900: #4a148c !default;
+$purple-a100: #ea80fc !default;
+$purple-a200: #e040fb !default;
+$purple-a400: #d500f9 !default;
+$purple-a700: #a0f !default;
+$purple: $purple-500 !default;
+
+
+$deep-purple-50: #ede7f6 !default;
+$deep-purple-100: #d1c4e9 !default;
+$deep-purple-200: #b39ddb !default;
+$deep-purple-300: #9575cd !default;
+$deep-purple-400: #7e57c2 !default;
+$deep-purple-500: #673ab7 !default;
+$deep-purple-600: #5e35b1 !default;
+$deep-purple-700: #512da8 !default;
+$deep-purple-800: #4527a0 !default;
+$deep-purple-900: #311b92 !default;
+$deep-purple-a100: #b388ff !default;
+$deep-purple-a200: #7c4dff !default;
+$deep-purple-a400: #651fff !default;
+$deep-purple-a700: #6200ea !default;
+$deep-purple: $deep-purple-500 !default;
+
+
+$indigo-50: #e8eaf6 !default;
+$indigo-100: #c5cae9 !default;
+$indigo-200: #9fa8da !default;
+$indigo-300: #7986cb !default;
+$indigo-400: #5c6bc0 !default;
+$indigo-500: #3f51b5 !default;
+$indigo-600: #3949ab !default;
+$indigo-700: #303f9f !default;
+$indigo-800: #283593 !default;
+$indigo-900: #1a237e !default;
+$indigo-a100: #8c9eff !default;
+$indigo-a200: #536dfe !default;
+$indigo-a400: #3d5afe !default;
+$indigo-a700: #304ffe !default;
+$indigo: $indigo-500 !default;
+
+
+$blue-50: #e3f2fd !default;
+$blue-100: #bbdefb !default;
+$blue-200: #90caf9 !default;
+$blue-300: #64b5f6 !default;
+$blue-400: #42a5f5 !default;
+$blue-500: #2196f3 !default;
+$blue-600: #1e88e5 !default;
+$blue-700: #1976d2 !default;
+$blue-800: #1565c0 !default;
+$blue-900: #0d47a1 !default;
+$blue-a100: #82b1ff !default;
+$blue-a200: #448aff !default;
+$blue-a400: #2979ff !default;
+$blue-a700: #2962ff !default;
+$blue: $blue-500 !default;
+
+
+$light-blue-50: #e1f5fe !default;
+$light-blue-100: #b3e5fc !default;
+$light-blue-200: #81d4fa !default;
+$light-blue-300: #4fc3f7 !default;
+$light-blue-400: #29b6f6 !default;
+$light-blue-500: #03a9f4 !default;
+$light-blue-600: #039be5 !default;
+$light-blue-700: #0288d1 !default;
+$light-blue-800: #0277bd !default;
+$light-blue-900: #01579b !default;
+$light-blue-a100: #80d8ff !default;
+$light-blue-a200: #40c4ff !default;
+$light-blue-a400: #00b0ff !default;
+$light-blue-a700: #0091ea !default;
+$light-blue: $light-blue-500 !default;
+
+
+$cyan-50: #e0f7fa !default;
+$cyan-100: #b2ebf2 !default;
+$cyan-200: #80deea !default;
+$cyan-300: #4dd0e1 !default;
+$cyan-400: #26c6da !default;
+$cyan-500: #00bcd4 !default;
+$cyan-600: #00acc1 !default;
+$cyan-700: #0097a7 !default;
+$cyan-800: #00838f !default;
+$cyan-900: #006064 !default;
+$cyan-a100: #84ffff !default;
+$cyan-a200: #18ffff !default;
+$cyan-a400: #00e5ff !default;
+$cyan-a700: #00b8d4 !default;
+$cyan: $cyan-500 !default;
+
+
+$teal-50: #e0f2f1 !default;
+$teal-100: #b2dfdb !default;
+$teal-200: #80cbc4 !default;
+$teal-300: #4db6ac !default;
+$teal-400: #26a69a !default;
+$teal-500: #009688 !default;
+$teal-600: #00897b !default;
+$teal-700: #00796b !default;
+$teal-800: #00695c !default;
+$teal-900: #004d40 !default;
+$teal-a100: #a7ffeb !default;
+$teal-a200: #64ffda !default;
+$teal-a400: #1de9b6 !default;
+$teal-a700: #00bfa5 !default;
+$teal: $teal-500 !default;
+
+
+$green-50: #e8f5e9 !default;
+$green-100: #c8e6c9 !default;
+$green-200: #a5d6a7 !default;
+$green-300: #81c784 !default;
+$green-400: #66bb6a !default;
+$green-500: #4caf50 !default;
+$green-600: #43a047 !default;
+$green-700: #388e3c !default;
+$green-800: #2e7d32 !default;
+$green-900: #1b5e20 !default;
+$green-a100: #b9f6ca !default;
+$green-a200: #69f0ae !default;
+$green-a400: #00e676 !default;
+$green-a700: #00c853 !default;
+$green: $green-500 !default;
+
+
+$light-green-50: #f1f8e9 !default;
+$light-green-100: #dcedc8 !default;
+$light-green-200: #c5e1a5 !default;
+$light-green-300: #aed581 !default;
+$light-green-400: #9ccc65 !default;
+$light-green-500: #8bc34a !default;
+$light-green-600: #7cb342 !default;
+$light-green-700: #689f38 !default;
+$light-green-800: #558b2f !default;
+$light-green-900: #33691e !default;
+$light-green-a100: #ccff90 !default;
+$light-green-a200: #b2ff59 !default;
+$light-green-a400: #76ff03 !default;
+$light-green-a700: #64dd17 !default;
+$light-green: $light-green-500 !default;
+
+
+$lime-50: #f9fbe7 !default;
+$lime-100: #f0f4c3 !default;
+$lime-200: #e6ee9c !default;
+$lime-300: #dce775 !default;
+$lime-400: #d4e157 !default;
+$lime-500: #cddc39 !default;
+$lime-600: #c0ca33 !default;
+$lime-700: #afb42b !default;
+$lime-800: #9e9d24 !default;
+$lime-900: #827717 !default;
+$lime-a100: #f4ff81 !default;
+$lime-a200: #eeff41 !default;
+$lime-a400: #c6ff00 !default;
+$lime-a700: #aeea00 !default;
+$lime: $lime-500 !default;
+
+
+$yellow-50: #fffde7 !default;
+$yellow-100: #fff9c4 !default;
+$yellow-200: #fff59d !default;
+$yellow-300: #fff176 !default;
+$yellow-400: #ffee58 !default;
+$yellow-500: #ffeb3b !default;
+$yellow-600: #fdd835 !default;
+$yellow-700: #fbc02d !default;
+$yellow-800: #f9a825 !default;
+$yellow-900: #f57f17 !default;
+$yellow-a100: #ffff8d !default;
+$yellow-a200: #ff0 !default;
+$yellow-a400: #ffea00 !default;
+$yellow-a700: #ffd600 !default;
+$yellow: $yellow-500 !default;
+
+
+$amber-50: #fff8e1 !default;
+$amber-100: #ffecb3 !default;
+$amber-200: #ffe082 !default;
+$amber-300: #ffd54f !default;
+$amber-400: #ffca28 !default;
+$amber-500: #ffc107 !default;
+$amber-600: #ffb300 !default;
+$amber-700: #ffa000 !default;
+$amber-800: #ff8f00 !default;
+$amber-900: #ff6f00 !default;
+$amber-a100: #ffe57f !default;
+$amber-a200: #ffd740 !default;
+$amber-a400: #ffc400 !default;
+$amber-a700: #ffab00 !default;
+$amber: $amber-500 !default;
+
+
+$orange-50: #fff3e0 !default;
+$orange-100: #ffe0b2 !default;
+$orange-200: #ffcc80 !default;
+$orange-300: #ffb74d !default;
+$orange-400: #ffa726 !default;
+$orange-500: #ff9800 !default;
+$orange-600: #fb8c00 !default;
+$orange-700: #f57c00 !default;
+$orange-800: #ef6c00 !default;
+$orange-900: #e65100 !default;
+$orange-a100: #ffd180 !default;
+$orange-a200: #ffab40 !default;
+$orange-a400: #ff9100 !default;
+$orange-a700: #ff6d00 !default;
+$orange: $orange-500 !default;
+
+
+$deep-orange-50: #fbe9e7 !default;
+$deep-orange-100: #ffccbc !default;
+$deep-orange-200: #ffab91 !default;
+$deep-orange-300: #ff8a65 !default;
+$deep-orange-400: #ff7043 !default;
+$deep-orange-500: #ff5722 !default;
+$deep-orange-600: #f4511e !default;
+$deep-orange-700: #e64a19 !default;
+$deep-orange-800: #d84315 !default;
+$deep-orange-900: #bf360c !default;
+$deep-orange-a100: #ff9e80 !default;
+$deep-orange-a200: #ff6e40 !default;
+$deep-orange-a400: #ff3d00 !default;
+$deep-orange-a700: #dd2c00 !default;
+$deep-orange: $deep-orange-500 !default;
+
+
+$brown-50: #efebe9 !default;
+$brown-100: #d7ccc8 !default;
+$brown-200: #bcaaa4 !default;
+$brown-300: #a1887f !default;
+$brown-400: #8d6e63 !default;
+$brown-500: #795548 !default;
+$brown-600: #6d4c41 !default;
+$brown-700: #5d4037 !default;
+$brown-800: #4e342e !default;
+$brown-900: #3e2723 !default;
+$brown-a100: #d7ccc8 !default;
+$brown-a200: #bcaaa4 !default;
+$brown-a400: #8d6e63 !default;
+$brown-a700: #5d4037 !default;
+$brown: $brown-500 !default;
+
+
+$grey-50: #fafafa !default;
+$grey-100: #f5f5f5 !default;
+$grey-200: #eee !default;
+$grey-300: #e0e0e0 !default;
+$grey-400: #bdbdbd !default;
+$grey-500: #9e9e9e;
+$grey-600: #757575 !default;
+$grey-700: #616161 !default;
+$grey-800: #424242 !default;
+$grey-900: #212121 !default;
+$grey-a100: #f5f5f5 !default;
+$grey-a200: #eee !default;
+$grey-a400: #bdbdbd !default;
+$grey-a700: #616161 !default;
+$grey: $grey-500 !default;
+
+
+$blue-grey-50: #eceff1 !default;
+$blue-grey-100: #cfd8dc !default;
+$blue-grey-200: #b0bec5 !default;
+$blue-grey-300: #90a4ae !default;
+$blue-grey-400: #78909c !default;
+$blue-grey-500: #607d8b !default;
+$blue-grey-600: #546e7a !default;
+$blue-grey-700: #455a64 !default;
+$blue-grey-800: #37474f !default;
+$blue-grey-900: #263238 !default;
+$blue-grey-a100: #cfd8dc !default;
+$blue-grey-a200: #b0bec5 !default;
+$blue-grey-a400: #78909c !default;
+$blue-grey-a700: #455a64 !default;
+$blue-grey: $blue-grey-500 !default;
+
+
+$black: #000;
+$white: #fff;
diff --git a/templates/assets/bootstrap-material-design/scss/variables/_drawer.scss b/templates/assets/bootstrap-material-design/scss/variables/_drawer.scss
new file mode 100644
index 0000000..d30b021
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/variables/_drawer.scss
@@ -0,0 +1,5 @@
+// Drawer
+
+// Sizing
+$bmd-drawer-x-size: 240px !default;
+$bmd-drawer-y-size: 100px !default;
diff --git a/templates/assets/bootstrap-material-design/scss/variables/_layout.scss b/templates/assets/bootstrap-material-design/scss/variables/_layout.scss
new file mode 100644
index 0000000..7cbf784
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/variables/_layout.scss
@@ -0,0 +1 @@
+// Layout variables - evidently nothing to see here...remove now?
diff --git a/templates/assets/bootstrap-material-design/scss/variables/_menu.scss b/templates/assets/bootstrap-material-design/scss/variables/_menu.scss
new file mode 100644
index 0000000..54da3c4
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/variables/_menu.scss
@@ -0,0 +1,18 @@
+$bmd-menu-line-height: 1 !default; // makes it easier to use sizes to match spec
+
+$bmd-menu-item-min-width: 7rem !default; // Minimum width on mobile = 2 * 56dp = 112dp
+$bmd-menu-item-max-width: 17.5rem !default; // Maximum width on mobile (in both portrait and landscape) = 5 * 56dp = 280dp
+$bmd-menu-item-min-height: 3rem !default; // 48px
+
+$bmd-menu-item-padding-right: 1rem !default;
+$bmd-menu-item-padding-bottom: .8rem !default;
+$bmd-menu-item-padding-left: 1rem !default;
+$bmd-menu-item-padding-top: .8rem !default;
+
+// md and up
+$bmd-menu-item-padding-right-md: 1.5rem !default;
+$bmd-menu-item-padding-left-md: 1.5rem !default;
+
+// Menu
+$bmd-menu-expand-duration: 0.3s !default;
+$bmd-menu-fade-duration: 0.2s !default;
diff --git a/templates/assets/bootstrap-material-design/scss/variables/_shadow.scss b/templates/assets/bootstrap-material-design/scss/variables/_shadow.scss
new file mode 100644
index 0000000..ef1f786
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/variables/_shadow.scss
@@ -0,0 +1,35 @@
+// Shadows (originally from mdl http://www.getmdl.io/)
+$bmd-shadow-umbra-opacity: 0.2 !default;
+$bmd-shadow-penumbra-opacity: 0.14 !default;
+$bmd-shadow-ambient-opacity: 0.12 !default;
+
+// Declare the following for reuse with both mixins and the bootstrap variables
+$bmd-shadow-focus: 0 0 8px rgba($black, .18), 0 8px 16px rgba($black, .36);
+
+$bmd-shadow-2dp: 0 2px 2px 0 rgba($black, $bmd-shadow-penumbra-opacity),
+ 0 3px 1px -2px rgba($black, $bmd-shadow-umbra-opacity),
+ 0 1px 5px 0 rgba($black, $bmd-shadow-ambient-opacity);
+
+$bmd-shadow-3dp: 0 3px 4px 0 rgba($black, $bmd-shadow-penumbra-opacity),
+ 0 3px 3px -2px rgba($black, $bmd-shadow-umbra-opacity),
+ 0 1px 8px 0 rgba($black, $bmd-shadow-ambient-opacity);
+
+$bmd-shadow-4dp: 0 4px 5px 0 rgba($black, $bmd-shadow-penumbra-opacity),
+ 0 1px 10px 0 rgba($black, $bmd-shadow-ambient-opacity),
+ 0 2px 4px -1px rgba($black, $bmd-shadow-umbra-opacity);
+
+$bmd-shadow-6dp: 0 6px 10px 0 rgba($black, $bmd-shadow-penumbra-opacity),
+ 0 1px 18px 0 rgba($black, $bmd-shadow-ambient-opacity),
+ 0 3px 5px -1px rgba($black, $bmd-shadow-umbra-opacity);
+
+$bmd-shadow-8dp: 0 8px 10px 1px rgba($black, $bmd-shadow-penumbra-opacity),
+ 0 3px 14px 2px rgba($black, $bmd-shadow-ambient-opacity),
+ 0 5px 5px -3px rgba($black, $bmd-shadow-umbra-opacity);
+
+$bmd-shadow-16dp: 0 16px 24px 2px rgba($black, $bmd-shadow-penumbra-opacity),
+ 0 6px 30px 5px rgba($black, $bmd-shadow-ambient-opacity),
+ 0 8px 10px -5px rgba($black, $bmd-shadow-umbra-opacity);
+
+$bmd-shadow-24dp: 0 9px 46px 8px rgba($black, $bmd-shadow-penumbra-opacity),
+ 0 11px 15px -7px rgba($black, $bmd-shadow-ambient-opacity),
+ 0 24px 38px 3px rgba($black, $bmd-shadow-umbra-opacity);
diff --git a/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_body.scss b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_body.scss
new file mode 100644
index 0000000..0d9fbea
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_body.scss
@@ -0,0 +1,6 @@
+// Body
+//
+// Settings for the `<body>` element.
+
+$body-bg: #fafafa !default;
+//$body-color: $gray-dark !default;
diff --git a/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_brand.scss b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_brand.scss
new file mode 100644
index 0000000..3ba4a5b
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_brand.scss
@@ -0,0 +1,6 @@
+// Bootstrap brand color customization
+$brand-primary: $teal !default;
+$brand-success: $green !default;
+$brand-danger: $red !default;
+$brand-warning: $deep-orange !default;
+$brand-info: $light-blue !default;
diff --git a/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_buttons.scss b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_buttons.scss
new file mode 100644
index 0000000..5823491
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_buttons.scss
@@ -0,0 +1,77 @@
+// Buttons:
+$bmd-btn-font-size: .875rem !default; // 14px
+$bmd-btn-font-size-lg: 1.25rem !default;
+$bmd-btn-font-size-sm: .8125rem !default; // 13px
+$bmd-btn-margin-bottom: .3125rem !default; // 5px
+
+// default btn with no specific type designation
+$bmd-btn-color: $gray-dark !default;
+$bmd-btn-bg: inherit !default; //$body-bg !default; // #fff
+$bmd-btn-border: #ccc !default;
+
+$bmd-btn-focus-bg: rgba(#999, .20) !default; // spec: bg Hover: 20% #999999
+$bmd-btn-active-bg: rgba(#999, .40) !default; // spec: bg Pressed: 40% #999999
+$bmd-btn-disabled: rgba($black, .26) !default; // spec: light theme: Disabled text: 26% $black
+
+$bmd-inverse-btn-focus-bg: rgba(#ccc, .15) !default; // spec: dark bg Hover: 15% #CCCCCC
+$bmd-inverse-btn-active-bg: rgba(#ccc, .25) !default; // spec: dark Pressed: 25% #CCCCCC
+$bmd-inverse-btn-disabled: rgba($white, .30) !default; // spec: dark theme: Disabled text: 30% $white
+
+$bmd-btn-fab-size: 3.5rem !default; // 56px
+$bmd-btn-fab-size-sm: 2.5rem !default; // 40px
+$bmd-btn-fab-font-size: 1.5rem !default; // 24px
+
+// icons
+$bmd-btn-icon-size: 2rem !default; // 32px
+$bmd-btn-icon-size-sm: (.75 * $bmd-btn-icon-size) !default; // ~24px
+$bmd-btn-icon-font-size-sm: (.75 * $bmd-btn-fab-font-size) !default;
+
+
+// Buttons
+//
+// For each of Bootstrap's buttons, define text, background and border color.
+$btn-padding-x: 1rem !default; // 1rem
+$btn-padding-y: .46875rem !default; // .5rem achieve a 36dp height
+//$btn-line-height: 1 !default; //1.25
+$btn-font-weight: 500 !default; // normal
+$btn-box-shadow: none !default;
+$btn-active-box-shadow: none !default; // inset 0 3px 5px rgba(0,0,0,.125)
+
+//
+//$btn-primary-color: #fff !default;
+//$btn-primary-bg: $brand-primary !default;
+//$btn-primary-border: $btn-primary-bg !default;
+//
+$btn-secondary-color: $gray-dark !default;
+$btn-secondary-bg: $body-bg !default; // #fff
+//$btn-secondary-border: #ccc !default;
+//
+//$btn-info-color: #fff !default;
+//$btn-info-bg: $brand-info !default;
+//$btn-info-border: $btn-info-bg !default;
+//
+//$btn-success-color: #fff !default;
+//$btn-success-bg: $brand-success !default;
+//$btn-success-border: $btn-success-bg !default;
+//
+//$btn-warning-color: #fff !default;
+//$btn-warning-bg: $brand-warning !default;
+//$btn-warning-border: $btn-warning-bg !default;
+//
+//$btn-danger-color: #fff !default;
+//$btn-danger-bg: $brand-danger !default;
+//$btn-danger-border: $btn-danger-bg !default;
+//
+//$btn-link-disabled-color: $gray-light !default;
+//
+//$btn-padding-x-sm: .5rem !default;
+$btn-padding-y-sm: .40625rem !default; // achieve a 32dp height was .25rem
+//
+//$btn-padding-x-lg: 1.5rem !default;
+//$btn-padding-y-lg: .75rem !default;
+//
+//// Allows for customizing button radius independently from global border radius
+//$btn-border-radius: $border-radius !default;
+//$btn-border-radius-lg: $border-radius-lg !default;
+//$btn-border-radius-sm: $border-radius-sm !default;
+
diff --git a/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_card.scss b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_card.scss
new file mode 100644
index 0000000..6c18fba
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_card.scss
@@ -0,0 +1,13 @@
+// Cards
+//$card-spacer-x: 1.25rem !default;
+//$card-spacer-y: .75rem !default;
+//$card-border-width: 1px !default;
+//$card-border-radius: $border-radius !default;
+$card-border-color: $gray-lighter !default; // #e5e5e5
+//$card-border-radius-inner: $card-border-radius !default;
+$card-bg: #fff !default;
+$card-cap-bg: $card-bg !default; // #f5f5f5
+//
+//$card-link-hover-color: #fff !default;
+//
+//$card-deck-margin: .625rem !default;
diff --git a/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_code.scss b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_code.scss
new file mode 100644
index 0000000..9e10188
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_code.scss
@@ -0,0 +1,12 @@
+// Code
+
+//$code-color: #bd4147 !default;
+$code-bg: $grey-200 !default; // #f7f7f9 !default;
+
+//$kbd-color: #fff !default;
+//$kbd-bg: #333 !default;
+//
+//$pre-bg: #f7f7f9 !default;
+//$pre-color: $gray-dark !default;
+//$pre-border-color: #ccc !default;
+//$pre-scrollable-max-height: 340px !default;
diff --git a/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_components.scss b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_components.scss
new file mode 100644
index 0000000..ff03bdb
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_components.scss
@@ -0,0 +1,16 @@
+// Components
+//
+// Define common padding and border radius sizes and more.
+
+//$line-height-lg: (4 / 3) !default;
+//$line-height-sm: 1.5 !default;
+//
+$border-radius: .125rem !default; // .25rem !default;
+//$border-radius-lg: .3rem !default;
+$border-radius-sm: .0625rem !default; // .2rem !default;
+//
+//$component-active-color: #fff !default;
+//$component-active-bg: $brand-primary !default;
+//
+//$caret-width: .3em !default;
+//$caret-width-lg: $caret-width !default;
diff --git a/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_custom-forms.scss b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_custom-forms.scss
new file mode 100644
index 0000000..d6f3644
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_custom-forms.scss
@@ -0,0 +1,5 @@
+$custom-file-bg: transparent !default;
+$custom-file-border-width: 0 !default;
+$custom-file-box-shadow: none !default;
+$custom-file-border-radius: 0 !default;
+$custom-file-line-height: 1.3 !default;
diff --git a/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_dropdown.scss b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_dropdown.scss
new file mode 100644
index 0000000..67ac5ec
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_dropdown.scss
@@ -0,0 +1,20 @@
+// Dropdowns
+//
+// Dropdown menu container and contents.
+
+//$dropdown-bg: #fff !default;
+//$dropdown-border-color: rgba(0,0,0,.15) !default;
+//$dropdown-border-width: $border-width !default;
+//$dropdown-divider-bg: #e5e5e5 !default;
+$dropdown-box-shadow: $bmd-shadow-2dp !default; //0 6px 12px rgba(0,0,0,.175) !default;
+//
+//$dropdown-link-color: $gray-dark !default;
+//$dropdown-link-hover-color: darken($gray-dark, 5%) !default;
+//$dropdown-link-hover-bg: #f5f5f5 !default;
+//
+//$dropdown-link-active-color: $component-active-color !default;
+//$dropdown-link-active-bg: $component-active-bg !default;
+//
+//$dropdown-link-disabled-color: $gray-light !default;
+//
+//$dropdown-header-color: $gray-light !default;
diff --git a/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_forms.scss b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_forms.scss
new file mode 100644
index 0000000..425008e
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_forms.scss
@@ -0,0 +1,47 @@
+// Forms
+
+//
+$input-bg: rgba($black, 0) !default; // #fff !default;
+$input-bg-disabled: rgba($black, 0) !default; // $gray-lighter !default;
+//
+//$input-color: $gray !default;
+$input-border-color: $gray-light !default; // #ccc !default;
+//$input-btn-border-width: $border-width !default; // For form controls and buttons
+$input-box-shadow: none !default; //inset 0 1px 1px rgba(0,0,0,.075) !default;
+//
+$input-border-radius: 0 !default; // $border-radius !default;
+//$input-border-radius-lg: $border-radius-lg !default;
+//$input-border-radius-sm: $border-radius-sm !default;
+//
+//$input-border-focus: #66afe9 !default;
+$input-box-shadow-focus: none !default; // rgba(102,175,233,.6) !default;
+//
+$input-color-placeholder: $bmd-label-color !default; // #999 !default;
+
+
+
+$input-padding-x: 0 !default; // .75rem !default;
+$input-padding-y: .4375rem !default; // spec 8px // .375rem !default;
+
+$input-padding-x-sm: 0 !default; // .75rem !default;
+$input-padding-y-sm: .25rem !default; // spec 4px //.275rem !default;
+
+$input-padding-x-lg: 0 !default; // 1.25rem !default;
+$input-padding-y-lg: .5625rem !default; // no-spec 9px // .75rem !default;
+
+//$input-height: (($font-size-base * $line-height-base) + ($input-padding-y * 2)) !default;
+//$input-height-lg: (($font-size-lg * $line-height-lg) + ($input-padding-y-lg * 2)) !default;
+//$input-height-sm: (($font-size-sm * $line-height-sm) + ($input-padding-y-sm * 2)) !default;
+//
+//$form-group-margin-bottom: $spacer-y !default;
+//
+$input-group-addon-bg: transparent !default; //$gray-lighter !default;
+$input-group-addon-border-color: transparent !default; //$input-border-color !default;
+//
+//$cursor-disabled: not-allowed !default;
+//
+//// Form validation icons
+//$form-icon-success: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2MTIgNzkyIj48cGF0aCBmaWxsPSIjNWNiODVjIiBkPSJNMjMzLjggNjEwYy0xMy4zIDAtMjYtNi0zNC0xNi44TDkwLjUgNDQ4LjhDNzYuMyA0MzAgODAgNDAzLjMgOTguOCAzODljMTguOC0xNC4yIDQ1LjUtMTAuNCA1OS44IDguNGw3MiA5NUw0NTEuMyAyNDJjMTIuNS0yMCAzOC44LTI2LjIgNTguOC0xMy43IDIwIDEyLjQgMjYgMzguNyAxMy43IDU4LjhMMjcwIDU5MGMtNy40IDEyLTIwLjIgMTkuNC0zNC4zIDIwaC0yeiIvPjwvc3ZnPg==";
+//$form-icon-warning: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2MTIgNzkyIj48cGF0aCBmaWxsPSIjZjBhZDRlIiBkPSJNNjAzIDY0MC4ybC0yNzguNS01MDljLTMuOC02LjYtMTAuOC0xMC42LTE4LjUtMTAuNnMtMTQuNyA0LTE4LjUgMTAuNkw5IDY0MC4yYy0zLjcgNi41LTMuNiAxNC40LjIgMjAuOCAzLjggNi41IDEwLjggMTAuNCAxOC4zIDEwLjRoNTU3YzcuNiAwIDE0LjYtNCAxOC40LTEwLjQgMy41LTYuNCAzLjYtMTQuNCAwLTIwLjh6bS0yNjYuNC0zMGgtNjEuMlY1NDloNjEuMnY2MS4yem0wLTEwN2gtNjEuMlYzMDRoNjEuMnYxOTl6Ii8+PC9zdmc+";
+//$form-icon-danger: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2MTIgNzkyIj48cGF0aCBmaWxsPSIjZDk1MzRmIiBkPSJNNDQ3IDU0NC40Yy0xNC40IDE0LjQtMzcuNiAxNC40LTUyIDBsLTg5LTkyLjctODkgOTIuN2MtMTQuNSAxNC40LTM3LjcgMTQuNC01MiAwLTE0LjQtMTQuNC0xNC40LTM3LjYgMC01Mmw5Mi40LTk2LjMtOTIuNC05Ni4zYy0xNC40LTE0LjQtMTQuNC0zNy42IDAtNTJzMzcuNi0xNC4zIDUyIDBsODkgOTIuOCA4OS4yLTkyLjdjMTQuNC0xNC40IDM3LjYtMTQuNCA1MiAwIDE0LjMgMTQuNCAxNC4zIDM3LjYgMCA1MkwzNTQuNiAzOTZsOTIuNCA5Ni40YzE0LjQgMTQuNCAxNC40IDM3LjYgMCA1MnoiLz48L3N2Zz4=";
+
diff --git a/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_list-group.scss b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_list-group.scss
new file mode 100644
index 0000000..b8e1ed8
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_list-group.scss
@@ -0,0 +1,21 @@
+// List group
+
+$list-group-bg: inherit !default; // #fff
+//$list-group-border-color: #ddd !default;
+$list-group-border-width: 0 !default; // $border-width
+$list-group-border-radius: 0 !default; // $border-radius
+//
+//$list-group-hover-bg: #f5f5f5 !default;
+//$list-group-active-color: $component-active-color !default;
+//$list-group-active-bg: $component-active-bg !default;
+//$list-group-active-border: $list-group-active-bg !default;
+//$list-group-active-text-color: lighten($list-group-active-bg, 40%) !default;
+//
+//$list-group-disabled-color: $gray-light !default;
+//$list-group-disabled-bg: $gray-lighter !default;
+//$list-group-disabled-text-color: $list-group-disabled-color !default;
+//
+//$list-group-link-color: #555 !default;
+//$list-group-link-hover-color: $list-group-link-color !default;
+//$list-group-link-heading-color: #333 !default;
+
diff --git a/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_modals.scss b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_modals.scss
new file mode 100644
index 0000000..6585799
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_modals.scss
@@ -0,0 +1,20 @@
+// Modals
+$modal-content-xs-box-shadow: $bmd-shadow-24dp !default;
+
+// Padding applied to the modal body
+//$modal-inner-padding: 15px !default;
+//
+//$modal-title-padding: 15px !default;
+//$modal-title-line-height: $line-height-base !default;
+//
+//$modal-content-bg: #fff !default;
+//$modal-content-border-color: rgba(0,0,0,.2) !default;
+//
+//$modal-backdrop-bg: #000 !default;
+$modal-backdrop-opacity: .26 !default; // .5
+//$modal-header-border-color: #e5e5e5 !default;
+//$modal-footer-border-color: $modal-header-border-color !default;
+//
+//$modal-lg: 900px !default;
+//$modal-md: 600px !default;
+//$modal-sm: 300px !default;
diff --git a/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_nav.scss b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_nav.scss
new file mode 100644
index 0000000..3334006
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_nav.scss
@@ -0,0 +1,62 @@
+// Navs https://www.google.com/design/spec/components/tabs.html#tabs-specs
+
+$nav-disabled-link-color: $gray-light !default;
+$nav-disabled-link-hover-color: $gray-light !default;
+
+$bmd-navbar-link-font-weight: $bmd-font-weight-base !default; //
+$bmd-navbar-link-font-size: .875rem !default; // 14
+$bmd-navbar-link-padding: .5321rem; // 7
+
+
+// tabs & pills
+$bmd-nav-tabs-pills-font-weight: 500 !default; //
+$bmd-nav-tabs-pills-font-size: .875rem !default; // 14
+$bmd-nav-tabs-pills-link-padding: 1.4286em .8575em !default; // spec // was .5em 1em // relative em based on 14
+
+// tabs only
+$bmd-nav-tabs-border-size: .214rem !default; // 3px
+
+$bmd-nav-tabs-color: $gray !default;
+$bmd-nav-tabs-active-color: $gray-dark !default;
+$bmd-nav-tabs-active-border-color: $brand-primary !default;
+$bmd-nav-tabs-disabled-link-color: $nav-disabled-link-color !default;
+$bmd-nav-tabs-disabled-link-color-hover: $nav-disabled-link-hover-color !default;
+
+$bmd-nav-tabs-primary-color: $bmd-inverse !default;
+$bmd-nav-tabs-primary-active-color: #fff !default;
+$bmd-nav-tabs-primary-active-border-color: #fff !default;
+$bmd-nav-tabs-primary-disabled-link-color: $bmd-inverse-light !default;
+$bmd-nav-tabs-primary-disabled-link-color-hover: $bmd-inverse-light !default;
+
+$bmd-nav-tabs-inverse-color: $bmd-inverse !default;
+$bmd-nav-tabs-inverse-active-color: #fff !default;
+$bmd-nav-tabs-inverse-active-border-color: #fff !default;
+$bmd-nav-tabs-inverse-disabled-link-color: $bmd-inverse-light !default;
+$bmd-nav-tabs-inverse-disabled-link-color-hover: $bmd-inverse-light !default;
+
+
+//$nav-item-margin: .2rem !default;
+
+
+
+//$bmd-nav-link-line-height: 1 !default; // makes it easier to line up with the spec
+//$nav-link-padding: .5em 1em !default; // changing this for tabs alters generic navbars, so do it elsewhere with higher specificity
+//$nav-link-hover-bg: $gray-lighter !default;
+
+
+//
+//$nav-tabs-border-color: #ddd !default;
+//
+//$nav-tabs-link-border-width: $border-width !default;
+//$nav-tabs-link-hover-border-color: $gray-lighter !default;
+//
+$nav-tabs-active-link-hover-bg: transparent !default; // $body-bg
+//$nav-tabs-active-link-hover-color: $gray !default;
+//$nav-tabs-active-link-hover-border-color: #ddd !default;
+//
+//$nav-tabs-justified-link-border-color: #ddd !default;
+//$nav-tabs-justified-active-link-border-color: $body-bg !default;
+//
+//$nav-pills-border-radius: $border-radius !default;
+//$nav-pills-active-link-hover-bg: $component-active-bg !default;
+//$nav-pills-active-link-hover-color: $component-active-color !default;
diff --git a/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_pagination.scss b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_pagination.scss
new file mode 100644
index 0000000..e55ec27
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_pagination.scss
@@ -0,0 +1,6 @@
+$pagination-border-width: 0;
+$pagination-bg: transparent;
+$pagination-disabled-bg: transparent;
+
+$pagination-padding-x-lg: 0;
+$pagination-padding-x-sm: 0;
diff --git a/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_spacing.scss b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_spacing.scss
new file mode 100644
index 0000000..4032860
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_spacing.scss
@@ -0,0 +1,26 @@
+// Spacing
+//
+// Control the default styling of most Bootstrap elements by modifying these
+// variables. Mostly focused on spacing.
+
+$spacer: .5rem !default; // 1rem !default; // $form-group-margin-bottom uses $spacer-y. Decided to try this globally and see how it works out.
+//$spacer-x: $spacer !default;
+//$spacer-y: $spacer !default;
+//$spacers: (
+// 0: (
+// x: 0,
+// y: 0
+// ),
+// 1: (
+// x: $spacer-x,
+// y: $spacer-y
+// ),
+// 2: (
+// x: ($spacer-x * 1.5),
+// y: ($spacer-y * 1.5)
+// ),
+// 3: (
+// x: ($spacer-x * 3),
+// y: ($spacer-y * 3)
+// )
+//) !default;
diff --git a/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_state.scss b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_state.scss
new file mode 100644
index 0000000..0037a2b
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_state.scss
@@ -0,0 +1,15 @@
+// Form states and alerts
+//
+// Define colors for form feedback states and, by default, alerts.
+$state-success-text: $bmd-inverse !default;
+$state-success-bg: $brand-success !default;
+
+$state-info-text: $bmd-inverse !default;
+$state-info-bg: $brand-info !default;
+
+$state-warning-text: $bmd-inverse !default;
+$state-warning-bg: $brand-warning !default;
+
+$state-danger-text: $bmd-inverse !default;
+$state-danger-bg: $brand-danger !default;
+
diff --git a/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_type.scss b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_type.scss
new file mode 100644
index 0000000..22b2289
--- /dev/null
+++ b/templates/assets/bootstrap-material-design/scss/variables/bootstrap/_type.scss
@@ -0,0 +1,66 @@
+// Typography
+//
+// Font, line-height, and color for body text, headings, and more.
+
+// https://www.google.com/design/spec/style/typography.html#typography-styles
+// http://www.getmdl.io/styles/index.html
+
+$font-family-sans-serif: 'Roboto', 'Helvetica', 'Arial', sans-serif !default;
+//$font-family-serif: Georgia, "Times New Roman", Times, serif !default;
+//$font-family-monospace: Menlo, Monaco, Consolas, "Courier New", monospace !default;
+//$font-family-base: $font-family-sans-serif !default;
+
+// Pixel value used to responsively scale all typography. Applied to the `<html>` element.
+//$font-size-root: 16px !default;
+//
+//$font-size-base: 1rem !default;
+//$font-size-lg: 1.25rem !default;
+//$font-size-sm: .875rem !default;
+//$font-size-xs: .75rem !default;
+//
+//$font-size-h1: 2.5rem !default;
+//$font-size-h2: 2rem !default;
+//$font-size-h3: 1.75rem !default;
+//$font-size-h4: 1.5rem !default;
+//$font-size-h5: 1.25rem !default;
+//$font-size-h6: 1rem !default;
+//
+$display1-size: 7rem !default; // md display-4 112px was 6rem;
+$display2-size: 3.5rem !default; // md display-3 56px was 5.5rem
+$display3-size: 2.8125rem !default; // md display-2 45px was 4.5rem
+$display4-size: 2.125rem !default; // md display-1 34px was 3.5rem
+//
+//$display1-weight: 300 !default;
+//$display2-weight: 300 !default;
+//$display3-weight: 300 !default;
+//$display4-weight: 300 !default;
+//
+//$line-height-base: 1.5 !default;
+//
+//$headings-margin-bottom: ($spacer / 2) !default;
+//$headings-font-family: inherit !default;
+$headings-font-weight: 400 !default; // was 500
+//$headings-line-height: 1.1 !default;
+//$headings-color: inherit !default;
+//
+//$lead-font-size: 1.25rem !default;
+//$lead-font-weight: 300 !default;
+//
+//$text-muted: $gray-light !default;
+//
+//$abbr-border-color: $gray-light !default;
+//
+//$blockquote-small-color: $gray-light !default;
+//$blockquote-font-size: ($font-size-base * 1.25) !default;
+//$blockquote-border-color: $gray-lighter !default;
+//
+//$hr-border-color: rgba(0,0,0,.1) !default;
+//$hr-border-width: $border-width !default;
+//
+//$list-inline-padding: 5px !default;
+//
+//$dt-font-weight: bold !default;
+//
+//$nested-kbd-font-weight: bold !default;
+
+
diff --git a/templates/assets/bootstrap/.bower.json b/templates/assets/bootstrap/.bower.json
new file mode 100644
index 0000000..06b071c
--- /dev/null
+++ b/templates/assets/bootstrap/.bower.json
@@ -0,0 +1,44 @@
+{
+ "name": "bootstrap",
+ "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
+ "keywords": [
+ "css",
+ "js",
+ "sass",
+ "mobile-first",
+ "responsive",
+ "front-end",
+ "framework",
+ "web"
+ ],
+ "homepage": "https://getbootstrap.com",
+ "license": "MIT",
+ "moduleType": "globals",
+ "main": [
+ "scss/bootstrap.scss",
+ "dist/js/bootstrap.js"
+ ],
+ "ignore": [
+ "/.*",
+ "_config.yml",
+ "CNAME",
+ "composer.json",
+ "CONTRIBUTING.md",
+ "docs",
+ "js/tests",
+ "test-infra"
+ ],
+ "dependencies": {
+ "jquery": ">=1.9.1",
+ "tether": "^1.4.0"
+ },
+ "_release": "78fc4d23fc",
+ "_resolution": {
+ "type": "branch",
+ "branch": "v4-dev",
+ "commit": "78fc4d23fcefe31397444b75f43728c38e13c590"
+ },
+ "_source": "https://github.com/twbs/bootstrap.git",
+ "_target": "v4-dev",
+ "_originalSource": "bootstrap"
+} \ No newline at end of file
diff --git a/templates/assets/bootstrap/CHANGELOG.md b/templates/assets/bootstrap/CHANGELOG.md
new file mode 100644
index 0000000..7b60d7c
--- /dev/null
+++ b/templates/assets/bootstrap/CHANGELOG.md
@@ -0,0 +1,5 @@
+Bootstrap uses [GitHub's Releases feature](https://github.com/blog/1547-release-your-software) for its changelogs.
+
+See [the Releases section of our GitHub project](https://github.com/twbs/bootstrap/releases) for changelogs for each release version of Bootstrap.
+
+Release announcement posts on [the official Bootstrap blog](https://blog.getbootstrap.com) contain summaries of the most noteworthy changes made in each release.
diff --git a/templates/assets/bootstrap/Gemfile b/templates/assets/bootstrap/Gemfile
new file mode 100644
index 0000000..958c7a9
--- /dev/null
+++ b/templates/assets/bootstrap/Gemfile
@@ -0,0 +1,8 @@
+source 'https://rubygems.org'
+
+group :development, :test do
+ gem 'jekyll', '~> 3.4.2'
+ gem 'jekyll-redirect-from', '~> 0.12.1'
+ gem 'jekyll-sitemap', '~> 1.0.0'
+ gem 'scss_lint', '~> 0.52.0'
+end
diff --git a/templates/assets/bootstrap/Gemfile.lock b/templates/assets/bootstrap/Gemfile.lock
new file mode 100644
index 0000000..242ec49
--- /dev/null
+++ b/templates/assets/bootstrap/Gemfile.lock
@@ -0,0 +1,58 @@
+GEM
+ remote: https://rubygems.org/
+ specs:
+ addressable (2.5.0)
+ public_suffix (~> 2.0, >= 2.0.2)
+ colorator (1.1.0)
+ ffi (1.9.18)
+ forwardable-extended (2.6.0)
+ jekyll (3.4.2)
+ addressable (~> 2.4)
+ colorator (~> 1.0)
+ jekyll-sass-converter (~> 1.0)
+ jekyll-watch (~> 1.1)
+ kramdown (~> 1.3)
+ liquid (~> 3.0)
+ mercenary (~> 0.3.3)
+ pathutil (~> 0.9)
+ rouge (~> 1.7)
+ safe_yaml (~> 1.0)
+ jekyll-redirect-from (0.12.1)
+ jekyll (~> 3.3)
+ jekyll-sass-converter (1.5.0)
+ sass (~> 3.4)
+ jekyll-sitemap (1.0.0)
+ jekyll (~> 3.3)
+ jekyll-watch (1.5.0)
+ listen (~> 3.0, < 3.1)
+ kramdown (1.13.2)
+ liquid (3.0.6)
+ listen (3.0.8)
+ rb-fsevent (~> 0.9, >= 0.9.4)
+ rb-inotify (~> 0.9, >= 0.9.7)
+ mercenary (0.3.6)
+ pathutil (0.14.0)
+ forwardable-extended (~> 2.6)
+ public_suffix (2.0.5)
+ rake (12.0.0)
+ rb-fsevent (0.9.8)
+ rb-inotify (0.9.8)
+ ffi (>= 0.5.0)
+ rouge (1.11.1)
+ safe_yaml (1.0.4)
+ sass (3.4.23)
+ scss_lint (0.52.0)
+ rake (>= 0.9, < 13)
+ sass (~> 3.4.20)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ jekyll (~> 3.4.2)
+ jekyll-redirect-from (~> 0.12.1)
+ jekyll-sitemap (~> 1.0.0)
+ scss_lint (~> 0.52.0)
+
+BUNDLED WITH
+ 1.14.6
diff --git a/templates/assets/bootstrap/Gruntfile.js b/templates/assets/bootstrap/Gruntfile.js
new file mode 100644
index 0000000..7675e2f
--- /dev/null
+++ b/templates/assets/bootstrap/Gruntfile.js
@@ -0,0 +1,321 @@
+/*!
+ * Bootstrap's Gruntfile
+ * https://getbootstrap.com
+ * Copyright 2013-2017 The Bootstrap Authors
+ * Copyright 2013-2017 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+
+module.exports = function (grunt) {
+ 'use strict'
+
+ // Force use of Unix newlines
+ grunt.util.linefeed = '\n'
+
+ RegExp.quote = function (string) {
+ return string.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&')
+ }
+
+ var isTravis = require('is-travis')
+
+ // Project configuration.
+ grunt.initConfig({
+
+ // Metadata.
+ pkg: grunt.file.readJSON('package.json'),
+ banner: '/*!\n' +
+ ' * Bootstrap v<%= pkg.version %> (<%= pkg.homepage %>)\n' +
+ ' * Copyright 2011-<%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
+ ' * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n' +
+ ' */\n',
+ jqueryCheck: 'if (typeof jQuery === \'undefined\') {\n' +
+ ' throw new Error(\'Bootstrap\\\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\\\'s JavaScript.\')\n' +
+ '}\n',
+ jqueryVersionCheck: '+function ($) {\n' +
+ ' var version = $.fn.jquery.split(\' \')[0].split(\'.\')\n' +
+ ' if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] >= 4)) {\n' +
+ ' throw new Error(\'Bootstrap\\\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0\')\n' +
+ ' }\n' +
+ '}(jQuery);\n\n',
+
+ // Task configuration.
+ clean: {
+ dist: 'dist',
+ docs: 'docs/dist'
+ },
+
+ // JS build configuration
+ babel: {
+ dev: {
+ options: {
+ sourceMap: true
+ },
+ files: {
+ 'js/dist/util.js' : 'js/src/util.js',
+ 'js/dist/alert.js' : 'js/src/alert.js',
+ 'js/dist/button.js' : 'js/src/button.js',
+ 'js/dist/carousel.js' : 'js/src/carousel.js',
+ 'js/dist/collapse.js' : 'js/src/collapse.js',
+ 'js/dist/dropdown.js' : 'js/src/dropdown.js',
+ 'js/dist/modal.js' : 'js/src/modal.js',
+ 'js/dist/scrollspy.js' : 'js/src/scrollspy.js',
+ 'js/dist/tab.js' : 'js/src/tab.js',
+ 'js/dist/tooltip.js' : 'js/src/tooltip.js',
+ 'js/dist/popover.js' : 'js/src/popover.js'
+ }
+ },
+ dist: {
+ options: {
+ extends: '../../.babelrc'
+ },
+ files: {
+ '<%= concat.bootstrap.dest %>' : '<%= concat.bootstrap.dest %>'
+ }
+ }
+ },
+
+ stamp: {
+ options: {
+ banner: '<%= banner %>\n<%= jqueryCheck %>\n<%= jqueryVersionCheck %>\n+function () {\n',
+ footer: '\n}();'
+ },
+ bootstrap: {
+ files: {
+ src: '<%= concat.bootstrap.dest %>'
+ }
+ }
+ },
+
+ concat: {
+ options: {
+ // Custom function to remove all export and import statements
+ process: function (src) {
+ return src.replace(/^(export|import).*/gm, '')
+ }
+ },
+ bootstrap: {
+ src: [
+ 'js/src/util.js',
+ 'js/src/alert.js',
+ 'js/src/button.js',
+ 'js/src/carousel.js',
+ 'js/src/collapse.js',
+ 'js/src/dropdown.js',
+ 'js/src/modal.js',
+ 'js/src/scrollspy.js',
+ 'js/src/tab.js',
+ 'js/src/tooltip.js',
+ 'js/src/popover.js'
+ ],
+ dest: 'dist/js/<%= pkg.name %>.js'
+ }
+ },
+
+ qunit: {
+ options: {
+ inject: 'js/tests/unit/phantom.js'
+ },
+ files: 'js/tests/index.html'
+ },
+
+ // CSS build configuration
+ copy: {
+ docs: {
+ expand: true,
+ cwd: 'dist/',
+ src: [
+ '**/*'
+ ],
+ dest: 'docs/dist/'
+ }
+ },
+
+ connect: {
+ server: {
+ options: {
+ port: 3000,
+ base: '.'
+ }
+ }
+ },
+
+ watch: {
+ src: {
+ files: '<%= concat.bootstrap.src %>',
+ tasks: ['babel:dev']
+ },
+ sass: {
+ files: 'scss/**/*.scss',
+ tasks: ['dist-css', 'docs']
+ },
+ docs: {
+ files: 'docs/assets/scss/**/*.scss',
+ tasks: ['dist-css', 'docs']
+ }
+ },
+
+ 'saucelabs-qunit': {
+ all: {
+ options: {
+ build: process.env.TRAVIS_JOB_ID,
+ concurrency: 10,
+ maxRetries: 3,
+ maxPollRetries: 4,
+ urls: ['http://127.0.0.1:3000/js/tests/index.html?hidepassed'],
+ browsers: grunt.file.readYAML('grunt/sauce_browsers.yml')
+ }
+ }
+ },
+
+ exec: {
+ 'clean-css': {
+ command: 'npm run clean-css'
+ },
+ 'clean-css-docs': {
+ command: 'npm run clean-css-docs'
+ },
+ postcss: {
+ command: 'npm run postcss'
+ },
+ 'postcss-docs': {
+ command: 'npm run postcss-docs'
+ },
+ htmlhint: {
+ command: 'npm run htmlhint'
+ },
+ htmllint: {
+ command: 'npm run htmllint'
+ },
+ jekyll: {
+ command: 'npm run jekyll'
+ },
+ 'jekyll-github': {
+ command: 'npm run jekyll-github'
+ },
+ sass: {
+ command: 'npm run sass'
+ },
+ 'sass-docs': {
+ command: 'npm run sass-docs'
+ },
+ 'scss-lint': {
+ command: 'npm run scss-lint'
+ },
+ 'scss-lint-docs': {
+ command: 'npm run scss-lint-docs'
+ },
+ uglify: {
+ command: 'npm run uglify'
+ },
+ 'uglify-docs': {
+ command: 'npm run uglify-docs'
+ }
+ },
+
+ buildcontrol: {
+ options: {
+ dir: '_gh_pages',
+ commit: true,
+ push: true,
+ message: 'Built %sourceName% from commit %sourceCommit% on branch %sourceBranch%'
+ },
+ pages: {
+ options: {
+ remote: 'git@github.com:twbs/derpstrap.git',
+ branch: 'gh-pages'
+ }
+ }
+ },
+
+ compress: {
+ main: {
+ options: {
+ archive: 'bootstrap-<%= pkg.version %>-dist.zip',
+ mode: 'zip',
+ level: 9,
+ pretty: true
+ },
+ files: [
+ {
+ expand: true,
+ cwd: 'dist/',
+ src: ['**'],
+ dest: 'bootstrap-<%= pkg.version %>-dist'
+ }
+ ]
+ }
+ }
+
+ })
+
+
+ // These plugins provide necessary tasks.
+ require('load-grunt-tasks')(grunt)
+ require('time-grunt')(grunt)
+
+ // Docs HTML validation task
+ grunt.registerTask('validate-html', ['exec:jekyll', 'exec:htmllint', 'exec:htmlhint'])
+
+ var runSubset = function (subset) {
+ return !process.env.TWBS_TEST || process.env.TWBS_TEST === subset
+ }
+ var isUndefOrNonZero = function (val) {
+ return val === undefined || val !== '0'
+ }
+
+ // Test task.
+ var testSubtasks = []
+ // Skip core tests if running a different subset of the test suite
+ if (runSubset('core') &&
+ // Skip core tests if this is a Savage build
+ process.env.TRAVIS_REPO_SLUG !== 'twbs-savage/bootstrap') {
+ testSubtasks = testSubtasks.concat(['dist-css', 'dist-js', 'test-scss', 'qunit', 'docs'])
+ }
+ // Skip HTML validation if running a different subset of the test suite
+ if (runSubset('validate-html') &&
+ isTravis &&
+ // Skip HTML5 validator when [skip validator] is in the commit message
+ isUndefOrNonZero(process.env.TWBS_DO_VALIDATOR)) {
+ testSubtasks.push('validate-html')
+ }
+ // Only run Sauce Labs tests if there's a Sauce access key
+ if (typeof process.env.SAUCE_ACCESS_KEY !== 'undefined' &&
+ // Skip Sauce if running a different subset of the test suite
+ runSubset('sauce-js-unit')) {
+ testSubtasks = testSubtasks.concat(['dist', 'docs-css', 'docs-js', 'clean:docs', 'copy:docs'])
+ // Skip Sauce on Travis when [skip sauce] is in the commit message
+ if (isUndefOrNonZero(process.env.TWBS_DO_SAUCE)) {
+ testSubtasks.push('connect')
+ testSubtasks.push('saucelabs-qunit')
+ }
+ }
+ grunt.registerTask('test', testSubtasks)
+
+ // JS distribution task.
+ grunt.registerTask('dist-js', ['babel:dev', 'concat', 'babel:dist', 'stamp', 'exec:uglify'])
+
+ grunt.registerTask('test-scss', ['exec:scss-lint'])
+
+ // CSS distribution task.
+ grunt.registerTask('sass-compile', ['exec:sass', 'exec:sass-docs'])
+
+ grunt.registerTask('dist-css', ['sass-compile', 'exec:postcss', 'exec:clean-css', 'exec:clean-css-docs'])
+
+ // Full distribution task.
+ grunt.registerTask('dist', ['clean:dist', 'dist-css', 'dist-js'])
+
+ // Default task.
+ grunt.registerTask('default', ['clean:dist', 'test'])
+
+ // Docs task.
+ grunt.registerTask('docs-css', ['exec:clean-css-docs', 'exec:postcss-docs'])
+ grunt.registerTask('lint-docs-css', ['exec:scss-lint-docs'])
+ grunt.registerTask('docs-js', ['exec:uglify-docs'])
+ grunt.registerTask('docs', ['lint-docs-css', 'docs-css', 'docs-js', 'clean:docs', 'copy:docs'])
+ grunt.registerTask('docs-github', ['exec:jekyll-github'])
+
+ grunt.registerTask('prep-release', ['dist', 'docs', 'docs-github', 'compress'])
+
+ // Publish to GitHub
+ grunt.registerTask('publish', ['buildcontrol:pages'])
+}
diff --git a/templates/assets/bootstrap/ISSUE_TEMPLATE.md b/templates/assets/bootstrap/ISSUE_TEMPLATE.md
new file mode 100644
index 0000000..d2a406f
--- /dev/null
+++ b/templates/assets/bootstrap/ISSUE_TEMPLATE.md
@@ -0,0 +1,22 @@
+Before opening an issue:
+
+- [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue)
+- [Validate](https://validator.w3.org/nu/) and [lint](https://github.com/twbs/bootlint#in-the-browser) any HTML to avoid common problems
+- Prepare a [reduced test case](https://css-tricks.com/reduced-test-cases/) for any bugs
+- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md)
+
+When asking general "how to" questions:
+
+- Please do not open an issue here
+- Instead, ask for help on [StackOverflow, IRC, or Slack](https://github.com/twbs/bootstrap/blob/master/README.md#community)
+
+When reporting a bug, include:
+
+- Operating system and version (Windows, Mac OS X, Android, iOS, Win10 Mobile)
+- Browser and version (Chrome, Firefox, Safari, IE, MS Edge, Opera 15+, Android Browser)
+- Reduced test cases and potential fixes using [JS Bin](https://jsbin.com)
+
+When suggesting a feature, include:
+
+- As much detail as possible for what we should add and why it's important to Bootstrap
+- Relevant links to prior art, screenshots, or live demos whenever possible
diff --git a/templates/assets/bootstrap/LICENSE b/templates/assets/bootstrap/LICENSE
new file mode 100644
index 0000000..1381cb2
--- /dev/null
+++ b/templates/assets/bootstrap/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2011-2017 Twitter, Inc.
+Copyright (c) 2011-2017 The Bootstrap Authors
+
+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/templates/assets/bootstrap/README.md b/templates/assets/bootstrap/README.md
new file mode 100644
index 0000000..7028798
--- /dev/null
+++ b/templates/assets/bootstrap/README.md
@@ -0,0 +1,149 @@
+<p align="center">
+ <a href="https://v4-alpha.getbootstrap.com">
+ <img src="http://v4-alpha.getbootstrap.com/assets/brand/bootstrap-solid.svg" width=72 height=72>
+ </a>
+
+ <h3 align="center">Bootstrap</h3>
+
+ <p align="center">
+ Sleek, intuitive, and powerful front-end framework for faster and easier web development.
+ <br>
+ <a href="https://v4-alpha.getbootstrap.com"><strong>Visit Bootstrap &raquo;</strong></a>
+ </p>
+</p>
+
+<br>
+
+## Table of contents
+
+- [Quick start](#quick-start)
+- [Status](#status)
+- [What's included](#whats-included)
+- [Bugs and feature requests](#bugs-and-feature-requests)
+- [Documentation](#documentation)
+- [Contributing](#contributing)
+- [Community](#community)
+- [Versioning](#versioning)
+- [Creators](#creators)
+- [Copyright and license](#copyright-and-license)
+
+## Quick start
+
+Several quick start options are available:
+
+- [Download the latest release.](https://github.com/twbs/bootstrap/archive/v4.0.0-alpha.6.zip)
+- Clone the repo: `git clone https://github.com/twbs/bootstrap.git`
+- Install with [npm](https://www.npmjs.com): `npm install bootstrap@4.0.0-alpha.6`
+- Install with [yarn](https://github.com/yarnpkg/yarn): `yarn add bootstrap@4.0.0-alpha.6`
+- Install with [Composer](https://getcomposer.org): `composer require twbs/bootstrap:4.0.0-alpha.6`
+- Install with [Bower](https://bower.io): `bower install bootstrap#v4.0.0-alpha.6`
+- Install with [NuGet](https://www.nuget.org): CSS: `Install-Package bootstrap -Pre` Sass: `Install-Package bootstrap.sass -Pre` (`-Pre` is only required until Bootstrap v4 has a stable release).
+
+Read the [Getting started page](https://getbootstrap.com/getting-started/) for information on the framework contents, templates and examples, and more.
+
+## Status
+
+[![Slack](https://bootstrap-slack.herokuapp.com/badge.svg)](https://bootstrap-slack.herokuapp.com)
+![Bower version](https://img.shields.io/bower/v/bootstrap.svg)
+[![npm version](https://img.shields.io/npm/v/bootstrap.svg)](https://www.npmjs.com/package/bootstrap)
+[![Gem version](https://img.shields.io/gem/v/bootstrap.svg)](https://rubygems.org/gems/bootstrap)
+[![Build Status](https://img.shields.io/travis/twbs/bootstrap/v4-dev.svg)](https://travis-ci.org/twbs/bootstrap)
+[![devDependency Status](https://img.shields.io/david/dev/twbs/bootstrap.svg)](https://david-dm.org/twbs/bootstrap?type=dev)
+[![Meteor Atmosphere](https://img.shields.io/badge/meteor-twbs%3Abootstrap-blue.svg)](https://atmospherejs.com/twbs/bootstrap)
+[![Packagist Prerelease](https://img.shields.io/packagist/vpre/twbs/bootstrap.svg)](https://packagist.org/packages/twbs/bootstrap)
+[![NuGet](https://img.shields.io/nuget/vpre/bootstrap.svg)](https://www.nuget.org/packages/bootstrap/4.0.0-alpha5)
+
+[![Selenium Test Status](https://saucelabs.com/browser-matrix/bootstrap.svg)](https://saucelabs.com/u/bootstrap)
+
+## What's included
+
+Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations. You'll see something like this:
+
+```
+bootstrap/
+├── css/
+│ ├── bootstrap.css
+│ ├── bootstrap.css.map
+│ ├── bootstrap.min.css
+│ └── bootstrap.min.css.map
+└── js/
+ ├── bootstrap.js
+ └── bootstrap.min.js
+```
+
+We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). CSS [source maps](https://developers.google.com/web/tools/chrome-devtools/debug/readability/source-maps) (`bootstrap.*.map`) are available for use with certain browsers' developer tools.
+
+
+## Bugs and feature requests
+
+Have a bug or a feature request? Please first read the [issue guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md#using-the-issue-tracker) and search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/twbs/bootstrap/issues/new).
+
+
+## Documentation
+
+Bootstrap's documentation, included in this repo in the root directory, is built with [Jekyll](https://jekyllrb.com) and publicly hosted on GitHub Pages at <https://getbootstrap.com>. The docs may also be run locally.
+
+### Running documentation locally
+
+1. Run through the [tooling setup](https://github.com/twbs/bootstrap/blob/v4-dev/docs/getting-started/build-tools.md#tooling-setup) to install Jekyll (the site builder) and other Ruby dependencies with `bundle install`.
+2. Run `grunt` (or a specific set of Grunt tasks) to rebuild distributed CSS and JavaScript files, as well as our docs assets.
+3. From the root `/bootstrap` directory, run `bundle exec jekyll serve` in the command line.
+4. Open <http://localhost:9001> in your browser, and voilà.
+
+Learn more about using Jekyll by reading its [documentation](https://jekyllrb.com/docs/home/).
+
+### Documentation for previous releases
+
+Documentation for v2.3.2 has been made available for the time being at <https://getbootstrap.com/2.3.2/> while folks transition to Bootstrap 3.
+
+[Previous releases](https://github.com/twbs/bootstrap/releases) and their documentation are also available for download.
+
+
+
+## Contributing
+
+Please read through our [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.
+
+Moreover, if your pull request contains JavaScript patches or features, you must include [relevant unit tests](https://github.com/twbs/bootstrap/tree/master/js/tests). All HTML and CSS should conform to the [Code Guide](https://github.com/mdo/code-guide), maintained by [Mark Otto](https://github.com/mdo).
+
+Editor preferences are available in the [editor config](https://github.com/twbs/bootstrap/blob/master/.editorconfig) for easy use in common text editors. Read more and download plugins at <http://editorconfig.org>.
+
+
+
+## Community
+
+Get updates on Bootstrap's development and chat with the project maintainers and community members.
+
+- Follow [@getbootstrap on Twitter](https://twitter.com/getbootstrap).
+- Read and subscribe to [The Official Bootstrap Blog](https://blog.getbootstrap.com).
+- Join [the official Slack room](https://bootstrap-slack.herokuapp.com).
+- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel.
+- Implementation help may be found at Stack Overflow (tagged [`bootstrap-4`](https://stackoverflow.com/questions/tagged/bootstrap-4)).
+- Developers should use the keyword `bootstrap` on packages which modify or add to the functionality of Bootstrap when distributing through [npm](https://www.npmjs.com/browse/keyword/bootstrap) or similar delivery mechanisms for maximum discoverability.
+
+
+
+## Versioning
+
+For transparency into our release cycle and in striving to maintain backward compatibility, Bootstrap is maintained under [the Semantic Versioning guidelines](http://semver.org/). Sometimes we screw up, but we'll adhere to those rules whenever possible.
+
+See [the Releases section of our GitHub project](https://github.com/twbs/bootstrap/releases) for changelogs for each release version of Bootstrap. Release announcement posts on [the official Bootstrap blog](https://blog.getbootstrap.com) contain summaries of the most noteworthy changes made in each release.
+
+
+## Creators
+
+**Mark Otto**
+
+- <https://twitter.com/mdo>
+- <https://github.com/mdo>
+
+**Jacob Thornton**
+
+- <https://twitter.com/fat>
+- <https://github.com/fat>
+
+
+
+## Copyright and license
+
+Code and documentation copyright 2011-2017 the [Bootstrap Authors](https://github.com/twbs/bootstrap/graphs/contributors) and [Twitter, Inc.](https://twitter.com) Code released under the [MIT License](https://github.com/twbs/bootstrap/blob/master/LICENSE). Docs released under [Creative Commons](https://github.com/twbs/bootstrap/blob/master/docs/LICENSE).
diff --git a/templates/assets/bootstrap/bower.json b/templates/assets/bootstrap/bower.json
new file mode 100644
index 0000000..5107709
--- /dev/null
+++ b/templates/assets/bootstrap/bower.json
@@ -0,0 +1,35 @@
+{
+ "name": "bootstrap",
+ "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
+ "keywords": [
+ "css",
+ "js",
+ "sass",
+ "mobile-first",
+ "responsive",
+ "front-end",
+ "framework",
+ "web"
+ ],
+ "homepage": "https://getbootstrap.com",
+ "license": "MIT",
+ "moduleType": "globals",
+ "main": [
+ "scss/bootstrap.scss",
+ "dist/js/bootstrap.js"
+ ],
+ "ignore": [
+ "/.*",
+ "_config.yml",
+ "CNAME",
+ "composer.json",
+ "CONTRIBUTING.md",
+ "docs",
+ "js/tests",
+ "test-infra"
+ ],
+ "dependencies": {
+ "jquery": ">=1.9.1",
+ "tether": "^1.4.0"
+ }
+}
diff --git a/templates/assets/bootstrap/grunt/change-version.js b/templates/assets/bootstrap/grunt/change-version.js
new file mode 100755
index 0000000..5ea5918
--- /dev/null
+++ b/templates/assets/bootstrap/grunt/change-version.js
@@ -0,0 +1,110 @@
+#!/usr/bin/env node
+
+'use strict'
+
+/*!
+ * Script to update version number references in the project.
+ * Copyright 2017 The Bootstrap Authors
+ * Copyright 2017 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+
+/* global Set */
+
+var fs = require('fs')
+var path = require('path')
+var sh = require('shelljs')
+sh.config.fatal = true
+var sed = sh.sed
+
+// Blame TC39... https://github.com/benjamingr/RegExp.escape/issues/37
+RegExp.quote = function (string) {
+ return string.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&')
+}
+RegExp.quoteReplacement = function (string) {
+ return string.replace(/[$]/g, '$$')
+}
+
+var DRY_RUN = false
+
+function walkAsync(directory, excludedDirectories, fileCallback, errback) {
+ if (excludedDirectories.has(path.parse(directory).base)) {
+ return
+ }
+ fs.readdir(directory, function (err, names) {
+ if (err) {
+ errback(err)
+ return
+ }
+ names.forEach(function (name) {
+ var filepath = path.join(directory, name)
+ fs.lstat(filepath, function (err, stats) {
+ if (err) {
+ process.nextTick(errback, err)
+ return
+ }
+ if (stats.isSymbolicLink()) {
+ return
+ }
+ else if (stats.isDirectory()) {
+ process.nextTick(walkAsync, filepath, excludedDirectories, fileCallback, errback)
+ }
+ else if (stats.isFile()) {
+ process.nextTick(fileCallback, filepath)
+ }
+ })
+ })
+ })
+}
+
+function replaceRecursively(directory, excludedDirectories, allowedExtensions, original, replacement) {
+ original = new RegExp(RegExp.quote(original), 'g')
+ replacement = RegExp.quoteReplacement(replacement)
+ var updateFile = !DRY_RUN ? function (filepath) {
+ if (allowedExtensions.has(path.parse(filepath).ext)) {
+ sed('-i', original, replacement, filepath)
+ }
+ } : function (filepath) {
+ if (allowedExtensions.has(path.parse(filepath).ext)) {
+ console.log('FILE: ' + filepath)
+ }
+ else {
+ console.log('EXCLUDED:' + filepath)
+ }
+ }
+ walkAsync(directory, excludedDirectories, updateFile, function (err) {
+ console.error('ERROR while traversing directory!:')
+ console.error(err)
+ process.exit(1)
+ })
+}
+
+function main(args) {
+ if (args.length !== 2) {
+ console.error('USAGE: change-version old_version new_version')
+ console.error('Got arguments:', args)
+ process.exit(1)
+ }
+ var oldVersion = args[0]
+ var newVersion = args[1]
+ var EXCLUDED_DIRS = new Set([
+ '.git',
+ 'node_modules',
+ 'vendor'
+ ])
+ var INCLUDED_EXTENSIONS = new Set([
+ // This extension whitelist is how we avoid modifying binary files
+ '',
+ '.css',
+ '.html',
+ '.js',
+ '.json',
+ '.md',
+ '.scss',
+ '.txt',
+ '.yml'
+ ])
+ replaceRecursively('.', EXCLUDED_DIRS, INCLUDED_EXTENSIONS, oldVersion, newVersion)
+}
+
+main(process.argv.slice(2))
diff --git a/templates/assets/bootstrap/grunt/gcp-key.json.enc b/templates/assets/bootstrap/grunt/gcp-key.json.enc
new file mode 100644
index 0000000..6e1856a
--- /dev/null
+++ b/templates/assets/bootstrap/grunt/gcp-key.json.enc
Binary files differ
diff --git a/templates/assets/bootstrap/grunt/npm-shrinkwrap.json b/templates/assets/bootstrap/grunt/npm-shrinkwrap.json
new file mode 100644
index 0000000..f35e330
--- /dev/null
+++ b/templates/assets/bootstrap/grunt/npm-shrinkwrap.json
@@ -0,0 +1,4164 @@
+{
+ "name": "bootstrap",
+ "version": "4.0.0-alpha.6",
+ "dependencies": {
+ "abbrev": {
+ "version": "1.1.0",
+ "from": "abbrev@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz",
+ "dev": true
+ },
+ "accepts": {
+ "version": "1.3.3",
+ "from": "accepts@>=1.3.3 <1.4.0",
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz",
+ "dev": true
+ },
+ "acorn": {
+ "version": "4.0.4",
+ "from": "acorn@4.0.4",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.4.tgz",
+ "dev": true
+ },
+ "acorn-jsx": {
+ "version": "3.0.1",
+ "from": "acorn-jsx@>=3.0.0 <4.0.0",
+ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz",
+ "dev": true,
+ "dependencies": {
+ "acorn": {
+ "version": "3.3.0",
+ "from": "acorn@>=3.0.4 <4.0.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz",
+ "dev": true
+ }
+ }
+ },
+ "agent-base": {
+ "version": "2.0.1",
+ "from": "agent-base@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.0.1.tgz",
+ "dev": true,
+ "dependencies": {
+ "semver": {
+ "version": "5.0.3",
+ "from": "semver@>=5.0.1 <5.1.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz",
+ "dev": true
+ }
+ }
+ },
+ "ajv": {
+ "version": "4.11.5",
+ "from": "ajv@>=4.7.0 <5.0.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.5.tgz",
+ "dev": true
+ },
+ "ajv-keywords": {
+ "version": "1.5.1",
+ "from": "ajv-keywords@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-1.5.1.tgz",
+ "dev": true
+ },
+ "align-text": {
+ "version": "0.1.4",
+ "from": "align-text@>=0.1.3 <0.2.0",
+ "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz",
+ "dev": true
+ },
+ "ansi-escapes": {
+ "version": "1.4.0",
+ "from": "ansi-escapes@>=1.1.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz",
+ "dev": true
+ },
+ "ansi-regex": {
+ "version": "2.1.1",
+ "from": "ansi-regex@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
+ "dev": true
+ },
+ "ansi-styles": {
+ "version": "2.2.1",
+ "from": "ansi-styles@>=2.2.1 <3.0.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
+ "dev": true
+ },
+ "any-promise": {
+ "version": "1.3.0",
+ "from": "any-promise@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",
+ "dev": true
+ },
+ "anymatch": {
+ "version": "1.3.0",
+ "from": "anymatch@>=1.3.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.0.tgz",
+ "dev": true
+ },
+ "aproba": {
+ "version": "1.1.1",
+ "from": "aproba@>=1.0.3 <2.0.0",
+ "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.1.1.tgz",
+ "dev": true
+ },
+ "archiver": {
+ "version": "1.3.0",
+ "from": "archiver@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/archiver/-/archiver-1.3.0.tgz",
+ "dev": true,
+ "dependencies": {
+ "async": {
+ "version": "2.1.5",
+ "from": "async@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/async/-/async-2.1.5.tgz",
+ "dev": true
+ }
+ }
+ },
+ "archiver-utils": {
+ "version": "1.3.0",
+ "from": "archiver-utils@>=1.3.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-1.3.0.tgz",
+ "dev": true
+ },
+ "are-we-there-yet": {
+ "version": "1.1.2",
+ "from": "are-we-there-yet@>=1.1.2 <1.2.0",
+ "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz",
+ "dev": true
+ },
+ "argparse": {
+ "version": "1.0.9",
+ "from": "argparse@>=1.0.7 <2.0.0",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz",
+ "dev": true
+ },
+ "arr-diff": {
+ "version": "2.0.0",
+ "from": "arr-diff@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz",
+ "dev": true
+ },
+ "arr-flatten": {
+ "version": "1.0.1",
+ "from": "arr-flatten@>=1.0.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.1.tgz",
+ "dev": true
+ },
+ "array-differ": {
+ "version": "1.0.0",
+ "from": "array-differ@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz",
+ "dev": true
+ },
+ "array-find-index": {
+ "version": "1.0.2",
+ "from": "array-find-index@>=1.0.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
+ "dev": true
+ },
+ "array-union": {
+ "version": "1.0.2",
+ "from": "array-union@>=1.0.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",
+ "dev": true
+ },
+ "array-uniq": {
+ "version": "1.0.3",
+ "from": "array-uniq@>=1.0.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz",
+ "dev": true
+ },
+ "array-unique": {
+ "version": "0.2.1",
+ "from": "array-unique@>=0.2.1 <0.3.0",
+ "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz",
+ "dev": true
+ },
+ "arrify": {
+ "version": "1.0.1",
+ "from": "arrify@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
+ "dev": true
+ },
+ "asap": {
+ "version": "2.0.5",
+ "from": "asap@>=2.0.3 <2.1.0",
+ "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.5.tgz",
+ "dev": true
+ },
+ "asn1": {
+ "version": "0.2.3",
+ "from": "asn1@>=0.2.3 <0.3.0",
+ "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz",
+ "dev": true
+ },
+ "assert-plus": {
+ "version": "0.2.0",
+ "from": "assert-plus@>=0.2.0 <0.3.0",
+ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz",
+ "dev": true
+ },
+ "async": {
+ "version": "1.5.2",
+ "from": "async@>=1.5.2 <1.6.0",
+ "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
+ "dev": true
+ },
+ "async-each": {
+ "version": "1.0.1",
+ "from": "async-each@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz",
+ "dev": true
+ },
+ "async-foreach": {
+ "version": "0.1.3",
+ "from": "async-foreach@>=0.1.3 <0.2.0",
+ "resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz",
+ "dev": true
+ },
+ "asynckit": {
+ "version": "0.4.0",
+ "from": "asynckit@>=0.4.0 <0.5.0",
+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
+ "dev": true
+ },
+ "autoprefixer": {
+ "version": "6.7.7",
+ "from": "autoprefixer@>=6.7.7 <7.0.0",
+ "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-6.7.7.tgz",
+ "dev": true
+ },
+ "aws-sign2": {
+ "version": "0.6.0",
+ "from": "aws-sign2@>=0.6.0 <0.7.0",
+ "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz",
+ "dev": true
+ },
+ "aws4": {
+ "version": "1.6.0",
+ "from": "aws4@>=1.2.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz",
+ "dev": true
+ },
+ "babel-code-frame": {
+ "version": "6.22.0",
+ "from": "babel-code-frame@>=6.16.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.22.0.tgz",
+ "dev": true
+ },
+ "babel-core": {
+ "version": "6.24.0",
+ "from": "babel-core@>=6.0.12 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.24.0.tgz",
+ "dev": true
+ },
+ "babel-eslint": {
+ "version": "7.1.1",
+ "from": "babel-eslint@>=7.1.1 <8.0.0",
+ "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-7.1.1.tgz",
+ "dev": true
+ },
+ "babel-generator": {
+ "version": "6.24.0",
+ "from": "babel-generator@>=6.24.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.24.0.tgz",
+ "dev": true,
+ "dependencies": {
+ "jsesc": {
+ "version": "1.3.0",
+ "from": "jsesc@>=1.3.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz",
+ "dev": true
+ }
+ }
+ },
+ "babel-helper-call-delegate": {
+ "version": "6.22.0",
+ "from": "babel-helper-call-delegate@>=6.22.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.22.0.tgz",
+ "dev": true
+ },
+ "babel-helper-define-map": {
+ "version": "6.23.0",
+ "from": "babel-helper-define-map@>=6.23.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.23.0.tgz",
+ "dev": true
+ },
+ "babel-helper-function-name": {
+ "version": "6.23.0",
+ "from": "babel-helper-function-name@>=6.23.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.23.0.tgz",
+ "dev": true
+ },
+ "babel-helper-get-function-arity": {
+ "version": "6.22.0",
+ "from": "babel-helper-get-function-arity@>=6.22.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.22.0.tgz",
+ "dev": true
+ },
+ "babel-helper-hoist-variables": {
+ "version": "6.22.0",
+ "from": "babel-helper-hoist-variables@>=6.22.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.22.0.tgz",
+ "dev": true
+ },
+ "babel-helper-optimise-call-expression": {
+ "version": "6.23.0",
+ "from": "babel-helper-optimise-call-expression@>=6.23.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.23.0.tgz",
+ "dev": true
+ },
+ "babel-helper-regex": {
+ "version": "6.22.0",
+ "from": "babel-helper-regex@>=6.22.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.22.0.tgz",
+ "dev": true
+ },
+ "babel-helper-replace-supers": {
+ "version": "6.23.0",
+ "from": "babel-helper-replace-supers@>=6.23.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.23.0.tgz",
+ "dev": true
+ },
+ "babel-helpers": {
+ "version": "6.23.0",
+ "from": "babel-helpers@>=6.23.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.23.0.tgz",
+ "dev": true
+ },
+ "babel-messages": {
+ "version": "6.23.0",
+ "from": "babel-messages@>=6.23.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz",
+ "dev": true
+ },
+ "babel-plugin-check-es2015-constants": {
+ "version": "6.22.0",
+ "from": "babel-plugin-check-es2015-constants@>=6.22.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-arrow-functions": {
+ "version": "6.22.0",
+ "from": "babel-plugin-transform-es2015-arrow-functions@>=6.22.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-block-scoped-functions": {
+ "version": "6.22.0",
+ "from": "babel-plugin-transform-es2015-block-scoped-functions@>=6.22.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-block-scoping": {
+ "version": "6.23.0",
+ "from": "babel-plugin-transform-es2015-block-scoping@>=6.22.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.23.0.tgz",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-classes": {
+ "version": "6.23.0",
+ "from": "babel-plugin-transform-es2015-classes@>=6.22.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.23.0.tgz",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-computed-properties": {
+ "version": "6.22.0",
+ "from": "babel-plugin-transform-es2015-computed-properties@>=6.22.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.22.0.tgz",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-destructuring": {
+ "version": "6.23.0",
+ "from": "babel-plugin-transform-es2015-destructuring@>=6.22.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-duplicate-keys": {
+ "version": "6.22.0",
+ "from": "babel-plugin-transform-es2015-duplicate-keys@>=6.22.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.22.0.tgz",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-for-of": {
+ "version": "6.23.0",
+ "from": "babel-plugin-transform-es2015-for-of@>=6.22.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-function-name": {
+ "version": "6.22.0",
+ "from": "babel-plugin-transform-es2015-function-name@>=6.22.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.22.0.tgz",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-literals": {
+ "version": "6.22.0",
+ "from": "babel-plugin-transform-es2015-literals@>=6.22.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-modules-amd": {
+ "version": "6.24.0",
+ "from": "babel-plugin-transform-es2015-modules-amd@>=6.24.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.0.tgz",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-modules-commonjs": {
+ "version": "6.24.0",
+ "from": "babel-plugin-transform-es2015-modules-commonjs@>=6.24.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.0.tgz",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-modules-strip": {
+ "version": "0.1.0",
+ "from": "babel-plugin-transform-es2015-modules-strip@>=0.1.0 <0.2.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-strip/-/babel-plugin-transform-es2015-modules-strip-0.1.0.tgz",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-modules-systemjs": {
+ "version": "6.23.0",
+ "from": "babel-plugin-transform-es2015-modules-systemjs@>=6.22.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.23.0.tgz",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-modules-umd": {
+ "version": "6.24.0",
+ "from": "babel-plugin-transform-es2015-modules-umd@>=6.24.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.0.tgz",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-object-super": {
+ "version": "6.22.0",
+ "from": "babel-plugin-transform-es2015-object-super@>=6.22.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.22.0.tgz",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-parameters": {
+ "version": "6.23.0",
+ "from": "babel-plugin-transform-es2015-parameters@>=6.22.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.23.0.tgz",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-shorthand-properties": {
+ "version": "6.22.0",
+ "from": "babel-plugin-transform-es2015-shorthand-properties@>=6.22.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.22.0.tgz",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-spread": {
+ "version": "6.22.0",
+ "from": "babel-plugin-transform-es2015-spread@>=6.22.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-sticky-regex": {
+ "version": "6.22.0",
+ "from": "babel-plugin-transform-es2015-sticky-regex@>=6.22.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.22.0.tgz",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-template-literals": {
+ "version": "6.22.0",
+ "from": "babel-plugin-transform-es2015-template-literals@>=6.22.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-typeof-symbol": {
+ "version": "6.23.0",
+ "from": "babel-plugin-transform-es2015-typeof-symbol@>=6.22.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz",
+ "dev": true
+ },
+ "babel-plugin-transform-es2015-unicode-regex": {
+ "version": "6.22.0",
+ "from": "babel-plugin-transform-es2015-unicode-regex@>=6.22.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.22.0.tgz",
+ "dev": true
+ },
+ "babel-plugin-transform-regenerator": {
+ "version": "6.22.0",
+ "from": "babel-plugin-transform-regenerator@>=6.22.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.22.0.tgz",
+ "dev": true
+ },
+ "babel-plugin-transform-strict-mode": {
+ "version": "6.22.0",
+ "from": "babel-plugin-transform-strict-mode@>=6.22.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.22.0.tgz",
+ "dev": true
+ },
+ "babel-preset-es2015": {
+ "version": "6.24.0",
+ "from": "babel-preset-es2015@>=6.24.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.24.0.tgz",
+ "dev": true
+ },
+ "babel-register": {
+ "version": "6.24.0",
+ "from": "babel-register@>=6.24.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.24.0.tgz",
+ "dev": true
+ },
+ "babel-runtime": {
+ "version": "6.23.0",
+ "from": "babel-runtime@>=6.22.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.23.0.tgz",
+ "dev": true
+ },
+ "babel-template": {
+ "version": "6.23.0",
+ "from": "babel-template@>=6.23.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.23.0.tgz",
+ "dev": true
+ },
+ "babel-traverse": {
+ "version": "6.23.1",
+ "from": "babel-traverse@>=6.15.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.23.1.tgz",
+ "dev": true
+ },
+ "babel-types": {
+ "version": "6.23.0",
+ "from": "babel-types@>=6.15.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.23.0.tgz",
+ "dev": true
+ },
+ "babylon": {
+ "version": "6.16.1",
+ "from": "babylon@>=6.13.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.16.1.tgz",
+ "dev": true
+ },
+ "balanced-match": {
+ "version": "0.4.2",
+ "from": "balanced-match@>=0.4.1 <0.5.0",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz",
+ "dev": true
+ },
+ "basic-auth": {
+ "version": "1.1.0",
+ "from": "basic-auth@>=1.1.0 <1.2.0",
+ "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-1.1.0.tgz",
+ "dev": true
+ },
+ "batch": {
+ "version": "0.5.3",
+ "from": "batch@0.5.3",
+ "resolved": "https://registry.npmjs.org/batch/-/batch-0.5.3.tgz",
+ "dev": true
+ },
+ "bcrypt-pbkdf": {
+ "version": "1.0.1",
+ "from": "bcrypt-pbkdf@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz",
+ "dev": true,
+ "optional": true
+ },
+ "binary-extensions": {
+ "version": "1.8.0",
+ "from": "binary-extensions@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.8.0.tgz",
+ "dev": true
+ },
+ "bl": {
+ "version": "1.2.0",
+ "from": "bl@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.0.tgz",
+ "dev": true
+ },
+ "block-stream": {
+ "version": "0.0.9",
+ "from": "block-stream@*",
+ "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz",
+ "dev": true
+ },
+ "bluebird": {
+ "version": "3.5.0",
+ "from": "bluebird@>=3.0.6 <4.0.0",
+ "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz",
+ "dev": true
+ },
+ "body-parser": {
+ "version": "1.14.2",
+ "from": "body-parser@>=1.14.0 <1.15.0",
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.14.2.tgz",
+ "dev": true,
+ "dependencies": {
+ "debug": {
+ "version": "2.2.0",
+ "from": "debug@>=2.2.0 <2.3.0",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
+ "dev": true
+ },
+ "http-errors": {
+ "version": "1.3.1",
+ "from": "http-errors@>=1.3.1 <1.4.0",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.3.1.tgz",
+ "dev": true
+ },
+ "iconv-lite": {
+ "version": "0.4.13",
+ "from": "iconv-lite@0.4.13",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.13.tgz",
+ "dev": true
+ },
+ "ms": {
+ "version": "0.7.1",
+ "from": "ms@0.7.1",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
+ "dev": true
+ },
+ "qs": {
+ "version": "5.2.0",
+ "from": "qs@5.2.0",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-5.2.0.tgz",
+ "dev": true
+ }
+ }
+ },
+ "boom": {
+ "version": "2.10.1",
+ "from": "boom@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz",
+ "dev": true
+ },
+ "brace-expansion": {
+ "version": "1.1.6",
+ "from": "brace-expansion@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.6.tgz",
+ "dev": true
+ },
+ "braces": {
+ "version": "1.8.5",
+ "from": "braces@>=1.8.2 <2.0.0",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz",
+ "dev": true
+ },
+ "browserslist": {
+ "version": "1.7.6",
+ "from": "browserslist@>=1.7.6 <2.0.0",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-1.7.6.tgz",
+ "dev": true
+ },
+ "buffer-crc32": {
+ "version": "0.2.13",
+ "from": "buffer-crc32@>=0.2.1 <0.3.0",
+ "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
+ "dev": true
+ },
+ "buffer-shims": {
+ "version": "1.0.0",
+ "from": "buffer-shims@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz",
+ "dev": true
+ },
+ "builtin-modules": {
+ "version": "1.1.1",
+ "from": "builtin-modules@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
+ "dev": true
+ },
+ "bulk-require": {
+ "version": "1.0.0",
+ "from": "bulk-require@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/bulk-require/-/bulk-require-1.0.0.tgz",
+ "dev": true,
+ "dependencies": {
+ "glob": {
+ "version": "3.2.11",
+ "from": "glob@>=3.2.7 <3.3.0",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz",
+ "dev": true
+ },
+ "minimatch": {
+ "version": "0.3.0",
+ "from": "minimatch@>=0.3.0 <0.4.0",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz",
+ "dev": true
+ }
+ }
+ },
+ "bytes": {
+ "version": "2.2.0",
+ "from": "bytes@2.2.0",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.2.0.tgz",
+ "dev": true
+ },
+ "caller-path": {
+ "version": "0.1.0",
+ "from": "caller-path@>=0.1.0 <0.2.0",
+ "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz",
+ "dev": true
+ },
+ "callsites": {
+ "version": "0.2.0",
+ "from": "callsites@>=0.2.0 <0.3.0",
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz",
+ "dev": true
+ },
+ "camelcase": {
+ "version": "2.1.1",
+ "from": "camelcase@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz",
+ "dev": true
+ },
+ "camelcase-keys": {
+ "version": "2.1.0",
+ "from": "camelcase-keys@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz",
+ "dev": true
+ },
+ "caniuse-db": {
+ "version": "1.0.30000637",
+ "from": "caniuse-db@>=1.0.30000634 <2.0.0",
+ "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000637.tgz",
+ "dev": true
+ },
+ "caseless": {
+ "version": "0.11.0",
+ "from": "caseless@>=0.11.0 <0.12.0",
+ "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz",
+ "dev": true
+ },
+ "center-align": {
+ "version": "0.1.3",
+ "from": "center-align@>=0.1.1 <0.2.0",
+ "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz",
+ "dev": true
+ },
+ "chalk": {
+ "version": "1.1.3",
+ "from": "chalk@>=1.1.3 <2.0.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
+ "dev": true,
+ "dependencies": {
+ "supports-color": {
+ "version": "2.0.0",
+ "from": "supports-color@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
+ "dev": true
+ }
+ }
+ },
+ "chokidar": {
+ "version": "1.6.1",
+ "from": "chokidar@>=1.6.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.6.1.tgz",
+ "dev": true
+ },
+ "circular-json": {
+ "version": "0.3.1",
+ "from": "circular-json@>=0.3.1 <0.4.0",
+ "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.1.tgz",
+ "dev": true
+ },
+ "cjson": {
+ "version": "0.5.0",
+ "from": "cjson@>=0.5.0 <0.6.0",
+ "resolved": "https://registry.npmjs.org/cjson/-/cjson-0.5.0.tgz",
+ "dev": true
+ },
+ "clean-css": {
+ "version": "4.0.9",
+ "from": "clean-css@>=4.0.9 <5.0.0",
+ "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.0.9.tgz",
+ "dev": true
+ },
+ "clean-css-cli": {
+ "version": "4.0.9",
+ "from": "clean-css-cli@>=4.0.9 <5.0.0",
+ "resolved": "https://registry.npmjs.org/clean-css-cli/-/clean-css-cli-4.0.9.tgz",
+ "dev": true
+ },
+ "cli": {
+ "version": "0.6.6",
+ "from": "cli@>=0.6.0 <0.7.0",
+ "resolved": "https://registry.npmjs.org/cli/-/cli-0.6.6.tgz",
+ "dev": true,
+ "dependencies": {
+ "glob": {
+ "version": "3.2.11",
+ "from": "glob@>=3.2.1 <3.3.0",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz",
+ "dev": true
+ },
+ "minimatch": {
+ "version": "0.3.0",
+ "from": "minimatch@>=0.3.0 <0.4.0",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz",
+ "dev": true
+ }
+ }
+ },
+ "cli-cursor": {
+ "version": "1.0.2",
+ "from": "cli-cursor@>=1.0.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz",
+ "dev": true
+ },
+ "cli-spinners": {
+ "version": "1.0.0",
+ "from": "cli-spinners@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-1.0.0.tgz",
+ "dev": true
+ },
+ "cli-width": {
+ "version": "2.1.0",
+ "from": "cli-width@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.1.0.tgz",
+ "dev": true
+ },
+ "cliui": {
+ "version": "3.2.0",
+ "from": "cliui@>=3.2.0 <4.0.0",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
+ "dev": true
+ },
+ "co": {
+ "version": "4.6.0",
+ "from": "co@>=4.6.0 <5.0.0",
+ "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
+ "dev": true
+ },
+ "code-point-at": {
+ "version": "1.1.0",
+ "from": "code-point-at@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
+ "dev": true
+ },
+ "coffee-script": {
+ "version": "1.10.0",
+ "from": "coffee-script@>=1.10.0 <1.11.0",
+ "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.10.0.tgz",
+ "dev": true
+ },
+ "colors": {
+ "version": "1.1.2",
+ "from": "colors@>=1.1.2 <1.2.0",
+ "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz",
+ "dev": true
+ },
+ "combined-stream": {
+ "version": "1.0.5",
+ "from": "combined-stream@>=1.0.5 <1.1.0",
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz",
+ "dev": true
+ },
+ "commander": {
+ "version": "2.9.0",
+ "from": "commander@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz",
+ "dev": true
+ },
+ "compress-commons": {
+ "version": "1.2.0",
+ "from": "compress-commons@>=1.1.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-1.2.0.tgz",
+ "dev": true
+ },
+ "concat-map": {
+ "version": "0.0.1",
+ "from": "concat-map@0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "dev": true
+ },
+ "concat-stream": {
+ "version": "1.6.0",
+ "from": "concat-stream@>=1.5.2 <2.0.0",
+ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz",
+ "dev": true
+ },
+ "connect": {
+ "version": "3.6.0",
+ "from": "connect@>=3.4.0 <4.0.0",
+ "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.0.tgz",
+ "dev": true,
+ "dependencies": {
+ "debug": {
+ "version": "2.6.1",
+ "from": "debug@2.6.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.1.tgz",
+ "dev": true
+ }
+ }
+ },
+ "connect-livereload": {
+ "version": "0.5.4",
+ "from": "connect-livereload@>=0.5.0 <0.6.0",
+ "resolved": "https://registry.npmjs.org/connect-livereload/-/connect-livereload-0.5.4.tgz",
+ "dev": true
+ },
+ "console-browserify": {
+ "version": "1.1.0",
+ "from": "console-browserify@>=1.1.0 <1.2.0",
+ "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz",
+ "dev": true
+ },
+ "console-control-strings": {
+ "version": "1.1.0",
+ "from": "console-control-strings@>=1.1.0 <1.2.0",
+ "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
+ "dev": true
+ },
+ "content-type": {
+ "version": "1.0.2",
+ "from": "content-type@>=1.0.1 <1.1.0",
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.2.tgz",
+ "dev": true
+ },
+ "convert-source-map": {
+ "version": "1.4.0",
+ "from": "convert-source-map@>=1.1.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.4.0.tgz",
+ "dev": true
+ },
+ "core-js": {
+ "version": "2.4.1",
+ "from": "core-js@>=2.4.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.4.1.tgz",
+ "dev": true
+ },
+ "core-util-is": {
+ "version": "1.0.2",
+ "from": "core-util-is@>=1.0.0 <1.1.0",
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
+ "dev": true
+ },
+ "cosmiconfig": {
+ "version": "2.1.1",
+ "from": "cosmiconfig@>=2.1.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-2.1.1.tgz",
+ "dev": true,
+ "dependencies": {
+ "minimist": {
+ "version": "1.2.0",
+ "from": "minimist@>=1.2.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
+ "dev": true
+ }
+ }
+ },
+ "crc": {
+ "version": "3.4.4",
+ "from": "crc@>=3.4.4 <4.0.0",
+ "resolved": "https://registry.npmjs.org/crc/-/crc-3.4.4.tgz",
+ "dev": true
+ },
+ "crc32-stream": {
+ "version": "2.0.0",
+ "from": "crc32-stream@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-2.0.0.tgz",
+ "dev": true
+ },
+ "cross-spawn": {
+ "version": "3.0.1",
+ "from": "cross-spawn@>=3.0.0 <4.0.0",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz",
+ "dev": true,
+ "dependencies": {
+ "lru-cache": {
+ "version": "4.0.2",
+ "from": "lru-cache@>=4.0.1 <5.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.0.2.tgz",
+ "dev": true
+ }
+ }
+ },
+ "cryptiles": {
+ "version": "2.0.5",
+ "from": "cryptiles@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz",
+ "dev": true
+ },
+ "csslint": {
+ "version": "0.10.0",
+ "from": "csslint@0.10.0",
+ "resolved": "https://registry.npmjs.org/csslint/-/csslint-0.10.0.tgz",
+ "dev": true
+ },
+ "currently-unhandled": {
+ "version": "0.4.1",
+ "from": "currently-unhandled@>=0.4.1 <0.5.0",
+ "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
+ "dev": true
+ },
+ "d": {
+ "version": "1.0.0",
+ "from": "d@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz",
+ "dev": true
+ },
+ "dashdash": {
+ "version": "1.14.1",
+ "from": "dashdash@>=1.12.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
+ "dev": true,
+ "dependencies": {
+ "assert-plus": {
+ "version": "1.0.0",
+ "from": "assert-plus@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
+ "dev": true
+ }
+ }
+ },
+ "date-now": {
+ "version": "0.1.4",
+ "from": "date-now@>=0.1.4 <0.2.0",
+ "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz",
+ "dev": true
+ },
+ "date-time": {
+ "version": "1.1.0",
+ "from": "date-time@>=1.1.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/date-time/-/date-time-1.1.0.tgz",
+ "dev": true
+ },
+ "dateformat": {
+ "version": "1.0.12",
+ "from": "dateformat@>=1.0.12 <1.1.0",
+ "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz",
+ "dev": true
+ },
+ "debug": {
+ "version": "2.6.3",
+ "from": "debug@>=2.2.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.3.tgz",
+ "dev": true
+ },
+ "decamelize": {
+ "version": "1.2.0",
+ "from": "decamelize@>=1.1.2 <2.0.0",
+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
+ "dev": true
+ },
+ "deep-is": {
+ "version": "0.1.3",
+ "from": "deep-is@>=0.1.3 <0.2.0",
+ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
+ "dev": true
+ },
+ "del": {
+ "version": "2.2.2",
+ "from": "del@>=2.0.2 <3.0.0",
+ "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz",
+ "dev": true
+ },
+ "delayed-stream": {
+ "version": "1.0.0",
+ "from": "delayed-stream@>=1.0.0 <1.1.0",
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
+ "dev": true
+ },
+ "delegates": {
+ "version": "1.0.0",
+ "from": "delegates@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
+ "dev": true
+ },
+ "depd": {
+ "version": "1.1.0",
+ "from": "depd@>=1.1.0 <1.2.0",
+ "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz",
+ "dev": true
+ },
+ "destroy": {
+ "version": "1.0.4",
+ "from": "destroy@>=1.0.4 <1.1.0",
+ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
+ "dev": true
+ },
+ "detect-file": {
+ "version": "0.1.0",
+ "from": "detect-file@>=0.1.0 <0.2.0",
+ "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-0.1.0.tgz",
+ "dev": true
+ },
+ "detect-indent": {
+ "version": "4.0.0",
+ "from": "detect-indent@>=4.0.0 <5.0.0",
+ "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz",
+ "dev": true
+ },
+ "doctrine": {
+ "version": "2.0.0",
+ "from": "doctrine@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.0.0.tgz",
+ "dev": true
+ },
+ "dom-serializer": {
+ "version": "0.1.0",
+ "from": "dom-serializer@>=0.0.0 <1.0.0",
+ "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz",
+ "dev": true,
+ "dependencies": {
+ "domelementtype": {
+ "version": "1.1.3",
+ "from": "domelementtype@>=1.1.1 <1.2.0",
+ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz",
+ "dev": true
+ },
+ "entities": {
+ "version": "1.1.1",
+ "from": "entities@>=1.1.1 <1.2.0",
+ "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz",
+ "dev": true
+ }
+ }
+ },
+ "domelementtype": {
+ "version": "1.3.0",
+ "from": "domelementtype@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz",
+ "dev": true
+ },
+ "domhandler": {
+ "version": "2.3.0",
+ "from": "domhandler@>=2.3.0 <2.4.0",
+ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz",
+ "dev": true
+ },
+ "domutils": {
+ "version": "1.5.1",
+ "from": "domutils@>=1.5.0 <1.6.0",
+ "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz",
+ "dev": true
+ },
+ "ecc-jsbn": {
+ "version": "0.1.1",
+ "from": "ecc-jsbn@>=0.1.1 <0.2.0",
+ "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz",
+ "dev": true,
+ "optional": true
+ },
+ "ee-first": {
+ "version": "1.1.1",
+ "from": "ee-first@1.1.1",
+ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
+ "dev": true
+ },
+ "electron-to-chromium": {
+ "version": "1.2.7",
+ "from": "electron-to-chromium@>=1.2.5 <2.0.0",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.2.7.tgz",
+ "dev": true
+ },
+ "encodeurl": {
+ "version": "1.0.1",
+ "from": "encodeurl@>=1.0.1 <1.1.0",
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz",
+ "dev": true
+ },
+ "end-of-stream": {
+ "version": "1.4.0",
+ "from": "end-of-stream@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.0.tgz",
+ "dev": true
+ },
+ "entities": {
+ "version": "1.0.0",
+ "from": "entities@>=1.0.0 <1.1.0",
+ "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz",
+ "dev": true
+ },
+ "error-ex": {
+ "version": "1.3.1",
+ "from": "error-ex@>=1.2.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz",
+ "dev": true
+ },
+ "es5-ext": {
+ "version": "0.10.14",
+ "from": "es5-ext@>=0.10.14 <0.11.0",
+ "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.14.tgz",
+ "dev": true
+ },
+ "es6-iterator": {
+ "version": "2.0.1",
+ "from": "es6-iterator@>=2.0.1 <2.1.0",
+ "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.1.tgz",
+ "dev": true
+ },
+ "es6-map": {
+ "version": "0.1.5",
+ "from": "es6-map@>=0.1.3 <0.2.0",
+ "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz",
+ "dev": true
+ },
+ "es6-object-assign": {
+ "version": "1.1.0",
+ "from": "es6-object-assign@>=1.0.3 <2.0.0",
+ "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz",
+ "dev": true
+ },
+ "es6-promise": {
+ "version": "4.0.5",
+ "from": "es6-promise@>=4.0.3 <4.1.0",
+ "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.0.5.tgz",
+ "dev": true
+ },
+ "es6-set": {
+ "version": "0.1.5",
+ "from": "es6-set@>=0.1.5 <0.2.0",
+ "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz",
+ "dev": true
+ },
+ "es6-symbol": {
+ "version": "3.1.1",
+ "from": "es6-symbol@>=3.1.1 <3.2.0",
+ "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz",
+ "dev": true
+ },
+ "es6-weak-map": {
+ "version": "2.0.2",
+ "from": "es6-weak-map@>=2.0.1 <3.0.0",
+ "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz",
+ "dev": true
+ },
+ "escape-html": {
+ "version": "1.0.3",
+ "from": "escape-html@>=1.0.3 <1.1.0",
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+ "dev": true
+ },
+ "escape-string-regexp": {
+ "version": "1.0.5",
+ "from": "escape-string-regexp@>=1.0.2 <2.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "dev": true
+ },
+ "escope": {
+ "version": "3.6.0",
+ "from": "escope@>=3.6.0 <4.0.0",
+ "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz",
+ "dev": true
+ },
+ "eslint": {
+ "version": "3.18.0",
+ "from": "eslint@>=3.18.0 <4.0.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-3.18.0.tgz",
+ "dev": true
+ },
+ "espree": {
+ "version": "3.4.0",
+ "from": "espree@>=3.4.0 <4.0.0",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-3.4.0.tgz",
+ "dev": true
+ },
+ "esprima": {
+ "version": "3.1.3",
+ "from": "esprima@>=3.1.1 <4.0.0",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz",
+ "dev": true
+ },
+ "esquery": {
+ "version": "1.0.0",
+ "from": "esquery@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.0.tgz",
+ "dev": true
+ },
+ "esrecurse": {
+ "version": "4.1.0",
+ "from": "esrecurse@>=4.1.0 <5.0.0",
+ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.1.0.tgz",
+ "dev": true,
+ "dependencies": {
+ "estraverse": {
+ "version": "4.1.1",
+ "from": "estraverse@>=4.1.0 <4.2.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.1.1.tgz",
+ "dev": true
+ }
+ }
+ },
+ "estraverse": {
+ "version": "4.2.0",
+ "from": "estraverse@>=4.2.0 <5.0.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz",
+ "dev": true
+ },
+ "esutils": {
+ "version": "2.0.2",
+ "from": "esutils@>=2.0.2 <3.0.0",
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
+ "dev": true
+ },
+ "etag": {
+ "version": "1.8.0",
+ "from": "etag@>=1.8.0 <1.9.0",
+ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.0.tgz",
+ "dev": true
+ },
+ "event-emitter": {
+ "version": "0.3.5",
+ "from": "event-emitter@>=0.3.5 <0.4.0",
+ "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz",
+ "dev": true
+ },
+ "eventemitter2": {
+ "version": "0.4.14",
+ "from": "eventemitter2@>=0.4.13 <0.5.0",
+ "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz",
+ "dev": true
+ },
+ "exit": {
+ "version": "0.1.2",
+ "from": "exit@>=0.1.1 <0.2.0",
+ "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz",
+ "dev": true
+ },
+ "exit-hook": {
+ "version": "1.1.1",
+ "from": "exit-hook@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz",
+ "dev": true
+ },
+ "expand-brackets": {
+ "version": "0.1.5",
+ "from": "expand-brackets@>=0.1.4 <0.2.0",
+ "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz",
+ "dev": true
+ },
+ "expand-range": {
+ "version": "1.8.2",
+ "from": "expand-range@>=1.8.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz",
+ "dev": true
+ },
+ "expand-tilde": {
+ "version": "1.2.2",
+ "from": "expand-tilde@>=1.2.2 <2.0.0",
+ "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-1.2.2.tgz",
+ "dev": true
+ },
+ "extend": {
+ "version": "3.0.0",
+ "from": "extend@>=3.0.0 <3.1.0",
+ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz",
+ "dev": true
+ },
+ "extglob": {
+ "version": "0.3.2",
+ "from": "extglob@>=0.3.1 <0.4.0",
+ "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz",
+ "dev": true
+ },
+ "extract-zip": {
+ "version": "1.5.0",
+ "from": "extract-zip@>=1.5.0 <1.6.0",
+ "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.5.0.tgz",
+ "dev": true,
+ "dependencies": {
+ "concat-stream": {
+ "version": "1.5.0",
+ "from": "concat-stream@1.5.0",
+ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.0.tgz",
+ "dev": true
+ },
+ "debug": {
+ "version": "0.7.4",
+ "from": "debug@0.7.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz",
+ "dev": true
+ },
+ "mkdirp": {
+ "version": "0.5.0",
+ "from": "mkdirp@0.5.0",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz",
+ "dev": true
+ },
+ "readable-stream": {
+ "version": "2.0.6",
+ "from": "readable-stream@>=2.0.0 <2.1.0",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz",
+ "dev": true
+ }
+ }
+ },
+ "extsprintf": {
+ "version": "1.0.2",
+ "from": "extsprintf@1.0.2",
+ "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz",
+ "dev": true
+ },
+ "fast-levenshtein": {
+ "version": "2.0.6",
+ "from": "fast-levenshtein@>=2.0.4 <2.1.0",
+ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
+ "dev": true
+ },
+ "faye-websocket": {
+ "version": "0.10.0",
+ "from": "faye-websocket@>=0.10.0 <0.11.0",
+ "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz",
+ "dev": true
+ },
+ "fd-slicer": {
+ "version": "1.0.1",
+ "from": "fd-slicer@>=1.0.1 <1.1.0",
+ "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz",
+ "dev": true
+ },
+ "fg-lodash": {
+ "version": "0.0.2",
+ "from": "fg-lodash@0.0.2",
+ "resolved": "https://registry.npmjs.org/fg-lodash/-/fg-lodash-0.0.2.tgz",
+ "dev": true,
+ "dependencies": {
+ "lodash": {
+ "version": "2.4.2",
+ "from": "lodash@>=2.4.1 <3.0.0",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz",
+ "dev": true
+ },
+ "underscore.string": {
+ "version": "2.3.3",
+ "from": "underscore.string@>=2.3.3 <2.4.0",
+ "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz",
+ "dev": true
+ }
+ }
+ },
+ "figures": {
+ "version": "1.7.0",
+ "from": "figures@>=1.3.5 <2.0.0",
+ "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz",
+ "dev": true
+ },
+ "file-entry-cache": {
+ "version": "2.0.0",
+ "from": "file-entry-cache@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz",
+ "dev": true
+ },
+ "file-sync-cmp": {
+ "version": "0.1.1",
+ "from": "file-sync-cmp@>=0.1.0 <0.2.0",
+ "resolved": "https://registry.npmjs.org/file-sync-cmp/-/file-sync-cmp-0.1.1.tgz",
+ "dev": true
+ },
+ "filename-regex": {
+ "version": "2.0.0",
+ "from": "filename-regex@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.0.tgz",
+ "dev": true
+ },
+ "fill-range": {
+ "version": "2.2.3",
+ "from": "fill-range@>=2.1.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz",
+ "dev": true
+ },
+ "finalhandler": {
+ "version": "1.0.0",
+ "from": "finalhandler@1.0.0",
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.0.tgz",
+ "dev": true,
+ "dependencies": {
+ "debug": {
+ "version": "2.6.1",
+ "from": "debug@2.6.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.1.tgz",
+ "dev": true
+ }
+ }
+ },
+ "find-up": {
+ "version": "1.1.2",
+ "from": "find-up@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
+ "dev": true
+ },
+ "findup-sync": {
+ "version": "0.3.0",
+ "from": "findup-sync@>=0.3.0 <0.4.0",
+ "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz",
+ "dev": true,
+ "dependencies": {
+ "glob": {
+ "version": "5.0.15",
+ "from": "glob@>=5.0.0 <5.1.0",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz",
+ "dev": true
+ }
+ }
+ },
+ "fined": {
+ "version": "1.0.2",
+ "from": "fined@>=1.0.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/fined/-/fined-1.0.2.tgz",
+ "dev": true
+ },
+ "flagged-respawn": {
+ "version": "0.3.2",
+ "from": "flagged-respawn@>=0.3.2 <0.4.0",
+ "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-0.3.2.tgz",
+ "dev": true
+ },
+ "flat-cache": {
+ "version": "1.2.2",
+ "from": "flat-cache@>=1.2.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.2.2.tgz",
+ "dev": true
+ },
+ "for-in": {
+ "version": "1.0.2",
+ "from": "for-in@>=1.0.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
+ "dev": true
+ },
+ "for-own": {
+ "version": "0.1.5",
+ "from": "for-own@>=0.1.4 <0.2.0",
+ "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz",
+ "dev": true
+ },
+ "forever-agent": {
+ "version": "0.6.1",
+ "from": "forever-agent@>=0.6.1 <0.7.0",
+ "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
+ "dev": true
+ },
+ "form-data": {
+ "version": "2.1.2",
+ "from": "form-data@>=2.1.1 <2.2.0",
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.2.tgz",
+ "dev": true
+ },
+ "fresh": {
+ "version": "0.5.0",
+ "from": "fresh@0.5.0",
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.0.tgz",
+ "dev": true
+ },
+ "fs-exists-sync": {
+ "version": "0.1.0",
+ "from": "fs-exists-sync@>=0.1.0 <0.2.0",
+ "resolved": "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz",
+ "dev": true
+ },
+ "fs-extra": {
+ "version": "1.0.0",
+ "from": "fs-extra@>=1.0.0 <1.1.0",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-1.0.0.tgz",
+ "dev": true
+ },
+ "fs-promise": {
+ "version": "1.0.0",
+ "from": "fs-promise@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/fs-promise/-/fs-promise-1.0.0.tgz",
+ "dev": true
+ },
+ "fs.realpath": {
+ "version": "1.0.0",
+ "from": "fs.realpath@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "dev": true
+ },
+ "fstream": {
+ "version": "1.0.11",
+ "from": "fstream@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz",
+ "dev": true
+ },
+ "gauge": {
+ "version": "2.7.3",
+ "from": "gauge@>=2.7.1 <2.8.0",
+ "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.3.tgz",
+ "dev": true
+ },
+ "gaze": {
+ "version": "1.1.2",
+ "from": "gaze@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.2.tgz",
+ "dev": true
+ },
+ "generate-function": {
+ "version": "2.0.0",
+ "from": "generate-function@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz",
+ "dev": true
+ },
+ "generate-object-property": {
+ "version": "1.2.0",
+ "from": "generate-object-property@>=1.1.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz",
+ "dev": true
+ },
+ "get-caller-file": {
+ "version": "1.0.2",
+ "from": "get-caller-file@>=1.0.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz",
+ "dev": true
+ },
+ "get-stdin": {
+ "version": "4.0.1",
+ "from": "get-stdin@>=4.0.1 <5.0.0",
+ "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
+ "dev": true
+ },
+ "getobject": {
+ "version": "0.1.0",
+ "from": "getobject@>=0.1.0 <0.2.0",
+ "resolved": "https://registry.npmjs.org/getobject/-/getobject-0.1.0.tgz",
+ "dev": true
+ },
+ "getpass": {
+ "version": "0.1.6",
+ "from": "getpass@>=0.1.1 <0.2.0",
+ "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.6.tgz",
+ "dev": true,
+ "dependencies": {
+ "assert-plus": {
+ "version": "1.0.0",
+ "from": "assert-plus@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
+ "dev": true
+ }
+ }
+ },
+ "glob": {
+ "version": "7.1.1",
+ "from": "glob@>=7.0.3 <8.0.0",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz",
+ "dev": true
+ },
+ "glob-base": {
+ "version": "0.3.0",
+ "from": "glob-base@>=0.3.0 <0.4.0",
+ "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz",
+ "dev": true
+ },
+ "glob-parent": {
+ "version": "2.0.0",
+ "from": "glob-parent@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz",
+ "dev": true
+ },
+ "global-modules": {
+ "version": "0.2.3",
+ "from": "global-modules@>=0.2.3 <0.3.0",
+ "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-0.2.3.tgz",
+ "dev": true
+ },
+ "global-prefix": {
+ "version": "0.1.5",
+ "from": "global-prefix@>=0.1.4 <0.2.0",
+ "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-0.1.5.tgz",
+ "dev": true
+ },
+ "globals": {
+ "version": "9.16.0",
+ "from": "globals@>=9.0.0 <10.0.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-9.16.0.tgz",
+ "dev": true
+ },
+ "globby": {
+ "version": "5.0.0",
+ "from": "globby@>=5.0.0 <6.0.0",
+ "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz",
+ "dev": true
+ },
+ "globule": {
+ "version": "1.1.0",
+ "from": "globule@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/globule/-/globule-1.1.0.tgz",
+ "dev": true,
+ "dependencies": {
+ "lodash": {
+ "version": "4.16.6",
+ "from": "lodash@>=4.16.4 <4.17.0",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.16.6.tgz",
+ "dev": true
+ }
+ }
+ },
+ "graceful-fs": {
+ "version": "4.1.11",
+ "from": "graceful-fs@>=4.1.2 <5.0.0",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
+ "dev": true
+ },
+ "graceful-readlink": {
+ "version": "1.0.1",
+ "from": "graceful-readlink@>=1.0.0",
+ "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz",
+ "dev": true
+ },
+ "grunt": {
+ "version": "1.0.1",
+ "from": "grunt@>=1.0.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.0.1.tgz",
+ "dev": true,
+ "dependencies": {
+ "esprima": {
+ "version": "2.7.3",
+ "from": "esprima@>=2.6.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz",
+ "dev": true
+ },
+ "glob": {
+ "version": "7.0.6",
+ "from": "glob@>=7.0.0 <7.1.0",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz",
+ "dev": true
+ },
+ "grunt-cli": {
+ "version": "1.2.0",
+ "from": "grunt-cli@>=1.2.0 <1.3.0",
+ "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.2.0.tgz",
+ "dev": true
+ },
+ "js-yaml": {
+ "version": "3.5.5",
+ "from": "js-yaml@>=3.5.2 <3.6.0",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.5.5.tgz",
+ "dev": true
+ },
+ "resolve": {
+ "version": "1.1.7",
+ "from": "resolve@>=1.1.0 <1.2.0",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz",
+ "dev": true
+ },
+ "rimraf": {
+ "version": "2.2.8",
+ "from": "rimraf@>=2.2.8 <2.3.0",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz",
+ "dev": true
+ }
+ }
+ },
+ "grunt-babel": {
+ "version": "6.0.0",
+ "from": "grunt-babel@>=6.0.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/grunt-babel/-/grunt-babel-6.0.0.tgz",
+ "dev": true
+ },
+ "grunt-build-control": {
+ "version": "0.7.1",
+ "from": "grunt-build-control@>=0.7.1 <0.8.0",
+ "resolved": "https://registry.npmjs.org/grunt-build-control/-/grunt-build-control-0.7.1.tgz",
+ "dev": true,
+ "dependencies": {
+ "semver": {
+ "version": "4.3.6",
+ "from": "semver@>=4.3.3 <4.4.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz",
+ "dev": true
+ },
+ "shelljs": {
+ "version": "0.2.6",
+ "from": "shelljs@>=0.2.6 <0.3.0",
+ "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.2.6.tgz",
+ "dev": true
+ }
+ }
+ },
+ "grunt-contrib-clean": {
+ "version": "1.0.0",
+ "from": "grunt-contrib-clean@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/grunt-contrib-clean/-/grunt-contrib-clean-1.0.0.tgz",
+ "dev": true
+ },
+ "grunt-contrib-compress": {
+ "version": "1.4.1",
+ "from": "grunt-contrib-compress@>=1.4.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/grunt-contrib-compress/-/grunt-contrib-compress-1.4.1.tgz",
+ "dev": true
+ },
+ "grunt-contrib-concat": {
+ "version": "1.0.1",
+ "from": "grunt-contrib-concat@>=1.0.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/grunt-contrib-concat/-/grunt-contrib-concat-1.0.1.tgz",
+ "dev": true
+ },
+ "grunt-contrib-connect": {
+ "version": "1.0.2",
+ "from": "grunt-contrib-connect@>=1.0.2 <2.0.0",
+ "resolved": "https://registry.npmjs.org/grunt-contrib-connect/-/grunt-contrib-connect-1.0.2.tgz",
+ "dev": true
+ },
+ "grunt-contrib-copy": {
+ "version": "1.0.0",
+ "from": "grunt-contrib-copy@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/grunt-contrib-copy/-/grunt-contrib-copy-1.0.0.tgz",
+ "dev": true
+ },
+ "grunt-contrib-qunit": {
+ "version": "1.3.0",
+ "from": "grunt-contrib-qunit@>=1.3.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/grunt-contrib-qunit/-/grunt-contrib-qunit-1.3.0.tgz",
+ "dev": true
+ },
+ "grunt-contrib-watch": {
+ "version": "1.0.0",
+ "from": "grunt-contrib-watch@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/grunt-contrib-watch/-/grunt-contrib-watch-1.0.0.tgz",
+ "dev": true,
+ "dependencies": {
+ "lodash": {
+ "version": "3.10.1",
+ "from": "lodash@>=3.10.1 <4.0.0",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
+ "dev": true
+ }
+ }
+ },
+ "grunt-exec": {
+ "version": "2.0.0",
+ "from": "grunt-exec@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/grunt-exec/-/grunt-exec-2.0.0.tgz",
+ "dev": true
+ },
+ "grunt-known-options": {
+ "version": "1.1.0",
+ "from": "grunt-known-options@>=1.1.0 <1.2.0",
+ "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-1.1.0.tgz",
+ "dev": true
+ },
+ "grunt-legacy-log": {
+ "version": "1.0.0",
+ "from": "grunt-legacy-log@>=1.0.0 <1.1.0",
+ "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-1.0.0.tgz",
+ "dev": true,
+ "dependencies": {
+ "lodash": {
+ "version": "3.10.1",
+ "from": "lodash@>=3.10.1 <3.11.0",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
+ "dev": true
+ }
+ }
+ },
+ "grunt-legacy-log-utils": {
+ "version": "1.0.0",
+ "from": "grunt-legacy-log-utils@>=1.0.0 <1.1.0",
+ "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-1.0.0.tgz",
+ "dev": true,
+ "dependencies": {
+ "lodash": {
+ "version": "4.3.0",
+ "from": "lodash@>=4.3.0 <4.4.0",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.3.0.tgz",
+ "dev": true
+ }
+ }
+ },
+ "grunt-legacy-util": {
+ "version": "1.0.0",
+ "from": "grunt-legacy-util@>=1.0.0 <1.1.0",
+ "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-1.0.0.tgz",
+ "dev": true,
+ "dependencies": {
+ "lodash": {
+ "version": "4.3.0",
+ "from": "lodash@>=4.3.0 <4.4.0",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.3.0.tgz",
+ "dev": true
+ }
+ }
+ },
+ "grunt-lib-phantomjs": {
+ "version": "1.1.0",
+ "from": "grunt-lib-phantomjs@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/grunt-lib-phantomjs/-/grunt-lib-phantomjs-1.1.0.tgz",
+ "dev": true
+ },
+ "grunt-saucelabs": {
+ "version": "9.0.0",
+ "from": "grunt-saucelabs@>=9.0.0 <10.0.0",
+ "resolved": "https://registry.npmjs.org/grunt-saucelabs/-/grunt-saucelabs-9.0.0.tgz",
+ "dev": true,
+ "dependencies": {
+ "lodash": {
+ "version": "4.13.1",
+ "from": "lodash@>=4.13.1 <4.14.0",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.13.1.tgz",
+ "dev": true
+ }
+ }
+ },
+ "grunt-stamp": {
+ "version": "0.3.0",
+ "from": "grunt-stamp@>=0.3.0 <0.4.0",
+ "resolved": "https://registry.npmjs.org/grunt-stamp/-/grunt-stamp-0.3.0.tgz",
+ "dev": true
+ },
+ "har-validator": {
+ "version": "2.0.6",
+ "from": "har-validator@>=2.0.6 <2.1.0",
+ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz",
+ "dev": true
+ },
+ "has-ansi": {
+ "version": "2.0.0",
+ "from": "has-ansi@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
+ "dev": true
+ },
+ "has-flag": {
+ "version": "1.0.0",
+ "from": "has-flag@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz",
+ "dev": true
+ },
+ "has-unicode": {
+ "version": "2.0.1",
+ "from": "has-unicode@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
+ "dev": true
+ },
+ "hasha": {
+ "version": "2.2.0",
+ "from": "hasha@>=2.2.0 <2.3.0",
+ "resolved": "https://registry.npmjs.org/hasha/-/hasha-2.2.0.tgz",
+ "dev": true
+ },
+ "hawk": {
+ "version": "3.1.3",
+ "from": "hawk@>=3.1.3 <3.2.0",
+ "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz",
+ "dev": true
+ },
+ "hoek": {
+ "version": "2.16.3",
+ "from": "hoek@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz",
+ "dev": true
+ },
+ "home-or-tmp": {
+ "version": "2.0.0",
+ "from": "home-or-tmp@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz",
+ "dev": true
+ },
+ "homedir-polyfill": {
+ "version": "1.0.1",
+ "from": "homedir-polyfill@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz",
+ "dev": true
+ },
+ "hooker": {
+ "version": "0.2.3",
+ "from": "hooker@>=0.2.3 <0.3.0",
+ "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz",
+ "dev": true
+ },
+ "hosted-git-info": {
+ "version": "2.3.1",
+ "from": "hosted-git-info@>=2.1.4 <3.0.0",
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.3.1.tgz",
+ "dev": true
+ },
+ "htmlhint": {
+ "version": "0.9.13",
+ "from": "htmlhint@>=0.9.13 <0.10.0",
+ "resolved": "https://registry.npmjs.org/htmlhint/-/htmlhint-0.9.13.tgz",
+ "dev": true,
+ "dependencies": {
+ "async": {
+ "version": "1.4.2",
+ "from": "async@1.4.2",
+ "resolved": "https://registry.npmjs.org/async/-/async-1.4.2.tgz",
+ "dev": true
+ },
+ "colors": {
+ "version": "1.0.3",
+ "from": "colors@1.0.3",
+ "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz",
+ "dev": true
+ },
+ "commander": {
+ "version": "2.6.0",
+ "from": "commander@2.6.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.6.0.tgz",
+ "dev": true
+ },
+ "glob": {
+ "version": "5.0.15",
+ "from": "glob@5.0.15",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz",
+ "dev": true
+ },
+ "strip-json-comments": {
+ "version": "1.0.4",
+ "from": "strip-json-comments@1.0.4",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz",
+ "dev": true
+ }
+ }
+ },
+ "htmllint": {
+ "version": "0.6.0",
+ "from": "htmllint@>=0.6.0 <0.7.0",
+ "resolved": "https://registry.npmjs.org/htmllint/-/htmllint-0.6.0.tgz",
+ "dev": true
+ },
+ "htmllint-cli": {
+ "version": "0.0.6",
+ "from": "htmllint-cli@>=0.0.6 <0.0.7",
+ "resolved": "https://registry.npmjs.org/htmllint-cli/-/htmllint-cli-0.0.6.tgz",
+ "dev": true
+ },
+ "htmlparser2": {
+ "version": "3.8.3",
+ "from": "htmlparser2@>=3.8.0 <3.9.0",
+ "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz",
+ "dev": true,
+ "dependencies": {
+ "isarray": {
+ "version": "0.0.1",
+ "from": "isarray@0.0.1",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+ "dev": true
+ },
+ "readable-stream": {
+ "version": "1.1.14",
+ "from": "readable-stream@>=1.1.0 <1.2.0",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
+ "dev": true
+ }
+ }
+ },
+ "http-errors": {
+ "version": "1.5.1",
+ "from": "http-errors@>=1.5.0 <1.6.0",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.5.1.tgz",
+ "dev": true
+ },
+ "http-signature": {
+ "version": "1.1.1",
+ "from": "http-signature@>=1.1.0 <1.2.0",
+ "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz",
+ "dev": true
+ },
+ "http2": {
+ "version": "3.3.6",
+ "from": "http2@>=3.3.4 <4.0.0",
+ "resolved": "https://registry.npmjs.org/http2/-/http2-3.3.6.tgz",
+ "dev": true
+ },
+ "https-proxy-agent": {
+ "version": "1.0.0",
+ "from": "https-proxy-agent@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz",
+ "dev": true
+ },
+ "iconv-lite": {
+ "version": "0.4.15",
+ "from": "iconv-lite@>=0.4.13 <0.5.0",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.15.tgz",
+ "dev": true
+ },
+ "ignore": {
+ "version": "3.2.6",
+ "from": "ignore@>=3.2.0 <4.0.0",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.2.6.tgz",
+ "dev": true
+ },
+ "iltorb": {
+ "version": "1.0.13",
+ "from": "iltorb@>=1.0.13 <2.0.0",
+ "resolved": "https://registry.npmjs.org/iltorb/-/iltorb-1.0.13.tgz",
+ "dev": true,
+ "optional": true
+ },
+ "imurmurhash": {
+ "version": "0.1.4",
+ "from": "imurmurhash@>=0.1.4 <0.2.0",
+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
+ "dev": true
+ },
+ "in-publish": {
+ "version": "2.0.0",
+ "from": "in-publish@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.0.tgz",
+ "dev": true
+ },
+ "indent-string": {
+ "version": "2.1.0",
+ "from": "indent-string@>=2.1.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz",
+ "dev": true
+ },
+ "inflight": {
+ "version": "1.0.6",
+ "from": "inflight@>=1.0.4 <2.0.0",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "dev": true
+ },
+ "inherits": {
+ "version": "2.0.3",
+ "from": "inherits@>=2.0.3 <3.0.0",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+ "dev": true
+ },
+ "ini": {
+ "version": "1.3.4",
+ "from": "ini@>=1.3.4 <2.0.0",
+ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz",
+ "dev": true
+ },
+ "inquirer": {
+ "version": "0.12.0",
+ "from": "inquirer@>=0.12.0 <0.13.0",
+ "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.12.0.tgz",
+ "dev": true
+ },
+ "interpret": {
+ "version": "1.0.1",
+ "from": "interpret@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.0.1.tgz",
+ "dev": true
+ },
+ "invariant": {
+ "version": "2.2.2",
+ "from": "invariant@>=2.2.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz",
+ "dev": true
+ },
+ "invert-kv": {
+ "version": "1.0.0",
+ "from": "invert-kv@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz",
+ "dev": true
+ },
+ "is-absolute": {
+ "version": "0.2.6",
+ "from": "is-absolute@>=0.2.3 <0.3.0",
+ "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.2.6.tgz",
+ "dev": true
+ },
+ "is-arrayish": {
+ "version": "0.2.1",
+ "from": "is-arrayish@>=0.2.1 <0.3.0",
+ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
+ "dev": true
+ },
+ "is-binary-path": {
+ "version": "1.0.1",
+ "from": "is-binary-path@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz",
+ "dev": true
+ },
+ "is-buffer": {
+ "version": "1.1.5",
+ "from": "is-buffer@>=1.0.2 <2.0.0",
+ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz",
+ "dev": true
+ },
+ "is-builtin-module": {
+ "version": "1.0.0",
+ "from": "is-builtin-module@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz",
+ "dev": true
+ },
+ "is-dotfile": {
+ "version": "1.0.2",
+ "from": "is-dotfile@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.2.tgz",
+ "dev": true
+ },
+ "is-equal-shallow": {
+ "version": "0.1.3",
+ "from": "is-equal-shallow@>=0.1.3 <0.2.0",
+ "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz",
+ "dev": true
+ },
+ "is-extendable": {
+ "version": "0.1.1",
+ "from": "is-extendable@>=0.1.1 <0.2.0",
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
+ "dev": true
+ },
+ "is-extglob": {
+ "version": "1.0.0",
+ "from": "is-extglob@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz",
+ "dev": true
+ },
+ "is-finite": {
+ "version": "1.0.2",
+ "from": "is-finite@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "1.0.0",
+ "from": "is-fullwidth-code-point@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
+ "dev": true
+ },
+ "is-glob": {
+ "version": "2.0.1",
+ "from": "is-glob@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz",
+ "dev": true
+ },
+ "is-my-json-valid": {
+ "version": "2.16.0",
+ "from": "is-my-json-valid@>=2.10.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz",
+ "dev": true
+ },
+ "is-number": {
+ "version": "2.1.0",
+ "from": "is-number@>=2.1.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz",
+ "dev": true
+ },
+ "is-path-cwd": {
+ "version": "1.0.0",
+ "from": "is-path-cwd@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz",
+ "dev": true
+ },
+ "is-path-in-cwd": {
+ "version": "1.0.0",
+ "from": "is-path-in-cwd@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz",
+ "dev": true
+ },
+ "is-path-inside": {
+ "version": "1.0.0",
+ "from": "is-path-inside@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.0.tgz",
+ "dev": true
+ },
+ "is-posix-bracket": {
+ "version": "0.1.1",
+ "from": "is-posix-bracket@>=0.1.0 <0.2.0",
+ "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz",
+ "dev": true
+ },
+ "is-primitive": {
+ "version": "2.0.0",
+ "from": "is-primitive@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz",
+ "dev": true
+ },
+ "is-property": {
+ "version": "1.0.2",
+ "from": "is-property@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
+ "dev": true
+ },
+ "is-relative": {
+ "version": "0.2.1",
+ "from": "is-relative@>=0.2.1 <0.3.0",
+ "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.2.1.tgz",
+ "dev": true
+ },
+ "is-resolvable": {
+ "version": "1.0.0",
+ "from": "is-resolvable@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.0.0.tgz",
+ "dev": true
+ },
+ "is-stream": {
+ "version": "1.1.0",
+ "from": "is-stream@>=1.0.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
+ "dev": true
+ },
+ "is-travis": {
+ "version": "1.0.0",
+ "from": "is-travis@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/is-travis/-/is-travis-1.0.0.tgz",
+ "dev": true
+ },
+ "is-typedarray": {
+ "version": "1.0.0",
+ "from": "is-typedarray@>=1.0.0 <1.1.0",
+ "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
+ "dev": true
+ },
+ "is-unc-path": {
+ "version": "0.1.2",
+ "from": "is-unc-path@>=0.1.1 <0.2.0",
+ "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-0.1.2.tgz",
+ "dev": true
+ },
+ "is-utf8": {
+ "version": "0.2.1",
+ "from": "is-utf8@>=0.2.0 <0.3.0",
+ "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
+ "dev": true
+ },
+ "is-windows": {
+ "version": "0.2.0",
+ "from": "is-windows@>=0.2.0 <0.3.0",
+ "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.2.0.tgz",
+ "dev": true
+ },
+ "isarray": {
+ "version": "1.0.0",
+ "from": "isarray@>=1.0.0 <1.1.0",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+ "dev": true
+ },
+ "isexe": {
+ "version": "1.1.2",
+ "from": "isexe@>=1.1.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-1.1.2.tgz",
+ "dev": true
+ },
+ "isobject": {
+ "version": "2.1.0",
+ "from": "isobject@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
+ "dev": true
+ },
+ "isstream": {
+ "version": "0.1.2",
+ "from": "isstream@>=0.1.2 <0.2.0",
+ "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
+ "dev": true
+ },
+ "jju": {
+ "version": "1.3.0",
+ "from": "jju@>=1.1.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/jju/-/jju-1.3.0.tgz",
+ "dev": true
+ },
+ "jodid25519": {
+ "version": "1.0.2",
+ "from": "jodid25519@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz",
+ "dev": true,
+ "optional": true
+ },
+ "jquery": {
+ "version": "3.2.0",
+ "from": "jquery@>=1.9.1",
+ "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.2.0.tgz"
+ },
+ "js-base64": {
+ "version": "2.1.9",
+ "from": "js-base64@>=2.1.9 <3.0.0",
+ "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.1.9.tgz",
+ "dev": true
+ },
+ "js-tokens": {
+ "version": "3.0.1",
+ "from": "js-tokens@>=3.0.0 <4.0.0",
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.1.tgz",
+ "dev": true
+ },
+ "js-yaml": {
+ "version": "3.8.2",
+ "from": "js-yaml@>=3.5.1 <4.0.0",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.8.2.tgz",
+ "dev": true
+ },
+ "jsbn": {
+ "version": "0.1.1",
+ "from": "jsbn@>=0.1.0 <0.2.0",
+ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
+ "dev": true,
+ "optional": true
+ },
+ "jsesc": {
+ "version": "0.5.0",
+ "from": "jsesc@>=0.5.0 <0.6.0",
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
+ "dev": true
+ },
+ "jshint": {
+ "version": "2.8.0",
+ "from": "jshint@2.8.0",
+ "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.8.0.tgz",
+ "dev": true,
+ "dependencies": {
+ "lodash": {
+ "version": "3.7.0",
+ "from": "lodash@>=3.7.0 <3.8.0",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.7.0.tgz",
+ "dev": true
+ },
+ "minimatch": {
+ "version": "2.0.10",
+ "from": "minimatch@>=2.0.0 <2.1.0",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz",
+ "dev": true
+ },
+ "shelljs": {
+ "version": "0.3.0",
+ "from": "shelljs@>=0.3.0 <0.4.0",
+ "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz",
+ "dev": true
+ },
+ "strip-json-comments": {
+ "version": "1.0.4",
+ "from": "strip-json-comments@>=1.0.0 <1.1.0",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz",
+ "dev": true
+ }
+ }
+ },
+ "json-parse-helpfulerror": {
+ "version": "1.0.3",
+ "from": "json-parse-helpfulerror@>=1.0.3 <2.0.0",
+ "resolved": "https://registry.npmjs.org/json-parse-helpfulerror/-/json-parse-helpfulerror-1.0.3.tgz",
+ "dev": true
+ },
+ "json-schema": {
+ "version": "0.2.3",
+ "from": "json-schema@0.2.3",
+ "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
+ "dev": true
+ },
+ "json-stable-stringify": {
+ "version": "1.0.1",
+ "from": "json-stable-stringify@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz",
+ "dev": true
+ },
+ "json-stringify-safe": {
+ "version": "5.0.1",
+ "from": "json-stringify-safe@>=5.0.1 <5.1.0",
+ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
+ "dev": true
+ },
+ "json5": {
+ "version": "0.5.1",
+ "from": "json5@>=0.5.0 <0.6.0",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
+ "dev": true
+ },
+ "jsonfile": {
+ "version": "2.4.0",
+ "from": "jsonfile@>=2.1.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz",
+ "dev": true
+ },
+ "jsonify": {
+ "version": "0.0.0",
+ "from": "jsonify@>=0.0.0 <0.1.0",
+ "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz",
+ "dev": true
+ },
+ "jsonpointer": {
+ "version": "4.0.1",
+ "from": "jsonpointer@>=4.0.0 <5.0.0",
+ "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz",
+ "dev": true
+ },
+ "jsprim": {
+ "version": "1.4.0",
+ "from": "jsprim@>=1.2.2 <2.0.0",
+ "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.0.tgz",
+ "dev": true,
+ "dependencies": {
+ "assert-plus": {
+ "version": "1.0.0",
+ "from": "assert-plus@1.0.0",
+ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
+ "dev": true
+ }
+ }
+ },
+ "kew": {
+ "version": "0.7.0",
+ "from": "kew@>=0.7.0 <0.8.0",
+ "resolved": "https://registry.npmjs.org/kew/-/kew-0.7.0.tgz",
+ "dev": true
+ },
+ "kind-of": {
+ "version": "3.1.0",
+ "from": "kind-of@>=3.0.2 <4.0.0",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.1.0.tgz",
+ "dev": true
+ },
+ "klaw": {
+ "version": "1.3.1",
+ "from": "klaw@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz",
+ "dev": true
+ },
+ "lazy-cache": {
+ "version": "1.0.4",
+ "from": "lazy-cache@>=1.0.3 <2.0.0",
+ "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz",
+ "dev": true
+ },
+ "lazystream": {
+ "version": "1.0.0",
+ "from": "lazystream@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz",
+ "dev": true
+ },
+ "lcid": {
+ "version": "1.0.0",
+ "from": "lcid@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
+ "dev": true
+ },
+ "levn": {
+ "version": "0.3.0",
+ "from": "levn@>=0.3.0 <0.4.0",
+ "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
+ "dev": true
+ },
+ "liftoff": {
+ "version": "2.3.0",
+ "from": "liftoff@>=2.3.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.3.0.tgz",
+ "dev": true,
+ "dependencies": {
+ "findup-sync": {
+ "version": "0.4.3",
+ "from": "findup-sync@>=0.4.2 <0.5.0",
+ "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.4.3.tgz",
+ "dev": true
+ }
+ }
+ },
+ "livereload-js": {
+ "version": "2.2.2",
+ "from": "livereload-js@>=2.2.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-2.2.2.tgz",
+ "dev": true
+ },
+ "load-grunt-tasks": {
+ "version": "3.5.2",
+ "from": "load-grunt-tasks@>=3.5.2 <4.0.0",
+ "resolved": "https://registry.npmjs.org/load-grunt-tasks/-/load-grunt-tasks-3.5.2.tgz",
+ "dev": true
+ },
+ "load-json-file": {
+ "version": "1.1.0",
+ "from": "load-json-file@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
+ "dev": true,
+ "dependencies": {
+ "strip-bom": {
+ "version": "2.0.0",
+ "from": "strip-bom@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
+ "dev": true
+ }
+ }
+ },
+ "lodash": {
+ "version": "4.17.4",
+ "from": "lodash@>=4.2.0 <5.0.0",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
+ "dev": true
+ },
+ "lodash.assign": {
+ "version": "4.2.0",
+ "from": "lodash.assign@>=4.2.0 <5.0.0",
+ "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz",
+ "dev": true
+ },
+ "lodash.assignwith": {
+ "version": "4.2.0",
+ "from": "lodash.assignwith@>=4.0.7 <5.0.0",
+ "resolved": "https://registry.npmjs.org/lodash.assignwith/-/lodash.assignwith-4.2.0.tgz",
+ "dev": true
+ },
+ "lodash.clonedeep": {
+ "version": "4.5.0",
+ "from": "lodash.clonedeep@>=4.3.2 <5.0.0",
+ "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
+ "dev": true
+ },
+ "lodash.isempty": {
+ "version": "4.4.0",
+ "from": "lodash.isempty@>=4.2.1 <5.0.0",
+ "resolved": "https://registry.npmjs.org/lodash.isempty/-/lodash.isempty-4.4.0.tgz",
+ "dev": true
+ },
+ "lodash.isplainobject": {
+ "version": "4.0.6",
+ "from": "lodash.isplainobject@>=4.0.4 <5.0.0",
+ "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
+ "dev": true
+ },
+ "lodash.isstring": {
+ "version": "4.0.1",
+ "from": "lodash.isstring@>=4.0.1 <5.0.0",
+ "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
+ "dev": true
+ },
+ "lodash.mapvalues": {
+ "version": "4.6.0",
+ "from": "lodash.mapvalues@>=4.4.0 <5.0.0",
+ "resolved": "https://registry.npmjs.org/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz",
+ "dev": true
+ },
+ "lodash.mergewith": {
+ "version": "4.6.0",
+ "from": "lodash.mergewith@>=4.6.0 <5.0.0",
+ "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.0.tgz",
+ "dev": true
+ },
+ "lodash.pick": {
+ "version": "4.4.0",
+ "from": "lodash.pick@>=4.2.1 <5.0.0",
+ "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz",
+ "dev": true
+ },
+ "lodash.pickby": {
+ "version": "4.6.0",
+ "from": "lodash.pickby@>=4.6.0 <5.0.0",
+ "resolved": "https://registry.npmjs.org/lodash.pickby/-/lodash.pickby-4.6.0.tgz",
+ "dev": true
+ },
+ "log-symbols": {
+ "version": "1.0.2",
+ "from": "log-symbols@>=1.0.2 <2.0.0",
+ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz",
+ "dev": true
+ },
+ "longest": {
+ "version": "1.0.1",
+ "from": "longest@>=1.0.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
+ "dev": true
+ },
+ "loose-envify": {
+ "version": "1.3.1",
+ "from": "loose-envify@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz",
+ "dev": true
+ },
+ "loud-rejection": {
+ "version": "1.6.0",
+ "from": "loud-rejection@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz",
+ "dev": true
+ },
+ "lru-cache": {
+ "version": "2.7.3",
+ "from": "lru-cache@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz",
+ "dev": true
+ },
+ "map-cache": {
+ "version": "0.2.2",
+ "from": "map-cache@>=0.2.0 <0.3.0",
+ "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
+ "dev": true
+ },
+ "map-obj": {
+ "version": "1.0.1",
+ "from": "map-obj@>=1.0.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz",
+ "dev": true
+ },
+ "media-typer": {
+ "version": "0.3.0",
+ "from": "media-typer@0.3.0",
+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
+ "dev": true
+ },
+ "meow": {
+ "version": "3.7.0",
+ "from": "meow@>=3.3.0 <4.0.0",
+ "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
+ "dev": true,
+ "dependencies": {
+ "minimist": {
+ "version": "1.2.0",
+ "from": "minimist@>=1.1.3 <2.0.0",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
+ "dev": true
+ }
+ }
+ },
+ "micromatch": {
+ "version": "2.3.11",
+ "from": "micromatch@>=2.3.7 <3.0.0",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz",
+ "dev": true
+ },
+ "mime": {
+ "version": "1.3.4",
+ "from": "mime@1.3.4",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz",
+ "dev": true
+ },
+ "mime-db": {
+ "version": "1.26.0",
+ "from": "mime-db@>=1.26.0 <1.27.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.26.0.tgz",
+ "dev": true
+ },
+ "mime-types": {
+ "version": "2.1.14",
+ "from": "mime-types@>=2.1.11 <2.2.0",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.14.tgz",
+ "dev": true
+ },
+ "mimic-fn": {
+ "version": "1.1.0",
+ "from": "mimic-fn@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.1.0.tgz",
+ "dev": true
+ },
+ "minimatch": {
+ "version": "3.0.3",
+ "from": "minimatch@>=3.0.2 <4.0.0",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz",
+ "dev": true
+ },
+ "minimist": {
+ "version": "0.0.8",
+ "from": "minimist@0.0.8",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
+ "dev": true
+ },
+ "mkdirp": {
+ "version": "0.5.1",
+ "from": "mkdirp@>=0.5.0 <0.6.0",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
+ "dev": true
+ },
+ "morgan": {
+ "version": "1.8.1",
+ "from": "morgan@>=1.6.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.8.1.tgz",
+ "dev": true,
+ "dependencies": {
+ "debug": {
+ "version": "2.6.1",
+ "from": "debug@2.6.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.1.tgz",
+ "dev": true
+ }
+ }
+ },
+ "ms": {
+ "version": "0.7.2",
+ "from": "ms@0.7.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz",
+ "dev": true
+ },
+ "multimatch": {
+ "version": "2.1.0",
+ "from": "multimatch@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz",
+ "dev": true
+ },
+ "mute-stream": {
+ "version": "0.0.5",
+ "from": "mute-stream@0.0.5",
+ "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz",
+ "dev": true
+ },
+ "mz": {
+ "version": "2.6.0",
+ "from": "mz@>=2.3.1 <3.0.0",
+ "resolved": "https://registry.npmjs.org/mz/-/mz-2.6.0.tgz",
+ "dev": true
+ },
+ "nan": {
+ "version": "2.5.1",
+ "from": "nan@>=2.4.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/nan/-/nan-2.5.1.tgz",
+ "dev": true
+ },
+ "natural-compare": {
+ "version": "1.4.0",
+ "from": "natural-compare@>=1.4.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
+ "dev": true
+ },
+ "negotiator": {
+ "version": "0.6.1",
+ "from": "negotiator@0.6.1",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz",
+ "dev": true
+ },
+ "node-gyp": {
+ "version": "3.6.0",
+ "from": "node-gyp@>=3.3.1 <4.0.0",
+ "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.6.0.tgz",
+ "dev": true
+ },
+ "node-sass": {
+ "version": "4.5.0",
+ "from": "node-sass@>=4.5.0 <5.0.0",
+ "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.5.0.tgz",
+ "dev": true
+ },
+ "nopt": {
+ "version": "3.0.6",
+ "from": "nopt@>=3.0.6 <3.1.0",
+ "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
+ "dev": true
+ },
+ "normalize-package-data": {
+ "version": "2.3.6",
+ "from": "normalize-package-data@>=2.3.4 <3.0.0",
+ "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.3.6.tgz",
+ "dev": true
+ },
+ "normalize-path": {
+ "version": "2.0.1",
+ "from": "normalize-path@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.0.1.tgz",
+ "dev": true
+ },
+ "normalize-range": {
+ "version": "0.1.2",
+ "from": "normalize-range@>=0.1.2 <0.2.0",
+ "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz",
+ "dev": true
+ },
+ "npmlog": {
+ "version": "4.0.2",
+ "from": "npmlog@>=4.0.0 <5.0.0",
+ "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.0.2.tgz",
+ "dev": true
+ },
+ "num2fraction": {
+ "version": "1.2.2",
+ "from": "num2fraction@>=1.2.2 <2.0.0",
+ "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz",
+ "dev": true
+ },
+ "number-is-nan": {
+ "version": "1.0.1",
+ "from": "number-is-nan@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
+ "dev": true
+ },
+ "oauth-sign": {
+ "version": "0.8.2",
+ "from": "oauth-sign@>=0.8.1 <0.9.0",
+ "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz",
+ "dev": true
+ },
+ "object-assign": {
+ "version": "4.1.1",
+ "from": "object-assign@>=4.0.1 <5.0.0",
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+ "dev": true
+ },
+ "object.omit": {
+ "version": "2.0.1",
+ "from": "object.omit@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz",
+ "dev": true
+ },
+ "on-finished": {
+ "version": "2.3.0",
+ "from": "on-finished@>=2.3.0 <2.4.0",
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
+ "dev": true
+ },
+ "on-headers": {
+ "version": "1.0.1",
+ "from": "on-headers@>=1.0.1 <1.1.0",
+ "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz",
+ "dev": true
+ },
+ "once": {
+ "version": "1.4.0",
+ "from": "once@>=1.3.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "dev": true
+ },
+ "onetime": {
+ "version": "1.1.0",
+ "from": "onetime@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz",
+ "dev": true
+ },
+ "opn": {
+ "version": "4.0.2",
+ "from": "opn@>=4.0.0 <5.0.0",
+ "resolved": "https://registry.npmjs.org/opn/-/opn-4.0.2.tgz",
+ "dev": true
+ },
+ "optionator": {
+ "version": "0.8.2",
+ "from": "optionator@>=0.8.2 <0.9.0",
+ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz",
+ "dev": true
+ },
+ "ora": {
+ "version": "1.1.0",
+ "from": "ora@>=1.1.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/ora/-/ora-1.1.0.tgz",
+ "dev": true,
+ "dependencies": {
+ "cli-cursor": {
+ "version": "2.1.0",
+ "from": "cli-cursor@>=2.1.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz",
+ "dev": true
+ },
+ "onetime": {
+ "version": "2.0.0",
+ "from": "onetime@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.0.tgz",
+ "dev": true
+ },
+ "restore-cursor": {
+ "version": "2.0.0",
+ "from": "restore-cursor@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz",
+ "dev": true
+ }
+ }
+ },
+ "os-homedir": {
+ "version": "1.0.2",
+ "from": "os-homedir@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
+ "dev": true
+ },
+ "os-locale": {
+ "version": "1.4.0",
+ "from": "os-locale@>=1.4.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz",
+ "dev": true
+ },
+ "os-tmpdir": {
+ "version": "1.0.2",
+ "from": "os-tmpdir@>=1.0.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
+ "dev": true
+ },
+ "osenv": {
+ "version": "0.1.4",
+ "from": "osenv@>=0.0.0 <1.0.0",
+ "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.4.tgz",
+ "dev": true
+ },
+ "package": {
+ "version": "1.0.1",
+ "from": "package@>=1.0.0 <1.2.0",
+ "resolved": "https://registry.npmjs.org/package/-/package-1.0.1.tgz",
+ "dev": true
+ },
+ "parse-filepath": {
+ "version": "1.0.1",
+ "from": "parse-filepath@>=1.0.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.1.tgz",
+ "dev": true
+ },
+ "parse-glob": {
+ "version": "3.0.4",
+ "from": "parse-glob@3.0.4",
+ "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz",
+ "dev": true
+ },
+ "parse-json": {
+ "version": "2.2.0",
+ "from": "parse-json@>=2.2.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
+ "dev": true
+ },
+ "parse-ms": {
+ "version": "1.0.1",
+ "from": "parse-ms@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-1.0.1.tgz",
+ "dev": true
+ },
+ "parse-passwd": {
+ "version": "1.0.0",
+ "from": "parse-passwd@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz",
+ "dev": true
+ },
+ "parserlib": {
+ "version": "0.2.5",
+ "from": "parserlib@>=0.2.2 <0.3.0",
+ "resolved": "https://registry.npmjs.org/parserlib/-/parserlib-0.2.5.tgz",
+ "dev": true
+ },
+ "parseurl": {
+ "version": "1.3.1",
+ "from": "parseurl@>=1.3.1 <1.4.0",
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz",
+ "dev": true
+ },
+ "path-exists": {
+ "version": "2.1.0",
+ "from": "path-exists@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
+ "dev": true
+ },
+ "path-is-absolute": {
+ "version": "1.0.1",
+ "from": "path-is-absolute@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "dev": true
+ },
+ "path-is-inside": {
+ "version": "1.0.2",
+ "from": "path-is-inside@>=1.0.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz",
+ "dev": true
+ },
+ "path-parse": {
+ "version": "1.0.5",
+ "from": "path-parse@>=1.0.5 <2.0.0",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz",
+ "dev": true
+ },
+ "path-root": {
+ "version": "0.1.1",
+ "from": "path-root@>=0.1.1 <0.2.0",
+ "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz",
+ "dev": true
+ },
+ "path-root-regex": {
+ "version": "0.1.2",
+ "from": "path-root-regex@>=0.1.0 <0.2.0",
+ "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz",
+ "dev": true
+ },
+ "path-type": {
+ "version": "1.1.0",
+ "from": "path-type@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
+ "dev": true
+ },
+ "pend": {
+ "version": "1.2.0",
+ "from": "pend@>=1.2.0 <1.3.0",
+ "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
+ "dev": true
+ },
+ "phantomjs-prebuilt": {
+ "version": "2.1.14",
+ "from": "phantomjs-prebuilt@>=2.1.3 <3.0.0",
+ "resolved": "https://registry.npmjs.org/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.14.tgz",
+ "dev": true
+ },
+ "pify": {
+ "version": "2.3.0",
+ "from": "pify@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+ "dev": true
+ },
+ "pinkie": {
+ "version": "2.0.4",
+ "from": "pinkie@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
+ "dev": true
+ },
+ "pinkie-promise": {
+ "version": "2.0.1",
+ "from": "pinkie-promise@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
+ "dev": true
+ },
+ "pkg-up": {
+ "version": "1.0.0",
+ "from": "pkg-up@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-1.0.0.tgz",
+ "dev": true
+ },
+ "plur": {
+ "version": "1.0.0",
+ "from": "plur@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/plur/-/plur-1.0.0.tgz",
+ "dev": true
+ },
+ "pluralize": {
+ "version": "1.2.1",
+ "from": "pluralize@>=1.2.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz",
+ "dev": true
+ },
+ "portscanner": {
+ "version": "1.2.0",
+ "from": "portscanner@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/portscanner/-/portscanner-1.2.0.tgz",
+ "dev": true
+ },
+ "postcss": {
+ "version": "5.2.16",
+ "from": "postcss@>=5.2.16 <6.0.0",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.16.tgz",
+ "dev": true
+ },
+ "postcss-cli": {
+ "version": "3.0.0",
+ "from": "postcss-cli@>=3.0.0 <4.0.0",
+ "resolved": "https://registry.npmjs.org/postcss-cli/-/postcss-cli-3.0.0.tgz",
+ "dev": true,
+ "dependencies": {
+ "camelcase": {
+ "version": "3.0.0",
+ "from": "camelcase@>=3.0.0 <4.0.0",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz",
+ "dev": true
+ },
+ "get-stdin": {
+ "version": "5.0.1",
+ "from": "get-stdin@>=5.0.1 <6.0.0",
+ "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz",
+ "dev": true
+ },
+ "globby": {
+ "version": "6.1.0",
+ "from": "globby@>=6.1.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz",
+ "dev": true
+ },
+ "yargs": {
+ "version": "7.0.2",
+ "from": "yargs@>=7.0.2 <8.0.0",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.0.2.tgz",
+ "dev": true
+ },
+ "yargs-parser": {
+ "version": "5.0.0",
+ "from": "yargs-parser@>=5.0.0 <6.0.0",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz",
+ "dev": true
+ }
+ }
+ },
+ "postcss-flexbugs-fixes": {
+ "version": "2.1.0",
+ "from": "postcss-flexbugs-fixes@>=2.1.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/postcss-flexbugs-fixes/-/postcss-flexbugs-fixes-2.1.0.tgz",
+ "dev": true
+ },
+ "postcss-load-config": {
+ "version": "1.2.0",
+ "from": "postcss-load-config@>=1.1.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-1.2.0.tgz",
+ "dev": true
+ },
+ "postcss-load-options": {
+ "version": "1.2.0",
+ "from": "postcss-load-options@>=1.2.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/postcss-load-options/-/postcss-load-options-1.2.0.tgz",
+ "dev": true
+ },
+ "postcss-load-plugins": {
+ "version": "2.3.0",
+ "from": "postcss-load-plugins@>=2.3.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz",
+ "dev": true
+ },
+ "postcss-reporter": {
+ "version": "3.0.0",
+ "from": "postcss-reporter@>=3.0.0 <4.0.0",
+ "resolved": "https://registry.npmjs.org/postcss-reporter/-/postcss-reporter-3.0.0.tgz",
+ "dev": true
+ },
+ "postcss-value-parser": {
+ "version": "3.3.0",
+ "from": "postcss-value-parser@>=3.2.3 <4.0.0",
+ "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz",
+ "dev": true
+ },
+ "prelude-ls": {
+ "version": "1.1.2",
+ "from": "prelude-ls@>=1.1.2 <1.2.0",
+ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
+ "dev": true
+ },
+ "preserve": {
+ "version": "0.2.0",
+ "from": "preserve@>=0.2.0 <0.3.0",
+ "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz",
+ "dev": true
+ },
+ "pretty-bytes": {
+ "version": "3.0.1",
+ "from": "pretty-bytes@>=3.0.1 <4.0.0",
+ "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-3.0.1.tgz",
+ "dev": true
+ },
+ "pretty-ms": {
+ "version": "2.1.0",
+ "from": "pretty-ms@>=2.1.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-2.1.0.tgz",
+ "dev": true
+ },
+ "private": {
+ "version": "0.1.7",
+ "from": "private@>=0.1.6 <0.2.0",
+ "resolved": "https://registry.npmjs.org/private/-/private-0.1.7.tgz",
+ "dev": true
+ },
+ "process-nextick-args": {
+ "version": "1.0.7",
+ "from": "process-nextick-args@>=1.0.6 <1.1.0",
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
+ "dev": true
+ },
+ "progress": {
+ "version": "1.1.8",
+ "from": "progress@>=1.1.8 <2.0.0",
+ "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz",
+ "dev": true
+ },
+ "promise": {
+ "version": "7.1.1",
+ "from": "promise@>=7.1.1 <8.0.0",
+ "resolved": "https://registry.npmjs.org/promise/-/promise-7.1.1.tgz",
+ "dev": true
+ },
+ "pseudomap": {
+ "version": "1.0.2",
+ "from": "pseudomap@>=1.0.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
+ "dev": true
+ },
+ "punycode": {
+ "version": "1.4.1",
+ "from": "punycode@>=1.4.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
+ "dev": true
+ },
+ "q": {
+ "version": "1.4.1",
+ "from": "q@>=1.4.1 <1.5.0",
+ "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz",
+ "dev": true
+ },
+ "qs": {
+ "version": "6.3.2",
+ "from": "qs@>=6.3.0 <6.4.0",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.2.tgz",
+ "dev": true
+ },
+ "randomatic": {
+ "version": "1.1.6",
+ "from": "randomatic@>=1.1.3 <2.0.0",
+ "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.6.tgz",
+ "dev": true
+ },
+ "range-parser": {
+ "version": "1.2.0",
+ "from": "range-parser@>=1.2.0 <1.3.0",
+ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz",
+ "dev": true
+ },
+ "raw-body": {
+ "version": "2.1.7",
+ "from": "raw-body@>=2.1.5 <2.2.0",
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.1.7.tgz",
+ "dev": true,
+ "dependencies": {
+ "bytes": {
+ "version": "2.4.0",
+ "from": "bytes@2.4.0",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-2.4.0.tgz",
+ "dev": true
+ },
+ "iconv-lite": {
+ "version": "0.4.13",
+ "from": "iconv-lite@0.4.13",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.13.tgz",
+ "dev": true
+ }
+ }
+ },
+ "read-pkg": {
+ "version": "1.1.0",
+ "from": "read-pkg@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
+ "dev": true
+ },
+ "read-pkg-up": {
+ "version": "1.0.1",
+ "from": "read-pkg-up@>=1.0.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
+ "dev": true
+ },
+ "readable-stream": {
+ "version": "2.2.6",
+ "from": "readable-stream@>=2.2.2 <3.0.0",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.6.tgz",
+ "dev": true
+ },
+ "readdirp": {
+ "version": "2.1.0",
+ "from": "readdirp@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz",
+ "dev": true
+ },
+ "readline2": {
+ "version": "1.0.1",
+ "from": "readline2@>=1.0.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz",
+ "dev": true
+ },
+ "rechoir": {
+ "version": "0.6.2",
+ "from": "rechoir@>=0.6.2 <0.7.0",
+ "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
+ "dev": true
+ },
+ "redent": {
+ "version": "1.0.0",
+ "from": "redent@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz",
+ "dev": true
+ },
+ "regenerate": {
+ "version": "1.3.2",
+ "from": "regenerate@>=1.2.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.2.tgz",
+ "dev": true
+ },
+ "regenerator-runtime": {
+ "version": "0.10.3",
+ "from": "regenerator-runtime@>=0.10.0 <0.11.0",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.3.tgz",
+ "dev": true
+ },
+ "regenerator-transform": {
+ "version": "0.9.8",
+ "from": "regenerator-transform@0.9.8",
+ "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.9.8.tgz",
+ "dev": true
+ },
+ "regex-cache": {
+ "version": "0.4.3",
+ "from": "regex-cache@>=0.4.2 <0.5.0",
+ "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz",
+ "dev": true
+ },
+ "regexpu-core": {
+ "version": "2.0.0",
+ "from": "regexpu-core@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz",
+ "dev": true
+ },
+ "regjsgen": {
+ "version": "0.2.0",
+ "from": "regjsgen@>=0.2.0 <0.3.0",
+ "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz",
+ "dev": true
+ },
+ "regjsparser": {
+ "version": "0.1.5",
+ "from": "regjsparser@>=0.1.4 <0.2.0",
+ "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz",
+ "dev": true
+ },
+ "repeat-element": {
+ "version": "1.1.2",
+ "from": "repeat-element@>=1.1.2 <2.0.0",
+ "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz",
+ "dev": true
+ },
+ "repeat-string": {
+ "version": "1.6.1",
+ "from": "repeat-string@>=1.5.2 <2.0.0",
+ "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
+ "dev": true
+ },
+ "repeating": {
+ "version": "2.0.1",
+ "from": "repeating@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz",
+ "dev": true
+ },
+ "request": {
+ "version": "2.79.0",
+ "from": "request@>=2.79.0 <2.80.0",
+ "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz",
+ "dev": true
+ },
+ "request-progress": {
+ "version": "2.0.1",
+ "from": "request-progress@>=2.0.1 <2.1.0",
+ "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-2.0.1.tgz",
+ "dev": true
+ },
+ "requestretry": {
+ "version": "1.9.1",
+ "from": "requestretry@>=1.9.0 <1.10.0",
+ "resolved": "https://registry.npmjs.org/requestretry/-/requestretry-1.9.1.tgz",
+ "dev": true
+ },
+ "require-directory": {
+ "version": "2.1.1",
+ "from": "require-directory@>=2.1.1 <3.0.0",
+ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
+ "dev": true
+ },
+ "require-from-string": {
+ "version": "1.2.1",
+ "from": "require-from-string@>=1.1.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz",
+ "dev": true
+ },
+ "require-main-filename": {
+ "version": "1.0.1",
+ "from": "require-main-filename@>=1.0.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
+ "dev": true
+ },
+ "require-uncached": {
+ "version": "1.0.3",
+ "from": "require-uncached@>=1.0.2 <2.0.0",
+ "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz",
+ "dev": true
+ },
+ "resolve": {
+ "version": "1.3.2",
+ "from": "resolve@>=1.1.6 <2.0.0",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.3.2.tgz",
+ "dev": true
+ },
+ "resolve-dir": {
+ "version": "0.1.1",
+ "from": "resolve-dir@>=0.1.0 <0.2.0",
+ "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-0.1.1.tgz",
+ "dev": true
+ },
+ "resolve-from": {
+ "version": "1.0.1",
+ "from": "resolve-from@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz",
+ "dev": true
+ },
+ "resolve-pkg": {
+ "version": "0.1.0",
+ "from": "resolve-pkg@>=0.1.0 <0.2.0",
+ "resolved": "https://registry.npmjs.org/resolve-pkg/-/resolve-pkg-0.1.0.tgz",
+ "dev": true,
+ "dependencies": {
+ "resolve-from": {
+ "version": "2.0.0",
+ "from": "resolve-from@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz",
+ "dev": true
+ }
+ }
+ },
+ "restore-cursor": {
+ "version": "1.0.1",
+ "from": "restore-cursor@>=1.0.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz",
+ "dev": true
+ },
+ "right-align": {
+ "version": "0.1.3",
+ "from": "right-align@>=0.1.1 <0.2.0",
+ "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz",
+ "dev": true
+ },
+ "rimraf": {
+ "version": "2.6.1",
+ "from": "rimraf@>=2.2.8 <3.0.0",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz",
+ "dev": true
+ },
+ "run-async": {
+ "version": "0.1.0",
+ "from": "run-async@>=0.1.0 <0.2.0",
+ "resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz",
+ "dev": true
+ },
+ "rx-lite": {
+ "version": "3.1.2",
+ "from": "rx-lite@>=3.1.2 <4.0.0",
+ "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz",
+ "dev": true
+ },
+ "sass-graph": {
+ "version": "2.1.2",
+ "from": "sass-graph@>=2.1.1 <3.0.0",
+ "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.1.2.tgz",
+ "dev": true,
+ "dependencies": {
+ "camelcase": {
+ "version": "3.0.0",
+ "from": "camelcase@>=3.0.0 <4.0.0",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz",
+ "dev": true
+ },
+ "yargs": {
+ "version": "4.8.1",
+ "from": "yargs@>=4.7.1 <5.0.0",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz",
+ "dev": true
+ },
+ "yargs-parser": {
+ "version": "2.4.1",
+ "from": "yargs-parser@>=2.4.1 <3.0.0",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz",
+ "dev": true
+ }
+ }
+ },
+ "sauce-tunnel": {
+ "version": "2.5.0",
+ "from": "sauce-tunnel@>=2.5.0 <2.6.0",
+ "resolved": "https://registry.npmjs.org/sauce-tunnel/-/sauce-tunnel-2.5.0.tgz",
+ "dev": true
+ },
+ "saucelabs": {
+ "version": "1.2.0",
+ "from": "saucelabs@>=1.2.0 <1.3.0",
+ "resolved": "https://registry.npmjs.org/saucelabs/-/saucelabs-1.2.0.tgz",
+ "dev": true
+ },
+ "semver": {
+ "version": "5.3.0",
+ "from": "semver@>=2.0.0 <3.0.0||>=3.0.0 <4.0.0||>=4.0.0 <5.0.0||>=5.0.0 <6.0.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
+ "dev": true
+ },
+ "send": {
+ "version": "0.15.1",
+ "from": "send@0.15.1",
+ "resolved": "https://registry.npmjs.org/send/-/send-0.15.1.tgz",
+ "dev": true,
+ "dependencies": {
+ "debug": {
+ "version": "2.6.1",
+ "from": "debug@2.6.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.1.tgz",
+ "dev": true
+ },
+ "http-errors": {
+ "version": "1.6.1",
+ "from": "http-errors@>=1.6.1 <1.7.0",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.1.tgz",
+ "dev": true
+ },
+ "setprototypeof": {
+ "version": "1.0.3",
+ "from": "setprototypeof@1.0.3",
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz",
+ "dev": true
+ }
+ }
+ },
+ "serve-index": {
+ "version": "1.8.0",
+ "from": "serve-index@>=1.7.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.8.0.tgz",
+ "dev": true,
+ "dependencies": {
+ "debug": {
+ "version": "2.2.0",
+ "from": "debug@>=2.2.0 <2.3.0",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
+ "dev": true
+ },
+ "ms": {
+ "version": "0.7.1",
+ "from": "ms@0.7.1",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
+ "dev": true
+ }
+ }
+ },
+ "serve-static": {
+ "version": "1.12.1",
+ "from": "serve-static@>=1.10.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.12.1.tgz",
+ "dev": true
+ },
+ "set-blocking": {
+ "version": "2.0.0",
+ "from": "set-blocking@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
+ "dev": true
+ },
+ "set-immediate-shim": {
+ "version": "1.0.1",
+ "from": "set-immediate-shim@>=1.0.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz",
+ "dev": true
+ },
+ "setprototypeof": {
+ "version": "1.0.2",
+ "from": "setprototypeof@1.0.2",
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.2.tgz",
+ "dev": true
+ },
+ "shelljs": {
+ "version": "0.7.7",
+ "from": "shelljs@>=0.7.7 <0.8.0",
+ "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.7.tgz",
+ "dev": true
+ },
+ "shx": {
+ "version": "0.2.2",
+ "from": "shx@>=0.2.2 <0.3.0",
+ "resolved": "https://registry.npmjs.org/shx/-/shx-0.2.2.tgz",
+ "dev": true,
+ "dependencies": {
+ "minimist": {
+ "version": "1.2.0",
+ "from": "minimist@>=1.2.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
+ "dev": true
+ }
+ }
+ },
+ "sigmund": {
+ "version": "1.0.1",
+ "from": "sigmund@>=1.0.0 <1.1.0",
+ "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
+ "dev": true
+ },
+ "signal-exit": {
+ "version": "3.0.2",
+ "from": "signal-exit@>=3.0.0 <4.0.0",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
+ "dev": true
+ },
+ "slash": {
+ "version": "1.0.0",
+ "from": "slash@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
+ "dev": true
+ },
+ "slice-ansi": {
+ "version": "0.0.4",
+ "from": "slice-ansi@0.0.4",
+ "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz",
+ "dev": true
+ },
+ "sntp": {
+ "version": "1.0.9",
+ "from": "sntp@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz",
+ "dev": true
+ },
+ "source-map": {
+ "version": "0.5.6",
+ "from": "source-map@>=0.5.6 <0.6.0",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz",
+ "dev": true
+ },
+ "source-map-support": {
+ "version": "0.4.14",
+ "from": "source-map-support@>=0.4.2 <0.5.0",
+ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.14.tgz",
+ "dev": true
+ },
+ "spdx-correct": {
+ "version": "1.0.2",
+ "from": "spdx-correct@>=1.0.0 <1.1.0",
+ "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz",
+ "dev": true
+ },
+ "spdx-expression-parse": {
+ "version": "1.0.4",
+ "from": "spdx-expression-parse@>=1.0.0 <1.1.0",
+ "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz",
+ "dev": true
+ },
+ "spdx-license-ids": {
+ "version": "1.2.2",
+ "from": "spdx-license-ids@>=1.0.2 <2.0.0",
+ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz",
+ "dev": true
+ },
+ "split": {
+ "version": "1.0.0",
+ "from": "split@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/split/-/split-1.0.0.tgz",
+ "dev": true
+ },
+ "sprintf-js": {
+ "version": "1.0.3",
+ "from": "sprintf-js@>=1.0.2 <1.1.0",
+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+ "dev": true
+ },
+ "sshpk": {
+ "version": "1.11.0",
+ "from": "sshpk@>=1.7.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.11.0.tgz",
+ "dev": true,
+ "dependencies": {
+ "assert-plus": {
+ "version": "1.0.0",
+ "from": "assert-plus@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
+ "dev": true
+ }
+ }
+ },
+ "statuses": {
+ "version": "1.3.1",
+ "from": "statuses@>=1.3.1 <1.4.0",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz",
+ "dev": true
+ },
+ "stdout-stream": {
+ "version": "1.4.0",
+ "from": "stdout-stream@>=1.4.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.0.tgz",
+ "dev": true
+ },
+ "stream-buffers": {
+ "version": "2.2.0",
+ "from": "stream-buffers@>=2.1.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz",
+ "dev": true
+ },
+ "string_decoder": {
+ "version": "0.10.31",
+ "from": "string_decoder@>=0.10.0 <0.11.0",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "dev": true
+ },
+ "string-width": {
+ "version": "1.0.2",
+ "from": "string-width@>=1.0.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
+ "dev": true
+ },
+ "stringstream": {
+ "version": "0.0.5",
+ "from": "stringstream@>=0.0.4 <0.1.0",
+ "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz",
+ "dev": true
+ },
+ "strip-ansi": {
+ "version": "3.0.1",
+ "from": "strip-ansi@>=3.0.0 <4.0.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+ "dev": true
+ },
+ "strip-bom": {
+ "version": "3.0.0",
+ "from": "strip-bom@>=3.0.0 <4.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
+ "dev": true
+ },
+ "strip-indent": {
+ "version": "1.0.1",
+ "from": "strip-indent@>=1.0.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz",
+ "dev": true
+ },
+ "strip-json-comments": {
+ "version": "2.0.1",
+ "from": "strip-json-comments@>=2.0.1 <2.1.0",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "3.2.3",
+ "from": "supports-color@>=3.2.3 <4.0.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz",
+ "dev": true
+ },
+ "table": {
+ "version": "3.8.3",
+ "from": "table@>=3.7.8 <4.0.0",
+ "resolved": "https://registry.npmjs.org/table/-/table-3.8.3.tgz",
+ "dev": true,
+ "dependencies": {
+ "is-fullwidth-code-point": {
+ "version": "2.0.0",
+ "from": "is-fullwidth-code-point@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+ "dev": true
+ },
+ "string-width": {
+ "version": "2.0.0",
+ "from": "string-width@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.0.0.tgz",
+ "dev": true
+ }
+ }
+ },
+ "tar": {
+ "version": "2.2.1",
+ "from": "tar@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz",
+ "dev": true
+ },
+ "tar-stream": {
+ "version": "1.5.2",
+ "from": "tar-stream@>=1.5.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.5.2.tgz",
+ "dev": true
+ },
+ "temporary": {
+ "version": "0.0.8",
+ "from": "temporary@>=0.0.8 <0.0.9",
+ "resolved": "https://registry.npmjs.org/temporary/-/temporary-0.0.8.tgz",
+ "dev": true
+ },
+ "tether": {
+ "version": "1.4.0",
+ "from": "tether@>=1.4.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/tether/-/tether-1.4.0.tgz"
+ },
+ "text-table": {
+ "version": "0.2.0",
+ "from": "text-table@>=0.2.0 <0.3.0",
+ "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
+ "dev": true
+ },
+ "thenify": {
+ "version": "3.2.1",
+ "from": "thenify@>=3.1.0 <4.0.0",
+ "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.2.1.tgz",
+ "dev": true
+ },
+ "thenify-all": {
+ "version": "1.6.0",
+ "from": "thenify-all@>=1.6.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz",
+ "dev": true
+ },
+ "throttleit": {
+ "version": "1.0.0",
+ "from": "throttleit@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz",
+ "dev": true
+ },
+ "through": {
+ "version": "2.3.8",
+ "from": "through@>=2.3.6 <3.0.0",
+ "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
+ "dev": true
+ },
+ "time-grunt": {
+ "version": "1.4.0",
+ "from": "time-grunt@>=1.4.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/time-grunt/-/time-grunt-1.4.0.tgz",
+ "dev": true
+ },
+ "time-zone": {
+ "version": "0.1.0",
+ "from": "time-zone@>=0.1.0 <0.2.0",
+ "resolved": "https://registry.npmjs.org/time-zone/-/time-zone-0.1.0.tgz",
+ "dev": true
+ },
+ "tiny-lr": {
+ "version": "0.2.1",
+ "from": "tiny-lr@>=0.2.1 <0.3.0",
+ "resolved": "https://registry.npmjs.org/tiny-lr/-/tiny-lr-0.2.1.tgz",
+ "dev": true,
+ "dependencies": {
+ "debug": {
+ "version": "2.2.0",
+ "from": "debug@>=2.2.0 <2.3.0",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
+ "dev": true
+ },
+ "ms": {
+ "version": "0.7.1",
+ "from": "ms@0.7.1",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
+ "dev": true
+ },
+ "qs": {
+ "version": "5.1.0",
+ "from": "qs@>=5.1.0 <5.2.0",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-5.1.0.tgz",
+ "dev": true
+ }
+ }
+ },
+ "to-fast-properties": {
+ "version": "1.0.2",
+ "from": "to-fast-properties@>=1.0.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.2.tgz",
+ "dev": true
+ },
+ "tough-cookie": {
+ "version": "2.3.2",
+ "from": "tough-cookie@>=2.3.0 <2.4.0",
+ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz",
+ "dev": true
+ },
+ "trim-newlines": {
+ "version": "1.0.0",
+ "from": "trim-newlines@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz",
+ "dev": true
+ },
+ "trim-right": {
+ "version": "1.0.1",
+ "from": "trim-right@>=1.0.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz",
+ "dev": true
+ },
+ "tryit": {
+ "version": "1.0.3",
+ "from": "tryit@>=1.0.1 <2.0.0",
+ "resolved": "https://registry.npmjs.org/tryit/-/tryit-1.0.3.tgz",
+ "dev": true
+ },
+ "tunnel-agent": {
+ "version": "0.4.3",
+ "from": "tunnel-agent@>=0.4.1 <0.5.0",
+ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz",
+ "dev": true
+ },
+ "tweetnacl": {
+ "version": "0.14.5",
+ "from": "tweetnacl@>=0.14.0 <0.15.0",
+ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
+ "dev": true,
+ "optional": true
+ },
+ "type-check": {
+ "version": "0.3.2",
+ "from": "type-check@>=0.3.2 <0.4.0",
+ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
+ "dev": true
+ },
+ "type-is": {
+ "version": "1.6.14",
+ "from": "type-is@>=1.6.10 <1.7.0",
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.14.tgz",
+ "dev": true
+ },
+ "typedarray": {
+ "version": "0.0.6",
+ "from": "typedarray@>=0.0.6 <0.0.7",
+ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
+ "dev": true
+ },
+ "uglify-js": {
+ "version": "2.8.14",
+ "from": "uglify-js@>=2.8.14 <3.0.0",
+ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.14.tgz",
+ "dev": true,
+ "dependencies": {
+ "camelcase": {
+ "version": "1.2.1",
+ "from": "camelcase@>=1.0.2 <2.0.0",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz",
+ "dev": true
+ },
+ "cliui": {
+ "version": "2.1.0",
+ "from": "cliui@>=2.1.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
+ "dev": true
+ },
+ "window-size": {
+ "version": "0.1.0",
+ "from": "window-size@0.1.0",
+ "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz",
+ "dev": true
+ },
+ "wordwrap": {
+ "version": "0.0.2",
+ "from": "wordwrap@0.0.2",
+ "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz",
+ "dev": true
+ },
+ "yargs": {
+ "version": "3.10.0",
+ "from": "yargs@>=3.10.0 <3.11.0",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz",
+ "dev": true
+ }
+ }
+ },
+ "uglify-to-browserify": {
+ "version": "1.0.2",
+ "from": "uglify-to-browserify@>=1.0.0 <1.1.0",
+ "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz",
+ "dev": true
+ },
+ "unc-path-regex": {
+ "version": "0.1.2",
+ "from": "unc-path-regex@>=0.1.0 <0.2.0",
+ "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz",
+ "dev": true
+ },
+ "underscore.string": {
+ "version": "3.2.3",
+ "from": "underscore.string@>=3.2.3 <3.3.0",
+ "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.2.3.tgz",
+ "dev": true
+ },
+ "unpipe": {
+ "version": "1.0.0",
+ "from": "unpipe@>=1.0.0 <1.1.0",
+ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
+ "dev": true
+ },
+ "user-home": {
+ "version": "2.0.0",
+ "from": "user-home@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz",
+ "dev": true
+ },
+ "util-deprecate": {
+ "version": "1.0.2",
+ "from": "util-deprecate@>=1.0.1 <1.1.0",
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "dev": true
+ },
+ "utils-merge": {
+ "version": "1.0.0",
+ "from": "utils-merge@1.0.0",
+ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz",
+ "dev": true
+ },
+ "uuid": {
+ "version": "3.0.1",
+ "from": "uuid@>=3.0.0 <4.0.0",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz",
+ "dev": true
+ },
+ "validate-npm-package-license": {
+ "version": "3.0.1",
+ "from": "validate-npm-package-license@>=3.0.1 <4.0.0",
+ "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz",
+ "dev": true
+ },
+ "verror": {
+ "version": "1.3.6",
+ "from": "verror@1.3.6",
+ "resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz",
+ "dev": true
+ },
+ "walkdir": {
+ "version": "0.0.11",
+ "from": "walkdir@>=0.0.11 <0.0.12",
+ "resolved": "https://registry.npmjs.org/walkdir/-/walkdir-0.0.11.tgz",
+ "dev": true
+ },
+ "websocket-driver": {
+ "version": "0.6.5",
+ "from": "websocket-driver@>=0.5.1",
+ "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.6.5.tgz",
+ "dev": true
+ },
+ "websocket-extensions": {
+ "version": "0.1.1",
+ "from": "websocket-extensions@>=0.1.1",
+ "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.1.tgz",
+ "dev": true
+ },
+ "when": {
+ "version": "3.7.8",
+ "from": "when@>=3.7.5 <3.8.0",
+ "resolved": "https://registry.npmjs.org/when/-/when-3.7.8.tgz",
+ "dev": true
+ },
+ "which": {
+ "version": "1.2.12",
+ "from": "which@>=1.2.1 <1.3.0",
+ "resolved": "https://registry.npmjs.org/which/-/which-1.2.12.tgz",
+ "dev": true
+ },
+ "which-module": {
+ "version": "1.0.0",
+ "from": "which-module@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz",
+ "dev": true
+ },
+ "wide-align": {
+ "version": "1.1.0",
+ "from": "wide-align@>=1.1.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.0.tgz",
+ "dev": true
+ },
+ "window-size": {
+ "version": "0.2.0",
+ "from": "window-size@>=0.2.0 <0.3.0",
+ "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz",
+ "dev": true
+ },
+ "wordwrap": {
+ "version": "1.0.0",
+ "from": "wordwrap@>=1.0.0 <1.1.0",
+ "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
+ "dev": true
+ },
+ "wrap-ansi": {
+ "version": "2.1.0",
+ "from": "wrap-ansi@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
+ "dev": true
+ },
+ "wrappy": {
+ "version": "1.0.2",
+ "from": "wrappy@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "dev": true
+ },
+ "write": {
+ "version": "0.2.1",
+ "from": "write@>=0.2.1 <0.3.0",
+ "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz",
+ "dev": true
+ },
+ "xml": {
+ "version": "1.0.0",
+ "from": "xml@1.0.0",
+ "resolved": "https://registry.npmjs.org/xml/-/xml-1.0.0.tgz",
+ "dev": true
+ },
+ "xtend": {
+ "version": "4.0.1",
+ "from": "xtend@>=4.0.0 <5.0.0",
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
+ "dev": true
+ },
+ "y18n": {
+ "version": "3.2.1",
+ "from": "y18n@>=3.2.1 <4.0.0",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz",
+ "dev": true
+ },
+ "yallist": {
+ "version": "2.1.2",
+ "from": "yallist@>=2.0.0 <3.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
+ "dev": true
+ },
+ "yargs": {
+ "version": "6.6.0",
+ "from": "yargs@>=6.6.0 <7.0.0",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz",
+ "dev": true,
+ "dependencies": {
+ "camelcase": {
+ "version": "3.0.0",
+ "from": "camelcase@>=3.0.0 <4.0.0",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz",
+ "dev": true
+ }
+ }
+ },
+ "yargs-parser": {
+ "version": "4.2.1",
+ "from": "yargs-parser@>=4.2.0 <5.0.0",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz",
+ "dev": true,
+ "dependencies": {
+ "camelcase": {
+ "version": "3.0.0",
+ "from": "camelcase@>=3.0.0 <4.0.0",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz",
+ "dev": true
+ }
+ }
+ },
+ "yauzl": {
+ "version": "2.4.1",
+ "from": "yauzl@2.4.1",
+ "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz",
+ "dev": true
+ },
+ "zip-stream": {
+ "version": "1.1.1",
+ "from": "zip-stream@>=1.1.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-1.1.1.tgz",
+ "dev": true
+ }
+ }
+}
diff --git a/templates/assets/bootstrap/grunt/postcss.config.js b/templates/assets/bootstrap/grunt/postcss.config.js
new file mode 100644
index 0000000..803078a
--- /dev/null
+++ b/templates/assets/bootstrap/grunt/postcss.config.js
@@ -0,0 +1,41 @@
+module.exports = (ctx) => ({
+ map: ctx.file.dirname.startsWith('docs') ? false : {
+ inline: false,
+ annotation: true,
+ sourcesContent: true
+ },
+ plugins: {
+ autoprefixer: {
+ browsers: [
+ //
+ // Official browser support policy:
+ // https://v4-alpha.getbootstrap.com/getting-started/browsers-devices/#supported-browsers
+ //
+ 'Chrome >= 35', // Exact version number here is kinda arbitrary
+ // Rather than using Autoprefixer's native "Firefox ESR" version specifier string,
+ // we deliberately hardcode the number. This is to avoid unwittingly severely breaking the previous ESR in the event that:
+ // (a) we happen to ship a new Bootstrap release soon after the release of a new ESR,
+ // such that folks haven't yet had a reasonable amount of time to upgrade; and
+ // (b) the new ESR has unprefixed CSS properties/values whose absence would severely break webpages
+ // (e.g. `box-sizing`, as opposed to `background: linear-gradient(...)`).
+ // Since they've been unprefixed, Autoprefixer will stop prefixing them,
+ // thus causing them to not work in the previous ESR (where the prefixes were required).
+ 'Firefox >= 38', // Current Firefox Extended Support Release (ESR); https://www.mozilla.org/en-US/firefox/organizations/faq/
+ // Note: Edge versions in Autoprefixer & Can I Use refer to the EdgeHTML rendering engine version,
+ // NOT the Edge app version shown in Edge's "About" screen.
+ // For example, at the time of writing, Edge 20 on an up-to-date system uses EdgeHTML 12.
+ // See also https://github.com/Fyrd/caniuse/issues/1928
+ 'Edge >= 12',
+ 'Explorer >= 10',
+ // Out of leniency, we prefix these 1 version further back than the official policy.
+ 'iOS >= 8',
+ 'Safari >= 8',
+ // The following remain NOT officially supported, but we're lenient and include their prefixes to avoid severely breaking in them.
+ 'Android 2.3',
+ 'Android >= 4',
+ 'Opera >= 12'
+ ]
+ },
+ 'postcss-flexbugs-fixes': {}
+ }
+})
diff --git a/templates/assets/bootstrap/grunt/sauce_browsers.yml b/templates/assets/bootstrap/grunt/sauce_browsers.yml
new file mode 100644
index 0000000..4d5041b
--- /dev/null
+++ b/templates/assets/bootstrap/grunt/sauce_browsers.yml
@@ -0,0 +1,84 @@
+[
+ # Docs: https://wiki.saucelabs.com/display/DOCS/Platform+Configurator
+
+ {
+ browserName: "safari",
+ platform: "OS X 10.11"
+ },
+ {
+ browserName: "chrome",
+ platform: "OS X 10.11",
+ version: "latest"
+ },
+ {
+ browserName: "firefox",
+ platform: "OS X 10.11",
+ version: "latest"
+ },
+
+ # Mac Opera not currently supported by Sauce Labs
+
+ {
+ browserName: "MicrosoftEdge",
+ platform: "Windows 10",
+ version: "latest"
+ },
+ {
+ browserName: "internet explorer",
+ version: "11",
+ platform: "Windows 8.1"
+ },
+ {
+ browserName: "internet explorer",
+ version: "10",
+ platform: "Windows 8"
+ },
+ {
+ browserName: "internet explorer",
+ version: "9",
+ platform: "Windows 7"
+ },
+
+ {
+ browserName: "chrome",
+ platform: "Windows 10",
+ version: "latest"
+ },
+ {
+ browserName: "firefox",
+ platform: "Windows 10",
+ version: "latest"
+ },
+
+ # Win Opera 15+ not currently supported by Sauce Labs
+
+ {
+ browserName: "Safari",
+ deviceName: "iPhone Simulator",
+ platformVersion: "9.3",
+ platformName: "iOS"
+ },
+
+ # iOS Chrome not currently supported by Sauce Labs
+
+ # Linux (unofficial)
+ {
+ browserName: "chrome",
+ platform: "Linux",
+ version: "latest"
+ },
+ {
+ browserName: "firefox",
+ platform: "Linux",
+ version: "latest"
+ },
+
+ # Android
+ {
+ platform: "Linux",
+ browserName: "android",
+ deviceName: "Android Emulator",
+ version: "latest",
+ deviceType: "phone"
+ }
+]
diff --git a/templates/assets/bootstrap/grunt/upload-preview.sh b/templates/assets/bootstrap/grunt/upload-preview.sh
new file mode 100755
index 0000000..08e7fa2
--- /dev/null
+++ b/templates/assets/bootstrap/grunt/upload-preview.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+# Upload built docs to preview.twbsapps.com
+
+if [ "$TRAVIS_REPO_SLUG" != twbs-savage/bootstrap ]; then exit 0; fi
+
+# Add build metadata to version
+sed -i "/^current_version:/ s/\$/+pr.${TRAVIS_COMMIT}/" _config.yml
+# Fix URLs since the site's root is now a subdirectory
+bundle exec jekyll build --destination "$TRAVIS_COMMIT" --baseurl "/c/${TRAVIS_COMMIT}"
+
+# Install gcloud & gsutil
+GSUTIL_VERSION=$(gsutil version | cut -d ' ' -f 3)
+if [ ! -d "${HOME}/google-cloud-sdk" ] || [ "${GSUTIL_VERSION}" != '4.19' ]; then
+ rm -rf "${HOME}/google-cloud-sdk" # Kill Travis' outdated non-updateable preinstalled version
+ echo 'Installing google-cloud-sdk...'
+ export CLOUDSDK_CORE_DISABLE_PROMPTS=1
+ time (curl -S -s https://sdk.cloud.google.com | bash &>/dev/null)
+ echo 'Done.'
+fi
+source "${HOME}/google-cloud-sdk/path.bash.inc"
+
+openssl aes-256-cbc -K $encrypted_2b749c8e6327_key -iv $encrypted_2b749c8e6327_iv -in grunt/gcp-key.json.enc -out grunt/gcp-key.json -d
+gcloud auth activate-service-account "$GCP_SERVICE_ACCOUNT" --key-file grunt/gcp-key.json &> /dev/null || (echo 'GCP login failed!'; exit 1)
+
+echo "Uploading to http://preview.twbsapps.com/c/${TRAVIS_COMMIT} ..."
+time gsutil -q -m cp -z html,css,js,svg -r "./${TRAVIS_COMMIT}" gs://preview.twbsapps.com/c/
+echo 'Done.'
diff --git a/templates/assets/bootstrap/js/.eslintrc.json b/templates/assets/bootstrap/js/.eslintrc.json
new file mode 100644
index 0000000..07a307a
--- /dev/null
+++ b/templates/assets/bootstrap/js/.eslintrc.json
@@ -0,0 +1,240 @@
+{
+ "root": true,
+ "parser": "babel-eslint",
+ "env": {
+ "browser": true,
+ "es6": true,
+ "jquery": true
+ },
+ "extends": "eslint:recommended",
+ "parserOptions": {
+ "ecmaVersion": 8,
+ "sourceType": "module"
+ },
+ "rules": {
+ // Possible Errors
+ "no-await-in-loop": "error",
+ "no-compare-neg-zero": "error",
+ "no-extra-parens": "error",
+ "no-prototype-builtins": "off",
+ "no-template-curly-in-string": "error",
+ "no-unsafe-negation": "error",
+ "valid-jsdoc": "error",
+
+ // Best Practices
+ "accessor-pairs": "error",
+ "array-callback-return": "error",
+ "block-scoped-var": "error",
+ "class-methods-use-this": "off",
+ "complexity": "error",
+ "consistent-return": "error",
+ "curly": "error",
+ "default-case": "error",
+ "dot-location": ["error", "property"],
+ "dot-notation": "error",
+ "eqeqeq": "error",
+ "guard-for-in": "error",
+ "no-alert": "error",
+ "no-caller": "error",
+ "no-div-regex": "error",
+ "no-else-return": "error",
+ "no-empty-function": "error",
+ "no-eq-null": "error",
+ "no-eval": "error",
+ "no-extend-native": "error",
+ "no-extra-bind": "error",
+ "no-extra-label": "error",
+ "no-floating-decimal": "error",
+ "no-global-assign": "error",
+ "no-implicit-coercion": "error",
+ "no-implicit-globals": "error",
+ "no-implied-eval": "error",
+ "no-invalid-this": "off",
+ "no-iterator": "error",
+ "no-labels": "error",
+ "no-lone-blocks": "error",
+ "no-loop-func": "error",
+ "no-magic-numbers": ["error", {
+ "ignore": [-1, 0, 1],
+ "ignoreArrayIndexes": true
+ }
+ ],
+ "no-multi-spaces": ["error", {
+ "exceptions": {
+ "AssignmentExpression": true,
+ "ArrowFunctionExpression": true,
+ "CallExpression": true,
+ "VariableDeclarator": true
+ }
+ }
+ ],
+ "no-multi-str": "error",
+ "no-new": "error",
+ "no-new-func": "off",
+ "no-new-wrappers": "error",
+ "no-new": "error",
+ "no-octal-escape": "error",
+ "no-param-reassign": "off",
+ "no-proto": "error",
+ "no-restricted-properties": "error",
+ "no-return-assign": "off",
+ "no-return-await": "error",
+ "no-script-url": "error",
+ "no-self-compare": "error",
+ "no-sequences": "error",
+ "no-throw-literal": "error",
+ "no-unmodified-loop-condition": "error",
+ "no-unused-expressions": "error",
+ "no-useless-call": "error",
+ "no-useless-concat": "error",
+ "no-useless-escape": "error",
+ "no-useless-return": "off",
+ "no-void": "error",
+ "no-warning-comments": "off",
+ "no-with": "error",
+ "prefer-promise-reject-errors": "error",
+ "radix": "error",
+ "vars-on-top": "error",
+ "wrap-iife": "error",
+ "yoda": "error",
+
+ // Strict Mode
+ "strict": "error",
+
+ // Variables
+ "init-declarations": "off",
+ "no-catch-shadow": "error",
+ "no-label-var": "error",
+ "no-restricted-globals": "error",
+ "no-shadow": "off",
+ "no-shadow-restricted-names": "error",
+ "no-undef-init": "error",
+ "no-undefined": "off",
+ "no-use-before-define": "off",
+
+ // Node.js and CommonJS
+ "callback-return": "off",
+ "global-require": "error",
+ "handle-callback-err": "error",
+ "no-mixed-requires": "error",
+ "no-new-require": "error",
+ "no-path-concat": "error",
+ "no-process-env": "error",
+ "no-process-exit": "error",
+ "no-restricted-modules": "error",
+ "no-sync": "error",
+
+ // Stylistic Issues
+ "array-bracket-spacing": "error",
+ "block-spacing": "error",
+ "brace-style": "error",
+ "capitalized-comments": "off",
+ "camelcase": "error",
+ "comma-dangle": "error",
+ "comma-spacing": "error",
+ "comma-style": "error",
+ "computed-property-spacing": "error",
+ "consistent-this": "error",
+ "eol-last": "error",
+ "func-call-spacing": "error",
+ "func-name-matching": "error",
+ "func-names": "off",
+ "func-style": ["error", "declaration"],
+ "id-blacklist": "error",
+ "id-length": "off",
+ "id-match": "error",
+ "indent": ["error", 2, { "SwitchCase": 1 }],
+ "jsx-quotes": "error",
+ "key-spacing": "off",
+ "keyword-spacing": "error",
+ "line-comment-position": "off",
+ "linebreak-style": ["error", "unix"],
+ "lines-around-comment": "off",
+ "lines-around-directive": "error",
+ "max-depth": ["error", 10],
+ "max-len": "off",
+ "max-lines": "off",
+ "max-nested-callbacks": "error",
+ "max-params": "off",
+ "max-statements": "off",
+ "max-statements-per-line": "error",
+ "multiline-ternary": "off",
+ "new-cap": ["error", { "capIsNewExceptionPattern": "$.*" }],
+ "new-parens": "error",
+ "newline-after-var": "off",
+ "newline-before-return": "off",
+ "newline-per-chained-call": ["error", { "ignoreChainWithDepth": 5 }],
+ "no-array-constructor": "error",
+ "no-bitwise": "error",
+ "no-continue": "off",
+ "no-inline-comments": "off",
+ "no-lonely-if": "error",
+ "no-mixed-operators": "off",
+ "no-multi-assign": "error",
+ "no-multiple-empty-lines": "error",
+ "no-negated-condition": "off",
+ "no-nested-ternary": "error",
+ "no-new-object": "error",
+ "no-plusplus": "off",
+ "no-restricted-syntax": "error",
+ "no-tabs": "error",
+ "no-ternary": "off",
+ "no-trailing-spaces": "error",
+ "no-underscore-dangle": "off",
+ "no-unneeded-ternary": "error",
+ "no-whitespace-before-property": "error",
+ "nonblock-statement-body-position": "error",
+ "object-curly-newline": ["error", { "minProperties": 1 }],
+ "object-curly-spacing": ["error", "always"],
+ "object-property-newline": "error",
+ "one-var": ["error", "never"],
+ "one-var-declaration-per-line": "error",
+ "operator-assignment": "error",
+ "operator-linebreak": "off",
+ "padded-blocks": "off",
+ "quote-props": ["error", "as-needed"],
+ "quotes": ["error", "single"],
+ "require-jsdoc": "off",
+ "semi": ["error", "never"],
+ "semi-spacing": "error",
+ "sort-keys": "off",
+ "sort-vars": "error",
+ "space-before-blocks": "error",
+ "space-before-function-paren": ["error", {
+ "anonymous": "always",
+ "named": "never"
+ }],
+ "space-in-parens": "error",
+ "space-infix-ops": "error",
+ "space-unary-ops": "error",
+ "spaced-comment": "error",
+ "template-tag-spacing": "error",
+ "unicode-bom": "error",
+ "wrap-regex": "off",
+
+ // ECMAScript 6
+ "arrow-body-style": "off",
+ "arrow-parens": "error",
+ "arrow-spacing": "error",
+ "generator-star-spacing": "error",
+ "no-confusing-arrow": "error",
+ "no-duplicate-imports": "error",
+ "no-restricted-imports": "error",
+ "no-useless-computed-key": "error",
+ "no-useless-constructor": "error",
+ "no-useless-rename": "error",
+ "no-var": "error",
+ "object-shorthand": "error",
+ "prefer-arrow-callback": "error",
+ "prefer-const": "error",
+ "prefer-numeric-literals": "error",
+ "prefer-rest-params": "error",
+ "prefer-spread": "error",
+ "prefer-template": "error",
+ "rest-spread-spacing": "error",
+ "sort-imports": "error",
+ "symbol-description": "error",
+ "template-curly-spacing": "error",
+ "yield-star-spacing": "error"
+ }
+}
diff --git a/templates/assets/bootstrap/js/src/alert.js b/templates/assets/bootstrap/js/src/alert.js
new file mode 100644
index 0000000..b30d0d3
--- /dev/null
+++ b/templates/assets/bootstrap/js/src/alert.js
@@ -0,0 +1,193 @@
+import Util from './util'
+
+
+/**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v4.0.0-alpha.6): alert.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+const Alert = (($) => {
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+
+ const NAME = 'alert'
+ const VERSION = '4.0.0-alpha.6'
+ const DATA_KEY = 'bs.alert'
+ const EVENT_KEY = `.${DATA_KEY}`
+ const DATA_API_KEY = '.data-api'
+ const JQUERY_NO_CONFLICT = $.fn[NAME]
+ const TRANSITION_DURATION = 150
+
+ const Selector = {
+ DISMISS : '[data-dismiss="alert"]'
+ }
+
+ const Event = {
+ CLOSE : `close${EVENT_KEY}`,
+ CLOSED : `closed${EVENT_KEY}`,
+ CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`
+ }
+
+ const ClassName = {
+ ALERT : 'alert',
+ FADE : 'fade',
+ SHOW : 'show'
+ }
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+
+ class Alert {
+
+ constructor(element) {
+ this._element = element
+ }
+
+
+ // getters
+
+ static get VERSION() {
+ return VERSION
+ }
+
+
+ // public
+
+ close(element) {
+ element = element || this._element
+
+ const rootElement = this._getRootElement(element)
+ const customEvent = this._triggerCloseEvent(rootElement)
+
+ if (customEvent.isDefaultPrevented()) {
+ return
+ }
+
+ this._removeElement(rootElement)
+ }
+
+ dispose() {
+ $.removeData(this._element, DATA_KEY)
+ this._element = null
+ }
+
+
+ // private
+
+ _getRootElement(element) {
+ const selector = Util.getSelectorFromElement(element)
+ let parent = false
+
+ if (selector) {
+ parent = $(selector)[0]
+ }
+
+ if (!parent) {
+ parent = $(element).closest(`.${ClassName.ALERT}`)[0]
+ }
+
+ return parent
+ }
+
+ _triggerCloseEvent(element) {
+ const closeEvent = $.Event(Event.CLOSE)
+
+ $(element).trigger(closeEvent)
+ return closeEvent
+ }
+
+ _removeElement(element) {
+ $(element).removeClass(ClassName.SHOW)
+
+ if (!Util.supportsTransitionEnd() ||
+ !$(element).hasClass(ClassName.FADE)) {
+ this._destroyElement(element)
+ return
+ }
+
+ $(element)
+ .one(Util.TRANSITION_END, (event) => this._destroyElement(element, event))
+ .emulateTransitionEnd(TRANSITION_DURATION)
+ }
+
+ _destroyElement(element) {
+ $(element)
+ .detach()
+ .trigger(Event.CLOSED)
+ .remove()
+ }
+
+
+ // static
+
+ static _jQueryInterface(config) {
+ return this.each(function () {
+ const $element = $(this)
+ let data = $element.data(DATA_KEY)
+
+ if (!data) {
+ data = new Alert(this)
+ $element.data(DATA_KEY, data)
+ }
+
+ if (config === 'close') {
+ data[config](this)
+ }
+ })
+ }
+
+ static _handleDismiss(alertInstance) {
+ return function (event) {
+ if (event) {
+ event.preventDefault()
+ }
+
+ alertInstance.close(this)
+ }
+ }
+
+ }
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * Data Api implementation
+ * ------------------------------------------------------------------------
+ */
+
+ $(document).on(
+ Event.CLICK_DATA_API,
+ Selector.DISMISS,
+ Alert._handleDismiss(new Alert())
+ )
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * jQuery
+ * ------------------------------------------------------------------------
+ */
+
+ $.fn[NAME] = Alert._jQueryInterface
+ $.fn[NAME].Constructor = Alert
+ $.fn[NAME].noConflict = function () {
+ $.fn[NAME] = JQUERY_NO_CONFLICT
+ return Alert._jQueryInterface
+ }
+
+ return Alert
+
+})(jQuery)
+
+export default Alert
diff --git a/templates/assets/bootstrap/js/src/button.js b/templates/assets/bootstrap/js/src/button.js
new file mode 100644
index 0000000..76c5cdd
--- /dev/null
+++ b/templates/assets/bootstrap/js/src/button.js
@@ -0,0 +1,176 @@
+/**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v4.0.0-alpha.6): button.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+const Button = (($) => {
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+
+ const NAME = 'button'
+ const VERSION = '4.0.0-alpha.6'
+ const DATA_KEY = 'bs.button'
+ const EVENT_KEY = `.${DATA_KEY}`
+ const DATA_API_KEY = '.data-api'
+ const JQUERY_NO_CONFLICT = $.fn[NAME]
+
+ const ClassName = {
+ ACTIVE : 'active',
+ BUTTON : 'btn',
+ FOCUS : 'focus'
+ }
+
+ const Selector = {
+ DATA_TOGGLE_CARROT : '[data-toggle^="button"]',
+ DATA_TOGGLE : '[data-toggle="buttons"]',
+ INPUT : 'input',
+ ACTIVE : '.active',
+ BUTTON : '.btn'
+ }
+
+ const Event = {
+ CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`,
+ FOCUS_BLUR_DATA_API : `focus${EVENT_KEY}${DATA_API_KEY} `
+ + `blur${EVENT_KEY}${DATA_API_KEY}`
+ }
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+
+ class Button {
+
+ constructor(element) {
+ this._element = element
+ }
+
+
+ // getters
+
+ static get VERSION() {
+ return VERSION
+ }
+
+
+ // public
+
+ toggle() {
+ let triggerChangeEvent = true
+ const rootElement = $(this._element).closest(
+ Selector.DATA_TOGGLE
+ )[0]
+
+ if (rootElement) {
+ const input = $(this._element).find(Selector.INPUT)[0]
+
+ if (input) {
+ if (input.type === 'radio') {
+ if (input.checked &&
+ $(this._element).hasClass(ClassName.ACTIVE)) {
+ triggerChangeEvent = false
+
+ } else {
+ const activeElement = $(rootElement).find(Selector.ACTIVE)[0]
+
+ if (activeElement) {
+ $(activeElement).removeClass(ClassName.ACTIVE)
+ }
+ }
+ }
+
+ if (triggerChangeEvent) {
+ input.checked = !$(this._element).hasClass(ClassName.ACTIVE)
+ $(input).trigger('change')
+ }
+
+ input.focus()
+ }
+
+ }
+
+ this._element.setAttribute('aria-pressed',
+ !$(this._element).hasClass(ClassName.ACTIVE))
+
+ if (triggerChangeEvent) {
+ $(this._element).toggleClass(ClassName.ACTIVE)
+ }
+ }
+
+ dispose() {
+ $.removeData(this._element, DATA_KEY)
+ this._element = null
+ }
+
+
+ // static
+
+ static _jQueryInterface(config) {
+ return this.each(function () {
+ let data = $(this).data(DATA_KEY)
+
+ if (!data) {
+ data = new Button(this)
+ $(this).data(DATA_KEY, data)
+ }
+
+ if (config === 'toggle') {
+ data[config]()
+ }
+ })
+ }
+
+ }
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * Data Api implementation
+ * ------------------------------------------------------------------------
+ */
+
+ $(document)
+ .on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, (event) => {
+ event.preventDefault()
+
+ let button = event.target
+
+ if (!$(button).hasClass(ClassName.BUTTON)) {
+ button = $(button).closest(Selector.BUTTON)
+ }
+
+ Button._jQueryInterface.call($(button), 'toggle')
+ })
+ .on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, (event) => {
+ const button = $(event.target).closest(Selector.BUTTON)[0]
+ $(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type))
+ })
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * jQuery
+ * ------------------------------------------------------------------------
+ */
+
+ $.fn[NAME] = Button._jQueryInterface
+ $.fn[NAME].Constructor = Button
+ $.fn[NAME].noConflict = function () {
+ $.fn[NAME] = JQUERY_NO_CONFLICT
+ return Button._jQueryInterface
+ }
+
+ return Button
+
+})(jQuery)
+
+export default Button
diff --git a/templates/assets/bootstrap/js/src/carousel.js b/templates/assets/bootstrap/js/src/carousel.js
new file mode 100644
index 0000000..8a75cb2
--- /dev/null
+++ b/templates/assets/bootstrap/js/src/carousel.js
@@ -0,0 +1,497 @@
+import Util from './util'
+
+
+/**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v4.0.0-alpha.6): carousel.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+const Carousel = (($) => {
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+
+ const NAME = 'carousel'
+ const VERSION = '4.0.0-alpha.6'
+ const DATA_KEY = 'bs.carousel'
+ const EVENT_KEY = `.${DATA_KEY}`
+ const DATA_API_KEY = '.data-api'
+ const JQUERY_NO_CONFLICT = $.fn[NAME]
+ const TRANSITION_DURATION = 600
+ const ARROW_LEFT_KEYCODE = 37 // KeyboardEvent.which value for left arrow key
+ const ARROW_RIGHT_KEYCODE = 39 // KeyboardEvent.which value for right arrow key
+
+ const Default = {
+ interval : 5000,
+ keyboard : true,
+ slide : false,
+ pause : 'hover',
+ wrap : true
+ }
+
+ const DefaultType = {
+ interval : '(number|boolean)',
+ keyboard : 'boolean',
+ slide : '(boolean|string)',
+ pause : '(string|boolean)',
+ wrap : 'boolean'
+ }
+
+ const Direction = {
+ NEXT : 'next',
+ PREV : 'prev',
+ LEFT : 'left',
+ RIGHT : 'right'
+ }
+
+ const Event = {
+ SLIDE : `slide${EVENT_KEY}`,
+ SLID : `slid${EVENT_KEY}`,
+ KEYDOWN : `keydown${EVENT_KEY}`,
+ MOUSEENTER : `mouseenter${EVENT_KEY}`,
+ MOUSELEAVE : `mouseleave${EVENT_KEY}`,
+ LOAD_DATA_API : `load${EVENT_KEY}${DATA_API_KEY}`,
+ CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`
+ }
+
+ const ClassName = {
+ CAROUSEL : 'carousel',
+ ACTIVE : 'active',
+ SLIDE : 'slide',
+ RIGHT : 'carousel-item-right',
+ LEFT : 'carousel-item-left',
+ NEXT : 'carousel-item-next',
+ PREV : 'carousel-item-prev',
+ ITEM : 'carousel-item'
+ }
+
+ const Selector = {
+ ACTIVE : '.active',
+ ACTIVE_ITEM : '.active.carousel-item',
+ ITEM : '.carousel-item',
+ NEXT_PREV : '.carousel-item-next, .carousel-item-prev',
+ INDICATORS : '.carousel-indicators',
+ DATA_SLIDE : '[data-slide], [data-slide-to]',
+ DATA_RIDE : '[data-ride="carousel"]'
+ }
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+
+ class Carousel {
+
+ constructor(element, config) {
+ this._items = null
+ this._interval = null
+ this._activeElement = null
+
+ this._isPaused = false
+ this._isSliding = false
+
+ this._config = this._getConfig(config)
+ this._element = $(element)[0]
+ this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0]
+
+ this._addEventListeners()
+ }
+
+
+ // getters
+
+ static get VERSION() {
+ return VERSION
+ }
+
+ static get Default() {
+ return Default
+ }
+
+
+ // public
+
+ next() {
+ if (this._isSliding) {
+ throw new Error('Carousel is sliding')
+ }
+ this._slide(Direction.NEXT)
+ }
+
+ nextWhenVisible() {
+ // Don't call next when the page isn't visible
+ if (!document.hidden) {
+ this.next()
+ }
+ }
+
+ prev() {
+ if (this._isSliding) {
+ throw new Error('Carousel is sliding')
+ }
+ this._slide(Direction.PREV)
+ }
+
+ pause(event) {
+ if (!event) {
+ this._isPaused = true
+ }
+
+ if ($(this._element).find(Selector.NEXT_PREV)[0] &&
+ Util.supportsTransitionEnd()) {
+ Util.triggerTransitionEnd(this._element)
+ this.cycle(true)
+ }
+
+ clearInterval(this._interval)
+ this._interval = null
+ }
+
+ cycle(event) {
+ if (!event) {
+ this._isPaused = false
+ }
+
+ if (this._interval) {
+ clearInterval(this._interval)
+ this._interval = null
+ }
+
+ if (this._config.interval && !this._isPaused) {
+ this._interval = setInterval(
+ (document.visibilityState ? this.nextWhenVisible : this.next).bind(this),
+ this._config.interval
+ )
+ }
+ }
+
+ to(index) {
+ this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]
+
+ const activeIndex = this._getItemIndex(this._activeElement)
+
+ if (index > this._items.length - 1 || index < 0) {
+ return
+ }
+
+ if (this._isSliding) {
+ $(this._element).one(Event.SLID, () => this.to(index))
+ return
+ }
+
+ if (activeIndex === index) {
+ this.pause()
+ this.cycle()
+ return
+ }
+
+ const direction = index > activeIndex ?
+ Direction.NEXT :
+ Direction.PREV
+
+ this._slide(direction, this._items[index])
+ }
+
+ dispose() {
+ $(this._element).off(EVENT_KEY)
+ $.removeData(this._element, DATA_KEY)
+
+ this._items = null
+ this._config = null
+ this._element = null
+ this._interval = null
+ this._isPaused = null
+ this._isSliding = null
+ this._activeElement = null
+ this._indicatorsElement = null
+ }
+
+
+ // private
+
+ _getConfig(config) {
+ config = $.extend({}, Default, config)
+ Util.typeCheckConfig(NAME, config, DefaultType)
+ return config
+ }
+
+ _addEventListeners() {
+ if (this._config.keyboard) {
+ $(this._element)
+ .on(Event.KEYDOWN, (event) => this._keydown(event))
+ }
+
+ if (this._config.pause === 'hover' &&
+ !('ontouchstart' in document.documentElement)) {
+ $(this._element)
+ .on(Event.MOUSEENTER, (event) => this.pause(event))
+ .on(Event.MOUSELEAVE, (event) => this.cycle(event))
+ }
+ }
+
+ _keydown(event) {
+ if (/input|textarea/i.test(event.target.tagName)) {
+ return
+ }
+
+ switch (event.which) {
+ case ARROW_LEFT_KEYCODE:
+ event.preventDefault()
+ this.prev()
+ break
+ case ARROW_RIGHT_KEYCODE:
+ event.preventDefault()
+ this.next()
+ break
+ default:
+ return
+ }
+ }
+
+ _getItemIndex(element) {
+ this._items = $.makeArray($(element).parent().find(Selector.ITEM))
+ return this._items.indexOf(element)
+ }
+
+ _getItemByDirection(direction, activeElement) {
+ const isNextDirection = direction === Direction.NEXT
+ const isPrevDirection = direction === Direction.PREV
+ const activeIndex = this._getItemIndex(activeElement)
+ const lastItemIndex = this._items.length - 1
+ const isGoingToWrap = isPrevDirection && activeIndex === 0 ||
+ isNextDirection && activeIndex === lastItemIndex
+
+ if (isGoingToWrap && !this._config.wrap) {
+ return activeElement
+ }
+
+ const delta = direction === Direction.PREV ? -1 : 1
+ const itemIndex = (activeIndex + delta) % this._items.length
+
+ return itemIndex === -1 ?
+ this._items[this._items.length - 1] : this._items[itemIndex]
+ }
+
+
+ _triggerSlideEvent(relatedTarget, eventDirectionName) {
+ const slideEvent = $.Event(Event.SLIDE, {
+ relatedTarget,
+ direction: eventDirectionName
+ })
+
+ $(this._element).trigger(slideEvent)
+
+ return slideEvent
+ }
+
+ _setActiveIndicatorElement(element) {
+ if (this._indicatorsElement) {
+ $(this._indicatorsElement)
+ .find(Selector.ACTIVE)
+ .removeClass(ClassName.ACTIVE)
+
+ const nextIndicator = this._indicatorsElement.children[
+ this._getItemIndex(element)
+ ]
+
+ if (nextIndicator) {
+ $(nextIndicator).addClass(ClassName.ACTIVE)
+ }
+ }
+ }
+
+ _slide(direction, element) {
+ const activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]
+ const nextElement = element || activeElement &&
+ this._getItemByDirection(direction, activeElement)
+
+ const isCycling = Boolean(this._interval)
+
+ let directionalClassName
+ let orderClassName
+ let eventDirectionName
+
+ if (direction === Direction.NEXT) {
+ directionalClassName = ClassName.LEFT
+ orderClassName = ClassName.NEXT
+ eventDirectionName = Direction.LEFT
+ } else {
+ directionalClassName = ClassName.RIGHT
+ orderClassName = ClassName.PREV
+ eventDirectionName = Direction.RIGHT
+ }
+
+ if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) {
+ this._isSliding = false
+ return
+ }
+
+ const slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName)
+ if (slideEvent.isDefaultPrevented()) {
+ return
+ }
+
+ if (!activeElement || !nextElement) {
+ // some weirdness is happening, so we bail
+ return
+ }
+
+ this._isSliding = true
+
+ if (isCycling) {
+ this.pause()
+ }
+
+ this._setActiveIndicatorElement(nextElement)
+
+ const slidEvent = $.Event(Event.SLID, {
+ relatedTarget: nextElement,
+ direction: eventDirectionName
+ })
+
+ if (Util.supportsTransitionEnd() &&
+ $(this._element).hasClass(ClassName.SLIDE)) {
+
+ $(nextElement).addClass(orderClassName)
+
+ Util.reflow(nextElement)
+
+ $(activeElement).addClass(directionalClassName)
+ $(nextElement).addClass(directionalClassName)
+
+ $(activeElement)
+ .one(Util.TRANSITION_END, () => {
+ $(nextElement)
+ .removeClass(`${directionalClassName} ${orderClassName}`)
+ .addClass(ClassName.ACTIVE)
+
+ $(activeElement).removeClass(`${ClassName.ACTIVE} ${orderClassName} ${directionalClassName}`)
+
+ this._isSliding = false
+
+ setTimeout(() => $(this._element).trigger(slidEvent), 0)
+
+ })
+ .emulateTransitionEnd(TRANSITION_DURATION)
+
+ } else {
+ $(activeElement).removeClass(ClassName.ACTIVE)
+ $(nextElement).addClass(ClassName.ACTIVE)
+
+ this._isSliding = false
+ $(this._element).trigger(slidEvent)
+ }
+
+ if (isCycling) {
+ this.cycle()
+ }
+ }
+
+
+ // static
+
+ static _jQueryInterface(config) {
+ return this.each(function () {
+ let data = $(this).data(DATA_KEY)
+ const _config = $.extend({}, Default, $(this).data())
+
+ if (typeof config === 'object') {
+ $.extend(_config, config)
+ }
+
+ const action = typeof config === 'string' ? config : _config.slide
+
+ if (!data) {
+ data = new Carousel(this, _config)
+ $(this).data(DATA_KEY, data)
+ }
+
+ if (typeof config === 'number') {
+ data.to(config)
+ } else if (typeof action === 'string') {
+ if (data[action] === undefined) {
+ throw new Error(`No method named "${action}"`)
+ }
+ data[action]()
+ } else if (_config.interval) {
+ data.pause()
+ data.cycle()
+ }
+ })
+ }
+
+ static _dataApiClickHandler(event) {
+ const selector = Util.getSelectorFromElement(this)
+
+ if (!selector) {
+ return
+ }
+
+ const target = $(selector)[0]
+
+ if (!target || !$(target).hasClass(ClassName.CAROUSEL)) {
+ return
+ }
+
+ const config = $.extend({}, $(target).data(), $(this).data())
+ const slideIndex = this.getAttribute('data-slide-to')
+
+ if (slideIndex) {
+ config.interval = false
+ }
+
+ Carousel._jQueryInterface.call($(target), config)
+
+ if (slideIndex) {
+ $(target).data(DATA_KEY).to(slideIndex)
+ }
+
+ event.preventDefault()
+ }
+
+ }
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * Data Api implementation
+ * ------------------------------------------------------------------------
+ */
+
+ $(document)
+ .on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler)
+
+ $(window).on(Event.LOAD_DATA_API, () => {
+ $(Selector.DATA_RIDE).each(function () {
+ const $carousel = $(this)
+ Carousel._jQueryInterface.call($carousel, $carousel.data())
+ })
+ })
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * jQuery
+ * ------------------------------------------------------------------------
+ */
+
+ $.fn[NAME] = Carousel._jQueryInterface
+ $.fn[NAME].Constructor = Carousel
+ $.fn[NAME].noConflict = function () {
+ $.fn[NAME] = JQUERY_NO_CONFLICT
+ return Carousel._jQueryInterface
+ }
+
+ return Carousel
+
+})(jQuery)
+
+export default Carousel
diff --git a/templates/assets/bootstrap/js/src/collapse.js b/templates/assets/bootstrap/js/src/collapse.js
new file mode 100644
index 0000000..13c4450
--- /dev/null
+++ b/templates/assets/bootstrap/js/src/collapse.js
@@ -0,0 +1,393 @@
+import Util from './util'
+
+
+/**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v4.0.0-alpha.6): collapse.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+const Collapse = (($) => {
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+
+ const NAME = 'collapse'
+ const VERSION = '4.0.0-alpha.6'
+ const DATA_KEY = 'bs.collapse'
+ const EVENT_KEY = `.${DATA_KEY}`
+ const DATA_API_KEY = '.data-api'
+ const JQUERY_NO_CONFLICT = $.fn[NAME]
+ const TRANSITION_DURATION = 600
+
+ const Default = {
+ toggle : true,
+ parent : ''
+ }
+
+ const DefaultType = {
+ toggle : 'boolean',
+ parent : 'string'
+ }
+
+ const Event = {
+ SHOW : `show${EVENT_KEY}`,
+ SHOWN : `shown${EVENT_KEY}`,
+ HIDE : `hide${EVENT_KEY}`,
+ HIDDEN : `hidden${EVENT_KEY}`,
+ CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`
+ }
+
+ const ClassName = {
+ SHOW : 'show',
+ COLLAPSE : 'collapse',
+ COLLAPSING : 'collapsing',
+ COLLAPSED : 'collapsed'
+ }
+
+ const Dimension = {
+ WIDTH : 'width',
+ HEIGHT : 'height'
+ }
+
+ const Selector = {
+ ACTIVES : '.card > .show, .card > .collapsing',
+ DATA_TOGGLE : '[data-toggle="collapse"]',
+ DATA_CHILDREN : 'data-children'
+ }
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+
+ class Collapse {
+
+ constructor(element, config) {
+ this._isTransitioning = false
+ this._element = element
+ this._config = this._getConfig(config)
+ this._triggerArray = $.makeArray($(
+ `[data-toggle="collapse"][href="#${element.id}"],` +
+ `[data-toggle="collapse"][data-target="#${element.id}"]`
+ ))
+ this._parent = this._config.parent ? this._getParent() : null
+
+ if (!this._config.parent) {
+ this._addAriaAndCollapsedClass(this._element, this._triggerArray)
+ }
+
+ this._selectorActives = Selector.ACTIVES
+ if (this._parent) {
+ const childrenSelector = this._parent.hasAttribute(Selector.DATA_CHILDREN) ? this._parent.getAttribute(Selector.DATA_CHILDREN) : null
+ if (childrenSelector !== null) {
+ this._selectorActives = `${childrenSelector} > .show, ${childrenSelector} > .collapsing`
+ }
+ }
+
+ if (this._config.toggle) {
+ this.toggle()
+ }
+ }
+
+
+ // getters
+
+ static get VERSION() {
+ return VERSION
+ }
+
+ static get Default() {
+ return Default
+ }
+
+
+ // public
+
+ toggle() {
+ if ($(this._element).hasClass(ClassName.SHOW)) {
+ this.hide()
+ } else {
+ this.show()
+ }
+ }
+
+ show() {
+ if (this._isTransitioning) {
+ throw new Error('Collapse is transitioning')
+ }
+
+ if ($(this._element).hasClass(ClassName.SHOW)) {
+ return
+ }
+
+ let actives
+ let activesData
+
+ if (this._parent) {
+ actives = $.makeArray($(this._parent).find(this._selectorActives))
+ if (!actives.length) {
+ actives = null
+ }
+ }
+
+ if (actives) {
+ activesData = $(actives).data(DATA_KEY)
+ if (activesData && activesData._isTransitioning) {
+ return
+ }
+ }
+
+ const startEvent = $.Event(Event.SHOW)
+ $(this._element).trigger(startEvent)
+ if (startEvent.isDefaultPrevented()) {
+ return
+ }
+
+ if (actives) {
+ Collapse._jQueryInterface.call($(actives), 'hide')
+ if (!activesData) {
+ $(actives).data(DATA_KEY, null)
+ }
+ }
+
+ const dimension = this._getDimension()
+
+ $(this._element)
+ .removeClass(ClassName.COLLAPSE)
+ .addClass(ClassName.COLLAPSING)
+
+ this._element.style[dimension] = 0
+ this._element.setAttribute('aria-expanded', true)
+
+ if (this._triggerArray.length) {
+ $(this._triggerArray)
+ .removeClass(ClassName.COLLAPSED)
+ .attr('aria-expanded', true)
+ }
+
+ this.setTransitioning(true)
+
+ const complete = () => {
+ $(this._element)
+ .removeClass(ClassName.COLLAPSING)
+ .addClass(ClassName.COLLAPSE)
+ .addClass(ClassName.SHOW)
+
+ this._element.style[dimension] = ''
+
+ this.setTransitioning(false)
+
+ $(this._element).trigger(Event.SHOWN)
+ }
+
+ if (!Util.supportsTransitionEnd()) {
+ complete()
+ return
+ }
+
+ const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1)
+ const scrollSize = `scroll${capitalizedDimension}`
+
+ $(this._element)
+ .one(Util.TRANSITION_END, complete)
+ .emulateTransitionEnd(TRANSITION_DURATION)
+
+ this._element.style[dimension] = `${this._element[scrollSize]}px`
+ }
+
+ hide() {
+ if (this._isTransitioning) {
+ throw new Error('Collapse is transitioning')
+ }
+
+ if (!$(this._element).hasClass(ClassName.SHOW)) {
+ return
+ }
+
+ const startEvent = $.Event(Event.HIDE)
+ $(this._element).trigger(startEvent)
+ if (startEvent.isDefaultPrevented()) {
+ return
+ }
+
+ const dimension = this._getDimension()
+
+ this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`
+
+ Util.reflow(this._element)
+
+ $(this._element)
+ .addClass(ClassName.COLLAPSING)
+ .removeClass(ClassName.COLLAPSE)
+ .removeClass(ClassName.SHOW)
+
+ this._element.setAttribute('aria-expanded', false)
+
+ if (this._triggerArray.length) {
+ $(this._triggerArray)
+ .addClass(ClassName.COLLAPSED)
+ .attr('aria-expanded', false)
+ }
+
+ this.setTransitioning(true)
+
+ const complete = () => {
+ this.setTransitioning(false)
+ $(this._element)
+ .removeClass(ClassName.COLLAPSING)
+ .addClass(ClassName.COLLAPSE)
+ .trigger(Event.HIDDEN)
+ }
+
+ this._element.style[dimension] = ''
+
+ if (!Util.supportsTransitionEnd()) {
+ complete()
+ return
+ }
+
+ $(this._element)
+ .one(Util.TRANSITION_END, complete)
+ .emulateTransitionEnd(TRANSITION_DURATION)
+ }
+
+ setTransitioning(isTransitioning) {
+ this._isTransitioning = isTransitioning
+ }
+
+ dispose() {
+ $.removeData(this._element, DATA_KEY)
+
+ this._config = null
+ this._parent = null
+ this._element = null
+ this._triggerArray = null
+ this._isTransitioning = null
+ }
+
+
+ // private
+
+ _getConfig(config) {
+ config = $.extend({}, Default, config)
+ config.toggle = Boolean(config.toggle) // coerce string values
+ Util.typeCheckConfig(NAME, config, DefaultType)
+ return config
+ }
+
+ _getDimension() {
+ const hasWidth = $(this._element).hasClass(Dimension.WIDTH)
+ return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT
+ }
+
+ _getParent() {
+ const parent = $(this._config.parent)[0]
+ const selector =
+ `[data-toggle="collapse"][data-parent="${this._config.parent}"]`
+
+ $(parent).find(selector).each((i, element) => {
+ this._addAriaAndCollapsedClass(
+ Collapse._getTargetFromElement(element),
+ [element]
+ )
+ })
+
+ return parent
+ }
+
+ _addAriaAndCollapsedClass(element, triggerArray) {
+ if (element) {
+ const isOpen = $(element).hasClass(ClassName.SHOW)
+ element.setAttribute('aria-expanded', isOpen)
+
+ if (triggerArray.length) {
+ $(triggerArray)
+ .toggleClass(ClassName.COLLAPSED, !isOpen)
+ .attr('aria-expanded', isOpen)
+ }
+ }
+ }
+
+
+ // static
+
+ static _getTargetFromElement(element) {
+ const selector = Util.getSelectorFromElement(element)
+ return selector ? $(selector)[0] : null
+ }
+
+ static _jQueryInterface(config) {
+ return this.each(function () {
+ const $this = $(this)
+ let data = $this.data(DATA_KEY)
+ const _config = $.extend(
+ {},
+ Default,
+ $this.data(),
+ typeof config === 'object' && config
+ )
+
+ if (!data && _config.toggle && /show|hide/.test(config)) {
+ _config.toggle = false
+ }
+
+ if (!data) {
+ data = new Collapse(this, _config)
+ $this.data(DATA_KEY, data)
+ }
+
+ if (typeof config === 'string') {
+ if (data[config] === undefined) {
+ throw new Error(`No method named "${config}"`)
+ }
+ data[config]()
+ }
+ })
+ }
+
+ }
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * Data Api implementation
+ * ------------------------------------------------------------------------
+ */
+
+ $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
+ event.preventDefault()
+
+ const target = Collapse._getTargetFromElement(this)
+ const data = $(target).data(DATA_KEY)
+ const config = data ? 'toggle' : $(this).data()
+
+ Collapse._jQueryInterface.call($(target), config)
+ })
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * jQuery
+ * ------------------------------------------------------------------------
+ */
+
+ $.fn[NAME] = Collapse._jQueryInterface
+ $.fn[NAME].Constructor = Collapse
+ $.fn[NAME].noConflict = function () {
+ $.fn[NAME] = JQUERY_NO_CONFLICT
+ return Collapse._jQueryInterface
+ }
+
+ return Collapse
+
+})(jQuery)
+
+export default Collapse
diff --git a/templates/assets/bootstrap/js/src/dropdown.js b/templates/assets/bootstrap/js/src/dropdown.js
new file mode 100644
index 0000000..644273a
--- /dev/null
+++ b/templates/assets/bootstrap/js/src/dropdown.js
@@ -0,0 +1,307 @@
+import Util from './util'
+
+
+/**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v4.0.0-alpha.6): dropdown.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+const Dropdown = (($) => {
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+
+ const NAME = 'dropdown'
+ const VERSION = '4.0.0-alpha.6'
+ const DATA_KEY = 'bs.dropdown'
+ const EVENT_KEY = `.${DATA_KEY}`
+ const DATA_API_KEY = '.data-api'
+ const JQUERY_NO_CONFLICT = $.fn[NAME]
+ const ESCAPE_KEYCODE = 27 // KeyboardEvent.which value for Escape (Esc) key
+ const SPACE_KEYCODE = 32 // KeyboardEvent.which value for space key
+ const ARROW_UP_KEYCODE = 38 // KeyboardEvent.which value for up arrow key
+ const ARROW_DOWN_KEYCODE = 40 // KeyboardEvent.which value for down arrow key
+ const RIGHT_MOUSE_BUTTON_WHICH = 3 // MouseEvent.which value for the right button (assuming a right-handed mouse)
+ const REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEYCODE}|${ARROW_DOWN_KEYCODE}|${ESCAPE_KEYCODE}|${SPACE_KEYCODE}`)
+
+ const Event = {
+ HIDE : `hide${EVENT_KEY}`,
+ HIDDEN : `hidden${EVENT_KEY}`,
+ SHOW : `show${EVENT_KEY}`,
+ SHOWN : `shown${EVENT_KEY}`,
+ CLICK : `click${EVENT_KEY}`,
+ CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`,
+ FOCUSIN_DATA_API : `focusin${EVENT_KEY}${DATA_API_KEY}`,
+ KEYDOWN_DATA_API : `keydown${EVENT_KEY}${DATA_API_KEY}`
+ }
+
+ const ClassName = {
+ BACKDROP : 'dropdown-backdrop',
+ DISABLED : 'disabled',
+ SHOW : 'show'
+ }
+
+ const Selector = {
+ BACKDROP : '.dropdown-backdrop',
+ DATA_TOGGLE : '[data-toggle="dropdown"]',
+ FORM_CHILD : '.dropdown form',
+ ROLE_MENU : '[role="menu"]',
+ ROLE_LISTBOX : '[role="listbox"]',
+ NAVBAR_NAV : '.navbar-nav',
+ VISIBLE_ITEMS : '[role="menu"] li:not(.disabled) a, '
+ + '[role="listbox"] li:not(.disabled) a'
+ }
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+
+ class Dropdown {
+
+ constructor(element) {
+ this._element = element
+
+ this._addEventListeners()
+ }
+
+
+ // getters
+
+ static get VERSION() {
+ return VERSION
+ }
+
+
+ // public
+
+ toggle() {
+ if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {
+ return false
+ }
+
+ const parent = Dropdown._getParentFromElement(this)
+ const isActive = $(parent).hasClass(ClassName.SHOW)
+
+ Dropdown._clearMenus()
+
+ if (isActive) {
+ return false
+ }
+
+ const relatedTarget = {
+ relatedTarget : this
+ }
+ const showEvent = $.Event(Event.SHOW, relatedTarget)
+
+ $(parent).trigger(showEvent)
+
+ if (showEvent.isDefaultPrevented()) {
+ return false
+ }
+
+ // set the backdrop only if the dropdown menu will be opened
+ if ('ontouchstart' in document.documentElement &&
+ !$(parent).closest(Selector.NAVBAR_NAV).length) {
+
+ // if mobile we use a backdrop because click events don't delegate
+ const dropdown = document.createElement('div')
+ dropdown.className = ClassName.BACKDROP
+ $(dropdown).insertBefore(this)
+ $(dropdown).on('click', Dropdown._clearMenus)
+ }
+
+ this.focus()
+ this.setAttribute('aria-expanded', true)
+
+ $(parent).toggleClass(ClassName.SHOW)
+ $(parent).trigger($.Event(Event.SHOWN, relatedTarget))
+
+ return false
+ }
+
+ dispose() {
+ $.removeData(this._element, DATA_KEY)
+ $(this._element).off(EVENT_KEY)
+ this._element = null
+ }
+
+
+ // private
+
+ _addEventListeners() {
+ $(this._element).on(Event.CLICK, this.toggle)
+ }
+
+
+ // static
+
+ static _jQueryInterface(config) {
+ return this.each(function () {
+ let data = $(this).data(DATA_KEY)
+
+ if (!data) {
+ data = new Dropdown(this)
+ $(this).data(DATA_KEY, data)
+ }
+
+ if (typeof config === 'string') {
+ if (data[config] === undefined) {
+ throw new Error(`No method named "${config}"`)
+ }
+ data[config].call(this)
+ }
+ })
+ }
+
+ static _clearMenus(event) {
+ if (event && event.which === RIGHT_MOUSE_BUTTON_WHICH) {
+ return
+ }
+
+ const toggles = $.makeArray($(Selector.DATA_TOGGLE))
+
+ for (let i = 0; i < toggles.length; i++) {
+ const parent = Dropdown._getParentFromElement(toggles[i])
+ const relatedTarget = {
+ relatedTarget : toggles[i]
+ }
+
+ if (!$(parent).hasClass(ClassName.SHOW)) {
+ continue
+ }
+
+ if (event && (event.type === 'click' &&
+ /input|textarea/i.test(event.target.tagName) || event.type === 'focusin')
+ && $.contains(parent, event.target)) {
+ continue
+ }
+
+ const hideEvent = $.Event(Event.HIDE, relatedTarget)
+ $(parent).trigger(hideEvent)
+ if (hideEvent.isDefaultPrevented()) {
+ continue
+ }
+
+ // remove backdrop only if the dropdown menu will be hidden
+ const backdrop = $(parent).find(Selector.BACKDROP)[0]
+ if (backdrop) {
+ backdrop.parentNode.removeChild(backdrop)
+ }
+
+ toggles[i].setAttribute('aria-expanded', 'false')
+
+ $(parent)
+ .removeClass(ClassName.SHOW)
+ .trigger($.Event(Event.HIDDEN, relatedTarget))
+ }
+ }
+
+ static _getParentFromElement(element) {
+ let parent
+ const selector = Util.getSelectorFromElement(element)
+
+ if (selector) {
+ parent = $(selector)[0]
+ }
+
+ return parent || element.parentNode
+ }
+
+ static _dataApiKeydownHandler(event) {
+ if (!REGEXP_KEYDOWN.test(event.which) ||
+ /input|textarea/i.test(event.target.tagName)) {
+ return
+ }
+
+ event.preventDefault()
+ event.stopPropagation()
+
+ if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {
+ return
+ }
+
+ const parent = Dropdown._getParentFromElement(this)
+ const isActive = $(parent).hasClass(ClassName.SHOW)
+
+ if (!isActive && event.which !== ESCAPE_KEYCODE ||
+ isActive && event.which === ESCAPE_KEYCODE) {
+
+ if (event.which === ESCAPE_KEYCODE) {
+ const toggle = $(parent).find(Selector.DATA_TOGGLE)[0]
+ $(toggle).trigger('focus')
+ }
+
+ $(this).trigger('click')
+ return
+ }
+
+ const items = $(parent).find(Selector.VISIBLE_ITEMS).get()
+
+ if (!items.length) {
+ return
+ }
+
+ let index = items.indexOf(event.target)
+
+ if (event.which === ARROW_UP_KEYCODE && index > 0) { // up
+ index--
+ }
+
+ if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) { // down
+ index++
+ }
+
+ if (index < 0) {
+ index = 0
+ }
+
+ items[index].focus()
+ }
+
+ }
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * Data Api implementation
+ * ------------------------------------------------------------------------
+ */
+
+ $(document)
+ .on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler)
+ .on(Event.KEYDOWN_DATA_API, Selector.ROLE_MENU, Dropdown._dataApiKeydownHandler)
+ .on(Event.KEYDOWN_DATA_API, Selector.ROLE_LISTBOX, Dropdown._dataApiKeydownHandler)
+ .on(`${Event.CLICK_DATA_API} ${Event.FOCUSIN_DATA_API}`, Dropdown._clearMenus)
+ .on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, Dropdown.prototype.toggle)
+ .on(Event.CLICK_DATA_API, Selector.FORM_CHILD, (e) => {
+ e.stopPropagation()
+ })
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * jQuery
+ * ------------------------------------------------------------------------
+ */
+
+ $.fn[NAME] = Dropdown._jQueryInterface
+ $.fn[NAME].Constructor = Dropdown
+ $.fn[NAME].noConflict = function () {
+ $.fn[NAME] = JQUERY_NO_CONFLICT
+ return Dropdown._jQueryInterface
+ }
+
+ return Dropdown
+
+})(jQuery)
+
+export default Dropdown
diff --git a/templates/assets/bootstrap/js/src/modal.js b/templates/assets/bootstrap/js/src/modal.js
new file mode 100644
index 0000000..9263efd
--- /dev/null
+++ b/templates/assets/bootstrap/js/src/modal.js
@@ -0,0 +1,545 @@
+import Util from './util'
+
+
+/**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v4.0.0-alpha.6): modal.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+const Modal = (($) => {
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+
+ const NAME = 'modal'
+ const VERSION = '4.0.0-alpha.6'
+ const DATA_KEY = 'bs.modal'
+ const EVENT_KEY = `.${DATA_KEY}`
+ const DATA_API_KEY = '.data-api'
+ const JQUERY_NO_CONFLICT = $.fn[NAME]
+ const TRANSITION_DURATION = 300
+ const BACKDROP_TRANSITION_DURATION = 150
+ const ESCAPE_KEYCODE = 27 // KeyboardEvent.which value for Escape (Esc) key
+
+ const Default = {
+ backdrop : true,
+ keyboard : true,
+ focus : true,
+ show : true
+ }
+
+ const DefaultType = {
+ backdrop : '(boolean|string)',
+ keyboard : 'boolean',
+ focus : 'boolean',
+ show : 'boolean'
+ }
+
+ const Event = {
+ HIDE : `hide${EVENT_KEY}`,
+ HIDDEN : `hidden${EVENT_KEY}`,
+ SHOW : `show${EVENT_KEY}`,
+ SHOWN : `shown${EVENT_KEY}`,
+ FOCUSIN : `focusin${EVENT_KEY}`,
+ RESIZE : `resize${EVENT_KEY}`,
+ CLICK_DISMISS : `click.dismiss${EVENT_KEY}`,
+ KEYDOWN_DISMISS : `keydown.dismiss${EVENT_KEY}`,
+ MOUSEUP_DISMISS : `mouseup.dismiss${EVENT_KEY}`,
+ MOUSEDOWN_DISMISS : `mousedown.dismiss${EVENT_KEY}`,
+ CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`
+ }
+
+ const ClassName = {
+ SCROLLBAR_MEASURER : 'modal-scrollbar-measure',
+ BACKDROP : 'modal-backdrop',
+ OPEN : 'modal-open',
+ FADE : 'fade',
+ SHOW : 'show'
+ }
+
+ const Selector = {
+ DIALOG : '.modal-dialog',
+ DATA_TOGGLE : '[data-toggle="modal"]',
+ DATA_DISMISS : '[data-dismiss="modal"]',
+ FIXED_CONTENT : '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top'
+ }
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+
+ class Modal {
+
+ constructor(element, config) {
+ this._config = this._getConfig(config)
+ this._element = element
+ this._dialog = $(element).find(Selector.DIALOG)[0]
+ this._backdrop = null
+ this._isShown = false
+ this._isBodyOverflowing = false
+ this._ignoreBackdropClick = false
+ this._isTransitioning = false
+ this._originalBodyPadding = 0
+ this._scrollbarWidth = 0
+ }
+
+
+ // getters
+
+ static get VERSION() {
+ return VERSION
+ }
+
+ static get Default() {
+ return Default
+ }
+
+
+ // public
+
+ toggle(relatedTarget) {
+ return this._isShown ? this.hide() : this.show(relatedTarget)
+ }
+
+ show(relatedTarget) {
+ if (this._isTransitioning) {
+ throw new Error('Modal is transitioning')
+ }
+
+ if (Util.supportsTransitionEnd() &&
+ $(this._element).hasClass(ClassName.FADE)) {
+ this._isTransitioning = true
+ }
+ const showEvent = $.Event(Event.SHOW, {
+ relatedTarget
+ })
+
+ $(this._element).trigger(showEvent)
+
+ if (this._isShown || showEvent.isDefaultPrevented()) {
+ return
+ }
+
+ this._isShown = true
+
+ this._checkScrollbar()
+ this._setScrollbar()
+
+ $(document.body).addClass(ClassName.OPEN)
+
+ this._setEscapeEvent()
+ this._setResizeEvent()
+
+ $(this._element).on(
+ Event.CLICK_DISMISS,
+ Selector.DATA_DISMISS,
+ (event) => this.hide(event)
+ )
+
+ $(this._dialog).on(Event.MOUSEDOWN_DISMISS, () => {
+ $(this._element).one(Event.MOUSEUP_DISMISS, (event) => {
+ if ($(event.target).is(this._element)) {
+ this._ignoreBackdropClick = true
+ }
+ })
+ })
+
+ this._showBackdrop(() => this._showElement(relatedTarget))
+ }
+
+ hide(event) {
+ if (event) {
+ event.preventDefault()
+ }
+
+ if (this._isTransitioning) {
+ throw new Error('Modal is transitioning')
+ }
+
+ const transition = Util.supportsTransitionEnd() &&
+ $(this._element).hasClass(ClassName.FADE)
+ if (transition) {
+ this._isTransitioning = true
+ }
+
+ const hideEvent = $.Event(Event.HIDE)
+ $(this._element).trigger(hideEvent)
+
+ if (!this._isShown || hideEvent.isDefaultPrevented()) {
+ return
+ }
+
+ this._isShown = false
+
+ this._setEscapeEvent()
+ this._setResizeEvent()
+
+ $(document).off(Event.FOCUSIN)
+
+ $(this._element).removeClass(ClassName.SHOW)
+
+ $(this._element).off(Event.CLICK_DISMISS)
+ $(this._dialog).off(Event.MOUSEDOWN_DISMISS)
+
+ if (transition) {
+ $(this._element)
+ .one(Util.TRANSITION_END, (event) => this._hideModal(event))
+ .emulateTransitionEnd(TRANSITION_DURATION)
+ } else {
+ this._hideModal()
+ }
+ }
+
+ dispose() {
+ $.removeData(this._element, DATA_KEY)
+
+ $(window, document, this._element, this._backdrop).off(EVENT_KEY)
+
+ this._config = null
+ this._element = null
+ this._dialog = null
+ this._backdrop = null
+ this._isShown = null
+ this._isBodyOverflowing = null
+ this._ignoreBackdropClick = null
+ this._originalBodyPadding = null
+ this._scrollbarWidth = null
+ }
+
+
+ // private
+
+ _getConfig(config) {
+ config = $.extend({}, Default, config)
+ Util.typeCheckConfig(NAME, config, DefaultType)
+ return config
+ }
+
+ _showElement(relatedTarget) {
+ const transition = Util.supportsTransitionEnd() &&
+ $(this._element).hasClass(ClassName.FADE)
+
+ if (!this._element.parentNode ||
+ this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
+ // don't move modals dom position
+ document.body.appendChild(this._element)
+ }
+
+ this._element.style.display = 'block'
+ this._element.removeAttribute('aria-hidden')
+ this._element.scrollTop = 0
+
+ if (transition) {
+ Util.reflow(this._element)
+ }
+
+ $(this._element).addClass(ClassName.SHOW)
+
+ if (this._config.focus) {
+ this._enforceFocus()
+ }
+
+ const shownEvent = $.Event(Event.SHOWN, {
+ relatedTarget
+ })
+
+ const transitionComplete = () => {
+ if (this._config.focus) {
+ this._element.focus()
+ }
+ this._isTransitioning = false
+ $(this._element).trigger(shownEvent)
+ }
+
+ if (transition) {
+ $(this._dialog)
+ .one(Util.TRANSITION_END, transitionComplete)
+ .emulateTransitionEnd(TRANSITION_DURATION)
+ } else {
+ transitionComplete()
+ }
+ }
+
+ _enforceFocus() {
+ $(document)
+ .off(Event.FOCUSIN) // guard against infinite focus loop
+ .on(Event.FOCUSIN, (event) => {
+ if (document !== event.target &&
+ this._element !== event.target &&
+ !$(this._element).has(event.target).length) {
+ this._element.focus()
+ }
+ })
+ }
+
+ _setEscapeEvent() {
+ if (this._isShown && this._config.keyboard) {
+ $(this._element).on(Event.KEYDOWN_DISMISS, (event) => {
+ if (event.which === ESCAPE_KEYCODE) {
+ this.hide()
+ }
+ })
+
+ } else if (!this._isShown) {
+ $(this._element).off(Event.KEYDOWN_DISMISS)
+ }
+ }
+
+ _setResizeEvent() {
+ if (this._isShown) {
+ $(window).on(Event.RESIZE, (event) => this._handleUpdate(event))
+ } else {
+ $(window).off(Event.RESIZE)
+ }
+ }
+
+ _hideModal() {
+ this._element.style.display = 'none'
+ this._element.setAttribute('aria-hidden', 'true')
+ this._isTransitioning = false
+ this._showBackdrop(() => {
+ $(document.body).removeClass(ClassName.OPEN)
+ this._resetAdjustments()
+ this._resetScrollbar()
+ $(this._element).trigger(Event.HIDDEN)
+ })
+ }
+
+ _removeBackdrop() {
+ if (this._backdrop) {
+ $(this._backdrop).remove()
+ this._backdrop = null
+ }
+ }
+
+ _showBackdrop(callback) {
+ const animate = $(this._element).hasClass(ClassName.FADE) ?
+ ClassName.FADE : ''
+
+ if (this._isShown && this._config.backdrop) {
+ const doAnimate = Util.supportsTransitionEnd() && animate
+
+ this._backdrop = document.createElement('div')
+ this._backdrop.className = ClassName.BACKDROP
+
+ if (animate) {
+ $(this._backdrop).addClass(animate)
+ }
+
+ $(this._backdrop).appendTo(document.body)
+
+ $(this._element).on(Event.CLICK_DISMISS, (event) => {
+ if (this._ignoreBackdropClick) {
+ this._ignoreBackdropClick = false
+ return
+ }
+ if (event.target !== event.currentTarget) {
+ return
+ }
+ if (this._config.backdrop === 'static') {
+ this._element.focus()
+ } else {
+ this.hide()
+ }
+ })
+
+ if (doAnimate) {
+ Util.reflow(this._backdrop)
+ }
+
+ $(this._backdrop).addClass(ClassName.SHOW)
+
+ if (!callback) {
+ return
+ }
+
+ if (!doAnimate) {
+ callback()
+ return
+ }
+
+ $(this._backdrop)
+ .one(Util.TRANSITION_END, callback)
+ .emulateTransitionEnd(BACKDROP_TRANSITION_DURATION)
+
+ } else if (!this._isShown && this._backdrop) {
+ $(this._backdrop).removeClass(ClassName.SHOW)
+
+ const callbackRemove = () => {
+ this._removeBackdrop()
+ if (callback) {
+ callback()
+ }
+ }
+
+ if (Util.supportsTransitionEnd() &&
+ $(this._element).hasClass(ClassName.FADE)) {
+ $(this._backdrop)
+ .one(Util.TRANSITION_END, callbackRemove)
+ .emulateTransitionEnd(BACKDROP_TRANSITION_DURATION)
+ } else {
+ callbackRemove()
+ }
+
+ } else if (callback) {
+ callback()
+ }
+ }
+
+
+ // ----------------------------------------------------------------------
+ // the following methods are used to handle overflowing modals
+ // todo (fat): these should probably be refactored out of modal.js
+ // ----------------------------------------------------------------------
+
+ _handleUpdate() {
+ this._adjustDialog()
+ }
+
+ _adjustDialog() {
+ const isModalOverflowing =
+ this._element.scrollHeight > document.documentElement.clientHeight
+
+ if (!this._isBodyOverflowing && isModalOverflowing) {
+ this._element.style.paddingLeft = `${this._scrollbarWidth}px`
+ }
+
+ if (this._isBodyOverflowing && !isModalOverflowing) {
+ this._element.style.paddingRight = `${this._scrollbarWidth}px`
+ }
+ }
+
+ _resetAdjustments() {
+ this._element.style.paddingLeft = ''
+ this._element.style.paddingRight = ''
+ }
+
+ _checkScrollbar() {
+ this._isBodyOverflowing = document.body.clientWidth < window.innerWidth
+ this._scrollbarWidth = this._getScrollbarWidth()
+ }
+
+ _setScrollbar() {
+ const bodyPadding = parseInt(
+ $(Selector.FIXED_CONTENT).css('padding-right') || 0,
+ 10
+ )
+
+ this._originalBodyPadding = document.body.style.paddingRight || ''
+
+ if (this._isBodyOverflowing) {
+ document.body.style.paddingRight =
+ `${bodyPadding + this._scrollbarWidth}px`
+ }
+ }
+
+ _resetScrollbar() {
+ document.body.style.paddingRight = this._originalBodyPadding
+ }
+
+ _getScrollbarWidth() { // thx d.walsh
+ const scrollDiv = document.createElement('div')
+ scrollDiv.className = ClassName.SCROLLBAR_MEASURER
+ document.body.appendChild(scrollDiv)
+ const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth
+ document.body.removeChild(scrollDiv)
+ return scrollbarWidth
+ }
+
+
+ // static
+
+ static _jQueryInterface(config, relatedTarget) {
+ return this.each(function () {
+ let data = $(this).data(DATA_KEY)
+ const _config = $.extend(
+ {},
+ Modal.Default,
+ $(this).data(),
+ typeof config === 'object' && config
+ )
+
+ if (!data) {
+ data = new Modal(this, _config)
+ $(this).data(DATA_KEY, data)
+ }
+
+ if (typeof config === 'string') {
+ if (data[config] === undefined) {
+ throw new Error(`No method named "${config}"`)
+ }
+ data[config](relatedTarget)
+ } else if (_config.show) {
+ data.show(relatedTarget)
+ }
+ })
+ }
+
+ }
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * Data Api implementation
+ * ------------------------------------------------------------------------
+ */
+
+ $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
+ let target
+ const selector = Util.getSelectorFromElement(this)
+
+ if (selector) {
+ target = $(selector)[0]
+ }
+
+ const config = $(target).data(DATA_KEY) ?
+ 'toggle' : $.extend({}, $(target).data(), $(this).data())
+
+ if (this.tagName === 'A' || this.tagName === 'AREA') {
+ event.preventDefault()
+ }
+
+ const $target = $(target).one(Event.SHOW, (showEvent) => {
+ if (showEvent.isDefaultPrevented()) {
+ // only register focus restorer if modal will actually get shown
+ return
+ }
+
+ $target.one(Event.HIDDEN, () => {
+ if ($(this).is(':visible')) {
+ this.focus()
+ }
+ })
+ })
+
+ Modal._jQueryInterface.call($(target), config, this)
+ })
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * jQuery
+ * ------------------------------------------------------------------------
+ */
+
+ $.fn[NAME] = Modal._jQueryInterface
+ $.fn[NAME].Constructor = Modal
+ $.fn[NAME].noConflict = function () {
+ $.fn[NAME] = JQUERY_NO_CONFLICT
+ return Modal._jQueryInterface
+ }
+
+ return Modal
+
+})(jQuery)
+
+export default Modal
diff --git a/templates/assets/bootstrap/js/src/popover.js b/templates/assets/bootstrap/js/src/popover.js
new file mode 100644
index 0000000..b68b479
--- /dev/null
+++ b/templates/assets/bootstrap/js/src/popover.js
@@ -0,0 +1,179 @@
+import Tooltip from './tooltip'
+
+
+/**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v4.0.0-alpha.6): popover.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+const Popover = (($) => {
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+
+ const NAME = 'popover'
+ const VERSION = '4.0.0-alpha.6'
+ const DATA_KEY = 'bs.popover'
+ const EVENT_KEY = `.${DATA_KEY}`
+ const JQUERY_NO_CONFLICT = $.fn[NAME]
+
+ const Default = $.extend({}, Tooltip.Default, {
+ placement : 'right',
+ trigger : 'click',
+ content : '',
+ template : '<div class="popover" role="tooltip">'
+ + '<h3 class="popover-title"></h3>'
+ + '<div class="popover-content"></div></div>'
+ })
+
+ const DefaultType = $.extend({}, Tooltip.DefaultType, {
+ content : '(string|element|function)'
+ })
+
+ const ClassName = {
+ FADE : 'fade',
+ SHOW : 'show'
+ }
+
+ const Selector = {
+ TITLE : '.popover-title',
+ CONTENT : '.popover-content'
+ }
+
+ const Event = {
+ HIDE : `hide${EVENT_KEY}`,
+ HIDDEN : `hidden${EVENT_KEY}`,
+ SHOW : `show${EVENT_KEY}`,
+ SHOWN : `shown${EVENT_KEY}`,
+ INSERTED : `inserted${EVENT_KEY}`,
+ CLICK : `click${EVENT_KEY}`,
+ FOCUSIN : `focusin${EVENT_KEY}`,
+ FOCUSOUT : `focusout${EVENT_KEY}`,
+ MOUSEENTER : `mouseenter${EVENT_KEY}`,
+ MOUSELEAVE : `mouseleave${EVENT_KEY}`
+ }
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+
+ class Popover extends Tooltip {
+
+
+ // getters
+
+ static get VERSION() {
+ return VERSION
+ }
+
+ static get Default() {
+ return Default
+ }
+
+ static get NAME() {
+ return NAME
+ }
+
+ static get DATA_KEY() {
+ return DATA_KEY
+ }
+
+ static get Event() {
+ return Event
+ }
+
+ static get EVENT_KEY() {
+ return EVENT_KEY
+ }
+
+ static get DefaultType() {
+ return DefaultType
+ }
+
+
+ // overrides
+
+ isWithContent() {
+ return this.getTitle() || this._getContent()
+ }
+
+ getTipElement() {
+ return this.tip = this.tip || $(this.config.template)[0]
+ }
+
+ setContent() {
+ const $tip = $(this.getTipElement())
+
+ // we use append for html objects to maintain js events
+ this.setElementContent($tip.find(Selector.TITLE), this.getTitle())
+ this.setElementContent($tip.find(Selector.CONTENT), this._getContent())
+
+ $tip.removeClass(`${ClassName.FADE} ${ClassName.SHOW}`)
+
+ this.cleanupTether()
+ }
+
+ // private
+
+ _getContent() {
+ return this.element.getAttribute('data-content')
+ || (typeof this.config.content === 'function' ?
+ this.config.content.call(this.element) :
+ this.config.content)
+ }
+
+
+ // static
+
+ static _jQueryInterface(config) {
+ return this.each(function () {
+ let data = $(this).data(DATA_KEY)
+ const _config = typeof config === 'object' ? config : null
+
+ if (!data && /destroy|hide/.test(config)) {
+ return
+ }
+
+ if (!data) {
+ data = new Popover(this, _config)
+ $(this).data(DATA_KEY, data)
+ }
+
+ if (typeof config === 'string') {
+ if (data[config] === undefined) {
+ throw new Error(`No method named "${config}"`)
+ }
+ data[config]()
+ }
+ })
+ }
+ }
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * jQuery
+ * ------------------------------------------------------------------------
+ */
+
+ $.fn[NAME] = Popover._jQueryInterface
+ $.fn[NAME].Constructor = Popover
+ $.fn[NAME].noConflict = function () {
+ $.fn[NAME] = JQUERY_NO_CONFLICT
+ return Popover._jQueryInterface
+ }
+
+ return Popover
+
+})(jQuery)
+
+export default Popover
diff --git a/templates/assets/bootstrap/js/src/scrollspy.js b/templates/assets/bootstrap/js/src/scrollspy.js
new file mode 100644
index 0000000..15541b8
--- /dev/null
+++ b/templates/assets/bootstrap/js/src/scrollspy.js
@@ -0,0 +1,335 @@
+import Util from './util'
+
+
+/**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v4.0.0-alpha.6): scrollspy.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+const ScrollSpy = (($) => {
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+
+ const NAME = 'scrollspy'
+ const VERSION = '4.0.0-alpha.6'
+ const DATA_KEY = 'bs.scrollspy'
+ const EVENT_KEY = `.${DATA_KEY}`
+ const DATA_API_KEY = '.data-api'
+ const JQUERY_NO_CONFLICT = $.fn[NAME]
+
+ const Default = {
+ offset : 10,
+ method : 'auto',
+ target : ''
+ }
+
+ const DefaultType = {
+ offset : 'number',
+ method : 'string',
+ target : '(string|element)'
+ }
+
+ const Event = {
+ ACTIVATE : `activate${EVENT_KEY}`,
+ SCROLL : `scroll${EVENT_KEY}`,
+ LOAD_DATA_API : `load${EVENT_KEY}${DATA_API_KEY}`
+ }
+
+ const ClassName = {
+ DROPDOWN_ITEM : 'dropdown-item',
+ DROPDOWN_MENU : 'dropdown-menu',
+ NAV_LINK : 'nav-link',
+ NAV : 'nav',
+ ACTIVE : 'active'
+ }
+
+ const Selector = {
+ DATA_SPY : '[data-spy="scroll"]',
+ ACTIVE : '.active',
+ LIST_ITEM : '.list-item',
+ LI : 'li',
+ LI_DROPDOWN : 'li.dropdown',
+ NAV_LINKS : '.nav-link',
+ DROPDOWN : '.dropdown',
+ DROPDOWN_ITEMS : '.dropdown-item',
+ DROPDOWN_TOGGLE : '.dropdown-toggle'
+ }
+
+ const OffsetMethod = {
+ OFFSET : 'offset',
+ POSITION : 'position'
+ }
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+
+ class ScrollSpy {
+
+ constructor(element, config) {
+ this._element = element
+ this._scrollElement = element.tagName === 'BODY' ? window : element
+ this._config = this._getConfig(config)
+ this._selector = `${this._config.target} ${Selector.NAV_LINKS},`
+ + `${this._config.target} ${Selector.DROPDOWN_ITEMS}`
+ this._offsets = []
+ this._targets = []
+ this._activeTarget = null
+ this._scrollHeight = 0
+
+ $(this._scrollElement).on(Event.SCROLL, (event) => this._process(event))
+
+ this.refresh()
+ this._process()
+ }
+
+
+ // getters
+
+ static get VERSION() {
+ return VERSION
+ }
+
+ static get Default() {
+ return Default
+ }
+
+
+ // public
+
+ refresh() {
+ const autoMethod = this._scrollElement !== this._scrollElement.window ?
+ OffsetMethod.POSITION : OffsetMethod.OFFSET
+
+ const offsetMethod = this._config.method === 'auto' ?
+ autoMethod : this._config.method
+
+ const offsetBase = offsetMethod === OffsetMethod.POSITION ?
+ this._getScrollTop() : 0
+
+ this._offsets = []
+ this._targets = []
+
+ this._scrollHeight = this._getScrollHeight()
+
+ const targets = $.makeArray($(this._selector))
+
+ targets
+ .map((element) => {
+ let target
+ const targetSelector = Util.getSelectorFromElement(element)
+
+ if (targetSelector) {
+ target = $(targetSelector)[0]
+ }
+
+ if (target) {
+ const targetBCR = target.getBoundingClientRect()
+ if (targetBCR.width || targetBCR.height) {
+ // todo (fat): remove sketch reliance on jQuery position/offset
+ return [
+ $(target)[offsetMethod]().top + offsetBase,
+ targetSelector
+ ]
+ }
+ }
+ return null
+ })
+ .filter((item) => item)
+ .sort((a, b) => a[0] - b[0])
+ .forEach((item) => {
+ this._offsets.push(item[0])
+ this._targets.push(item[1])
+ })
+ }
+
+ dispose() {
+ $.removeData(this._element, DATA_KEY)
+ $(this._scrollElement).off(EVENT_KEY)
+
+ this._element = null
+ this._scrollElement = null
+ this._config = null
+ this._selector = null
+ this._offsets = null
+ this._targets = null
+ this._activeTarget = null
+ this._scrollHeight = null
+ }
+
+
+ // private
+
+ _getConfig(config) {
+ config = $.extend({}, Default, config)
+
+ if (typeof config.target !== 'string') {
+ let id = $(config.target).attr('id')
+ if (!id) {
+ id = Util.getUID(NAME)
+ $(config.target).attr('id', id)
+ }
+ config.target = `#${id}`
+ }
+
+ Util.typeCheckConfig(NAME, config, DefaultType)
+
+ return config
+ }
+
+ _getScrollTop() {
+ return this._scrollElement === window ?
+ this._scrollElement.pageYOffset : this._scrollElement.scrollTop
+ }
+
+ _getScrollHeight() {
+ return this._scrollElement.scrollHeight || Math.max(
+ document.body.scrollHeight,
+ document.documentElement.scrollHeight
+ )
+ }
+
+ _getOffsetHeight() {
+ return this._scrollElement === window ?
+ window.innerHeight : this._scrollElement.getBoundingClientRect().height
+ }
+
+ _process() {
+ const scrollTop = this._getScrollTop() + this._config.offset
+ const scrollHeight = this._getScrollHeight()
+ const maxScroll = this._config.offset
+ + scrollHeight
+ - this._getOffsetHeight()
+
+ if (this._scrollHeight !== scrollHeight) {
+ this.refresh()
+ }
+
+ if (scrollTop >= maxScroll) {
+ const target = this._targets[this._targets.length - 1]
+
+ if (this._activeTarget !== target) {
+ this._activate(target)
+ }
+ return
+ }
+
+ if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {
+ this._activeTarget = null
+ this._clear()
+ return
+ }
+
+ for (let i = this._offsets.length; i--;) {
+ const isActiveTarget = this._activeTarget !== this._targets[i]
+ && scrollTop >= this._offsets[i]
+ && (this._offsets[i + 1] === undefined ||
+ scrollTop < this._offsets[i + 1])
+
+ if (isActiveTarget) {
+ this._activate(this._targets[i])
+ }
+ }
+ }
+
+ _activate(target) {
+ this._activeTarget = target
+
+ this._clear()
+
+ let queries = this._selector.split(',')
+ queries = queries.map((selector) => {
+ return `${selector}[data-target="${target}"],` +
+ `${selector}[href="${target}"]`
+ })
+
+ const $link = $(queries.join(','))
+
+ if ($link.hasClass(ClassName.DROPDOWN_ITEM)) {
+ $link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE)
+ $link.addClass(ClassName.ACTIVE)
+ } else {
+ // todo (fat) this is kinda sus...
+ // recursively add actives to tested nav-links
+ $link.parents(Selector.LI).find(`> ${Selector.NAV_LINKS}`).addClass(ClassName.ACTIVE)
+ }
+
+ $(this._scrollElement).trigger(Event.ACTIVATE, {
+ relatedTarget: target
+ })
+ }
+
+ _clear() {
+ $(this._selector).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE)
+ }
+
+
+ // static
+
+ static _jQueryInterface(config) {
+ return this.each(function () {
+ let data = $(this).data(DATA_KEY)
+ const _config = typeof config === 'object' && config
+
+ if (!data) {
+ data = new ScrollSpy(this, _config)
+ $(this).data(DATA_KEY, data)
+ }
+
+ if (typeof config === 'string') {
+ if (data[config] === undefined) {
+ throw new Error(`No method named "${config}"`)
+ }
+ data[config]()
+ }
+ })
+ }
+
+
+ }
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * Data Api implementation
+ * ------------------------------------------------------------------------
+ */
+
+ $(window).on(Event.LOAD_DATA_API, () => {
+ const scrollSpys = $.makeArray($(Selector.DATA_SPY))
+
+ for (let i = scrollSpys.length; i--;) {
+ const $spy = $(scrollSpys[i])
+ ScrollSpy._jQueryInterface.call($spy, $spy.data())
+ }
+ })
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * jQuery
+ * ------------------------------------------------------------------------
+ */
+
+ $.fn[NAME] = ScrollSpy._jQueryInterface
+ $.fn[NAME].Constructor = ScrollSpy
+ $.fn[NAME].noConflict = function () {
+ $.fn[NAME] = JQUERY_NO_CONFLICT
+ return ScrollSpy._jQueryInterface
+ }
+
+ return ScrollSpy
+
+})(jQuery)
+
+export default ScrollSpy
diff --git a/templates/assets/bootstrap/js/src/tab.js b/templates/assets/bootstrap/js/src/tab.js
new file mode 100644
index 0000000..d5669b7
--- /dev/null
+++ b/templates/assets/bootstrap/js/src/tab.js
@@ -0,0 +1,284 @@
+import Util from './util'
+
+
+/**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v4.0.0-alpha.6): tab.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+const Tab = (($) => {
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+
+ const NAME = 'tab'
+ const VERSION = '4.0.0-alpha.6'
+ const DATA_KEY = 'bs.tab'
+ const EVENT_KEY = `.${DATA_KEY}`
+ const DATA_API_KEY = '.data-api'
+ const JQUERY_NO_CONFLICT = $.fn[NAME]
+ const TRANSITION_DURATION = 150
+
+ const Event = {
+ HIDE : `hide${EVENT_KEY}`,
+ HIDDEN : `hidden${EVENT_KEY}`,
+ SHOW : `show${EVENT_KEY}`,
+ SHOWN : `shown${EVENT_KEY}`,
+ CLICK_DATA_API : `click${EVENT_KEY}${DATA_API_KEY}`
+ }
+
+ const ClassName = {
+ DROPDOWN_MENU : 'dropdown-menu',
+ ACTIVE : 'active',
+ DISABLED : 'disabled',
+ FADE : 'fade',
+ SHOW : 'show'
+ }
+
+ const Selector = {
+ A : 'a',
+ LI : 'li',
+ DROPDOWN : '.dropdown',
+ LIST : 'ul:not(.dropdown-menu), ol:not(.dropdown-menu), nav:not(.dropdown-menu), .list-group:not(.dropdown-menu)',
+ FADE_CHILD : '> .nav-item .fade, > .list-group-item .fade, > .fade',
+ ACTIVE : '.active',
+ ACTIVE_CHILD : '> .nav-item > .active, > .list-group-item > .active, > .active',
+ DATA_TOGGLE : '[data-toggle="tab"], [data-toggle="pill"]',
+ DROPDOWN_TOGGLE : '.dropdown-toggle',
+ DROPDOWN_ACTIVE_CHILD : '> .dropdown-menu .active'
+ }
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+
+ class Tab {
+
+ constructor(element) {
+ this._element = element
+ }
+
+
+ // getters
+
+ static get VERSION() {
+ return VERSION
+ }
+
+
+ // public
+
+ show() {
+ if (this._element.parentNode &&
+ this._element.parentNode.nodeType === Node.ELEMENT_NODE &&
+ $(this._element).hasClass(ClassName.ACTIVE) ||
+ $(this._element).hasClass(ClassName.DISABLED)) {
+ return
+ }
+
+ let target
+ let previous
+ const listElement = $(this._element).closest(Selector.LIST)[0]
+ const selector = Util.getSelectorFromElement(this._element)
+
+ if (listElement) {
+ previous = $.makeArray($(listElement).find(Selector.ACTIVE))
+ previous = previous[previous.length - 1]
+ }
+
+ const hideEvent = $.Event(Event.HIDE, {
+ relatedTarget: this._element
+ })
+
+ const showEvent = $.Event(Event.SHOW, {
+ relatedTarget: previous
+ })
+
+ if (previous) {
+ $(previous).trigger(hideEvent)
+ }
+
+ $(this._element).trigger(showEvent)
+
+ if (showEvent.isDefaultPrevented() ||
+ hideEvent.isDefaultPrevented()) {
+ return
+ }
+
+ if (selector) {
+ target = $(selector)[0]
+ }
+
+ this._activate(
+ this._element,
+ listElement
+ )
+
+ const complete = () => {
+ const hiddenEvent = $.Event(Event.HIDDEN, {
+ relatedTarget: this._element
+ })
+
+ const shownEvent = $.Event(Event.SHOWN, {
+ relatedTarget: previous
+ })
+
+ $(previous).trigger(hiddenEvent)
+ $(this._element).trigger(shownEvent)
+ }
+
+ if (target) {
+ this._activate(target, target.parentNode, complete)
+ } else {
+ complete()
+ }
+ }
+
+ dispose() {
+ $.removeClass(this._element, DATA_KEY)
+ this._element = null
+ }
+
+
+ // private
+
+ _activate(element, container, callback) {
+ const active = $(container).find(Selector.ACTIVE_CHILD)[0]
+ const isTransitioning = callback
+ && Util.supportsTransitionEnd()
+ && (active && $(active).hasClass(ClassName.FADE)
+ || Boolean($(container).find(Selector.FADE_CHILD)[0]))
+
+ const complete = () => this._transitionComplete(
+ element,
+ active,
+ isTransitioning,
+ callback
+ )
+
+ if (active && isTransitioning) {
+ $(active)
+ .one(Util.TRANSITION_END, complete)
+ .emulateTransitionEnd(TRANSITION_DURATION)
+
+ } else {
+ complete()
+ }
+
+ if (active) {
+ $(active).removeClass(ClassName.SHOW)
+ }
+ }
+
+ _transitionComplete(element, active, isTransitioning, callback) {
+ if (active) {
+ $(active).removeClass(ClassName.ACTIVE)
+ if ($(active).hasClass('list-group-item')) {
+ $(active).find('a.nav-link').removeClass(ClassName.ACTIVE)
+ }
+
+ const dropdownChild = $(active.parentNode).find(
+ Selector.DROPDOWN_ACTIVE_CHILD
+ )[0]
+
+ if (dropdownChild) {
+ $(dropdownChild).removeClass(ClassName.ACTIVE)
+ }
+
+ active.setAttribute('aria-expanded', false)
+ }
+
+ $(element).addClass(ClassName.ACTIVE)
+ if ($(element.parentNode).hasClass('list-group-item')) {
+ $(element.parentNode).addClass(ClassName.ACTIVE)
+ }
+ element.setAttribute('aria-expanded', true)
+
+ if (isTransitioning) {
+ Util.reflow(element)
+ $(element).addClass(ClassName.SHOW)
+ } else {
+ $(element).removeClass(ClassName.FADE)
+ }
+
+ if (element.parentNode &&
+ $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {
+
+ const dropdownElement = $(element).closest(Selector.DROPDOWN)[0]
+ if (dropdownElement) {
+ $(dropdownElement).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE)
+ }
+
+ element.setAttribute('aria-expanded', true)
+ }
+
+ if (callback) {
+ callback()
+ }
+ }
+
+
+ // static
+
+ static _jQueryInterface(config) {
+ return this.each(function () {
+ const $this = $(this)
+ let data = $this.data(DATA_KEY)
+
+ if (!data) {
+ data = new Tab(this)
+ $this.data(DATA_KEY, data)
+ }
+
+ if (typeof config === 'string') {
+ if (data[config] === undefined) {
+ throw new Error(`No method named "${config}"`)
+ }
+ data[config]()
+ }
+ })
+ }
+
+ }
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * Data Api implementation
+ * ------------------------------------------------------------------------
+ */
+
+ $(document)
+ .on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
+ event.preventDefault()
+ Tab._jQueryInterface.call($(this), 'show')
+ })
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * jQuery
+ * ------------------------------------------------------------------------
+ */
+
+ $.fn[NAME] = Tab._jQueryInterface
+ $.fn[NAME].Constructor = Tab
+ $.fn[NAME].noConflict = function () {
+ $.fn[NAME] = JQUERY_NO_CONFLICT
+ return Tab._jQueryInterface
+ }
+
+ return Tab
+
+})(jQuery)
+
+export default Tab
diff --git a/templates/assets/bootstrap/js/src/tooltip.js b/templates/assets/bootstrap/js/src/tooltip.js
new file mode 100644
index 0000000..e750dce
--- /dev/null
+++ b/templates/assets/bootstrap/js/src/tooltip.js
@@ -0,0 +1,675 @@
+/* global Tether */
+
+import Util from './util'
+
+
+/**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v4.0.0-alpha.6): tooltip.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+const Tooltip = (($) => {
+
+ /**
+ * Check for Tether dependency
+ * Tether - http://tether.io/
+ */
+ if (typeof Tether === 'undefined') {
+ throw new Error('Bootstrap tooltips require Tether (http://tether.io/)')
+ }
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+
+ const NAME = 'tooltip'
+ const VERSION = '4.0.0-alpha.6'
+ const DATA_KEY = 'bs.tooltip'
+ const EVENT_KEY = `.${DATA_KEY}`
+ const JQUERY_NO_CONFLICT = $.fn[NAME]
+ const TRANSITION_DURATION = 150
+ const CLASS_PREFIX = 'bs-tether'
+
+ const Default = {
+ animation : true,
+ template : '<div class="tooltip" role="tooltip">'
+ + '<div class="tooltip-inner"></div></div>',
+ trigger : 'hover focus',
+ title : '',
+ delay : 0,
+ html : false,
+ selector : false,
+ placement : 'top',
+ offset : '0 0',
+ constraints : [],
+ container : false
+ }
+
+ const DefaultType = {
+ animation : 'boolean',
+ template : 'string',
+ title : '(string|element|function)',
+ trigger : 'string',
+ delay : '(number|object)',
+ html : 'boolean',
+ selector : '(string|boolean)',
+ placement : '(string|function)',
+ offset : 'string',
+ constraints : 'array',
+ container : '(string|element|boolean)'
+ }
+
+ const AttachmentMap = {
+ TOP : 'bottom center',
+ RIGHT : 'middle left',
+ BOTTOM : 'top center',
+ LEFT : 'middle right'
+ }
+
+ const HoverState = {
+ SHOW : 'show',
+ OUT : 'out'
+ }
+
+ const Event = {
+ HIDE : `hide${EVENT_KEY}`,
+ HIDDEN : `hidden${EVENT_KEY}`,
+ SHOW : `show${EVENT_KEY}`,
+ SHOWN : `shown${EVENT_KEY}`,
+ INSERTED : `inserted${EVENT_KEY}`,
+ CLICK : `click${EVENT_KEY}`,
+ FOCUSIN : `focusin${EVENT_KEY}`,
+ FOCUSOUT : `focusout${EVENT_KEY}`,
+ MOUSEENTER : `mouseenter${EVENT_KEY}`,
+ MOUSELEAVE : `mouseleave${EVENT_KEY}`
+ }
+
+ const ClassName = {
+ FADE : 'fade',
+ SHOW : 'show'
+ }
+
+ const Selector = {
+ TOOLTIP : '.tooltip',
+ TOOLTIP_INNER : '.tooltip-inner'
+ }
+
+ const TetherClass = {
+ element : false,
+ enabled : false
+ }
+
+ const Trigger = {
+ HOVER : 'hover',
+ FOCUS : 'focus',
+ CLICK : 'click',
+ MANUAL : 'manual'
+ }
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * Class Definition
+ * ------------------------------------------------------------------------
+ */
+
+ class Tooltip {
+
+ constructor(element, config) {
+
+ // private
+ this._isEnabled = true
+ this._timeout = 0
+ this._hoverState = ''
+ this._activeTrigger = {}
+ this._isTransitioning = false
+ this._tether = null
+
+ // protected
+ this.element = element
+ this.config = this._getConfig(config)
+ this.tip = null
+
+ this._setListeners()
+
+ }
+
+
+ // getters
+
+ static get VERSION() {
+ return VERSION
+ }
+
+ static get Default() {
+ return Default
+ }
+
+ static get NAME() {
+ return NAME
+ }
+
+ static get DATA_KEY() {
+ return DATA_KEY
+ }
+
+ static get Event() {
+ return Event
+ }
+
+ static get EVENT_KEY() {
+ return EVENT_KEY
+ }
+
+ static get DefaultType() {
+ return DefaultType
+ }
+
+
+ // public
+
+ enable() {
+ this._isEnabled = true
+ }
+
+ disable() {
+ this._isEnabled = false
+ }
+
+ toggleEnabled() {
+ this._isEnabled = !this._isEnabled
+ }
+
+ toggle(event) {
+ if (event) {
+ const dataKey = this.constructor.DATA_KEY
+ let context = $(event.currentTarget).data(dataKey)
+
+ if (!context) {
+ context = new this.constructor(
+ event.currentTarget,
+ this._getDelegateConfig()
+ )
+ $(event.currentTarget).data(dataKey, context)
+ }
+
+ context._activeTrigger.click = !context._activeTrigger.click
+
+ if (context._isWithActiveTrigger()) {
+ context._enter(null, context)
+ } else {
+ context._leave(null, context)
+ }
+
+ } else {
+
+ if ($(this.getTipElement()).hasClass(ClassName.SHOW)) {
+ this._leave(null, this)
+ return
+ }
+
+ this._enter(null, this)
+ }
+ }
+
+ dispose() {
+ clearTimeout(this._timeout)
+
+ this.cleanupTether()
+
+ $.removeData(this.element, this.constructor.DATA_KEY)
+
+ $(this.element).off(this.constructor.EVENT_KEY)
+ $(this.element).closest('.modal').off('hide.bs.modal')
+
+ if (this.tip) {
+ $(this.tip).remove()
+ }
+
+ this._isEnabled = null
+ this._timeout = null
+ this._hoverState = null
+ this._activeTrigger = null
+ this._tether = null
+
+ this.element = null
+ this.config = null
+ this.tip = null
+ }
+
+ show() {
+ if ($(this.element).css('display') === 'none') {
+ throw new Error('Please use show on visible elements')
+ }
+
+ const showEvent = $.Event(this.constructor.Event.SHOW)
+ if (this.isWithContent() && this._isEnabled) {
+ if (this._isTransitioning) {
+ throw new Error('Tooltip is transitioning')
+ }
+ $(this.element).trigger(showEvent)
+
+ const isInTheDom = $.contains(
+ this.element.ownerDocument.documentElement,
+ this.element
+ )
+
+ if (showEvent.isDefaultPrevented() || !isInTheDom) {
+ return
+ }
+
+ const tip = this.getTipElement()
+ const tipId = Util.getUID(this.constructor.NAME)
+
+ tip.setAttribute('id', tipId)
+ this.element.setAttribute('aria-describedby', tipId)
+
+ this.setContent()
+
+ if (this.config.animation) {
+ $(tip).addClass(ClassName.FADE)
+ }
+
+ const placement = typeof this.config.placement === 'function' ?
+ this.config.placement.call(this, tip, this.element) :
+ this.config.placement
+
+ const attachment = this._getAttachment(placement)
+
+ const container = this.config.container === false ? document.body : $(this.config.container)
+
+ $(tip)
+ .data(this.constructor.DATA_KEY, this)
+ .appendTo(container)
+
+ $(this.element).trigger(this.constructor.Event.INSERTED)
+
+ this._tether = new Tether({
+ attachment,
+ element : tip,
+ target : this.element,
+ classes : TetherClass,
+ classPrefix : CLASS_PREFIX,
+ offset : this.config.offset,
+ constraints : this.config.constraints,
+ addTargetClasses: false
+ })
+
+ Util.reflow(tip)
+ this._tether.position()
+
+ $(tip).addClass(ClassName.SHOW)
+
+ const complete = () => {
+ const prevHoverState = this._hoverState
+ this._hoverState = null
+ this._isTransitioning = false
+
+ $(this.element).trigger(this.constructor.Event.SHOWN)
+
+ if (prevHoverState === HoverState.OUT) {
+ this._leave(null, this)
+ }
+ }
+
+ if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
+ this._isTransitioning = true
+ $(this.tip)
+ .one(Util.TRANSITION_END, complete)
+ .emulateTransitionEnd(Tooltip._TRANSITION_DURATION)
+ return
+ }
+
+ complete()
+ }
+ }
+
+ hide(callback) {
+ const tip = this.getTipElement()
+ const hideEvent = $.Event(this.constructor.Event.HIDE)
+ if (this._isTransitioning) {
+ throw new Error('Tooltip is transitioning')
+ }
+ const complete = () => {
+ if (this._hoverState !== HoverState.SHOW && tip.parentNode) {
+ tip.parentNode.removeChild(tip)
+ }
+
+ this.element.removeAttribute('aria-describedby')
+ $(this.element).trigger(this.constructor.Event.HIDDEN)
+ this._isTransitioning = false
+ this.cleanupTether()
+
+ if (callback) {
+ callback()
+ }
+ }
+
+ $(this.element).trigger(hideEvent)
+
+ if (hideEvent.isDefaultPrevented()) {
+ return
+ }
+
+ $(tip).removeClass(ClassName.SHOW)
+
+ this._activeTrigger[Trigger.CLICK] = false
+ this._activeTrigger[Trigger.FOCUS] = false
+ this._activeTrigger[Trigger.HOVER] = false
+
+ if (Util.supportsTransitionEnd() &&
+ $(this.tip).hasClass(ClassName.FADE)) {
+ this._isTransitioning = true
+ $(tip)
+ .one(Util.TRANSITION_END, complete)
+ .emulateTransitionEnd(TRANSITION_DURATION)
+
+ } else {
+ complete()
+ }
+
+ this._hoverState = ''
+ }
+
+
+ // protected
+
+ isWithContent() {
+ return Boolean(this.getTitle())
+ }
+
+ getTipElement() {
+ return this.tip = this.tip || $(this.config.template)[0]
+ }
+
+ setContent() {
+ const $tip = $(this.getTipElement())
+
+ this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle())
+
+ $tip.removeClass(`${ClassName.FADE} ${ClassName.SHOW}`)
+
+ this.cleanupTether()
+ }
+
+ setElementContent($element, content) {
+ const html = this.config.html
+ if (typeof content === 'object' && (content.nodeType || content.jquery)) {
+ // content is a DOM node or a jQuery
+ if (html) {
+ if (!$(content).parent().is($element)) {
+ $element.empty().append(content)
+ }
+ } else {
+ $element.text($(content).text())
+ }
+ } else {
+ $element[html ? 'html' : 'text'](content)
+ }
+ }
+
+ getTitle() {
+ let title = this.element.getAttribute('data-original-title')
+
+ if (!title) {
+ title = typeof this.config.title === 'function' ?
+ this.config.title.call(this.element) :
+ this.config.title
+ }
+
+ return title
+ }
+
+ cleanupTether() {
+ if (this._tether) {
+ this._tether.destroy()
+ }
+ }
+
+
+ // private
+
+ _getAttachment(placement) {
+ return AttachmentMap[placement.toUpperCase()]
+ }
+
+ _setListeners() {
+ const triggers = this.config.trigger.split(' ')
+
+ triggers.forEach((trigger) => {
+ if (trigger === 'click') {
+ $(this.element).on(
+ this.constructor.Event.CLICK,
+ this.config.selector,
+ (event) => this.toggle(event)
+ )
+
+ } else if (trigger !== Trigger.MANUAL) {
+ const eventIn = trigger === Trigger.HOVER ?
+ this.constructor.Event.MOUSEENTER :
+ this.constructor.Event.FOCUSIN
+ const eventOut = trigger === Trigger.HOVER ?
+ this.constructor.Event.MOUSELEAVE :
+ this.constructor.Event.FOCUSOUT
+
+ $(this.element)
+ .on(
+ eventIn,
+ this.config.selector,
+ (event) => this._enter(event)
+ )
+ .on(
+ eventOut,
+ this.config.selector,
+ (event) => this._leave(event)
+ )
+ }
+
+ $(this.element).closest('.modal').on(
+ 'hide.bs.modal',
+ () => this.hide()
+ )
+ })
+
+ if (this.config.selector) {
+ this.config = $.extend({}, this.config, {
+ trigger : 'manual',
+ selector : ''
+ })
+ } else {
+ this._fixTitle()
+ }
+ }
+
+ _fixTitle() {
+ const titleType = typeof this.element.getAttribute('data-original-title')
+ if (this.element.getAttribute('title') ||
+ titleType !== 'string') {
+ this.element.setAttribute(
+ 'data-original-title',
+ this.element.getAttribute('title') || ''
+ )
+ this.element.setAttribute('title', '')
+ }
+ }
+
+ _enter(event, context) {
+ const dataKey = this.constructor.DATA_KEY
+
+ context = context || $(event.currentTarget).data(dataKey)
+
+ if (!context) {
+ context = new this.constructor(
+ event.currentTarget,
+ this._getDelegateConfig()
+ )
+ $(event.currentTarget).data(dataKey, context)
+ }
+
+ if (event) {
+ context._activeTrigger[
+ event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER
+ ] = true
+ }
+
+ if ($(context.getTipElement()).hasClass(ClassName.SHOW) ||
+ context._hoverState === HoverState.SHOW) {
+ context._hoverState = HoverState.SHOW
+ return
+ }
+
+ clearTimeout(context._timeout)
+
+ context._hoverState = HoverState.SHOW
+
+ if (!context.config.delay || !context.config.delay.show) {
+ context.show()
+ return
+ }
+
+ context._timeout = setTimeout(() => {
+ if (context._hoverState === HoverState.SHOW) {
+ context.show()
+ }
+ }, context.config.delay.show)
+ }
+
+ _leave(event, context) {
+ const dataKey = this.constructor.DATA_KEY
+
+ context = context || $(event.currentTarget).data(dataKey)
+
+ if (!context) {
+ context = new this.constructor(
+ event.currentTarget,
+ this._getDelegateConfig()
+ )
+ $(event.currentTarget).data(dataKey, context)
+ }
+
+ if (event) {
+ context._activeTrigger[
+ event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER
+ ] = false
+ }
+
+ if (context._isWithActiveTrigger()) {
+ return
+ }
+
+ clearTimeout(context._timeout)
+
+ context._hoverState = HoverState.OUT
+
+ if (!context.config.delay || !context.config.delay.hide) {
+ context.hide()
+ return
+ }
+
+ context._timeout = setTimeout(() => {
+ if (context._hoverState === HoverState.OUT) {
+ context.hide()
+ }
+ }, context.config.delay.hide)
+ }
+
+ _isWithActiveTrigger() {
+ for (const trigger in this._activeTrigger) {
+ if (this._activeTrigger[trigger]) {
+ return true
+ }
+ }
+
+ return false
+ }
+
+ _getConfig(config) {
+ config = $.extend(
+ {},
+ this.constructor.Default,
+ $(this.element).data(),
+ config
+ )
+
+ if (config.delay && typeof config.delay === 'number') {
+ config.delay = {
+ show : config.delay,
+ hide : config.delay
+ }
+ }
+
+ Util.typeCheckConfig(
+ NAME,
+ config,
+ this.constructor.DefaultType
+ )
+
+ return config
+ }
+
+ _getDelegateConfig() {
+ const config = {}
+
+ if (this.config) {
+ for (const key in this.config) {
+ if (this.constructor.Default[key] !== this.config[key]) {
+ config[key] = this.config[key]
+ }
+ }
+ }
+
+ return config
+ }
+
+
+ // static
+
+ static _jQueryInterface(config) {
+ return this.each(function () {
+ let data = $(this).data(DATA_KEY)
+ const _config = typeof config === 'object' && config
+
+ if (!data && /dispose|hide/.test(config)) {
+ return
+ }
+
+ if (!data) {
+ data = new Tooltip(this, _config)
+ $(this).data(DATA_KEY, data)
+ }
+
+ if (typeof config === 'string') {
+ if (data[config] === undefined) {
+ throw new Error(`No method named "${config}"`)
+ }
+ data[config]()
+ }
+ })
+ }
+
+ }
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * jQuery
+ * ------------------------------------------------------------------------
+ */
+
+ $.fn[NAME] = Tooltip._jQueryInterface
+ $.fn[NAME].Constructor = Tooltip
+ $.fn[NAME].noConflict = function () {
+ $.fn[NAME] = JQUERY_NO_CONFLICT
+ return Tooltip._jQueryInterface
+ }
+
+ return Tooltip
+
+})(jQuery)
+
+export default Tooltip
diff --git a/templates/assets/bootstrap/js/src/util.js b/templates/assets/bootstrap/js/src/util.js
new file mode 100644
index 0000000..3c0d022
--- /dev/null
+++ b/templates/assets/bootstrap/js/src/util.js
@@ -0,0 +1,164 @@
+/**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v4.0.0-alpha.6): util.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+const Util = (($) => {
+
+
+ /**
+ * ------------------------------------------------------------------------
+ * Private TransitionEnd Helpers
+ * ------------------------------------------------------------------------
+ */
+
+ let transition = false
+
+ const MAX_UID = 1000000
+
+ const TransitionEndEvent = {
+ WebkitTransition : 'webkitTransitionEnd',
+ MozTransition : 'transitionend',
+ OTransition : 'oTransitionEnd otransitionend',
+ transition : 'transitionend'
+ }
+
+ // shoutout AngusCroll (https://goo.gl/pxwQGp)
+ function toType(obj) {
+ return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase()
+ }
+
+ function isElement(obj) {
+ return (obj[0] || obj).nodeType
+ }
+
+ function getSpecialTransitionEndEvent() {
+ return {
+ bindType: transition.end,
+ delegateType: transition.end,
+ handle(event) {
+ if ($(event.target).is(this)) {
+ return event.handleObj.handler.apply(this, arguments) // eslint-disable-line prefer-rest-params
+ }
+ return undefined
+ }
+ }
+ }
+
+ function transitionEndTest() {
+ if (window.QUnit) {
+ return false
+ }
+
+ const el = document.createElement('bootstrap')
+
+ for (const name in TransitionEndEvent) {
+ if (el.style[name] !== undefined) {
+ return {
+ end: TransitionEndEvent[name]
+ }
+ }
+ }
+
+ return false
+ }
+
+ function transitionEndEmulator(duration) {
+ let called = false
+
+ $(this).one(Util.TRANSITION_END, () => {
+ called = true
+ })
+
+ setTimeout(() => {
+ if (!called) {
+ Util.triggerTransitionEnd(this)
+ }
+ }, duration)
+
+ return this
+ }
+
+ function setTransitionEndSupport() {
+ transition = transitionEndTest()
+
+ $.fn.emulateTransitionEnd = transitionEndEmulator
+
+ if (Util.supportsTransitionEnd()) {
+ $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent()
+ }
+ }
+
+
+ /**
+ * --------------------------------------------------------------------------
+ * Public Util Api
+ * --------------------------------------------------------------------------
+ */
+
+ const Util = {
+
+ TRANSITION_END: 'bsTransitionEnd',
+
+ getUID(prefix) {
+ do {
+ // eslint-disable-next-line no-bitwise
+ prefix += ~~(Math.random() * MAX_UID) // "~~" acts like a faster Math.floor() here
+ } while (document.getElementById(prefix))
+ return prefix
+ },
+
+ getSelectorFromElement(element) {
+ let selector = element.getAttribute('data-target')
+ if (!selector || selector === '#') {
+ selector = element.getAttribute('href') || ''
+ }
+
+ try {
+ const $selector = $(selector)
+ return $selector.length > 0 ? selector : null
+ } catch (error) {
+ return null
+ }
+ },
+
+ reflow(element) {
+ return element.offsetHeight
+ },
+
+ triggerTransitionEnd(element) {
+ $(element).trigger(transition.end)
+ },
+
+ supportsTransitionEnd() {
+ return Boolean(transition)
+ },
+
+ typeCheckConfig(componentName, config, configTypes) {
+ for (const property in configTypes) {
+ if (configTypes.hasOwnProperty(property)) {
+ const expectedTypes = configTypes[property]
+ const value = config[property]
+ const valueType = value && isElement(value) ?
+ 'element' : toType(value)
+
+ if (!new RegExp(expectedTypes).test(valueType)) {
+ throw new Error(
+ `${componentName.toUpperCase()}: ` +
+ `Option "${property}" provided type "${valueType}" ` +
+ `but expected type "${expectedTypes}".`)
+ }
+ }
+ }
+ }
+ }
+
+ setTransitionEndSupport()
+
+ return Util
+
+})(jQuery)
+
+export default Util
diff --git a/templates/assets/bootstrap/nuget/MyGet.ps1 b/templates/assets/bootstrap/nuget/MyGet.ps1
new file mode 100644
index 0000000..71110b5
--- /dev/null
+++ b/templates/assets/bootstrap/nuget/MyGet.ps1
@@ -0,0 +1,18 @@
+# set env vars usually set by MyGet (enable for local testing)
+#$env:SourcesPath = '..'
+#$env:NuGet = "./nuget.exe" #https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
+
+$nuget = $env:NuGet
+
+# parse the version number out of package.json
+$bsversionParts = ((Get-Content $env:SourcesPath\package.json) -join "`n" | ConvertFrom-Json).version.split('-', 2) # split the version on the '-'
+$bsversion = $bsversionParts[0]
+
+if ($bsversionParts.Length -gt 1)
+{
+ $bsversion += '-' + $bsversionParts[1].replace('.', '').replace('-', '_') # strip out invalid chars from the PreRelease part
+}
+
+# create packages
+& $nuget pack "$env:SourcesPath\nuget\bootstrap.nuspec" -Verbosity detailed -NonInteractive -NoPackageAnalysis -BasePath $env:SourcesPath -Version $bsversion
+& $nuget pack "$env:SourcesPath\nuget\bootstrap.sass.nuspec" -Verbosity detailed -NonInteractive -NoPackageAnalysis -BasePath $env:SourcesPath -Version $bsversion
diff --git a/templates/assets/bootstrap/nuget/bootstrap.nuspec b/templates/assets/bootstrap/nuget/bootstrap.nuspec
new file mode 100644
index 0000000..bbb4582
--- /dev/null
+++ b/templates/assets/bootstrap/nuget/bootstrap.nuspec
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
+ <metadata>
+ <id>bootstrap</id>
+ <version>4.0.0</version>
+ <title>Bootstrap CSS</title>
+ <authors>The Bootstrap Authors, Twitter Inc.</authors>
+ <owners>bootstrap</owners>
+ <description>The most popular front-end framework for developing responsive, mobile first projects on the web.</description>
+ <releaseNotes>https://blog.getbootstrap.com</releaseNotes>
+ <summary>Bootstrap framework in CSS. Includes fonts and JavaScript</summary>
+ <language>en-us</language>
+ <projectUrl>https://getbootstrap.com</projectUrl>
+ <iconUrl>https://getbootstrap.com/apple-touch-icon.png</iconUrl>
+ <licenseUrl>https://github.com/twbs/bootstrap/blob/master/LICENSE</licenseUrl>
+ <copyright>Copyright 2017</copyright>
+ <requireLicenseAcceptance>false</requireLicenseAcceptance>
+ <dependencies>
+ <dependency id="jQuery" version="[1.9.1,4)" />
+ </dependencies>
+ <tags>css mobile-first responsive front-end framework web</tags>
+ </metadata>
+ <files>
+ <file src="dist\css\*.*" target="content\Content" />
+ <file src="dist\js\bootstrap*.js" target="content\Scripts" />
+ </files>
+</package>
diff --git a/templates/assets/bootstrap/nuget/bootstrap.sass.nuspec b/templates/assets/bootstrap/nuget/bootstrap.sass.nuspec
new file mode 100644
index 0000000..aba443c
--- /dev/null
+++ b/templates/assets/bootstrap/nuget/bootstrap.sass.nuspec
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
+ <metadata>
+ <id>bootstrap.sass</id>
+ <version>4.0.0</version>
+ <title>Bootstrap Sass</title>
+ <authors>The Bootstrap Authors, Twitter Inc.</authors>
+ <owners>bootstrap</owners>
+ <description>The most popular front-end framework for developing responsive, mobile first projects on the web.</description>
+ <releaseNotes>https://blog.getbootstrap.com</releaseNotes>
+ <summary>Bootstrap framework in Sass. Includes fonts and JavaScript</summary>
+ <language>en-us</language>
+ <projectUrl>https://getbootstrap.com</projectUrl>
+ <iconUrl>https://getbootstrap.com/apple-touch-icon.png</iconUrl>
+ <licenseUrl>https://github.com/twbs/bootstrap/blob/master/LICENSE</licenseUrl>
+ <copyright>Copyright 2017</copyright>
+ <requireLicenseAcceptance>false</requireLicenseAcceptance>
+ <dependencies>
+ <dependency id="jQuery" version="[1.9.1,4)" />
+ </dependencies>
+ <tags>css sass mobile-first responsive front-end framework web</tags>
+ </metadata>
+ <files>
+ <file src="scss\**\*.scss" target="content\Content\bootstrap" />
+ <file src="dist\js\bootstrap*.js" target="content\Scripts" />
+ </files>
+</package>
diff --git a/templates/assets/bootstrap/package.js b/templates/assets/bootstrap/package.js
new file mode 100644
index 0000000..ce21bad
--- /dev/null
+++ b/templates/assets/bootstrap/package.js
@@ -0,0 +1,19 @@
+// package metadata file for Meteor.js
+
+/* global Package:true */
+
+Package.describe({
+ name: 'twbs:bootstrap', // https://atmospherejs.com/twbs/bootstrap
+ summary: 'The most popular front-end framework for developing responsive, mobile first projects on the web.',
+ version: '4.0.0-alpha.6',
+ git: 'https://github.com/twbs/bootstrap.git'
+});
+
+Package.onUse(function (api) {
+ api.versionsFrom('METEOR@1.0');
+ api.use('jquery', 'client');
+ api.addFiles([
+ 'dist/css/bootstrap.css',
+ 'dist/js/bootstrap.js'
+ ], 'client');
+});
diff --git a/templates/assets/bootstrap/package.json b/templates/assets/bootstrap/package.json
new file mode 100644
index 0000000..d11ffbf
--- /dev/null
+++ b/templates/assets/bootstrap/package.json
@@ -0,0 +1,114 @@
+{
+ "name": "bootstrap",
+ "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
+ "version": "4.0.0-alpha.6",
+ "keywords": [
+ "css",
+ "sass",
+ "mobile-first",
+ "responsive",
+ "front-end",
+ "framework",
+ "web"
+ ],
+ "homepage": "https://getbootstrap.com",
+ "author": "The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)",
+ "contributors": [
+ "Twitter, Inc."
+ ],
+ "scripts": {
+ "change-version": "node grunt/change-version.js",
+ "clean-css": "cleancss --level 1 --source-map --output dist/css/bootstrap.min.css dist/css/bootstrap.css && cleancss --level 1 --source-map --output dist/css/bootstrap-grid.min.css dist/css/bootstrap-grid.css && cleancss --level 1 --source-map --output dist/css/bootstrap-reboot.min.css dist/css/bootstrap-reboot.css",
+ "clean-css-docs": "cleancss --level 1 --source-map --output docs/assets/css/docs.min.css docs/assets/css/docs.min.css",
+ "eslint": "eslint --ignore-path .eslintignore js && eslint --config js/tests/.eslintrc.json --env node grunt Gruntfile.js && eslint --config js/tests/.eslintrc.json docs/assets/js/src docs/assets/js/ie-emulation-modes-warning.js docs/assets/js/ie10-viewport-bug-workaround.js",
+ "htmlhint": "htmlhint --config docs/.htmlhintrc _gh_pages/",
+ "htmllint": "htmllint --rc docs/.htmllintrc _gh_pages/**/*.html js/tests/visual/*.html",
+ "jekyll": "bundle exec jekyll build",
+ "jekyll-github": "shx echo 'github: true' > $npm_config_tmp/twbsjekyll.yml && npm run jekyll -- --config _config.yml,$npm_config_tmp/twbsjekyll.yml && shx rm $npm_config_tmp/twbsjekyll.yml",
+ "postcss": "postcss --config grunt/ --replace dist/css/*.css",
+ "postcss-docs": "postcss --config grunt/ --replace docs/assets/css/docs.min.css && postcss --config grunt/ --replace docs/examples/**/*.css",
+ "sass": "node-sass --output-style expanded --source-map true --precision 6 scss/bootstrap.scss dist/css/bootstrap.css && node-sass --output-style expanded --source-map true --precision 6 scss/bootstrap-grid.scss dist/css/bootstrap-grid.css && node-sass --output-style expanded --source-map true --precision 6 scss/bootstrap-reboot.scss dist/css/bootstrap-reboot.css",
+ "sass-docs": "node-sass --output-style expanded --source-map true --precision 6 docs/assets/scss/docs.scss docs/assets/css/docs.min.css",
+ "scss-lint": "bundle exec scss-lint --config scss/.scss-lint.yml scss/*.scss",
+ "scss-lint-docs": "bundle exec scss-lint --config scss/.scss-lint.yml --exclude docs/assets/scss/docs.scss docs/assets/scss/*.scss",
+ "uglify": "uglifyjs --compress warnings=false --mangle --comments '/^!/' --output dist/js/bootstrap.min.js dist/js/bootstrap.js",
+ "uglify-docs": "uglifyjs --compress warnings=false --mangle --comments '/^!/' --output docs/assets/js/docs.min.js docs/assets/js/vendor/anchor.min.js docs/assets/js/vendor/clipboard.min.js docs/assets/js/vendor/holder.min.js docs/assets/js/src/application.js",
+ "update-shrinkwrap": "npm shrinkwrap --dev && shx mv ./npm-shrinkwrap.json ./grunt/npm-shrinkwrap.json",
+ "test": "npm run eslint && grunt test"
+ },
+ "style": "dist/css/bootstrap.css",
+ "sass": "scss/bootstrap.scss",
+ "main": "dist/js/bootstrap",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/twbs/bootstrap.git"
+ },
+ "bugs": {
+ "url": "https://github.com/twbs/bootstrap/issues"
+ },
+ "license": "MIT",
+ "dependencies": {
+ "jquery": ">=1.9.1",
+ "tether": "^1.4.0"
+ },
+ "devDependencies": {
+ "autoprefixer": "^6.7.7",
+ "babel-eslint": "^7.1.1",
+ "babel-plugin-transform-es2015-modules-strip": "^0.1.0",
+ "babel-preset-es2015": "^6.24.0",
+ "clean-css-cli": "^4.0.9",
+ "eslint": "^3.18.0",
+ "grunt": "^1.0.1",
+ "grunt-babel": "^6.0.0",
+ "grunt-build-control": "^0.7.1",
+ "grunt-contrib-clean": "^1.0.0",
+ "grunt-contrib-compress": "^1.4.1",
+ "grunt-contrib-concat": "^1.0.1",
+ "grunt-contrib-connect": "^1.0.2",
+ "grunt-contrib-copy": "^1.0.0",
+ "grunt-contrib-qunit": "^1.3.0",
+ "grunt-contrib-watch": "^1.0.0",
+ "grunt-exec": "^2.0.0",
+ "grunt-saucelabs": "^9.0.0",
+ "grunt-stamp": "^0.3.0",
+ "htmlhint": "^0.9.13",
+ "htmllint-cli": "^0.0.6",
+ "is-travis": "^1.0.0",
+ "load-grunt-tasks": "^3.5.2",
+ "node-sass": "^4.5.0",
+ "postcss-cli": "^3.0.0",
+ "postcss-flexbugs-fixes": "^2.1.0",
+ "shelljs": "^0.7.7",
+ "shx": "^0.2.2",
+ "time-grunt": "^1.4.0",
+ "uglify-js": "^2.8.14"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "files": [
+ "dist",
+ "grunt",
+ "js/**/*.js",
+ "scss/**/*.scss",
+ "Gruntfile.js",
+ "LICENSE"
+ ],
+ "jspm": {
+ "main": "js/bootstrap",
+ "directories": {
+ "lib": "dist"
+ },
+ "shim": {
+ "js/bootstrap": {
+ "deps": [
+ "jquery"
+ ],
+ "exports": "$"
+ }
+ },
+ "dependencies": {
+ "jquery": "3"
+ }
+ }
+}
diff --git a/templates/assets/bootstrap/sache.json b/templates/assets/bootstrap/sache.json
new file mode 100644
index 0000000..cd1a8c4
--- /dev/null
+++ b/templates/assets/bootstrap/sache.json
@@ -0,0 +1,5 @@
+{
+ "name": "bootstrap",
+ "description": "The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.",
+ "tags": ["bootstrap", "grid", "typography", "buttons", "ui", "responsive-web-design"]
+}
diff --git a/templates/assets/bootstrap/scss/.scss-lint.yml b/templates/assets/bootstrap/scss/.scss-lint.yml
new file mode 100644
index 0000000..845001e
--- /dev/null
+++ b/templates/assets/bootstrap/scss/.scss-lint.yml
@@ -0,0 +1,536 @@
+# Default application configuration that all configurations inherit from.
+scss_files:
+ - "**/*.scss"
+ - "docs/assets/scss/**/*.scss"
+
+plugin_directories: ['.scss-linters']
+
+# List of gem names to load custom linters from (make sure they are already
+# installed)
+plugin_gems: []
+
+# Default severity of all linters.
+severity: warning
+
+linters:
+ BangFormat:
+ enabled: true
+ space_before_bang: true
+ space_after_bang: false
+
+ BemDepth:
+ enabled: false
+ max_elements: 1
+
+ BorderZero:
+ enabled: true
+ convention: zero # or `none`
+
+ ChainedClasses:
+ enabled: false
+
+ ColorKeyword:
+ enabled: true
+
+ ColorVariable:
+ enabled: false
+
+ Comment:
+ enabled: true
+ exclude:
+ - bootstrap.scss
+ style: silent
+
+ DebugStatement:
+ enabled: true
+
+ DeclarationOrder:
+ enabled: false
+
+ DisableLinterReason:
+ enabled: false
+
+ DuplicateProperty:
+ enabled: true
+
+ ElsePlacement:
+ enabled: true
+ style: same_line # or 'new_line'
+
+ EmptyLineBetweenBlocks:
+ enabled: false
+ ignore_single_line_blocks: true
+
+ EmptyRule:
+ enabled: true
+
+ ExtendDirective:
+ enabled: false
+
+ FinalNewline:
+ enabled: true
+ present: true
+
+ HexLength:
+ enabled: true
+ style: short # or 'long'
+
+ HexNotation:
+ enabled: true
+ style: lowercase # or 'uppercase'
+
+ HexValidation:
+ enabled: true
+
+ IdSelector:
+ enabled: true
+
+ ImportantRule:
+ enabled: false
+
+ ImportPath:
+ enabled: true
+ leading_underscore: false
+ filename_extension: false
+
+ Indentation:
+ enabled: true
+ allow_non_nested_indentation: false
+ character: space # or 'tab'
+ width: 2
+
+ LeadingZero:
+ enabled: true
+ style: exclude_zero # or 'include_zero'
+
+ MergeableSelector:
+ enabled: false
+ force_nesting: true
+
+ NameFormat:
+ enabled: true
+ allow_leading_underscore: true
+ convention: hyphenated_lowercase # or 'camel_case', or 'snake_case', or a regex pattern
+
+ NestingDepth:
+ enabled: true
+ max_depth: 4
+ ignore_parent_selectors: false
+
+ PlaceholderInExtend:
+ enabled: false
+
+ PropertyCount:
+ enabled: false
+ include_nested: false
+ max_properties: 10
+
+ PropertySortOrder:
+ enabled: true
+ ignore_unspecified: false
+ min_properties: 2
+ separate_groups: false
+ order:
+ - position
+ - top
+ - right
+ - bottom
+ - left
+ - z-index
+ - -webkit-box-sizing
+ - -moz-box-sizing
+ - box-sizing
+ - display
+ - flex
+ - flex-align
+ - flex-basis
+ - flex-direction
+ - flex-wrap
+ - flex-flow
+ - flex-grow
+ - flex-order
+ - flex-pack
+ - align-items
+ - align-self
+ - justify-content
+ - float
+ - width
+ - min-width
+ - max-width
+ - height
+ - min-height
+ - max-height
+ - padding
+ - padding-top
+ - padding-right
+ - padding-bottom
+ - padding-left
+ - margin
+ - margin-top
+ - margin-right
+ - margin-bottom
+ - margin-left
+ - overflow
+ - overflow-x
+ - overflow-y
+ - -webkit-overflow-scrolling
+ - -ms-overflow-x
+ - -ms-overflow-y
+ - -ms-overflow-style
+ - clip
+ - clear
+ - font
+ - font-family
+ - font-size
+ - font-style
+ - font-weight
+ - font-variant
+ - font-size-adjust
+ - font-stretch
+ - font-effect
+ - font-emphasize
+ - font-emphasize-position
+ - font-emphasize-style
+ - font-smooth
+ - -webkit-hyphens
+ - -moz-hyphens
+ - hyphens
+ - line-height
+ - color
+ - text-align
+ - -webkit-text-align-last
+ - -moz-text-align-last
+ - -ms-text-align-last
+ - text-align-last
+ - text-emphasis
+ - text-emphasis-color
+ - text-emphasis-style
+ - text-emphasis-position
+ - text-decoration
+ - text-indent
+ - text-justify
+ - text-outline
+ - -ms-text-overflow
+ - text-overflow
+ - text-overflow-ellipsis
+ - text-overflow-mode
+ - text-shadow
+ - text-transform
+ - text-wrap
+ - -webkit-text-size-adjust
+ - -ms-text-size-adjust
+ - letter-spacing
+ - -ms-word-break
+ - word-break
+ - word-spacing
+ - -ms-word-wrap
+ - word-wrap
+ - overflow-wrap
+ - -moz-tab-size
+ - -o-tab-size
+ - tab-size
+ - white-space
+ - vertical-align
+ - list-style
+ - list-style-position
+ - list-style-type
+ - list-style-image
+ - pointer-events
+ - -ms-touch-action
+ - touch-action
+ - cursor
+ - visibility
+ - zoom
+ - table-layout
+ - empty-cells
+ - caption-side
+ - border-spacing
+ - border-collapse
+ - content
+ - quotes
+ - counter-reset
+ - counter-increment
+ - resize
+ - -webkit-user-select
+ - -moz-user-select
+ - -ms-user-select
+ - -o-user-select
+ - user-select
+ - nav-index
+ - nav-up
+ - nav-right
+ - nav-down
+ - nav-left
+ - background
+ - background-color
+ - background-image
+ - -ms-filter:\\'progid:DXImageTransform.Microsoft.gradient
+ - filter:progid:DXImageTransform.Microsoft.gradient
+ - filter:progid:DXImageTransform.Microsoft.AlphaImageLoader
+ - filter
+ - background-repeat
+ - background-attachment
+ - background-position
+ - background-position-x
+ - background-position-y
+ - -webkit-background-clip
+ - -moz-background-clip
+ - background-clip
+ - background-origin
+ - -webkit-background-size
+ - -moz-background-size
+ - -o-background-size
+ - background-size
+ - border
+ - border-color
+ - border-style
+ - border-width
+ - border-top
+ - border-top-color
+ - border-top-style
+ - border-top-width
+ - border-right
+ - border-right-color
+ - border-right-style
+ - border-right-width
+ - border-bottom
+ - border-bottom-color
+ - border-bottom-style
+ - border-bottom-width
+ - border-left
+ - border-left-color
+ - border-left-style
+ - border-left-width
+ - border-radius
+ - border-top-left-radius
+ - border-top-right-radius
+ - border-bottom-right-radius
+ - border-bottom-left-radius
+ - -webkit-border-image
+ - -moz-border-image
+ - -o-border-image
+ - border-image
+ - -webkit-border-image-source
+ - -moz-border-image-source
+ - -o-border-image-source
+ - border-image-source
+ - -webkit-border-image-slice
+ - -moz-border-image-slice
+ - -o-border-image-slice
+ - border-image-slice
+ - -webkit-border-image-width
+ - -moz-border-image-width
+ - -o-border-image-width
+ - border-image-width
+ - -webkit-border-image-outset
+ - -moz-border-image-outset
+ - -o-border-image-outset
+ - border-image-outset
+ - -webkit-border-image-repeat
+ - -moz-border-image-repeat
+ - -o-border-image-repeat
+ - border-image-repeat
+ - outline
+ - outline-width
+ - outline-style
+ - outline-color
+ - outline-offset
+ - -webkit-box-shadow
+ - -moz-box-shadow
+ - box-shadow
+ - filter:progid:DXImageTransform.Microsoft.Alpha(Opacity
+ - -ms-filter:\\'progid:DXImageTransform.Microsoft.Alpha
+ - opacity
+ - -ms-interpolation-mode
+ - -webkit-transition
+ - -moz-transition
+ - -ms-transition
+ - -o-transition
+ - transition
+ - -webkit-transition-delay
+ - -moz-transition-delay
+ - -ms-transition-delay
+ - -o-transition-delay
+ - transition-delay
+ - -webkit-transition-timing-function
+ - -moz-transition-timing-function
+ - -ms-transition-timing-function
+ - -o-transition-timing-function
+ - transition-timing-function
+ - -webkit-transition-duration
+ - -moz-transition-duration
+ - -ms-transition-duration
+ - -o-transition-duration
+ - transition-duration
+ - -webkit-transition-property
+ - -moz-transition-property
+ - -ms-transition-property
+ - -o-transition-property
+ - transition-property
+ - -webkit-transform
+ - -moz-transform
+ - -ms-transform
+ - -o-transform
+ - transform
+ - -webkit-transform-origin
+ - -moz-transform-origin
+ - -ms-transform-origin
+ - -o-transform-origin
+ - transform-origin
+ - -webkit-animation
+ - -moz-animation
+ - -ms-animation
+ - -o-animation
+ - animation
+ - -webkit-animation-name
+ - -moz-animation-name
+ - -ms-animation-name
+ - -o-animation-name
+ - animation-name
+ - -webkit-animation-duration
+ - -moz-animation-duration
+ - -ms-animation-duration
+ - -o-animation-duration
+ - animation-duration
+ - -webkit-animation-play-state
+ - -moz-animation-play-state
+ - -ms-animation-play-state
+ - -o-animation-play-state
+ - animation-play-state
+ - -webkit-animation-timing-function
+ - -moz-animation-timing-function
+ - -ms-animation-timing-function
+ - -o-animation-timing-function
+ - animation-timing-function
+ - -webkit-animation-delay
+ - -moz-animation-delay
+ - -ms-animation-delay
+ - -o-animation-delay
+ - animation-delay
+ - -webkit-animation-iteration-count
+ - -moz-animation-iteration-count
+ - -ms-animation-iteration-count
+ - -o-animation-iteration-count
+ - animation-iteration-count
+ - -webkit-animation-direction
+ - -moz-animation-direction
+ - -ms-animation-direction
+ - -o-animation-direction
+
+
+ PropertySpelling:
+ enabled: true
+ extra_properties: []
+ disabled_properties: []
+
+ PropertyUnits:
+ enabled: true
+ global: [
+ 'ch', 'em', 'ex', 'rem', # Font-relative lengths
+ 'cm', 'in', 'mm', 'pc', 'pt', 'px', 'q', # Absolute lengths
+ 'vh', 'vw', 'vmin', 'vmax', # Viewport-percentage lengths
+ 'deg', 'grad', 'rad', 'turn', # Angle
+ 'ms', 's', # Duration
+ 'Hz', 'kHz', # Frequency
+ 'dpi', 'dpcm', 'dppx', # Resolution
+ '%'] # Other
+ properties: {}
+
+ PseudoElement:
+ enabled: true
+
+ QualifyingElement:
+ enabled: true
+ allow_element_with_attribute: false
+ allow_element_with_class: false
+ allow_element_with_id: false
+
+ SelectorDepth:
+ enabled: true
+ max_depth: 4
+
+ SelectorFormat:
+ enabled: false
+ convention: hyphenated_lowercase # or 'strict_BEM', or 'hyphenated_BEM', or 'snake_case', or 'camel_case', or a regex pattern
+
+ Shorthand:
+ enabled: true
+ allowed_shorthands: [1, 2, 3, 4]
+
+ SingleLinePerProperty:
+ enabled: false
+ allow_single_line_rule_sets: true
+
+ SingleLinePerSelector:
+ enabled: false
+
+ SpaceAfterComma:
+ enabled: false
+ style: one_space # or 'no_space', or 'at_least_one_space'
+
+ SpaceAfterPropertyColon:
+ enabled: true
+ style: at_least_one_space # or 'no_space', or 'at_least_one_space', or 'aligned'
+
+ SpaceAfterPropertyName:
+ enabled: true
+
+ SpaceAfterVariableName:
+ enabled: true
+
+ SpaceAroundOperator:
+ enabled: true
+ style: one_space # or 'at_least_one_space', or 'no_space'
+
+ SpaceBeforeBrace:
+ enabled: true
+ style: space # or 'new_line'
+ allow_single_line_padding: true
+
+ SpaceBetweenParens:
+ enabled: true
+ spaces: 0
+
+ StringQuotes:
+ enabled: true
+ style: double_quotes # or double_quotes
+
+ TrailingSemicolon:
+ enabled: true
+
+ TrailingWhitespace:
+ enabled: true
+
+ TrailingZero:
+ enabled: false
+
+ TransitionAll:
+ enabled: false
+
+ UnnecessaryMantissa:
+ enabled: true
+
+ UnnecessaryParentReference:
+ enabled: true
+
+ UrlFormat:
+ enabled: true
+
+ UrlQuotes:
+ enabled: true
+
+ VariableForProperty:
+ enabled: false
+ properties: []
+
+ VendorPrefix:
+ enabled: true
+ identifier_list: base
+ additional_identifiers: []
+ excluded_identifiers: []
+
+ ZeroUnit:
+ enabled: true
+
+ Compass::*:
+ enabled: false
diff --git a/templates/assets/bootstrap/scss/_alert.scss b/templates/assets/bootstrap/scss/_alert.scss
new file mode 100644
index 0000000..d9b4e9b
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_alert.scss
@@ -0,0 +1,55 @@
+//
+// Base styles
+//
+
+.alert {
+ padding: $alert-padding-y $alert-padding-x;
+ margin-bottom: $alert-margin-bottom;
+ border: $alert-border-width solid transparent;
+ @include border-radius($alert-border-radius);
+}
+
+// Headings for larger alerts
+.alert-heading {
+ // Specified to prevent conflicts of changing $headings-color
+ color: inherit;
+}
+
+// Provide class for links that match alerts
+.alert-link {
+ font-weight: $alert-link-font-weight;
+}
+
+
+// Dismissible alerts
+//
+// Expand the right padding and account for the close button's positioning.
+
+.alert-dismissible {
+ // Adjust close link position
+ .close {
+ position: relative;
+ top: -$alert-padding-y;
+ right: -$alert-padding-x;
+ padding: $alert-padding-y $alert-padding-x;
+ color: inherit;
+ }
+}
+
+
+// Alternate styles
+//
+// Generate contextual modifier classes for colorizing the alert.
+
+.alert-success {
+ @include alert-variant($alert-success-bg, $alert-success-border, $alert-success-text);
+}
+.alert-info {
+ @include alert-variant($alert-info-bg, $alert-info-border, $alert-info-text);
+}
+.alert-warning {
+ @include alert-variant($alert-warning-bg, $alert-warning-border, $alert-warning-text);
+}
+.alert-danger {
+ @include alert-variant($alert-danger-bg, $alert-danger-border, $alert-danger-text);
+}
diff --git a/templates/assets/bootstrap/scss/_badge.scss b/templates/assets/bootstrap/scss/_badge.scss
new file mode 100644
index 0000000..175b19d
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_badge.scss
@@ -0,0 +1,76 @@
+// Base class
+//
+// Requires one of the contextual, color modifier classes for `color` and
+// `background-color`.
+
+.badge {
+ display: inline-block;
+ padding: $badge-padding-y $badge-padding-x;
+ font-size: $badge-font-size;
+ font-weight: $badge-font-weight;
+ line-height: 1;
+ color: $badge-color;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: baseline;
+ @include border-radius();
+
+ // Empty badges collapse automatically
+ &:empty {
+ display: none;
+ }
+}
+
+// Quick fix for badges in buttons
+.btn .badge {
+ position: relative;
+ top: -1px;
+}
+
+// scss-lint:disable QualifyingElement
+// Add hover effects, but only for links
+a.badge {
+ @include hover-focus {
+ color: $badge-link-hover-color;
+ text-decoration: none;
+ }
+}
+// scss-lint:enable QualifyingElement
+
+// Pill badges
+//
+// Make them extra rounded with a modifier to replace v3's badges.
+
+.badge-pill {
+ padding-right: $badge-pill-padding-x;
+ padding-left: $badge-pill-padding-x;
+ @include border-radius($badge-pill-border-radius);
+}
+
+// Colors
+//
+// Contextual variations (linked badges get darker on :hover).
+
+.badge-default {
+ @include badge-variant($badge-default-bg);
+}
+
+.badge-primary {
+ @include badge-variant($badge-primary-bg);
+}
+
+.badge-success {
+ @include badge-variant($badge-success-bg);
+}
+
+.badge-info {
+ @include badge-variant($badge-info-bg);
+}
+
+.badge-warning {
+ @include badge-variant($badge-warning-bg);
+}
+
+.badge-danger {
+ @include badge-variant($badge-danger-bg);
+}
diff --git a/templates/assets/bootstrap/scss/_breadcrumb.scss b/templates/assets/bootstrap/scss/_breadcrumb.scss
new file mode 100644
index 0000000..2bc0e20
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_breadcrumb.scss
@@ -0,0 +1,38 @@
+.breadcrumb {
+ padding: $breadcrumb-padding-y $breadcrumb-padding-x;
+ margin-bottom: 1rem;
+ list-style: none;
+ background-color: $breadcrumb-bg;
+ @include border-radius($border-radius);
+ @include clearfix;
+}
+
+.breadcrumb-item {
+ float: left;
+
+ // The separator between breadcrumbs (by default, a forward-slash: "/")
+ + .breadcrumb-item::before {
+ display: inline-block; // Suppress underlining of the separator in modern browsers
+ padding-right: $breadcrumb-item-padding;
+ padding-left: $breadcrumb-item-padding;
+ color: $breadcrumb-divider-color;
+ content: "#{$breadcrumb-divider}";
+ }
+
+ // IE9-11 hack to properly handle hyperlink underlines for breadcrumbs built
+ // without `<ul>`s. The `::before` pseudo-element generates an element
+ // *within* the .breadcrumb-item and thereby inherits the `text-decoration`.
+ //
+ // To trick IE into suppressing the underline, we give the pseudo-element an
+ // underline and then immediately remove it.
+ + .breadcrumb-item:hover::before {
+ text-decoration: underline;
+ }
+ + .breadcrumb-item:hover::before {
+ text-decoration: none;
+ }
+
+ &.active {
+ color: $breadcrumb-active-color;
+ }
+}
diff --git a/templates/assets/bootstrap/scss/_button-group.scss b/templates/assets/bootstrap/scss/_button-group.scss
new file mode 100644
index 0000000..facecd3
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_button-group.scss
@@ -0,0 +1,204 @@
+// scss-lint:disable QualifyingElement
+
+// Make the div behave like a button
+.btn-group,
+.btn-group-vertical {
+ position: relative;
+ display: inline-flex;
+ vertical-align: middle; // match .btn alignment given font-size hack above
+
+ > .btn {
+ position: relative;
+ flex: 0 1 auto;
+ margin-bottom: 0;
+
+ // Bring the hover, focused, and "active" buttons to the fron to overlay
+ // the borders properly
+ @include hover {
+ z-index: 2;
+ }
+ &:focus,
+ &:active,
+ &.active {
+ z-index: 2;
+ }
+ }
+
+ // Prevent double borders when buttons are next to each other
+ .btn + .btn,
+ .btn + .btn-group,
+ .btn-group + .btn,
+ .btn-group + .btn-group {
+ margin-left: -$input-btn-border-width;
+ }
+}
+
+// Optional: Group multiple button groups together for a toolbar
+.btn-toolbar {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: flex-start;
+
+ .input-group {
+ width: auto;
+ }
+}
+
+.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
+ border-radius: 0;
+}
+
+// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
+.btn-group > .btn:first-child {
+ margin-left: 0;
+
+ &:not(:last-child):not(.dropdown-toggle) {
+ @include border-right-radius(0);
+ }
+}
+// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
+.btn-group > .btn:last-child:not(:first-child),
+.btn-group > .dropdown-toggle:not(:first-child) {
+ @include border-left-radius(0);
+}
+
+// Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)
+.btn-group > .btn-group {
+ float: left;
+}
+.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
+ border-radius: 0;
+}
+.btn-group > .btn-group:first-child:not(:last-child) {
+ > .btn:last-child,
+ > .dropdown-toggle {
+ @include border-right-radius(0);
+ }
+}
+.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {
+ @include border-left-radius(0);
+}
+
+// On active and open, don't show outline
+.btn-group .dropdown-toggle:active,
+.btn-group.open .dropdown-toggle {
+ outline: 0;
+}
+
+
+// Sizing
+//
+// Remix the default button sizing classes into new ones for easier manipulation.
+
+.btn-group-sm > .btn { @extend .btn-sm; }
+.btn-group-lg > .btn { @extend .btn-lg; }
+
+
+//
+// Split button dropdowns
+//
+
+.btn + .dropdown-toggle-split {
+ padding-right: $btn-padding-x * .75;
+ padding-left: $btn-padding-x * .75;
+
+ &::after {
+ margin-left: 0;
+ }
+}
+
+.btn-sm + .dropdown-toggle-split {
+ padding-right: $btn-padding-x-sm * .75;
+ padding-left: $btn-padding-x-sm * .75;
+}
+
+.btn-lg + .dropdown-toggle-split {
+ padding-right: $btn-padding-x-lg * .75;
+ padding-left: $btn-padding-x-lg * .75;
+}
+
+
+// The clickable button for toggling the menu
+// Remove the gradient and set the same inset shadow as the :active state
+.btn-group.open .dropdown-toggle {
+ @include box-shadow($btn-active-box-shadow);
+
+ // Show no shadow for `.btn-link` since it has no other button styles.
+ &.btn-link {
+ @include box-shadow(none);
+ }
+}
+
+
+//
+// Vertical button groups
+//
+
+.btn-group-vertical {
+ display: inline-flex;
+ flex-direction: column;
+ align-items: flex-start;
+ justify-content: center;
+
+ .btn,
+ .btn-group {
+ width: 100%;
+ }
+
+ > .btn + .btn,
+ > .btn + .btn-group,
+ > .btn-group + .btn,
+ > .btn-group + .btn-group {
+ margin-top: -$input-btn-border-width;
+ margin-left: 0;
+ }
+}
+
+.btn-group-vertical > .btn {
+ &:not(:first-child):not(:last-child) {
+ border-radius: 0;
+ }
+ &:first-child:not(:last-child) {
+ @include border-bottom-radius(0);
+ }
+ &:last-child:not(:first-child) {
+ @include border-top-radius(0);
+ }
+}
+.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
+ border-radius: 0;
+}
+.btn-group-vertical > .btn-group:first-child:not(:last-child) {
+ > .btn:last-child,
+ > .dropdown-toggle {
+ @include border-bottom-radius(0);
+ }
+}
+.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
+ @include border-top-radius(0);
+}
+
+
+// Checkbox and radio options
+//
+// In order to support the browser's form validation feedback, powered by the
+// `required` attribute, we have to "hide" the inputs via `clip`. We cannot use
+// `display: none;` or `visibility: hidden;` as that also hides the popover.
+// Simply visually hiding the inputs via `opacity` would leave them clickable in
+// certain cases which is prevented by using `clip` and `pointer-events`.
+// This way, we ensure a DOM element is visible to position the popover from.
+//
+// See https://github.com/twbs/bootstrap/pull/12794 and
+// https://github.com/twbs/bootstrap/pull/14559 for more information.
+
+[data-toggle="buttons"] {
+ > .btn,
+ > .btn-group > .btn {
+ input[type="radio"],
+ input[type="checkbox"] {
+ position: absolute;
+ clip: rect(0,0,0,0);
+ pointer-events: none;
+ }
+ }
+}
diff --git a/templates/assets/bootstrap/scss/_buttons.scss b/templates/assets/bootstrap/scss/_buttons.scss
new file mode 100644
index 0000000..2964a52
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_buttons.scss
@@ -0,0 +1,170 @@
+// scss-lint:disable QualifyingElement
+
+//
+// Base styles
+//
+
+.btn {
+ display: inline-block;
+ font-weight: $btn-font-weight;
+ line-height: $btn-line-height;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: middle;
+ user-select: none;
+ border: $input-btn-border-width solid transparent;
+ @include button-size($btn-padding-y, $btn-padding-x, $font-size-base, $btn-border-radius);
+ @include transition($btn-transition);
+
+ // Share hover and focus styles
+ @include hover-focus {
+ text-decoration: none;
+ }
+ &:focus,
+ &.focus {
+ outline: 0;
+ box-shadow: $btn-focus-box-shadow;
+ }
+
+ // Disabled comes first so active can properly restyle
+ &.disabled,
+ &:disabled {
+ cursor: $cursor-disabled;
+ opacity: .65;
+ @include box-shadow(none);
+ }
+
+ &:active,
+ &.active {
+ background-image: none;
+ @include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow);
+ }
+}
+
+// Future-proof disabling of clicks on `<a>` elements
+a.btn.disabled,
+fieldset[disabled] a.btn {
+ pointer-events: none;
+}
+
+
+//
+// Alternate buttons
+//
+
+.btn-primary {
+ @include button-variant($btn-primary-color, $btn-primary-bg, $btn-primary-border);
+}
+.btn-secondary {
+ @include button-variant($btn-secondary-color, $btn-secondary-bg, $btn-secondary-border);
+}
+.btn-info {
+ @include button-variant($btn-info-color, $btn-info-bg, $btn-info-border);
+}
+.btn-success {
+ @include button-variant($btn-success-color, $btn-success-bg, $btn-success-border);
+}
+.btn-warning {
+ @include button-variant($btn-warning-color, $btn-warning-bg, $btn-warning-border);
+}
+.btn-danger {
+ @include button-variant($btn-danger-color, $btn-danger-bg, $btn-danger-border);
+}
+
+// Remove all backgrounds
+.btn-outline-primary {
+ @include button-outline-variant($btn-primary-bg, $btn-primary-color);
+}
+.btn-outline-secondary {
+ @include button-outline-variant($btn-secondary-border, $btn-secondary-color);
+}
+.btn-outline-info {
+ @include button-outline-variant($btn-info-bg, $btn-info-color);
+}
+.btn-outline-success {
+ @include button-outline-variant($btn-success-bg, $btn-success-color);
+}
+.btn-outline-warning {
+ @include button-outline-variant($btn-warning-bg, $btn-warning-color);
+}
+.btn-outline-danger {
+ @include button-outline-variant($btn-danger-bg, $btn-danger-color);
+}
+
+
+//
+// Link buttons
+//
+
+// Make a button look and behave like a link
+.btn-link {
+ font-weight: $font-weight-normal;
+ color: $link-color;
+ border-radius: 0;
+
+ &,
+ &:active,
+ &.active,
+ &:disabled {
+ background-color: transparent;
+ @include box-shadow(none);
+ }
+ &,
+ &:focus,
+ &:active {
+ border-color: transparent;
+ }
+ @include hover {
+ border-color: transparent;
+ }
+ @include hover-focus {
+ color: $link-hover-color;
+ text-decoration: $link-hover-decoration;
+ background-color: transparent;
+ }
+ &:disabled {
+ color: $btn-link-disabled-color;
+
+ @include hover-focus {
+ text-decoration: none;
+ }
+ }
+}
+
+
+//
+// Button Sizes
+//
+
+.btn-lg {
+ // line-height: ensure even-numbered height of button next to large input
+ @include button-size($btn-padding-y-lg, $btn-padding-x-lg, $font-size-lg, $btn-border-radius-lg);
+}
+.btn-sm {
+ // line-height: ensure proper height of button next to small input
+ @include button-size($btn-padding-y-sm, $btn-padding-x-sm, $font-size-sm, $btn-border-radius-sm);
+}
+
+
+//
+// Block button
+//
+
+.btn-block {
+ display: block;
+ width: 100%;
+}
+
+// Vertically space out multiple block buttons
+.btn-block + .btn-block {
+ margin-top: $btn-block-spacing-y;
+}
+
+// Specificity overrides
+input[type="submit"],
+input[type="reset"],
+input[type="button"] {
+ &.btn-block {
+ width: 100%;
+ }
+}
diff --git a/templates/assets/bootstrap/scss/_card.scss b/templates/assets/bootstrap/scss/_card.scss
new file mode 100644
index 0000000..9fe70e8
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_card.scss
@@ -0,0 +1,276 @@
+//
+// Base styles
+//
+
+.card {
+ position: relative;
+ display: flex;
+ flex-direction: column;
+ background-color: $card-bg;
+ border: $card-border-width solid $card-border-color;
+ @include border-radius($card-border-radius);
+}
+
+.card-block {
+ // Enable `flex-grow: 1` for decks and groups so that card blocks take up
+ // as much space as possible, ensuring footers are aligned to the bottom.
+ flex: 1 1 auto;
+ padding: $card-spacer-x;
+}
+
+.card-title {
+ margin-bottom: $card-spacer-y;
+}
+
+.card-subtitle {
+ margin-top: -($card-spacer-y / 2);
+ margin-bottom: 0;
+}
+
+.card-text:last-child {
+ margin-bottom: 0;
+}
+
+.card-link {
+ @include hover {
+ text-decoration: none;
+ }
+
+ + .card-link {
+ margin-left: $card-spacer-x;
+ }
+}
+
+.card {
+ > .list-group:first-child {
+ .list-group-item:first-child {
+ @include border-top-radius($card-border-radius);
+ }
+ }
+
+ > .list-group:last-child {
+ .list-group-item:last-child {
+ @include border-bottom-radius($card-border-radius);
+ }
+ }
+}
+
+
+//
+// Optional textual caps
+//
+
+.card-header {
+ padding: $card-spacer-y $card-spacer-x;
+ margin-bottom: 0; // Removes the default margin-bottom of <hN>
+ background-color: $card-cap-bg;
+ border-bottom: $card-border-width solid $card-border-color;
+
+ &:first-child {
+ @include border-radius($card-border-radius-inner $card-border-radius-inner 0 0);
+ }
+}
+
+.card-footer {
+ padding: $card-spacer-y $card-spacer-x;
+ background-color: $card-cap-bg;
+ border-top: $card-border-width solid $card-border-color;
+
+ &:last-child {
+ @include border-radius(0 0 $card-border-radius-inner $card-border-radius-inner);
+ }
+}
+
+
+//
+// Header navs
+//
+
+.card-header-tabs {
+ margin-right: -($card-spacer-x / 2);
+ margin-bottom: -$card-spacer-y;
+ margin-left: -($card-spacer-x / 2);
+ border-bottom: 0;
+}
+
+.card-header-pills {
+ margin-right: -($card-spacer-x / 2);
+ margin-left: -($card-spacer-x / 2);
+}
+
+
+//
+// Background variations
+//
+
+.card-primary {
+ @include card-variant($brand-primary, $brand-primary);
+}
+.card-success {
+ @include card-variant($brand-success, $brand-success);
+}
+.card-info {
+ @include card-variant($brand-info, $brand-info);
+}
+.card-warning {
+ @include card-variant($brand-warning, $brand-warning);
+}
+.card-danger {
+ @include card-variant($brand-danger, $brand-danger);
+}
+
+// Remove all backgrounds
+.card-outline-primary {
+ @include card-outline-variant($btn-primary-bg);
+}
+.card-outline-secondary {
+ @include card-outline-variant($btn-secondary-border);
+}
+.card-outline-info {
+ @include card-outline-variant($btn-info-bg);
+}
+.card-outline-success {
+ @include card-outline-variant($btn-success-bg);
+}
+.card-outline-warning {
+ @include card-outline-variant($btn-warning-bg);
+}
+.card-outline-danger {
+ @include card-outline-variant($btn-danger-bg);
+}
+
+//
+// Inverse text within a card for use with dark backgrounds
+//
+
+.card-inverse {
+ @include card-inverse;
+}
+
+//
+// Blockquote
+//
+
+.card-blockquote {
+ padding: 0;
+ margin-bottom: 0;
+ border-left: 0;
+}
+
+// Card image
+.card-img {
+ // margin: -1.325rem;
+ @include border-radius($card-border-radius-inner);
+}
+.card-img-overlay {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ padding: $card-img-overlay-padding;
+}
+
+
+
+// Card image caps
+.card-img-top {
+ @include border-top-radius($card-border-radius-inner);
+}
+.card-img-bottom {
+ @include border-bottom-radius($card-border-radius-inner);
+}
+
+
+// Card deck
+
+@include media-breakpoint-up(sm) {
+ .card-deck {
+ display: flex;
+ flex-flow: row wrap;
+
+ .card {
+ display: flex;
+ flex: 1 0 0;
+ flex-direction: column;
+
+ // Selectively apply horizontal margins to cards to avoid doing the
+ // negative margin dance like our grid. This differs from the grid
+ // due to the use of margins as gutters instead of padding.
+ &:not(:first-child) { margin-left: $card-deck-margin; }
+ &:not(:last-child) { margin-right: $card-deck-margin; }
+ }
+ }
+}
+
+
+//
+// Card groups
+//
+
+@include media-breakpoint-up(sm) {
+ .card-group {
+ display: flex;
+ flex-flow: row wrap;
+
+ .card {
+ flex: 1 0 0;
+
+ + .card {
+ margin-left: 0;
+ border-left: 0;
+ }
+
+ // Handle rounded corners
+ @if $enable-rounded {
+ &:first-child {
+ @include border-right-radius(0);
+
+ .card-img-top {
+ border-top-right-radius: 0;
+ }
+ .card-img-bottom {
+ border-bottom-right-radius: 0;
+ }
+ }
+ &:last-child {
+ @include border-left-radius(0);
+
+ .card-img-top {
+ border-top-left-radius: 0;
+ }
+ .card-img-bottom {
+ border-bottom-left-radius: 0;
+ }
+ }
+
+ &:not(:first-child):not(:last-child) {
+ border-radius: 0;
+
+ .card-img-top,
+ .card-img-bottom {
+ border-radius: 0;
+ }
+ }
+ }
+ }
+ }
+}
+
+
+//
+// Columns
+//
+
+@include media-breakpoint-up(sm) {
+ .card-columns {
+ column-count: $card-columns-count;
+ column-gap: $card-columns-gap;
+
+ .card {
+ display: inline-block; // Don't let them vertically span multiple columns
+ width: 100%; // Don't let their width change
+ margin-bottom: $card-columns-margin;
+ }
+ }
+}
diff --git a/templates/assets/bootstrap/scss/_carousel.scss b/templates/assets/bootstrap/scss/_carousel.scss
new file mode 100644
index 0000000..1b6e450
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_carousel.scss
@@ -0,0 +1,177 @@
+// Wrapper for the slide container and indicators
+.carousel {
+ position: relative;
+}
+
+.carousel-inner {
+ position: relative;
+ width: 100%;
+ overflow: hidden;
+}
+
+.carousel-item {
+ position: relative;
+ display: none;
+ width: 100%;
+
+ @include if-supports-3d-transforms() {
+ @include transition($carousel-transition);
+ backface-visibility: hidden;
+ perspective: 1000px;
+ }
+}
+
+.carousel-item.active,
+.carousel-item-next,
+.carousel-item-prev {
+ display: flex;
+}
+
+.carousel-item-next,
+.carousel-item-prev {
+ position: absolute;
+ top: 0;
+}
+
+// CSS3 transforms when supported by the browser
+@include if-supports-3d-transforms() {
+ .carousel-item-next.carousel-item-left,
+ .carousel-item-prev.carousel-item-right {
+ transform: translate3d(0, 0, 0);
+ }
+
+ .carousel-item-next,
+ .active.carousel-item-right {
+ transform: translate3d(100%, 0, 0);
+ }
+
+ .carousel-item-prev,
+ .active.carousel-item-left {
+ transform: translate3d(-100%, 0, 0);
+ }
+}
+
+
+//
+// Left/right controls for nav
+//
+
+.carousel-control-prev,
+.carousel-control-next {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ // Use flex for alignment (1-3)
+ display: flex; // 1. allow flex styles
+ align-items: center; // 2. vertically center contents
+ justify-content: center; // 3. horizontally center contents
+ width: $carousel-control-width;
+ color: $carousel-control-color;
+ text-align: center;
+ opacity: $carousel-control-opacity;
+ // We can't have a transition here because WebKit cancels the carousel
+ // animation if you trip this while in the middle of another animation.
+
+ // Hover/focus state
+ @include hover-focus {
+ color: $carousel-control-color;
+ text-decoration: none;
+ outline: 0;
+ opacity: .9;
+ }
+}
+.carousel-control-prev {
+ left: 0;
+}
+.carousel-control-next {
+ right: 0;
+}
+
+// Icons for within
+.carousel-control-prev-icon,
+.carousel-control-next-icon {
+ display: inline-block;
+ width: $carousel-control-icon-width;
+ height: $carousel-control-icon-width;
+ background: transparent no-repeat center center;
+ background-size: 100% 100%;
+}
+.carousel-control-prev-icon {
+ background-image: $carousel-control-prev-icon-bg;
+}
+.carousel-control-next-icon {
+ background-image: $carousel-control-next-icon-bg;
+}
+
+
+// Optional indicator pips
+//
+// Add an ordered list with the following class and add a list item for each
+// slide your carousel holds.
+
+.carousel-indicators {
+ position: absolute;
+ right: 0;
+ bottom: 10px;
+ left: 0;
+ z-index: 15;
+ display: flex;
+ justify-content: center;
+ padding-left: 0; // override <ol> default
+ // Use the .carousel-control's width as margin so we don't overlay those
+ margin-right: $carousel-control-width;
+ margin-left: $carousel-control-width;
+ list-style: none;
+
+ li {
+ position: relative;
+ flex: 1 0 auto;
+ max-width: $carousel-indicator-width;
+ height: $carousel-indicator-height;
+ margin-right: $carousel-indicator-spacer;
+ margin-left: $carousel-indicator-spacer;
+ text-indent: -999px;
+ background-color: rgba($carousel-indicator-active-bg, .5);
+
+ // Use pseudo classes to increase the hit area by 10px on top and bottom.
+ &::before {
+ position: absolute;
+ top: -10px;
+ left: 0;
+ display: inline-block;
+ width: 100%;
+ height: 10px;
+ content: "";
+ }
+ &::after {
+ position: absolute;
+ bottom: -10px;
+ left: 0;
+ display: inline-block;
+ width: 100%;
+ height: 10px;
+ content: "";
+ }
+ }
+
+ .active {
+ background-color: $carousel-indicator-active-bg;
+ }
+}
+
+
+// Optional captions
+//
+//
+
+.carousel-caption {
+ position: absolute;
+ right: ((100% - $carousel-caption-width) / 2);
+ bottom: 20px;
+ left: ((100% - $carousel-caption-width) / 2);
+ z-index: 10;
+ padding-top: 20px;
+ padding-bottom: 20px;
+ color: $carousel-caption-color;
+ text-align: center;
+}
diff --git a/templates/assets/bootstrap/scss/_close.scss b/templates/assets/bootstrap/scss/_close.scss
new file mode 100644
index 0000000..f181490
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_close.scss
@@ -0,0 +1,29 @@
+.close {
+ float: right;
+ font-size: $close-font-size;
+ font-weight: $close-font-weight;
+ line-height: 1;
+ color: $close-color;
+ text-shadow: $close-text-shadow;
+ opacity: .5;
+
+ @include hover-focus {
+ color: $close-color;
+ text-decoration: none;
+ opacity: .75;
+ }
+}
+
+// Additional properties for button version
+// iOS requires the button element instead of an anchor tag.
+// If you want the anchor version, it requires `href="#"`.
+// See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
+
+// scss-lint:disable QualifyingElement
+button.close {
+ padding: 0;
+ background: transparent;
+ border: 0;
+ -webkit-appearance: none;
+}
+// scss-lint:enable QualifyingElement
diff --git a/templates/assets/bootstrap/scss/_code.scss b/templates/assets/bootstrap/scss/_code.scss
new file mode 100644
index 0000000..759da15
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_code.scss
@@ -0,0 +1,64 @@
+// Inline and block code styles
+code,
+kbd,
+pre,
+samp {
+ font-family: $font-family-monospace;
+}
+
+// Inline code
+code {
+ padding: $code-padding-y $code-padding-x;
+ font-size: $code-font-size;
+ color: $code-color;
+ background-color: $code-bg;
+ @include border-radius($border-radius);
+
+ // Streamline the style when inside anchors to avoid broken underline and more
+ a > & {
+ padding: 0;
+ color: inherit;
+ background-color: inherit;
+ }
+}
+
+// User input typically entered via keyboard
+kbd {
+ padding: $code-padding-y $code-padding-x;
+ font-size: $code-font-size;
+ color: $kbd-color;
+ background-color: $kbd-bg;
+ @include border-radius($border-radius-sm);
+ @include box-shadow($kbd-box-shadow);
+
+ kbd {
+ padding: 0;
+ font-size: 100%;
+ font-weight: $nested-kbd-font-weight;
+ @include box-shadow(none);
+ }
+}
+
+// Blocks of code
+pre {
+ display: block;
+ margin-top: 0;
+ margin-bottom: 1rem;
+ font-size: $code-font-size;
+ color: $pre-color;
+
+ // Account for some code outputs that place code tags in pre tags
+ code {
+ padding: 0;
+ font-size: inherit;
+ color: inherit;
+ background-color: transparent;
+ border-radius: 0;
+ }
+}
+
+// Enable scrollable blocks of code
+.pre-scrollable {
+ max-height: $pre-scrollable-max-height;
+ overflow-y: scroll;
+}
diff --git a/templates/assets/bootstrap/scss/_custom-forms.scss b/templates/assets/bootstrap/scss/_custom-forms.scss
new file mode 100644
index 0000000..d303c48
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_custom-forms.scss
@@ -0,0 +1,258 @@
+// scss-lint:disable PropertyCount, VendorPrefix
+
+// Embedded icons from Open Iconic.
+// Released under MIT and copyright 2014 Waybury.
+// https://useiconic.com/open
+
+
+// Checkboxes and radios
+//
+// Base class takes care of all the key behavioral aspects.
+
+.custom-control {
+ position: relative;
+ display: inline-flex;
+ min-height: (1rem * $line-height-base);
+ padding-left: $custom-control-gutter;
+ margin-right: $custom-control-spacer-x;
+}
+
+.custom-control-input {
+ position: absolute;
+ z-index: -1; // Put the input behind the label so it doesn't overlay text
+ opacity: 0;
+
+ &:checked ~ .custom-control-indicator {
+ color: $custom-control-checked-indicator-color;
+ background-color: $custom-control-checked-indicator-bg;
+ @include box-shadow($custom-control-checked-indicator-box-shadow);
+ }
+
+ &:focus ~ .custom-control-indicator {
+ // the mixin is not used here to make sure there is feedback
+ box-shadow: $custom-control-focus-indicator-box-shadow;
+ }
+
+ &:active ~ .custom-control-indicator {
+ color: $custom-control-active-indicator-color;
+ background-color: $custom-control-active-indicator-bg;
+ @include box-shadow($custom-control-active-indicator-box-shadow);
+ }
+
+ &:disabled {
+ ~ .custom-control-indicator {
+ cursor: $custom-control-disabled-cursor;
+ background-color: $custom-control-disabled-indicator-bg;
+ }
+
+ ~ .custom-control-description {
+ color: $custom-control-disabled-description-color;
+ cursor: $custom-control-disabled-cursor;
+ }
+ }
+}
+
+// Custom indicator
+//
+// Generates a shadow element to create our makeshift checkbox/radio background.
+
+.custom-control-indicator {
+ position: absolute;
+ top: (($line-height-base - $custom-control-indicator-size) / 2);
+ left: 0;
+ display: block;
+ width: $custom-control-indicator-size;
+ height: $custom-control-indicator-size;
+ pointer-events: none;
+ user-select: none;
+ background-color: $custom-control-indicator-bg;
+ background-repeat: no-repeat;
+ background-position: center center;
+ background-size: $custom-control-indicator-bg-size;
+ @include box-shadow($custom-control-indicator-box-shadow);
+}
+
+// Checkboxes
+//
+// Tweak just a few things for checkboxes.
+
+.custom-checkbox {
+ .custom-control-indicator {
+ @include border-radius($custom-checkbox-radius);
+ }
+
+ .custom-control-input:checked ~ .custom-control-indicator {
+ background-image: $custom-checkbox-checked-icon;
+ }
+
+ .custom-control-input:indeterminate ~ .custom-control-indicator {
+ background-color: $custom-checkbox-indeterminate-bg;
+ background-image: $custom-checkbox-indeterminate-icon;
+ @include box-shadow($custom-checkbox-indeterminate-box-shadow);
+ }
+}
+
+// Radios
+//
+// Tweak just a few things for radios.
+
+.custom-radio {
+ .custom-control-indicator {
+ border-radius: $custom-radio-radius;
+ }
+
+ .custom-control-input:checked ~ .custom-control-indicator {
+ background-image: $custom-radio-checked-icon;
+ }
+}
+
+
+// Layout options
+//
+// By default radios and checkboxes are `inline-block` with no additional spacing
+// set. Use these optional classes to tweak the layout.
+
+.custom-controls-stacked {
+ display: flex;
+ flex-direction: column;
+
+ .custom-control {
+ margin-bottom: $custom-control-spacer-y;
+
+ + .custom-control {
+ margin-left: 0;
+ }
+ }
+}
+
+
+// Select
+//
+// Replaces the browser default select with a custom one, mostly pulled from
+// http://primercss.io.
+//
+
+.custom-select {
+ display: inline-block;
+ max-width: 100%;
+ $select-border-width: ($custom-select-border-width * 2);
+ height: calc(#{$input-height} + #{$select-border-width});
+ padding: $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding) $custom-select-padding-y $custom-select-padding-x;
+ line-height: $custom-select-line-height;
+ color: $custom-select-color;
+ vertical-align: middle;
+ background: $custom-select-bg $custom-select-indicator no-repeat right $custom-select-padding-x center;
+ background-size: $custom-select-bg-size;
+ border: $custom-select-border-width solid $custom-select-border-color;
+ @include border-radius($custom-select-border-radius);
+ appearance: none;
+
+ &:focus {
+ border-color: $custom-select-focus-border-color;
+ outline: none;
+ @include box-shadow($custom-select-focus-box-shadow);
+
+ &::-ms-value {
+ // For visual consistency with other platforms/browsers,
+ // supress the default white text on blue background highlight given to
+ // the selected option text when the (still closed) <select> receives focus
+ // in IE and (under certain conditions) Edge.
+ // See https://github.com/twbs/bootstrap/issues/19398.
+ color: $input-color;
+ background-color: $input-bg;
+ }
+ }
+
+ &:disabled {
+ color: $custom-select-disabled-color;
+ cursor: $cursor-disabled;
+ background-color: $custom-select-disabled-bg;
+ }
+
+ // Hides the default caret in IE11
+ &::-ms-expand {
+ opacity: 0;
+ }
+}
+
+.custom-select-sm {
+ padding-top: $custom-select-padding-y;
+ padding-bottom: $custom-select-padding-y;
+ font-size: $custom-select-sm-font-size;
+
+ // &:not([multiple]) {
+ // height: 26px;
+ // min-height: 26px;
+ // }
+}
+
+
+// File
+//
+// Custom file input.
+
+.custom-file {
+ position: relative;
+ display: inline-block;
+ max-width: 100%;
+ height: $custom-file-height;
+ margin-bottom: 0;
+}
+
+.custom-file-input {
+ min-width: $custom-file-width;
+ max-width: 100%;
+ height: $custom-file-height;
+ margin: 0;
+ opacity: 0;
+
+ &:focus ~ .custom-file-control {
+ @include box-shadow($custom-file-focus-box-shadow);
+ }
+}
+
+.custom-file-control {
+ position: absolute;
+ top: 0;
+ right: 0;
+ left: 0;
+ z-index: 5;
+ height: $custom-file-height;
+ padding: $custom-file-padding-x $custom-file-padding-y;
+ line-height: $custom-file-line-height;
+ color: $custom-file-color;
+ pointer-events: none;
+ user-select: none;
+ background-color: $custom-file-bg;
+ border: $custom-file-border-width solid $custom-file-border-color;
+ @include border-radius($custom-file-border-radius);
+ @include box-shadow($custom-file-box-shadow);
+
+ @each $lang, $text in map-get($custom-file-text, placeholder) {
+ &:lang(#{$lang}):empty::after {
+ content: $text;
+ }
+ }
+
+ &::before {
+ position: absolute;
+ top: -$custom-file-border-width;
+ right: -$custom-file-border-width;
+ bottom: -$custom-file-border-width;
+ z-index: 6;
+ display: block;
+ height: $custom-file-height;
+ padding: $custom-file-padding-x $custom-file-padding-y;
+ line-height: $custom-file-line-height;
+ color: $custom-file-button-color;
+ background-color: $custom-file-button-bg;
+ border: $custom-file-border-width solid $custom-file-border-color;
+ @include border-radius(0 $custom-file-border-radius $custom-file-border-radius 0);
+ }
+
+ @each $lang, $text in map-get($custom-file-text, button-label) {
+ &:lang(#{$lang})::before {
+ content: $text;
+ }
+ }
+}
diff --git a/templates/assets/bootstrap/scss/_custom.scss b/templates/assets/bootstrap/scss/_custom.scss
new file mode 100644
index 0000000..88ccf20
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_custom.scss
@@ -0,0 +1,4 @@
+// Bootstrap overrides
+//
+// Copy variables from `_variables.scss` to this file to override default values
+// without modifying source files.
diff --git a/templates/assets/bootstrap/scss/_dropdown.scss b/templates/assets/bootstrap/scss/_dropdown.scss
new file mode 100644
index 0000000..404483e
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_dropdown.scss
@@ -0,0 +1,156 @@
+// The dropdown wrapper (`<div>`)
+.dropup,
+.dropdown {
+ position: relative;
+}
+
+.dropdown-toggle {
+ // Generate the caret automatically
+ &::after {
+ display: inline-block;
+ width: 0;
+ height: 0;
+ margin-left: $caret-width;
+ vertical-align: middle;
+ content: "";
+ border-top: $caret-width solid;
+ border-right: $caret-width solid transparent;
+ border-left: $caret-width solid transparent;
+ }
+}
+
+.dropup {
+ .dropdown-toggle {
+ &::after {
+ border-top: 0;
+ border-bottom: $caret-width solid;
+ }
+ }
+}
+
+// The dropdown menu
+.dropdown-menu {
+ position: absolute;
+ top: 100%;
+ left: 0;
+ z-index: $zindex-dropdown;
+ display: none; // none by default, but block on "open" of the menu
+ float: left;
+ min-width: $dropdown-min-width;
+ padding: $dropdown-padding-y 0;
+ margin: $dropdown-margin-top 0 0; // override default ul
+ font-size: $font-size-base; // Redeclare because nesting can cause inheritance issues
+ color: $body-color;
+ text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
+ list-style: none;
+ background-color: $dropdown-bg;
+ background-clip: padding-box;
+ border: $dropdown-border-width solid $dropdown-border-color;
+ @include border-radius($border-radius);
+ @include box-shadow($dropdown-box-shadow);
+}
+
+// Dividers (basically an `<hr>`) within the dropdown
+.dropdown-divider {
+ @include nav-divider($dropdown-divider-bg);
+}
+
+// Links, buttons, and more within the dropdown menu
+//
+// `<button>`-specific styles are denoted with `// For <button>s`
+.dropdown-item {
+ display: block;
+ width: 100%; // For `<button>`s
+ padding: 3px $dropdown-item-padding-x;
+ clear: both;
+ font-weight: $font-weight-normal;
+ color: $dropdown-link-color;
+ text-align: inherit; // For `<button>`s
+ white-space: nowrap; // prevent links from randomly breaking onto new lines
+ background: none; // For `<button>`s
+ border: 0; // For `<button>`s
+
+ @include hover-focus {
+ color: $dropdown-link-hover-color;
+ text-decoration: none;
+ background-color: $dropdown-link-hover-bg;
+ }
+
+ &.active,
+ &:active {
+ color: $dropdown-link-active-color;
+ text-decoration: none;
+ background-color: $dropdown-link-active-bg;
+ }
+
+ &.disabled,
+ &:disabled {
+ color: $dropdown-link-disabled-color;
+ cursor: $cursor-disabled;
+ background-color: transparent;
+ // Remove CSS gradients if they're enabled
+ @if $enable-gradients {
+ background-image: none;
+ }
+ }
+}
+
+// Open state for the dropdown
+.show {
+ // Show the menu
+ > .dropdown-menu {
+ display: block;
+ }
+
+ // Remove the outline when :focus is triggered
+ > a {
+ outline: 0;
+ }
+}
+
+// Menu positioning
+//
+// Add extra class to `.dropdown-menu` to flip the alignment of the dropdown
+// menu with the parent.
+.dropdown-menu-right {
+ right: 0;
+ left: auto; // Reset the default from `.dropdown-menu`
+}
+
+.dropdown-menu-left {
+ right: auto;
+ left: 0;
+}
+
+// Dropdown section headers
+.dropdown-header {
+ display: block;
+ padding: $dropdown-padding-y $dropdown-item-padding-x;
+ margin-bottom: 0; // for use with heading elements
+ font-size: $font-size-sm;
+ color: $dropdown-header-color;
+ white-space: nowrap; // as with > li > a
+}
+
+// Backdrop to catch body clicks on mobile, etc.
+.dropdown-backdrop {
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: $zindex-dropdown-backdrop;
+}
+
+// Allow for dropdowns to go bottom up (aka, dropup-menu)
+//
+// Just add .dropup after the standard .dropdown class and you're set.
+
+.dropup {
+ // Different positioning for bottom up menu
+ .dropdown-menu {
+ top: auto;
+ bottom: 100%;
+ margin-bottom: $dropdown-margin-top;
+ }
+}
diff --git a/templates/assets/bootstrap/scss/_forms.scss b/templates/assets/bootstrap/scss/_forms.scss
new file mode 100644
index 0000000..4ec9f6e
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_forms.scss
@@ -0,0 +1,387 @@
+// scss-lint:disable QualifyingElement, VendorPrefix
+
+//
+// Textual form controls
+//
+
+.form-control {
+ display: block;
+ width: 100%;
+ // // Make inputs at least the height of their button counterpart (base line-height + padding + border)
+ // height: $input-height;
+ padding: $input-padding-y $input-padding-x;
+ font-size: $font-size-base;
+ line-height: $input-line-height;
+ color: $input-color;
+ background-color: $input-bg;
+ // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214.
+ background-image: none;
+ background-clip: padding-box;
+ border: $input-btn-border-width solid $input-border-color;
+
+ // Note: This has no effect on <select>s in some browsers, due to the limited stylability of `<select>`s in CSS.
+ @if $enable-rounded {
+ // Manually use the if/else instead of the mixin to account for iOS override
+ border-radius: $input-border-radius;
+ } @else {
+ // Otherwise undo the iOS default
+ border-radius: 0;
+ }
+
+ @include box-shadow($input-box-shadow);
+ @include transition($input-transition);
+
+ // Unstyle the caret on `<select>`s in IE10+.
+ &::-ms-expand {
+ background-color: transparent;
+ border: 0;
+ }
+
+ // Customize the `:focus` state to imitate native WebKit styles.
+ @include form-control-focus();
+
+ // Placeholder
+ &::placeholder {
+ color: $input-color-placeholder;
+ // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526.
+ opacity: 1;
+ }
+
+ // Disabled and read-only inputs
+ //
+ // HTML5 says that controls under a fieldset > legend:first-child won't be
+ // disabled if the fieldset is disabled. Due to implementation difficulty, we
+ // don't honor that edge case; we style them as disabled anyway.
+ &:disabled,
+ &[readonly] {
+ background-color: $input-bg-disabled;
+ // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655.
+ opacity: 1;
+ }
+
+ &:disabled {
+ cursor: $cursor-disabled;
+ }
+}
+
+select.form-control {
+ &:not([size]):not([multiple]) {
+ $select-border-width: ($border-width * 2);
+ height: calc(#{$input-height} + #{$select-border-width});
+ }
+
+ &:focus::-ms-value {
+ // Suppress the nested default white text on blue background highlight given to
+ // the selected option text when the (still closed) <select> receives focus
+ // in IE and (under certain conditions) Edge, as it looks bad and cannot be made to
+ // match the appearance of the native widget.
+ // See https://github.com/twbs/bootstrap/issues/19398.
+ color: $input-color;
+ background-color: $input-bg;
+ }
+}
+
+// Make file inputs better match text inputs by forcing them to new lines.
+.form-control-file,
+.form-control-range {
+ display: block;
+}
+
+
+//
+// Labels
+//
+
+// For use with horizontal and inline forms, when you need the label text to
+// align with the form controls.
+.col-form-label {
+ padding-top: calc(#{$input-padding-y} - #{$input-btn-border-width} * 2);
+ padding-bottom: calc(#{$input-padding-y} - #{$input-btn-border-width} * 2);
+ margin-bottom: 0; // Override the `<label>` default
+}
+
+.col-form-label-lg {
+ padding-top: calc(#{$input-padding-y-lg} - #{$input-btn-border-width} * 2);
+ padding-bottom: calc(#{$input-padding-y-lg} - #{$input-btn-border-width} * 2);
+ font-size: $font-size-lg;
+}
+
+.col-form-label-sm {
+ padding-top: calc(#{$input-padding-y-sm} - #{$input-btn-border-width} * 2);
+ padding-bottom: calc(#{$input-padding-y-sm} - #{$input-btn-border-width} * 2);
+ font-size: $font-size-sm;
+}
+
+
+//
+// Legends
+//
+
+// For use with horizontal and inline forms, when you need the legend text to
+// be the same size as regular labels, and to align with the form controls.
+.col-form-legend {
+ padding-top: $input-padding-y;
+ padding-bottom: $input-padding-y;
+ margin-bottom: 0;
+ font-size: $font-size-base;
+}
+
+
+// Static form control text
+//
+// Apply class to an element to make any string of text align with labels in a
+// horizontal form layout.
+
+.form-control-static {
+ padding-top: $input-padding-y;
+ padding-bottom: $input-padding-y;
+ margin-bottom: 0; // match inputs if this class comes on inputs with default margins
+ line-height: $input-line-height;
+ border: solid transparent;
+ border-width: $input-btn-border-width 0;
+
+ &.form-control-sm,
+ &.form-control-lg {
+ padding-right: 0;
+ padding-left: 0;
+ }
+}
+
+
+// Form control sizing
+//
+// Build on `.form-control` with modifier classes to decrease or increase the
+// height and font-size of form controls.
+//
+// The `.form-group-* form-control` variations are sadly duplicated to avoid the
+// issue documented in https://github.com/twbs/bootstrap/issues/15074.
+
+.form-control-sm {
+ padding: $input-padding-y-sm $input-padding-x-sm;
+ font-size: $font-size-sm;
+ @include border-radius($input-border-radius-sm);
+}
+
+select.form-control-sm {
+ &:not([size]):not([multiple]) {
+ height: $input-height-sm;
+ }
+}
+
+.form-control-lg {
+ padding: $input-padding-y-lg $input-padding-x-lg;
+ font-size: $font-size-lg;
+ @include border-radius($input-border-radius-lg);
+}
+
+select.form-control-lg {
+ &:not([size]):not([multiple]) {
+ height: $input-height-lg;
+ }
+}
+
+
+// Form groups
+//
+// Designed to help with the organization and spacing of vertical forms. For
+// horizontal forms, use the predefined grid classes.
+
+.form-group {
+ margin-bottom: $form-group-margin-bottom;
+}
+
+.form-text {
+ display: block;
+ margin-top: $form-text-margin-top;
+}
+
+
+// Checkboxes and radios
+//
+// Indent the labels to position radios/checkboxes as hanging controls.
+
+.form-check {
+ position: relative;
+ display: block;
+ margin-bottom: $form-check-margin-bottom;
+
+ &.disabled {
+ .form-check-label {
+ color: $text-muted;
+ cursor: $cursor-disabled;
+ }
+ }
+}
+
+.form-check-label {
+ padding-left: $form-check-input-gutter;
+ margin-bottom: 0; // Override default `<label>` bottom margin
+}
+
+.form-check-input {
+ position: absolute;
+ margin-top: $form-check-input-margin-y;
+ margin-left: -$form-check-input-gutter;
+
+ &:only-child {
+ position: static;
+ }
+}
+
+// Radios and checkboxes on same line
+.form-check-inline {
+ display: inline-block;
+
+ .form-check-label {
+ vertical-align: middle;
+ }
+
+ + .form-check-inline {
+ margin-left: $form-check-inline-margin-x;
+ }
+}
+
+
+// Form control feedback states
+//
+// Apply contextual and semantic states to individual form controls.
+
+.form-control-feedback {
+ margin-top: $form-feedback-margin-top;
+}
+
+.form-control-success,
+.form-control-warning,
+.form-control-danger {
+ padding-right: ($input-padding-x * 3);
+ background-repeat: no-repeat;
+ background-position: center right ($input-height / 4);
+ background-size: ($input-height / 2) ($input-height / 2);
+}
+
+// Form validation states
+.has-success {
+ @include form-control-validation($brand-success);
+
+ .form-control-success {
+ background-image: $form-icon-success;
+ }
+}
+
+.has-warning {
+ @include form-control-validation($brand-warning);
+
+ .form-control-warning {
+ background-image: $form-icon-warning;
+ }
+}
+
+.has-danger {
+ @include form-control-validation($brand-danger);
+
+ .form-control-danger {
+ background-image: $form-icon-danger;
+ }
+}
+
+
+// Inline forms
+//
+// Make forms appear inline(-block) by adding the `.form-inline` class. Inline
+// forms begin stacked on extra small (mobile) devices and then go inline when
+// viewports reach <768px.
+//
+// Requires wrapping inputs and labels with `.form-group` for proper display of
+// default HTML form controls and our custom form controls (e.g., input groups).
+
+.form-inline {
+ display: flex;
+ flex-flow: row wrap;
+ align-items: center; // Prevent shorter elements from growing to same height as others (e.g., small buttons growing to normal sized button height)
+
+ // Because we use flex, the initial sizing of checkboxes is collapsed and
+ // doesn't occupy the full-width (which is what we want for xs grid tier),
+ // so we force that here.
+ .form-check {
+ width: 100%;
+ }
+
+ // Kick in the inline
+ @include media-breakpoint-up(sm) {
+ label {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-bottom: 0;
+ }
+
+ // Inline-block all the things for "inline"
+ .form-group {
+ display: flex;
+ flex: 0 0 auto;
+ flex-flow: row wrap;
+ align-items: center;
+ margin-bottom: 0;
+ }
+
+ // Allow folks to *not* use `.form-group`
+ .form-control {
+ display: inline-block;
+ width: auto; // Prevent labels from stacking above inputs in `.form-group`
+ vertical-align: middle;
+ }
+
+ // Make static controls behave like regular ones
+ .form-control-static {
+ display: inline-block;
+ }
+
+ .input-group {
+ width: auto;
+ }
+
+ .form-control-label {
+ margin-bottom: 0;
+ vertical-align: middle;
+ }
+
+ // Remove default margin on radios/checkboxes that were used for stacking, and
+ // then undo the floating of radios and checkboxes to match.
+ .form-check {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: auto;
+ margin-top: 0;
+ margin-bottom: 0;
+ }
+ .form-check-label {
+ padding-left: 0;
+ }
+ .form-check-input {
+ position: relative;
+ margin-top: 0;
+ margin-right: $form-check-input-margin-x;
+ margin-left: 0;
+ }
+
+ // Custom form controls
+ .custom-control {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding-left: 0;
+ }
+ .custom-control-indicator {
+ position: static;
+ display: inline-block;
+ margin-right: $form-check-input-margin-x; // Flexbox alignment means we lose our HTML space here, so we compensate.
+ vertical-align: text-bottom;
+ }
+
+ // Re-override the feedback icon.
+ .has-feedback .form-control-feedback {
+ top: 0;
+ }
+ }
+}
diff --git a/templates/assets/bootstrap/scss/_grid.scss b/templates/assets/bootstrap/scss/_grid.scss
new file mode 100644
index 0000000..8c7a9ee
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_grid.scss
@@ -0,0 +1,52 @@
+// Container widths
+//
+// Set the container width, and override it for fixed navbars in media queries.
+
+@if $enable-grid-classes {
+ .container {
+ @include make-container();
+ @include make-container-max-widths();
+ }
+}
+
+// Fluid container
+//
+// Utilizes the mixin meant for fixed width containers, but without any defined
+// width for fluid, full width layouts.
+
+@if $enable-grid-classes {
+ .container-fluid {
+ @include make-container();
+ }
+}
+
+// Row
+//
+// Rows contain and clear the floats of your columns.
+
+@if $enable-grid-classes {
+ .row {
+ @include make-row();
+ }
+
+ // Remove the negative margin from default .row, then the horizontal padding
+ // from all immediate children columns (to prevent runaway style inheritance).
+ .no-gutters {
+ margin-right: 0;
+ margin-left: 0;
+
+ > .col,
+ > [class*="col-"] {
+ padding-right: 0;
+ padding-left: 0;
+ }
+ }
+}
+
+// Columns
+//
+// Common styles for small and large grid columns
+
+@if $enable-grid-classes {
+ @include make-grid-columns();
+}
diff --git a/templates/assets/bootstrap/scss/_images.scss b/templates/assets/bootstrap/scss/_images.scss
new file mode 100644
index 0000000..50c5610
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_images.scss
@@ -0,0 +1,43 @@
+// Responsive images (ensure images don't scale beyond their parents)
+//
+// This is purposefully opt-in via an explicit class rather than being the default for all `<img>`s.
+// We previously tried the "images are responsive by default" approach in Bootstrap v2,
+// and abandoned it in Bootstrap v3 because it breaks lots of third-party widgets (including Google Maps)
+// which weren't expecting the images within themselves to be involuntarily resized.
+// See also https://github.com/twbs/bootstrap/issues/18178
+.img-fluid {
+ @include img-fluid;
+}
+
+
+// Image thumbnails
+.img-thumbnail {
+ padding: $thumbnail-padding;
+ background-color: $thumbnail-bg;
+ border: $thumbnail-border-width solid $thumbnail-border-color;
+ @include border-radius($thumbnail-border-radius);
+ @include transition($thumbnail-transition);
+ @include box-shadow($thumbnail-box-shadow);
+
+ // Keep them at most 100% wide
+ @include img-fluid;
+}
+
+//
+// Figures
+//
+
+.figure {
+ // Ensures the caption's text aligns with the image.
+ display: inline-block;
+}
+
+.figure-img {
+ margin-bottom: ($spacer / 2);
+ line-height: 1;
+}
+
+.figure-caption {
+ font-size: $figure-caption-font-size;
+ color: $figure-caption-color;
+}
diff --git a/templates/assets/bootstrap/scss/_input-group.scss b/templates/assets/bootstrap/scss/_input-group.scss
new file mode 100644
index 0000000..49cdf28
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_input-group.scss
@@ -0,0 +1,175 @@
+//
+// Base styles
+//
+
+.input-group {
+ position: relative;
+ display: flex;
+ width: 100%;
+
+ .form-control {
+ // Ensure that the input is always above the *appended* addon button for
+ // proper border colors.
+ position: relative;
+ z-index: 2;
+ flex: 1 1 auto;
+ // Add width 1% and flex-basis auto to ensure that button will not wrap out
+ // the column. Applies to IE Edge+ and Firefox. Chrome does not require this.
+ width: 1%;
+ margin-bottom: 0;
+
+ // Bring the "active" form control to the front
+ @include hover-focus-active {
+ z-index: 3;
+ }
+ }
+}
+
+.input-group-addon,
+.input-group-btn,
+.input-group .form-control {
+ // Vertically centers the content of the addons within the input group
+ display: flex;
+ align-items: center;
+
+ &:not(:first-child):not(:last-child) {
+ @include border-radius(0);
+ }
+}
+
+.input-group-addon,
+.input-group-btn {
+ white-space: nowrap;
+ vertical-align: middle; // Match the inputs
+}
+
+
+// Sizing options
+//
+// Remix the default form control sizing classes into new ones for easier
+// manipulation.
+
+.input-group-lg > .form-control,
+.input-group-lg > .input-group-addon,
+.input-group-lg > .input-group-btn > .btn {
+ @extend .form-control-lg;
+}
+.input-group-sm > .form-control,
+.input-group-sm > .input-group-addon,
+.input-group-sm > .input-group-btn > .btn {
+ @extend .form-control-sm;
+}
+
+
+//
+// Text input groups
+//
+
+.input-group-addon {
+ padding: $input-padding-y $input-padding-x;
+ margin-bottom: 0; // Allow use of <label> elements by overriding our default margin-bottom
+ font-size: $font-size-base; // Match inputs
+ font-weight: $font-weight-normal;
+ line-height: $input-line-height;
+ color: $input-color;
+ text-align: center;
+ background-color: $input-group-addon-bg;
+ border: $input-btn-border-width solid $input-group-addon-border-color;
+ @include border-radius($input-border-radius);
+
+ // Sizing
+ &.form-control-sm {
+ padding: $input-padding-y-sm $input-padding-x-sm;
+ font-size: $font-size-sm;
+ @include border-radius($input-border-radius-sm);
+ }
+ &.form-control-lg {
+ padding: $input-padding-y-lg $input-padding-x-lg;
+ font-size: $font-size-lg;
+ @include border-radius($input-border-radius-lg);
+ }
+
+ // scss-lint:disable QualifyingElement
+ // Nuke default margins from checkboxes and radios to vertically center within.
+ input[type="radio"],
+ input[type="checkbox"] {
+ margin-top: 0;
+ }
+ // scss-lint:enable QualifyingElement
+}
+
+
+//
+// Reset rounded corners
+//
+
+.input-group .form-control:not(:last-child),
+.input-group-addon:not(:last-child),
+.input-group-btn:not(:last-child) > .btn,
+.input-group-btn:not(:last-child) > .btn-group > .btn,
+.input-group-btn:not(:last-child) > .dropdown-toggle,
+.input-group-btn:not(:first-child) > .btn:not(:last-child):not(.dropdown-toggle),
+.input-group-btn:not(:first-child) > .btn-group:not(:last-child) > .btn {
+ @include border-right-radius(0);
+}
+.input-group-addon:not(:last-child) {
+ border-right: 0;
+}
+.input-group .form-control:not(:first-child),
+.input-group-addon:not(:first-child),
+.input-group-btn:not(:first-child) > .btn,
+.input-group-btn:not(:first-child) > .btn-group > .btn,
+.input-group-btn:not(:first-child) > .dropdown-toggle,
+.input-group-btn:not(:last-child) > .btn:not(:first-child),
+.input-group-btn:not(:last-child) > .btn-group:not(:first-child) > .btn {
+ @include border-left-radius(0);
+}
+.form-control + .input-group-addon:not(:first-child) {
+ border-left: 0;
+}
+
+//
+// Button input groups
+//
+
+.input-group-btn {
+ position: relative;
+ // Jankily prevent input button groups from wrapping with `white-space` and
+ // `font-size` in combination with `inline-block` on buttons.
+ font-size: 0;
+ white-space: nowrap;
+
+ // Negative margin for spacing, position for bringing hovered/focused/actived
+ // element above the siblings.
+ > .btn {
+ position: relative;
+
+ + .btn {
+ margin-left: (-$input-btn-border-width);
+ }
+
+ // Bring the "active" button to the front
+ @include hover-focus-active {
+ z-index: 3;
+ }
+ }
+
+ // Negative margin to only have a single, shared border between the two
+ &:not(:last-child) {
+ > .btn,
+ > .btn-group {
+ margin-right: (-$input-btn-border-width);
+ }
+ }
+ &:not(:first-child) {
+ > .btn,
+ > .btn-group {
+ z-index: 2;
+ margin-left: (-$input-btn-border-width);
+ // Because specificity
+ @include hover-focus-active {
+ z-index: 3;
+ }
+ }
+ }
+}
diff --git a/templates/assets/bootstrap/scss/_jumbotron.scss b/templates/assets/bootstrap/scss/_jumbotron.scss
new file mode 100644
index 0000000..b12d465
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_jumbotron.scss
@@ -0,0 +1,20 @@
+.jumbotron {
+ padding: $jumbotron-padding ($jumbotron-padding / 2);
+ margin-bottom: $jumbotron-padding;
+ background-color: $jumbotron-bg;
+ @include border-radius($border-radius-lg);
+
+ @include media-breakpoint-up(sm) {
+ padding: ($jumbotron-padding * 2) $jumbotron-padding;
+ }
+}
+
+.jumbotron-hr {
+ border-top-color: darken($jumbotron-bg, 10%);
+}
+
+.jumbotron-fluid {
+ padding-right: 0;
+ padding-left: 0;
+ @include border-radius(0);
+}
diff --git a/templates/assets/bootstrap/scss/_list-group.scss b/templates/assets/bootstrap/scss/_list-group.scss
new file mode 100644
index 0000000..c4b5e2f
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_list-group.scss
@@ -0,0 +1,116 @@
+// Base class
+//
+// Easily usable on <ul>, <ol>, or <div>.
+
+.list-group {
+ display: flex;
+ flex-direction: column;
+
+ // No need to set list-style: none; since .list-group-item is block level
+ padding-left: 0; // reset padding because ul and ol
+ margin-bottom: 0;
+}
+
+
+// Interactive list items
+//
+// Use anchor or button elements instead of `li`s or `div`s to create interactive
+// list items. Includes an extra `.active` modifier class for selected items.
+
+.list-group-item-action {
+ width: 100%; // For `<button>`s (anchors become 100% by default though)
+ color: $list-group-link-color;
+ text-align: inherit; // For `<button>`s (anchors inherit)
+
+ // Hover state
+ @include hover-focus {
+ color: $list-group-link-hover-color;
+ text-decoration: none;
+ background-color: $list-group-hover-bg;
+ }
+
+ &:active {
+ color: $list-group-link-active-color;
+ background-color: $list-group-link-active-bg;
+ }
+}
+
+
+// Individual list items
+//
+// Use on `li`s or `div`s within the `.list-group` parent.
+
+.list-group-item {
+ position: relative;
+ display: block;
+ padding: $list-group-item-padding-y $list-group-item-padding-x;
+ // Place the border on the list items and negative margin up for better styling
+ margin-bottom: -$list-group-border-width;
+ background-color: $list-group-bg;
+ border: $list-group-border-width solid $list-group-border-color;
+
+ &:first-child {
+ @include border-top-radius($list-group-border-radius);
+ }
+
+ &:last-child {
+ margin-bottom: 0;
+ @include border-bottom-radius($list-group-border-radius);
+ }
+
+ @include hover-focus {
+ text-decoration: none;
+ }
+
+ &.disabled,
+ &:disabled {
+ color: $list-group-disabled-color;
+ cursor: $cursor-disabled;
+ background-color: $list-group-disabled-bg;
+ }
+
+ // Include both here for `<a>`s and `<button>`s
+ &.active {
+ z-index: 2; // Place active items above their siblings for proper border styling
+ color: $list-group-active-color;
+ background-color: $list-group-active-bg;
+ border-color: $list-group-active-border;
+ }
+}
+
+
+// Flush list items
+//
+// Remove borders and border-radius to keep list group items edge-to-edge. Most
+// useful within other components (e.g., cards).
+
+.list-group-flush {
+ .list-group-item {
+ border-right: 0;
+ border-left: 0;
+ border-radius: 0;
+ }
+
+ &:first-child {
+ .list-group-item:first-child {
+ border-top: 0;
+ }
+ }
+
+ &:last-child {
+ .list-group-item:last-child {
+ border-bottom: 0;
+ }
+ }
+}
+
+
+// Contextual variants
+//
+// Add modifier classes to change text and background color on individual items.
+// Organizationally, this must come after the `:hover` states.
+
+@include list-group-item-variant(success, $state-success-bg, $state-success-text);
+@include list-group-item-variant(info, $state-info-bg, $state-info-text);
+@include list-group-item-variant(warning, $state-warning-bg, $state-warning-text);
+@include list-group-item-variant(danger, $state-danger-bg, $state-danger-text);
diff --git a/templates/assets/bootstrap/scss/_media.scss b/templates/assets/bootstrap/scss/_media.scss
new file mode 100644
index 0000000..b573052
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_media.scss
@@ -0,0 +1,8 @@
+.media {
+ display: flex;
+ align-items: flex-start;
+}
+
+.media-body {
+ flex: 1;
+}
diff --git a/templates/assets/bootstrap/scss/_mixins.scss b/templates/assets/bootstrap/scss/_mixins.scss
new file mode 100644
index 0000000..13aad24
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_mixins.scss
@@ -0,0 +1,43 @@
+// Toggles
+//
+// Used in conjunction with global variables to enable certain theme features.
+
+// Utilities
+@import "mixins/breakpoints";
+@import "mixins/hover";
+@import "mixins/image";
+@import "mixins/badge";
+@import "mixins/resize";
+@import "mixins/screen-reader";
+@import "mixins/size";
+@import "mixins/reset-text";
+@import "mixins/text-emphasis";
+@import "mixins/text-hide";
+@import "mixins/text-truncate";
+@import "mixins/transforms";
+@import "mixins/visibility";
+
+// // Components
+@import "mixins/alert";
+@import "mixins/buttons";
+@import "mixins/cards";
+@import "mixins/pagination";
+@import "mixins/lists";
+@import "mixins/list-group";
+@import "mixins/nav-divider";
+@import "mixins/forms";
+@import "mixins/table-row";
+
+// // Skins
+@import "mixins/background-variant";
+@import "mixins/border-radius";
+@import "mixins/box-shadow";
+@import "mixins/gradients";
+@import "mixins/transition";
+
+// // Layout
+@import "mixins/clearfix";
+// @import "mixins/navbar-align";
+@import "mixins/grid-framework";
+@import "mixins/grid";
+@import "mixins/float";
diff --git a/templates/assets/bootstrap/scss/_modal.scss b/templates/assets/bootstrap/scss/_modal.scss
new file mode 100644
index 0000000..9d2a867
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_modal.scss
@@ -0,0 +1,142 @@
+// .modal-open - body class for killing the scroll
+// .modal - container to scroll within
+// .modal-dialog - positioning shell for the actual modal
+// .modal-content - actual modal w/ bg and corners and stuff
+
+
+// Kill the scroll on the body
+.modal-open {
+ overflow: hidden;
+}
+
+// Container that the modal scrolls within
+.modal {
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: $zindex-modal;
+ display: none;
+ overflow: hidden;
+ // Prevent Chrome on Windows from adding a focus outline. For details, see
+ // https://github.com/twbs/bootstrap/pull/10951.
+ outline: 0;
+ // We deliberately don't use `-webkit-overflow-scrolling: touch;` due to a
+ // gnarly iOS Safari bug: https://bugs.webkit.org/show_bug.cgi?id=158342
+ // See also https://github.com/twbs/bootstrap/issues/17695
+
+ // When fading in the modal, animate it to slide down
+ &.fade .modal-dialog {
+ @include transition($modal-transition);
+ transform: translate(0, -25%);
+ }
+ &.show .modal-dialog { transform: translate(0, 0); }
+}
+.modal-open .modal {
+ overflow-x: hidden;
+ overflow-y: auto;
+}
+
+// Shell div to position the modal with bottom padding
+.modal-dialog {
+ position: relative;
+ width: auto;
+ margin: $modal-dialog-margin;
+}
+
+// Actual modal
+.modal-content {
+ position: relative;
+ display: flex;
+ flex-direction: column;
+ background-color: $modal-content-bg;
+ background-clip: padding-box;
+ border: $modal-content-border-width solid $modal-content-border-color;
+ @include border-radius($border-radius-lg);
+ @include box-shadow($modal-content-xs-box-shadow);
+ // Remove focus outline from opened modal
+ outline: 0;
+}
+
+// Modal background
+.modal-backdrop {
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: $zindex-modal-backdrop;
+ background-color: $modal-backdrop-bg;
+
+ // Fade for backdrop
+ &.fade { opacity: 0; }
+ &.show { opacity: $modal-backdrop-opacity; }
+}
+
+// Modal header
+// Top section of the modal w/ title and dismiss
+.modal-header {
+ display: flex;
+ align-items: center; // vertically center it
+ justify-content: space-between; // Put modal header elements (title and dismiss) on opposite ends
+ padding: $modal-header-padding;
+ border-bottom: $modal-header-border-width solid $modal-header-border-color;
+}
+
+// Title text within header
+.modal-title {
+ margin-bottom: 0;
+ line-height: $modal-title-line-height;
+}
+
+// Modal body
+// Where all modal content resides (sibling of .modal-header and .modal-footer)
+.modal-body {
+ position: relative;
+ // Enable `flex-grow: 1` so that the body take up as much space as possible
+ // when should there be a fixed height on `.modal-dialog`.
+ flex: 1 1 auto;
+ padding: $modal-inner-padding;
+}
+
+// Footer (for actions)
+.modal-footer {
+ display: flex;
+ align-items: center; // vertically center
+ justify-content: flex-end; // Right align buttons with flex property because text-align doesn't work on flex items
+ padding: $modal-inner-padding;
+ border-top: $modal-footer-border-width solid $modal-footer-border-color;
+
+ // Easily place margin between footer elements
+ > :not(:first-child) { margin-left: .25rem; }
+ > :not(:last-child) { margin-right: .25rem; }
+}
+
+// Measure scrollbar width for padding body during modal show/hide
+.modal-scrollbar-measure {
+ position: absolute;
+ top: -9999px;
+ width: 50px;
+ height: 50px;
+ overflow: scroll;
+}
+
+// Scale up the modal
+@include media-breakpoint-up(sm) {
+ // Automatically set modal's width for larger viewports
+ .modal-dialog {
+ max-width: $modal-md;
+ margin: $modal-dialog-sm-up-margin-y auto;
+ }
+
+ .modal-content {
+ @include box-shadow($modal-content-sm-up-box-shadow);
+ }
+
+ .modal-sm { max-width: $modal-sm; }
+}
+
+@include media-breakpoint-up(lg) {
+ .modal-lg { max-width: $modal-lg; }
+}
diff --git a/templates/assets/bootstrap/scss/_nav.scss b/templates/assets/bootstrap/scss/_nav.scss
new file mode 100644
index 0000000..731f1b7
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_nav.scss
@@ -0,0 +1,120 @@
+// Base class
+//
+// Kickstart any navigation component with a set of style resets. Works with
+// `<nav>`s or `<ul>`s.
+
+.nav {
+ display: flex;
+ flex-wrap: wrap;
+ padding-left: 0;
+ margin-bottom: 0;
+ list-style: none;
+}
+
+.nav-link {
+ display: block;
+ padding: $nav-link-padding;
+
+ @include hover-focus {
+ text-decoration: none;
+ }
+
+ // Disabled state lightens text and removes hover/tab effects
+ &.disabled {
+ color: $nav-disabled-link-color;
+ cursor: $cursor-disabled;
+ }
+}
+
+
+//
+// Tabs
+//
+
+.nav-tabs {
+ border-bottom: $nav-tabs-border-width solid $nav-tabs-border-color;
+
+ .nav-item {
+ margin-bottom: -$nav-tabs-border-width;
+ }
+
+ .nav-link {
+ border: $nav-tabs-border-width solid transparent;
+ @include border-top-radius($nav-tabs-border-radius);
+
+ @include hover-focus {
+ border-color: $nav-tabs-link-hover-border-color $nav-tabs-link-hover-border-color $nav-tabs-border-color;
+ }
+
+ &.disabled {
+ color: $nav-disabled-link-color;
+ background-color: transparent;
+ border-color: transparent;
+ }
+ }
+
+ .nav-link.active,
+ .nav-item.show .nav-link {
+ color: $nav-tabs-active-link-color;
+ background-color: $nav-tabs-active-link-bg;
+ border-color: $nav-tabs-active-link-border-color $nav-tabs-active-link-border-color $nav-tabs-active-link-bg;
+ }
+
+ .dropdown-menu {
+ // Make dropdown border overlap tab border
+ margin-top: -$nav-tabs-border-width;
+ // Remove the top rounded corners here since there is a hard edge above the menu
+ @include border-top-radius(0);
+ }
+}
+
+
+//
+// Pills
+//
+
+.nav-pills {
+ .nav-link {
+ @include border-radius($nav-pills-border-radius);
+ }
+
+ .nav-link.active,
+ .nav-item.show .nav-link {
+ color: $nav-pills-active-link-color;
+ background-color: $nav-pills-active-link-bg;
+ }
+}
+
+
+//
+// Justified variants
+//
+
+.nav-fill {
+ .nav-item {
+ flex: 1 1 auto;
+ text-align: center;
+ }
+}
+
+.nav-justified {
+ .nav-item {
+ flex-basis: 0;
+ flex-grow: 1;
+ text-align: center;
+ }
+}
+
+
+// Tabbable tabs
+//
+// Hide tabbable panes to start, show them when `.active`
+
+.tab-content {
+ > .tab-pane {
+ display: none;
+ }
+ > .active {
+ display: block;
+ }
+}
diff --git a/templates/assets/bootstrap/scss/_navbar.scss b/templates/assets/bootstrap/scss/_navbar.scss
new file mode 100644
index 0000000..6c31017
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_navbar.scss
@@ -0,0 +1,276 @@
+// Contents
+//
+// Navbar
+// Navbar brand
+// Navbar nav
+// Navbar text
+// Navbar divider
+// Responsive navbar
+// Navbar position
+// Navbar themes
+
+
+// Navbar
+//
+// Provide a static navbar from which we expand to create full-width, fixed, and
+// other navbar variations.
+
+.navbar {
+ position: relative;
+ display: flex;
+ flex-direction: column;
+ padding: $navbar-padding-y $navbar-padding-x;
+
+ @include media-breakpoint-down(nth(map-keys($grid-breakpoints), 1)) {
+ > .container {
+ margin-right: 0;
+ margin-left: 0;
+ }
+ }
+}
+
+
+// Navbar brand
+//
+// Used for brand, project, or site names.
+
+.navbar-brand {
+ display: inline-block;
+ align-self: flex-start;
+ padding-top: .25rem;
+ padding-bottom: .25rem;
+ margin-right: $navbar-padding-x;
+ font-size: $font-size-lg;
+ line-height: inherit;
+ white-space: nowrap;
+
+ @include hover-focus {
+ text-decoration: none;
+ }
+}
+
+
+// Navbar nav
+//
+// Custom navbar navigation (doesn't require `.nav`, but does make use of `.nav-link`).
+
+.navbar-nav {
+ display: flex;
+ flex-direction: column; // cannot use `inherit` to get the `.navbar`s value
+ padding-left: 0;
+ margin-bottom: 0;
+ list-style: none;
+
+ .nav-link {
+ padding-right: 0;
+ padding-left: 0;
+ }
+}
+
+
+// Navbar text
+//
+//
+
+.navbar-text {
+ display: inline-block;
+ padding-top: .425rem;
+ padding-bottom: .425rem;
+}
+
+
+// Responsive navbar
+//
+// Custom styles for responsive collapsing and toggling of navbar contents.
+// Powered by the collapse Bootstrap JavaScript plugin.
+
+// Button for toggling the navbar when in its collapsed state
+.navbar-toggler {
+ align-self: flex-start; // Prevent toggler from growing to full width when it's the only visible navbar child
+ padding: $navbar-toggler-padding-y $navbar-toggler-padding-x;
+ font-size: $navbar-toggler-font-size;
+ line-height: 1;
+ background: transparent; // remove default button style
+ border: $border-width solid transparent; // remove default button style
+ @include border-radius($navbar-toggler-border-radius);
+
+ @include hover-focus {
+ text-decoration: none;
+ }
+}
+
+// Keep as a separate element so folks can easily override it with another icon
+// or image file as needed.
+.navbar-toggler-icon {
+ display: inline-block;
+ width: 1.5em;
+ height: 1.5em;
+ vertical-align: middle;
+ content: "";
+ background: no-repeat center center;
+ background-size: 100% 100%;
+}
+
+// Use `position` on the toggler to prevent it from being auto placed as a flex
+// item and allow easy placement.
+.navbar-toggler-left {
+ position: absolute;
+ left: $navbar-padding-x;
+}
+.navbar-toggler-right {
+ position: absolute;
+ right: $navbar-padding-x;
+}
+
+// Generate series of `.navbar-toggleable-*` responsive classes for configuring
+// where your navbar collapses.
+.navbar-toggleable {
+ @each $breakpoint in map-keys($grid-breakpoints) {
+ $next: breakpoint-next($breakpoint, $grid-breakpoints);
+ $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
+
+ &#{$infix} {
+ @include media-breakpoint-down($breakpoint) {
+ .navbar-nav {
+ .dropdown-menu {
+ position: static;
+ float: none;
+ }
+ }
+
+ > .container {
+ padding-right: 0;
+ padding-left: 0;
+ }
+ }
+
+ @include media-breakpoint-up($next) {
+ flex-direction: row;
+ flex-wrap: nowrap;
+ align-items: center;
+
+ .navbar-nav {
+ flex-direction: row;
+
+ .nav-link {
+ padding-right: .5rem;
+ padding-left: .5rem;
+ }
+ }
+
+ // For nesting containers, have to redeclare for alignment purposes
+ > .container {
+ display: flex;
+ flex-wrap: nowrap;
+ align-items: center;
+ }
+
+ // scss-lint:disable ImportantRule
+ .navbar-collapse {
+ display: flex !important;
+ width: 100%;
+ }
+ // scss-lint:enable ImportantRule
+
+ .navbar-toggler {
+ display: none;
+ }
+ }
+ }
+ }
+}
+
+
+// Navbar themes
+//
+// Styles for switching between navbars with light or dark background.
+
+// Dark links against a light background
+.navbar-light {
+ .navbar-brand,
+ .navbar-toggler {
+ color: $navbar-light-active-color;
+
+ @include hover-focus {
+ color: $navbar-light-active-color;
+ }
+ }
+
+ .navbar-nav {
+ .nav-link {
+ color: $navbar-light-color;
+
+ @include hover-focus {
+ color: $navbar-light-hover-color;
+ }
+
+ &.disabled {
+ color: $navbar-light-disabled-color;
+ }
+ }
+
+ .open > .nav-link,
+ .active > .nav-link,
+ .nav-link.open,
+ .nav-link.active {
+ color: $navbar-light-active-color;
+ }
+ }
+
+ .navbar-toggler {
+ border-color: $navbar-light-toggler-border;
+ }
+
+ .navbar-toggler-icon {
+ background-image: $navbar-light-toggler-bg;
+ }
+
+ .navbar-text {
+ color: $navbar-light-color;
+ }
+}
+
+// White links against a dark background
+.navbar-inverse {
+ .navbar-brand,
+ .navbar-toggler {
+ color: $navbar-inverse-active-color;
+
+ @include hover-focus {
+ color: $navbar-inverse-active-color;
+ }
+ }
+
+ .navbar-nav {
+ .nav-link {
+ color: $navbar-inverse-color;
+
+ @include hover-focus {
+ color: $navbar-inverse-hover-color;
+ }
+
+ &.disabled {
+ color: $navbar-inverse-disabled-color;
+ }
+ }
+
+ .open > .nav-link,
+ .active > .nav-link,
+ .nav-link.open,
+ .nav-link.active {
+ color: $navbar-inverse-active-color;
+ }
+ }
+
+ .navbar-toggler {
+ border-color: $navbar-inverse-toggler-border;
+ }
+
+ .navbar-toggler-icon {
+ background-image: $navbar-inverse-toggler-bg;
+ }
+
+ .navbar-text {
+ color: $navbar-inverse-color;
+ }
+}
diff --git a/templates/assets/bootstrap/scss/_pagination.scss b/templates/assets/bootstrap/scss/_pagination.scss
new file mode 100644
index 0000000..24aa028
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_pagination.scss
@@ -0,0 +1,67 @@
+.pagination {
+ display: flex;
+ // 1-2: Disable browser default list styles
+ padding-left: 0; // 1
+ list-style: none; // 2
+ @include border-radius();
+}
+
+.page-item {
+ &:first-child {
+ .page-link {
+ margin-left: 0;
+ @include border-left-radius($border-radius);
+ }
+ }
+ &:last-child {
+ .page-link {
+ @include border-right-radius($border-radius);
+ }
+ }
+
+ &.active .page-link {
+ z-index: 2;
+ color: $pagination-active-color;
+ background-color: $pagination-active-bg;
+ border-color: $pagination-active-border;
+ }
+
+ &.disabled .page-link {
+ color: $pagination-disabled-color;
+ pointer-events: none;
+ cursor: $cursor-disabled; // While `pointer-events: none` removes the cursor in modern browsers, we provide a disabled cursor as a fallback.
+ background-color: $pagination-disabled-bg;
+ border-color: $pagination-disabled-border;
+ }
+}
+
+.page-link {
+ position: relative;
+ display: block;
+ padding: $pagination-padding-y $pagination-padding-x;
+ margin-left: -1px;
+ line-height: $pagination-line-height;
+ color: $pagination-color;
+ background-color: $pagination-bg;
+ border: $pagination-border-width solid $pagination-border-color;
+
+ @include hover-focus {
+ color: $pagination-hover-color;
+ text-decoration: none;
+ background-color: $pagination-hover-bg;
+ border-color: $pagination-hover-border;
+ }
+}
+
+
+//
+// Sizing
+//
+
+.pagination-lg {
+ @include pagination-size($pagination-padding-y-lg, $pagination-padding-x-lg, $font-size-lg, $line-height-lg, $border-radius-lg);
+}
+
+.pagination-sm {
+ @include pagination-size($pagination-padding-y-sm, $pagination-padding-x-sm, $font-size-sm, $line-height-sm, $border-radius-sm);
+}
diff --git a/templates/assets/bootstrap/scss/_popover.scss b/templates/assets/bootstrap/scss/_popover.scss
new file mode 100644
index 0000000..1b63634
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_popover.scss
@@ -0,0 +1,171 @@
+.popover {
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: $zindex-popover;
+ display: block;
+ max-width: $popover-max-width;
+ padding: $popover-inner-padding;
+ // Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
+ // So reset our font and text properties to avoid inheriting weird values.
+ @include reset-text();
+ font-size: $font-size-sm;
+ // Allow breaking very long words so they don't overflow the popover's bounds
+ word-wrap: break-word;
+ background-color: $popover-bg;
+ background-clip: padding-box;
+ border: $popover-border-width solid $popover-border-color;
+ @include border-radius($border-radius-lg);
+ @include box-shadow($popover-box-shadow);
+
+
+ // Popover directions
+
+ &.popover-top,
+ &.bs-tether-element-attached-bottom {
+ margin-top: -$popover-arrow-width;
+
+ &::before,
+ &::after {
+ left: 50%;
+ border-bottom-width: 0;
+ }
+
+ &::before {
+ bottom: -$popover-arrow-outer-width;
+ margin-left: -$popover-arrow-outer-width;
+ border-top-color: $popover-arrow-outer-color;
+ }
+
+ &::after {
+ bottom: -($popover-arrow-outer-width - 1);
+ margin-left: -$popover-arrow-width;
+ border-top-color: $popover-arrow-color;
+ }
+ }
+
+ &.popover-right,
+ &.bs-tether-element-attached-left {
+ margin-left: $popover-arrow-width;
+
+ &::before,
+ &::after {
+ top: 50%;
+ border-left-width: 0;
+ }
+
+ &::before {
+ left: -$popover-arrow-outer-width;
+ margin-top: -$popover-arrow-outer-width;
+ border-right-color: $popover-arrow-outer-color;
+ }
+
+ &::after {
+ left: -($popover-arrow-outer-width - 1);
+ margin-top: -($popover-arrow-outer-width - 1);
+ border-right-color: $popover-arrow-color;
+ }
+ }
+
+ &.popover-bottom,
+ &.bs-tether-element-attached-top {
+ margin-top: $popover-arrow-width;
+
+ &::before,
+ &::after {
+ left: 50%;
+ border-top-width: 0;
+ }
+
+ &::before {
+ top: -$popover-arrow-outer-width;
+ margin-left: -$popover-arrow-outer-width;
+ border-bottom-color: $popover-arrow-outer-color;
+ }
+
+ &::after {
+ top: -($popover-arrow-outer-width - 1);
+ margin-left: -$popover-arrow-width;
+ border-bottom-color: $popover-title-bg;
+ }
+
+ // This will remove the popover-title's border just below the arrow
+ .popover-title::before {
+ position: absolute;
+ top: 0;
+ left: 50%;
+ display: block;
+ width: 20px;
+ margin-left: -10px;
+ content: "";
+ border-bottom: 1px solid $popover-title-bg;
+ }
+ }
+
+ &.popover-left,
+ &.bs-tether-element-attached-right {
+ margin-left: -$popover-arrow-width;
+
+ &::before,
+ &::after {
+ top: 50%;
+ border-right-width: 0;
+ }
+
+ &::before {
+ right: -$popover-arrow-outer-width;
+ margin-top: -$popover-arrow-outer-width;
+ border-left-color: $popover-arrow-outer-color;
+ }
+
+ &::after {
+ right: -($popover-arrow-outer-width - 1);
+ margin-top: -($popover-arrow-outer-width - 1);
+ border-left-color: $popover-arrow-color;
+ }
+ }
+}
+
+
+// Offset the popover to account for the popover arrow
+.popover-title {
+ padding: $popover-title-padding-y $popover-title-padding-x;
+ margin-bottom: 0; // Reset the default from Reboot
+ font-size: $font-size-base;
+ background-color: $popover-title-bg;
+ border-bottom: $popover-border-width solid darken($popover-title-bg, 5%);
+ $offset-border-width: calc(#{$border-radius-lg} - #{$popover-border-width});
+ @include border-top-radius($offset-border-width);
+
+ &:empty {
+ display: none;
+ }
+}
+
+.popover-content {
+ padding: $popover-content-padding-y $popover-content-padding-x;
+}
+
+
+// Arrows
+//
+// .popover-arrow is outer, .popover-arrow::after is inner
+
+.popover::before,
+.popover::after {
+ position: absolute;
+ display: block;
+ width: 0;
+ height: 0;
+ border-color: transparent;
+ border-style: solid;
+}
+
+.popover::before {
+ content: "";
+ border-width: $popover-arrow-outer-width;
+}
+.popover::after {
+ content: "";
+ border-width: $popover-arrow-width;
+}
diff --git a/templates/assets/bootstrap/scss/_print.scss b/templates/assets/bootstrap/scss/_print.scss
new file mode 100644
index 0000000..e20219a
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_print.scss
@@ -0,0 +1,119 @@
+// scss-lint:disable QualifyingElement
+
+// Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css
+
+// ==========================================================================
+// Print styles.
+// Inlined to avoid the additional HTTP request:
+// http://www.phpied.com/delay-loading-your-print-css/
+// ==========================================================================
+
+@if $enable-print-styles {
+ @media print {
+ *,
+ *::before,
+ *::after,
+ p::first-letter,
+ div::first-letter,
+ blockquote::first-letter,
+ li::first-letter,
+ p::first-line,
+ div::first-line,
+ blockquote::first-line,
+ li::first-line {
+ // Bootstrap specific; comment out `color` and `background`
+ //color: #000 !important; // Black prints faster:
+ // http://www.sanbeiji.com/archives/953
+ text-shadow: none !important;
+ //background: transparent !important;
+ box-shadow: none !important;
+ }
+
+ a,
+ a:visited {
+ text-decoration: underline;
+ }
+
+ // Bootstrap specific; comment the following selector out
+ //a[href]::after {
+ // content: " (" attr(href) ")";
+ //}
+
+ abbr[title]::after {
+ content: " (" attr(title) ")";
+ }
+
+ // Bootstrap specific; comment the following selector out
+ //
+ // Don't show links that are fragment identifiers,
+ // or use the `javascript:` pseudo protocol
+ //
+
+ //a[href^="#"]::after,
+ //a[href^="javascript:"]::after {
+ // content: "";
+ //}
+
+ pre {
+ white-space: pre-wrap !important;
+ }
+ pre,
+ blockquote {
+ border: $border-width solid #999; // Bootstrap custom code; using `$border-width` instead of 1px
+ page-break-inside: avoid;
+ }
+
+ //
+ // Printing Tables:
+ // http://css-discuss.incutio.com/wiki/Printing_Tables
+ //
+
+ thead {
+ display: table-header-group;
+ }
+
+ tr,
+ img {
+ page-break-inside: avoid;
+ }
+
+ p,
+ h2,
+ h3 {
+ orphans: 3;
+ widows: 3;
+ }
+
+ h2,
+ h3 {
+ page-break-after: avoid;
+ }
+
+ // Bootstrap specific changes start
+
+ // Bootstrap components
+ .navbar {
+ display: none;
+ }
+ .badge {
+ border: $border-width solid #000;
+ }
+
+ .table {
+ border-collapse: collapse !important;
+
+ td,
+ th {
+ background-color: #fff !important;
+ }
+ }
+ .table-bordered {
+ th,
+ td {
+ border: 1px solid #ddd !important;
+ }
+ }
+
+ // Bootstrap specific changes end
+ }
+}
diff --git a/templates/assets/bootstrap/scss/_progress.scss b/templates/assets/bootstrap/scss/_progress.scss
new file mode 100644
index 0000000..ccca51e
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_progress.scss
@@ -0,0 +1,30 @@
+@keyframes progress-bar-stripes {
+ from { background-position: $progress-height 0; }
+ to { background-position: 0 0; }
+}
+
+.progress {
+ display: flex;
+ overflow: hidden; // force rounded corners by cropping it
+ font-size: $progress-font-size;
+ line-height: $progress-height;
+ text-align: center;
+ background-color: $progress-bg;
+ @include border-radius($progress-border-radius);
+}
+
+.progress-bar {
+ height: $progress-height;
+ line-height: $progress-height;
+ color: $progress-bar-color;
+ background-color: $progress-bar-bg;
+}
+
+.progress-bar-striped {
+ @include gradient-striped();
+ background-size: $progress-height $progress-height;
+}
+
+.progress-bar-animated {
+ animation: progress-bar-stripes $progress-bar-animation-timing;
+}
diff --git a/templates/assets/bootstrap/scss/_reboot.scss b/templates/assets/bootstrap/scss/_reboot.scss
new file mode 100644
index 0000000..c52e6f8
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_reboot.scss
@@ -0,0 +1,484 @@
+// scss-lint:disable QualifyingElement, DuplicateProperty, VendorPrefix
+
+// Reboot
+//
+// Normalization of HTML elements, manually forked from Normalize.css to remove
+// styles targeting irrelevant browsers while applying new styles.
+//
+// Normalize is licensed MIT. https://github.com/necolas/normalize.css
+
+
+// Document
+//
+// 1. Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`.
+// 2. Change the default font family in all browsers.
+// 3. Correct the line height in all browsers.
+// 4. Prevent adjustments of font size after orientation changes in IE on Windows Phone and in iOS.
+// 5. Setting @viewport causes scrollbars to overlap content in IE11 and Edge, so
+// we force a non-overlapping, non-auto-hiding scrollbar to counteract.
+// 6. Change the default tap highlight to be completely transparent in iOS.
+
+html {
+ box-sizing: border-box; // 1
+ font-family: sans-serif; // 2
+ line-height: 1.15; // 3
+ -webkit-text-size-adjust: 100%; // 4
+ -ms-text-size-adjust: 100%; // 4
+ -ms-overflow-style: scrollbar; // 5
+ -webkit-tap-highlight-color: rgba(0,0,0,0); // 6
+}
+
+*,
+*::before,
+*::after {
+ box-sizing: inherit; // 1
+}
+
+// IE10+ doesn't honor `<meta name="viewport">` in some cases.
+@at-root {
+ @-ms-viewport { width: device-width; }
+}
+
+
+// Body
+//
+// 1. Remove the margin in all browsers.
+// 2. As a best practice, apply a default `background-color`.
+
+body {
+ margin: 0; // 1
+ font-family: $font-family-base;
+ font-size: $font-size-base;
+ font-weight: $font-weight-base;
+ line-height: $line-height-base;
+ color: $body-color;
+ background-color: $body-bg; // 2
+}
+
+// Suppress the focus outline on elements that cannot be accessed via keyboard.
+// This prevents an unwanted focus outline from appearing around elements that
+// might still respond to pointer events.
+//
+// Credit: https://github.com/suitcss/base
+[tabindex="-1"]:focus {
+ outline: none !important;
+}
+
+
+// Content grouping
+//
+// 1. Add the correct box sizing in Firefox.
+// 2. Show the overflow in Edge and IE.
+
+hr {
+ box-sizing: content-box; // 1
+ height: 0; // 1
+ overflow: visible; // 2
+}
+
+
+//
+// Typography
+//
+
+// Remove top margins from headings
+//
+// By default, `<h1>`-`<h6>` all receive top and bottom margins. We nuke the top
+// margin for easier control within type scales as it avoids margin collapsing.
+h1, h2, h3, h4, h5, h6 {
+ margin-top: 0;
+ margin-bottom: .5rem;
+}
+
+// Reset margins on paragraphs
+//
+// Similarly, the top margin on `<p>`s get reset. However, we also reset the
+// bottom margin to use `rem` units instead of `em`.
+p {
+ margin-top: 0;
+ margin-bottom: 1rem;
+}
+
+// Abbreviations
+//
+// 1. Remove the bottom border in Firefox 39-.
+// 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
+// 3. Add explicit cursor to indicate changed behavior.
+// 4. Duplicate behavior to the data-* attribute for our tooltip plugin
+
+abbr[title],
+abbr[data-original-title] { // 4
+ text-decoration: underline; // 2
+ text-decoration: underline dotted; // 2
+ cursor: help; // 3
+ border-bottom: 0; // 1
+}
+
+address {
+ margin-bottom: 1rem;
+ font-style: normal;
+ line-height: inherit;
+}
+
+ol,
+ul,
+dl {
+ margin-top: 0;
+ margin-bottom: 1rem;
+}
+
+ol ol,
+ul ul,
+ol ul,
+ul ol {
+ margin-bottom: 0;
+}
+
+dt {
+ font-weight: $dt-font-weight;
+}
+
+dd {
+ margin-bottom: .5rem;
+ margin-left: 0; // Undo browser default
+}
+
+blockquote {
+ margin: 0 0 1rem;
+}
+
+dfn {
+ font-style: italic; // Add the correct font style in Android 4.3-
+}
+
+b,
+strong {
+ font-weight: bolder; // Add the correct font weight in Chrome, Edge, and Safari
+}
+
+small {
+ font-size: 80%; // Add the correct font size in all browsers
+}
+
+//
+// Prevent `sub` and `sup` elements from affecting the line height in
+// all browsers.
+//
+
+sub,
+sup {
+ position: relative;
+ font-size: 75%;
+ line-height: 0;
+ vertical-align: baseline;
+}
+
+sub { bottom: -.25em; }
+sup { top: -.5em; }
+
+
+//
+// Links
+//
+
+a {
+ color: $link-color;
+ text-decoration: $link-decoration;
+ background-color: transparent; // Remove the gray background on active links in IE 10.
+ -webkit-text-decoration-skip: objects; // Remove gaps in links underline in iOS 8+ and Safari 8+.
+
+ @include hover {
+ color: $link-hover-color;
+ text-decoration: $link-hover-decoration;
+ }
+}
+
+// And undo these styles for placeholder links/named anchors (without href)
+// which have not been made explicitly keyboard-focusable (without tabindex).
+// It would be more straightforward to just use a[href] in previous block, but that
+// causes specificity issues in many other styles that are too complex to fix.
+// See https://github.com/twbs/bootstrap/issues/19402
+
+a:not([href]):not([tabindex]) {
+ color: inherit;
+ text-decoration: none;
+
+ @include hover-focus {
+ color: inherit;
+ text-decoration: none;
+ }
+
+ &:focus {
+ outline: 0;
+ }
+}
+
+
+//
+// Code
+//
+
+pre,
+code,
+kbd,
+samp {
+ font-family: monospace, monospace; // Correct the inheritance and scaling of font size in all browsers.
+ font-size: 1em; // Correct the odd `em` font sizing in all browsers.
+}
+
+pre {
+ // Remove browser default top margin
+ margin-top: 0;
+ // Reset browser default of `1em` to use `rem`s
+ margin-bottom: 1rem;
+ // Don't allow content to break outside
+ overflow: auto;
+}
+
+
+//
+// Figures
+//
+
+figure {
+ // Apply a consistent margin strategy (matches our type styles).
+ margin: 0 0 1rem;
+}
+
+
+//
+// Images and content
+//
+
+img {
+ vertical-align: middle;
+ border-style: none; // Remove the border on images inside links in IE 10-.
+}
+
+svg:not(:root) {
+ overflow: hidden; // Hide the overflow in IE
+}
+
+
+// Avoid 300ms click delay on touch devices that support the `touch-action` CSS property.
+//
+// In particular, unlike most other browsers, IE11+Edge on Windows 10 on touch devices and IE Mobile 10-11
+// DON'T remove the click delay when `<meta name="viewport" content="width=device-width">` is present.
+// However, they DO support removing the click delay via `touch-action: manipulation`.
+// See:
+// * https://v4-alpha.getbootstrap.com/content/reboot/#click-delay-optimization-for-touch
+// * http://caniuse.com/#feat=css-touch-action
+// * https://patrickhlauke.github.io/touch/tests/results/#suppressing-300ms-delay
+
+a,
+area,
+button,
+[role="button"],
+input,
+label,
+select,
+summary,
+textarea {
+ touch-action: manipulation;
+}
+
+
+//
+// Tables
+//
+
+table {
+ border-collapse: collapse; // Prevent double borders
+}
+
+caption {
+ padding-top: $table-cell-padding;
+ padding-bottom: $table-cell-padding;
+ color: $text-muted;
+ text-align: left;
+ caption-side: bottom;
+}
+
+th {
+ // Matches default `<td>` alignment
+ text-align: left;
+}
+
+
+//
+// Forms
+//
+
+label {
+ // Allow labels to use `margin` for spacing.
+ display: inline-block;
+ margin-bottom: .5rem;
+}
+
+// Work around a Firefox/IE bug where the transparent `button` background
+// results in a loss of the default `button` focus styles.
+//
+// Credit: https://github.com/suitcss/base/
+button:focus {
+ outline: 1px dotted;
+ outline: 5px auto -webkit-focus-ring-color;
+}
+
+input,
+button,
+select,
+optgroup,
+textarea {
+ margin: 0; // Remove the margin in Firefox and Safari
+ font-family: inherit;
+ font-size: inherit;
+ line-height: inherit;
+}
+
+button,
+input {
+ overflow: visible; // Show the overflow in Edge
+}
+
+button,
+select {
+ text-transform: none; // Remove the inheritance of text transform in Firefox
+}
+
+// 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
+// controls in Android 4.
+// 2. Correct the inability to style clickable types in iOS and Safari.
+button,
+html [type="button"], // 1
+[type="reset"],
+[type="submit"] {
+ -webkit-appearance: button; // 2
+}
+
+// Remove inner border and padding from Firefox, but don't restore the outline like Normalize.
+button::-moz-focus-inner,
+[type="button"]::-moz-focus-inner,
+[type="reset"]::-moz-focus-inner,
+[type="submit"]::-moz-focus-inner {
+ padding: 0;
+ border-style: none;
+}
+
+input[type="radio"],
+input[type="checkbox"] {
+ box-sizing: border-box; // 1. Add the correct box sizing in IE 10-
+ padding: 0; // 2. Remove the padding in IE 10-
+
+ // Apply a disabled cursor for radios and checkboxes.
+ //
+ // Note: Neither radios nor checkboxes can be readonly.
+ &:disabled {
+ cursor: $cursor-disabled;
+ }
+}
+
+
+input[type="date"],
+input[type="time"],
+input[type="datetime-local"],
+input[type="month"] {
+ // Remove the default appearance of temporal inputs to avoid a Mobile Safari
+ // bug where setting a custom line-height prevents text from being vertically
+ // centered within the input.
+ // See https://bugs.webkit.org/show_bug.cgi?id=139848
+ // and https://github.com/twbs/bootstrap/issues/11266
+ -webkit-appearance: listbox;
+}
+
+textarea {
+ overflow: auto; // Remove the default vertical scrollbar in IE.
+ // Textareas should really only resize vertically so they don't break their (horizontal) containers.
+ resize: vertical;
+}
+
+fieldset {
+ // Browsers set a default `min-width: min-content;` on fieldsets,
+ // unlike e.g. `<div>`s, which have `min-width: 0;` by default.
+ // So we reset that to ensure fieldsets behave more like a standard block element.
+ // See https://github.com/twbs/bootstrap/issues/12359
+ // and https://html.spec.whatwg.org/multipage/#the-fieldset-and-legend-elements
+ min-width: 0;
+ // Reset the default outline behavior of fieldsets so they don't affect page layout.
+ padding: 0;
+ margin: 0;
+ border: 0;
+}
+
+// 1. Correct the text wrapping in Edge and IE.
+// 2. Correct the color inheritance from `fieldset` elements in IE.
+legend {
+ display: block;
+ width: 100%;
+ max-width: 100%; // 1
+ padding: 0;
+ margin-bottom: .5rem;
+ font-size: 1.5rem;
+ line-height: inherit;
+ color: inherit; // 2
+ white-space: normal; // 1
+}
+
+progress {
+ vertical-align: baseline; // Add the correct vertical alignment in Chrome, Firefox, and Opera.
+}
+
+// Correct the cursor style of increment and decrement buttons in Chrome.
+[type="number"]::-webkit-inner-spin-button,
+[type="number"]::-webkit-outer-spin-button {
+ height: auto;
+}
+
+[type="search"] {
+ // This overrides the extra rounded corners on search inputs in iOS so that our
+ // `.form-control` class can properly style them. Note that this cannot simply
+ // be added to `.form-control` as it's not specific enough. For details, see
+ // https://github.com/twbs/bootstrap/issues/11586.
+ outline-offset: -2px; // 2. Correct the outline style in Safari.
+ -webkit-appearance: none;
+}
+
+//
+// Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
+//
+
+[type="search"]::-webkit-search-cancel-button,
+[type="search"]::-webkit-search-decoration {
+ -webkit-appearance: none;
+}
+
+//
+// 1. Correct the inability to style clickable types in iOS and Safari.
+// 2. Change font properties to `inherit` in Safari.
+//
+
+::-webkit-file-upload-button {
+ font: inherit; // 2
+ -webkit-appearance: button; // 1
+}
+
+//
+// Correct element displays
+//
+
+output {
+ display: inline-block;
+}
+
+summary {
+ display: list-item; // Add the correct display in all browsers
+}
+
+template {
+ display: none; // Add the correct display in IE
+}
+
+// Always hide an element with the `hidden` HTML attribute (from PureCSS).
+// Needed for proper display in IE 10-.
+[hidden] {
+ display: none !important;
+}
diff --git a/templates/assets/bootstrap/scss/_responsive-embed.scss b/templates/assets/bootstrap/scss/_responsive-embed.scss
new file mode 100644
index 0000000..d3362b6
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_responsive-embed.scss
@@ -0,0 +1,52 @@
+// Credit: Nicolas Gallagher and SUIT CSS.
+
+.embed-responsive {
+ position: relative;
+ display: block;
+ width: 100%;
+ padding: 0;
+ overflow: hidden;
+
+ &::before {
+ display: block;
+ content: "";
+ }
+
+ .embed-responsive-item,
+ iframe,
+ embed,
+ object,
+ video {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ border: 0;
+ }
+}
+
+.embed-responsive-21by9 {
+ &::before {
+ padding-top: percentage(9 / 21);
+ }
+}
+
+.embed-responsive-16by9 {
+ &::before {
+ padding-top: percentage(9 / 16);
+ }
+}
+
+.embed-responsive-4by3 {
+ &::before {
+ padding-top: percentage(3 / 4);
+ }
+}
+
+.embed-responsive-1by1 {
+ &::before {
+ padding-top: percentage(1 / 1);
+ }
+}
diff --git a/templates/assets/bootstrap/scss/_tables.scss b/templates/assets/bootstrap/scss/_tables.scss
new file mode 100644
index 0000000..f041f60
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_tables.scss
@@ -0,0 +1,169 @@
+//
+// Basic Bootstrap table
+//
+
+.table {
+ width: 100%;
+ max-width: 100%;
+ margin-bottom: $spacer;
+ background-color: $table-bg; // Reset for nesting within parents with `background-color`.
+
+ th,
+ td {
+ padding: $table-cell-padding;
+ vertical-align: top;
+ border-top: $table-border-width solid $table-border-color;
+ }
+
+ thead th {
+ vertical-align: bottom;
+ border-bottom: (2 * $table-border-width) solid $table-border-color;
+ }
+
+ tbody + tbody {
+ border-top: (2 * $table-border-width) solid $table-border-color;
+ }
+
+ .table {
+ background-color: $body-bg;
+ }
+}
+
+
+//
+// Condensed table w/ half padding
+//
+
+.table-sm {
+ th,
+ td {
+ padding: $table-sm-cell-padding;
+ }
+}
+
+
+// Bordered version
+//
+// Add borders all around the table and between all the columns.
+
+.table-bordered {
+ border: $table-border-width solid $table-border-color;
+
+ th,
+ td {
+ border: $table-border-width solid $table-border-color;
+ }
+
+ thead {
+ th,
+ td {
+ border-bottom-width: (2 * $table-border-width);
+ }
+ }
+}
+
+
+// Zebra-striping
+//
+// Default zebra-stripe styles (alternating gray and transparent backgrounds)
+
+.table-striped {
+ tbody tr:nth-of-type(odd) {
+ background-color: $table-bg-accent;
+ }
+}
+
+
+// Hover effect
+//
+// Placed here since it has to come after the potential zebra striping
+
+.table-hover {
+ tbody tr {
+ @include hover {
+ background-color: $table-bg-hover;
+ }
+ }
+}
+
+
+// Table backgrounds
+//
+// Exact selectors below required to override `.table-striped` and prevent
+// inheritance to nested tables.
+
+// Generate the contextual variants
+@include table-row-variant(active, $table-bg-active);
+@include table-row-variant(success, $state-success-bg);
+@include table-row-variant(info, $state-info-bg);
+@include table-row-variant(warning, $state-warning-bg);
+@include table-row-variant(danger, $state-danger-bg);
+
+
+// Inverse styles
+//
+// Same table markup, but inverted color scheme: dark background and light text.
+
+.thead-inverse {
+ th {
+ color: $table-inverse-color;
+ background-color: $table-inverse-bg;
+ }
+}
+
+.thead-default {
+ th {
+ color: $table-head-color;
+ background-color: $table-head-bg;
+ }
+}
+
+.table-inverse {
+ color: $table-inverse-color;
+ background-color: $table-inverse-bg;
+
+ th,
+ td,
+ thead th {
+ border-color: $table-inverse-border;
+ }
+
+ &.table-bordered {
+ border: 0;
+ }
+
+ &.table-striped {
+ tbody tr:nth-of-type(odd) {
+ background-color: $table-inverse-bg-accent;
+ }
+ }
+
+ &.table-hover {
+ tbody tr {
+ @include hover {
+ background-color: $table-inverse-bg-hover;
+ }
+ }
+ }
+}
+
+
+// Responsive tables
+//
+// Add `.table-responsive` to `.table`s and we'll make them mobile friendly by
+// enabling horizontal scrolling. Only applies <768px. Everything above that
+// will display normally.
+
+.table-responsive {
+ @include media-breakpoint-down(md) {
+ display: block;
+ width: 100%;
+ overflow-x: auto;
+ -ms-overflow-style: -ms-autohiding-scrollbar; // See https://github.com/twbs/bootstrap/pull/10057
+
+ // Prevent double border on horizontal scroll due to use of `display: block;`
+ &.table-bordered {
+ border: 0;
+ }
+ }
+}
diff --git a/templates/assets/bootstrap/scss/_tooltip.scss b/templates/assets/bootstrap/scss/_tooltip.scss
new file mode 100644
index 0000000..24e198d
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_tooltip.scss
@@ -0,0 +1,90 @@
+// Base class
+.tooltip {
+ position: absolute;
+ z-index: $zindex-tooltip;
+ display: block;
+ // Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
+ // So reset our font and text properties to avoid inheriting weird values.
+ @include reset-text();
+ font-size: $font-size-sm;
+ // Allow breaking very long words so they don't overflow the tooltip's bounds
+ word-wrap: break-word;
+ opacity: 0;
+
+ &.show { opacity: $tooltip-opacity; }
+
+ &.tooltip-top,
+ &.bs-tether-element-attached-bottom {
+ padding: $tooltip-arrow-width 0;
+ margin-top: -$tooltip-margin;
+
+ .tooltip-inner::before {
+ bottom: 0;
+ left: 50%;
+ margin-left: -$tooltip-arrow-width;
+ content: "";
+ border-width: $tooltip-arrow-width $tooltip-arrow-width 0;
+ border-top-color: $tooltip-arrow-color;
+ }
+ }
+ &.tooltip-right,
+ &.bs-tether-element-attached-left {
+ padding: 0 $tooltip-arrow-width;
+ margin-left: $tooltip-margin;
+
+ .tooltip-inner::before {
+ top: 50%;
+ left: 0;
+ margin-top: -$tooltip-arrow-width;
+ content: "";
+ border-width: $tooltip-arrow-width $tooltip-arrow-width $tooltip-arrow-width 0;
+ border-right-color: $tooltip-arrow-color;
+ }
+ }
+ &.tooltip-bottom,
+ &.bs-tether-element-attached-top {
+ padding: $tooltip-arrow-width 0;
+ margin-top: $tooltip-margin;
+
+ .tooltip-inner::before {
+ top: 0;
+ left: 50%;
+ margin-left: -$tooltip-arrow-width;
+ content: "";
+ border-width: 0 $tooltip-arrow-width $tooltip-arrow-width;
+ border-bottom-color: $tooltip-arrow-color;
+ }
+ }
+ &.tooltip-left,
+ &.bs-tether-element-attached-right {
+ padding: 0 $tooltip-arrow-width;
+ margin-left: -$tooltip-margin;
+
+ .tooltip-inner::before {
+ top: 50%;
+ right: 0;
+ margin-top: -$tooltip-arrow-width;
+ content: "";
+ border-width: $tooltip-arrow-width 0 $tooltip-arrow-width $tooltip-arrow-width;
+ border-left-color: $tooltip-arrow-color;
+ }
+ }
+}
+
+// Wrapper for the tooltip content
+.tooltip-inner {
+ max-width: $tooltip-max-width;
+ padding: $tooltip-padding-y $tooltip-padding-x;
+ color: $tooltip-color;
+ text-align: center;
+ background-color: $tooltip-bg;
+ @include border-radius($border-radius);
+
+ &::before {
+ position: absolute;
+ width: 0;
+ height: 0;
+ border-color: transparent;
+ border-style: solid;
+ }
+}
diff --git a/templates/assets/bootstrap/scss/_transitions.scss b/templates/assets/bootstrap/scss/_transitions.scss
new file mode 100644
index 0000000..86c04a5
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_transitions.scss
@@ -0,0 +1,34 @@
+.fade {
+ opacity: 0;
+ @include transition($transition-fade);
+
+ &.show {
+ opacity: 1;
+ }
+}
+
+.collapse {
+ display: none;
+ &.show {
+ display: block;
+ }
+}
+
+tr {
+ &.collapse.show {
+ display: table-row;
+ }
+}
+
+tbody {
+ &.collapse.show {
+ display: table-row-group;
+ }
+}
+
+.collapsing {
+ position: relative;
+ height: 0;
+ overflow: hidden;
+ @include transition($transition-collapse);
+}
diff --git a/templates/assets/bootstrap/scss/_type.scss b/templates/assets/bootstrap/scss/_type.scss
new file mode 100644
index 0000000..fc9c791
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_type.scss
@@ -0,0 +1,143 @@
+//
+// Headings
+//
+
+h1, h2, h3, h4, h5, h6,
+.h1, .h2, .h3, .h4, .h5, .h6 {
+ margin-bottom: $headings-margin-bottom;
+ font-family: $headings-font-family;
+ font-weight: $headings-font-weight;
+ line-height: $headings-line-height;
+ color: $headings-color;
+}
+
+h1, .h1 { font-size: $font-size-h1; }
+h2, .h2 { font-size: $font-size-h2; }
+h3, .h3 { font-size: $font-size-h3; }
+h4, .h4 { font-size: $font-size-h4; }
+h5, .h5 { font-size: $font-size-h5; }
+h6, .h6 { font-size: $font-size-h6; }
+
+.lead {
+ font-size: $lead-font-size;
+ font-weight: $lead-font-weight;
+}
+
+// Type display classes
+.display-1 {
+ font-size: $display1-size;
+ font-weight: $display1-weight;
+ line-height: $display-line-height;
+}
+.display-2 {
+ font-size: $display2-size;
+ font-weight: $display2-weight;
+ line-height: $display-line-height;
+}
+.display-3 {
+ font-size: $display3-size;
+ font-weight: $display3-weight;
+ line-height: $display-line-height;
+}
+.display-4 {
+ font-size: $display4-size;
+ font-weight: $display4-weight;
+ line-height: $display-line-height;
+}
+
+
+//
+// Horizontal rules
+//
+
+hr {
+ margin-top: 1rem;
+ margin-bottom: 1rem;
+ border: 0;
+ border-top: $hr-border-width solid $hr-border-color;
+}
+
+
+//
+// Emphasis
+//
+
+small,
+.small {
+ font-size: $small-font-size;
+ font-weight: $font-weight-normal;
+}
+
+mark,
+.mark {
+ padding: $mark-padding;
+ background-color: $mark-bg;
+}
+
+
+//
+// Lists
+//
+
+.list-unstyled {
+ @include list-unstyled;
+}
+
+// Inline turns list items into inline-block
+.list-inline {
+ @include list-unstyled;
+}
+.list-inline-item {
+ display: inline-block;
+
+ &:not(:last-child) {
+ margin-right: $list-inline-padding;
+ }
+}
+
+
+//
+// Misc
+//
+
+// Builds on `abbr`
+.initialism {
+ font-size: 90%;
+ text-transform: uppercase;
+}
+
+// Blockquotes
+.blockquote {
+ padding: ($spacer / 2) $spacer;
+ margin-bottom: $spacer;
+ font-size: $blockquote-font-size;
+ border-left: $blockquote-border-width solid $blockquote-border-color;
+}
+
+.blockquote-footer {
+ display: block;
+ font-size: 80%; // back to default font-size
+ color: $blockquote-small-color;
+
+ &::before {
+ content: "\2014 \00A0"; // em dash, nbsp
+ }
+}
+
+// Opposite alignment of blockquote
+.blockquote-reverse {
+ padding-right: $spacer;
+ padding-left: 0;
+ text-align: right;
+ border-right: $blockquote-border-width solid $blockquote-border-color;
+ border-left: 0;
+}
+
+.blockquote-reverse .blockquote-footer {
+ &::before {
+ content: "";
+ }
+ &::after {
+ content: "\00A0 \2014"; // nbsp, em dash
+ }
+}
diff --git a/templates/assets/bootstrap/scss/_utilities.scss b/templates/assets/bootstrap/scss/_utilities.scss
new file mode 100644
index 0000000..7d08ff2
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_utilities.scss
@@ -0,0 +1,13 @@
+@import "utilities/align";
+@import "utilities/background";
+@import "utilities/borders";
+@import "utilities/clearfix";
+@import "utilities/display";
+@import "utilities/flex";
+@import "utilities/float";
+@import "utilities/position";
+@import "utilities/screenreaders";
+@import "utilities/sizing";
+@import "utilities/spacing";
+@import "utilities/text";
+@import "utilities/visibility";
diff --git a/templates/assets/bootstrap/scss/_variables.scss b/templates/assets/bootstrap/scss/_variables.scss
new file mode 100644
index 0000000..69eb401
--- /dev/null
+++ b/templates/assets/bootstrap/scss/_variables.scss
@@ -0,0 +1,921 @@
+// Variables
+//
+// Copy settings from this file into the provided `_custom.scss` to override
+// the Bootstrap defaults without modifying key, versioned files.
+
+
+// Table of Contents
+//
+// Colors
+// Options
+// Spacing
+// Body
+// Links
+// Grid breakpoints
+// Grid containers
+// Grid columns
+// Fonts
+// Components
+// Tables
+// Buttons
+// Forms
+// Dropdowns
+// Z-index master list
+// Navbar
+// Navs
+// Pagination
+// Jumbotron
+// Form states and alerts
+// Cards
+// Tooltips
+// Popovers
+// Badges
+// Modals
+// Alerts
+// Progress bars
+// List group
+// Image thumbnails
+// Figures
+// Breadcrumbs
+// Carousel
+// Close
+// Code
+
+@mixin _assert-ascending($map, $map-name) {
+ $prev-key: null;
+ $prev-num: null;
+ @each $key, $num in $map {
+ @if $prev-num == null {
+ // Do nothing
+ } @else if not comparable($prev-num, $num) {
+ @warn "Potentially invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} whose unit makes it incomparable to #{$prev-num}, the value of the previous key '#{$prev-key}' !";
+ } @else if $prev-num >= $num {
+ @warn "Invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} which isn't greater than #{$prev-num}, the value of the previous key '#{$prev-key}' !";
+ }
+ $prev-key: $key;
+ $prev-num: $num;
+ }
+}
+
+// Replace `$search` with `$replace` in `$string`
+// @author Hugo Giraudel
+// @param {String} $string - Initial string
+// @param {String} $search - Substring to replace
+// @param {String} $replace ('') - New value
+// @return {String} - Updated string
+@function str-replace($string, $search, $replace: "") {
+ $index: str-index($string, $search);
+
+ @if $index {
+ @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
+ }
+
+ @return $string;
+}
+
+@mixin _assert-starts-at-zero($map) {
+ $values: map-values($map);
+ $first-value: nth($values, 1);
+ @if $first-value != 0 {
+ @warn "First breakpoint in `$grid-breakpoints` must start at 0, but starts at #{$first-value}.";
+ }
+}
+
+
+// General variable structure
+//
+// Variable format should follow the `$component-modifier-state-property` order.
+
+
+// Colors
+//
+// Grayscale and brand colors for use across Bootstrap.
+
+// Start with assigning color names to specific hex values.
+$white: #fff !default;
+$black: #000 !default;
+$red: #d9534f !default;
+$orange: #f0ad4e !default;
+$yellow: #ffd500 !default;
+$green: #5cb85c !default;
+$blue: #0275d8 !default;
+$teal: #5bc0de !default;
+$pink: #ff5b77 !default;
+$purple: #613d7c !default;
+
+// Create grayscale
+$gray-dark: #292b2c !default;
+$gray: #464a4c !default;
+$gray-light: #636c72 !default;
+$gray-lighter: #eceeef !default;
+$gray-lightest: #f7f7f9 !default;
+
+// Reassign color vars to semantic color scheme
+$brand-primary: $blue !default;
+$brand-success: $green !default;
+$brand-info: $teal !default;
+$brand-warning: $orange !default;
+$brand-danger: $red !default;
+$brand-inverse: $gray-dark !default;
+
+
+// Options
+//
+// Quickly modify global styling by enabling or disabling optional features.
+
+$enable-rounded: true !default;
+$enable-shadows: false !default;
+$enable-gradients: false !default;
+$enable-transitions: true !default;
+$enable-hover-media-query: false !default;
+$enable-grid-classes: true !default;
+$enable-print-styles: true !default;
+
+
+// Spacing
+//
+// Control the default styling of most Bootstrap elements by modifying these
+// variables. Mostly focused on spacing.
+// You can add more entries to the $spacers map, should you need more variation.
+
+$spacer: 1rem !default;
+$spacers: (
+ 0: 0,
+ 1: ($spacer * .25),
+ 2: ($spacer * .5),
+ 3: $spacer,
+ 4: ($spacer * 1.5),
+ 5: ($spacer * 3)
+) !default;
+
+// This variable affects the `.h-*` and `.w-*` classes.
+$sizes: (
+ 25: 25%,
+ 50: 50%,
+ 75: 75%,
+ 100: 100%
+) !default;
+
+// Body
+//
+// Settings for the `<body>` element.
+
+$body-bg: $white !default;
+$body-color: $gray-dark !default;
+
+// Links
+//
+// Style anchor elements.
+
+$link-color: $brand-primary !default;
+$link-decoration: none !default;
+$link-hover-color: darken($link-color, 15%) !default;
+$link-hover-decoration: underline !default;
+
+
+// Grid breakpoints
+//
+// Define the minimum dimensions at which your layout will change,
+// adapting to different screen sizes, for use in media queries.
+
+$grid-breakpoints: (
+ xs: 0,
+ sm: 576px,
+ md: 768px,
+ lg: 992px,
+ xl: 1200px
+) !default;
+@include _assert-ascending($grid-breakpoints, "$grid-breakpoints");
+@include _assert-starts-at-zero($grid-breakpoints);
+
+
+// Grid containers
+//
+// Define the maximum width of `.container` for different screen sizes.
+
+$container-max-widths: (
+ sm: 540px,
+ md: 720px,
+ lg: 960px,
+ xl: 1140px
+) !default;
+@include _assert-ascending($container-max-widths, "$container-max-widths");
+
+
+// Grid columns
+//
+// Set the number of columns and specify the width of the gutters.
+
+$grid-columns: 12 !default;
+$grid-gutter-width-base: 30px !default;
+$grid-gutter-widths: (
+ xs: $grid-gutter-width-base,
+ sm: $grid-gutter-width-base,
+ md: $grid-gutter-width-base,
+ lg: $grid-gutter-width-base,
+ xl: $grid-gutter-width-base
+) !default;
+
+
+// Components
+//
+// Define common padding and border radius sizes and more.
+
+$line-height-lg: (4 / 3) !default;
+$line-height-sm: 1.5 !default;
+
+$border-width: 1px !default;
+
+$border-radius: .25rem !default;
+$border-radius-lg: .3rem !default;
+$border-radius-sm: .2rem !default;
+
+$component-active-color: $white !default;
+$component-active-bg: $brand-primary !default;
+
+$caret-width: .3em !default;
+
+$transition-base: all .2s ease-in-out !default;
+$transition-fade: opacity .15s linear !default;
+$transition-collapse: height .35s ease !default;
+
+
+// Fonts
+//
+// Font, line-height, and color for body text, headings, and more.
+
+$font-family-sans-serif: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !default;
+$font-family-monospace: Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !default;
+$font-family-base: $font-family-sans-serif !default;
+
+$font-size-base: 1rem !default; // Assumes the browser default, typically `16px`
+$font-size-lg: 1.25rem !default;
+$font-size-sm: .875rem !default;
+$font-size-xs: .75rem !default;
+
+$font-weight-normal: normal !default;
+$font-weight-bold: bold !default;
+
+$font-weight-base: $font-weight-normal !default;
+$line-height-base: 1.5 !default;
+
+$font-size-h1: 2.5rem !default;
+$font-size-h2: 2rem !default;
+$font-size-h3: 1.75rem !default;
+$font-size-h4: 1.5rem !default;
+$font-size-h5: 1.25rem !default;
+$font-size-h6: 1rem !default;
+
+$headings-margin-bottom: ($spacer / 2) !default;
+$headings-font-family: inherit !default;
+$headings-font-weight: 500 !default;
+$headings-line-height: 1.1 !default;
+$headings-color: inherit !default;
+
+$display1-size: 6rem !default;
+$display2-size: 5.5rem !default;
+$display3-size: 4.5rem !default;
+$display4-size: 3.5rem !default;
+
+$display1-weight: 300 !default;
+$display2-weight: 300 !default;
+$display3-weight: 300 !default;
+$display4-weight: 300 !default;
+$display-line-height: $headings-line-height !default;
+
+$lead-font-size: 1.25rem !default;
+$lead-font-weight: 300 !default;
+
+$small-font-size: 80% !default;
+
+$text-muted: $gray-light !default;
+
+$blockquote-small-color: $gray-light !default;
+$blockquote-font-size: ($font-size-base * 1.25) !default;
+$blockquote-border-color: $gray-lighter !default;
+$blockquote-border-width: .25rem !default;
+
+$hr-border-color: rgba($black,.1) !default;
+$hr-border-width: $border-width !default;
+
+$mark-padding: .2em !default;
+
+$dt-font-weight: $font-weight-bold !default;
+
+$kbd-box-shadow: inset 0 -.1rem 0 rgba($black,.25) !default;
+$nested-kbd-font-weight: $font-weight-bold !default;
+
+$list-inline-padding: 5px !default;
+
+
+// Tables
+//
+// Customizes the `.table` component with basic values, each used across all table variations.
+
+$table-cell-padding: .75rem !default;
+$table-sm-cell-padding: .3rem !default;
+
+$table-bg: transparent !default;
+$table-bg-accent: rgba($black,.05) !default;
+$table-bg-hover: rgba($black,.075) !default;
+$table-bg-active: $table-bg-hover !default;
+
+$table-border-width: $border-width !default;
+$table-border-color: $gray-lighter !default;
+
+$table-head-bg: $gray-lighter !default;
+$table-head-color: $gray !default;
+
+$table-inverse-bg: $gray-dark !default;
+$table-inverse-bg-accent: rgba($white, .05) !default;
+$table-inverse-bg-hover: rgba($white, .075) !default;
+$table-inverse-bg-active: $table-inverse-bg-hover !default;
+$table-inverse-border: lighten($gray-dark, 7.5%) !default;
+$table-inverse-color: $body-bg !default;
+
+
+// Buttons
+//
+// For each of Bootstrap's buttons, define text, background and border color.
+
+$btn-padding-x: 1rem !default;
+$btn-padding-y: .5rem !default;
+$btn-line-height: 1.25 !default;
+$btn-font-weight: $font-weight-normal !default;
+$btn-box-shadow: inset 0 1px 0 rgba($white,.15), 0 1px 1px rgba($black,.075) !default;
+$btn-focus-box-shadow: 0 0 0 2px rgba($brand-primary, .25) !default;
+$btn-active-box-shadow: inset 0 3px 5px rgba($black,.125) !default;
+
+$btn-primary-color: $white !default;
+$btn-primary-bg: $brand-primary !default;
+$btn-primary-border: $btn-primary-bg !default;
+
+$btn-secondary-color: $gray-dark !default;
+$btn-secondary-bg: $white !default;
+$btn-secondary-border: #ccc !default;
+
+$btn-info-color: $white !default;
+$btn-info-bg: $brand-info !default;
+$btn-info-border: $btn-info-bg !default;
+
+$btn-success-color: $white !default;
+$btn-success-bg: $brand-success !default;
+$btn-success-border: $btn-success-bg !default;
+
+$btn-warning-color: $white !default;
+$btn-warning-bg: $brand-warning !default;
+$btn-warning-border: $btn-warning-bg !default;
+
+$btn-danger-color: $white !default;
+$btn-danger-bg: $brand-danger !default;
+$btn-danger-border: $btn-danger-bg !default;
+
+$btn-link-disabled-color: $gray-light !default;
+
+$btn-padding-x-sm: .5rem !default;
+$btn-padding-y-sm: .25rem !default;
+
+$btn-padding-x-lg: 1.5rem !default;
+$btn-padding-y-lg: .75rem !default;
+
+$btn-block-spacing-y: .5rem !default;
+
+// Allows for customizing button radius independently from global border radius
+$btn-border-radius: $border-radius !default;
+$btn-border-radius-lg: $border-radius-lg !default;
+$btn-border-radius-sm: $border-radius-sm !default;
+
+$btn-transition: all .2s ease-in-out !default;
+
+
+// Forms
+
+$input-padding-x: .75rem !default;
+$input-padding-y: .5rem !default;
+$input-line-height: 1.25 !default;
+
+$input-bg: $white !default;
+$input-bg-disabled: $gray-lighter !default;
+
+$input-color: $gray !default;
+$input-border-color: rgba($black,.15) !default;
+$input-btn-border-width: $border-width !default; // For form controls and buttons
+$input-box-shadow: inset 0 1px 1px rgba($black,.075) !default;
+
+$input-border-radius: $border-radius !default;
+$input-border-radius-lg: $border-radius-lg !default;
+$input-border-radius-sm: $border-radius-sm !default;
+
+$input-bg-focus: $input-bg !default;
+$input-border-focus: lighten($brand-primary, 25%) !default;
+$input-box-shadow-focus: $input-box-shadow, rgba($input-border-focus, .6) !default;
+$input-color-focus: $input-color !default;
+
+$input-color-placeholder: $gray-light !default;
+
+$input-padding-x-sm: .5rem !default;
+$input-padding-y-sm: .25rem !default;
+
+$input-padding-x-lg: 1.5rem !default;
+$input-padding-y-lg: .75rem !default;
+
+$input-height: (($font-size-base * $input-line-height) + ($input-padding-y * 2)) !default;
+$input-height-lg: (($font-size-lg * $line-height-lg) + ($input-padding-y-lg * 2)) !default;
+$input-height-sm: (($font-size-sm * $line-height-sm) + ($input-padding-y-sm * 2)) !default;
+
+$input-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s !default;
+
+$form-text-margin-top: .25rem !default;
+$form-feedback-margin-top: $form-text-margin-top !default;
+
+$form-check-margin-bottom: .5rem !default;
+$form-check-input-gutter: 1.25rem !default;
+$form-check-input-margin-y: .25rem !default;
+$form-check-input-margin-x: .25rem !default;
+
+$form-check-inline-margin-x: .75rem !default;
+
+$form-group-margin-bottom: 1rem !default;
+
+$input-group-addon-bg: $gray-lighter !default;
+$input-group-addon-border-color: $input-border-color !default;
+
+$cursor-disabled: not-allowed !default;
+
+$custom-control-gutter: 1.5rem !default;
+$custom-control-spacer-x: 1rem !default;
+$custom-control-spacer-y: .25rem !default;
+
+$custom-control-indicator-size: 1rem !default;
+$custom-control-indicator-bg: #ddd !default;
+$custom-control-indicator-bg-size: 50% 50% !default;
+$custom-control-indicator-box-shadow: inset 0 .25rem .25rem rgba($black,.1) !default;
+
+$custom-control-disabled-cursor: $cursor-disabled !default;
+$custom-control-disabled-indicator-bg: $gray-lighter !default;
+$custom-control-disabled-description-color: $gray-light !default;
+
+$custom-control-checked-indicator-color: $white !default;
+$custom-control-checked-indicator-bg: $brand-primary !default;
+$custom-control-checked-indicator-box-shadow: none !default;
+
+$custom-control-focus-indicator-box-shadow: 0 0 0 1px $body-bg, 0 0 0 3px $brand-primary !default;
+
+$custom-control-active-indicator-color: $white !default;
+$custom-control-active-indicator-bg: lighten($brand-primary, 35%) !default;
+$custom-control-active-indicator-box-shadow: none !default;
+
+$custom-checkbox-radius: $border-radius !default;
+$custom-checkbox-checked-icon: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='#{$custom-control-checked-indicator-color}' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E"), "#", "%23") !default;
+
+$custom-checkbox-indeterminate-bg: $brand-primary !default;
+$custom-checkbox-indeterminate-indicator-color: $custom-control-checked-indicator-color !default;
+$custom-checkbox-indeterminate-icon: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3E%3Cpath stroke='#{$custom-checkbox-indeterminate-indicator-color}' d='M0 2h4'/%3E%3C/svg%3E"), "#", "%23") !default;
+$custom-checkbox-indeterminate-box-shadow: none !default;
+
+$custom-radio-radius: 50% !default;
+$custom-radio-checked-icon: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='#{$custom-control-checked-indicator-color}'/%3E%3C/svg%3E"), "#", "%23") !default;
+
+$custom-select-padding-x: .75rem !default;
+$custom-select-padding-y: .375rem !default;
+$custom-select-indicator-padding: 1rem !default; // Extra padding to account for the presence of the background-image based indicator
+$custom-select-line-height: $input-line-height !default;
+$custom-select-color: $input-color !default;
+$custom-select-disabled-color: $gray-light !default;
+$custom-select-bg: $white !default;
+$custom-select-disabled-bg: $gray-lighter !default;
+$custom-select-bg-size: 8px 10px !default; // In pixels because image dimensions
+$custom-select-indicator-color: #333 !default;
+$custom-select-indicator: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='#{$custom-select-indicator-color}' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E"), "#", "%23") !default;
+$custom-select-border-width: $input-btn-border-width !default;
+$custom-select-border-color: $input-border-color !default;
+$custom-select-border-radius: $border-radius !default;
+
+$custom-select-focus-border-color: lighten($brand-primary, 25%) !default;
+$custom-select-focus-box-shadow: inset 0 1px 2px rgba($black, .075), 0 0 5px rgba($custom-select-focus-border-color, .5) !default;
+
+$custom-select-sm-font-size: 75% !default;
+
+$custom-file-height: 2.5rem !default;
+$custom-file-width: 14rem !default;
+$custom-file-focus-box-shadow: 0 0 0 .075rem $white, 0 0 0 .2rem $brand-primary !default;
+
+$custom-file-padding-x: .5rem !default;
+$custom-file-padding-y: 1rem !default;
+$custom-file-line-height: 1.5 !default;
+$custom-file-color: $gray !default;
+$custom-file-bg: $white !default;
+$custom-file-border-width: $border-width !default;
+$custom-file-border-color: $input-border-color !default;
+$custom-file-border-radius: $border-radius !default;
+$custom-file-box-shadow: inset 0 .2rem .4rem rgba($black,.05) !default;
+$custom-file-button-color: $custom-file-color !default;
+$custom-file-button-bg: $gray-lighter !default;
+$custom-file-text: (
+ placeholder: (
+ en: "Choose file..."
+ ),
+ button-label: (
+ en: "Browse"
+ )
+) !default;
+
+
+// Form validation icons
+$form-icon-success-color: $brand-success !default;
+$form-icon-success: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='#{$form-icon-success-color}' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3E%3C/svg%3E"), "#", "%23") !default;
+
+$form-icon-warning-color: $brand-warning !default;
+$form-icon-warning: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='#{$form-icon-warning-color}' d='M4.4 5.324h-.8v-2.46h.8zm0 1.42h-.8V5.89h.8zM3.76.63L.04 7.075c-.115.2.016.425.26.426h7.397c.242 0 .372-.226.258-.426C6.726 4.924 5.47 2.79 4.253.63c-.113-.174-.39-.174-.494 0z'/%3E%3C/svg%3E"), "#", "%23") !default;
+
+$form-icon-danger-color: $brand-danger !default;
+$form-icon-danger: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#{$form-icon-danger-color}' viewBox='-2 -2 7 7'%3E%3Cpath stroke='#{$form-icon-danger-color}' d='M0 0l3 3m0-3L0 3'/%3E%3Ccircle r='.5'/%3E%3Ccircle cx='3' r='.5'/%3E%3Ccircle cy='3' r='.5'/%3E%3Ccircle cx='3' cy='3' r='.5'/%3E%3C/svg%3E"), "#", "%23") !default;
+
+
+// Dropdowns
+//
+// Dropdown menu container and contents.
+
+$dropdown-min-width: 10rem !default;
+$dropdown-padding-y: .5rem !default;
+$dropdown-margin-top: .125rem !default;
+$dropdown-bg: $white !default;
+$dropdown-border-color: rgba($black,.15) !default;
+$dropdown-border-width: $border-width !default;
+$dropdown-divider-bg: $gray-lighter !default;
+$dropdown-box-shadow: 0 .5rem 1rem rgba($black,.175) !default;
+
+$dropdown-link-color: $gray-dark !default;
+$dropdown-link-hover-color: darken($gray-dark, 5%) !default;
+$dropdown-link-hover-bg: $gray-lightest !default;
+
+$dropdown-link-active-color: $component-active-color !default;
+$dropdown-link-active-bg: $component-active-bg !default;
+
+$dropdown-link-disabled-color: $gray-light !default;
+
+$dropdown-item-padding-x: 1.5rem !default;
+
+$dropdown-header-color: $gray-light !default;
+
+
+// Z-index master list
+//
+// Warning: Avoid customizing these values. They're used for a bird's eye view
+// of components dependent on the z-axis and are designed to all work together.
+
+$zindex-dropdown-backdrop: 990 !default;
+$zindex-dropdown: 1000 !default;
+$zindex-sticky: 1020 !default;
+$zindex-fixed: 1030 !default;
+$zindex-modal-backdrop: 1040 !default;
+$zindex-modal: 1050 !default;
+$zindex-popover: 1060 !default;
+$zindex-tooltip: 1070 !default;
+
+// Navbar
+
+$navbar-padding-x: $spacer !default;
+$navbar-padding-y: ($spacer / 2) !default;
+
+$navbar-toggler-padding-x: .75rem !default;
+$navbar-toggler-padding-y: .25rem !default;
+$navbar-toggler-font-size: $font-size-lg !default;
+$navbar-toggler-border-radius: $btn-border-radius !default;
+
+$navbar-inverse-color: rgba($white,.5) !default;
+$navbar-inverse-hover-color: rgba($white,.75) !default;
+$navbar-inverse-active-color: rgba($white,1) !default;
+$navbar-inverse-disabled-color: rgba($white,.25) !default;
+$navbar-inverse-toggler-bg: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='#{$navbar-inverse-color}' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E"), "#", "%23") !default;
+$navbar-inverse-toggler-border: rgba($white,.1) !default;
+
+$navbar-light-color: rgba($black,.5) !default;
+$navbar-light-hover-color: rgba($black,.7) !default;
+$navbar-light-active-color: rgba($black,.9) !default;
+$navbar-light-disabled-color: rgba($black,.3) !default;
+$navbar-light-toggler-bg: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='#{$navbar-light-color}' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E"), "#", "%23") !default;
+$navbar-light-toggler-border: rgba($black,.1) !default;
+
+// Navs
+
+$nav-link-padding: .5em 1em !default;
+$nav-disabled-link-color: $gray-light !default;
+
+$nav-tabs-border-color: #ddd !default;
+$nav-tabs-border-width: $border-width !default;
+$nav-tabs-border-radius: $border-radius !default;
+$nav-tabs-link-hover-border-color: $gray-lighter !default;
+$nav-tabs-active-link-color: $gray !default;
+$nav-tabs-active-link-bg: $body-bg !default;
+$nav-tabs-active-link-border-color: #ddd !default;
+
+$nav-pills-border-radius: $border-radius !default;
+$nav-pills-active-link-color: $component-active-color !default;
+$nav-pills-active-link-bg: $component-active-bg !default;
+
+
+// Pagination
+
+$pagination-padding-x: .75rem !default;
+$pagination-padding-y: .5rem !default;
+$pagination-padding-x-sm: .5rem !default;
+$pagination-padding-y-sm: .25rem !default;
+$pagination-padding-x-lg: 1.5rem !default;
+$pagination-padding-y-lg: .75rem !default;
+$pagination-line-height: 1.25 !default;
+
+$pagination-color: $link-color !default;
+$pagination-bg: $white !default;
+$pagination-border-width: $border-width !default;
+$pagination-border-color: #ddd !default;
+
+$pagination-hover-color: $link-hover-color !default;
+$pagination-hover-bg: $gray-lighter !default;
+$pagination-hover-border: #ddd !default;
+
+$pagination-active-color: $white !default;
+$pagination-active-bg: $brand-primary !default;
+$pagination-active-border: $brand-primary !default;
+
+$pagination-disabled-color: $gray-light !default;
+$pagination-disabled-bg: $white !default;
+$pagination-disabled-border: #ddd !default;
+
+
+// Jumbotron
+
+$jumbotron-padding: 2rem !default;
+$jumbotron-bg: $gray-lighter !default;
+
+
+// Form states and alerts
+//
+// Define colors for form feedback states and, by default, alerts.
+
+$state-success-text: #3c763d !default;
+$state-success-bg: #dff0d8 !default;
+$state-success-border: darken($state-success-bg, 5%) !default;
+
+$state-info-text: #31708f !default;
+$state-info-bg: #d9edf7 !default;
+$state-info-border: darken($state-info-bg, 7%) !default;
+
+$state-warning-text: #8a6d3b !default;
+$state-warning-bg: #fcf8e3 !default;
+$mark-bg: $state-warning-bg !default;
+$state-warning-border: darken($state-warning-bg, 5%) !default;
+
+$state-danger-text: #a94442 !default;
+$state-danger-bg: #f2dede !default;
+$state-danger-border: darken($state-danger-bg, 5%) !default;
+
+
+// Cards
+
+$card-spacer-x: 1.25rem !default;
+$card-spacer-y: .75rem !default;
+$card-border-width: 1px !default;
+$card-border-radius: $border-radius !default;
+$card-border-color: rgba($black,.125) !default;
+$card-border-radius-inner: calc(#{$card-border-radius} - #{$card-border-width}) !default;
+$card-cap-bg: $gray-lightest !default;
+$card-bg: $white !default;
+
+$card-link-hover-color: $white !default;
+
+$card-img-overlay-padding: 1.25rem !default;
+
+$card-deck-margin: ($grid-gutter-width-base / 2) !default;
+
+$card-columns-count: 3 !default;
+$card-columns-gap: 1.25rem !default;
+$card-columns-margin: $card-spacer-y !default;
+
+
+// Tooltips
+
+$tooltip-max-width: 200px !default;
+$tooltip-color: $white !default;
+$tooltip-bg: $black !default;
+$tooltip-opacity: .9 !default;
+$tooltip-padding-y: 3px !default;
+$tooltip-padding-x: 8px !default;
+$tooltip-margin: 3px !default;
+
+$tooltip-arrow-width: 5px !default;
+$tooltip-arrow-color: $tooltip-bg !default;
+
+
+// Popovers
+
+$popover-inner-padding: 1px !default;
+$popover-bg: $white !default;
+$popover-max-width: 276px !default;
+$popover-border-width: $border-width !default;
+$popover-border-color: rgba($black,.2) !default;
+$popover-box-shadow: 0 5px 10px rgba($black,.2) !default;
+
+$popover-title-bg: darken($popover-bg, 3%) !default;
+$popover-title-padding-x: 14px !default;
+$popover-title-padding-y: 8px !default;
+
+$popover-content-padding-x: 14px !default;
+$popover-content-padding-y: 9px !default;
+
+$popover-arrow-width: 10px !default;
+$popover-arrow-color: $popover-bg !default;
+
+$popover-arrow-outer-width: ($popover-arrow-width + 1px) !default;
+$popover-arrow-outer-color: fade-in($popover-border-color, .05) !default;
+
+
+// Badges
+
+$badge-default-bg: $gray-light !default;
+$badge-primary-bg: $brand-primary !default;
+$badge-success-bg: $brand-success !default;
+$badge-info-bg: $brand-info !default;
+$badge-warning-bg: $brand-warning !default;
+$badge-danger-bg: $brand-danger !default;
+
+$badge-color: $white !default;
+$badge-link-hover-color: $white !default;
+$badge-font-size: 75% !default;
+$badge-font-weight: $font-weight-bold !default;
+$badge-padding-x: .4em !default;
+$badge-padding-y: .25em !default;
+
+$badge-pill-padding-x: .6em !default;
+// Use a higher than normal value to ensure completely rounded edges when
+// customizing padding or font-size on labels.
+$badge-pill-border-radius: 10rem !default;
+
+
+// Modals
+
+// Padding applied to the modal body
+$modal-inner-padding: 15px !default;
+
+$modal-dialog-margin: 10px !default;
+$modal-dialog-sm-up-margin-y: 30px !default;
+
+$modal-title-line-height: $line-height-base !default;
+
+$modal-content-bg: $white !default;
+$modal-content-border-color: rgba($black,.2) !default;
+$modal-content-border-width: $border-width !default;
+$modal-content-xs-box-shadow: 0 3px 9px rgba($black,.5) !default;
+$modal-content-sm-up-box-shadow: 0 5px 15px rgba($black,.5) !default;
+
+$modal-backdrop-bg: $black !default;
+$modal-backdrop-opacity: .5 !default;
+$modal-header-border-color: $gray-lighter !default;
+$modal-footer-border-color: $modal-header-border-color !default;
+$modal-header-border-width: $modal-content-border-width !default;
+$modal-footer-border-width: $modal-header-border-width !default;
+$modal-header-padding: 15px !default;
+
+$modal-lg: 800px !default;
+$modal-md: 500px !default;
+$modal-sm: 300px !default;
+
+$modal-transition: transform .3s ease-out !default;
+
+
+// Alerts
+//
+// Define alert colors, border radius, and padding.
+
+$alert-padding-x: 1.25rem !default;
+$alert-padding-y: .75rem !default;
+$alert-margin-bottom: 1rem !default;
+$alert-border-radius: $border-radius !default;
+$alert-link-font-weight: $font-weight-bold !default;
+$alert-border-width: $border-width !default;
+
+$alert-success-bg: $state-success-bg !default;
+$alert-success-text: $state-success-text !default;
+$alert-success-border: $state-success-border !default;
+
+$alert-info-bg: $state-info-bg !default;
+$alert-info-text: $state-info-text !default;
+$alert-info-border: $state-info-border !default;
+
+$alert-warning-bg: $state-warning-bg !default;
+$alert-warning-text: $state-warning-text !default;
+$alert-warning-border: $state-warning-border !default;
+
+$alert-danger-bg: $state-danger-bg !default;
+$alert-danger-text: $state-danger-text !default;
+$alert-danger-border: $state-danger-border !default;
+
+
+// Progress bars
+
+$progress-height: 1rem !default;
+$progress-font-size: .75rem !default;
+$progress-bg: $gray-lighter !default;
+$progress-border-radius: $border-radius !default;
+$progress-box-shadow: inset 0 .1rem .1rem rgba($black,.1) !default;
+$progress-bar-color: $white !default;
+$progress-bar-bg: $brand-primary !default;
+$progress-bar-animation-timing: 1s linear infinite !default;
+
+// List group
+
+$list-group-color: $body-color !default;
+$list-group-bg: $white !default;
+$list-group-border-color: rgba($black,.125) !default;
+$list-group-border-width: $border-width !default;
+$list-group-border-radius: $border-radius !default;
+
+$list-group-item-padding-x: 1.25rem !default;
+$list-group-item-padding-y: .75rem !default;
+
+$list-group-hover-bg: $gray-lightest !default;
+$list-group-active-color: $component-active-color !default;
+$list-group-active-bg: $component-active-bg !default;
+$list-group-active-border: $list-group-active-bg !default;
+
+$list-group-disabled-color: $gray-light !default;
+$list-group-disabled-bg: $list-group-bg !default;
+
+$list-group-link-color: $gray !default;
+$list-group-link-hover-color: $list-group-link-color !default;
+
+$list-group-link-active-color: $list-group-color !default;
+$list-group-link-active-bg: $gray-lighter !default;
+
+
+// Image thumbnails
+
+$thumbnail-padding: .25rem !default;
+$thumbnail-bg: $body-bg !default;
+$thumbnail-border-width: $border-width !default;
+$thumbnail-border-color: #ddd !default;
+$thumbnail-border-radius: $border-radius !default;
+$thumbnail-box-shadow: 0 1px 2px rgba($black,.075) !default;
+$thumbnail-transition: all .2s ease-in-out !default;
+
+
+// Figures
+
+$figure-caption-font-size: 90% !default;
+$figure-caption-color: $gray-light !default;
+
+
+// Breadcrumbs
+
+$breadcrumb-padding-y: .75rem !default;
+$breadcrumb-padding-x: 1rem !default;
+$breadcrumb-item-padding: .5rem !default;
+
+$breadcrumb-bg: $gray-lighter !default;
+$breadcrumb-divider-color: $gray-light !default;
+$breadcrumb-active-color: $gray-light !default;
+$breadcrumb-divider: "/" !default;
+
+
+// Carousel
+
+$carousel-control-color: $white !default;
+$carousel-control-width: 15% !default;
+$carousel-control-opacity: .5 !default;
+
+$carousel-indicator-width: 30px !default;
+$carousel-indicator-height: 3px !default;
+$carousel-indicator-spacer: 3px !default;
+$carousel-indicator-active-bg: $white !default;
+
+$carousel-caption-width: 70% !default;
+$carousel-caption-color: $white !default;
+
+$carousel-control-icon-width: 20px !default;
+
+$carousel-control-prev-icon-bg: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#{$carousel-control-color}' viewBox='0 0 8 8'%3E%3Cpath d='M4 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3E%3C/svg%3E"), "#", "%23") !default;
+$carousel-control-next-icon-bg: str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='#{$carousel-control-color}' viewBox='0 0 8 8'%3E%3Cpath d='M1.5 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3E%3C/svg%3E"), "#", "%23") !default;
+
+$carousel-transition: transform .6s ease-in-out !default;
+
+
+// Close
+
+$close-font-size: $font-size-base * 1.5 !default;
+$close-font-weight: $font-weight-bold !default;
+$close-color: $black !default;
+$close-text-shadow: 0 1px 0 $white !default;
+
+// Code
+
+$code-font-size: 90% !default;
+$code-padding-x: .4rem !default;
+$code-padding-y: .2rem !default;
+$code-color: #bd4147 !default;
+$code-bg: $gray-lightest !default;
+
+$kbd-color: $white !default;
+$kbd-bg: $gray-dark !default;
+
+$pre-color: $gray-dark !default;
+$pre-scrollable-max-height: 340px !default;
diff --git a/templates/assets/bootstrap/scss/bootstrap-grid.scss b/templates/assets/bootstrap/scss/bootstrap-grid.scss
new file mode 100644
index 0000000..2ba6858
--- /dev/null
+++ b/templates/assets/bootstrap/scss/bootstrap-grid.scss
@@ -0,0 +1,37 @@
+// Bootstrap Grid only
+//
+// Includes relevant variables and mixins for the flexbox grid
+// system, as well as the generated predefined classes (e.g., `.col-sm-4`).
+
+//
+// Box sizing, responsive, and more
+//
+
+@at-root {
+ @-ms-viewport { width: device-width; }
+}
+
+html {
+ box-sizing: border-box;
+ -ms-overflow-style: scrollbar;
+}
+
+*,
+*::before,
+*::after {
+ box-sizing: inherit;
+}
+
+@import "custom";
+@import "variables";
+
+//
+// Grid mixins
+//
+
+@import "mixins/breakpoints";
+@import "mixins/grid-framework";
+@import "mixins/grid";
+
+@import "grid";
+@import "utilities/flex";
diff --git a/templates/assets/bootstrap/scss/bootstrap-reboot.scss b/templates/assets/bootstrap/scss/bootstrap-reboot.scss
new file mode 100644
index 0000000..5867f08
--- /dev/null
+++ b/templates/assets/bootstrap/scss/bootstrap-reboot.scss
@@ -0,0 +1,9 @@
+// Bootstrap Reboot only
+//
+// Includes only Normalize and our custom Reboot reset.
+
+@import "custom";
+@import "variables";
+@import "mixins";
+
+@import "reboot";
diff --git a/templates/assets/bootstrap/scss/bootstrap.scss b/templates/assets/bootstrap/scss/bootstrap.scss
new file mode 100644
index 0000000..f7577f5
--- /dev/null
+++ b/templates/assets/bootstrap/scss/bootstrap.scss
@@ -0,0 +1,52 @@
+/*!
+ * Bootstrap v4.0.0-alpha.6 (https://getbootstrap.com)
+ * Copyright 2011-2017 The Bootstrap Authors
+ * Copyright 2011-2017 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+
+// Core variables and mixins
+@import "custom";
+@import "variables";
+@import "mixins";
+
+@import "print";
+
+// Core CSS
+@import "reboot";
+@import "type";
+@import "images";
+@import "code";
+@import "grid";
+@import "tables";
+@import "forms";
+@import "buttons";
+
+// Components
+@import "transitions";
+@import "dropdown";
+@import "button-group";
+@import "input-group";
+@import "custom-forms";
+@import "nav";
+@import "navbar";
+@import "card";
+@import "breadcrumb";
+@import "pagination";
+@import "badge";
+@import "jumbotron";
+@import "alert";
+@import "progress";
+@import "media";
+@import "list-group";
+@import "responsive-embed";
+@import "close";
+
+// Components w/ JavaScript
+@import "modal";
+@import "tooltip";
+@import "popover";
+@import "carousel";
+
+// Utility classes
+@import "utilities";
diff --git a/templates/assets/bootstrap/scss/mixins/_alert.scss b/templates/assets/bootstrap/scss/mixins/_alert.scss
new file mode 100644
index 0000000..1e9307e
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_alert.scss
@@ -0,0 +1,14 @@
+// Alerts
+
+@mixin alert-variant($background, $border, $body-color) {
+ color: $body-color;
+ background-color: $background;
+ border-color: $border;
+
+ hr {
+ border-top-color: darken($border, 5%);
+ }
+ .alert-link {
+ color: darken($body-color, 10%);
+ }
+}
diff --git a/templates/assets/bootstrap/scss/mixins/_background-variant.scss b/templates/assets/bootstrap/scss/mixins/_background-variant.scss
new file mode 100644
index 0000000..54a734d
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_background-variant.scss
@@ -0,0 +1,12 @@
+// Contextual backgrounds
+
+@mixin bg-variant($parent, $color) {
+ #{$parent} {
+ background-color: $color !important;
+ }
+ a#{$parent} {
+ @include hover-focus {
+ background-color: darken($color, 10%) !important;
+ }
+ }
+}
diff --git a/templates/assets/bootstrap/scss/mixins/_badge.scss b/templates/assets/bootstrap/scss/mixins/_badge.scss
new file mode 100644
index 0000000..9fa44b6
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_badge.scss
@@ -0,0 +1,11 @@
+// Badges
+
+@mixin badge-variant($color) {
+ background-color: $color;
+
+ &[href] {
+ @include hover-focus {
+ background-color: darken($color, 10%);
+ }
+ }
+}
diff --git a/templates/assets/bootstrap/scss/mixins/_border-radius.scss b/templates/assets/bootstrap/scss/mixins/_border-radius.scss
new file mode 100644
index 0000000..2024feb
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_border-radius.scss
@@ -0,0 +1,35 @@
+// Single side border-radius
+
+@mixin border-radius($radius: $border-radius) {
+ @if $enable-rounded {
+ border-radius: $radius;
+ }
+}
+
+@mixin border-top-radius($radius) {
+ @if $enable-rounded {
+ border-top-left-radius: $radius;
+ border-top-right-radius: $radius;
+ }
+}
+
+@mixin border-right-radius($radius) {
+ @if $enable-rounded {
+ border-top-right-radius: $radius;
+ border-bottom-right-radius: $radius;
+ }
+}
+
+@mixin border-bottom-radius($radius) {
+ @if $enable-rounded {
+ border-bottom-right-radius: $radius;
+ border-bottom-left-radius: $radius;
+ }
+}
+
+@mixin border-left-radius($radius) {
+ @if $enable-rounded {
+ border-top-left-radius: $radius;
+ border-bottom-left-radius: $radius;
+ }
+}
diff --git a/templates/assets/bootstrap/scss/mixins/_box-shadow.scss b/templates/assets/bootstrap/scss/mixins/_box-shadow.scss
new file mode 100644
index 0000000..b2410e5
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_box-shadow.scss
@@ -0,0 +1,5 @@
+@mixin box-shadow($shadow...) {
+ @if $enable-shadows {
+ box-shadow: $shadow;
+ }
+}
diff --git a/templates/assets/bootstrap/scss/mixins/_breakpoints.scss b/templates/assets/bootstrap/scss/mixins/_breakpoints.scss
new file mode 100644
index 0000000..904b60f
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_breakpoints.scss
@@ -0,0 +1,95 @@
+// Breakpoint viewport sizes and media queries.
+//
+// Breakpoints are defined as a map of (name: minimum width), order from small to large:
+//
+// (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)
+//
+// The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.
+
+// Name of the next breakpoint, or null for the last breakpoint.
+//
+// >> breakpoint-next(sm)
+// md
+// >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
+// md
+// >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl))
+// md
+@function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map-keys($breakpoints)) {
+ $n: index($breakpoint-names, $name);
+ @return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);
+}
+
+// Minimum breakpoint width. Null for the smallest (first) breakpoint.
+//
+// >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
+// 576px
+@function breakpoint-min($name, $breakpoints: $grid-breakpoints) {
+ $min: map-get($breakpoints, $name);
+ @return if($min != 0, $min, null);
+}
+
+// Maximum breakpoint width. Null for the largest (last) breakpoint.
+// The maximum value is calculated as the minimum of the next one less 0.1.
+//
+// >> breakpoint-max(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
+// 767px
+@function breakpoint-max($name, $breakpoints: $grid-breakpoints) {
+ $next: breakpoint-next($name, $breakpoints);
+ @return if($next, breakpoint-min($next, $breakpoints) - 1px, null);
+}
+
+// Returns a blank string if smallest breakpoint, otherwise returns the name with a dash infront.
+// Useful for making responsive utilities.
+//
+// >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
+// "" (Returns a blank string)
+// >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
+// "-sm"
+@function breakpoint-infix($name, $breakpoints: $grid-breakpoints) {
+ @return if(breakpoint-min($name, $breakpoints) == null, "", "-#{$name}");
+}
+
+// Media of at least the minimum breakpoint width. No query for the smallest breakpoint.
+// Makes the @content apply to the given breakpoint and wider.
+@mixin media-breakpoint-up($name, $breakpoints: $grid-breakpoints) {
+ $min: breakpoint-min($name, $breakpoints);
+ @if $min {
+ @media (min-width: $min) {
+ @content;
+ }
+ } @else {
+ @content;
+ }
+}
+
+// Media of at most the maximum breakpoint width. No query for the largest breakpoint.
+// Makes the @content apply to the given breakpoint and narrower.
+@mixin media-breakpoint-down($name, $breakpoints: $grid-breakpoints) {
+ $max: breakpoint-max($name, $breakpoints);
+ @if $max {
+ @media (max-width: $max) {
+ @content;
+ }
+ } @else {
+ @content;
+ }
+}
+
+// Media that spans multiple breakpoint widths.
+// Makes the @content apply between the min and max breakpoints
+@mixin media-breakpoint-between($lower, $upper, $breakpoints: $grid-breakpoints) {
+ @include media-breakpoint-up($lower, $breakpoints) {
+ @include media-breakpoint-down($upper, $breakpoints) {
+ @content;
+ }
+ }
+}
+
+// Media between the breakpoint's minimum and maximum widths.
+// No minimum for the smallest breakpoint, and no maximum for the largest one.
+// Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.
+@mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints) {
+ @include media-breakpoint-between($name, $name, $breakpoints) {
+ @content;
+ }
+}
diff --git a/templates/assets/bootstrap/scss/mixins/_buttons.scss b/templates/assets/bootstrap/scss/mixins/_buttons.scss
new file mode 100644
index 0000000..91eb444
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_buttons.scss
@@ -0,0 +1,86 @@
+// Button variants
+//
+// Easily pump out default styles, as well as :hover, :focus, :active,
+// and disabled options for all buttons
+
+@mixin button-variant($color, $background, $border) {
+ $active-background: darken($background, 10%);
+ $active-border: darken($border, 12%);
+
+ color: $color;
+ background-color: $background;
+ border-color: $border;
+ @include box-shadow($btn-box-shadow);
+
+ // Hover and focus styles are shared
+ @include hover {
+ color: $color;
+ background-color: $active-background;
+ border-color: $active-border;
+ }
+ &:focus,
+ &.focus {
+ // Avoid using mixin so we can pass custom focus shadow properly
+ @if $enable-shadows {
+ box-shadow: $btn-box-shadow, 0 0 0 2px rgba($border, .5);
+ } @else {
+ box-shadow: 0 0 0 2px rgba($border, .5);
+ }
+ }
+
+ // Disabled comes first so active can properly restyle
+ &.disabled,
+ &:disabled {
+ background-color: $background;
+ border-color: $border;
+ }
+
+ &:active,
+ &.active,
+ .show > &.dropdown-toggle {
+ color: $color;
+ background-color: $active-background;
+ background-image: none; // Remove the gradient for the pressed/active state
+ border-color: $active-border;
+ @include box-shadow($btn-active-box-shadow);
+ }
+}
+
+@mixin button-outline-variant($color, $color-hover: #fff) {
+ color: $color;
+ background-color: transparent;
+ background-image: none;
+ border-color: $color;
+
+ @include hover {
+ color: $color-hover;
+ background-color: $color;
+ border-color: $color;
+ }
+
+ &:focus,
+ &.focus {
+ box-shadow: 0 0 0 2px rgba($color, .5);
+ }
+
+ &.disabled,
+ &:disabled {
+ color: $color;
+ background-color: transparent;
+ }
+
+ &:active,
+ &.active,
+ .show > &.dropdown-toggle {
+ color: $color-hover;
+ background-color: $color;
+ border-color: $color;
+ }
+}
+
+// Button sizes
+@mixin button-size($padding-y, $padding-x, $font-size, $border-radius) {
+ padding: $padding-y $padding-x;
+ font-size: $font-size;
+ @include border-radius($border-radius);
+}
diff --git a/templates/assets/bootstrap/scss/mixins/_cards.scss b/templates/assets/bootstrap/scss/mixins/_cards.scss
new file mode 100644
index 0000000..4b1232d
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_cards.scss
@@ -0,0 +1,47 @@
+// Card variants
+
+@mixin card-variant($background, $border) {
+ background-color: $background;
+ border-color: $border;
+
+ .card-header,
+ .card-footer {
+ background-color: transparent;
+ }
+}
+
+@mixin card-outline-variant($color) {
+ background-color: transparent;
+ border-color: $color;
+}
+
+//
+// Inverse text within a card for use with dark backgrounds
+//
+
+@mixin card-inverse {
+ color: rgba(255,255,255,.65);
+
+ .card-header,
+ .card-footer {
+ background-color: transparent;
+ border-color: rgba(255,255,255,.2);
+ }
+ .card-header,
+ .card-footer,
+ .card-title,
+ .card-blockquote {
+ color: #fff;
+ }
+ .card-link,
+ .card-text,
+ .card-subtitle,
+ .card-blockquote .blockquote-footer {
+ color: rgba(255,255,255,.65);
+ }
+ .card-link {
+ @include hover-focus {
+ color: $card-link-hover-color;
+ }
+ }
+}
diff --git a/templates/assets/bootstrap/scss/mixins/_clearfix.scss b/templates/assets/bootstrap/scss/mixins/_clearfix.scss
new file mode 100644
index 0000000..11a977b
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_clearfix.scss
@@ -0,0 +1,7 @@
+@mixin clearfix() {
+ &::after {
+ display: block;
+ clear: both;
+ content: "";
+ }
+}
diff --git a/templates/assets/bootstrap/scss/mixins/_float.scss b/templates/assets/bootstrap/scss/mixins/_float.scss
new file mode 100644
index 0000000..b43116f
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_float.scss
@@ -0,0 +1,9 @@
+@mixin float-left {
+ float: left !important;
+}
+@mixin float-right {
+ float: right !important;
+}
+@mixin float-none {
+ float: none !important;
+}
diff --git a/templates/assets/bootstrap/scss/mixins/_forms.scss b/templates/assets/bootstrap/scss/mixins/_forms.scss
new file mode 100644
index 0000000..33b186a
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_forms.scss
@@ -0,0 +1,55 @@
+// Form validation states
+//
+// Used in _forms.scss to generate the form validation CSS for warnings, errors,
+// and successes.
+
+@mixin form-control-validation($color) {
+ // Color the label and help text
+ .form-control-feedback,
+ .form-control-label,
+ .col-form-label,
+ .form-check-label,
+ .custom-control {
+ color: $color;
+ }
+
+ // Set the border and box shadow on specific inputs to match
+ .form-control,
+ .custom-select,
+ .custom-file-control {
+ border-color: $color;
+
+ &:focus {
+ @include box-shadow($input-box-shadow, 0 0 6px lighten($color, 20%));
+ }
+ }
+
+ // Set validation states also for addons
+ .input-group-addon {
+ color: $color;
+ background-color: lighten($color, 40%);
+ border-color: $color;
+ }
+}
+
+// Form control focus state
+//
+// Generate a customized focus state and for any input with the specified color,
+// which defaults to the `@input-border-focus` variable.
+//
+// We highly encourage you to not customize the default value, but instead use
+// this to tweak colors on an as-needed basis. This aesthetic change is based on
+// WebKit's default styles, but applicable to a wider range of browsers. Its
+// usability and accessibility should be taken into account with any change.
+//
+// Example usage: change the default blue border and shadow to white for better
+// contrast against a dark gray background.
+@mixin form-control-focus() {
+ &:focus {
+ color: $input-color-focus;
+ background-color: $input-bg-focus;
+ border-color: $input-border-focus;
+ outline: none;
+ @include box-shadow($input-box-shadow-focus);
+ }
+}
diff --git a/templates/assets/bootstrap/scss/mixins/_gradients.scss b/templates/assets/bootstrap/scss/mixins/_gradients.scss
new file mode 100644
index 0000000..bad79f9
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_gradients.scss
@@ -0,0 +1,37 @@
+// Gradients
+
+// Horizontal gradient, from left to right
+//
+// Creates two color stops, start and end, by specifying a color and position for each color stop.
+@mixin gradient-x($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
+ background-image: linear-gradient(to right, $start-color $start-percent, $end-color $end-percent);
+ background-repeat: repeat-x;
+}
+
+// Vertical gradient, from top to bottom
+//
+// Creates two color stops, start and end, by specifying a color and position for each color stop.
+@mixin gradient-y($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
+ background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent);
+ background-repeat: repeat-x;
+}
+
+@mixin gradient-directional($start-color: #555, $end-color: #333, $deg: 45deg) {
+ background-image: linear-gradient($deg, $start-color, $end-color);
+ background-repeat: repeat-x;
+}
+@mixin gradient-x-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
+ background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color);
+ background-repeat: no-repeat;
+}
+@mixin gradient-y-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
+ background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color);
+ background-repeat: no-repeat;
+}
+@mixin gradient-radial($inner-color: #555, $outer-color: #333) {
+ background-image: radial-gradient(circle, $inner-color, $outer-color);
+ background-repeat: no-repeat;
+}
+@mixin gradient-striped($color: rgba(255,255,255,.15), $angle: 45deg) {
+ background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
+}
diff --git a/templates/assets/bootstrap/scss/mixins/_grid-framework.scss b/templates/assets/bootstrap/scss/mixins/_grid-framework.scss
new file mode 100644
index 0000000..0aa814a
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_grid-framework.scss
@@ -0,0 +1,65 @@
+// Framework grid generation
+//
+// Used only by Bootstrap to generate the correct number of grid classes given
+// any value of `$grid-columns`.
+
+@mixin make-grid-columns($columns: $grid-columns, $gutters: $grid-gutter-widths, $breakpoints: $grid-breakpoints) {
+ // Common properties for all breakpoints
+ %grid-column {
+ position: relative;
+ width: 100%;
+ min-height: 1px; // Prevent columns from collapsing when empty
+
+ @include make-gutters($gutters);
+ }
+
+ @each $breakpoint in map-keys($breakpoints) {
+ $infix: breakpoint-infix($breakpoint, $breakpoints);
+
+ // Allow columns to stretch full width below their breakpoints
+ @for $i from 1 through $columns {
+ .col#{$infix}-#{$i} {
+ @extend %grid-column;
+ }
+ }
+ .col#{$infix} {
+ @extend %grid-column;
+ }
+
+ @include media-breakpoint-up($breakpoint, $breakpoints) {
+ // Provide basic `.col-{bp}` classes for equal-width flexbox columns
+ .col#{$infix} {
+ flex-basis: 0;
+ flex-grow: 1;
+ max-width: 100%;
+ }
+ .col#{$infix}-auto {
+ flex: 0 0 auto;
+ width: auto;
+ }
+
+ @for $i from 1 through $columns {
+ .col#{$infix}-#{$i} {
+ @include make-col($i, $columns);
+ }
+ }
+
+ @each $modifier in (pull, push) {
+ @for $i from 0 through $columns {
+ .#{$modifier}#{$infix}-#{$i} {
+ @include make-col-modifier($modifier, $i, $columns)
+ }
+ }
+ }
+
+ // `$columns - 1` because offsetting by the width of an entire row isn't possible
+ @for $i from 0 through ($columns - 1) {
+ @if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-xs-0
+ .offset#{$infix}-#{$i} {
+ @include make-col-modifier(offset, $i, $columns)
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/templates/assets/bootstrap/scss/mixins/_grid.scss b/templates/assets/bootstrap/scss/mixins/_grid.scss
new file mode 100644
index 0000000..eb6c012
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_grid.scss
@@ -0,0 +1,100 @@
+/// Grid system
+//
+// Generate semantic grid columns with these mixins.
+
+@mixin make-container($gutters: $grid-gutter-widths) {
+ position: relative;
+ margin-right: auto;
+ margin-left: auto;
+
+ @each $breakpoint in map-keys($gutters) {
+ @include media-breakpoint-up($breakpoint) {
+ $gutter: map-get($gutters, $breakpoint);
+ padding-right: ($gutter / 2);
+ padding-left: ($gutter / 2);
+ }
+ }
+}
+
+
+// For each breakpoint, define the maximum width of the container in a media query
+@mixin make-container-max-widths($max-widths: $container-max-widths, $breakpoints: $grid-breakpoints) {
+ @each $breakpoint, $container-max-width in $max-widths {
+ @include media-breakpoint-up($breakpoint, $breakpoints) {
+ width: $container-max-width;
+ max-width: 100%;
+ }
+ }
+}
+
+@mixin make-gutters($gutters: $grid-gutter-widths) {
+ @each $breakpoint in map-keys($gutters) {
+ @include media-breakpoint-up($breakpoint) {
+ $gutter: map-get($gutters, $breakpoint);
+ padding-right: ($gutter / 2);
+ padding-left: ($gutter / 2);
+ }
+ }
+}
+
+@mixin make-row($gutters: $grid-gutter-widths) {
+ display: flex;
+ flex-wrap: wrap;
+
+ @each $breakpoint in map-keys($gutters) {
+ @include media-breakpoint-up($breakpoint) {
+ $gutter: map-get($gutters, $breakpoint);
+ margin-right: ($gutter / -2);
+ margin-left: ($gutter / -2);
+ }
+ }
+}
+
+@mixin make-col-ready($gutters: $grid-gutter-widths) {
+ position: relative;
+ // Prevent columns from becoming too narrow when at smaller grid tiers by
+ // always setting `width: 100%;`. This works because we use `flex` values
+ // later on to override this initial width.
+ width: 100%;
+ min-height: 1px; // Prevent collapsing
+
+ @each $breakpoint in map-keys($gutters) {
+ @include media-breakpoint-up($breakpoint) {
+ $gutter: map-get($gutters, $breakpoint);
+ padding-right: ($gutter / 2);
+ padding-left: ($gutter / 2);
+ }
+ }
+}
+
+@mixin make-col($size, $columns: $grid-columns) {
+ flex: 0 0 percentage($size / $columns);
+ // width: percentage($size / $columns);
+ // Add a `max-width` to ensure content within each column does not blow out
+ // the width of the column. Applies to IE10+ and Firefox. Chrome and Safari
+ // do not appear to require this.
+ max-width: percentage($size / $columns);
+}
+
+@mixin make-col-offset($size, $columns: $grid-columns) {
+ margin-left: percentage($size / $columns);
+}
+
+@mixin make-col-push($size, $columns: $grid-columns) {
+ left: if($size > 0, percentage($size / $columns), auto);
+}
+
+@mixin make-col-pull($size, $columns: $grid-columns) {
+ right: if($size > 0, percentage($size / $columns), auto);
+}
+
+@mixin make-col-modifier($type, $size, $columns) {
+ // Work around the lack of dynamic mixin @include support (https://github.com/sass/sass/issues/626)
+ @if $type == push {
+ @include make-col-push($size, $columns);
+ } @else if $type == pull {
+ @include make-col-pull($size, $columns);
+ } @else if $type == offset {
+ @include make-col-offset($size, $columns);
+ }
+}
diff --git a/templates/assets/bootstrap/scss/mixins/_hover.scss b/templates/assets/bootstrap/scss/mixins/_hover.scss
new file mode 100644
index 0000000..4aa4b1d
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_hover.scss
@@ -0,0 +1,60 @@
+@mixin hover {
+ // TODO: re-enable along with mq4-hover-shim
+// @if $enable-hover-media-query {
+// // See Media Queries Level 4: https://drafts.csswg.org/mediaqueries/#hover
+// // Currently shimmed by https://github.com/twbs/mq4-hover-shim
+// @media (hover: hover) {
+// &:hover { @content }
+// }
+// }
+// @else {
+// scss-lint:disable Indentation
+ &:hover { @content }
+// scss-lint:enable Indentation
+// }
+}
+
+
+@mixin hover-focus {
+ @if $enable-hover-media-query {
+ &:focus { @content }
+ @include hover { @content }
+ } @else {
+ &:focus,
+ &:hover {
+ @content
+ }
+ }
+}
+
+@mixin plain-hover-focus {
+ @if $enable-hover-media-query {
+ &,
+ &:focus {
+ @content
+ }
+ @include hover { @content }
+ } @else {
+ &,
+ &:focus,
+ &:hover {
+ @content
+ }
+ }
+}
+
+@mixin hover-focus-active {
+ @if $enable-hover-media-query {
+ &:focus,
+ &:active {
+ @content
+ }
+ @include hover { @content }
+ } @else {
+ &:focus,
+ &:active,
+ &:hover {
+ @content
+ }
+ }
+}
diff --git a/templates/assets/bootstrap/scss/mixins/_image.scss b/templates/assets/bootstrap/scss/mixins/_image.scss
new file mode 100644
index 0000000..c2b45f2
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_image.scss
@@ -0,0 +1,36 @@
+// Image Mixins
+// - Responsive image
+// - Retina image
+
+
+// Responsive image
+//
+// Keep images from scaling beyond the width of their parents.
+
+@mixin img-fluid {
+ // Part 1: Set a maximum relative to the parent
+ max-width: 100%;
+ // Part 2: Override the height to auto, otherwise images will be stretched
+ // when setting a width and height attribute on the img element.
+ height: auto;
+}
+
+
+// Retina image
+//
+// Short retina mixin for setting background-image and -size.
+
+@mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) {
+ background-image: url($file-1x);
+
+ // Autoprefixer takes care of adding -webkit-min-device-pixel-ratio and -o-min-device-pixel-ratio,
+ // but doesn't convert dppx=>dpi.
+ // There's no such thing as unprefixed min-device-pixel-ratio since it's nonstandard.
+ // Compatibility info: http://caniuse.com/#feat=css-media-resolution
+ @media
+ only screen and (min-resolution: 192dpi), // IE9-11 don't support dppx
+ only screen and (min-resolution: 2dppx) { // Standardized
+ background-image: url($file-2x);
+ background-size: $width-1x $height-1x;
+ }
+}
diff --git a/templates/assets/bootstrap/scss/mixins/_list-group.scss b/templates/assets/bootstrap/scss/mixins/_list-group.scss
new file mode 100644
index 0000000..ba27b50
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_list-group.scss
@@ -0,0 +1,26 @@
+// List Groups
+
+@mixin list-group-item-variant($state, $background, $color) {
+ .list-group-item-#{$state} {
+ color: $color;
+ background-color: $background;
+ }
+
+ //scss-lint:disable QualifyingElement
+ a.list-group-item-#{$state},
+ button.list-group-item-#{$state} {
+ color: $color;
+
+ @include hover-focus {
+ color: $color;
+ background-color: darken($background, 5%);
+ }
+
+ &.active {
+ color: #fff;
+ background-color: $color;
+ border-color: $color;
+ }
+ }
+ // scss-lint:enable QualifyingElement
+}
diff --git a/templates/assets/bootstrap/scss/mixins/_lists.scss b/templates/assets/bootstrap/scss/mixins/_lists.scss
new file mode 100644
index 0000000..2518562
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_lists.scss
@@ -0,0 +1,7 @@
+// Lists
+
+// Unstyled keeps list items block level, just removes default browser padding and list-style
+@mixin list-unstyled {
+ padding-left: 0;
+ list-style: none;
+}
diff --git a/templates/assets/bootstrap/scss/mixins/_nav-divider.scss b/templates/assets/bootstrap/scss/mixins/_nav-divider.scss
new file mode 100644
index 0000000..557673c
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_nav-divider.scss
@@ -0,0 +1,10 @@
+// Horizontal dividers
+//
+// Dividers (basically an hr) within dropdowns and nav lists
+
+@mixin nav-divider($color: #e5e5e5) {
+ height: 1px;
+ margin: ($spacer / 2) 0;
+ overflow: hidden;
+ background-color: $color;
+}
diff --git a/templates/assets/bootstrap/scss/mixins/_navbar-align.scss b/templates/assets/bootstrap/scss/mixins/_navbar-align.scss
new file mode 100644
index 0000000..c454a4f
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_navbar-align.scss
@@ -0,0 +1,9 @@
+// Navbar vertical align
+//
+// Vertically center elements in the navbar.
+// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.
+
+// @mixin navbar-vertical-align($element-height) {
+// margin-top: (($navbar-height - $element-height) / 2);
+// margin-bottom: (($navbar-height - $element-height) / 2);
+// }
diff --git a/templates/assets/bootstrap/scss/mixins/_pagination.scss b/templates/assets/bootstrap/scss/mixins/_pagination.scss
new file mode 100644
index 0000000..8cd9317
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_pagination.scss
@@ -0,0 +1,21 @@
+// Pagination
+
+@mixin pagination-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) {
+ .page-link {
+ padding: $padding-y $padding-x;
+ font-size: $font-size;
+ }
+
+ .page-item {
+ &:first-child {
+ .page-link {
+ @include border-left-radius($border-radius);
+ }
+ }
+ &:last-child {
+ .page-link {
+ @include border-right-radius($border-radius);
+ }
+ }
+ }
+}
diff --git a/templates/assets/bootstrap/scss/mixins/_reset-text.scss b/templates/assets/bootstrap/scss/mixins/_reset-text.scss
new file mode 100644
index 0000000..4cf9e79
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_reset-text.scss
@@ -0,0 +1,18 @@
+// scss-lint:disable DuplicateProperty
+@mixin reset-text {
+ font-family: $font-family-base;
+ // We deliberately do NOT reset font-size or word-wrap.
+ font-style: normal;
+ font-weight: $font-weight-normal;
+ line-height: $line-height-base;
+ text-align: left; // Fallback for where `start` is not supported
+ text-align: start;
+ text-decoration: none;
+ text-shadow: none;
+ text-transform: none;
+ letter-spacing: normal;
+ word-break: normal;
+ word-spacing: normal;
+ white-space: normal;
+ line-break: auto;
+}
diff --git a/templates/assets/bootstrap/scss/mixins/_resize.scss b/templates/assets/bootstrap/scss/mixins/_resize.scss
new file mode 100644
index 0000000..66f233a
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_resize.scss
@@ -0,0 +1,6 @@
+// Resize anything
+
+@mixin resizable($direction) {
+ overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible`
+ resize: $direction; // Options: horizontal, vertical, both
+}
diff --git a/templates/assets/bootstrap/scss/mixins/_screen-reader.scss b/templates/assets/bootstrap/scss/mixins/_screen-reader.scss
new file mode 100644
index 0000000..a5fa51c
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_screen-reader.scss
@@ -0,0 +1,35 @@
+// Only display content to screen readers
+//
+// See: http://a11yproject.com/posts/how-to-hide-content
+// See: http://hugogiraudel.com/2016/10/13/css-hide-and-seek/
+
+@mixin sr-only {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ padding: 0;
+ overflow: hidden;
+ clip: rect(0,0,0,0);
+ white-space: nowrap;
+ clip-path: inset(50%);
+ border: 0;
+}
+
+// Use in conjunction with .sr-only to only display content when it's focused.
+//
+// Useful for "Skip to main content" links; see https://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
+//
+// Credit: HTML5 Boilerplate
+
+@mixin sr-only-focusable {
+ &:active,
+ &:focus {
+ position: static;
+ width: auto;
+ height: auto;
+ overflow: visible;
+ clip: auto;
+ white-space: normal;
+ clip-path: none;
+ }
+}
diff --git a/templates/assets/bootstrap/scss/mixins/_size.scss b/templates/assets/bootstrap/scss/mixins/_size.scss
new file mode 100644
index 0000000..b9dd48e
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_size.scss
@@ -0,0 +1,6 @@
+// Sizing shortcuts
+
+@mixin size($width, $height: $width) {
+ width: $width;
+ height: $height;
+}
diff --git a/templates/assets/bootstrap/scss/mixins/_table-row.scss b/templates/assets/bootstrap/scss/mixins/_table-row.scss
new file mode 100644
index 0000000..84f1d30
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_table-row.scss
@@ -0,0 +1,30 @@
+// Tables
+
+@mixin table-row-variant($state, $background) {
+ // Exact selectors below required to override `.table-striped` and prevent
+ // inheritance to nested tables.
+ .table-#{$state} {
+ &,
+ > th,
+ > td {
+ background-color: $background;
+ }
+ }
+
+ // Hover states for `.table-hover`
+ // Note: this is not available for cells or rows within `thead` or `tfoot`.
+ .table-hover {
+ $hover-background: darken($background, 5%);
+
+ .table-#{$state} {
+ @include hover {
+ background-color: $hover-background;
+
+ > td,
+ > th {
+ background-color: $hover-background;
+ }
+ }
+ }
+ }
+}
diff --git a/templates/assets/bootstrap/scss/mixins/_text-emphasis.scss b/templates/assets/bootstrap/scss/mixins/_text-emphasis.scss
new file mode 100644
index 0000000..9cd4b6a
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_text-emphasis.scss
@@ -0,0 +1,12 @@
+// Typography
+
+@mixin text-emphasis-variant($parent, $color) {
+ #{$parent} {
+ color: $color !important;
+ }
+ a#{$parent} {
+ @include hover-focus {
+ color: darken($color, 10%) !important;
+ }
+ }
+}
diff --git a/templates/assets/bootstrap/scss/mixins/_text-hide.scss b/templates/assets/bootstrap/scss/mixins/_text-hide.scss
new file mode 100644
index 0000000..52a38a9
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_text-hide.scss
@@ -0,0 +1,8 @@
+// CSS image replacement
+@mixin text-hide() {
+ font: 0/0 a;
+ color: transparent;
+ text-shadow: none;
+ background-color: transparent;
+ border: 0;
+}
diff --git a/templates/assets/bootstrap/scss/mixins/_text-truncate.scss b/templates/assets/bootstrap/scss/mixins/_text-truncate.scss
new file mode 100644
index 0000000..3504bb1
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_text-truncate.scss
@@ -0,0 +1,8 @@
+// Text truncate
+// Requires inline-block or block for proper styling
+
+@mixin text-truncate() {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
diff --git a/templates/assets/bootstrap/scss/mixins/_transforms.scss b/templates/assets/bootstrap/scss/mixins/_transforms.scss
new file mode 100644
index 0000000..4005c9d
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_transforms.scss
@@ -0,0 +1,14 @@
+// Applies the given styles only when the browser support CSS3 3D transforms.
+@mixin if-supports-3d-transforms() {
+ @media (-webkit-transform-3d) {
+ // Old Safari, Old Android
+ // http://caniuse.com/#feat=css-featurequeries
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/@media/-webkit-transform-3d
+ @content;
+ }
+
+ @supports (transform: translate3d(0,0,0)) {
+ // The Proper Way: Using a CSS feature query
+ @content;
+ }
+}
diff --git a/templates/assets/bootstrap/scss/mixins/_transition.scss b/templates/assets/bootstrap/scss/mixins/_transition.scss
new file mode 100644
index 0000000..7e33dee
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_transition.scss
@@ -0,0 +1,9 @@
+@mixin transition($transition...) {
+ @if $enable-transitions {
+ @if length($transition) == 0 {
+ transition: $transition-base;
+ } @else {
+ transition: $transition;
+ }
+ }
+}
diff --git a/templates/assets/bootstrap/scss/mixins/_visibility.scss b/templates/assets/bootstrap/scss/mixins/_visibility.scss
new file mode 100644
index 0000000..f67fc1c
--- /dev/null
+++ b/templates/assets/bootstrap/scss/mixins/_visibility.scss
@@ -0,0 +1,5 @@
+// Visibility
+
+@mixin invisible($visibility) {
+ visibility: $visibility !important;
+}
diff --git a/templates/assets/bootstrap/scss/utilities/_align.scss b/templates/assets/bootstrap/scss/utilities/_align.scss
new file mode 100644
index 0000000..4dbbbc2
--- /dev/null
+++ b/templates/assets/bootstrap/scss/utilities/_align.scss
@@ -0,0 +1,6 @@
+.align-baseline { vertical-align: baseline !important; } // Browser default
+.align-top { vertical-align: top !important; }
+.align-middle { vertical-align: middle !important; }
+.align-bottom { vertical-align: bottom !important; }
+.align-text-bottom { vertical-align: text-bottom !important; }
+.align-text-top { vertical-align: text-top !important; }
diff --git a/templates/assets/bootstrap/scss/utilities/_background.scss b/templates/assets/bootstrap/scss/utilities/_background.scss
new file mode 100644
index 0000000..b9ac295
--- /dev/null
+++ b/templates/assets/bootstrap/scss/utilities/_background.scss
@@ -0,0 +1,19 @@
+//
+// Contextual backgrounds
+//
+
+.bg-faded {
+ background-color: darken($body-bg, 3%);
+}
+
+@include bg-variant('.bg-primary', $brand-primary);
+
+@include bg-variant('.bg-success', $brand-success);
+
+@include bg-variant('.bg-info', $brand-info);
+
+@include bg-variant('.bg-warning', $brand-warning);
+
+@include bg-variant('.bg-danger', $brand-danger);
+
+@include bg-variant('.bg-inverse', $brand-inverse);
diff --git a/templates/assets/bootstrap/scss/utilities/_borders.scss b/templates/assets/bootstrap/scss/utilities/_borders.scss
new file mode 100644
index 0000000..b256881
--- /dev/null
+++ b/templates/assets/bootstrap/scss/utilities/_borders.scss
@@ -0,0 +1,37 @@
+//
+// Border
+//
+
+.border-0 { border: 0 !important; }
+.border-top-0 { border-top: 0 !important; }
+.border-right-0 { border-right: 0 !important; }
+.border-bottom-0 { border-bottom: 0 !important; }
+.border-left-0 { border-left: 0 !important; }
+
+//
+// Border-radius
+//
+
+.rounded {
+ @include border-radius($border-radius);
+}
+.rounded-top {
+ @include border-top-radius($border-radius);
+}
+.rounded-right {
+ @include border-right-radius($border-radius);
+}
+.rounded-bottom {
+ @include border-bottom-radius($border-radius);
+}
+.rounded-left {
+ @include border-left-radius($border-radius);
+}
+
+.rounded-circle {
+ border-radius: 50%;
+}
+
+.rounded-0 {
+ border-radius: 0;
+}
diff --git a/templates/assets/bootstrap/scss/utilities/_clearfix.scss b/templates/assets/bootstrap/scss/utilities/_clearfix.scss
new file mode 100644
index 0000000..e92522a
--- /dev/null
+++ b/templates/assets/bootstrap/scss/utilities/_clearfix.scss
@@ -0,0 +1,3 @@
+.clearfix {
+ @include clearfix();
+}
diff --git a/templates/assets/bootstrap/scss/utilities/_display.scss b/templates/assets/bootstrap/scss/utilities/_display.scss
new file mode 100644
index 0000000..4535362
--- /dev/null
+++ b/templates/assets/bootstrap/scss/utilities/_display.scss
@@ -0,0 +1,53 @@
+//
+// Utilities for common `display` values
+//
+
+@each $breakpoint in map-keys($grid-breakpoints) {
+ @include media-breakpoint-up($breakpoint) {
+ $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
+
+ .d#{$infix}-none { display: none !important; }
+ .d#{$infix}-inline { display: inline !important; }
+ .d#{$infix}-inline-block { display: inline-block !important; }
+ .d#{$infix}-block { display: block !important; }
+ .d#{$infix}-table { display: table !important; }
+ .d#{$infix}-table-cell { display: table-cell !important; }
+ .d#{$infix}-flex { display: flex !important; }
+ .d#{$infix}-inline-flex { display: inline-flex !important; }
+ }
+}
+
+
+//
+// Utilities for toggling `display` in print
+//
+
+.d-print-block {
+ display: none !important;
+
+ @media print {
+ display: block !important;
+ }
+}
+
+.d-print-inline {
+ display: none !important;
+
+ @media print {
+ display: inline !important;
+ }
+}
+
+.d-print-inline-block {
+ display: none !important;
+
+ @media print {
+ display: inline-block !important;
+ }
+}
+
+.d-print-none {
+ @media print {
+ display: none !important;
+ }
+}
diff --git a/templates/assets/bootstrap/scss/utilities/_flex.scss b/templates/assets/bootstrap/scss/utilities/_flex.scss
new file mode 100644
index 0000000..cc69678
--- /dev/null
+++ b/templates/assets/bootstrap/scss/utilities/_flex.scss
@@ -0,0 +1,48 @@
+// Flex variation
+//
+// Custom styles for additional flex alignment options.
+
+@each $breakpoint in map-keys($grid-breakpoints) {
+ @include media-breakpoint-up($breakpoint) {
+ $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
+
+ .order#{$infix}-first { order: -1; }
+ .order#{$infix}-last { order: 1; }
+ .order#{$infix}-0 { order: 0; }
+
+ .flex#{$infix}-row { flex-direction: row !important; }
+ .flex#{$infix}-column { flex-direction: column !important; }
+ .flex#{$infix}-row-reverse { flex-direction: row-reverse !important; }
+ .flex#{$infix}-column-reverse { flex-direction: column-reverse !important; }
+
+ .flex#{$infix}-wrap { flex-wrap: wrap !important; }
+ .flex#{$infix}-nowrap { flex-wrap: nowrap !important; }
+ .flex#{$infix}-wrap-reverse { flex-wrap: wrap-reverse !important; }
+
+ .justify-content#{$infix}-start { justify-content: flex-start !important; }
+ .justify-content#{$infix}-end { justify-content: flex-end !important; }
+ .justify-content#{$infix}-center { justify-content: center !important; }
+ .justify-content#{$infix}-between { justify-content: space-between !important; }
+ .justify-content#{$infix}-around { justify-content: space-around !important; }
+
+ .align-items#{$infix}-start { align-items: flex-start !important; }
+ .align-items#{$infix}-end { align-items: flex-end !important; }
+ .align-items#{$infix}-center { align-items: center !important; }
+ .align-items#{$infix}-baseline { align-items: baseline !important; }
+ .align-items#{$infix}-stretch { align-items: stretch !important; }
+
+ .align-content#{$infix}-start { align-content: flex-start !important; }
+ .align-content#{$infix}-end { align-content: flex-end !important; }
+ .align-content#{$infix}-center { align-content: center !important; }
+ .align-content#{$infix}-between { align-content: space-between !important; }
+ .align-content#{$infix}-around { align-content: space-around !important; }
+ .align-content#{$infix}-stretch { align-content: stretch !important; }
+
+ .align-self#{$infix}-auto { align-self: auto !important; }
+ .align-self#{$infix}-start { align-self: flex-start !important; }
+ .align-self#{$infix}-end { align-self: flex-end !important; }
+ .align-self#{$infix}-center { align-self: center !important; }
+ .align-self#{$infix}-baseline { align-self: baseline !important; }
+ .align-self#{$infix}-stretch { align-self: stretch !important; }
+ }
+}
diff --git a/templates/assets/bootstrap/scss/utilities/_float.scss b/templates/assets/bootstrap/scss/utilities/_float.scss
new file mode 100644
index 0000000..01655e9
--- /dev/null
+++ b/templates/assets/bootstrap/scss/utilities/_float.scss
@@ -0,0 +1,9 @@
+@each $breakpoint in map-keys($grid-breakpoints) {
+ @include media-breakpoint-up($breakpoint) {
+ $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
+
+ .float#{$infix}-left { @include float-left; }
+ .float#{$infix}-right { @include float-right; }
+ .float#{$infix}-none { @include float-none; }
+ }
+}
diff --git a/templates/assets/bootstrap/scss/utilities/_position.scss b/templates/assets/bootstrap/scss/utilities/_position.scss
new file mode 100644
index 0000000..2cf08bf
--- /dev/null
+++ b/templates/assets/bootstrap/scss/utilities/_position.scss
@@ -0,0 +1,23 @@
+// Positioning
+
+.fixed-top {
+ position: fixed;
+ top: 0;
+ right: 0;
+ left: 0;
+ z-index: $zindex-fixed;
+}
+
+.fixed-bottom {
+ position: fixed;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: $zindex-fixed;
+}
+
+.sticky-top {
+ position: sticky;
+ top: 0;
+ z-index: $zindex-sticky;
+}
diff --git a/templates/assets/bootstrap/scss/utilities/_screenreaders.scss b/templates/assets/bootstrap/scss/utilities/_screenreaders.scss
new file mode 100644
index 0000000..9f26fde
--- /dev/null
+++ b/templates/assets/bootstrap/scss/utilities/_screenreaders.scss
@@ -0,0 +1,11 @@
+//
+// Screenreaders
+//
+
+.sr-only {
+ @include sr-only();
+}
+
+.sr-only-focusable {
+ @include sr-only-focusable();
+}
diff --git a/templates/assets/bootstrap/scss/utilities/_sizing.scss b/templates/assets/bootstrap/scss/utilities/_sizing.scss
new file mode 100644
index 0000000..a7dc3e4
--- /dev/null
+++ b/templates/assets/bootstrap/scss/utilities/_sizing.scss
@@ -0,0 +1,10 @@
+// Width and height
+
+@each $prop, $abbrev in (width: w, height: h) {
+ @each $size, $length in $sizes {
+ .#{$abbrev}-#{$size} { #{$prop}: $length !important; }
+ }
+}
+
+.mw-100 { max-width: 100% !important; }
+.mh-100 { max-height: 100% !important; }
diff --git a/templates/assets/bootstrap/scss/utilities/_spacing.scss b/templates/assets/bootstrap/scss/utilities/_spacing.scss
new file mode 100644
index 0000000..c89816b
--- /dev/null
+++ b/templates/assets/bootstrap/scss/utilities/_spacing.scss
@@ -0,0 +1,41 @@
+// Margin and Padding
+
+@each $breakpoint in map-keys($grid-breakpoints) {
+ @include media-breakpoint-up($breakpoint) {
+ $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
+
+ @each $prop, $abbrev in (margin: m, padding: p) {
+ @each $size, $length in $spacers {
+
+ .#{$abbrev}#{$infix}-#{$size} { #{$prop}: $length !important; }
+ .#{$abbrev}t#{$infix}-#{$size} { #{$prop}-top: $length !important; }
+ .#{$abbrev}r#{$infix}-#{$size} { #{$prop}-right: $length !important; }
+ .#{$abbrev}b#{$infix}-#{$size} { #{$prop}-bottom: $length !important; }
+ .#{$abbrev}l#{$infix}-#{$size} { #{$prop}-left: $length !important; }
+ .#{$abbrev}x#{$infix}-#{$size} {
+ #{$prop}-right: $length !important;
+ #{$prop}-left: $length !important;
+ }
+ .#{$abbrev}y#{$infix}-#{$size} {
+ #{$prop}-top: $length !important;
+ #{$prop}-bottom: $length !important;
+ }
+ }
+ }
+
+ // Some special margin utils
+ .m#{$infix}-auto { margin: auto !important; }
+ .mt#{$infix}-auto { margin-top: auto !important; }
+ .mr#{$infix}-auto { margin-right: auto !important; }
+ .mb#{$infix}-auto { margin-bottom: auto !important; }
+ .ml#{$infix}-auto { margin-left: auto !important; }
+ .mx#{$infix}-auto {
+ margin-right: auto !important;
+ margin-left: auto !important;
+ }
+ .my#{$infix}-auto {
+ margin-top: auto !important;
+ margin-bottom: auto !important;
+ }
+ }
+}
diff --git a/templates/assets/bootstrap/scss/utilities/_text.scss b/templates/assets/bootstrap/scss/utilities/_text.scss
new file mode 100644
index 0000000..4ac9053
--- /dev/null
+++ b/templates/assets/bootstrap/scss/utilities/_text.scss
@@ -0,0 +1,61 @@
+//
+// Text
+//
+
+// Alignment
+
+.text-justify { text-align: justify !important; }
+.text-nowrap { white-space: nowrap !important; }
+.text-truncate { @include text-truncate; }
+
+// Responsive alignment
+
+@each $breakpoint in map-keys($grid-breakpoints) {
+ @include media-breakpoint-up($breakpoint) {
+ $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
+
+ .text#{$infix}-left { text-align: left !important; }
+ .text#{$infix}-right { text-align: right !important; }
+ .text#{$infix}-center { text-align: center !important; }
+ }
+}
+
+// Transformation
+
+.text-lowercase { text-transform: lowercase !important; }
+.text-uppercase { text-transform: uppercase !important; }
+.text-capitalize { text-transform: capitalize !important; }
+
+// Weight and italics
+
+.font-weight-normal { font-weight: $font-weight-normal; }
+.font-weight-bold { font-weight: $font-weight-bold; }
+.font-italic { font-style: italic; }
+
+// Contextual colors
+
+.text-white {
+ color: #fff !important;
+}
+
+@include text-emphasis-variant('.text-muted', $text-muted);
+
+@include text-emphasis-variant('.text-primary', $brand-primary);
+
+@include text-emphasis-variant('.text-success', $brand-success);
+
+@include text-emphasis-variant('.text-info', $brand-info);
+
+@include text-emphasis-variant('.text-warning', $brand-warning);
+
+@include text-emphasis-variant('.text-danger', $brand-danger);
+
+// Font color
+
+@include text-emphasis-variant('.text-gray-dark', $gray-dark);
+
+// Misc
+
+.text-hide {
+ @include text-hide();
+}
diff --git a/templates/assets/bootstrap/scss/utilities/_visibility.scss b/templates/assets/bootstrap/scss/utilities/_visibility.scss
new file mode 100644
index 0000000..823406d
--- /dev/null
+++ b/templates/assets/bootstrap/scss/utilities/_visibility.scss
@@ -0,0 +1,11 @@
+//
+// Visibility utilities
+//
+
+.visible {
+ @include invisible(visible);
+}
+
+.invisible {
+ @include invisible(hidden);
+}
diff --git a/templates/assets/images/items/aegis.png b/templates/assets/images/items/aegis.png
new file mode 100644
index 0000000..275bb8c
--- /dev/null
+++ b/templates/assets/images/items/aegis.png
Binary files differ
diff --git a/templates/assets/images/items/aftershock.png b/templates/assets/images/items/aftershock.png
new file mode 100644
index 0000000..8ea1d9b
--- /dev/null
+++ b/templates/assets/images/items/aftershock.png
Binary files differ
diff --git a/templates/assets/images/items/alternating-current.png b/templates/assets/images/items/alternating-current.png
new file mode 100644
index 0000000..dc90733
--- /dev/null
+++ b/templates/assets/images/items/alternating-current.png
Binary files differ
diff --git a/templates/assets/images/items/atlas-pauldron.png b/templates/assets/images/items/atlas-pauldron.png
new file mode 100644
index 0000000..37dc715
--- /dev/null
+++ b/templates/assets/images/items/atlas-pauldron.png
Binary files differ
diff --git a/templates/assets/images/items/barbed-needle.png b/templates/assets/images/items/barbed-needle.png
new file mode 100644
index 0000000..73b5b35
--- /dev/null
+++ b/templates/assets/images/items/barbed-needle.png
Binary files differ
diff --git a/templates/assets/images/items/blazing-salvo.png b/templates/assets/images/items/blazing-salvo.png
new file mode 100644
index 0000000..45f7356
--- /dev/null
+++ b/templates/assets/images/items/blazing-salvo.png
Binary files differ
diff --git a/templates/assets/images/items/bonesaw.png b/templates/assets/images/items/bonesaw.png
new file mode 100644
index 0000000..1f5ad02
--- /dev/null
+++ b/templates/assets/images/items/bonesaw.png
Binary files differ
diff --git a/templates/assets/images/items/book-of-eulogies.png b/templates/assets/images/items/book-of-eulogies.png
new file mode 100644
index 0000000..6f6f870
--- /dev/null
+++ b/templates/assets/images/items/book-of-eulogies.png
Binary files differ
diff --git a/templates/assets/images/items/breaking-point.png b/templates/assets/images/items/breaking-point.png
new file mode 100644
index 0000000..87cc589
--- /dev/null
+++ b/templates/assets/images/items/breaking-point.png
Binary files differ
diff --git a/templates/assets/images/items/broken-myth.png b/templates/assets/images/items/broken-myth.png
new file mode 100644
index 0000000..635d195
--- /dev/null
+++ b/templates/assets/images/items/broken-myth.png
Binary files differ
diff --git a/templates/assets/images/items/chronograph.png b/templates/assets/images/items/chronograph.png
new file mode 100644
index 0000000..b7ec2e6
--- /dev/null
+++ b/templates/assets/images/items/chronograph.png
Binary files differ
diff --git a/templates/assets/images/items/clockwork.png b/templates/assets/images/items/clockwork.png
new file mode 100644
index 0000000..f35c6d6
--- /dev/null
+++ b/templates/assets/images/items/clockwork.png
Binary files differ
diff --git a/templates/assets/images/items/coat-of-plates.png b/templates/assets/images/items/coat-of-plates.png
new file mode 100644
index 0000000..7704515
--- /dev/null
+++ b/templates/assets/images/items/coat-of-plates.png
Binary files differ
diff --git a/templates/assets/images/items/contraption.png b/templates/assets/images/items/contraption.png
new file mode 100644
index 0000000..083c507
--- /dev/null
+++ b/templates/assets/images/items/contraption.png
Binary files differ
diff --git a/templates/assets/images/items/crucible.png b/templates/assets/images/items/crucible.png
new file mode 100644
index 0000000..e0bfd74
--- /dev/null
+++ b/templates/assets/images/items/crucible.png
Binary files differ
diff --git a/templates/assets/images/items/crystal-bit.png b/templates/assets/images/items/crystal-bit.png
new file mode 100644
index 0000000..4bb9558
--- /dev/null
+++ b/templates/assets/images/items/crystal-bit.png
Binary files differ
diff --git a/templates/assets/images/items/crystal-infusion.png b/templates/assets/images/items/crystal-infusion.png
new file mode 100644
index 0000000..99a73d0
--- /dev/null
+++ b/templates/assets/images/items/crystal-infusion.png
Binary files differ
diff --git a/templates/assets/images/items/dragon-heart.png b/templates/assets/images/items/dragon-heart.png
new file mode 100644
index 0000000..7a246f5
--- /dev/null
+++ b/templates/assets/images/items/dragon-heart.png
Binary files differ
diff --git a/templates/assets/images/items/dragonblood-contract.png b/templates/assets/images/items/dragonblood-contract.png
new file mode 100644
index 0000000..aeabe0d
--- /dev/null
+++ b/templates/assets/images/items/dragonblood-contract.png
Binary files differ
diff --git a/templates/assets/images/items/echo.png b/templates/assets/images/items/echo.png
new file mode 100644
index 0000000..08ae9d3
--- /dev/null
+++ b/templates/assets/images/items/echo.png
Binary files differ
diff --git a/templates/assets/images/items/eclipse-prism.png b/templates/assets/images/items/eclipse-prism.png
new file mode 100644
index 0000000..86bf5a6
--- /dev/null
+++ b/templates/assets/images/items/eclipse-prism.png
Binary files differ
diff --git a/templates/assets/images/items/energy-battery.png b/templates/assets/images/items/energy-battery.png
new file mode 100644
index 0000000..f8326a0
--- /dev/null
+++ b/templates/assets/images/items/energy-battery.png
Binary files differ
diff --git a/templates/assets/images/items/eve-of-harvest.png b/templates/assets/images/items/eve-of-harvest.png
new file mode 100644
index 0000000..1dffd23
--- /dev/null
+++ b/templates/assets/images/items/eve-of-harvest.png
Binary files differ
diff --git a/templates/assets/images/items/flare-gun.png b/templates/assets/images/items/flare-gun.png
new file mode 100644
index 0000000..8436193
--- /dev/null
+++ b/templates/assets/images/items/flare-gun.png
Binary files differ
diff --git a/templates/assets/images/items/flare.png b/templates/assets/images/items/flare.png
new file mode 100644
index 0000000..e28d016
--- /dev/null
+++ b/templates/assets/images/items/flare.png
Binary files differ
diff --git a/templates/assets/images/items/fountain-of-renewal.png b/templates/assets/images/items/fountain-of-renewal.png
new file mode 100644
index 0000000..1f07b2f
--- /dev/null
+++ b/templates/assets/images/items/fountain-of-renewal.png
Binary files differ
diff --git a/templates/assets/images/items/frostburn.png b/templates/assets/images/items/frostburn.png
new file mode 100644
index 0000000..de81ded
--- /dev/null
+++ b/templates/assets/images/items/frostburn.png
Binary files differ
diff --git a/templates/assets/images/items/halcyon-chargers.png b/templates/assets/images/items/halcyon-chargers.png
new file mode 100644
index 0000000..1f05c6a
--- /dev/null
+++ b/templates/assets/images/items/halcyon-chargers.png
Binary files differ
diff --git a/templates/assets/images/items/halcyon-potion.png b/templates/assets/images/items/halcyon-potion.png
new file mode 100644
index 0000000..f46e77e
--- /dev/null
+++ b/templates/assets/images/items/halcyon-potion.png
Binary files differ
diff --git a/templates/assets/images/items/heavy-prism.png b/templates/assets/images/items/heavy-prism.png
new file mode 100644
index 0000000..5f760ce
--- /dev/null
+++ b/templates/assets/images/items/heavy-prism.png
Binary files differ
diff --git a/templates/assets/images/items/heavy-steel.png b/templates/assets/images/items/heavy-steel.png
new file mode 100644
index 0000000..20eb766
--- /dev/null
+++ b/templates/assets/images/items/heavy-steel.png
Binary files differ
diff --git a/templates/assets/images/items/hour-glass.png b/templates/assets/images/items/hour-glass.png
new file mode 100644
index 0000000..8bbd390
--- /dev/null
+++ b/templates/assets/images/items/hour-glass.png
Binary files differ
diff --git a/templates/assets/images/items/ironguard-contract.png b/templates/assets/images/items/ironguard-contract.png
new file mode 100644
index 0000000..761eb86
--- /dev/null
+++ b/templates/assets/images/items/ironguard-contract.png
Binary files differ
diff --git a/templates/assets/images/items/journey-boots.png b/templates/assets/images/items/journey-boots.png
new file mode 100644
index 0000000..6e50262
--- /dev/null
+++ b/templates/assets/images/items/journey-boots.png
Binary files differ
diff --git a/templates/assets/images/items/kinetic-shield.png b/templates/assets/images/items/kinetic-shield.png
new file mode 100644
index 0000000..c729d4d
--- /dev/null
+++ b/templates/assets/images/items/kinetic-shield.png
Binary files differ
diff --git a/templates/assets/images/items/level-juice.png b/templates/assets/images/items/level-juice.png
new file mode 100644
index 0000000..13c74de
--- /dev/null
+++ b/templates/assets/images/items/level-juice.png
Binary files differ
diff --git a/templates/assets/images/items/lifespring.png b/templates/assets/images/items/lifespring.png
new file mode 100644
index 0000000..432c9bf
--- /dev/null
+++ b/templates/assets/images/items/lifespring.png
Binary files differ
diff --git a/templates/assets/images/items/light-armor.png b/templates/assets/images/items/light-armor.png
new file mode 100644
index 0000000..3ccb098
--- /dev/null
+++ b/templates/assets/images/items/light-armor.png
Binary files differ
diff --git a/templates/assets/images/items/light-shield.png b/templates/assets/images/items/light-shield.png
new file mode 100644
index 0000000..5e638e6
--- /dev/null
+++ b/templates/assets/images/items/light-shield.png
Binary files differ
diff --git a/templates/assets/images/items/lucky-strike.png b/templates/assets/images/items/lucky-strike.png
new file mode 100644
index 0000000..36288d4
--- /dev/null
+++ b/templates/assets/images/items/lucky-strike.png
Binary files differ
diff --git a/templates/assets/images/items/metal-jacket.png b/templates/assets/images/items/metal-jacket.png
new file mode 100644
index 0000000..d598727
--- /dev/null
+++ b/templates/assets/images/items/metal-jacket.png
Binary files differ
diff --git a/templates/assets/images/items/minion-candy.png b/templates/assets/images/items/minion-candy.png
new file mode 100644
index 0000000..0cb2594
--- /dev/null
+++ b/templates/assets/images/items/minion-candy.png
Binary files differ
diff --git a/templates/assets/images/items/minions-foot.png b/templates/assets/images/items/minions-foot.png
new file mode 100644
index 0000000..a1a8137
--- /dev/null
+++ b/templates/assets/images/items/minions-foot.png
Binary files differ
diff --git a/templates/assets/images/items/nullwave-gauntlet.png b/templates/assets/images/items/nullwave-gauntlet.png
new file mode 100644
index 0000000..453a5c0
--- /dev/null
+++ b/templates/assets/images/items/nullwave-gauntlet.png
Binary files differ
diff --git a/templates/assets/images/items/oak-heart.png b/templates/assets/images/items/oak-heart.png
new file mode 100644
index 0000000..a678cf3
--- /dev/null
+++ b/templates/assets/images/items/oak-heart.png
Binary files differ
diff --git a/templates/assets/images/items/piercing-shard.png b/templates/assets/images/items/piercing-shard.png
new file mode 100644
index 0000000..c97b9bb
--- /dev/null
+++ b/templates/assets/images/items/piercing-shard.png
Binary files differ
diff --git a/templates/assets/images/items/piercing-spear.png b/templates/assets/images/items/piercing-spear.png
new file mode 100644
index 0000000..e4fd737
--- /dev/null
+++ b/templates/assets/images/items/piercing-spear.png
Binary files differ
diff --git a/templates/assets/images/items/poisoned-shiv.png b/templates/assets/images/items/poisoned-shiv.png
new file mode 100644
index 0000000..cd23987
--- /dev/null
+++ b/templates/assets/images/items/poisoned-shiv.png
Binary files differ
diff --git a/templates/assets/images/items/pot-of-gold.png b/templates/assets/images/items/pot-of-gold.png
new file mode 100644
index 0000000..6142778
--- /dev/null
+++ b/templates/assets/images/items/pot-of-gold.png
Binary files differ
diff --git a/templates/assets/images/items/protector-contract.png b/templates/assets/images/items/protector-contract.png
new file mode 100644
index 0000000..cc856ab
--- /dev/null
+++ b/templates/assets/images/items/protector-contract.png
Binary files differ
diff --git a/templates/assets/images/items/reflex-block.png b/templates/assets/images/items/reflex-block.png
new file mode 100644
index 0000000..aadae9f
--- /dev/null
+++ b/templates/assets/images/items/reflex-block.png
Binary files differ
diff --git a/templates/assets/images/items/scout-trap.png b/templates/assets/images/items/scout-trap.png
new file mode 100644
index 0000000..ef78d67
--- /dev/null
+++ b/templates/assets/images/items/scout-trap.png
Binary files differ
diff --git a/templates/assets/images/items/serpent-mask.png b/templates/assets/images/items/serpent-mask.png
new file mode 100644
index 0000000..424766f
--- /dev/null
+++ b/templates/assets/images/items/serpent-mask.png
Binary files differ
diff --git a/templates/assets/images/items/shatter-glass.png b/templates/assets/images/items/shatter-glass.png
new file mode 100644
index 0000000..1ba732e
--- /dev/null
+++ b/templates/assets/images/items/shatter-glass.png
Binary files differ
diff --git a/templates/assets/images/items/shiversteel.png b/templates/assets/images/items/shiversteel.png
new file mode 100644
index 0000000..d41f5bf
--- /dev/null
+++ b/templates/assets/images/items/shiversteel.png
Binary files differ
diff --git a/templates/assets/images/items/six-sins.png b/templates/assets/images/items/six-sins.png
new file mode 100644
index 0000000..28f7fd3
--- /dev/null
+++ b/templates/assets/images/items/six-sins.png
Binary files differ
diff --git a/templates/assets/images/items/slumbering-husk.png b/templates/assets/images/items/slumbering-husk.png
new file mode 100644
index 0000000..797b1af
--- /dev/null
+++ b/templates/assets/images/items/slumbering-husk.png
Binary files differ
diff --git a/templates/assets/images/items/sorrow-blade.png b/templates/assets/images/items/sorrow-blade.png
new file mode 100644
index 0000000..1de0394
--- /dev/null
+++ b/templates/assets/images/items/sorrow-blade.png
Binary files differ
diff --git a/templates/assets/images/items/sprint-boots.png b/templates/assets/images/items/sprint-boots.png
new file mode 100644
index 0000000..837a685
--- /dev/null
+++ b/templates/assets/images/items/sprint-boots.png
Binary files differ
diff --git a/templates/assets/images/items/stormcrown.png b/templates/assets/images/items/stormcrown.png
new file mode 100644
index 0000000..de04715
--- /dev/null
+++ b/templates/assets/images/items/stormcrown.png
Binary files differ
diff --git a/templates/assets/images/items/stormguard-banner.png b/templates/assets/images/items/stormguard-banner.png
new file mode 100644
index 0000000..02c7fcc
--- /dev/null
+++ b/templates/assets/images/items/stormguard-banner.png
Binary files differ
diff --git a/templates/assets/images/items/swift-shooter.png b/templates/assets/images/items/swift-shooter.png
new file mode 100644
index 0000000..47bb6fe
--- /dev/null
+++ b/templates/assets/images/items/swift-shooter.png
Binary files differ
diff --git a/templates/assets/images/items/tension-bow.png b/templates/assets/images/items/tension-bow.png
new file mode 100644
index 0000000..7a5ef1f
--- /dev/null
+++ b/templates/assets/images/items/tension-bow.png
Binary files differ
diff --git a/templates/assets/images/items/tornado-trigger.png b/templates/assets/images/items/tornado-trigger.png
new file mode 100644
index 0000000..f624285
--- /dev/null
+++ b/templates/assets/images/items/tornado-trigger.png
Binary files differ
diff --git a/templates/assets/images/items/travel-boots.png b/templates/assets/images/items/travel-boots.png
new file mode 100644
index 0000000..1ad722f
--- /dev/null
+++ b/templates/assets/images/items/travel-boots.png
Binary files differ
diff --git a/templates/assets/images/items/tyrants-monocle.png b/templates/assets/images/items/tyrants-monocle.png
new file mode 100644
index 0000000..cae719a
--- /dev/null
+++ b/templates/assets/images/items/tyrants-monocle.png
Binary files differ
diff --git a/templates/assets/images/items/void-battery.png b/templates/assets/images/items/void-battery.png
new file mode 100644
index 0000000..4eecb37
--- /dev/null
+++ b/templates/assets/images/items/void-battery.png
Binary files differ
diff --git a/templates/assets/images/items/war-treads.png b/templates/assets/images/items/war-treads.png
new file mode 100644
index 0000000..32f0c43
--- /dev/null
+++ b/templates/assets/images/items/war-treads.png
Binary files differ
diff --git a/templates/assets/images/items/weapon-blade.png b/templates/assets/images/items/weapon-blade.png
new file mode 100644
index 0000000..fce79c1
--- /dev/null
+++ b/templates/assets/images/items/weapon-blade.png
Binary files differ
diff --git a/templates/assets/images/items/weapon-infusion.png b/templates/assets/images/items/weapon-infusion.png
new file mode 100644
index 0000000..e5f8112
--- /dev/null
+++ b/templates/assets/images/items/weapon-infusion.png
Binary files differ
diff --git a/templates/assets/jquery/.bower.json b/templates/assets/jquery/.bower.json
new file mode 100644
index 0000000..8411b9b
--- /dev/null
+++ b/templates/assets/jquery/.bower.json
@@ -0,0 +1,25 @@
+{
+ "name": "jquery",
+ "main": "dist/jquery.js",
+ "license": "MIT",
+ "ignore": [
+ "package.json"
+ ],
+ "keywords": [
+ "jquery",
+ "javascript",
+ "browser",
+ "library"
+ ],
+ "homepage": "https://github.com/jquery/jquery-dist",
+ "version": "2.2.4",
+ "_release": "2.2.4",
+ "_resolution": {
+ "type": "version",
+ "tag": "2.2.4",
+ "commit": "c0185ab7c75aab88762c5aae780b9d83b80eda72"
+ },
+ "_source": "https://github.com/jquery/jquery-dist.git",
+ "_target": "^2.2",
+ "_originalSource": "jquery"
+} \ No newline at end of file
diff --git a/templates/assets/jquery/AUTHORS.txt b/templates/assets/jquery/AUTHORS.txt
new file mode 100644
index 0000000..dde64ca
--- /dev/null
+++ b/templates/assets/jquery/AUTHORS.txt
@@ -0,0 +1,278 @@
+Authors ordered by first contribution.
+
+John Resig <jeresig@gmail.com>
+Gilles van den Hoven <gilles0181@gmail.com>
+Michael Geary <mike@geary.com>
+Stefan Petre <stefan.petre@gmail.com>
+Yehuda Katz <wycats@gmail.com>
+Corey Jewett <cj@syntheticplayground.com>
+Klaus Hartl <klaus.hartl@gmail.com>
+Franck Marcia <franck.marcia@gmail.com>
+Jörn Zaefferer <joern.zaefferer@gmail.com>
+Paul Bakaus <paul.bakaus@gmail.com>
+Brandon Aaron <brandon.aaron@gmail.com>
+Mike Alsup <malsup@gmail.com>
+Dave Methvin <dave.methvin@gmail.com>
+Ed Engelhardt <edengelhardt@gmail.com>
+Sean Catchpole <littlecooldude@gmail.com>
+Paul Mclanahan <pmclanahan@gmail.com>
+David Serduke <davidserduke@gmail.com>
+Richard D. Worth <rdworth@gmail.com>
+Scott González <scott.gonzalez@gmail.com>
+Ariel Flesler <aflesler@gmail.com>
+Jon Evans <jon@springyweb.com>
+TJ Holowaychuk <tj@vision-media.ca>
+Michael Bensoussan <mickey@seesmic.com>
+Robert Katić <robert.katic@gmail.com>
+Louis-Rémi Babé <lrbabe@gmail.com>
+Earle Castledine <mrspeaker@gmail.com>
+Damian Janowski <damian.janowski@gmail.com>
+Rich Dougherty <rich@rd.gen.nz>
+Kim Dalsgaard <kim@kimdalsgaard.com>
+Andrea Giammarchi <andrea.giammarchi@gmail.com>
+Mark Gibson <jollytoad@gmail.com>
+Karl Swedberg <kswedberg@gmail.com>
+Justin Meyer <justinbmeyer@gmail.com>
+Ben Alman <cowboy@rj3.net>
+James Padolsey <cla@padolsey.net>
+David Petersen <public@petersendidit.com>
+Batiste Bieler <batiste.bieler@gmail.com>
+Alexander Farkas <info@corrupt-system.de>
+Rick Waldron <waldron.rick@gmail.com>
+Filipe Fortes <filipe@fortes.com>
+Neeraj Singh <neerajdotname@gmail.com>
+Paul Irish <paul.irish@gmail.com>
+Iraê Carvalho <irae@irae.pro.br>
+Matt Curry <matt@pseudocoder.com>
+Michael Monteleone <michael@michaelmonteleone.net>
+Noah Sloan <noah.sloan@gmail.com>
+Tom Viner <github@viner.tv>
+Douglas Neiner <doug@dougneiner.com>
+Adam J. Sontag <ajpiano@ajpiano.com>
+Dave Reed <dareed@microsoft.com>
+Ralph Whitbeck <ralph.whitbeck@gmail.com>
+Carl Fürstenberg <azatoth@gmail.com>
+Jacob Wright <jacwright@gmail.com>
+J. Ryan Stinnett <jryans@gmail.com>
+unknown <Igen005@.upcorp.ad.uprr.com>
+temp01 <temp01irc@gmail.com>
+Heungsub Lee <h@subl.ee>
+Colin Snover <github.com@zetafleet.com>
+Ryan W Tenney <ryan@10e.us>
+Pinhook <contact@pinhooklabs.com>
+Ron Otten <r.j.g.otten@gmail.com>
+Jephte Clain <Jephte.Clain@univ-reunion.fr>
+Anton Matzneller <obhvsbypqghgc@gmail.com>
+Alex Sexton <AlexSexton@gmail.com>
+Dan Heberden <danheberden@gmail.com>
+Henri Wiechers <hwiechers@gmail.com>
+Russell Holbrook <russell.holbrook@patch.com>
+Julian Aubourg <aubourg.julian@gmail.com>
+Gianni Alessandro Chiappetta <gianni@runlevel6.org>
+Scott Jehl <scottjehl@gmail.com>
+James Burke <jrburke@gmail.com>
+Jonas Pfenniger <jonas@pfenniger.name>
+Xavi Ramirez <xavi.rmz@gmail.com>
+Jared Grippe <jared@deadlyicon.com>
+Sylvester Keil <sylvester@keil.or.at>
+Brandon Sterne <bsterne@mozilla.com>
+Mathias Bynens <mathias@qiwi.be>
+Timmy Willison <timmywillisn@gmail.com>
+Corey Frang <gnarf37@gmail.com>
+Digitalxero <digitalxero>
+Anton Kovalyov <anton@kovalyov.net>
+David Murdoch <david@davidmurdoch.com>
+Josh Varner <josh.varner@gmail.com>
+Charles McNulty <cmcnulty@kznf.com>
+Jordan Boesch <jboesch26@gmail.com>
+Jess Thrysoee <jess@thrysoee.dk>
+Michael Murray <m@murz.net>
+Lee Carpenter <elcarpie@gmail.com>
+Alexis Abril <me@alexisabril.com>
+Rob Morgan <robbym@gmail.com>
+John Firebaugh <john_firebaugh@bigfix.com>
+Sam Bisbee <sam@sbisbee.com>
+Gilmore Davidson <gilmoreorless@gmail.com>
+Brian Brennan <me@brianlovesthings.com>
+Xavier Montillet <xavierm02.net@gmail.com>
+Daniel Pihlstrom <sciolist.se@gmail.com>
+Sahab Yazdani <sahab.yazdani+github@gmail.com>
+avaly <github-com@agachi.name>
+Scott Hughes <hi@scott-hughes.me>
+Mike Sherov <mike.sherov@gmail.com>
+Greg Hazel <ghazel@gmail.com>
+Schalk Neethling <schalk@ossreleasefeed.com>
+Denis Knauf <Denis.Knauf@gmail.com>
+Timo Tijhof <krinklemail@gmail.com>
+Steen Nielsen <swinedk@gmail.com>
+Anton Ryzhov <anton@ryzhov.me>
+Shi Chuan <shichuanr@gmail.com>
+Berker Peksag <berker.peksag@gmail.com>
+Toby Brain <tobyb@freshview.com>
+Matt Mueller <mattmuelle@gmail.com>
+Justin <drakefjustin@gmail.com>
+Daniel Herman <daniel.c.herman@gmail.com>
+Oleg Gaidarenko <markelog@gmail.com>
+Richard Gibson <richard.gibson@gmail.com>
+Rafaël Blais Masson <rafbmasson@gmail.com>
+cmc3cn <59194618@qq.com>
+Joe Presbrey <presbrey@gmail.com>
+Sindre Sorhus <sindresorhus@gmail.com>
+Arne de Bree <arne@bukkie.nl>
+Vladislav Zarakovsky <vlad.zar@gmail.com>
+Andrew E Monat <amonat@gmail.com>
+Oskari <admin@o-programs.com>
+Joao Henrique de Andrade Bruni <joaohbruni@yahoo.com.br>
+tsinha <tsinha@Anthonys-MacBook-Pro.local>
+Matt Farmer <matt@frmr.me>
+Trey Hunner <treyhunner@gmail.com>
+Jason Moon <jmoon@socialcast.com>
+Jeffery To <jeffery.to@gmail.com>
+Kris Borchers <kris.borchers@gmail.com>
+Vladimir Zhuravlev <private.face@gmail.com>
+Jacob Thornton <jacobthornton@gmail.com>
+Chad Killingsworth <chadkillingsworth@missouristate.edu>
+Nowres Rafid <nowres.rafed@gmail.com>
+David Benjamin <davidben@mit.edu>
+Uri Gilad <antishok@gmail.com>
+Chris Faulkner <thefaulkner@gmail.com>
+Elijah Manor <elijah.manor@gmail.com>
+Daniel Chatfield <chatfielddaniel@gmail.com>
+Nikita Govorov <nikita.govorov@gmail.com>
+Wesley Walser <waw325@gmail.com>
+Mike Pennisi <mike@mikepennisi.com>
+Markus Staab <markus.staab@redaxo.de>
+Dave Riddle <david@joyvuu.com>
+Callum Macrae <callum@lynxphp.com>
+Benjamin Truyman <bentruyman@gmail.com>
+James Huston <james@jameshuston.net>
+Erick Ruiz de Chávez <erickrdch@gmail.com>
+David Bonner <dbonner@cogolabs.com>
+Akintayo Akinwunmi <aakinwunmi@judge.com>
+MORGAN <morgan@morgangraphics.com>
+Ismail Khair <ismail.khair@gmail.com>
+Carl Danley <carldanley@gmail.com>
+Mike Petrovich <michael.c.petrovich@gmail.com>
+Greg Lavallee <greglavallee@wapolabs.com>
+Daniel Gálvez <dgalvez@editablething.com>
+Sai Lung Wong <sai.wong@huffingtonpost.com>
+Tom H Fuertes <TomFuertes@gmail.com>
+Roland Eckl <eckl.roland@googlemail.com>
+Jay Merrifield <fracmak@gmail.com>
+Allen J Schmidt Jr <cobrasoft@gmail.com>
+Jonathan Sampson <jjdsampson@gmail.com>
+Marcel Greter <marcel.greter@ocbnet.ch>
+Matthias Jäggli <matthias.jaeggli@gmail.com>
+David Fox <dfoxinator@gmail.com>
+Yiming He <yiminghe@gmail.com>
+Devin Cooper <cooper.semantics@gmail.com>
+Paul Ramos <paul.b.ramos@gmail.com>
+Rod Vagg <rod@vagg.org>
+Bennett Sorbo <bsorbo@gmail.com>
+Sebastian Burkhard <sebi.burkhard@gmail.com>
+Zachary Adam Kaplan <razic@viralkitty.com>
+nanto_vi <nanto@moon.email.ne.jp>
+nanto <nanto@moon.email.ne.jp>
+Danil Somsikov <danilasomsikov@gmail.com>
+Ryunosuke SATO <tricknotes.rs@gmail.com>
+Jean Boussier <jean.boussier@gmail.com>
+Adam Coulombe <me@adam.co>
+Andrew Plummer <plummer.andrew@gmail.com>
+Mark Raddatz <mraddatz@gmail.com>
+Isaac Z. Schlueter <i@izs.me>
+Karl Sieburg <ksieburg@yahoo.com>
+Pascal Borreli <pascal@borreli.com>
+Nguyen Phuc Lam <ruado1987@gmail.com>
+Dmitry Gusev <dmitry.gusev@gmail.com>
+Michał Gołębiowski <m.goleb@gmail.com>
+Li Xudong <istonelee@gmail.com>
+Steven Benner <admin@stevenbenner.com>
+Tom H Fuertes <tomfuertes@gmail.com>
+Renato Oliveira dos Santos <ros3@cin.ufpe.br>
+ros3cin <ros3@cin.ufpe.br>
+Jason Bedard <jason+jquery@jbedard.ca>
+Kyle Robinson Young <kyle@dontkry.com>
+Chris Talkington <chris@talkingtontech.com>
+Eddie Monge <eddie@eddiemonge.com>
+Terry Jones <terry@jon.es>
+Jason Merino <jasonmerino@gmail.com>
+Jeremy Dunck <jdunck@gmail.com>
+Chris Price <price.c@gmail.com>
+Guy Bedford <guybedford@gmail.com>
+Amey Sakhadeo <me@ameyms.com>
+Mike Sidorov <mikes.ekb@gmail.com>
+Anthony Ryan <anthonyryan1@gmail.com>
+Dominik D. Geyer <dominik.geyer@gmail.com>
+George Kats <katsgeorgeek@gmail.com>
+Lihan Li <frankieteardrop@gmail.com>
+Ronny Springer <springer.ronny@gmail.com>
+Chris Antaki <ChrisAntaki@gmail.com>
+Marian Sollmann <marian.sollmann@cargomedia.ch>
+njhamann <njhamann@gmail.com>
+Ilya Kantor <iliakan@gmail.com>
+David Hong <d.hong@me.com>
+John Paul <john@johnkpaul.com>
+Jakob Stoeck <jakob@pokermania.de>
+Christopher Jones <chris@cjqed.com>
+Forbes Lindesay <forbes@lindesay.co.uk>
+S. Andrew Sheppard <andrew@wq.io>
+Leonardo Balter <leonardo.balter@gmail.com>
+Roman Reiß <me@silverwind.io>
+Benjy Cui <benjytrys@gmail.com>
+Rodrigo Rosenfeld Rosas <rr.rosas@gmail.com>
+John Hoven <hovenj@gmail.com>
+Philip Jägenstedt <philip@foolip.org>
+Christian Kosmowski <ksmwsk@gmail.com>
+Liang Peng <poppinlp@gmail.com>
+TJ VanToll <tj.vantoll@gmail.com>
+Senya Pugach <upisfree@outlook.com>
+Aurelio De Rosa <aurelioderosa@gmail.com>
+Nazar Mokrynskyi <nazar@mokrynskyi.com>
+Amit Merchant <bullredeyes@gmail.com>
+Jason Bedard <jason+github@jbedard.ca>
+Arthur Verschaeve <contact@arthurverschaeve.be>
+Dan Hart <danhart@notonthehighstreet.com>
+Bin Xin <rhyzix@gmail.com>
+David Corbacho <davidcorbacho@gmail.com>
+Veaceslav Grimalschi <grimalschi@yandex.ru>
+Daniel Husar <dano.husar@gmail.com>
+Frederic Hemberger <mail@frederic-hemberger.de>
+Ben Toews <mastahyeti@gmail.com>
+Aditya Raghavan <araghavan3@gmail.com>
+Victor Homyakov <vkhomyackov@gmail.com>
+Shivaji Varma <contact@shivajivarma.com>
+Nicolas HENRY <icewil@gmail.com>
+Anne-Gaelle Colom <coloma@westminster.ac.uk>
+George Mauer <gmauer@gmail.com>
+Leonardo Braga <leonardo.braga@gmail.com>
+Stephen Edgar <stephen@netweb.com.au>
+Thomas Tortorini <thomastortorini@gmail.com>
+Winston Howes <winstonhowes@gmail.com>
+Jon Hester <jon.d.hester@gmail.com>
+Alexander O'Mara <me@alexomara.com>
+Bastian Buchholz <buchholz.bastian@googlemail.com>
+Arthur Stolyar <nekr.fabula@gmail.com>
+Calvin Metcalf <calvin.metcalf@gmail.com>
+Mu Haibao <mhbseal@163.com>
+Richard McDaniel <rm0026@uah.edu>
+Chris Rebert <github@rebertia.com>
+Gabriel Schulhof <gabriel.schulhof@intel.com>
+Gilad Peleg <giladp007@gmail.com>
+Martin Naumann <martin@geekonaut.de>
+Marek Lewandowski <m.lewandowski@cksource.com>
+Bruno Pérel <brunoperel@gmail.com>
+Reed Loden <reed@reedloden.com>
+Daniel Nill <daniellnill@gmail.com>
+Yongwoo Jeon <yongwoo.jeon@navercorp.com>
+Sean Henderson <seanh.za@gmail.com>
+Richard Kraaijenhagen <stdin+git@riichard.com>
+Connor Atherton <c.liam.atherton@gmail.com>
+Gary Ye <garysye@gmail.com>
+Christian Grete <webmaster@christiangrete.com>
+Liza Ramo <liza.h.ramo@gmail.com>
+Julian Alexander Murillo <julian.alexander.murillo@gmail.com>
+Joelle Fleurantin <joasqueeniebee@gmail.com>
+Jun Sun <klsforever@gmail.com>
+Devin Wilson <dwilson6.github@gmail.com>
+Todor Prikumov <tono_pr@abv.bg>
+Zack Hall <zackhall@outlook.com>
diff --git a/templates/assets/jquery/LICENSE.txt b/templates/assets/jquery/LICENSE.txt
new file mode 100644
index 0000000..5312a4c
--- /dev/null
+++ b/templates/assets/jquery/LICENSE.txt
@@ -0,0 +1,36 @@
+Copyright jQuery Foundation and other contributors, https://jquery.org/
+
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/jquery/jquery
+
+The following license applies to all parts of this software except as
+documented below:
+
+====
+
+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.
+
+====
+
+All files located in the node_modules and external directories are
+externally maintained libraries used by this software which have their
+own licenses; we recommend you read them, as their terms may differ from
+the terms above.
diff --git a/templates/assets/jquery/README.md b/templates/assets/jquery/README.md
new file mode 100644
index 0000000..ba3174a
--- /dev/null
+++ b/templates/assets/jquery/README.md
@@ -0,0 +1,65 @@
+# jQuery
+
+> jQuery is a fast, small, and feature-rich JavaScript library.
+
+For information on how to get started and how to use jQuery, please see [jQuery's documentation](http://api.jquery.com/).
+For source files and issues, please visit the [jQuery repo](https://github.com/jquery/jquery).
+
+## Including jQuery
+
+Below are some of the most common ways to include jQuery.
+
+### Browser
+
+#### Script tag
+
+```html
+<script src="https://code.jquery.com/jquery-2.2.0.min.js"></script>
+```
+
+#### Babel
+
+[Babel](http://babeljs.io/) is a next generation JavaScript compiler. One of the features is the ability to use ES6/ES2015 modules now, even though browsers do not yet support this feature natively.
+
+```js
+import $ from "jquery";
+```
+
+#### Browserify/Webpack
+
+There are several ways to use [Browserify](http://browserify.org/) and [Webpack](https://webpack.github.io/). For more information on using these tools, please refer to the corresponding project's documention. In the script, including jQuery will usually look like this...
+
+```js
+var $ = require("jquery");
+```
+
+#### AMD (Asynchronous Module Definition)
+
+AMD is a module format built for the browser. For more information, we recommend [require.js' documentation](http://requirejs.org/docs/whyamd.html).
+
+```js
+define(["jquery"], function($) {
+
+});
+```
+
+### Node
+
+To include jQuery in [Node](nodejs.org), first install with npm.
+
+```sh
+npm install jquery
+```
+
+For jQuery to work in Node, a window with a document is required. Since no such window exists natively in Node, one can be mocked by tools such as [jsdom](https://github.com/tmpvar/jsdom). This can be useful for testing purposes.
+
+```js
+require("jsdom").env("", function(err, window) {
+ if (err) {
+ console.error(err);
+ return;
+ }
+
+ var $ = require("jquery")(window);
+});
+```
diff --git a/templates/assets/jquery/bower.json b/templates/assets/jquery/bower.json
new file mode 100644
index 0000000..95798d5
--- /dev/null
+++ b/templates/assets/jquery/bower.json
@@ -0,0 +1,14 @@
+{
+ "name": "jquery",
+ "main": "dist/jquery.js",
+ "license": "MIT",
+ "ignore": [
+ "package.json"
+ ],
+ "keywords": [
+ "jquery",
+ "javascript",
+ "browser",
+ "library"
+ ]
+} \ No newline at end of file
diff --git a/templates/assets/jquery/external/sizzle/LICENSE.txt b/templates/assets/jquery/external/sizzle/LICENSE.txt
new file mode 100644
index 0000000..dd7ce94
--- /dev/null
+++ b/templates/assets/jquery/external/sizzle/LICENSE.txt
@@ -0,0 +1,36 @@
+Copyright jQuery Foundation and other contributors, https://jquery.org/
+
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/jquery/sizzle
+
+The following license applies to all parts of this software except as
+documented below:
+
+====
+
+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.
+
+====
+
+All files located in the node_modules and external directories are
+externally maintained libraries used by this software which have their
+own licenses; we recommend you read them, as their terms may differ from
+the terms above.
diff --git a/templates/assets/jquery/src/.jshintrc b/templates/assets/jquery/src/.jshintrc
new file mode 100644
index 0000000..ea3549d
--- /dev/null
+++ b/templates/assets/jquery/src/.jshintrc
@@ -0,0 +1,29 @@
+{
+ "boss": true,
+ "curly": true,
+ "eqeqeq": true,
+ "eqnull": true,
+ "expr": true,
+ "immed": true,
+ "noarg": true,
+ "quotmark": "double",
+ "undef": true,
+ "unused": true,
+
+ "sub": true,
+
+ // Support: IE < 10, Android < 4.1
+ // The above browsers are failing a lot of tests in the ES5
+ // test suite at http://test262.ecmascript.org.
+ "es3": true,
+
+ "globals": {
+ "window": true,
+ "JSON": false,
+
+ "jQuery": true,
+ "define": true,
+ "module": true,
+ "noGlobal": true
+ }
+}
diff --git a/templates/assets/jquery/src/ajax.js b/templates/assets/jquery/src/ajax.js
new file mode 100644
index 0000000..ba32248
--- /dev/null
+++ b/templates/assets/jquery/src/ajax.js
@@ -0,0 +1,845 @@
+define( [
+ "./core",
+ "./var/document",
+ "./var/rnotwhite",
+ "./ajax/var/location",
+ "./ajax/var/nonce",
+ "./ajax/var/rquery",
+
+ "./core/init",
+ "./ajax/parseJSON",
+ "./ajax/parseXML",
+ "./event/trigger",
+ "./deferred"
+], function( jQuery, document, rnotwhite, location, nonce, rquery ) {
+
+var
+ rhash = /#.*$/,
+ rts = /([?&])_=[^&]*/,
+ rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
+
+ // #7653, #8125, #8152: local protocol detection
+ rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
+ rnoContent = /^(?:GET|HEAD)$/,
+ rprotocol = /^\/\//,
+
+ /* Prefilters
+ * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
+ * 2) These are called:
+ * - BEFORE asking for a transport
+ * - AFTER param serialization (s.data is a string if s.processData is true)
+ * 3) key is the dataType
+ * 4) the catchall symbol "*" can be used
+ * 5) execution will start with transport dataType and THEN continue down to "*" if needed
+ */
+ prefilters = {},
+
+ /* Transports bindings
+ * 1) key is the dataType
+ * 2) the catchall symbol "*" can be used
+ * 3) selection will start with transport dataType and THEN go to "*" if needed
+ */
+ transports = {},
+
+ // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
+ allTypes = "*/".concat( "*" ),
+
+ // Anchor tag for parsing the document origin
+ originAnchor = document.createElement( "a" );
+ originAnchor.href = location.href;
+
+// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
+function addToPrefiltersOrTransports( structure ) {
+
+ // dataTypeExpression is optional and defaults to "*"
+ return function( dataTypeExpression, func ) {
+
+ if ( typeof dataTypeExpression !== "string" ) {
+ func = dataTypeExpression;
+ dataTypeExpression = "*";
+ }
+
+ var dataType,
+ i = 0,
+ dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];
+
+ if ( jQuery.isFunction( func ) ) {
+
+ // For each dataType in the dataTypeExpression
+ while ( ( dataType = dataTypes[ i++ ] ) ) {
+
+ // Prepend if requested
+ if ( dataType[ 0 ] === "+" ) {
+ dataType = dataType.slice( 1 ) || "*";
+ ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );
+
+ // Otherwise append
+ } else {
+ ( structure[ dataType ] = structure[ dataType ] || [] ).push( func );
+ }
+ }
+ }
+ };
+}
+
+// Base inspection function for prefilters and transports
+function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
+
+ var inspected = {},
+ seekingTransport = ( structure === transports );
+
+ function inspect( dataType ) {
+ var selected;
+ inspected[ dataType ] = true;
+ jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
+ var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
+ if ( typeof dataTypeOrTransport === "string" &&
+ !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
+
+ options.dataTypes.unshift( dataTypeOrTransport );
+ inspect( dataTypeOrTransport );
+ return false;
+ } else if ( seekingTransport ) {
+ return !( selected = dataTypeOrTransport );
+ }
+ } );
+ return selected;
+ }
+
+ return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
+}
+
+// A special extend for ajax options
+// that takes "flat" options (not to be deep extended)
+// Fixes #9887
+function ajaxExtend( target, src ) {
+ var key, deep,
+ flatOptions = jQuery.ajaxSettings.flatOptions || {};
+
+ for ( key in src ) {
+ if ( src[ key ] !== undefined ) {
+ ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
+ }
+ }
+ if ( deep ) {
+ jQuery.extend( true, target, deep );
+ }
+
+ return target;
+}
+
+/* Handles responses to an ajax request:
+ * - finds the right dataType (mediates between content-type and expected dataType)
+ * - returns the corresponding response
+ */
+function ajaxHandleResponses( s, jqXHR, responses ) {
+
+ var ct, type, finalDataType, firstDataType,
+ contents = s.contents,
+ dataTypes = s.dataTypes;
+
+ // Remove auto dataType and get content-type in the process
+ while ( dataTypes[ 0 ] === "*" ) {
+ dataTypes.shift();
+ if ( ct === undefined ) {
+ ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" );
+ }
+ }
+
+ // Check if we're dealing with a known content-type
+ if ( ct ) {
+ for ( type in contents ) {
+ if ( contents[ type ] && contents[ type ].test( ct ) ) {
+ dataTypes.unshift( type );
+ break;
+ }
+ }
+ }
+
+ // Check to see if we have a response for the expected dataType
+ if ( dataTypes[ 0 ] in responses ) {
+ finalDataType = dataTypes[ 0 ];
+ } else {
+
+ // Try convertible dataTypes
+ for ( type in responses ) {
+ if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) {
+ finalDataType = type;
+ break;
+ }
+ if ( !firstDataType ) {
+ firstDataType = type;
+ }
+ }
+
+ // Or just use first one
+ finalDataType = finalDataType || firstDataType;
+ }
+
+ // If we found a dataType
+ // We add the dataType to the list if needed
+ // and return the corresponding response
+ if ( finalDataType ) {
+ if ( finalDataType !== dataTypes[ 0 ] ) {
+ dataTypes.unshift( finalDataType );
+ }
+ return responses[ finalDataType ];
+ }
+}
+
+/* Chain conversions given the request and the original response
+ * Also sets the responseXXX fields on the jqXHR instance
+ */
+function ajaxConvert( s, response, jqXHR, isSuccess ) {
+ var conv2, current, conv, tmp, prev,
+ converters = {},
+
+ // Work with a copy of dataTypes in case we need to modify it for conversion
+ dataTypes = s.dataTypes.slice();
+
+ // Create converters map with lowercased keys
+ if ( dataTypes[ 1 ] ) {
+ for ( conv in s.converters ) {
+ converters[ conv.toLowerCase() ] = s.converters[ conv ];
+ }
+ }
+
+ current = dataTypes.shift();
+
+ // Convert to each sequential dataType
+ while ( current ) {
+
+ if ( s.responseFields[ current ] ) {
+ jqXHR[ s.responseFields[ current ] ] = response;
+ }
+
+ // Apply the dataFilter if provided
+ if ( !prev && isSuccess && s.dataFilter ) {
+ response = s.dataFilter( response, s.dataType );
+ }
+
+ prev = current;
+ current = dataTypes.shift();
+
+ if ( current ) {
+
+ // There's only work to do if current dataType is non-auto
+ if ( current === "*" ) {
+
+ current = prev;
+
+ // Convert response if prev dataType is non-auto and differs from current
+ } else if ( prev !== "*" && prev !== current ) {
+
+ // Seek a direct converter
+ conv = converters[ prev + " " + current ] || converters[ "* " + current ];
+
+ // If none found, seek a pair
+ if ( !conv ) {
+ for ( conv2 in converters ) {
+
+ // If conv2 outputs current
+ tmp = conv2.split( " " );
+ if ( tmp[ 1 ] === current ) {
+
+ // If prev can be converted to accepted input
+ conv = converters[ prev + " " + tmp[ 0 ] ] ||
+ converters[ "* " + tmp[ 0 ] ];
+ if ( conv ) {
+
+ // Condense equivalence converters
+ if ( conv === true ) {
+ conv = converters[ conv2 ];
+
+ // Otherwise, insert the intermediate dataType
+ } else if ( converters[ conv2 ] !== true ) {
+ current = tmp[ 0 ];
+ dataTypes.unshift( tmp[ 1 ] );
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ // Apply converter (if not an equivalence)
+ if ( conv !== true ) {
+
+ // Unless errors are allowed to bubble, catch and return them
+ if ( conv && s.throws ) {
+ response = conv( response );
+ } else {
+ try {
+ response = conv( response );
+ } catch ( e ) {
+ return {
+ state: "parsererror",
+ error: conv ? e : "No conversion from " + prev + " to " + current
+ };
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return { state: "success", data: response };
+}
+
+jQuery.extend( {
+
+ // Counter for holding the number of active queries
+ active: 0,
+
+ // Last-Modified header cache for next request
+ lastModified: {},
+ etag: {},
+
+ ajaxSettings: {
+ url: location.href,
+ type: "GET",
+ isLocal: rlocalProtocol.test( location.protocol ),
+ global: true,
+ processData: true,
+ async: true,
+ contentType: "application/x-www-form-urlencoded; charset=UTF-8",
+ /*
+ timeout: 0,
+ data: null,
+ dataType: null,
+ username: null,
+ password: null,
+ cache: null,
+ throws: false,
+ traditional: false,
+ headers: {},
+ */
+
+ accepts: {
+ "*": allTypes,
+ text: "text/plain",
+ html: "text/html",
+ xml: "application/xml, text/xml",
+ json: "application/json, text/javascript"
+ },
+
+ contents: {
+ xml: /\bxml\b/,
+ html: /\bhtml/,
+ json: /\bjson\b/
+ },
+
+ responseFields: {
+ xml: "responseXML",
+ text: "responseText",
+ json: "responseJSON"
+ },
+
+ // Data converters
+ // Keys separate source (or catchall "*") and destination types with a single space
+ converters: {
+
+ // Convert anything to text
+ "* text": String,
+
+ // Text to html (true = no transformation)
+ "text html": true,
+
+ // Evaluate text as a json expression
+ "text json": jQuery.parseJSON,
+
+ // Parse text as xml
+ "text xml": jQuery.parseXML
+ },
+
+ // For options that shouldn't be deep extended:
+ // you can add your own custom options here if
+ // and when you create one that shouldn't be
+ // deep extended (see ajaxExtend)
+ flatOptions: {
+ url: true,
+ context: true
+ }
+ },
+
+ // Creates a full fledged settings object into target
+ // with both ajaxSettings and settings fields.
+ // If target is omitted, writes into ajaxSettings.
+ ajaxSetup: function( target, settings ) {
+ return settings ?
+
+ // Building a settings object
+ ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
+
+ // Extending ajaxSettings
+ ajaxExtend( jQuery.ajaxSettings, target );
+ },
+
+ ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
+ ajaxTransport: addToPrefiltersOrTransports( transports ),
+
+ // Main method
+ ajax: function( url, options ) {
+
+ // If url is an object, simulate pre-1.5 signature
+ if ( typeof url === "object" ) {
+ options = url;
+ url = undefined;
+ }
+
+ // Force options to be an object
+ options = options || {};
+
+ var transport,
+
+ // URL without anti-cache param
+ cacheURL,
+
+ // Response headers
+ responseHeadersString,
+ responseHeaders,
+
+ // timeout handle
+ timeoutTimer,
+
+ // Url cleanup var
+ urlAnchor,
+
+ // To know if global events are to be dispatched
+ fireGlobals,
+
+ // Loop variable
+ i,
+
+ // Create the final options object
+ s = jQuery.ajaxSetup( {}, options ),
+
+ // Callbacks context
+ callbackContext = s.context || s,
+
+ // Context for global events is callbackContext if it is a DOM node or jQuery collection
+ globalEventContext = s.context &&
+ ( callbackContext.nodeType || callbackContext.jquery ) ?
+ jQuery( callbackContext ) :
+ jQuery.event,
+
+ // Deferreds
+ deferred = jQuery.Deferred(),
+ completeDeferred = jQuery.Callbacks( "once memory" ),
+
+ // Status-dependent callbacks
+ statusCode = s.statusCode || {},
+
+ // Headers (they are sent all at once)
+ requestHeaders = {},
+ requestHeadersNames = {},
+
+ // The jqXHR state
+ state = 0,
+
+ // Default abort message
+ strAbort = "canceled",
+
+ // Fake xhr
+ jqXHR = {
+ readyState: 0,
+
+ // Builds headers hashtable if needed
+ getResponseHeader: function( key ) {
+ var match;
+ if ( state === 2 ) {
+ if ( !responseHeaders ) {
+ responseHeaders = {};
+ while ( ( match = rheaders.exec( responseHeadersString ) ) ) {
+ responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ];
+ }
+ }
+ match = responseHeaders[ key.toLowerCase() ];
+ }
+ return match == null ? null : match;
+ },
+
+ // Raw string
+ getAllResponseHeaders: function() {
+ return state === 2 ? responseHeadersString : null;
+ },
+
+ // Caches the header
+ setRequestHeader: function( name, value ) {
+ var lname = name.toLowerCase();
+ if ( !state ) {
+ name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
+ requestHeaders[ name ] = value;
+ }
+ return this;
+ },
+
+ // Overrides response content-type header
+ overrideMimeType: function( type ) {
+ if ( !state ) {
+ s.mimeType = type;
+ }
+ return this;
+ },
+
+ // Status-dependent callbacks
+ statusCode: function( map ) {
+ var code;
+ if ( map ) {
+ if ( state < 2 ) {
+ for ( code in map ) {
+
+ // Lazy-add the new callback in a way that preserves old ones
+ statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
+ }
+ } else {
+
+ // Execute the appropriate callbacks
+ jqXHR.always( map[ jqXHR.status ] );
+ }
+ }
+ return this;
+ },
+
+ // Cancel the request
+ abort: function( statusText ) {
+ var finalText = statusText || strAbort;
+ if ( transport ) {
+ transport.abort( finalText );
+ }
+ done( 0, finalText );
+ return this;
+ }
+ };
+
+ // Attach deferreds
+ deferred.promise( jqXHR ).complete = completeDeferred.add;
+ jqXHR.success = jqXHR.done;
+ jqXHR.error = jqXHR.fail;
+
+ // Remove hash character (#7531: and string promotion)
+ // Add protocol if not provided (prefilters might expect it)
+ // Handle falsy url in the settings object (#10093: consistency with old signature)
+ // We also use the url parameter if available
+ s.url = ( ( url || s.url || location.href ) + "" ).replace( rhash, "" )
+ .replace( rprotocol, location.protocol + "//" );
+
+ // Alias method option to type as per ticket #12004
+ s.type = options.method || options.type || s.method || s.type;
+
+ // Extract dataTypes list
+ s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ];
+
+ // A cross-domain request is in order when the origin doesn't match the current origin.
+ if ( s.crossDomain == null ) {
+ urlAnchor = document.createElement( "a" );
+
+ // Support: IE8-11+
+ // IE throws exception if url is malformed, e.g. http://example.com:80x/
+ try {
+ urlAnchor.href = s.url;
+
+ // Support: IE8-11+
+ // Anchor's host property isn't correctly set when s.url is relative
+ urlAnchor.href = urlAnchor.href;
+ s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !==
+ urlAnchor.protocol + "//" + urlAnchor.host;
+ } catch ( e ) {
+
+ // If there is an error parsing the URL, assume it is crossDomain,
+ // it can be rejected by the transport if it is invalid
+ s.crossDomain = true;
+ }
+ }
+
+ // Convert data if not already a string
+ if ( s.data && s.processData && typeof s.data !== "string" ) {
+ s.data = jQuery.param( s.data, s.traditional );
+ }
+
+ // Apply prefilters
+ inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
+
+ // If request was aborted inside a prefilter, stop there
+ if ( state === 2 ) {
+ return jqXHR;
+ }
+
+ // We can fire global events as of now if asked to
+ // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
+ fireGlobals = jQuery.event && s.global;
+
+ // Watch for a new set of requests
+ if ( fireGlobals && jQuery.active++ === 0 ) {
+ jQuery.event.trigger( "ajaxStart" );
+ }
+
+ // Uppercase the type
+ s.type = s.type.toUpperCase();
+
+ // Determine if request has content
+ s.hasContent = !rnoContent.test( s.type );
+
+ // Save the URL in case we're toying with the If-Modified-Since
+ // and/or If-None-Match header later on
+ cacheURL = s.url;
+
+ // More options handling for requests with no content
+ if ( !s.hasContent ) {
+
+ // If data is available, append data to url
+ if ( s.data ) {
+ cacheURL = ( s.url += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
+
+ // #9682: remove data so that it's not used in an eventual retry
+ delete s.data;
+ }
+
+ // Add anti-cache in url if needed
+ if ( s.cache === false ) {
+ s.url = rts.test( cacheURL ) ?
+
+ // If there is already a '_' parameter, set its value
+ cacheURL.replace( rts, "$1_=" + nonce++ ) :
+
+ // Otherwise add one to the end
+ cacheURL + ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + nonce++;
+ }
+ }
+
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+ if ( s.ifModified ) {
+ if ( jQuery.lastModified[ cacheURL ] ) {
+ jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
+ }
+ if ( jQuery.etag[ cacheURL ] ) {
+ jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
+ }
+ }
+
+ // Set the correct header, if data is being sent
+ if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
+ jqXHR.setRequestHeader( "Content-Type", s.contentType );
+ }
+
+ // Set the Accepts header for the server, depending on the dataType
+ jqXHR.setRequestHeader(
+ "Accept",
+ s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?
+ s.accepts[ s.dataTypes[ 0 ] ] +
+ ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
+ s.accepts[ "*" ]
+ );
+
+ // Check for headers option
+ for ( i in s.headers ) {
+ jqXHR.setRequestHeader( i, s.headers[ i ] );
+ }
+
+ // Allow custom headers/mimetypes and early abort
+ if ( s.beforeSend &&
+ ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
+
+ // Abort if not done already and return
+ return jqXHR.abort();
+ }
+
+ // Aborting is no longer a cancellation
+ strAbort = "abort";
+
+ // Install callbacks on deferreds
+ for ( i in { success: 1, error: 1, complete: 1 } ) {
+ jqXHR[ i ]( s[ i ] );
+ }
+
+ // Get transport
+ transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
+
+ // If no transport, we auto-abort
+ if ( !transport ) {
+ done( -1, "No Transport" );
+ } else {
+ jqXHR.readyState = 1;
+
+ // Send global event
+ if ( fireGlobals ) {
+ globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
+ }
+
+ // If request was aborted inside ajaxSend, stop there
+ if ( state === 2 ) {
+ return jqXHR;
+ }
+
+ // Timeout
+ if ( s.async && s.timeout > 0 ) {
+ timeoutTimer = window.setTimeout( function() {
+ jqXHR.abort( "timeout" );
+ }, s.timeout );
+ }
+
+ try {
+ state = 1;
+ transport.send( requestHeaders, done );
+ } catch ( e ) {
+
+ // Propagate exception as error if not done
+ if ( state < 2 ) {
+ done( -1, e );
+
+ // Simply rethrow otherwise
+ } else {
+ throw e;
+ }
+ }
+ }
+
+ // Callback for when everything is done
+ function done( status, nativeStatusText, responses, headers ) {
+ var isSuccess, success, error, response, modified,
+ statusText = nativeStatusText;
+
+ // Called once
+ if ( state === 2 ) {
+ return;
+ }
+
+ // State is "done" now
+ state = 2;
+
+ // Clear timeout if it exists
+ if ( timeoutTimer ) {
+ window.clearTimeout( timeoutTimer );
+ }
+
+ // Dereference transport for early garbage collection
+ // (no matter how long the jqXHR object will be used)
+ transport = undefined;
+
+ // Cache response headers
+ responseHeadersString = headers || "";
+
+ // Set readyState
+ jqXHR.readyState = status > 0 ? 4 : 0;
+
+ // Determine if successful
+ isSuccess = status >= 200 && status < 300 || status === 304;
+
+ // Get response data
+ if ( responses ) {
+ response = ajaxHandleResponses( s, jqXHR, responses );
+ }
+
+ // Convert no matter what (that way responseXXX fields are always set)
+ response = ajaxConvert( s, response, jqXHR, isSuccess );
+
+ // If successful, handle type chaining
+ if ( isSuccess ) {
+
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+ if ( s.ifModified ) {
+ modified = jqXHR.getResponseHeader( "Last-Modified" );
+ if ( modified ) {
+ jQuery.lastModified[ cacheURL ] = modified;
+ }
+ modified = jqXHR.getResponseHeader( "etag" );
+ if ( modified ) {
+ jQuery.etag[ cacheURL ] = modified;
+ }
+ }
+
+ // if no content
+ if ( status === 204 || s.type === "HEAD" ) {
+ statusText = "nocontent";
+
+ // if not modified
+ } else if ( status === 304 ) {
+ statusText = "notmodified";
+
+ // If we have data, let's convert it
+ } else {
+ statusText = response.state;
+ success = response.data;
+ error = response.error;
+ isSuccess = !error;
+ }
+ } else {
+
+ // Extract error from statusText and normalize for non-aborts
+ error = statusText;
+ if ( status || !statusText ) {
+ statusText = "error";
+ if ( status < 0 ) {
+ status = 0;
+ }
+ }
+ }
+
+ // Set data for the fake xhr object
+ jqXHR.status = status;
+ jqXHR.statusText = ( nativeStatusText || statusText ) + "";
+
+ // Success/Error
+ if ( isSuccess ) {
+ deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
+ } else {
+ deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
+ }
+
+ // Status-dependent callbacks
+ jqXHR.statusCode( statusCode );
+ statusCode = undefined;
+
+ if ( fireGlobals ) {
+ globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
+ [ jqXHR, s, isSuccess ? success : error ] );
+ }
+
+ // Complete
+ completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
+
+ if ( fireGlobals ) {
+ globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
+
+ // Handle the global AJAX counter
+ if ( !( --jQuery.active ) ) {
+ jQuery.event.trigger( "ajaxStop" );
+ }
+ }
+ }
+
+ return jqXHR;
+ },
+
+ getJSON: function( url, data, callback ) {
+ return jQuery.get( url, data, callback, "json" );
+ },
+
+ getScript: function( url, callback ) {
+ return jQuery.get( url, undefined, callback, "script" );
+ }
+} );
+
+jQuery.each( [ "get", "post" ], function( i, method ) {
+ jQuery[ method ] = function( url, data, callback, type ) {
+
+ // Shift arguments if data argument was omitted
+ if ( jQuery.isFunction( data ) ) {
+ type = type || callback;
+ callback = data;
+ data = undefined;
+ }
+
+ // The url can be an options object (which then must have .url)
+ return jQuery.ajax( jQuery.extend( {
+ url: url,
+ type: method,
+ dataType: type,
+ data: data,
+ success: callback
+ }, jQuery.isPlainObject( url ) && url ) );
+ };
+} );
+
+return jQuery;
+} );
diff --git a/templates/assets/jquery/src/ajax/jsonp.js b/templates/assets/jquery/src/ajax/jsonp.js
new file mode 100644
index 0000000..666e5d1
--- /dev/null
+++ b/templates/assets/jquery/src/ajax/jsonp.js
@@ -0,0 +1,100 @@
+define( [
+ "../core",
+ "./var/nonce",
+ "./var/rquery",
+ "../ajax"
+], function( jQuery, nonce, rquery ) {
+
+var oldCallbacks = [],
+ rjsonp = /(=)\?(?=&|$)|\?\?/;
+
+// Default jsonp settings
+jQuery.ajaxSetup( {
+ jsonp: "callback",
+ jsonpCallback: function() {
+ var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
+ this[ callback ] = true;
+ return callback;
+ }
+} );
+
+// Detect, normalize options and install callbacks for jsonp requests
+jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
+
+ var callbackName, overwritten, responseContainer,
+ jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
+ "url" :
+ typeof s.data === "string" &&
+ ( s.contentType || "" )
+ .indexOf( "application/x-www-form-urlencoded" ) === 0 &&
+ rjsonp.test( s.data ) && "data"
+ );
+
+ // Handle iff the expected data type is "jsonp" or we have a parameter to set
+ if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
+
+ // Get callback name, remembering preexisting value associated with it
+ callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
+ s.jsonpCallback() :
+ s.jsonpCallback;
+
+ // Insert callback into url or form data
+ if ( jsonProp ) {
+ s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
+ } else if ( s.jsonp !== false ) {
+ s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
+ }
+
+ // Use data converter to retrieve json after script execution
+ s.converters[ "script json" ] = function() {
+ if ( !responseContainer ) {
+ jQuery.error( callbackName + " was not called" );
+ }
+ return responseContainer[ 0 ];
+ };
+
+ // Force json dataType
+ s.dataTypes[ 0 ] = "json";
+
+ // Install callback
+ overwritten = window[ callbackName ];
+ window[ callbackName ] = function() {
+ responseContainer = arguments;
+ };
+
+ // Clean-up function (fires after converters)
+ jqXHR.always( function() {
+
+ // If previous value didn't exist - remove it
+ if ( overwritten === undefined ) {
+ jQuery( window ).removeProp( callbackName );
+
+ // Otherwise restore preexisting value
+ } else {
+ window[ callbackName ] = overwritten;
+ }
+
+ // Save back as free
+ if ( s[ callbackName ] ) {
+
+ // Make sure that re-using the options doesn't screw things around
+ s.jsonpCallback = originalSettings.jsonpCallback;
+
+ // Save the callback name for future use
+ oldCallbacks.push( callbackName );
+ }
+
+ // Call if it was a function and we have a response
+ if ( responseContainer && jQuery.isFunction( overwritten ) ) {
+ overwritten( responseContainer[ 0 ] );
+ }
+
+ responseContainer = overwritten = undefined;
+ } );
+
+ // Delegate to script
+ return "script";
+ }
+} );
+
+} );
diff --git a/templates/assets/jquery/src/ajax/load.js b/templates/assets/jquery/src/ajax/load.js
new file mode 100644
index 0000000..5ec3fa2
--- /dev/null
+++ b/templates/assets/jquery/src/ajax/load.js
@@ -0,0 +1,83 @@
+define( [
+ "../core",
+ "../core/parseHTML",
+ "../ajax",
+ "../traversing",
+ "../manipulation",
+ "../selector",
+
+ // Optional event/alias dependency
+ "../event/alias"
+], function( jQuery ) {
+
+// Keep a copy of the old load method
+var _load = jQuery.fn.load;
+
+/**
+ * Load a url into a page
+ */
+jQuery.fn.load = function( url, params, callback ) {
+ if ( typeof url !== "string" && _load ) {
+ return _load.apply( this, arguments );
+ }
+
+ var selector, type, response,
+ self = this,
+ off = url.indexOf( " " );
+
+ if ( off > -1 ) {
+ selector = jQuery.trim( url.slice( off ) );
+ url = url.slice( 0, off );
+ }
+
+ // If it's a function
+ if ( jQuery.isFunction( params ) ) {
+
+ // We assume that it's the callback
+ callback = params;
+ params = undefined;
+
+ // Otherwise, build a param string
+ } else if ( params && typeof params === "object" ) {
+ type = "POST";
+ }
+
+ // If we have elements to modify, make the request
+ if ( self.length > 0 ) {
+ jQuery.ajax( {
+ url: url,
+
+ // If "type" variable is undefined, then "GET" method will be used.
+ // Make value of this field explicit since
+ // user can override it through ajaxSetup method
+ type: type || "GET",
+ dataType: "html",
+ data: params
+ } ).done( function( responseText ) {
+
+ // Save response for use in complete callback
+ response = arguments;
+
+ self.html( selector ?
+
+ // If a selector was specified, locate the right elements in a dummy div
+ // Exclude scripts to avoid IE 'Permission Denied' errors
+ jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :
+
+ // Otherwise use the full result
+ responseText );
+
+ // If the request succeeds, this function gets "data", "status", "jqXHR"
+ // but they are ignored because response was set above.
+ // If it fails, this function gets "jqXHR", "status", "error"
+ } ).always( callback && function( jqXHR, status ) {
+ self.each( function() {
+ callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );
+ } );
+ } );
+ }
+
+ return this;
+};
+
+} );
diff --git a/templates/assets/jquery/src/ajax/parseJSON.js b/templates/assets/jquery/src/ajax/parseJSON.js
new file mode 100644
index 0000000..11918b0
--- /dev/null
+++ b/templates/assets/jquery/src/ajax/parseJSON.js
@@ -0,0 +1,13 @@
+define( [
+ "../core"
+], function( jQuery ) {
+
+// Support: Android 2.3
+// Workaround failure to string-cast null input
+jQuery.parseJSON = function( data ) {
+ return JSON.parse( data + "" );
+};
+
+return jQuery.parseJSON;
+
+} );
diff --git a/templates/assets/jquery/src/ajax/parseXML.js b/templates/assets/jquery/src/ajax/parseXML.js
new file mode 100644
index 0000000..6599aaf
--- /dev/null
+++ b/templates/assets/jquery/src/ajax/parseXML.js
@@ -0,0 +1,27 @@
+define( [
+ "../core"
+], function( jQuery ) {
+
+// Cross-browser xml parsing
+jQuery.parseXML = function( data ) {
+ var xml;
+ if ( !data || typeof data !== "string" ) {
+ return null;
+ }
+
+ // Support: IE9
+ try {
+ xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
+ } catch ( e ) {
+ xml = undefined;
+ }
+
+ if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
+ jQuery.error( "Invalid XML: " + data );
+ }
+ return xml;
+};
+
+return jQuery.parseXML;
+
+} );
diff --git a/templates/assets/jquery/src/ajax/script.js b/templates/assets/jquery/src/ajax/script.js
new file mode 100644
index 0000000..945bea9
--- /dev/null
+++ b/templates/assets/jquery/src/ajax/script.js
@@ -0,0 +1,68 @@
+define( [
+ "../core",
+ "../var/document",
+ "../ajax"
+], function( jQuery, document ) {
+
+// Install script dataType
+jQuery.ajaxSetup( {
+ accepts: {
+ script: "text/javascript, application/javascript, " +
+ "application/ecmascript, application/x-ecmascript"
+ },
+ contents: {
+ script: /\b(?:java|ecma)script\b/
+ },
+ converters: {
+ "text script": function( text ) {
+ jQuery.globalEval( text );
+ return text;
+ }
+ }
+} );
+
+// Handle cache's special case and crossDomain
+jQuery.ajaxPrefilter( "script", function( s ) {
+ if ( s.cache === undefined ) {
+ s.cache = false;
+ }
+ if ( s.crossDomain ) {
+ s.type = "GET";
+ }
+} );
+
+// Bind script tag hack transport
+jQuery.ajaxTransport( "script", function( s ) {
+
+ // This transport only deals with cross domain requests
+ if ( s.crossDomain ) {
+ var script, callback;
+ return {
+ send: function( _, complete ) {
+ script = jQuery( "<script>" ).prop( {
+ charset: s.scriptCharset,
+ src: s.url
+ } ).on(
+ "load error",
+ callback = function( evt ) {
+ script.remove();
+ callback = null;
+ if ( evt ) {
+ complete( evt.type === "error" ? 404 : 200, evt.type );
+ }
+ }
+ );
+
+ // Use native DOM manipulation to avoid our domManip AJAX trickery
+ document.head.appendChild( script[ 0 ] );
+ },
+ abort: function() {
+ if ( callback ) {
+ callback();
+ }
+ }
+ };
+ }
+} );
+
+} );
diff --git a/templates/assets/jquery/src/ajax/xhr.js b/templates/assets/jquery/src/ajax/xhr.js
new file mode 100644
index 0000000..db670ff
--- /dev/null
+++ b/templates/assets/jquery/src/ajax/xhr.js
@@ -0,0 +1,167 @@
+define( [
+ "../core",
+ "../var/support",
+ "../ajax"
+], function( jQuery, support ) {
+
+jQuery.ajaxSettings.xhr = function() {
+ try {
+ return new window.XMLHttpRequest();
+ } catch ( e ) {}
+};
+
+var xhrSuccessStatus = {
+
+ // File protocol always yields status code 0, assume 200
+ 0: 200,
+
+ // Support: IE9
+ // #1450: sometimes IE returns 1223 when it should be 204
+ 1223: 204
+ },
+ xhrSupported = jQuery.ajaxSettings.xhr();
+
+support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
+support.ajax = xhrSupported = !!xhrSupported;
+
+jQuery.ajaxTransport( function( options ) {
+ var callback, errorCallback;
+
+ // Cross domain only allowed if supported through XMLHttpRequest
+ if ( support.cors || xhrSupported && !options.crossDomain ) {
+ return {
+ send: function( headers, complete ) {
+ var i,
+ xhr = options.xhr();
+
+ xhr.open(
+ options.type,
+ options.url,
+ options.async,
+ options.username,
+ options.password
+ );
+
+ // Apply custom fields if provided
+ if ( options.xhrFields ) {
+ for ( i in options.xhrFields ) {
+ xhr[ i ] = options.xhrFields[ i ];
+ }
+ }
+
+ // Override mime type if needed
+ if ( options.mimeType && xhr.overrideMimeType ) {
+ xhr.overrideMimeType( options.mimeType );
+ }
+
+ // X-Requested-With header
+ // For cross-domain requests, seeing as conditions for a preflight are
+ // akin to a jigsaw puzzle, we simply never set it to be sure.
+ // (it can always be set on a per-request basis or even using ajaxSetup)
+ // For same-domain requests, won't change header if already provided.
+ if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) {
+ headers[ "X-Requested-With" ] = "XMLHttpRequest";
+ }
+
+ // Set headers
+ for ( i in headers ) {
+ xhr.setRequestHeader( i, headers[ i ] );
+ }
+
+ // Callback
+ callback = function( type ) {
+ return function() {
+ if ( callback ) {
+ callback = errorCallback = xhr.onload =
+ xhr.onerror = xhr.onabort = xhr.onreadystatechange = null;
+
+ if ( type === "abort" ) {
+ xhr.abort();
+ } else if ( type === "error" ) {
+
+ // Support: IE9
+ // On a manual native abort, IE9 throws
+ // errors on any property access that is not readyState
+ if ( typeof xhr.status !== "number" ) {
+ complete( 0, "error" );
+ } else {
+ complete(
+
+ // File: protocol always yields status 0; see #8605, #14207
+ xhr.status,
+ xhr.statusText
+ );
+ }
+ } else {
+ complete(
+ xhrSuccessStatus[ xhr.status ] || xhr.status,
+ xhr.statusText,
+
+ // Support: IE9 only
+ // IE9 has no XHR2 but throws on binary (trac-11426)
+ // For XHR2 non-text, let the caller handle it (gh-2498)
+ ( xhr.responseType || "text" ) !== "text" ||
+ typeof xhr.responseText !== "string" ?
+ { binary: xhr.response } :
+ { text: xhr.responseText },
+ xhr.getAllResponseHeaders()
+ );
+ }
+ }
+ };
+ };
+
+ // Listen to events
+ xhr.onload = callback();
+ errorCallback = xhr.onerror = callback( "error" );
+
+ // Support: IE9
+ // Use onreadystatechange to replace onabort
+ // to handle uncaught aborts
+ if ( xhr.onabort !== undefined ) {
+ xhr.onabort = errorCallback;
+ } else {
+ xhr.onreadystatechange = function() {
+
+ // Check readyState before timeout as it changes
+ if ( xhr.readyState === 4 ) {
+
+ // Allow onerror to be called first,
+ // but that will not handle a native abort
+ // Also, save errorCallback to a variable
+ // as xhr.onerror cannot be accessed
+ window.setTimeout( function() {
+ if ( callback ) {
+ errorCallback();
+ }
+ } );
+ }
+ };
+ }
+
+ // Create the abort callback
+ callback = callback( "abort" );
+
+ try {
+
+ // Do send the request (this may raise an exception)
+ xhr.send( options.hasContent && options.data || null );
+ } catch ( e ) {
+
+ // #14683: Only rethrow if this hasn't been notified as an error yet
+ if ( callback ) {
+ throw e;
+ }
+ }
+ },
+
+ abort: function() {
+ if ( callback ) {
+ callback();
+ }
+ }
+ };
+ }
+} );
+
+} );
diff --git a/templates/assets/jquery/src/attributes.js b/templates/assets/jquery/src/attributes.js
new file mode 100644
index 0000000..691e0c0
--- /dev/null
+++ b/templates/assets/jquery/src/attributes.js
@@ -0,0 +1,11 @@
+define( [
+ "./core",
+ "./attributes/attr",
+ "./attributes/prop",
+ "./attributes/classes",
+ "./attributes/val"
+], function( jQuery ) {
+
+// Return jQuery for attributes-only inclusion
+return jQuery;
+} );
diff --git a/templates/assets/jquery/src/attributes/attr.js b/templates/assets/jquery/src/attributes/attr.js
new file mode 100644
index 0000000..f888083
--- /dev/null
+++ b/templates/assets/jquery/src/attributes/attr.js
@@ -0,0 +1,142 @@
+define( [
+ "../core",
+ "../core/access",
+ "./support",
+ "../var/rnotwhite",
+ "../selector"
+], function( jQuery, access, support, rnotwhite ) {
+
+var boolHook,
+ attrHandle = jQuery.expr.attrHandle;
+
+jQuery.fn.extend( {
+ attr: function( name, value ) {
+ return access( this, jQuery.attr, name, value, arguments.length > 1 );
+ },
+
+ removeAttr: function( name ) {
+ return this.each( function() {
+ jQuery.removeAttr( this, name );
+ } );
+ }
+} );
+
+jQuery.extend( {
+ attr: function( elem, name, value ) {
+ var ret, hooks,
+ nType = elem.nodeType;
+
+ // Don't get/set attributes on text, comment and attribute nodes
+ if ( nType === 3 || nType === 8 || nType === 2 ) {
+ return;
+ }
+
+ // Fallback to prop when attributes are not supported
+ if ( typeof elem.getAttribute === "undefined" ) {
+ return jQuery.prop( elem, name, value );
+ }
+
+ // All attributes are lowercase
+ // Grab necessary hook if one is defined
+ if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
+ name = name.toLowerCase();
+ hooks = jQuery.attrHooks[ name ] ||
+ ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );
+ }
+
+ if ( value !== undefined ) {
+ if ( value === null ) {
+ jQuery.removeAttr( elem, name );
+ return;
+ }
+
+ if ( hooks && "set" in hooks &&
+ ( ret = hooks.set( elem, value, name ) ) !== undefined ) {
+ return ret;
+ }
+
+ elem.setAttribute( name, value + "" );
+ return value;
+ }
+
+ if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
+ return ret;
+ }
+
+ ret = jQuery.find.attr( elem, name );
+
+ // Non-existent attributes return null, we normalize to undefined
+ return ret == null ? undefined : ret;
+ },
+
+ attrHooks: {
+ type: {
+ set: function( elem, value ) {
+ if ( !support.radioValue && value === "radio" &&
+ jQuery.nodeName( elem, "input" ) ) {
+ var val = elem.value;
+ elem.setAttribute( "type", value );
+ if ( val ) {
+ elem.value = val;
+ }
+ return value;
+ }
+ }
+ }
+ },
+
+ removeAttr: function( elem, value ) {
+ var name, propName,
+ i = 0,
+ attrNames = value && value.match( rnotwhite );
+
+ if ( attrNames && elem.nodeType === 1 ) {
+ while ( ( name = attrNames[ i++ ] ) ) {
+ propName = jQuery.propFix[ name ] || name;
+
+ // Boolean attributes get special treatment (#10870)
+ if ( jQuery.expr.match.bool.test( name ) ) {
+
+ // Set corresponding property to false
+ elem[ propName ] = false;
+ }
+
+ elem.removeAttribute( name );
+ }
+ }
+ }
+} );
+
+// Hooks for boolean attributes
+boolHook = {
+ set: function( elem, value, name ) {
+ if ( value === false ) {
+
+ // Remove boolean attributes when set to false
+ jQuery.removeAttr( elem, name );
+ } else {
+ elem.setAttribute( name, name );
+ }
+ return name;
+ }
+};
+jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
+ var getter = attrHandle[ name ] || jQuery.find.attr;
+
+ attrHandle[ name ] = function( elem, name, isXML ) {
+ var ret, handle;
+ if ( !isXML ) {
+
+ // Avoid an infinite loop by temporarily removing this function from the getter
+ handle = attrHandle[ name ];
+ attrHandle[ name ] = ret;
+ ret = getter( elem, name, isXML ) != null ?
+ name.toLowerCase() :
+ null;
+ attrHandle[ name ] = handle;
+ }
+ return ret;
+ };
+} );
+
+} );
diff --git a/templates/assets/jquery/src/attributes/classes.js b/templates/assets/jquery/src/attributes/classes.js
new file mode 100644
index 0000000..7933873
--- /dev/null
+++ b/templates/assets/jquery/src/attributes/classes.js
@@ -0,0 +1,177 @@
+define( [
+ "../core",
+ "../var/rnotwhite",
+ "../data/var/dataPriv",
+ "../core/init"
+], function( jQuery, rnotwhite, dataPriv ) {
+
+var rclass = /[\t\r\n\f]/g;
+
+function getClass( elem ) {
+ return elem.getAttribute && elem.getAttribute( "class" ) || "";
+}
+
+jQuery.fn.extend( {
+ addClass: function( value ) {
+ var classes, elem, cur, curValue, clazz, j, finalValue,
+ i = 0;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each( function( j ) {
+ jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
+ } );
+ }
+
+ if ( typeof value === "string" && value ) {
+ classes = value.match( rnotwhite ) || [];
+
+ while ( ( elem = this[ i++ ] ) ) {
+ curValue = getClass( elem );
+ cur = elem.nodeType === 1 &&
+ ( " " + curValue + " " ).replace( rclass, " " );
+
+ if ( cur ) {
+ j = 0;
+ while ( ( clazz = classes[ j++ ] ) ) {
+ if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
+ cur += clazz + " ";
+ }
+ }
+
+ // Only assign if different to avoid unneeded rendering.
+ finalValue = jQuery.trim( cur );
+ if ( curValue !== finalValue ) {
+ elem.setAttribute( "class", finalValue );
+ }
+ }
+ }
+ }
+
+ return this;
+ },
+
+ removeClass: function( value ) {
+ var classes, elem, cur, curValue, clazz, j, finalValue,
+ i = 0;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each( function( j ) {
+ jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
+ } );
+ }
+
+ if ( !arguments.length ) {
+ return this.attr( "class", "" );
+ }
+
+ if ( typeof value === "string" && value ) {
+ classes = value.match( rnotwhite ) || [];
+
+ while ( ( elem = this[ i++ ] ) ) {
+ curValue = getClass( elem );
+
+ // This expression is here for better compressibility (see addClass)
+ cur = elem.nodeType === 1 &&
+ ( " " + curValue + " " ).replace( rclass, " " );
+
+ if ( cur ) {
+ j = 0;
+ while ( ( clazz = classes[ j++ ] ) ) {
+
+ // Remove *all* instances
+ while ( cur.indexOf( " " + clazz + " " ) > -1 ) {
+ cur = cur.replace( " " + clazz + " ", " " );
+ }
+ }
+
+ // Only assign if different to avoid unneeded rendering.
+ finalValue = jQuery.trim( cur );
+ if ( curValue !== finalValue ) {
+ elem.setAttribute( "class", finalValue );
+ }
+ }
+ }
+ }
+
+ return this;
+ },
+
+ toggleClass: function( value, stateVal ) {
+ var type = typeof value;
+
+ if ( typeof stateVal === "boolean" && type === "string" ) {
+ return stateVal ? this.addClass( value ) : this.removeClass( value );
+ }
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each( function( i ) {
+ jQuery( this ).toggleClass(
+ value.call( this, i, getClass( this ), stateVal ),
+ stateVal
+ );
+ } );
+ }
+
+ return this.each( function() {
+ var className, i, self, classNames;
+
+ if ( type === "string" ) {
+
+ // Toggle individual class names
+ i = 0;
+ self = jQuery( this );
+ classNames = value.match( rnotwhite ) || [];
+
+ while ( ( className = classNames[ i++ ] ) ) {
+
+ // Check each className given, space separated list
+ if ( self.hasClass( className ) ) {
+ self.removeClass( className );
+ } else {
+ self.addClass( className );
+ }
+ }
+
+ // Toggle whole class name
+ } else if ( value === undefined || type === "boolean" ) {
+ className = getClass( this );
+ if ( className ) {
+
+ // Store className if set
+ dataPriv.set( this, "__className__", className );
+ }
+
+ // If the element has a class name or if we're passed `false`,
+ // then remove the whole classname (if there was one, the above saved it).
+ // Otherwise bring back whatever was previously saved (if anything),
+ // falling back to the empty string if nothing was stored.
+ if ( this.setAttribute ) {
+ this.setAttribute( "class",
+ className || value === false ?
+ "" :
+ dataPriv.get( this, "__className__" ) || ""
+ );
+ }
+ }
+ } );
+ },
+
+ hasClass: function( selector ) {
+ var className, elem,
+ i = 0;
+
+ className = " " + selector + " ";
+ while ( ( elem = this[ i++ ] ) ) {
+ if ( elem.nodeType === 1 &&
+ ( " " + getClass( elem ) + " " ).replace( rclass, " " )
+ .indexOf( className ) > -1
+ ) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+} );
+
+} );
diff --git a/templates/assets/jquery/src/attributes/prop.js b/templates/assets/jquery/src/attributes/prop.js
new file mode 100644
index 0000000..e127bb0
--- /dev/null
+++ b/templates/assets/jquery/src/attributes/prop.js
@@ -0,0 +1,125 @@
+define( [
+ "../core",
+ "../core/access",
+ "./support",
+ "../selector"
+], function( jQuery, access, support ) {
+
+var rfocusable = /^(?:input|select|textarea|button)$/i,
+ rclickable = /^(?:a|area)$/i;
+
+jQuery.fn.extend( {
+ prop: function( name, value ) {
+ return access( this, jQuery.prop, name, value, arguments.length > 1 );
+ },
+
+ removeProp: function( name ) {
+ return this.each( function() {
+ delete this[ jQuery.propFix[ name ] || name ];
+ } );
+ }
+} );
+
+jQuery.extend( {
+ prop: function( elem, name, value ) {
+ var ret, hooks,
+ nType = elem.nodeType;
+
+ // Don't get/set properties on text, comment and attribute nodes
+ if ( nType === 3 || nType === 8 || nType === 2 ) {
+ return;
+ }
+
+ if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
+
+ // Fix name and attach hooks
+ name = jQuery.propFix[ name ] || name;
+ hooks = jQuery.propHooks[ name ];
+ }
+
+ if ( value !== undefined ) {
+ if ( hooks && "set" in hooks &&
+ ( ret = hooks.set( elem, value, name ) ) !== undefined ) {
+ return ret;
+ }
+
+ return ( elem[ name ] = value );
+ }
+
+ if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
+ return ret;
+ }
+
+ return elem[ name ];
+ },
+
+ propHooks: {
+ tabIndex: {
+ get: function( elem ) {
+
+ // elem.tabIndex doesn't always return the
+ // correct value when it hasn't been explicitly set
+ // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+ // Use proper attribute retrieval(#12072)
+ var tabindex = jQuery.find.attr( elem, "tabindex" );
+
+ return tabindex ?
+ parseInt( tabindex, 10 ) :
+ rfocusable.test( elem.nodeName ) ||
+ rclickable.test( elem.nodeName ) && elem.href ?
+ 0 :
+ -1;
+ }
+ }
+ },
+
+ propFix: {
+ "for": "htmlFor",
+ "class": "className"
+ }
+} );
+
+// Support: IE <=11 only
+// Accessing the selectedIndex property
+// forces the browser to respect setting selected
+// on the option
+// The getter ensures a default option is selected
+// when in an optgroup
+if ( !support.optSelected ) {
+ jQuery.propHooks.selected = {
+ get: function( elem ) {
+ var parent = elem.parentNode;
+ if ( parent && parent.parentNode ) {
+ parent.parentNode.selectedIndex;
+ }
+ return null;
+ },
+ set: function( elem ) {
+ var parent = elem.parentNode;
+ if ( parent ) {
+ parent.selectedIndex;
+
+ if ( parent.parentNode ) {
+ parent.parentNode.selectedIndex;
+ }
+ }
+ }
+ };
+}
+
+jQuery.each( [
+ "tabIndex",
+ "readOnly",
+ "maxLength",
+ "cellSpacing",
+ "cellPadding",
+ "rowSpan",
+ "colSpan",
+ "useMap",
+ "frameBorder",
+ "contentEditable"
+], function() {
+ jQuery.propFix[ this.toLowerCase() ] = this;
+} );
+
+} );
diff --git a/templates/assets/jquery/src/attributes/support.js b/templates/assets/jquery/src/attributes/support.js
new file mode 100644
index 0000000..e8d02b5
--- /dev/null
+++ b/templates/assets/jquery/src/attributes/support.js
@@ -0,0 +1,36 @@
+define( [
+ "../var/document",
+ "../var/support"
+], function( document, support ) {
+
+( function() {
+ var input = document.createElement( "input" ),
+ select = document.createElement( "select" ),
+ opt = select.appendChild( document.createElement( "option" ) );
+
+ input.type = "checkbox";
+
+ // Support: iOS<=5.1, Android<=4.2+
+ // Default value for a checkbox should be "on"
+ support.checkOn = input.value !== "";
+
+ // Support: IE<=11+
+ // Must access selectedIndex to make default options select
+ support.optSelected = opt.selected;
+
+ // Support: Android<=2.3
+ // Options inside disabled selects are incorrectly marked as disabled
+ select.disabled = true;
+ support.optDisabled = !opt.disabled;
+
+ // Support: IE<=11+
+ // An input loses its value after becoming a radio
+ input = document.createElement( "input" );
+ input.value = "t";
+ input.type = "radio";
+ support.radioValue = input.value === "t";
+} )();
+
+return support;
+
+} );
diff --git a/templates/assets/jquery/src/attributes/val.js b/templates/assets/jquery/src/attributes/val.js
new file mode 100644
index 0000000..1fa9171
--- /dev/null
+++ b/templates/assets/jquery/src/attributes/val.js
@@ -0,0 +1,177 @@
+define( [
+ "../core",
+ "./support",
+ "../core/init"
+], function( jQuery, support ) {
+
+var rreturn = /\r/g,
+ rspaces = /[\x20\t\r\n\f]+/g;
+
+jQuery.fn.extend( {
+ val: function( value ) {
+ var hooks, ret, isFunction,
+ elem = this[ 0 ];
+
+ if ( !arguments.length ) {
+ if ( elem ) {
+ hooks = jQuery.valHooks[ elem.type ] ||
+ jQuery.valHooks[ elem.nodeName.toLowerCase() ];
+
+ if ( hooks &&
+ "get" in hooks &&
+ ( ret = hooks.get( elem, "value" ) ) !== undefined
+ ) {
+ return ret;
+ }
+
+ ret = elem.value;
+
+ return typeof ret === "string" ?
+
+ // Handle most common string cases
+ ret.replace( rreturn, "" ) :
+
+ // Handle cases where value is null/undef or number
+ ret == null ? "" : ret;
+ }
+
+ return;
+ }
+
+ isFunction = jQuery.isFunction( value );
+
+ return this.each( function( i ) {
+ var val;
+
+ if ( this.nodeType !== 1 ) {
+ return;
+ }
+
+ if ( isFunction ) {
+ val = value.call( this, i, jQuery( this ).val() );
+ } else {
+ val = value;
+ }
+
+ // Treat null/undefined as ""; convert numbers to string
+ if ( val == null ) {
+ val = "";
+
+ } else if ( typeof val === "number" ) {
+ val += "";
+
+ } else if ( jQuery.isArray( val ) ) {
+ val = jQuery.map( val, function( value ) {
+ return value == null ? "" : value + "";
+ } );
+ }
+
+ hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
+
+ // If set returns undefined, fall back to normal setting
+ if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) {
+ this.value = val;
+ }
+ } );
+ }
+} );
+
+jQuery.extend( {
+ valHooks: {
+ option: {
+ get: function( elem ) {
+
+ var val = jQuery.find.attr( elem, "value" );
+ return val != null ?
+ val :
+
+ // Support: IE10-11+
+ // option.text throws exceptions (#14686, #14858)
+ // Strip and collapse whitespace
+ // https://html.spec.whatwg.org/#strip-and-collapse-whitespace
+ jQuery.trim( jQuery.text( elem ) ).replace( rspaces, " " );
+ }
+ },
+ select: {
+ get: function( elem ) {
+ var value, option,
+ options = elem.options,
+ index = elem.selectedIndex,
+ one = elem.type === "select-one" || index < 0,
+ values = one ? null : [],
+ max = one ? index + 1 : options.length,
+ i = index < 0 ?
+ max :
+ one ? index : 0;
+
+ // Loop through all the selected options
+ for ( ; i < max; i++ ) {
+ option = options[ i ];
+
+ // IE8-9 doesn't update selected after form reset (#2551)
+ if ( ( option.selected || i === index ) &&
+
+ // Don't return options that are disabled or in a disabled optgroup
+ ( support.optDisabled ?
+ !option.disabled : option.getAttribute( "disabled" ) === null ) &&
+ ( !option.parentNode.disabled ||
+ !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
+
+ // Get the specific value for the option
+ value = jQuery( option ).val();
+
+ // We don't need an array for one selects
+ if ( one ) {
+ return value;
+ }
+
+ // Multi-Selects return an array
+ values.push( value );
+ }
+ }
+
+ return values;
+ },
+
+ set: function( elem, value ) {
+ var optionSet, option,
+ options = elem.options,
+ values = jQuery.makeArray( value ),
+ i = options.length;
+
+ while ( i-- ) {
+ option = options[ i ];
+ if ( option.selected =
+ jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1
+ ) {
+ optionSet = true;
+ }
+ }
+
+ // Force browsers to behave consistently when non-matching value is set
+ if ( !optionSet ) {
+ elem.selectedIndex = -1;
+ }
+ return values;
+ }
+ }
+ }
+} );
+
+// Radios and checkboxes getter/setter
+jQuery.each( [ "radio", "checkbox" ], function() {
+ jQuery.valHooks[ this ] = {
+ set: function( elem, value ) {
+ if ( jQuery.isArray( value ) ) {
+ return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
+ }
+ }
+ };
+ if ( !support.checkOn ) {
+ jQuery.valHooks[ this ].get = function( elem ) {
+ return elem.getAttribute( "value" ) === null ? "on" : elem.value;
+ };
+ }
+} );
+
+} );
diff --git a/templates/assets/jquery/src/callbacks.js b/templates/assets/jquery/src/callbacks.js
new file mode 100644
index 0000000..df7c7cf
--- /dev/null
+++ b/templates/assets/jquery/src/callbacks.js
@@ -0,0 +1,232 @@
+define( [
+ "./core",
+ "./var/rnotwhite"
+], function( jQuery, rnotwhite ) {
+
+// Convert String-formatted options into Object-formatted ones
+function createOptions( options ) {
+ var object = {};
+ jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {
+ object[ flag ] = true;
+ } );
+ return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ * options: an optional list of space-separated options that will change how
+ * the callback list behaves or a more traditional option object
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible options:
+ *
+ * once: will ensure the callback list can only be fired once (like a Deferred)
+ *
+ * memory: will keep track of previous values and will call any callback added
+ * after the list has been fired right away with the latest "memorized"
+ * values (like a Deferred)
+ *
+ * unique: will ensure a callback can only be added once (no duplicate in the list)
+ *
+ * stopOnFalse: interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( options ) {
+
+ // Convert options from String-formatted to Object-formatted if needed
+ // (we check in cache first)
+ options = typeof options === "string" ?
+ createOptions( options ) :
+ jQuery.extend( {}, options );
+
+ var // Flag to know if list is currently firing
+ firing,
+
+ // Last fire value for non-forgettable lists
+ memory,
+
+ // Flag to know if list was already fired
+ fired,
+
+ // Flag to prevent firing
+ locked,
+
+ // Actual callback list
+ list = [],
+
+ // Queue of execution data for repeatable lists
+ queue = [],
+
+ // Index of currently firing callback (modified by add/remove as needed)
+ firingIndex = -1,
+
+ // Fire callbacks
+ fire = function() {
+
+ // Enforce single-firing
+ locked = options.once;
+
+ // Execute callbacks for all pending executions,
+ // respecting firingIndex overrides and runtime changes
+ fired = firing = true;
+ for ( ; queue.length; firingIndex = -1 ) {
+ memory = queue.shift();
+ while ( ++firingIndex < list.length ) {
+
+ // Run callback and check for early termination
+ if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
+ options.stopOnFalse ) {
+
+ // Jump to end and forget the data so .add doesn't re-fire
+ firingIndex = list.length;
+ memory = false;
+ }
+ }
+ }
+
+ // Forget the data if we're done with it
+ if ( !options.memory ) {
+ memory = false;
+ }
+
+ firing = false;
+
+ // Clean up if we're done firing for good
+ if ( locked ) {
+
+ // Keep an empty list if we have data for future add calls
+ if ( memory ) {
+ list = [];
+
+ // Otherwise, this object is spent
+ } else {
+ list = "";
+ }
+ }
+ },
+
+ // Actual Callbacks object
+ self = {
+
+ // Add a callback or a collection of callbacks to the list
+ add: function() {
+ if ( list ) {
+
+ // If we have memory from a past run, we should fire after adding
+ if ( memory && !firing ) {
+ firingIndex = list.length - 1;
+ queue.push( memory );
+ }
+
+ ( function add( args ) {
+ jQuery.each( args, function( _, arg ) {
+ if ( jQuery.isFunction( arg ) ) {
+ if ( !options.unique || !self.has( arg ) ) {
+ list.push( arg );
+ }
+ } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) {
+
+ // Inspect recursively
+ add( arg );
+ }
+ } );
+ } )( arguments );
+
+ if ( memory && !firing ) {
+ fire();
+ }
+ }
+ return this;
+ },
+
+ // Remove a callback from the list
+ remove: function() {
+ jQuery.each( arguments, function( _, arg ) {
+ var index;
+ while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
+ list.splice( index, 1 );
+
+ // Handle firing indexes
+ if ( index <= firingIndex ) {
+ firingIndex--;
+ }
+ }
+ } );
+ return this;
+ },
+
+ // Check if a given callback is in the list.
+ // If no argument is given, return whether or not list has callbacks attached.
+ has: function( fn ) {
+ return fn ?
+ jQuery.inArray( fn, list ) > -1 :
+ list.length > 0;
+ },
+
+ // Remove all callbacks from the list
+ empty: function() {
+ if ( list ) {
+ list = [];
+ }
+ return this;
+ },
+
+ // Disable .fire and .add
+ // Abort any current/pending executions
+ // Clear all callbacks and values
+ disable: function() {
+ locked = queue = [];
+ list = memory = "";
+ return this;
+ },
+ disabled: function() {
+ return !list;
+ },
+
+ // Disable .fire
+ // Also disable .add unless we have memory (since it would have no effect)
+ // Abort any pending executions
+ lock: function() {
+ locked = queue = [];
+ if ( !memory ) {
+ list = memory = "";
+ }
+ return this;
+ },
+ locked: function() {
+ return !!locked;
+ },
+
+ // Call all callbacks with the given context and arguments
+ fireWith: function( context, args ) {
+ if ( !locked ) {
+ args = args || [];
+ args = [ context, args.slice ? args.slice() : args ];
+ queue.push( args );
+ if ( !firing ) {
+ fire();
+ }
+ }
+ return this;
+ },
+
+ // Call all the callbacks with the given arguments
+ fire: function() {
+ self.fireWith( this, arguments );
+ return this;
+ },
+
+ // To know if the callbacks have already been called at least once
+ fired: function() {
+ return !!fired;
+ }
+ };
+
+ return self;
+};
+
+return jQuery;
+} );
diff --git a/templates/assets/jquery/src/core.js b/templates/assets/jquery/src/core.js
new file mode 100644
index 0000000..713c1a3
--- /dev/null
+++ b/templates/assets/jquery/src/core.js
@@ -0,0 +1,494 @@
+define( [
+ "./var/arr",
+ "./var/document",
+ "./var/slice",
+ "./var/concat",
+ "./var/push",
+ "./var/indexOf",
+ "./var/class2type",
+ "./var/toString",
+ "./var/hasOwn",
+ "./var/support"
+], function( arr, document, slice, concat, push, indexOf, class2type, toString, hasOwn, support ) {
+
+var
+ version = "@VERSION",
+
+ // Define a local copy of jQuery
+ jQuery = function( selector, context ) {
+
+ // The jQuery object is actually just the init constructor 'enhanced'
+ // Need init if jQuery is called (just allow error to be thrown if not included)
+ return new jQuery.fn.init( selector, context );
+ },
+
+ // Support: Android<4.1
+ // Make sure we trim BOM and NBSP
+ rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
+
+ // Matches dashed string for camelizing
+ rmsPrefix = /^-ms-/,
+ rdashAlpha = /-([\da-z])/gi,
+
+ // Used by jQuery.camelCase as callback to replace()
+ fcamelCase = function( all, letter ) {
+ return letter.toUpperCase();
+ };
+
+jQuery.fn = jQuery.prototype = {
+
+ // The current version of jQuery being used
+ jquery: version,
+
+ constructor: jQuery,
+
+ // Start with an empty selector
+ selector: "",
+
+ // The default length of a jQuery object is 0
+ length: 0,
+
+ toArray: function() {
+ return slice.call( this );
+ },
+
+ // Get the Nth element in the matched element set OR
+ // Get the whole matched element set as a clean array
+ get: function( num ) {
+ return num != null ?
+
+ // Return just the one element from the set
+ ( num < 0 ? this[ num + this.length ] : this[ num ] ) :
+
+ // Return all the elements in a clean array
+ slice.call( this );
+ },
+
+ // Take an array of elements and push it onto the stack
+ // (returning the new matched element set)
+ pushStack: function( elems ) {
+
+ // Build a new jQuery matched element set
+ var ret = jQuery.merge( this.constructor(), elems );
+
+ // Add the old object onto the stack (as a reference)
+ ret.prevObject = this;
+ ret.context = this.context;
+
+ // Return the newly-formed element set
+ return ret;
+ },
+
+ // Execute a callback for every element in the matched set.
+ each: function( callback ) {
+ return jQuery.each( this, callback );
+ },
+
+ map: function( callback ) {
+ return this.pushStack( jQuery.map( this, function( elem, i ) {
+ return callback.call( elem, i, elem );
+ } ) );
+ },
+
+ slice: function() {
+ return this.pushStack( slice.apply( this, arguments ) );
+ },
+
+ first: function() {
+ return this.eq( 0 );
+ },
+
+ last: function() {
+ return this.eq( -1 );
+ },
+
+ eq: function( i ) {
+ var len = this.length,
+ j = +i + ( i < 0 ? len : 0 );
+ return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
+ },
+
+ end: function() {
+ return this.prevObject || this.constructor();
+ },
+
+ // For internal use only.
+ // Behaves like an Array's method, not like a jQuery method.
+ push: push,
+ sort: arr.sort,
+ splice: arr.splice
+};
+
+jQuery.extend = jQuery.fn.extend = function() {
+ var options, name, src, copy, copyIsArray, clone,
+ target = arguments[ 0 ] || {},
+ i = 1,
+ length = arguments.length,
+ deep = false;
+
+ // Handle a deep copy situation
+ if ( typeof target === "boolean" ) {
+ deep = target;
+
+ // Skip the boolean and the target
+ target = arguments[ i ] || {};
+ i++;
+ }
+
+ // Handle case when target is a string or something (possible in deep copy)
+ if ( typeof target !== "object" && !jQuery.isFunction( target ) ) {
+ target = {};
+ }
+
+ // Extend jQuery itself if only one argument is passed
+ if ( i === length ) {
+ target = this;
+ i--;
+ }
+
+ for ( ; i < length; i++ ) {
+
+ // Only deal with non-null/undefined values
+ if ( ( options = arguments[ i ] ) != null ) {
+
+ // Extend the base object
+ for ( name in options ) {
+ src = target[ name ];
+ copy = options[ name ];
+
+ // Prevent never-ending loop
+ if ( target === copy ) {
+ continue;
+ }
+
+ // Recurse if we're merging plain objects or arrays
+ if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
+ ( copyIsArray = jQuery.isArray( copy ) ) ) ) {
+
+ if ( copyIsArray ) {
+ copyIsArray = false;
+ clone = src && jQuery.isArray( src ) ? src : [];
+
+ } else {
+ clone = src && jQuery.isPlainObject( src ) ? src : {};
+ }
+
+ // Never move original objects, clone them
+ target[ name ] = jQuery.extend( deep, clone, copy );
+
+ // Don't bring in undefined values
+ } else if ( copy !== undefined ) {
+ target[ name ] = copy;
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
+
+jQuery.extend( {
+
+ // Unique for each copy of jQuery on the page
+ expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
+
+ // Assume jQuery is ready without the ready module
+ isReady: true,
+
+ error: function( msg ) {
+ throw new Error( msg );
+ },
+
+ noop: function() {},
+
+ isFunction: function( obj ) {
+ return jQuery.type( obj ) === "function";
+ },
+
+ isArray: Array.isArray,
+
+ isWindow: function( obj ) {
+ return obj != null && obj === obj.window;
+ },
+
+ isNumeric: function( obj ) {
+
+ // parseFloat NaNs numeric-cast false positives (null|true|false|"")
+ // ...but misinterprets leading-number strings, particularly hex literals ("0x...")
+ // subtraction forces infinities to NaN
+ // adding 1 corrects loss of precision from parseFloat (#15100)
+ var realStringObj = obj && obj.toString();
+ return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0;
+ },
+
+ isPlainObject: function( obj ) {
+ var key;
+
+ // Not plain objects:
+ // - Any object or value whose internal [[Class]] property is not "[object Object]"
+ // - DOM nodes
+ // - window
+ if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ // Not own constructor property must be Object
+ if ( obj.constructor &&
+ !hasOwn.call( obj, "constructor" ) &&
+ !hasOwn.call( obj.constructor.prototype || {}, "isPrototypeOf" ) ) {
+ return false;
+ }
+
+ // Own properties are enumerated firstly, so to speed up,
+ // if last one is own, then all properties are own
+ for ( key in obj ) {}
+
+ return key === undefined || hasOwn.call( obj, key );
+ },
+
+ isEmptyObject: function( obj ) {
+ var name;
+ for ( name in obj ) {
+ return false;
+ }
+ return true;
+ },
+
+ type: function( obj ) {
+ if ( obj == null ) {
+ return obj + "";
+ }
+
+ // Support: Android<4.0, iOS<6 (functionish RegExp)
+ return typeof obj === "object" || typeof obj === "function" ?
+ class2type[ toString.call( obj ) ] || "object" :
+ typeof obj;
+ },
+
+ // Evaluates a script in a global context
+ globalEval: function( code ) {
+ var script,
+ indirect = eval;
+
+ code = jQuery.trim( code );
+
+ if ( code ) {
+
+ // If the code includes a valid, prologue position
+ // strict mode pragma, execute code by injecting a
+ // script tag into the document.
+ if ( code.indexOf( "use strict" ) === 1 ) {
+ script = document.createElement( "script" );
+ script.text = code;
+ document.head.appendChild( script ).parentNode.removeChild( script );
+ } else {
+
+ // Otherwise, avoid the DOM node creation, insertion
+ // and removal by using an indirect global eval
+
+ indirect( code );
+ }
+ }
+ },
+
+ // Convert dashed to camelCase; used by the css and data modules
+ // Support: IE9-11+
+ // Microsoft forgot to hump their vendor prefix (#9572)
+ camelCase: function( string ) {
+ return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+ },
+
+ nodeName: function( elem, name ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+ },
+
+ each: function( obj, callback ) {
+ var length, i = 0;
+
+ if ( isArrayLike( obj ) ) {
+ length = obj.length;
+ for ( ; i < length; i++ ) {
+ if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( i in obj ) {
+ if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
+ break;
+ }
+ }
+ }
+
+ return obj;
+ },
+
+ // Support: Android<4.1
+ trim: function( text ) {
+ return text == null ?
+ "" :
+ ( text + "" ).replace( rtrim, "" );
+ },
+
+ // results is for internal usage only
+ makeArray: function( arr, results ) {
+ var ret = results || [];
+
+ if ( arr != null ) {
+ if ( isArrayLike( Object( arr ) ) ) {
+ jQuery.merge( ret,
+ typeof arr === "string" ?
+ [ arr ] : arr
+ );
+ } else {
+ push.call( ret, arr );
+ }
+ }
+
+ return ret;
+ },
+
+ inArray: function( elem, arr, i ) {
+ return arr == null ? -1 : indexOf.call( arr, elem, i );
+ },
+
+ merge: function( first, second ) {
+ var len = +second.length,
+ j = 0,
+ i = first.length;
+
+ for ( ; j < len; j++ ) {
+ first[ i++ ] = second[ j ];
+ }
+
+ first.length = i;
+
+ return first;
+ },
+
+ grep: function( elems, callback, invert ) {
+ var callbackInverse,
+ matches = [],
+ i = 0,
+ length = elems.length,
+ callbackExpect = !invert;
+
+ // Go through the array, only saving the items
+ // that pass the validator function
+ for ( ; i < length; i++ ) {
+ callbackInverse = !callback( elems[ i ], i );
+ if ( callbackInverse !== callbackExpect ) {
+ matches.push( elems[ i ] );
+ }
+ }
+
+ return matches;
+ },
+
+ // arg is for internal usage only
+ map: function( elems, callback, arg ) {
+ var length, value,
+ i = 0,
+ ret = [];
+
+ // Go through the array, translating each of the items to their new values
+ if ( isArrayLike( elems ) ) {
+ length = elems.length;
+ for ( ; i < length; i++ ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret.push( value );
+ }
+ }
+
+ // Go through every key on the object,
+ } else {
+ for ( i in elems ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret.push( value );
+ }
+ }
+ }
+
+ // Flatten any nested arrays
+ return concat.apply( [], ret );
+ },
+
+ // A global GUID counter for objects
+ guid: 1,
+
+ // Bind a function to a context, optionally partially applying any
+ // arguments.
+ proxy: function( fn, context ) {
+ var tmp, args, proxy;
+
+ if ( typeof context === "string" ) {
+ tmp = fn[ context ];
+ context = fn;
+ fn = tmp;
+ }
+
+ // Quick check to determine if target is callable, in the spec
+ // this throws a TypeError, but we will just return undefined.
+ if ( !jQuery.isFunction( fn ) ) {
+ return undefined;
+ }
+
+ // Simulated bind
+ args = slice.call( arguments, 2 );
+ proxy = function() {
+ return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
+ };
+
+ // Set the guid of unique handler to the same of original handler, so it can be removed
+ proxy.guid = fn.guid = fn.guid || jQuery.guid++;
+
+ return proxy;
+ },
+
+ now: Date.now,
+
+ // jQuery.support is not used in Core but other projects attach their
+ // properties to it so it needs to exist.
+ support: support
+} );
+
+// JSHint would error on this code due to the Symbol not being defined in ES5.
+// Defining this global in .jshintrc would create a danger of using the global
+// unguarded in another place, it seems safer to just disable JSHint for these
+// three lines.
+/* jshint ignore: start */
+if ( typeof Symbol === "function" ) {
+ jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
+}
+/* jshint ignore: end */
+
+// Populate the class2type map
+jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
+function( i, name ) {
+ class2type[ "[object " + name + "]" ] = name.toLowerCase();
+} );
+
+function isArrayLike( obj ) {
+
+ // Support: iOS 8.2 (not reproducible in simulator)
+ // `in` check used to prevent JIT error (gh-2145)
+ // hasOwn isn't used here due to false negatives
+ // regarding Nodelist length in IE
+ var length = !!obj && "length" in obj && obj.length,
+ type = jQuery.type( obj );
+
+ if ( type === "function" || jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ return type === "array" || length === 0 ||
+ typeof length === "number" && length > 0 && ( length - 1 ) in obj;
+}
+
+return jQuery;
+} );
diff --git a/templates/assets/jquery/src/core/access.js b/templates/assets/jquery/src/core/access.js
new file mode 100644
index 0000000..19f79ef
--- /dev/null
+++ b/templates/assets/jquery/src/core/access.js
@@ -0,0 +1,65 @@
+define( [
+ "../core"
+], function( jQuery ) {
+
+// Multifunctional method to get and set values of a collection
+// The value/s can optionally be executed if it's a function
+var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
+ var i = 0,
+ len = elems.length,
+ bulk = key == null;
+
+ // Sets many values
+ if ( jQuery.type( key ) === "object" ) {
+ chainable = true;
+ for ( i in key ) {
+ access( elems, fn, i, key[ i ], true, emptyGet, raw );
+ }
+
+ // Sets one value
+ } else if ( value !== undefined ) {
+ chainable = true;
+
+ if ( !jQuery.isFunction( value ) ) {
+ raw = true;
+ }
+
+ if ( bulk ) {
+
+ // Bulk operations run against the entire set
+ if ( raw ) {
+ fn.call( elems, value );
+ fn = null;
+
+ // ...except when executing function values
+ } else {
+ bulk = fn;
+ fn = function( elem, key, value ) {
+ return bulk.call( jQuery( elem ), value );
+ };
+ }
+ }
+
+ if ( fn ) {
+ for ( ; i < len; i++ ) {
+ fn(
+ elems[ i ], key, raw ?
+ value :
+ value.call( elems[ i ], i, fn( elems[ i ], key ) )
+ );
+ }
+ }
+ }
+
+ return chainable ?
+ elems :
+
+ // Gets
+ bulk ?
+ fn.call( elems ) :
+ len ? fn( elems[ 0 ], key ) : emptyGet;
+};
+
+return access;
+
+} );
diff --git a/templates/assets/jquery/src/core/init.js b/templates/assets/jquery/src/core/init.js
new file mode 100644
index 0000000..c2b6c94
--- /dev/null
+++ b/templates/assets/jquery/src/core/init.js
@@ -0,0 +1,134 @@
+// Initialize a jQuery object
+define( [
+ "../core",
+ "../var/document",
+ "./var/rsingleTag",
+ "../traversing/findFilter"
+], function( jQuery, document, rsingleTag ) {
+
+// A central reference to the root jQuery(document)
+var rootjQuery,
+
+ // A simple way to check for HTML strings
+ // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
+ // Strict HTML recognition (#11290: must start with <)
+ rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
+
+ init = jQuery.fn.init = function( selector, context, root ) {
+ var match, elem;
+
+ // HANDLE: $(""), $(null), $(undefined), $(false)
+ if ( !selector ) {
+ return this;
+ }
+
+ // Method init() accepts an alternate rootjQuery
+ // so migrate can support jQuery.sub (gh-2101)
+ root = root || rootjQuery;
+
+ // Handle HTML strings
+ if ( typeof selector === "string" ) {
+ if ( selector[ 0 ] === "<" &&
+ selector[ selector.length - 1 ] === ">" &&
+ selector.length >= 3 ) {
+
+ // Assume that strings that start and end with <> are HTML and skip the regex check
+ match = [ null, selector, null ];
+
+ } else {
+ match = rquickExpr.exec( selector );
+ }
+
+ // Match html or make sure no context is specified for #id
+ if ( match && ( match[ 1 ] || !context ) ) {
+
+ // HANDLE: $(html) -> $(array)
+ if ( match[ 1 ] ) {
+ context = context instanceof jQuery ? context[ 0 ] : context;
+
+ // Option to run scripts is true for back-compat
+ // Intentionally let the error be thrown if parseHTML is not present
+ jQuery.merge( this, jQuery.parseHTML(
+ match[ 1 ],
+ context && context.nodeType ? context.ownerDocument || context : document,
+ true
+ ) );
+
+ // HANDLE: $(html, props)
+ if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
+ for ( match in context ) {
+
+ // Properties of context are called as methods if possible
+ if ( jQuery.isFunction( this[ match ] ) ) {
+ this[ match ]( context[ match ] );
+
+ // ...and otherwise set as attributes
+ } else {
+ this.attr( match, context[ match ] );
+ }
+ }
+ }
+
+ return this;
+
+ // HANDLE: $(#id)
+ } else {
+ elem = document.getElementById( match[ 2 ] );
+
+ // Support: Blackberry 4.6
+ // gEBID returns nodes no longer in the document (#6963)
+ if ( elem && elem.parentNode ) {
+
+ // Inject the element directly into the jQuery object
+ this.length = 1;
+ this[ 0 ] = elem;
+ }
+
+ this.context = document;
+ this.selector = selector;
+ return this;
+ }
+
+ // HANDLE: $(expr, $(...))
+ } else if ( !context || context.jquery ) {
+ return ( context || root ).find( selector );
+
+ // HANDLE: $(expr, context)
+ // (which is just equivalent to: $(context).find(expr)
+ } else {
+ return this.constructor( context ).find( selector );
+ }
+
+ // HANDLE: $(DOMElement)
+ } else if ( selector.nodeType ) {
+ this.context = this[ 0 ] = selector;
+ this.length = 1;
+ return this;
+
+ // HANDLE: $(function)
+ // Shortcut for document ready
+ } else if ( jQuery.isFunction( selector ) ) {
+ return root.ready !== undefined ?
+ root.ready( selector ) :
+
+ // Execute immediately if ready is not present
+ selector( jQuery );
+ }
+
+ if ( selector.selector !== undefined ) {
+ this.selector = selector.selector;
+ this.context = selector.context;
+ }
+
+ return jQuery.makeArray( selector, this );
+ };
+
+// Give the init function the jQuery prototype for later instantiation
+init.prototype = jQuery.fn;
+
+// Initialize central reference
+rootjQuery = jQuery( document );
+
+return init;
+
+} );
diff --git a/templates/assets/jquery/src/core/parseHTML.js b/templates/assets/jquery/src/core/parseHTML.js
new file mode 100644
index 0000000..3524abd
--- /dev/null
+++ b/templates/assets/jquery/src/core/parseHTML.js
@@ -0,0 +1,41 @@
+define( [
+ "../core",
+ "../var/document",
+ "./var/rsingleTag",
+ "../manipulation/buildFragment"
+], function( jQuery, document, rsingleTag, buildFragment ) {
+
+// Argument "data" should be string of html
+// context (optional): If specified, the fragment will be created in this context,
+// defaults to document
+// keepScripts (optional): If true, will include scripts passed in the html string
+jQuery.parseHTML = function( data, context, keepScripts ) {
+ if ( !data || typeof data !== "string" ) {
+ return null;
+ }
+ if ( typeof context === "boolean" ) {
+ keepScripts = context;
+ context = false;
+ }
+ context = context || document;
+
+ var parsed = rsingleTag.exec( data ),
+ scripts = !keepScripts && [];
+
+ // Single tag
+ if ( parsed ) {
+ return [ context.createElement( parsed[ 1 ] ) ];
+ }
+
+ parsed = buildFragment( [ data ], context, scripts );
+
+ if ( scripts && scripts.length ) {
+ jQuery( scripts ).remove();
+ }
+
+ return jQuery.merge( [], parsed.childNodes );
+};
+
+return jQuery.parseHTML;
+
+} );
diff --git a/templates/assets/jquery/src/core/ready.js b/templates/assets/jquery/src/core/ready.js
new file mode 100644
index 0000000..7d93e67
--- /dev/null
+++ b/templates/assets/jquery/src/core/ready.js
@@ -0,0 +1,103 @@
+define( [
+ "../core",
+ "../var/document",
+ "../core/init",
+ "../deferred"
+], function( jQuery, document ) {
+
+// The deferred used on DOM ready
+var readyList;
+
+jQuery.fn.ready = function( fn ) {
+
+ // Add the callback
+ jQuery.ready.promise().done( fn );
+
+ return this;
+};
+
+jQuery.extend( {
+
+ // Is the DOM ready to be used? Set to true once it occurs.
+ isReady: false,
+
+ // A counter to track how many items to wait for before
+ // the ready event fires. See #6781
+ readyWait: 1,
+
+ // Hold (or release) the ready event
+ holdReady: function( hold ) {
+ if ( hold ) {
+ jQuery.readyWait++;
+ } else {
+ jQuery.ready( true );
+ }
+ },
+
+ // Handle when the DOM is ready
+ ready: function( wait ) {
+
+ // Abort if there are pending holds or we're already ready
+ if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
+ return;
+ }
+
+ // Remember that the DOM is ready
+ jQuery.isReady = true;
+
+ // If a normal DOM Ready event fired, decrement, and wait if need be
+ if ( wait !== true && --jQuery.readyWait > 0 ) {
+ return;
+ }
+
+ // If there are functions bound, to execute
+ readyList.resolveWith( document, [ jQuery ] );
+
+ // Trigger any bound ready events
+ if ( jQuery.fn.triggerHandler ) {
+ jQuery( document ).triggerHandler( "ready" );
+ jQuery( document ).off( "ready" );
+ }
+ }
+} );
+
+/**
+ * The ready event handler and self cleanup method
+ */
+function completed() {
+ document.removeEventListener( "DOMContentLoaded", completed );
+ window.removeEventListener( "load", completed );
+ jQuery.ready();
+}
+
+jQuery.ready.promise = function( obj ) {
+ if ( !readyList ) {
+
+ readyList = jQuery.Deferred();
+
+ // Catch cases where $(document).ready() is called
+ // after the browser event has already occurred.
+ // Support: IE9-10 only
+ // Older IE sometimes signals "interactive" too soon
+ if ( document.readyState === "complete" ||
+ ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
+
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
+ window.setTimeout( jQuery.ready );
+
+ } else {
+
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", completed );
+
+ // A fallback to window.onload, that will always work
+ window.addEventListener( "load", completed );
+ }
+ }
+ return readyList.promise( obj );
+};
+
+// Kick off the DOM ready check even if the user does not
+jQuery.ready.promise();
+
+} );
diff --git a/templates/assets/jquery/src/css.js b/templates/assets/jquery/src/css.js
new file mode 100644
index 0000000..bd13139
--- /dev/null
+++ b/templates/assets/jquery/src/css.js
@@ -0,0 +1,502 @@
+define( [
+ "./core",
+ "./var/pnum",
+ "./core/access",
+ "./css/var/rmargin",
+ "./var/document",
+ "./var/rcssNum",
+ "./css/var/rnumnonpx",
+ "./css/var/cssExpand",
+ "./css/var/isHidden",
+ "./css/var/getStyles",
+ "./css/var/swap",
+ "./css/curCSS",
+ "./css/adjustCSS",
+ "./css/defaultDisplay",
+ "./css/addGetHookIf",
+ "./css/support",
+ "./data/var/dataPriv",
+
+ "./core/init",
+ "./core/ready",
+ "./selector" // contains
+], function( jQuery, pnum, access, rmargin, document, rcssNum, rnumnonpx, cssExpand, isHidden,
+ getStyles, swap, curCSS, adjustCSS, defaultDisplay, addGetHookIf, support, dataPriv ) {
+
+var
+
+ // Swappable if display is none or starts with table
+ // except "table", "table-cell", or "table-caption"
+ // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
+ rdisplayswap = /^(none|table(?!-c[ea]).+)/,
+
+ cssShow = { position: "absolute", visibility: "hidden", display: "block" },
+ cssNormalTransform = {
+ letterSpacing: "0",
+ fontWeight: "400"
+ },
+
+ cssPrefixes = [ "Webkit", "O", "Moz", "ms" ],
+ emptyStyle = document.createElement( "div" ).style;
+
+// Return a css property mapped to a potentially vendor prefixed property
+function vendorPropName( name ) {
+
+ // Shortcut for names that are not vendor prefixed
+ if ( name in emptyStyle ) {
+ return name;
+ }
+
+ // Check for vendor prefixed names
+ var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),
+ i = cssPrefixes.length;
+
+ while ( i-- ) {
+ name = cssPrefixes[ i ] + capName;
+ if ( name in emptyStyle ) {
+ return name;
+ }
+ }
+}
+
+function setPositiveNumber( elem, value, subtract ) {
+
+ // Any relative (+/-) values have already been
+ // normalized at this point
+ var matches = rcssNum.exec( value );
+ return matches ?
+
+ // Guard against undefined "subtract", e.g., when used as in cssHooks
+ Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :
+ value;
+}
+
+function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
+ var i = extra === ( isBorderBox ? "border" : "content" ) ?
+
+ // If we already have the right measurement, avoid augmentation
+ 4 :
+
+ // Otherwise initialize for horizontal or vertical properties
+ name === "width" ? 1 : 0,
+
+ val = 0;
+
+ for ( ; i < 4; i += 2 ) {
+
+ // Both box models exclude margin, so add it if we want it
+ if ( extra === "margin" ) {
+ val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
+ }
+
+ if ( isBorderBox ) {
+
+ // border-box includes padding, so remove it if we want content
+ if ( extra === "content" ) {
+ val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+ }
+
+ // At this point, extra isn't border nor margin, so remove border
+ if ( extra !== "margin" ) {
+ val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+ }
+ } else {
+
+ // At this point, extra isn't content, so add padding
+ val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+
+ // At this point, extra isn't content nor padding, so add border
+ if ( extra !== "padding" ) {
+ val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+ }
+ }
+ }
+
+ return val;
+}
+
+function getWidthOrHeight( elem, name, extra ) {
+
+ // Start with offset property, which is equivalent to the border-box value
+ var valueIsBorderBox = true,
+ val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
+ styles = getStyles( elem ),
+ isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
+
+ // Some non-html elements return undefined for offsetWidth, so check for null/undefined
+ // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
+ // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
+ if ( val <= 0 || val == null ) {
+
+ // Fall back to computed then uncomputed css if necessary
+ val = curCSS( elem, name, styles );
+ if ( val < 0 || val == null ) {
+ val = elem.style[ name ];
+ }
+
+ // Computed unit is not pixels. Stop here and return.
+ if ( rnumnonpx.test( val ) ) {
+ return val;
+ }
+
+ // Check for style in case a browser which returns unreliable values
+ // for getComputedStyle silently falls back to the reliable elem.style
+ valueIsBorderBox = isBorderBox &&
+ ( support.boxSizingReliable() || val === elem.style[ name ] );
+
+ // Normalize "", auto, and prepare for extra
+ val = parseFloat( val ) || 0;
+ }
+
+ // Use the active box-sizing model to add/subtract irrelevant styles
+ return ( val +
+ augmentWidthOrHeight(
+ elem,
+ name,
+ extra || ( isBorderBox ? "border" : "content" ),
+ valueIsBorderBox,
+ styles
+ )
+ ) + "px";
+}
+
+function showHide( elements, show ) {
+ var display, elem, hidden,
+ values = [],
+ index = 0,
+ length = elements.length;
+
+ for ( ; index < length; index++ ) {
+ elem = elements[ index ];
+ if ( !elem.style ) {
+ continue;
+ }
+
+ values[ index ] = dataPriv.get( elem, "olddisplay" );
+ display = elem.style.display;
+ if ( show ) {
+
+ // Reset the inline display of this element to learn if it is
+ // being hidden by cascaded rules or not
+ if ( !values[ index ] && display === "none" ) {
+ elem.style.display = "";
+ }
+
+ // Set elements which have been overridden with display: none
+ // in a stylesheet to whatever the default browser style is
+ // for such an element
+ if ( elem.style.display === "" && isHidden( elem ) ) {
+ values[ index ] = dataPriv.access(
+ elem,
+ "olddisplay",
+ defaultDisplay( elem.nodeName )
+ );
+ }
+ } else {
+ hidden = isHidden( elem );
+
+ if ( display !== "none" || !hidden ) {
+ dataPriv.set(
+ elem,
+ "olddisplay",
+ hidden ? display : jQuery.css( elem, "display" )
+ );
+ }
+ }
+ }
+
+ // Set the display of most of the elements in a second loop
+ // to avoid the constant reflow
+ for ( index = 0; index < length; index++ ) {
+ elem = elements[ index ];
+ if ( !elem.style ) {
+ continue;
+ }
+ if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
+ elem.style.display = show ? values[ index ] || "" : "none";
+ }
+ }
+
+ return elements;
+}
+
+jQuery.extend( {
+
+ // Add in style property hooks for overriding the default
+ // behavior of getting and setting a style property
+ cssHooks: {
+ opacity: {
+ get: function( elem, computed ) {
+ if ( computed ) {
+
+ // We should always get a number back from opacity
+ var ret = curCSS( elem, "opacity" );
+ return ret === "" ? "1" : ret;
+ }
+ }
+ }
+ },
+
+ // Don't automatically add "px" to these possibly-unitless properties
+ cssNumber: {
+ "animationIterationCount": true,
+ "columnCount": true,
+ "fillOpacity": true,
+ "flexGrow": true,
+ "flexShrink": true,
+ "fontWeight": true,
+ "lineHeight": true,
+ "opacity": true,
+ "order": true,
+ "orphans": true,
+ "widows": true,
+ "zIndex": true,
+ "zoom": true
+ },
+
+ // Add in properties whose names you wish to fix before
+ // setting or getting the value
+ cssProps: {
+ "float": "cssFloat"
+ },
+
+ // Get and set the style property on a DOM Node
+ style: function( elem, name, value, extra ) {
+
+ // Don't set styles on text and comment nodes
+ if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+ return;
+ }
+
+ // Make sure that we're working with the right name
+ var ret, type, hooks,
+ origName = jQuery.camelCase( name ),
+ style = elem.style;
+
+ name = jQuery.cssProps[ origName ] ||
+ ( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
+
+ // Gets hook for the prefixed version, then unprefixed version
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+ // Check if we're setting a value
+ if ( value !== undefined ) {
+ type = typeof value;
+
+ // Convert "+=" or "-=" to relative numbers (#7345)
+ if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
+ value = adjustCSS( elem, name, ret );
+
+ // Fixes bug #9237
+ type = "number";
+ }
+
+ // Make sure that null and NaN values aren't set (#7116)
+ if ( value == null || value !== value ) {
+ return;
+ }
+
+ // If a number was passed in, add the unit (except for certain CSS properties)
+ if ( type === "number" ) {
+ value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );
+ }
+
+ // Support: IE9-11+
+ // background-* props affect original clone's values
+ if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
+ style[ name ] = "inherit";
+ }
+
+ // If a hook was provided, use that value, otherwise just set the specified value
+ if ( !hooks || !( "set" in hooks ) ||
+ ( value = hooks.set( elem, value, extra ) ) !== undefined ) {
+
+ style[ name ] = value;
+ }
+
+ } else {
+
+ // If a hook was provided get the non-computed value from there
+ if ( hooks && "get" in hooks &&
+ ( ret = hooks.get( elem, false, extra ) ) !== undefined ) {
+
+ return ret;
+ }
+
+ // Otherwise just get the value from the style object
+ return style[ name ];
+ }
+ },
+
+ css: function( elem, name, extra, styles ) {
+ var val, num, hooks,
+ origName = jQuery.camelCase( name );
+
+ // Make sure that we're working with the right name
+ name = jQuery.cssProps[ origName ] ||
+ ( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
+
+ // Try prefixed name followed by the unprefixed name
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+ // If a hook was provided get the computed value from there
+ if ( hooks && "get" in hooks ) {
+ val = hooks.get( elem, true, extra );
+ }
+
+ // Otherwise, if a way to get the computed value exists, use that
+ if ( val === undefined ) {
+ val = curCSS( elem, name, styles );
+ }
+
+ // Convert "normal" to computed value
+ if ( val === "normal" && name in cssNormalTransform ) {
+ val = cssNormalTransform[ name ];
+ }
+
+ // Make numeric if forced or a qualifier was provided and val looks numeric
+ if ( extra === "" || extra ) {
+ num = parseFloat( val );
+ return extra === true || isFinite( num ) ? num || 0 : val;
+ }
+ return val;
+ }
+} );
+
+jQuery.each( [ "height", "width" ], function( i, name ) {
+ jQuery.cssHooks[ name ] = {
+ get: function( elem, computed, extra ) {
+ if ( computed ) {
+
+ // Certain elements can have dimension info if we invisibly show them
+ // but it must have a current display style that would benefit
+ return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&
+ elem.offsetWidth === 0 ?
+ swap( elem, cssShow, function() {
+ return getWidthOrHeight( elem, name, extra );
+ } ) :
+ getWidthOrHeight( elem, name, extra );
+ }
+ },
+
+ set: function( elem, value, extra ) {
+ var matches,
+ styles = extra && getStyles( elem ),
+ subtract = extra && augmentWidthOrHeight(
+ elem,
+ name,
+ extra,
+ jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
+ styles
+ );
+
+ // Convert to pixels if value adjustment is needed
+ if ( subtract && ( matches = rcssNum.exec( value ) ) &&
+ ( matches[ 3 ] || "px" ) !== "px" ) {
+
+ elem.style[ name ] = value;
+ value = jQuery.css( elem, name );
+ }
+
+ return setPositiveNumber( elem, value, subtract );
+ }
+ };
+} );
+
+jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
+ function( elem, computed ) {
+ if ( computed ) {
+ return ( parseFloat( curCSS( elem, "marginLeft" ) ) ||
+ elem.getBoundingClientRect().left -
+ swap( elem, { marginLeft: 0 }, function() {
+ return elem.getBoundingClientRect().left;
+ } )
+ ) + "px";
+ }
+ }
+);
+
+// Support: Android 2.3
+jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,
+ function( elem, computed ) {
+ if ( computed ) {
+ return swap( elem, { "display": "inline-block" },
+ curCSS, [ elem, "marginRight" ] );
+ }
+ }
+);
+
+// These hooks are used by animate to expand properties
+jQuery.each( {
+ margin: "",
+ padding: "",
+ border: "Width"
+}, function( prefix, suffix ) {
+ jQuery.cssHooks[ prefix + suffix ] = {
+ expand: function( value ) {
+ var i = 0,
+ expanded = {},
+
+ // Assumes a single number if not a string
+ parts = typeof value === "string" ? value.split( " " ) : [ value ];
+
+ for ( ; i < 4; i++ ) {
+ expanded[ prefix + cssExpand[ i ] + suffix ] =
+ parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
+ }
+
+ return expanded;
+ }
+ };
+
+ if ( !rmargin.test( prefix ) ) {
+ jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
+ }
+} );
+
+jQuery.fn.extend( {
+ css: function( name, value ) {
+ return access( this, function( elem, name, value ) {
+ var styles, len,
+ map = {},
+ i = 0;
+
+ if ( jQuery.isArray( name ) ) {
+ styles = getStyles( elem );
+ len = name.length;
+
+ for ( ; i < len; i++ ) {
+ map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
+ }
+
+ return map;
+ }
+
+ return value !== undefined ?
+ jQuery.style( elem, name, value ) :
+ jQuery.css( elem, name );
+ }, name, value, arguments.length > 1 );
+ },
+ show: function() {
+ return showHide( this, true );
+ },
+ hide: function() {
+ return showHide( this );
+ },
+ toggle: function( state ) {
+ if ( typeof state === "boolean" ) {
+ return state ? this.show() : this.hide();
+ }
+
+ return this.each( function() {
+ if ( isHidden( this ) ) {
+ jQuery( this ).show();
+ } else {
+ jQuery( this ).hide();
+ }
+ } );
+ }
+} );
+
+return jQuery;
+} );
diff --git a/templates/assets/jquery/src/css/addGetHookIf.js b/templates/assets/jquery/src/css/addGetHookIf.js
new file mode 100644
index 0000000..9cd21f6
--- /dev/null
+++ b/templates/assets/jquery/src/css/addGetHookIf.js
@@ -0,0 +1,24 @@
+define( function() {
+
+function addGetHookIf( conditionFn, hookFn ) {
+
+ // Define the hook, we'll check on the first run if it's really needed.
+ return {
+ get: function() {
+ if ( conditionFn() ) {
+
+ // Hook not needed (or it's not possible to use it due
+ // to missing dependency), remove it.
+ delete this.get;
+ return;
+ }
+
+ // Hook needed; redefine it so that the support test is not executed again.
+ return ( this.get = hookFn ).apply( this, arguments );
+ }
+ };
+}
+
+return addGetHookIf;
+
+} );
diff --git a/templates/assets/jquery/src/css/adjustCSS.js b/templates/assets/jquery/src/css/adjustCSS.js
new file mode 100644
index 0000000..48fcfec
--- /dev/null
+++ b/templates/assets/jquery/src/css/adjustCSS.js
@@ -0,0 +1,65 @@
+define( [
+ "../core",
+ "../var/rcssNum"
+], function( jQuery, rcssNum ) {
+
+function adjustCSS( elem, prop, valueParts, tween ) {
+ var adjusted,
+ scale = 1,
+ maxIterations = 20,
+ currentValue = tween ?
+ function() { return tween.cur(); } :
+ function() { return jQuery.css( elem, prop, "" ); },
+ initial = currentValue(),
+ unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
+
+ // Starting value computation is required for potential unit mismatches
+ initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
+ rcssNum.exec( jQuery.css( elem, prop ) );
+
+ if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
+
+ // Trust units reported by jQuery.css
+ unit = unit || initialInUnit[ 3 ];
+
+ // Make sure we update the tween properties later on
+ valueParts = valueParts || [];
+
+ // Iteratively approximate from a nonzero starting point
+ initialInUnit = +initial || 1;
+
+ do {
+
+ // If previous iteration zeroed out, double until we get *something*.
+ // Use string for doubling so we don't accidentally see scale as unchanged below
+ scale = scale || ".5";
+
+ // Adjust and apply
+ initialInUnit = initialInUnit / scale;
+ jQuery.style( elem, prop, initialInUnit + unit );
+
+ // Update scale, tolerating zero or NaN from tween.cur()
+ // Break the loop if scale is unchanged or perfect, or if we've just had enough.
+ } while (
+ scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations
+ );
+ }
+
+ if ( valueParts ) {
+ initialInUnit = +initialInUnit || +initial || 0;
+
+ // Apply relative offset (+=/-=) if specified
+ adjusted = valueParts[ 1 ] ?
+ initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
+ +valueParts[ 2 ];
+ if ( tween ) {
+ tween.unit = unit;
+ tween.start = initialInUnit;
+ tween.end = adjusted;
+ }
+ }
+ return adjusted;
+}
+
+return adjustCSS;
+} );
diff --git a/templates/assets/jquery/src/css/curCSS.js b/templates/assets/jquery/src/css/curCSS.js
new file mode 100644
index 0000000..084f8c7
--- /dev/null
+++ b/templates/assets/jquery/src/css/curCSS.js
@@ -0,0 +1,60 @@
+define( [
+ "../core",
+ "./var/rnumnonpx",
+ "./var/rmargin",
+ "./var/getStyles",
+ "./support",
+ "../selector" // Get jQuery.contains
+], function( jQuery, rnumnonpx, rmargin, getStyles, support ) {
+
+function curCSS( elem, name, computed ) {
+ var width, minWidth, maxWidth, ret,
+ style = elem.style;
+
+ computed = computed || getStyles( elem );
+ ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined;
+
+ // Support: Opera 12.1x only
+ // Fall back to style even without computed
+ // computed is undefined for elems on document fragments
+ if ( ( ret === "" || ret === undefined ) && !jQuery.contains( elem.ownerDocument, elem ) ) {
+ ret = jQuery.style( elem, name );
+ }
+
+ // Support: IE9
+ // getPropertyValue is only needed for .css('filter') (#12537)
+ if ( computed ) {
+
+ // A tribute to the "awesome hack by Dean Edwards"
+ // Android Browser returns percentage for some values,
+ // but width seems to be reliably pixels.
+ // This is against the CSSOM draft spec:
+ // http://dev.w3.org/csswg/cssom/#resolved-values
+ if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {
+
+ // Remember the original values
+ width = style.width;
+ minWidth = style.minWidth;
+ maxWidth = style.maxWidth;
+
+ // Put in the new values to get a computed value out
+ style.minWidth = style.maxWidth = style.width = ret;
+ ret = computed.width;
+
+ // Revert the changed values
+ style.width = width;
+ style.minWidth = minWidth;
+ style.maxWidth = maxWidth;
+ }
+ }
+
+ return ret !== undefined ?
+
+ // Support: IE9-11+
+ // IE returns zIndex value as an integer.
+ ret + "" :
+ ret;
+}
+
+return curCSS;
+} );
diff --git a/templates/assets/jquery/src/css/defaultDisplay.js b/templates/assets/jquery/src/css/defaultDisplay.js
new file mode 100644
index 0000000..b1fb577
--- /dev/null
+++ b/templates/assets/jquery/src/css/defaultDisplay.js
@@ -0,0 +1,72 @@
+define( [
+ "../core",
+ "../var/document",
+ "../manipulation" // appendTo
+], function( jQuery, document ) {
+
+var iframe,
+ elemdisplay = {
+
+ // Support: Firefox
+ // We have to pre-define these values for FF (#10227)
+ HTML: "block",
+ BODY: "block"
+ };
+
+/**
+ * Retrieve the actual display of a element
+ * @param {String} name nodeName of the element
+ * @param {Object} doc Document object
+ */
+
+// Called only from within defaultDisplay
+function actualDisplay( name, doc ) {
+ var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
+
+ display = jQuery.css( elem[ 0 ], "display" );
+
+ // We don't have any data stored on the element,
+ // so use "detach" method as fast way to get rid of the element
+ elem.detach();
+
+ return display;
+}
+
+/**
+ * Try to determine the default display value of an element
+ * @param {String} nodeName
+ */
+function defaultDisplay( nodeName ) {
+ var doc = document,
+ display = elemdisplay[ nodeName ];
+
+ if ( !display ) {
+ display = actualDisplay( nodeName, doc );
+
+ // If the simple way fails, read from inside an iframe
+ if ( display === "none" || !display ) {
+
+ // Use the already-created iframe if possible
+ iframe = ( iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" ) )
+ .appendTo( doc.documentElement );
+
+ // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
+ doc = iframe[ 0 ].contentDocument;
+
+ // Support: IE
+ doc.write();
+ doc.close();
+
+ display = actualDisplay( nodeName, doc );
+ iframe.detach();
+ }
+
+ // Store the correct default display
+ elemdisplay[ nodeName ] = display;
+ }
+
+ return display;
+}
+
+return defaultDisplay;
+} );
diff --git a/templates/assets/jquery/src/css/hiddenVisibleSelectors.js b/templates/assets/jquery/src/css/hiddenVisibleSelectors.js
new file mode 100644
index 0000000..cf0955d
--- /dev/null
+++ b/templates/assets/jquery/src/css/hiddenVisibleSelectors.js
@@ -0,0 +1,18 @@
+define( [
+ "../core",
+ "../selector"
+], function( jQuery ) {
+
+jQuery.expr.filters.hidden = function( elem ) {
+ return !jQuery.expr.filters.visible( elem );
+};
+jQuery.expr.filters.visible = function( elem ) {
+
+ // Support: Opera <= 12.12
+ // Opera reports offsetWidths and offsetHeights less than zero on some elements
+ // Use OR instead of AND as the element is not visible if either is true
+ // See tickets #10406 and #13132
+ return elem.offsetWidth > 0 || elem.offsetHeight > 0 || elem.getClientRects().length > 0;
+};
+
+} );
diff --git a/templates/assets/jquery/src/css/showHide.js b/templates/assets/jquery/src/css/showHide.js
new file mode 100644
index 0000000..35e15bd
--- /dev/null
+++ b/templates/assets/jquery/src/css/showHide.js
@@ -0,0 +1,48 @@
+define( [
+ "../data/var/dataPriv"
+], function( dataPriv ) {
+
+function showHide( elements, show ) {
+ var display, elem,
+ values = [],
+ index = 0,
+ length = elements.length;
+
+ // Determine new display value for elements that need to change
+ for ( ; index < length; index++ ) {
+ elem = elements[ index ];
+ if ( !elem.style ) {
+ continue;
+ }
+
+ display = elem.style.display;
+ if ( show ) {
+ if ( display === "none" ) {
+
+ // Restore a pre-hide() value if we have one
+ values[ index ] = dataPriv.get( elem, "display" ) || "";
+ }
+ } else {
+ if ( display !== "none" ) {
+ values[ index ] = "none";
+
+ // Remember the value we're replacing
+ dataPriv.set( elem, "display", display );
+ }
+ }
+ }
+
+ // Set the display of the elements in a second loop
+ // to avoid the constant reflow
+ for ( index = 0; index < length; index++ ) {
+ if ( values[ index ] != null ) {
+ elements[ index ].style.display = values[ index ];
+ }
+ }
+
+ return elements;
+}
+
+return showHide;
+
+} );
diff --git a/templates/assets/jquery/src/css/support.js b/templates/assets/jquery/src/css/support.js
new file mode 100644
index 0000000..7e6e513
--- /dev/null
+++ b/templates/assets/jquery/src/css/support.js
@@ -0,0 +1,121 @@
+define( [
+ "../core",
+ "../var/document",
+ "../var/documentElement",
+ "../var/support"
+], function( jQuery, document, documentElement, support ) {
+
+( function() {
+ var pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal,
+ container = document.createElement( "div" ),
+ div = document.createElement( "div" );
+
+ // Finish early in limited (non-browser) environments
+ if ( !div.style ) {
+ return;
+ }
+
+ // Support: IE9-11+
+ // Style of cloned element affects source element cloned (#8908)
+ div.style.backgroundClip = "content-box";
+ div.cloneNode( true ).style.backgroundClip = "";
+ support.clearCloneStyle = div.style.backgroundClip === "content-box";
+
+ container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" +
+ "padding:0;margin-top:1px;position:absolute";
+ container.appendChild( div );
+
+ // Executing both pixelPosition & boxSizingReliable tests require only one layout
+ // so they're executed at the same time to save the second computation.
+ function computeStyleTests() {
+ div.style.cssText =
+
+ // Support: Firefox<29, Android 2.3
+ // Vendor-prefix box-sizing
+ "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;" +
+ "position:relative;display:block;" +
+ "margin:auto;border:1px;padding:1px;" +
+ "top:1%;width:50%";
+ div.innerHTML = "";
+ documentElement.appendChild( container );
+
+ var divStyle = window.getComputedStyle( div );
+ pixelPositionVal = divStyle.top !== "1%";
+ reliableMarginLeftVal = divStyle.marginLeft === "2px";
+ boxSizingReliableVal = divStyle.width === "4px";
+
+ // Support: Android 4.0 - 4.3 only
+ // Some styles come back with percentage values, even though they shouldn't
+ div.style.marginRight = "50%";
+ pixelMarginRightVal = divStyle.marginRight === "4px";
+
+ documentElement.removeChild( container );
+ }
+
+ jQuery.extend( support, {
+ pixelPosition: function() {
+
+ // This test is executed only once but we still do memoizing
+ // since we can use the boxSizingReliable pre-computing.
+ // No need to check if the test was already performed, though.
+ computeStyleTests();
+ return pixelPositionVal;
+ },
+ boxSizingReliable: function() {
+ if ( boxSizingReliableVal == null ) {
+ computeStyleTests();
+ }
+ return boxSizingReliableVal;
+ },
+ pixelMarginRight: function() {
+
+ // Support: Android 4.0-4.3
+ // We're checking for boxSizingReliableVal here instead of pixelMarginRightVal
+ // since that compresses better and they're computed together anyway.
+ if ( boxSizingReliableVal == null ) {
+ computeStyleTests();
+ }
+ return pixelMarginRightVal;
+ },
+ reliableMarginLeft: function() {
+
+ // Support: IE <=8 only, Android 4.0 - 4.3 only, Firefox <=3 - 37
+ if ( boxSizingReliableVal == null ) {
+ computeStyleTests();
+ }
+ return reliableMarginLeftVal;
+ },
+ reliableMarginRight: function() {
+
+ // Support: Android 2.3
+ // Check if div with explicit width and no margin-right incorrectly
+ // gets computed margin-right based on width of container. (#3333)
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+ // This support function is only executed once so no memoizing is needed.
+ var ret,
+ marginDiv = div.appendChild( document.createElement( "div" ) );
+
+ // Reset CSS: box-sizing; display; margin; border; padding
+ marginDiv.style.cssText = div.style.cssText =
+
+ // Support: Android 2.3
+ // Vendor-prefix box-sizing
+ "-webkit-box-sizing:content-box;box-sizing:content-box;" +
+ "display:block;margin:0;border:0;padding:0";
+ marginDiv.style.marginRight = marginDiv.style.width = "0";
+ div.style.width = "1px";
+ documentElement.appendChild( container );
+
+ ret = !parseFloat( window.getComputedStyle( marginDiv ).marginRight );
+
+ documentElement.removeChild( container );
+ div.removeChild( marginDiv );
+
+ return ret;
+ }
+ } );
+} )();
+
+return support;
+
+} );
diff --git a/templates/assets/jquery/src/data.js b/templates/assets/jquery/src/data.js
new file mode 100644
index 0000000..b626fda
--- /dev/null
+++ b/templates/assets/jquery/src/data.js
@@ -0,0 +1,187 @@
+define( [
+ "./core",
+ "./core/access",
+ "./data/var/dataPriv",
+ "./data/var/dataUser"
+], function( jQuery, access, dataPriv, dataUser ) {
+
+// Implementation Summary
+//
+// 1. Enforce API surface and semantic compatibility with 1.9.x branch
+// 2. Improve the module's maintainability by reducing the storage
+// paths to a single mechanism.
+// 3. Use the same single mechanism to support "private" and "user" data.
+// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
+// 5. Avoid exposing implementation details on user objects (eg. expando properties)
+// 6. Provide a clear path for implementation upgrade to WeakMap in 2014
+
+var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
+ rmultiDash = /[A-Z]/g;
+
+function dataAttr( elem, key, data ) {
+ var name;
+
+ // If nothing was found internally, try to fetch any
+ // data from the HTML5 data-* attribute
+ if ( data === undefined && elem.nodeType === 1 ) {
+ name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();
+ data = elem.getAttribute( name );
+
+ if ( typeof data === "string" ) {
+ try {
+ data = data === "true" ? true :
+ data === "false" ? false :
+ data === "null" ? null :
+
+ // Only convert to a number if it doesn't change the string
+ +data + "" === data ? +data :
+ rbrace.test( data ) ? jQuery.parseJSON( data ) :
+ data;
+ } catch ( e ) {}
+
+ // Make sure we set the data so it isn't changed later
+ dataUser.set( elem, key, data );
+ } else {
+ data = undefined;
+ }
+ }
+ return data;
+}
+
+jQuery.extend( {
+ hasData: function( elem ) {
+ return dataUser.hasData( elem ) || dataPriv.hasData( elem );
+ },
+
+ data: function( elem, name, data ) {
+ return dataUser.access( elem, name, data );
+ },
+
+ removeData: function( elem, name ) {
+ dataUser.remove( elem, name );
+ },
+
+ // TODO: Now that all calls to _data and _removeData have been replaced
+ // with direct calls to dataPriv methods, these can be deprecated.
+ _data: function( elem, name, data ) {
+ return dataPriv.access( elem, name, data );
+ },
+
+ _removeData: function( elem, name ) {
+ dataPriv.remove( elem, name );
+ }
+} );
+
+jQuery.fn.extend( {
+ data: function( key, value ) {
+ var i, name, data,
+ elem = this[ 0 ],
+ attrs = elem && elem.attributes;
+
+ // Gets all values
+ if ( key === undefined ) {
+ if ( this.length ) {
+ data = dataUser.get( elem );
+
+ if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {
+ i = attrs.length;
+ while ( i-- ) {
+
+ // Support: IE11+
+ // The attrs elements can be null (#14894)
+ if ( attrs[ i ] ) {
+ name = attrs[ i ].name;
+ if ( name.indexOf( "data-" ) === 0 ) {
+ name = jQuery.camelCase( name.slice( 5 ) );
+ dataAttr( elem, name, data[ name ] );
+ }
+ }
+ }
+ dataPriv.set( elem, "hasDataAttrs", true );
+ }
+ }
+
+ return data;
+ }
+
+ // Sets multiple values
+ if ( typeof key === "object" ) {
+ return this.each( function() {
+ dataUser.set( this, key );
+ } );
+ }
+
+ return access( this, function( value ) {
+ var data, camelKey;
+
+ // The calling jQuery object (element matches) is not empty
+ // (and therefore has an element appears at this[ 0 ]) and the
+ // `value` parameter was not undefined. An empty jQuery object
+ // will result in `undefined` for elem = this[ 0 ] which will
+ // throw an exception if an attempt to read a data cache is made.
+ if ( elem && value === undefined ) {
+
+ // Attempt to get data from the cache
+ // with the key as-is
+ data = dataUser.get( elem, key ) ||
+
+ // Try to find dashed key if it exists (gh-2779)
+ // This is for 2.2.x only
+ dataUser.get( elem, key.replace( rmultiDash, "-$&" ).toLowerCase() );
+
+ if ( data !== undefined ) {
+ return data;
+ }
+
+ camelKey = jQuery.camelCase( key );
+
+ // Attempt to get data from the cache
+ // with the key camelized
+ data = dataUser.get( elem, camelKey );
+ if ( data !== undefined ) {
+ return data;
+ }
+
+ // Attempt to "discover" the data in
+ // HTML5 custom data-* attrs
+ data = dataAttr( elem, camelKey, undefined );
+ if ( data !== undefined ) {
+ return data;
+ }
+
+ // We tried really hard, but the data doesn't exist.
+ return;
+ }
+
+ // Set the data...
+ camelKey = jQuery.camelCase( key );
+ this.each( function() {
+
+ // First, attempt to store a copy or reference of any
+ // data that might've been store with a camelCased key.
+ var data = dataUser.get( this, camelKey );
+
+ // For HTML5 data-* attribute interop, we have to
+ // store property names with dashes in a camelCase form.
+ // This might not apply to all properties...*
+ dataUser.set( this, camelKey, value );
+
+ // *... In the case of properties that might _actually_
+ // have dashes, we need to also store a copy of that
+ // unchanged property.
+ if ( key.indexOf( "-" ) > -1 && data !== undefined ) {
+ dataUser.set( this, key, value );
+ }
+ } );
+ }, null, value, arguments.length > 1, null, true );
+ },
+
+ removeData: function( key ) {
+ return this.each( function() {
+ dataUser.remove( this, key );
+ } );
+ }
+} );
+
+return jQuery;
+} );
diff --git a/templates/assets/jquery/src/data/Data.js b/templates/assets/jquery/src/data/Data.js
new file mode 100644
index 0000000..0e29c1f
--- /dev/null
+++ b/templates/assets/jquery/src/data/Data.js
@@ -0,0 +1,200 @@
+define( [
+ "../core",
+ "../var/rnotwhite",
+ "./var/acceptData"
+], function( jQuery, rnotwhite, acceptData ) {
+
+function Data() {
+ this.expando = jQuery.expando + Data.uid++;
+}
+
+Data.uid = 1;
+
+Data.prototype = {
+
+ register: function( owner, initial ) {
+ var value = initial || {};
+
+ // If it is a node unlikely to be stringify-ed or looped over
+ // use plain assignment
+ if ( owner.nodeType ) {
+ owner[ this.expando ] = value;
+
+ // Otherwise secure it in a non-enumerable, non-writable property
+ // configurability must be true to allow the property to be
+ // deleted with the delete operator
+ } else {
+ Object.defineProperty( owner, this.expando, {
+ value: value,
+ writable: true,
+ configurable: true
+ } );
+ }
+ return owner[ this.expando ];
+ },
+ cache: function( owner ) {
+
+ // We can accept data for non-element nodes in modern browsers,
+ // but we should not, see #8335.
+ // Always return an empty object.
+ if ( !acceptData( owner ) ) {
+ return {};
+ }
+
+ // Check if the owner object already has a cache
+ var value = owner[ this.expando ];
+
+ // If not, create one
+ if ( !value ) {
+ value = {};
+
+ // We can accept data for non-element nodes in modern browsers,
+ // but we should not, see #8335.
+ // Always return an empty object.
+ if ( acceptData( owner ) ) {
+
+ // If it is a node unlikely to be stringify-ed or looped over
+ // use plain assignment
+ if ( owner.nodeType ) {
+ owner[ this.expando ] = value;
+
+ // Otherwise secure it in a non-enumerable property
+ // configurable must be true to allow the property to be
+ // deleted when data is removed
+ } else {
+ Object.defineProperty( owner, this.expando, {
+ value: value,
+ configurable: true
+ } );
+ }
+ }
+ }
+
+ return value;
+ },
+ set: function( owner, data, value ) {
+ var prop,
+ cache = this.cache( owner );
+
+ // Handle: [ owner, key, value ] args
+ if ( typeof data === "string" ) {
+ cache[ data ] = value;
+
+ // Handle: [ owner, { properties } ] args
+ } else {
+
+ // Copy the properties one-by-one to the cache object
+ for ( prop in data ) {
+ cache[ prop ] = data[ prop ];
+ }
+ }
+ return cache;
+ },
+ get: function( owner, key ) {
+ return key === undefined ?
+ this.cache( owner ) :
+ owner[ this.expando ] && owner[ this.expando ][ key ];
+ },
+ access: function( owner, key, value ) {
+ var stored;
+
+ // In cases where either:
+ //
+ // 1. No key was specified
+ // 2. A string key was specified, but no value provided
+ //
+ // Take the "read" path and allow the get method to determine
+ // which value to return, respectively either:
+ //
+ // 1. The entire cache object
+ // 2. The data stored at the key
+ //
+ if ( key === undefined ||
+ ( ( key && typeof key === "string" ) && value === undefined ) ) {
+
+ stored = this.get( owner, key );
+
+ return stored !== undefined ?
+ stored : this.get( owner, jQuery.camelCase( key ) );
+ }
+
+ // When the key is not a string, or both a key and value
+ // are specified, set or extend (existing objects) with either:
+ //
+ // 1. An object of properties
+ // 2. A key and value
+ //
+ this.set( owner, key, value );
+
+ // Since the "set" path can have two possible entry points
+ // return the expected data based on which path was taken[*]
+ return value !== undefined ? value : key;
+ },
+ remove: function( owner, key ) {
+ var i, name, camel,
+ cache = owner[ this.expando ];
+
+ if ( cache === undefined ) {
+ return;
+ }
+
+ if ( key === undefined ) {
+ this.register( owner );
+
+ } else {
+
+ // Support array or space separated string of keys
+ if ( jQuery.isArray( key ) ) {
+
+ // If "name" is an array of keys...
+ // When data is initially created, via ("key", "val") signature,
+ // keys will be converted to camelCase.
+ // Since there is no way to tell _how_ a key was added, remove
+ // both plain key and camelCase key. #12786
+ // This will only penalize the array argument path.
+ name = key.concat( key.map( jQuery.camelCase ) );
+ } else {
+ camel = jQuery.camelCase( key );
+
+ // Try the string as a key before any manipulation
+ if ( key in cache ) {
+ name = [ key, camel ];
+ } else {
+
+ // If a key with the spaces exists, use it.
+ // Otherwise, create an array by matching non-whitespace
+ name = camel;
+ name = name in cache ?
+ [ name ] : ( name.match( rnotwhite ) || [] );
+ }
+ }
+
+ i = name.length;
+
+ while ( i-- ) {
+ delete cache[ name[ i ] ];
+ }
+ }
+
+ // Remove the expando if there's no more data
+ if ( key === undefined || jQuery.isEmptyObject( cache ) ) {
+
+ // Support: Chrome <= 35-45+
+ // Webkit & Blink performance suffers when deleting properties
+ // from DOM nodes, so set to undefined instead
+ // https://code.google.com/p/chromium/issues/detail?id=378607
+ if ( owner.nodeType ) {
+ owner[ this.expando ] = undefined;
+ } else {
+ delete owner[ this.expando ];
+ }
+ }
+ },
+ hasData: function( owner ) {
+ var cache = owner[ this.expando ];
+ return cache !== undefined && !jQuery.isEmptyObject( cache );
+ }
+};
+
+return Data;
+} );
diff --git a/templates/assets/jquery/src/deferred.js b/templates/assets/jquery/src/deferred.js
new file mode 100644
index 0000000..d2cd608
--- /dev/null
+++ b/templates/assets/jquery/src/deferred.js
@@ -0,0 +1,158 @@
+define( [
+ "./core",
+ "./var/slice",
+ "./callbacks"
+], function( jQuery, slice ) {
+
+jQuery.extend( {
+
+ Deferred: function( func ) {
+ var tuples = [
+
+ // action, add listener, listener list, final state
+ [ "resolve", "done", jQuery.Callbacks( "once memory" ), "resolved" ],
+ [ "reject", "fail", jQuery.Callbacks( "once memory" ), "rejected" ],
+ [ "notify", "progress", jQuery.Callbacks( "memory" ) ]
+ ],
+ state = "pending",
+ promise = {
+ state: function() {
+ return state;
+ },
+ always: function() {
+ deferred.done( arguments ).fail( arguments );
+ return this;
+ },
+ then: function( /* fnDone, fnFail, fnProgress */ ) {
+ var fns = arguments;
+ return jQuery.Deferred( function( newDefer ) {
+ jQuery.each( tuples, function( i, tuple ) {
+ var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
+
+ // deferred[ done | fail | progress ] for forwarding actions to newDefer
+ deferred[ tuple[ 1 ] ]( function() {
+ var returned = fn && fn.apply( this, arguments );
+ if ( returned && jQuery.isFunction( returned.promise ) ) {
+ returned.promise()
+ .progress( newDefer.notify )
+ .done( newDefer.resolve )
+ .fail( newDefer.reject );
+ } else {
+ newDefer[ tuple[ 0 ] + "With" ](
+ this === promise ? newDefer.promise() : this,
+ fn ? [ returned ] : arguments
+ );
+ }
+ } );
+ } );
+ fns = null;
+ } ).promise();
+ },
+
+ // Get a promise for this deferred
+ // If obj is provided, the promise aspect is added to the object
+ promise: function( obj ) {
+ return obj != null ? jQuery.extend( obj, promise ) : promise;
+ }
+ },
+ deferred = {};
+
+ // Keep pipe for back-compat
+ promise.pipe = promise.then;
+
+ // Add list-specific methods
+ jQuery.each( tuples, function( i, tuple ) {
+ var list = tuple[ 2 ],
+ stateString = tuple[ 3 ];
+
+ // promise[ done | fail | progress ] = list.add
+ promise[ tuple[ 1 ] ] = list.add;
+
+ // Handle state
+ if ( stateString ) {
+ list.add( function() {
+
+ // state = [ resolved | rejected ]
+ state = stateString;
+
+ // [ reject_list | resolve_list ].disable; progress_list.lock
+ }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
+ }
+
+ // deferred[ resolve | reject | notify ]
+ deferred[ tuple[ 0 ] ] = function() {
+ deferred[ tuple[ 0 ] + "With" ]( this === deferred ? promise : this, arguments );
+ return this;
+ };
+ deferred[ tuple[ 0 ] + "With" ] = list.fireWith;
+ } );
+
+ // Make the deferred a promise
+ promise.promise( deferred );
+
+ // Call given func if any
+ if ( func ) {
+ func.call( deferred, deferred );
+ }
+
+ // All done!
+ return deferred;
+ },
+
+ // Deferred helper
+ when: function( subordinate /* , ..., subordinateN */ ) {
+ var i = 0,
+ resolveValues = slice.call( arguments ),
+ length = resolveValues.length,
+
+ // the count of uncompleted subordinates
+ remaining = length !== 1 ||
+ ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
+
+ // the master Deferred.
+ // If resolveValues consist of only a single Deferred, just use that.
+ deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
+
+ // Update function for both resolve and progress values
+ updateFunc = function( i, contexts, values ) {
+ return function( value ) {
+ contexts[ i ] = this;
+ values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
+ if ( values === progressValues ) {
+ deferred.notifyWith( contexts, values );
+ } else if ( !( --remaining ) ) {
+ deferred.resolveWith( contexts, values );
+ }
+ };
+ },
+
+ progressValues, progressContexts, resolveContexts;
+
+ // Add listeners to Deferred subordinates; treat others as resolved
+ if ( length > 1 ) {
+ progressValues = new Array( length );
+ progressContexts = new Array( length );
+ resolveContexts = new Array( length );
+ for ( ; i < length; i++ ) {
+ if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
+ resolveValues[ i ].promise()
+ .progress( updateFunc( i, progressContexts, progressValues ) )
+ .done( updateFunc( i, resolveContexts, resolveValues ) )
+ .fail( deferred.reject );
+ } else {
+ --remaining;
+ }
+ }
+ }
+
+ // If we're not waiting on anything, resolve the master
+ if ( !remaining ) {
+ deferred.resolveWith( resolveContexts, resolveValues );
+ }
+
+ return deferred.promise();
+ }
+} );
+
+return jQuery;
+} );
diff --git a/templates/assets/jquery/src/deprecated.js b/templates/assets/jquery/src/deprecated.js
new file mode 100644
index 0000000..c829890
--- /dev/null
+++ b/templates/assets/jquery/src/deprecated.js
@@ -0,0 +1,32 @@
+define( [
+ "./core"
+], function( jQuery ) {
+
+jQuery.fn.extend( {
+
+ bind: function( types, data, fn ) {
+ return this.on( types, null, data, fn );
+ },
+ unbind: function( types, fn ) {
+ return this.off( types, null, fn );
+ },
+
+ delegate: function( selector, types, data, fn ) {
+ return this.on( types, selector, data, fn );
+ },
+ undelegate: function( selector, types, fn ) {
+
+ // ( namespace ) or ( selector, types [, fn] )
+ return arguments.length === 1 ?
+ this.off( selector, "**" ) :
+ this.off( types, selector || "**", fn );
+ },
+ size: function() {
+ return this.length;
+ }
+} );
+
+jQuery.fn.andSelf = jQuery.fn.addBack;
+
+} );
+
diff --git a/templates/assets/jquery/src/dimensions.js b/templates/assets/jquery/src/dimensions.js
new file mode 100644
index 0000000..30b55fb
--- /dev/null
+++ b/templates/assets/jquery/src/dimensions.js
@@ -0,0 +1,54 @@
+define( [
+ "./core",
+ "./core/access",
+ "./css"
+], function( jQuery, access ) {
+
+// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
+jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
+ jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name },
+ function( defaultExtra, funcName ) {
+
+ // Margin is only for outerHeight, outerWidth
+ jQuery.fn[ funcName ] = function( margin, value ) {
+ var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
+ extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
+
+ return access( this, function( elem, type, value ) {
+ var doc;
+
+ if ( jQuery.isWindow( elem ) ) {
+
+ // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
+ // isn't a whole lot we can do. See pull request at this URL for discussion:
+ // https://github.com/jquery/jquery/pull/764
+ return elem.document.documentElement[ "client" + name ];
+ }
+
+ // Get document width or height
+ if ( elem.nodeType === 9 ) {
+ doc = elem.documentElement;
+
+ // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
+ // whichever is greatest
+ return Math.max(
+ elem.body[ "scroll" + name ], doc[ "scroll" + name ],
+ elem.body[ "offset" + name ], doc[ "offset" + name ],
+ doc[ "client" + name ]
+ );
+ }
+
+ return value === undefined ?
+
+ // Get width or height on the element, requesting but not forcing parseFloat
+ jQuery.css( elem, type, extra ) :
+
+ // Set width or height on the element
+ jQuery.style( elem, type, value, extra );
+ }, type, chainable ? margin : undefined, chainable, null );
+ };
+ } );
+} );
+
+return jQuery;
+} );
diff --git a/templates/assets/jquery/src/effects.js b/templates/assets/jquery/src/effects.js
new file mode 100644
index 0000000..178fa42
--- /dev/null
+++ b/templates/assets/jquery/src/effects.js
@@ -0,0 +1,629 @@
+define( [
+ "./core",
+ "./var/document",
+ "./var/rcssNum",
+ "./css/var/cssExpand",
+ "./var/rnotwhite",
+ "./css/var/isHidden",
+ "./css/adjustCSS",
+ "./css/defaultDisplay",
+ "./data/var/dataPriv",
+
+ "./core/init",
+ "./effects/Tween",
+ "./queue",
+ "./css",
+ "./deferred",
+ "./traversing"
+], function( jQuery, document, rcssNum, cssExpand, rnotwhite,
+ isHidden, adjustCSS, defaultDisplay, dataPriv ) {
+
+var
+ fxNow, timerId,
+ rfxtypes = /^(?:toggle|show|hide)$/,
+ rrun = /queueHooks$/;
+
+// Animations created synchronously will run synchronously
+function createFxNow() {
+ window.setTimeout( function() {
+ fxNow = undefined;
+ } );
+ return ( fxNow = jQuery.now() );
+}
+
+// Generate parameters to create a standard animation
+function genFx( type, includeWidth ) {
+ var which,
+ i = 0,
+ attrs = { height: type };
+
+ // If we include width, step value is 1 to do all cssExpand values,
+ // otherwise step value is 2 to skip over Left and Right
+ includeWidth = includeWidth ? 1 : 0;
+ for ( ; i < 4 ; i += 2 - includeWidth ) {
+ which = cssExpand[ i ];
+ attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
+ }
+
+ if ( includeWidth ) {
+ attrs.opacity = attrs.width = type;
+ }
+
+ return attrs;
+}
+
+function createTween( value, prop, animation ) {
+ var tween,
+ collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ),
+ index = 0,
+ length = collection.length;
+ for ( ; index < length; index++ ) {
+ if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {
+
+ // We're done with this property
+ return tween;
+ }
+ }
+}
+
+function defaultPrefilter( elem, props, opts ) {
+ /* jshint validthis: true */
+ var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
+ anim = this,
+ orig = {},
+ style = elem.style,
+ hidden = elem.nodeType && isHidden( elem ),
+ dataShow = dataPriv.get( elem, "fxshow" );
+
+ // Handle queue: false promises
+ if ( !opts.queue ) {
+ hooks = jQuery._queueHooks( elem, "fx" );
+ if ( hooks.unqueued == null ) {
+ hooks.unqueued = 0;
+ oldfire = hooks.empty.fire;
+ hooks.empty.fire = function() {
+ if ( !hooks.unqueued ) {
+ oldfire();
+ }
+ };
+ }
+ hooks.unqueued++;
+
+ anim.always( function() {
+
+ // Ensure the complete handler is called before this completes
+ anim.always( function() {
+ hooks.unqueued--;
+ if ( !jQuery.queue( elem, "fx" ).length ) {
+ hooks.empty.fire();
+ }
+ } );
+ } );
+ }
+
+ // Height/width overflow pass
+ if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
+
+ // Make sure that nothing sneaks out
+ // Record all 3 overflow attributes because IE9-10 do not
+ // change the overflow attribute when overflowX and
+ // overflowY are set to the same value
+ opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
+
+ // Set display property to inline-block for height/width
+ // animations on inline elements that are having width/height animated
+ display = jQuery.css( elem, "display" );
+
+ // Test default display if display is currently "none"
+ checkDisplay = display === "none" ?
+ dataPriv.get( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display;
+
+ if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) {
+ style.display = "inline-block";
+ }
+ }
+
+ if ( opts.overflow ) {
+ style.overflow = "hidden";
+ anim.always( function() {
+ style.overflow = opts.overflow[ 0 ];
+ style.overflowX = opts.overflow[ 1 ];
+ style.overflowY = opts.overflow[ 2 ];
+ } );
+ }
+
+ // show/hide pass
+ for ( prop in props ) {
+ value = props[ prop ];
+ if ( rfxtypes.exec( value ) ) {
+ delete props[ prop ];
+ toggle = toggle || value === "toggle";
+ if ( value === ( hidden ? "hide" : "show" ) ) {
+
+ // If there is dataShow left over from a stopped hide or show
+ // and we are going to proceed with show, we should pretend to be hidden
+ if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
+ hidden = true;
+ } else {
+ continue;
+ }
+ }
+ orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
+
+ // Any non-fx value stops us from restoring the original display value
+ } else {
+ display = undefined;
+ }
+ }
+
+ if ( !jQuery.isEmptyObject( orig ) ) {
+ if ( dataShow ) {
+ if ( "hidden" in dataShow ) {
+ hidden = dataShow.hidden;
+ }
+ } else {
+ dataShow = dataPriv.access( elem, "fxshow", {} );
+ }
+
+ // Store state if its toggle - enables .stop().toggle() to "reverse"
+ if ( toggle ) {
+ dataShow.hidden = !hidden;
+ }
+ if ( hidden ) {
+ jQuery( elem ).show();
+ } else {
+ anim.done( function() {
+ jQuery( elem ).hide();
+ } );
+ }
+ anim.done( function() {
+ var prop;
+
+ dataPriv.remove( elem, "fxshow" );
+ for ( prop in orig ) {
+ jQuery.style( elem, prop, orig[ prop ] );
+ }
+ } );
+ for ( prop in orig ) {
+ tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
+
+ if ( !( prop in dataShow ) ) {
+ dataShow[ prop ] = tween.start;
+ if ( hidden ) {
+ tween.end = tween.start;
+ tween.start = prop === "width" || prop === "height" ? 1 : 0;
+ }
+ }
+ }
+
+ // If this is a noop like .hide().hide(), restore an overwritten display value
+ } else if ( ( display === "none" ? defaultDisplay( elem.nodeName ) : display ) === "inline" ) {
+ style.display = display;
+ }
+}
+
+function propFilter( props, specialEasing ) {
+ var index, name, easing, value, hooks;
+
+ // camelCase, specialEasing and expand cssHook pass
+ for ( index in props ) {
+ name = jQuery.camelCase( index );
+ easing = specialEasing[ name ];
+ value = props[ index ];
+ if ( jQuery.isArray( value ) ) {
+ easing = value[ 1 ];
+ value = props[ index ] = value[ 0 ];
+ }
+
+ if ( index !== name ) {
+ props[ name ] = value;
+ delete props[ index ];
+ }
+
+ hooks = jQuery.cssHooks[ name ];
+ if ( hooks && "expand" in hooks ) {
+ value = hooks.expand( value );
+ delete props[ name ];
+
+ // Not quite $.extend, this won't overwrite existing keys.
+ // Reusing 'index' because we have the correct "name"
+ for ( index in value ) {
+ if ( !( index in props ) ) {
+ props[ index ] = value[ index ];
+ specialEasing[ index ] = easing;
+ }
+ }
+ } else {
+ specialEasing[ name ] = easing;
+ }
+ }
+}
+
+function Animation( elem, properties, options ) {
+ var result,
+ stopped,
+ index = 0,
+ length = Animation.prefilters.length,
+ deferred = jQuery.Deferred().always( function() {
+
+ // Don't match elem in the :animated selector
+ delete tick.elem;
+ } ),
+ tick = function() {
+ if ( stopped ) {
+ return false;
+ }
+ var currentTime = fxNow || createFxNow(),
+ remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
+
+ // Support: Android 2.3
+ // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)
+ temp = remaining / animation.duration || 0,
+ percent = 1 - temp,
+ index = 0,
+ length = animation.tweens.length;
+
+ for ( ; index < length ; index++ ) {
+ animation.tweens[ index ].run( percent );
+ }
+
+ deferred.notifyWith( elem, [ animation, percent, remaining ] );
+
+ if ( percent < 1 && length ) {
+ return remaining;
+ } else {
+ deferred.resolveWith( elem, [ animation ] );
+ return false;
+ }
+ },
+ animation = deferred.promise( {
+ elem: elem,
+ props: jQuery.extend( {}, properties ),
+ opts: jQuery.extend( true, {
+ specialEasing: {},
+ easing: jQuery.easing._default
+ }, options ),
+ originalProperties: properties,
+ originalOptions: options,
+ startTime: fxNow || createFxNow(),
+ duration: options.duration,
+ tweens: [],
+ createTween: function( prop, end ) {
+ var tween = jQuery.Tween( elem, animation.opts, prop, end,
+ animation.opts.specialEasing[ prop ] || animation.opts.easing );
+ animation.tweens.push( tween );
+ return tween;
+ },
+ stop: function( gotoEnd ) {
+ var index = 0,
+
+ // If we are going to the end, we want to run all the tweens
+ // otherwise we skip this part
+ length = gotoEnd ? animation.tweens.length : 0;
+ if ( stopped ) {
+ return this;
+ }
+ stopped = true;
+ for ( ; index < length ; index++ ) {
+ animation.tweens[ index ].run( 1 );
+ }
+
+ // Resolve when we played the last frame; otherwise, reject
+ if ( gotoEnd ) {
+ deferred.notifyWith( elem, [ animation, 1, 0 ] );
+ deferred.resolveWith( elem, [ animation, gotoEnd ] );
+ } else {
+ deferred.rejectWith( elem, [ animation, gotoEnd ] );
+ }
+ return this;
+ }
+ } ),
+ props = animation.props;
+
+ propFilter( props, animation.opts.specialEasing );
+
+ for ( ; index < length ; index++ ) {
+ result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );
+ if ( result ) {
+ if ( jQuery.isFunction( result.stop ) ) {
+ jQuery._queueHooks( animation.elem, animation.opts.queue ).stop =
+ jQuery.proxy( result.stop, result );
+ }
+ return result;
+ }
+ }
+
+ jQuery.map( props, createTween, animation );
+
+ if ( jQuery.isFunction( animation.opts.start ) ) {
+ animation.opts.start.call( elem, animation );
+ }
+
+ jQuery.fx.timer(
+ jQuery.extend( tick, {
+ elem: elem,
+ anim: animation,
+ queue: animation.opts.queue
+ } )
+ );
+
+ // attach callbacks from options
+ return animation.progress( animation.opts.progress )
+ .done( animation.opts.done, animation.opts.complete )
+ .fail( animation.opts.fail )
+ .always( animation.opts.always );
+}
+
+jQuery.Animation = jQuery.extend( Animation, {
+ tweeners: {
+ "*": [ function( prop, value ) {
+ var tween = this.createTween( prop, value );
+ adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );
+ return tween;
+ } ]
+ },
+
+ tweener: function( props, callback ) {
+ if ( jQuery.isFunction( props ) ) {
+ callback = props;
+ props = [ "*" ];
+ } else {
+ props = props.match( rnotwhite );
+ }
+
+ var prop,
+ index = 0,
+ length = props.length;
+
+ for ( ; index < length ; index++ ) {
+ prop = props[ index ];
+ Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];
+ Animation.tweeners[ prop ].unshift( callback );
+ }
+ },
+
+ prefilters: [ defaultPrefilter ],
+
+ prefilter: function( callback, prepend ) {
+ if ( prepend ) {
+ Animation.prefilters.unshift( callback );
+ } else {
+ Animation.prefilters.push( callback );
+ }
+ }
+} );
+
+jQuery.speed = function( speed, easing, fn ) {
+ var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
+ complete: fn || !fn && easing ||
+ jQuery.isFunction( speed ) && speed,
+ duration: speed,
+ easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
+ };
+
+ opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ?
+ opt.duration : opt.duration in jQuery.fx.speeds ?
+ jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
+
+ // Normalize opt.queue - true/undefined/null -> "fx"
+ if ( opt.queue == null || opt.queue === true ) {
+ opt.queue = "fx";
+ }
+
+ // Queueing
+ opt.old = opt.complete;
+
+ opt.complete = function() {
+ if ( jQuery.isFunction( opt.old ) ) {
+ opt.old.call( this );
+ }
+
+ if ( opt.queue ) {
+ jQuery.dequeue( this, opt.queue );
+ }
+ };
+
+ return opt;
+};
+
+jQuery.fn.extend( {
+ fadeTo: function( speed, to, easing, callback ) {
+
+ // Show any hidden elements after setting opacity to 0
+ return this.filter( isHidden ).css( "opacity", 0 ).show()
+
+ // Animate to the value specified
+ .end().animate( { opacity: to }, speed, easing, callback );
+ },
+ animate: function( prop, speed, easing, callback ) {
+ var empty = jQuery.isEmptyObject( prop ),
+ optall = jQuery.speed( speed, easing, callback ),
+ doAnimation = function() {
+
+ // Operate on a copy of prop so per-property easing won't be lost
+ var anim = Animation( this, jQuery.extend( {}, prop ), optall );
+
+ // Empty animations, or finishing resolves immediately
+ if ( empty || dataPriv.get( this, "finish" ) ) {
+ anim.stop( true );
+ }
+ };
+ doAnimation.finish = doAnimation;
+
+ return empty || optall.queue === false ?
+ this.each( doAnimation ) :
+ this.queue( optall.queue, doAnimation );
+ },
+ stop: function( type, clearQueue, gotoEnd ) {
+ var stopQueue = function( hooks ) {
+ var stop = hooks.stop;
+ delete hooks.stop;
+ stop( gotoEnd );
+ };
+
+ if ( typeof type !== "string" ) {
+ gotoEnd = clearQueue;
+ clearQueue = type;
+ type = undefined;
+ }
+ if ( clearQueue && type !== false ) {
+ this.queue( type || "fx", [] );
+ }
+
+ return this.each( function() {
+ var dequeue = true,
+ index = type != null && type + "queueHooks",
+ timers = jQuery.timers,
+ data = dataPriv.get( this );
+
+ if ( index ) {
+ if ( data[ index ] && data[ index ].stop ) {
+ stopQueue( data[ index ] );
+ }
+ } else {
+ for ( index in data ) {
+ if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
+ stopQueue( data[ index ] );
+ }
+ }
+ }
+
+ for ( index = timers.length; index--; ) {
+ if ( timers[ index ].elem === this &&
+ ( type == null || timers[ index ].queue === type ) ) {
+
+ timers[ index ].anim.stop( gotoEnd );
+ dequeue = false;
+ timers.splice( index, 1 );
+ }
+ }
+
+ // Start the next in the queue if the last step wasn't forced.
+ // Timers currently will call their complete callbacks, which
+ // will dequeue but only if they were gotoEnd.
+ if ( dequeue || !gotoEnd ) {
+ jQuery.dequeue( this, type );
+ }
+ } );
+ },
+ finish: function( type ) {
+ if ( type !== false ) {
+ type = type || "fx";
+ }
+ return this.each( function() {
+ var index,
+ data = dataPriv.get( this ),
+ queue = data[ type + "queue" ],
+ hooks = data[ type + "queueHooks" ],
+ timers = jQuery.timers,
+ length = queue ? queue.length : 0;
+
+ // Enable finishing flag on private data
+ data.finish = true;
+
+ // Empty the queue first
+ jQuery.queue( this, type, [] );
+
+ if ( hooks && hooks.stop ) {
+ hooks.stop.call( this, true );
+ }
+
+ // Look for any active animations, and finish them
+ for ( index = timers.length; index--; ) {
+ if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
+ timers[ index ].anim.stop( true );
+ timers.splice( index, 1 );
+ }
+ }
+
+ // Look for any animations in the old queue and finish them
+ for ( index = 0; index < length; index++ ) {
+ if ( queue[ index ] && queue[ index ].finish ) {
+ queue[ index ].finish.call( this );
+ }
+ }
+
+ // Turn off finishing flag
+ delete data.finish;
+ } );
+ }
+} );
+
+jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) {
+ var cssFn = jQuery.fn[ name ];
+ jQuery.fn[ name ] = function( speed, easing, callback ) {
+ return speed == null || typeof speed === "boolean" ?
+ cssFn.apply( this, arguments ) :
+ this.animate( genFx( name, true ), speed, easing, callback );
+ };
+} );
+
+// Generate shortcuts for custom animations
+jQuery.each( {
+ slideDown: genFx( "show" ),
+ slideUp: genFx( "hide" ),
+ slideToggle: genFx( "toggle" ),
+ fadeIn: { opacity: "show" },
+ fadeOut: { opacity: "hide" },
+ fadeToggle: { opacity: "toggle" }
+}, function( name, props ) {
+ jQuery.fn[ name ] = function( speed, easing, callback ) {
+ return this.animate( props, speed, easing, callback );
+ };
+} );
+
+jQuery.timers = [];
+jQuery.fx.tick = function() {
+ var timer,
+ i = 0,
+ timers = jQuery.timers;
+
+ fxNow = jQuery.now();
+
+ for ( ; i < timers.length; i++ ) {
+ timer = timers[ i ];
+
+ // Checks the timer has not already been removed
+ if ( !timer() && timers[ i ] === timer ) {
+ timers.splice( i--, 1 );
+ }
+ }
+
+ if ( !timers.length ) {
+ jQuery.fx.stop();
+ }
+ fxNow = undefined;
+};
+
+jQuery.fx.timer = function( timer ) {
+ jQuery.timers.push( timer );
+ if ( timer() ) {
+ jQuery.fx.start();
+ } else {
+ jQuery.timers.pop();
+ }
+};
+
+jQuery.fx.interval = 13;
+jQuery.fx.start = function() {
+ if ( !timerId ) {
+ timerId = window.setInterval( jQuery.fx.tick, jQuery.fx.interval );
+ }
+};
+
+jQuery.fx.stop = function() {
+ window.clearInterval( timerId );
+
+ timerId = null;
+};
+
+jQuery.fx.speeds = {
+ slow: 600,
+ fast: 200,
+
+ // Default speed
+ _default: 400
+};
+
+return jQuery;
+} );
diff --git a/templates/assets/jquery/src/effects/Tween.js b/templates/assets/jquery/src/effects/Tween.js
new file mode 100644
index 0000000..d26ddd9
--- /dev/null
+++ b/templates/assets/jquery/src/effects/Tween.js
@@ -0,0 +1,121 @@
+define( [
+ "../core",
+ "../css"
+], function( jQuery ) {
+
+function Tween( elem, options, prop, end, easing ) {
+ return new Tween.prototype.init( elem, options, prop, end, easing );
+}
+jQuery.Tween = Tween;
+
+Tween.prototype = {
+ constructor: Tween,
+ init: function( elem, options, prop, end, easing, unit ) {
+ this.elem = elem;
+ this.prop = prop;
+ this.easing = easing || jQuery.easing._default;
+ this.options = options;
+ this.start = this.now = this.cur();
+ this.end = end;
+ this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
+ },
+ cur: function() {
+ var hooks = Tween.propHooks[ this.prop ];
+
+ return hooks && hooks.get ?
+ hooks.get( this ) :
+ Tween.propHooks._default.get( this );
+ },
+ run: function( percent ) {
+ var eased,
+ hooks = Tween.propHooks[ this.prop ];
+
+ if ( this.options.duration ) {
+ this.pos = eased = jQuery.easing[ this.easing ](
+ percent, this.options.duration * percent, 0, 1, this.options.duration
+ );
+ } else {
+ this.pos = eased = percent;
+ }
+ this.now = ( this.end - this.start ) * eased + this.start;
+
+ if ( this.options.step ) {
+ this.options.step.call( this.elem, this.now, this );
+ }
+
+ if ( hooks && hooks.set ) {
+ hooks.set( this );
+ } else {
+ Tween.propHooks._default.set( this );
+ }
+ return this;
+ }
+};
+
+Tween.prototype.init.prototype = Tween.prototype;
+
+Tween.propHooks = {
+ _default: {
+ get: function( tween ) {
+ var result;
+
+ // Use a property on the element directly when it is not a DOM element,
+ // or when there is no matching style property that exists.
+ if ( tween.elem.nodeType !== 1 ||
+ tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {
+ return tween.elem[ tween.prop ];
+ }
+
+ // Passing an empty string as a 3rd parameter to .css will automatically
+ // attempt a parseFloat and fallback to a string if the parse fails.
+ // Simple values such as "10px" are parsed to Float;
+ // complex values such as "rotate(1rad)" are returned as-is.
+ result = jQuery.css( tween.elem, tween.prop, "" );
+
+ // Empty strings, null, undefined and "auto" are converted to 0.
+ return !result || result === "auto" ? 0 : result;
+ },
+ set: function( tween ) {
+
+ // Use step hook for back compat.
+ // Use cssHook if its there.
+ // Use .style if available and use plain properties where available.
+ if ( jQuery.fx.step[ tween.prop ] ) {
+ jQuery.fx.step[ tween.prop ]( tween );
+ } else if ( tween.elem.nodeType === 1 &&
+ ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null ||
+ jQuery.cssHooks[ tween.prop ] ) ) {
+ jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
+ } else {
+ tween.elem[ tween.prop ] = tween.now;
+ }
+ }
+ }
+};
+
+// Support: IE9
+// Panic based approach to setting things on disconnected nodes
+Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
+ set: function( tween ) {
+ if ( tween.elem.nodeType && tween.elem.parentNode ) {
+ tween.elem[ tween.prop ] = tween.now;
+ }
+ }
+};
+
+jQuery.easing = {
+ linear: function( p ) {
+ return p;
+ },
+ swing: function( p ) {
+ return 0.5 - Math.cos( p * Math.PI ) / 2;
+ },
+ _default: "swing"
+};
+
+jQuery.fx = Tween.prototype.init;
+
+// Back Compat <1.8 extension point
+jQuery.fx.step = {};
+
+} );
diff --git a/templates/assets/jquery/src/effects/animatedSelector.js b/templates/assets/jquery/src/effects/animatedSelector.js
new file mode 100644
index 0000000..d84c9c7
--- /dev/null
+++ b/templates/assets/jquery/src/effects/animatedSelector.js
@@ -0,0 +1,13 @@
+define( [
+ "../core",
+ "../selector",
+ "../effects"
+], function( jQuery ) {
+
+jQuery.expr.filters.animated = function( elem ) {
+ return jQuery.grep( jQuery.timers, function( fn ) {
+ return elem === fn.elem;
+ } ).length;
+};
+
+} );
diff --git a/templates/assets/jquery/src/event.js b/templates/assets/jquery/src/event.js
new file mode 100644
index 0000000..9ebbe2f
--- /dev/null
+++ b/templates/assets/jquery/src/event.js
@@ -0,0 +1,711 @@
+define( [
+ "./core",
+ "./var/document",
+ "./var/rnotwhite",
+ "./var/slice",
+ "./data/var/dataPriv",
+
+ "./core/init",
+ "./selector"
+], function( jQuery, document, rnotwhite, slice, dataPriv ) {
+
+var
+ rkeyEvent = /^key/,
+ rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
+ rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
+
+function returnTrue() {
+ return true;
+}
+
+function returnFalse() {
+ return false;
+}
+
+// Support: IE9
+// See #13393 for more info
+function safeActiveElement() {
+ try {
+ return document.activeElement;
+ } catch ( err ) { }
+}
+
+function on( elem, types, selector, data, fn, one ) {
+ var origFn, type;
+
+ // Types can be a map of types/handlers
+ if ( typeof types === "object" ) {
+
+ // ( types-Object, selector, data )
+ if ( typeof selector !== "string" ) {
+
+ // ( types-Object, data )
+ data = data || selector;
+ selector = undefined;
+ }
+ for ( type in types ) {
+ on( elem, type, selector, data, types[ type ], one );
+ }
+ return elem;
+ }
+
+ if ( data == null && fn == null ) {
+
+ // ( types, fn )
+ fn = selector;
+ data = selector = undefined;
+ } else if ( fn == null ) {
+ if ( typeof selector === "string" ) {
+
+ // ( types, selector, fn )
+ fn = data;
+ data = undefined;
+ } else {
+
+ // ( types, data, fn )
+ fn = data;
+ data = selector;
+ selector = undefined;
+ }
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ } else if ( !fn ) {
+ return elem;
+ }
+
+ if ( one === 1 ) {
+ origFn = fn;
+ fn = function( event ) {
+
+ // Can use an empty set, since event contains the info
+ jQuery().off( event );
+ return origFn.apply( this, arguments );
+ };
+
+ // Use same guid so caller can remove using origFn
+ fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
+ }
+ return elem.each( function() {
+ jQuery.event.add( this, types, fn, data, selector );
+ } );
+}
+
+/*
+ * Helper functions for managing events -- not part of the public interface.
+ * Props to Dean Edwards' addEvent library for many of the ideas.
+ */
+jQuery.event = {
+
+ global: {},
+
+ add: function( elem, types, handler, data, selector ) {
+
+ var handleObjIn, eventHandle, tmp,
+ events, t, handleObj,
+ special, handlers, type, namespaces, origType,
+ elemData = dataPriv.get( elem );
+
+ // Don't attach events to noData or text/comment nodes (but allow plain objects)
+ if ( !elemData ) {
+ return;
+ }
+
+ // Caller can pass in an object of custom data in lieu of the handler
+ if ( handler.handler ) {
+ handleObjIn = handler;
+ handler = handleObjIn.handler;
+ selector = handleObjIn.selector;
+ }
+
+ // Make sure that the handler has a unique ID, used to find/remove it later
+ if ( !handler.guid ) {
+ handler.guid = jQuery.guid++;
+ }
+
+ // Init the element's event structure and main handler, if this is the first
+ if ( !( events = elemData.events ) ) {
+ events = elemData.events = {};
+ }
+ if ( !( eventHandle = elemData.handle ) ) {
+ eventHandle = elemData.handle = function( e ) {
+
+ // Discard the second event of a jQuery.event.trigger() and
+ // when an event is called after a page has unloaded
+ return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
+ jQuery.event.dispatch.apply( elem, arguments ) : undefined;
+ };
+ }
+
+ // Handle multiple events separated by a space
+ types = ( types || "" ).match( rnotwhite ) || [ "" ];
+ t = types.length;
+ while ( t-- ) {
+ tmp = rtypenamespace.exec( types[ t ] ) || [];
+ type = origType = tmp[ 1 ];
+ namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
+
+ // There *must* be a type, no attaching namespace-only handlers
+ if ( !type ) {
+ continue;
+ }
+
+ // If event changes its type, use the special event handlers for the changed type
+ special = jQuery.event.special[ type ] || {};
+
+ // If selector defined, determine special event api type, otherwise given type
+ type = ( selector ? special.delegateType : special.bindType ) || type;
+
+ // Update special based on newly reset type
+ special = jQuery.event.special[ type ] || {};
+
+ // handleObj is passed to all event handlers
+ handleObj = jQuery.extend( {
+ type: type,
+ origType: origType,
+ data: data,
+ handler: handler,
+ guid: handler.guid,
+ selector: selector,
+ needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
+ namespace: namespaces.join( "." )
+ }, handleObjIn );
+
+ // Init the event handler queue if we're the first
+ if ( !( handlers = events[ type ] ) ) {
+ handlers = events[ type ] = [];
+ handlers.delegateCount = 0;
+
+ // Only use addEventListener if the special events handler returns false
+ if ( !special.setup ||
+ special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+
+ if ( elem.addEventListener ) {
+ elem.addEventListener( type, eventHandle );
+ }
+ }
+ }
+
+ if ( special.add ) {
+ special.add.call( elem, handleObj );
+
+ if ( !handleObj.handler.guid ) {
+ handleObj.handler.guid = handler.guid;
+ }
+ }
+
+ // Add to the element's handler list, delegates in front
+ if ( selector ) {
+ handlers.splice( handlers.delegateCount++, 0, handleObj );
+ } else {
+ handlers.push( handleObj );
+ }
+
+ // Keep track of which events have ever been used, for event optimization
+ jQuery.event.global[ type ] = true;
+ }
+
+ },
+
+ // Detach an event or set of events from an element
+ remove: function( elem, types, handler, selector, mappedTypes ) {
+
+ var j, origCount, tmp,
+ events, t, handleObj,
+ special, handlers, type, namespaces, origType,
+ elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );
+
+ if ( !elemData || !( events = elemData.events ) ) {
+ return;
+ }
+
+ // Once for each type.namespace in types; type may be omitted
+ types = ( types || "" ).match( rnotwhite ) || [ "" ];
+ t = types.length;
+ while ( t-- ) {
+ tmp = rtypenamespace.exec( types[ t ] ) || [];
+ type = origType = tmp[ 1 ];
+ namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
+
+ // Unbind all events (on this namespace, if provided) for the element
+ if ( !type ) {
+ for ( type in events ) {
+ jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
+ }
+ continue;
+ }
+
+ special = jQuery.event.special[ type ] || {};
+ type = ( selector ? special.delegateType : special.bindType ) || type;
+ handlers = events[ type ] || [];
+ tmp = tmp[ 2 ] &&
+ new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" );
+
+ // Remove matching events
+ origCount = j = handlers.length;
+ while ( j-- ) {
+ handleObj = handlers[ j ];
+
+ if ( ( mappedTypes || origType === handleObj.origType ) &&
+ ( !handler || handler.guid === handleObj.guid ) &&
+ ( !tmp || tmp.test( handleObj.namespace ) ) &&
+ ( !selector || selector === handleObj.selector ||
+ selector === "**" && handleObj.selector ) ) {
+ handlers.splice( j, 1 );
+
+ if ( handleObj.selector ) {
+ handlers.delegateCount--;
+ }
+ if ( special.remove ) {
+ special.remove.call( elem, handleObj );
+ }
+ }
+ }
+
+ // Remove generic event handler if we removed something and no more handlers exist
+ // (avoids potential for endless recursion during removal of special event handlers)
+ if ( origCount && !handlers.length ) {
+ if ( !special.teardown ||
+ special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
+
+ jQuery.removeEvent( elem, type, elemData.handle );
+ }
+
+ delete events[ type ];
+ }
+ }
+
+ // Remove data and the expando if it's no longer used
+ if ( jQuery.isEmptyObject( events ) ) {
+ dataPriv.remove( elem, "handle events" );
+ }
+ },
+
+ dispatch: function( event ) {
+
+ // Make a writable jQuery.Event from the native event object
+ event = jQuery.event.fix( event );
+
+ var i, j, ret, matched, handleObj,
+ handlerQueue = [],
+ args = slice.call( arguments ),
+ handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [],
+ special = jQuery.event.special[ event.type ] || {};
+
+ // Use the fix-ed jQuery.Event rather than the (read-only) native event
+ args[ 0 ] = event;
+ event.delegateTarget = this;
+
+ // Call the preDispatch hook for the mapped type, and let it bail if desired
+ if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
+ return;
+ }
+
+ // Determine handlers
+ handlerQueue = jQuery.event.handlers.call( this, event, handlers );
+
+ // Run delegates first; they may want to stop propagation beneath us
+ i = 0;
+ while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {
+ event.currentTarget = matched.elem;
+
+ j = 0;
+ while ( ( handleObj = matched.handlers[ j++ ] ) &&
+ !event.isImmediatePropagationStopped() ) {
+
+ // Triggered event must either 1) have no namespace, or 2) have namespace(s)
+ // a subset or equal to those in the bound event (both can have no namespace).
+ if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {
+
+ event.handleObj = handleObj;
+ event.data = handleObj.data;
+
+ ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
+ handleObj.handler ).apply( matched.elem, args );
+
+ if ( ret !== undefined ) {
+ if ( ( event.result = ret ) === false ) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ }
+ }
+ }
+ }
+
+ // Call the postDispatch hook for the mapped type
+ if ( special.postDispatch ) {
+ special.postDispatch.call( this, event );
+ }
+
+ return event.result;
+ },
+
+ handlers: function( event, handlers ) {
+ var i, matches, sel, handleObj,
+ handlerQueue = [],
+ delegateCount = handlers.delegateCount,
+ cur = event.target;
+
+ // Support (at least): Chrome, IE9
+ // Find delegate handlers
+ // Black-hole SVG <use> instance trees (#13180)
+ //
+ // Support: Firefox<=42+
+ // Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343)
+ if ( delegateCount && cur.nodeType &&
+ ( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) {
+
+ for ( ; cur !== this; cur = cur.parentNode || this ) {
+
+ // Don't check non-elements (#13208)
+ // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
+ if ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== "click" ) ) {
+ matches = [];
+ for ( i = 0; i < delegateCount; i++ ) {
+ handleObj = handlers[ i ];
+
+ // Don't conflict with Object.prototype properties (#13203)
+ sel = handleObj.selector + " ";
+
+ if ( matches[ sel ] === undefined ) {
+ matches[ sel ] = handleObj.needsContext ?
+ jQuery( sel, this ).index( cur ) > -1 :
+ jQuery.find( sel, this, null, [ cur ] ).length;
+ }
+ if ( matches[ sel ] ) {
+ matches.push( handleObj );
+ }
+ }
+ if ( matches.length ) {
+ handlerQueue.push( { elem: cur, handlers: matches } );
+ }
+ }
+ }
+ }
+
+ // Add the remaining (directly-bound) handlers
+ if ( delegateCount < handlers.length ) {
+ handlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } );
+ }
+
+ return handlerQueue;
+ },
+
+ // Includes some event props shared by KeyEvent and MouseEvent
+ props: ( "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase " +
+ "metaKey relatedTarget shiftKey target timeStamp view which" ).split( " " ),
+
+ fixHooks: {},
+
+ keyHooks: {
+ props: "char charCode key keyCode".split( " " ),
+ filter: function( event, original ) {
+
+ // Add which for key events
+ if ( event.which == null ) {
+ event.which = original.charCode != null ? original.charCode : original.keyCode;
+ }
+
+ return event;
+ }
+ },
+
+ mouseHooks: {
+ props: ( "button buttons clientX clientY offsetX offsetY pageX pageY " +
+ "screenX screenY toElement" ).split( " " ),
+ filter: function( event, original ) {
+ var eventDoc, doc, body,
+ button = original.button;
+
+ // Calculate pageX/Y if missing and clientX/Y available
+ if ( event.pageX == null && original.clientX != null ) {
+ eventDoc = event.target.ownerDocument || document;
+ doc = eventDoc.documentElement;
+ body = eventDoc.body;
+
+ event.pageX = original.clientX +
+ ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) -
+ ( doc && doc.clientLeft || body && body.clientLeft || 0 );
+ event.pageY = original.clientY +
+ ( doc && doc.scrollTop || body && body.scrollTop || 0 ) -
+ ( doc && doc.clientTop || body && body.clientTop || 0 );
+ }
+
+ // Add which for click: 1 === left; 2 === middle; 3 === right
+ // Note: button is not normalized, so don't use it
+ if ( !event.which && button !== undefined ) {
+ event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
+ }
+
+ return event;
+ }
+ },
+
+ fix: function( event ) {
+ if ( event[ jQuery.expando ] ) {
+ return event;
+ }
+
+ // Create a writable copy of the event object and normalize some properties
+ var i, prop, copy,
+ type = event.type,
+ originalEvent = event,
+ fixHook = this.fixHooks[ type ];
+
+ if ( !fixHook ) {
+ this.fixHooks[ type ] = fixHook =
+ rmouseEvent.test( type ) ? this.mouseHooks :
+ rkeyEvent.test( type ) ? this.keyHooks :
+ {};
+ }
+ copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
+
+ event = new jQuery.Event( originalEvent );
+
+ i = copy.length;
+ while ( i-- ) {
+ prop = copy[ i ];
+ event[ prop ] = originalEvent[ prop ];
+ }
+
+ // Support: Cordova 2.5 (WebKit) (#13255)
+ // All events should have a target; Cordova deviceready doesn't
+ if ( !event.target ) {
+ event.target = document;
+ }
+
+ // Support: Safari 6.0+, Chrome<28
+ // Target should not be a text node (#504, #13143)
+ if ( event.target.nodeType === 3 ) {
+ event.target = event.target.parentNode;
+ }
+
+ return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
+ },
+
+ special: {
+ load: {
+
+ // Prevent triggered image.load events from bubbling to window.load
+ noBubble: true
+ },
+ focus: {
+
+ // Fire native event if possible so blur/focus sequence is correct
+ trigger: function() {
+ if ( this !== safeActiveElement() && this.focus ) {
+ this.focus();
+ return false;
+ }
+ },
+ delegateType: "focusin"
+ },
+ blur: {
+ trigger: function() {
+ if ( this === safeActiveElement() && this.blur ) {
+ this.blur();
+ return false;
+ }
+ },
+ delegateType: "focusout"
+ },
+ click: {
+
+ // For checkbox, fire native event so checked state will be right
+ trigger: function() {
+ if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) {
+ this.click();
+ return false;
+ }
+ },
+
+ // For cross-browser consistency, don't fire native .click() on links
+ _default: function( event ) {
+ return jQuery.nodeName( event.target, "a" );
+ }
+ },
+
+ beforeunload: {
+ postDispatch: function( event ) {
+
+ // Support: Firefox 20+
+ // Firefox doesn't alert if the returnValue field is not set.
+ if ( event.result !== undefined && event.originalEvent ) {
+ event.originalEvent.returnValue = event.result;
+ }
+ }
+ }
+ }
+};
+
+jQuery.removeEvent = function( elem, type, handle ) {
+
+ // This "if" is needed for plain objects
+ if ( elem.removeEventListener ) {
+ elem.removeEventListener( type, handle );
+ }
+};
+
+jQuery.Event = function( src, props ) {
+
+ // Allow instantiation without the 'new' keyword
+ if ( !( this instanceof jQuery.Event ) ) {
+ return new jQuery.Event( src, props );
+ }
+
+ // Event object
+ if ( src && src.type ) {
+ this.originalEvent = src;
+ this.type = src.type;
+
+ // Events bubbling up the document may have been marked as prevented
+ // by a handler lower down the tree; reflect the correct value.
+ this.isDefaultPrevented = src.defaultPrevented ||
+ src.defaultPrevented === undefined &&
+
+ // Support: Android<4.0
+ src.returnValue === false ?
+ returnTrue :
+ returnFalse;
+
+ // Event type
+ } else {
+ this.type = src;
+ }
+
+ // Put explicitly provided properties onto the event object
+ if ( props ) {
+ jQuery.extend( this, props );
+ }
+
+ // Create a timestamp if incoming event doesn't have one
+ this.timeStamp = src && src.timeStamp || jQuery.now();
+
+ // Mark it as fixed
+ this[ jQuery.expando ] = true;
+};
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+ constructor: jQuery.Event,
+ isDefaultPrevented: returnFalse,
+ isPropagationStopped: returnFalse,
+ isImmediatePropagationStopped: returnFalse,
+ isSimulated: false,
+
+ preventDefault: function() {
+ var e = this.originalEvent;
+
+ this.isDefaultPrevented = returnTrue;
+
+ if ( e && !this.isSimulated ) {
+ e.preventDefault();
+ }
+ },
+ stopPropagation: function() {
+ var e = this.originalEvent;
+
+ this.isPropagationStopped = returnTrue;
+
+ if ( e && !this.isSimulated ) {
+ e.stopPropagation();
+ }
+ },
+ stopImmediatePropagation: function() {
+ var e = this.originalEvent;
+
+ this.isImmediatePropagationStopped = returnTrue;
+
+ if ( e && !this.isSimulated ) {
+ e.stopImmediatePropagation();
+ }
+
+ this.stopPropagation();
+ }
+};
+
+// Create mouseenter/leave events using mouseover/out and event-time checks
+// so that event delegation works in jQuery.
+// Do the same for pointerenter/pointerleave and pointerover/pointerout
+//
+// Support: Safari 7 only
+// Safari sends mouseenter too often; see:
+// https://code.google.com/p/chromium/issues/detail?id=470258
+// for the description of the bug (it existed in older Chrome versions as well).
+jQuery.each( {
+ mouseenter: "mouseover",
+ mouseleave: "mouseout",
+ pointerenter: "pointerover",
+ pointerleave: "pointerout"
+}, function( orig, fix ) {
+ jQuery.event.special[ orig ] = {
+ delegateType: fix,
+ bindType: fix,
+
+ handle: function( event ) {
+ var ret,
+ target = this,
+ related = event.relatedTarget,
+ handleObj = event.handleObj;
+
+ // For mouseenter/leave call the handler if related is outside the target.
+ // NB: No relatedTarget if the mouse left/entered the browser window
+ if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {
+ event.type = handleObj.origType;
+ ret = handleObj.handler.apply( this, arguments );
+ event.type = fix;
+ }
+ return ret;
+ }
+ };
+} );
+
+jQuery.fn.extend( {
+ on: function( types, selector, data, fn ) {
+ return on( this, types, selector, data, fn );
+ },
+ one: function( types, selector, data, fn ) {
+ return on( this, types, selector, data, fn, 1 );
+ },
+ off: function( types, selector, fn ) {
+ var handleObj, type;
+ if ( types && types.preventDefault && types.handleObj ) {
+
+ // ( event ) dispatched jQuery.Event
+ handleObj = types.handleObj;
+ jQuery( types.delegateTarget ).off(
+ handleObj.namespace ?
+ handleObj.origType + "." + handleObj.namespace :
+ handleObj.origType,
+ handleObj.selector,
+ handleObj.handler
+ );
+ return this;
+ }
+ if ( typeof types === "object" ) {
+
+ // ( types-object [, selector] )
+ for ( type in types ) {
+ this.off( type, selector, types[ type ] );
+ }
+ return this;
+ }
+ if ( selector === false || typeof selector === "function" ) {
+
+ // ( types [, fn] )
+ fn = selector;
+ selector = undefined;
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ }
+ return this.each( function() {
+ jQuery.event.remove( this, types, fn, selector );
+ } );
+ }
+} );
+
+return jQuery;
+} );
diff --git a/templates/assets/jquery/src/event/ajax.js b/templates/assets/jquery/src/event/ajax.js
new file mode 100644
index 0000000..98e194b
--- /dev/null
+++ b/templates/assets/jquery/src/event/ajax.js
@@ -0,0 +1,20 @@
+define( [
+ "../core",
+ "../event"
+], function( jQuery ) {
+
+// Attach a bunch of functions for handling common AJAX events
+jQuery.each( [
+ "ajaxStart",
+ "ajaxStop",
+ "ajaxComplete",
+ "ajaxError",
+ "ajaxSuccess",
+ "ajaxSend"
+], function( i, type ) {
+ jQuery.fn[ type ] = function( fn ) {
+ return this.on( type, fn );
+ };
+} );
+
+} );
diff --git a/templates/assets/jquery/src/event/alias.js b/templates/assets/jquery/src/event/alias.js
new file mode 100644
index 0000000..161c893
--- /dev/null
+++ b/templates/assets/jquery/src/event/alias.js
@@ -0,0 +1,27 @@
+define( [
+ "../core",
+
+ "../event",
+ "./trigger"
+], function( jQuery ) {
+
+jQuery.each( ( "blur focus focusin focusout load resize scroll unload click dblclick " +
+ "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+ "change select submit keydown keypress keyup error contextmenu" ).split( " " ),
+ function( i, name ) {
+
+ // Handle event binding
+ jQuery.fn[ name ] = function( data, fn ) {
+ return arguments.length > 0 ?
+ this.on( name, null, data, fn ) :
+ this.trigger( name );
+ };
+} );
+
+jQuery.fn.extend( {
+ hover: function( fnOver, fnOut ) {
+ return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+ }
+} );
+
+} );
diff --git a/templates/assets/jquery/src/event/focusin.js b/templates/assets/jquery/src/event/focusin.js
new file mode 100644
index 0000000..ae7f831
--- /dev/null
+++ b/templates/assets/jquery/src/event/focusin.js
@@ -0,0 +1,53 @@
+define( [
+ "../core",
+ "../data/var/dataPriv",
+ "./support",
+
+ "../event",
+ "./trigger"
+], function( jQuery, dataPriv, support ) {
+
+// Support: Firefox
+// Firefox doesn't have focus(in | out) events
+// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
+//
+// Support: Chrome, Safari
+// focus(in | out) events fire after focus & blur events,
+// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
+// Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857
+if ( !support.focusin ) {
+ jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+
+ // Attach a single capturing handler on the document while someone wants focusin/focusout
+ var handler = function( event ) {
+ jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );
+ };
+
+ jQuery.event.special[ fix ] = {
+ setup: function() {
+ var doc = this.ownerDocument || this,
+ attaches = dataPriv.access( doc, fix );
+
+ if ( !attaches ) {
+ doc.addEventListener( orig, handler, true );
+ }
+ dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );
+ },
+ teardown: function() {
+ var doc = this.ownerDocument || this,
+ attaches = dataPriv.access( doc, fix ) - 1;
+
+ if ( !attaches ) {
+ doc.removeEventListener( orig, handler, true );
+ dataPriv.remove( doc, fix );
+
+ } else {
+ dataPriv.access( doc, fix, attaches );
+ }
+ }
+ };
+ } );
+}
+
+return jQuery;
+} );
diff --git a/templates/assets/jquery/src/event/support.js b/templates/assets/jquery/src/event/support.js
new file mode 100644
index 0000000..1c4d416
--- /dev/null
+++ b/templates/assets/jquery/src/event/support.js
@@ -0,0 +1,9 @@
+define( [
+ "../var/support"
+], function( support ) {
+
+support.focusin = "onfocusin" in window;
+
+return support;
+
+} );
diff --git a/templates/assets/jquery/src/event/trigger.js b/templates/assets/jquery/src/event/trigger.js
new file mode 100644
index 0000000..75b9dd2
--- /dev/null
+++ b/templates/assets/jquery/src/event/trigger.js
@@ -0,0 +1,183 @@
+define( [
+ "../core",
+ "../var/document",
+ "../data/var/dataPriv",
+ "../data/var/acceptData",
+ "../var/hasOwn",
+
+ "../event"
+], function( jQuery, document, dataPriv, acceptData, hasOwn ) {
+
+var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/;
+
+jQuery.extend( jQuery.event, {
+
+ trigger: function( event, data, elem, onlyHandlers ) {
+
+ var i, cur, tmp, bubbleType, ontype, handle, special,
+ eventPath = [ elem || document ],
+ type = hasOwn.call( event, "type" ) ? event.type : event,
+ namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : [];
+
+ cur = tmp = elem = elem || document;
+
+ // Don't do events on text and comment nodes
+ if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+ return;
+ }
+
+ // focus/blur morphs to focusin/out; ensure we're not firing them right now
+ if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
+ return;
+ }
+
+ if ( type.indexOf( "." ) > -1 ) {
+
+ // Namespaced trigger; create a regexp to match event type in handle()
+ namespaces = type.split( "." );
+ type = namespaces.shift();
+ namespaces.sort();
+ }
+ ontype = type.indexOf( ":" ) < 0 && "on" + type;
+
+ // Caller can pass in a jQuery.Event object, Object, or just an event type string
+ event = event[ jQuery.expando ] ?
+ event :
+ new jQuery.Event( type, typeof event === "object" && event );
+
+ // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
+ event.isTrigger = onlyHandlers ? 2 : 3;
+ event.namespace = namespaces.join( "." );
+ event.rnamespace = event.namespace ?
+ new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) :
+ null;
+
+ // Clean up the event in case it is being reused
+ event.result = undefined;
+ if ( !event.target ) {
+ event.target = elem;
+ }
+
+ // Clone any incoming data and prepend the event, creating the handler arg list
+ data = data == null ?
+ [ event ] :
+ jQuery.makeArray( data, [ event ] );
+
+ // Allow special events to draw outside the lines
+ special = jQuery.event.special[ type ] || {};
+ if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
+ return;
+ }
+
+ // Determine event propagation path in advance, per W3C events spec (#9951)
+ // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
+ if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
+
+ bubbleType = special.delegateType || type;
+ if ( !rfocusMorph.test( bubbleType + type ) ) {
+ cur = cur.parentNode;
+ }
+ for ( ; cur; cur = cur.parentNode ) {
+ eventPath.push( cur );
+ tmp = cur;
+ }
+
+ // Only add window if we got to document (e.g., not plain obj or detached DOM)
+ if ( tmp === ( elem.ownerDocument || document ) ) {
+ eventPath.push( tmp.defaultView || tmp.parentWindow || window );
+ }
+ }
+
+ // Fire handlers on the event path
+ i = 0;
+ while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {
+
+ event.type = i > 1 ?
+ bubbleType :
+ special.bindType || type;
+
+ // jQuery handler
+ handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] &&
+ dataPriv.get( cur, "handle" );
+ if ( handle ) {
+ handle.apply( cur, data );
+ }
+
+ // Native handler
+ handle = ontype && cur[ ontype ];
+ if ( handle && handle.apply && acceptData( cur ) ) {
+ event.result = handle.apply( cur, data );
+ if ( event.result === false ) {
+ event.preventDefault();
+ }
+ }
+ }
+ event.type = type;
+
+ // If nobody prevented the default action, do it now
+ if ( !onlyHandlers && !event.isDefaultPrevented() ) {
+
+ if ( ( !special._default ||
+ special._default.apply( eventPath.pop(), data ) === false ) &&
+ acceptData( elem ) ) {
+
+ // Call a native DOM method on the target with the same name name as the event.
+ // Don't do default actions on window, that's where global variables be (#6170)
+ if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) {
+
+ // Don't re-trigger an onFOO event when we call its FOO() method
+ tmp = elem[ ontype ];
+
+ if ( tmp ) {
+ elem[ ontype ] = null;
+ }
+
+ // Prevent re-triggering of the same event, since we already bubbled it above
+ jQuery.event.triggered = type;
+ elem[ type ]();
+ jQuery.event.triggered = undefined;
+
+ if ( tmp ) {
+ elem[ ontype ] = tmp;
+ }
+ }
+ }
+ }
+
+ return event.result;
+ },
+
+ // Piggyback on a donor event to simulate a different one
+ // Used only for `focus(in | out)` events
+ simulate: function( type, elem, event ) {
+ var e = jQuery.extend(
+ new jQuery.Event(),
+ event,
+ {
+ type: type,
+ isSimulated: true
+ }
+ );
+
+ jQuery.event.trigger( e, null, elem );
+ }
+
+} );
+
+jQuery.fn.extend( {
+
+ trigger: function( type, data ) {
+ return this.each( function() {
+ jQuery.event.trigger( type, data, this );
+ } );
+ },
+ triggerHandler: function( type, data ) {
+ var elem = this[ 0 ];
+ if ( elem ) {
+ return jQuery.event.trigger( type, data, elem, true );
+ }
+ }
+} );
+
+return jQuery;
+} );
diff --git a/templates/assets/jquery/src/exports/amd.js b/templates/assets/jquery/src/exports/amd.js
new file mode 100644
index 0000000..add6eb9
--- /dev/null
+++ b/templates/assets/jquery/src/exports/amd.js
@@ -0,0 +1,24 @@
+define( [
+ "../core"
+], function( jQuery ) {
+
+// Register as a named AMD module, since jQuery can be concatenated with other
+// files that may use define, but not via a proper concatenation script that
+// understands anonymous AMD modules. A named AMD is safest and most robust
+// way to register. Lowercase jquery is used because AMD module names are
+// derived from file names, and jQuery is normally delivered in a lowercase
+// file name. Do this after creating the global so that if an AMD module wants
+// to call noConflict to hide this version of jQuery, it will work.
+
+// Note that for maximum portability, libraries that are not jQuery should
+// declare themselves as anonymous modules, and avoid setting a global if an
+// AMD loader is present. jQuery is a special case. For more information, see
+// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
+
+if ( typeof define === "function" && define.amd ) {
+ define( "jquery", [], function() {
+ return jQuery;
+ } );
+}
+
+} );
diff --git a/templates/assets/jquery/src/exports/global.js b/templates/assets/jquery/src/exports/global.js
new file mode 100644
index 0000000..be9cbfb
--- /dev/null
+++ b/templates/assets/jquery/src/exports/global.js
@@ -0,0 +1,26 @@
+var
+
+ // Map over jQuery in case of overwrite
+ _jQuery = window.jQuery,
+
+ // Map over the $ in case of overwrite
+ _$ = window.$;
+
+jQuery.noConflict = function( deep ) {
+ if ( window.$ === jQuery ) {
+ window.$ = _$;
+ }
+
+ if ( deep && window.jQuery === jQuery ) {
+ window.jQuery = _jQuery;
+ }
+
+ return jQuery;
+};
+
+// Expose jQuery and $ identifiers, even in AMD
+// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
+// and CommonJS for browser emulators (#13566)
+if ( !noGlobal ) {
+ window.jQuery = window.$ = jQuery;
+}
diff --git a/templates/assets/jquery/src/intro.js b/templates/assets/jquery/src/intro.js
new file mode 100644
index 0000000..aab47c2
--- /dev/null
+++ b/templates/assets/jquery/src/intro.js
@@ -0,0 +1,44 @@
+/*!
+ * jQuery JavaScript Library v@VERSION
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: @DATE
+ */
+
+(function( global, factory ) {
+
+ if ( typeof module === "object" && typeof module.exports === "object" ) {
+ // For CommonJS and CommonJS-like environments where a proper `window`
+ // is present, execute the factory and get jQuery.
+ // For environments that do not have a `window` with a `document`
+ // (such as Node.js), expose a factory as module.exports.
+ // This accentuates the need for the creation of a real `window`.
+ // e.g. var jQuery = require("jquery")(window);
+ // See ticket #14549 for more info.
+ module.exports = global.document ?
+ factory( global, true ) :
+ function( w ) {
+ if ( !w.document ) {
+ throw new Error( "jQuery requires a window with a document" );
+ }
+ return factory( w );
+ };
+ } else {
+ factory( global );
+ }
+
+// Pass this if window is not defined yet
+}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
+
+// Support: Firefox 18+
+// Can't be in strict mode, several libs including ASP.NET trace
+// the stack via arguments.caller.callee and Firefox dies if
+// you try to trace through "use strict" call chains. (#13335)
+//"use strict";
diff --git a/templates/assets/jquery/src/jquery.js b/templates/assets/jquery/src/jquery.js
new file mode 100644
index 0000000..2faa9c3
--- /dev/null
+++ b/templates/assets/jquery/src/jquery.js
@@ -0,0 +1,37 @@
+define( [
+ "./core",
+ "./selector",
+ "./traversing",
+ "./callbacks",
+ "./deferred",
+ "./core/ready",
+ "./data",
+ "./queue",
+ "./queue/delay",
+ "./attributes",
+ "./event",
+ "./event/alias",
+ "./event/focusin",
+ "./manipulation",
+ "./manipulation/_evalUrl",
+ "./wrap",
+ "./css",
+ "./css/hiddenVisibleSelectors",
+ "./serialize",
+ "./ajax",
+ "./ajax/xhr",
+ "./ajax/script",
+ "./ajax/jsonp",
+ "./ajax/load",
+ "./event/ajax",
+ "./effects",
+ "./effects/animatedSelector",
+ "./offset",
+ "./dimensions",
+ "./deprecated",
+ "./exports/amd"
+], function( jQuery ) {
+
+return ( window.jQuery = window.$ = jQuery );
+
+} );
diff --git a/templates/assets/jquery/src/manipulation.js b/templates/assets/jquery/src/manipulation.js
new file mode 100644
index 0000000..afd5091
--- /dev/null
+++ b/templates/assets/jquery/src/manipulation.js
@@ -0,0 +1,481 @@
+define( [
+ "./core",
+ "./var/concat",
+ "./var/push",
+ "./core/access",
+ "./manipulation/var/rcheckableType",
+ "./manipulation/var/rtagName",
+ "./manipulation/var/rscriptType",
+ "./manipulation/wrapMap",
+ "./manipulation/getAll",
+ "./manipulation/setGlobalEval",
+ "./manipulation/buildFragment",
+ "./manipulation/support",
+
+ "./data/var/dataPriv",
+ "./data/var/dataUser",
+ "./data/var/acceptData",
+
+ "./core/init",
+ "./traversing",
+ "./selector",
+ "./event"
+], function( jQuery, concat, push, access,
+ rcheckableType, rtagName, rscriptType,
+ wrapMap, getAll, setGlobalEval, buildFragment, support,
+ dataPriv, dataUser, acceptData ) {
+
+var
+ rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,
+
+ // Support: IE 10-11, Edge 10240+
+ // In IE/Edge using regex groups here causes severe slowdowns.
+ // See https://connect.microsoft.com/IE/feedback/details/1736512/
+ rnoInnerhtml = /<script|<style|<link/i,
+
+ // checked="checked" or checked
+ rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+ rscriptTypeMasked = /^true\/(.*)/,
+ rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
+
+// Manipulating tables requires a tbody
+function manipulationTarget( elem, content ) {
+ return jQuery.nodeName( elem, "table" ) &&
+ jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ?
+
+ elem.getElementsByTagName( "tbody" )[ 0 ] ||
+ elem.appendChild( elem.ownerDocument.createElement( "tbody" ) ) :
+ elem;
+}
+
+// Replace/restore the type attribute of script elements for safe DOM manipulation
+function disableScript( elem ) {
+ elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type;
+ return elem;
+}
+function restoreScript( elem ) {
+ var match = rscriptTypeMasked.exec( elem.type );
+
+ if ( match ) {
+ elem.type = match[ 1 ];
+ } else {
+ elem.removeAttribute( "type" );
+ }
+
+ return elem;
+}
+
+function cloneCopyEvent( src, dest ) {
+ var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;
+
+ if ( dest.nodeType !== 1 ) {
+ return;
+ }
+
+ // 1. Copy private data: events, handlers, etc.
+ if ( dataPriv.hasData( src ) ) {
+ pdataOld = dataPriv.access( src );
+ pdataCur = dataPriv.set( dest, pdataOld );
+ events = pdataOld.events;
+
+ if ( events ) {
+ delete pdataCur.handle;
+ pdataCur.events = {};
+
+ for ( type in events ) {
+ for ( i = 0, l = events[ type ].length; i < l; i++ ) {
+ jQuery.event.add( dest, type, events[ type ][ i ] );
+ }
+ }
+ }
+ }
+
+ // 2. Copy user data
+ if ( dataUser.hasData( src ) ) {
+ udataOld = dataUser.access( src );
+ udataCur = jQuery.extend( {}, udataOld );
+
+ dataUser.set( dest, udataCur );
+ }
+}
+
+// Fix IE bugs, see support tests
+function fixInput( src, dest ) {
+ var nodeName = dest.nodeName.toLowerCase();
+
+ // Fails to persist the checked state of a cloned checkbox or radio button.
+ if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
+ dest.checked = src.checked;
+
+ // Fails to return the selected option to the default selected state when cloning options
+ } else if ( nodeName === "input" || nodeName === "textarea" ) {
+ dest.defaultValue = src.defaultValue;
+ }
+}
+
+function domManip( collection, args, callback, ignored ) {
+
+ // Flatten any nested arrays
+ args = concat.apply( [], args );
+
+ var fragment, first, scripts, hasScripts, node, doc,
+ i = 0,
+ l = collection.length,
+ iNoClone = l - 1,
+ value = args[ 0 ],
+ isFunction = jQuery.isFunction( value );
+
+ // We can't cloneNode fragments that contain checked, in WebKit
+ if ( isFunction ||
+ ( l > 1 && typeof value === "string" &&
+ !support.checkClone && rchecked.test( value ) ) ) {
+ return collection.each( function( index ) {
+ var self = collection.eq( index );
+ if ( isFunction ) {
+ args[ 0 ] = value.call( this, index, self.html() );
+ }
+ domManip( self, args, callback, ignored );
+ } );
+ }
+
+ if ( l ) {
+ fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );
+ first = fragment.firstChild;
+
+ if ( fragment.childNodes.length === 1 ) {
+ fragment = first;
+ }
+
+ // Require either new content or an interest in ignored elements to invoke the callback
+ if ( first || ignored ) {
+ scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
+ hasScripts = scripts.length;
+
+ // Use the original fragment for the last item
+ // instead of the first because it can end up
+ // being emptied incorrectly in certain situations (#8070).
+ for ( ; i < l; i++ ) {
+ node = fragment;
+
+ if ( i !== iNoClone ) {
+ node = jQuery.clone( node, true, true );
+
+ // Keep references to cloned scripts for later restoration
+ if ( hasScripts ) {
+
+ // Support: Android<4.1, PhantomJS<2
+ // push.apply(_, arraylike) throws on ancient WebKit
+ jQuery.merge( scripts, getAll( node, "script" ) );
+ }
+ }
+
+ callback.call( collection[ i ], node, i );
+ }
+
+ if ( hasScripts ) {
+ doc = scripts[ scripts.length - 1 ].ownerDocument;
+
+ // Reenable scripts
+ jQuery.map( scripts, restoreScript );
+
+ // Evaluate executable scripts on first document insertion
+ for ( i = 0; i < hasScripts; i++ ) {
+ node = scripts[ i ];
+ if ( rscriptType.test( node.type || "" ) &&
+ !dataPriv.access( node, "globalEval" ) &&
+ jQuery.contains( doc, node ) ) {
+
+ if ( node.src ) {
+
+ // Optional AJAX dependency, but won't run scripts if not present
+ if ( jQuery._evalUrl ) {
+ jQuery._evalUrl( node.src );
+ }
+ } else {
+ jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) );
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return collection;
+}
+
+function remove( elem, selector, keepData ) {
+ var node,
+ nodes = selector ? jQuery.filter( selector, elem ) : elem,
+ i = 0;
+
+ for ( ; ( node = nodes[ i ] ) != null; i++ ) {
+ if ( !keepData && node.nodeType === 1 ) {
+ jQuery.cleanData( getAll( node ) );
+ }
+
+ if ( node.parentNode ) {
+ if ( keepData && jQuery.contains( node.ownerDocument, node ) ) {
+ setGlobalEval( getAll( node, "script" ) );
+ }
+ node.parentNode.removeChild( node );
+ }
+ }
+
+ return elem;
+}
+
+jQuery.extend( {
+ htmlPrefilter: function( html ) {
+ return html.replace( rxhtmlTag, "<$1></$2>" );
+ },
+
+ clone: function( elem, dataAndEvents, deepDataAndEvents ) {
+ var i, l, srcElements, destElements,
+ clone = elem.cloneNode( true ),
+ inPage = jQuery.contains( elem.ownerDocument, elem );
+
+ // Fix IE cloning issues
+ if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
+ !jQuery.isXMLDoc( elem ) ) {
+
+ // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
+ destElements = getAll( clone );
+ srcElements = getAll( elem );
+
+ for ( i = 0, l = srcElements.length; i < l; i++ ) {
+ fixInput( srcElements[ i ], destElements[ i ] );
+ }
+ }
+
+ // Copy the events from the original to the clone
+ if ( dataAndEvents ) {
+ if ( deepDataAndEvents ) {
+ srcElements = srcElements || getAll( elem );
+ destElements = destElements || getAll( clone );
+
+ for ( i = 0, l = srcElements.length; i < l; i++ ) {
+ cloneCopyEvent( srcElements[ i ], destElements[ i ] );
+ }
+ } else {
+ cloneCopyEvent( elem, clone );
+ }
+ }
+
+ // Preserve script evaluation history
+ destElements = getAll( clone, "script" );
+ if ( destElements.length > 0 ) {
+ setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
+ }
+
+ // Return the cloned set
+ return clone;
+ },
+
+ cleanData: function( elems ) {
+ var data, elem, type,
+ special = jQuery.event.special,
+ i = 0;
+
+ for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {
+ if ( acceptData( elem ) ) {
+ if ( ( data = elem[ dataPriv.expando ] ) ) {
+ if ( data.events ) {
+ for ( type in data.events ) {
+ if ( special[ type ] ) {
+ jQuery.event.remove( elem, type );
+
+ // This is a shortcut to avoid jQuery.event.remove's overhead
+ } else {
+ jQuery.removeEvent( elem, type, data.handle );
+ }
+ }
+ }
+
+ // Support: Chrome <= 35-45+
+ // Assign undefined instead of using delete, see Data#remove
+ elem[ dataPriv.expando ] = undefined;
+ }
+ if ( elem[ dataUser.expando ] ) {
+
+ // Support: Chrome <= 35-45+
+ // Assign undefined instead of using delete, see Data#remove
+ elem[ dataUser.expando ] = undefined;
+ }
+ }
+ }
+ }
+} );
+
+jQuery.fn.extend( {
+
+ // Keep domManip exposed until 3.0 (gh-2225)
+ domManip: domManip,
+
+ detach: function( selector ) {
+ return remove( this, selector, true );
+ },
+
+ remove: function( selector ) {
+ return remove( this, selector );
+ },
+
+ text: function( value ) {
+ return access( this, function( value ) {
+ return value === undefined ?
+ jQuery.text( this ) :
+ this.empty().each( function() {
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+ this.textContent = value;
+ }
+ } );
+ }, null, value, arguments.length );
+ },
+
+ append: function() {
+ return domManip( this, arguments, function( elem ) {
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+ var target = manipulationTarget( this, elem );
+ target.appendChild( elem );
+ }
+ } );
+ },
+
+ prepend: function() {
+ return domManip( this, arguments, function( elem ) {
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+ var target = manipulationTarget( this, elem );
+ target.insertBefore( elem, target.firstChild );
+ }
+ } );
+ },
+
+ before: function() {
+ return domManip( this, arguments, function( elem ) {
+ if ( this.parentNode ) {
+ this.parentNode.insertBefore( elem, this );
+ }
+ } );
+ },
+
+ after: function() {
+ return domManip( this, arguments, function( elem ) {
+ if ( this.parentNode ) {
+ this.parentNode.insertBefore( elem, this.nextSibling );
+ }
+ } );
+ },
+
+ empty: function() {
+ var elem,
+ i = 0;
+
+ for ( ; ( elem = this[ i ] ) != null; i++ ) {
+ if ( elem.nodeType === 1 ) {
+
+ // Prevent memory leaks
+ jQuery.cleanData( getAll( elem, false ) );
+
+ // Remove any remaining nodes
+ elem.textContent = "";
+ }
+ }
+
+ return this;
+ },
+
+ clone: function( dataAndEvents, deepDataAndEvents ) {
+ dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
+ deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
+
+ return this.map( function() {
+ return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
+ } );
+ },
+
+ html: function( value ) {
+ return access( this, function( value ) {
+ var elem = this[ 0 ] || {},
+ i = 0,
+ l = this.length;
+
+ if ( value === undefined && elem.nodeType === 1 ) {
+ return elem.innerHTML;
+ }
+
+ // See if we can take a shortcut and just use innerHTML
+ if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
+ !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {
+
+ value = jQuery.htmlPrefilter( value );
+
+ try {
+ for ( ; i < l; i++ ) {
+ elem = this[ i ] || {};
+
+ // Remove element nodes and prevent memory leaks
+ if ( elem.nodeType === 1 ) {
+ jQuery.cleanData( getAll( elem, false ) );
+ elem.innerHTML = value;
+ }
+ }
+
+ elem = 0;
+
+ // If using innerHTML throws an exception, use the fallback method
+ } catch ( e ) {}
+ }
+
+ if ( elem ) {
+ this.empty().append( value );
+ }
+ }, null, value, arguments.length );
+ },
+
+ replaceWith: function() {
+ var ignored = [];
+
+ // Make the changes, replacing each non-ignored context element with the new content
+ return domManip( this, arguments, function( elem ) {
+ var parent = this.parentNode;
+
+ if ( jQuery.inArray( this, ignored ) < 0 ) {
+ jQuery.cleanData( getAll( this ) );
+ if ( parent ) {
+ parent.replaceChild( elem, this );
+ }
+ }
+
+ // Force callback invocation
+ }, ignored );
+ }
+} );
+
+jQuery.each( {
+ appendTo: "append",
+ prependTo: "prepend",
+ insertBefore: "before",
+ insertAfter: "after",
+ replaceAll: "replaceWith"
+}, function( name, original ) {
+ jQuery.fn[ name ] = function( selector ) {
+ var elems,
+ ret = [],
+ insert = jQuery( selector ),
+ last = insert.length - 1,
+ i = 0;
+
+ for ( ; i <= last; i++ ) {
+ elems = i === last ? this : this.clone( true );
+ jQuery( insert[ i ] )[ original ]( elems );
+
+ // Support: QtWebKit
+ // .get() because push.apply(_, arraylike) throws
+ push.apply( ret, elems.get() );
+ }
+
+ return this.pushStack( ret );
+ };
+} );
+
+return jQuery;
+} );
diff --git a/templates/assets/jquery/src/manipulation/_evalUrl.js b/templates/assets/jquery/src/manipulation/_evalUrl.js
new file mode 100644
index 0000000..85ca2c6
--- /dev/null
+++ b/templates/assets/jquery/src/manipulation/_evalUrl.js
@@ -0,0 +1,20 @@
+define( [
+ "../ajax"
+], function( jQuery ) {
+
+jQuery._evalUrl = function( url ) {
+ return jQuery.ajax( {
+ url: url,
+
+ // Make this explicit, since user can override this through ajaxSetup (#11264)
+ type: "GET",
+ dataType: "script",
+ async: false,
+ global: false,
+ "throws": true
+ } );
+};
+
+return jQuery._evalUrl;
+
+} );
diff --git a/templates/assets/jquery/src/manipulation/buildFragment.js b/templates/assets/jquery/src/manipulation/buildFragment.js
new file mode 100644
index 0000000..cfdd1c0
--- /dev/null
+++ b/templates/assets/jquery/src/manipulation/buildFragment.js
@@ -0,0 +1,102 @@
+define( [
+ "../core",
+ "./var/rtagName",
+ "./var/rscriptType",
+ "./wrapMap",
+ "./getAll",
+ "./setGlobalEval"
+], function( jQuery, rtagName, rscriptType, wrapMap, getAll, setGlobalEval ) {
+
+var rhtml = /<|&#?\w+;/;
+
+function buildFragment( elems, context, scripts, selection, ignored ) {
+ var elem, tmp, tag, wrap, contains, j,
+ fragment = context.createDocumentFragment(),
+ nodes = [],
+ i = 0,
+ l = elems.length;
+
+ for ( ; i < l; i++ ) {
+ elem = elems[ i ];
+
+ if ( elem || elem === 0 ) {
+
+ // Add nodes directly
+ if ( jQuery.type( elem ) === "object" ) {
+
+ // Support: Android<4.1, PhantomJS<2
+ // push.apply(_, arraylike) throws on ancient WebKit
+ jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
+
+ // Convert non-html into a text node
+ } else if ( !rhtml.test( elem ) ) {
+ nodes.push( context.createTextNode( elem ) );
+
+ // Convert html into DOM nodes
+ } else {
+ tmp = tmp || fragment.appendChild( context.createElement( "div" ) );
+
+ // Deserialize a standard representation
+ tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
+ wrap = wrapMap[ tag ] || wrapMap._default;
+ tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];
+
+ // Descend through wrappers to the right content
+ j = wrap[ 0 ];
+ while ( j-- ) {
+ tmp = tmp.lastChild;
+ }
+
+ // Support: Android<4.1, PhantomJS<2
+ // push.apply(_, arraylike) throws on ancient WebKit
+ jQuery.merge( nodes, tmp.childNodes );
+
+ // Remember the top-level container
+ tmp = fragment.firstChild;
+
+ // Ensure the created nodes are orphaned (#12392)
+ tmp.textContent = "";
+ }
+ }
+ }
+
+ // Remove wrapper from fragment
+ fragment.textContent = "";
+
+ i = 0;
+ while ( ( elem = nodes[ i++ ] ) ) {
+
+ // Skip elements already in the context collection (trac-4087)
+ if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
+ if ( ignored ) {
+ ignored.push( elem );
+ }
+ continue;
+ }
+
+ contains = jQuery.contains( elem.ownerDocument, elem );
+
+ // Append to fragment
+ tmp = getAll( fragment.appendChild( elem ), "script" );
+
+ // Preserve script evaluation history
+ if ( contains ) {
+ setGlobalEval( tmp );
+ }
+
+ // Capture executables
+ if ( scripts ) {
+ j = 0;
+ while ( ( elem = tmp[ j++ ] ) ) {
+ if ( rscriptType.test( elem.type || "" ) ) {
+ scripts.push( elem );
+ }
+ }
+ }
+ }
+
+ return fragment;
+}
+
+return buildFragment;
+} );
diff --git a/templates/assets/jquery/src/manipulation/getAll.js b/templates/assets/jquery/src/manipulation/getAll.js
new file mode 100644
index 0000000..cc913f2
--- /dev/null
+++ b/templates/assets/jquery/src/manipulation/getAll.js
@@ -0,0 +1,21 @@
+define( [
+ "../core"
+], function( jQuery ) {
+
+function getAll( context, tag ) {
+
+ // Support: IE9-11+
+ // Use typeof to avoid zero-argument method invocation on host objects (#15151)
+ var ret = typeof context.getElementsByTagName !== "undefined" ?
+ context.getElementsByTagName( tag || "*" ) :
+ typeof context.querySelectorAll !== "undefined" ?
+ context.querySelectorAll( tag || "*" ) :
+ [];
+
+ return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
+ jQuery.merge( [ context ], ret ) :
+ ret;
+}
+
+return getAll;
+} );
diff --git a/templates/assets/jquery/src/manipulation/setGlobalEval.js b/templates/assets/jquery/src/manipulation/setGlobalEval.js
new file mode 100644
index 0000000..8ca69a0
--- /dev/null
+++ b/templates/assets/jquery/src/manipulation/setGlobalEval.js
@@ -0,0 +1,20 @@
+define( [
+ "../data/var/dataPriv"
+], function( dataPriv ) {
+
+// Mark scripts as having already been evaluated
+function setGlobalEval( elems, refElements ) {
+ var i = 0,
+ l = elems.length;
+
+ for ( ; i < l; i++ ) {
+ dataPriv.set(
+ elems[ i ],
+ "globalEval",
+ !refElements || dataPriv.get( refElements[ i ], "globalEval" )
+ );
+ }
+}
+
+return setGlobalEval;
+} );
diff --git a/templates/assets/jquery/src/manipulation/support.js b/templates/assets/jquery/src/manipulation/support.js
new file mode 100644
index 0000000..cd4081e
--- /dev/null
+++ b/templates/assets/jquery/src/manipulation/support.js
@@ -0,0 +1,33 @@
+define( [
+ "../var/document",
+ "../var/support"
+], function( document, support ) {
+
+( function() {
+ var fragment = document.createDocumentFragment(),
+ div = fragment.appendChild( document.createElement( "div" ) ),
+ input = document.createElement( "input" );
+
+ // Support: Android 4.0-4.3, Safari<=5.1
+ // Check state lost if the name is set (#11217)
+ // Support: Windows Web Apps (WWA)
+ // `name` and `type` must use .setAttribute for WWA (#14901)
+ input.setAttribute( "type", "radio" );
+ input.setAttribute( "checked", "checked" );
+ input.setAttribute( "name", "t" );
+
+ div.appendChild( input );
+
+ // Support: Safari<=5.1, Android<4.2
+ // Older WebKit doesn't clone checked state correctly in fragments
+ support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+ // Support: IE<=11+
+ // Make sure textarea (and checkbox) defaultValue is properly cloned
+ div.innerHTML = "<textarea>x</textarea>";
+ support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
+} )();
+
+return support;
+
+} );
diff --git a/templates/assets/jquery/src/manipulation/wrapMap.js b/templates/assets/jquery/src/manipulation/wrapMap.js
new file mode 100644
index 0000000..fdb430a
--- /dev/null
+++ b/templates/assets/jquery/src/manipulation/wrapMap.js
@@ -0,0 +1,27 @@
+define( function() {
+
+// We have to close these tags to support XHTML (#13200)
+var wrapMap = {
+
+ // Support: IE9
+ option: [ 1, "<select multiple='multiple'>", "</select>" ],
+
+ // XHTML parsers do not magically insert elements in the
+ // same way that tag soup parsers do. So we cannot shorten
+ // this by omitting <tbody> or other required elements.
+ thead: [ 1, "<table>", "</table>" ],
+ col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
+ tr: [ 2, "<table><tbody>", "</tbody></table>" ],
+ td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
+
+ _default: [ 0, "", "" ]
+};
+
+// Support: IE9
+wrapMap.optgroup = wrapMap.option;
+
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+return wrapMap;
+} );
diff --git a/templates/assets/jquery/src/offset.js b/templates/assets/jquery/src/offset.js
new file mode 100644
index 0000000..08a4543
--- /dev/null
+++ b/templates/assets/jquery/src/offset.js
@@ -0,0 +1,218 @@
+define( [
+ "./core",
+ "./core/access",
+ "./var/document",
+ "./var/documentElement",
+ "./css/var/rnumnonpx",
+ "./css/curCSS",
+ "./css/addGetHookIf",
+ "./css/support",
+
+ "./core/init",
+ "./css",
+ "./selector" // contains
+], function( jQuery, access, document, documentElement, rnumnonpx, curCSS, addGetHookIf, support ) {
+
+/**
+ * Gets a window from an element
+ */
+function getWindow( elem ) {
+ return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;
+}
+
+jQuery.offset = {
+ setOffset: function( elem, options, i ) {
+ var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
+ position = jQuery.css( elem, "position" ),
+ curElem = jQuery( elem ),
+ props = {};
+
+ // Set position first, in-case top/left are set even on static elem
+ if ( position === "static" ) {
+ elem.style.position = "relative";
+ }
+
+ curOffset = curElem.offset();
+ curCSSTop = jQuery.css( elem, "top" );
+ curCSSLeft = jQuery.css( elem, "left" );
+ calculatePosition = ( position === "absolute" || position === "fixed" ) &&
+ ( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1;
+
+ // Need to be able to calculate position if either
+ // top or left is auto and position is either absolute or fixed
+ if ( calculatePosition ) {
+ curPosition = curElem.position();
+ curTop = curPosition.top;
+ curLeft = curPosition.left;
+
+ } else {
+ curTop = parseFloat( curCSSTop ) || 0;
+ curLeft = parseFloat( curCSSLeft ) || 0;
+ }
+
+ if ( jQuery.isFunction( options ) ) {
+
+ // Use jQuery.extend here to allow modification of coordinates argument (gh-1848)
+ options = options.call( elem, i, jQuery.extend( {}, curOffset ) );
+ }
+
+ if ( options.top != null ) {
+ props.top = ( options.top - curOffset.top ) + curTop;
+ }
+ if ( options.left != null ) {
+ props.left = ( options.left - curOffset.left ) + curLeft;
+ }
+
+ if ( "using" in options ) {
+ options.using.call( elem, props );
+
+ } else {
+ curElem.css( props );
+ }
+ }
+};
+
+jQuery.fn.extend( {
+ offset: function( options ) {
+ if ( arguments.length ) {
+ return options === undefined ?
+ this :
+ this.each( function( i ) {
+ jQuery.offset.setOffset( this, options, i );
+ } );
+ }
+
+ var docElem, win,
+ elem = this[ 0 ],
+ box = { top: 0, left: 0 },
+ doc = elem && elem.ownerDocument;
+
+ if ( !doc ) {
+ return;
+ }
+
+ docElem = doc.documentElement;
+
+ // Make sure it's not a disconnected DOM node
+ if ( !jQuery.contains( docElem, elem ) ) {
+ return box;
+ }
+
+ box = elem.getBoundingClientRect();
+ win = getWindow( doc );
+ return {
+ top: box.top + win.pageYOffset - docElem.clientTop,
+ left: box.left + win.pageXOffset - docElem.clientLeft
+ };
+ },
+
+ position: function() {
+ if ( !this[ 0 ] ) {
+ return;
+ }
+
+ var offsetParent, offset,
+ elem = this[ 0 ],
+ parentOffset = { top: 0, left: 0 };
+
+ // Fixed elements are offset from window (parentOffset = {top:0, left: 0},
+ // because it is its only offset parent
+ if ( jQuery.css( elem, "position" ) === "fixed" ) {
+
+ // Assume getBoundingClientRect is there when computed position is fixed
+ offset = elem.getBoundingClientRect();
+
+ } else {
+
+ // Get *real* offsetParent
+ offsetParent = this.offsetParent();
+
+ // Get correct offsets
+ offset = this.offset();
+ if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
+ parentOffset = offsetParent.offset();
+ }
+
+ // Add offsetParent borders
+ parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
+ parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
+ }
+
+ // Subtract parent offsets and element margins
+ return {
+ top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
+ left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )
+ };
+ },
+
+ // This method will return documentElement in the following cases:
+ // 1) For the element inside the iframe without offsetParent, this method will return
+ // documentElement of the parent window
+ // 2) For the hidden or detached element
+ // 3) For body or html element, i.e. in case of the html node - it will return itself
+ //
+ // but those exceptions were never presented as a real life use-cases
+ // and might be considered as more preferable results.
+ //
+ // This logic, however, is not guaranteed and can change at any point in the future
+ offsetParent: function() {
+ return this.map( function() {
+ var offsetParent = this.offsetParent;
+
+ while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) {
+ offsetParent = offsetParent.offsetParent;
+ }
+
+ return offsetParent || documentElement;
+ } );
+ }
+} );
+
+// Create scrollLeft and scrollTop methods
+jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
+ var top = "pageYOffset" === prop;
+
+ jQuery.fn[ method ] = function( val ) {
+ return access( this, function( elem, method, val ) {
+ var win = getWindow( elem );
+
+ if ( val === undefined ) {
+ return win ? win[ prop ] : elem[ method ];
+ }
+
+ if ( win ) {
+ win.scrollTo(
+ !top ? val : win.pageXOffset,
+ top ? val : win.pageYOffset
+ );
+
+ } else {
+ elem[ method ] = val;
+ }
+ }, method, val, arguments.length );
+ };
+} );
+
+// Support: Safari<7-8+, Chrome<37-44+
+// Add the top/left cssHooks using jQuery.fn.position
+// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
+// Blink bug: https://code.google.com/p/chromium/issues/detail?id=229280
+// getComputedStyle returns percent when specified for top/left/bottom/right;
+// rather than make the css module depend on the offset module, just check for it here
+jQuery.each( [ "top", "left" ], function( i, prop ) {
+ jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
+ function( elem, computed ) {
+ if ( computed ) {
+ computed = curCSS( elem, prop );
+
+ // If curCSS returns percentage, fallback to offset
+ return rnumnonpx.test( computed ) ?
+ jQuery( elem ).position()[ prop ] + "px" :
+ computed;
+ }
+ }
+ );
+} );
+
+return jQuery;
+} );
diff --git a/templates/assets/jquery/src/outro.js b/templates/assets/jquery/src/outro.js
new file mode 100644
index 0000000..d792ffb
--- /dev/null
+++ b/templates/assets/jquery/src/outro.js
@@ -0,0 +1,2 @@
+return jQuery;
+}));
diff --git a/templates/assets/jquery/src/queue.js b/templates/assets/jquery/src/queue.js
new file mode 100644
index 0000000..813c41c
--- /dev/null
+++ b/templates/assets/jquery/src/queue.js
@@ -0,0 +1,143 @@
+define( [
+ "./core",
+ "./data/var/dataPriv",
+ "./deferred",
+ "./callbacks"
+], function( jQuery, dataPriv ) {
+
+jQuery.extend( {
+ queue: function( elem, type, data ) {
+ var queue;
+
+ if ( elem ) {
+ type = ( type || "fx" ) + "queue";
+ queue = dataPriv.get( elem, type );
+
+ // Speed up dequeue by getting out quickly if this is just a lookup
+ if ( data ) {
+ if ( !queue || jQuery.isArray( data ) ) {
+ queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );
+ } else {
+ queue.push( data );
+ }
+ }
+ return queue || [];
+ }
+ },
+
+ dequeue: function( elem, type ) {
+ type = type || "fx";
+
+ var queue = jQuery.queue( elem, type ),
+ startLength = queue.length,
+ fn = queue.shift(),
+ hooks = jQuery._queueHooks( elem, type ),
+ next = function() {
+ jQuery.dequeue( elem, type );
+ };
+
+ // If the fx queue is dequeued, always remove the progress sentinel
+ if ( fn === "inprogress" ) {
+ fn = queue.shift();
+ startLength--;
+ }
+
+ if ( fn ) {
+
+ // Add a progress sentinel to prevent the fx queue from being
+ // automatically dequeued
+ if ( type === "fx" ) {
+ queue.unshift( "inprogress" );
+ }
+
+ // Clear up the last queue stop function
+ delete hooks.stop;
+ fn.call( elem, next, hooks );
+ }
+
+ if ( !startLength && hooks ) {
+ hooks.empty.fire();
+ }
+ },
+
+ // Not public - generate a queueHooks object, or return the current one
+ _queueHooks: function( elem, type ) {
+ var key = type + "queueHooks";
+ return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {
+ empty: jQuery.Callbacks( "once memory" ).add( function() {
+ dataPriv.remove( elem, [ type + "queue", key ] );
+ } )
+ } );
+ }
+} );
+
+jQuery.fn.extend( {
+ queue: function( type, data ) {
+ var setter = 2;
+
+ if ( typeof type !== "string" ) {
+ data = type;
+ type = "fx";
+ setter--;
+ }
+
+ if ( arguments.length < setter ) {
+ return jQuery.queue( this[ 0 ], type );
+ }
+
+ return data === undefined ?
+ this :
+ this.each( function() {
+ var queue = jQuery.queue( this, type, data );
+
+ // Ensure a hooks for this queue
+ jQuery._queueHooks( this, type );
+
+ if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {
+ jQuery.dequeue( this, type );
+ }
+ } );
+ },
+ dequeue: function( type ) {
+ return this.each( function() {
+ jQuery.dequeue( this, type );
+ } );
+ },
+ clearQueue: function( type ) {
+ return this.queue( type || "fx", [] );
+ },
+
+ // Get a promise resolved when queues of a certain type
+ // are emptied (fx is the type by default)
+ promise: function( type, obj ) {
+ var tmp,
+ count = 1,
+ defer = jQuery.Deferred(),
+ elements = this,
+ i = this.length,
+ resolve = function() {
+ if ( !( --count ) ) {
+ defer.resolveWith( elements, [ elements ] );
+ }
+ };
+
+ if ( typeof type !== "string" ) {
+ obj = type;
+ type = undefined;
+ }
+ type = type || "fx";
+
+ while ( i-- ) {
+ tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
+ if ( tmp && tmp.empty ) {
+ count++;
+ tmp.empty.add( resolve );
+ }
+ }
+ resolve();
+ return defer.promise( obj );
+ }
+} );
+
+return jQuery;
+} );
diff --git a/templates/assets/jquery/src/queue/delay.js b/templates/assets/jquery/src/queue/delay.js
new file mode 100644
index 0000000..8d5844d
--- /dev/null
+++ b/templates/assets/jquery/src/queue/delay.js
@@ -0,0 +1,22 @@
+define( [
+ "../core",
+ "../queue",
+ "../effects" // Delay is optional because of this dependency
+], function( jQuery ) {
+
+// Based off of the plugin by Clint Helfers, with permission.
+// http://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/
+jQuery.fn.delay = function( time, type ) {
+ time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
+ type = type || "fx";
+
+ return this.queue( type, function( next, hooks ) {
+ var timeout = window.setTimeout( next, time );
+ hooks.stop = function() {
+ window.clearTimeout( timeout );
+ };
+ } );
+};
+
+return jQuery.fn.delay;
+} );
diff --git a/templates/assets/jquery/src/selector-native.js b/templates/assets/jquery/src/selector-native.js
new file mode 100644
index 0000000..ee81483
--- /dev/null
+++ b/templates/assets/jquery/src/selector-native.js
@@ -0,0 +1,211 @@
+define( [
+ "./core",
+ "./var/document",
+ "./var/documentElement",
+ "./var/hasOwn",
+ "./var/indexOf"
+], function( jQuery, document, documentElement, hasOwn, indexOf ) {
+
+/*
+ * Optional (non-Sizzle) selector module for custom builds.
+ *
+ * Note that this DOES NOT SUPPORT many documented jQuery
+ * features in exchange for its smaller size:
+ *
+ * Attribute not equal selector
+ * Positional selectors (:first; :eq(n); :odd; etc.)
+ * Type selectors (:input; :checkbox; :button; etc.)
+ * State-based selectors (:animated; :visible; :hidden; etc.)
+ * :has(selector)
+ * :not(complex selector)
+ * custom selectors via Sizzle extensions
+ * Leading combinators (e.g., $collection.find("> *"))
+ * Reliable functionality on XML fragments
+ * Requiring all parts of a selector to match elements under context
+ * (e.g., $div.find("div > *") now matches children of $div)
+ * Matching against non-elements
+ * Reliable sorting of disconnected nodes
+ * querySelectorAll bug fixes (e.g., unreliable :focus on WebKit)
+ *
+ * If any of these are unacceptable tradeoffs, either use Sizzle or
+ * customize this stub for the project's specific needs.
+ */
+
+var hasDuplicate, sortInput,
+ sortStable = jQuery.expando.split( "" ).sort( sortOrder ).join( "" ) === jQuery.expando,
+ matches = documentElement.matches ||
+ documentElement.webkitMatchesSelector ||
+ documentElement.mozMatchesSelector ||
+ documentElement.oMatchesSelector ||
+ documentElement.msMatchesSelector;
+
+function sortOrder( a, b ) {
+
+ // Flag for duplicate removal
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
+ // Sort on method existence if only one input has compareDocumentPosition
+ var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
+ if ( compare ) {
+ return compare;
+ }
+
+ // Calculate position if both inputs belong to the same document
+ compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
+ a.compareDocumentPosition( b ) :
+
+ // Otherwise we know they are disconnected
+ 1;
+
+ // Disconnected nodes
+ if ( compare & 1 ) {
+
+ // Choose the first element that is related to our preferred document
+ if ( a === document || a.ownerDocument === document &&
+ jQuery.contains( document, a ) ) {
+ return -1;
+ }
+ if ( b === document || b.ownerDocument === document &&
+ jQuery.contains( document, b ) ) {
+ return 1;
+ }
+
+ // Maintain original order
+ return sortInput ?
+ ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
+ 0;
+ }
+
+ return compare & 4 ? -1 : 1;
+}
+
+function uniqueSort( results ) {
+ var elem,
+ duplicates = [],
+ j = 0,
+ i = 0;
+
+ hasDuplicate = false;
+ sortInput = !sortStable && results.slice( 0 );
+ results.sort( sortOrder );
+
+ if ( hasDuplicate ) {
+ while ( ( elem = results[ i++ ] ) ) {
+ if ( elem === results[ i ] ) {
+ j = duplicates.push( i );
+ }
+ }
+ while ( j-- ) {
+ results.splice( duplicates[ j ], 1 );
+ }
+ }
+
+ // Clear input after sorting to release objects
+ // See https://github.com/jquery/sizzle/pull/225
+ sortInput = null;
+
+ return results;
+}
+
+jQuery.extend( {
+ find: function( selector, context, results, seed ) {
+ var elem, nodeType,
+ i = 0;
+
+ results = results || [];
+ context = context || document;
+
+ // Same basic safeguard as Sizzle
+ if ( !selector || typeof selector !== "string" ) {
+ return results;
+ }
+
+ // Early return if context is not an element or document
+ if ( ( nodeType = context.nodeType ) !== 1 && nodeType !== 9 ) {
+ return [];
+ }
+
+ if ( seed ) {
+ while ( ( elem = seed[ i++ ] ) ) {
+ if ( jQuery.find.matchesSelector( elem, selector ) ) {
+ results.push( elem );
+ }
+ }
+ } else {
+ jQuery.merge( results, context.querySelectorAll( selector ) );
+ }
+
+ return results;
+ },
+ uniqueSort: uniqueSort,
+ unique: uniqueSort,
+ text: function( elem ) {
+ var node,
+ ret = "",
+ i = 0,
+ nodeType = elem.nodeType;
+
+ if ( !nodeType ) {
+
+ // If no nodeType, this is expected to be an array
+ while ( ( node = elem[ i++ ] ) ) {
+
+ // Do not traverse comment nodes
+ ret += jQuery.text( node );
+ }
+ } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+
+ // Use textContent for elements
+ return elem.textContent;
+ } else if ( nodeType === 3 || nodeType === 4 ) {
+ return elem.nodeValue;
+ }
+
+ // Do not include comment or processing instruction nodes
+
+ return ret;
+ },
+ contains: function( a, b ) {
+ var adown = a.nodeType === 9 ? a.documentElement : a,
+ bup = b && b.parentNode;
+ return a === bup || !!( bup && bup.nodeType === 1 && adown.contains( bup ) );
+ },
+ isXMLDoc: function( elem ) {
+
+ // documentElement is verified for cases where it doesn't yet exist
+ // (such as loading iframes in IE - #4833)
+ var documentElement = elem && ( elem.ownerDocument || elem ).documentElement;
+ return documentElement ? documentElement.nodeName !== "HTML" : false;
+ },
+ expr: {
+ attrHandle: {},
+ match: {
+ bool: new RegExp( "^(?:checked|selected|async|autofocus|autoplay|controls|defer" +
+ "|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$", "i" ),
+ needsContext: /^[\x20\t\r\n\f]*[>+~]/
+ }
+ }
+} );
+
+jQuery.extend( jQuery.find, {
+ matches: function( expr, elements ) {
+ return jQuery.find( expr, null, null, elements );
+ },
+ matchesSelector: function( elem, expr ) {
+ return matches.call( elem, expr );
+ },
+ attr: function( elem, name ) {
+ var fn = jQuery.expr.attrHandle[ name.toLowerCase() ],
+
+ // Don't get fooled by Object.prototype properties (jQuery #13807)
+ value = fn && hasOwn.call( jQuery.expr.attrHandle, name.toLowerCase() ) ?
+ fn( elem, name, jQuery.isXMLDoc( elem ) ) :
+ undefined;
+ return value !== undefined ? value : elem.getAttribute( name );
+ }
+} );
+
+} );
diff --git a/templates/assets/jquery/src/selector-sizzle.js b/templates/assets/jquery/src/selector-sizzle.js
new file mode 100644
index 0000000..9728a1f
--- /dev/null
+++ b/templates/assets/jquery/src/selector-sizzle.js
@@ -0,0 +1,14 @@
+define( [
+ "./core",
+ "../external/sizzle/dist/sizzle"
+], function( jQuery, Sizzle ) {
+
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[ ":" ] = jQuery.expr.pseudos;
+jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+} );
diff --git a/templates/assets/jquery/src/selector.js b/templates/assets/jquery/src/selector.js
new file mode 100644
index 0000000..e13f585
--- /dev/null
+++ b/templates/assets/jquery/src/selector.js
@@ -0,0 +1 @@
+define( [ "./selector-sizzle" ], function() {} );
diff --git a/templates/assets/jquery/src/serialize.js b/templates/assets/jquery/src/serialize.js
new file mode 100644
index 0000000..94698fc
--- /dev/null
+++ b/templates/assets/jquery/src/serialize.js
@@ -0,0 +1,125 @@
+define( [
+ "./core",
+ "./manipulation/var/rcheckableType",
+ "./core/init",
+ "./traversing", // filter
+ "./attributes/prop"
+], function( jQuery, rcheckableType ) {
+
+var r20 = /%20/g,
+ rbracket = /\[\]$/,
+ rCRLF = /\r?\n/g,
+ rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
+ rsubmittable = /^(?:input|select|textarea|keygen)/i;
+
+function buildParams( prefix, obj, traditional, add ) {
+ var name;
+
+ if ( jQuery.isArray( obj ) ) {
+
+ // Serialize array item.
+ jQuery.each( obj, function( i, v ) {
+ if ( traditional || rbracket.test( prefix ) ) {
+
+ // Treat each array item as a scalar.
+ add( prefix, v );
+
+ } else {
+
+ // Item is non-scalar (array or object), encode its numeric index.
+ buildParams(
+ prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]",
+ v,
+ traditional,
+ add
+ );
+ }
+ } );
+
+ } else if ( !traditional && jQuery.type( obj ) === "object" ) {
+
+ // Serialize object item.
+ for ( name in obj ) {
+ buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
+ }
+
+ } else {
+
+ // Serialize scalar item.
+ add( prefix, obj );
+ }
+}
+
+// Serialize an array of form elements or a set of
+// key/values into a query string
+jQuery.param = function( a, traditional ) {
+ var prefix,
+ s = [],
+ add = function( key, value ) {
+
+ // If value is a function, invoke it and return its value
+ value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
+ s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
+ };
+
+ // Set traditional to true for jQuery <= 1.3.2 behavior.
+ if ( traditional === undefined ) {
+ traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
+ }
+
+ // If an array was passed in, assume that it is an array of form elements.
+ if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
+
+ // Serialize the form elements
+ jQuery.each( a, function() {
+ add( this.name, this.value );
+ } );
+
+ } else {
+
+ // If traditional, encode the "old" way (the way 1.3.2 or older
+ // did it), otherwise encode params recursively.
+ for ( prefix in a ) {
+ buildParams( prefix, a[ prefix ], traditional, add );
+ }
+ }
+
+ // Return the resulting serialization
+ return s.join( "&" ).replace( r20, "+" );
+};
+
+jQuery.fn.extend( {
+ serialize: function() {
+ return jQuery.param( this.serializeArray() );
+ },
+ serializeArray: function() {
+ return this.map( function() {
+
+ // Can add propHook for "elements" to filter or add form elements
+ var elements = jQuery.prop( this, "elements" );
+ return elements ? jQuery.makeArray( elements ) : this;
+ } )
+ .filter( function() {
+ var type = this.type;
+
+ // Use .is( ":disabled" ) so that fieldset[disabled] works
+ return this.name && !jQuery( this ).is( ":disabled" ) &&
+ rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
+ ( this.checked || !rcheckableType.test( type ) );
+ } )
+ .map( function( i, elem ) {
+ var val = jQuery( this ).val();
+
+ return val == null ?
+ null :
+ jQuery.isArray( val ) ?
+ jQuery.map( val, function( val ) {
+ return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+ } ) :
+ { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+ } ).get();
+ }
+} );
+
+return jQuery;
+} );
diff --git a/templates/assets/jquery/src/traversing.js b/templates/assets/jquery/src/traversing.js
new file mode 100644
index 0000000..0d4c1c4
--- /dev/null
+++ b/templates/assets/jquery/src/traversing.js
@@ -0,0 +1,175 @@
+define( [
+ "./core",
+ "./var/indexOf",
+ "./traversing/var/dir",
+ "./traversing/var/siblings",
+ "./traversing/var/rneedsContext",
+ "./core/init",
+ "./traversing/findFilter",
+ "./selector"
+], function( jQuery, indexOf, dir, siblings, rneedsContext ) {
+
+var rparentsprev = /^(?:parents|prev(?:Until|All))/,
+
+ // Methods guaranteed to produce a unique set when starting from a unique set
+ guaranteedUnique = {
+ children: true,
+ contents: true,
+ next: true,
+ prev: true
+ };
+
+jQuery.fn.extend( {
+ has: function( target ) {
+ var targets = jQuery( target, this ),
+ l = targets.length;
+
+ return this.filter( function() {
+ var i = 0;
+ for ( ; i < l; i++ ) {
+ if ( jQuery.contains( this, targets[ i ] ) ) {
+ return true;
+ }
+ }
+ } );
+ },
+
+ closest: function( selectors, context ) {
+ var cur,
+ i = 0,
+ l = this.length,
+ matched = [],
+ pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
+ jQuery( selectors, context || this.context ) :
+ 0;
+
+ for ( ; i < l; i++ ) {
+ for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {
+
+ // Always skip document fragments
+ if ( cur.nodeType < 11 && ( pos ?
+ pos.index( cur ) > -1 :
+
+ // Don't pass non-elements to Sizzle
+ cur.nodeType === 1 &&
+ jQuery.find.matchesSelector( cur, selectors ) ) ) {
+
+ matched.push( cur );
+ break;
+ }
+ }
+ }
+
+ return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );
+ },
+
+ // Determine the position of an element within the set
+ index: function( elem ) {
+
+ // No argument, return index in parent
+ if ( !elem ) {
+ return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
+ }
+
+ // Index in selector
+ if ( typeof elem === "string" ) {
+ return indexOf.call( jQuery( elem ), this[ 0 ] );
+ }
+
+ // Locate the position of the desired element
+ return indexOf.call( this,
+
+ // If it receives a jQuery object, the first element is used
+ elem.jquery ? elem[ 0 ] : elem
+ );
+ },
+
+ add: function( selector, context ) {
+ return this.pushStack(
+ jQuery.uniqueSort(
+ jQuery.merge( this.get(), jQuery( selector, context ) )
+ )
+ );
+ },
+
+ addBack: function( selector ) {
+ return this.add( selector == null ?
+ this.prevObject : this.prevObject.filter( selector )
+ );
+ }
+} );
+
+function sibling( cur, dir ) {
+ while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}
+ return cur;
+}
+
+jQuery.each( {
+ parent: function( elem ) {
+ var parent = elem.parentNode;
+ return parent && parent.nodeType !== 11 ? parent : null;
+ },
+ parents: function( elem ) {
+ return dir( elem, "parentNode" );
+ },
+ parentsUntil: function( elem, i, until ) {
+ return dir( elem, "parentNode", until );
+ },
+ next: function( elem ) {
+ return sibling( elem, "nextSibling" );
+ },
+ prev: function( elem ) {
+ return sibling( elem, "previousSibling" );
+ },
+ nextAll: function( elem ) {
+ return dir( elem, "nextSibling" );
+ },
+ prevAll: function( elem ) {
+ return dir( elem, "previousSibling" );
+ },
+ nextUntil: function( elem, i, until ) {
+ return dir( elem, "nextSibling", until );
+ },
+ prevUntil: function( elem, i, until ) {
+ return dir( elem, "previousSibling", until );
+ },
+ siblings: function( elem ) {
+ return siblings( ( elem.parentNode || {} ).firstChild, elem );
+ },
+ children: function( elem ) {
+ return siblings( elem.firstChild );
+ },
+ contents: function( elem ) {
+ return elem.contentDocument || jQuery.merge( [], elem.childNodes );
+ }
+}, function( name, fn ) {
+ jQuery.fn[ name ] = function( until, selector ) {
+ var matched = jQuery.map( this, fn, until );
+
+ if ( name.slice( -5 ) !== "Until" ) {
+ selector = until;
+ }
+
+ if ( selector && typeof selector === "string" ) {
+ matched = jQuery.filter( selector, matched );
+ }
+
+ if ( this.length > 1 ) {
+
+ // Remove duplicates
+ if ( !guaranteedUnique[ name ] ) {
+ jQuery.uniqueSort( matched );
+ }
+
+ // Reverse order for parents* and prev-derivatives
+ if ( rparentsprev.test( name ) ) {
+ matched.reverse();
+ }
+ }
+
+ return this.pushStack( matched );
+ };
+} );
+
+return jQuery;
+} );
diff --git a/templates/assets/jquery/src/traversing/findFilter.js b/templates/assets/jquery/src/traversing/findFilter.js
new file mode 100644
index 0000000..7d4b2ca
--- /dev/null
+++ b/templates/assets/jquery/src/traversing/findFilter.js
@@ -0,0 +1,100 @@
+define( [
+ "../core",
+ "../var/indexOf",
+ "./var/rneedsContext",
+ "../selector"
+], function( jQuery, indexOf, rneedsContext ) {
+
+var risSimple = /^.[^:#\[\.,]*$/;
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, not ) {
+ if ( jQuery.isFunction( qualifier ) ) {
+ return jQuery.grep( elements, function( elem, i ) {
+ /* jshint -W018 */
+ return !!qualifier.call( elem, i, elem ) !== not;
+ } );
+
+ }
+
+ if ( qualifier.nodeType ) {
+ return jQuery.grep( elements, function( elem ) {
+ return ( elem === qualifier ) !== not;
+ } );
+
+ }
+
+ if ( typeof qualifier === "string" ) {
+ if ( risSimple.test( qualifier ) ) {
+ return jQuery.filter( qualifier, elements, not );
+ }
+
+ qualifier = jQuery.filter( qualifier, elements );
+ }
+
+ return jQuery.grep( elements, function( elem ) {
+ return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
+ } );
+}
+
+jQuery.filter = function( expr, elems, not ) {
+ var elem = elems[ 0 ];
+
+ if ( not ) {
+ expr = ":not(" + expr + ")";
+ }
+
+ return elems.length === 1 && elem.nodeType === 1 ?
+ jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
+ jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
+ return elem.nodeType === 1;
+ } ) );
+};
+
+jQuery.fn.extend( {
+ find: function( selector ) {
+ var i,
+ len = this.length,
+ ret = [],
+ self = this;
+
+ if ( typeof selector !== "string" ) {
+ return this.pushStack( jQuery( selector ).filter( function() {
+ for ( i = 0; i < len; i++ ) {
+ if ( jQuery.contains( self[ i ], this ) ) {
+ return true;
+ }
+ }
+ } ) );
+ }
+
+ for ( i = 0; i < len; i++ ) {
+ jQuery.find( selector, self[ i ], ret );
+ }
+
+ // Needed because $( selector, context ) becomes $( context ).find( selector )
+ ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
+ ret.selector = this.selector ? this.selector + " " + selector : selector;
+ return ret;
+ },
+ filter: function( selector ) {
+ return this.pushStack( winnow( this, selector || [], false ) );
+ },
+ not: function( selector ) {
+ return this.pushStack( winnow( this, selector || [], true ) );
+ },
+ is: function( selector ) {
+ return !!winnow(
+ this,
+
+ // If this is a positional/relative selector, check membership in the returned set
+ // so $("p:first").is("p:last") won't return true for a doc with two "p".
+ typeof selector === "string" && rneedsContext.test( selector ) ?
+ jQuery( selector ) :
+ selector || [],
+ false
+ ).length;
+ }
+} );
+
+} );
diff --git a/templates/assets/jquery/src/wrap.js b/templates/assets/jquery/src/wrap.js
new file mode 100644
index 0000000..4d2c3b2
--- /dev/null
+++ b/templates/assets/jquery/src/wrap.js
@@ -0,0 +1,79 @@
+define( [
+ "./core",
+ "./core/init",
+ "./manipulation", // clone
+ "./traversing" // parent, contents
+], function( jQuery ) {
+
+jQuery.fn.extend( {
+ wrapAll: function( html ) {
+ var wrap;
+
+ if ( jQuery.isFunction( html ) ) {
+ return this.each( function( i ) {
+ jQuery( this ).wrapAll( html.call( this, i ) );
+ } );
+ }
+
+ if ( this[ 0 ] ) {
+
+ // The elements to wrap the target around
+ wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );
+
+ if ( this[ 0 ].parentNode ) {
+ wrap.insertBefore( this[ 0 ] );
+ }
+
+ wrap.map( function() {
+ var elem = this;
+
+ while ( elem.firstElementChild ) {
+ elem = elem.firstElementChild;
+ }
+
+ return elem;
+ } ).append( this );
+ }
+
+ return this;
+ },
+
+ wrapInner: function( html ) {
+ if ( jQuery.isFunction( html ) ) {
+ return this.each( function( i ) {
+ jQuery( this ).wrapInner( html.call( this, i ) );
+ } );
+ }
+
+ return this.each( function() {
+ var self = jQuery( this ),
+ contents = self.contents();
+
+ if ( contents.length ) {
+ contents.wrapAll( html );
+
+ } else {
+ self.append( html );
+ }
+ } );
+ },
+
+ wrap: function( html ) {
+ var isFunction = jQuery.isFunction( html );
+
+ return this.each( function( i ) {
+ jQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html );
+ } );
+ },
+
+ unwrap: function() {
+ return this.parent().each( function() {
+ if ( !jQuery.nodeName( this, "body" ) ) {
+ jQuery( this ).replaceWith( this.childNodes );
+ }
+ } ).end();
+ }
+} );
+
+return jQuery;
+} );
diff --git a/templates/assets/sass/.DS_Store b/templates/assets/sass/.DS_Store
new file mode 100644
index 0000000..b61cdf9
--- /dev/null
+++ b/templates/assets/sass/.DS_Store
Binary files differ
diff --git a/templates/assets/sass/material-kit.scss b/templates/assets/sass/material-kit.scss
new file mode 100755
index 0000000..cbf24d8
--- /dev/null
+++ b/templates/assets/sass/material-kit.scss
@@ -0,0 +1,24 @@
+/*!
+
+ =========================================================
+ * Material Kit - v1.1.1.0
+ =========================================================
+
+ * Product Page: http://www.creative-tim.com/product/material-kit
+ * Copyright 2017 Creative Tim (http://www.creative-tim.com)
+ * Licensed under MIT (https://github.com/timcreative/material-kit/blob/master/LICENSE.md)
+
+ =========================================================
+
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+ */
+
+@import 'material-kit/variables';
+@import 'material-kit/mixins';
+@import 'material-kit/shadows';
+@import 'material-kit/core';
+
+@import 'material-kit/ripples';
+
+@import 'material-kit/example-pages';
diff --git a/templates/assets/sass/material-kit/.DS_Store b/templates/assets/sass/material-kit/.DS_Store
new file mode 100644
index 0000000..bc17f27
--- /dev/null
+++ b/templates/assets/sass/material-kit/.DS_Store
Binary files differ
diff --git a/templates/assets/sass/material-kit/_alerts.scss b/templates/assets/sass/material-kit/_alerts.scss
new file mode 100755
index 0000000..52e9497
--- /dev/null
+++ b/templates/assets/sass/material-kit/_alerts.scss
@@ -0,0 +1,41 @@
+// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
+
+.alert {
+ border: 0;
+ border-radius: 0;
+
+ padding: 20px 15px;
+ line-height: 20px;
+
+ //@include shadow-z-2();
+
+ b{
+ font-weight: $font-weight-bold;
+ text-transform: uppercase;
+ font-size: $font-size-small;
+ }
+ // SASS conversion note: please mirror any content change in _mixins-shared.scss alert-variations-content
+ @include alert-variations(unquote(".alert"), unquote(""), $mdb-text-color-light);
+
+ &-info, &-danger, &-warning, &-success {
+ color: $mdb-text-color-light;
+ }
+
+ &-default {
+ a, .alert-link {
+ color: $mdb-text-color-primary;
+ }
+ }
+
+ .alert-icon{
+ display: block;
+ float: left;
+ margin-right: $margin-base;
+
+ i{
+ margin-top: -7px;
+ top: 5px;
+ position: relative;
+ }
+ }
+}
diff --git a/templates/assets/sass/material-kit/_buttons.scss b/templates/assets/sass/material-kit/_buttons.scss
new file mode 100755
index 0000000..123565b
--- /dev/null
+++ b/templates/assets/sass/material-kit/_buttons.scss
@@ -0,0 +1,245 @@
+.btn,
+.navbar .navbar-nav > li > a.btn{
+ border: none;
+ border-radius: $border-radius-base;
+ position: relative;
+ padding: 12px 30px;
+ margin: 10px 1px;
+
+ font-size: $mdb-btn-font-size-base;
+ font-weight: 400;
+ text-transform: uppercase;
+ letter-spacing: 0;
+
+ will-change: box-shadow, transform;
+ transition: box-shadow 0.2s $mdb-animation-curve-fast-out-linear-in,
+ background-color 0.2s $mdb-animation-curve-default;
+
+ &::-moz-focus-inner {
+ border: 0;
+ }
+
+ &,
+ &.btn-default{
+ @include btn-styles($gray-light);
+ }
+
+ &.btn-primary{
+ @include btn-styles($brand-primary);
+ }
+ &.btn-info{
+ @include btn-styles($brand-info);
+ }
+ &.btn-success{
+ @include btn-styles($brand-success);
+ }
+ &.btn-warning{
+ @include btn-styles($brand-warning);
+ }
+ &.btn-danger{
+ @include btn-styles($brand-danger);
+ }
+ &.btn-upgrade{
+ @include btn-styles($brand-rose);
+ }
+ &.btn-white{
+ &,
+ &:focus,
+ &:hover{
+ background-color: $white-color;
+ color: $gray-light;
+ }
+ &.btn-simple{
+ color: #FFFFFF;
+ background: transparent;
+ box-shadow: none;
+ }
+ }
+
+ &:focus,
+ &:active,
+ &:active:focus{
+ outline: 0;
+ }
+
+ &.btn-round{
+ border-radius: $border-radius-extreme;
+ }
+
+ &:not(.btn-just-icon):not(.btn-fab){
+ .fa{
+ font-size: 18px;
+ margin-top: -2px;
+ position: relative;
+ top: 2px;
+ }
+ }
+
+
+ &.btn-fab {
+ // see above for color variations
+ border-radius: 50%;
+ font-size: $mdb-btn-fab-font-size;
+ height: $mdb-btn-fab-size;
+ margin: auto;
+ min-width: $mdb-btn-fab-size;
+ width: $mdb-btn-fab-size;
+ padding: 0;
+ overflow: hidden;
+ position: relative;
+ line-height: normal;
+
+ .ripple-container {
+ border-radius: 50%;
+ }
+
+ &.btn-fab-mini,
+ .btn-group-sm & {
+ height: $mdb-btn-fab-size-mini;
+ min-width: $mdb-btn-fab-size-mini;
+ width: $mdb-btn-fab-size-mini;
+
+ &.material-icons {
+ top: ($mdb-btn-icon-size-mini - $mdb-btn-fab-font-size) / 2;
+ left: ($mdb-btn-icon-size-mini - $mdb-btn-fab-font-size) / 2;
+ }
+
+ .material-icons{
+ font-size: $mdb-btn-icon-size-mini;
+ }
+ }
+
+ i.material-icons {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-($mdb-btn-fab-font-size / 2), -($mdb-btn-fab-font-size / 2));
+ line-height: $mdb-btn-fab-font-size;
+ width: $mdb-btn-fab-font-size;
+ font-size: $mdb-btn-fab-font-size;
+ }
+ }
+
+ // Size variations
+ &.btn-lg,
+ .btn-group-lg & {
+ font-size: $mdb-btn-font-size-lg;
+ padding: 18px 36px;
+ }
+ &.btn-sm,
+ .btn-group-sm & {
+ padding: 5px 20px;
+ font-size: $mdb-btn-font-size-sm;
+ }
+ &.btn-xs,
+ .btn-group-xs & {
+ padding: 4px 15px;
+ font-size: $mdb-btn-font-size-xs;
+ }
+
+ &.btn-just-icon{
+ font-size: 18px;
+ padding: 10px 10px;
+ line-height: 1em;
+
+ i{
+ width: 20px;
+ }
+ &.btn-lg{
+ font-size: 22px;
+ padding: 13px 18px;
+ }
+ }
+}
+
+.btn{
+ // Align icons inside buttons with text
+ .material-icons{
+ vertical-align: middle;
+ font-size: $mdb-btn-icon-size-mini;
+ top: -1px;
+ position: relative;
+ }
+
+}
+
+.navbar .navbar-nav > li > {
+ a.btn{
+ margin-top: 2px;
+ margin-bottom: 2px;
+
+ &.btn-fab{
+ margin: 5px 2px;
+ }
+ }
+ a:not(.btn){
+ .material-icons{
+ margin-top: -3px;
+ top: 0px;
+ position: relative;
+ margin-right: 3px;
+ }
+ }
+ .profile-photo{
+ margin: 5px 2px;
+ }
+}
+
+.navbar-default:not(.navbar-transparent) .navbar-nav > li > {
+ a.btn{
+ &.btn-white.btn-simple{
+ color: $gray;
+ }
+ }
+}
+
+// btn-group variations
+.btn-group,
+.btn-group-vertical {
+
+ position: relative;
+ //border-radius: 2px;
+ margin: 10px 1px;
+
+ &.open {
+ .dropdown-toggle {
+ //box-shadow: none;
+ }
+
+ & > .dropdown-toggle.btn {
+ @include variations(unquote(".btn"), unquote(""), background-color, $mdb-btn-background-color);
+ }
+ }
+
+ .dropdown-menu {
+ border-radius: 0 0 $border-radius-base $border-radius-base;
+ }
+
+ &.btn-group-raised {
+ @include shadow-2dp();
+ }
+
+ & .btn + .btn,
+ .btn,
+ .btn:active,
+ .btn-group {
+ margin: 0;
+ }
+}
+
+.close{
+ font-size: inherit;
+ color: $white-color;
+ opacity: .9;
+ text-shadow: none;
+
+ &:hover,
+ &:focus{
+ opacity: 1;
+ color: $white-color;
+ }
+
+ i{
+ font-size: 20px;
+ }
+}
diff --git a/templates/assets/sass/material-kit/_cards.scss b/templates/assets/sass/material-kit/_cards.scss
new file mode 100755
index 0000000..6b4d487
--- /dev/null
+++ b/templates/assets/sass/material-kit/_cards.scss
@@ -0,0 +1,164 @@
+.card {
+
+ display: inline-block;
+ position: relative;
+ width: 100%;
+
+ .card-height-indicator {
+ margin-top: 100%;
+ }
+ .card-content {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ }
+
+ border-radius: $border-radius-base;
+ color: $mdb-card-body-text;
+ background: $mdb-card-body-background;
+
+ @include shadow-2dp();
+
+ .card-image {
+ height: 60%;
+ position: relative;
+ overflow: hidden;
+ img {
+ width: 100%;
+ height: 100%;
+ border-top-left-radius: 2px;
+ border-top-right-radius: 2px;
+ pointer-events: none;
+ }
+ .card-image-headline {
+ position: absolute;
+ bottom: 16px;
+ left: 18px;
+ color: $mdb-card-image-headline;
+ font-size: 2em;
+ }
+ }
+
+ .content{
+ padding: 15px;
+ }
+
+ .card-body {
+ height: 30%;
+ padding: 18px;
+ }
+
+ .card-footer {
+ height: 10%;
+ padding: 18px;
+ button, a {
+ margin: 0 !important;
+ position: relative;
+ bottom: 25px;
+ width: auto;
+ &:first-child {
+ left: -15px;
+ }
+ }
+ }
+
+ .header{
+ @include shadow-big();
+ margin: $margin-base;
+ border-radius: $border-radius-base;
+ padding: $padding-base 0;
+ background-color: $white-color;
+ }
+
+ .header-primary{
+ background: linear-gradient(60deg, $purple-400, $purple-700);
+ }
+ .header-info{
+ background: linear-gradient(60deg, $light-blue-400, $light-blue-700);
+ }
+ .header-success{
+ background: linear-gradient(60deg, $green-400, $green-700);
+ }
+ .header-warning{
+ background: linear-gradient(60deg, $yellow-600, $yellow-700);
+ }
+ .header-danger{
+ background: linear-gradient(60deg, $red-400, $red-700);
+ }
+
+ [class*="header-"]{
+ color: #FFFFFF;
+ }
+}
+
+.card-raised{
+ @include shadow-big();
+}
+
+.card-signup{
+ .header{
+ @include shadow-big();
+ margin-left: 20px;
+ margin-right: 20px;
+ margin-top: -40px;
+ padding: 20px 0;
+ }
+ .text-divider{
+ margin-top: 30px;
+ margin-bottom: 0px;
+ text-align: center;
+ }
+ .content{
+ padding: 0px 30px 0px 10px;
+ }
+
+ .checkbox{
+ margin-top: 20px;
+
+ label{
+ margin-left: 17px;
+ }
+ .checkbox-material{
+ padding-right: 12px;
+ }
+ }
+
+ .social-line{
+ margin-top: $margin-base;
+ text-align: center;
+
+ .btn{
+ color: $white-color;
+ margin-left: 5px;
+ margin-right: 5px;
+ }
+ }
+}
+
+.card-nav-tabs{
+ margin-top: 45px;
+
+ .header{
+ margin-top: -$margin-base * 2;
+ }
+ .nav-tabs{
+ background: transparent;
+ }
+}
+
+.card-plain{
+ background: transparent;
+ box-shadow: none;
+
+ .header{
+ margin-left: 0;
+ margin-right: 0;
+ }
+
+ .content{
+ padding-left: 0;
+ padding-right: 0;
+ }
+}
diff --git a/templates/assets/sass/material-kit/_carousel.scss b/templates/assets/sass/material-kit/_carousel.scss
new file mode 100644
index 0000000..5c80a95
--- /dev/null
+++ b/templates/assets/sass/material-kit/_carousel.scss
@@ -0,0 +1,52 @@
+.carousel{
+ .carousel-control{
+ width: 50%;
+
+ &.left,
+ &.right{
+ background-image: none;
+ }
+
+ .material-icons,
+ .fa{
+ display: none;
+ }
+ }
+ .left{
+ cursor: url("../img/arrow-left.png"), url("../img/arrow-left.cur"), default !important;
+ }
+ .right{
+ cursor: url("../img/arrow-right.png"), url("../img/arrow-right.cur"), default !important;
+ }
+
+ .carousel-indicators{
+ bottom: 5px;
+
+ li,
+ .active{
+ margin: 11px 10px;
+ }
+
+ li{
+ background: #FFFFFF;
+ @include shadow-2dp();
+ @extend .animation-transition-general;
+ border-radius: $border-radius-small;
+ }
+ .active{
+ margin-top: 10px;
+ @include transform-scale(1.5);
+ @include shadow-4dp();
+ }
+ }
+
+ .carousel-caption{
+ padding-bottom: 45px;
+
+ .material-icons{
+ position: relative;
+ top: 5px;
+ }
+ }
+
+}
diff --git a/templates/assets/sass/material-kit/_checkboxes.scss b/templates/assets/sass/material-kit/_checkboxes.scss
new file mode 100755
index 0000000..119bde2
--- /dev/null
+++ b/templates/assets/sass/material-kit/_checkboxes.scss
@@ -0,0 +1,195 @@
+.form-group {
+}
+
+.checkbox {
+ label {
+ cursor: pointer;
+ padding-left: 0; // Reset for Bootstrap rule
+ color: $mdb-checkbox-label-color;
+ @include mdb-label-color-toggle-focus();
+ }
+
+ // Hide native checkbox
+ input[type=checkbox] {
+ opacity: 0;
+ position: absolute;
+ margin: 0;
+ z-index: -1;
+ width: 0;
+ height: 0;
+ overflow: hidden;
+ left: 0;
+ pointer-events: none;
+ }
+
+ .checkbox-material {
+ vertical-align: middle;
+ position: relative;
+ top: 1px;
+ padding-right: 5px;
+ display: inline-block;
+
+ &:before {
+ display: block;
+ position: absolute;
+ left: 0;
+ content: "";
+ background-color: rgba(0,0,0,.84);
+ height: $mdb-checkbox-size;
+ width: $mdb-checkbox-size;
+ border-radius: 100%;
+ z-index: 1;
+ opacity: 0;
+ margin: 0;
+ top: 0;
+ @include transform-scale3d(unquote('2.3,2.3,1'));
+ }
+
+ .check {
+ position: relative;
+ display: inline-block;
+ width: $mdb-checkbox-size;
+ height: $mdb-checkbox-size;
+ border: 1px solid $mdb-checkbox-border-color;
+ overflow: hidden;
+ z-index: 1;
+ border-radius: $border-radius-base;
+ }
+ .check:before {
+ position: absolute;
+ content: "";
+ transform: rotate(45deg);
+ display: block;
+ margin-top: -3px;
+ margin-left: 7px;
+ width: 0;
+ height: 0;
+ background: red;
+ box-shadow:
+ 0 0 0 0,
+ 0 0 0 0,
+ 0 0 0 0,
+ 0 0 0 0,
+ 0 0 0 0,
+ 0 0 0 0,
+ 0 0 0 0 inset;
+ @include animation(checkbox-off $mdb-checkbox-animation-check forwards);
+ }
+ }
+
+ input[type=checkbox] {
+
+ &:focus + .checkbox-material .check:after {
+ opacity: 0.2;
+ }
+
+ &:checked {
+
+ & + .checkbox-material .check {
+ background: $mdb-checkbox-checked-color;
+ }
+
+ & + .checkbox-material .check:before {
+ color: #FFFFFF;
+ box-shadow: 0 0 0 10px,
+ 10px -10px 0 10px,
+ 32px 0 0 20px,
+ 0px 32px 0 20px,
+ -5px 5px 0 10px,
+ 20px -12px 0 11px;
+ @include animation(checkbox-on $mdb-checkbox-animation-check forwards);
+ }
+
+ & + .checkbox-material:before {
+ @include animation(rippleOn $mdb-checkbox-animation-ripple);
+ }
+
+ & + .checkbox-material .check:after {
+ //background-color: $brand-success; // FIXME: seems like tho wrong color, test and make sure it can be removed
+ @include animation(rippleOn $mdb-checkbox-animation-ripple forwards);
+ }
+ }
+
+ &:not(:checked) {
+ & + .checkbox-material:before {
+ @include animation(rippleOff $mdb-checkbox-animation-ripple);
+ }
+
+ & + .checkbox-material .check:after {
+ @include animation(rippleOff $mdb-checkbox-animation-ripple); // Ripple effect on uncheck
+
+ }
+ }
+ }
+
+ // Style for disabled inputs
+ fieldset[disabled] &,
+ fieldset[disabled] & input[type=checkbox],
+ input[type=checkbox][disabled] ~ .checkbox-material .check,
+ input[type=checkbox][disabled] + .circle {
+ opacity: 0.5;
+ }
+
+ input[type=checkbox][disabled] ~ .checkbox-material .check{
+ border-color: #000000;
+ opacity: .26;
+ }
+
+ input[type=checkbox][disabled] + .checkbox-material .check:after {
+ background-color: $mdb-text-color-primary;
+ transform: rotate(-45deg);
+ }
+}
+
+@keyframes checkbox-on {
+ 0% {
+ box-shadow:
+ 0 0 0 10px,
+ 10px -10px 0 10px,
+ 32px 0 0 20px,
+ 0px 32px 0 20px,
+ -5px 5px 0 10px,
+ 15px 2px 0 11px;
+ }
+ 50% {
+ box-shadow:
+ 0 0 0 10px,
+ 10px -10px 0 10px,
+ 32px 0 0 20px,
+ 0px 32px 0 20px,
+ -5px 5px 0 10px,
+ 20px 2px 0 11px;
+ }
+ 100% {
+ box-shadow:
+ 0 0 0 10px,
+ 10px -10px 0 10px,
+ 32px 0 0 20px,
+ 0px 32px 0 20px,
+ -5px 5px 0 10px,
+ 20px -12px 0 11px;
+ }
+}
+
+@keyframes rippleOn {
+ 0% {
+ opacity: 0;
+ }
+ 50% {
+ opacity: 0.2;
+ }
+ 100% {
+ opacity: 0;
+ }
+}
+@keyframes rippleOff {
+ 0% {
+ opacity: 0;
+ }
+ 50% {
+ opacity: 0.2;
+ }
+ 100% {
+ opacity: 0;
+ }
+}
diff --git a/templates/assets/sass/material-kit/_colors.scss b/templates/assets/sass/material-kit/_colors.scss
new file mode 100755
index 0000000..67904ea
--- /dev/null
+++ b/templates/assets/sass/material-kit/_colors.scss
@@ -0,0 +1,326 @@
+
+$red-50: #ffebee !default;
+$red-100: #ffcdd2 !default;
+$red-200: #ef9a9a !default;
+$red-300: #e57373 !default;
+$red-400: #ef5350 !default;
+$red-500: #f44336 !default;
+$red-600: #e53935 !default;
+$red-700: #d32f2f !default;
+$red-800: #c62828 !default;
+$red-900: #b71c1c !default;
+$red-A100: #ff8a80 !default;
+$red-A200: #ff5252 !default;
+$red-A400: #ff1744 !default;
+$red-A700: #d50000 !default;
+$red: $red-500 !default;
+
+
+$pink-50: #fce4ec !default;
+$pink-100: #f8bbd0 !default;
+$pink-200: #f48fb1 !default;
+$pink-300: #f06292 !default;
+$pink-400: #ec407a !default;
+$pink-500: #e91e63 !default;
+$pink-600: #d81b60 !default;
+$pink-700: #c2185b !default;
+$pink-800: #ad1457 !default;
+$pink-900: #880e4f !default;
+$pink-A100: #ff80ab !default;
+$pink-A200: #ff4081 !default;
+$pink-A400: #f50057 !default;
+$pink-A700: #c51162 !default;
+$pink: $pink-500 !default;
+
+
+$purple-50: #f3e5f5 !default;
+$purple-100: #e1bee7 !default;
+$purple-200: #ce93d8 !default;
+$purple-300: #ba68c8 !default;
+$purple-400: #ab47bc !default;
+$purple-500: #9c27b0 !default;
+$purple-600: #8e24aa !default;
+$purple-700: #7b1fa2 !default;
+$purple-800: #6a1b9a !default;
+$purple-900: #4a148c !default;
+$purple-A100: #ea80fc !default;
+$purple-A200: #e040fb !default;
+$purple-A400: #d500f9 !default;
+$purple-A700: #aa00ff !default;
+$purple: $purple-500 !default;
+
+
+$deep-purple-50: #ede7f6 !default;
+$deep-purple-100: #d1c4e9 !default;
+$deep-purple-200: #b39ddb !default;
+$deep-purple-300: #9575cd !default;
+$deep-purple-400: #7e57c2 !default;
+$deep-purple-500: #673ab7 !default;
+$deep-purple-600: #5e35b1 !default;
+$deep-purple-700: #512da8 !default;
+$deep-purple-800: #4527a0 !default;
+$deep-purple-900: #311b92 !default;
+$deep-purple-A100: #b388ff !default;
+$deep-purple-A200: #7c4dff !default;
+$deep-purple-A400: #651fff !default;
+$deep-purple-A700: #6200ea !default;
+$deep-purple: $deep-purple-500 !default;
+
+
+$indigo-50: #e8eaf6 !default;
+$indigo-100: #c5cae9 !default;
+$indigo-200: #9fa8da !default;
+$indigo-300: #7986cb !default;
+$indigo-400: #5c6bc0 !default;
+$indigo-500: #3f51b5 !default;
+$indigo-600: #3949ab !default;
+$indigo-700: #303f9f !default;
+$indigo-800: #283593 !default;
+$indigo-900: #1a237e !default;
+$indigo-A100: #8c9eff !default;
+$indigo-A200: #536dfe !default;
+$indigo-A400: #3d5afe !default;
+$indigo-A700: #304ffe !default;
+$indigo: $indigo-500 !default;
+
+
+$blue-50: #e3f2fd !default;
+$blue-100: #bbdefb !default;
+$blue-200: #90caf9 !default;
+$blue-300: #64b5f6 !default;
+$blue-400: #42a5f5 !default;
+$blue-500: #2196f3 !default;
+$blue-600: #1e88e5 !default;
+$blue-700: #1976d2 !default;
+$blue-800: #1565c0 !default;
+$blue-900: #0d47a1 !default;
+$blue-A100: #82b1ff !default;
+$blue-A200: #448aff !default;
+$blue-A400: #2979ff !default;
+$blue-A700: #2962ff !default;
+$blue: $blue-500 !default;
+
+
+$light-blue-50: #e1f5fe !default;
+$light-blue-100: #b3e5fc !default;
+$light-blue-200: #81d4fa !default;
+$light-blue-300: #4fc3f7 !default;
+$light-blue-400: #29b6f6 !default;
+$light-blue-500: #03a9f4 !default;
+$light-blue-600: #039be5 !default;
+$light-blue-700: #0288d1 !default;
+$light-blue-800: #0277bd !default;
+$light-blue-900: #01579b !default;
+$light-blue-A100: #80d8ff !default;
+$light-blue-A200: #40c4ff !default;
+$light-blue-A400: #00b0ff !default;
+$light-blue-A700: #0091ea !default;
+$light-blue: $light-blue-500 !default;
+
+
+$cyan-50: #e0f7fa !default;
+$cyan-100: #b2ebf2 !default;
+$cyan-200: #80deea !default;
+$cyan-300: #4dd0e1 !default;
+$cyan-400: #26c6da !default;
+$cyan-500: #00bcd4 !default;
+$cyan-600: #00acc1 !default;
+$cyan-700: #0097a7 !default;
+$cyan-800: #00838f !default;
+$cyan-900: #006064 !default;
+$cyan-A100: #84ffff !default;
+$cyan-A200: #18ffff !default;
+$cyan-A400: #00e5ff !default;
+$cyan-A700: #00b8d4 !default;
+$cyan: $cyan-500 !default;
+
+
+$teal-50: #e0f2f1 !default;
+$teal-100: #b2dfdb !default;
+$teal-200: #80cbc4 !default;
+$teal-300: #4db6ac !default;
+$teal-400: #26a69a !default;
+$teal-500: #009688 !default;
+$teal-600: #00897b !default;
+$teal-700: #00796b !default;
+$teal-800: #00695c !default;
+$teal-900: #004d40 !default;
+$teal-A100: #a7ffeb !default;
+$teal-A200: #64ffda !default;
+$teal-A400: #1de9b6 !default;
+$teal-A700: #00bfa5 !default;
+$teal: $teal-500 !default;
+
+
+$green-50: #e8f5e9 !default;
+$green-100: #c8e6c9 !default;
+$green-200: #a5d6a7 !default;
+$green-300: #81c784 !default;
+$green-400: #66bb6a !default;
+$green-500: #4caf50 !default;
+$green-600: #43a047 !default;
+$green-700: #388e3c !default;
+$green-800: #2e7d32 !default;
+$green-900: #1b5e20 !default;
+$green-A100: #b9f6ca !default;
+$green-A200: #69f0ae !default;
+$green-A400: #00e676 !default;
+$green-A700: #00c853 !default;
+$green: $green-500 !default;
+
+
+$light-green-50: #f1f8e9 !default;
+$light-green-100: #dcedc8 !default;
+$light-green-200: #c5e1a5 !default;
+$light-green-300: #aed581 !default;
+$light-green-400: #9ccc65 !default;
+$light-green-500: #8bc34a !default;
+$light-green-600: #7cb342 !default;
+$light-green-700: #689f38 !default;
+$light-green-800: #558b2f !default;
+$light-green-900: #33691e !default;
+$light-green-A100: #ccff90 !default;
+$light-green-A200: #b2ff59 !default;
+$light-green-A400: #76ff03 !default;
+$light-green-A700: #64dd17 !default;
+$light-green: $light-green-500 !default;
+
+
+$lime-50: #f9fbe7 !default;
+$lime-100: #f0f4c3 !default;
+$lime-200: #e6ee9c !default;
+$lime-300: #dce775 !default;
+$lime-400: #d4e157 !default;
+$lime-500: #cddc39 !default;
+$lime-600: #c0ca33 !default;
+$lime-700: #afb42b !default;
+$lime-800: #9e9d24 !default;
+$lime-900: #827717 !default;
+$lime-A100: #f4ff81 !default;
+$lime-A200: #eeff41 !default;
+$lime-A400: #c6ff00 !default;
+$lime-A700: #aeea00 !default;
+$lime: $lime-500 !default;
+
+
+$yellow-50: #fffde7 !default;
+$yellow-100: #fff9c4 !default;
+$yellow-200: #fff59d !default;
+$yellow-300: #fff176 !default;
+$yellow-400: #ffee58 !default;
+$yellow-500: #fec60a !default;
+$yellow-600: #fdd835 !default;
+$yellow-700: #fbc02d !default;
+$yellow-800: #f9a825 !default;
+$yellow-900: #f57f17 !default;
+$yellow-A100: #ffff8d !default;
+$yellow-A200: #ffff00 !default;
+$yellow-A400: #ffea00 !default;
+$yellow-A700: #ffd600 !default;
+$yellow: $yellow-700 !default;
+
+
+$amber-50: #fff8e1 !default;
+$amber-100: #ffecb3 !default;
+$amber-200: #ffe082 !default;
+$amber-300: #ffd54f !default;
+$amber-400: #ffca28 !default;
+$amber-500: #ffc107 !default;
+$amber-600: #ffb300 !default;
+$amber-700: #ffa000 !default;
+$amber-800: #ff8f00 !default;
+$amber-900: #ff6f00 !default;
+$amber-A100: #ffe57f !default;
+$amber-A200: #ffd740 !default;
+$amber-A400: #ffc400 !default;
+$amber-A700: #ffab00 !default;
+$amber: $amber-500 !default;
+
+
+$orange-50: #fff3e0 !default;
+$orange-100: #ffe0b2 !default;
+$orange-200: #ffcc80 !default;
+$orange-300: #ffb74d !default;
+$orange-400: #ffa726 !default;
+$orange-500: #ff9800 !default;
+$orange-600: #fb8c00 !default;
+$orange-700: #f57c00 !default;
+$orange-800: #ef6c00 !default;
+$orange-900: #e65100 !default;
+$orange-A100: #ffd180 !default;
+$orange-A200: #ffab40 !default;
+$orange-A400: #ff9100 !default;
+$orange-A700: #ff6d00 !default;
+$orange: $orange-500 !default;
+
+
+$deep-orange-50: #fbe9e7 !default;
+$deep-orange-100: #ffccbc !default;
+$deep-orange-200: #ffab91 !default;
+$deep-orange-300: #ff8a65 !default;
+$deep-orange-400: #ff7043 !default;
+$deep-orange-500: #ff5722 !default;
+$deep-orange-600: #f4511e !default;
+$deep-orange-700: #e64a19 !default;
+$deep-orange-800: #d84315 !default;
+$deep-orange-900: #bf360c !default;
+$deep-orange-A100: #ff9e80 !default;
+$deep-orange-A200: #ff6e40 !default;
+$deep-orange-A400: #ff3d00 !default;
+$deep-orange-A700: #dd2c00 !default;
+$deep-orange: $deep-orange-500 !default;
+
+
+$brown-50: #efebe9 !default;
+$brown-100: #d7ccc8 !default;
+$brown-200: #bcaaa4 !default;
+$brown-300: #a1887f !default;
+$brown-400: #8d6e63 !default;
+$brown-500: #795548 !default;
+$brown-600: #6d4c41 !default;
+$brown-700: #5d4037 !default;
+$brown-800: #4e342e !default;
+$brown-900: #3e2723 !default;
+$brown-A100: #d7ccc8 !default;
+$brown-A200: #bcaaa4 !default;
+$brown-A400: #8d6e63 !default;
+$brown-A700: #5d4037 !default;
+$brown: $brown-500 !default;
+
+
+$grey-50: #fafafa !default;
+$grey-100: #f5f5f5 !default;
+$grey-200: #eeeeee !default;
+$grey-300: #e0e0e0 !default;
+$grey-400: #bdbdbd !default;
+$grey-500: #9e9e9e; $rgb-grey-500: "158, 158, 158" !default;
+$grey-600: #757575 !default;
+$grey-700: #616161 !default;
+$grey-800: #424242 !default;
+$grey-900: #212121 !default;
+$grey-A100: #f5f5f5 !default;
+$grey-A200: #eeeeee !default;
+$grey-A400: #bdbdbd !default;
+$grey-A700: #616161 !default;
+$grey: $grey-500 !default;
+
+
+$blue-grey-50: #eceff1 !default;
+$blue-grey-100: #cfd8dc !default;
+$blue-grey-200: #b0bec5 !default;
+$blue-grey-300: #90a4ae !default;
+$blue-grey-400: #78909c !default;
+$blue-grey-500: #607d8b !default;
+$blue-grey-600: #546e7a !default;
+$blue-grey-700: #455a64 !default;
+$blue-grey-800: #37474f !default;
+$blue-grey-900: #263238 !default;
+$blue-grey-A100: #cfd8dc !default;
+$blue-grey-A200: #b0bec5 !default;
+$blue-grey-A400: #78909c !default;
+$blue-grey-A700: #455a64 !default;
+$blue-grey: $blue-grey-500 !default;
+
+
+$black: #000000; $rgb-black: "0,0,0" !default;
+$white: #ffffff; $rgb-white: "255,255,255" !default;
diff --git a/templates/assets/sass/material-kit/_core.scss b/templates/assets/sass/material-kit/_core.scss
new file mode 100755
index 0000000..986d480
--- /dev/null
+++ b/templates/assets/sass/material-kit/_core.scss
@@ -0,0 +1,115 @@
+// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
+
+body {
+ background-color: #CCCCCC;
+ &.inverse {
+ background: #333333;
+ &, .form-control {
+ color: $mdb-text-color-light;
+ }
+ .modal,
+ .panel-default,
+ .card {
+ &,
+ .form-control {
+ background-color: initial;
+ color: initial;
+ }
+ }
+
+ }
+}
+
+.life-of-material-kit{
+ background: #FFFFFF;
+}
+body, h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4 {
+ font-family: $font-family-sans-serif;
+ font-weight: 300;
+ line-height: 1.5em;
+}
+
+a, a:hover, a:focus {
+ color: $link-color;
+
+ & .material-icons {
+ vertical-align: middle;
+ }
+}
+
+/* Animations */
+
+.animation-transition-general{
+ @include transition($general-transition-time, $transition-linear);
+}
+
+.animation-transition-slow{
+ @include transition($slow-transition-time, $transition-linear);
+}
+
+.animation-transition-fast{
+ @include transition($fast-transition-time, $transition-ease);
+}
+
+@import '_form';
+//@import '_welljumbo'; // Not designed yet by Creative Tim, you can use it as it is
+@import '_buttons';
+@import '_checkboxes';
+@import '_togglebutton';
+@import '_radios';
+@import '_inputs';
+@import '_pagination';
+@import '_labels';
+@import '_pills';
+@import '_footers';
+
+legend {
+ border-bottom: 0;
+}
+
+//@import '_lists'; // Not designed yet by Creative Tim, you can use it as it is
+@import '_navbar';
+
+@import '_dropdown';
+@import '_info-areas';
+@import '_alerts';
+@import '_progress';
+@import '_typography';
+@import '_tabs';
+@import '_popups';
+@import '_carousel';
+@import '_cards';
+@import '_dialogs';
+@import '_panels';
+@import '_dividers';
+
+@import '_images';
+
+
+// Prevent highlight on mobile
+* {
+ -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
+ -webkit-tap-highlight-color: transparent;
+ &:focus {
+ outline: 0;
+ }
+}
+a:focus, a:active,
+button:active, button:focus, button:hover,
+button::-moz-focus-inner,
+input[type="reset"]::-moz-focus-inner,
+input[type="button"]::-moz-focus-inner,
+input[type="submit"]::-moz-focus-inner,
+select::-moz-focus-inner,
+input[type="file"] > input[type="button"]::-moz-focus-inner {
+ outline : 0 !important;
+}
+
+@import '_sections';
+
+// External plugins
+// @import 'plugins/_plugin-snackbarjs'; // Not designed yet by Creative Tim, you can use it as it is
+@import 'plugins/_plugin-nouislider';
+//@import 'plugins/_plugin-selectize'; // Not designed yet by Creative Tim, you can use it as it is
+@import 'plugins/_plugin-dropdownjs';
+@import 'plugins/_plugin-datepicker';
diff --git a/templates/assets/sass/material-kit/_dialogs.scss b/templates/assets/sass/material-kit/_dialogs.scss
new file mode 100755
index 0000000..5ad9fc3
--- /dev/null
+++ b/templates/assets/sass/material-kit/_dialogs.scss
@@ -0,0 +1,69 @@
+// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
+
+//
+// Modals
+// Material Design element Dialogs
+// --------------------------------------------------
+.modal-content {
+ @include shadow-z-5();
+ border-radius: $border-radius-base;
+ border: none;
+ // Modal header
+ // Top section of the modal w/ title and dismiss
+ .modal-header {
+ border-bottom: none;
+ padding-top: 24px;
+ padding-right: 24px;
+ padding-bottom: 0;
+ padding-left: 24px;
+ }
+ // Modal body
+ // Where all modal content resides (sibling of .modal-header and .modal-footer)
+ .modal-body {
+ padding-top: 24px;
+ padding-right: 24px;
+ padding-bottom: 16px;
+ padding-left: 24px;
+ }
+ // Footer (for actions)
+ .modal-footer {
+ border-top: none;
+ padding: 7px;
+ button {
+ margin: 0;
+ padding-left: 16px;
+ padding-right: 16px;
+ width: auto;
+ &.pull-left {
+ padding-left: 5px;
+ padding-right: 5px;
+ position: relative;
+ left: -5px;
+ }
+ }
+ button+button {
+ margin-bottom: 16px;
+ }
+ }
+ .modal-body + .modal-footer {
+ padding-top: 0;
+ }
+}
+.modal-backdrop {
+ background: rgba(0,0,0,0.3);
+}
+
+.modal{
+ .modal-dialog{
+ margin-top: 100px;
+ }
+ .modal-header .close{
+ color: $gray;
+
+ &:hover,
+ &:focus{
+ opacity: 1;
+ color: $gray;
+ }
+ }
+}
diff --git a/templates/assets/sass/material-kit/_dividers.scss b/templates/assets/sass/material-kit/_dividers.scss
new file mode 100755
index 0000000..45d1d09
--- /dev/null
+++ b/templates/assets/sass/material-kit/_dividers.scss
@@ -0,0 +1,73 @@
+// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
+
+hr {
+ &.on-dark {
+ color: lighten($black, 10%);
+ }
+
+ &.on-light {
+ color: lighten($white, 10%);
+ }
+
+ @media (-webkit-min-device-pixel-ratio: 0.75),
+ (min--moz-device-pixel-ratio: 0.75),
+ (-o-device-pixel-ratio: 3/4),
+ (min-device-pixel-ratio: 0.75),
+ (min-resolution: 0.75dppx),
+ (min-resolution: 120dpi) {
+ height:0.75px;
+ }
+
+ @media (-webkit-min-device-pixel-ratio: 1),
+ (min--moz-device-pixel-ratio: 1),
+ (-o-device-pixel-ratio: 1),
+ (min-device-pixel-ratio: 1),
+ (min-resolution: 1dppx),
+ (min-resolution: 160dpi) {
+ height:1px;
+ }
+ @media (-webkit-min-device-pixel-ratio: 1.33),
+ (min--moz-device-pixel-ratio: 1.33),
+ (-o-device-pixel-ratio: 133/100),
+ (min-device-pixel-ratio: 1.33),
+ (min-resolution: 1.33dppx),
+ (min-resolution: 213dpi) {
+ height:1.333px;
+ }
+ @media (-webkit-min-device-pixel-ratio: 1.5),
+ (min--moz-device-pixel-ratio: 1.5),
+ (-o-device-pixel-ratio: 3/2),
+ (min-device-pixel-ratio: 1.5),
+ (min-resolution: 1.5dppx),
+ (min-resolution: 240dpi) {
+ height:1.5px;
+ }
+
+ @media (-webkit-min-device-pixel-ratio: 2),
+ (min--moz-device-pixel-ratio: 2),
+ (-o-device-pixel-ratio: 2/1),
+ (min-device-pixel-ratio: 2),
+ (min-resolution: 2dppx),
+ (min-resolution: 380dpi) {
+ height:2px;
+ }
+
+ @media (-webkit-min-device-pixel-ratio: 3),
+ (min--moz-device-pixel-ratio: 3),
+ (-o-device-pixel-ratio: 3/1),
+ (min-device-pixel-ratio: 3),
+ (min-resolution: 3dppx),
+ (min-resolution: 480dpi) {
+ height:3px;
+ }
+
+ @media (-webkit-min-device-pixel-ratio: 4),
+ (min--moz-device-pixel-ratio: 4),
+ (-o-device-pixel-ratio: 4/1),
+ (min-device-pixel-ratio: 3),
+ (min-resolution: 4dppx),
+ (min-resolution: 640dpi) {
+ height:4px;
+ }
+
+}
diff --git a/templates/assets/sass/material-kit/_dropdown.scss b/templates/assets/sass/material-kit/_dropdown.scss
new file mode 100644
index 0000000..19e1a9b
--- /dev/null
+++ b/templates/assets/sass/material-kit/_dropdown.scss
@@ -0,0 +1,58 @@
+.dropdown-menu {
+ border: 0;
+ box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
+
+ .divider {
+ background-color: rgba(0, 0, 0, .12);
+ }
+
+
+ li > a{
+ font-size: $mdb-dropdown-font-size;
+ padding: 10px 20px;
+ margin: 0 5px;
+ border-radius: $border-radius-small;
+ @include transition($fast-transition-time, $transition-linear);
+
+ &:hover,
+ &:focus {
+ @include shadow-8dp();
+
+ }
+ }
+
+ li {
+ position: relative;
+ a:hover,
+ a:focus,
+ a:active {
+ background-color: $brand-primary;
+ color: #FFFFFF;
+ }
+ }
+
+ .divider{
+ margin: 5px 0;
+ }
+}
+
+@media (min-width: $screen-md-min){
+ .dropdown{
+ .dropdown-menu{
+ @include transition($fast-transition-time, $transition-linear);
+ margin-top: -20px;
+ opacity: 0;
+ visibility: hidden;
+ display: block;
+ }
+
+ &.open{
+ .dropdown-menu{
+ opacity: 1;
+ visibility: visible;
+ margin-top: 1px;
+ }
+ }
+ }
+
+}
diff --git a/templates/assets/sass/material-kit/_example-pages.scss b/templates/assets/sass/material-kit/_example-pages.scss
new file mode 100644
index 0000000..fa83690
--- /dev/null
+++ b/templates/assets/sass/material-kit/_example-pages.scss
@@ -0,0 +1,236 @@
+.wrapper > .header{
+ min-height: 300px;
+ background-position: center center;
+ background-size: cover;
+}
+.main{
+ background: #FFFFFF;
+ position: relative;
+ z-index: 3;
+
+}
+.main-raised{
+ margin: -60px 30px 0px;
+ border-radius: $border-radius-base * 2;
+ @include shadow-16dp();
+}
+
+.title{
+ font-weight: $font-weight-bold;
+ color: $black-color;
+}
+h2.title{
+ margin-bottom: $margin-base * 2;
+}
+.description{
+ color: $gray-light;
+}
+
+// general style for example pages
+.header-filter{
+ position: relative;
+
+ &:after{
+ position: absolute;
+ z-index: 1;
+ width: 100%;
+ height: 100%;
+ display: block;
+ left: 0;
+ top: 0;
+ content: "";
+ background-color: rgba(0,0,0,.4);
+ }
+
+ .container{
+ z-index: 2;
+ position: relative;
+ }
+}
+.gallery{
+ .image{
+ img{
+ width: 100%;
+ }
+ }
+}
+.features{
+ padding: 80px 0 0;
+}
+
+.team{
+ margin-top: 80px;
+
+ .team-player{
+ .title{
+ margin: $margin-base * 2 auto;
+ }
+ img{
+ max-width: 170px;
+ }
+ }
+}
+.nav-align-center{
+ text-align: center;
+
+ .nav-pills{
+ display: inline-block;
+ }
+}
+.navbar-absolute{
+ position: absolute;
+ width: 100%;
+ padding-top: 10px;
+ z-index: 1031;
+}
+
+.index-page{
+ .wrapper > .header{
+ height: 90vh;
+ }
+ .brand{
+ margin-top: 30vh;
+ color: #FFFFFF;
+ text-align: center;
+
+ h1{
+ font-size: 4.8em;
+ font-weight: 600;
+ }
+ h3{
+ font-size: 1.5em;
+ text-transform: uppercase;
+ max-width: 400px;
+ margin: 10px auto 0;
+ }
+ }
+ .section-basic{
+ padding-top: 15px;
+ }
+ .header-filter:after{
+ background: rgba(101, 47, 142, 0.64);
+ background: linear-gradient(45deg, rgba(101, 47, 142, 0.88) 0%, rgba(125, 46, 185, 0.45) 100%);
+ background: -moz-linear-gradient(135deg, rgba(101, 47, 142, 0.88) 0%, rgba(125, 46, 185, 0.45) 100%);
+ background: -webkit-linear-gradient(135deg, rgba(101, 47, 142, 0.88) 0%, rgba(125, 46, 185, 0.45) 100%);
+
+ }
+}
+
+// style for the landing page
+.landing-page{
+
+ .header{
+ height: 100vh;
+
+ .container{
+ padding-top: 26vh;
+ color: #FFFFFF;
+ }
+
+ .share{
+ margin-top: 150px;
+ }
+ h1{
+ font-weight: 600;
+ }
+ .title{
+ color: $white-color;
+ }
+ }
+
+ .wrapper{
+ background: #CCCCCC;
+ }
+}
+
+// style for the profile page
+
+.profile-page{
+ .header{
+ height: 380px;
+ background-position: top center;
+ }
+ .profile{
+ text-align: center;
+
+ img{
+ max-width: 160px;
+ margin: -80px auto 0;
+ }
+ }
+ .description{
+ margin: $margin-base * 2 auto 0;
+ max-width: 600px;
+ }
+ .profile-tabs{
+ margin-top: $margin-base * 4;
+ }
+ .gallery{
+ margin-top: $margin-base * 3;
+ padding-bottom: 50px;
+
+ img{
+ width: 100%;
+ margin-bottom: $margin-base * 2;
+ }
+ }
+}
+
+.signup-page{
+ .wrapper{
+ > .header{
+ min-height: 100vh;
+ }
+ .card-signup{
+ margin: 160px 0 40px;
+ }
+ }
+ .footer{
+ .copyright,
+ a{
+ color: #FFFFFF;
+ }
+ }
+}
+.landing-page,
+.profile-page,
+.signup-page,
+.index-page{
+ .navbar-transparent{
+ padding-top: 25px;
+ }
+}
+
+@media (max-width: 991px){
+ .landing-page .header{
+ height: auto;
+ min-height: 100vh;
+
+ .container{
+ padding-bottom: 70px
+ }
+ }
+}
+@media (max-width: 768px){
+ .footer{
+ .copyright{
+ display: inline-block;
+ text-align: center;
+ padding: 10px 0;
+ float: none !important;
+ width: 100%;
+
+ }
+ }
+
+ .navbar.navbar-transparent{
+ background-color: rgba(0,0,0,.4);
+ padding-top: 10px;
+ border-radius: 0;
+ }
+
+ .main-raised{
+ margin-left: 10px;
+ margin-right: 10px;
+ }
+}
diff --git a/templates/assets/sass/material-kit/_footers.scss b/templates/assets/sass/material-kit/_footers.scss
new file mode 100644
index 0000000..5883185
--- /dev/null
+++ b/templates/assets/sass/material-kit/_footers.scss
@@ -0,0 +1,38 @@
+footer{
+ padding: $padding-base 0;
+
+ ul{
+ margin-bottom: 0;
+ padding: 0;
+ list-style: none;
+
+ li{
+ display: inline-block;
+
+ a{
+ color: inherit;
+ padding: $padding-base;
+ font-weight: $font-weight-bold;
+ font-size: $mdb-btn-font-size-base;
+ text-transform: uppercase;
+ border-radius: $border-radius-base;
+ text-decoration: none;
+ position: relative;
+ display: block;
+
+ &:hover{
+ text-decoration: none;
+ }
+ }
+ }
+ }
+
+ .copyright{
+ padding: 15px 0;
+ .material-icons{
+ font-size: 18px;
+ position: relative;
+ top: 3px;
+ }
+ }
+}
diff --git a/templates/assets/sass/material-kit/_form.scss b/templates/assets/sass/material-kit/_form.scss
new file mode 100755
index 0000000..ec8f018
--- /dev/null
+++ b/templates/assets/sass/material-kit/_form.scss
@@ -0,0 +1,42 @@
+// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
+
+@mixin mdb-label-color-toggle-focus(){
+ // override bootstrap focus and keep all the standard color (could be multiple radios in the form group)
+ .form-group.is-focused & {
+ color: $mdb-label-color;
+
+ // on focus just darken the specific labels, do not turn them to the brand-primary
+ &:hover,
+ &:focus {
+ color: $mdb-label-color-toggle-focus;
+ }
+
+ // correct the above focus color for disabled items
+ fieldset[disabled] & {
+ color: $mdb-label-color;
+ }
+ }
+}
+
+.form-horizontal {
+
+ // Consistent vertical alignment of radios and checkboxes
+ .radio,
+ .checkbox,
+ .radio-inline,
+ .checkbox-inline {
+ padding-top: 0;
+ }
+
+ .radio {
+ margin-bottom: 10px;
+ }
+
+ label {
+ text-align: right;
+ }
+
+ label.control-label {
+ margin: 0;
+ }
+}
diff --git a/templates/assets/sass/material-kit/_images.scss b/templates/assets/sass/material-kit/_images.scss
new file mode 100644
index 0000000..293417b
--- /dev/null
+++ b/templates/assets/sass/material-kit/_images.scss
@@ -0,0 +1,6 @@
+.img-thumbnail{
+ border-radius: 16px;
+}
+.img-raised{
+ @include shadow-big();
+}
diff --git a/templates/assets/sass/material-kit/_import-bs-less.scss b/templates/assets/sass/material-kit/_import-bs-less.scss
new file mode 100755
index 0000000..9207c5d
--- /dev/null
+++ b/templates/assets/sass/material-kit/_import-bs-less.scss
@@ -0,0 +1,4 @@
+// hack due to differences between sass and less variable loading
+// Less lazy loads, Sass doesn't. http://lesscss.org/features/#variables-feature-lazy-loading
+
+// do nothing here for sass.
diff --git a/templates/assets/sass/material-kit/_import-bs-sass.scss b/templates/assets/sass/material-kit/_import-bs-sass.scss
new file mode 100755
index 0000000..7550b18
--- /dev/null
+++ b/templates/assets/sass/material-kit/_import-bs-sass.scss
@@ -0,0 +1,2 @@
+@import "variables_bootstrap";
+//@import "../bower_components/bootstrap-sass/assets/stylesheets/bootstrap/mixins";
diff --git a/templates/assets/sass/material-kit/_info-areas.scss b/templates/assets/sass/material-kit/_info-areas.scss
new file mode 100644
index 0000000..611ac9e
--- /dev/null
+++ b/templates/assets/sass/material-kit/_info-areas.scss
@@ -0,0 +1,38 @@
+.info{
+ max-width: 360px;
+ margin: 0 auto;
+ padding: 70px 0 30px;
+
+ .icon{
+ color: $gray-color;
+
+ > i{
+ font-size: 4.4em;
+ }
+ }
+ .info-title{
+ color: $black-color;
+ margin: $margin-base * 2 0 $margin-base;
+ }
+ p{
+ color: $gray-color;
+ }
+}
+
+.icon{
+ &.icon-primary{
+ color: $brand-primary;
+ }
+ &.icon-info{
+ color: $brand-info;
+ }
+ &.icon-success{
+ color: $brand-success;
+ }
+ &.icon-warning{
+ color: $brand-warning;
+ }
+ &.icon-danger{
+ color: $brand-danger;
+ }
+}
diff --git a/templates/assets/sass/material-kit/_inputs-size.scss b/templates/assets/sass/material-kit/_inputs-size.scss
new file mode 100755
index 0000000..c86338c
--- /dev/null
+++ b/templates/assets/sass/material-kit/_inputs-size.scss
@@ -0,0 +1,223 @@
+// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
+
+//
+// Forms - sizing - material - mirrors bootstrap/forms.less with custom sizing
+//
+// LEAVE THIS IDENTICAL TO THE BOOTSTRAP FILE - DO NOT CUSTOMIZE HERE.
+//
+// NOTE: this is intentionally kept structurally _identical_ to the bootstrap/forms.less file to make it easier
+// to identify differences in sizing approaches to form inputs.
+// --------------------------------------------------
+
+legend {
+ margin-bottom: $mdb-input-line-height-computed;
+ font-size: ($mdb-input-font-size-base * 1.5);
+}
+
+// Adjust output element
+output {
+ padding-top: ($mdb-input-padding-base-vertical + 1);
+ font-size: $mdb-input-font-size-base;
+ line-height: $mdb-input-line-height-base;
+}
+
+.form-control {
+ height: $mdb-input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)
+ padding: $mdb-input-padding-base-vertical $mdb-input-padding-base-horizontal;
+ font-size: $mdb-input-font-size-base;
+ line-height: $mdb-input-line-height-base;
+}
+
+// Special styles for iOS temporal inputs
+//
+// In Mobile Safari, setting `display: block` on temporal inputs causes the
+// text within the input to become vertically misaligned. As a workaround, we
+// set a pixel line-height that matches the given height of the input, but only
+// for Safari. See https://bugs.webkit.org/show_bug.cgi?id=139848
+//
+// Note that as of 8.3, iOS doesn't support `datetime` or `week`.
+
+@media screen and (-webkit-min-device-pixel-ratio: 0) {
+ input[type="date"],
+ input[type="time"],
+ input[type="datetime-local"],
+ input[type="month"] {
+ &.form-control {
+ line-height: $mdb-input-height-base;
+ }
+
+ &.input-sm,
+ .input-group-sm & {
+ line-height: $mdb-input-height-small;
+ }
+
+ &.input-lg,
+ .input-group-lg & {
+ line-height: $mdb-input-height-large;
+ }
+ }
+}
+
+.radio,
+.checkbox {
+
+ label {
+ min-height: $mdb-input-line-height-computed; // Ensure the input doesn't jump when there is no text
+ }
+}
+
+
+// Static form control text
+//
+// Apply class to a `p` element to make any string of text align with labels in
+// a horizontal form layout.
+
+.form-control-static {
+ // Size it appropriately next to real form controls
+ padding-top: ($mdb-input-padding-base-vertical + 1);
+ padding-bottom: ($mdb-input-padding-base-vertical + 1);
+ min-height: ($mdb-input-line-height-computed + $mdb-input-font-size-base);
+}
+
+
+// Form control sizing
+//
+// Relative text size, padding, and border-radii changes for form controls. For
+// horizontal sizing, wrap controls in the predefined grid classes. `<select>`
+// element gets special love because it's special, and that's a fact!
+
+// mixin pulled from bootstrap and altered for less/sass compatibility with sass parent hack.
+// bootstrap-sass has this one, but we would have to then convert it back to less. chicken meet egg.
+@mixin input-size($parent, $mdb-input-height, $padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius){
+
+ #{$parent} {
+ height: $mdb-input-height;
+ padding: $padding-vertical $padding-horizontal;
+ font-size: $font-size;
+ line-height: $line-height;
+ border-radius: $border-radius;
+ }
+
+ select#{$parent} {
+ height: $mdb-input-height;
+ line-height: $mdb-input-height;
+ }
+
+ textarea#{$parent},
+ select[multiple]#{$parent} {
+ height: auto;
+ }
+}
+
+
+
+// Form control sizing
+//
+// Build on `.form-control` with modifier classes to decrease or increase the
+// height and font-size of form controls.
+//
+// The `.form-group-* form-control` variations are sadly duplicated to avoid the
+// issue documented in https://github.com/twbs/bootstrap/issues/15074.
+.input-sm {
+ @include input-size(unquote(".input-sm"), $mdb-input-height-small, $mdb-input-padding-small-vertical, $mdb-input-padding-small-horizontal, $mdb-input-font-size-small, $mdb-input-line-height-small, $mdb-input-border-radius-small);
+}
+.form-group-sm {
+ .form-control {
+ height: $mdb-input-height-small;
+ padding: $mdb-input-padding-small-vertical $mdb-input-padding-small-horizontal;
+ font-size: $mdb-input-font-size-small;
+ line-height: $mdb-input-line-height-small;
+ }
+ select.form-control {
+ height: $mdb-input-height-small;
+ line-height: $mdb-input-height-small;
+ }
+ textarea.form-control,
+ select[multiple].form-control {
+ height: auto;
+ }
+ .form-control-static {
+ height: $mdb-input-height-small;
+ min-height: ($mdb-input-line-height-computed + $mdb-input-font-size-small);
+ padding: ($mdb-input-padding-small-vertical + 1) $mdb-input-padding-small-horizontal;
+ font-size: $mdb-input-font-size-small;
+ line-height: $mdb-input-line-height-small;
+ }
+}
+
+.input-lg {
+ @include input-size(unquote(".input-lg"), $mdb-input-height-large, $mdb-input-padding-large-vertical, $mdb-input-padding-large-horizontal, $mdb-input-font-size-large, $mdb-input-line-height-large, $mdb-input-border-radius-large);
+}
+.form-group-lg {
+ .form-control {
+ height: $mdb-input-height-large;
+ padding: $mdb-input-padding-large-vertical $mdb-input-padding-large-horizontal;
+ font-size: $mdb-input-font-size-large;
+ line-height: $mdb-input-line-height-large;
+ }
+ select.form-control {
+ height: $mdb-input-height-large;
+ line-height: $mdb-input-height-large;
+ }
+ textarea.form-control,
+ select[multiple].form-control {
+ height: auto;
+ }
+ .form-control-static {
+ height: $mdb-input-height-large;
+ min-height: ($mdb-input-line-height-computed + $mdb-input-font-size-large);
+ padding: ($mdb-input-padding-large-vertical + 1) $mdb-input-padding-large-horizontal;
+ font-size: $mdb-input-font-size-large;
+ line-height: $mdb-input-line-height-large;
+ }
+}
+
+
+.form-horizontal {
+
+ // Consistent vertical alignment of radios and checkboxes
+ //
+ // Labels also get some reset styles, but that is scoped to a media query below.
+ .radio,
+ .checkbox,
+ .radio-inline,
+ .checkbox-inline {
+ padding-top: ($mdb-input-padding-base-vertical + 1); // Default padding plus a border
+ }
+ // Account for padding we're adding to ensure the alignment and of help text
+ // and other content below items
+ .radio,
+ .checkbox {
+ min-height: ($mdb-input-line-height-computed + ($mdb-input-padding-base-vertical + 1));
+ }
+
+ // Reset spacing and right align labels, but scope to media queries so that
+ // labels on narrow viewports stack the same as a default form example.
+ @media (min-width: $screen-sm-min) {
+ .control-label {
+ padding-top: ($mdb-input-padding-base-vertical + 1); // Default padding plus a border
+ }
+ }
+
+
+ // Form group sizes
+ //
+ // Quick utility class for applying `.input-lg` and `.input-sm` styles to the
+ // inputs and labels within a `.form-group`.
+ .form-group-lg {
+ @media (min-width: $screen-sm-min) {
+ .control-label {
+ padding-top: (($mdb-input-padding-large-vertical * $mdb-input-line-height-large) + 1);
+ font-size: $mdb-input-font-size-large;
+ }
+ }
+ }
+ .form-group-sm {
+ @media (min-width: $screen-sm-min) {
+ .control-label {
+ padding-top: ($mdb-input-padding-small-vertical + 1);
+ font-size: $mdb-input-font-size-small;
+ }
+ }
+ }
+}
diff --git a/templates/assets/sass/material-kit/_inputs.scss b/templates/assets/sass/material-kit/_inputs.scss
new file mode 100755
index 0000000..d5b3769
--- /dev/null
+++ b/templates/assets/sass/material-kit/_inputs.scss
@@ -0,0 +1,369 @@
+// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
+
+@import '_inputs-size';
+
+// label variations
+.label {
+ border-radius: $border-radius-small;
+ @include variations(unquote(".label"), unquote(""), background-color, $grey);
+}
+
+// must be broken out for reuse - webkit selector breaks firefox
+@mixin label-static($label-top, $static-font-size, $static-line-height){
+ label.control-label {
+ top: $label-top;
+ left: 0;
+ // must repeat because the selector above is more specific than the general label sizing
+ font-size: $static-font-size;
+ line-height: $static-line-height;
+ }
+}
+
+@mixin label-size-variant($placeholder-font-size, $vertical-padding, $line-height, $static-font-size, $static-line-height, $help-block-font-size){
+ .form-control {
+ @include material-placeholder {
+ font-size: $placeholder-font-size;
+ line-height: $line-height;
+ color: $mdb-input-placeholder-color;
+ font-weight: 400;
+
+}
+ // margin-bottom must be specified to give help-block vertical space.
+ // $see also form-group padding-bottom (and size variants) re: collapsible margins. These work together.
+ margin-bottom: $vertical-padding;
+ }
+
+ // generic labels used anywhere in the form (not control-label)
+ .checkbox label,
+ .radio label,
+ label {
+ font-size: $placeholder-font-size;
+ line-height: $line-height;
+ color: $mdb-input-placeholder-color;
+ font-weight: 400;
+ }
+
+ // smaller focused or static size
+ label.control-label {
+ font-size: $static-font-size;
+ line-height: $static-line-height;
+ color: $mdb-input-placeholder-color;
+ font-weight: 400;
+ margin: 16px 0 0 0; // std and lg
+ }
+
+ .help-block {
+ margin-top: 0; // allow the input margin to set-off the top of the help-block
+ font-size: $help-block-font-size;
+ }
+}
+
+@mixin form-group-validation-state($name, $color){
+
+ &.#{$name} { // e.g. has-error
+ .form-control {
+ box-shadow: none;
+ }
+ &.is-focused .form-control {
+ background-image: linear-gradient($color, $color), linear-gradient($mdb-input-underline-color, $mdb-input-underline-color);
+ }
+ label.control-label,
+ .help-block {
+ color: $color;
+ }
+ }
+}
+
+@mixin form-group-size-variant($parent, $placeholder-font-size, $label-top-margin, $vertical-padding, $line-height, $label-as-placeholder-shim){
+ $static-font-size: ceil(($mdb-label-static-size-ratio * $placeholder-font-size)) !default;
+ $static-line-height: ($mdb-label-static-size-ratio * $line-height) !default;
+
+ $label-as-placeholder-top: -1 * ($vertical-padding + $label-as-placeholder-shim) !default;
+ $label-top: $label-as-placeholder-top - ($placeholder-font-size + $vertical-padding) !default;
+
+ $help-block-font-size: ceil(($mdb-help-block-size-ratio * $placeholder-font-size)) !default;
+ $help-block-line-height: ($mdb-help-block-size-ratio * $line-height) !default;
+
+ // this is outside a form-group
+ @if not $parent {
+ @include label-size-variant($placeholder-font-size, $vertical-padding, $line-height, $static-font-size, $static-line-height, $help-block-font-size);
+ }
+
+ // this is inside a form-group, may be .form-group.form-group-sm or .form-group.form-group-lg
+ @else {
+ #{$parent} {
+ @include label-size-variant($placeholder-font-size, $vertical-padding, $line-height, $static-font-size, $static-line-height, $help-block-font-size);
+
+ // form-group padding-bottom
+ // upon collapsing margins, the largest margin is honored which collapses the form-control margin-bottom,
+ // so the form-control margin-bottom must also be expressed as form-group padding
+ padding-bottom: $vertical-padding;
+
+ // form-group margin-top must be large enough for the label and the label's top padding since label is absolutely positioned
+ margin: ($label-top-margin + $static-font-size) 0 0 0;
+
+ // larger labels as placeholders
+ &.label-floating,
+ &.label-placeholder {
+ label.control-label {
+ top: $label-as-placeholder-top; // place the floating label to look like a placeholder with input padding
+ font-size: $placeholder-font-size;
+ line-height: $line-height;
+ }
+ }
+
+ // static, focused, or autofill floating labels
+ &.label-static,
+ &.label-floating.is-focused,
+ &.label-floating:not(.is-empty) {
+ @include label-static($label-top, $static-font-size, $static-line-height);
+ }
+ // #559 Fix for webkit/chrome autofill - rule must be separate because it breaks firefox otherwise #731
+ &.label-floating input.form-control:-webkit-autofill ~ label.control-label {
+ @include label-static($label-top, $static-font-size, $static-line-height);
+ }
+ }
+ }
+}
+
+// -----
+// Inputs
+
+.form-control,
+.form-group .form-control {
+ border: 0;
+ background-image: linear-gradient($brand-primary, $brand-primary), linear-gradient($mdb-input-underline-color, $mdb-input-underline-color);
+ background-size: 0 2px, 100% 1px;
+ background-repeat: no-repeat;
+ background-position: center bottom, center calc(100% - 1px);
+ background-color: rgba(0, 0, 0, 0);
+ transition: background 0s ease-out;
+ float: none;
+ box-shadow: none;
+ border-radius: 0;
+
+ font-weight: 400;
+
+ // Placeholders and and labels-as-placeholders should look the same
+ @include material-placeholder {
+ color: $mdb-input-placeholder-color;
+ font-weight: 400;
+}
+
+
+ //&:textarea { // appears to be an invalid selector
+ // height: 40px;
+ //}
+
+ &[readonly],
+ &[disabled],
+ fieldset[disabled] & {
+ background-color: rgba(0, 0, 0, 0);
+ }
+
+ &[disabled],
+ fieldset[disabled] & {
+ background-image: none;
+ border-bottom: 1px dotted $mdb-input-underline-color;
+ }
+}
+
+// -----
+// Labels with form-group signalled state
+//
+// Reference http://www.google.com/design/spec/components/text-fields.html
+// MDL implementation: http://www.getmdl.io/components/index.html#textfields-section
+//.variations(unquote(" label.control-label"), color, $mdb-input-placeholder-color); // default label color variations
+
+.form-group {
+ position: relative;
+
+ // -----
+ // Labels with form-group signalled state
+ //
+ // Reference http://www.google.com/design/spec/components/text-fields.html
+ // MDL implementation: http://www.getmdl.io/components/index.html#textfields-section
+ &.label-static,
+ &.label-placeholder,
+ &.label-floating {
+ label.control-label {
+ position: absolute;
+ pointer-events: none;
+ transition: 0.3s ease all;
+ }
+ }
+
+ // hint to browser for optimization
+ // TODO: evaluate effectiveness - looking for community feedback
+ &.label-floating label.control-label {
+ will-change: left, top, contents;
+ }
+
+ // hide label-placeholders when the field is not empty
+ &.label-placeholder:not(.is-empty){
+ label.control-label{
+ display: none;
+ }
+ }
+
+ // Help blocks - position: absolute approach - uses no vertical space, text wrapping - not so good.
+ .help-block {
+ position: absolute; // do not use position: absolute because width/wrapping isn't automatic and overflows occur
+ display: none;
+ }
+
+ // form-group is-focused display
+ &.is-focused {
+ .form-control {
+ outline: none;
+ background-image: linear-gradient($brand-primary, $brand-primary), linear-gradient($mdb-input-underline-color, $mdb-input-underline-color);
+ background-size: 100% 2px, 100% 1px;
+ box-shadow: none;
+ transition-duration: 0.3s;
+
+ .material-input:after {
+ background-color: $brand-primary;
+ }
+ }
+
+ //.variations(unquote(".is-focused label.control-label"), color, $brand-primary); // focused label color variations
+ label,
+ label.control-label {
+ color: $brand-primary;
+ }
+
+ //.variations(unquote(".is-focused.label-placeholder label.control-label"), color, $mdb-input-placeholder-color); // default label color variations
+ &.label-placeholder {
+ label,
+ label.control-label {
+ color: $mdb-input-placeholder-color;
+ }
+ }
+
+ .help-block {
+ display: block;
+ }
+ }
+
+ @include form-group-validation-state(has-warning, $brand-warning);
+ @include form-group-validation-state(has-error, $brand-danger);
+ @include form-group-validation-state(has-success, $brand-success);
+ @include form-group-validation-state(has-info, $brand-info);
+
+ textarea {
+ resize: none;
+ & ~ .form-control-highlight {
+ margin-top: -11px;
+ }
+ }
+
+ select {
+ appearance: none; // Fix for OS X
+
+ & ~ .material-input:after {
+ display: none;
+ }
+ }
+}
+
+// default floating size/location without a form-group (will skip form-group styles, and just render default sizing variation)
+@include form-group-size-variant(null, $mdb-input-font-size-base, $mdb-label-top-margin-base, $mdb-input-padding-base-vertical, $mdb-input-line-height-base, $mdb-label-as-placeholder-shim-base);
+
+// default floating size/location with a form-group (need margin etc from a default form-group)
+@include form-group-size-variant(unquote(".form-group"), $mdb-input-font-size-base, $mdb-label-top-margin-base, $mdb-input-padding-base-vertical, $mdb-input-line-height-base, $mdb-label-as-placeholder-shim-base);
+
+// sm floating size/location
+@include form-group-size-variant(unquote(".form-group.form-group-sm"), $mdb-input-font-size-small, $mdb-label-top-margin-small, $mdb-input-padding-small-vertical, $mdb-input-line-height-small, $mdb-label-as-placeholder-shim-small);
+
+// lg floating size/location
+@include form-group-size-variant(unquote(".form-group.form-group-lg"), $mdb-input-font-size-large, $mdb-label-top-margin-large, $mdb-input-padding-large-vertical, $mdb-input-line-height-large, $mdb-label-as-placeholder-shim-large);
+
+
+select.form-control {
+
+ border: 0;
+ box-shadow: none;
+ border-radius: 0;
+
+ .form-group.is-focused & {
+ box-shadow: none;
+ border-color: $mdb-input-underline-color;
+ }
+
+ &[multiple] {
+ &,
+ .form-group.is-focused & {
+ height: 85px;
+ }
+ }
+}
+
+@mixin input-group-button-variation($vertical-padding){
+ .input-group-btn {
+ .btn {
+ margin: 0 0 $vertical-padding 0;
+ }
+ }
+}
+
+// ----------------
+// input group/addon related styles
+
+// default margin - no form-group required
+@include input-group-button-variation($mdb-input-padding-base-vertical);
+
+.form-group {
+ //.form-control {
+ // float: none;
+ //}
+
+ // sm margin
+ &.form-group-sm {
+ @include input-group-button-variation($mdb-input-padding-small-vertical);
+ }
+
+ // lg margin
+ &.form-group-lg {
+ @include input-group-button-variation($mdb-input-padding-large-vertical);
+ }
+}
+
+.input-group { // may be in or outside of form-group
+ .input-group-btn {
+ padding: 0 12px; // match addon spacing
+ }
+
+ .input-group-addon {
+ border: 0;
+ background: transparent;
+ padding: 12px 15px 0px;
+ }
+}
+
+// Input files - hide actual input - requires specific markup in the sample.
+.form-group input[type=file] {
+ opacity: 0;
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 100;
+}
+
+
+.form-control-feedback{
+ opacity: 0;
+
+ .has-success &{
+ color: $green;
+ opacity: 1;
+ }
+
+ .has-error &{
+ color: $red;
+ opacity: 1;
+ }
+}
diff --git a/templates/assets/sass/material-kit/_labels.scss b/templates/assets/sass/material-kit/_labels.scss
new file mode 100755
index 0000000..77ff1a2
--- /dev/null
+++ b/templates/assets/sass/material-kit/_labels.scss
@@ -0,0 +1,10 @@
+.label {
+ border-radius: $border-radius-huge;
+ padding: 5px 12px;
+ text-transform: uppercase;
+ font-size: 10px;
+
+ &.label-default{
+ background-color: $gray-light;
+ }
+}
diff --git a/templates/assets/sass/material-kit/_lists.scss b/templates/assets/sass/material-kit/_lists.scss
new file mode 100755
index 0000000..88f4389
--- /dev/null
+++ b/templates/assets/sass/material-kit/_lists.scss
@@ -0,0 +1,104 @@
+// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
+
+.list-group {
+ border-radius: 0;
+ .list-group-item {
+ background-color: transparent;
+ overflow: hidden;
+ border: 0;
+ border-radius: 0;
+ padding: 0 16px;
+ &.baseline {
+ border-bottom: 1px solid #cecece;
+ &:last-child {
+ border-bottom: none;
+ }
+ }
+ .row-picture, .row-action-primary {
+ //float: left; WARNING: float can't be used with display: inline-block. Certain properties shouldn't be used with certain display property values. (display-property-grouping) Browsers: All
+ display: inline-block;
+ padding-right: 16px;
+ img, i, label {
+ display: block;
+ width: 56px;
+ height: 56px;
+ }
+ img {
+ background: rgba(0,0,0,0.1);
+ padding: 1px;
+ &.circle {
+ border-radius: 100%;
+ }
+ }
+ i {
+ background: rgba(0,0,0,0.25);
+ border-radius: 100%;
+ text-align: center;
+ line-height: 56px;
+ font-size: 20px;
+ color: white;
+ }
+ label {
+ margin-left: 7px;
+ margin-right: -7px;
+ margin-top: 5px;
+ margin-bottom: -5px;
+ .checkbox-material {
+ left: -10px;
+ }
+ }
+ }
+ .row-content {
+ display: inline-block;
+ width: unquote("calc(100% - 92px)");
+ min-height: 66px;
+ .action-secondary {
+ position: absolute;
+ right: 16px;
+ top: 16px;
+ i {
+ font-size: 20px;
+ color: rgba(0,0,0,0.25);
+ cursor: pointer;
+ }
+ }
+ .action-secondary ~ * {
+ max-width: unquote("calc(100% - 30px)");
+ }
+ .least-content {
+ position: absolute;
+ right: 16px;
+ top: 0;
+ color: rgba(0,0,0,0.54);
+ font-size: 14px;
+ }
+ }
+ .list-group-item-heading {
+ color: rgba(0, 0, 0, 0.77);
+ font-size: 20px;
+ line-height: 29px;
+ }
+ }
+ .list-group-item.active {
+ &:hover, &:focus {
+ background: rgba(0,0,0,.15);
+ outline: 10px solid rgba(0,0,0,.15);
+ }
+ .list-group-item-heading, .list-group-item-text {
+ color: $mdb-text-color-primary;
+ }
+
+ }
+ .list-group-separator {
+ clear: both;
+ overflow: hidden;
+ margin-top: 10px;
+ margin-bottom: 10px;
+ &:before {
+ content: "";
+ width: unquote("calc(100% - 90px)");
+ border-bottom: 1px solid rgba(0,0,0,0.1);
+ float: right;
+ }
+ }
+}
diff --git a/templates/assets/sass/material-kit/_mixins.scss b/templates/assets/sass/material-kit/_mixins.scss
new file mode 100755
index 0000000..61e17f5
--- /dev/null
+++ b/templates/assets/sass/material-kit/_mixins.scss
@@ -0,0 +1,326 @@
+
+
+// Placeholder text
+@mixin material-placeholder() {
+ &::-moz-placeholder {@content; } // Firefox
+ &:-ms-input-placeholder {@content; } // Internet Explorer 10+
+ &::-webkit-input-placeholder {@content; } // Safari and Chrome
+}
+
+
+// variations(unquote(""), background-color, #FFF);
+@mixin variations($component, $selector-suffix, $mdb-param-1, $color-default) {
+ @include generic-variations($component, $selector-suffix, $color-default, "variations-content", $mdb-param-1);
+}
+
+@mixin variations-content($args) {
+ //@debug "#{map-get($args, mixin-name)}{ #{map-get($args, material-param-1)}: #{map-get($args, variation-color)}; }";
+ //@debug "#{inspect($args)}";
+ //@error "break here";
+ #{map-get($args, material-param-1)}: map-get($args, variation-color);
+}
+
+@mixin background-variations($component, $selector-suffix, $color-default) {
+ @include generic-variations($component, $selector-suffix, $color-default, "background-variations-content", null);
+}
+
+@mixin background-variations-content($args) {
+ background-color: map-get($args, variation-color);
+ @if (map-get($args, variation-color) == $mdb-btn-background-color) {
+ color: $mdb-text-color-primary;
+ } @else {
+ color: map-get($args, variation-color-text);
+ }
+}
+
+//@mixin text-variations($component, $selector-suffix, $color-default) {
+// @include generic-variations($component, $selector-suffix, $color-default, "text-variations-content", null);
+//}
+//
+//@mixin text-variations-content($args) {
+// color: map-get($args, variation-color);
+//}
+
+@mixin button-variations($component, $selector-suffix, $color-default) {
+ @include generic-variations($component, $selector-suffix, $color-default, "button-variations-content", 4%);
+}
+
+@mixin button-variations-content($args) {
+ //@debug "#{inspect($args)}";
+ $variation-color: map-get($args, variation-color);
+ $mdb-param-1: map-get($args, material-param-1);
+ background-color: contrast-color($variation-color,
+ darken($variation-color, $mdb-param-1),
+ lighten($variation-color, $mdb-param-1));
+}
+
+// navbar-variations(" label input[type=checkbox]:checked + .toggle:active:after", $brand-primary
+@mixin navbar-variations($component, $selector-suffix, $color-default) {
+ @include generic-variations($component, $selector-suffix, $color-default, "navbar-variations-content", null);
+}
+
+@mixin navbar-variations-content($args){
+ $variation-color: map-get($args, variation-color);
+ $variation-color-text: map-get($args, variation-color-text);
+
+ background-color: $variation-color;
+ color: $variation-color-text;
+ // deeply defined to override welljumbo class without !impotant need
+ .navbar-form .form-group input.form-control,
+ .navbar-form input.form-control {
+ @include material-placeholder {
+ color: $variation-color-text;
+ }
+ }
+ .dropdown-menu {
+ border-radius: $border-radius-base !important;
+ li > a {
+ &:hover,
+ &:focus {
+ color: $white-color;
+ background-color: $variation-color;
+ }
+ }
+
+ .active > a {
+ &:hover,
+ &:focus {
+ color: $variation-color-text;
+ }
+ background-color: $variation-color;
+ color: $variation-color-text;
+ }
+ }
+}
+
+// alert-variations("", $brand-primary)
+@mixin alert-variations($component, $selector-suffix, $color-default) {
+ @include generic-variations($component, $selector-suffix, $color-default, "alert-variations-content", null);
+}
+
+@mixin alert-variations-content($args){
+ $variation-color: map-get($args, variation-color);
+ $variation-color-text: map-get($args, variation-color-text);
+
+ background-color: lighten($variation-color,3%);
+ color: $variation-color-text;
+
+ a, .alert-link {
+ color: $variation-color-text;
+ }
+}
+
+// interpolation of mixin-name is not allowed evidently, so we statically include based on the mixin-name given
+@mixin call-variations-content-mixin($args) {
+ $mixin-name: map-get($args, mixin-name);
+ @if $mixin-name == variations-content {
+ @include variations-content($args);
+ } @else if $mixin-name == background-variations-content {
+ @include background-variations-content($args);
+ } @else if $mixin-name == text-variations-content {
+ @include text-variations-content($args);
+ } @else if $mixin-name == button-variations-content {
+ @include button-variations-content($args);
+ } @else if $mixin-name == bg-color-variations-content {
+ @include bg-color-variations-content($args);
+ } @else if $mixin-name == bg-box-shadow-variations-content {
+ @include bg-box-shadow-variations-content($args);
+ } @else if $mixin-name == bg-img-variations-content {
+ @include bg-img-variations-content($args);
+ } @else if $mixin-name == navbar-variations-content {
+ @include navbar-variations-content($args);
+ }@else if $mixin-name == alert-variations-content {
+ @include alert-variations-content($args);
+ } @else {
+ @error "Unknown mixin: #{$mixin-name}"
+ }
+}
+
+//
+// To use this mixin you should pass a function as final parameter to define
+// the style. In that definition you can use the following variables to define it.
+//
+// $variation-color-name ---> "red", "green", "indigo" ...
+// $variation-color-full-name ---> "red", "green-50", "indigo-400" ...
+// $variation-color ---> #f44336, #e8f5e9, #5c6bc0 ...
+// $variation-color-text ---> rgba(255,255,255,0.84), rgba(0,0,0,0.84), rgba(255,255,255,0.84) ...
+//
+
+@mixin generic-variations($component, $selector-suffix, $color-default, $mixin-name, $mdb-param-1) {
+
+ //setup map to pass parameters (instead of the incredibly long-error-prone list for each and every @include)
+ $args: (
+ //extra: $selector-suffix,
+ //default: $color-default,
+ mixin-name: $mixin-name,
+ material-param-1: $mdb-param-1
+ );
+
+ // bootstrap styles
+ &#{$selector-suffix},
+ &#{$component}-default#{$selector-suffix} {
+
+ $args-extra: map-merge($args, (
+ variation-color: $color-default,
+ variation-color-text: $mdb-text-color-light
+ ));
+ @include call-variations-content-mixin($args-extra);
+ }
+ &#{$component}-inverse#{$selector-suffix} {
+ $args-inverse: map-merge($args, (
+ variation-color: $mdb-brand-inverse,
+ variation-color-text: contrast-color($mdb-brand-inverse, $mdb-text-color-primary-hex, $mdb-text-color-light-hex)
+ ));
+ @include call-variations-content-mixin($args-inverse);
+ }
+ &#{$component}-primary#{$selector-suffix} {
+ $args-primary: map-merge($args, (
+ variation-color: $brand-primary,
+ variation-color-text: $mdb-text-color-light
+ ));
+ @include call-variations-content-mixin($args-primary);
+ }
+ &#{$component}-success#{$selector-suffix} {
+ $args-success: map-merge($args, (
+ variation-color: $brand-success,
+ variation-color-text: $mdb-text-color-light
+ ));
+ @include call-variations-content-mixin($args-success);
+ }
+ &#{$component}-info#{$selector-suffix} {
+ $args-info: map-merge($args, (
+ variation-color: $brand-info,
+ variation-color-text: $mdb-text-color-light
+ ));
+ @include call-variations-content-mixin($args-info);
+ }
+ &#{$component}-warning#{$selector-suffix} {
+ $args-warning: map-merge($args, (
+ variation-color: $brand-warning,
+ variation-color-text: $mdb-text-color-light
+ ));
+ @include call-variations-content-mixin($args-warning);
+ }
+ &#{$component}-danger#{$selector-suffix} {
+ $args-danger: map-merge($args, (
+ variation-color: $brand-danger,
+ variation-color-text: $mdb-text-color-light
+ ));
+ @include call-variations-content-mixin($args-danger);
+ }
+}
+
+@mixin transition($time, $type){
+ -webkit-transition: all $time $type;
+ -moz-transition: all $time $type;
+ -o-transition: all $time $type;
+ -ms-transition: all $time $type;
+ transition: all $time $type;
+}
+
+@mixin transform-scale($value){
+ -webkit-transform: scale($value);
+ -moz-transform: scale($value);
+ -o-transform: scale($value);
+ -ms-transform: scale($value);
+ transform: scale($value);
+}
+
+@mixin transform-scale3d($value){
+ -webkit-transform: scale3d($value);
+ -moz-transform: scale3d($value);
+ -o-transform: scale3d($value);
+ -ms-transform: scale3d($value);
+ transform: scale3d($value);
+}
+
+@mixin transform-translate-x($value){
+ -webkit-transform: translate3d($value, 0, 0);
+ -moz-transform: translate3d($value, 0, 0);
+ -o-transform: translate3d($value, 0, 0);
+ -ms-transform: translate3d($value, 0, 0);
+ transform: translate3d($value, 0, 0);
+}
+
+@mixin transform-translate-y($value){
+ -webkit-transform: translate3d(0,$value, 0);
+ -moz-transform: translate3d(0, $value, 0);
+ -o-transform: translate3d(0, $value, 0);
+ -ms-transform: translate3d(0, $value, 0);
+ transform: translate3d(0, $value, 0);
+}
+
+@mixin transform-origin($coordinates){
+ -webkit-transform-origin: $coordinates;
+ -moz-transform-origin: $coordinates;
+ -o-transform-origin: $coordinates;
+ -ms-transform-origin: $coordinates;
+ transform-origin: $coordinates;
+}
+
+@mixin animation($value){
+ -webkit-animation: $value;
+ -moz-animation: $value;
+ -o-animation: $value;
+ -ms-animation: $value;
+ animation: $value;
+}
+
+// Mixins for buttons
+
+@mixin btn-styles($btn-color) {
+
+ // remove this line if you want black shadows
+ @include shadow-2dp-color($btn-color);
+
+ &,
+ &:hover,
+ &:focus,
+ &:active,
+ &.active,
+ &:active:focus,
+ &:active:hover,
+ &.active:focus,
+ &.active:hover,
+ .open > &.dropdown-toggle,
+ .open > &.dropdown-toggle:focus,
+ .open > &.dropdown-toggle:hover {
+ background-color: $btn-color;
+ color: $white-color;
+ }
+
+ &:focus,
+ &:active,
+ &:hover{
+ // remove this line if you want black shadows
+ @include button-shadow-color($btn-color);
+ }
+
+ &.disabled,
+ &:disabled,
+ &[disabled],
+ fieldset[disabled] & {
+ &,
+ &:hover,
+ &:focus,
+ &.focus,
+ &:active,
+ &.active {
+ box-shadow: none;
+ }
+ }
+
+ &.btn-simple{
+ background-color: transparent;
+ color: $btn-color;
+ box-shadow: none;
+
+ &:hover,
+ &:focus,
+ &:active{
+ background-color: transparent;
+ color: $btn-color;
+ }
+ }
+
+}
diff --git a/templates/assets/sass/material-kit/_navbar.scss b/templates/assets/sass/material-kit/_navbar.scss
new file mode 100755
index 0000000..aabc0a3
--- /dev/null
+++ b/templates/assets/sass/material-kit/_navbar.scss
@@ -0,0 +1,287 @@
+// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
+
+.navbar {
+// background-color: $brand-primary;
+ border: 0;
+ border-radius: $border-radius-base;
+ @include shadow-big-navbar();
+
+ @extend .animation-transition-fast;
+
+ padding: 10px 0;
+
+ .navbar-brand {
+ position: relative;
+ height: 50px;
+ line-height: 30px;
+ color: inherit;
+ padding: 10px 15px;
+
+ &:hover,
+ &:focus {
+ color: inherit;
+ background-color: transparent;
+ }
+ }
+
+ .navbar-text {
+ color: inherit;
+ margin-top: 15px;
+ margin-bottom: 15px;
+ }
+
+ .navbar-nav {
+ > li > a {
+ color: inherit;
+ padding-top: 15px;
+ padding-bottom: 15px;
+
+ font-weight: $font-weight-default;
+ font-size: $mdb-btn-font-size-base;
+ text-transform: uppercase;
+
+ border-radius: $border-radius-base;
+
+ &:hover,
+ &:focus {
+ color: inherit;
+ background-color: transparent;
+ }
+
+
+ .material-icons,
+ .fa{
+ font-size: 20px;
+ max-width: 20px;
+ }
+
+ &:not(.btn-just-icon){
+ .fa{
+ position: relative;
+ top: 2px;
+ margin-top: -4px;
+ margin-right: 4px;
+ }
+ }
+ }
+
+ > li > .dropdown-menu{
+ margin-top: -20px;
+ }
+
+ > li.open > .dropdown-menu{
+ margin-top: 0;
+ }
+
+ > .active > a {
+ &,
+ &:hover,
+ &:focus {
+ color: inherit;
+ background-color: rgba(255, 255, 255, 0.1);
+ }
+ }
+ > .disabled > a {
+ &,
+ &:hover,
+ &:focus {
+ color: inherit;
+ background-color: transparent;
+ opacity: 0.9;
+ }
+ }
+ }
+
+ // Darken the responsive nav toggle
+ .navbar-toggle {
+ border: 0;
+ &:hover,
+ &:focus {
+ background-color: transparent;
+ }
+ .icon-bar {
+ background-color: inherit;
+ border: 1px solid;
+ }
+ }
+
+ .navbar-default .navbar-toggle,
+ .navbar-inverse .navbar-toggle {
+ border-color: transparent;
+ }
+
+ .navbar-collapse,
+ .navbar-form {
+ border-top: none;
+ box-shadow: none;
+ }
+
+ // Dropdowns
+ .navbar-nav {
+ > .open > a {
+ &,
+ &:hover,
+ &:focus {
+ background-color: transparent;
+ color: inherit;
+ }
+ }
+
+ @media (max-width: $grid-float-breakpoint-max) {
+ .navbar-text {
+ color: inherit;
+ margin-top: 15px;
+ margin-bottom: 15px;
+ }
+
+ // Dropdowns get custom display
+ .open .dropdown-menu {
+ > .dropdown-header {
+ border: 0;
+ color: inherit;
+ }
+ .divider {
+ border-bottom: 1px solid;
+ opacity: 0.08;
+ }
+ > li > a {
+ color: inherit;
+ &:hover,
+ &:focus {
+ color: inherit;
+ background-color: transparent;
+ }
+ }
+ > .active > a {
+ &,
+ &:hover,
+ &:focus {
+ color: inherit;
+ background-color: transparent;
+ }
+ }
+ > .disabled > a {
+ &,
+ &:hover,
+ &:focus {
+ color: inherit;
+ background-color: transparent;
+ }
+ }
+ }
+ }
+ }
+
+ &.navbar-default{
+ .logo-container .brand{
+ color: $gray;
+ }
+ }
+
+ .navbar-link {
+ color: inherit;
+ &:hover {
+ color: inherit;
+ }
+ }
+
+ .btn{
+ margin-top: 0;
+ margin-bottom: 0;
+ }
+ .btn-link {
+ color: inherit;
+ &:hover,
+ &:focus {
+ color: inherit;
+ }
+ &[disabled],
+ fieldset[disabled] & {
+ &:hover,
+ &:focus {
+ color: inherit;
+ }
+ }
+ }
+
+ .navbar-form {
+ margin: 4px 0 0;
+ .form-group {
+ margin: 0;
+ padding: 0;
+
+ .material-input:before,
+ &.is-focused .material-input:after {
+ background-color: inherit;
+ }
+ }
+
+ .form-group .form-control,
+ .form-control {
+ border-color: inherit;
+ color: inherit;
+ padding: 0;
+ margin: 0;
+
+ // re-normalize inputs in a navbar the size of standard bootstrap since our normal inputs are larger by spec than bootstrap
+ //---
+ //height: $mdb-input-height-base;
+ $bs-line-height-base: 1.428571429 !default;
+ $bs-line-height-computed: floor(($font-size-base * $bs-line-height-base)) !default; // ~20px
+ height: ($bs-line-height-computed + 8px);
+ font-size: $font-size-base;
+ line-height: $bs-line-height-base;
+ //---
+ }
+ }
+
+ // SASS conversion note: please mirror any content change in _mixins-shared.scss navbar-variations-content
+ @include navbar-variations(unquote(".navbar"), unquote(""), $brand-primary);
+
+
+ &-inverse {
+ background-color: $indigo;
+ }
+
+ &.navbar-transparent{
+ background-color: transparent;
+ box-shadow: none;
+ color: #fff;
+ padding-top: 25px;
+
+ .logo-container .brand{
+ color: $white-color;
+ }
+ }
+ &-fixed-top{
+ border-radius: 0;
+ }
+ @media (max-width: $screen-md-max) {
+
+ .navbar-brand {
+ height: 50px;
+ padding: 10px 15px;
+ }
+/*
+ .navbar-form {
+ margin-top: 10px;
+ }
+*/
+
+ .navbar-nav > li > a {
+ padding-top: 15px;
+ padding-bottom: 15px;
+ }
+ }
+
+ .alert{
+ border-radius: 0;
+ left: 0;
+ position: absolute;
+ right: 0;
+ top: 85px;
+ width: 100%;
+ z-index: 3;
+ transition: all 0.3s;
+ }
+}
diff --git a/templates/assets/sass/material-kit/_pagination.scss b/templates/assets/sass/material-kit/_pagination.scss
new file mode 100644
index 0000000..cd6451a
--- /dev/null
+++ b/templates/assets/sass/material-kit/_pagination.scss
@@ -0,0 +1,91 @@
+.pagination{
+ > li > a,
+ > li > span{
+ border: 0;
+ border-radius: 30px !important;
+ transition: all .3s;
+ padding: 0px 11px;
+ margin: 0 3px;
+ min-width: 30px;
+ height: 30px;
+ line-height: 30px;
+ color: $gray-color;
+ font-weight: $font-weight-default;
+ font-size: $mdb-btn-font-size-base;
+ text-transform: uppercase;
+ background: transparent;
+
+ &:hover,
+ &:focus{
+ color: $gray-color;
+ }
+ }
+
+ > .active > a,
+ > .active > span{
+ color: $gray-color;
+
+ &,
+ &:focus,
+ &:hover{
+ background-color: $brand-primary;
+ border-color: $brand-primary;
+ color: $white-color;
+ @include shadow-4dp-color($brand-primary);
+ }
+
+ }
+
+ // Colors
+ &.pagination-info{
+ > .active > a,
+ > .active > span{
+ &,
+ &:focus,
+ &:hover{
+ background-color: $brand-info;
+ border-color: $brand-info;
+ @include shadow-4dp-color($brand-info);
+ }
+ }
+ }
+
+ &.pagination-success{
+ > .active > a,
+ > .active > span{
+ &,
+ &:focus,
+ &:hover{
+ background-color: $brand-success;
+ border-color: $brand-success;
+ @include shadow-4dp-color($brand-success);
+ }
+ }
+ }
+
+ &.pagination-warning{
+ > .active > a,
+ > .active > span{
+ &,
+ &:focus,
+ &:hover{
+ background-color: $brand-warning;
+ border-color: $brand-warning;
+ @include shadow-4dp-color($brand-warning);
+ }
+ }
+ }
+
+ &.pagination-danger{
+ > .active > a,
+ > .active > span{
+ &,
+ &:focus,
+ &:hover{
+ background-color: $brand-danger;
+ border-color: $brand-danger;
+ @include shadow-4dp-color($brand-danger);
+ }
+ }
+ }
+}
diff --git a/templates/assets/sass/material-kit/_panels.scss b/templates/assets/sass/material-kit/_panels.scss
new file mode 100755
index 0000000..d918110
--- /dev/null
+++ b/templates/assets/sass/material-kit/_panels.scss
@@ -0,0 +1,23 @@
+// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
+
+.panel {
+ border-radius: 2px;
+ border: 0;
+
+ @include variations(unquote(".panel"), unquote(" > .panel-heading"), background-color, $grey-200);
+ @include shadow-z-1;
+}
+
+
+[class*="panel-"] > .panel-heading {
+ color: $mdb-text-color-light;
+ border: 0;
+}
+.panel-default, .panel:not([class*="panel-"]) {
+ > .panel-heading {
+ color: $mdb-text-color-primary;
+ }
+}
+.panel-footer {
+ background-color: $grey-200;
+}
diff --git a/templates/assets/sass/material-kit/_pills.scss b/templates/assets/sass/material-kit/_pills.scss
new file mode 100644
index 0000000..b267b82
--- /dev/null
+++ b/templates/assets/sass/material-kit/_pills.scss
@@ -0,0 +1,91 @@
+.nav-pills{
+
+ > li {
+ > a{
+ line-height: $mdb-btn-font-size-base * 2;
+ text-transform: uppercase;
+ font-size: $mdb-btn-font-size-base;
+ font-weight: $font-weight-bold;
+ min-width: 100px;
+ text-align: center;
+ color: $gray;
+ transition: all .3s;
+
+ &:hover{
+ background-color: rgba(200, 200, 200, 0.2);
+ }
+ }
+
+ i{
+ display: block;
+ font-size: 30px;
+ padding: 15px 0;
+ }
+
+ &.active > a{
+ &,
+ &:focus,
+ &:hover{
+ background-color: $brand-primary;
+ color: $white-color;
+ @include shadow-big-color($brand-primary);
+ }
+ }
+
+ }
+
+ &.nav-pills-info{
+ > li {
+ &.active > a{
+ &,
+ &:focus,
+ &:hover{
+ background-color: $brand-info;
+ @include shadow-big-color($brand-info);
+ }
+ }
+ }
+ }
+
+ &.nav-pills-success{
+ > li {
+ &.active > a{
+ &,
+ &:focus,
+ &:hover{
+ background-color: $brand-success;
+ @include shadow-big-color($brand-success);
+ }
+ }
+ }
+ }
+
+ &.nav-pills-warning{
+ > li {
+ &.active > a{
+ &,
+ &:focus,
+ &:hover{
+ background-color: $brand-warning;
+ @include shadow-big-color($brand-warning);
+ }
+ }
+ }
+ }
+
+ &.nav-pills-danger{
+ > li {
+ &.active > a{
+ &,
+ &:focus,
+ &:hover{
+ background-color: $brand-danger;
+ @include shadow-big-color($brand-danger);
+ }
+ }
+ }
+ }
+}
+.tab-space{
+ padding: 20px 0 50px 0px;
+}
diff --git a/templates/assets/sass/material-kit/_popups.scss b/templates/assets/sass/material-kit/_popups.scss
new file mode 100755
index 0000000..c41cf26
--- /dev/null
+++ b/templates/assets/sass/material-kit/_popups.scss
@@ -0,0 +1,72 @@
+// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
+
+.popover, .tooltip-inner {
+ color: $gray;
+ line-height: 1.5em;
+ background: $white-color;
+ border: none;
+ border-radius: $border-radius-base;
+ @include shadow-8dp();
+}
+
+.popover{
+ padding: 0;
+ @include shadow-16dp();
+
+ &.left,
+ &.right,
+ &.top,
+ &.bottom{
+ > .arrow{
+ border: none;
+ }
+ }
+}
+
+.popover-title{
+ background-color: $white-color;
+ border: none;
+ padding: 15px 15px 5px;
+ font-size: $font-size-h4;
+}
+
+.popover-content{
+ padding: 10px 15px 15px;
+ line-height: 1.4;
+}
+
+.tooltip.in{
+ opacity: 1;
+ @include transform-translate-y(0px);
+}
+.tooltip{
+ opacity: 0;
+ transition: opacity, transform .2s ease;
+ @include transform-translate-y(5px);
+
+ &.left{
+ .tooltip-arrow{
+ border-left-color: $white-color;
+ }
+ }
+ &.right{
+ .tooltip-arrow{
+ border-right-color: $white-color;
+ }
+ }
+ &.top{
+ .tooltip-arrow{
+ border-top-color: $white-color;
+ }
+ }
+ &.bottom{
+ .tooltip-arrow{
+ border-bottom-color: $white-color;
+ }
+ }
+}
+
+.tooltip-inner{
+ padding: 10px 15px;
+ min-width: 130px;
+}
diff --git a/templates/assets/sass/material-kit/_progress.scss b/templates/assets/sass/material-kit/_progress.scss
new file mode 100755
index 0000000..a22364f
--- /dev/null
+++ b/templates/assets/sass/material-kit/_progress.scss
@@ -0,0 +1,28 @@
+// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
+
+.progress {
+ height: 4px;
+ border-radius: 0;
+ box-shadow: none;
+ background: #DDDDDD;
+ .progress-bar {
+ box-shadow: none;
+ @include variations(unquote(".progress-bar"), unquote(""), background-color, $brand-primary);
+ }
+
+ &.progress-line-primary{
+ background: rgba($brand-primary,.2);
+ }
+ &.progress-line-info{
+ background: rgba($brand-info,.2);
+ }
+ &.progress-line-success{
+ background: rgba($brand-success,.2);
+ }
+ &.progress-line-warning{
+ background: rgba($brand-warning,.2);
+ }
+ &.progress-line-danger{
+ background: rgba($brand-danger,.2);
+ }
+}
diff --git a/templates/assets/sass/material-kit/_radios.scss b/templates/assets/sass/material-kit/_radios.scss
new file mode 100755
index 0000000..5640109
--- /dev/null
+++ b/templates/assets/sass/material-kit/_radios.scss
@@ -0,0 +1,114 @@
+// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
+
+@mixin radio-color($color, $opacity){
+ & ~ .check,
+ & ~ .circle {
+ opacity: $opacity;
+ }
+
+ & ~ .check {
+ background-color: $color;
+ }
+
+ & ~ .circle {
+ border-color: $color;
+ }
+}
+
+.radio {
+ label {
+ cursor: pointer;
+ padding-left: 35px;
+ position: relative;
+ color: $mdb-radio-label-color;
+ @include mdb-label-color-toggle-focus();
+
+ span {
+ display: block;
+ position: absolute;
+ left: 10px;
+ top: 2px;
+ transition-duration: 0.2s;
+ }
+ .circle {
+ border: 1px solid $mdb-radio-color-off;
+ height: 15px;
+ width: 15px;
+ border-radius: 100%;
+ }
+ .check {
+ height: 15px;
+ width: 15px;
+ border-radius: 100%;
+ background-color: $mdb-radio-color-on;
+ @include transform-scale3d(unquote('0,0,0'));
+ }
+ .check:after {
+ display: block;
+ position: absolute;
+ content: "";
+ background-color: $mdb-text-color-primary;
+ left: -18px;
+ top: -18px;
+ height: 50px;
+ width: 50px;
+ border-radius: 100%;
+ z-index: 1;
+ opacity: 0;
+ margin: 0;
+ @include transform-scale3d(unquote('1.5,1.5,1'));
+ }
+ input[type=radio]:not(:checked) ~ .check:after {
+ @include animation(rippleOff 500ms);
+ }
+ input[type=radio]:checked ~ .check:after {
+ @include animation(rippleOff 500ms);
+ }
+
+ }
+
+ input[type=radio] {
+ opacity: 0;
+ height: 0;
+ width: 0;
+ overflow: hidden;
+
+ &:checked {
+ @include radio-color($mdb-radio-color-on, 1);
+ }
+ &:checked ~ .check {
+ @include transform-scale3d(unquote('0.65, 0.65, 1'));
+ }
+ }
+
+ input[type=radio][disabled] {
+
+ // light theme spec: Disabled: #000000, Opacity 26%
+ @include radio-color($black, 0.26);
+
+ }
+}
+
+@keyframes rippleOn {
+ 0% {
+ opacity: 0;
+ }
+ 50% {
+ opacity: 0.2;
+ }
+ 100% {
+ opacity: 0;
+ }
+}
+
+@keyframes rippleOff {
+ 0% {
+ opacity: 0;
+ }
+ 50% {
+ opacity: 0.2;
+ }
+ 100% {
+ opacity: 0;
+ }
+}
diff --git a/templates/assets/sass/material-kit/_ripples.scss b/templates/assets/sass/material-kit/_ripples.scss
new file mode 100755
index 0000000..ffe753e
--- /dev/null
+++ b/templates/assets/sass/material-kit/_ripples.scss
@@ -0,0 +1,36 @@
+.withripple {
+ position: relative;
+}
+.ripple-container {
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 1;
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+ border-radius: inherit;
+ pointer-events: none;
+}
+.ripple {
+ position: absolute;
+ width: 20px;
+ height: 20px;
+ margin-left: -10px;
+ margin-top: -10px;
+ border-radius: 100%;
+ background-color: #000; // fallback color
+ background-color: rgba(0,0,0,0.05);
+ transform: scale(1);
+ transform-origin: 50%;
+ opacity: 0;
+ pointer-events: none;
+}
+.ripple.ripple-on {
+ transition: opacity 0.15s ease-in 0s, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
+ opacity: 0.1;
+}
+.ripple.ripple-out {
+ transition: opacity 0.1s linear 0s !important;
+ opacity: 0;
+}
diff --git a/templates/assets/sass/material-kit/_sections.scss b/templates/assets/sass/material-kit/_sections.scss
new file mode 100644
index 0000000..7c2dbc2
--- /dev/null
+++ b/templates/assets/sass/material-kit/_sections.scss
@@ -0,0 +1,13 @@
+.section{
+ padding: 70px 0;
+}
+.section-navbars{
+ padding-bottom: 0;
+}
+
+.section-full-screen{
+ height: 100vh;
+}
+.section-signup{
+ padding-top: 20vh;
+}
diff --git a/templates/assets/sass/material-kit/_shadows.scss b/templates/assets/sass/material-kit/_shadows.scss
new file mode 100755
index 0000000..755d427
--- /dev/null
+++ b/templates/assets/sass/material-kit/_shadows.scss
@@ -0,0 +1,138 @@
+// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
+
+@mixin shadow-z-1(){
+ box-shadow:
+ 0 1px 6px 0 rgba(0, 0, 0, 0.12),
+ 0 1px 6px 0 rgba(0, 0, 0, 0.12);
+}
+
+@mixin shadow-z-1-hover(){
+ box-shadow:
+ 0 5px 11px 0 rgba(0, 0, 0, 0.18),
+ 0 4px 15px 0 rgba(0, 0, 0, 0.15);
+}
+
+@mixin shadow-z-2(){
+ box-shadow:
+ 0 8px 17px 0 rgba(0, 0, 0, 0.2),
+ 0 6px 20px 0 rgba(0, 0, 0, 0.19);
+}
+
+@mixin shadow-z-3(){
+ box-shadow:
+ 0 12px 15px 0 rgba(0, 0, 0, 0.24),
+ 0 17px 50px 0 rgba(0, 0, 0, 0.19);
+}
+
+@mixin shadow-z-4(){
+ box-shadow:
+ 0 16px 28px 0 rgba(0, 0, 0, 0.22),
+ 0 25px 55px 0 rgba(0, 0, 0, 0.21);
+}
+
+@mixin shadow-z-5(){
+ box-shadow:
+ 0 27px 24px 0 rgba(0, 0, 0, 0.2),
+ 0 40px 77px 0 rgba(0, 0, 0, 0.22);
+}
+
+
+/* Shadows (from mdl http://www.getmdl.io/) */
+
+// Focus shadow mixin.
+@mixin big-shadow(){
+ box-shadow: 0 0 8px rgba(0, 0, 0,.18),
+ 0 8px 16px rgba(0, 0, 0,.36);
+}
+
+@mixin button-shadow-color($color){
+ box-shadow: 0 14px 26px -12px rgba($color, $mdb-shadow-key-penumbra-opacity * 3),
+ 0 4px 23px 0px rgba(0,0,0, $mdb-shadow-ambient-shadow-opacity),
+ 0 8px 10px -5px rgba($color, $mdb-shadow-key-umbra-opacity);
+}
+
+@mixin shadow-2dp(){
+ box-shadow: 0 2px 2px 0 rgba(0, 0, 0, $mdb-shadow-key-penumbra-opacity),
+ 0 3px 1px -2px rgba(0, 0, 0, $mdb-shadow-key-umbra-opacity),
+ 0 1px 5px 0 rgba(0, 0, 0, $mdb-shadow-ambient-shadow-opacity);
+}
+@mixin shadow-2dp-color($color){
+ box-shadow: 0 2px 2px 0 rgba($color, $mdb-shadow-key-penumbra-opacity),
+ 0 3px 1px -2px rgba($color, $mdb-shadow-key-umbra-opacity),
+ 0 1px 5px 0 rgba($color, $mdb-shadow-ambient-shadow-opacity);
+}
+
+@mixin shadow-3dp(){
+ box-shadow: 0 3px 4px 0 rgba(0, 0, 0, $mdb-shadow-key-penumbra-opacity),
+ 0 3px 3px -2px rgba(0, 0, 0, $mdb-shadow-key-umbra-opacity),
+ 0 1px 8px 0 rgba(0, 0, 0, $mdb-shadow-ambient-shadow-opacity);
+}
+@mixin shadow-4dp(){
+ box-shadow: 0 4px 5px 0 rgba(0, 0, 0, $mdb-shadow-key-penumbra-opacity),
+ 0 1px 10px 0 rgba(0, 0, 0, $mdb-shadow-ambient-shadow-opacity),
+ 0 2px 4px -1px rgba(0, 0, 0, $mdb-shadow-key-umbra-opacity);
+}
+@mixin shadow-4dp-color($color){
+ box-shadow: 0 4px 5px 0 rgba($color, $mdb-shadow-key-penumbra-opacity),
+ 0 1px 10px 0 rgba($color, $mdb-shadow-ambient-shadow-opacity),
+ 0 2px 4px -1px rgba($color, $mdb-shadow-key-umbra-opacity);
+}
+@mixin shadow-6dp(){
+ box-shadow: 0 6px 10px 0 rgba(0, 0, 0, $mdb-shadow-key-penumbra-opacity),
+ 0 1px 18px 0 rgba(0, 0, 0, $mdb-shadow-ambient-shadow-opacity),
+ 0 3px 5px -1px rgba(0, 0, 0, $mdb-shadow-key-umbra-opacity);
+}
+@mixin shadow-8dp(){
+ box-shadow: 0 8px 10px 1px rgba(0, 0, 0, $mdb-shadow-key-penumbra-opacity),
+ 0 3px 14px 2px rgba(0, 0, 0, $mdb-shadow-ambient-shadow-opacity),
+ 0 5px 5px -3px rgba(0, 0, 0, $mdb-shadow-key-umbra-opacity);
+}
+@mixin shadow-8dp-color($color){
+ box-shadow: 0 8px 10px 1px rgba($color, $mdb-shadow-key-penumbra-opacity),
+ 0 3px 14px 2px rgba(0, 0, 0, $mdb-shadow-ambient-shadow-opacity),
+ 0 5px 5px -3px rgba($color, $mdb-shadow-key-umbra-opacity);
+}
+
+@mixin shadow-16dp(){
+ box-shadow: 0 16px 24px 2px rgba(0, 0, 0, $mdb-shadow-key-penumbra-opacity),
+ 0 6px 30px 5px rgba(0, 0, 0, $mdb-shadow-ambient-shadow-opacity),
+ 0 8px 10px -5px rgba(0, 0, 0, $mdb-shadow-key-umbra-opacity);
+}
+
+@mixin shadow-16dp-color($color){
+ box-shadow: 0 16px 24px 2px rgba($color, $mdb-shadow-key-penumbra-opacity),
+ 0 6px 30px 5px rgba(0, 0, 0, $mdb-shadow-ambient-shadow-opacity),
+ 0 8px 10px -5px rgba($color, $mdb-shadow-key-umbra-opacity);
+}
+
+@mixin shadow-24dp(){
+ box-shadow: 0 9px 46px 8px rgba(0, 0, 0, $mdb-shadow-key-penumbra-opacity),
+ 0 11px 15px -7px rgba(0, 0, 0, $mdb-shadow-ambient-shadow-opacity),
+ 0 24px 38px 3px rgba(0, 0, 0, $mdb-shadow-key-umbra-opacity);
+}
+
+@mixin shadow-big(){
+ box-shadow: 0 16px 38px -12px rgba(0, 0, 0, $mdb-shadow-key-penumbra-opacity * 4),
+ 0 4px 25px 0px rgba(0, 0, 0, $mdb-shadow-ambient-shadow-opacity),
+ 0 8px 10px -5px rgba(0, 0, 0, $mdb-shadow-key-umbra-opacity);
+}
+
+@mixin shadow-big-navbar(){
+ box-shadow: 0 10px 20px -12px rgba(0, 0, 0, $mdb-shadow-key-penumbra-opacity * 3),
+ 0 3px 20px 0px rgba(0, 0, 0, $mdb-shadow-ambient-shadow-opacity),
+ 0 8px 10px -5px rgba(0, 0, 0, $mdb-shadow-key-umbra-opacity);
+}
+
+@mixin shadow-big-color($color){
+ box-shadow: 0 16px 26px -10px rgba($color, $mdb-shadow-key-penumbra-opacity * 4),
+ 0 4px 25px 0px rgba(0,0,0, $mdb-shadow-ambient-shadow-opacity),
+ 0 8px 10px -5px rgba($color, $mdb-shadow-key-umbra-opacity);
+
+}
+
+// shadow backup for Sketch/Photoshop
+// @mixin shadow-big-color($color){
+// box-shadow: 0 16px 38px -12px rgba($color, $mdb-shadow-key-penumbra-opacity * 4),
+// 0 4px 25px 0px rgba($color, $mdb-shadow-ambient-shadow-opacity),
+// 0 8px 10px -5px rgba($color, $mdb-shadow-key-umbra-opacity);
+// }
diff --git a/templates/assets/sass/material-kit/_tabs.scss b/templates/assets/sass/material-kit/_tabs.scss
new file mode 100755
index 0000000..2d1e460
--- /dev/null
+++ b/templates/assets/sass/material-kit/_tabs.scss
@@ -0,0 +1,53 @@
+// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
+
+.nav-tabs {
+ background: $brand-primary;
+ border: 0;
+ border-radius: $border-radius-base;
+ padding: 0 $padding-base;
+
+ > li {
+ > a {
+ color: #FFFFFF;
+ border: 0;
+ margin: 0;
+
+ border-radius: $border-radius-base;
+
+ line-height: $mdb-btn-font-size-base * 2;
+ text-transform: uppercase;
+ font-size: $mdb-btn-font-size-base;
+
+ &:hover {
+ background-color: transparent;
+ border: 0;
+ }
+ }
+ & > a,
+ & > a:hover,
+ & > a:focus {
+ background-color: transparent;
+ border: 0 !important;
+ color: #FFFFFF !important;
+ font-weight: $font-weight-bold;
+ }
+ &.disabled > a,
+ &.disabled > a:hover {
+ color: rgba(255,255,255,0.5);
+ }
+
+ .material-icons{
+ margin: -1px 5px 0 0;
+ }
+ }
+
+ >li.active{
+ & > a,
+ & > a:hover,
+ & > a:focus {
+ background-color: rgba(255,255,255, .2);
+ transition: background-color .1s .2s;
+ }
+ }
+
+}
diff --git a/templates/assets/sass/material-kit/_togglebutton.scss b/templates/assets/sass/material-kit/_togglebutton.scss
new file mode 100755
index 0000000..9e67690
--- /dev/null
+++ b/templates/assets/sass/material-kit/_togglebutton.scss
@@ -0,0 +1,87 @@
+// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
+
+.togglebutton {
+ vertical-align: middle;
+ &, label, input, .toggle {
+ user-select: none;
+ }
+ label {
+ cursor: pointer;
+ color: $mdb-toggle-label-color;
+ @include mdb-label-color-toggle-focus();
+
+ // Hide original checkbox
+ input[type=checkbox] {
+ opacity: 0;
+ width: 0;
+ height: 0;
+ }
+
+ .toggle {
+ text-align: left; // Issue #737 horizontal form
+ margin-left: 5px;
+ }
+ // Switch bg off and disabled
+ .toggle,
+ input[type=checkbox][disabled] + .toggle {
+ content: "";
+ display: inline-block;
+ width: 30px;
+ height: 15px;
+ background-color: rgba(80, 80, 80, 0.7);
+ border-radius: 15px;
+ margin-right: 15px;
+ transition: background 0.3s ease;
+ vertical-align: middle;
+ }
+ // Handle off
+ .toggle:after {
+ content: "";
+ display: inline-block;
+ width: 20px;
+ height: 20px;
+ background-color: #FFFFFF;
+ border-radius: 20px;
+ position: relative;
+ box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.4);
+ left: -5px;
+ top: -3px;
+ border: 1px solid $mdb-checkbox-border-color;
+ transition: left 0.3s ease, background 0.3s ease, box-shadow 0.1s ease;
+ }
+ input[type=checkbox] {
+ // Handle disabled
+ &[disabled] {
+ & + .toggle:after,
+ &:checked + .toggle:after {
+ background-color: #BDBDBD;
+ }
+ }
+
+ & + .toggle:active:after,
+ &[disabled] + .toggle:active:after {
+ box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.4), 0 0 0 15px rgba(0, 0, 0, 0.1);
+ }
+
+ // Ripple off and disabled
+ &:checked + .toggle:after {
+ left: 15px;
+ }
+ }
+
+ // set bg when checked
+ input[type=checkbox]:checked {
+ + .toggle {
+ background-color: rgba($brand-primary, (70/100)); // Switch bg on
+ }
+
+ + .toggle:after {
+ border-color: $brand-primary; // Handle on
+ }
+
+ + .toggle:active:after {
+ box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.4), 0 0 0 15px rgba($brand-primary, (10/100)); // Ripple on
+ }
+ }
+ }
+}
diff --git a/templates/assets/sass/material-kit/_typography.scss b/templates/assets/sass/material-kit/_typography.scss
new file mode 100755
index 0000000..9e97040
--- /dev/null
+++ b/templates/assets/sass/material-kit/_typography.scss
@@ -0,0 +1,66 @@
+h1, .h1 {
+ font-size: $font-size-h1;
+ line-height: 1.15em;
+}
+h2, .h2{
+ font-size: $font-size-h2;
+}
+h3, .h3{
+ font-size: $font-size-h3;
+ line-height: 1.4em;
+ margin: 20px 0 10px;
+}
+h4, .h4{
+ font-size: $font-size-h4;
+ line-height: 1.4em;
+}
+h5, .h5 {
+ font-size: $font-size-h5;
+ line-height: 1.4em;
+ margin-bottom: 15px;
+}
+h6, .h6{
+ font-size: $font-size-h6;
+ text-transform: uppercase;
+}
+
+.title,
+.card-title,
+.info-title,
+.footer-brand,
+.footer-big h5,
+.footer-big h4,
+.media .media-heading{
+ font-weight: $font-weight-extra-bold;
+ &,
+ a{
+ color: $black-color;
+ text-decoration: none;
+ }
+}
+
+h2.title{
+ margin-bottom: $margin-base * 2;
+}
+
+.description,
+.card-description,
+.footer-big p{
+ color: $gray-light;
+}
+
+.text-warning {
+ color: $brand-warning;
+}
+.text-primary {
+ color: $brand-primary;
+}
+.text-danger {
+ color: $brand-danger;
+}
+.text-success {
+ color: $brand-success;
+}
+.text-info {
+ color: $brand-info;
+}
diff --git a/templates/assets/sass/material-kit/_variables.scss b/templates/assets/sass/material-kit/_variables.scss
new file mode 100755
index 0000000..158c2f4
--- /dev/null
+++ b/templates/assets/sass/material-kit/_variables.scss
@@ -0,0 +1,198 @@
+// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
+
+@import '_colors';
+
+// Typography elements
+$mdb-font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif !default;
+$mdb-text-color-light: $white !default;
+$mdb-text-color-light-hex: $white !default; // for contrast function in inverse
+$mdb-text-color-primary: unquote("rgba(#{$rgb-black}, 0.87)") !default;
+$mdb-text-color-primary-hex: $black !default; // for contrast function in inverse
+$icon-color: rgba(0,0,0,0.5) !default;
+
+
+$mdb-label-color: unquote("rgba(#{$rgb-black}, 0.26)") !default;
+$mdb-label-color-toggle-focus: unquote("rgba(#{$rgb-black}, .54)") !default;
+
+
+//---
+// Converted bs variables
+
+// Bootstrap brand color customization
+$white-color: #FFFFFF !default;
+
+$gray-color: #999999 !default;
+
+$brand-primary: $purple !default;
+$brand-success: $green !default;
+$brand-danger: $red !default;
+$brand-warning: $yellow !default;
+$brand-info: $light-blue !default;
+$brand-rose: $pink !default;
+
+$border-radius-base: 3px !default;
+$border-radius-small: 2px !default;
+$border-radius-huge: 10px !default;
+$border-radius-extreme: 30px !default;
+
+// Typography
+$font-family-sans-serif: 'Roboto', 'Helvetica', 'Arial', sans-serif !default;
+$headings-font-weight: 300 !default;
+
+$font-weight-light: 300 !default;
+$font-weight-default: 400 !default;
+$font-weight-bold: 500 !default;
+$font-weight-extra-bold: 700 !default;
+$font-weight-ultra-bold: 900 !default;
+
+$body-bg: #EEEEEE !default;
+//---
+
+// import bs variables for sass, first declared wins.
+@import 'variables_bootstrap';
+
+// Bootstrap Material Design variables start with mdb-
+$mdb-brand-inverse: $indigo !default;
+
+
+/* ANIMATION */
+$mdb-animation-curve-fast-out-slow-in: cubic-bezier(0.4, 0, 0.2, 1) !default;
+$mdb-animation-curve-linear-out-slow-in: cubic-bezier(0, 0, 0.2, 1) !default;
+$mdb-animation-curve-fast-out-linear-in: cubic-bezier(0.4, 0, 1, 1) !default;
+$mdb-animation-curve-default: $mdb-animation-curve-fast-out-slow-in !default;
+
+
+//---
+// FIXME: Similar but not quite the same as Bootstrap variables
+// FIXME: these need to either a) be converted to $mdb- or b) converted to bs variables
+$contrast-factor: 40% !default;
+//---
+
+
+
+
+// --------------------
+// inputs
+$mdb-input-placeholder-color: #AAAAAA !default;
+$mdb-input-underline-color: #D2D2D2 !default;
+$mdb-label-static-size-ratio: 75 / 100 !default;
+$mdb-help-block-size-ratio: 75 / 100 !default;
+
+$mdb-input-font-size-base: 14px !default;
+$mdb-input-font-size-large: ceil(($font-size-base * 1.25)) !default; // ~20px
+$mdb-input-font-size-small: ceil(($font-size-base * 0.75)) !default; // ~12px
+
+// FIXME: with #733 customization of bootstrap, consider how these could be based on the original bs customized variables
+//** Unit-less `line-height` for use in components like buttons.
+
+$mdb-input-line-height-base: $line-height-base; //1.428571429 !default; // 20/14
+//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
+$mdb-input-line-height-computed: floor(($mdb-input-font-size-base * $mdb-input-line-height-base)) !default; // ~20px
+$mdb-input-line-height-large: 1.3333333 !default; // extra decimals for Win 8.1 Chrome
+$mdb-input-line-height-small: 1.5 !default;
+
+//## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).
+$mdb-input-padding-base-vertical: 8px - 1px !default; // was 6.
+$mdb-input-padding-base-horizontal: 0 !default; // was 12.
+$mdb-label-as-placeholder-shim-base: 0 !default; // manual adjustment of label top when positioned as placeholder
+$mdb-label-top-margin-base: 16px !default;
+
+$mdb-input-padding-large-vertical: 10px - 1px !default; // 10
+$mdb-input-padding-large-horizontal: 0 !default; // 16
+$mdb-label-as-placeholder-shim-large: -4px !default; // manual adjustment of label top when positioned as placeholder
+$mdb-label-top-margin-large: 16px !default;
+
+$mdb-input-padding-small-vertical: 4px - 1px !default; // 5
+$mdb-input-padding-small-horizontal: 0 !default; // 10
+$mdb-label-as-placeholder-shim-small: 8px !default; // manual adjustment of label top when positioned as placeholder
+$mdb-label-top-margin-small: 12px !default;
+
+$mdb-input-padding-xs-vertical: 2px !default; // 1
+$mdb-input-padding-xs-horizontal: 0 !default; // 5
+
+$mdb-input-border-radius-base: 0 !default;
+$mdb-input-border-radius-large: 0 !default;
+$mdb-input-border-radius-small: 0 !default;
+
+
+//** Default `.form-control` height
+$mdb-input-height-base: ($mdb-input-line-height-computed + ($mdb-input-padding-base-vertical * 2) + 2) !default;
+//** Large `.form-control` height
+$mdb-input-height-large: (ceil($mdb-input-font-size-large * $mdb-input-line-height-large) + ($mdb-input-padding-large-vertical * 2) + 2) !default;
+//** Small `.form-control` height
+$mdb-input-height-small: (floor($mdb-input-font-size-small * $mdb-input-line-height-small) + ($mdb-input-padding-small-vertical * 2) + 2) !default;
+
+
+
+
+// Card
+$mdb-card-body-text: $mdb-text-color-primary !default;
+$mdb-card-body-background: #fff !default;
+$mdb-card-image-headline: #fff !default;
+
+$text-disabled: #a8a8a8 !default;
+$background-disabled: #eaeaea !default;
+
+// Checkboxes
+$mdb-checkbox-size: 20px !default;
+$mdb-checkbox-animation-ripple: 500ms !default;
+$mdb-checkbox-animation-check: 0.3s !default;
+$mdb-checkbox-checked-color: $brand-primary !default;
+
+$mdb-checkbox-label-color: $mdb-label-color !default;
+$mdb-checkbox-border-color: $mdb-label-color-toggle-focus !default;
+$checkbox-transform-scale: 2.3, 2.3, 1 !default;
+
+// Popovers and Popups
+$mdb-popover-background: rgba(101, 101, 101, 0.9) !default;
+$mdb-popover-color: #ececec !default;
+
+// Dropdown Menu
+$mdb-dropdown-font-size: 13px !default;
+
+// Toggle
+$mdb-toggle-label-color: $mdb-label-color !default;
+
+// Radio:
+$mdb-radio-label-color: $mdb-label-color !default;
+$mdb-radio-color-off: $mdb-label-color-toggle-focus !default;
+$mdb-radio-color-on: $brand-primary !default;
+
+// Buttons:
+$mdb-btn-font-size-base: 12px !default;
+$mdb-btn-font-size-lg: 14px !default;
+$mdb-btn-font-size-sm: 11px !default;
+$mdb-btn-font-size-xs: 10px !default;
+
+
+$mdb-btn-background-color: $body-bg; //transparent !default;
+$mdb-btn-background-color-text: $mdb-text-color-primary !default;
+
+
+$mdl-btn-border-radus: 2px !default;
+//$mdb-btn-primary-color: unquote("rgba(#{$rgb-grey-500}, 0.20)") !default;
+
+$mdb-btn-fab-size: 56px !default;
+$mdb-btn-fab-size-mini: 40px !default;
+$mdb-btn-fab-font-size: 24px !default;
+
+$mdb-btn-icon-size: 32px !default;
+$mdb-btn-icon-size-mini: 17px !default;
+
+/* SHADOWS */
+$mdb-shadow-key-umbra-opacity: 0.2 !default;
+$mdb-shadow-key-penumbra-opacity: 0.14 !default;
+$mdb-shadow-ambient-shadow-opacity: 0.12 !default;
+
+
+$fancy-shadow: 0 13px 39px -10px rgba(0, 0, 0, 0.65), 0 1px 25px 0px rgba(0, 0, 0, 0.15);
+
+
+$general-transition-time: 300ms !default;
+
+$slow-transition-time: 370ms !default;
+$fast-transition-time: 150ms !default;
+
+$transition-linear: linear !default;
+$transition-bezier: cubic-bezier(0.34, 1.61, 0.7, 1) !default;
+$transition-ease: ease 0s;
diff --git a/templates/assets/sass/material-kit/_variables_bootstrap.scss b/templates/assets/sass/material-kit/_variables_bootstrap.scss
new file mode 100644
index 0000000..b9969c3
--- /dev/null
+++ b/templates/assets/sass/material-kit/_variables_bootstrap.scss
@@ -0,0 +1,882 @@
+$bootstrap-sass-asset-helper: false !default;
+//
+// Variables
+// --------------------------------------------------
+
+
+//== Colors
+//
+//## Gray and brand colors for use across Bootstrap.
+
+$gray-base: #000 !default;
+$gray-darker: lighten($gray-base, 13.5%) !default; // #222
+$gray-dark: lighten($gray-base, 20%) !default; // #333
+$gray: lighten($gray-base, 33.5%) !default; // #555
+$gray-light: #999999 !default; // #999999
+$gray-lighter: lighten($gray-base, 93.5%) !default; // #eee
+
+$brand-primary: darken(#428bca, 6.5%) !default; // #337ab7
+$brand-success: #5cb85c !default;
+$brand-info: #5bc0de !default;
+$brand-warning: #f0ad4e !default;
+$brand-danger: #d9534f !default;
+
+$black-color: #3C4858 !default;
+
+
+//== Scaffolding
+//
+//## Settings for some of the most global styles.
+
+//** Background color for `<body>`.
+$body-bg: #fff !default;
+//** Global text color on `<body>`.
+$text-color: $gray-dark !default;
+
+//** Global textual link color.
+$link-color: $brand-primary !default;
+//** Link hover color set via `darken()` function.
+$link-hover-color: darken($link-color, 15%) !default;
+//** Link hover decoration.
+$link-hover-decoration: underline !default;
+
+
+//== Typography
+//
+//## Font, line-height, and color for body text, headings, and more.
+
+$font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif !default;
+$font-family-serif: Georgia, "Times New Roman", Times, serif !default;
+//** Default monospace fonts for `<code>`, `<kbd>`, and `<pre>`.
+$font-family-monospace: Menlo, Monaco, Consolas, "Courier New", monospace !default;
+$font-family-base: $font-family-sans-serif !default;
+
+$font-size-base: 14px !default;
+$font-size-large: ceil(($font-size-base * 1.25)) !default; // ~18px
+$font-size-small: ceil(($font-size-base * 0.85)) !default; // ~12px
+
+$font-size-h1: 3.8em !default;
+$font-size-h2: 2.6em !default;
+$font-size-h3: 1.825em !default;
+$font-size-h4: 1.3em !default;
+$font-size-h5: 1.25em !default;
+$font-size-h6: 1em !default;
+$font-paragraph: 16px !default;
+$font-size-navbar: 16px !default;
+$font-size-small: 12px !default;
+
+//** Unit-less `line-height` for use in components like buttons.
+$line-height-base: 1.428571429 !default; // 20/14
+//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
+$line-height-computed: floor(($font-size-base * $line-height-base)) !default; // ~20px
+
+//** By default, this inherits from the `<body>`.
+$headings-font-family: inherit !default;
+$headings-font-weight: 500 !default;
+$headings-line-height: 1.1 !default;
+$headings-color: inherit !default;
+
+
+//== Iconography
+//
+//## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.
+
+//** Load fonts from this directory.
+
+// [converter] If $bootstrap-sass-asset-helper if used, provide path relative to the assets load path.
+// [converter] This is because some asset helpers, such as Sprockets, do not work with file-relative paths.
+$icon-font-path: if($bootstrap-sass-asset-helper, "bootstrap/", "../fonts/bootstrap/") !default;
+
+//** File name for all font files.
+$icon-font-name: "glyphicons-halflings-regular" !default;
+//** Element ID within SVG icon file.
+$icon-font-svg-id: "glyphicons_halflingsregular" !default;
+
+
+//== Components
+//
+//## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).
+
+$padding-base: 15px !default;
+$margin-base: 15px !default;
+
+$padding-base-vertical: 6px !default;
+$padding-base-horizontal: 12px !default;
+
+$padding-large-vertical: 10px !default;
+$padding-large-horizontal: 16px !default;
+
+$padding-small-vertical: 5px !default;
+$padding-small-horizontal: 10px !default;
+
+$padding-xs-vertical: 1px !default;
+$padding-xs-horizontal: 5px !default;
+
+$line-height-large: 1.3333333 !default; // extra decimals for Win 8.1 Chrome
+$line-height-small: 1.5 !default;
+
+$border-radius-base: 4px !default;
+$border-radius-large: 6px !default;
+$border-radius-small: 3px !default;
+
+//** Global color for active items (e.g., navs or dropdowns).
+$component-active-color: #fff !default;
+//** Global background color for active items (e.g., navs or dropdowns).
+$component-active-bg: $brand-primary !default;
+
+//** Width of the `border` for generating carets that indicator dropdowns.
+$caret-width-base: 4px !default;
+//** Carets increase slightly in size for larger components.
+$caret-width-large: 5px !default;
+
+
+//== Tables
+//
+//## Customizes the `.table` component with basic values, each used across all table variations.
+
+//** Padding for `<th>`s and `<td>`s.
+$table-cell-padding: 8px !default;
+//** Padding for cells in `.table-condensed`.
+$table-condensed-cell-padding: 5px !default;
+
+//** Default background color used for all tables.
+$table-bg: transparent !default;
+//** Background color used for `.table-striped`.
+$table-bg-accent: #f9f9f9 !default;
+//** Background color used for `.table-hover`.
+$table-bg-hover: #f5f5f5 !default;
+$table-bg-active: $table-bg-hover !default;
+
+//** Border color for table and cell borders.
+$table-border-color: #ddd !default;
+
+
+//== Buttons
+//
+//## For each of Bootstrap's buttons, define text, background and border color.
+
+$btn-font-weight: normal !default;
+
+$btn-default-color: #333 !default;
+$btn-default-bg: #fff !default;
+$btn-default-border: #ccc !default;
+
+$btn-primary-color: #fff !default;
+$btn-primary-bg: $brand-primary !default;
+$btn-primary-border: darken($btn-primary-bg, 5%) !default;
+
+$btn-success-color: #fff !default;
+$btn-success-bg: $brand-success !default;
+$btn-success-border: darken($btn-success-bg, 5%) !default;
+
+$btn-info-color: #fff !default;
+$btn-info-bg: $brand-info !default;
+$btn-info-border: darken($btn-info-bg, 5%) !default;
+
+$btn-warning-color: #fff !default;
+$btn-warning-bg: $brand-warning !default;
+$btn-warning-border: darken($btn-warning-bg, 5%) !default;
+
+$btn-danger-color: #fff !default;
+$btn-danger-bg: $brand-danger !default;
+$btn-danger-border: darken($btn-danger-bg, 5%) !default;
+
+$btn-link-disabled-color: $gray-light !default;
+
+// Allows for customizing button radius independently from global border radius
+$btn-border-radius-base: $border-radius-base !default;
+$btn-border-radius-large: $border-radius-large !default;
+$btn-border-radius-small: $border-radius-small !default;
+
+
+//== Forms
+//
+//##
+
+//** `<input>` background color
+$input-bg: #fff !default;
+//** `<input disabled>` background color
+$input-bg-disabled: $gray-lighter !default;
+
+//** Text color for `<input>`s
+$input-color: $gray !default;
+//** `<input>` border color
+$input-border: #ccc !default;
+
+// TODO: Rename `$input-border-radius` to `$input-border-radius-base` in v4
+//** Default `.form-control` border radius
+// This has no effect on `<select>`s in some browsers, due to the limited stylability of `<select>`s in CSS.
+$input-border-radius: $border-radius-base !default;
+//** Large `.form-control` border radius
+$input-border-radius-large: $border-radius-large !default;
+//** Small `.form-control` border radius
+$input-border-radius-small: $border-radius-small !default;
+
+//** Border color for inputs on focus
+$input-border-focus: #66afe9 !default;
+
+//** Placeholder text color
+$input-color-placeholder: #999 !default;
+
+//** Default `.form-control` height
+$input-height-base: ($line-height-computed + ($padding-base-vertical * 2) + 2) !default;
+//** Large `.form-control` height
+$input-height-large: (ceil($font-size-large * $line-height-large) + ($padding-large-vertical * 2) + 2) !default;
+//** Small `.form-control` height
+$input-height-small: (floor($font-size-small * $line-height-small) + ($padding-small-vertical * 2) + 2) !default;
+
+//** `.form-group` margin
+$form-group-margin-bottom: 15px !default;
+
+$legend-color: $gray-dark !default;
+$legend-border-color: #e5e5e5 !default;
+
+//** Background color for textual input addons
+$input-group-addon-bg: $gray-lighter !default;
+//** Border color for textual input addons
+$input-group-addon-border-color: $input-border !default;
+
+//** Disabled cursor for form controls and buttons.
+$cursor-disabled: not-allowed !default;
+
+
+//== Dropdowns
+//
+//## Dropdown menu container and contents.
+
+//** Background for the dropdown menu.
+$dropdown-bg: #fff !default;
+//** Dropdown menu `border-color`.
+$dropdown-border: rgba(0,0,0,.15) !default;
+//** Dropdown menu `border-color` **for IE8**.
+$dropdown-fallback-border: #ccc !default;
+//** Divider color for between dropdown items.
+$dropdown-divider-bg: #e5e5e5 !default;
+
+//** Dropdown link text color.
+$dropdown-link-color: $gray-dark !default;
+//** Hover color for dropdown links.
+$dropdown-link-hover-color: darken($gray-dark, 5%) !default;
+//** Hover background for dropdown links.
+$dropdown-link-hover-bg: #f5f5f5 !default;
+
+//** Active dropdown menu item text color.
+$dropdown-link-active-color: $component-active-color !default;
+//** Active dropdown menu item background color.
+$dropdown-link-active-bg: $component-active-bg !default;
+
+//** Disabled dropdown menu item background color.
+$dropdown-link-disabled-color: $gray-light !default;
+
+//** Text color for headers within dropdown menus.
+$dropdown-header-color: $gray-light !default;
+
+//** Deprecated `$dropdown-caret-color` as of v3.1.0
+$dropdown-caret-color: #000 !default;
+
+
+//-- Z-index master list
+//
+// Warning: Avoid customizing these values. They're used for a bird's eye view
+// of components dependent on the z-axis and are designed to all work together.
+//
+// Note: These variables are not generated into the Customizer.
+
+$zindex-navbar: 1000 !default;
+$zindex-dropdown: 1000 !default;
+$zindex-popover: 1060 !default;
+$zindex-tooltip: 1070 !default;
+$zindex-navbar-fixed: 1030 !default;
+$zindex-modal-background: 1040 !default;
+$zindex-modal: 1050 !default;
+
+
+//== Media queries breakpoints
+//
+//## Define the breakpoints at which your layout will change, adapting to different screen sizes.
+
+// Extra small screen / phone
+//** Deprecated `$screen-xs` as of v3.0.1
+$screen-xs: 480px !default;
+//** Deprecated `$screen-xs-min` as of v3.2.0
+$screen-xs-min: $screen-xs !default;
+//** Deprecated `$screen-phone` as of v3.0.1
+$screen-phone: $screen-xs-min !default;
+
+// Small screen / tablet
+//** Deprecated `$screen-sm` as of v3.0.1
+$screen-sm: 768px !default;
+$screen-sm-min: $screen-sm !default;
+//** Deprecated `$screen-tablet` as of v3.0.1
+$screen-tablet: $screen-sm-min !default;
+
+// Medium screen / desktop
+//** Deprecated `$screen-md` as of v3.0.1
+$screen-md: 992px !default;
+$screen-md-min: $screen-md !default;
+//** Deprecated `$screen-desktop` as of v3.0.1
+$screen-desktop: $screen-md-min !default;
+
+// Large screen / wide desktop
+//** Deprecated `$screen-lg` as of v3.0.1
+$screen-lg: 1200px !default;
+$screen-lg-min: $screen-lg !default;
+//** Deprecated `$screen-lg-desktop` as of v3.0.1
+$screen-lg-desktop: $screen-lg-min !default;
+
+// So media queries don't overlap when required, provide a maximum
+$screen-xs-max: ($screen-sm-min - 1) !default;
+$screen-sm-max: ($screen-md-min - 1) !default;
+$screen-md-max: ($screen-lg-min - 1) !default;
+
+
+//== Grid system
+//
+//## Define your custom responsive grid.
+
+//** Number of columns in the grid.
+$grid-columns: 12 !default;
+//** Padding between columns. Gets divided in half for the left and right.
+$grid-gutter-width: 30px !default;
+// Navbar collapse
+//** Point at which the navbar becomes uncollapsed.
+$grid-float-breakpoint: $screen-sm-min !default;
+//** Point at which the navbar begins collapsing.
+$grid-float-breakpoint-max: ($grid-float-breakpoint - 1) !default;
+
+
+//== Container sizes
+//
+//## Define the maximum width of `.container` for different screen sizes.
+
+// Small screen / tablet
+$container-tablet: (720px + $grid-gutter-width) !default;
+//** For `$screen-sm-min` and up.
+$container-sm: $container-tablet !default;
+
+// Medium screen / desktop
+$container-desktop: (940px + $grid-gutter-width) !default;
+//** For `$screen-md-min` and up.
+$container-md: $container-desktop !default;
+
+// Large screen / wide desktop
+$container-large-desktop: (1140px + $grid-gutter-width) !default;
+//** For `$screen-lg-min` and up.
+$container-lg: $container-large-desktop !default;
+
+
+//== Navbar
+//
+//##
+
+// Basics of a navbar
+$navbar-height: 50px !default;
+$navbar-margin-bottom: $line-height-computed !default;
+$navbar-border-radius: $border-radius-base !default;
+$navbar-padding-horizontal: floor(($grid-gutter-width / 2)) !default;
+$navbar-padding-vertical: (($navbar-height - $line-height-computed) / 2) !default;
+$navbar-collapse-max-height: 340px !default;
+
+$navbar-default-color: #777 !default;
+$navbar-default-bg: #f8f8f8 !default;
+$navbar-default-border: darken($navbar-default-bg, 6.5%) !default;
+
+// Navbar links
+$navbar-default-link-color: #777 !default;
+$navbar-default-link-hover-color: #333 !default;
+$navbar-default-link-hover-bg: transparent !default;
+$navbar-default-link-active-color: #555 !default;
+$navbar-default-link-active-bg: darken($navbar-default-bg, 6.5%) !default;
+$navbar-default-link-disabled-color: #ccc !default;
+$navbar-default-link-disabled-bg: transparent !default;
+
+// Navbar brand label
+$navbar-default-brand-color: $navbar-default-link-color !default;
+$navbar-default-brand-hover-color: darken($navbar-default-brand-color, 10%) !default;
+$navbar-default-brand-hover-bg: transparent !default;
+
+// Navbar toggle
+$navbar-default-toggle-hover-bg: #ddd !default;
+$navbar-default-toggle-icon-bar-bg: #888 !default;
+$navbar-default-toggle-border-color: #ddd !default;
+
+
+//=== Inverted navbar
+// Reset inverted navbar basics
+$navbar-inverse-color: lighten($gray-light, 15%) !default;
+$navbar-inverse-bg: #222 !default;
+$navbar-inverse-border: darken($navbar-inverse-bg, 10%) !default;
+
+// Inverted navbar links
+$navbar-inverse-link-color: lighten($gray-light, 15%) !default;
+$navbar-inverse-link-hover-color: #fff !default;
+$navbar-inverse-link-hover-bg: transparent !default;
+$navbar-inverse-link-active-color: $navbar-inverse-link-hover-color !default;
+$navbar-inverse-link-active-bg: darken($navbar-inverse-bg, 10%) !default;
+$navbar-inverse-link-disabled-color: #444 !default;
+$navbar-inverse-link-disabled-bg: transparent !default;
+
+// Inverted navbar brand label
+$navbar-inverse-brand-color: $navbar-inverse-link-color !default;
+$navbar-inverse-brand-hover-color: #fff !default;
+$navbar-inverse-brand-hover-bg: transparent !default;
+
+// Inverted navbar toggle
+$navbar-inverse-toggle-hover-bg: #333 !default;
+$navbar-inverse-toggle-icon-bar-bg: #fff !default;
+$navbar-inverse-toggle-border-color: #333 !default;
+
+
+//== Navs
+//
+//##
+
+//=== Shared nav styles
+$nav-link-padding: 10px 15px !default;
+$nav-link-hover-bg: $gray-lighter !default;
+
+$nav-disabled-link-color: $gray-light !default;
+$nav-disabled-link-hover-color: $gray-light !default;
+
+//== Tabs
+$nav-tabs-border-color: #ddd !default;
+
+$nav-tabs-link-hover-border-color: $gray-lighter !default;
+
+$nav-tabs-active-link-hover-bg: $body-bg !default;
+$nav-tabs-active-link-hover-color: $gray !default;
+$nav-tabs-active-link-hover-border-color: #ddd !default;
+
+$nav-tabs-justified-link-border-color: #ddd !default;
+$nav-tabs-justified-active-link-border-color: $body-bg !default;
+
+//== Pills
+$nav-pills-border-radius: $border-radius-base !default;
+$nav-pills-active-link-hover-bg: $component-active-bg !default;
+$nav-pills-active-link-hover-color: $component-active-color !default;
+
+
+//== Pagination
+//
+//##
+
+$pagination-color: $link-color !default;
+$pagination-bg: #fff !default;
+$pagination-border: #ddd !default;
+
+$pagination-hover-color: $link-hover-color !default;
+$pagination-hover-bg: $gray-lighter !default;
+$pagination-hover-border: #ddd !default;
+
+$pagination-active-color: #fff !default;
+$pagination-active-bg: $brand-primary !default;
+$pagination-active-border: $brand-primary !default;
+
+$pagination-disabled-color: $gray-light !default;
+$pagination-disabled-bg: #fff !default;
+$pagination-disabled-border: #ddd !default;
+
+
+//== Pager
+//
+//##
+
+$pager-bg: $pagination-bg !default;
+$pager-border: $pagination-border !default;
+$pager-border-radius: 15px !default;
+
+$pager-hover-bg: $pagination-hover-bg !default;
+
+$pager-active-bg: $pagination-active-bg !default;
+$pager-active-color: $pagination-active-color !default;
+
+$pager-disabled-color: $pagination-disabled-color !default;
+
+
+//== Jumbotron
+//
+//##
+
+$jumbotron-padding: 30px !default;
+$jumbotron-color: inherit !default;
+$jumbotron-bg: $gray-lighter !default;
+$jumbotron-heading-color: inherit !default;
+$jumbotron-font-size: ceil(($font-size-base * 1.5)) !default;
+$jumbotron-heading-font-size: ceil(($font-size-base * 4.5)) !default;
+
+
+//== Form states and alerts
+//
+//## Define colors for form feedback states and, by default, alerts.
+
+$state-success-text: #3c763d !default;
+$state-success-bg: #dff0d8 !default;
+$state-success-border: darken(adjust-hue($state-success-bg, -10), 5%) !default;
+
+$state-info-text: #31708f !default;
+$state-info-bg: #d9edf7 !default;
+$state-info-border: darken(adjust-hue($state-info-bg, -10), 7%) !default;
+
+$state-warning-text: #8a6d3b !default;
+$state-warning-bg: #fcf8e3 !default;
+$state-warning-border: darken(adjust-hue($state-warning-bg, -10), 5%) !default;
+
+$state-danger-text: #a94442 !default;
+$state-danger-bg: #f2dede !default;
+$state-danger-border: darken(adjust-hue($state-danger-bg, -10), 5%) !default;
+
+
+//== Tooltips
+//
+//##
+
+//** Tooltip max width
+$tooltip-max-width: 200px !default;
+//** Tooltip text color
+$tooltip-color: #fff !default;
+//** Tooltip background color
+$tooltip-bg: #000 !default;
+$tooltip-opacity: .9 !default;
+
+//** Tooltip arrow width
+$tooltip-arrow-width: 5px !default;
+//** Tooltip arrow color
+$tooltip-arrow-color: $tooltip-bg !default;
+
+
+//== Popovers
+//
+//##
+
+//** Popover body background color
+$popover-bg: #fff !default;
+//** Popover maximum width
+$popover-max-width: 276px !default;
+//** Popover border color
+$popover-border-color: rgba(0,0,0,.2) !default;
+//** Popover fallback border color
+$popover-fallback-border-color: #ccc !default;
+
+//** Popover title background color
+$popover-title-bg: darken($popover-bg, 3%) !default;
+
+//** Popover arrow width
+$popover-arrow-width: 10px !default;
+//** Popover arrow color
+$popover-arrow-color: $popover-bg !default;
+
+//** Popover outer arrow width
+$popover-arrow-outer-width: ($popover-arrow-width + 1) !default;
+//** Popover outer arrow color
+$popover-arrow-outer-color: fade_in($popover-border-color, 0.05) !default;
+//** Popover outer arrow fallback color
+$popover-arrow-outer-fallback-color: darken($popover-fallback-border-color, 20%) !default;
+
+
+//== Labels
+//
+//##
+
+//** Default label background color
+$label-default-bg: $gray-light !default;
+//** Primary label background color
+$label-primary-bg: $brand-primary !default;
+//** Success label background color
+$label-success-bg: $brand-success !default;
+//** Info label background color
+$label-info-bg: $brand-info !default;
+//** Warning label background color
+$label-warning-bg: $brand-warning !default;
+//** Danger label background color
+$label-danger-bg: $brand-danger !default;
+
+//** Default label text color
+$label-color: #fff !default;
+//** Default text color of a linked label
+$label-link-hover-color: #fff !default;
+
+
+//== Modals
+//
+//##
+
+//** Padding applied to the modal body
+$modal-inner-padding: 15px !default;
+
+//** Padding applied to the modal title
+$modal-title-padding: 15px !default;
+//** Modal title line-height
+$modal-title-line-height: $line-height-base !default;
+
+//** Background color of modal content area
+$modal-content-bg: #fff !default;
+//** Modal content border color
+$modal-content-border-color: rgba(0,0,0,.2) !default;
+//** Modal content border color **for IE8**
+$modal-content-fallback-border-color: #999 !default;
+
+//** Modal backdrop background color
+$modal-backdrop-bg: #000 !default;
+//** Modal backdrop opacity
+$modal-backdrop-opacity: .5 !default;
+//** Modal header border color
+$modal-header-border-color: #e5e5e5 !default;
+//** Modal footer border color
+$modal-footer-border-color: $modal-header-border-color !default;
+
+$modal-lg: 900px !default;
+$modal-md: 600px !default;
+$modal-sm: 300px !default;
+
+
+//== Alerts
+//
+//## Define alert colors, border radius, and padding.
+
+$alert-padding: 15px !default;
+$alert-border-radius: $border-radius-base !default;
+$alert-link-font-weight: bold !default;
+
+$alert-success-bg: $state-success-bg !default;
+$alert-success-text: $state-success-text !default;
+$alert-success-border: $state-success-border !default;
+
+$alert-info-bg: $state-info-bg !default;
+$alert-info-text: $state-info-text !default;
+$alert-info-border: $state-info-border !default;
+
+$alert-warning-bg: $state-warning-bg !default;
+$alert-warning-text: $state-warning-text !default;
+$alert-warning-border: $state-warning-border !default;
+
+$alert-danger-bg: $state-danger-bg !default;
+$alert-danger-text: $state-danger-text !default;
+$alert-danger-border: $state-danger-border !default;
+
+
+//== Progress bars
+//
+//##
+
+//** Background color of the whole progress component
+$progress-bg: #f5f5f5 !default;
+//** Progress bar text color
+$progress-bar-color: #fff !default;
+//** Variable for setting rounded corners on progress bar.
+$progress-border-radius: $border-radius-base !default;
+
+//** Default progress bar color
+$progress-bar-bg: $brand-primary !default;
+//** Success progress bar color
+$progress-bar-success-bg: $brand-success !default;
+//** Warning progress bar color
+$progress-bar-warning-bg: $brand-warning !default;
+//** Danger progress bar color
+$progress-bar-danger-bg: $brand-danger !default;
+//** Info progress bar color
+$progress-bar-info-bg: $brand-info !default;
+
+
+//== List group
+//
+//##
+
+//** Background color on `.list-group-item`
+$list-group-bg: #fff !default;
+//** `.list-group-item` border color
+$list-group-border: #ddd !default;
+//** List group border radius
+$list-group-border-radius: $border-radius-base !default;
+
+//** Background color of single list items on hover
+$list-group-hover-bg: #f5f5f5 !default;
+//** Text color of active list items
+$list-group-active-color: $component-active-color !default;
+//** Background color of active list items
+$list-group-active-bg: $component-active-bg !default;
+//** Border color of active list elements
+$list-group-active-border: $list-group-active-bg !default;
+//** Text color for content within active list items
+$list-group-active-text-color: lighten($list-group-active-bg, 40%) !default;
+
+//** Text color of disabled list items
+$list-group-disabled-color: $gray-light !default;
+//** Background color of disabled list items
+$list-group-disabled-bg: $gray-lighter !default;
+//** Text color for content within disabled list items
+$list-group-disabled-text-color: $list-group-disabled-color !default;
+
+$list-group-link-color: #555 !default;
+$list-group-link-hover-color: $list-group-link-color !default;
+$list-group-link-heading-color: #333 !default;
+
+
+//== Panels
+//
+//##
+
+$panel-bg: #fff !default;
+$panel-body-padding: 15px !default;
+$panel-heading-padding: 10px 15px !default;
+$panel-footer-padding: $panel-heading-padding !default;
+$panel-border-radius: $border-radius-base !default;
+
+//** Border color for elements within panels
+$panel-inner-border: #ddd !default;
+$panel-footer-bg: #f5f5f5 !default;
+
+$panel-default-text: $gray-dark !default;
+$panel-default-border: #ddd !default;
+$panel-default-heading-bg: #f5f5f5 !default;
+
+$panel-primary-text: #fff !default;
+$panel-primary-border: $brand-primary !default;
+$panel-primary-heading-bg: $brand-primary !default;
+
+$panel-success-text: $state-success-text !default;
+$panel-success-border: $state-success-border !default;
+$panel-success-heading-bg: $state-success-bg !default;
+
+$panel-info-text: $state-info-text !default;
+$panel-info-border: $state-info-border !default;
+$panel-info-heading-bg: $state-info-bg !default;
+
+$panel-warning-text: $state-warning-text !default;
+$panel-warning-border: $state-warning-border !default;
+$panel-warning-heading-bg: $state-warning-bg !default;
+
+$panel-danger-text: $state-danger-text !default;
+$panel-danger-border: $state-danger-border !default;
+$panel-danger-heading-bg: $state-danger-bg !default;
+
+
+//== Thumbnails
+//
+//##
+
+//** Padding around the thumbnail image
+$thumbnail-padding: 4px !default;
+//** Thumbnail background color
+$thumbnail-bg: $body-bg !default;
+//** Thumbnail border color
+$thumbnail-border: #ddd !default;
+//** Thumbnail border radius
+$thumbnail-border-radius: $border-radius-base !default;
+
+//** Custom text color for thumbnail captions
+$thumbnail-caption-color: $text-color !default;
+//** Padding around the thumbnail caption
+$thumbnail-caption-padding: 9px !default;
+
+
+//== Wells
+//
+//##
+
+$well-bg: #f5f5f5 !default;
+$well-border: darken($well-bg, 7%) !default;
+
+
+//== Badges
+//
+//##
+
+$badge-color: #fff !default;
+//** Linked badge text color on hover
+$badge-link-hover-color: #fff !default;
+$badge-bg: $gray-light !default;
+
+//** Badge text color in active nav link
+$badge-active-color: $link-color !default;
+//** Badge background color in active nav link
+$badge-active-bg: #fff !default;
+
+$badge-font-weight: bold !default;
+$badge-line-height: 1 !default;
+$badge-border-radius: 10px !default;
+
+
+//== Breadcrumbs
+//
+//##
+
+$breadcrumb-padding-vertical: 8px !default;
+$breadcrumb-padding-horizontal: 15px !default;
+//** Breadcrumb background color
+$breadcrumb-bg: #f5f5f5 !default;
+//** Breadcrumb text color
+$breadcrumb-color: #ccc !default;
+//** Text color of current page in the breadcrumb
+$breadcrumb-active-color: $gray-light !default;
+//** Textual separator for between breadcrumb elements
+$breadcrumb-separator: "/" !default;
+
+
+//== Carousel
+//
+//##
+
+$carousel-text-shadow: 0 1px 2px rgba(0,0,0,.6) !default;
+
+$carousel-control-color: #fff !default;
+$carousel-control-width: 15% !default;
+$carousel-control-opacity: .5 !default;
+$carousel-control-font-size: 20px !default;
+
+$carousel-indicator-active-bg: #fff !default;
+$carousel-indicator-border-color: #fff !default;
+
+$carousel-caption-color: #fff !default;
+
+
+//== Close
+//
+//##
+
+$close-font-weight: bold !default;
+$close-color: #000 !default;
+$close-text-shadow: 0 1px 0 #fff !default;
+
+
+//== Code
+//
+//##
+
+$code-color: #c7254e !default;
+$code-bg: #f9f2f4 !default;
+
+$kbd-color: #fff !default;
+$kbd-bg: #333 !default;
+
+$pre-bg: #f5f5f5 !default;
+$pre-color: $gray-dark !default;
+$pre-border-color: #ccc !default;
+$pre-scrollable-max-height: 340px !default;
+
+
+//== Type
+//
+//##
+
+//** Horizontal offset for forms and lists.
+$component-offset-horizontal: 180px !default;
+//** Text muted color
+$text-muted: $gray-light !default;
+//** Abbreviations and acronyms border color
+$abbr-border-color: $gray-light !default;
+//** Headings small color
+$headings-small-color: $gray-light !default;
+//** Blockquote small color
+$blockquote-small-color: $gray-light !default;
+//** Blockquote font size
+$blockquote-font-size: ($font-size-base * 1.25) !default;
+//** Blockquote border color
+$blockquote-border-color: $gray-lighter !default;
+//** Page header border color
+$page-header-border-color: $gray-lighter !default;
+//** Width of horizontal description list titles
+$dl-horizontal-offset: $component-offset-horizontal !default;
+//** Point at which .dl-horizontal becomes horizontal
+$dl-horizontal-breakpoint: $grid-float-breakpoint !default;
+//** Horizontal line color.
+$hr-border: $gray-lighter !default;
diff --git a/templates/assets/sass/material-kit/_welljumbo.scss b/templates/assets/sass/material-kit/_welljumbo.scss
new file mode 100755
index 0000000..a28ff06
--- /dev/null
+++ b/templates/assets/sass/material-kit/_welljumbo.scss
@@ -0,0 +1,28 @@
+// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
+
+body {
+ .container,
+ .container-fluid {
+
+ .well.well-sm {
+ padding: 10px;
+ }
+ .well.well-lg {
+ padding: 26px;
+ }
+ .well,
+ .jumbotron {
+
+ background-color: #fff;
+ padding: 19px;
+ margin-bottom: 20px;
+ @include shadow-z-2();
+ border-radius: $border-radius-base;
+ border: 0;
+ p {
+ font-weight: 300;
+ }
+ @include variations(unquote(""), unquote(""), background-color, $white);
+ }
+ }
+}
diff --git a/templates/assets/sass/material-kit/plugins/_plugin-datepicker.scss b/templates/assets/sass/material-kit/plugins/_plugin-datepicker.scss
new file mode 100644
index 0000000..75178e6
--- /dev/null
+++ b/templates/assets/sass/material-kit/plugins/_plugin-datepicker.scss
@@ -0,0 +1,220 @@
+/*!
+ * Datepicker for Bootstrap
+ *
+ * Copyright 2012 Stefan Petre
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+/*
+ *
+ * SCSS by Creative Tim
+ * http://www.creative-tim.com
+ *
+ */
+
+.datepicker {
+ top: 0;
+ left: 0;
+ padding: 4px;
+ margin-top: 1px;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+
+ > div {
+ display: none;
+ }
+
+ table {
+ width: 100%;
+ margin: 0;
+ }
+
+ td,
+ th {
+ text-align: center;
+ width: 20px;
+ height: 20px;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ }
+
+ td{
+ text-align: center;
+ p{
+ font-size: $font-size-h6;
+ font-weight: $font-weight-default;
+ border-radius: 50%;
+ height: 29px;
+ line-height: 29px;
+ margin: 3px 0 8px;
+ width: 29px;
+ }
+ :hover{
+ cursor: pointer;
+ }
+ }
+
+ th{
+ font-weight: $font-weight-bold;
+
+ &.switch-datepicker{
+ font-size: $font-size-h6;
+ }
+ }
+
+ .prev p,
+ .next p{
+ font-size: $font-size-h3;
+ }
+
+ p:hover{
+ background: #eeeeee;
+ }
+
+ .day.disabled {
+ color: #eeeeee;
+ }
+
+ td.old,
+ td.new {
+ color: #999999;
+ border-top: 0;
+ }
+
+ td.active p,
+ td.active:hover p{
+ @include shadow-4dp();
+ color: #ffffff;
+ background-color: $brand-primary;
+ }
+
+ td.primary p,
+ td.primary:hover p{
+ background-color: $brand-primary;
+ }
+ td.info p,
+ td.info:hover p{
+ background-color: $brand-info;
+ }
+ td.success p,
+ td.success:hover p{
+ background-color: $brand-success;
+ }
+ td.warning p,
+ td.warning:hover p{
+ background-color: $brand-warning;
+ }
+ td.danger p,
+ td.danger:hover p{
+ background-color: $brand-danger;
+ }
+
+ span {
+ display: block;
+ width: 55px;
+ height: 54px;
+ line-height: 54px;
+ float: left;
+ margin: 2px;
+ cursor: pointer;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+
+ &.old {
+ color: #999999;
+ }
+ }
+ span{
+ &.active{
+ &,
+ &:focus,
+ &:hover,
+ &:active{
+ background-color: $brand-primary;
+ @include shadow-4dp();
+ }
+ }
+
+ &.active{
+ color: $white-color;
+ }
+ }
+
+ span:hover {
+ background-color: #EEEEEE;
+ }
+ span.primary,
+ span.primary:hover{
+ background-color: $brand-primary;
+ }
+ span.info,
+ span.info:hover{
+ background-color: $brand-info;
+ }
+ span.success,
+ span.success:hover{
+ background-color: $brand-success;
+ }
+ span.warning,
+ span.warning:hover{
+ background-color: $brand-warning;
+ }
+ span.danger,
+ span.danger:hover{
+ background-color: $brand-danger;
+ }
+ th.switch-datepicker {
+ width: 145px;
+ }
+ th.next,
+ th.prev {
+ font-size: 21px;
+ }
+ thead tr:first-child th {
+ cursor: pointer;
+ }
+ thead tr:first-child th:hover {
+ background: #eeeeee;
+ }
+
+ &.dropdown-menu{
+ border-radius: $border-radius-base;
+ @include shadow-big();
+ @include transition($fast-transition-time, $transition-linear);
+ margin-top: -20px;
+ opacity: 0;
+ visibility: hidden;
+ }
+
+ &.dropdown-menu.open{
+ opacity: 1;
+ visibility: visible;
+ margin-top: 1px;
+ }
+
+ .table-condensed > tbody > tr > td{
+ padding: 2px;
+ }
+
+ .table-condensed > thead > tr > th{
+ padding: 0;
+ }
+}
+
+.input-append.date .add-on i,
+.input-prepend.date .add-on i {
+ display: block;
+ cursor: pointer;
+ width: 16px;
+ height: 16px;
+}
+
+.datepicker-months thead{
+ padding: 0 0 3px;
+ display: block;
+}
diff --git a/templates/assets/sass/material-kit/plugins/_plugin-dropdownjs.scss b/templates/assets/sass/material-kit/plugins/_plugin-dropdownjs.scss
new file mode 100755
index 0000000..b157472
--- /dev/null
+++ b/templates/assets/sass/material-kit/plugins/_plugin-dropdownjs.scss
@@ -0,0 +1,17 @@
+// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
+
+.dropdownjs::after {
+ right: 5px;
+ top: 3px;
+ font-size: 25px;
+ position: absolute;
+
+ // bring in the material icon font and icon by code
+ font-family: 'Material Icons';
+ font-style: normal;
+ font-weight: 400;
+ content: "\e5c5"; // found here: https://github.com/google/material-design-icons/search?utf8=%E2%9C%93&q=arrow_drop_down
+
+ pointer-events: none;
+ color: #757575;
+}
diff --git a/templates/assets/sass/material-kit/plugins/_plugin-nouislider.scss b/templates/assets/sass/material-kit/plugins/_plugin-nouislider.scss
new file mode 100755
index 0000000..49204fa
--- /dev/null
+++ b/templates/assets/sass/material-kit/plugins/_plugin-nouislider.scss
@@ -0,0 +1,161 @@
+// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
+
+.noUi-target,
+.noUi-target * {
+ -webkit-touch-callout: none;
+ -ms-touch-action: none;
+ user-select: none;
+ box-sizing: border-box;
+}
+.noUi-base {
+ width: 100%;
+ height: 100%;
+ position: relative;
+}
+.noUi-origin {
+ position: absolute;
+ right: 0;
+ top: 0;
+ left: 0;
+ bottom: 0;
+}
+.noUi-handle {
+ position: relative;
+ z-index: 1;
+ box-sizing: border-box;
+}
+.noUi-stacking .noUi-handle {
+ z-index: 10;
+}
+//.noUi-stacking + .noUi-origin {
+// *z-index: -1;
+//} WARNING: Property with star prefix found. Checks for the star property hack (targets IE6/7) (star-property-hack) Browsers: All
+.noUi-state-tap .noUi-origin {
+ transition: left 0.3s, top 0.3s;
+}
+.noUi-state-drag * {
+ cursor: inherit !important;
+}
+.noUi-horizontal {
+ height: 10px;
+}
+.noUi-handle {
+ box-sizing: border-box;
+ width: 14px;
+ height: 14px;
+ left: -10px;
+ top: -6px;
+ cursor: pointer;
+ border-radius: 100%;
+ transition: all 0.2s ease-out;
+ border: 1px solid;
+ background: $white-color;
+
+ @include shadow-2dp();
+}
+.noUi-vertical .noUi-handle {
+ margin-left: 5px;
+ cursor: ns-resize;
+}
+.noUi-horizontal.noUi-extended {
+ padding: 0 15px;
+}
+.noUi-horizontal.noUi-extended .noUi-origin {
+ right: -15px;
+}
+.noUi-background {
+ height: 2px;
+ margin: 20px 0;
+}
+.noUi-origin {
+ margin: 0;
+ border-radius: 0;
+ height: 2px;
+ background: #c8c8c8;
+ &[style^="left: 0"] .noUi-handle {
+ background-color: #fff;
+ border: 2px solid #c8c8c8;
+ &.noUi-active {
+ border-width: 1px;
+ }
+ }
+}
+.noUi-target {
+ border-radius: $border-radius-base;
+}
+.noUi-horizontal {
+ height: 2px;
+ margin: 15px 0;
+}
+.noUi-vertical {
+ height: 100%;
+ width: 2px;
+ margin: 0 15px;
+ display: inline-block;
+}
+.noUi-handle.noUi-active {
+ transform: scale3d(2, 2, 1);
+}
+[disabled].noUi-slider{
+ opacity: 0.5;
+}
+[disabled] .noUi-handle {
+ cursor: not-allowed;
+}
+
+.slider {
+ background: #c8c8c8;
+}
+
+.slider {
+
+ &.noUi-connect{
+ background-color: $brand-primary;
+ }
+
+ .noUi-handle{
+ border-color: $brand-primary;
+ }
+
+ &.slider-info{
+ & .noUi-connect,
+ &.noUi-connect{
+ background-color: $brand-info;
+ }
+
+ .noUi-handle{
+ border-color: $brand-info;
+ }
+ }
+ &.slider-success{
+ & .noUi-connect,
+ &.noUi-connect{
+ background-color: $brand-success;
+ }
+
+ .noUi-handle{
+ border-color: $brand-success;
+ }
+ }
+ &.slider-warning{
+ & .noUi-connect,
+ &.noUi-connect{
+ background-color: $brand-warning;
+ }
+
+ .noUi-handle{
+ border-color: $brand-warning;
+ }
+ }
+ &.slider-danger{
+ & .noUi-connect,
+ &.noUi-connect{
+ background-color: $brand-danger;
+ }
+
+ .noUi-handle{
+ border-color: $brand-danger;
+ }
+ }
+
+}
diff --git a/templates/assets/sass/material-kit/plugins/_plugin-selectize.scss b/templates/assets/sass/material-kit/plugins/_plugin-selectize.scss
new file mode 100755
index 0000000..bff381e
--- /dev/null
+++ b/templates/assets/sass/material-kit/plugins/_plugin-selectize.scss
@@ -0,0 +1,93 @@
+// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
+
+// Support for Selectize plugin
+// http://brianreavis.github.io/selectize.js/
+
+.selectize-control.single, .selectize-control.multi {
+ padding: 0;
+ .selectize-input, .selectize-input.input-active {
+
+ cursor: text;
+ background: transparent;
+ box-shadow: none;
+ border: 0;
+ padding: 0;
+ height: 100%;
+ font-size: 14px;
+ line-height: 30px;
+ .has-items {
+ padding: 0;
+ }
+ &:after {
+ right: 5px;
+ position: absolute;
+ font-size: 25px;
+ content: "\e5c5";
+ font-family: 'Material Icons';
+ speak: none;
+ font-style: normal;
+ font-weight: normal;
+ font-variant: normal;
+ text-transform: none;
+ line-height: 1;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+ }
+ input {
+ font-size: 14px;
+ outline: 0;
+ border: 0;
+ background: transparent;
+ }
+ &.label-floating-fix input {
+ opacity: 0;
+ }
+ > div, > .item {
+ display: inline-block;
+ margin: 0 8px 3px 0;
+ padding: 0;
+ background: transparent;
+ border: 0;
+ &:after {
+ content: ",";
+ }
+ &:last-of-type:after {
+ content: "";
+ }
+ &.active {
+ font-weight: bold;
+ background: transparent;
+ border: 0;
+ }
+ }
+ }
+ .selectize-dropdown {
+ position: absolute;
+ z-index: 1000;
+ border: 0;
+ width: 100% !important;
+ left: 0 !important;
+ height: auto;
+ background-color: #FFF;
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
+ border-radius: $border-radius-base;
+ padding: 0;
+ margin-top: 3px;
+ .active {
+ background-color: inherit;
+ }
+ .highlight {
+ background-color: #d5d8ff;
+ }
+ .selected, .selected.active {
+ background-color: #EEEEEE;
+ }
+ [data-selectable], .optgroup-header {
+ padding: 10px 20px;
+ cursor: pointer;
+ }
+ }
+ .dropdown-active ~ .selectize-dropdown {
+ display: block;
+ }
+}
diff --git a/templates/assets/sass/material-kit/plugins/_plugin-snackbarjs.scss b/templates/assets/sass/material-kit/plugins/_plugin-snackbarjs.scss
new file mode 100755
index 0000000..e8f5bad
--- /dev/null
+++ b/templates/assets/sass/material-kit/plugins/_plugin-snackbarjs.scss
@@ -0,0 +1,34 @@
+// This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten.
+
+// Support for SnackbarJS plugin
+// https://github.com/FezVrasta/snackbarjs
+
+.snackbar {
+ // Style
+ background-color: #323232;
+ color: $mdb-text-color-light;
+ font-size: 14px;
+ border-radius: $border-radius-base;
+ @include shadow-z-1;
+
+ // Animation
+ height: 0;
+ transition: transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0s linear 0.2s, padding 0s linear 0.2s, height 0s linear 0.2s;
+ transform: translateY(200%);
+}
+
+.snackbar.snackbar-opened {
+ // Style
+ padding: 14px 15px;
+ margin-bottom: 20px;
+
+ // Animation
+ height: auto;
+ transition: transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0s linear 0.2s, height 0s linear 0.2s;
+ transform: none;
+}
+
+// Variations
+.snackbar.toast {
+ border-radius: 200px;
+}
diff --git a/templates/assets/tether/.bower.json b/templates/assets/tether/.bower.json
new file mode 100644
index 0000000..42bcd65
--- /dev/null
+++ b/templates/assets/tether/.bower.json
@@ -0,0 +1,35 @@
+{
+ "name": "tether",
+ "version": "1.4.0",
+ "homepage": "http://github.hubspot.com/tether",
+ "authors": [
+ "Zack Bloom <zackbloom@gmail.com>",
+ "Adam Schwartz <adam.flynn.schwartz@gmail.com>"
+ ],
+ "maintainers": [
+ "Nicholas Hwang <nick.joosung.hwang@gmail.com>",
+ "Trevor Burnham <trevorburnham@gmail.com>"
+ ],
+ "description": "A client-side library to make absolutely positioned elements attach to elements in the page efficiently.",
+ "keywords": [
+ "javascript"
+ ],
+ "license": "MIT",
+ "main": "dist/js/tether.js",
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests"
+ ],
+ "_release": "1.4.0",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.4.0",
+ "commit": "3d7119e590661f8c9e9e566c8a7640c189687215"
+ },
+ "_source": "https://github.com/HubSpot/tether.git",
+ "_target": "^1.2",
+ "_originalSource": "tether"
+} \ No newline at end of file
diff --git a/templates/assets/tether/CHANGELOG.md b/templates/assets/tether/CHANGELOG.md
new file mode 100644
index 0000000..d5a8047
--- /dev/null
+++ b/templates/assets/tether/CHANGELOG.md
@@ -0,0 +1,13 @@
+## v1.3.0
+- Tether instances now fire an 'update' event when attachments change due to constraints (#119)
+
+## v1.0.1
+- Update arrow mixin to change arrow pointer event
+
+
+## v1.0.0
+- Coffeescript -> ES6
+- Proper UMD Wrapper
+- Update build steps
+- Add changelog
+- Provide minified CSS
diff --git a/templates/assets/tether/CONTRIBUTING.md b/templates/assets/tether/CONTRIBUTING.md
new file mode 100644
index 0000000..8e4b9c5
--- /dev/null
+++ b/templates/assets/tether/CONTRIBUTING.md
@@ -0,0 +1,59 @@
+# Contributing Guide
+
+You will need:
+
+- Node.js/io.js & npm
+- Bower
+- Gulp
+
+
+## Getting started
+
+1. Fork the project
+2. Clone your forked project by running `git clone git@github.com:{
+ YOUR_USERNAME }/tether.git`
+3. Run `npm install` to install both node modules and bower components
+4. Test that you can build the source by moving/renaming the existing `dist`
+ directory and running `npm run build`
+5. Assuming everything went well, you should now have a `dist` directory that
+ matches the one you moved in step 4
+
+
+## Writing code!
+
+We use `gulp` to facilitate things like transpilation, minification, etc. so
+can you focus on writing relevant code. If there is a fix or feature you would like
+to contribute, we ask that you take the following steps:
+
+1. Most of the _editable_ code lives in the `src` directory while built code
+ will end up in the `dist` directory upon running `npm run build`.
+
+2. Depending on how big your changes are, bump the version numbers appropriately
+ in `bower.json` and `package.json`. We try to follow semver, so a good rule
+ of thumb for how to bump the version is:
+ - A fix to existing code, perform a patch bump e.g. x.x.0 -> x.x.1
+ - New feature, perform a minor bump e.g. x.0.x -> x.1.x
+ - Breaking changes such a rewrite, perform a major bump e.g.
+ 1.x.x -> 2.x.x
+
+ Versioning is hard, so just use good judgement and we'll be more than happy
+ to help out.
+
+ __NOTE__: There is a `gulp` task that will automate some of the versioning.
+ You can run `gulp version:{type}` where type is `patch|minor|major` to
+ update both `bower.json` and `package.json` as well as add the appropriate
+ git tag.
+
+3. Provide a thoughtful commit message and push your changes to your fork using
+ `git push origin master` (assuming your forked project is using `origin` for
+ the remote name and you are on the `master` branch).
+
+4. Open a Pull Request on GitHub with a description of your changes.
+
+
+## Testing
+
+Work in progress. We are hoping to add some tests, so if you would like to help
+us get started, feel free to contact us through the Issues or open a Pull
+Request.
+
diff --git a/templates/assets/tether/LICENSE b/templates/assets/tether/LICENSE
new file mode 100644
index 0000000..0e08c0a
--- /dev/null
+++ b/templates/assets/tether/LICENSE
@@ -0,0 +1,8 @@
+Copyright (c) 2014-2016 HubSpot, Inc.
+
+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/templates/assets/tether/README.md b/templates/assets/tether/README.md
new file mode 100644
index 0000000..e7db893
--- /dev/null
+++ b/templates/assets/tether/README.md
@@ -0,0 +1,106 @@
+## Tether
+
+[![GitHub
+version](https://badge.fury.io/gh/HubSpot%2Ftether.svg)](http://badge.fury.io/gh/HubSpot%2Ftether)
+
+[Tether](http://github.hubspot.com/tether/) is a small, focused JavaScript library for defining and managing the position of user interface (UI) elements in relation to one another on a web page. It is a tool for web developers building features that require certain UI elements to be precisely positioned based on the location of another UI element.
+
+There are often situations in UI development where elements need to be attached to other elements, but placing them right next to each other in the [DOM tree](https://en.wikipedia.org/wiki/Document_Object_Model) can be problematic based on the context. For example, what happens if the element we’re attaching other elements to is fixed to the center of the screen? Or what if the element is inside a scrollable container? How can we prevent the attached element from being clipped as it disappears from view while a user is scrolling? Tether can solve all of these problems and more.
+
+Some common UI elements that have been built with Tether are [tooltips](http://github.hubspot.com/tooltip/docs/welcome), [select menus](http://github.hubspot.com/select/docs/welcome), [dropdown menus](http://github.hubspot.com/drop/docs/welcome), and [guided tours](http://github.hubspot.com/shepherd/docs/welcome). Tether is flexible and can be used to [solve](http://github.hubspot.com/tether/examples/out-of-bounds/) [all](http://github.hubspot.com/tether/examples/content-visible) [kinds](http://github.hubspot.com/tether/examples/element-scroll) [of](http://github.hubspot.com/tether/examples/enable-disable) interesting [problems](http://github.hubspot.com/tether/examples/viewport); it ensures UI elements stay where they need to be, based on the various user interactions (click, scroll, etc) and layout contexts (fixed positioning, inside scrollable containers, etc).
+
+Please have a look at the [documentation](http://github.hubspot.com/tether/) for a more detailed explanation of why you might need Tether for your next project.
+
+## What to Use Tether for and When to Use It
+
+Tether is a small, focused JavaScript library. For those who might be new to JavaScript, a library is simply a JavaScript file (or files) that contain useful JavaScript code to help achieve tasks easier and faster. Since Tether is a JavaScript user interface (**UI**) library, it contains code to help you to manage the way your website or web app appears.
+
+Tether’s goal to is to help you position your elements side-by-side when needed.
+
+Let’s say you’ve started working on your dream project&mdash;a fancy web app that’s sure to become the next big thing! An important feature of your new app is to allow users to comment on shared photos. However, due to limited vertical space and the overall layout of your new app, you’d like to display the comments **next** to the image, similar to how Instagram does it.
+
+Your HTML code might look something like this:
+
+```html
+<div class="container">
+ <img src="awesome-picture.jpg" alt="Awesome Picture" class="picture">
+ <div class="comments">
+ ...
+ </div>
+</div>
+```
+
+Now, you could achieve this with some CSS using its `position` property, but going this route can be problematic since many of `position`’s values take elements **out** of the natural DOM flow. For example, if you have an element at the bottom of your HTML document, using `position: absolute` or `position: fixed` might could move it all the way to the top of your website in the browser.
+
+Not only that, but you also have to make manual adjustments to ensure **other** elements aren’t negatively affected by the positioned elements. Not to mention, you probably want your comment box to be **responsive**, and look good across different device sizes. Coding a solution for this manually is a challenge all on its own.
+
+**Enter Tether!**
+
+After installing Tether and including it in your project, you can begin using it!
+
+1. In your JavaScript file, create a new instance (or constructor function) of the `Tether` object:
+
+ ```javascript
+ new Tether({});
+ ```
+
+2. Within the curly braces (`{}`) you can configure the library’s options. Tether’s extensive list of options can be found in the [Tether documentation](http://github.hubspot.com/tether/).
+
+ ```javascript
+ new Tether({
+ element: '.comments',
+ target: '.picture',
+ attachment: 'top right'
+ targetAttachment: 'top left'
+ });
+ ```
+
+Now you have a perfectly placed comment section to go with your awesome picture! It’ll even stay attached to the element when a user resizes their browser window.
+
+There are tons of other useful features of Tether as well, instead of “comment boxes” you could also build:
+
+* Tooltips for useful hints and tricks,
+* Dropdown menus,
+* Autocomplete popups for forms,
+* and [more](http://github.hubspot.com/tether/examples/list_of_examples/)!
+
+## Install
+
+__npm__
+```sh
+$ npm install tether
+```
+
+__bower__
+```sh
+$ bower install tether
+```
+
+__download__
+
+Or just download from the [releases](https://github.com/HubSpot/tether/releases).
+
+## Usage
+You only need to include [tether.min.js](https://github.com/HubSpot/tether/blob/master/dist/js/tether.min.js) in your page:
+```
+<script src="path/to/dist/js/tether.min.js"></script>
+```
+Or just use a CDN:
+```
+<script src="//cdnjs.cloudflare.com/ajax/libs/tether/1.3.1/js/tether.min.js"></script>
+```
+
+The css files in the [dist/css](https://github.com/HubSpot/tether/tree/master/dist/css) folder are not required to get tether running.
+
+For more details jump straight in to the detailed [Usage](http://github.hubspot.com/tether/#usage) page.
+
+[![Tether Docs](http://i.imgur.com/YCx8cLr.png)](http://github.hubspot.com/tether/#usage)
+
+[Demo & API Documentation](http://github.hubspot.com/tether/)
+
+## Contributing
+
+We encourage contributions of all kinds. If you would like to contribute in some way, please review our [guidelines for contributing](CONTRIBUTING.md).
+
+## License
+Copyright &copy; 2014-2016 HubSpot - [MIT License](LICENSE)
diff --git a/templates/assets/tether/bower.json b/templates/assets/tether/bower.json
new file mode 100644
index 0000000..ea9b6b7
--- /dev/null
+++ b/templates/assets/tether/bower.json
@@ -0,0 +1,26 @@
+{
+ "name": "tether",
+ "version": "1.4.0",
+ "homepage": "http://github.hubspot.com/tether",
+ "authors": [
+ "Zack Bloom <zackbloom@gmail.com>",
+ "Adam Schwartz <adam.flynn.schwartz@gmail.com>"
+ ],
+ "maintainers": [
+ "Nicholas Hwang <nick.joosung.hwang@gmail.com>",
+ "Trevor Burnham <trevorburnham@gmail.com>"
+ ],
+ "description": "A client-side library to make absolutely positioned elements attach to elements in the page efficiently.",
+ "keywords": [
+ "javascript"
+ ],
+ "license": "MIT",
+ "main": "dist/js/tether.js",
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests"
+ ]
+}
diff --git a/templates/assets/tether/component.json b/templates/assets/tether/component.json
new file mode 100644
index 0000000..1e81c50
--- /dev/null
+++ b/templates/assets/tether/component.json
@@ -0,0 +1,22 @@
+{
+ "name": "tether",
+ "repo": "HubSpot/tether",
+ "version": "1.3.9",
+ "description": "A client-side library to make absolutely positioned elements attach to elements in the page efficiently.",
+ "authors": [
+ "Zack Bloom <zackbloom@gmail.com>",
+ "Adam Schwartz <adam.flynn.schwartz@gmail.com>"
+ ],
+ "maintainers": [
+ "Nicholas Hwang <nick.joosung.hwang@gmail.com>"
+ ],
+ "license": "MIT",
+ "demo": "http://github.hubspot.com/tether/docs/welcome/",
+ "main": "dist/js/tether.js",
+ "styles": [
+ "dist/css/tether.css"
+ ],
+ "scripts": [
+ "dist/js/tether.js"
+ ]
+}
diff --git a/templates/assets/tether/docs/1-Overview/1-why_you_should_use_tether.md b/templates/assets/tether/docs/1-Overview/1-why_you_should_use_tether.md
new file mode 100644
index 0000000..6147d25
--- /dev/null
+++ b/templates/assets/tether/docs/1-Overview/1-why_you_should_use_tether.md
@@ -0,0 +1,43 @@
+## Why You Should Use Tether
+
+Virtually every app includes some sort of overlay attached to an element on the page.
+Things like [tooltips](http://github.hubspot.com/tooltip/docs/welcome),
+[dropdowns](http://github.hubspot.com/select/docs/welcome), [hover-activated info boxes](http://github.hubspot.com/drop/docs/welcome), etc.
+
+Those elements need to be attached to something on the page. Actually placing them next to
+the element in the DOM causes problems though, if any parent element is anything
+but `overflow: visible`, the element gets cut off. So you need absolute positioning
+in the body.
+
+Some of the time absolute positioning is right, but what about if the thing we're
+attached to is fixed to the center of the screen? We'll have to move it every
+time the user scrolls. What about if the element is in a scrollable container,
+if the overlay is inside of it (so no clipping), it would be cool if the code
+were smart enough to move it inside when that area is scrolled. That way we
+need to reposition it even less.
+
+It would also be nice if the code could somehow figure out whether positioning it
+from the top, bottom, left, or right would result in the fewest repositionings
+as the user scrolls or resizes.
+
+Most of the time you're building these elements it would be nice for the element to
+flip to the other side of the element if it hits the edge of the screen, or a scrollable
+container it might be in. It would be nice if we could confine the element
+to within some area, or even hide it when it leaves.
+
+It would be nice for the element to be repositioned with CSS transforms
+rather than top and left when possible, to allow the positioning to be done entirely
+in the GPU.
+
+Now that the positioning is so fancy, you're going to use it for more and more
+elements. It would be cool if the library could optimize all of their repositioning
+into a single repaint.
+
+All of that is baked into Tether.
+
+### tl;dr
+
+- Optimized GPU-accelerated repositioning for 60fps scrolling
+- Reliable positioning on any possible corner, edge or point in between.
+- Support for repositioning or pinning the element when it would be offscreen
+- Designed to be embeddable in other libraries
diff --git a/templates/assets/tether/docs/1-Overview/2-repositioning.md b/templates/assets/tether/docs/1-Overview/2-repositioning.md
new file mode 100644
index 0000000..6c02483
--- /dev/null
+++ b/templates/assets/tether/docs/1-Overview/2-repositioning.md
@@ -0,0 +1,46 @@
+Repositioning
+-----
+
+Tethers will be automatically repositioned when the page is resized, and when any element containing the Tether is scrolled.
+If the element moves for some other reason (e.g. with JavaScript), Tether won't know to reposition the element.
+
+#### Manually Repositioning
+
+The simplest way to reposition every Tether on the page is to call `Tether.position()`. It will efficiently reposition every
+Tether in a single repaint, making it more efficient than manually repositioning many Tethers individually.
+
+```javascript
+Tether.position()
+```
+
+#### Repositioning a Single Tether
+
+If you have many Tethers on screen, it may be more efficient to just reposition the tether that needs it. You can do this
+by calling the `.position` method on the Tether instance:
+
+```javascript
+tether = new Tether({ ... })
+
+// Later:
+tether.position()
+```
+
+#### Tethering Hidden Elements
+
+If you are creating a tether involving elements which are `display: none`, or not actually in the DOM,
+your Tether may not be able to position itself properly. One way around this is to
+ensure that a position call happens after all layouts have finished:
+
+```javascript
+myElement.style.display = 'block'
+
+tether = new Tether({ ... })
+
+setTimeout(function(){
+ tether.position();
+})
+```
+
+In general however, you shouldn't have any trouble if both the element and the target are visible and in the DOM when you
+create the Tether. If that is not the case, create the Tether disabled (option `enabled`: `false`), and enable it when
+the elements are ready.
diff --git a/templates/assets/tether/docs/1-Overview/3-why_we_dont_support_IE_8.md b/templates/assets/tether/docs/1-Overview/3-why_we_dont_support_IE_8.md
new file mode 100644
index 0000000..841de9e
--- /dev/null
+++ b/templates/assets/tether/docs/1-Overview/3-why_we_dont_support_IE_8.md
@@ -0,0 +1,47 @@
+Why we don't support IE 8
+-------------------------
+
+We've been living in 2007 for a while now, pretending that new browser features don't
+exist because they aren't in IE8. You might not even know about some of these features,
+or think they are only enabled by jQuery or underscore, simply because it hasn't
+been an option to rely upon them.
+
+Here is the list of features you don't have if you choose to support IE 8:
+
+- HTML5 audio and video
+- SVG
+- Canvas
+- TrueType fonts
+- Media Queries
+- CSS Transforms
+- Multiple Backgrounds
+- CSS3 Units (vh, vw, rem)
+- Custom DOM events
+- Hardware accelerated graphics
+- The DOMContentLoaded event
+- addEventListener
+- Object.create, .seal, .freeze, .defineProperty
+- Array.isArray, .indexOf, .every, .some, .forEach, .map, .filter, .reduce
+- A modern JavaScript engine
+- A real developer tools
+- A consistent box model
+- jQuery 2
+- Google Apps
+- Tether
+
+It's true that IE 8 still holds a big chunk of the browsing population, but the reasons
+why they can't update are dwindling. There are two big reasons for continuing IE 8 support.
+
+#### Enterprises
+
+ Microsoft is dropping support for XP in April, organizations who want security updates will have to upgrade.
+
+#### China uses XP
+
+ Chrome, Firefox and Opera all support XP. Nothing prevents users from upgrading, except the inertia of
+ organizations who still support IE 8.
+
+#### The Future
+
+We are skating towards where the puck will be, and we hope that as you decide to drop IE 8 support,
+you choose to add Tether to the list of awesome things you can do.
diff --git a/templates/assets/tether/docs/2-Examples/1-list_of_examples.md b/templates/assets/tether/docs/2-Examples/1-list_of_examples.md
new file mode 100644
index 0000000..bbb7fd5
--- /dev/null
+++ b/templates/assets/tether/docs/2-Examples/1-list_of_examples.md
@@ -0,0 +1,27 @@
+### Examples
+
+It's our goal to create a wide variety of example of how Tether
+can be used. Here's what we have so far, please send a PR with
+any examples you might create.
+
+#### Beginner
+
+- [simple](../../examples/simple): A simple example to get you started
+- [out-of-bounds](../../examples/out-of-bounds): How to hide the element when it would
+otherwise be offscreen
+- [pin](../../examples/pin): How to pin the element so it never goes offscreen
+- [enable-disable](../../examples/enable-disable): How to enable and disable the Tether
+in JavaScript
+
+#### Advanced
+
+- [content-visible](../../examples/content-visible): Demonstrates using the `'visible'`
+`targetModifier` to align an element with the visible portion of another.
+- [dolls](../../examples/dolls): A performance test to show several dozen elements,
+each tethered to the previous. Try dragging the top left tether.
+- [element-scroll](../../examples/element-scroll): Demonstrates using the `'scroll-handle'`
+`targetModifier` to align an element with the scrollbar of an element.
+- [scroll](../../examples/scroll): Demonstrates using the `'scroll-handle'` `targetModifier`
+to align an element with the body's scroll handle.
+- [viewport](../../examples/viewport): Demonstrates aligning an element with the
+viewport by using the `'visible'` `targetModifier` when tethered to the body.
diff --git a/templates/assets/tether/docs/2-Examples/2-projects_using_tether.md b/templates/assets/tether/docs/2-Examples/2-projects_using_tether.md
new file mode 100644
index 0000000..b9086b2
--- /dev/null
+++ b/templates/assets/tether/docs/2-Examples/2-projects_using_tether.md
@@ -0,0 +1,37 @@
+## Projects Using Tether
+
+Here at HubSpot we have built a bunch of libraries on top of Tether,
+both because we wanted Tether-performance, and because we saw opportunities
+to improve on what was available in the client-side ecosystem.
+
+### [Select](http://github.hubspot.com/select/docs/welcome)
+
+Select is a replacement for native browser select elements that is fully stylable.
+
+### [Shepherd](http://github.hubspot.com/shepherd/docs/welcome)
+
+Shepherd is a library for making tours of your app to help onboard users and show off
+new features.
+
+### [Tooltip](http://github.hubspot.com/tooltip/docs/welcome)
+
+A simple, easy-to-use implementation of tooltips that works well.
+
+### [Drop](http://github.hubspot.com/drop/docs/welcome)
+
+Where Tether does general-purpose positioning, Drop assumes that you are interested
+in making something which pops up next to something the user clicks or hovers on.
+
+If you're building something that fits that pattern, Drop can make things a little easier.
+
+### [React Datepicker](https://github.com/Hacker0x01/react-datepicker)
+
+A simple and reusable datepicker component for React
+
+### [ember-tether](https://github.com/yapplabs/ember-tether)
+
+An Ember.js-friendly interface for tether.
+
+### Your Project Here
+
+If you have a cool open-source library built on Tether, PR this doc.
diff --git a/templates/assets/tether/docs/3-Advanced/1-embedding_tether.md b/templates/assets/tether/docs/3-Advanced/1-embedding_tether.md
new file mode 100644
index 0000000..f47be16
--- /dev/null
+++ b/templates/assets/tether/docs/3-Advanced/1-embedding_tether.md
@@ -0,0 +1,9 @@
+## Embedding Tether
+
+Tether is designed to be embeddable in other libraries.
+
+There is one thing you should think about doing to create an embedded Tether:
+
+- Set the `classPrefix` of the tethers you create. That prefix will replace `'tether'` in
+all of the classes. You can also disable classes you don't intend on using with the `classes`
+option.
diff --git a/templates/assets/tether/docs/3-Advanced/2-extending_tether.md b/templates/assets/tether/docs/3-Advanced/2-extending_tether.md
new file mode 100644
index 0000000..fa357b2
--- /dev/null
+++ b/templates/assets/tether/docs/3-Advanced/2-extending_tether.md
@@ -0,0 +1,54 @@
+Extending Tether
+-----
+
+Tether has a module system which can be used to modify Tether's positioning, or just do something each time the Tether is moved.
+
+Tether has an array called `Tether.modules`, push onto it to add a module:
+
+```coffeescript
+Tether.modules.push
+ position: ({top, left}) ->
+ top += 10
+
+ {top, left}
+```
+
+#### Position
+
+Your position function can either return a new object with `top` and `left`, `null`/`undefined` to leave the coordinates unchanged, or
+`false` to cancel the positioning.
+
+The position function is passed an object with the following elements:
+
+```javascript
+{
+ left, // The element's new position, from the top left corner of the page
+ top,
+ targetAttachment, // The targetAttachment, with 'auto' resolved to an actual attachment
+ targetPos, // The coordinates of the target
+ attachment, // The attachment, as passed in the option
+ elementPos, // The coordinates of the element
+ offset, // The offset, after it's converted into pixels and the manual offset is added
+ targetOffset, // The attachment is converted into an offset and is included in these values
+ manualOffset, // The manual offset, in pixels
+ manualTargetOffset
+}
+```
+
+It is called with the Tether instance as its context (`this`).
+
+#### Initialize
+
+Modules can also have an `initialize` function which will be called when a new tether is created. The initialize function
+is also called with the Tether instance as its context.
+
+```coffeescript
+Tether.modules.push
+ initialize: ->
+ console.log "New Tether Created!", @
+```
+
+#### Examples
+
+[Constraints](https://github.com/HubSpot/tether/blob/master/src/js/constraint.js) and [shift](https://github.com/HubSpot/tether/blob/master/src/js/shift.js) are both implemented as modules.
+[Mark Attachment](https://github.com/HubSpot/tether/blob/master/src/js/markAttachment.js) is used by the docs.
diff --git a/templates/assets/tether/docs/coffee/intro.coffee b/templates/assets/tether/docs/coffee/intro.coffee
new file mode 100644
index 0000000..52a305d
--- /dev/null
+++ b/templates/assets/tether/docs/coffee/intro.coffee
@@ -0,0 +1,113 @@
+{uniqueId} = Tether.Utils
+
+SETUP_JS = """
+yellowBox = $('.yellow-box', $output);
+greenBox = $('.green-box', $output);
+scrollBox = $('.scroll-box', $output);
+"""
+
+OUTPUT_HTML = (key) -> """
+<div class="scroll-box">
+ <div class="scroll-content">
+ <div class="yellow-box" data-example="#{ key }"></div>
+ <div class="green-box" data-example="#{ key }"></div>
+ </div>
+</div>
+"""
+
+tethers = {}
+
+getOutput = ($block) ->
+ key = $block.data('example')
+ if key and typeof key is 'string'
+ return $("output[data-example='#{ key }']")
+ else
+ return $block.parents('pre').nextAll('output').first()
+
+run = (key) ->
+ if typeof key is 'string'
+ $block = $("code[data-example='#{ key }']")
+ else
+ $block = key
+
+ key = $block.attr('data-example')
+
+ $output = getOutput $block
+
+ code = $block.text()
+ code = SETUP_JS + code
+
+ window.$output = $output
+ tethers[key] = eval code
+
+setupBlock = ($block) ->
+ key = $block.data('example')
+
+ $output = getOutput $block
+
+ if not key
+ key = uniqueId()
+ $block.attr('data-example', key)
+ $output.attr('data-example', key)
+ $output.find('.tether-element').attr('data-example', key)
+
+ $output.html OUTPUT_HTML(key)
+
+ $scrollBox = $output.find('.scroll-box')
+ $scrollContent = $scrollBox.find('.scroll-content')
+ $scrollBox.scrollTop(parseInt($scrollContent.css('height')) / 2 - $scrollBox.height() / 2)
+ $scrollBox.scrollLeft(parseInt($scrollContent.css('width')) / 2 - $scrollBox.width() / 2)
+ setTimeout ->
+ $scrollBox.on 'scroll', ->
+ $output.addClass 'scrolled'
+
+ $scrollBox.css 'height', "#{ $block.parent().outerHeight() }px"
+
+ if not $output.attr('deactivated')?
+ run $block
+
+$(document.body).on 'click', (e) ->
+ if $(e.target).is('output[deactivated]')
+ activate $(e.target)
+ false
+ else if $(e.target).is('output[activated]')
+ deactivate $(e.target)
+ false
+
+activate = ($output) ->
+ $block = $output.prev().find('code')
+
+ run $block
+
+ $output.find('.tether-element').show()
+
+ key = $output.data('example')
+ $(tethers[key].element).show()
+ tethers[key].enable()
+
+ $output.removeAttr('deactivated')
+ $output.attr('activated', true)
+
+deactivate = ($output) ->
+ $block = $output.prev().find('code')
+ key = $output.data('example')
+
+ tethers[key].disable()
+
+ $el = $(tethers[key].element)
+ $el.detach()
+ $output.find('.scroll-content').append $el
+ $el.hide()
+
+ $output.removeAttr('activated')
+ $output.attr('deactivated', true)
+
+init = ->
+ $blocks = $('code[data-example]')
+
+ setupBlock($ block) for block in $blocks
+
+window.EXECUTR_OPTIONS =
+ codeSelector: 'code[executable]'
+
+$ init
diff --git a/templates/assets/tether/docs/css/intro.css b/templates/assets/tether/docs/css/intro.css
new file mode 100644
index 0000000..44303fd
--- /dev/null
+++ b/templates/assets/tether/docs/css/intro.css
@@ -0,0 +1,218 @@
+@charset "UTF-8";
+*, *:after, *:before {
+ box-sizing: border-box; }
+
+body {
+ position: relative; }
+
+.yellow-box {
+ width: 100px;
+ height: 100px;
+ background-color: #fe8;
+ pointer-events: none; }
+
+.green-box {
+ margin-top: 65px;
+ margin-left: 100px;
+ width: 200px;
+ height: 50px;
+ background-color: #4e9; }
+ .no-green .green-box {
+ display: none; }
+
+.scroll-box {
+ height: 150px;
+ border: 10px solid #eee;
+ background: #fbfbfb;
+ overflow: auto;
+ position: relative; }
+
+.scroll-content {
+ height: 2000px;
+ width: 2000px;
+ padding: 910px 809px; }
+
+pre.pre-with-output {
+ margin: 0;
+ width: 50%;
+ float: left; }
+ pre.pre-with-output code mark {
+ background: #b8daff;
+ color: #000; }
+
+p, h2, h3 {
+ clear: both; }
+
+output {
+ display: block;
+ position: relative;
+ width: 50%;
+ float: right;
+ margin-bottom: 15px; }
+ output.scroll-page .scroll-box {
+ overflow: hidden; }
+ output.scroll-page:after {
+ content: "↕ scroll the page ↕"; }
+ output:after {
+ content: "↕ scroll this area ↕";
+ position: absolute;
+ bottom: 25px;
+ width: 100%;
+ text-align: center;
+ font-size: 16px;
+ font-variant: small-caps;
+ color: #777;
+ opacity: 1;
+ -webkit-transition: opacity 0.2s;
+ transition: opacity 0.2s; }
+ output.scrolled:after {
+ opacity: 0; }
+ output[deactivated], output[activated] {
+ cursor: pointer; }
+ output[deactivated] .scroll-box, output[activated] .scroll-box {
+ pointer-events: none; }
+ output[deactivated]:after, output[activated]:after {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ opacity: 1;
+ content: "Click To Show";
+ background-color: #AAA;
+ border-left: 10px solid #EEE;
+ color: white;
+ font-size: 24px;
+ font-variant: normal;
+ padding-top: 80px; }
+ output[activated]:after {
+ content: "Click To Hide"; }
+ output[activated].visible-enabled:after {
+ height: 35px;
+ padding-top: 5px; }
+
+.attachment-mark, .tether-marker-dot {
+ position: relative; }
+ .attachment-mark:after, .tether-marker-dot:after {
+ content: "A";
+ width: 10px;
+ height: 10px;
+ background-color: red;
+ display: inline-block;
+ line-height: 10px;
+ font-size: 9px;
+ color: white;
+ text-align: center;
+ position: absolute; }
+
+span.attachment-mark:after, span.tether-marker-dot:after {
+ position: relative;
+ top: -1px;
+ margin-right: 1px; }
+
+.tether-marker-dot {
+ position: absolute; }
+ .tether-marker-dot:after {
+ top: -5px;
+ left: -5px; }
+
+.tether-target-marker {
+ position: absolute; }
+ div.tether-target-attached-left .tether-target-marker {
+ left: 0; }
+ div.tether-target-attached-top .tether-target-marker {
+ top: 0; }
+ div.tether-target-attached-bottom .tether-target-marker {
+ bottom: 0; }
+ div.tether-target-attached-right .tether-target-marker {
+ right: 0; }
+ div.tether-target-attached-center .tether-target-marker {
+ left: 50%; }
+
+.tether-element-marker {
+ position: absolute; }
+ div.tether-element-attached-left .tether-element-marker {
+ left: 0; }
+ div.tether-element-attached-top .tether-element-marker {
+ top: 0; }
+ div.tether-element-attached-bottom .tether-element-marker {
+ bottom: 0; }
+ div.tether-element-attached-right .tether-element-marker {
+ right: 0; }
+ div.tether-element-attached-center .tether-element-marker {
+ left: 50%; }
+
+.tether-element-attached-middle .tether-element-marker {
+ top: 50px; }
+
+.tether-target-attached-middle .tether-target-marker {
+ top: 25px; }
+
+.tether-element {
+ position: relative; }
+ .tether-element.tether-pinned-left {
+ box-shadow: inset 2px 0 0 0 red; }
+ .tether-element.tether-pinned-right {
+ box-shadow: inset -2px 0 0 0 red; }
+ .tether-element.tether-pinned-top {
+ box-shadow: inset 0 2px 0 0 red; }
+ .tether-element.tether-pinned-bottom {
+ box-shadow: inset 0 -2px 0 0 red; }
+
+.tether-target {
+ position: relative; }
+
+.tether-element.tether-out-of-bounds[data-example="hide"] {
+ display: none; }
+
+[data-example^="optimizer"].lang-javascript {
+ /* This should just be a `code` selector, but sass doesn't allow that with & */
+ min-height: 220px; }
+
+[data-example^="optimizer"].tether-element:before {
+ margin-top: 26px;
+ display: block;
+ text-align: center;
+ content: "I'm in the body";
+ line-height: 1.2;
+ font-size: 15px;
+ padding: 4px;
+ color: #666; }
+
+[data-example^="optimizer"] .scroll-box .tether-element:before {
+ content: "I'm in my scroll parent!"; }
+
+.tether-element[data-example="scroll-visible"] {
+ height: 30px; }
+ .tether-element[data-example="scroll-visible"] .tether-marker-dot {
+ display: none; }
+
+.hs-doc-content h2.projects-header {
+ text-align: center;
+ font-weight: 300; }
+
+.projects-paragraph {
+ text-align: center; }
+ .projects-paragraph a {
+ display: inline-block;
+ vertical-align: middle;
+ *vertical-align: auto;
+ *zoom: 1;
+ *display: inline;
+ text-align: center;
+ margin-right: 30px;
+ color: inherit; }
+ .projects-paragraph a span {
+ display: inline-block;
+ vertical-align: middle;
+ *vertical-align: auto;
+ *zoom: 1;
+ *display: inline;
+ margin-bottom: 20px;
+ font-size: 20px;
+ color: inherit;
+ font-weight: 300; }
+ .projects-paragraph a img {
+ display: block;
+ max-width: 100%;
+ width: 100px; }
diff --git a/templates/assets/tether/docs/intro.md b/templates/assets/tether/docs/intro.md
new file mode 100644
index 0000000..aaf5ab5
--- /dev/null
+++ b/templates/assets/tether/docs/intro.md
@@ -0,0 +1,591 @@
+<script src="dist/js/tether.js"></script>
+<script src="docs/js/markAttachment.js"></script>
+<script src="docs/js/intro.js"></script>
+<link rel="stylesheet" href="docs/css/intro.css"></link>
+
+Tether
+======
+
+Tether is a JavaScript library for efficiently making an absolutely positioned
+element stay next to another element on the page. For example, you might
+want a tooltip or dialog to open, and remain, next to the relevant item
+on the page.
+
+Tether includes the ability to constrain the element within the viewport, its
+scroll parent, any other element on the page, or a fixed bounding box. When it
+exceeds those constraints it can be pinned to the edge, flip to the other
+side of its target, or hide itself.
+
+Tether optimizes its location placement to result in the minimum amount of
+'jankyness' as the page is scrolled and resized. The page can maintain 60fps
+scrolling even with dozens or hundreds of tethers on screen (pop open the
+devtools timeline as you scroll this page).
+
+Tether is 5kb minified and gzipped, and supports IE9+, and all modern
+browsers.
+
+<h2 class="projects-header">Projects Built With Tether</h2>
+<p class="projects-paragraph">
+<a href="http://github.hubspot.com/select/docs/welcome"><span>Select</span><img src="http://github.hubspot.com/os-icons/select-icon.png" /></a>
+<a href="http://github.hubspot.com/drop/docs/welcome"><span>Drop</span><img src="http://github.hubspot.com/os-icons/drop-icon.png" /></a>
+<a href="http://github.hubspot.com/tooltip/docs/welcome"><span>Tooltip</span><img src="http://github.hubspot.com/os-icons/tooltip-icon.png" /></a>
+<a href="http://github.hubspot.com/shepherd/docs/welcome"><span>Shepherd</span><img src="http://github.hubspot.com/os-icons/shepherd-icon.png" /></a>
+</p>
+
+Usage
+-----
+
+The element to be moved is called the 'element'.
+The element in the page it's to be attached to is called the 'target'.
+
+To use Tether, you define a point on the target and a point on the element.
+Tether moves the element to keep those two points on top of each other.
+
+That point is called the attachment (we've marked it in the examples with
+a red <span class="attachment-mark"></span>). For example, if you'd like
+the element to sit on the left of the target:
+
+<pre class="pre-with-output"><code class="lang-javascript" data-example='usage'>new Tether({
+ element: yellowBox,
+ target: greenBox,
+ attachment: 'top right',
+ targetAttachment: 'top left'
+});
+</code></pre><output data-example='usage'></output>
+
+Attachment
+----------
+
+You can move the attachment points of both the element and the target.
+
+For example, lets move the element's attachment:
+
+<pre class="pre-with-output"><code class="lang-javascript" data-example>new Tether({
+ element: yellowBox,
+ target: greenBox,
+ attachment: <mark>'bottom left'</mark>,
+ targetAttachment: 'top left'
+});
+</code></pre><output></output>
+
+We can also change the target's attachment point:
+
+<pre class="pre-with-output"><code class="lang-javascript" data-example>new Tether({
+ element: yellowBox,
+ target: greenBox,
+ attachment: 'bottom left',
+ targetAttachment: <mark>'bottom right'</mark>
+});
+</code></pre><output></output>
+
+There are two more attachment points we haven't seen yet, center and middle:
+
+<pre class="pre-with-output"><code class="lang-javascript" data-example>new Tether({
+ element: yellowBox,
+ target: greenBox,
+ attachment: <mark>'middle center'</mark>,
+ targetAttachment: <mark>'middle center'</mark>
+});
+</code></pre><output></output>
+
+All told, Tether provides six built in attachment positions:
+
+- left
+- center
+- right
+- top
+- middle
+- bottom
+
+The syntax of the attachment properties is: `"vertical-attachment horizontal-attachment"`.
+
+You must always supply an `attachment`. If you don't supply a `target-attachment`, it is
+assumed to be the mirror image of `attachment`.
+
+### Offset
+
+The six attachment points we provide are not always enough to place the element
+exactly where you want it. To correct this, we provide two more properties,
+`offset` and `targetOffset`.
+
+<pre class="pre-with-output"><code class="lang-javascript" data-example>new Tether({
+ element: yellowBox,
+ target: greenBox,
+ attachment: 'top right',
+ targetAttachment: 'top left',
+ <mark>offset: '0 10px'</mark>
+});
+</code></pre><output></output>
+
+As you can see, we've moved the attachment point of the element 10px to the right.
+We can also move the attachment point of the target:
+
+<pre class="pre-with-output"><code class="lang-javascript" data-example>new Tether({
+ element: yellowBox,
+ target: greenBox,
+ attachment: 'top right',
+ targetAttachment: 'top left',
+ offset: '0 10px',
+ <mark>targetOffset: '20px 0'</mark>
+});
+</code></pre><output></output>
+
+The offset properties also accept percentages. Percentages in `offset` refer to
+the height and width of the element, `targetOffset` the height and width of
+the target.
+
+<pre class="pre-with-output"><code class="lang-javascript" data-example>new Tether({
+ element: yellowBox,
+ target: greenBox,
+ attachment: 'top right',
+ targetAttachment: 'top left',
+ targetOffset: <mark>'0 75%'</mark>
+});
+</code></pre><output></output>
+
+The syntax of the offset properties is `"vertical-offset horizontal-offset"`
+
+Tether offers a couple of special attachments, using the `targetModifier`
+option:
+
+<pre class="pre-with-output"><code class="lang-javascript" data-example>new Tether({
+ element: yellowBox,
+ target: scrollBox,
+ attachment: 'middle right',
+ targetAttachment: 'middle left',
+ targetModifier: 'scroll-handle'
+});
+</code></pre><output></output>
+
+Set the target to `document.body` to have the element follow the page's scroll bar.
+
+The `targetModifier` `visible` can be used to attach an element to the visible part
+of an element:
+
+<pre class="pre-with-output"><code class="lang-javascript" data-example>new Tether({
+ element: yellowBox,
+ target: document.body,
+ attachment: 'middle center',
+ targetAttachment: 'middle center',
+ <mark>targetModifier: 'visible'</mark>
+});
+</code></pre><output deactivated></output>
+
+<pre class="pre-with-output"><code class="lang-javascript" data-example="scroll-visible">new Tether({
+ element: yellowBox,
+ <mark>target: scrollBox</mark>,
+ attachment: 'middle center',
+ targetAttachment: 'middle center',
+ targetModifier: 'visible'
+});
+</code></pre><output class="no-green scroll-page" data-example="scroll-visible"></output>
+
+Constraints
+-----------
+
+If you have tried any of the previous examples, you'll notice that it's pretty
+easy to scroll the regions in such a way that the element is hanging out on
+its own, with no target in sight.
+
+Constraints allow you to control what happens when the tethered element would
+have to fall outside of a defined region to maintain the attachment.
+
+<pre class="pre-with-output"><code class="lang-javascript" data-example>new Tether({
+ element: yellowBox,
+ target: greenBox,
+ attachment: 'middle left',
+ targetAttachment: 'middle left',
+ <mark>constraints</mark>: [
+ {
+ to: 'scrollParent',
+ pin: true
+ }
+ ]
+});
+</code></pre><output></output>
+
+We've created a constraint which will keep the element within its scroll
+parent by 'pinning' it to the edges if it tries to escape. For the sake
+of the example, we're also highlighting the pinned edge in red.
+
+Specify an array of sides if you'd only like to pin those edges:
+
+<pre class="pre-with-output"><code class="lang-javascript" data-example>new Tether({
+ element: yellowBox,
+ target: greenBox,
+ attachment: 'middle left',
+ targetAttachment: 'middle left',
+ constraints: [
+ {
+ to: 'scrollParent',
+ pin: <mark>['top']</mark>
+ }
+ ]
+});
+</code></pre><output></output>
+
+You might want to allow the element to change its attachment, if doing so
+would keep more of it within its assigned region:
+
+<pre class="pre-with-output"><code class="lang-javascript" data-example>new Tether({
+ element: yellowBox,
+ target: greenBox,
+ attachment: 'top left',
+ targetAttachment: 'bottom left',
+ constraints: [
+ {
+ to: 'scrollParent',
+ <mark>attachment: 'together'</mark>
+ }
+ ]
+});
+</code></pre><output></output>
+
+If you scroll the example a bit, you'll see it flip the attachment when necessary.
+You can combine `pin` and `attachment` as well:
+
+<pre class="pre-with-output"><code class="lang-javascript" data-example>new Tether({
+ element: yellowBox,
+ target: greenBox,
+ attachment: 'top left',
+ targetAttachment: 'bottom left',
+ constraints: [
+ {
+ to: 'scrollParent',
+ attachment: 'together',
+ <mark>pin: true</mark>
+ }
+ ]
+});
+</code></pre><output></output>
+
+Attachment will accept any of these values:
+
+- `element`: Only change the element's attachment
+- `target`: Only change the target's attachment
+- `both`: Change either's attachment (or both), as needed
+- `together`: Change both the element's and target's attachment at the same time (to
+'flip' the element to the other side of the attachment)
+- `none`: Don't allow changes to attachment (the default)
+
+Together is the option you will use most commonly:
+
+<pre class="pre-with-output"><code class="lang-javascript" data-example>new Tether({
+ element: yellowBox,
+ target: greenBox,
+ attachment: 'top right',
+ targetAttachment: 'bottom left',
+ constraints: [
+ {
+ to: 'scrollParent',
+ attachment: <mark>'together'</mark>
+ }
+ ]
+});
+</code></pre><output></output>
+
+You can also provide different settings for the vertical and horizontal attachments:
+
+<pre class="pre-with-output"><code class="lang-javascript" data-example>new Tether({
+ element: yellowBox,
+ target: greenBox,
+ attachment: 'top left',
+ targetAttachment: 'bottom left',
+ constraints: [
+ {
+ to: 'scrollParent',
+ attachment: <mark>'together none'</mark>
+ }
+ ]
+});
+</code></pre><output></output>
+
+Whenever the element is out of the constrained area, we add the `tether-out-of-bounds`
+class to it. If you add some CSS to make items with that class `display: none`, the
+tether will hide.
+
+<pre class="pre-with-output"><code class="lang-javascript" data-example="hide">new Tether({
+ element: yellowBox,
+ target: greenBox,
+ attachment: 'middle center',
+ targetAttachment: 'middle center',
+ constraints: [
+ {
+ to: 'scrollParent'
+ }
+ ]
+});
+</code></pre><output data-example="hide"></output>
+
+You can also constrain the element to the viewport, you'll have to scroll the
+page to see this one.
+
+<pre class="pre-with-output"><code class="lang-javascript" data-example="window">new Tether({
+ element: yellowBox,
+ target: greenBox,
+ attachment: 'top left',
+ targetAttachment: 'bottom left',
+ constraints: [
+ {
+ to: <mark>'window'</mark>,
+ attachment: 'together'
+ }
+ ]
+});
+</code></pre><output data-example="window" class="scroll-page"></output>
+
+You can, of course, use pin with the window as well to
+make it always visible no matter where the user scrolls:
+
+<pre class="pre-with-output"><code class="lang-javascript" data-example>new Tether({
+ element: yellowBox,
+ target: greenBox,
+ attachment: 'top left',
+ targetAttachment: 'bottom left',
+ constraints: [
+ {
+ to: 'window',
+ attachment: 'together',
+ <mark>pin: true</mark>
+ }
+ ]
+});
+</code></pre><output deactivated class="scroll-page visible-enabled"></output>
+
+`to` can be any of:
+
+- `'scrollParent'`
+- `'window'`
+- any DOM element
+- an array of bound points relative to the body `[X1, Y1, X2, Y2]`
+
+You can also provide multiple constraints, keeping in mind that they are
+processed in the order supplied (the last one always has the final word).
+
+<pre class="pre-with-output"><code class="lang-javascript" data-example>new Tether({
+ element: yellowBox,
+ target: greenBox,
+ attachment: 'top left',
+ targetAttachment: 'bottom left',
+ constraints: [
+ {
+ to: <mark>'scrollParent'</mark>,
+ pin: true
+ },
+ {
+ to: <mark>'window'</mark>,
+ attachment: 'together'
+ }
+ ]
+});
+</code></pre><output></output>
+
+Optimization
+------------
+
+### Element Moving
+
+The goal of Tether's optimizer is to not have to change the positioning
+CSS as the page is scrolled or resized. To accomplish this it looks at the
+last few positions, finds commonalities, and uses them to decide whether to
+position the element absolutely or with fixed positioning.
+
+If the element is fully contained within its scroll parent, its DOM node
+can also be moved inside the scroll parent, to avoid repaints as the
+container is scrolled.
+
+<pre class="pre-with-output"><code class="lang-javascript" data-example="optimizer">new Tether({
+ element: yellowBox,
+ target: greenBox,
+ attachment: 'top left',
+ targetAttachment: 'bottom left'
+});
+</code></pre><output data-example="optimizer"></output>
+
+We are moving where the DOM node is, so if you have CSS which styles elements
+within the offset parent, you may see some rendering changes. Also note
+that this optimization works best if the scroll parent is the offset parent.
+In other words, **the scroll parent should be made position relative, fixed or
+absolute to enable this optimization.**
+
+If you do see stylistic changes occur when the element is moved,
+you might want to disable this optimization. You can do that by
+setting `optimizations.moveElement` to false.
+
+<pre class="pre-with-output"><code class="lang-javascript" data-example="optimizer2">new Tether({
+ element: yellowBox,
+ target: greenBox,
+ attachment: 'top left',
+ targetAttachment: 'bottom left',
+ optimizations: {
+ <mark>moveElement: false</mark>
+ }
+});
+</code></pre><output data-example="optimizer2"></output>
+
+### GPU
+
+By default tether positions elements using CSS transforms. These transforms allow the
+tethered element to be moved as its own layer to not force a repaint of the underlying
+page.
+
+This method of positioning can cause some issues however, including color shifts and artifacts.
+
+If you experience these issues, you can disable this optimization by setting `optimizations.gpu`
+to false:
+
+<pre class="pre-with-output"><code class="lang-javascript" data-example>new Tether({
+ element: yellowBox,
+ target: greenBox,
+ attachment: 'top left',
+ optimizations: {
+ <mark>gpu: false</mark>
+ }
+});
+</code></pre><output></output>
+
+Methods
+-------
+
+The `Tether` constructor we've been using in these examples returns us a
+`Tether` object.
+
+The `Tether` object has these methods:
+
+- `setOptions({ options })` - Update any of the options (such as attachment)
+- `disable()` - Disable the tethering
+- `enable()` - Enable the tethering
+- `destroy()` - Disable and remove all references
+- `position()` - Manually trigger a repositioning
+
+Options
+-------
+
+The full list of options which can be passed to the `Tether` constructor and
+`setOptions`:
+
+- `element`: The DOM element, jQuery element, or a selector string of an element which will be moved
+- `target`: The DOM element, jQuery element, or a selector string of an element which the `element` will be attached to
+- `attachment`: A string of the form `'vert-attachment horiz-attachment'`
+ - `vert-attachment` can be any of `'top'`, `'middle'`, `'bottom'`
+ - `horiz-attachment` can be any of `'left'`, `'center'`, `'right'`
+- `targetAttachment`: A string similar to `attachment`.
+ The one difference is that, if it's not provided, targetAttachment will assume the mirror
+ image of `attachment`.
+- `offset`: A string of the form `'vert-offset horiz-offset'`
+ - `vert-offset` and `horiz-offset` can be of the form `"20px"` or `"55%"`
+- `targetOffset`: A string similar to `offset`, but refering to the offset of the target
+- `targetModifier`: Can be set to `'visible'` or `'scroll-handle'`
+- `enabled`: Should the tether be enabled initially? Defaults to `true`.
+- `classes`: A hash of classes which should be changed or disabled
+- `classPrefix`: The prefix placed at the beginning of the default classes, defaults to `'tether'`
+- `optimizations`: A hash of optimizations, used to disable them
+- `constraints`: An array of constraint definition objects. Each definition is of the form:
+ - `to`: A DOM element, bounding box, the string `'window'`, or the string `'scrollParent'`
+ - `pin`: `true` or an array of strings representing the sides of the constraint
+ - `attachment`: A string of the form `"vert-modifier horiz-modifier"`, or a single value
+ representing both
+ - Each modifier should be one of `"none"`, `"together"`, `"element"`, `"target"`, or `"both"`.
+ - `outOfBoundsClass`: An alternative to `"tether-out-of-bounds"`, useful if the class
+ needs to be differentiated from that of another constraint.
+ - `pinnedClass`: An alternative to `"tether-pinned"`, similar to `outOfBoundsClass`.
+
+Classes
+-------
+
+Tether adds a variety of classes to the element and target to allow you to style
+them based on their tethering.
+
+You can change the prefix of the classes with the `classPrefix` option. It is `'tether'` by
+default, but you could, for example, change it to be `'bill'` if you were building the bill
+library and all the classes would be `'bill-*'`.
+
+```javascript
+new Tether({
+ classPrefix: 'bill'
+});
+```
+
+The sass/css is similarily configurable, see
+[tooltip](https://github.com/HubSpot/tooltip/blob/master/sass/tooltip-theme-arrows.sass#L14) for
+an example of how to make your own prefixed css file.
+
+All classes can be changed or disabled with the `classes` option. For example, to change the
+`tether-element` class to be `my-box`:
+
+```javascript
+new Tether({
+ classes: {
+ element: 'my-box'
+ }
+});
+```
+
+You can also disable classes you're not going to use:
+
+```javascript
+new Tether({
+ classes: {
+ out-of-bounds: false
+ }
+});
+```
+
+- `tether-element` is added to the element
+- `tether-target` is added to the target
+- `tether-enabled` is added to both elements when tether is not disabled
+- `tether-element-attached-[left,right,top,bottom,middle,center]` is added to both
+elements based on the elements attachment, if the element becomes detached (for
+example, if it's pinned), that class is removed. The class reflects how the
+element is actually attached, so if a constraint changes the attachment, that
+change will be reflected in the class.
+- `tether-target-attached-[left,right,top,bottom,middle,center]` is added to both
+elements based on the target's attachment. All of the characteristics are the
+same as for element-attached.
+
+### Constraint-related Classes
+
+- `tether-out-of-bounds`, `tether-out-of-bounds-[side]` are added to both the element and the target
+when the element is placed outside of its constraint.
+- `tether-pinned`, `tether-pinned-[side]` are added to both the element and target when a constraint
+has pinned the element to the [side] of the container.
+
+Browser Support
+---------------
+
+Tether supports IE9+, and all modern browsers.
+
+Google doesn't support IE8, Microsoft is dropping support in a few months, and not supporting it saves
+us a whole lot of trouble. If you are interested in adding support, get in touch, we're happy to accept
+a PR.
+
+Contributing
+------------
+
+Please contribute! Tether is developed in Coffeescript, but if that's problematic for you, feel free
+to submit pull requests which just change the JavaScript files, we can adapt them as needed.
+
+To build Tether, you need:
+
+- Node.js
+
+#### Instructions
+
+- Install the build tool
+
+```bash
+npm install -g gulp
+```
+
+- Install the project
+
+```bash
+# In the project directory
+npm install
+```
+
+- Build / Watch
+
+```bash
+gulp
+```
diff --git a/templates/assets/tether/docs/js/intro.js b/templates/assets/tether/docs/js/intro.js
new file mode 100644
index 0000000..47ed6e5
--- /dev/null
+++ b/templates/assets/tether/docs/js/intro.js
@@ -0,0 +1,117 @@
+(function() {
+ var OUTPUT_HTML, SETUP_JS, activate, deactivate, getOutput, init, run, setupBlock, tethers, uniqueId;
+
+ uniqueId = Tether.Utils.uniqueId;
+
+ SETUP_JS = "yellowBox = $('.yellow-box', $output);\ngreenBox = $('.green-box', $output);\nscrollBox = $('.scroll-box', $output);";
+
+ OUTPUT_HTML = function(key) {
+ return "<div class=\"scroll-box\">\n <div class=\"scroll-content\">\n <div class=\"yellow-box\" data-example=\"" + key + "\"></div>\n <div class=\"green-box\" data-example=\"" + key + "\"></div>\n </div>\n</div>";
+ };
+
+ tethers = {};
+
+ getOutput = function($block) {
+ var key;
+ key = $block.data('example');
+ if (key && typeof key === 'string') {
+ return $("output[data-example='" + key + "']");
+ } else {
+ return $block.parents('pre').nextAll('output').first();
+ }
+ };
+
+ run = function(key) {
+ var $block, $output, code;
+ if (typeof key === 'string') {
+ $block = $("code[data-example='" + key + "']");
+ } else {
+ $block = key;
+ }
+ key = $block.attr('data-example');
+ $output = getOutput($block);
+ code = $block.text();
+ code = SETUP_JS + code;
+ window.$output = $output;
+ return tethers[key] = eval(code);
+ };
+
+ setupBlock = function($block) {
+ var $output, $scrollBox, $scrollContent, key;
+ key = $block.data('example');
+ $output = getOutput($block);
+ if (!key) {
+ key = uniqueId();
+ $block.attr('data-example', key);
+ $output.attr('data-example', key);
+ $output.find('.tether-element').attr('data-example', key);
+ }
+ $output.html(OUTPUT_HTML(key));
+ $scrollBox = $output.find('.scroll-box');
+ $scrollContent = $scrollBox.find('.scroll-content');
+ $scrollBox.scrollTop(parseInt($scrollContent.css('height')) / 2 - $scrollBox.height() / 2);
+ $scrollBox.scrollLeft(parseInt($scrollContent.css('width')) / 2 - $scrollBox.width() / 2);
+ setTimeout(function() {
+ return $scrollBox.on('scroll', function() {
+ return $output.addClass('scrolled');
+ });
+ });
+ $scrollBox.css('height', "" + ($block.parent().outerHeight()) + "px");
+ if ($output.attr('deactivated') == null) {
+ return run($block);
+ }
+ };
+
+ $(document.body).on('click', function(e) {
+ if ($(e.target).is('output[deactivated]')) {
+ activate($(e.target));
+ return false;
+ } else if ($(e.target).is('output[activated]')) {
+ deactivate($(e.target));
+ return false;
+ }
+ });
+
+ activate = function($output) {
+ var $block, key;
+ $block = $output.prev().find('code');
+ run($block);
+ $output.find('.tether-element').show();
+ key = $output.data('example');
+ $(tethers[key].element).show();
+ tethers[key].enable();
+ $output.removeAttr('deactivated');
+ return $output.attr('activated', true);
+ };
+
+ deactivate = function($output) {
+ var $block, $el, key;
+ $block = $output.prev().find('code');
+ key = $output.data('example');
+ tethers[key].disable();
+ $el = $(tethers[key].element);
+ $el.detach();
+ $output.find('.scroll-content').append($el);
+ $el.hide();
+ $output.removeAttr('activated');
+ return $output.attr('deactivated', true);
+ };
+
+ init = function() {
+ var $blocks, block, _i, _len, _results;
+ $blocks = $('code[data-example]');
+ _results = [];
+ for (_i = 0, _len = $blocks.length; _i < _len; _i++) {
+ block = $blocks[_i];
+ _results.push(setupBlock($(block)));
+ }
+ return _results;
+ };
+
+ window.EXECUTR_OPTIONS = {
+ codeSelector: 'code[executable]'
+ };
+
+ $(init);
+
+}).call(this);
diff --git a/templates/assets/tether/docs/js/markAttachment.js b/templates/assets/tether/docs/js/markAttachment.js
new file mode 100644
index 0000000..c7d34f0
--- /dev/null
+++ b/templates/assets/tether/docs/js/markAttachment.js
@@ -0,0 +1,51 @@
+/* globals Tether */
+
+'use strict';
+
+Tether.modules.push({
+ initialize: function initialize() {
+ var _this = this;
+
+ this.markers = {};
+
+ ['target', 'element'].forEach(function (type) {
+ var el = document.createElement('div');
+ el.className = _this.getClass('' + type + '-marker');
+
+ var dot = document.createElement('div');
+ dot.className = _this.getClass('marker-dot');
+ el.appendChild(dot);
+
+ _this[type].appendChild(el);
+
+ _this.markers[type] = { dot: dot, el: el };
+ });
+ },
+
+ position: function position(_ref) {
+ var manualOffset = _ref.manualOffset;
+ var manualTargetOffset = _ref.manualTargetOffset;
+
+ var offsets = {
+ element: manualOffset,
+ target: manualTargetOffset
+ };
+
+ for (var type in offsets) {
+ var offset = offsets[type];
+ for (var side in offset) {
+ var val = offset[side];
+ var notString = typeof val !== 'string';
+ if (notString || val.indexOf('%') === -1 && val.indexOf('px') === -1) {
+ val += 'px';
+ }
+
+ if (this.markers[type].dot.style[side] !== val) {
+ this.markers[type].dot.style[side] = val;
+ }
+ }
+ }
+
+ return true;
+ }
+});
diff --git a/templates/assets/tether/docs/sass/intro.sass b/templates/assets/tether/docs/sass/intro.sass
new file mode 100644
index 0000000..8456a20
--- /dev/null
+++ b/templates/assets/tether/docs/sass/intro.sass
@@ -0,0 +1,233 @@
+$scrollableArea: 2000px
+$exampleWidth: 400px
+$exampleHeight: 180px
+
+@mixin inline-block
+ display: inline-block
+ vertical-align: middle
+ *vertical-align: auto
+ *zoom: 1
+ *display: inline
+
+*, *:after, *:before
+ box-sizing: border-box
+
+body
+ position: relative
+
+.yellow-box
+ width: 100px
+ height: 100px
+ background-color: #fe8
+ pointer-events: none
+
+.green-box
+ margin-top: ($exampleHeight - 50px) / 2
+ margin-left: ($exampleWidth - 200px) / 2
+ width: 200px
+ height: 50px
+ background-color: #4e9
+
+ .no-green &
+ display: none
+
+.scroll-box
+ height: 150px
+ border: 10px solid #eee
+ background: #fbfbfb
+ overflow: auto
+ position: relative
+
+.scroll-content
+ height: $scrollableArea
+ width: $scrollableArea
+ padding: ($scrollableArea - $exampleHeight)/2 ($scrollableArea - $exampleWidth)/2 + 9
+
+pre.pre-with-output
+ margin: 0
+ width: 50%
+ float: left
+
+ code mark
+ background: #b8daff
+ color: #000
+
+p, h2, h3
+ clear: both
+
+output
+ display: block
+ position: relative
+ width: 50%
+ float: right
+ margin-bottom: 15px
+
+ &.scroll-page
+ .scroll-box
+ overflow: hidden
+
+ &:after
+ content: "↕ scroll the page ↕"
+
+ &:after
+ content: "↕ scroll this area ↕"
+ position: absolute
+ bottom: 25px
+ width: 100%
+ text-align: center
+ font-size: 16px
+ font-variant: small-caps
+ color: #777
+ opacity: 1
+ transition: opacity 0.2s
+
+ &.scrolled:after
+ opacity: 0
+
+ &[deactivated], &[activated]
+ .scroll-box
+ pointer-events: none
+
+ cursor: pointer
+
+ &:after
+ position: absolute
+ top: 0
+ left: 0
+ right: 0
+ bottom: 0
+ opacity: 1
+ content: "Click To Show"
+ background-color: #AAA
+ border-left: 10px solid #EEE
+ color: white
+ font-size: 24px
+ font-variant: normal
+ padding-top: 80px
+
+ &[activated]
+ &:after
+ content: "Click To Hide"
+
+ &.visible-enabled
+ &:after
+ height: 35px
+ padding-top: 5px
+
+.attachment-mark
+ position: relative
+
+ &:after
+ content: "A"
+ width: 10px
+ height: 10px
+ background-color: red
+ display: inline-block
+
+ line-height: 10px
+ font-size: 9px
+ color: white
+ text-align: center
+
+ position: absolute
+
+span.attachment-mark
+ &:after
+ position: relative
+ top: -1px
+ margin-right: 1px
+
+.tether-marker-dot
+ @extend .attachment-mark
+
+ position: absolute
+
+ &:after
+ top: -5px
+ left: -5px
+
+@each $type in target, element
+ .tether-#{ $type }-marker
+ position: absolute
+
+ @each $side in left, top, bottom, right
+ div.tether-#{ $type }-attached-#{ $side } &
+ #{ $side }: 0
+
+ div.tether-#{ $type }-attached-center &
+ left: 50%
+
+.tether-element-attached-middle .tether-element-marker
+ top: 50px
+
+.tether-target-attached-middle .tether-target-marker
+ top: 25px
+
+.tether-element
+ position: relative
+
+ &.tether-pinned-left
+ box-shadow: inset 2px 0 0 0 red
+ &.tether-pinned-right
+ box-shadow: inset -2px 0 0 0 red
+ &.tether-pinned-top
+ box-shadow: inset 0 2px 0 0 red
+ &.tether-pinned-bottom
+ box-shadow: inset 0 -2px 0 0 red
+
+.tether-target
+ position: relative
+
+.tether-element.tether-out-of-bounds[data-example="hide"]
+ display: none
+
+[data-example^="optimizer"]
+ &.lang-javascript
+ /* This should just be a `code` selector, but sass doesn't allow that with & */
+ min-height: 220px
+
+ &.tether-element
+
+ &:before
+ margin-top: 26px
+ display: block
+ text-align: center
+ content: "I'm in the body"
+ line-height: 1.2
+ font-size: 15px
+ padding: 4px
+ color: #666
+
+ .scroll-box .tether-element:before
+ content: "I'm in my scroll parent!"
+
+.tether-element[data-example="scroll-visible"]
+ height: 30px
+
+ .tether-marker-dot
+ display: none
+
+.hs-doc-content h2.projects-header
+ text-align: center
+ font-weight: 300
+
+.projects-paragraph
+ text-align: center
+
+ a
+ +inline-block
+ text-align: center
+ margin-right: 30px
+ color: inherit
+
+ span
+ +inline-block
+ margin-bottom: 20px
+ font-size: 20px
+ color: inherit
+ font-weight: 300
+
+ img
+ display: block
+ max-width: 100%
+ width: 100px
diff --git a/templates/assets/tether/docs/welcome/browser-demo.html b/templates/assets/tether/docs/welcome/browser-demo.html
new file mode 100644
index 0000000..6c175bc
--- /dev/null
+++ b/templates/assets/tether/docs/welcome/browser-demo.html
@@ -0,0 +1,76 @@
+<!doctype html>
+<head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <title>Drop – Browser Demo</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+ <link rel="icon" href="http://static.hubspot.com/favicon.ico">
+
+ <script type="text/javascript" src="//use.typekit.net/ghy0wve.js"></script>
+ <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
+
+ <!-- Drop themes -->
+ <link rel="stylesheet" href="//github.hubspot.com/tether/dist/css/tether-theme-arrows-dark.css" />
+
+ <!-- Browser demo styles -->
+ <link rel="stylesheet" href="//github.hubspot.com/tether/docs/welcome/css/browser-demo.css" />
+</head>
+<body>
+ <div class="browser-demo">
+ <div class="top"><div class="title"></div></div>
+ <div class="bottom">
+ <div class="left">
+ <div class="item"></div>
+ <div class="item"></div>
+ <div class="item"></div>
+ <div class="item"></div>
+ <div class="item"></div>
+ <div class="item"></div>
+ <div class="item"></div>
+ <div class="item"></div>
+ <div class="item"></div>
+ <div class="item"></div>
+ <div class="item"></div>
+ <div class="item"></div>
+ <div class="item"></div>
+ <div class="item"></div>
+ <div class="item"></div>
+ <div class="item"></div>
+ <div class="item"></div>
+ <div class="item"></div>
+ <div class="item"></div>
+ <div class="item"></div>
+ <div class="item"></div>
+ <div class="item"></div>
+ <div class="item"></div>
+ <div class="item"></div>
+ <div class="item"></div>
+ <div class="item"></div>
+ <div class="item"></div>
+ <div class="item"></div>
+ <div class="item"></div>
+ <div class="item"></div>
+ <div class="item"></div>
+ <div class="item"></div>
+ </div>
+ <div class="right">
+ <div class="title"></div>
+ <p>
+ <div class="word"></div><div class="word"></div><div class="word"></div><div class="word"></div><div class="word"></div><div class="word"></div><div class="word"></div><div class="word"></div><div class="word"></div><div class="word"></div><div class="word"></div><div class="word"></div><div class="word"></div>
+ </p>
+ <p>
+ <div class="word"></div><div class="word"></div><div class="word"></div><div class="word"></div><div class="word"></div><div class="word"></div><div class="word"></div><div class="word"></div><div class="word"></div><div class="word"></div><div class="word"></div><div class="word"></div><div class="word"></div><div class="word"></div><div class="word"></div><div class="word"></div><div class="word"></div><div class="word"></div><div class="word"></div>
+ </p>
+ </div>
+ </div>
+ </div>
+
+ <!-- Tether javascript -->
+ <script src="//github.hubspot.com/tether/dist/js/tether.min.js"></script>
+
+ <!-- Welcome docs javascript -->
+ <script src="//github.hubspot.com/tether/docs/welcome/js/log.js"></script>
+ <script src="//github.hubspot.com/tether/docs/welcome/js/jquery.js"></script>
+ <script src="//github.hubspot.com/tether/docs/welcome/js/drop.js"></script>
+</body>
+</html>
diff --git a/templates/assets/tether/docs/welcome/coffee/welcome.coffee b/templates/assets/tether/docs/welcome/coffee/welcome.coffee
new file mode 100644
index 0000000..a431602
--- /dev/null
+++ b/templates/assets/tether/docs/welcome/coffee/welcome.coffee
@@ -0,0 +1,212 @@
+_Drop = Drop.createContext classPrefix: 'tether'
+
+isMobile = $(window).width() < 567
+
+init = ->
+ setupHero()
+ setupBrowserDemo()
+
+setupHero = ->
+ $target = $('.tether-target-demo')
+
+ positions = [
+ 'top left'
+ 'left top'
+ 'left middle'
+ 'left bottom'
+ 'bottom left'
+ 'bottom center'
+ 'bottom right'
+ 'right bottom'
+ 'right middle'
+ 'right top'
+ 'top right'
+ 'top center'
+ ]
+
+ if isMobile
+ positions = [
+ 'top left'
+ 'bottom left'
+ 'bottom right'
+ 'top right'
+ ]
+
+ window.drops = {}
+
+ for position in positions
+ drops[position] = new _Drop
+ target: $target[0]
+ classes: 'tether-theme-arrows-dark'
+ position: position
+ constrainToWindow: false
+ openOn: ''
+ content: '<div style="height: 50px; width: 50px"></div>'
+
+ openIndex = 0
+ frames = 0
+ frameLengthMS = 10
+
+ openAllDrops = ->
+ for position, drop of drops
+ drop.open()
+
+ openNextDrop = ->
+ for position, drop of drops
+ drop.close()
+
+ drops[positions[openIndex]].open()
+ drops[positions[(openIndex + 6) % positions.length]].open()
+
+ openIndex = (openIndex + 1) % positions.length
+
+ if frames > 5
+ finalDropState()
+ return
+
+ frames += 1
+
+ setTimeout openNextDrop, frameLengthMS * frames
+
+ finalDropState = ->
+ $(drops['top left'].dropContent).html('Marrying DOM elements for life.')
+ $(drops['bottom right'].dropContent).html('<a class="button" href="http://github.com/HubSpot/tether">★ On Github</a>')
+ drops['top left'].open()
+ drops['bottom right'].open()
+
+ if true or isMobile
+ drops['top left'].open()
+ drops['top left'].tether.position()
+ drops['bottom right'].open()
+ drops['bottom right'].tether.position()
+ finalDropState()
+
+ else
+ openNextDrop()
+
+setupBrowserDemo = ->
+ $browserDemo = $('.browser-demo.showcase')
+
+ $startPoint = $('.browser-demo-start-point')
+ $stopPoint = $('.browser-demo-stop-point')
+
+ $iframe = $('.browser-window iframe')
+ $browserContents = $('.browser-content .browser-demo-inner')
+
+ $sections = $('.browser-demo-section')
+
+ $('body').append """
+ <style>
+ table.showcase.browser-demo.fixed-bottom {
+ top: #{ $sections.length }00%
+ }
+ </style>
+ """
+
+ $(window).scroll ->
+ scrollTop = $(window).scrollTop()
+
+ if $startPoint.position().top < scrollTop and scrollTop + window.innerHeight < $stopPoint.position().top
+ $browserDemo.removeClass('fixed-bottom')
+ $browserDemo.addClass('fixed')
+
+ $sections.each ->
+ $section = $ @
+
+ if $section.position().top < scrollTop < $section.position().top + $section.outerHeight()
+ setSection $section.data('section')
+
+ return true
+
+ else
+ $browserDemo.removeAttr('data-section')
+ $browserDemo.removeClass('fixed')
+
+ if scrollTop + window.innerHeight > $stopPoint.position().top
+ $browserDemo.addClass('fixed-bottom')
+ else
+ $browserDemo.removeClass('fixed-bottom')
+
+ $iframe.load ->
+ iframeWindow = $iframe[0].contentWindow
+
+ $items = $iframe.contents().find('.item')
+
+ $items.each (i) ->
+ $item = $(@)
+
+ _iframeWindowDrop = iframeWindow.Drop.createContext classPrefix: 'tether'
+
+ drop = new _iframeWindowDrop
+ target: $item[0]
+ classes: 'tether-theme-arrows-dark'
+ position: 'right top'
+ constrainToWindow: true
+ openOn: 'click'
+ content: '''
+ <ul>
+ <li>Action&nbsp;1</li>
+ <li>Action&nbsp;2</li>
+ <li>Action&nbsp;3</li>
+ </ul>
+ '''
+
+ $item.data('drop', drop)
+
+ scrollInterval = undefined
+ scrollTop = 0
+ scrollTopDirection = 1
+
+ setSection = (section) ->
+ $browserDemo.attr('data-section', section)
+
+ $('.section-copy').removeClass('active')
+ $(""".section-copy[data-section="#{ section }"]""").addClass('active')
+
+ openExampleItem = ->
+ if isMobile
+ $iframe.contents().find('.item:first').data().drop.open()
+ else
+ $iframe.contents().find('.item:eq(2)').data().drop.open()
+
+ closeAllItems = ->
+ $iframe.contents().find('.item').each -> $(@).data().drop.close() or true
+
+ scrollLeftSection = ->
+ scrollInterval = setInterval ->
+ $iframe.contents().find('.left').scrollTop scrollTop
+ scrollTop += scrollTopDirection
+ if scrollTop > 50
+ scrollTopDirection = -1
+ if scrollTop < 0
+ scrollTopDirection = 1
+ , 30
+
+ stopScrollingLeftSection = ->
+ clearInterval scrollInterval
+
+ switch section
+
+ when 'what'
+ closeAllItems()
+ openExampleItem()
+ stopScrollingLeftSection()
+
+ when 'how'
+ closeAllItems()
+ openExampleItem()
+ stopScrollingLeftSection()
+ scrollLeftSection()
+
+ when 'why'
+ closeAllItems()
+ openExampleItem()
+ stopScrollingLeftSection()
+ scrollLeftSection()
+
+ when 'outro'
+ closeAllItems()
+ openExampleItem()
+ stopScrollingLeftSection()
+
+init() \ No newline at end of file
diff --git a/templates/assets/tether/docs/welcome/css/browser-demo.css b/templates/assets/tether/docs/welcome/css/browser-demo.css
new file mode 100644
index 0000000..0bd007b
--- /dev/null
+++ b/templates/assets/tether/docs/welcome/css/browser-demo.css
@@ -0,0 +1,86 @@
+html, body {
+ height: 100%;
+ overflow: hidden;
+ font-family: "proxima-nova", sans-serif; }
+
+.tether.tether-theme-arrows-dark .tether-content {
+ -webkit-filter: none;
+ filter: none;
+ background: #000; }
+ .tether.tether-theme-arrows-dark .tether-content ul {
+ color: #fff;
+ list-style: none;
+ padding: 0;
+ margin: 0; }
+
+.tether.tether-theme-arrows-dark.tether-element-attached-top.tether-element-attached-left.tether-target-attached-right .tether-content:before {
+ border-right-color: #000; }
+
+.browser-demo {
+ position: absolute;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ right: 0; }
+ .browser-demo *, .browser-demo *:after, .browser-demo *:before {
+ box-sizing: border-box; }
+ .browser-demo .top {
+ position: absolute;
+ height: 60px;
+ padding: 20px;
+ line-height: 40px;
+ width: 100%;
+ border-bottom: 1px solid rgba(0, 0, 0, 0.1); }
+ .browser-demo .bottom {
+ position: absolute;
+ top: 60px;
+ bottom: 0;
+ width: 100%; }
+ .browser-demo .bottom .left {
+ border-right: 1px solid rgba(0, 0, 0, 0.1);
+ position: absolute;
+ width: 30%;
+ height: 100%;
+ overflow: auto; }
+ .browser-demo .bottom .left .item {
+ height: 64px;
+ border-bottom: 1px solid rgba(0, 0, 0, 0.1);
+ cursor: pointer; }
+ .browser-demo .bottom .left .item:hover, .browser-demo .bottom .left .item.tether-open {
+ background: rgba(0, 0, 0, 0.1);
+ border-bottom: 1px solid transparent; }
+ .browser-demo .bottom .left .item:last-child {
+ border-bottom: 0; }
+ .browser-demo .bottom .right {
+ position: absolute;
+ width: 70%;
+ right: 0;
+ height: 100%;
+ padding: 20px; }
+ .browser-demo .title {
+ display: inline-block;
+ vertical-align: middle;
+ *vertical-align: auto;
+ *zoom: 1;
+ *display: inline;
+ background: rgba(0, 0, 0, 0.1);
+ width: 150px;
+ height: 15px;
+ margin-bottom: 20px; }
+ .browser-demo .word {
+ display: inline-block;
+ vertical-align: middle;
+ *vertical-align: auto;
+ *zoom: 1;
+ *display: inline;
+ background: rgba(0, 0, 0, 0.1);
+ width: 50px;
+ height: 8px;
+ margin-right: 5px;
+ margin-bottom: 5px; }
+ .browser-demo .word:nth-last-child(4n+1) {
+ width: 73px; }
+ .browser-demo .word:nth-last-child(10n+1) {
+ width: 14px; }
+ .browser-demo .word:nth-last-child(9n+1) {
+ width: 80px; }
diff --git a/templates/assets/tether/docs/welcome/css/prism.css b/templates/assets/tether/docs/welcome/css/prism.css
new file mode 100644
index 0000000..b86d1c2
--- /dev/null
+++ b/templates/assets/tether/docs/welcome/css/prism.css
@@ -0,0 +1,2 @@
+/* Prism.js */
+code[class*="language-"], pre[class*="language-"] {color: black; font-family: Consolas, Monaco, 'Andale Mono', monospace; direction: ltr; text-align: left; white-space: pre; word-spacing: normal; -moz-tab-size: 4; -o-tab-size: 4; tab-size: 4; -webkit-hyphens: none; -moz-hyphens: none; -ms-hyphens: none; hyphens: none; } /* Code blocks */ pre[class*="language-"] {padding: 1em; margin: .5em 0; overflow: auto; font-size: 14px; } :not(pre) > code[class*="language-"], pre[class*="language-"] {background: rgba(0, 0, 0, .05); } /* Inline code */ :not(pre) > code[class*="language-"] {padding: .1em; border-radius: .3em; } .token.comment, .token.prolog, .token.doctype, .token.cdata {color: slategray; } .token.punctuation {color: #999; } .namespace {opacity: .7; } .token.property, .token.tag, .token.boolean, .token.number, .token.constant, .token.symbol {color: #905; } .token.selector, .token.attr-name, .token.string, .token.builtin {color: #690; } .token.operator, .token.entity, .token.url, .language-css .token.string, .style .token.string, .token.variable {color: #a67f59; } .token.atrule, .token.attr-value, .token.keyword {color: #07a; } .token.regex, .token.important {color: #e90; } .token.important {font-weight: bold; } .token.entity {cursor: help; } \ No newline at end of file
diff --git a/templates/assets/tether/docs/welcome/css/welcome.css b/templates/assets/tether/docs/welcome/css/welcome.css
new file mode 100644
index 0000000..8b7a6ad
--- /dev/null
+++ b/templates/assets/tether/docs/welcome/css/welcome.css
@@ -0,0 +1,247 @@
+html, body {
+ height: 100%; }
+
+body {
+ margin: 0;
+ font-family: "proxima-nova", "Helvetica Neue", sans-serif; }
+
+.button {
+ display: inline-block;
+ border: 2px solid #333;
+ color: #333;
+ padding: 1em 1.25em;
+ font-weight: 500;
+ text-transform: uppercase;
+ letter-spacing: 3px;
+ text-decoration: none;
+ cursor: pointer;
+ width: 140px;
+ font-size: .8em;
+ line-height: 1.3em;
+ text-align: center; }
+
+.tether-element.tether-theme-arrows-dark .tether-content {
+ padding: 1em;
+ font-size: 1.1em; }
+ .tether-element.tether-theme-arrows-dark .tether-content .button {
+ border-color: #fff;
+ color: #fff;
+ width: 170px;
+ pointer-events: all; }
+
+.mobile-copy {
+ display: none; }
+ @media (max-width: 568px) {
+ .mobile-copy {
+ display: block; } }
+
+.button.dark {
+ background: #333;
+ color: #fff; }
+
+.hero-wrap {
+ height: 100%;
+ overflow: hidden; }
+
+table.showcase {
+ height: 100%;
+ width: 100%;
+ position: relative; }
+ table.showcase:after {
+ content: "";
+ display: block;
+ position: absolute;
+ left: 0;
+ right: 0;
+ bottom: 20px;
+ margin: auto;
+ height: 0;
+ width: 0;
+ border-width: 18px;
+ border-style: solid;
+ border-color: transparent;
+ border-top-color: rgba(0, 0, 0, 0.2); }
+ table.showcase.no-next-arrow:after {
+ display: none; }
+ table.showcase .showcase-inner {
+ margin: 40px auto 60px;
+ padding: 10px; }
+ table.showcase .showcase-inner h1 {
+ font-size: 50px;
+ text-align: center;
+ font-weight: 300; }
+ @media (max-width: 567px) {
+ table.showcase .showcase-inner h1 {
+ font-size: 40px; } }
+ table.showcase .showcase-inner h2 {
+ font-size: 24px;
+ text-align: center;
+ font-weight: 300;
+ margin: 1em 0 1em; }
+ @media (max-width: 567px) {
+ table.showcase .showcase-inner h2 {
+ font-size: 14px; } }
+ table.showcase .showcase-inner p {
+ text-align: center; }
+ table.showcase.hero {
+ text-align: center; }
+ table.showcase.hero .tether-target-demo {
+ display: inline-block;
+ vertical-align: middle;
+ *vertical-align: auto;
+ *zoom: 1;
+ *display: inline;
+ border: 2px dotted #000;
+ margin: 5rem auto;
+ padding: 5rem; }
+ @media (max-width: 567px) {
+ table.showcase.hero .tether-target-demo {
+ padding: 1rem; } }
+ table.showcase.share {
+ background: #f3f3f3; }
+ table.showcase.projects-showcase .showcase-inner .projects-list {
+ width: 80%;
+ max-width: 1200px;
+ margin: 0 auto; }
+ table.showcase.projects-showcase .showcase-inner .projects-list .project {
+ color: inherit;
+ text-decoration: none;
+ position: relative;
+ width: 50%;
+ float: left;
+ text-align: center;
+ margin-bottom: 2rem; }
+ table.showcase.projects-showcase .showcase-inner .projects-list .project:nth-child(odd) {
+ clear: left; }
+ table.showcase.projects-showcase .showcase-inner .projects-list .os-icon {
+ width: 8rem;
+ height: 8rem;
+ margin-bottom: 1rem;
+ background-size: 100%; }
+ table.showcase.projects-showcase .showcase-inner .projects-list h1 {
+ font-size: 2.5rem; }
+ table.showcase.projects-showcase .showcase-inner .projects-list p {
+ font-size: 1.3rem; }
+ table.showcase.browser-demo {
+ background-image: -webkit-linear-gradient(top left, #723362 0%, #9d223c 100%);
+ background-image: linear-gradient(top left, #723362 0%, #9d223c 100%);
+ background-color: #9d223c;
+ position: absolute;
+ top: 100%; }
+ table.showcase.browser-demo.fixed {
+ position: fixed;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ z-index: 1; }
+ table.showcase.browser-demo.fixed .browser-demo-inner {
+ -webkit-transition: width 2s ease-in-out, height 2s ease-in-out;
+ transition: width 2s ease-in-out, height 2s ease-in-out; }
+ table.showcase.browser-demo.fixed[data-section="what"] {
+ box-shadow: 0 0 0 0; }
+ table.showcase.browser-demo.fixed[data-section="why"] .browser-demo-inner {
+ width: 70%; }
+ table.showcase.browser-demo.fixed[data-section="outro"] .showcase-inner {
+ pointer-events: all; }
+ table.showcase.browser-demo .showcase-inner {
+ pointer-events: none;
+ position: absolute;
+ left: 10%;
+ right: 40%;
+ top: 220px;
+ bottom: 120px;
+ margin: 0;
+ padding: 0; }
+ @media (max-width: 567px) {
+ table.showcase.browser-demo .showcase-inner {
+ bottom: 90px;
+ top: 180px; } }
+ table.showcase.browser-demo .browser-demo-inner {
+ height: 100%;
+ width: 100%; }
+ table.showcase.browser-demo .section-copy {
+ -webkit-transition: opacity 0.5s ease-in-out, top 0.5s ease-in-out;
+ transition: opacity 0.5s ease-in-out, top 0.5s ease-in-out;
+ opacity: 0;
+ position: absolute;
+ top: 0;
+ position: absolute;
+ height: 200px;
+ color: #fff;
+ text-align: center;
+ width: 100%; }
+ table.showcase.browser-demo .section-copy.active {
+ opacity: 1;
+ top: -150px; }
+ @media (max-width: 567px) {
+ table.showcase.browser-demo .section-copy.active {
+ top: -130px; } }
+ table.showcase.browser-demo .section-copy h2 {
+ font-size: 40px;
+ font-weight: bold;
+ line-height: 1;
+ margin: 25px 0 15px; }
+ @media (max-width: 567px) {
+ table.showcase.browser-demo .section-copy h2 {
+ font-size: 30px; } }
+ table.showcase.browser-demo .browser-window {
+ border-radius: 4px;
+ background: #fff;
+ position: relative;
+ height: 100%;
+ width: 100%;
+ max-width: 1200px;
+ margin: 0 auto; }
+ table.showcase.browser-demo .browser-window .browser-titlebar {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ border-bottom: 1px solid #eee;
+ height: 55px; }
+ table.showcase.browser-demo .browser-window .browser-titlebar .browser-dots {
+ padding: 16px; }
+ table.showcase.browser-demo .browser-window .browser-titlebar .browser-dots b {
+ display: inline-block;
+ vertical-align: middle;
+ *vertical-align: auto;
+ *zoom: 1;
+ *display: inline;
+ border-radius: 50%;
+ width: 10px;
+ height: 10px;
+ margin-right: 7px;
+ background: rgba(0, 0, 0, 0.1); }
+ table.showcase.browser-demo .browser-window .browser-frame {
+ position: absolute;
+ top: 55px;
+ left: 0;
+ right: 0;
+ bottom: 0; }
+ table.showcase.browser-demo .browser-window .browser-frame iframe {
+ border-radius: 0 0 4px 4px;
+ border: 0;
+ width: 100%;
+ height: 100%; }
+ table.showcase.browser-demo-section .section-scroll-copy {
+ position: relative;
+ z-index: 10;
+ color: #fff;
+ width: 100%;
+ font-size: 22px; }
+ table.showcase.browser-demo-section .section-scroll-copy .section-scroll-copy-inner {
+ position: absolute;
+ z-index: 10;
+ color: #fff;
+ right: 10%;
+ width: 23%; }
+ table.showcase.browser-demo-section .section-scroll-copy .section-scroll-copy-inner a {
+ color: inherit; }
+ table.showcase.browser-demo-section .section-scroll-copy .section-scroll-copy-inner .example-paragraph {
+ border-radius: 4px;
+ background: #000;
+ padding: 1rem; }
+
+.browser-content {
+ display: none; }
diff --git a/templates/assets/tether/docs/welcome/index.html b/templates/assets/tether/docs/welcome/index.html
new file mode 100644
index 0000000..d70d00d
--- /dev/null
+++ b/templates/assets/tether/docs/welcome/index.html
@@ -0,0 +1,226 @@
+<!doctype html>
+<head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <title>Tether – Marrying elements for life</title>
+ <meta name="description" content="Tether is a JavaScript and CSS library. It is free and open source and was developed by HubSpot developers Adam Schwartz (@adamfschwartz) and Zack Bloom (@zackbloom).">
+ <link rel="icon" href="http://static.hubspot.com/favicon.ico">
+
+ <script type="text/javascript" src="//use.typekit.net/ghy0wve.js"></script>
+ <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
+
+ <!-- Tether themes -->
+ <link rel="stylesheet" href="//github.hubspot.com/tether/dist/css/tether-theme-arrows-dark.css" />
+
+ <!-- Welcome docs styles -->
+ <link rel="stylesheet" href="//github.hubspot.com/tether/docs/welcome/css/prism.css" />
+ <link rel="stylesheet" href="//github.hubspot.com/tether/docs/welcome/css/welcome.css" />
+
+ <!-- OS icons -->
+ <link rel="stylesheet" href="http://github.hubspot.com/os-icons/os-icons.css" />
+</head>
+<body>
+ <div class="hero-wrap">
+ <table class="showcase hero"><tr><td>
+ <div class="showcase-inner">
+ <div class="tether-target-demo">
+ <h1>Tether</h1>
+ <div class="mobile-copy">
+ <h2>Marrying elements for life</h2>
+ <p>
+ <a class="button" href="http://github.com/HubSpot/tether">★ On Github</a>
+ </p>
+ </div>
+ </div>
+ </div>
+ </td></tr></table>
+ </div>
+
+ <div class="browser-demo-start-point"></div>
+
+ <table class="showcase browser-demo"><tr><td>
+ <div class="showcase-inner">
+ <div class="section-copy" data-section="what">
+ <h2>What is Tether?</h2>
+ </div>
+ <div class="section-copy" data-section="how">
+ <h2>How Tether works.</h2>
+ </div>
+ <div class="section-copy" data-section="why">
+ <h2>Tether is powerful.</h2>
+ </div>
+ <div class="section-copy" data-section="outro">
+ <h2>Play with Tether</h2>
+ </div>
+ <div class="browser-demo-inner">
+ <div class="browser-window">
+ <div class="browser-titlebar">
+ <div class="browser-dots"><b></b><b></b><b></b></div>
+ </div>
+ <div class="browser-frame">
+ <iframe src="browser-demo.html"></iframe>
+ </div>
+ </div>
+ </div>
+ </div>
+ </td></tr></table>
+
+ <table class="showcase browser-demo-section no-next-arrow" data-section="what"><tr><td>
+ <div class="section-scroll-copy">
+ <div class="section-scroll-copy-inner">
+ <p>Tether is a low-level UI library that can be used to position any element on a page <i>next to any other element</i>.</p>
+ <p>It can be used for dropdown menus, tooltips, popovers, tours, help information, scroll guides, autocompletes, etc. The possibilities are endless.</p>
+ <p class="example-paragraph">In this example we're showing an action menu <em>tethered</em> to a list item.</p>
+ </div>
+ </div>
+ </td></tr></table>
+
+ <table class="showcase browser-demo-section no-next-arrow" data-section="how"><tr><td>
+ <div class="section-scroll-copy">
+ <div class="section-scroll-copy-inner">
+ <p>Tether works by creating an absolutely positioned element and meticulously tracking the movements of a <i>target</i> which you specify.</p>
+ <p>The <i>target</i> and <i>element</i> can be tethered together in a variety of different ways.</p>
+ <p class="example-paragraph">Notice how the <i>tethered element</i> stays tethered to its <i>target</i> list item even as the left pane is scrolled up and down.</p>
+ </div>
+ </div>
+ </td></tr></table>
+
+ <table class="showcase browser-demo-section no-next-arrow" data-section="why"><tr><td>
+ <div class="section-scroll-copy">
+ <div class="section-scroll-copy-inner">
+ <p>Tether can keep your element positioned properly even in some tough situations.</p>
+ <p>Tether handles all of the common pain points:</p>
+ <ul>
+ <li>Automatically detect collisions with the edge of the page or edge of the scrollParent</li>
+ <li>Automatically reposition on browser resize, scroll, and other events,</li>
+ <li>Constrain the position to any bounding box,</li>
+ </ul>
+ <p>...and a lot more.</p>
+ </div>
+ </div>
+ </td></tr></table>
+
+ <table class="showcase browser-demo-section no-next-arrow" data-section="outro"><tr><td>
+ <div class="section-scroll-copy">
+ <div class="section-scroll-copy-inner">
+ <p class="example-paragraph">Interact with this demo.</p>
+ <p>&nbsp;</p>
+ <p>To learn more, check out our <a href="/">documentation</a>.</p>
+ </div>
+ </div>
+ </td></tr></table>
+
+ <table class="showcase browser-demo-section no-next-arrow" data-section="__empty"><tr><td></td></tr></table>
+
+ <div class="browser-demo-stop-point"></div>
+
+ <table class="showcase projects-showcase no-next-arrow"><tr><td>
+ <div class="showcase-inner">
+ <h1>Tether Family</h1>
+ <h2>These projects are all powered by Tether's positioning engine.</h2>
+ <div class="projects-list">
+ <a href="//github.hubspot.com/drop/docs/welcome" class="project">
+ <h1>Drop</h1>
+ <span class="os-icon drop-icon"></span>
+ <p>Create dropdowns, popovers, and more.</p>
+ </a>
+ <a href="//github.hubspot.com/tooltip/docs/welcome" class="project">
+ <h1>Tooltip</h1>
+ <span class="os-icon tooltip-icon"></span>
+ <p>Stylable tooltips built on Tether.</p>
+ </a>
+ <a href="//github.hubspot.com/select/docs/welcome" class="project">
+ <h1>Select</h1>
+ <span class="os-icon select-icon"></span>
+ <p>Stylable select elements built on Tether.</p>
+ </a>
+ <a href="//github.hubspot.com/shepherd/docs/welcome" class="project">
+ <h1>Shepherd</h1>
+ <span class="os-icon shepherd-icon"></span>
+ <p>Guide your users through a tour of your app.</p>
+ </a>
+ </div>
+ </div>
+ </td></tr></table>
+
+ <table class="showcase last-showcase no-next-arrow share"><tr><td>
+ <div class="showcase-inner">
+ <h1>Share</h1>
+ <h2>Help us spread the word.</h2>
+ <!-- Share -->
+ <style>
+ .share-buttons {
+ margin: 4em auto;
+ text-align: center;
+ }
+ .share-button {
+ display: inline-block;
+ }
+ .retweet-button {
+ width: 100px;
+ margin-left: 20px;
+ }
+ .github-stars {
+ width: 100px;
+ }
+ </style>
+ <div class="share-buttons">
+ <div class="share-button retweet-button">
+ <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://github.hubspot.com/tether/docs/welcome" data-text="Tether.js - A positioning engine for JavaScript" data-count="horizontal" data-via="HubSpotDev">Tweet</a>
+ <script>
+ (function(){
+ var recommends, button;
+
+ if (Math.random() >= 0.5) {
+ recommends = ['hubspotdev', 'zackbloom', 'adamfschwartz'];
+ } else {
+ recommends = ['hubspotdev', 'adamfschwartz', 'zackbloom'];
+ }
+
+ button = document.querySelector('.twitter-share-button');
+
+ if (button) {
+ button.setAttribute('data-related', recommends.join(','));
+ }
+ })();
+ </script>
+ <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
+ </div>
+ <div class="share-button github-stars-button">
+ <iframe src="http://ghbtns.com/github-btn.html?user=HubSpot&amp;repo=tether&amp;type=watch&amp;count=true&amp;size=small" allowtransparency="true" frameborder="0" scrolling="0" width="100" height="20"></iframe>
+ </div>
+ </p>
+ </div>
+ </td></tr></table>
+
+ <!-- Tether javascript -->
+ <script src="//github.hubspot.com/tether/dist/js/tether.min.js"></script>
+
+ <!-- Welcome docs javascript -->
+ <script src="//github.hubspot.com/tether/docs/welcome/js/log.js"></script>
+ <script src="//github.hubspot.com/tether/docs/welcome/js/jquery.js"></script>
+ <script src="//github.hubspot.com/tether/docs/welcome/js/drop.js"></script>
+ <script src="//github.hubspot.com/tether/docs/welcome/js/welcome.js"></script>
+
+ <!-- HubSpot analytics -->
+ <script type="text/javascript">
+ (function(d,s,i,r) {
+ if (d.getElementById(i)){return;}
+ var n=d.createElement(s),e=d.getElementsByTagName(s)[0];
+ n.id=i;n.src='//js.hubspot.com/analytics/'+(Math.ceil(new Date()/r)*r)+'/51294.js';
+ e.parentNode.insertBefore(n, e);
+ })(document,"script","hs-analytics",300000);
+ </script>
+
+ <!-- Google analytics -->
+ <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', 'UA-45159009-1', 'auto');
+ ga('send', 'pageview');
+ </script>
+</body>
+</html>
diff --git a/templates/assets/tether/docs/welcome/js/drop.js b/templates/assets/tether/docs/welcome/js/drop.js
new file mode 100644
index 0000000..0058819
--- /dev/null
+++ b/templates/assets/tether/docs/welcome/js/drop.js
@@ -0,0 +1,239 @@
+(function() {
+ var Evented, MIRROR_ATTACH, addClass, allDrops, clickEvent, createContext, extend, hasClass, removeClass, sortAttach, touchDevice, _ref,
+ __hasProp = {}.hasOwnProperty,
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
+
+ _ref = Tether.Utils, extend = _ref.extend, addClass = _ref.addClass, removeClass = _ref.removeClass, hasClass = _ref.hasClass, Evented = _ref.Evented;
+
+ touchDevice = 'ontouchstart' in document.documentElement;
+
+ clickEvent = touchDevice ? 'touchstart' : 'click';
+
+ sortAttach = function(str) {
+ var first, second, _ref1, _ref2;
+ _ref1 = str.split(' '), first = _ref1[0], second = _ref1[1];
+ if (first === 'left' || first === 'right') {
+ _ref2 = [second, first], first = _ref2[0], second = _ref2[1];
+ }
+ return [first, second].join(' ');
+ };
+
+ MIRROR_ATTACH = {
+ left: 'right',
+ right: 'left',
+ top: 'bottom',
+ bottom: 'top',
+ middle: 'middle',
+ center: 'center'
+ };
+
+ allDrops = {};
+
+ createContext = function(options) {
+ var DropInstance, defaultOptions, drop, _name;
+ if (options == null) {
+ options = {};
+ }
+ drop = function() {
+ return (function(func, args, ctor) {
+ ctor.prototype = func.prototype;
+ var child = new ctor, result = func.apply(child, args);
+ return Object(result) === result ? result : child;
+ })(DropInstance, arguments, function(){});
+ };
+ extend(drop, {
+ createContext: createContext,
+ drops: [],
+ defaults: {}
+ });
+ defaultOptions = {
+ classPrefix: 'drop',
+ defaults: {
+ attach: 'bottom left',
+ openOn: 'click',
+ constrainToScrollParent: true,
+ constrainToWindow: true,
+ classes: '',
+ tetherOptions: {}
+ }
+ };
+ extend(drop, defaultOptions, options);
+ extend(drop.defaults, defaultOptions.defaults, options.defaults);
+ if (allDrops[_name = drop.classPrefix] == null) {
+ allDrops[_name] = [];
+ }
+ drop.updateBodyClasses = function() {
+ var anyOpen, _drop, _i, _len, _ref1;
+ anyOpen = false;
+ _ref1 = allDrops[drop.classPrefix];
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+ _drop = _ref1[_i];
+ if (!(_drop.isOpened())) {
+ continue;
+ }
+ anyOpen = true;
+ break;
+ }
+ if (anyOpen) {
+ return addClass(document.body, "" + drop.classPrefix + "-open");
+ } else {
+ return removeClass(document.body, "" + drop.classPrefix + "-open");
+ }
+ };
+ DropInstance = (function(_super) {
+ __extends(DropInstance, _super);
+
+ function DropInstance(options) {
+ this.options = options;
+ this.options = extend({}, drop.defaults, this.options);
+ this.target = this.options.target;
+ if (this.target == null) {
+ throw new Error('Drop Error: You must provide a target.');
+ }
+ drop.drops.push(this);
+ allDrops[drop.classPrefix].push(this);
+ this.setupElements();
+ this.setupEvents();
+ this.setupTether();
+ }
+
+ DropInstance.prototype.setupElements = function() {
+ this.drop = document.createElement('div');
+ addClass(this.drop, drop.classPrefix);
+ if (this.options.classes) {
+ addClass(this.drop, this.options.classes);
+ }
+ this.dropContent = document.createElement('div');
+ addClass(this.dropContent, "" + drop.classPrefix + "-content");
+ if (typeof this.options.content === 'object') {
+ this.dropContent.appendChild(this.options.content);
+ } else {
+ this.dropContent.innerHTML = this.options.content;
+ }
+ return this.drop.appendChild(this.dropContent);
+ };
+
+ DropInstance.prototype.setupTether = function() {
+ var constraints, dropAttach;
+ dropAttach = this.options.position.split(' ');
+ dropAttach[0] = MIRROR_ATTACH[dropAttach[0]];
+ dropAttach = dropAttach.join(' ');
+ constraints = [];
+ if (this.options.constrainToScrollParent) {
+ constraints.push({
+ to: 'scrollParent',
+ pin: 'top, bottom',
+ attachment: 'together none'
+ });
+ }
+ if (this.options.constrainToWindow !== false) {
+ constraints.push({
+ to: 'window',
+ pin: true,
+ attachment: 'together'
+ });
+ }
+ constraints.push({
+ to: 'scrollParent'
+ });
+ options = {
+ element: this.drop,
+ target: this.target,
+ attachment: sortAttach(dropAttach),
+ targetAttachment: sortAttach(this.options.position),
+ classPrefix: drop.classPrefix,
+ offset: '0 0',
+ targetOffset: '0 0',
+ enabled: false,
+ constraints: constraints
+ };
+ if (this.options.tether !== false) {
+ return this.tether = new Tether(extend({}, options, this.options.tether));
+ }
+ };
+
+ DropInstance.prototype.setupEvents = function() {
+ var events,
+ _this = this;
+ if (!this.options.openOn) {
+ return;
+ }
+ events = this.options.openOn.split(' ');
+ if (__indexOf.call(events, 'click') >= 0) {
+ this.target.addEventListener(clickEvent, function() {
+ return _this.toggle();
+ });
+ document.addEventListener(clickEvent, function(event) {
+ if (!_this.isOpened()) {
+ return;
+ }
+ if (event.target === _this.drop || _this.drop.contains(event.target)) {
+ return;
+ }
+ if (event.target === _this.target || _this.target.contains(event.target)) {
+ return;
+ }
+ return _this.close();
+ });
+ }
+ if (__indexOf.call(events, 'hover') >= 0) {
+ this.target.addEventListener('mouseover', function() {
+ return _this.open();
+ });
+ return this.target.addEventListener('mouseout', function() {
+ return _this.close();
+ });
+ }
+ };
+
+ DropInstance.prototype.isOpened = function() {
+ return hasClass(this.drop, "" + drop.classPrefix + "-open");
+ };
+
+ DropInstance.prototype.toggle = function() {
+ if (this.isOpened()) {
+ return this.close();
+ } else {
+ return this.open();
+ }
+ };
+
+ DropInstance.prototype.open = function() {
+ var _ref1;
+ if (!this.drop.parentNode) {
+ document.body.appendChild(this.drop);
+ }
+ addClass(this.target, "" + drop.classPrefix + "-open");
+ addClass(this.drop, "" + drop.classPrefix + "-open");
+ if ((_ref1 = this.tether) != null) {
+ _ref1.enable();
+ }
+ this.trigger('open');
+ return drop.updateBodyClasses();
+ };
+
+ DropInstance.prototype.close = function() {
+ var _ref1;
+ removeClass(this.target, "" + drop.classPrefix + "-open");
+ removeClass(this.drop, "" + drop.classPrefix + "-open");
+ this.trigger('close');
+ if ((_ref1 = this.tether) != null) {
+ _ref1.disable();
+ }
+ return drop.updateBodyClasses();
+ };
+
+ return DropInstance;
+
+ })(Evented);
+ return drop;
+ };
+
+ window.Drop = createContext();
+
+ document.addEventListener('DOMContentLoaded', function() {
+ return Drop.updateBodyClasses();
+ });
+
+}).call(this); \ No newline at end of file
diff --git a/templates/assets/tether/docs/welcome/js/jquery.js b/templates/assets/tether/docs/welcome/js/jquery.js
new file mode 100644
index 0000000..dfdf619
--- /dev/null
+++ b/templates/assets/tether/docs/welcome/js/jquery.js
@@ -0,0 +1,9597 @@
+/*!
+ * jQuery JavaScript Library v1.9.1
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2013-2-4
+ */
+(function( window, undefined ) {
+
+// Can't do this because several apps including ASP.NET trace
+// the stack via arguments.caller.callee and Firefox dies if
+// you try to trace through "use strict" call chains. (#13335)
+// Support: Firefox 18+
+//"use strict";
+var
+ // The deferred used on DOM ready
+ readyList,
+
+ // A central reference to the root jQuery(document)
+ rootjQuery,
+
+ // Support: IE<9
+ // For `typeof node.method` instead of `node.method !== undefined`
+ core_strundefined = typeof undefined,
+
+ // Use the correct document accordingly with window argument (sandbox)
+ document = window.document,
+ location = window.location,
+
+ // Map over jQuery in case of overwrite
+ _jQuery = window.jQuery,
+
+ // Map over the $ in case of overwrite
+ _$ = window.$,
+
+ // [[Class]] -> type pairs
+ class2type = {},
+
+ // List of deleted data cache ids, so we can reuse them
+ core_deletedIds = [],
+
+ core_version = "1.9.1",
+
+ // Save a reference to some core methods
+ core_concat = core_deletedIds.concat,
+ core_push = core_deletedIds.push,
+ core_slice = core_deletedIds.slice,
+ core_indexOf = core_deletedIds.indexOf,
+ core_toString = class2type.toString,
+ core_hasOwn = class2type.hasOwnProperty,
+ core_trim = core_version.trim,
+
+ // Define a local copy of jQuery
+ jQuery = function( selector, context ) {
+ // The jQuery object is actually just the init constructor 'enhanced'
+ return new jQuery.fn.init( selector, context, rootjQuery );
+ },
+
+ // Used for matching numbers
+ core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
+
+ // Used for splitting on whitespace
+ core_rnotwhite = /\S+/g,
+
+ // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
+ rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
+
+ // A simple way to check for HTML strings
+ // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
+ // Strict HTML recognition (#11290: must start with <)
+ rquickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,
+
+ // Match a standalone tag
+ rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
+
+ // JSON RegExp
+ rvalidchars = /^[\],:{}\s]*$/,
+ rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+ rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
+ rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,
+
+ // Matches dashed string for camelizing
+ rmsPrefix = /^-ms-/,
+ rdashAlpha = /-([\da-z])/gi,
+
+ // Used by jQuery.camelCase as callback to replace()
+ fcamelCase = function( all, letter ) {
+ return letter.toUpperCase();
+ },
+
+ // The ready event handler
+ completed = function( event ) {
+
+ // readyState === "complete" is good enough for us to call the dom ready in oldIE
+ if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) {
+ detach();
+ jQuery.ready();
+ }
+ },
+ // Clean-up method for dom ready events
+ detach = function() {
+ if ( document.addEventListener ) {
+ document.removeEventListener( "DOMContentLoaded", completed, false );
+ window.removeEventListener( "load", completed, false );
+
+ } else {
+ document.detachEvent( "onreadystatechange", completed );
+ window.detachEvent( "onload", completed );
+ }
+ };
+
+jQuery.fn = jQuery.prototype = {
+ // The current version of jQuery being used
+ jquery: core_version,
+
+ constructor: jQuery,
+ init: function( selector, context, rootjQuery ) {
+ var match, elem;
+
+ // HANDLE: $(""), $(null), $(undefined), $(false)
+ if ( !selector ) {
+ return this;
+ }
+
+ // Handle HTML strings
+ if ( typeof selector === "string" ) {
+ if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
+ // Assume that strings that start and end with <> are HTML and skip the regex check
+ match = [ null, selector, null ];
+
+ } else {
+ match = rquickExpr.exec( selector );
+ }
+
+ // Match html or make sure no context is specified for #id
+ if ( match && (match[1] || !context) ) {
+
+ // HANDLE: $(html) -> $(array)
+ if ( match[1] ) {
+ context = context instanceof jQuery ? context[0] : context;
+
+ // scripts is true for back-compat
+ jQuery.merge( this, jQuery.parseHTML(
+ match[1],
+ context && context.nodeType ? context.ownerDocument || context : document,
+ true
+ ) );
+
+ // HANDLE: $(html, props)
+ if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
+ for ( match in context ) {
+ // Properties of context are called as methods if possible
+ if ( jQuery.isFunction( this[ match ] ) ) {
+ this[ match ]( context[ match ] );
+
+ // ...and otherwise set as attributes
+ } else {
+ this.attr( match, context[ match ] );
+ }
+ }
+ }
+
+ return this;
+
+ // HANDLE: $(#id)
+ } else {
+ elem = document.getElementById( match[2] );
+
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ if ( elem && elem.parentNode ) {
+ // Handle the case where IE and Opera return items
+ // by name instead of ID
+ if ( elem.id !== match[2] ) {
+ return rootjQuery.find( selector );
+ }
+
+ // Otherwise, we inject the element directly into the jQuery object
+ this.length = 1;
+ this[0] = elem;
+ }
+
+ this.context = document;
+ this.selector = selector;
+ return this;
+ }
+
+ // HANDLE: $(expr, $(...))
+ } else if ( !context || context.jquery ) {
+ return ( context || rootjQuery ).find( selector );
+
+ // HANDLE: $(expr, context)
+ // (which is just equivalent to: $(context).find(expr)
+ } else {
+ return this.constructor( context ).find( selector );
+ }
+
+ // HANDLE: $(DOMElement)
+ } else if ( selector.nodeType ) {
+ this.context = this[0] = selector;
+ this.length = 1;
+ return this;
+
+ // HANDLE: $(function)
+ // Shortcut for document ready
+ } else if ( jQuery.isFunction( selector ) ) {
+ return rootjQuery.ready( selector );
+ }
+
+ if ( selector.selector !== undefined ) {
+ this.selector = selector.selector;
+ this.context = selector.context;
+ }
+
+ return jQuery.makeArray( selector, this );
+ },
+
+ // Start with an empty selector
+ selector: "",
+
+ // The default length of a jQuery object is 0
+ length: 0,
+
+ // The number of elements contained in the matched element set
+ size: function() {
+ return this.length;
+ },
+
+ toArray: function() {
+ return core_slice.call( this );
+ },
+
+ // Get the Nth element in the matched element set OR
+ // Get the whole matched element set as a clean array
+ get: function( num ) {
+ return num == null ?
+
+ // Return a 'clean' array
+ this.toArray() :
+
+ // Return just the object
+ ( num < 0 ? this[ this.length + num ] : this[ num ] );
+ },
+
+ // Take an array of elements and push it onto the stack
+ // (returning the new matched element set)
+ pushStack: function( elems ) {
+
+ // Build a new jQuery matched element set
+ var ret = jQuery.merge( this.constructor(), elems );
+
+ // Add the old object onto the stack (as a reference)
+ ret.prevObject = this;
+ ret.context = this.context;
+
+ // Return the newly-formed element set
+ return ret;
+ },
+
+ // Execute a callback for every element in the matched set.
+ // (You can seed the arguments with an array of args, but this is
+ // only used internally.)
+ each: function( callback, args ) {
+ return jQuery.each( this, callback, args );
+ },
+
+ ready: function( fn ) {
+ // Add the callback
+ jQuery.ready.promise().done( fn );
+
+ return this;
+ },
+
+ slice: function() {
+ return this.pushStack( core_slice.apply( this, arguments ) );
+ },
+
+ first: function() {
+ return this.eq( 0 );
+ },
+
+ last: function() {
+ return this.eq( -1 );
+ },
+
+ eq: function( i ) {
+ var len = this.length,
+ j = +i + ( i < 0 ? len : 0 );
+ return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
+ },
+
+ map: function( callback ) {
+ return this.pushStack( jQuery.map(this, function( elem, i ) {
+ return callback.call( elem, i, elem );
+ }));
+ },
+
+ end: function() {
+ return this.prevObject || this.constructor(null);
+ },
+
+ // For internal use only.
+ // Behaves like an Array's method, not like a jQuery method.
+ push: core_push,
+ sort: [].sort,
+ splice: [].splice
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+jQuery.extend = jQuery.fn.extend = function() {
+ var src, copyIsArray, copy, name, options, clone,
+ target = arguments[0] || {},
+ i = 1,
+ length = arguments.length,
+ deep = false;
+
+ // Handle a deep copy situation
+ if ( typeof target === "boolean" ) {
+ deep = target;
+ target = arguments[1] || {};
+ // skip the boolean and the target
+ i = 2;
+ }
+
+ // Handle case when target is a string or something (possible in deep copy)
+ if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+ target = {};
+ }
+
+ // extend jQuery itself if only one argument is passed
+ if ( length === i ) {
+ target = this;
+ --i;
+ }
+
+ for ( ; i < length; i++ ) {
+ // Only deal with non-null/undefined values
+ if ( (options = arguments[ i ]) != null ) {
+ // Extend the base object
+ for ( name in options ) {
+ src = target[ name ];
+ copy = options[ name ];
+
+ // Prevent never-ending loop
+ if ( target === copy ) {
+ continue;
+ }
+
+ // Recurse if we're merging plain objects or arrays
+ if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+ if ( copyIsArray ) {
+ copyIsArray = false;
+ clone = src && jQuery.isArray(src) ? src : [];
+
+ } else {
+ clone = src && jQuery.isPlainObject(src) ? src : {};
+ }
+
+ // Never move original objects, clone them
+ target[ name ] = jQuery.extend( deep, clone, copy );
+
+ // Don't bring in undefined values
+ } else if ( copy !== undefined ) {
+ target[ name ] = copy;
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
+
+jQuery.extend({
+ noConflict: function( deep ) {
+ if ( window.$ === jQuery ) {
+ window.$ = _$;
+ }
+
+ if ( deep && window.jQuery === jQuery ) {
+ window.jQuery = _jQuery;
+ }
+
+ return jQuery;
+ },
+
+ // Is the DOM ready to be used? Set to true once it occurs.
+ isReady: false,
+
+ // A counter to track how many items to wait for before
+ // the ready event fires. See #6781
+ readyWait: 1,
+
+ // Hold (or release) the ready event
+ holdReady: function( hold ) {
+ if ( hold ) {
+ jQuery.readyWait++;
+ } else {
+ jQuery.ready( true );
+ }
+ },
+
+ // Handle when the DOM is ready
+ ready: function( wait ) {
+
+ // Abort if there are pending holds or we're already ready
+ if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
+ return;
+ }
+
+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+ if ( !document.body ) {
+ return setTimeout( jQuery.ready );
+ }
+
+ // Remember that the DOM is ready
+ jQuery.isReady = true;
+
+ // If a normal DOM Ready event fired, decrement, and wait if need be
+ if ( wait !== true && --jQuery.readyWait > 0 ) {
+ return;
+ }
+
+ // If there are functions bound, to execute
+ readyList.resolveWith( document, [ jQuery ] );
+
+ // Trigger any bound ready events
+ if ( jQuery.fn.trigger ) {
+ jQuery( document ).trigger("ready").off("ready");
+ }
+ },
+
+ // See test/unit/core.js for details concerning isFunction.
+ // Since version 1.3, DOM methods and functions like alert
+ // aren't supported. They return false on IE (#2968).
+ isFunction: function( obj ) {
+ return jQuery.type(obj) === "function";
+ },
+
+ isArray: Array.isArray || function( obj ) {
+ return jQuery.type(obj) === "array";
+ },
+
+ isWindow: function( obj ) {
+ return obj != null && obj == obj.window;
+ },
+
+ isNumeric: function( obj ) {
+ return !isNaN( parseFloat(obj) ) && isFinite( obj );
+ },
+
+ type: function( obj ) {
+ if ( obj == null ) {
+ return String( obj );
+ }
+ return typeof obj === "object" || typeof obj === "function" ?
+ class2type[ core_toString.call(obj) ] || "object" :
+ typeof obj;
+ },
+
+ isPlainObject: function( obj ) {
+ // Must be an Object.
+ // Because of IE, we also have to check the presence of the constructor property.
+ // Make sure that DOM nodes and window objects don't pass through, as well
+ if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ try {
+ // Not own constructor property must be Object
+ if ( obj.constructor &&
+ !core_hasOwn.call(obj, "constructor") &&
+ !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
+ return false;
+ }
+ } catch ( e ) {
+ // IE8,9 Will throw exceptions on certain host objects #9897
+ return false;
+ }
+
+ // Own properties are enumerated firstly, so to speed up,
+ // if last one is own, then all properties are own.
+
+ var key;
+ for ( key in obj ) {}
+
+ return key === undefined || core_hasOwn.call( obj, key );
+ },
+
+ isEmptyObject: function( obj ) {
+ var name;
+ for ( name in obj ) {
+ return false;
+ }
+ return true;
+ },
+
+ error: function( msg ) {
+ throw new Error( msg );
+ },
+
+ // data: string of html
+ // context (optional): If specified, the fragment will be created in this context, defaults to document
+ // keepScripts (optional): If true, will include scripts passed in the html string
+ parseHTML: function( data, context, keepScripts ) {
+ if ( !data || typeof data !== "string" ) {
+ return null;
+ }
+ if ( typeof context === "boolean" ) {
+ keepScripts = context;
+ context = false;
+ }
+ context = context || document;
+
+ var parsed = rsingleTag.exec( data ),
+ scripts = !keepScripts && [];
+
+ // Single tag
+ if ( parsed ) {
+ return [ context.createElement( parsed[1] ) ];
+ }
+
+ parsed = jQuery.buildFragment( [ data ], context, scripts );
+ if ( scripts ) {
+ jQuery( scripts ).remove();
+ }
+ return jQuery.merge( [], parsed.childNodes );
+ },
+
+ parseJSON: function( data ) {
+ // Attempt to parse using the native JSON parser first
+ if ( window.JSON && window.JSON.parse ) {
+ return window.JSON.parse( data );
+ }
+
+ if ( data === null ) {
+ return data;
+ }
+
+ if ( typeof data === "string" ) {
+
+ // Make sure leading/trailing whitespace is removed (IE can't handle it)
+ data = jQuery.trim( data );
+
+ if ( data ) {
+ // Make sure the incoming data is actual JSON
+ // Logic borrowed from http://json.org/json2.js
+ if ( rvalidchars.test( data.replace( rvalidescape, "@" )
+ .replace( rvalidtokens, "]" )
+ .replace( rvalidbraces, "")) ) {
+
+ return ( new Function( "return " + data ) )();
+ }
+ }
+ }
+
+ jQuery.error( "Invalid JSON: " + data );
+ },
+
+ // Cross-browser xml parsing
+ parseXML: function( data ) {
+ var xml, tmp;
+ if ( !data || typeof data !== "string" ) {
+ return null;
+ }
+ try {
+ if ( window.DOMParser ) { // Standard
+ tmp = new DOMParser();
+ xml = tmp.parseFromString( data , "text/xml" );
+ } else { // IE
+ xml = new ActiveXObject( "Microsoft.XMLDOM" );
+ xml.async = "false";
+ xml.loadXML( data );
+ }
+ } catch( e ) {
+ xml = undefined;
+ }
+ if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
+ jQuery.error( "Invalid XML: " + data );
+ }
+ return xml;
+ },
+
+ noop: function() {},
+
+ // Evaluates a script in a global context
+ // Workarounds based on findings by Jim Driscoll
+ // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
+ globalEval: function( data ) {
+ if ( data && jQuery.trim( data ) ) {
+ // We use execScript on Internet Explorer
+ // We use an anonymous function so that context is window
+ // rather than jQuery in Firefox
+ ( window.execScript || function( data ) {
+ window[ "eval" ].call( window, data );
+ } )( data );
+ }
+ },
+
+ // Convert dashed to camelCase; used by the css and data modules
+ // Microsoft forgot to hump their vendor prefix (#9572)
+ camelCase: function( string ) {
+ return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+ },
+
+ nodeName: function( elem, name ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+ },
+
+ // args is for internal usage only
+ each: function( obj, callback, args ) {
+ var value,
+ i = 0,
+ length = obj.length,
+ isArray = isArraylike( obj );
+
+ if ( args ) {
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback.apply( obj[ i ], args );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( i in obj ) {
+ value = callback.apply( obj[ i ], args );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ }
+
+ // A special, fast, case for the most common use of each
+ } else {
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback.call( obj[ i ], i, obj[ i ] );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( i in obj ) {
+ value = callback.call( obj[ i ], i, obj[ i ] );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ }
+ }
+
+ return obj;
+ },
+
+ // Use native String.trim function wherever possible
+ trim: core_trim && !core_trim.call("\uFEFF\xA0") ?
+ function( text ) {
+ return text == null ?
+ "" :
+ core_trim.call( text );
+ } :
+
+ // Otherwise use our own trimming functionality
+ function( text ) {
+ return text == null ?
+ "" :
+ ( text + "" ).replace( rtrim, "" );
+ },
+
+ // results is for internal usage only
+ makeArray: function( arr, results ) {
+ var ret = results || [];
+
+ if ( arr != null ) {
+ if ( isArraylike( Object(arr) ) ) {
+ jQuery.merge( ret,
+ typeof arr === "string" ?
+ [ arr ] : arr
+ );
+ } else {
+ core_push.call( ret, arr );
+ }
+ }
+
+ return ret;
+ },
+
+ inArray: function( elem, arr, i ) {
+ var len;
+
+ if ( arr ) {
+ if ( core_indexOf ) {
+ return core_indexOf.call( arr, elem, i );
+ }
+
+ len = arr.length;
+ i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
+
+ for ( ; i < len; i++ ) {
+ // Skip accessing in sparse arrays
+ if ( i in arr && arr[ i ] === elem ) {
+ return i;
+ }
+ }
+ }
+
+ return -1;
+ },
+
+ merge: function( first, second ) {
+ var l = second.length,
+ i = first.length,
+ j = 0;
+
+ if ( typeof l === "number" ) {
+ for ( ; j < l; j++ ) {
+ first[ i++ ] = second[ j ];
+ }
+ } else {
+ while ( second[j] !== undefined ) {
+ first[ i++ ] = second[ j++ ];
+ }
+ }
+
+ first.length = i;
+
+ return first;
+ },
+
+ grep: function( elems, callback, inv ) {
+ var retVal,
+ ret = [],
+ i = 0,
+ length = elems.length;
+ inv = !!inv;
+
+ // Go through the array, only saving the items
+ // that pass the validator function
+ for ( ; i < length; i++ ) {
+ retVal = !!callback( elems[ i ], i );
+ if ( inv !== retVal ) {
+ ret.push( elems[ i ] );
+ }
+ }
+
+ return ret;
+ },
+
+ // arg is for internal usage only
+ map: function( elems, callback, arg ) {
+ var value,
+ i = 0,
+ length = elems.length,
+ isArray = isArraylike( elems ),
+ ret = [];
+
+ // Go through the array, translating each of the items to their
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret[ ret.length ] = value;
+ }
+ }
+
+ // Go through every key on the object,
+ } else {
+ for ( i in elems ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret[ ret.length ] = value;
+ }
+ }
+ }
+
+ // Flatten any nested arrays
+ return core_concat.apply( [], ret );
+ },
+
+ // A global GUID counter for objects
+ guid: 1,
+
+ // Bind a function to a context, optionally partially applying any
+ // arguments.
+ proxy: function( fn, context ) {
+ var args, proxy, tmp;
+
+ if ( typeof context === "string" ) {
+ tmp = fn[ context ];
+ context = fn;
+ fn = tmp;
+ }
+
+ // Quick check to determine if target is callable, in the spec
+ // this throws a TypeError, but we will just return undefined.
+ if ( !jQuery.isFunction( fn ) ) {
+ return undefined;
+ }
+
+ // Simulated bind
+ args = core_slice.call( arguments, 2 );
+ proxy = function() {
+ return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );
+ };
+
+ // Set the guid of unique handler to the same of original handler, so it can be removed
+ proxy.guid = fn.guid = fn.guid || jQuery.guid++;
+
+ return proxy;
+ },
+
+ // Multifunctional method to get and set values of a collection
+ // The value/s can optionally be executed if it's a function
+ access: function( elems, fn, key, value, chainable, emptyGet, raw ) {
+ var i = 0,
+ length = elems.length,
+ bulk = key == null;
+
+ // Sets many values
+ if ( jQuery.type( key ) === "object" ) {
+ chainable = true;
+ for ( i in key ) {
+ jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
+ }
+
+ // Sets one value
+ } else if ( value !== undefined ) {
+ chainable = true;
+
+ if ( !jQuery.isFunction( value ) ) {
+ raw = true;
+ }
+
+ if ( bulk ) {
+ // Bulk operations run against the entire set
+ if ( raw ) {
+ fn.call( elems, value );
+ fn = null;
+
+ // ...except when executing function values
+ } else {
+ bulk = fn;
+ fn = function( elem, key, value ) {
+ return bulk.call( jQuery( elem ), value );
+ };
+ }
+ }
+
+ if ( fn ) {
+ for ( ; i < length; i++ ) {
+ fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
+ }
+ }
+ }
+
+ return chainable ?
+ elems :
+
+ // Gets
+ bulk ?
+ fn.call( elems ) :
+ length ? fn( elems[0], key ) : emptyGet;
+ },
+
+ now: function() {
+ return ( new Date() ).getTime();
+ }
+});
+
+jQuery.ready.promise = function( obj ) {
+ if ( !readyList ) {
+
+ readyList = jQuery.Deferred();
+
+ // Catch cases where $(document).ready() is called after the browser event has already occurred.
+ // we once tried to use readyState "interactive" here, but it caused issues like the one
+ // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
+ if ( document.readyState === "complete" ) {
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
+ setTimeout( jQuery.ready );
+
+ // Standards-based browsers support DOMContentLoaded
+ } else if ( document.addEventListener ) {
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", completed, false );
+
+ // A fallback to window.onload, that will always work
+ window.addEventListener( "load", completed, false );
+
+ // If IE event model is used
+ } else {
+ // Ensure firing before onload, maybe late but safe also for iframes
+ document.attachEvent( "onreadystatechange", completed );
+
+ // A fallback to window.onload, that will always work
+ window.attachEvent( "onload", completed );
+
+ // If IE and not a frame
+ // continually check to see if the document is ready
+ var top = false;
+
+ try {
+ top = window.frameElement == null && document.documentElement;
+ } catch(e) {}
+
+ if ( top && top.doScroll ) {
+ (function doScrollCheck() {
+ if ( !jQuery.isReady ) {
+
+ try {
+ // Use the trick by Diego Perini
+ // http://javascript.nwbox.com/IEContentLoaded/
+ top.doScroll("left");
+ } catch(e) {
+ return setTimeout( doScrollCheck, 50 );
+ }
+
+ // detach all dom ready events
+ detach();
+
+ // and execute any waiting functions
+ jQuery.ready();
+ }
+ })();
+ }
+ }
+ }
+ return readyList.promise( obj );
+};
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
+ class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+function isArraylike( obj ) {
+ var length = obj.length,
+ type = jQuery.type( obj );
+
+ if ( jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ if ( obj.nodeType === 1 && length ) {
+ return true;
+ }
+
+ return type === "array" || type !== "function" &&
+ ( length === 0 ||
+ typeof length === "number" && length > 0 && ( length - 1 ) in obj );
+}
+
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
+// String to Object options format cache
+var optionsCache = {};
+
+// Convert String-formatted options into Object-formatted ones and store in cache
+function createOptions( options ) {
+ var object = optionsCache[ options ] = {};
+ jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) {
+ object[ flag ] = true;
+ });
+ return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ * options: an optional list of space-separated options that will change how
+ * the callback list behaves or a more traditional option object
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible options:
+ *
+ * once: will ensure the callback list can only be fired once (like a Deferred)
+ *
+ * memory: will keep track of previous values and will call any callback added
+ * after the list has been fired right away with the latest "memorized"
+ * values (like a Deferred)
+ *
+ * unique: will ensure a callback can only be added once (no duplicate in the list)
+ *
+ * stopOnFalse: interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( options ) {
+
+ // Convert options from String-formatted to Object-formatted if needed
+ // (we check in cache first)
+ options = typeof options === "string" ?
+ ( optionsCache[ options ] || createOptions( options ) ) :
+ jQuery.extend( {}, options );
+
+ var // Flag to know if list is currently firing
+ firing,
+ // Last fire value (for non-forgettable lists)
+ memory,
+ // Flag to know if list was already fired
+ fired,
+ // End of the loop when firing
+ firingLength,
+ // Index of currently firing callback (modified by remove if needed)
+ firingIndex,
+ // First callback to fire (used internally by add and fireWith)
+ firingStart,
+ // Actual callback list
+ list = [],
+ // Stack of fire calls for repeatable lists
+ stack = !options.once && [],
+ // Fire callbacks
+ fire = function( data ) {
+ memory = options.memory && data;
+ fired = true;
+ firingIndex = firingStart || 0;
+ firingStart = 0;
+ firingLength = list.length;
+ firing = true;
+ for ( ; list && firingIndex < firingLength; firingIndex++ ) {
+ if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
+ memory = false; // To prevent further calls using add
+ break;
+ }
+ }
+ firing = false;
+ if ( list ) {
+ if ( stack ) {
+ if ( stack.length ) {
+ fire( stack.shift() );
+ }
+ } else if ( memory ) {
+ list = [];
+ } else {
+ self.disable();
+ }
+ }
+ },
+ // Actual Callbacks object
+ self = {
+ // Add a callback or a collection of callbacks to the list
+ add: function() {
+ if ( list ) {
+ // First, we save the current length
+ var start = list.length;
+ (function add( args ) {
+ jQuery.each( args, function( _, arg ) {
+ var type = jQuery.type( arg );
+ if ( type === "function" ) {
+ if ( !options.unique || !self.has( arg ) ) {
+ list.push( arg );
+ }
+ } else if ( arg && arg.length && type !== "string" ) {
+ // Inspect recursively
+ add( arg );
+ }
+ });
+ })( arguments );
+ // Do we need to add the callbacks to the
+ // current firing batch?
+ if ( firing ) {
+ firingLength = list.length;
+ // With memory, if we're not firing then
+ // we should call right away
+ } else if ( memory ) {
+ firingStart = start;
+ fire( memory );
+ }
+ }
+ return this;
+ },
+ // Remove a callback from the list
+ remove: function() {
+ if ( list ) {
+ jQuery.each( arguments, function( _, arg ) {
+ var index;
+ while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
+ list.splice( index, 1 );
+ // Handle firing indexes
+ if ( firing ) {
+ if ( index <= firingLength ) {
+ firingLength--;
+ }
+ if ( index <= firingIndex ) {
+ firingIndex--;
+ }
+ }
+ }
+ });
+ }
+ return this;
+ },
+ // Check if a given callback is in the list.
+ // If no argument is given, return whether or not list has callbacks attached.
+ has: function( fn ) {
+ return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
+ },
+ // Remove all callbacks from the list
+ empty: function() {
+ list = [];
+ return this;
+ },
+ // Have the list do nothing anymore
+ disable: function() {
+ list = stack = memory = undefined;
+ return this;
+ },
+ // Is it disabled?
+ disabled: function() {
+ return !list;
+ },
+ // Lock the list in its current state
+ lock: function() {
+ stack = undefined;
+ if ( !memory ) {
+ self.disable();
+ }
+ return this;
+ },
+ // Is it locked?
+ locked: function() {
+ return !stack;
+ },
+ // Call all callbacks with the given context and arguments
+ fireWith: function( context, args ) {
+ args = args || [];
+ args = [ context, args.slice ? args.slice() : args ];
+ if ( list && ( !fired || stack ) ) {
+ if ( firing ) {
+ stack.push( args );
+ } else {
+ fire( args );
+ }
+ }
+ return this;
+ },
+ // Call all the callbacks with the given arguments
+ fire: function() {
+ self.fireWith( this, arguments );
+ return this;
+ },
+ // To know if the callbacks have already been called at least once
+ fired: function() {
+ return !!fired;
+ }
+ };
+
+ return self;
+};
+jQuery.extend({
+
+ Deferred: function( func ) {
+ var tuples = [
+ // action, add listener, listener list, final state
+ [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
+ [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
+ [ "notify", "progress", jQuery.Callbacks("memory") ]
+ ],
+ state = "pending",
+ promise = {
+ state: function() {
+ return state;
+ },
+ always: function() {
+ deferred.done( arguments ).fail( arguments );
+ return this;
+ },
+ then: function( /* fnDone, fnFail, fnProgress */ ) {
+ var fns = arguments;
+ return jQuery.Deferred(function( newDefer ) {
+ jQuery.each( tuples, function( i, tuple ) {
+ var action = tuple[ 0 ],
+ fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
+ // deferred[ done | fail | progress ] for forwarding actions to newDefer
+ deferred[ tuple[1] ](function() {
+ var returned = fn && fn.apply( this, arguments );
+ if ( returned && jQuery.isFunction( returned.promise ) ) {
+ returned.promise()
+ .done( newDefer.resolve )
+ .fail( newDefer.reject )
+ .progress( newDefer.notify );
+ } else {
+ newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
+ }
+ });
+ });
+ fns = null;
+ }).promise();
+ },
+ // Get a promise for this deferred
+ // If obj is provided, the promise aspect is added to the object
+ promise: function( obj ) {
+ return obj != null ? jQuery.extend( obj, promise ) : promise;
+ }
+ },
+ deferred = {};
+
+ // Keep pipe for back-compat
+ promise.pipe = promise.then;
+
+ // Add list-specific methods
+ jQuery.each( tuples, function( i, tuple ) {
+ var list = tuple[ 2 ],
+ stateString = tuple[ 3 ];
+
+ // promise[ done | fail | progress ] = list.add
+ promise[ tuple[1] ] = list.add;
+
+ // Handle state
+ if ( stateString ) {
+ list.add(function() {
+ // state = [ resolved | rejected ]
+ state = stateString;
+
+ // [ reject_list | resolve_list ].disable; progress_list.lock
+ }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
+ }
+
+ // deferred[ resolve | reject | notify ]
+ deferred[ tuple[0] ] = function() {
+ deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
+ return this;
+ };
+ deferred[ tuple[0] + "With" ] = list.fireWith;
+ });
+
+ // Make the deferred a promise
+ promise.promise( deferred );
+
+ // Call given func if any
+ if ( func ) {
+ func.call( deferred, deferred );
+ }
+
+ // All done!
+ return deferred;
+ },
+
+ // Deferred helper
+ when: function( subordinate /* , ..., subordinateN */ ) {
+ var i = 0,
+ resolveValues = core_slice.call( arguments ),
+ length = resolveValues.length,
+
+ // the count of uncompleted subordinates
+ remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
+
+ // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
+ deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
+
+ // Update function for both resolve and progress values
+ updateFunc = function( i, contexts, values ) {
+ return function( value ) {
+ contexts[ i ] = this;
+ values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;
+ if( values === progressValues ) {
+ deferred.notifyWith( contexts, values );
+ } else if ( !( --remaining ) ) {
+ deferred.resolveWith( contexts, values );
+ }
+ };
+ },
+
+ progressValues, progressContexts, resolveContexts;
+
+ // add listeners to Deferred subordinates; treat others as resolved
+ if ( length > 1 ) {
+ progressValues = new Array( length );
+ progressContexts = new Array( length );
+ resolveContexts = new Array( length );
+ for ( ; i < length; i++ ) {
+ if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
+ resolveValues[ i ].promise()
+ .done( updateFunc( i, resolveContexts, resolveValues ) )
+ .fail( deferred.reject )
+ .progress( updateFunc( i, progressContexts, progressValues ) );
+ } else {
+ --remaining;
+ }
+ }
+ }
+
+ // if we're not waiting on anything, resolve the master
+ if ( !remaining ) {
+ deferred.resolveWith( resolveContexts, resolveValues );
+ }
+
+ return deferred.promise();
+ }
+});
+jQuery.support = (function() {
+
+ var support, all, a,
+ input, select, fragment,
+ opt, eventName, isSupported, i,
+ div = document.createElement("div");
+
+ // Setup
+ div.setAttribute( "className", "t" );
+ div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
+
+ // Support tests won't run in some limited or non-browser environments
+ all = div.getElementsByTagName("*");
+ a = div.getElementsByTagName("a")[ 0 ];
+ if ( !all || !a || !all.length ) {
+ return {};
+ }
+
+ // First batch of tests
+ select = document.createElement("select");
+ opt = select.appendChild( document.createElement("option") );
+ input = div.getElementsByTagName("input")[ 0 ];
+
+ a.style.cssText = "top:1px;float:left;opacity:.5";
+ support = {
+ // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
+ getSetAttribute: div.className !== "t",
+
+ // IE strips leading whitespace when .innerHTML is used
+ leadingWhitespace: div.firstChild.nodeType === 3,
+
+ // Make sure that tbody elements aren't automatically inserted
+ // IE will insert them into empty tables
+ tbody: !div.getElementsByTagName("tbody").length,
+
+ // Make sure that link elements get serialized correctly by innerHTML
+ // This requires a wrapper element in IE
+ htmlSerialize: !!div.getElementsByTagName("link").length,
+
+ // Get the style information from getAttribute
+ // (IE uses .cssText instead)
+ style: /top/.test( a.getAttribute("style") ),
+
+ // Make sure that URLs aren't manipulated
+ // (IE normalizes it by default)
+ hrefNormalized: a.getAttribute("href") === "/a",
+
+ // Make sure that element opacity exists
+ // (IE uses filter instead)
+ // Use a regex to work around a WebKit issue. See #5145
+ opacity: /^0.5/.test( a.style.opacity ),
+
+ // Verify style float existence
+ // (IE uses styleFloat instead of cssFloat)
+ cssFloat: !!a.style.cssFloat,
+
+ // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
+ checkOn: !!input.value,
+
+ // Make sure that a selected-by-default option has a working selected property.
+ // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
+ optSelected: opt.selected,
+
+ // Tests for enctype support on a form (#6743)
+ enctype: !!document.createElement("form").enctype,
+
+ // Makes sure cloning an html5 element does not cause problems
+ // Where outerHTML is undefined, this still works
+ html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>",
+
+ // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode
+ boxModel: document.compatMode === "CSS1Compat",
+
+ // Will be defined later
+ deleteExpando: true,
+ noCloneEvent: true,
+ inlineBlockNeedsLayout: false,
+ shrinkWrapBlocks: false,
+ reliableMarginRight: true,
+ boxSizingReliable: true,
+ pixelPosition: false
+ };
+
+ // Make sure checked status is properly cloned
+ input.checked = true;
+ support.noCloneChecked = input.cloneNode( true ).checked;
+
+ // Make sure that the options inside disabled selects aren't marked as disabled
+ // (WebKit marks them as disabled)
+ select.disabled = true;
+ support.optDisabled = !opt.disabled;
+
+ // Support: IE<9
+ try {
+ delete div.test;
+ } catch( e ) {
+ support.deleteExpando = false;
+ }
+
+ // Check if we can trust getAttribute("value")
+ input = document.createElement("input");
+ input.setAttribute( "value", "" );
+ support.input = input.getAttribute( "value" ) === "";
+
+ // Check if an input maintains its value after becoming a radio
+ input.value = "t";
+ input.setAttribute( "type", "radio" );
+ support.radioValue = input.value === "t";
+
+ // #11217 - WebKit loses check when the name is after the checked attribute
+ input.setAttribute( "checked", "t" );
+ input.setAttribute( "name", "t" );
+
+ fragment = document.createDocumentFragment();
+ fragment.appendChild( input );
+
+ // Check if a disconnected checkbox will retain its checked
+ // value of true after appended to the DOM (IE6/7)
+ support.appendChecked = input.checked;
+
+ // WebKit doesn't clone checked state correctly in fragments
+ support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+ // Support: IE<9
+ // Opera does not clone events (and typeof div.attachEvent === undefined).
+ // IE9-10 clones events bound via attachEvent, but they don't trigger with .click()
+ if ( div.attachEvent ) {
+ div.attachEvent( "onclick", function() {
+ support.noCloneEvent = false;
+ });
+
+ div.cloneNode( true ).click();
+ }
+
+ // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event)
+ // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP), test/csp.php
+ for ( i in { submit: true, change: true, focusin: true }) {
+ div.setAttribute( eventName = "on" + i, "t" );
+
+ support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false;
+ }
+
+ div.style.backgroundClip = "content-box";
+ div.cloneNode( true ).style.backgroundClip = "";
+ support.clearCloneStyle = div.style.backgroundClip === "content-box";
+
+ // Run tests that need a body at doc ready
+ jQuery(function() {
+ var container, marginDiv, tds,
+ divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",
+ body = document.getElementsByTagName("body")[0];
+
+ if ( !body ) {
+ // Return for frameset docs that don't have a body
+ return;
+ }
+
+ container = document.createElement("div");
+ container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";
+
+ body.appendChild( container ).appendChild( div );
+
+ // Support: IE8
+ // Check if table cells still have offsetWidth/Height when they are set
+ // to display:none and there are still other visible table cells in a
+ // table row; if so, offsetWidth/Height are not reliable for use when
+ // determining if an element has been hidden directly using
+ // display:none (it is still safe to use offsets if a parent element is
+ // hidden; don safety goggles and see bug #4512 for more information).
+ div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
+ tds = div.getElementsByTagName("td");
+ tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none";
+ isSupported = ( tds[ 0 ].offsetHeight === 0 );
+
+ tds[ 0 ].style.display = "";
+ tds[ 1 ].style.display = "none";
+
+ // Support: IE8
+ // Check if empty table cells still have offsetWidth/Height
+ support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
+
+ // Check box-sizing and margin behavior
+ div.innerHTML = "";
+ div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";
+ support.boxSizing = ( div.offsetWidth === 4 );
+ support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 );
+
+ // Use window.getComputedStyle because jsdom on node.js will break without it.
+ if ( window.getComputedStyle ) {
+ support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
+ support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
+
+ // Check if div with explicit width and no margin-right incorrectly
+ // gets computed margin-right based on width of container. (#3333)
+ // Fails in WebKit before Feb 2011 nightlies
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+ marginDiv = div.appendChild( document.createElement("div") );
+ marginDiv.style.cssText = div.style.cssText = divReset;
+ marginDiv.style.marginRight = marginDiv.style.width = "0";
+ div.style.width = "1px";
+
+ support.reliableMarginRight =
+ !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );
+ }
+
+ if ( typeof div.style.zoom !== core_strundefined ) {
+ // Support: IE<8
+ // Check if natively block-level elements act like inline-block
+ // elements when setting their display to 'inline' and giving
+ // them layout
+ div.innerHTML = "";
+ div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
+ support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
+
+ // Support: IE6
+ // Check if elements with layout shrink-wrap their children
+ div.style.display = "block";
+ div.innerHTML = "<div></div>";
+ div.firstChild.style.width = "5px";
+ support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
+
+ if ( support.inlineBlockNeedsLayout ) {
+ // Prevent IE 6 from affecting layout for positioned elements #11048
+ // Prevent IE from shrinking the body in IE 7 mode #12869
+ // Support: IE<8
+ body.style.zoom = 1;
+ }
+ }
+
+ body.removeChild( container );
+
+ // Null elements to avoid leaks in IE
+ container = div = tds = marginDiv = null;
+ });
+
+ // Null elements to avoid leaks in IE
+ all = select = fragment = opt = a = input = null;
+
+ return support;
+})();
+
+var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
+ rmultiDash = /([A-Z])/g;
+
+function internalData( elem, name, data, pvt /* Internal Use Only */ ){
+ if ( !jQuery.acceptData( elem ) ) {
+ return;
+ }
+
+ var thisCache, ret,
+ internalKey = jQuery.expando,
+ getByName = typeof name === "string",
+
+ // We have to handle DOM nodes and JS objects differently because IE6-7
+ // can't GC object references properly across the DOM-JS boundary
+ isNode = elem.nodeType,
+
+ // Only DOM nodes need the global jQuery cache; JS object data is
+ // attached directly to the object so GC can occur automatically
+ cache = isNode ? jQuery.cache : elem,
+
+ // Only defining an ID for JS objects if its cache already exists allows
+ // the code to shortcut on the same path as a DOM node with no cache
+ id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
+
+ // Avoid doing any more work than we need to when trying to get data on an
+ // object that has no data at all
+ if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) {
+ return;
+ }
+
+ if ( !id ) {
+ // Only DOM nodes need a new unique ID for each element since their data
+ // ends up in the global cache
+ if ( isNode ) {
+ elem[ internalKey ] = id = core_deletedIds.pop() || jQuery.guid++;
+ } else {
+ id = internalKey;
+ }
+ }
+
+ if ( !cache[ id ] ) {
+ cache[ id ] = {};
+
+ // Avoids exposing jQuery metadata on plain JS objects when the object
+ // is serialized using JSON.stringify
+ if ( !isNode ) {
+ cache[ id ].toJSON = jQuery.noop;
+ }
+ }
+
+ // An object can be passed to jQuery.data instead of a key/value pair; this gets
+ // shallow copied over onto the existing cache
+ if ( typeof name === "object" || typeof name === "function" ) {
+ if ( pvt ) {
+ cache[ id ] = jQuery.extend( cache[ id ], name );
+ } else {
+ cache[ id ].data = jQuery.extend( cache[ id ].data, name );
+ }
+ }
+
+ thisCache = cache[ id ];
+
+ // jQuery data() is stored in a separate object inside the object's internal data
+ // cache in order to avoid key collisions between internal data and user-defined
+ // data.
+ if ( !pvt ) {
+ if ( !thisCache.data ) {
+ thisCache.data = {};
+ }
+
+ thisCache = thisCache.data;
+ }
+
+ if ( data !== undefined ) {
+ thisCache[ jQuery.camelCase( name ) ] = data;
+ }
+
+ // Check for both converted-to-camel and non-converted data property names
+ // If a data property was specified
+ if ( getByName ) {
+
+ // First Try to find as-is property data
+ ret = thisCache[ name ];
+
+ // Test for null|undefined property data
+ if ( ret == null ) {
+
+ // Try to find the camelCased property
+ ret = thisCache[ jQuery.camelCase( name ) ];
+ }
+ } else {
+ ret = thisCache;
+ }
+
+ return ret;
+}
+
+function internalRemoveData( elem, name, pvt ) {
+ if ( !jQuery.acceptData( elem ) ) {
+ return;
+ }
+
+ var i, l, thisCache,
+ isNode = elem.nodeType,
+
+ // See jQuery.data for more information
+ cache = isNode ? jQuery.cache : elem,
+ id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
+
+ // If there is already no cache entry for this object, there is no
+ // purpose in continuing
+ if ( !cache[ id ] ) {
+ return;
+ }
+
+ if ( name ) {
+
+ thisCache = pvt ? cache[ id ] : cache[ id ].data;
+
+ if ( thisCache ) {
+
+ // Support array or space separated string names for data keys
+ if ( !jQuery.isArray( name ) ) {
+
+ // try the string as a key before any manipulation
+ if ( name in thisCache ) {
+ name = [ name ];
+ } else {
+
+ // split the camel cased version by spaces unless a key with the spaces exists
+ name = jQuery.camelCase( name );
+ if ( name in thisCache ) {
+ name = [ name ];
+ } else {
+ name = name.split(" ");
+ }
+ }
+ } else {
+ // If "name" is an array of keys...
+ // When data is initially created, via ("key", "val") signature,
+ // keys will be converted to camelCase.
+ // Since there is no way to tell _how_ a key was added, remove
+ // both plain key and camelCase key. #12786
+ // This will only penalize the array argument path.
+ name = name.concat( jQuery.map( name, jQuery.camelCase ) );
+ }
+
+ for ( i = 0, l = name.length; i < l; i++ ) {
+ delete thisCache[ name[i] ];
+ }
+
+ // If there is no data left in the cache, we want to continue
+ // and let the cache object itself get destroyed
+ if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
+ return;
+ }
+ }
+ }
+
+ // See jQuery.data for more information
+ if ( !pvt ) {
+ delete cache[ id ].data;
+
+ // Don't destroy the parent cache unless the internal data object
+ // had been the only thing left in it
+ if ( !isEmptyDataObject( cache[ id ] ) ) {
+ return;
+ }
+ }
+
+ // Destroy the cache
+ if ( isNode ) {
+ jQuery.cleanData( [ elem ], true );
+
+ // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
+ } else if ( jQuery.support.deleteExpando || cache != cache.window ) {
+ delete cache[ id ];
+
+ // When all else fails, null
+ } else {
+ cache[ id ] = null;
+ }
+}
+
+jQuery.extend({
+ cache: {},
+
+ // Unique for each copy of jQuery on the page
+ // Non-digits removed to match rinlinejQuery
+ expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ),
+
+ // The following elements throw uncatchable exceptions if you
+ // attempt to add expando properties to them.
+ noData: {
+ "embed": true,
+ // Ban all objects except for Flash (which handle expandos)
+ "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
+ "applet": true
+ },
+
+ hasData: function( elem ) {
+ elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
+ return !!elem && !isEmptyDataObject( elem );
+ },
+
+ data: function( elem, name, data ) {
+ return internalData( elem, name, data );
+ },
+
+ removeData: function( elem, name ) {
+ return internalRemoveData( elem, name );
+ },
+
+ // For internal use only.
+ _data: function( elem, name, data ) {
+ return internalData( elem, name, data, true );
+ },
+
+ _removeData: function( elem, name ) {
+ return internalRemoveData( elem, name, true );
+ },
+
+ // A method for determining if a DOM node can handle the data expando
+ acceptData: function( elem ) {
+ // Do not set data on non-element because it will not be cleared (#8335).
+ if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) {
+ return false;
+ }
+
+ var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];
+
+ // nodes accept data unless otherwise specified; rejection can be conditional
+ return !noData || noData !== true && elem.getAttribute("classid") === noData;
+ }
+});
+
+jQuery.fn.extend({
+ data: function( key, value ) {
+ var attrs, name,
+ elem = this[0],
+ i = 0,
+ data = null;
+
+ // Gets all values
+ if ( key === undefined ) {
+ if ( this.length ) {
+ data = jQuery.data( elem );
+
+ if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
+ attrs = elem.attributes;
+ for ( ; i < attrs.length; i++ ) {
+ name = attrs[i].name;
+
+ if ( !name.indexOf( "data-" ) ) {
+ name = jQuery.camelCase( name.slice(5) );
+
+ dataAttr( elem, name, data[ name ] );
+ }
+ }
+ jQuery._data( elem, "parsedAttrs", true );
+ }
+ }
+
+ return data;
+ }
+
+ // Sets multiple values
+ if ( typeof key === "object" ) {
+ return this.each(function() {
+ jQuery.data( this, key );
+ });
+ }
+
+ return jQuery.access( this, function( value ) {
+
+ if ( value === undefined ) {
+ // Try to fetch any internally stored data first
+ return elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null;
+ }
+
+ this.each(function() {
+ jQuery.data( this, key, value );
+ });
+ }, null, value, arguments.length > 1, null, true );
+ },
+
+ removeData: function( key ) {
+ return this.each(function() {
+ jQuery.removeData( this, key );
+ });
+ }
+});
+
+function dataAttr( elem, key, data ) {
+ // If nothing was found internally, try to fetch any
+ // data from the HTML5 data-* attribute
+ if ( data === undefined && elem.nodeType === 1 ) {
+
+ var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
+
+ data = elem.getAttribute( name );
+
+ if ( typeof data === "string" ) {
+ try {
+ data = data === "true" ? true :
+ data === "false" ? false :
+ data === "null" ? null :
+ // Only convert to a number if it doesn't change the string
+ +data + "" === data ? +data :
+ rbrace.test( data ) ? jQuery.parseJSON( data ) :
+ data;
+ } catch( e ) {}
+
+ // Make sure we set the data so it isn't changed later
+ jQuery.data( elem, key, data );
+
+ } else {
+ data = undefined;
+ }
+ }
+
+ return data;
+}
+
+// checks a cache object for emptiness
+function isEmptyDataObject( obj ) {
+ var name;
+ for ( name in obj ) {
+
+ // if the public data object is empty, the private is still empty
+ if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
+ continue;
+ }
+ if ( name !== "toJSON" ) {
+ return false;
+ }
+ }
+
+ return true;
+}
+jQuery.extend({
+ queue: function( elem, type, data ) {
+ var queue;
+
+ if ( elem ) {
+ type = ( type || "fx" ) + "queue";
+ queue = jQuery._data( elem, type );
+
+ // Speed up dequeue by getting out quickly if this is just a lookup
+ if ( data ) {
+ if ( !queue || jQuery.isArray(data) ) {
+ queue = jQuery._data( elem, type, jQuery.makeArray(data) );
+ } else {
+ queue.push( data );
+ }
+ }
+ return queue || [];
+ }
+ },
+
+ dequeue: function( elem, type ) {
+ type = type || "fx";
+
+ var queue = jQuery.queue( elem, type ),
+ startLength = queue.length,
+ fn = queue.shift(),
+ hooks = jQuery._queueHooks( elem, type ),
+ next = function() {
+ jQuery.dequeue( elem, type );
+ };
+
+ // If the fx queue is dequeued, always remove the progress sentinel
+ if ( fn === "inprogress" ) {
+ fn = queue.shift();
+ startLength--;
+ }
+
+ hooks.cur = fn;
+ if ( fn ) {
+
+ // Add a progress sentinel to prevent the fx queue from being
+ // automatically dequeued
+ if ( type === "fx" ) {
+ queue.unshift( "inprogress" );
+ }
+
+ // clear up the last queue stop function
+ delete hooks.stop;
+ fn.call( elem, next, hooks );
+ }
+
+ if ( !startLength && hooks ) {
+ hooks.empty.fire();
+ }
+ },
+
+ // not intended for public consumption - generates a queueHooks object, or returns the current one
+ _queueHooks: function( elem, type ) {
+ var key = type + "queueHooks";
+ return jQuery._data( elem, key ) || jQuery._data( elem, key, {
+ empty: jQuery.Callbacks("once memory").add(function() {
+ jQuery._removeData( elem, type + "queue" );
+ jQuery._removeData( elem, key );
+ })
+ });
+ }
+});
+
+jQuery.fn.extend({
+ queue: function( type, data ) {
+ var setter = 2;
+
+ if ( typeof type !== "string" ) {
+ data = type;
+ type = "fx";
+ setter--;
+ }
+
+ if ( arguments.length < setter ) {
+ return jQuery.queue( this[0], type );
+ }
+
+ return data === undefined ?
+ this :
+ this.each(function() {
+ var queue = jQuery.queue( this, type, data );
+
+ // ensure a hooks for this queue
+ jQuery._queueHooks( this, type );
+
+ if ( type === "fx" && queue[0] !== "inprogress" ) {
+ jQuery.dequeue( this, type );
+ }
+ });
+ },
+ dequeue: function( type ) {
+ return this.each(function() {
+ jQuery.dequeue( this, type );
+ });
+ },
+ // Based off of the plugin by Clint Helfers, with permission.
+ // http://blindsignals.com/index.php/2009/07/jquery-delay/
+ delay: function( time, type ) {
+ time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
+ type = type || "fx";
+
+ return this.queue( type, function( next, hooks ) {
+ var timeout = setTimeout( next, time );
+ hooks.stop = function() {
+ clearTimeout( timeout );
+ };
+ });
+ },
+ clearQueue: function( type ) {
+ return this.queue( type || "fx", [] );
+ },
+ // Get a promise resolved when queues of a certain type
+ // are emptied (fx is the type by default)
+ promise: function( type, obj ) {
+ var tmp,
+ count = 1,
+ defer = jQuery.Deferred(),
+ elements = this,
+ i = this.length,
+ resolve = function() {
+ if ( !( --count ) ) {
+ defer.resolveWith( elements, [ elements ] );
+ }
+ };
+
+ if ( typeof type !== "string" ) {
+ obj = type;
+ type = undefined;
+ }
+ type = type || "fx";
+
+ while( i-- ) {
+ tmp = jQuery._data( elements[ i ], type + "queueHooks" );
+ if ( tmp && tmp.empty ) {
+ count++;
+ tmp.empty.add( resolve );
+ }
+ }
+ resolve();
+ return defer.promise( obj );
+ }
+});
+var nodeHook, boolHook,
+ rclass = /[\t\r\n]/g,
+ rreturn = /\r/g,
+ rfocusable = /^(?:input|select|textarea|button|object)$/i,
+ rclickable = /^(?:a|area)$/i,
+ rboolean = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,
+ ruseDefault = /^(?:checked|selected)$/i,
+ getSetAttribute = jQuery.support.getSetAttribute,
+ getSetInput = jQuery.support.input;
+
+jQuery.fn.extend({
+ attr: function( name, value ) {
+ return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
+ },
+
+ removeAttr: function( name ) {
+ return this.each(function() {
+ jQuery.removeAttr( this, name );
+ });
+ },
+
+ prop: function( name, value ) {
+ return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
+ },
+
+ removeProp: function( name ) {
+ name = jQuery.propFix[ name ] || name;
+ return this.each(function() {
+ // try/catch handles cases where IE balks (such as removing a property on window)
+ try {
+ this[ name ] = undefined;
+ delete this[ name ];
+ } catch( e ) {}
+ });
+ },
+
+ addClass: function( value ) {
+ var classes, elem, cur, clazz, j,
+ i = 0,
+ len = this.length,
+ proceed = typeof value === "string" && value;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( j ) {
+ jQuery( this ).addClass( value.call( this, j, this.className ) );
+ });
+ }
+
+ if ( proceed ) {
+ // The disjunction here is for better compressibility (see removeClass)
+ classes = ( value || "" ).match( core_rnotwhite ) || [];
+
+ for ( ; i < len; i++ ) {
+ elem = this[ i ];
+ cur = elem.nodeType === 1 && ( elem.className ?
+ ( " " + elem.className + " " ).replace( rclass, " " ) :
+ " "
+ );
+
+ if ( cur ) {
+ j = 0;
+ while ( (clazz = classes[j++]) ) {
+ if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
+ cur += clazz + " ";
+ }
+ }
+ elem.className = jQuery.trim( cur );
+
+ }
+ }
+ }
+
+ return this;
+ },
+
+ removeClass: function( value ) {
+ var classes, elem, cur, clazz, j,
+ i = 0,
+ len = this.length,
+ proceed = arguments.length === 0 || typeof value === "string" && value;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( j ) {
+ jQuery( this ).removeClass( value.call( this, j, this.className ) );
+ });
+ }
+ if ( proceed ) {
+ classes = ( value || "" ).match( core_rnotwhite ) || [];
+
+ for ( ; i < len; i++ ) {
+ elem = this[ i ];
+ // This expression is here for better compressibility (see addClass)
+ cur = elem.nodeType === 1 && ( elem.className ?
+ ( " " + elem.className + " " ).replace( rclass, " " ) :
+ ""
+ );
+
+ if ( cur ) {
+ j = 0;
+ while ( (clazz = classes[j++]) ) {
+ // Remove *all* instances
+ while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
+ cur = cur.replace( " " + clazz + " ", " " );
+ }
+ }
+ elem.className = value ? jQuery.trim( cur ) : "";
+ }
+ }
+ }
+
+ return this;
+ },
+
+ toggleClass: function( value, stateVal ) {
+ var type = typeof value,
+ isBool = typeof stateVal === "boolean";
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( i ) {
+ jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
+ });
+ }
+
+ return this.each(function() {
+ if ( type === "string" ) {
+ // toggle individual class names
+ var className,
+ i = 0,
+ self = jQuery( this ),
+ state = stateVal,
+ classNames = value.match( core_rnotwhite ) || [];
+
+ while ( (className = classNames[ i++ ]) ) {
+ // check each className given, space separated list
+ state = isBool ? state : !self.hasClass( className );
+ self[ state ? "addClass" : "removeClass" ]( className );
+ }
+
+ // Toggle whole class name
+ } else if ( type === core_strundefined || type === "boolean" ) {
+ if ( this.className ) {
+ // store className if set
+ jQuery._data( this, "__className__", this.className );
+ }
+
+ // If the element has a class name or if we're passed "false",
+ // then remove the whole classname (if there was one, the above saved it).
+ // Otherwise bring back whatever was previously saved (if anything),
+ // falling back to the empty string if nothing was stored.
+ this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
+ }
+ });
+ },
+
+ hasClass: function( selector ) {
+ var className = " " + selector + " ",
+ i = 0,
+ l = this.length;
+ for ( ; i < l; i++ ) {
+ if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
+ return true;
+ }
+ }
+
+ return false;
+ },
+
+ val: function( value ) {
+ var ret, hooks, isFunction,
+ elem = this[0];
+
+ if ( !arguments.length ) {
+ if ( elem ) {
+ hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
+
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
+ return ret;
+ }
+
+ ret = elem.value;
+
+ return typeof ret === "string" ?
+ // handle most common string cases
+ ret.replace(rreturn, "") :
+ // handle cases where value is null/undef or number
+ ret == null ? "" : ret;
+ }
+
+ return;
+ }
+
+ isFunction = jQuery.isFunction( value );
+
+ return this.each(function( i ) {
+ var val,
+ self = jQuery(this);
+
+ if ( this.nodeType !== 1 ) {
+ return;
+ }
+
+ if ( isFunction ) {
+ val = value.call( this, i, self.val() );
+ } else {
+ val = value;
+ }
+
+ // Treat null/undefined as ""; convert numbers to string
+ if ( val == null ) {
+ val = "";
+ } else if ( typeof val === "number" ) {
+ val += "";
+ } else if ( jQuery.isArray( val ) ) {
+ val = jQuery.map(val, function ( value ) {
+ return value == null ? "" : value + "";
+ });
+ }
+
+ hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
+
+ // If set returns undefined, fall back to normal setting
+ if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
+ this.value = val;
+ }
+ });
+ }
+});
+
+jQuery.extend({
+ valHooks: {
+ option: {
+ get: function( elem ) {
+ // attributes.value is undefined in Blackberry 4.7 but
+ // uses .value. See #6932
+ var val = elem.attributes.value;
+ return !val || val.specified ? elem.value : elem.text;
+ }
+ },
+ select: {
+ get: function( elem ) {
+ var value, option,
+ options = elem.options,
+ index = elem.selectedIndex,
+ one = elem.type === "select-one" || index < 0,
+ values = one ? null : [],
+ max = one ? index + 1 : options.length,
+ i = index < 0 ?
+ max :
+ one ? index : 0;
+
+ // Loop through all the selected options
+ for ( ; i < max; i++ ) {
+ option = options[ i ];
+
+ // oldIE doesn't update selected after form reset (#2551)
+ if ( ( option.selected || i === index ) &&
+ // Don't return options that are disabled or in a disabled optgroup
+ ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
+ ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
+
+ // Get the specific value for the option
+ value = jQuery( option ).val();
+
+ // We don't need an array for one selects
+ if ( one ) {
+ return value;
+ }
+
+ // Multi-Selects return an array
+ values.push( value );
+ }
+ }
+
+ return values;
+ },
+
+ set: function( elem, value ) {
+ var values = jQuery.makeArray( value );
+
+ jQuery(elem).find("option").each(function() {
+ this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
+ });
+
+ if ( !values.length ) {
+ elem.selectedIndex = -1;
+ }
+ return values;
+ }
+ }
+ },
+
+ attr: function( elem, name, value ) {
+ var hooks, notxml, ret,
+ nType = elem.nodeType;
+
+ // don't get/set attributes on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return;
+ }
+
+ // Fallback to prop when attributes are not supported
+ if ( typeof elem.getAttribute === core_strundefined ) {
+ return jQuery.prop( elem, name, value );
+ }
+
+ notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+ // All attributes are lowercase
+ // Grab necessary hook if one is defined
+ if ( notxml ) {
+ name = name.toLowerCase();
+ hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
+ }
+
+ if ( value !== undefined ) {
+
+ if ( value === null ) {
+ jQuery.removeAttr( elem, name );
+
+ } else if ( hooks && notxml && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+ return ret;
+
+ } else {
+ elem.setAttribute( name, value + "" );
+ return value;
+ }
+
+ } else if ( hooks && notxml && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
+ return ret;
+
+ } else {
+
+ // In IE9+, Flash objects don't have .getAttribute (#12945)
+ // Support: IE9+
+ if ( typeof elem.getAttribute !== core_strundefined ) {
+ ret = elem.getAttribute( name );
+ }
+
+ // Non-existent attributes return null, we normalize to undefined
+ return ret == null ?
+ undefined :
+ ret;
+ }
+ },
+
+ removeAttr: function( elem, value ) {
+ var name, propName,
+ i = 0,
+ attrNames = value && value.match( core_rnotwhite );
+
+ if ( attrNames && elem.nodeType === 1 ) {
+ while ( (name = attrNames[i++]) ) {
+ propName = jQuery.propFix[ name ] || name;
+
+ // Boolean attributes get special treatment (#10870)
+ if ( rboolean.test( name ) ) {
+ // Set corresponding property to false for boolean attributes
+ // Also clear defaultChecked/defaultSelected (if appropriate) for IE<8
+ if ( !getSetAttribute && ruseDefault.test( name ) ) {
+ elem[ jQuery.camelCase( "default-" + name ) ] =
+ elem[ propName ] = false;
+ } else {
+ elem[ propName ] = false;
+ }
+
+ // See #9699 for explanation of this approach (setting first, then removal)
+ } else {
+ jQuery.attr( elem, name, "" );
+ }
+
+ elem.removeAttribute( getSetAttribute ? name : propName );
+ }
+ }
+ },
+
+ attrHooks: {
+ type: {
+ set: function( elem, value ) {
+ if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
+ // Setting the type on a radio button after the value resets the value in IE6-9
+ // Reset value to default in case type is set after value during creation
+ var val = elem.value;
+ elem.setAttribute( "type", value );
+ if ( val ) {
+ elem.value = val;
+ }
+ return value;
+ }
+ }
+ }
+ },
+
+ propFix: {
+ tabindex: "tabIndex",
+ readonly: "readOnly",
+ "for": "htmlFor",
+ "class": "className",
+ maxlength: "maxLength",
+ cellspacing: "cellSpacing",
+ cellpadding: "cellPadding",
+ rowspan: "rowSpan",
+ colspan: "colSpan",
+ usemap: "useMap",
+ frameborder: "frameBorder",
+ contenteditable: "contentEditable"
+ },
+
+ prop: function( elem, name, value ) {
+ var ret, hooks, notxml,
+ nType = elem.nodeType;
+
+ // don't get/set properties on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return;
+ }
+
+ notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+ if ( notxml ) {
+ // Fix name and attach hooks
+ name = jQuery.propFix[ name ] || name;
+ hooks = jQuery.propHooks[ name ];
+ }
+
+ if ( value !== undefined ) {
+ if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+ return ret;
+
+ } else {
+ return ( elem[ name ] = value );
+ }
+
+ } else {
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
+ return ret;
+
+ } else {
+ return elem[ name ];
+ }
+ }
+ },
+
+ propHooks: {
+ tabIndex: {
+ get: function( elem ) {
+ // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
+ // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+ var attributeNode = elem.getAttributeNode("tabindex");
+
+ return attributeNode && attributeNode.specified ?
+ parseInt( attributeNode.value, 10 ) :
+ rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
+ 0 :
+ undefined;
+ }
+ }
+ }
+});
+
+// Hook for boolean attributes
+boolHook = {
+ get: function( elem, name ) {
+ var
+ // Use .prop to determine if this attribute is understood as boolean
+ prop = jQuery.prop( elem, name ),
+
+ // Fetch it accordingly
+ attr = typeof prop === "boolean" && elem.getAttribute( name ),
+ detail = typeof prop === "boolean" ?
+
+ getSetInput && getSetAttribute ?
+ attr != null :
+ // oldIE fabricates an empty string for missing boolean attributes
+ // and conflates checked/selected into attroperties
+ ruseDefault.test( name ) ?
+ elem[ jQuery.camelCase( "default-" + name ) ] :
+ !!attr :
+
+ // fetch an attribute node for properties not recognized as boolean
+ elem.getAttributeNode( name );
+
+ return detail && detail.value !== false ?
+ name.toLowerCase() :
+ undefined;
+ },
+ set: function( elem, value, name ) {
+ if ( value === false ) {
+ // Remove boolean attributes when set to false
+ jQuery.removeAttr( elem, name );
+ } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
+ // IE<8 needs the *property* name
+ elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );
+
+ // Use defaultChecked and defaultSelected for oldIE
+ } else {
+ elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true;
+ }
+
+ return name;
+ }
+};
+
+// fix oldIE value attroperty
+if ( !getSetInput || !getSetAttribute ) {
+ jQuery.attrHooks.value = {
+ get: function( elem, name ) {
+ var ret = elem.getAttributeNode( name );
+ return jQuery.nodeName( elem, "input" ) ?
+
+ // Ignore the value *property* by using defaultValue
+ elem.defaultValue :
+
+ ret && ret.specified ? ret.value : undefined;
+ },
+ set: function( elem, value, name ) {
+ if ( jQuery.nodeName( elem, "input" ) ) {
+ // Does not return so that setAttribute is also used
+ elem.defaultValue = value;
+ } else {
+ // Use nodeHook if defined (#1954); otherwise setAttribute is fine
+ return nodeHook && nodeHook.set( elem, value, name );
+ }
+ }
+ };
+}
+
+// IE6/7 do not support getting/setting some attributes with get/setAttribute
+if ( !getSetAttribute ) {
+
+ // Use this for any attribute in IE6/7
+ // This fixes almost every IE6/7 issue
+ nodeHook = jQuery.valHooks.button = {
+ get: function( elem, name ) {
+ var ret = elem.getAttributeNode( name );
+ return ret && ( name === "id" || name === "name" || name === "coords" ? ret.value !== "" : ret.specified ) ?
+ ret.value :
+ undefined;
+ },
+ set: function( elem, value, name ) {
+ // Set the existing or create a new attribute node
+ var ret = elem.getAttributeNode( name );
+ if ( !ret ) {
+ elem.setAttributeNode(
+ (ret = elem.ownerDocument.createAttribute( name ))
+ );
+ }
+
+ ret.value = value += "";
+
+ // Break association with cloned elements by also using setAttribute (#9646)
+ return name === "value" || value === elem.getAttribute( name ) ?
+ value :
+ undefined;
+ }
+ };
+
+ // Set contenteditable to false on removals(#10429)
+ // Setting to empty string throws an error as an invalid value
+ jQuery.attrHooks.contenteditable = {
+ get: nodeHook.get,
+ set: function( elem, value, name ) {
+ nodeHook.set( elem, value === "" ? false : value, name );
+ }
+ };
+
+ // Set width and height to auto instead of 0 on empty string( Bug #8150 )
+ // This is for removals
+ jQuery.each([ "width", "height" ], function( i, name ) {
+ jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+ set: function( elem, value ) {
+ if ( value === "" ) {
+ elem.setAttribute( name, "auto" );
+ return value;
+ }
+ }
+ });
+ });
+}
+
+
+// Some attributes require a special call on IE
+// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
+if ( !jQuery.support.hrefNormalized ) {
+ jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
+ jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+ get: function( elem ) {
+ var ret = elem.getAttribute( name, 2 );
+ return ret == null ? undefined : ret;
+ }
+ });
+ });
+
+ // href/src property should get the full normalized URL (#10299/#12915)
+ jQuery.each([ "href", "src" ], function( i, name ) {
+ jQuery.propHooks[ name ] = {
+ get: function( elem ) {
+ return elem.getAttribute( name, 4 );
+ }
+ };
+ });
+}
+
+if ( !jQuery.support.style ) {
+ jQuery.attrHooks.style = {
+ get: function( elem ) {
+ // Return undefined in the case of empty string
+ // Note: IE uppercases css property names, but if we were to .toLowerCase()
+ // .cssText, that would destroy case senstitivity in URL's, like in "background"
+ return elem.style.cssText || undefined;
+ },
+ set: function( elem, value ) {
+ return ( elem.style.cssText = value + "" );
+ }
+ };
+}
+
+// Safari mis-reports the default selected property of an option
+// Accessing the parent's selectedIndex property fixes it
+if ( !jQuery.support.optSelected ) {
+ jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
+ get: function( elem ) {
+ var parent = elem.parentNode;
+
+ if ( parent ) {
+ parent.selectedIndex;
+
+ // Make sure that it also works with optgroups, see #5701
+ if ( parent.parentNode ) {
+ parent.parentNode.selectedIndex;
+ }
+ }
+ return null;
+ }
+ });
+}
+
+// IE6/7 call enctype encoding
+if ( !jQuery.support.enctype ) {
+ jQuery.propFix.enctype = "encoding";
+}
+
+// Radios and checkboxes getter/setter
+if ( !jQuery.support.checkOn ) {
+ jQuery.each([ "radio", "checkbox" ], function() {
+ jQuery.valHooks[ this ] = {
+ get: function( elem ) {
+ // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
+ return elem.getAttribute("value") === null ? "on" : elem.value;
+ }
+ };
+ });
+}
+jQuery.each([ "radio", "checkbox" ], function() {
+ jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
+ set: function( elem, value ) {
+ if ( jQuery.isArray( value ) ) {
+ return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
+ }
+ }
+ });
+});
+var rformElems = /^(?:input|select|textarea)$/i,
+ rkeyEvent = /^key/,
+ rmouseEvent = /^(?:mouse|contextmenu)|click/,
+ rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
+ rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
+
+function returnTrue() {
+ return true;
+}
+
+function returnFalse() {
+ return false;
+}
+
+/*
+ * Helper functions for managing events -- not part of the public interface.
+ * Props to Dean Edwards' addEvent library for many of the ideas.
+ */
+jQuery.event = {
+
+ global: {},
+
+ add: function( elem, types, handler, data, selector ) {
+ var tmp, events, t, handleObjIn,
+ special, eventHandle, handleObj,
+ handlers, type, namespaces, origType,
+ elemData = jQuery._data( elem );
+
+ // Don't attach events to noData or text/comment nodes (but allow plain objects)
+ if ( !elemData ) {
+ return;
+ }
+
+ // Caller can pass in an object of custom data in lieu of the handler
+ if ( handler.handler ) {
+ handleObjIn = handler;
+ handler = handleObjIn.handler;
+ selector = handleObjIn.selector;
+ }
+
+ // Make sure that the handler has a unique ID, used to find/remove it later
+ if ( !handler.guid ) {
+ handler.guid = jQuery.guid++;
+ }
+
+ // Init the element's event structure and main handler, if this is the first
+ if ( !(events = elemData.events) ) {
+ events = elemData.events = {};
+ }
+ if ( !(eventHandle = elemData.handle) ) {
+ eventHandle = elemData.handle = function( e ) {
+ // Discard the second event of a jQuery.event.trigger() and
+ // when an event is called after a page has unloaded
+ return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ?
+ jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
+ undefined;
+ };
+ // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
+ eventHandle.elem = elem;
+ }
+
+ // Handle multiple events separated by a space
+ // jQuery(...).bind("mouseover mouseout", fn);
+ types = ( types || "" ).match( core_rnotwhite ) || [""];
+ t = types.length;
+ while ( t-- ) {
+ tmp = rtypenamespace.exec( types[t] ) || [];
+ type = origType = tmp[1];
+ namespaces = ( tmp[2] || "" ).split( "." ).sort();
+
+ // If event changes its type, use the special event handlers for the changed type
+ special = jQuery.event.special[ type ] || {};
+
+ // If selector defined, determine special event api type, otherwise given type
+ type = ( selector ? special.delegateType : special.bindType ) || type;
+
+ // Update special based on newly reset type
+ special = jQuery.event.special[ type ] || {};
+
+ // handleObj is passed to all event handlers
+ handleObj = jQuery.extend({
+ type: type,
+ origType: origType,
+ data: data,
+ handler: handler,
+ guid: handler.guid,
+ selector: selector,
+ needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
+ namespace: namespaces.join(".")
+ }, handleObjIn );
+
+ // Init the event handler queue if we're the first
+ if ( !(handlers = events[ type ]) ) {
+ handlers = events[ type ] = [];
+ handlers.delegateCount = 0;
+
+ // Only use addEventListener/attachEvent if the special events handler returns false
+ if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+ // Bind the global event handler to the element
+ if ( elem.addEventListener ) {
+ elem.addEventListener( type, eventHandle, false );
+
+ } else if ( elem.attachEvent ) {
+ elem.attachEvent( "on" + type, eventHandle );
+ }
+ }
+ }
+
+ if ( special.add ) {
+ special.add.call( elem, handleObj );
+
+ if ( !handleObj.handler.guid ) {
+ handleObj.handler.guid = handler.guid;
+ }
+ }
+
+ // Add to the element's handler list, delegates in front
+ if ( selector ) {
+ handlers.splice( handlers.delegateCount++, 0, handleObj );
+ } else {
+ handlers.push( handleObj );
+ }
+
+ // Keep track of which events have ever been used, for event optimization
+ jQuery.event.global[ type ] = true;
+ }
+
+ // Nullify elem to prevent memory leaks in IE
+ elem = null;
+ },
+
+ // Detach an event or set of events from an element
+ remove: function( elem, types, handler, selector, mappedTypes ) {
+ var j, handleObj, tmp,
+ origCount, t, events,
+ special, handlers, type,
+ namespaces, origType,
+ elemData = jQuery.hasData( elem ) && jQuery._data( elem );
+
+ if ( !elemData || !(events = elemData.events) ) {
+ return;
+ }
+
+ // Once for each type.namespace in types; type may be omitted
+ types = ( types || "" ).match( core_rnotwhite ) || [""];
+ t = types.length;
+ while ( t-- ) {
+ tmp = rtypenamespace.exec( types[t] ) || [];
+ type = origType = tmp[1];
+ namespaces = ( tmp[2] || "" ).split( "." ).sort();
+
+ // Unbind all events (on this namespace, if provided) for the element
+ if ( !type ) {
+ for ( type in events ) {
+ jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
+ }
+ continue;
+ }
+
+ special = jQuery.event.special[ type ] || {};
+ type = ( selector ? special.delegateType : special.bindType ) || type;
+ handlers = events[ type ] || [];
+ tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );
+
+ // Remove matching events
+ origCount = j = handlers.length;
+ while ( j-- ) {
+ handleObj = handlers[ j ];
+
+ if ( ( mappedTypes || origType === handleObj.origType ) &&
+ ( !handler || handler.guid === handleObj.guid ) &&
+ ( !tmp || tmp.test( handleObj.namespace ) ) &&
+ ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
+ handlers.splice( j, 1 );
+
+ if ( handleObj.selector ) {
+ handlers.delegateCount--;
+ }
+ if ( special.remove ) {
+ special.remove.call( elem, handleObj );
+ }
+ }
+ }
+
+ // Remove generic event handler if we removed something and no more handlers exist
+ // (avoids potential for endless recursion during removal of special event handlers)
+ if ( origCount && !handlers.length ) {
+ if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
+ jQuery.removeEvent( elem, type, elemData.handle );
+ }
+
+ delete events[ type ];
+ }
+ }
+
+ // Remove the expando if it's no longer used
+ if ( jQuery.isEmptyObject( events ) ) {
+ delete elemData.handle;
+
+ // removeData also checks for emptiness and clears the expando if empty
+ // so use it instead of delete
+ jQuery._removeData( elem, "events" );
+ }
+ },
+
+ trigger: function( event, data, elem, onlyHandlers ) {
+ var handle, ontype, cur,
+ bubbleType, special, tmp, i,
+ eventPath = [ elem || document ],
+ type = core_hasOwn.call( event, "type" ) ? event.type : event,
+ namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : [];
+
+ cur = tmp = elem = elem || document;
+
+ // Don't do events on text and comment nodes
+ if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+ return;
+ }
+
+ // focus/blur morphs to focusin/out; ensure we're not firing them right now
+ if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
+ return;
+ }
+
+ if ( type.indexOf(".") >= 0 ) {
+ // Namespaced trigger; create a regexp to match event type in handle()
+ namespaces = type.split(".");
+ type = namespaces.shift();
+ namespaces.sort();
+ }
+ ontype = type.indexOf(":") < 0 && "on" + type;
+
+ // Caller can pass in a jQuery.Event object, Object, or just an event type string
+ event = event[ jQuery.expando ] ?
+ event :
+ new jQuery.Event( type, typeof event === "object" && event );
+
+ event.isTrigger = true;
+ event.namespace = namespaces.join(".");
+ event.namespace_re = event.namespace ?
+ new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
+ null;
+
+ // Clean up the event in case it is being reused
+ event.result = undefined;
+ if ( !event.target ) {
+ event.target = elem;
+ }
+
+ // Clone any incoming data and prepend the event, creating the handler arg list
+ data = data == null ?
+ [ event ] :
+ jQuery.makeArray( data, [ event ] );
+
+ // Allow special events to draw outside the lines
+ special = jQuery.event.special[ type ] || {};
+ if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
+ return;
+ }
+
+ // Determine event propagation path in advance, per W3C events spec (#9951)
+ // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
+ if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
+
+ bubbleType = special.delegateType || type;
+ if ( !rfocusMorph.test( bubbleType + type ) ) {
+ cur = cur.parentNode;
+ }
+ for ( ; cur; cur = cur.parentNode ) {
+ eventPath.push( cur );
+ tmp = cur;
+ }
+
+ // Only add window if we got to document (e.g., not plain obj or detached DOM)
+ if ( tmp === (elem.ownerDocument || document) ) {
+ eventPath.push( tmp.defaultView || tmp.parentWindow || window );
+ }
+ }
+
+ // Fire handlers on the event path
+ i = 0;
+ while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {
+
+ event.type = i > 1 ?
+ bubbleType :
+ special.bindType || type;
+
+ // jQuery handler
+ handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
+ if ( handle ) {
+ handle.apply( cur, data );
+ }
+
+ // Native handler
+ handle = ontype && cur[ ontype ];
+ if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {
+ event.preventDefault();
+ }
+ }
+ event.type = type;
+
+ // If nobody prevented the default action, do it now
+ if ( !onlyHandlers && !event.isDefaultPrevented() ) {
+
+ if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&
+ !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
+
+ // Call a native DOM method on the target with the same name name as the event.
+ // Can't use an .isFunction() check here because IE6/7 fails that test.
+ // Don't do default actions on window, that's where global variables be (#6170)
+ if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {
+
+ // Don't re-trigger an onFOO event when we call its FOO() method
+ tmp = elem[ ontype ];
+
+ if ( tmp ) {
+ elem[ ontype ] = null;
+ }
+
+ // Prevent re-triggering of the same event, since we already bubbled it above
+ jQuery.event.triggered = type;
+ try {
+ elem[ type ]();
+ } catch ( e ) {
+ // IE<9 dies on focus/blur to hidden element (#1486,#12518)
+ // only reproducible on winXP IE8 native, not IE9 in IE8 mode
+ }
+ jQuery.event.triggered = undefined;
+
+ if ( tmp ) {
+ elem[ ontype ] = tmp;
+ }
+ }
+ }
+ }
+
+ return event.result;
+ },
+
+ dispatch: function( event ) {
+
+ // Make a writable jQuery.Event from the native event object
+ event = jQuery.event.fix( event );
+
+ var i, ret, handleObj, matched, j,
+ handlerQueue = [],
+ args = core_slice.call( arguments ),
+ handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [],
+ special = jQuery.event.special[ event.type ] || {};
+
+ // Use the fix-ed jQuery.Event rather than the (read-only) native event
+ args[0] = event;
+ event.delegateTarget = this;
+
+ // Call the preDispatch hook for the mapped type, and let it bail if desired
+ if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
+ return;
+ }
+
+ // Determine handlers
+ handlerQueue = jQuery.event.handlers.call( this, event, handlers );
+
+ // Run delegates first; they may want to stop propagation beneath us
+ i = 0;
+ while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {
+ event.currentTarget = matched.elem;
+
+ j = 0;
+ while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
+
+ // Triggered event must either 1) have no namespace, or
+ // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
+ if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
+
+ event.handleObj = handleObj;
+ event.data = handleObj.data;
+
+ ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
+ .apply( matched.elem, args );
+
+ if ( ret !== undefined ) {
+ if ( (event.result = ret) === false ) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ }
+ }
+ }
+ }
+
+ // Call the postDispatch hook for the mapped type
+ if ( special.postDispatch ) {
+ special.postDispatch.call( this, event );
+ }
+
+ return event.result;
+ },
+
+ handlers: function( event, handlers ) {
+ var sel, handleObj, matches, i,
+ handlerQueue = [],
+ delegateCount = handlers.delegateCount,
+ cur = event.target;
+
+ // Find delegate handlers
+ // Black-hole SVG <use> instance trees (#13180)
+ // Avoid non-left-click bubbling in Firefox (#3861)
+ if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
+
+ for ( ; cur != this; cur = cur.parentNode || this ) {
+
+ // Don't check non-elements (#13208)
+ // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
+ if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) {
+ matches = [];
+ for ( i = 0; i < delegateCount; i++ ) {
+ handleObj = handlers[ i ];
+
+ // Don't conflict with Object.prototype properties (#13203)
+ sel = handleObj.selector + " ";
+
+ if ( matches[ sel ] === undefined ) {
+ matches[ sel ] = handleObj.needsContext ?
+ jQuery( sel, this ).index( cur ) >= 0 :
+ jQuery.find( sel, this, null, [ cur ] ).length;
+ }
+ if ( matches[ sel ] ) {
+ matches.push( handleObj );
+ }
+ }
+ if ( matches.length ) {
+ handlerQueue.push({ elem: cur, handlers: matches });
+ }
+ }
+ }
+ }
+
+ // Add the remaining (directly-bound) handlers
+ if ( delegateCount < handlers.length ) {
+ handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });
+ }
+
+ return handlerQueue;
+ },
+
+ fix: function( event ) {
+ if ( event[ jQuery.expando ] ) {
+ return event;
+ }
+
+ // Create a writable copy of the event object and normalize some properties
+ var i, prop, copy,
+ type = event.type,
+ originalEvent = event,
+ fixHook = this.fixHooks[ type ];
+
+ if ( !fixHook ) {
+ this.fixHooks[ type ] = fixHook =
+ rmouseEvent.test( type ) ? this.mouseHooks :
+ rkeyEvent.test( type ) ? this.keyHooks :
+ {};
+ }
+ copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
+
+ event = new jQuery.Event( originalEvent );
+
+ i = copy.length;
+ while ( i-- ) {
+ prop = copy[ i ];
+ event[ prop ] = originalEvent[ prop ];
+ }
+
+ // Support: IE<9
+ // Fix target property (#1925)
+ if ( !event.target ) {
+ event.target = originalEvent.srcElement || document;
+ }
+
+ // Support: Chrome 23+, Safari?
+ // Target should not be a text node (#504, #13143)
+ if ( event.target.nodeType === 3 ) {
+ event.target = event.target.parentNode;
+ }
+
+ // Support: IE<9
+ // For mouse/key events, metaKey==false if it's undefined (#3368, #11328)
+ event.metaKey = !!event.metaKey;
+
+ return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
+ },
+
+ // Includes some event props shared by KeyEvent and MouseEvent
+ props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
+
+ fixHooks: {},
+
+ keyHooks: {
+ props: "char charCode key keyCode".split(" "),
+ filter: function( event, original ) {
+
+ // Add which for key events
+ if ( event.which == null ) {
+ event.which = original.charCode != null ? original.charCode : original.keyCode;
+ }
+
+ return event;
+ }
+ },
+
+ mouseHooks: {
+ props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
+ filter: function( event, original ) {
+ var body, eventDoc, doc,
+ button = original.button,
+ fromElement = original.fromElement;
+
+ // Calculate pageX/Y if missing and clientX/Y available
+ if ( event.pageX == null && original.clientX != null ) {
+ eventDoc = event.target.ownerDocument || document;
+ doc = eventDoc.documentElement;
+ body = eventDoc.body;
+
+ event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
+ event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
+ }
+
+ // Add relatedTarget, if necessary
+ if ( !event.relatedTarget && fromElement ) {
+ event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
+ }
+
+ // Add which for click: 1 === left; 2 === middle; 3 === right
+ // Note: button is not normalized, so don't use it
+ if ( !event.which && button !== undefined ) {
+ event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
+ }
+
+ return event;
+ }
+ },
+
+ special: {
+ load: {
+ // Prevent triggered image.load events from bubbling to window.load
+ noBubble: true
+ },
+ click: {
+ // For checkbox, fire native event so checked state will be right
+ trigger: function() {
+ if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) {
+ this.click();
+ return false;
+ }
+ }
+ },
+ focus: {
+ // Fire native event if possible so blur/focus sequence is correct
+ trigger: function() {
+ if ( this !== document.activeElement && this.focus ) {
+ try {
+ this.focus();
+ return false;
+ } catch ( e ) {
+ // Support: IE<9
+ // If we error on focus to hidden element (#1486, #12518),
+ // let .trigger() run the handlers
+ }
+ }
+ },
+ delegateType: "focusin"
+ },
+ blur: {
+ trigger: function() {
+ if ( this === document.activeElement && this.blur ) {
+ this.blur();
+ return false;
+ }
+ },
+ delegateType: "focusout"
+ },
+
+ beforeunload: {
+ postDispatch: function( event ) {
+
+ // Even when returnValue equals to undefined Firefox will still show alert
+ if ( event.result !== undefined ) {
+ event.originalEvent.returnValue = event.result;
+ }
+ }
+ }
+ },
+
+ simulate: function( type, elem, event, bubble ) {
+ // Piggyback on a donor event to simulate a different one.
+ // Fake originalEvent to avoid donor's stopPropagation, but if the
+ // simulated event prevents default then we do the same on the donor.
+ var e = jQuery.extend(
+ new jQuery.Event(),
+ event,
+ { type: type,
+ isSimulated: true,
+ originalEvent: {}
+ }
+ );
+ if ( bubble ) {
+ jQuery.event.trigger( e, null, elem );
+ } else {
+ jQuery.event.dispatch.call( elem, e );
+ }
+ if ( e.isDefaultPrevented() ) {
+ event.preventDefault();
+ }
+ }
+};
+
+jQuery.removeEvent = document.removeEventListener ?
+ function( elem, type, handle ) {
+ if ( elem.removeEventListener ) {
+ elem.removeEventListener( type, handle, false );
+ }
+ } :
+ function( elem, type, handle ) {
+ var name = "on" + type;
+
+ if ( elem.detachEvent ) {
+
+ // #8545, #7054, preventing memory leaks for custom events in IE6-8
+ // detachEvent needed property on element, by name of that event, to properly expose it to GC
+ if ( typeof elem[ name ] === core_strundefined ) {
+ elem[ name ] = null;
+ }
+
+ elem.detachEvent( name, handle );
+ }
+ };
+
+jQuery.Event = function( src, props ) {
+ // Allow instantiation without the 'new' keyword
+ if ( !(this instanceof jQuery.Event) ) {
+ return new jQuery.Event( src, props );
+ }
+
+ // Event object
+ if ( src && src.type ) {
+ this.originalEvent = src;
+ this.type = src.type;
+
+ // Events bubbling up the document may have been marked as prevented
+ // by a handler lower down the tree; reflect the correct value.
+ this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
+ src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
+
+ // Event type
+ } else {
+ this.type = src;
+ }
+
+ // Put explicitly provided properties onto the event object
+ if ( props ) {
+ jQuery.extend( this, props );
+ }
+
+ // Create a timestamp if incoming event doesn't have one
+ this.timeStamp = src && src.timeStamp || jQuery.now();
+
+ // Mark it as fixed
+ this[ jQuery.expando ] = true;
+};
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+ isDefaultPrevented: returnFalse,
+ isPropagationStopped: returnFalse,
+ isImmediatePropagationStopped: returnFalse,
+
+ preventDefault: function() {
+ var e = this.originalEvent;
+
+ this.isDefaultPrevented = returnTrue;
+ if ( !e ) {
+ return;
+ }
+
+ // If preventDefault exists, run it on the original event
+ if ( e.preventDefault ) {
+ e.preventDefault();
+
+ // Support: IE
+ // Otherwise set the returnValue property of the original event to false
+ } else {
+ e.returnValue = false;
+ }
+ },
+ stopPropagation: function() {
+ var e = this.originalEvent;
+
+ this.isPropagationStopped = returnTrue;
+ if ( !e ) {
+ return;
+ }
+ // If stopPropagation exists, run it on the original event
+ if ( e.stopPropagation ) {
+ e.stopPropagation();
+ }
+
+ // Support: IE
+ // Set the cancelBubble property of the original event to true
+ e.cancelBubble = true;
+ },
+ stopImmediatePropagation: function() {
+ this.isImmediatePropagationStopped = returnTrue;
+ this.stopPropagation();
+ }
+};
+
+// Create mouseenter/leave events using mouseover/out and event-time checks
+jQuery.each({
+ mouseenter: "mouseover",
+ mouseleave: "mouseout"
+}, function( orig, fix ) {
+ jQuery.event.special[ orig ] = {
+ delegateType: fix,
+ bindType: fix,
+
+ handle: function( event ) {
+ var ret,
+ target = this,
+ related = event.relatedTarget,
+ handleObj = event.handleObj;
+
+ // For mousenter/leave call the handler if related is outside the target.
+ // NB: No relatedTarget if the mouse left/entered the browser window
+ if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
+ event.type = handleObj.origType;
+ ret = handleObj.handler.apply( this, arguments );
+ event.type = fix;
+ }
+ return ret;
+ }
+ };
+});
+
+// IE submit delegation
+if ( !jQuery.support.submitBubbles ) {
+
+ jQuery.event.special.submit = {
+ setup: function() {
+ // Only need this for delegated form submit events
+ if ( jQuery.nodeName( this, "form" ) ) {
+ return false;
+ }
+
+ // Lazy-add a submit handler when a descendant form may potentially be submitted
+ jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
+ // Node name check avoids a VML-related crash in IE (#9807)
+ var elem = e.target,
+ form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
+ if ( form && !jQuery._data( form, "submitBubbles" ) ) {
+ jQuery.event.add( form, "submit._submit", function( event ) {
+ event._submit_bubble = true;
+ });
+ jQuery._data( form, "submitBubbles", true );
+ }
+ });
+ // return undefined since we don't need an event listener
+ },
+
+ postDispatch: function( event ) {
+ // If form was submitted by the user, bubble the event up the tree
+ if ( event._submit_bubble ) {
+ delete event._submit_bubble;
+ if ( this.parentNode && !event.isTrigger ) {
+ jQuery.event.simulate( "submit", this.parentNode, event, true );
+ }
+ }
+ },
+
+ teardown: function() {
+ // Only need this for delegated form submit events
+ if ( jQuery.nodeName( this, "form" ) ) {
+ return false;
+ }
+
+ // Remove delegated handlers; cleanData eventually reaps submit handlers attached above
+ jQuery.event.remove( this, "._submit" );
+ }
+ };
+}
+
+// IE change delegation and checkbox/radio fix
+if ( !jQuery.support.changeBubbles ) {
+
+ jQuery.event.special.change = {
+
+ setup: function() {
+
+ if ( rformElems.test( this.nodeName ) ) {
+ // IE doesn't fire change on a check/radio until blur; trigger it on click
+ // after a propertychange. Eat the blur-change in special.change.handle.
+ // This still fires onchange a second time for check/radio after blur.
+ if ( this.type === "checkbox" || this.type === "radio" ) {
+ jQuery.event.add( this, "propertychange._change", function( event ) {
+ if ( event.originalEvent.propertyName === "checked" ) {
+ this._just_changed = true;
+ }
+ });
+ jQuery.event.add( this, "click._change", function( event ) {
+ if ( this._just_changed && !event.isTrigger ) {
+ this._just_changed = false;
+ }
+ // Allow triggered, simulated change events (#11500)
+ jQuery.event.simulate( "change", this, event, true );
+ });
+ }
+ return false;
+ }
+ // Delegated event; lazy-add a change handler on descendant inputs
+ jQuery.event.add( this, "beforeactivate._change", function( e ) {
+ var elem = e.target;
+
+ if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) {
+ jQuery.event.add( elem, "change._change", function( event ) {
+ if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
+ jQuery.event.simulate( "change", this.parentNode, event, true );
+ }
+ });
+ jQuery._data( elem, "changeBubbles", true );
+ }
+ });
+ },
+
+ handle: function( event ) {
+ var elem = event.target;
+
+ // Swallow native change events from checkbox/radio, we already triggered them above
+ if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
+ return event.handleObj.handler.apply( this, arguments );
+ }
+ },
+
+ teardown: function() {
+ jQuery.event.remove( this, "._change" );
+
+ return !rformElems.test( this.nodeName );
+ }
+ };
+}
+
+// Create "bubbling" focus and blur events
+if ( !jQuery.support.focusinBubbles ) {
+ jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+
+ // Attach a single capturing handler while someone wants focusin/focusout
+ var attaches = 0,
+ handler = function( event ) {
+ jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
+ };
+
+ jQuery.event.special[ fix ] = {
+ setup: function() {
+ if ( attaches++ === 0 ) {
+ document.addEventListener( orig, handler, true );
+ }
+ },
+ teardown: function() {
+ if ( --attaches === 0 ) {
+ document.removeEventListener( orig, handler, true );
+ }
+ }
+ };
+ });
+}
+
+jQuery.fn.extend({
+
+ on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
+ var type, origFn;
+
+ // Types can be a map of types/handlers
+ if ( typeof types === "object" ) {
+ // ( types-Object, selector, data )
+ if ( typeof selector !== "string" ) {
+ // ( types-Object, data )
+ data = data || selector;
+ selector = undefined;
+ }
+ for ( type in types ) {
+ this.on( type, selector, data, types[ type ], one );
+ }
+ return this;
+ }
+
+ if ( data == null && fn == null ) {
+ // ( types, fn )
+ fn = selector;
+ data = selector = undefined;
+ } else if ( fn == null ) {
+ if ( typeof selector === "string" ) {
+ // ( types, selector, fn )
+ fn = data;
+ data = undefined;
+ } else {
+ // ( types, data, fn )
+ fn = data;
+ data = selector;
+ selector = undefined;
+ }
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ } else if ( !fn ) {
+ return this;
+ }
+
+ if ( one === 1 ) {
+ origFn = fn;
+ fn = function( event ) {
+ // Can use an empty set, since event contains the info
+ jQuery().off( event );
+ return origFn.apply( this, arguments );
+ };
+ // Use same guid so caller can remove using origFn
+ fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
+ }
+ return this.each( function() {
+ jQuery.event.add( this, types, fn, data, selector );
+ });
+ },
+ one: function( types, selector, data, fn ) {
+ return this.on( types, selector, data, fn, 1 );
+ },
+ off: function( types, selector, fn ) {
+ var handleObj, type;
+ if ( types && types.preventDefault && types.handleObj ) {
+ // ( event ) dispatched jQuery.Event
+ handleObj = types.handleObj;
+ jQuery( types.delegateTarget ).off(
+ handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
+ handleObj.selector,
+ handleObj.handler
+ );
+ return this;
+ }
+ if ( typeof types === "object" ) {
+ // ( types-object [, selector] )
+ for ( type in types ) {
+ this.off( type, selector, types[ type ] );
+ }
+ return this;
+ }
+ if ( selector === false || typeof selector === "function" ) {
+ // ( types [, fn] )
+ fn = selector;
+ selector = undefined;
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ }
+ return this.each(function() {
+ jQuery.event.remove( this, types, fn, selector );
+ });
+ },
+
+ bind: function( types, data, fn ) {
+ return this.on( types, null, data, fn );
+ },
+ unbind: function( types, fn ) {
+ return this.off( types, null, fn );
+ },
+
+ delegate: function( selector, types, data, fn ) {
+ return this.on( types, selector, data, fn );
+ },
+ undelegate: function( selector, types, fn ) {
+ // ( namespace ) or ( selector, types [, fn] )
+ return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
+ },
+
+ trigger: function( type, data ) {
+ return this.each(function() {
+ jQuery.event.trigger( type, data, this );
+ });
+ },
+ triggerHandler: function( type, data ) {
+ var elem = this[0];
+ if ( elem ) {
+ return jQuery.event.trigger( type, data, elem, true );
+ }
+ }
+});
+/*!
+ * Sizzle CSS Selector Engine
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license
+ * http://sizzlejs.com/
+ */
+(function( window, undefined ) {
+
+var i,
+ cachedruns,
+ Expr,
+ getText,
+ isXML,
+ compile,
+ hasDuplicate,
+ outermostContext,
+
+ // Local document vars
+ setDocument,
+ document,
+ docElem,
+ documentIsXML,
+ rbuggyQSA,
+ rbuggyMatches,
+ matches,
+ contains,
+ sortOrder,
+
+ // Instance-specific data
+ expando = "sizzle" + -(new Date()),
+ preferredDoc = window.document,
+ support = {},
+ dirruns = 0,
+ done = 0,
+ classCache = createCache(),
+ tokenCache = createCache(),
+ compilerCache = createCache(),
+
+ // General-purpose constants
+ strundefined = typeof undefined,
+ MAX_NEGATIVE = 1 << 31,
+
+ // Array methods
+ arr = [],
+ pop = arr.pop,
+ push = arr.push,
+ slice = arr.slice,
+ // Use a stripped-down indexOf if we can't use a native one
+ indexOf = arr.indexOf || function( elem ) {
+ var i = 0,
+ len = this.length;
+ for ( ; i < len; i++ ) {
+ if ( this[i] === elem ) {
+ return i;
+ }
+ }
+ return -1;
+ },
+
+
+ // Regular expressions
+
+ // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
+ whitespace = "[\\x20\\t\\r\\n\\f]",
+ // http://www.w3.org/TR/css3-syntax/#characters
+ characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
+
+ // Loosely modeled on CSS identifier characters
+ // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
+ // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
+ identifier = characterEncoding.replace( "w", "w#" ),
+
+ // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
+ operators = "([*^$|!~]?=)",
+ attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +
+ "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
+
+ // Prefer arguments quoted,
+ // then not containing pseudos/brackets,
+ // then attribute selectors/non-parenthetical expressions,
+ // then anything else
+ // These preferences are here to reduce the number of selectors
+ // needing tokenize in the PSEUDO preFilter
+ pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)",
+
+ // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
+ rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
+
+ rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
+ rcombinators = new RegExp( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ),
+ rpseudo = new RegExp( pseudos ),
+ ridentifier = new RegExp( "^" + identifier + "$" ),
+
+ matchExpr = {
+ "ID": new RegExp( "^#(" + characterEncoding + ")" ),
+ "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
+ "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ),
+ "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
+ "ATTR": new RegExp( "^" + attributes ),
+ "PSEUDO": new RegExp( "^" + pseudos ),
+ "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
+ "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
+ "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
+ // For use in libraries implementing .is()
+ // We use this for POS matching in `select`
+ "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
+ whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
+ },
+
+ rsibling = /[\x20\t\r\n\f]*[+~]/,
+
+ rnative = /^[^{]+\{\s*\[native code/,
+
+ // Easily-parseable/retrievable ID or TAG or CLASS selectors
+ rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
+
+ rinputs = /^(?:input|select|textarea|button)$/i,
+ rheader = /^h\d$/i,
+
+ rescape = /'|\\/g,
+ rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,
+
+ // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
+ runescape = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,
+ funescape = function( _, escaped ) {
+ var high = "0x" + escaped - 0x10000;
+ // NaN means non-codepoint
+ return high !== high ?
+ escaped :
+ // BMP codepoint
+ high < 0 ?
+ String.fromCharCode( high + 0x10000 ) :
+ // Supplemental Plane codepoint (surrogate pair)
+ String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
+ };
+
+// Use a stripped-down slice if we can't use a native one
+try {
+ slice.call( preferredDoc.documentElement.childNodes, 0 )[0].nodeType;
+} catch ( e ) {
+ slice = function( i ) {
+ var elem,
+ results = [];
+ while ( (elem = this[i++]) ) {
+ results.push( elem );
+ }
+ return results;
+ };
+}
+
+/**
+ * For feature detection
+ * @param {Function} fn The function to test for native support
+ */
+function isNative( fn ) {
+ return rnative.test( fn + "" );
+}
+
+/**
+ * Create key-value caches of limited size
+ * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
+ * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
+ * deleting the oldest entry
+ */
+function createCache() {
+ var cache,
+ keys = [];
+
+ return (cache = function( key, value ) {
+ // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
+ if ( keys.push( key += " " ) > Expr.cacheLength ) {
+ // Only keep the most recent entries
+ delete cache[ keys.shift() ];
+ }
+ return (cache[ key ] = value);
+ });
+}
+
+/**
+ * Mark a function for special use by Sizzle
+ * @param {Function} fn The function to mark
+ */
+function markFunction( fn ) {
+ fn[ expando ] = true;
+ return fn;
+}
+
+/**
+ * Support testing using an element
+ * @param {Function} fn Passed the created div and expects a boolean result
+ */
+function assert( fn ) {
+ var div = document.createElement("div");
+
+ try {
+ return fn( div );
+ } catch (e) {
+ return false;
+ } finally {
+ // release memory in IE
+ div = null;
+ }
+}
+
+function Sizzle( selector, context, results, seed ) {
+ var match, elem, m, nodeType,
+ // QSA vars
+ i, groups, old, nid, newContext, newSelector;
+
+ if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
+ setDocument( context );
+ }
+
+ context = context || document;
+ results = results || [];
+
+ if ( !selector || typeof selector !== "string" ) {
+ return results;
+ }
+
+ if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
+ return [];
+ }
+
+ if ( !documentIsXML && !seed ) {
+
+ // Shortcuts
+ if ( (match = rquickExpr.exec( selector )) ) {
+ // Speed-up: Sizzle("#ID")
+ if ( (m = match[1]) ) {
+ if ( nodeType === 9 ) {
+ elem = context.getElementById( m );
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ if ( elem && elem.parentNode ) {
+ // Handle the case where IE, Opera, and Webkit return items
+ // by name instead of ID
+ if ( elem.id === m ) {
+ results.push( elem );
+ return results;
+ }
+ } else {
+ return results;
+ }
+ } else {
+ // Context is not a document
+ if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
+ contains( context, elem ) && elem.id === m ) {
+ results.push( elem );
+ return results;
+ }
+ }
+
+ // Speed-up: Sizzle("TAG")
+ } else if ( match[2] ) {
+ push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) );
+ return results;
+
+ // Speed-up: Sizzle(".CLASS")
+ } else if ( (m = match[3]) && support.getByClassName && context.getElementsByClassName ) {
+ push.apply( results, slice.call(context.getElementsByClassName( m ), 0) );
+ return results;
+ }
+ }
+
+ // QSA path
+ if ( support.qsa && !rbuggyQSA.test(selector) ) {
+ old = true;
+ nid = expando;
+ newContext = context;
+ newSelector = nodeType === 9 && selector;
+
+ // qSA works strangely on Element-rooted queries
+ // We can work around this by specifying an extra ID on the root
+ // and working up from there (Thanks to Andrew Dupont for the technique)
+ // IE 8 doesn't work on object elements
+ if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+ groups = tokenize( selector );
+
+ if ( (old = context.getAttribute("id")) ) {
+ nid = old.replace( rescape, "\\$&" );
+ } else {
+ context.setAttribute( "id", nid );
+ }
+ nid = "[id='" + nid + "'] ";
+
+ i = groups.length;
+ while ( i-- ) {
+ groups[i] = nid + toSelector( groups[i] );
+ }
+ newContext = rsibling.test( selector ) && context.parentNode || context;
+ newSelector = groups.join(",");
+ }
+
+ if ( newSelector ) {
+ try {
+ push.apply( results, slice.call( newContext.querySelectorAll(
+ newSelector
+ ), 0 ) );
+ return results;
+ } catch(qsaError) {
+ } finally {
+ if ( !old ) {
+ context.removeAttribute("id");
+ }
+ }
+ }
+ }
+ }
+
+ // All others
+ return select( selector.replace( rtrim, "$1" ), context, results, seed );
+}
+
+/**
+ * Detect xml
+ * @param {Element|Object} elem An element or a document
+ */
+isXML = Sizzle.isXML = function( elem ) {
+ // documentElement is verified for cases where it doesn't yet exist
+ // (such as loading iframes in IE - #4833)
+ var documentElement = elem && (elem.ownerDocument || elem).documentElement;
+ return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+/**
+ * Sets document-related variables once based on the current document
+ * @param {Element|Object} [doc] An element or document object to use to set the document
+ * @returns {Object} Returns the current document
+ */
+setDocument = Sizzle.setDocument = function( node ) {
+ var doc = node ? node.ownerDocument || node : preferredDoc;
+
+ // If no document and documentElement is available, return
+ if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
+ return document;
+ }
+
+ // Set our document
+ document = doc;
+ docElem = doc.documentElement;
+
+ // Support tests
+ documentIsXML = isXML( doc );
+
+ // Check if getElementsByTagName("*") returns only elements
+ support.tagNameNoComments = assert(function( div ) {
+ div.appendChild( doc.createComment("") );
+ return !div.getElementsByTagName("*").length;
+ });
+
+ // Check if attributes should be retrieved by attribute nodes
+ support.attributes = assert(function( div ) {
+ div.innerHTML = "<select></select>";
+ var type = typeof div.lastChild.getAttribute("multiple");
+ // IE8 returns a string for some attributes even when not present
+ return type !== "boolean" && type !== "string";
+ });
+
+ // Check if getElementsByClassName can be trusted
+ support.getByClassName = assert(function( div ) {
+ // Opera can't find a second classname (in 9.6)
+ div.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>";
+ if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) {
+ return false;
+ }
+
+ // Safari 3.2 caches class attributes and doesn't catch changes
+ div.lastChild.className = "e";
+ return div.getElementsByClassName("e").length === 2;
+ });
+
+ // Check if getElementById returns elements by name
+ // Check if getElementsByName privileges form controls or returns elements by ID
+ support.getByName = assert(function( div ) {
+ // Inject content
+ div.id = expando + 0;
+ div.innerHTML = "<a name='" + expando + "'></a><div name='" + expando + "'></div>";
+ docElem.insertBefore( div, docElem.firstChild );
+
+ // Test
+ var pass = doc.getElementsByName &&
+ // buggy browsers will return fewer than the correct 2
+ doc.getElementsByName( expando ).length === 2 +
+ // buggy browsers will return more than the correct 0
+ doc.getElementsByName( expando + 0 ).length;
+ support.getIdNotName = !doc.getElementById( expando );
+
+ // Cleanup
+ docElem.removeChild( div );
+
+ return pass;
+ });
+
+ // IE6/7 return modified attributes
+ Expr.attrHandle = assert(function( div ) {
+ div.innerHTML = "<a href='#'></a>";
+ return div.firstChild && typeof div.firstChild.getAttribute !== strundefined &&
+ div.firstChild.getAttribute("href") === "#";
+ }) ?
+ {} :
+ {
+ "href": function( elem ) {
+ return elem.getAttribute( "href", 2 );
+ },
+ "type": function( elem ) {
+ return elem.getAttribute("type");
+ }
+ };
+
+ // ID find and filter
+ if ( support.getIdNotName ) {
+ Expr.find["ID"] = function( id, context ) {
+ if ( typeof context.getElementById !== strundefined && !documentIsXML ) {
+ var m = context.getElementById( id );
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ return m && m.parentNode ? [m] : [];
+ }
+ };
+ Expr.filter["ID"] = function( id ) {
+ var attrId = id.replace( runescape, funescape );
+ return function( elem ) {
+ return elem.getAttribute("id") === attrId;
+ };
+ };
+ } else {
+ Expr.find["ID"] = function( id, context ) {
+ if ( typeof context.getElementById !== strundefined && !documentIsXML ) {
+ var m = context.getElementById( id );
+
+ return m ?
+ m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ?
+ [m] :
+ undefined :
+ [];
+ }
+ };
+ Expr.filter["ID"] = function( id ) {
+ var attrId = id.replace( runescape, funescape );
+ return function( elem ) {
+ var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
+ return node && node.value === attrId;
+ };
+ };
+ }
+
+ // Tag
+ Expr.find["TAG"] = support.tagNameNoComments ?
+ function( tag, context ) {
+ if ( typeof context.getElementsByTagName !== strundefined ) {
+ return context.getElementsByTagName( tag );
+ }
+ } :
+ function( tag, context ) {
+ var elem,
+ tmp = [],
+ i = 0,
+ results = context.getElementsByTagName( tag );
+
+ // Filter out possible comments
+ if ( tag === "*" ) {
+ while ( (elem = results[i++]) ) {
+ if ( elem.nodeType === 1 ) {
+ tmp.push( elem );
+ }
+ }
+
+ return tmp;
+ }
+ return results;
+ };
+
+ // Name
+ Expr.find["NAME"] = support.getByName && function( tag, context ) {
+ if ( typeof context.getElementsByName !== strundefined ) {
+ return context.getElementsByName( name );
+ }
+ };
+
+ // Class
+ Expr.find["CLASS"] = support.getByClassName && function( className, context ) {
+ if ( typeof context.getElementsByClassName !== strundefined && !documentIsXML ) {
+ return context.getElementsByClassName( className );
+ }
+ };
+
+ // QSA and matchesSelector support
+
+ // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
+ rbuggyMatches = [];
+
+ // qSa(:focus) reports false when true (Chrome 21),
+ // no need to also add to buggyMatches since matches checks buggyQSA
+ // A support test would require too much code (would include document ready)
+ rbuggyQSA = [ ":focus" ];
+
+ if ( (support.qsa = isNative(doc.querySelectorAll)) ) {
+ // Build QSA regex
+ // Regex strategy adopted from Diego Perini
+ assert(function( div ) {
+ // Select is set to empty string on purpose
+ // This is to test IE's treatment of not explictly
+ // setting a boolean content attribute,
+ // since its presence should be enough
+ // http://bugs.jquery.com/ticket/12359
+ div.innerHTML = "<select><option selected=''></option></select>";
+
+ // IE8 - Some boolean attributes are not treated correctly
+ if ( !div.querySelectorAll("[selected]").length ) {
+ rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" );
+ }
+
+ // Webkit/Opera - :checked should return selected option elements
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ // IE8 throws error here and will not see later tests
+ if ( !div.querySelectorAll(":checked").length ) {
+ rbuggyQSA.push(":checked");
+ }
+ });
+
+ assert(function( div ) {
+
+ // Opera 10-12/IE8 - ^= $= *= and empty values
+ // Should not select anything
+ div.innerHTML = "<input type='hidden' i=''/>";
+ if ( div.querySelectorAll("[i^='']").length ) {
+ rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" );
+ }
+
+ // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
+ // IE8 throws error here and will not see later tests
+ if ( !div.querySelectorAll(":enabled").length ) {
+ rbuggyQSA.push( ":enabled", ":disabled" );
+ }
+
+ // Opera 10-11 does not throw on post-comma invalid pseudos
+ div.querySelectorAll("*,:x");
+ rbuggyQSA.push(",.*:");
+ });
+ }
+
+ if ( (support.matchesSelector = isNative( (matches = docElem.matchesSelector ||
+ docElem.mozMatchesSelector ||
+ docElem.webkitMatchesSelector ||
+ docElem.oMatchesSelector ||
+ docElem.msMatchesSelector) )) ) {
+
+ assert(function( div ) {
+ // Check to see if it's possible to do matchesSelector
+ // on a disconnected node (IE 9)
+ support.disconnectedMatch = matches.call( div, "div" );
+
+ // This should fail with an exception
+ // Gecko does not error, returns false instead
+ matches.call( div, "[s!='']:x" );
+ rbuggyMatches.push( "!=", pseudos );
+ });
+ }
+
+ rbuggyQSA = new RegExp( rbuggyQSA.join("|") );
+ rbuggyMatches = new RegExp( rbuggyMatches.join("|") );
+
+ // Element contains another
+ // Purposefully does not implement inclusive descendent
+ // As in, an element does not contain itself
+ contains = isNative(docElem.contains) || docElem.compareDocumentPosition ?
+ function( a, b ) {
+ var adown = a.nodeType === 9 ? a.documentElement : a,
+ bup = b && b.parentNode;
+ return a === bup || !!( bup && bup.nodeType === 1 && (
+ adown.contains ?
+ adown.contains( bup ) :
+ a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
+ ));
+ } :
+ function( a, b ) {
+ if ( b ) {
+ while ( (b = b.parentNode) ) {
+ if ( b === a ) {
+ return true;
+ }
+ }
+ }
+ return false;
+ };
+
+ // Document order sorting
+ sortOrder = docElem.compareDocumentPosition ?
+ function( a, b ) {
+ var compare;
+
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
+ if ( (compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b )) ) {
+ if ( compare & 1 || a.parentNode && a.parentNode.nodeType === 11 ) {
+ if ( a === doc || contains( preferredDoc, a ) ) {
+ return -1;
+ }
+ if ( b === doc || contains( preferredDoc, b ) ) {
+ return 1;
+ }
+ return 0;
+ }
+ return compare & 4 ? -1 : 1;
+ }
+
+ return a.compareDocumentPosition ? -1 : 1;
+ } :
+ function( a, b ) {
+ var cur,
+ i = 0,
+ aup = a.parentNode,
+ bup = b.parentNode,
+ ap = [ a ],
+ bp = [ b ];
+
+ // Exit early if the nodes are identical
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+
+ // Parentless nodes are either documents or disconnected
+ } else if ( !aup || !bup ) {
+ return a === doc ? -1 :
+ b === doc ? 1 :
+ aup ? -1 :
+ bup ? 1 :
+ 0;
+
+ // If the nodes are siblings, we can do a quick check
+ } else if ( aup === bup ) {
+ return siblingCheck( a, b );
+ }
+
+ // Otherwise we need full lists of their ancestors for comparison
+ cur = a;
+ while ( (cur = cur.parentNode) ) {
+ ap.unshift( cur );
+ }
+ cur = b;
+ while ( (cur = cur.parentNode) ) {
+ bp.unshift( cur );
+ }
+
+ // Walk down the tree looking for a discrepancy
+ while ( ap[i] === bp[i] ) {
+ i++;
+ }
+
+ return i ?
+ // Do a sibling check if the nodes have a common ancestor
+ siblingCheck( ap[i], bp[i] ) :
+
+ // Otherwise nodes in our document sort first
+ ap[i] === preferredDoc ? -1 :
+ bp[i] === preferredDoc ? 1 :
+ 0;
+ };
+
+ // Always assume the presence of duplicates if sort doesn't
+ // pass them to our comparison function (as in Google Chrome).
+ hasDuplicate = false;
+ [0, 0].sort( sortOrder );
+ support.detectDuplicates = hasDuplicate;
+
+ return document;
+};
+
+Sizzle.matches = function( expr, elements ) {
+ return Sizzle( expr, null, null, elements );
+};
+
+Sizzle.matchesSelector = function( elem, expr ) {
+ // Set document vars if needed
+ if ( ( elem.ownerDocument || elem ) !== document ) {
+ setDocument( elem );
+ }
+
+ // Make sure that attribute selectors are quoted
+ expr = expr.replace( rattributeQuotes, "='$1']" );
+
+ // rbuggyQSA always contains :focus, so no need for an existence check
+ if ( support.matchesSelector && !documentIsXML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && !rbuggyQSA.test(expr) ) {
+ try {
+ var ret = matches.call( elem, expr );
+
+ // IE 9's matchesSelector returns false on disconnected nodes
+ if ( ret || support.disconnectedMatch ||
+ // As well, disconnected nodes are said to be in a document
+ // fragment in IE 9
+ elem.document && elem.document.nodeType !== 11 ) {
+ return ret;
+ }
+ } catch(e) {}
+ }
+
+ return Sizzle( expr, document, null, [elem] ).length > 0;
+};
+
+Sizzle.contains = function( context, elem ) {
+ // Set document vars if needed
+ if ( ( context.ownerDocument || context ) !== document ) {
+ setDocument( context );
+ }
+ return contains( context, elem );
+};
+
+Sizzle.attr = function( elem, name ) {
+ var val;
+
+ // Set document vars if needed
+ if ( ( elem.ownerDocument || elem ) !== document ) {
+ setDocument( elem );
+ }
+
+ if ( !documentIsXML ) {
+ name = name.toLowerCase();
+ }
+ if ( (val = Expr.attrHandle[ name ]) ) {
+ return val( elem );
+ }
+ if ( documentIsXML || support.attributes ) {
+ return elem.getAttribute( name );
+ }
+ return ( (val = elem.getAttributeNode( name )) || elem.getAttribute( name ) ) && elem[ name ] === true ?
+ name :
+ val && val.specified ? val.value : null;
+};
+
+Sizzle.error = function( msg ) {
+ throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+// Document sorting and removing duplicates
+Sizzle.uniqueSort = function( results ) {
+ var elem,
+ duplicates = [],
+ i = 1,
+ j = 0;
+
+ // Unless we *know* we can detect duplicates, assume their presence
+ hasDuplicate = !support.detectDuplicates;
+ results.sort( sortOrder );
+
+ if ( hasDuplicate ) {
+ for ( ; (elem = results[i]); i++ ) {
+ if ( elem === results[ i - 1 ] ) {
+ j = duplicates.push( i );
+ }
+ }
+ while ( j-- ) {
+ results.splice( duplicates[ j ], 1 );
+ }
+ }
+
+ return results;
+};
+
+function siblingCheck( a, b ) {
+ var cur = b && a,
+ diff = cur && ( ~b.sourceIndex || MAX_NEGATIVE ) - ( ~a.sourceIndex || MAX_NEGATIVE );
+
+ // Use IE sourceIndex if available on both nodes
+ if ( diff ) {
+ return diff;
+ }
+
+ // Check if b follows a
+ if ( cur ) {
+ while ( (cur = cur.nextSibling) ) {
+ if ( cur === b ) {
+ return -1;
+ }
+ }
+ }
+
+ return a ? 1 : -1;
+}
+
+// Returns a function to use in pseudos for input types
+function createInputPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && elem.type === type;
+ };
+}
+
+// Returns a function to use in pseudos for buttons
+function createButtonPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return (name === "input" || name === "button") && elem.type === type;
+ };
+}
+
+// Returns a function to use in pseudos for positionals
+function createPositionalPseudo( fn ) {
+ return markFunction(function( argument ) {
+ argument = +argument;
+ return markFunction(function( seed, matches ) {
+ var j,
+ matchIndexes = fn( [], seed.length, argument ),
+ i = matchIndexes.length;
+
+ // Match elements found at the specified indexes
+ while ( i-- ) {
+ if ( seed[ (j = matchIndexes[i]) ] ) {
+ seed[j] = !(matches[j] = seed[j]);
+ }
+ }
+ });
+ });
+}
+
+/**
+ * Utility function for retrieving the text value of an array of DOM nodes
+ * @param {Array|Element} elem
+ */
+getText = Sizzle.getText = function( elem ) {
+ var node,
+ ret = "",
+ i = 0,
+ nodeType = elem.nodeType;
+
+ if ( !nodeType ) {
+ // If no nodeType, this is expected to be an array
+ for ( ; (node = elem[i]); i++ ) {
+ // Do not traverse comment nodes
+ ret += getText( node );
+ }
+ } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+ // Use textContent for elements
+ // innerText usage removed for consistency of new lines (see #11153)
+ if ( typeof elem.textContent === "string" ) {
+ return elem.textContent;
+ } else {
+ // Traverse its children
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+ ret += getText( elem );
+ }
+ }
+ } else if ( nodeType === 3 || nodeType === 4 ) {
+ return elem.nodeValue;
+ }
+ // Do not include comment or processing instruction nodes
+
+ return ret;
+};
+
+Expr = Sizzle.selectors = {
+
+ // Can be adjusted by the user
+ cacheLength: 50,
+
+ createPseudo: markFunction,
+
+ match: matchExpr,
+
+ find: {},
+
+ relative: {
+ ">": { dir: "parentNode", first: true },
+ " ": { dir: "parentNode" },
+ "+": { dir: "previousSibling", first: true },
+ "~": { dir: "previousSibling" }
+ },
+
+ preFilter: {
+ "ATTR": function( match ) {
+ match[1] = match[1].replace( runescape, funescape );
+
+ // Move the given value to match[3] whether quoted or unquoted
+ match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape );
+
+ if ( match[2] === "~=" ) {
+ match[3] = " " + match[3] + " ";
+ }
+
+ return match.slice( 0, 4 );
+ },
+
+ "CHILD": function( match ) {
+ /* matches from matchExpr["CHILD"]
+ 1 type (only|nth|...)
+ 2 what (child|of-type)
+ 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
+ 4 xn-component of xn+y argument ([+-]?\d*n|)
+ 5 sign of xn-component
+ 6 x of xn-component
+ 7 sign of y-component
+ 8 y of y-component
+ */
+ match[1] = match[1].toLowerCase();
+
+ if ( match[1].slice( 0, 3 ) === "nth" ) {
+ // nth-* requires argument
+ if ( !match[3] ) {
+ Sizzle.error( match[0] );
+ }
+
+ // numeric x and y parameters for Expr.filter.CHILD
+ // remember that false/true cast respectively to 0/1
+ match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
+ match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
+
+ // other types prohibit arguments
+ } else if ( match[3] ) {
+ Sizzle.error( match[0] );
+ }
+
+ return match;
+ },
+
+ "PSEUDO": function( match ) {
+ var excess,
+ unquoted = !match[5] && match[2];
+
+ if ( matchExpr["CHILD"].test( match[0] ) ) {
+ return null;
+ }
+
+ // Accept quoted arguments as-is
+ if ( match[4] ) {
+ match[2] = match[4];
+
+ // Strip excess characters from unquoted arguments
+ } else if ( unquoted && rpseudo.test( unquoted ) &&
+ // Get excess from tokenize (recursively)
+ (excess = tokenize( unquoted, true )) &&
+ // advance to the next closing parenthesis
+ (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
+
+ // excess is a negative index
+ match[0] = match[0].slice( 0, excess );
+ match[2] = unquoted.slice( 0, excess );
+ }
+
+ // Return only captures needed by the pseudo filter method (type and argument)
+ return match.slice( 0, 3 );
+ }
+ },
+
+ filter: {
+
+ "TAG": function( nodeName ) {
+ if ( nodeName === "*" ) {
+ return function() { return true; };
+ }
+
+ nodeName = nodeName.replace( runescape, funescape ).toLowerCase();
+ return function( elem ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
+ };
+ },
+
+ "CLASS": function( className ) {
+ var pattern = classCache[ className + " " ];
+
+ return pattern ||
+ (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
+ classCache( className, function( elem ) {
+ return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" );
+ });
+ },
+
+ "ATTR": function( name, operator, check ) {
+ return function( elem ) {
+ var result = Sizzle.attr( elem, name );
+
+ if ( result == null ) {
+ return operator === "!=";
+ }
+ if ( !operator ) {
+ return true;
+ }
+
+ result += "";
+
+ return operator === "=" ? result === check :
+ operator === "!=" ? result !== check :
+ operator === "^=" ? check && result.indexOf( check ) === 0 :
+ operator === "*=" ? check && result.indexOf( check ) > -1 :
+ operator === "$=" ? check && result.slice( -check.length ) === check :
+ operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
+ operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
+ false;
+ };
+ },
+
+ "CHILD": function( type, what, argument, first, last ) {
+ var simple = type.slice( 0, 3 ) !== "nth",
+ forward = type.slice( -4 ) !== "last",
+ ofType = what === "of-type";
+
+ return first === 1 && last === 0 ?
+
+ // Shortcut for :nth-*(n)
+ function( elem ) {
+ return !!elem.parentNode;
+ } :
+
+ function( elem, context, xml ) {
+ var cache, outerCache, node, diff, nodeIndex, start,
+ dir = simple !== forward ? "nextSibling" : "previousSibling",
+ parent = elem.parentNode,
+ name = ofType && elem.nodeName.toLowerCase(),
+ useCache = !xml && !ofType;
+
+ if ( parent ) {
+
+ // :(first|last|only)-(child|of-type)
+ if ( simple ) {
+ while ( dir ) {
+ node = elem;
+ while ( (node = node[ dir ]) ) {
+ if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
+ return false;
+ }
+ }
+ // Reverse direction for :only-* (if we haven't yet done so)
+ start = dir = type === "only" && !start && "nextSibling";
+ }
+ return true;
+ }
+
+ start = [ forward ? parent.firstChild : parent.lastChild ];
+
+ // non-xml :nth-child(...) stores cache data on `parent`
+ if ( forward && useCache ) {
+ // Seek `elem` from a previously-cached index
+ outerCache = parent[ expando ] || (parent[ expando ] = {});
+ cache = outerCache[ type ] || [];
+ nodeIndex = cache[0] === dirruns && cache[1];
+ diff = cache[0] === dirruns && cache[2];
+ node = nodeIndex && parent.childNodes[ nodeIndex ];
+
+ while ( (node = ++nodeIndex && node && node[ dir ] ||
+
+ // Fallback to seeking `elem` from the start
+ (diff = nodeIndex = 0) || start.pop()) ) {
+
+ // When found, cache indexes on `parent` and break
+ if ( node.nodeType === 1 && ++diff && node === elem ) {
+ outerCache[ type ] = [ dirruns, nodeIndex, diff ];
+ break;
+ }
+ }
+
+ // Use previously-cached element index if available
+ } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
+ diff = cache[1];
+
+ // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
+ } else {
+ // Use the same loop as above to seek `elem` from the start
+ while ( (node = ++nodeIndex && node && node[ dir ] ||
+ (diff = nodeIndex = 0) || start.pop()) ) {
+
+ if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
+ // Cache the index of each encountered element
+ if ( useCache ) {
+ (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
+ }
+
+ if ( node === elem ) {
+ break;
+ }
+ }
+ }
+ }
+
+ // Incorporate the offset, then check against cycle size
+ diff -= last;
+ return diff === first || ( diff % first === 0 && diff / first >= 0 );
+ }
+ };
+ },
+
+ "PSEUDO": function( pseudo, argument ) {
+ // pseudo-class names are case-insensitive
+ // http://www.w3.org/TR/selectors/#pseudo-classes
+ // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
+ // Remember that setFilters inherits from pseudos
+ var args,
+ fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
+ Sizzle.error( "unsupported pseudo: " + pseudo );
+
+ // The user may use createPseudo to indicate that
+ // arguments are needed to create the filter function
+ // just as Sizzle does
+ if ( fn[ expando ] ) {
+ return fn( argument );
+ }
+
+ // But maintain support for old signatures
+ if ( fn.length > 1 ) {
+ args = [ pseudo, pseudo, "", argument ];
+ return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
+ markFunction(function( seed, matches ) {
+ var idx,
+ matched = fn( seed, argument ),
+ i = matched.length;
+ while ( i-- ) {
+ idx = indexOf.call( seed, matched[i] );
+ seed[ idx ] = !( matches[ idx ] = matched[i] );
+ }
+ }) :
+ function( elem ) {
+ return fn( elem, 0, args );
+ };
+ }
+
+ return fn;
+ }
+ },
+
+ pseudos: {
+ // Potentially complex pseudos
+ "not": markFunction(function( selector ) {
+ // Trim the selector passed to compile
+ // to avoid treating leading and trailing
+ // spaces as combinators
+ var input = [],
+ results = [],
+ matcher = compile( selector.replace( rtrim, "$1" ) );
+
+ return matcher[ expando ] ?
+ markFunction(function( seed, matches, context, xml ) {
+ var elem,
+ unmatched = matcher( seed, null, xml, [] ),
+ i = seed.length;
+
+ // Match elements unmatched by `matcher`
+ while ( i-- ) {
+ if ( (elem = unmatched[i]) ) {
+ seed[i] = !(matches[i] = elem);
+ }
+ }
+ }) :
+ function( elem, context, xml ) {
+ input[0] = elem;
+ matcher( input, null, xml, results );
+ return !results.pop();
+ };
+ }),
+
+ "has": markFunction(function( selector ) {
+ return function( elem ) {
+ return Sizzle( selector, elem ).length > 0;
+ };
+ }),
+
+ "contains": markFunction(function( text ) {
+ return function( elem ) {
+ return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
+ };
+ }),
+
+ // "Whether an element is represented by a :lang() selector
+ // is based solely on the element's language value
+ // being equal to the identifier C,
+ // or beginning with the identifier C immediately followed by "-".
+ // The matching of C against the element's language value is performed case-insensitively.
+ // The identifier C does not have to be a valid language name."
+ // http://www.w3.org/TR/selectors/#lang-pseudo
+ "lang": markFunction( function( lang ) {
+ // lang value must be a valid identifider
+ if ( !ridentifier.test(lang || "") ) {
+ Sizzle.error( "unsupported lang: " + lang );
+ }
+ lang = lang.replace( runescape, funescape ).toLowerCase();
+ return function( elem ) {
+ var elemLang;
+ do {
+ if ( (elemLang = documentIsXML ?
+ elem.getAttribute("xml:lang") || elem.getAttribute("lang") :
+ elem.lang) ) {
+
+ elemLang = elemLang.toLowerCase();
+ return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
+ }
+ } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
+ return false;
+ };
+ }),
+
+ // Miscellaneous
+ "target": function( elem ) {
+ var hash = window.location && window.location.hash;
+ return hash && hash.slice( 1 ) === elem.id;
+ },
+
+ "root": function( elem ) {
+ return elem === docElem;
+ },
+
+ "focus": function( elem ) {
+ return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
+ },
+
+ // Boolean properties
+ "enabled": function( elem ) {
+ return elem.disabled === false;
+ },
+
+ "disabled": function( elem ) {
+ return elem.disabled === true;
+ },
+
+ "checked": function( elem ) {
+ // In CSS3, :checked should return both checked and selected elements
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ var nodeName = elem.nodeName.toLowerCase();
+ return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
+ },
+
+ "selected": function( elem ) {
+ // Accessing this property makes selected-by-default
+ // options in Safari work properly
+ if ( elem.parentNode ) {
+ elem.parentNode.selectedIndex;
+ }
+
+ return elem.selected === true;
+ },
+
+ // Contents
+ "empty": function( elem ) {
+ // http://www.w3.org/TR/selectors/#empty-pseudo
+ // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
+ // not comment, processing instructions, or others
+ // Thanks to Diego Perini for the nodeName shortcut
+ // Greater than "@" means alpha characters (specifically not starting with "#" or "?")
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+ if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) {
+ return false;
+ }
+ }
+ return true;
+ },
+
+ "parent": function( elem ) {
+ return !Expr.pseudos["empty"]( elem );
+ },
+
+ // Element/input types
+ "header": function( elem ) {
+ return rheader.test( elem.nodeName );
+ },
+
+ "input": function( elem ) {
+ return rinputs.test( elem.nodeName );
+ },
+
+ "button": function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && elem.type === "button" || name === "button";
+ },
+
+ "text": function( elem ) {
+ var attr;
+ // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
+ // use getAttribute instead to test this case
+ return elem.nodeName.toLowerCase() === "input" &&
+ elem.type === "text" &&
+ ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type );
+ },
+
+ // Position-in-collection
+ "first": createPositionalPseudo(function() {
+ return [ 0 ];
+ }),
+
+ "last": createPositionalPseudo(function( matchIndexes, length ) {
+ return [ length - 1 ];
+ }),
+
+ "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ return [ argument < 0 ? argument + length : argument ];
+ }),
+
+ "even": createPositionalPseudo(function( matchIndexes, length ) {
+ var i = 0;
+ for ( ; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "odd": createPositionalPseudo(function( matchIndexes, length ) {
+ var i = 1;
+ for ( ; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ var i = argument < 0 ? argument + length : argument;
+ for ( ; --i >= 0; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ var i = argument < 0 ? argument + length : argument;
+ for ( ; ++i < length; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ })
+ }
+};
+
+// Add button/input type pseudos
+for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
+ Expr.pseudos[ i ] = createInputPseudo( i );
+}
+for ( i in { submit: true, reset: true } ) {
+ Expr.pseudos[ i ] = createButtonPseudo( i );
+}
+
+function tokenize( selector, parseOnly ) {
+ var matched, match, tokens, type,
+ soFar, groups, preFilters,
+ cached = tokenCache[ selector + " " ];
+
+ if ( cached ) {
+ return parseOnly ? 0 : cached.slice( 0 );
+ }
+
+ soFar = selector;
+ groups = [];
+ preFilters = Expr.preFilter;
+
+ while ( soFar ) {
+
+ // Comma and first run
+ if ( !matched || (match = rcomma.exec( soFar )) ) {
+ if ( match ) {
+ // Don't consume trailing commas as valid
+ soFar = soFar.slice( match[0].length ) || soFar;
+ }
+ groups.push( tokens = [] );
+ }
+
+ matched = false;
+
+ // Combinators
+ if ( (match = rcombinators.exec( soFar )) ) {
+ matched = match.shift();
+ tokens.push( {
+ value: matched,
+ // Cast descendant combinators to space
+ type: match[0].replace( rtrim, " " )
+ } );
+ soFar = soFar.slice( matched.length );
+ }
+
+ // Filters
+ for ( type in Expr.filter ) {
+ if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
+ (match = preFilters[ type ]( match ))) ) {
+ matched = match.shift();
+ tokens.push( {
+ value: matched,
+ type: type,
+ matches: match
+ } );
+ soFar = soFar.slice( matched.length );
+ }
+ }
+
+ if ( !matched ) {
+ break;
+ }
+ }
+
+ // Return the length of the invalid excess
+ // if we're just parsing
+ // Otherwise, throw an error or return tokens
+ return parseOnly ?
+ soFar.length :
+ soFar ?
+ Sizzle.error( selector ) :
+ // Cache the tokens
+ tokenCache( selector, groups ).slice( 0 );
+}
+
+function toSelector( tokens ) {
+ var i = 0,
+ len = tokens.length,
+ selector = "";
+ for ( ; i < len; i++ ) {
+ selector += tokens[i].value;
+ }
+ return selector;
+}
+
+function addCombinator( matcher, combinator, base ) {
+ var dir = combinator.dir,
+ checkNonElements = base && dir === "parentNode",
+ doneName = done++;
+
+ return combinator.first ?
+ // Check against closest ancestor/preceding element
+ function( elem, context, xml ) {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ return matcher( elem, context, xml );
+ }
+ }
+ } :
+
+ // Check against all ancestor/preceding elements
+ function( elem, context, xml ) {
+ var data, cache, outerCache,
+ dirkey = dirruns + " " + doneName;
+
+ // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
+ if ( xml ) {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ if ( matcher( elem, context, xml ) ) {
+ return true;
+ }
+ }
+ }
+ } else {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ outerCache = elem[ expando ] || (elem[ expando ] = {});
+ if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {
+ if ( (data = cache[1]) === true || data === cachedruns ) {
+ return data === true;
+ }
+ } else {
+ cache = outerCache[ dir ] = [ dirkey ];
+ cache[1] = matcher( elem, context, xml ) || cachedruns;
+ if ( cache[1] === true ) {
+ return true;
+ }
+ }
+ }
+ }
+ }
+ };
+}
+
+function elementMatcher( matchers ) {
+ return matchers.length > 1 ?
+ function( elem, context, xml ) {
+ var i = matchers.length;
+ while ( i-- ) {
+ if ( !matchers[i]( elem, context, xml ) ) {
+ return false;
+ }
+ }
+ return true;
+ } :
+ matchers[0];
+}
+
+function condense( unmatched, map, filter, context, xml ) {
+ var elem,
+ newUnmatched = [],
+ i = 0,
+ len = unmatched.length,
+ mapped = map != null;
+
+ for ( ; i < len; i++ ) {
+ if ( (elem = unmatched[i]) ) {
+ if ( !filter || filter( elem, context, xml ) ) {
+ newUnmatched.push( elem );
+ if ( mapped ) {
+ map.push( i );
+ }
+ }
+ }
+ }
+
+ return newUnmatched;
+}
+
+function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
+ if ( postFilter && !postFilter[ expando ] ) {
+ postFilter = setMatcher( postFilter );
+ }
+ if ( postFinder && !postFinder[ expando ] ) {
+ postFinder = setMatcher( postFinder, postSelector );
+ }
+ return markFunction(function( seed, results, context, xml ) {
+ var temp, i, elem,
+ preMap = [],
+ postMap = [],
+ preexisting = results.length,
+
+ // Get initial elements from seed or context
+ elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
+
+ // Prefilter to get matcher input, preserving a map for seed-results synchronization
+ matcherIn = preFilter && ( seed || !selector ) ?
+ condense( elems, preMap, preFilter, context, xml ) :
+ elems,
+
+ matcherOut = matcher ?
+ // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
+ postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
+
+ // ...intermediate processing is necessary
+ [] :
+
+ // ...otherwise use results directly
+ results :
+ matcherIn;
+
+ // Find primary matches
+ if ( matcher ) {
+ matcher( matcherIn, matcherOut, context, xml );
+ }
+
+ // Apply postFilter
+ if ( postFilter ) {
+ temp = condense( matcherOut, postMap );
+ postFilter( temp, [], context, xml );
+
+ // Un-match failing elements by moving them back to matcherIn
+ i = temp.length;
+ while ( i-- ) {
+ if ( (elem = temp[i]) ) {
+ matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
+ }
+ }
+ }
+
+ if ( seed ) {
+ if ( postFinder || preFilter ) {
+ if ( postFinder ) {
+ // Get the final matcherOut by condensing this intermediate into postFinder contexts
+ temp = [];
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) ) {
+ // Restore matcherIn since elem is not yet a final match
+ temp.push( (matcherIn[i] = elem) );
+ }
+ }
+ postFinder( null, (matcherOut = []), temp, xml );
+ }
+
+ // Move matched elements from seed to results to keep them synchronized
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) &&
+ (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
+
+ seed[temp] = !(results[temp] = elem);
+ }
+ }
+ }
+
+ // Add elements to results, through postFinder if defined
+ } else {
+ matcherOut = condense(
+ matcherOut === results ?
+ matcherOut.splice( preexisting, matcherOut.length ) :
+ matcherOut
+ );
+ if ( postFinder ) {
+ postFinder( null, results, matcherOut, xml );
+ } else {
+ push.apply( results, matcherOut );
+ }
+ }
+ });
+}
+
+function matcherFromTokens( tokens ) {
+ var checkContext, matcher, j,
+ len = tokens.length,
+ leadingRelative = Expr.relative[ tokens[0].type ],
+ implicitRelative = leadingRelative || Expr.relative[" "],
+ i = leadingRelative ? 1 : 0,
+
+ // The foundational matcher ensures that elements are reachable from top-level context(s)
+ matchContext = addCombinator( function( elem ) {
+ return elem === checkContext;
+ }, implicitRelative, true ),
+ matchAnyContext = addCombinator( function( elem ) {
+ return indexOf.call( checkContext, elem ) > -1;
+ }, implicitRelative, true ),
+ matchers = [ function( elem, context, xml ) {
+ return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
+ (checkContext = context).nodeType ?
+ matchContext( elem, context, xml ) :
+ matchAnyContext( elem, context, xml ) );
+ } ];
+
+ for ( ; i < len; i++ ) {
+ if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
+ matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
+ } else {
+ matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
+
+ // Return special upon seeing a positional matcher
+ if ( matcher[ expando ] ) {
+ // Find the next relative operator (if any) for proper handling
+ j = ++i;
+ for ( ; j < len; j++ ) {
+ if ( Expr.relative[ tokens[j].type ] ) {
+ break;
+ }
+ }
+ return setMatcher(
+ i > 1 && elementMatcher( matchers ),
+ i > 1 && toSelector( tokens.slice( 0, i - 1 ) ).replace( rtrim, "$1" ),
+ matcher,
+ i < j && matcherFromTokens( tokens.slice( i, j ) ),
+ j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
+ j < len && toSelector( tokens )
+ );
+ }
+ matchers.push( matcher );
+ }
+ }
+
+ return elementMatcher( matchers );
+}
+
+function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
+ // A counter to specify which element is currently being matched
+ var matcherCachedRuns = 0,
+ bySet = setMatchers.length > 0,
+ byElement = elementMatchers.length > 0,
+ superMatcher = function( seed, context, xml, results, expandContext ) {
+ var elem, j, matcher,
+ setMatched = [],
+ matchedCount = 0,
+ i = "0",
+ unmatched = seed && [],
+ outermost = expandContext != null,
+ contextBackup = outermostContext,
+ // We must always have either seed elements or context
+ elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ),
+ // Use integer dirruns iff this is the outermost matcher
+ dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1);
+
+ if ( outermost ) {
+ outermostContext = context !== document && context;
+ cachedruns = matcherCachedRuns;
+ }
+
+ // Add elements passing elementMatchers directly to results
+ // Keep `i` a string if there are no elements so `matchedCount` will be "00" below
+ for ( ; (elem = elems[i]) != null; i++ ) {
+ if ( byElement && elem ) {
+ j = 0;
+ while ( (matcher = elementMatchers[j++]) ) {
+ if ( matcher( elem, context, xml ) ) {
+ results.push( elem );
+ break;
+ }
+ }
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ cachedruns = ++matcherCachedRuns;
+ }
+ }
+
+ // Track unmatched elements for set filters
+ if ( bySet ) {
+ // They will have gone through all possible matchers
+ if ( (elem = !matcher && elem) ) {
+ matchedCount--;
+ }
+
+ // Lengthen the array for every element, matched or not
+ if ( seed ) {
+ unmatched.push( elem );
+ }
+ }
+ }
+
+ // Apply set filters to unmatched elements
+ matchedCount += i;
+ if ( bySet && i !== matchedCount ) {
+ j = 0;
+ while ( (matcher = setMatchers[j++]) ) {
+ matcher( unmatched, setMatched, context, xml );
+ }
+
+ if ( seed ) {
+ // Reintegrate element matches to eliminate the need for sorting
+ if ( matchedCount > 0 ) {
+ while ( i-- ) {
+ if ( !(unmatched[i] || setMatched[i]) ) {
+ setMatched[i] = pop.call( results );
+ }
+ }
+ }
+
+ // Discard index placeholder values to get only actual matches
+ setMatched = condense( setMatched );
+ }
+
+ // Add matches to results
+ push.apply( results, setMatched );
+
+ // Seedless set matches succeeding multiple successful matchers stipulate sorting
+ if ( outermost && !seed && setMatched.length > 0 &&
+ ( matchedCount + setMatchers.length ) > 1 ) {
+
+ Sizzle.uniqueSort( results );
+ }
+ }
+
+ // Override manipulation of globals by nested matchers
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ outermostContext = contextBackup;
+ }
+
+ return unmatched;
+ };
+
+ return bySet ?
+ markFunction( superMatcher ) :
+ superMatcher;
+}
+
+compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {
+ var i,
+ setMatchers = [],
+ elementMatchers = [],
+ cached = compilerCache[ selector + " " ];
+
+ if ( !cached ) {
+ // Generate a function of recursive functions that can be used to check each element
+ if ( !group ) {
+ group = tokenize( selector );
+ }
+ i = group.length;
+ while ( i-- ) {
+ cached = matcherFromTokens( group[i] );
+ if ( cached[ expando ] ) {
+ setMatchers.push( cached );
+ } else {
+ elementMatchers.push( cached );
+ }
+ }
+
+ // Cache the compiled function
+ cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
+ }
+ return cached;
+};
+
+function multipleContexts( selector, contexts, results ) {
+ var i = 0,
+ len = contexts.length;
+ for ( ; i < len; i++ ) {
+ Sizzle( selector, contexts[i], results );
+ }
+ return results;
+}
+
+function select( selector, context, results, seed ) {
+ var i, tokens, token, type, find,
+ match = tokenize( selector );
+
+ if ( !seed ) {
+ // Try to minimize operations if there is only one group
+ if ( match.length === 1 ) {
+
+ // Take a shortcut and set the context if the root selector is an ID
+ tokens = match[0] = match[0].slice( 0 );
+ if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
+ context.nodeType === 9 && !documentIsXML &&
+ Expr.relative[ tokens[1].type ] ) {
+
+ context = Expr.find["ID"]( token.matches[0].replace( runescape, funescape ), context )[0];
+ if ( !context ) {
+ return results;
+ }
+
+ selector = selector.slice( tokens.shift().value.length );
+ }
+
+ // Fetch a seed set for right-to-left matching
+ i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
+ while ( i-- ) {
+ token = tokens[i];
+
+ // Abort if we hit a combinator
+ if ( Expr.relative[ (type = token.type) ] ) {
+ break;
+ }
+ if ( (find = Expr.find[ type ]) ) {
+ // Search, expanding context for leading sibling combinators
+ if ( (seed = find(
+ token.matches[0].replace( runescape, funescape ),
+ rsibling.test( tokens[0].type ) && context.parentNode || context
+ )) ) {
+
+ // If seed is empty or no tokens remain, we can return early
+ tokens.splice( i, 1 );
+ selector = seed.length && toSelector( tokens );
+ if ( !selector ) {
+ push.apply( results, slice.call( seed, 0 ) );
+ return results;
+ }
+
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ // Compile and execute a filtering function
+ // Provide `match` to avoid retokenization if we modified the selector above
+ compile( selector, match )(
+ seed,
+ context,
+ documentIsXML,
+ results,
+ rsibling.test( selector )
+ );
+ return results;
+}
+
+// Deprecated
+Expr.pseudos["nth"] = Expr.pseudos["eq"];
+
+// Easy API for creating new setFilters
+function setFilters() {}
+Expr.filters = setFilters.prototype = Expr.pseudos;
+Expr.setFilters = new setFilters();
+
+// Initialize with the default document
+setDocument();
+
+// Override sizzle attribute retrieval
+Sizzle.attr = jQuery.attr;
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.pseudos;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+})( window );
+var runtil = /Until$/,
+ rparentsprev = /^(?:parents|prev(?:Until|All))/,
+ isSimple = /^.[^:#\[\.,]*$/,
+ rneedsContext = jQuery.expr.match.needsContext,
+ // methods guaranteed to produce a unique set when starting from a unique set
+ guaranteedUnique = {
+ children: true,
+ contents: true,
+ next: true,
+ prev: true
+ };
+
+jQuery.fn.extend({
+ find: function( selector ) {
+ var i, ret, self,
+ len = this.length;
+
+ if ( typeof selector !== "string" ) {
+ self = this;
+ return this.pushStack( jQuery( selector ).filter(function() {
+ for ( i = 0; i < len; i++ ) {
+ if ( jQuery.contains( self[ i ], this ) ) {
+ return true;
+ }
+ }
+ }) );
+ }
+
+ ret = [];
+ for ( i = 0; i < len; i++ ) {
+ jQuery.find( selector, this[ i ], ret );
+ }
+
+ // Needed because $( selector, context ) becomes $( context ).find( selector )
+ ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
+ ret.selector = ( this.selector ? this.selector + " " : "" ) + selector;
+ return ret;
+ },
+
+ has: function( target ) {
+ var i,
+ targets = jQuery( target, this ),
+ len = targets.length;
+
+ return this.filter(function() {
+ for ( i = 0; i < len; i++ ) {
+ if ( jQuery.contains( this, targets[i] ) ) {
+ return true;
+ }
+ }
+ });
+ },
+
+ not: function( selector ) {
+ return this.pushStack( winnow(this, selector, false) );
+ },
+
+ filter: function( selector ) {
+ return this.pushStack( winnow(this, selector, true) );
+ },
+
+ is: function( selector ) {
+ return !!selector && (
+ typeof selector === "string" ?
+ // If this is a positional/relative selector, check membership in the returned set
+ // so $("p:first").is("p:last") won't return true for a doc with two "p".
+ rneedsContext.test( selector ) ?
+ jQuery( selector, this.context ).index( this[0] ) >= 0 :
+ jQuery.filter( selector, this ).length > 0 :
+ this.filter( selector ).length > 0 );
+ },
+
+ closest: function( selectors, context ) {
+ var cur,
+ i = 0,
+ l = this.length,
+ ret = [],
+ pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
+ jQuery( selectors, context || this.context ) :
+ 0;
+
+ for ( ; i < l; i++ ) {
+ cur = this[i];
+
+ while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) {
+ if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
+ ret.push( cur );
+ break;
+ }
+ cur = cur.parentNode;
+ }
+ }
+
+ return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret );
+ },
+
+ // Determine the position of an element within
+ // the matched set of elements
+ index: function( elem ) {
+
+ // No argument, return index in parent
+ if ( !elem ) {
+ return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;
+ }
+
+ // index in selector
+ if ( typeof elem === "string" ) {
+ return jQuery.inArray( this[0], jQuery( elem ) );
+ }
+
+ // Locate the position of the desired element
+ return jQuery.inArray(
+ // If it receives a jQuery object, the first element is used
+ elem.jquery ? elem[0] : elem, this );
+ },
+
+ add: function( selector, context ) {
+ var set = typeof selector === "string" ?
+ jQuery( selector, context ) :
+ jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
+ all = jQuery.merge( this.get(), set );
+
+ return this.pushStack( jQuery.unique(all) );
+ },
+
+ addBack: function( selector ) {
+ return this.add( selector == null ?
+ this.prevObject : this.prevObject.filter(selector)
+ );
+ }
+});
+
+jQuery.fn.andSelf = jQuery.fn.addBack;
+
+function sibling( cur, dir ) {
+ do {
+ cur = cur[ dir ];
+ } while ( cur && cur.nodeType !== 1 );
+
+ return cur;
+}
+
+jQuery.each({
+ parent: function( elem ) {
+ var parent = elem.parentNode;
+ return parent && parent.nodeType !== 11 ? parent : null;
+ },
+ parents: function( elem ) {
+ return jQuery.dir( elem, "parentNode" );
+ },
+ parentsUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "parentNode", until );
+ },
+ next: function( elem ) {
+ return sibling( elem, "nextSibling" );
+ },
+ prev: function( elem ) {
+ return sibling( elem, "previousSibling" );
+ },
+ nextAll: function( elem ) {
+ return jQuery.dir( elem, "nextSibling" );
+ },
+ prevAll: function( elem ) {
+ return jQuery.dir( elem, "previousSibling" );
+ },
+ nextUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "nextSibling", until );
+ },
+ prevUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "previousSibling", until );
+ },
+ siblings: function( elem ) {
+ return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
+ },
+ children: function( elem ) {
+ return jQuery.sibling( elem.firstChild );
+ },
+ contents: function( elem ) {
+ return jQuery.nodeName( elem, "iframe" ) ?
+ elem.contentDocument || elem.contentWindow.document :
+ jQuery.merge( [], elem.childNodes );
+ }
+}, function( name, fn ) {
+ jQuery.fn[ name ] = function( until, selector ) {
+ var ret = jQuery.map( this, fn, until );
+
+ if ( !runtil.test( name ) ) {
+ selector = until;
+ }
+
+ if ( selector && typeof selector === "string" ) {
+ ret = jQuery.filter( selector, ret );
+ }
+
+ ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
+
+ if ( this.length > 1 && rparentsprev.test( name ) ) {
+ ret = ret.reverse();
+ }
+
+ return this.pushStack( ret );
+ };
+});
+
+jQuery.extend({
+ filter: function( expr, elems, not ) {
+ if ( not ) {
+ expr = ":not(" + expr + ")";
+ }
+
+ return elems.length === 1 ?
+ jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
+ jQuery.find.matches(expr, elems);
+ },
+
+ dir: function( elem, dir, until ) {
+ var matched = [],
+ cur = elem[ dir ];
+
+ while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
+ if ( cur.nodeType === 1 ) {
+ matched.push( cur );
+ }
+ cur = cur[dir];
+ }
+ return matched;
+ },
+
+ sibling: function( n, elem ) {
+ var r = [];
+
+ for ( ; n; n = n.nextSibling ) {
+ if ( n.nodeType === 1 && n !== elem ) {
+ r.push( n );
+ }
+ }
+
+ return r;
+ }
+});
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, keep ) {
+
+ // Can't pass null or undefined to indexOf in Firefox 4
+ // Set to 0 to skip string check
+ qualifier = qualifier || 0;
+
+ if ( jQuery.isFunction( qualifier ) ) {
+ return jQuery.grep(elements, function( elem, i ) {
+ var retVal = !!qualifier.call( elem, i, elem );
+ return retVal === keep;
+ });
+
+ } else if ( qualifier.nodeType ) {
+ return jQuery.grep(elements, function( elem ) {
+ return ( elem === qualifier ) === keep;
+ });
+
+ } else if ( typeof qualifier === "string" ) {
+ var filtered = jQuery.grep(elements, function( elem ) {
+ return elem.nodeType === 1;
+ });
+
+ if ( isSimple.test( qualifier ) ) {
+ return jQuery.filter(qualifier, filtered, !keep);
+ } else {
+ qualifier = jQuery.filter( qualifier, filtered );
+ }
+ }
+
+ return jQuery.grep(elements, function( elem ) {
+ return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;
+ });
+}
+function createSafeFragment( document ) {
+ var list = nodeNames.split( "|" ),
+ safeFrag = document.createDocumentFragment();
+
+ if ( safeFrag.createElement ) {
+ while ( list.length ) {
+ safeFrag.createElement(
+ list.pop()
+ );
+ }
+ }
+ return safeFrag;
+}
+
+var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
+ "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
+ rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
+ rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
+ rleadingWhitespace = /^\s+/,
+ rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
+ rtagName = /<([\w:]+)/,
+ rtbody = /<tbody/i,
+ rhtml = /<|&#?\w+;/,
+ rnoInnerhtml = /<(?:script|style|link)/i,
+ manipulation_rcheckableType = /^(?:checkbox|radio)$/i,
+ // checked="checked" or checked
+ rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+ rscriptType = /^$|\/(?:java|ecma)script/i,
+ rscriptTypeMasked = /^true\/(.*)/,
+ rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
+
+ // We have to close these tags to support XHTML (#13200)
+ wrapMap = {
+ option: [ 1, "<select multiple='multiple'>", "</select>" ],
+ legend: [ 1, "<fieldset>", "</fieldset>" ],
+ area: [ 1, "<map>", "</map>" ],
+ param: [ 1, "<object>", "</object>" ],
+ thead: [ 1, "<table>", "</table>" ],
+ tr: [ 2, "<table><tbody>", "</tbody></table>" ],
+ col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
+ td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
+
+ // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
+ // unless wrapped in a div with non-breaking characters in front of it.
+ _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ]
+ },
+ safeFragment = createSafeFragment( document ),
+ fragmentDiv = safeFragment.appendChild( document.createElement("div") );
+
+wrapMap.optgroup = wrapMap.option;
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+jQuery.fn.extend({
+ text: function( value ) {
+ return jQuery.access( this, function( value ) {
+ return value === undefined ?
+ jQuery.text( this ) :
+ this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
+ }, null, value, arguments.length );
+ },
+
+ wrapAll: function( html ) {
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function(i) {
+ jQuery(this).wrapAll( html.call(this, i) );
+ });
+ }
+
+ if ( this[0] ) {
+ // The elements to wrap the target around
+ var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
+
+ if ( this[0].parentNode ) {
+ wrap.insertBefore( this[0] );
+ }
+
+ wrap.map(function() {
+ var elem = this;
+
+ while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
+ elem = elem.firstChild;
+ }
+
+ return elem;
+ }).append( this );
+ }
+
+ return this;
+ },
+
+ wrapInner: function( html ) {
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function(i) {
+ jQuery(this).wrapInner( html.call(this, i) );
+ });
+ }
+
+ return this.each(function() {
+ var self = jQuery( this ),
+ contents = self.contents();
+
+ if ( contents.length ) {
+ contents.wrapAll( html );
+
+ } else {
+ self.append( html );
+ }
+ });
+ },
+
+ wrap: function( html ) {
+ var isFunction = jQuery.isFunction( html );
+
+ return this.each(function(i) {
+ jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
+ });
+ },
+
+ unwrap: function() {
+ return this.parent().each(function() {
+ if ( !jQuery.nodeName( this, "body" ) ) {
+ jQuery( this ).replaceWith( this.childNodes );
+ }
+ }).end();
+ },
+
+ append: function() {
+ return this.domManip(arguments, true, function( elem ) {
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+ this.appendChild( elem );
+ }
+ });
+ },
+
+ prepend: function() {
+ return this.domManip(arguments, true, function( elem ) {
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+ this.insertBefore( elem, this.firstChild );
+ }
+ });
+ },
+
+ before: function() {
+ return this.domManip( arguments, false, function( elem ) {
+ if ( this.parentNode ) {
+ this.parentNode.insertBefore( elem, this );
+ }
+ });
+ },
+
+ after: function() {
+ return this.domManip( arguments, false, function( elem ) {
+ if ( this.parentNode ) {
+ this.parentNode.insertBefore( elem, this.nextSibling );
+ }
+ });
+ },
+
+ // keepData is for internal use only--do not document
+ remove: function( selector, keepData ) {
+ var elem,
+ i = 0;
+
+ for ( ; (elem = this[i]) != null; i++ ) {
+ if ( !selector || jQuery.filter( selector, [ elem ] ).length > 0 ) {
+ if ( !keepData && elem.nodeType === 1 ) {
+ jQuery.cleanData( getAll( elem ) );
+ }
+
+ if ( elem.parentNode ) {
+ if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
+ setGlobalEval( getAll( elem, "script" ) );
+ }
+ elem.parentNode.removeChild( elem );
+ }
+ }
+ }
+
+ return this;
+ },
+
+ empty: function() {
+ var elem,
+ i = 0;
+
+ for ( ; (elem = this[i]) != null; i++ ) {
+ // Remove element nodes and prevent memory leaks
+ if ( elem.nodeType === 1 ) {
+ jQuery.cleanData( getAll( elem, false ) );
+ }
+
+ // Remove any remaining nodes
+ while ( elem.firstChild ) {
+ elem.removeChild( elem.firstChild );
+ }
+
+ // If this is a select, ensure that it displays empty (#12336)
+ // Support: IE<9
+ if ( elem.options && jQuery.nodeName( elem, "select" ) ) {
+ elem.options.length = 0;
+ }
+ }
+
+ return this;
+ },
+
+ clone: function( dataAndEvents, deepDataAndEvents ) {
+ dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
+ deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
+
+ return this.map( function () {
+ return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
+ });
+ },
+
+ html: function( value ) {
+ return jQuery.access( this, function( value ) {
+ var elem = this[0] || {},
+ i = 0,
+ l = this.length;
+
+ if ( value === undefined ) {
+ return elem.nodeType === 1 ?
+ elem.innerHTML.replace( rinlinejQuery, "" ) :
+ undefined;
+ }
+
+ // See if we can take a shortcut and just use innerHTML
+ if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
+ ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) &&
+ ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
+ !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
+
+ value = value.replace( rxhtmlTag, "<$1></$2>" );
+
+ try {
+ for (; i < l; i++ ) {
+ // Remove element nodes and prevent memory leaks
+ elem = this[i] || {};
+ if ( elem.nodeType === 1 ) {
+ jQuery.cleanData( getAll( elem, false ) );
+ elem.innerHTML = value;
+ }
+ }
+
+ elem = 0;
+
+ // If using innerHTML throws an exception, use the fallback method
+ } catch(e) {}
+ }
+
+ if ( elem ) {
+ this.empty().append( value );
+ }
+ }, null, value, arguments.length );
+ },
+
+ replaceWith: function( value ) {
+ var isFunc = jQuery.isFunction( value );
+
+ // Make sure that the elements are removed from the DOM before they are inserted
+ // this can help fix replacing a parent with child elements
+ if ( !isFunc && typeof value !== "string" ) {
+ value = jQuery( value ).not( this ).detach();
+ }
+
+ return this.domManip( [ value ], true, function( elem ) {
+ var next = this.nextSibling,
+ parent = this.parentNode;
+
+ if ( parent ) {
+ jQuery( this ).remove();
+ parent.insertBefore( elem, next );
+ }
+ });
+ },
+
+ detach: function( selector ) {
+ return this.remove( selector, true );
+ },
+
+ domManip: function( args, table, callback ) {
+
+ // Flatten any nested arrays
+ args = core_concat.apply( [], args );
+
+ var first, node, hasScripts,
+ scripts, doc, fragment,
+ i = 0,
+ l = this.length,
+ set = this,
+ iNoClone = l - 1,
+ value = args[0],
+ isFunction = jQuery.isFunction( value );
+
+ // We can't cloneNode fragments that contain checked, in WebKit
+ if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) {
+ return this.each(function( index ) {
+ var self = set.eq( index );
+ if ( isFunction ) {
+ args[0] = value.call( this, index, table ? self.html() : undefined );
+ }
+ self.domManip( args, table, callback );
+ });
+ }
+
+ if ( l ) {
+ fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this );
+ first = fragment.firstChild;
+
+ if ( fragment.childNodes.length === 1 ) {
+ fragment = first;
+ }
+
+ if ( first ) {
+ table = table && jQuery.nodeName( first, "tr" );
+ scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
+ hasScripts = scripts.length;
+
+ // Use the original fragment for the last item instead of the first because it can end up
+ // being emptied incorrectly in certain situations (#8070).
+ for ( ; i < l; i++ ) {
+ node = fragment;
+
+ if ( i !== iNoClone ) {
+ node = jQuery.clone( node, true, true );
+
+ // Keep references to cloned scripts for later restoration
+ if ( hasScripts ) {
+ jQuery.merge( scripts, getAll( node, "script" ) );
+ }
+ }
+
+ callback.call(
+ table && jQuery.nodeName( this[i], "table" ) ?
+ findOrAppend( this[i], "tbody" ) :
+ this[i],
+ node,
+ i
+ );
+ }
+
+ if ( hasScripts ) {
+ doc = scripts[ scripts.length - 1 ].ownerDocument;
+
+ // Reenable scripts
+ jQuery.map( scripts, restoreScript );
+
+ // Evaluate executable scripts on first document insertion
+ for ( i = 0; i < hasScripts; i++ ) {
+ node = scripts[ i ];
+ if ( rscriptType.test( node.type || "" ) &&
+ !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
+
+ if ( node.src ) {
+ // Hope ajax is available...
+ jQuery.ajax({
+ url: node.src,
+ type: "GET",
+ dataType: "script",
+ async: false,
+ global: false,
+ "throws": true
+ });
+ } else {
+ jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) );
+ }
+ }
+ }
+ }
+
+ // Fix #11809: Avoid leaking memory
+ fragment = first = null;
+ }
+ }
+
+ return this;
+ }
+});
+
+function findOrAppend( elem, tag ) {
+ return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) );
+}
+
+// Replace/restore the type attribute of script elements for safe DOM manipulation
+function disableScript( elem ) {
+ var attr = elem.getAttributeNode("type");
+ elem.type = ( attr && attr.specified ) + "/" + elem.type;
+ return elem;
+}
+function restoreScript( elem ) {
+ var match = rscriptTypeMasked.exec( elem.type );
+ if ( match ) {
+ elem.type = match[1];
+ } else {
+ elem.removeAttribute("type");
+ }
+ return elem;
+}
+
+// Mark scripts as having already been evaluated
+function setGlobalEval( elems, refElements ) {
+ var elem,
+ i = 0;
+ for ( ; (elem = elems[i]) != null; i++ ) {
+ jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) );
+ }
+}
+
+function cloneCopyEvent( src, dest ) {
+
+ if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
+ return;
+ }
+
+ var type, i, l,
+ oldData = jQuery._data( src ),
+ curData = jQuery._data( dest, oldData ),
+ events = oldData.events;
+
+ if ( events ) {
+ delete curData.handle;
+ curData.events = {};
+
+ for ( type in events ) {
+ for ( i = 0, l = events[ type ].length; i < l; i++ ) {
+ jQuery.event.add( dest, type, events[ type ][ i ] );
+ }
+ }
+ }
+
+ // make the cloned public data object a copy from the original
+ if ( curData.data ) {
+ curData.data = jQuery.extend( {}, curData.data );
+ }
+}
+
+function fixCloneNodeIssues( src, dest ) {
+ var nodeName, e, data;
+
+ // We do not need to do anything for non-Elements
+ if ( dest.nodeType !== 1 ) {
+ return;
+ }
+
+ nodeName = dest.nodeName.toLowerCase();
+
+ // IE6-8 copies events bound via attachEvent when using cloneNode.
+ if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) {
+ data = jQuery._data( dest );
+
+ for ( e in data.events ) {
+ jQuery.removeEvent( dest, e, data.handle );
+ }
+
+ // Event data gets referenced instead of copied if the expando gets copied too
+ dest.removeAttribute( jQuery.expando );
+ }
+
+ // IE blanks contents when cloning scripts, and tries to evaluate newly-set text
+ if ( nodeName === "script" && dest.text !== src.text ) {
+ disableScript( dest ).text = src.text;
+ restoreScript( dest );
+
+ // IE6-10 improperly clones children of object elements using classid.
+ // IE10 throws NoModificationAllowedError if parent is null, #12132.
+ } else if ( nodeName === "object" ) {
+ if ( dest.parentNode ) {
+ dest.outerHTML = src.outerHTML;
+ }
+
+ // This path appears unavoidable for IE9. When cloning an object
+ // element in IE9, the outerHTML strategy above is not sufficient.
+ // If the src has innerHTML and the destination does not,
+ // copy the src.innerHTML into the dest.innerHTML. #10324
+ if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) {
+ dest.innerHTML = src.innerHTML;
+ }
+
+ } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) {
+ // IE6-8 fails to persist the checked state of a cloned checkbox
+ // or radio button. Worse, IE6-7 fail to give the cloned element
+ // a checked appearance if the defaultChecked value isn't also set
+
+ dest.defaultChecked = dest.checked = src.checked;
+
+ // IE6-7 get confused and end up setting the value of a cloned
+ // checkbox/radio button to an empty string instead of "on"
+ if ( dest.value !== src.value ) {
+ dest.value = src.value;
+ }
+
+ // IE6-8 fails to return the selected option to the default selected
+ // state when cloning options
+ } else if ( nodeName === "option" ) {
+ dest.defaultSelected = dest.selected = src.defaultSelected;
+
+ // IE6-8 fails to set the defaultValue to the correct value when
+ // cloning other types of input fields
+ } else if ( nodeName === "input" || nodeName === "textarea" ) {
+ dest.defaultValue = src.defaultValue;
+ }
+}
+
+jQuery.each({
+ appendTo: "append",
+ prependTo: "prepend",
+ insertBefore: "before",
+ insertAfter: "after",
+ replaceAll: "replaceWith"
+}, function( name, original ) {
+ jQuery.fn[ name ] = function( selector ) {
+ var elems,
+ i = 0,
+ ret = [],
+ insert = jQuery( selector ),
+ last = insert.length - 1;
+
+ for ( ; i <= last; i++ ) {
+ elems = i === last ? this : this.clone(true);
+ jQuery( insert[i] )[ original ]( elems );
+
+ // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
+ core_push.apply( ret, elems.get() );
+ }
+
+ return this.pushStack( ret );
+ };
+});
+
+function getAll( context, tag ) {
+ var elems, elem,
+ i = 0,
+ found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) :
+ typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) :
+ undefined;
+
+ if ( !found ) {
+ for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) {
+ if ( !tag || jQuery.nodeName( elem, tag ) ) {
+ found.push( elem );
+ } else {
+ jQuery.merge( found, getAll( elem, tag ) );
+ }
+ }
+ }
+
+ return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
+ jQuery.merge( [ context ], found ) :
+ found;
+}
+
+// Used in buildFragment, fixes the defaultChecked property
+function fixDefaultChecked( elem ) {
+ if ( manipulation_rcheckableType.test( elem.type ) ) {
+ elem.defaultChecked = elem.checked;
+ }
+}
+
+jQuery.extend({
+ clone: function( elem, dataAndEvents, deepDataAndEvents ) {
+ var destElements, node, clone, i, srcElements,
+ inPage = jQuery.contains( elem.ownerDocument, elem );
+
+ if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
+ clone = elem.cloneNode( true );
+
+ // IE<=8 does not properly clone detached, unknown element nodes
+ } else {
+ fragmentDiv.innerHTML = elem.outerHTML;
+ fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
+ }
+
+ if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
+ (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
+
+ // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
+ destElements = getAll( clone );
+ srcElements = getAll( elem );
+
+ // Fix all IE cloning issues
+ for ( i = 0; (node = srcElements[i]) != null; ++i ) {
+ // Ensure that the destination node is not null; Fixes #9587
+ if ( destElements[i] ) {
+ fixCloneNodeIssues( node, destElements[i] );
+ }
+ }
+ }
+
+ // Copy the events from the original to the clone
+ if ( dataAndEvents ) {
+ if ( deepDataAndEvents ) {
+ srcElements = srcElements || getAll( elem );
+ destElements = destElements || getAll( clone );
+
+ for ( i = 0; (node = srcElements[i]) != null; i++ ) {
+ cloneCopyEvent( node, destElements[i] );
+ }
+ } else {
+ cloneCopyEvent( elem, clone );
+ }
+ }
+
+ // Preserve script evaluation history
+ destElements = getAll( clone, "script" );
+ if ( destElements.length > 0 ) {
+ setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
+ }
+
+ destElements = srcElements = node = null;
+
+ // Return the cloned set
+ return clone;
+ },
+
+ buildFragment: function( elems, context, scripts, selection ) {
+ var j, elem, contains,
+ tmp, tag, tbody, wrap,
+ l = elems.length,
+
+ // Ensure a safe fragment
+ safe = createSafeFragment( context ),
+
+ nodes = [],
+ i = 0;
+
+ for ( ; i < l; i++ ) {
+ elem = elems[ i ];
+
+ if ( elem || elem === 0 ) {
+
+ // Add nodes directly
+ if ( jQuery.type( elem ) === "object" ) {
+ jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
+
+ // Convert non-html into a text node
+ } else if ( !rhtml.test( elem ) ) {
+ nodes.push( context.createTextNode( elem ) );
+
+ // Convert html into DOM nodes
+ } else {
+ tmp = tmp || safe.appendChild( context.createElement("div") );
+
+ // Deserialize a standard representation
+ tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase();
+ wrap = wrapMap[ tag ] || wrapMap._default;
+
+ tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2];
+
+ // Descend through wrappers to the right content
+ j = wrap[0];
+ while ( j-- ) {
+ tmp = tmp.lastChild;
+ }
+
+ // Manually add leading whitespace removed by IE
+ if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
+ nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );
+ }
+
+ // Remove IE's autoinserted <tbody> from table fragments
+ if ( !jQuery.support.tbody ) {
+
+ // String was a <table>, *may* have spurious <tbody>
+ elem = tag === "table" && !rtbody.test( elem ) ?
+ tmp.firstChild :
+
+ // String was a bare <thead> or <tfoot>
+ wrap[1] === "<table>" && !rtbody.test( elem ) ?
+ tmp :
+ 0;
+
+ j = elem && elem.childNodes.length;
+ while ( j-- ) {
+ if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) {
+ elem.removeChild( tbody );
+ }
+ }
+ }
+
+ jQuery.merge( nodes, tmp.childNodes );
+
+ // Fix #12392 for WebKit and IE > 9
+ tmp.textContent = "";
+
+ // Fix #12392 for oldIE
+ while ( tmp.firstChild ) {
+ tmp.removeChild( tmp.firstChild );
+ }
+
+ // Remember the top-level container for proper cleanup
+ tmp = safe.lastChild;
+ }
+ }
+ }
+
+ // Fix #11356: Clear elements from fragment
+ if ( tmp ) {
+ safe.removeChild( tmp );
+ }
+
+ // Reset defaultChecked for any radios and checkboxes
+ // about to be appended to the DOM in IE 6/7 (#8060)
+ if ( !jQuery.support.appendChecked ) {
+ jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked );
+ }
+
+ i = 0;
+ while ( (elem = nodes[ i++ ]) ) {
+
+ // #4087 - If origin and destination elements are the same, and this is
+ // that element, do not do anything
+ if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
+ continue;
+ }
+
+ contains = jQuery.contains( elem.ownerDocument, elem );
+
+ // Append to fragment
+ tmp = getAll( safe.appendChild( elem ), "script" );
+
+ // Preserve script evaluation history
+ if ( contains ) {
+ setGlobalEval( tmp );
+ }
+
+ // Capture executables
+ if ( scripts ) {
+ j = 0;
+ while ( (elem = tmp[ j++ ]) ) {
+ if ( rscriptType.test( elem.type || "" ) ) {
+ scripts.push( elem );
+ }
+ }
+ }
+ }
+
+ tmp = null;
+
+ return safe;
+ },
+
+ cleanData: function( elems, /* internal */ acceptData ) {
+ var elem, type, id, data,
+ i = 0,
+ internalKey = jQuery.expando,
+ cache = jQuery.cache,
+ deleteExpando = jQuery.support.deleteExpando,
+ special = jQuery.event.special;
+
+ for ( ; (elem = elems[i]) != null; i++ ) {
+
+ if ( acceptData || jQuery.acceptData( elem ) ) {
+
+ id = elem[ internalKey ];
+ data = id && cache[ id ];
+
+ if ( data ) {
+ if ( data.events ) {
+ for ( type in data.events ) {
+ if ( special[ type ] ) {
+ jQuery.event.remove( elem, type );
+
+ // This is a shortcut to avoid jQuery.event.remove's overhead
+ } else {
+ jQuery.removeEvent( elem, type, data.handle );
+ }
+ }
+ }
+
+ // Remove cache only if it was not already removed by jQuery.event.remove
+ if ( cache[ id ] ) {
+
+ delete cache[ id ];
+
+ // IE does not allow us to delete expando properties from nodes,
+ // nor does it have a removeAttribute function on Document nodes;
+ // we must handle all of these cases
+ if ( deleteExpando ) {
+ delete elem[ internalKey ];
+
+ } else if ( typeof elem.removeAttribute !== core_strundefined ) {
+ elem.removeAttribute( internalKey );
+
+ } else {
+ elem[ internalKey ] = null;
+ }
+
+ core_deletedIds.push( id );
+ }
+ }
+ }
+ }
+ }
+});
+var iframe, getStyles, curCSS,
+ ralpha = /alpha\([^)]*\)/i,
+ ropacity = /opacity\s*=\s*([^)]*)/,
+ rposition = /^(top|right|bottom|left)$/,
+ // swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
+ // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
+ rdisplayswap = /^(none|table(?!-c[ea]).+)/,
+ rmargin = /^margin/,
+ rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ),
+ rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ),
+ rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ),
+ elemdisplay = { BODY: "block" },
+
+ cssShow = { position: "absolute", visibility: "hidden", display: "block" },
+ cssNormalTransform = {
+ letterSpacing: 0,
+ fontWeight: 400
+ },
+
+ cssExpand = [ "Top", "Right", "Bottom", "Left" ],
+ cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];
+
+// return a css property mapped to a potentially vendor prefixed property
+function vendorPropName( style, name ) {
+
+ // shortcut for names that are not vendor prefixed
+ if ( name in style ) {
+ return name;
+ }
+
+ // check for vendor prefixed names
+ var capName = name.charAt(0).toUpperCase() + name.slice(1),
+ origName = name,
+ i = cssPrefixes.length;
+
+ while ( i-- ) {
+ name = cssPrefixes[ i ] + capName;
+ if ( name in style ) {
+ return name;
+ }
+ }
+
+ return origName;
+}
+
+function isHidden( elem, el ) {
+ // isHidden might be called from jQuery#filter function;
+ // in that case, element will be second argument
+ elem = el || elem;
+ return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
+}
+
+function showHide( elements, show ) {
+ var display, elem, hidden,
+ values = [],
+ index = 0,
+ length = elements.length;
+
+ for ( ; index < length; index++ ) {
+ elem = elements[ index ];
+ if ( !elem.style ) {
+ continue;
+ }
+
+ values[ index ] = jQuery._data( elem, "olddisplay" );
+ display = elem.style.display;
+ if ( show ) {
+ // Reset the inline display of this element to learn if it is
+ // being hidden by cascaded rules or not
+ if ( !values[ index ] && display === "none" ) {
+ elem.style.display = "";
+ }
+
+ // Set elements which have been overridden with display: none
+ // in a stylesheet to whatever the default browser style is
+ // for such an element
+ if ( elem.style.display === "" && isHidden( elem ) ) {
+ values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) );
+ }
+ } else {
+
+ if ( !values[ index ] ) {
+ hidden = isHidden( elem );
+
+ if ( display && display !== "none" || !hidden ) {
+ jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) );
+ }
+ }
+ }
+ }
+
+ // Set the display of most of the elements in a second loop
+ // to avoid the constant reflow
+ for ( index = 0; index < length; index++ ) {
+ elem = elements[ index ];
+ if ( !elem.style ) {
+ continue;
+ }
+ if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
+ elem.style.display = show ? values[ index ] || "" : "none";
+ }
+ }
+
+ return elements;
+}
+
+jQuery.fn.extend({
+ css: function( name, value ) {
+ return jQuery.access( this, function( elem, name, value ) {
+ var len, styles,
+ map = {},
+ i = 0;
+
+ if ( jQuery.isArray( name ) ) {
+ styles = getStyles( elem );
+ len = name.length;
+
+ for ( ; i < len; i++ ) {
+ map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
+ }
+
+ return map;
+ }
+
+ return value !== undefined ?
+ jQuery.style( elem, name, value ) :
+ jQuery.css( elem, name );
+ }, name, value, arguments.length > 1 );
+ },
+ show: function() {
+ return showHide( this, true );
+ },
+ hide: function() {
+ return showHide( this );
+ },
+ toggle: function( state ) {
+ var bool = typeof state === "boolean";
+
+ return this.each(function() {
+ if ( bool ? state : isHidden( this ) ) {
+ jQuery( this ).show();
+ } else {
+ jQuery( this ).hide();
+ }
+ });
+ }
+});
+
+jQuery.extend({
+ // Add in style property hooks for overriding the default
+ // behavior of getting and setting a style property
+ cssHooks: {
+ opacity: {
+ get: function( elem, computed ) {
+ if ( computed ) {
+ // We should always get a number back from opacity
+ var ret = curCSS( elem, "opacity" );
+ return ret === "" ? "1" : ret;
+ }
+ }
+ }
+ },
+
+ // Exclude the following css properties to add px
+ cssNumber: {
+ "columnCount": true,
+ "fillOpacity": true,
+ "fontWeight": true,
+ "lineHeight": true,
+ "opacity": true,
+ "orphans": true,
+ "widows": true,
+ "zIndex": true,
+ "zoom": true
+ },
+
+ // Add in properties whose names you wish to fix before
+ // setting or getting the value
+ cssProps: {
+ // normalize float css property
+ "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
+ },
+
+ // Get and set the style property on a DOM Node
+ style: function( elem, name, value, extra ) {
+ // Don't set styles on text and comment nodes
+ if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+ return;
+ }
+
+ // Make sure that we're working with the right name
+ var ret, type, hooks,
+ origName = jQuery.camelCase( name ),
+ style = elem.style;
+
+ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
+
+ // gets hook for the prefixed version
+ // followed by the unprefixed version
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+ // Check if we're setting a value
+ if ( value !== undefined ) {
+ type = typeof value;
+
+ // convert relative number strings (+= or -=) to relative numbers. #7345
+ if ( type === "string" && (ret = rrelNum.exec( value )) ) {
+ value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
+ // Fixes bug #9237
+ type = "number";
+ }
+
+ // Make sure that NaN and null values aren't set. See: #7116
+ if ( value == null || type === "number" && isNaN( value ) ) {
+ return;
+ }
+
+ // If a number was passed in, add 'px' to the (except for certain CSS properties)
+ if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
+ value += "px";
+ }
+
+ // Fixes #8908, it can be done more correctly by specifing setters in cssHooks,
+ // but it would mean to define eight (for every problematic property) identical functions
+ if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) {
+ style[ name ] = "inherit";
+ }
+
+ // If a hook was provided, use that value, otherwise just set the specified value
+ if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
+
+ // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
+ // Fixes bug #5509
+ try {
+ style[ name ] = value;
+ } catch(e) {}
+ }
+
+ } else {
+ // If a hook was provided get the non-computed value from there
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
+ return ret;
+ }
+
+ // Otherwise just get the value from the style object
+ return style[ name ];
+ }
+ },
+
+ css: function( elem, name, extra, styles ) {
+ var num, val, hooks,
+ origName = jQuery.camelCase( name );
+
+ // Make sure that we're working with the right name
+ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
+
+ // gets hook for the prefixed version
+ // followed by the unprefixed version
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+ // If a hook was provided get the computed value from there
+ if ( hooks && "get" in hooks ) {
+ val = hooks.get( elem, true, extra );
+ }
+
+ // Otherwise, if a way to get the computed value exists, use that
+ if ( val === undefined ) {
+ val = curCSS( elem, name, styles );
+ }
+
+ //convert "normal" to computed value
+ if ( val === "normal" && name in cssNormalTransform ) {
+ val = cssNormalTransform[ name ];
+ }
+
+ // Return, converting to number if forced or a qualifier was provided and val looks numeric
+ if ( extra === "" || extra ) {
+ num = parseFloat( val );
+ return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
+ }
+ return val;
+ },
+
+ // A method for quickly swapping in/out CSS properties to get correct calculations
+ swap: function( elem, options, callback, args ) {
+ var ret, name,
+ old = {};
+
+ // Remember the old values, and insert the new ones
+ for ( name in options ) {
+ old[ name ] = elem.style[ name ];
+ elem.style[ name ] = options[ name ];
+ }
+
+ ret = callback.apply( elem, args || [] );
+
+ // Revert the old values
+ for ( name in options ) {
+ elem.style[ name ] = old[ name ];
+ }
+
+ return ret;
+ }
+});
+
+// NOTE: we've included the "window" in window.getComputedStyle
+// because jsdom on node.js will break without it.
+if ( window.getComputedStyle ) {
+ getStyles = function( elem ) {
+ return window.getComputedStyle( elem, null );
+ };
+
+ curCSS = function( elem, name, _computed ) {
+ var width, minWidth, maxWidth,
+ computed = _computed || getStyles( elem ),
+
+ // getPropertyValue is only needed for .css('filter') in IE9, see #12537
+ ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined,
+ style = elem.style;
+
+ if ( computed ) {
+
+ if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
+ ret = jQuery.style( elem, name );
+ }
+
+ // A tribute to the "awesome hack by Dean Edwards"
+ // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right
+ // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
+ // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
+ if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
+
+ // Remember the original values
+ width = style.width;
+ minWidth = style.minWidth;
+ maxWidth = style.maxWidth;
+
+ // Put in the new values to get a computed value out
+ style.minWidth = style.maxWidth = style.width = ret;
+ ret = computed.width;
+
+ // Revert the changed values
+ style.width = width;
+ style.minWidth = minWidth;
+ style.maxWidth = maxWidth;
+ }
+ }
+
+ return ret;
+ };
+} else if ( document.documentElement.currentStyle ) {
+ getStyles = function( elem ) {
+ return elem.currentStyle;
+ };
+
+ curCSS = function( elem, name, _computed ) {
+ var left, rs, rsLeft,
+ computed = _computed || getStyles( elem ),
+ ret = computed ? computed[ name ] : undefined,
+ style = elem.style;
+
+ // Avoid setting ret to empty string here
+ // so we don't default to auto
+ if ( ret == null && style && style[ name ] ) {
+ ret = style[ name ];
+ }
+
+ // From the awesome hack by Dean Edwards
+ // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
+
+ // If we're not dealing with a regular pixel number
+ // but a number that has a weird ending, we need to convert it to pixels
+ // but not position css attributes, as those are proportional to the parent element instead
+ // and we can't measure the parent instead because it might trigger a "stacking dolls" problem
+ if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {
+
+ // Remember the original values
+ left = style.left;
+ rs = elem.runtimeStyle;
+ rsLeft = rs && rs.left;
+
+ // Put in the new values to get a computed value out
+ if ( rsLeft ) {
+ rs.left = elem.currentStyle.left;
+ }
+ style.left = name === "fontSize" ? "1em" : ret;
+ ret = style.pixelLeft + "px";
+
+ // Revert the changed values
+ style.left = left;
+ if ( rsLeft ) {
+ rs.left = rsLeft;
+ }
+ }
+
+ return ret === "" ? "auto" : ret;
+ };
+}
+
+function setPositiveNumber( elem, value, subtract ) {
+ var matches = rnumsplit.exec( value );
+ return matches ?
+ // Guard against undefined "subtract", e.g., when used as in cssHooks
+ Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
+ value;
+}
+
+function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
+ var i = extra === ( isBorderBox ? "border" : "content" ) ?
+ // If we already have the right measurement, avoid augmentation
+ 4 :
+ // Otherwise initialize for horizontal or vertical properties
+ name === "width" ? 1 : 0,
+
+ val = 0;
+
+ for ( ; i < 4; i += 2 ) {
+ // both box models exclude margin, so add it if we want it
+ if ( extra === "margin" ) {
+ val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
+ }
+
+ if ( isBorderBox ) {
+ // border-box includes padding, so remove it if we want content
+ if ( extra === "content" ) {
+ val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+ }
+
+ // at this point, extra isn't border nor margin, so remove border
+ if ( extra !== "margin" ) {
+ val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+ }
+ } else {
+ // at this point, extra isn't content, so add padding
+ val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+
+ // at this point, extra isn't content nor padding, so add border
+ if ( extra !== "padding" ) {
+ val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+ }
+ }
+ }
+
+ return val;
+}
+
+function getWidthOrHeight( elem, name, extra ) {
+
+ // Start with offset property, which is equivalent to the border-box value
+ var valueIsBorderBox = true,
+ val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
+ styles = getStyles( elem ),
+ isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
+
+ // some non-html elements return undefined for offsetWidth, so check for null/undefined
+ // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
+ // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
+ if ( val <= 0 || val == null ) {
+ // Fall back to computed then uncomputed css if necessary
+ val = curCSS( elem, name, styles );
+ if ( val < 0 || val == null ) {
+ val = elem.style[ name ];
+ }
+
+ // Computed unit is not pixels. Stop here and return.
+ if ( rnumnonpx.test(val) ) {
+ return val;
+ }
+
+ // we need the check for style in case a browser which returns unreliable values
+ // for getComputedStyle silently falls back to the reliable elem.style
+ valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] );
+
+ // Normalize "", auto, and prepare for extra
+ val = parseFloat( val ) || 0;
+ }
+
+ // use the active box-sizing model to add/subtract irrelevant styles
+ return ( val +
+ augmentWidthOrHeight(
+ elem,
+ name,
+ extra || ( isBorderBox ? "border" : "content" ),
+ valueIsBorderBox,
+ styles
+ )
+ ) + "px";
+}
+
+// Try to determine the default display value of an element
+function css_defaultDisplay( nodeName ) {
+ var doc = document,
+ display = elemdisplay[ nodeName ];
+
+ if ( !display ) {
+ display = actualDisplay( nodeName, doc );
+
+ // If the simple way fails, read from inside an iframe
+ if ( display === "none" || !display ) {
+ // Use the already-created iframe if possible
+ iframe = ( iframe ||
+ jQuery("<iframe frameborder='0' width='0' height='0'/>")
+ .css( "cssText", "display:block !important" )
+ ).appendTo( doc.documentElement );
+
+ // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
+ doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document;
+ doc.write("<!doctype html><html><body>");
+ doc.close();
+
+ display = actualDisplay( nodeName, doc );
+ iframe.detach();
+ }
+
+ // Store the correct default display
+ elemdisplay[ nodeName ] = display;
+ }
+
+ return display;
+}
+
+// Called ONLY from within css_defaultDisplay
+function actualDisplay( name, doc ) {
+ var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
+ display = jQuery.css( elem[0], "display" );
+ elem.remove();
+ return display;
+}
+
+jQuery.each([ "height", "width" ], function( i, name ) {
+ jQuery.cssHooks[ name ] = {
+ get: function( elem, computed, extra ) {
+ if ( computed ) {
+ // certain elements can have dimension info if we invisibly show them
+ // however, it must have a current display style that would benefit from this
+ return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ?
+ jQuery.swap( elem, cssShow, function() {
+ return getWidthOrHeight( elem, name, extra );
+ }) :
+ getWidthOrHeight( elem, name, extra );
+ }
+ },
+
+ set: function( elem, value, extra ) {
+ var styles = extra && getStyles( elem );
+ return setPositiveNumber( elem, value, extra ?
+ augmentWidthOrHeight(
+ elem,
+ name,
+ extra,
+ jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
+ styles
+ ) : 0
+ );
+ }
+ };
+});
+
+if ( !jQuery.support.opacity ) {
+ jQuery.cssHooks.opacity = {
+ get: function( elem, computed ) {
+ // IE uses filters for opacity
+ return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
+ ( 0.01 * parseFloat( RegExp.$1 ) ) + "" :
+ computed ? "1" : "";
+ },
+
+ set: function( elem, value ) {
+ var style = elem.style,
+ currentStyle = elem.currentStyle,
+ opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
+ filter = currentStyle && currentStyle.filter || style.filter || "";
+
+ // IE has trouble with opacity if it does not have layout
+ // Force it by setting the zoom level
+ style.zoom = 1;
+
+ // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
+ // if value === "", then remove inline opacity #12685
+ if ( ( value >= 1 || value === "" ) &&
+ jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
+ style.removeAttribute ) {
+
+ // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
+ // if "filter:" is present at all, clearType is disabled, we want to avoid this
+ // style.removeAttribute is IE Only, but so apparently is this code path...
+ style.removeAttribute( "filter" );
+
+ // if there is no filter style applied in a css rule or unset inline opacity, we are done
+ if ( value === "" || currentStyle && !currentStyle.filter ) {
+ return;
+ }
+ }
+
+ // otherwise, set new filter values
+ style.filter = ralpha.test( filter ) ?
+ filter.replace( ralpha, opacity ) :
+ filter + " " + opacity;
+ }
+ };
+}
+
+// These hooks cannot be added until DOM ready because the support test
+// for it is not run until after DOM ready
+jQuery(function() {
+ if ( !jQuery.support.reliableMarginRight ) {
+ jQuery.cssHooks.marginRight = {
+ get: function( elem, computed ) {
+ if ( computed ) {
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+ // Work around by temporarily setting element display to inline-block
+ return jQuery.swap( elem, { "display": "inline-block" },
+ curCSS, [ elem, "marginRight" ] );
+ }
+ }
+ };
+ }
+
+ // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
+ // getComputedStyle returns percent when specified for top/left/bottom/right
+ // rather than make the css module depend on the offset module, we just check for it here
+ if ( !jQuery.support.pixelPosition && jQuery.fn.position ) {
+ jQuery.each( [ "top", "left" ], function( i, prop ) {
+ jQuery.cssHooks[ prop ] = {
+ get: function( elem, computed ) {
+ if ( computed ) {
+ computed = curCSS( elem, prop );
+ // if curCSS returns percentage, fallback to offset
+ return rnumnonpx.test( computed ) ?
+ jQuery( elem ).position()[ prop ] + "px" :
+ computed;
+ }
+ }
+ };
+ });
+ }
+
+});
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+ jQuery.expr.filters.hidden = function( elem ) {
+ // Support: Opera <= 12.12
+ // Opera reports offsetWidths and offsetHeights less than zero on some elements
+ return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 ||
+ (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
+ };
+
+ jQuery.expr.filters.visible = function( elem ) {
+ return !jQuery.expr.filters.hidden( elem );
+ };
+}
+
+// These hooks are used by animate to expand properties
+jQuery.each({
+ margin: "",
+ padding: "",
+ border: "Width"
+}, function( prefix, suffix ) {
+ jQuery.cssHooks[ prefix + suffix ] = {
+ expand: function( value ) {
+ var i = 0,
+ expanded = {},
+
+ // assumes a single number if not a string
+ parts = typeof value === "string" ? value.split(" ") : [ value ];
+
+ for ( ; i < 4; i++ ) {
+ expanded[ prefix + cssExpand[ i ] + suffix ] =
+ parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
+ }
+
+ return expanded;
+ }
+ };
+
+ if ( !rmargin.test( prefix ) ) {
+ jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
+ }
+});
+var r20 = /%20/g,
+ rbracket = /\[\]$/,
+ rCRLF = /\r?\n/g,
+ rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
+ rsubmittable = /^(?:input|select|textarea|keygen)/i;
+
+jQuery.fn.extend({
+ serialize: function() {
+ return jQuery.param( this.serializeArray() );
+ },
+ serializeArray: function() {
+ return this.map(function(){
+ // Can add propHook for "elements" to filter or add form elements
+ var elements = jQuery.prop( this, "elements" );
+ return elements ? jQuery.makeArray( elements ) : this;
+ })
+ .filter(function(){
+ var type = this.type;
+ // Use .is(":disabled") so that fieldset[disabled] works
+ return this.name && !jQuery( this ).is( ":disabled" ) &&
+ rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
+ ( this.checked || !manipulation_rcheckableType.test( type ) );
+ })
+ .map(function( i, elem ){
+ var val = jQuery( this ).val();
+
+ return val == null ?
+ null :
+ jQuery.isArray( val ) ?
+ jQuery.map( val, function( val ){
+ return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+ }) :
+ { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+ }).get();
+ }
+});
+
+//Serialize an array of form elements or a set of
+//key/values into a query string
+jQuery.param = function( a, traditional ) {
+ var prefix,
+ s = [],
+ add = function( key, value ) {
+ // If value is a function, invoke it and return its value
+ value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
+ s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
+ };
+
+ // Set traditional to true for jQuery <= 1.3.3 behavior.
+ if ( traditional === undefined ) {
+ traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
+ }
+
+ // If an array was passed in, assume that it is an array of form elements.
+ if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
+ // Serialize the form elements
+ jQuery.each( a, function() {
+ add( this.name, this.value );
+ });
+
+ } else {
+ // If traditional, encode the "old" way (the way 1.3.3 or older
+ // did it), otherwise encode params recursively.
+ for ( prefix in a ) {
+ buildParams( prefix, a[ prefix ], traditional, add );
+ }
+ }
+
+ // Return the resulting serialization
+ return s.join( "&" ).replace( r20, "+" );
+};
+
+function buildParams( prefix, obj, traditional, add ) {
+ var name;
+
+ if ( jQuery.isArray( obj ) ) {
+ // Serialize array item.
+ jQuery.each( obj, function( i, v ) {
+ if ( traditional || rbracket.test( prefix ) ) {
+ // Treat each array item as a scalar.
+ add( prefix, v );
+
+ } else {
+ // Item is non-scalar (array or object), encode its numeric index.
+ buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
+ }
+ });
+
+ } else if ( !traditional && jQuery.type( obj ) === "object" ) {
+ // Serialize object item.
+ for ( name in obj ) {
+ buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
+ }
+
+ } else {
+ // Serialize scalar item.
+ add( prefix, obj );
+ }
+}
+jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
+ "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+ "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
+
+ // Handle event binding
+ jQuery.fn[ name ] = function( data, fn ) {
+ return arguments.length > 0 ?
+ this.on( name, null, data, fn ) :
+ this.trigger( name );
+ };
+});
+
+jQuery.fn.hover = function( fnOver, fnOut ) {
+ return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+};
+var
+ // Document location
+ ajaxLocParts,
+ ajaxLocation,
+ ajax_nonce = jQuery.now(),
+
+ ajax_rquery = /\?/,
+ rhash = /#.*$/,
+ rts = /([?&])_=[^&]*/,
+ rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
+ // #7653, #8125, #8152: local protocol detection
+ rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
+ rnoContent = /^(?:GET|HEAD)$/,
+ rprotocol = /^\/\//,
+ rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
+
+ // Keep a copy of the old load method
+ _load = jQuery.fn.load,
+
+ /* Prefilters
+ * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
+ * 2) These are called:
+ * - BEFORE asking for a transport
+ * - AFTER param serialization (s.data is a string if s.processData is true)
+ * 3) key is the dataType
+ * 4) the catchall symbol "*" can be used
+ * 5) execution will start with transport dataType and THEN continue down to "*" if needed
+ */
+ prefilters = {},
+
+ /* Transports bindings
+ * 1) key is the dataType
+ * 2) the catchall symbol "*" can be used
+ * 3) selection will start with transport dataType and THEN go to "*" if needed
+ */
+ transports = {},
+
+ // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
+ allTypes = "*/".concat("*");
+
+// #8138, IE may throw an exception when accessing
+// a field from window.location if document.domain has been set
+try {
+ ajaxLocation = location.href;
+} catch( e ) {
+ // Use the href attribute of an A element
+ // since IE will modify it given document.location
+ ajaxLocation = document.createElement( "a" );
+ ajaxLocation.href = "";
+ ajaxLocation = ajaxLocation.href;
+}
+
+// Segment location into parts
+ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
+
+// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
+function addToPrefiltersOrTransports( structure ) {
+
+ // dataTypeExpression is optional and defaults to "*"
+ return function( dataTypeExpression, func ) {
+
+ if ( typeof dataTypeExpression !== "string" ) {
+ func = dataTypeExpression;
+ dataTypeExpression = "*";
+ }
+
+ var dataType,
+ i = 0,
+ dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || [];
+
+ if ( jQuery.isFunction( func ) ) {
+ // For each dataType in the dataTypeExpression
+ while ( (dataType = dataTypes[i++]) ) {
+ // Prepend if requested
+ if ( dataType[0] === "+" ) {
+ dataType = dataType.slice( 1 ) || "*";
+ (structure[ dataType ] = structure[ dataType ] || []).unshift( func );
+
+ // Otherwise append
+ } else {
+ (structure[ dataType ] = structure[ dataType ] || []).push( func );
+ }
+ }
+ }
+ };
+}
+
+// Base inspection function for prefilters and transports
+function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
+
+ var inspected = {},
+ seekingTransport = ( structure === transports );
+
+ function inspect( dataType ) {
+ var selected;
+ inspected[ dataType ] = true;
+ jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
+ var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
+ if( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
+ options.dataTypes.unshift( dataTypeOrTransport );
+ inspect( dataTypeOrTransport );
+ return false;
+ } else if ( seekingTransport ) {
+ return !( selected = dataTypeOrTransport );
+ }
+ });
+ return selected;
+ }
+
+ return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
+}
+
+// A special extend for ajax options
+// that takes "flat" options (not to be deep extended)
+// Fixes #9887
+function ajaxExtend( target, src ) {
+ var deep, key,
+ flatOptions = jQuery.ajaxSettings.flatOptions || {};
+
+ for ( key in src ) {
+ if ( src[ key ] !== undefined ) {
+ ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
+ }
+ }
+ if ( deep ) {
+ jQuery.extend( true, target, deep );
+ }
+
+ return target;
+}
+
+jQuery.fn.load = function( url, params, callback ) {
+ if ( typeof url !== "string" && _load ) {
+ return _load.apply( this, arguments );
+ }
+
+ var selector, response, type,
+ self = this,
+ off = url.indexOf(" ");
+
+ if ( off >= 0 ) {
+ selector = url.slice( off, url.length );
+ url = url.slice( 0, off );
+ }
+
+ // If it's a function
+ if ( jQuery.isFunction( params ) ) {
+
+ // We assume that it's the callback
+ callback = params;
+ params = undefined;
+
+ // Otherwise, build a param string
+ } else if ( params && typeof params === "object" ) {
+ type = "POST";
+ }
+
+ // If we have elements to modify, make the request
+ if ( self.length > 0 ) {
+ jQuery.ajax({
+ url: url,
+
+ // if "type" variable is undefined, then "GET" method will be used
+ type: type,
+ dataType: "html",
+ data: params
+ }).done(function( responseText ) {
+
+ // Save response for use in complete callback
+ response = arguments;
+
+ self.html( selector ?
+
+ // If a selector was specified, locate the right elements in a dummy div
+ // Exclude scripts to avoid IE 'Permission Denied' errors
+ jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) :
+
+ // Otherwise use the full result
+ responseText );
+
+ }).complete( callback && function( jqXHR, status ) {
+ self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
+ });
+ }
+
+ return this;
+};
+
+// Attach a bunch of functions for handling common AJAX events
+jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ){
+ jQuery.fn[ type ] = function( fn ){
+ return this.on( type, fn );
+ };
+});
+
+jQuery.each( [ "get", "post" ], function( i, method ) {
+ jQuery[ method ] = function( url, data, callback, type ) {
+ // shift arguments if data argument was omitted
+ if ( jQuery.isFunction( data ) ) {
+ type = type || callback;
+ callback = data;
+ data = undefined;
+ }
+
+ return jQuery.ajax({
+ url: url,
+ type: method,
+ dataType: type,
+ data: data,
+ success: callback
+ });
+ };
+});
+
+jQuery.extend({
+
+ // Counter for holding the number of active queries
+ active: 0,
+
+ // Last-Modified header cache for next request
+ lastModified: {},
+ etag: {},
+
+ ajaxSettings: {
+ url: ajaxLocation,
+ type: "GET",
+ isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
+ global: true,
+ processData: true,
+ async: true,
+ contentType: "application/x-www-form-urlencoded; charset=UTF-8",
+ /*
+ timeout: 0,
+ data: null,
+ dataType: null,
+ username: null,
+ password: null,
+ cache: null,
+ throws: false,
+ traditional: false,
+ headers: {},
+ */
+
+ accepts: {
+ "*": allTypes,
+ text: "text/plain",
+ html: "text/html",
+ xml: "application/xml, text/xml",
+ json: "application/json, text/javascript"
+ },
+
+ contents: {
+ xml: /xml/,
+ html: /html/,
+ json: /json/
+ },
+
+ responseFields: {
+ xml: "responseXML",
+ text: "responseText"
+ },
+
+ // Data converters
+ // Keys separate source (or catchall "*") and destination types with a single space
+ converters: {
+
+ // Convert anything to text
+ "* text": window.String,
+
+ // Text to html (true = no transformation)
+ "text html": true,
+
+ // Evaluate text as a json expression
+ "text json": jQuery.parseJSON,
+
+ // Parse text as xml
+ "text xml": jQuery.parseXML
+ },
+
+ // For options that shouldn't be deep extended:
+ // you can add your own custom options here if
+ // and when you create one that shouldn't be
+ // deep extended (see ajaxExtend)
+ flatOptions: {
+ url: true,
+ context: true
+ }
+ },
+
+ // Creates a full fledged settings object into target
+ // with both ajaxSettings and settings fields.
+ // If target is omitted, writes into ajaxSettings.
+ ajaxSetup: function( target, settings ) {
+ return settings ?
+
+ // Building a settings object
+ ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
+
+ // Extending ajaxSettings
+ ajaxExtend( jQuery.ajaxSettings, target );
+ },
+
+ ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
+ ajaxTransport: addToPrefiltersOrTransports( transports ),
+
+ // Main method
+ ajax: function( url, options ) {
+
+ // If url is an object, simulate pre-1.5 signature
+ if ( typeof url === "object" ) {
+ options = url;
+ url = undefined;
+ }
+
+ // Force options to be an object
+ options = options || {};
+
+ var // Cross-domain detection vars
+ parts,
+ // Loop variable
+ i,
+ // URL without anti-cache param
+ cacheURL,
+ // Response headers as string
+ responseHeadersString,
+ // timeout handle
+ timeoutTimer,
+
+ // To know if global events are to be dispatched
+ fireGlobals,
+
+ transport,
+ // Response headers
+ responseHeaders,
+ // Create the final options object
+ s = jQuery.ajaxSetup( {}, options ),
+ // Callbacks context
+ callbackContext = s.context || s,
+ // Context for global events is callbackContext if it is a DOM node or jQuery collection
+ globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
+ jQuery( callbackContext ) :
+ jQuery.event,
+ // Deferreds
+ deferred = jQuery.Deferred(),
+ completeDeferred = jQuery.Callbacks("once memory"),
+ // Status-dependent callbacks
+ statusCode = s.statusCode || {},
+ // Headers (they are sent all at once)
+ requestHeaders = {},
+ requestHeadersNames = {},
+ // The jqXHR state
+ state = 0,
+ // Default abort message
+ strAbort = "canceled",
+ // Fake xhr
+ jqXHR = {
+ readyState: 0,
+
+ // Builds headers hashtable if needed
+ getResponseHeader: function( key ) {
+ var match;
+ if ( state === 2 ) {
+ if ( !responseHeaders ) {
+ responseHeaders = {};
+ while ( (match = rheaders.exec( responseHeadersString )) ) {
+ responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
+ }
+ }
+ match = responseHeaders[ key.toLowerCase() ];
+ }
+ return match == null ? null : match;
+ },
+
+ // Raw string
+ getAllResponseHeaders: function() {
+ return state === 2 ? responseHeadersString : null;
+ },
+
+ // Caches the header
+ setRequestHeader: function( name, value ) {
+ var lname = name.toLowerCase();
+ if ( !state ) {
+ name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
+ requestHeaders[ name ] = value;
+ }
+ return this;
+ },
+
+ // Overrides response content-type header
+ overrideMimeType: function( type ) {
+ if ( !state ) {
+ s.mimeType = type;
+ }
+ return this;
+ },
+
+ // Status-dependent callbacks
+ statusCode: function( map ) {
+ var code;
+ if ( map ) {
+ if ( state < 2 ) {
+ for ( code in map ) {
+ // Lazy-add the new callback in a way that preserves old ones
+ statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
+ }
+ } else {
+ // Execute the appropriate callbacks
+ jqXHR.always( map[ jqXHR.status ] );
+ }
+ }
+ return this;
+ },
+
+ // Cancel the request
+ abort: function( statusText ) {
+ var finalText = statusText || strAbort;
+ if ( transport ) {
+ transport.abort( finalText );
+ }
+ done( 0, finalText );
+ return this;
+ }
+ };
+
+ // Attach deferreds
+ deferred.promise( jqXHR ).complete = completeDeferred.add;
+ jqXHR.success = jqXHR.done;
+ jqXHR.error = jqXHR.fail;
+
+ // Remove hash character (#7531: and string promotion)
+ // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
+ // Handle falsy url in the settings object (#10093: consistency with old signature)
+ // We also use the url parameter if available
+ s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
+
+ // Alias method option to type as per ticket #12004
+ s.type = options.method || options.type || s.method || s.type;
+
+ // Extract dataTypes list
+ s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( core_rnotwhite ) || [""];
+
+ // A cross-domain request is in order when we have a protocol:host:port mismatch
+ if ( s.crossDomain == null ) {
+ parts = rurl.exec( s.url.toLowerCase() );
+ s.crossDomain = !!( parts &&
+ ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
+ ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
+ ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
+ );
+ }
+
+ // Convert data if not already a string
+ if ( s.data && s.processData && typeof s.data !== "string" ) {
+ s.data = jQuery.param( s.data, s.traditional );
+ }
+
+ // Apply prefilters
+ inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
+
+ // If request was aborted inside a prefilter, stop there
+ if ( state === 2 ) {
+ return jqXHR;
+ }
+
+ // We can fire global events as of now if asked to
+ fireGlobals = s.global;
+
+ // Watch for a new set of requests
+ if ( fireGlobals && jQuery.active++ === 0 ) {
+ jQuery.event.trigger("ajaxStart");
+ }
+
+ // Uppercase the type
+ s.type = s.type.toUpperCase();
+
+ // Determine if request has content
+ s.hasContent = !rnoContent.test( s.type );
+
+ // Save the URL in case we're toying with the If-Modified-Since
+ // and/or If-None-Match header later on
+ cacheURL = s.url;
+
+ // More options handling for requests with no content
+ if ( !s.hasContent ) {
+
+ // If data is available, append data to url
+ if ( s.data ) {
+ cacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
+ // #9682: remove data so that it's not used in an eventual retry
+ delete s.data;
+ }
+
+ // Add anti-cache in url if needed
+ if ( s.cache === false ) {
+ s.url = rts.test( cacheURL ) ?
+
+ // If there is already a '_' parameter, set its value
+ cacheURL.replace( rts, "$1_=" + ajax_nonce++ ) :
+
+ // Otherwise add one to the end
+ cacheURL + ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ajax_nonce++;
+ }
+ }
+
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+ if ( s.ifModified ) {
+ if ( jQuery.lastModified[ cacheURL ] ) {
+ jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
+ }
+ if ( jQuery.etag[ cacheURL ] ) {
+ jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
+ }
+ }
+
+ // Set the correct header, if data is being sent
+ if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
+ jqXHR.setRequestHeader( "Content-Type", s.contentType );
+ }
+
+ // Set the Accepts header for the server, depending on the dataType
+ jqXHR.setRequestHeader(
+ "Accept",
+ s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
+ s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
+ s.accepts[ "*" ]
+ );
+
+ // Check for headers option
+ for ( i in s.headers ) {
+ jqXHR.setRequestHeader( i, s.headers[ i ] );
+ }
+
+ // Allow custom headers/mimetypes and early abort
+ if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
+ // Abort if not done already and return
+ return jqXHR.abort();
+ }
+
+ // aborting is no longer a cancellation
+ strAbort = "abort";
+
+ // Install callbacks on deferreds
+ for ( i in { success: 1, error: 1, complete: 1 } ) {
+ jqXHR[ i ]( s[ i ] );
+ }
+
+ // Get transport
+ transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
+
+ // If no transport, we auto-abort
+ if ( !transport ) {
+ done( -1, "No Transport" );
+ } else {
+ jqXHR.readyState = 1;
+
+ // Send global event
+ if ( fireGlobals ) {
+ globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
+ }
+ // Timeout
+ if ( s.async && s.timeout > 0 ) {
+ timeoutTimer = setTimeout(function() {
+ jqXHR.abort("timeout");
+ }, s.timeout );
+ }
+
+ try {
+ state = 1;
+ transport.send( requestHeaders, done );
+ } catch ( e ) {
+ // Propagate exception as error if not done
+ if ( state < 2 ) {
+ done( -1, e );
+ // Simply rethrow otherwise
+ } else {
+ throw e;
+ }
+ }
+ }
+
+ // Callback for when everything is done
+ function done( status, nativeStatusText, responses, headers ) {
+ var isSuccess, success, error, response, modified,
+ statusText = nativeStatusText;
+
+ // Called once
+ if ( state === 2 ) {
+ return;
+ }
+
+ // State is "done" now
+ state = 2;
+
+ // Clear timeout if it exists
+ if ( timeoutTimer ) {
+ clearTimeout( timeoutTimer );
+ }
+
+ // Dereference transport for early garbage collection
+ // (no matter how long the jqXHR object will be used)
+ transport = undefined;
+
+ // Cache response headers
+ responseHeadersString = headers || "";
+
+ // Set readyState
+ jqXHR.readyState = status > 0 ? 4 : 0;
+
+ // Get response data
+ if ( responses ) {
+ response = ajaxHandleResponses( s, jqXHR, responses );
+ }
+
+ // If successful, handle type chaining
+ if ( status >= 200 && status < 300 || status === 304 ) {
+
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+ if ( s.ifModified ) {
+ modified = jqXHR.getResponseHeader("Last-Modified");
+ if ( modified ) {
+ jQuery.lastModified[ cacheURL ] = modified;
+ }
+ modified = jqXHR.getResponseHeader("etag");
+ if ( modified ) {
+ jQuery.etag[ cacheURL ] = modified;
+ }
+ }
+
+ // if no content
+ if ( status === 204 ) {
+ isSuccess = true;
+ statusText = "nocontent";
+
+ // if not modified
+ } else if ( status === 304 ) {
+ isSuccess = true;
+ statusText = "notmodified";
+
+ // If we have data, let's convert it
+ } else {
+ isSuccess = ajaxConvert( s, response );
+ statusText = isSuccess.state;
+ success = isSuccess.data;
+ error = isSuccess.error;
+ isSuccess = !error;
+ }
+ } else {
+ // We extract error from statusText
+ // then normalize statusText and status for non-aborts
+ error = statusText;
+ if ( status || !statusText ) {
+ statusText = "error";
+ if ( status < 0 ) {
+ status = 0;
+ }
+ }
+ }
+
+ // Set data for the fake xhr object
+ jqXHR.status = status;
+ jqXHR.statusText = ( nativeStatusText || statusText ) + "";
+
+ // Success/Error
+ if ( isSuccess ) {
+ deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
+ } else {
+ deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
+ }
+
+ // Status-dependent callbacks
+ jqXHR.statusCode( statusCode );
+ statusCode = undefined;
+
+ if ( fireGlobals ) {
+ globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
+ [ jqXHR, s, isSuccess ? success : error ] );
+ }
+
+ // Complete
+ completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
+
+ if ( fireGlobals ) {
+ globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
+ // Handle the global AJAX counter
+ if ( !( --jQuery.active ) ) {
+ jQuery.event.trigger("ajaxStop");
+ }
+ }
+ }
+
+ return jqXHR;
+ },
+
+ getScript: function( url, callback ) {
+ return jQuery.get( url, undefined, callback, "script" );
+ },
+
+ getJSON: function( url, data, callback ) {
+ return jQuery.get( url, data, callback, "json" );
+ }
+});
+
+/* Handles responses to an ajax request:
+ * - sets all responseXXX fields accordingly
+ * - finds the right dataType (mediates between content-type and expected dataType)
+ * - returns the corresponding response
+ */
+function ajaxHandleResponses( s, jqXHR, responses ) {
+ var firstDataType, ct, finalDataType, type,
+ contents = s.contents,
+ dataTypes = s.dataTypes,
+ responseFields = s.responseFields;
+
+ // Fill responseXXX fields
+ for ( type in responseFields ) {
+ if ( type in responses ) {
+ jqXHR[ responseFields[type] ] = responses[ type ];
+ }
+ }
+
+ // Remove auto dataType and get content-type in the process
+ while( dataTypes[ 0 ] === "*" ) {
+ dataTypes.shift();
+ if ( ct === undefined ) {
+ ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
+ }
+ }
+
+ // Check if we're dealing with a known content-type
+ if ( ct ) {
+ for ( type in contents ) {
+ if ( contents[ type ] && contents[ type ].test( ct ) ) {
+ dataTypes.unshift( type );
+ break;
+ }
+ }
+ }
+
+ // Check to see if we have a response for the expected dataType
+ if ( dataTypes[ 0 ] in responses ) {
+ finalDataType = dataTypes[ 0 ];
+ } else {
+ // Try convertible dataTypes
+ for ( type in responses ) {
+ if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
+ finalDataType = type;
+ break;
+ }
+ if ( !firstDataType ) {
+ firstDataType = type;
+ }
+ }
+ // Or just use first one
+ finalDataType = finalDataType || firstDataType;
+ }
+
+ // If we found a dataType
+ // We add the dataType to the list if needed
+ // and return the corresponding response
+ if ( finalDataType ) {
+ if ( finalDataType !== dataTypes[ 0 ] ) {
+ dataTypes.unshift( finalDataType );
+ }
+ return responses[ finalDataType ];
+ }
+}
+
+// Chain conversions given the request and the original response
+function ajaxConvert( s, response ) {
+ var conv2, current, conv, tmp,
+ converters = {},
+ i = 0,
+ // Work with a copy of dataTypes in case we need to modify it for conversion
+ dataTypes = s.dataTypes.slice(),
+ prev = dataTypes[ 0 ];
+
+ // Apply the dataFilter if provided
+ if ( s.dataFilter ) {
+ response = s.dataFilter( response, s.dataType );
+ }
+
+ // Create converters map with lowercased keys
+ if ( dataTypes[ 1 ] ) {
+ for ( conv in s.converters ) {
+ converters[ conv.toLowerCase() ] = s.converters[ conv ];
+ }
+ }
+
+ // Convert to each sequential dataType, tolerating list modification
+ for ( ; (current = dataTypes[++i]); ) {
+
+ // There's only work to do if current dataType is non-auto
+ if ( current !== "*" ) {
+
+ // Convert response if prev dataType is non-auto and differs from current
+ if ( prev !== "*" && prev !== current ) {
+
+ // Seek a direct converter
+ conv = converters[ prev + " " + current ] || converters[ "* " + current ];
+
+ // If none found, seek a pair
+ if ( !conv ) {
+ for ( conv2 in converters ) {
+
+ // If conv2 outputs current
+ tmp = conv2.split(" ");
+ if ( tmp[ 1 ] === current ) {
+
+ // If prev can be converted to accepted input
+ conv = converters[ prev + " " + tmp[ 0 ] ] ||
+ converters[ "* " + tmp[ 0 ] ];
+ if ( conv ) {
+ // Condense equivalence converters
+ if ( conv === true ) {
+ conv = converters[ conv2 ];
+
+ // Otherwise, insert the intermediate dataType
+ } else if ( converters[ conv2 ] !== true ) {
+ current = tmp[ 0 ];
+ dataTypes.splice( i--, 0, current );
+ }
+
+ break;
+ }
+ }
+ }
+ }
+
+ // Apply converter (if not an equivalence)
+ if ( conv !== true ) {
+
+ // Unless errors are allowed to bubble, catch and return them
+ if ( conv && s["throws"] ) {
+ response = conv( response );
+ } else {
+ try {
+ response = conv( response );
+ } catch ( e ) {
+ return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
+ }
+ }
+ }
+ }
+
+ // Update prev for next iteration
+ prev = current;
+ }
+ }
+
+ return { state: "success", data: response };
+}
+// Install script dataType
+jQuery.ajaxSetup({
+ accepts: {
+ script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
+ },
+ contents: {
+ script: /(?:java|ecma)script/
+ },
+ converters: {
+ "text script": function( text ) {
+ jQuery.globalEval( text );
+ return text;
+ }
+ }
+});
+
+// Handle cache's special case and global
+jQuery.ajaxPrefilter( "script", function( s ) {
+ if ( s.cache === undefined ) {
+ s.cache = false;
+ }
+ if ( s.crossDomain ) {
+ s.type = "GET";
+ s.global = false;
+ }
+});
+
+// Bind script tag hack transport
+jQuery.ajaxTransport( "script", function(s) {
+
+ // This transport only deals with cross domain requests
+ if ( s.crossDomain ) {
+
+ var script,
+ head = document.head || jQuery("head")[0] || document.documentElement;
+
+ return {
+
+ send: function( _, callback ) {
+
+ script = document.createElement("script");
+
+ script.async = true;
+
+ if ( s.scriptCharset ) {
+ script.charset = s.scriptCharset;
+ }
+
+ script.src = s.url;
+
+ // Attach handlers for all browsers
+ script.onload = script.onreadystatechange = function( _, isAbort ) {
+
+ if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
+
+ // Handle memory leak in IE
+ script.onload = script.onreadystatechange = null;
+
+ // Remove the script
+ if ( script.parentNode ) {
+ script.parentNode.removeChild( script );
+ }
+
+ // Dereference the script
+ script = null;
+
+ // Callback if not abort
+ if ( !isAbort ) {
+ callback( 200, "success" );
+ }
+ }
+ };
+
+ // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending
+ // Use native DOM manipulation to avoid our domManip AJAX trickery
+ head.insertBefore( script, head.firstChild );
+ },
+
+ abort: function() {
+ if ( script ) {
+ script.onload( undefined, true );
+ }
+ }
+ };
+ }
+});
+var oldCallbacks = [],
+ rjsonp = /(=)\?(?=&|$)|\?\?/;
+
+// Default jsonp settings
+jQuery.ajaxSetup({
+ jsonp: "callback",
+ jsonpCallback: function() {
+ var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( ajax_nonce++ ) );
+ this[ callback ] = true;
+ return callback;
+ }
+});
+
+// Detect, normalize options and install callbacks for jsonp requests
+jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
+
+ var callbackName, overwritten, responseContainer,
+ jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
+ "url" :
+ typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"
+ );
+
+ // Handle iff the expected data type is "jsonp" or we have a parameter to set
+ if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
+
+ // Get callback name, remembering preexisting value associated with it
+ callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
+ s.jsonpCallback() :
+ s.jsonpCallback;
+
+ // Insert callback into url or form data
+ if ( jsonProp ) {
+ s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
+ } else if ( s.jsonp !== false ) {
+ s.url += ( ajax_rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
+ }
+
+ // Use data converter to retrieve json after script execution
+ s.converters["script json"] = function() {
+ if ( !responseContainer ) {
+ jQuery.error( callbackName + " was not called" );
+ }
+ return responseContainer[ 0 ];
+ };
+
+ // force json dataType
+ s.dataTypes[ 0 ] = "json";
+
+ // Install callback
+ overwritten = window[ callbackName ];
+ window[ callbackName ] = function() {
+ responseContainer = arguments;
+ };
+
+ // Clean-up function (fires after converters)
+ jqXHR.always(function() {
+ // Restore preexisting value
+ window[ callbackName ] = overwritten;
+
+ // Save back as free
+ if ( s[ callbackName ] ) {
+ // make sure that re-using the options doesn't screw things around
+ s.jsonpCallback = originalSettings.jsonpCallback;
+
+ // save the callback name for future use
+ oldCallbacks.push( callbackName );
+ }
+
+ // Call if it was a function and we have a response
+ if ( responseContainer && jQuery.isFunction( overwritten ) ) {
+ overwritten( responseContainer[ 0 ] );
+ }
+
+ responseContainer = overwritten = undefined;
+ });
+
+ // Delegate to script
+ return "script";
+ }
+});
+var xhrCallbacks, xhrSupported,
+ xhrId = 0,
+ // #5280: Internet Explorer will keep connections alive if we don't abort on unload
+ xhrOnUnloadAbort = window.ActiveXObject && function() {
+ // Abort all pending requests
+ var key;
+ for ( key in xhrCallbacks ) {
+ xhrCallbacks[ key ]( undefined, true );
+ }
+ };
+
+// Functions to create xhrs
+function createStandardXHR() {
+ try {
+ return new window.XMLHttpRequest();
+ } catch( e ) {}
+}
+
+function createActiveXHR() {
+ try {
+ return new window.ActiveXObject("Microsoft.XMLHTTP");
+ } catch( e ) {}
+}
+
+// Create the request object
+// (This is still attached to ajaxSettings for backward compatibility)
+jQuery.ajaxSettings.xhr = window.ActiveXObject ?
+ /* Microsoft failed to properly
+ * implement the XMLHttpRequest in IE7 (can't request local files),
+ * so we use the ActiveXObject when it is available
+ * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
+ * we need a fallback.
+ */
+ function() {
+ return !this.isLocal && createStandardXHR() || createActiveXHR();
+ } :
+ // For all other browsers, use the standard XMLHttpRequest object
+ createStandardXHR;
+
+// Determine support properties
+xhrSupported = jQuery.ajaxSettings.xhr();
+jQuery.support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
+xhrSupported = jQuery.support.ajax = !!xhrSupported;
+
+// Create transport if the browser can provide an xhr
+if ( xhrSupported ) {
+
+ jQuery.ajaxTransport(function( s ) {
+ // Cross domain only allowed if supported through XMLHttpRequest
+ if ( !s.crossDomain || jQuery.support.cors ) {
+
+ var callback;
+
+ return {
+ send: function( headers, complete ) {
+
+ // Get a new xhr
+ var handle, i,
+ xhr = s.xhr();
+
+ // Open the socket
+ // Passing null username, generates a login popup on Opera (#2865)
+ if ( s.username ) {
+ xhr.open( s.type, s.url, s.async, s.username, s.password );
+ } else {
+ xhr.open( s.type, s.url, s.async );
+ }
+
+ // Apply custom fields if provided
+ if ( s.xhrFields ) {
+ for ( i in s.xhrFields ) {
+ xhr[ i ] = s.xhrFields[ i ];
+ }
+ }
+
+ // Override mime type if needed
+ if ( s.mimeType && xhr.overrideMimeType ) {
+ xhr.overrideMimeType( s.mimeType );
+ }
+
+ // X-Requested-With header
+ // For cross-domain requests, seeing as conditions for a preflight are
+ // akin to a jigsaw puzzle, we simply never set it to be sure.
+ // (it can always be set on a per-request basis or even using ajaxSetup)
+ // For same-domain requests, won't change header if already provided.
+ if ( !s.crossDomain && !headers["X-Requested-With"] ) {
+ headers["X-Requested-With"] = "XMLHttpRequest";
+ }
+
+ // Need an extra try/catch for cross domain requests in Firefox 3
+ try {
+ for ( i in headers ) {
+ xhr.setRequestHeader( i, headers[ i ] );
+ }
+ } catch( err ) {}
+
+ // Do send the request
+ // This may raise an exception which is actually
+ // handled in jQuery.ajax (so no try/catch here)
+ xhr.send( ( s.hasContent && s.data ) || null );
+
+ // Listener
+ callback = function( _, isAbort ) {
+ var status, responseHeaders, statusText, responses;
+
+ // Firefox throws exceptions when accessing properties
+ // of an xhr when a network error occurred
+ // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
+ try {
+
+ // Was never called and is aborted or complete
+ if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
+
+ // Only called once
+ callback = undefined;
+
+ // Do not keep as active anymore
+ if ( handle ) {
+ xhr.onreadystatechange = jQuery.noop;
+ if ( xhrOnUnloadAbort ) {
+ delete xhrCallbacks[ handle ];
+ }
+ }
+
+ // If it's an abort
+ if ( isAbort ) {
+ // Abort it manually if needed
+ if ( xhr.readyState !== 4 ) {
+ xhr.abort();
+ }
+ } else {
+ responses = {};
+ status = xhr.status;
+ responseHeaders = xhr.getAllResponseHeaders();
+
+ // When requesting binary data, IE6-9 will throw an exception
+ // on any attempt to access responseText (#11426)
+ if ( typeof xhr.responseText === "string" ) {
+ responses.text = xhr.responseText;
+ }
+
+ // Firefox throws an exception when accessing
+ // statusText for faulty cross-domain requests
+ try {
+ statusText = xhr.statusText;
+ } catch( e ) {
+ // We normalize with Webkit giving an empty statusText
+ statusText = "";
+ }
+
+ // Filter status for non standard behaviors
+
+ // If the request is local and we have data: assume a success
+ // (success with no data won't get notified, that's the best we
+ // can do given current implementations)
+ if ( !status && s.isLocal && !s.crossDomain ) {
+ status = responses.text ? 200 : 404;
+ // IE - #1450: sometimes returns 1223 when it should be 204
+ } else if ( status === 1223 ) {
+ status = 204;
+ }
+ }
+ }
+ } catch( firefoxAccessException ) {
+ if ( !isAbort ) {
+ complete( -1, firefoxAccessException );
+ }
+ }
+
+ // Call complete if needed
+ if ( responses ) {
+ complete( status, statusText, responses, responseHeaders );
+ }
+ };
+
+ if ( !s.async ) {
+ // if we're in sync mode we fire the callback
+ callback();
+ } else if ( xhr.readyState === 4 ) {
+ // (IE6 & IE7) if it's in cache and has been
+ // retrieved directly we need to fire the callback
+ setTimeout( callback );
+ } else {
+ handle = ++xhrId;
+ if ( xhrOnUnloadAbort ) {
+ // Create the active xhrs callbacks list if needed
+ // and attach the unload handler
+ if ( !xhrCallbacks ) {
+ xhrCallbacks = {};
+ jQuery( window ).unload( xhrOnUnloadAbort );
+ }
+ // Add to list of active xhrs callbacks
+ xhrCallbacks[ handle ] = callback;
+ }
+ xhr.onreadystatechange = callback;
+ }
+ },
+
+ abort: function() {
+ if ( callback ) {
+ callback( undefined, true );
+ }
+ }
+ };
+ }
+ });
+}
+var fxNow, timerId,
+ rfxtypes = /^(?:toggle|show|hide)$/,
+ rfxnum = new RegExp( "^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i" ),
+ rrun = /queueHooks$/,
+ animationPrefilters = [ defaultPrefilter ],
+ tweeners = {
+ "*": [function( prop, value ) {
+ var end, unit,
+ tween = this.createTween( prop, value ),
+ parts = rfxnum.exec( value ),
+ target = tween.cur(),
+ start = +target || 0,
+ scale = 1,
+ maxIterations = 20;
+
+ if ( parts ) {
+ end = +parts[2];
+ unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" );
+
+ // We need to compute starting value
+ if ( unit !== "px" && start ) {
+ // Iteratively approximate from a nonzero starting point
+ // Prefer the current property, because this process will be trivial if it uses the same units
+ // Fallback to end or a simple constant
+ start = jQuery.css( tween.elem, prop, true ) || end || 1;
+
+ do {
+ // If previous iteration zeroed out, double until we get *something*
+ // Use a string for doubling factor so we don't accidentally see scale as unchanged below
+ scale = scale || ".5";
+
+ // Adjust and apply
+ start = start / scale;
+ jQuery.style( tween.elem, prop, start + unit );
+
+ // Update scale, tolerating zero or NaN from tween.cur()
+ // And breaking the loop if scale is unchanged or perfect, or if we've just had enough
+ } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
+ }
+
+ tween.unit = unit;
+ tween.start = start;
+ // If a +=/-= token was provided, we're doing a relative animation
+ tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end;
+ }
+ return tween;
+ }]
+ };
+
+// Animations created synchronously will run synchronously
+function createFxNow() {
+ setTimeout(function() {
+ fxNow = undefined;
+ });
+ return ( fxNow = jQuery.now() );
+}
+
+function createTweens( animation, props ) {
+ jQuery.each( props, function( prop, value ) {
+ var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
+ index = 0,
+ length = collection.length;
+ for ( ; index < length; index++ ) {
+ if ( collection[ index ].call( animation, prop, value ) ) {
+
+ // we're done with this property
+ return;
+ }
+ }
+ });
+}
+
+function Animation( elem, properties, options ) {
+ var result,
+ stopped,
+ index = 0,
+ length = animationPrefilters.length,
+ deferred = jQuery.Deferred().always( function() {
+ // don't match elem in the :animated selector
+ delete tick.elem;
+ }),
+ tick = function() {
+ if ( stopped ) {
+ return false;
+ }
+ var currentTime = fxNow || createFxNow(),
+ remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
+ // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)
+ temp = remaining / animation.duration || 0,
+ percent = 1 - temp,
+ index = 0,
+ length = animation.tweens.length;
+
+ for ( ; index < length ; index++ ) {
+ animation.tweens[ index ].run( percent );
+ }
+
+ deferred.notifyWith( elem, [ animation, percent, remaining ]);
+
+ if ( percent < 1 && length ) {
+ return remaining;
+ } else {
+ deferred.resolveWith( elem, [ animation ] );
+ return false;
+ }
+ },
+ animation = deferred.promise({
+ elem: elem,
+ props: jQuery.extend( {}, properties ),
+ opts: jQuery.extend( true, { specialEasing: {} }, options ),
+ originalProperties: properties,
+ originalOptions: options,
+ startTime: fxNow || createFxNow(),
+ duration: options.duration,
+ tweens: [],
+ createTween: function( prop, end ) {
+ var tween = jQuery.Tween( elem, animation.opts, prop, end,
+ animation.opts.specialEasing[ prop ] || animation.opts.easing );
+ animation.tweens.push( tween );
+ return tween;
+ },
+ stop: function( gotoEnd ) {
+ var index = 0,
+ // if we are going to the end, we want to run all the tweens
+ // otherwise we skip this part
+ length = gotoEnd ? animation.tweens.length : 0;
+ if ( stopped ) {
+ return this;
+ }
+ stopped = true;
+ for ( ; index < length ; index++ ) {
+ animation.tweens[ index ].run( 1 );
+ }
+
+ // resolve when we played the last frame
+ // otherwise, reject
+ if ( gotoEnd ) {
+ deferred.resolveWith( elem, [ animation, gotoEnd ] );
+ } else {
+ deferred.rejectWith( elem, [ animation, gotoEnd ] );
+ }
+ return this;
+ }
+ }),
+ props = animation.props;
+
+ propFilter( props, animation.opts.specialEasing );
+
+ for ( ; index < length ; index++ ) {
+ result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
+ if ( result ) {
+ return result;
+ }
+ }
+
+ createTweens( animation, props );
+
+ if ( jQuery.isFunction( animation.opts.start ) ) {
+ animation.opts.start.call( elem, animation );
+ }
+
+ jQuery.fx.timer(
+ jQuery.extend( tick, {
+ elem: elem,
+ anim: animation,
+ queue: animation.opts.queue
+ })
+ );
+
+ // attach callbacks from options
+ return animation.progress( animation.opts.progress )
+ .done( animation.opts.done, animation.opts.complete )
+ .fail( animation.opts.fail )
+ .always( animation.opts.always );
+}
+
+function propFilter( props, specialEasing ) {
+ var value, name, index, easing, hooks;
+
+ // camelCase, specialEasing and expand cssHook pass
+ for ( index in props ) {
+ name = jQuery.camelCase( index );
+ easing = specialEasing[ name ];
+ value = props[ index ];
+ if ( jQuery.isArray( value ) ) {
+ easing = value[ 1 ];
+ value = props[ index ] = value[ 0 ];
+ }
+
+ if ( index !== name ) {
+ props[ name ] = value;
+ delete props[ index ];
+ }
+
+ hooks = jQuery.cssHooks[ name ];
+ if ( hooks && "expand" in hooks ) {
+ value = hooks.expand( value );
+ delete props[ name ];
+
+ // not quite $.extend, this wont overwrite keys already present.
+ // also - reusing 'index' from above because we have the correct "name"
+ for ( index in value ) {
+ if ( !( index in props ) ) {
+ props[ index ] = value[ index ];
+ specialEasing[ index ] = easing;
+ }
+ }
+ } else {
+ specialEasing[ name ] = easing;
+ }
+ }
+}
+
+jQuery.Animation = jQuery.extend( Animation, {
+
+ tweener: function( props, callback ) {
+ if ( jQuery.isFunction( props ) ) {
+ callback = props;
+ props = [ "*" ];
+ } else {
+ props = props.split(" ");
+ }
+
+ var prop,
+ index = 0,
+ length = props.length;
+
+ for ( ; index < length ; index++ ) {
+ prop = props[ index ];
+ tweeners[ prop ] = tweeners[ prop ] || [];
+ tweeners[ prop ].unshift( callback );
+ }
+ },
+
+ prefilter: function( callback, prepend ) {
+ if ( prepend ) {
+ animationPrefilters.unshift( callback );
+ } else {
+ animationPrefilters.push( callback );
+ }
+ }
+});
+
+function defaultPrefilter( elem, props, opts ) {
+ /*jshint validthis:true */
+ var prop, index, length,
+ value, dataShow, toggle,
+ tween, hooks, oldfire,
+ anim = this,
+ style = elem.style,
+ orig = {},
+ handled = [],
+ hidden = elem.nodeType && isHidden( elem );
+
+ // handle queue: false promises
+ if ( !opts.queue ) {
+ hooks = jQuery._queueHooks( elem, "fx" );
+ if ( hooks.unqueued == null ) {
+ hooks.unqueued = 0;
+ oldfire = hooks.empty.fire;
+ hooks.empty.fire = function() {
+ if ( !hooks.unqueued ) {
+ oldfire();
+ }
+ };
+ }
+ hooks.unqueued++;
+
+ anim.always(function() {
+ // doing this makes sure that the complete handler will be called
+ // before this completes
+ anim.always(function() {
+ hooks.unqueued--;
+ if ( !jQuery.queue( elem, "fx" ).length ) {
+ hooks.empty.fire();
+ }
+ });
+ });
+ }
+
+ // height/width overflow pass
+ if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
+ // Make sure that nothing sneaks out
+ // Record all 3 overflow attributes because IE does not
+ // change the overflow attribute when overflowX and
+ // overflowY are set to the same value
+ opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
+
+ // Set display property to inline-block for height/width
+ // animations on inline elements that are having width/height animated
+ if ( jQuery.css( elem, "display" ) === "inline" &&
+ jQuery.css( elem, "float" ) === "none" ) {
+
+ // inline-level elements accept inline-block;
+ // block-level elements need to be inline with layout
+ if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) {
+ style.display = "inline-block";
+
+ } else {
+ style.zoom = 1;
+ }
+ }
+ }
+
+ if ( opts.overflow ) {
+ style.overflow = "hidden";
+ if ( !jQuery.support.shrinkWrapBlocks ) {
+ anim.always(function() {
+ style.overflow = opts.overflow[ 0 ];
+ style.overflowX = opts.overflow[ 1 ];
+ style.overflowY = opts.overflow[ 2 ];
+ });
+ }
+ }
+
+
+ // show/hide pass
+ for ( index in props ) {
+ value = props[ index ];
+ if ( rfxtypes.exec( value ) ) {
+ delete props[ index ];
+ toggle = toggle || value === "toggle";
+ if ( value === ( hidden ? "hide" : "show" ) ) {
+ continue;
+ }
+ handled.push( index );
+ }
+ }
+
+ length = handled.length;
+ if ( length ) {
+ dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} );
+ if ( "hidden" in dataShow ) {
+ hidden = dataShow.hidden;
+ }
+
+ // store state if its toggle - enables .stop().toggle() to "reverse"
+ if ( toggle ) {
+ dataShow.hidden = !hidden;
+ }
+ if ( hidden ) {
+ jQuery( elem ).show();
+ } else {
+ anim.done(function() {
+ jQuery( elem ).hide();
+ });
+ }
+ anim.done(function() {
+ var prop;
+ jQuery._removeData( elem, "fxshow" );
+ for ( prop in orig ) {
+ jQuery.style( elem, prop, orig[ prop ] );
+ }
+ });
+ for ( index = 0 ; index < length ; index++ ) {
+ prop = handled[ index ];
+ tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 );
+ orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop );
+
+ if ( !( prop in dataShow ) ) {
+ dataShow[ prop ] = tween.start;
+ if ( hidden ) {
+ tween.end = tween.start;
+ tween.start = prop === "width" || prop === "height" ? 1 : 0;
+ }
+ }
+ }
+ }
+}
+
+function Tween( elem, options, prop, end, easing ) {
+ return new Tween.prototype.init( elem, options, prop, end, easing );
+}
+jQuery.Tween = Tween;
+
+Tween.prototype = {
+ constructor: Tween,
+ init: function( elem, options, prop, end, easing, unit ) {
+ this.elem = elem;
+ this.prop = prop;
+ this.easing = easing || "swing";
+ this.options = options;
+ this.start = this.now = this.cur();
+ this.end = end;
+ this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
+ },
+ cur: function() {
+ var hooks = Tween.propHooks[ this.prop ];
+
+ return hooks && hooks.get ?
+ hooks.get( this ) :
+ Tween.propHooks._default.get( this );
+ },
+ run: function( percent ) {
+ var eased,
+ hooks = Tween.propHooks[ this.prop ];
+
+ if ( this.options.duration ) {
+ this.pos = eased = jQuery.easing[ this.easing ](
+ percent, this.options.duration * percent, 0, 1, this.options.duration
+ );
+ } else {
+ this.pos = eased = percent;
+ }
+ this.now = ( this.end - this.start ) * eased + this.start;
+
+ if ( this.options.step ) {
+ this.options.step.call( this.elem, this.now, this );
+ }
+
+ if ( hooks && hooks.set ) {
+ hooks.set( this );
+ } else {
+ Tween.propHooks._default.set( this );
+ }
+ return this;
+ }
+};
+
+Tween.prototype.init.prototype = Tween.prototype;
+
+Tween.propHooks = {
+ _default: {
+ get: function( tween ) {
+ var result;
+
+ if ( tween.elem[ tween.prop ] != null &&
+ (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
+ return tween.elem[ tween.prop ];
+ }
+
+ // passing an empty string as a 3rd parameter to .css will automatically
+ // attempt a parseFloat and fallback to a string if the parse fails
+ // so, simple values such as "10px" are parsed to Float.
+ // complex values such as "rotate(1rad)" are returned as is.
+ result = jQuery.css( tween.elem, tween.prop, "" );
+ // Empty strings, null, undefined and "auto" are converted to 0.
+ return !result || result === "auto" ? 0 : result;
+ },
+ set: function( tween ) {
+ // use step hook for back compat - use cssHook if its there - use .style if its
+ // available and use plain properties where available
+ if ( jQuery.fx.step[ tween.prop ] ) {
+ jQuery.fx.step[ tween.prop ]( tween );
+ } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
+ jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
+ } else {
+ tween.elem[ tween.prop ] = tween.now;
+ }
+ }
+ }
+};
+
+// Remove in 2.0 - this supports IE8's panic based approach
+// to setting things on disconnected nodes
+
+Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
+ set: function( tween ) {
+ if ( tween.elem.nodeType && tween.elem.parentNode ) {
+ tween.elem[ tween.prop ] = tween.now;
+ }
+ }
+};
+
+jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
+ var cssFn = jQuery.fn[ name ];
+ jQuery.fn[ name ] = function( speed, easing, callback ) {
+ return speed == null || typeof speed === "boolean" ?
+ cssFn.apply( this, arguments ) :
+ this.animate( genFx( name, true ), speed, easing, callback );
+ };
+});
+
+jQuery.fn.extend({
+ fadeTo: function( speed, to, easing, callback ) {
+
+ // show any hidden elements after setting opacity to 0
+ return this.filter( isHidden ).css( "opacity", 0 ).show()
+
+ // animate to the value specified
+ .end().animate({ opacity: to }, speed, easing, callback );
+ },
+ animate: function( prop, speed, easing, callback ) {
+ var empty = jQuery.isEmptyObject( prop ),
+ optall = jQuery.speed( speed, easing, callback ),
+ doAnimation = function() {
+ // Operate on a copy of prop so per-property easing won't be lost
+ var anim = Animation( this, jQuery.extend( {}, prop ), optall );
+ doAnimation.finish = function() {
+ anim.stop( true );
+ };
+ // Empty animations, or finishing resolves immediately
+ if ( empty || jQuery._data( this, "finish" ) ) {
+ anim.stop( true );
+ }
+ };
+ doAnimation.finish = doAnimation;
+
+ return empty || optall.queue === false ?
+ this.each( doAnimation ) :
+ this.queue( optall.queue, doAnimation );
+ },
+ stop: function( type, clearQueue, gotoEnd ) {
+ var stopQueue = function( hooks ) {
+ var stop = hooks.stop;
+ delete hooks.stop;
+ stop( gotoEnd );
+ };
+
+ if ( typeof type !== "string" ) {
+ gotoEnd = clearQueue;
+ clearQueue = type;
+ type = undefined;
+ }
+ if ( clearQueue && type !== false ) {
+ this.queue( type || "fx", [] );
+ }
+
+ return this.each(function() {
+ var dequeue = true,
+ index = type != null && type + "queueHooks",
+ timers = jQuery.timers,
+ data = jQuery._data( this );
+
+ if ( index ) {
+ if ( data[ index ] && data[ index ].stop ) {
+ stopQueue( data[ index ] );
+ }
+ } else {
+ for ( index in data ) {
+ if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
+ stopQueue( data[ index ] );
+ }
+ }
+ }
+
+ for ( index = timers.length; index--; ) {
+ if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
+ timers[ index ].anim.stop( gotoEnd );
+ dequeue = false;
+ timers.splice( index, 1 );
+ }
+ }
+
+ // start the next in the queue if the last step wasn't forced
+ // timers currently will call their complete callbacks, which will dequeue
+ // but only if they were gotoEnd
+ if ( dequeue || !gotoEnd ) {
+ jQuery.dequeue( this, type );
+ }
+ });
+ },
+ finish: function( type ) {
+ if ( type !== false ) {
+ type = type || "fx";
+ }
+ return this.each(function() {
+ var index,
+ data = jQuery._data( this ),
+ queue = data[ type + "queue" ],
+ hooks = data[ type + "queueHooks" ],
+ timers = jQuery.timers,
+ length = queue ? queue.length : 0;
+
+ // enable finishing flag on private data
+ data.finish = true;
+
+ // empty the queue first
+ jQuery.queue( this, type, [] );
+
+ if ( hooks && hooks.cur && hooks.cur.finish ) {
+ hooks.cur.finish.call( this );
+ }
+
+ // look for any active animations, and finish them
+ for ( index = timers.length; index--; ) {
+ if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
+ timers[ index ].anim.stop( true );
+ timers.splice( index, 1 );
+ }
+ }
+
+ // look for any animations in the old queue and finish them
+ for ( index = 0; index < length; index++ ) {
+ if ( queue[ index ] && queue[ index ].finish ) {
+ queue[ index ].finish.call( this );
+ }
+ }
+
+ // turn off finishing flag
+ delete data.finish;
+ });
+ }
+});
+
+// Generate parameters to create a standard animation
+function genFx( type, includeWidth ) {
+ var which,
+ attrs = { height: type },
+ i = 0;
+
+ // if we include width, step value is 1 to do all cssExpand values,
+ // if we don't include width, step value is 2 to skip over Left and Right
+ includeWidth = includeWidth? 1 : 0;
+ for( ; i < 4 ; i += 2 - includeWidth ) {
+ which = cssExpand[ i ];
+ attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
+ }
+
+ if ( includeWidth ) {
+ attrs.opacity = attrs.width = type;
+ }
+
+ return attrs;
+}
+
+// Generate shortcuts for custom animations
+jQuery.each({
+ slideDown: genFx("show"),
+ slideUp: genFx("hide"),
+ slideToggle: genFx("toggle"),
+ fadeIn: { opacity: "show" },
+ fadeOut: { opacity: "hide" },
+ fadeToggle: { opacity: "toggle" }
+}, function( name, props ) {
+ jQuery.fn[ name ] = function( speed, easing, callback ) {
+ return this.animate( props, speed, easing, callback );
+ };
+});
+
+jQuery.speed = function( speed, easing, fn ) {
+ var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
+ complete: fn || !fn && easing ||
+ jQuery.isFunction( speed ) && speed,
+ duration: speed,
+ easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
+ };
+
+ opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
+ opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
+
+ // normalize opt.queue - true/undefined/null -> "fx"
+ if ( opt.queue == null || opt.queue === true ) {
+ opt.queue = "fx";
+ }
+
+ // Queueing
+ opt.old = opt.complete;
+
+ opt.complete = function() {
+ if ( jQuery.isFunction( opt.old ) ) {
+ opt.old.call( this );
+ }
+
+ if ( opt.queue ) {
+ jQuery.dequeue( this, opt.queue );
+ }
+ };
+
+ return opt;
+};
+
+jQuery.easing = {
+ linear: function( p ) {
+ return p;
+ },
+ swing: function( p ) {
+ return 0.5 - Math.cos( p*Math.PI ) / 2;
+ }
+};
+
+jQuery.timers = [];
+jQuery.fx = Tween.prototype.init;
+jQuery.fx.tick = function() {
+ var timer,
+ timers = jQuery.timers,
+ i = 0;
+
+ fxNow = jQuery.now();
+
+ for ( ; i < timers.length; i++ ) {
+ timer = timers[ i ];
+ // Checks the timer has not already been removed
+ if ( !timer() && timers[ i ] === timer ) {
+ timers.splice( i--, 1 );
+ }
+ }
+
+ if ( !timers.length ) {
+ jQuery.fx.stop();
+ }
+ fxNow = undefined;
+};
+
+jQuery.fx.timer = function( timer ) {
+ if ( timer() && jQuery.timers.push( timer ) ) {
+ jQuery.fx.start();
+ }
+};
+
+jQuery.fx.interval = 13;
+
+jQuery.fx.start = function() {
+ if ( !timerId ) {
+ timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );
+ }
+};
+
+jQuery.fx.stop = function() {
+ clearInterval( timerId );
+ timerId = null;
+};
+
+jQuery.fx.speeds = {
+ slow: 600,
+ fast: 200,
+ // Default speed
+ _default: 400
+};
+
+// Back Compat <1.8 extension point
+jQuery.fx.step = {};
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+ jQuery.expr.filters.animated = function( elem ) {
+ return jQuery.grep(jQuery.timers, function( fn ) {
+ return elem === fn.elem;
+ }).length;
+ };
+}
+jQuery.fn.offset = function( options ) {
+ if ( arguments.length ) {
+ return options === undefined ?
+ this :
+ this.each(function( i ) {
+ jQuery.offset.setOffset( this, options, i );
+ });
+ }
+
+ var docElem, win,
+ box = { top: 0, left: 0 },
+ elem = this[ 0 ],
+ doc = elem && elem.ownerDocument;
+
+ if ( !doc ) {
+ return;
+ }
+
+ docElem = doc.documentElement;
+
+ // Make sure it's not a disconnected DOM node
+ if ( !jQuery.contains( docElem, elem ) ) {
+ return box;
+ }
+
+ // If we don't have gBCR, just use 0,0 rather than error
+ // BlackBerry 5, iOS 3 (original iPhone)
+ if ( typeof elem.getBoundingClientRect !== core_strundefined ) {
+ box = elem.getBoundingClientRect();
+ }
+ win = getWindow( doc );
+ return {
+ top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ),
+ left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )
+ };
+};
+
+jQuery.offset = {
+
+ setOffset: function( elem, options, i ) {
+ var position = jQuery.css( elem, "position" );
+
+ // set position first, in-case top/left are set even on static elem
+ if ( position === "static" ) {
+ elem.style.position = "relative";
+ }
+
+ var curElem = jQuery( elem ),
+ curOffset = curElem.offset(),
+ curCSSTop = jQuery.css( elem, "top" ),
+ curCSSLeft = jQuery.css( elem, "left" ),
+ calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
+ props = {}, curPosition = {}, curTop, curLeft;
+
+ // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
+ if ( calculatePosition ) {
+ curPosition = curElem.position();
+ curTop = curPosition.top;
+ curLeft = curPosition.left;
+ } else {
+ curTop = parseFloat( curCSSTop ) || 0;
+ curLeft = parseFloat( curCSSLeft ) || 0;
+ }
+
+ if ( jQuery.isFunction( options ) ) {
+ options = options.call( elem, i, curOffset );
+ }
+
+ if ( options.top != null ) {
+ props.top = ( options.top - curOffset.top ) + curTop;
+ }
+ if ( options.left != null ) {
+ props.left = ( options.left - curOffset.left ) + curLeft;
+ }
+
+ if ( "using" in options ) {
+ options.using.call( elem, props );
+ } else {
+ curElem.css( props );
+ }
+ }
+};
+
+
+jQuery.fn.extend({
+
+ position: function() {
+ if ( !this[ 0 ] ) {
+ return;
+ }
+
+ var offsetParent, offset,
+ parentOffset = { top: 0, left: 0 },
+ elem = this[ 0 ];
+
+ // fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is its only offset parent
+ if ( jQuery.css( elem, "position" ) === "fixed" ) {
+ // we assume that getBoundingClientRect is available when computed position is fixed
+ offset = elem.getBoundingClientRect();
+ } else {
+ // Get *real* offsetParent
+ offsetParent = this.offsetParent();
+
+ // Get correct offsets
+ offset = this.offset();
+ if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
+ parentOffset = offsetParent.offset();
+ }
+
+ // Add offsetParent borders
+ parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
+ parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
+ }
+
+ // Subtract parent offsets and element margins
+ // note: when an element has margin: auto the offsetLeft and marginLeft
+ // are the same in Safari causing offset.left to incorrectly be 0
+ return {
+ top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
+ left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true)
+ };
+ },
+
+ offsetParent: function() {
+ return this.map(function() {
+ var offsetParent = this.offsetParent || document.documentElement;
+ while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) {
+ offsetParent = offsetParent.offsetParent;
+ }
+ return offsetParent || document.documentElement;
+ });
+ }
+});
+
+
+// Create scrollLeft and scrollTop methods
+jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) {
+ var top = /Y/.test( prop );
+
+ jQuery.fn[ method ] = function( val ) {
+ return jQuery.access( this, function( elem, method, val ) {
+ var win = getWindow( elem );
+
+ if ( val === undefined ) {
+ return win ? (prop in win) ? win[ prop ] :
+ win.document.documentElement[ method ] :
+ elem[ method ];
+ }
+
+ if ( win ) {
+ win.scrollTo(
+ !top ? val : jQuery( win ).scrollLeft(),
+ top ? val : jQuery( win ).scrollTop()
+ );
+
+ } else {
+ elem[ method ] = val;
+ }
+ }, method, val, arguments.length, null );
+ };
+});
+
+function getWindow( elem ) {
+ return jQuery.isWindow( elem ) ?
+ elem :
+ elem.nodeType === 9 ?
+ elem.defaultView || elem.parentWindow :
+ false;
+}
+// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
+jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
+ jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
+ // margin is only for outerHeight, outerWidth
+ jQuery.fn[ funcName ] = function( margin, value ) {
+ var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
+ extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
+
+ return jQuery.access( this, function( elem, type, value ) {
+ var doc;
+
+ if ( jQuery.isWindow( elem ) ) {
+ // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
+ // isn't a whole lot we can do. See pull request at this URL for discussion:
+ // https://github.com/jquery/jquery/pull/764
+ return elem.document.documentElement[ "client" + name ];
+ }
+
+ // Get document width or height
+ if ( elem.nodeType === 9 ) {
+ doc = elem.documentElement;
+
+ // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
+ // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
+ return Math.max(
+ elem.body[ "scroll" + name ], doc[ "scroll" + name ],
+ elem.body[ "offset" + name ], doc[ "offset" + name ],
+ doc[ "client" + name ]
+ );
+ }
+
+ return value === undefined ?
+ // Get width or height on the element, requesting but not forcing parseFloat
+ jQuery.css( elem, type, extra ) :
+
+ // Set width or height on the element
+ jQuery.style( elem, type, value, extra );
+ }, type, chainable ? margin : undefined, chainable, null );
+ };
+ });
+});
+// Limit scope pollution from any deprecated API
+// (function() {
+
+// })();
+// Expose jQuery to the global object
+window.jQuery = window.$ = jQuery;
+
+// Expose jQuery as an AMD module, but only for AMD loaders that
+// understand the issues with loading multiple versions of jQuery
+// in a page that all might call define(). The loader will indicate
+// they have special allowances for multiple jQuery versions by
+// specifying define.amd.jQuery = true. Register as a named module,
+// since jQuery can be concatenated with other files that may use define,
+// but not use a proper concatenation script that understands anonymous
+// AMD modules. A named AMD is safest and most robust way to register.
+// Lowercase jquery is used because AMD module names are derived from
+// file names, and jQuery is normally delivered in a lowercase file name.
+// Do this after creating the global so that if an AMD module wants to call
+// noConflict to hide this version of jQuery, it will work.
+if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
+ define( "jquery", [], function () { return jQuery; } );
+}
+
+})( window ); \ No newline at end of file
diff --git a/templates/assets/tether/docs/welcome/js/log.js b/templates/assets/tether/docs/welcome/js/log.js
new file mode 100644
index 0000000..6acd4fd
--- /dev/null
+++ b/templates/assets/tether/docs/welcome/js/log.js
@@ -0,0 +1,134 @@
+(function() {
+ var ffSupport, formats, getOrderedMatches, hasMatches, isFF, isIE, isOpera, isSafari, log, makeArray, operaSupport, safariSupport, stringToArgs, _log;
+ if (!(window.console && window.console.log)) {
+ return;
+ }
+ log = function() {
+ var args;
+ args = [];
+ makeArray(arguments).forEach(function(arg) {
+ if (typeof arg === 'string') {
+ return args = args.concat(stringToArgs(arg));
+ } else {
+ return args.push(arg);
+ }
+ });
+ return _log.apply(window, args);
+ };
+ _log = function() {
+ return console.log.apply(console, makeArray(arguments));
+ };
+ makeArray = function(arrayLikeThing) {
+ return Array.prototype.slice.call(arrayLikeThing);
+ };
+ formats = [
+ {
+ regex: /\*([^\*]+)\*/,
+ replacer: function(m, p1) {
+ return "%c" + p1 + "%c";
+ },
+ styles: function() {
+ return ['font-style: italic', ''];
+ }
+ }, {
+ regex: /\_([^\_]+)\_/,
+ replacer: function(m, p1) {
+ return "%c" + p1 + "%c";
+ },
+ styles: function() {
+ return ['font-weight: bold', ''];
+ }
+ }, {
+ regex: /\`([^\`]+)\`/,
+ replacer: function(m, p1) {
+ return "%c" + p1 + "%c";
+ },
+ styles: function() {
+ return ['background: rgb(255, 255, 219); padding: 1px 5px; border: 1px solid rgba(0, 0, 0, 0.1)', ''];
+ }
+ }, {
+ regex: /\[c\=(?:\"|\')?((?:(?!(?:\"|\')\]).)*)(?:\"|\')?\]((?:(?!\[c\]).)*)\[c\]/,
+ replacer: function(m, p1, p2) {
+ return "%c" + p2 + "%c";
+ },
+ styles: function(match) {
+ return [match[1], ''];
+ }
+ }
+ ];
+ hasMatches = function(str) {
+ var _hasMatches;
+ _hasMatches = false;
+ formats.forEach(function(format) {
+ if (format.regex.test(str)) {
+ return _hasMatches = true;
+ }
+ });
+ return _hasMatches;
+ };
+ getOrderedMatches = function(str) {
+ var matches;
+ matches = [];
+ formats.forEach(function(format) {
+ var match;
+ match = str.match(format.regex);
+ if (match) {
+ return matches.push({
+ format: format,
+ match: match
+ });
+ }
+ });
+ return matches.sort(function(a, b) {
+ return a.match.index - b.match.index;
+ });
+ };
+ stringToArgs = function(str) {
+ var firstMatch, matches, styles;
+ styles = [];
+ while (hasMatches(str)) {
+ matches = getOrderedMatches(str);
+ firstMatch = matches[0];
+ str = str.replace(firstMatch.format.regex, firstMatch.format.replacer);
+ styles = styles.concat(firstMatch.format.styles(firstMatch.match));
+ }
+ return [str].concat(styles);
+ };
+ isSafari = function() {
+ return /Safari/.test(navigator.userAgent) && /Apple Computer/.test(navigator.vendor);
+ };
+ isOpera = function() {
+ return /OPR/.test(navigator.userAgent) && /Opera/.test(navigator.vendor);
+ };
+ isFF = function() {
+ return /Firefox/.test(navigator.userAgent);
+ };
+ isIE = function() {
+ return /MSIE/.test(navigator.userAgent);
+ };
+ safariSupport = function() {
+ var m;
+ m = navigator.userAgent.match(/AppleWebKit\/(\d+)\.(\d+)(\.|\+|\s)/);
+ if (!m) {
+ return false;
+ }
+ return 537.38 <= parseInt(m[1], 10) + (parseInt(m[2], 10) / 100);
+ };
+ operaSupport = function() {
+ var m;
+ m = navigator.userAgent.match(/OPR\/(\d+)\./);
+ if (!m) {
+ return false;
+ }
+ return 15 <= parseInt(m[1], 10);
+ };
+ ffSupport = function() {
+ return window.console.firebug || window.console.exception;
+ };
+ if (isIE() || (isFF() && !ffSupport()) || (isOpera() && !operaSupport()) || (isSafari() && !safariSupport())) {
+ window.log = _log;
+ } else {
+ window.log = log;
+ }
+ window.log.l = _log;
+}).call(this); \ No newline at end of file
diff --git a/templates/assets/tether/docs/welcome/js/tether-v0.1.3.js b/templates/assets/tether/docs/welcome/js/tether-v0.1.3.js
new file mode 100644
index 0000000..98af16f
--- /dev/null
+++ b/templates/assets/tether/docs/welcome/js/tether-v0.1.3.js
@@ -0,0 +1,2 @@
+/*! tether.js 0.1.3 */
+(function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r=[].slice,s=function(a,b){return function(){return a.apply(b,arguments)}};a=jQuery,l=/msie [\w.]+/.test(navigator.userAgent.toLowerCase()),k=function(b){var c,d;return c=b.css("position"),"fixed"===c?b:(d=void 0,d="absolute"===c||l&&("static"===c||"relative"===c)?b.parents().filter(function(){var b;return("relative"===(b=a.css(this,"position"))||"absolute"===b||"fixed"===b)&&/(auto|scroll)/.test(a.css(this,"overflow")+a.css(this,"overflow-y")+a.css(this,"overflow-x"))}).first():b.parents().filter(function(){return/(auto|scroll)/.test(a.css(this,"overflow")+a.css(this,"overflow-y")+a.css(this,"overflow-x"))}).first(),d.length?d:a("html"))},b=16,j=function(a,c){var d;return null==c&&(c=b),d=!1,function(){var b,e=this;if(!d)return b=arguments,d=!0,setTimeout(function(){return d=!1,a.apply(e,b)},c),!0}},q=[],p=function(){var a,b,c;for(b=0,c=q.length;c>b;b++)a=q[b],a.position();return!0},l&&(p=j(p)),a(window).on("resize scroll",p),c={center:"center",left:"right",right:"left"},d={middle:"middle",top:"bottom",bottom:"top"},e={top:"0",left:"0",middle:"50%",center:"50%",bottom:"100%",right:"100%"},i=function(a,b){var e,f;return e=a.left,f=a.top,"auto"===e&&(e=c[b.left]),"auto"===f&&(f=d[b.top]),{left:e,top:f}},h=function(a){var b,c;return{left:null!=(b=e[a.left])?b:a.left,top:null!=(c=e[a.top])?c:a.top}},g=function(){var a,b,c,d,e,f,g;for(b=1<=arguments.length?r.call(arguments,0):[],c={top:0,left:0},e=0,f=b.length;f>e;e++)g=b[e],d=g.top,a=g.left,"string"==typeof d&&(d=parseFloat(d,10)),"string"==typeof a&&(a=parseFloat(a,10)),c.top+=d,c.left+=a;return c},m=function(b,c){return"string"==typeof b.left&&-1!==b.left.indexOf("%")&&(b.left=parseFloat(b.left,10)/100*a(c).outerWidth()),"string"==typeof b.top&&-1!==b.top.indexOf("%")&&(b.top=parseFloat(b.top,10)/100*a(c).outerHeight()),b},n=o=function(a){var b,c,d;return d=a.split(" "),c=d[0],b=d[1],{top:c,left:b}},f=function(){function b(a){this.position=s(this.position,this);var c,d,e,f,g;for(q.push(this),this.history=[],this.setOptions(a,!1),f=b.modules,d=0,e=f.length;e>d;d++)c=f[d],null!=(g=c.initialize)&&g.call(this);this.position()}return b.modules=[],b.prototype.setOptions=function(b,c){var d,e;return this.options=b,null==c&&(c=!0),d={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto"},this.options=a.extend(d,this.options),e=this.options,this.element=e.element,this.target=e.target,this.element.jquery&&(this.$element=this.element,this.element=this.element[0]),this.target.jquery&&(this.$target=this.target,this.target=this.target[0]),null==this.$element&&(this.$element=a(this.element)),null==this.$target&&(this.$target=a(this.target)),this.$element.addClass("tether-element"),this.$target.addClass("tether-target"),this.targetAttachment=n(this.options.targetAttachment),this.attachment=n(this.options.attachment),this.offset=o(this.options.offset),this.targetOffset=o(this.options.targetOffset),null!=this.scrollParent&&this.disable(),this.scrollParent=k(a(this.target)),this.options.enabled!==!1?this.enable(c):void 0},b.prototype.enable=function(a){return null==a&&(a=!0),this.addClass("tether-enabled"),this.enabled=!0,this.scrollParent.on("scroll",this.position),a?this.position():void 0},b.prototype.disable=function(){return this.removeClass("tether-enabled"),this.enabled=!1,null!=this.scrollParent?this.scrollParent.off("scroll",this.position):void 0},b.prototype.destroy=function(){var a,b,c,d,e;for(this.disable(),e=[],a=c=0,d=q.length;d>c;a=++c){if(b=q[a],b===this){q.splice(a,1);break}e.push(void 0)}return e},b.prototype.updateAttachClasses=function(a,b){var c,d,e,f,g,h;for(null==a&&(a=this.attachment),null==b&&(b=this.targetAttachment),d=["left","top","bottom","right","middle","center"],e=0,g=d.length;g>e;e++)c=d[e],this.removeClass("tether-element-attached-"+c);for(a.top&&this.addClass("tether-element-attached-"+a.top),a.left&&this.addClass("tether-element-attached-"+a.left),f=0,h=d.length;h>f;f++)c=d[f],this.removeClass("tether-target-attached-"+c);return b.top&&this.addClass("tether-target-attached-"+b.top),b.left?this.addClass("tether-target-attached-"+b.left):void 0},b.prototype.addClass=function(a){return this.$element.addClass(a),this.$target.addClass(a)},b.prototype.removeClass=function(a){return this.$element.removeClass(a),this.$target.removeClass(a)},b.prototype.position=function(){var a,c,d,e,f,j,k,l,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F;if(this.enabled){for(u=i(this.targetAttachment,this.attachment),this.updateAttachClasses(this.attachment,u),n=m(h(this.attachment),this.element),v=m(h(u),this.target),f=m(this.offset,this.element),j=m(this.targetOffset,this.target),n=g(n,f),v=g(v,j),w=this.$target.offset(),c=this.$element.offset(),e=w.left+v.left-n.left,x=w.top+v.top-n.top,D=b.modules,z=0,B=D.length;B>z;z++)if(k=D[z],q=k.position.call(this,{left:e,top:x,targetAttachment:u,targetPos:w,elementPos:c,offset:n,targetOffset:v,manualOffset:f,manualTargetOffset:j}),null!=q&&"object"==typeof q){if(q===!1)return!1;x=q.top,e=q.left}if(y=this.$element.outerWidth(),d=this.$element.outerHeight(),l={page:{top:x,bottom:document.body.scrollHeight-x-d,left:e,right:document.body.scrollWidth-e-y},viewport:{top:x-pageYOffset,bottom:pageYOffset-x-d+innerHeight,left:e-pageXOffset,right:pageXOffset-e-y+innerWidth}},(null!=(E=this.options.optimizations)?E.moveElement:void 0)!==!1){for(a=this.$target.offsetParent(),p=a.offset(),o={},F=["top","left","bottom","right"],A=0,C=F.length;C>A;A++)t=F[A],o[t]=parseFloat(a.css("border-"+t+"-width"));p.left+=o.left,p.top+=o.top,p.right=document.body.scrollWidth-p.left-a.width(),p.bottom=document.body.scrollHeight-p.top-a.height(),l.page.top>=p.top&&l.page.bottom>=p.bottom&&l.page.left>=p.left&&l.page.right>=p.right&&(s=a.scrollTop(),r=a.scrollLeft(),l.offset={top:l.page.top-p.top+s+o.top,left:l.page.left-p.left+r+o.left,right:l.page.right-p.right-r+o.right,bottom:l.page.bottom-p.bottom-s+o.bottom})}return this.move(l),this.history.unshift(l),this.history.length>3&&this.history.pop(),!0}},b.prototype.move=function(b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;j={};for(m in b){j[m]={};for(f in b[m]){for(e=!1,t=this.history,p=0,r=t.length;r>p;p++)if(i=t[p],(null!=(u=i[m])?u[f]:void 0)!==b[m][f]){e=!0;break}e||(j[m][f]=!0)}}if(d={top:"",left:"",right:"",bottom:""},l=function(a,b){return a.top?d.top=""+b.top+"px":d.bottom=""+b.bottom+"px",a.left?d.left=""+b.left+"px":d.right=""+b.right+"px"},g=!1,(j.page.top||j.page.bottom)&&(j.page.left||j.page.right))d.position="absolute",l(j.page,b.page);else if((j.viewport.top||j.viewport.bottom)&&(j.viewport.left||j.viewport.right))d.position="fixed",l(j.viewport,b.viewport);else if(null!=j.offset&&(j.offset.top||j.offset.bottom)&&(j.offset.left||j.offset.right)){for(d.position="absolute",c=this.$target.offsetParent(),this.$element.offsetParent()[0]!==c[0]&&(this.$element.detach(),c.append(this.$element)),h=a.extend({},b.offset),v=["top","left","bottom","right"],q=0,s=v.length;s>q;q++)k=v[q],h[k]-=parseFloat(c.css("border-"+k+"-width"),10);l(j.offset,h),g=!0}else d.position="absolute",d.top=""+b.page.top+"px",d.left=""+b.page.left+"px";g||this.$element.parent().is("body")||(this.$element.detach(),a(document.body).append(this.$element)),o=!1;for(f in d)if(n=d[f],this.$element.css(f)!==n){o=!0;break}return o?this.$element.css(d):void 0},b}(),window.Tether=f}).call(this),function(){var a,b,c,d,e=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};a=jQuery,c={left:"right",right:"left",top:"bottom",bottom:"top",middle:"middle"},b=["left","top","right","bottom"],d=function(c,d){var e,f,g,h,i,j;if("scrollParent"===d?d=c.scrollParent[0]:"window"===d&&(d=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),null!=d.nodeType)for(e=a(d),g=e.offset(),d=[g.left,g.top,e.width()+g.left,e.height()+g.top],f=i=0,j=b.length;j>i;f=++i)h=b[f],d[f]+=parseFloat(e.css("border-"+h+"-width"),10);return d},Tether.modules.push({position:function(c){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T=this;if(C=c.top,n=c.left,y=c.targetAttachment,this.options.constraints){for(u=function(a){var c,d,e,f;for(T.removeClass(a),f=[],d=0,e=b.length;e>d;d++)c=b[d],f.push(T.removeClass(""+a+"-"+c));return f},m=this.$element.outerHeight(),D=this.$element.outerWidth(),z=this.$target.outerHeight(),A=this.$target.outerWidth(),x={},l={},v=["tether-pinned","tether-out-of-bounds"],O=this.options.constraints,E=0,I=O.length;I>E;E++)k=O[E],k.outOfBoundsClass&&v.push(k.outOfBoundsClass),k.pinnedClass&&v.push(k.pinnedClass);for(F=0,J=v.length;J>F;F++)j=v[F],u(j);for(x=a.extend({},y),l=a.extend({},this.attachment),P=this.options.constraints,G=0,K=P.length;K>G;G++){if(k=P[G],B=k.to,f=k.attachment,r=k.pin,null==f&&(f=""),e.call(f," ")>=0?(Q=f.split(" "),i=Q[0],h=Q[1]):h=i=f,g=d(this,B),("target"===i||"both"===i)&&(C<g[1]&&"top"===x.top&&(C+=z,x.top="bottom"),C+m>g[3]&&"bottom"===x.top&&(C-=z,x.top="top")),"together"===i&&(C<g[1]&&"top"===x.top&&("bottom"===l.top?(C+=z,x.top="bottom",C+=m,l.top="top"):"top"===l.top&&(C+=z,x.top="bottom",C-=m,l.top="bottom")),C+m>g[3]&&"bottom"===x.top&&("top"===l.top?(C-=z,x.top="top",C-=m,l.top="bottom"):"bottom"===l.top&&(C-=z,x.top="top",C+=m,l.top="top"))),("target"===h||"both"===h)&&(n<g[0]&&"left"===x.left&&(n+=A,x.left="right"),n+D>g[2]&&"right"===x.left&&(n-=A,x.left="left")),"together"===h&&(n<g[0]&&"left"===x.left?"right"===l.left?(n+=A,x.left="right",n+=D,l.left="left"):"left"===l.left&&(n+=A,x.left="right",n-=D,l.left="right"):n+D>g[2]&&"right"===x.left&&("left"===l.left?(n-=A,x.left="left",n-=D,l.left="right"):"right"===l.left&&(n-=A,x.left="left",n+=D,l.left="left"))),("element"===i||"both"===i)&&(C<g[1]&&"bottom"===l.top&&(C+=m,l.top="top"),C+m>g[3]&&"top"===l.top&&(C-=m,l.top="bottom")),("element"===h||"both"===h)&&(n<g[0]&&"right"===l.left&&(n+=D,l.left="left"),n+D>g[2]&&"left"===l.left&&(n-=D,l.left="right")),"string"==typeof r?r=function(){var a,b,c,d;for(c=r.split(","),d=[],a=0,b=c.length;b>a;a++)q=c[a],d.push(q.trim());return d}():r===!0&&(r=["top","left","right","bottom"]),r||(r=[]),s=[],o=[],C<g[1]&&(e.call(r,"top")>=0?(C=g[1],s.push("top")):o.push("top")),C+m>g[3]&&(e.call(r,"bottom")>=0?(C=g[3]-m,s.push("bottom")):o.push("bottom")),n<g[0]&&(e.call(r,"left")>=0?(n=g[0],s.push("left")):o.push("left")),n+D>g[2]&&(e.call(r,"right")>=0?(n=g[2]-D,s.push("right")):o.push("right")),s.length)for(t=null!=(R=this.options.pinnedClass)?R:"tether-pinned",this.addClass(t),H=0,L=s.length;L>H;H++)w=s[H],this.addClass(""+t+"-"+w);if(o.length)for(p=null!=(S=this.options.outOfBoundsClass)?S:"tether-out-of-bounds",this.addClass(p),N=0,M=o.length;M>N;N++)w=o[N],this.addClass(""+p+"-"+w);(e.call(s,"left")>=0||e.call(s,"right")>=0)&&(l.left=x.left=!1),(e.call(s,"top")>=0||e.call(s,"bottom")>=0)&&(l.top=x.top=!1),(x.top!==y.top||x.left!==y.left||l.top!==this.attachment.top||l.left!==this.attachment.left)&&this.updateAttachClasses(l,x)}return{top:C,left:n}}}})}.call(this),function(){var a;a=jQuery,Tether.modules.push({position:function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y;if(l=a.top,e=a.left,d=this.$element.outerHeight(),m=this.$element.outerWidth(),i=this.$target.outerHeight(),k=this.$target.outerWidth(),j=this.$target.offset(),j.bottom=j.top+i,j.right=j.left+k,c=l+d,f=e+m,b=[],l<=j.bottom&&c>=j.top)for(v=["left","right"],n=0,r=v.length;r>n;n++)g=v[n],((w=j[g])===e||w===f)&&b.push(g);if(e<=j.right&&f>=j.left)for(x=["top","bottom"],o=0,s=x.length;s>o;o++)g=x[o],((y=j[g])===l||y===c)&&b.push(g);for(h=["left","top","right","bottom"],this.removeClass("tether-abutted"),p=0,t=h.length;t>p;p++)g=h[p],this.removeClass("tether-abutted-"+g);for(b.length&&this.addClass("tether-abutted"),q=0,u=b.length;u>q;q++)g=b[q],this.addClass("tether-abutted-"+g);return!0}})}.call(this),function(){Tether.modules.push({position:function(a){var b,c,d,e,f,g,h;return g=a.top,b=a.left,this.options.shift?(c=function(a){return"function"==typeof a?a.call(this,{top:g,left:b}):a},d=c(this.options.shift),"string"==typeof d?(d=d.split(" "),d[1]||(d[1]=d[0]),f=d[0],e=d[1],f=parseFloat(f,10),e=parseFloat(e,10)):(h=[d.top,d.left],f=h[0],e=h[1]),g+=f,b+=e,{top:g,left:b}):void 0}})}.call(this); \ No newline at end of file
diff --git a/templates/assets/tether/docs/welcome/js/welcome.js b/templates/assets/tether/docs/welcome/js/welcome.js
new file mode 100644
index 0000000..6f587e6
--- /dev/null
+++ b/templates/assets/tether/docs/welcome/js/welcome.js
@@ -0,0 +1,193 @@
+(function() {
+ var init, isMobile, setupBrowserDemo, setupHero, _Drop;
+
+ _Drop = Drop.createContext({
+ classPrefix: 'tether'
+ });
+
+ isMobile = $(window).width() < 567;
+
+ init = function() {
+ setupHero();
+ return setupBrowserDemo();
+ };
+
+ setupHero = function() {
+ var $target, finalDropState, frameLengthMS, frames, openAllDrops, openIndex, openNextDrop, position, positions, _i, _len;
+ $target = $('.tether-target-demo');
+ positions = ['top left', 'left top', 'left middle', 'left bottom', 'bottom left', 'bottom center', 'bottom right', 'right bottom', 'right middle', 'right top', 'top right', 'top center'];
+ if (isMobile) {
+ positions = ['top left', 'bottom left', 'bottom right', 'top right'];
+ }
+ window.drops = {};
+ for (_i = 0, _len = positions.length; _i < _len; _i++) {
+ position = positions[_i];
+ drops[position] = new _Drop({
+ target: $target[0],
+ classes: 'tether-theme-arrows-dark',
+ position: position,
+ constrainToWindow: false,
+ openOn: '',
+ content: '<div style="height: 50px; width: 50px"></div>'
+ });
+ }
+ openIndex = 0;
+ frames = 0;
+ frameLengthMS = 10;
+ openAllDrops = function() {
+ var drop, _results;
+ _results = [];
+ for (position in drops) {
+ drop = drops[position];
+ _results.push(drop.open());
+ }
+ return _results;
+ };
+ openNextDrop = function() {
+ var drop;
+ for (position in drops) {
+ drop = drops[position];
+ drop.close();
+ }
+ drops[positions[openIndex]].open();
+ drops[positions[(openIndex + 6) % positions.length]].open();
+ openIndex = (openIndex + 1) % positions.length;
+ if (frames > 5) {
+ finalDropState();
+ return;
+ }
+ frames += 1;
+ return setTimeout(openNextDrop, frameLengthMS * frames);
+ };
+ finalDropState = function() {
+ $(drops['top left'].dropContent).html('Marrying DOM elements for life.');
+ $(drops['bottom right'].dropContent).html('<a class="button" href="http://github.com/HubSpot/tether">★ On Github</a>');
+ drops['top left'].open();
+ return drops['bottom right'].open();
+ };
+ if (true || isMobile) {
+ drops['top left'].open();
+ drops['top left'].tether.position();
+ drops['bottom right'].open();
+ drops['bottom right'].tether.position();
+ return finalDropState();
+ } else {
+ return openNextDrop();
+ }
+ };
+
+ setupBrowserDemo = function() {
+ var $browserContents, $browserDemo, $iframe, $sections, $startPoint, $stopPoint, scrollInterval, scrollTop, scrollTopDirection, setSection;
+ $browserDemo = $('.browser-demo.showcase');
+ $startPoint = $('.browser-demo-start-point');
+ $stopPoint = $('.browser-demo-stop-point');
+ $iframe = $('.browser-window iframe');
+ $browserContents = $('.browser-content .browser-demo-inner');
+ $sections = $('.browser-demo-section');
+ $('body').append("<style>\n table.showcase.browser-demo.fixed-bottom {\n top: " + $sections.length + "00%\n }\n</style>");
+ $(window).scroll(function() {
+ var scrollTop;
+ scrollTop = $(window).scrollTop();
+ if ($startPoint.position().top < scrollTop && scrollTop + window.innerHeight < $stopPoint.position().top) {
+ $browserDemo.removeClass('fixed-bottom');
+ $browserDemo.addClass('fixed');
+ return $sections.each(function() {
+ var $section;
+ $section = $(this);
+ if (($section.position().top < scrollTop && scrollTop < $section.position().top + $section.outerHeight())) {
+ setSection($section.data('section'));
+ }
+ return true;
+ });
+ } else {
+ $browserDemo.removeAttr('data-section');
+ $browserDemo.removeClass('fixed');
+ if (scrollTop + window.innerHeight > $stopPoint.position().top) {
+ return $browserDemo.addClass('fixed-bottom');
+ } else {
+ return $browserDemo.removeClass('fixed-bottom');
+ }
+ }
+ });
+ $iframe.load(function() {
+ var $items, iframeWindow;
+ iframeWindow = $iframe[0].contentWindow;
+ $items = $iframe.contents().find('.item');
+ return $items.each(function(i) {
+ var $item, drop, _iframeWindowDrop;
+ $item = $(this);
+ _iframeWindowDrop = iframeWindow.Drop.createContext({
+ classPrefix: 'tether'
+ });
+ drop = new _iframeWindowDrop({
+ target: $item[0],
+ classes: 'tether-theme-arrows-dark',
+ position: 'right top',
+ constrainToWindow: true,
+ openOn: 'click',
+ content: '<ul>\n <li>Action&nbsp;1</li>\n <li>Action&nbsp;2</li>\n <li>Action&nbsp;3</li>\n</ul>'
+ });
+ return $item.data('drop', drop);
+ });
+ });
+ scrollInterval = void 0;
+ scrollTop = 0;
+ scrollTopDirection = 1;
+ return setSection = function(section) {
+ var closeAllItems, openExampleItem, scrollLeftSection, stopScrollingLeftSection;
+ $browserDemo.attr('data-section', section);
+ $('.section-copy').removeClass('active');
+ $(".section-copy[data-section=\"" + section + "\"]").addClass('active');
+ openExampleItem = function() {
+ if (isMobile) {
+ return $iframe.contents().find('.item:first').data().drop.open();
+ } else {
+ return $iframe.contents().find('.item:eq(2)').data().drop.open();
+ }
+ };
+ closeAllItems = function() {
+ return $iframe.contents().find('.item').each(function() {
+ return $(this).data().drop.close() || true;
+ });
+ };
+ scrollLeftSection = function() {
+ return scrollInterval = setInterval(function() {
+ $iframe.contents().find('.left').scrollTop(scrollTop);
+ scrollTop += scrollTopDirection;
+ if (scrollTop > 50) {
+ scrollTopDirection = -1;
+ }
+ if (scrollTop < 0) {
+ return scrollTopDirection = 1;
+ }
+ }, 30);
+ };
+ stopScrollingLeftSection = function() {
+ return clearInterval(scrollInterval);
+ };
+ switch (section) {
+ case 'what':
+ closeAllItems();
+ openExampleItem();
+ return stopScrollingLeftSection();
+ case 'how':
+ closeAllItems();
+ openExampleItem();
+ stopScrollingLeftSection();
+ return scrollLeftSection();
+ case 'why':
+ closeAllItems();
+ openExampleItem();
+ stopScrollingLeftSection();
+ return scrollLeftSection();
+ case 'outro':
+ closeAllItems();
+ openExampleItem();
+ return stopScrollingLeftSection();
+ }
+ };
+ };
+
+ init();
+
+}).call(this);
diff --git a/templates/assets/tether/docs/welcome/sass/_inline-block.sass b/templates/assets/tether/docs/welcome/sass/_inline-block.sass
new file mode 100644
index 0000000..544a085
--- /dev/null
+++ b/templates/assets/tether/docs/welcome/sass/_inline-block.sass
@@ -0,0 +1,6 @@
+@mixin inline-block
+ display: inline-block
+ vertical-align: middle
+ *vertical-align: auto
+ *zoom: 1
+ *display: inline
diff --git a/templates/assets/tether/docs/welcome/sass/browser-demo.sass b/templates/assets/tether/docs/welcome/sass/browser-demo.sass
new file mode 100644
index 0000000..2073798
--- /dev/null
+++ b/templates/assets/tether/docs/welcome/sass/browser-demo.sass
@@ -0,0 +1,93 @@
+@import inline-block
+
+html, body
+ height: 100%
+ overflow: hidden
+ font-family: "proxima-nova", sans-serif
+
+.tether.tether-theme-arrows-dark .tether-content
+ filter: none
+ background: #000
+
+ ul
+ color: #fff
+ list-style: none
+ padding: 0
+ margin: 0
+
+.tether.tether-theme-arrows-dark.tether-element-attached-top.tether-element-attached-left.tether-target-attached-right .tether-content:before
+ border-right-color: #000
+
+.browser-demo
+ position: absolute
+ top: 0
+ left: 0
+ bottom: 0
+ right: 0
+
+ *, *:after, *:before
+ box-sizing: border-box
+
+ .top
+ position: absolute
+ height: 60px
+ padding: 20px
+ line-height: 40px
+ width: 100%
+ border-bottom: 1px solid rgba(0, 0, 0, .1)
+
+ .bottom
+ position: absolute
+ top: 60px
+ bottom: 0
+ width: 100%
+
+ .left
+ border-right: 1px solid rgba(0, 0, 0, .1)
+ position: absolute
+ width: 30%
+ height: 100%
+ overflow: auto
+
+ .item
+ height: 64px
+ border-bottom: 1px solid rgba(0, 0, 0, .1)
+ cursor: pointer
+
+ &:hover, &.tether-open
+ background: rgba(0, 0, 0, .1)
+ border-bottom: 1px solid rgba(0, 0, 0, 0)
+
+ &:last-child
+ border-bottom: 0
+
+ .right
+ position: absolute
+ width: 70%
+ right: 0
+ height: 100%
+ padding: 20px
+
+ .title
+ +inline-block
+ background: rgba(0, 0, 0, .1)
+ width: 150px
+ height: 15px
+ margin-bottom: 20px
+
+ .word
+ +inline-block
+ background: rgba(0, 0, 0, .1)
+ width: 50px
+ height: 8px
+ margin-right: 5px
+ margin-bottom: 5px
+
+ &:nth-last-child(4n+1)
+ width: 73px
+
+ &:nth-last-child(10n+1)
+ width: 14px
+
+ &:nth-last-child(9n+1)
+ width: 80px
diff --git a/templates/assets/tether/docs/welcome/sass/welcome.sass b/templates/assets/tether/docs/welcome/sass/welcome.sass
new file mode 100644
index 0000000..9299212
--- /dev/null
+++ b/templates/assets/tether/docs/welcome/sass/welcome.sass
@@ -0,0 +1,285 @@
+@import inline-block
+
+html, body
+ height: 100%
+
+body
+ margin: 0
+ font-family: "proxima-nova", "Helvetica Neue", sans-serif
+
+.button
+ display: inline-block
+ border: 2px solid #333
+ color: #333
+ padding: 1em 1.25em
+ font-weight: 500
+ text-transform: uppercase
+ letter-spacing: 3px
+ text-decoration: none
+ cursor: pointer
+ width: 140px
+ font-size: .8em
+ line-height: 1.3em
+ text-align: center
+
+.tether-element.tether-theme-arrows-dark .tether-content
+ padding: 1em
+ font-size: 1.1em
+
+ .button
+ border-color: #fff
+ color: #fff
+ width: 170px
+ pointer-events: all
+
+.mobile-copy
+ display: none
+
+ @media (max-width: 568px)
+ display: block
+
+.button.dark
+ background: #333
+ color: #fff
+
+.hero-wrap
+ height: 100%
+ overflow: hidden
+
+table.showcase
+ height: 100%
+ width: 100%
+ position: relative
+
+ &:after
+ content: ""
+ display: block
+ position: absolute
+ left: 0
+ right: 0
+ bottom: 20px
+ margin: auto
+ height: 0
+ width: 0
+ border-width: 18px
+ border-style: solid
+ border-color: transparent
+ border-top-color: rgba(0, 0, 0, 0.2)
+
+ &.no-next-arrow:after
+ display: none
+
+ .showcase-inner
+ margin: 40px auto 60px
+ padding: 10px
+
+ h1
+ font-size: 50px
+ text-align: center
+ font-weight: 300
+
+ @media (max-width: 567px)
+ font-size: 40px
+
+ h2
+ font-size: 24px
+ text-align: center
+ font-weight: 300
+ margin: 1em 0 1em
+
+ @media (max-width: 567px)
+ font-size: 14px
+
+ p
+ text-align: center
+
+ &.hero
+ text-align: center
+
+ .tether-target-demo
+ +inline-block
+ border: 2px dotted #000
+ margin: 5rem auto
+ padding: 5rem
+
+ @media (max-width: 567px)
+ padding: 1rem
+
+ &.share
+ background: #f3f3f3
+
+ &.projects-showcase .showcase-inner
+
+ .projects-list
+ width: 80%
+ max-width: 1200px
+ margin: 0 auto
+
+ .project
+ color: inherit
+ text-decoration: none
+ position: relative
+ width: 50%
+ float: left
+ text-align: center
+ margin-bottom: 2rem
+
+ &:nth-child(odd)
+ clear: left
+
+ .os-icon
+ width: 8rem
+ height: 8rem
+ margin-bottom: 1rem
+ background-size: 100%
+
+ h1
+ font-size: 2.5rem
+
+ p
+ font-size: 1.3rem
+
+ &.browser-demo
+ background-image: linear-gradient(top left, #723362 0%, #9d223c 100%)
+ background-color: #9d223c
+ position: absolute
+ top: 100%
+
+ &.fixed
+ position: fixed
+ top: 0
+ bottom: 0
+ left: 0
+ right: 0
+ z-index: 1
+
+ .browser-demo-inner
+ transition: width 2s ease-in-out, height 2s ease-in-out
+
+ // Sections
+
+ &[data-section="what"]
+ box-shadow: 0 0 0 0
+
+ &[data-section="why"]
+
+ .browser-demo-inner
+ width: 70%
+
+ &[data-section="outro"]
+
+ .showcase-inner
+ pointer-events: all
+
+ .showcase-inner
+ pointer-events: none
+ position: absolute
+ left: 10%
+ right: 40%
+ top: 220px
+ bottom: 120px
+ margin: 0
+ padding: 0
+
+ @media (max-width: 567px)
+ bottom: 90px
+ top: 180px
+
+ .browser-demo-inner
+ height: 100%
+ width: 100%
+
+ .section-copy
+ transition: opacity .5s ease-in-out, top .5s ease-in-out
+ opacity: 0
+ position: absolute
+ top: 0
+ position: absolute
+ height: 200px
+ color: #fff
+ text-align: center
+ width: 100%
+
+ &.active
+ opacity: 1
+ top: -150px
+
+ @media (max-width: 567px)
+ top: -130px
+
+ h2
+ font-size: 40px
+ font-weight: bold
+ line-height: 1
+ margin: 25px 0 15px
+
+ @media (max-width: 567px)
+ font-size: 30px
+
+ .browser-window
+ border-radius: 4px
+ background: #fff
+ position: relative
+ height: 100%
+ width: 100%
+ max-width: 1200px
+ margin: 0 auto
+
+ .browser-titlebar
+ position: absolute
+ top: 0
+ left: 0
+ right: 0
+ border-bottom: 1px solid #eee
+ height: 55px
+
+ .browser-dots
+ padding: 16px
+
+ b
+ +inline-block
+ border-radius: 50%
+ width: 10px
+ height: 10px
+ margin-right: 7px
+ background: rgba(0, 0, 0, .1)
+
+ .browser-frame
+ position: absolute
+ top: 55px
+ left: 0
+ right: 0
+ bottom: 0
+
+ iframe
+ border-radius: 0 0 4px 4px
+ border: 0
+ width: 100%
+ height: 100%
+
+ &.browser-demo-section
+
+ .section-scroll-copy
+ position: relative
+ z-index: 10
+ color: #fff
+ width: 100%
+ font-size: 22px
+
+ .section-scroll-copy-inner
+ position: absolute
+ z-index: 10
+ color: #fff
+ right: 10%
+ width: 23%
+
+ a
+ color: inherit
+
+ .example-paragraph
+ border-radius: 4px
+ background: #000
+ padding: 1rem
+
+.browser-content
+ display: none
diff --git a/templates/assets/tether/examples/chosen/chosen-sprite.png b/templates/assets/tether/examples/chosen/chosen-sprite.png
new file mode 100644
index 0000000..3611ae4
--- /dev/null
+++ b/templates/assets/tether/examples/chosen/chosen-sprite.png
Binary files differ
diff --git a/templates/assets/tether/examples/chosen/chosen-sprite@2x.png b/templates/assets/tether/examples/chosen/chosen-sprite@2x.png
new file mode 100644
index 0000000..6b50545
--- /dev/null
+++ b/templates/assets/tether/examples/chosen/chosen-sprite@2x.png
Binary files differ
diff --git a/templates/assets/tether/examples/chosen/chosen.css b/templates/assets/tether/examples/chosen/chosen.css
new file mode 100644
index 0000000..828fe1f
--- /dev/null
+++ b/templates/assets/tether/examples/chosen/chosen.css
@@ -0,0 +1,430 @@
+/* @group Base */
+.chosen-container {
+ position: relative;
+ display: inline-block;
+ vertical-align: middle;
+ font-size: 13px;
+ zoom: 1;
+ *display: inline;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ user-select: none;
+}
+.chosen-container .chosen-drop {
+ position: absolute;
+ top: 100%;
+ left: -9999px;
+ z-index: 1010;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ width: 100%;
+ border: 1px solid #aaa;
+ border-top: 0;
+ background: #fff;
+ box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
+}
+.chosen-container.chosen-with-drop .chosen-drop {
+ left: 0;
+}
+.chosen-container a {
+ cursor: pointer;
+}
+
+/* @end */
+/* @group Single Chosen */
+.chosen-container-single .chosen-single {
+ position: relative;
+ display: block;
+ overflow: hidden;
+ padding: 0 0 0 8px;
+ height: 23px;
+ border: 1px solid #aaa;
+ border-radius: 5px;
+ background-color: #fff;
+ background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #ffffff), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4));
+ background: -webkit-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
+ background: -moz-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
+ background: -o-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
+ background: linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
+ background-clip: padding-box;
+ box-shadow: 0 0 3px white inset, 0 1px 1px rgba(0, 0, 0, 0.1);
+ color: #444;
+ text-decoration: none;
+ white-space: nowrap;
+ line-height: 24px;
+}
+.chosen-container-single .chosen-default {
+ color: #999;
+}
+.chosen-container-single .chosen-single span {
+ display: block;
+ overflow: hidden;
+ margin-right: 26px;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+.chosen-container-single .chosen-single-with-deselect span {
+ margin-right: 38px;
+}
+.chosen-container-single .chosen-single abbr {
+ position: absolute;
+ top: 6px;
+ right: 26px;
+ display: block;
+ width: 12px;
+ height: 12px;
+ background: url('chosen-sprite.png') -42px 1px no-repeat;
+ font-size: 1px;
+}
+.chosen-container-single .chosen-single abbr:hover {
+ background-position: -42px -10px;
+}
+.chosen-container-single.chosen-disabled .chosen-single abbr:hover {
+ background-position: -42px -10px;
+}
+.chosen-container-single .chosen-single div {
+ position: absolute;
+ top: 0;
+ right: 0;
+ display: block;
+ width: 18px;
+ height: 100%;
+}
+.chosen-container-single .chosen-single div b {
+ display: block;
+ width: 100%;
+ height: 100%;
+ background: url('chosen-sprite.png') no-repeat 0px 2px;
+}
+.chosen-container-single .chosen-search {
+ position: relative;
+ z-index: 1010;
+ margin: 0;
+ padding: 3px 4px;
+ white-space: nowrap;
+}
+.chosen-container-single .chosen-search input[type="text"] {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ margin: 1px 0;
+ padding: 4px 20px 4px 5px;
+ width: 100%;
+ height: auto;
+ outline: 0;
+ border: 1px solid #aaa;
+ background: white url('chosen-sprite.png') no-repeat 100% -20px;
+ background: url('chosen-sprite.png') no-repeat 100% -20px, -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
+ background: url('chosen-sprite.png') no-repeat 100% -20px, -webkit-linear-gradient(#eeeeee 1%, #ffffff 15%);
+ background: url('chosen-sprite.png') no-repeat 100% -20px, -moz-linear-gradient(#eeeeee 1%, #ffffff 15%);
+ background: url('chosen-sprite.png') no-repeat 100% -20px, -o-linear-gradient(#eeeeee 1%, #ffffff 15%);
+ background: url('chosen-sprite.png') no-repeat 100% -20px, linear-gradient(#eeeeee 1%, #ffffff 15%);
+ font-size: 1em;
+ font-family: sans-serif;
+ line-height: normal;
+ border-radius: 0;
+}
+.chosen-container-single .chosen-drop {
+ margin-top: -1px;
+ border-radius: 0 0 4px 4px;
+ background-clip: padding-box;
+}
+.chosen-container-single.chosen-container-single-nosearch .chosen-search {
+ position: absolute;
+ left: -9999px;
+}
+
+/* @end */
+/* @group Results */
+.chosen-container .chosen-results {
+ position: relative;
+ overflow-x: hidden;
+ overflow-y: auto;
+ margin: 0 4px 4px 0;
+ padding: 0 0 0 4px;
+ max-height: 240px;
+ -webkit-overflow-scrolling: touch;
+}
+.chosen-container .chosen-results li {
+ display: none;
+ margin: 0;
+ padding: 5px 6px;
+ list-style: none;
+ line-height: 15px;
+}
+.chosen-container .chosen-results li.active-result {
+ display: list-item;
+ cursor: pointer;
+}
+.chosen-container .chosen-results li.disabled-result {
+ display: list-item;
+ color: #ccc;
+ cursor: default;
+}
+.chosen-container .chosen-results li.highlighted {
+ background-color: #3875d7;
+ background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc));
+ background-image: -webkit-linear-gradient(#3875d7 20%, #2a62bc 90%);
+ background-image: -moz-linear-gradient(#3875d7 20%, #2a62bc 90%);
+ background-image: -o-linear-gradient(#3875d7 20%, #2a62bc 90%);
+ background-image: linear-gradient(#3875d7 20%, #2a62bc 90%);
+ color: #fff;
+}
+.chosen-container .chosen-results li.no-results {
+ display: list-item;
+ background: #f4f4f4;
+}
+.chosen-container .chosen-results li.group-result {
+ display: list-item;
+ font-weight: bold;
+ cursor: default;
+}
+.chosen-container .chosen-results li.group-option {
+ padding-left: 15px;
+}
+.chosen-container .chosen-results li em {
+ font-style: normal;
+ text-decoration: underline;
+}
+
+/* @end */
+/* @group Multi Chosen */
+.chosen-container-multi .chosen-choices {
+ position: relative;
+ overflow: hidden;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ margin: 0;
+ padding: 0;
+ width: 100%;
+ height: auto !important;
+ height: 1%;
+ border: 1px solid #aaa;
+ background-color: #fff;
+ background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
+ background-image: -webkit-linear-gradient(#eeeeee 1%, #ffffff 15%);
+ background-image: -moz-linear-gradient(#eeeeee 1%, #ffffff 15%);
+ background-image: -o-linear-gradient(#eeeeee 1%, #ffffff 15%);
+ background-image: linear-gradient(#eeeeee 1%, #ffffff 15%);
+ cursor: text;
+}
+.chosen-container-multi .chosen-choices li {
+ float: left;
+ list-style: none;
+}
+.chosen-container-multi .chosen-choices li.search-field {
+ margin: 0;
+ padding: 0;
+ white-space: nowrap;
+}
+.chosen-container-multi .chosen-choices li.search-field input[type="text"] {
+ margin: 1px 0;
+ padding: 5px;
+ height: 15px;
+ outline: 0;
+ border: 0 !important;
+ background: transparent !important;
+ box-shadow: none;
+ color: #666;
+ font-size: 100%;
+ font-family: sans-serif;
+ line-height: normal;
+ border-radius: 0;
+}
+.chosen-container-multi .chosen-choices li.search-field .default {
+ color: #999;
+}
+.chosen-container-multi .chosen-choices li.search-choice {
+ position: relative;
+ margin: 3px 0 3px 5px;
+ padding: 3px 20px 3px 5px;
+ border: 1px solid #aaa;
+ border-radius: 3px;
+ background-color: #e4e4e4;
+ background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
+ background-image: -webkit-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+ background-image: -moz-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+ background-image: -o-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+ background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+ background-clip: padding-box;
+ box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05);
+ color: #333;
+ line-height: 13px;
+ cursor: default;
+}
+.chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
+ position: absolute;
+ top: 4px;
+ right: 3px;
+ display: block;
+ width: 12px;
+ height: 12px;
+ background: url('chosen-sprite.png') -42px 1px no-repeat;
+ font-size: 1px;
+}
+.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
+ background-position: -42px -10px;
+}
+.chosen-container-multi .chosen-choices li.search-choice-disabled {
+ padding-right: 5px;
+ border: 1px solid #ccc;
+ background-color: #e4e4e4;
+ background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
+ background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+ background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+ background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+ background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+ color: #666;
+}
+.chosen-container-multi .chosen-choices li.search-choice-focus {
+ background: #d4d4d4;
+}
+.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close {
+ background-position: -42px -10px;
+}
+.chosen-container-multi .chosen-results {
+ margin: 0;
+ padding: 0;
+}
+.chosen-container-multi .chosen-drop .result-selected {
+ display: list-item;
+ color: #ccc;
+ cursor: default;
+}
+
+/* @end */
+/* @group Active */
+.chosen-container-active .chosen-single {
+ border: 1px solid #5897fb;
+ box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+}
+.chosen-container-active.chosen-with-drop .chosen-single {
+ border: 1px solid #aaa;
+ -moz-border-radius-bottomright: 0;
+ border-bottom-right-radius: 0;
+ -moz-border-radius-bottomleft: 0;
+ border-bottom-left-radius: 0;
+ background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #eeeeee), color-stop(80%, #ffffff));
+ background-image: -webkit-linear-gradient(#eeeeee 20%, #ffffff 80%);
+ background-image: -moz-linear-gradient(#eeeeee 20%, #ffffff 80%);
+ background-image: -o-linear-gradient(#eeeeee 20%, #ffffff 80%);
+ background-image: linear-gradient(#eeeeee 20%, #ffffff 80%);
+ box-shadow: 0 1px 0 #fff inset;
+}
+.chosen-container-active.chosen-with-drop .chosen-single div {
+ border-left: none;
+ background: transparent;
+}
+.chosen-container-active.chosen-with-drop .chosen-single div b {
+ background-position: -18px 2px;
+}
+.chosen-container-active .chosen-choices {
+ border: 1px solid #5897fb;
+ box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+}
+.chosen-container-active .chosen-choices li.search-field input[type="text"] {
+ color: #111 !important;
+}
+
+/* @end */
+/* @group Disabled Support */
+.chosen-disabled {
+ opacity: 0.5 !important;
+ cursor: default;
+}
+.chosen-disabled .chosen-single {
+ cursor: default;
+}
+.chosen-disabled .chosen-choices .search-choice .search-choice-close {
+ cursor: default;
+}
+
+/* @end */
+/* @group Right to Left */
+.chosen-rtl {
+ text-align: right;
+}
+.chosen-rtl .chosen-single {
+ overflow: visible;
+ padding: 0 8px 0 0;
+}
+.chosen-rtl .chosen-single span {
+ margin-right: 0;
+ margin-left: 26px;
+ direction: rtl;
+}
+.chosen-rtl .chosen-single-with-deselect span {
+ margin-left: 38px;
+}
+.chosen-rtl .chosen-single div {
+ right: auto;
+ left: 3px;
+}
+.chosen-rtl .chosen-single abbr {
+ right: auto;
+ left: 26px;
+}
+.chosen-rtl .chosen-choices li {
+ float: right;
+}
+.chosen-rtl .chosen-choices li.search-field input[type="text"] {
+ direction: rtl;
+}
+.chosen-rtl .chosen-choices li.search-choice {
+ margin: 3px 5px 3px 0;
+ padding: 3px 5px 3px 19px;
+}
+.chosen-rtl .chosen-choices li.search-choice .search-choice-close {
+ right: auto;
+ left: 4px;
+}
+.chosen-rtl.chosen-container-single-nosearch .chosen-search,
+.chosen-rtl .chosen-drop {
+ left: 9999px;
+}
+.chosen-rtl.chosen-container-single .chosen-results {
+ margin: 0 0 4px 4px;
+ padding: 0 4px 0 0;
+}
+.chosen-rtl .chosen-results li.group-option {
+ padding-right: 15px;
+ padding-left: 0;
+}
+.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
+ border-right: none;
+}
+.chosen-rtl .chosen-search input[type="text"] {
+ padding: 4px 5px 4px 20px;
+ background: white url('chosen-sprite.png') no-repeat -30px -20px;
+ background: url('chosen-sprite.png') no-repeat -30px -20px, -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
+ background: url('chosen-sprite.png') no-repeat -30px -20px, -webkit-linear-gradient(#eeeeee 1%, #ffffff 15%);
+ background: url('chosen-sprite.png') no-repeat -30px -20px, -moz-linear-gradient(#eeeeee 1%, #ffffff 15%);
+ background: url('chosen-sprite.png') no-repeat -30px -20px, -o-linear-gradient(#eeeeee 1%, #ffffff 15%);
+ background: url('chosen-sprite.png') no-repeat -30px -20px, linear-gradient(#eeeeee 1%, #ffffff 15%);
+ direction: rtl;
+}
+.chosen-rtl.chosen-container-single .chosen-single div b {
+ background-position: 6px 2px;
+}
+.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b {
+ background-position: -12px 2px;
+}
+
+/* @end */
+/* @group Retina compatibility */
+@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-resolution: 144dpi) {
+ .chosen-rtl .chosen-search input[type="text"],
+ .chosen-container-single .chosen-single abbr,
+ .chosen-container-single .chosen-single div b,
+ .chosen-container-single .chosen-search input[type="text"],
+ .chosen-container-multi .chosen-choices .search-choice .search-choice-close,
+ .chosen-container .chosen-results-scroll-down span,
+ .chosen-container .chosen-results-scroll-up span {
+ background-image: url('chosen-sprite@2x.png') !important;
+ background-size: 52px 37px !important;
+ background-repeat: no-repeat !important;
+ }
+}
+/* @end */ \ No newline at end of file
diff --git a/templates/assets/tether/examples/chosen/chosen.js b/templates/assets/tether/examples/chosen/chosen.js
new file mode 100644
index 0000000..521556b
--- /dev/null
+++ b/templates/assets/tether/examples/chosen/chosen.js
@@ -0,0 +1,1166 @@
+// Chosen, a Select Box Enhancer for jQuery and Prototype
+// by Patrick Filler for Harvest, http://getharvest.com
+//
+// Version 1.0.0
+// Full source at https://github.com/harvesthq/chosen
+// Copyright (c) 2011 Harvest http://getharvest.com
+
+// MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
+// This file is generated by `grunt build`, do not edit it by hand.
+(function() {
+ var $, AbstractChosen, Chosen, SelectParser, _ref,
+ __hasProp = {}.hasOwnProperty,
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
+
+ SelectParser = (function() {
+ function SelectParser() {
+ this.options_index = 0;
+ this.parsed = [];
+ }
+
+ SelectParser.prototype.add_node = function(child) {
+ if (child.nodeName.toUpperCase() === "OPTGROUP") {
+ return this.add_group(child);
+ } else {
+ return this.add_option(child);
+ }
+ };
+
+ SelectParser.prototype.add_group = function(group) {
+ var group_position, option, _i, _len, _ref, _results;
+
+ group_position = this.parsed.length;
+ this.parsed.push({
+ array_index: group_position,
+ group: true,
+ label: this.escapeExpression(group.label),
+ children: 0,
+ disabled: group.disabled
+ });
+ _ref = group.childNodes;
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ option = _ref[_i];
+ _results.push(this.add_option(option, group_position, group.disabled));
+ }
+ return _results;
+ };
+
+ SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
+ if (option.nodeName.toUpperCase() === "OPTION") {
+ if (option.text !== "") {
+ if (group_position != null) {
+ this.parsed[group_position].children += 1;
+ }
+ this.parsed.push({
+ array_index: this.parsed.length,
+ options_index: this.options_index,
+ value: option.value,
+ text: option.text,
+ html: option.innerHTML,
+ selected: option.selected,
+ disabled: group_disabled === true ? group_disabled : option.disabled,
+ group_array_index: group_position,
+ classes: option.className,
+ style: option.style.cssText
+ });
+ } else {
+ this.parsed.push({
+ array_index: this.parsed.length,
+ options_index: this.options_index,
+ empty: true
+ });
+ }
+ return this.options_index += 1;
+ }
+ };
+
+ SelectParser.prototype.escapeExpression = function(text) {
+ var map, unsafe_chars;
+
+ if ((text == null) || text === false) {
+ return "";
+ }
+ if (!/[\&\<\>\"\'\`]/.test(text)) {
+ return text;
+ }
+ map = {
+ "<": "&lt;",
+ ">": "&gt;",
+ '"': "&quot;",
+ "'": "&#x27;",
+ "`": "&#x60;"
+ };
+ unsafe_chars = /&(?!\w+;)|[\<\>\"\'\`]/g;
+ return text.replace(unsafe_chars, function(chr) {
+ return map[chr] || "&amp;";
+ });
+ };
+
+ return SelectParser;
+
+ })();
+
+ SelectParser.select_to_array = function(select) {
+ var child, parser, _i, _len, _ref;
+
+ parser = new SelectParser();
+ _ref = select.childNodes;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ child = _ref[_i];
+ parser.add_node(child);
+ }
+ return parser.parsed;
+ };
+
+ AbstractChosen = (function() {
+ function AbstractChosen(form_field, options) {
+ this.form_field = form_field;
+ this.options = options != null ? options : {};
+ if (!AbstractChosen.browser_is_supported()) {
+ return;
+ }
+ this.is_multiple = this.form_field.multiple;
+ this.set_default_text();
+ this.set_default_values();
+ this.setup();
+ this.set_up_html();
+ this.register_observers();
+ }
+
+ AbstractChosen.prototype.set_default_values = function() {
+ var _this = this;
+
+ this.click_test_action = function(evt) {
+ return _this.test_active_click(evt);
+ };
+ this.activate_action = function(evt) {
+ return _this.activate_field(evt);
+ };
+ this.active_field = false;
+ this.mouse_on_container = false;
+ this.results_showing = false;
+ this.result_highlighted = null;
+ this.result_single_selected = null;
+ this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
+ this.disable_search_threshold = this.options.disable_search_threshold || 0;
+ this.disable_search = this.options.disable_search || false;
+ this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;
+ this.group_search = this.options.group_search != null ? this.options.group_search : true;
+ this.search_contains = this.options.search_contains || false;
+ this.single_backstroke_delete = this.options.single_backstroke_delete != null ? this.options.single_backstroke_delete : true;
+ this.max_selected_options = this.options.max_selected_options || Infinity;
+ this.inherit_select_classes = this.options.inherit_select_classes || false;
+ this.display_selected_options = this.options.display_selected_options != null ? this.options.display_selected_options : true;
+ return this.display_disabled_options = this.options.display_disabled_options != null ? this.options.display_disabled_options : true;
+ };
+
+ AbstractChosen.prototype.set_default_text = function() {
+ if (this.form_field.getAttribute("data-placeholder")) {
+ this.default_text = this.form_field.getAttribute("data-placeholder");
+ } else if (this.is_multiple) {
+ this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text;
+ } else {
+ this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text;
+ }
+ return this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || AbstractChosen.default_no_result_text;
+ };
+
+ AbstractChosen.prototype.mouse_enter = function() {
+ return this.mouse_on_container = true;
+ };
+
+ AbstractChosen.prototype.mouse_leave = function() {
+ return this.mouse_on_container = false;
+ };
+
+ AbstractChosen.prototype.input_focus = function(evt) {
+ var _this = this;
+
+ if (this.is_multiple) {
+ if (!this.active_field) {
+ return setTimeout((function() {
+ return _this.container_mousedown();
+ }), 50);
+ }
+ } else {
+ if (!this.active_field) {
+ return this.activate_field();
+ }
+ }
+ };
+
+ AbstractChosen.prototype.input_blur = function(evt) {
+ var _this = this;
+
+ if (!this.mouse_on_container) {
+ this.active_field = false;
+ return setTimeout((function() {
+ return _this.blur_test();
+ }), 100);
+ }
+ };
+
+ AbstractChosen.prototype.results_option_build = function(options) {
+ var content, data, _i, _len, _ref;
+
+ content = '';
+ _ref = this.results_data;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ data = _ref[_i];
+ if (data.group) {
+ content += this.result_add_group(data);
+ } else {
+ content += this.result_add_option(data);
+ }
+ if (options != null ? options.first : void 0) {
+ if (data.selected && this.is_multiple) {
+ this.choice_build(data);
+ } else if (data.selected && !this.is_multiple) {
+ this.single_set_selected_text(data.text);
+ }
+ }
+ }
+ return content;
+ };
+
+ AbstractChosen.prototype.result_add_option = function(option) {
+ var classes, style;
+
+ if (!option.search_match) {
+ return '';
+ }
+ if (!this.include_option_in_results(option)) {
+ return '';
+ }
+ classes = [];
+ if (!option.disabled && !(option.selected && this.is_multiple)) {
+ classes.push("active-result");
+ }
+ if (option.disabled && !(option.selected && this.is_multiple)) {
+ classes.push("disabled-result");
+ }
+ if (option.selected) {
+ classes.push("result-selected");
+ }
+ if (option.group_array_index != null) {
+ classes.push("group-option");
+ }
+ if (option.classes !== "") {
+ classes.push(option.classes);
+ }
+ style = option.style.cssText !== "" ? " style=\"" + option.style + "\"" : "";
+ return "<li class=\"" + (classes.join(' ')) + "\"" + style + " data-option-array-index=\"" + option.array_index + "\">" + option.search_text + "</li>";
+ };
+
+ AbstractChosen.prototype.result_add_group = function(group) {
+ if (!(group.search_match || group.group_match)) {
+ return '';
+ }
+ if (!(group.active_options > 0)) {
+ return '';
+ }
+ return "<li class=\"group-result\">" + group.search_text + "</li>";
+ };
+
+ AbstractChosen.prototype.results_update_field = function() {
+ this.set_default_text();
+ if (!this.is_multiple) {
+ this.results_reset_cleanup();
+ }
+ this.result_clear_highlight();
+ this.result_single_selected = null;
+ this.results_build();
+ if (this.results_showing) {
+ return this.winnow_results();
+ }
+ };
+
+ AbstractChosen.prototype.results_toggle = function() {
+ if (this.results_showing) {
+ return this.results_hide();
+ } else {
+ return this.results_show();
+ }
+ };
+
+ AbstractChosen.prototype.results_search = function(evt) {
+ if (this.results_showing) {
+ return this.winnow_results();
+ } else {
+ return this.results_show();
+ }
+ };
+
+ AbstractChosen.prototype.winnow_results = function() {
+ var escapedSearchText, option, regex, regexAnchor, results, results_group, searchText, startpos, text, zregex, _i, _len, _ref;
+
+ this.no_results_clear();
+ results = 0;
+ searchText = this.get_search_text();
+ escapedSearchText = searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
+ regexAnchor = this.search_contains ? "" : "^";
+ regex = new RegExp(regexAnchor + escapedSearchText, 'i');
+ zregex = new RegExp(escapedSearchText, 'i');
+ _ref = this.results_data;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ option = _ref[_i];
+ option.search_match = false;
+ results_group = null;
+ if (this.include_option_in_results(option)) {
+ if (option.group) {
+ option.group_match = false;
+ option.active_options = 0;
+ }
+ if ((option.group_array_index != null) && this.results_data[option.group_array_index]) {
+ results_group = this.results_data[option.group_array_index];
+ if (results_group.active_options === 0 && results_group.search_match) {
+ results += 1;
+ }
+ results_group.active_options += 1;
+ }
+ if (!(option.group && !this.group_search)) {
+ option.search_text = option.group ? option.label : option.html;
+ option.search_match = this.search_string_match(option.search_text, regex);
+ if (option.search_match && !option.group) {
+ results += 1;
+ }
+ if (option.search_match) {
+ if (searchText.length) {
+ startpos = option.search_text.search(zregex);
+ text = option.search_text.substr(0, startpos + searchText.length) + '</em>' + option.search_text.substr(startpos + searchText.length);
+ option.search_text = text.substr(0, startpos) + '<em>' + text.substr(startpos);
+ }
+ if (results_group != null) {
+ results_group.group_match = true;
+ }
+ } else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
+ option.search_match = true;
+ }
+ }
+ }
+ }
+ this.result_clear_highlight();
+ if (results < 1 && searchText.length) {
+ this.update_results_content("");
+ return this.no_results(searchText);
+ } else {
+ this.update_results_content(this.results_option_build());
+ return this.winnow_results_set_highlight();
+ }
+ };
+
+ AbstractChosen.prototype.search_string_match = function(search_string, regex) {
+ var part, parts, _i, _len;
+
+ if (regex.test(search_string)) {
+ return true;
+ } else if (this.enable_split_word_search && (search_string.indexOf(" ") >= 0 || search_string.indexOf("[") === 0)) {
+ parts = search_string.replace(/\[|\]/g, "").split(" ");
+ if (parts.length) {
+ for (_i = 0, _len = parts.length; _i < _len; _i++) {
+ part = parts[_i];
+ if (regex.test(part)) {
+ return true;
+ }
+ }
+ }
+ }
+ };
+
+ AbstractChosen.prototype.choices_count = function() {
+ var option, _i, _len, _ref;
+
+ if (this.selected_option_count != null) {
+ return this.selected_option_count;
+ }
+ this.selected_option_count = 0;
+ _ref = this.form_field.options;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ option = _ref[_i];
+ if (option.selected) {
+ this.selected_option_count += 1;
+ }
+ }
+ return this.selected_option_count;
+ };
+
+ AbstractChosen.prototype.choices_click = function(evt) {
+ evt.preventDefault();
+ if (!(this.results_showing || this.is_disabled)) {
+ return this.results_show();
+ }
+ };
+
+ AbstractChosen.prototype.keyup_checker = function(evt) {
+ var stroke, _ref;
+
+ stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
+ this.search_field_scale();
+ switch (stroke) {
+ case 8:
+ if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) {
+ return this.keydown_backstroke();
+ } else if (!this.pending_backstroke) {
+ this.result_clear_highlight();
+ return this.results_search();
+ }
+ break;
+ case 13:
+ evt.preventDefault();
+ if (this.results_showing) {
+ return this.result_select(evt);
+ }
+ break;
+ case 27:
+ if (this.results_showing) {
+ this.results_hide();
+ }
+ return true;
+ case 9:
+ case 38:
+ case 40:
+ case 16:
+ case 91:
+ case 17:
+ break;
+ default:
+ return this.results_search();
+ }
+ };
+
+ AbstractChosen.prototype.container_width = function() {
+ if (this.options.width != null) {
+ return this.options.width;
+ } else {
+ return "" + this.form_field.offsetWidth + "px";
+ }
+ };
+
+ AbstractChosen.prototype.include_option_in_results = function(option) {
+ if (this.is_multiple && (!this.display_selected_options && option.selected)) {
+ return false;
+ }
+ if (!this.display_disabled_options && option.disabled) {
+ return false;
+ }
+ if (option.empty) {
+ return false;
+ }
+ return true;
+ };
+
+ AbstractChosen.browser_is_supported = function() {
+ if (window.navigator.appName === "Microsoft Internet Explorer") {
+ return document.documentMode >= 8;
+ }
+ if (/iP(od|hone)/i.test(window.navigator.userAgent)) {
+ return false;
+ }
+ if (/Android/i.test(window.navigator.userAgent)) {
+ if (/Mobile/i.test(window.navigator.userAgent)) {
+ return false;
+ }
+ }
+ return true;
+ };
+
+ AbstractChosen.default_multiple_text = "Select Some Options";
+
+ AbstractChosen.default_single_text = "Select an Option";
+
+ AbstractChosen.default_no_result_text = "No results match";
+
+ return AbstractChosen;
+
+ })();
+
+ $ = jQuery;
+
+ $.fn.extend({
+ chosen: function(options) {
+ if (!AbstractChosen.browser_is_supported()) {
+ return this;
+ }
+ return this.each(function(input_field) {
+ var $this, chosen;
+
+ $this = $(this);
+ chosen = $this.data('chosen');
+ if (options === 'destroy' && chosen) {
+ chosen.destroy();
+ } else if (!chosen) {
+ $this.data('chosen', new Chosen(this, options));
+ }
+ });
+ }
+ });
+
+ Chosen = (function(_super) {
+ __extends(Chosen, _super);
+
+ function Chosen() {
+ _ref = Chosen.__super__.constructor.apply(this, arguments);
+ return _ref;
+ }
+
+ Chosen.prototype.setup = function() {
+ this.form_field_jq = $(this.form_field);
+ this.current_selectedIndex = this.form_field.selectedIndex;
+ return this.is_rtl = this.form_field_jq.hasClass("chosen-rtl");
+ };
+
+ Chosen.prototype.set_up_html = function() {
+ var container_classes, container_props;
+
+ container_classes = ["chosen-container"];
+ container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
+ if (this.inherit_select_classes && this.form_field.className) {
+ container_classes.push(this.form_field.className);
+ }
+ if (this.is_rtl) {
+ container_classes.push("chosen-rtl");
+ }
+ container_props = {
+ 'class': container_classes.join(' '),
+ 'style': "width: " + (this.container_width()) + ";",
+ 'title': this.form_field.title
+ };
+ if (this.form_field.id.length) {
+ container_props.id = this.form_field.id.replace(/[^\w]/g, '_') + "_chosen";
+ }
+ this.container = $("<div />", container_props);
+ if (this.is_multiple) {
+ this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="' + this.default_text + '" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>');
+ } else {
+ this.container.html('<a class="chosen-single chosen-default" tabindex="-1"><span>' + this.default_text + '</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>');
+ }
+ this.form_field_jq.hide().after(this.container);
+ this.dropdown = this.container.find('div.chosen-drop').first();
+ this.search_field = this.container.find('input').first();
+ this.search_results = this.container.find('ul.chosen-results').first();
+ this.search_field_scale();
+ this.search_no_results = this.container.find('li.no-results').first();
+ if (this.is_multiple) {
+ this.search_choices = this.container.find('ul.chosen-choices').first();
+ this.search_container = this.container.find('li.search-field').first();
+ } else {
+ this.search_container = this.container.find('div.chosen-search').first();
+ this.selected_item = this.container.find('.chosen-single').first();
+ }
+ this.results_build();
+ this.set_tab_index();
+ this.set_label_behavior();
+ return this.form_field_jq.trigger("chosen:ready", {
+ chosen: this
+ });
+ };
+
+ Chosen.prototype.register_observers = function() {
+ var _this = this;
+
+ this.container.bind('mousedown.chosen', function(evt) {
+ _this.container_mousedown(evt);
+ });
+ this.container.bind('mouseup.chosen', function(evt) {
+ _this.container_mouseup(evt);
+ });
+ this.container.bind('mouseenter.chosen', function(evt) {
+ _this.mouse_enter(evt);
+ });
+ this.container.bind('mouseleave.chosen', function(evt) {
+ _this.mouse_leave(evt);
+ });
+ this.search_results.bind('mouseup.chosen', function(evt) {
+ _this.search_results_mouseup(evt);
+ });
+ this.search_results.bind('mouseover.chosen', function(evt) {
+ _this.search_results_mouseover(evt);
+ });
+ this.search_results.bind('mouseout.chosen', function(evt) {
+ _this.search_results_mouseout(evt);
+ });
+ this.search_results.bind('mousewheel.chosen DOMMouseScroll.chosen', function(evt) {
+ _this.search_results_mousewheel(evt);
+ });
+ this.form_field_jq.bind("chosen:updated.chosen", function(evt) {
+ _this.results_update_field(evt);
+ });
+ this.form_field_jq.bind("chosen:activate.chosen", function(evt) {
+ _this.activate_field(evt);
+ });
+ this.form_field_jq.bind("chosen:open.chosen", function(evt) {
+ _this.container_mousedown(evt);
+ });
+ this.search_field.bind('blur.chosen', function(evt) {
+ _this.input_blur(evt);
+ });
+ this.search_field.bind('keyup.chosen', function(evt) {
+ _this.keyup_checker(evt);
+ });
+ this.search_field.bind('keydown.chosen', function(evt) {
+ _this.keydown_checker(evt);
+ });
+ this.search_field.bind('focus.chosen', function(evt) {
+ _this.input_focus(evt);
+ });
+ if (this.is_multiple) {
+ return this.search_choices.bind('click.chosen', function(evt) {
+ _this.choices_click(evt);
+ });
+ } else {
+ return this.container.bind('click.chosen', function(evt) {
+ evt.preventDefault();
+ });
+ }
+ };
+
+ Chosen.prototype.destroy = function() {
+ $(document).unbind("click.chosen", this.click_test_action);
+ if (this.search_field[0].tabIndex) {
+ this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex;
+ }
+ this.container.remove();
+ this.form_field_jq.removeData('chosen');
+ return this.form_field_jq.show();
+ };
+
+ Chosen.prototype.search_field_disabled = function() {
+ this.is_disabled = this.form_field_jq[0].disabled;
+ if (this.is_disabled) {
+ this.container.addClass('chosen-disabled');
+ this.search_field[0].disabled = true;
+ if (!this.is_multiple) {
+ this.selected_item.unbind("focus.chosen", this.activate_action);
+ }
+ return this.close_field();
+ } else {
+ this.container.removeClass('chosen-disabled');
+ this.search_field[0].disabled = false;
+ if (!this.is_multiple) {
+ return this.selected_item.bind("focus.chosen", this.activate_action);
+ }
+ }
+ };
+
+ Chosen.prototype.container_mousedown = function(evt) {
+ if (!this.is_disabled) {
+ if (evt && evt.type === "mousedown" && !this.results_showing) {
+ evt.preventDefault();
+ }
+ if (!((evt != null) && ($(evt.target)).hasClass("search-choice-close"))) {
+ if (!this.active_field) {
+ if (this.is_multiple) {
+ this.search_field.val("");
+ }
+ $(document).bind('click.chosen', this.click_test_action);
+ this.results_show();
+ } else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chosen-single").length)) {
+ evt.preventDefault();
+ this.results_toggle();
+ }
+ return this.activate_field();
+ }
+ }
+ };
+
+ Chosen.prototype.container_mouseup = function(evt) {
+ if (evt.target.nodeName === "ABBR" && !this.is_disabled) {
+ return this.results_reset(evt);
+ }
+ };
+
+ Chosen.prototype.search_results_mousewheel = function(evt) {
+ var delta, _ref1, _ref2;
+
+ delta = -((_ref1 = evt.originalEvent) != null ? _ref1.wheelDelta : void 0) || ((_ref2 = evt.originialEvent) != null ? _ref2.detail : void 0);
+ if (delta != null) {
+ evt.preventDefault();
+ if (evt.type === 'DOMMouseScroll') {
+ delta = delta * 40;
+ }
+ return this.search_results.scrollTop(delta + this.search_results.scrollTop());
+ }
+ };
+
+ Chosen.prototype.blur_test = function(evt) {
+ if (!this.active_field && this.container.hasClass("chosen-container-active")) {
+ return this.close_field();
+ }
+ };
+
+ Chosen.prototype.close_field = function() {
+ $(document).unbind("click.chosen", this.click_test_action);
+ this.active_field = false;
+ this.results_hide();
+ this.container.removeClass("chosen-container-active");
+ this.clear_backstroke();
+ this.show_search_field_default();
+ return this.search_field_scale();
+ };
+
+ Chosen.prototype.activate_field = function() {
+ this.container.addClass("chosen-container-active");
+ this.active_field = true;
+ this.search_field.val(this.search_field.val());
+ return this.search_field.focus();
+ };
+
+ Chosen.prototype.test_active_click = function(evt) {
+ if (this.container.is($(evt.target).closest('.chosen-container'))) {
+ return this.active_field = true;
+ } else {
+ return this.close_field();
+ }
+ };
+
+ Chosen.prototype.results_build = function() {
+ this.parsing = true;
+ this.selected_option_count = null;
+ this.results_data = SelectParser.select_to_array(this.form_field);
+ if (this.is_multiple) {
+ this.search_choices.find("li.search-choice").remove();
+ } else if (!this.is_multiple) {
+ this.single_set_selected_text();
+ if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
+ this.search_field[0].readOnly = true;
+ this.container.addClass("chosen-container-single-nosearch");
+ } else {
+ this.search_field[0].readOnly = false;
+ this.container.removeClass("chosen-container-single-nosearch");
+ }
+ }
+ this.update_results_content(this.results_option_build({
+ first: true
+ }));
+ this.search_field_disabled();
+ this.show_search_field_default();
+ this.search_field_scale();
+ return this.parsing = false;
+ };
+
+ Chosen.prototype.result_do_highlight = function(el) {
+ var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
+
+ if (el.length) {
+ this.result_clear_highlight();
+ this.result_highlight = el;
+ this.result_highlight.addClass("highlighted");
+ maxHeight = parseInt(this.search_results.css("maxHeight"), 10);
+ visible_top = this.search_results.scrollTop();
+ visible_bottom = maxHeight + visible_top;
+ high_top = this.result_highlight.position().top + this.search_results.scrollTop();
+ high_bottom = high_top + this.result_highlight.outerHeight();
+ if (high_bottom >= visible_bottom) {
+ return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);
+ } else if (high_top < visible_top) {
+ return this.search_results.scrollTop(high_top);
+ }
+ }
+ };
+
+ Chosen.prototype.result_clear_highlight = function() {
+ if (this.result_highlight) {
+ this.result_highlight.removeClass("highlighted");
+ }
+ return this.result_highlight = null;
+ };
+
+ Chosen.prototype.results_show = function() {
+ if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
+ this.form_field_jq.trigger("chosen:maxselected", {
+ chosen: this
+ });
+ return false;
+ }
+ this.container.addClass("chosen-with-drop");
+ this.form_field_jq.trigger("chosen:showing_dropdown", {
+ chosen: this
+ });
+ this.results_showing = true;
+ this.search_field.focus();
+ this.search_field.val(this.search_field.val());
+ return this.winnow_results();
+ };
+
+ Chosen.prototype.update_results_content = function(content) {
+ return this.search_results.html(content);
+ };
+
+ Chosen.prototype.results_hide = function() {
+ if (this.results_showing) {
+ this.result_clear_highlight();
+ this.container.removeClass("chosen-with-drop");
+ this.form_field_jq.trigger("chosen:hiding_dropdown", {
+ chosen: this
+ });
+ }
+ return this.results_showing = false;
+ };
+
+ Chosen.prototype.set_tab_index = function(el) {
+ var ti;
+
+ if (this.form_field.tabIndex) {
+ ti = this.form_field.tabIndex;
+ this.form_field.tabIndex = -1;
+ return this.search_field[0].tabIndex = ti;
+ }
+ };
+
+ Chosen.prototype.set_label_behavior = function() {
+ var _this = this;
+
+ this.form_field_label = this.form_field_jq.parents("label");
+ if (!this.form_field_label.length && this.form_field.id.length) {
+ this.form_field_label = $("label[for='" + this.form_field.id + "']");
+ }
+ if (this.form_field_label.length > 0) {
+ return this.form_field_label.bind('click.chosen', function(evt) {
+ if (_this.is_multiple) {
+ return _this.container_mousedown(evt);
+ } else {
+ return _this.activate_field();
+ }
+ });
+ }
+ };
+
+ Chosen.prototype.show_search_field_default = function() {
+ if (this.is_multiple && this.choices_count() < 1 && !this.active_field) {
+ this.search_field.val(this.default_text);
+ return this.search_field.addClass("default");
+ } else {
+ this.search_field.val("");
+ return this.search_field.removeClass("default");
+ }
+ };
+
+ Chosen.prototype.search_results_mouseup = function(evt) {
+ var target;
+
+ target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
+ if (target.length) {
+ this.result_highlight = target;
+ this.result_select(evt);
+ return this.search_field.focus();
+ }
+ };
+
+ Chosen.prototype.search_results_mouseover = function(evt) {
+ var target;
+
+ target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
+ if (target) {
+ return this.result_do_highlight(target);
+ }
+ };
+
+ Chosen.prototype.search_results_mouseout = function(evt) {
+ if ($(evt.target).hasClass("active-result" || $(evt.target).parents('.active-result').first())) {
+ return this.result_clear_highlight();
+ }
+ };
+
+ Chosen.prototype.choice_build = function(item) {
+ var choice, close_link,
+ _this = this;
+
+ choice = $('<li />', {
+ "class": "search-choice"
+ }).html("<span>" + item.html + "</span>");
+ if (item.disabled) {
+ choice.addClass('search-choice-disabled');
+ } else {
+ close_link = $('<a />', {
+ "class": 'search-choice-close',
+ 'data-option-array-index': item.array_index
+ });
+ close_link.bind('click.chosen', function(evt) {
+ return _this.choice_destroy_link_click(evt);
+ });
+ choice.append(close_link);
+ }
+ return this.search_container.before(choice);
+ };
+
+ Chosen.prototype.choice_destroy_link_click = function(evt) {
+ evt.preventDefault();
+ evt.stopPropagation();
+ if (!this.is_disabled) {
+ return this.choice_destroy($(evt.target));
+ }
+ };
+
+ Chosen.prototype.choice_destroy = function(link) {
+ if (this.result_deselect(link[0].getAttribute("data-option-array-index"))) {
+ this.show_search_field_default();
+ if (this.is_multiple && this.choices_count() > 0 && this.search_field.val().length < 1) {
+ this.results_hide();
+ }
+ link.parents('li').first().remove();
+ return this.search_field_scale();
+ }
+ };
+
+ Chosen.prototype.results_reset = function() {
+ this.form_field.options[0].selected = true;
+ this.selected_option_count = null;
+ this.single_set_selected_text();
+ this.show_search_field_default();
+ this.results_reset_cleanup();
+ this.form_field_jq.trigger("change");
+ if (this.active_field) {
+ return this.results_hide();
+ }
+ };
+
+ Chosen.prototype.results_reset_cleanup = function() {
+ this.current_selectedIndex = this.form_field.selectedIndex;
+ return this.selected_item.find("abbr").remove();
+ };
+
+ Chosen.prototype.result_select = function(evt) {
+ var high, item, selected_index;
+
+ if (this.result_highlight) {
+ high = this.result_highlight;
+ this.result_clear_highlight();
+ if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
+ this.form_field_jq.trigger("chosen:maxselected", {
+ chosen: this
+ });
+ return false;
+ }
+ if (this.is_multiple) {
+ high.removeClass("active-result");
+ } else {
+ if (this.result_single_selected) {
+ this.result_single_selected.removeClass("result-selected");
+ selected_index = this.result_single_selected[0].getAttribute('data-option-array-index');
+ this.results_data[selected_index].selected = false;
+ }
+ this.result_single_selected = high;
+ }
+ high.addClass("result-selected");
+ item = this.results_data[high[0].getAttribute("data-option-array-index")];
+ item.selected = true;
+ this.form_field.options[item.options_index].selected = true;
+ this.selected_option_count = null;
+ if (this.is_multiple) {
+ this.choice_build(item);
+ } else {
+ this.single_set_selected_text(item.text);
+ }
+ if (!((evt.metaKey || evt.ctrlKey) && this.is_multiple)) {
+ this.results_hide();
+ }
+ this.search_field.val("");
+ if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) {
+ this.form_field_jq.trigger("change", {
+ 'selected': this.form_field.options[item.options_index].value
+ });
+ }
+ this.current_selectedIndex = this.form_field.selectedIndex;
+ return this.search_field_scale();
+ }
+ };
+
+ Chosen.prototype.single_set_selected_text = function(text) {
+ if (text == null) {
+ text = this.default_text;
+ }
+ if (text === this.default_text) {
+ this.selected_item.addClass("chosen-default");
+ } else {
+ this.single_deselect_control_build();
+ this.selected_item.removeClass("chosen-default");
+ }
+ return this.selected_item.find("span").text(text);
+ };
+
+ Chosen.prototype.result_deselect = function(pos) {
+ var result_data;
+
+ result_data = this.results_data[pos];
+ if (!this.form_field.options[result_data.options_index].disabled) {
+ result_data.selected = false;
+ this.form_field.options[result_data.options_index].selected = false;
+ this.selected_option_count = null;
+ this.result_clear_highlight();
+ if (this.results_showing) {
+ this.winnow_results();
+ }
+ this.form_field_jq.trigger("change", {
+ deselected: this.form_field.options[result_data.options_index].value
+ });
+ this.search_field_scale();
+ return true;
+ } else {
+ return false;
+ }
+ };
+
+ Chosen.prototype.single_deselect_control_build = function() {
+ if (!this.allow_single_deselect) {
+ return;
+ }
+ if (!this.selected_item.find("abbr").length) {
+ this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>");
+ }
+ return this.selected_item.addClass("chosen-single-with-deselect");
+ };
+
+ Chosen.prototype.get_search_text = function() {
+ if (this.search_field.val() === this.default_text) {
+ return "";
+ } else {
+ return $('<div/>').text($.trim(this.search_field.val())).html();
+ }
+ };
+
+ Chosen.prototype.winnow_results_set_highlight = function() {
+ var do_high, selected_results;
+
+ selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : [];
+ do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first();
+ if (do_high != null) {
+ return this.result_do_highlight(do_high);
+ }
+ };
+
+ Chosen.prototype.no_results = function(terms) {
+ var no_results_html;
+
+ no_results_html = $('<li class="no-results">' + this.results_none_found + ' "<span></span>"</li>');
+ no_results_html.find("span").first().html(terms);
+ return this.search_results.append(no_results_html);
+ };
+
+ Chosen.prototype.no_results_clear = function() {
+ return this.search_results.find(".no-results").remove();
+ };
+
+ Chosen.prototype.keydown_arrow = function() {
+ var next_sib;
+
+ if (this.results_showing && this.result_highlight) {
+ next_sib = this.result_highlight.nextAll("li.active-result").first();
+ if (next_sib) {
+ return this.result_do_highlight(next_sib);
+ }
+ } else {
+ return this.results_show();
+ }
+ };
+
+ Chosen.prototype.keyup_arrow = function() {
+ var prev_sibs;
+
+ if (!this.results_showing && !this.is_multiple) {
+ return this.results_show();
+ } else if (this.result_highlight) {
+ prev_sibs = this.result_highlight.prevAll("li.active-result");
+ if (prev_sibs.length) {
+ return this.result_do_highlight(prev_sibs.first());
+ } else {
+ if (this.choices_count() > 0) {
+ this.results_hide();
+ }
+ return this.result_clear_highlight();
+ }
+ }
+ };
+
+ Chosen.prototype.keydown_backstroke = function() {
+ var next_available_destroy;
+
+ if (this.pending_backstroke) {
+ this.choice_destroy(this.pending_backstroke.find("a").first());
+ return this.clear_backstroke();
+ } else {
+ next_available_destroy = this.search_container.siblings("li.search-choice").last();
+ if (next_available_destroy.length && !next_available_destroy.hasClass("search-choice-disabled")) {
+ this.pending_backstroke = next_available_destroy;
+ if (this.single_backstroke_delete) {
+ return this.keydown_backstroke();
+ } else {
+ return this.pending_backstroke.addClass("search-choice-focus");
+ }
+ }
+ }
+ };
+
+ Chosen.prototype.clear_backstroke = function() {
+ if (this.pending_backstroke) {
+ this.pending_backstroke.removeClass("search-choice-focus");
+ }
+ return this.pending_backstroke = null;
+ };
+
+ Chosen.prototype.keydown_checker = function(evt) {
+ var stroke, _ref1;
+
+ stroke = (_ref1 = evt.which) != null ? _ref1 : evt.keyCode;
+ this.search_field_scale();
+ if (stroke !== 8 && this.pending_backstroke) {
+ this.clear_backstroke();
+ }
+ switch (stroke) {
+ case 8:
+ this.backstroke_length = this.search_field.val().length;
+ break;
+ case 9:
+ if (this.results_showing && !this.is_multiple) {
+ this.result_select(evt);
+ }
+ this.mouse_on_container = false;
+ break;
+ case 13:
+ evt.preventDefault();
+ break;
+ case 38:
+ evt.preventDefault();
+ this.keyup_arrow();
+ break;
+ case 40:
+ evt.preventDefault();
+ this.keydown_arrow();
+ break;
+ }
+ };
+
+ Chosen.prototype.search_field_scale = function() {
+ var div, f_width, h, style, style_block, styles, w, _i, _len;
+
+ if (this.is_multiple) {
+ h = 0;
+ w = 0;
+ style_block = "position:absolute; left: -1000px; top: -1000px; display:none;";
+ styles = ['font-size', 'font-style', 'font-weight', 'font-family', 'line-height', 'text-transform', 'letter-spacing'];
+ for (_i = 0, _len = styles.length; _i < _len; _i++) {
+ style = styles[_i];
+ style_block += style + ":" + this.search_field.css(style) + ";";
+ }
+ div = $('<div />', {
+ 'style': style_block
+ });
+ div.text(this.search_field.val());
+ $('body').append(div);
+ w = div.width() + 25;
+ div.remove();
+ f_width = this.container.outerWidth();
+ if (w > f_width - 10) {
+ w = f_width - 10;
+ }
+ return this.search_field.css({
+ 'width': w + 'px'
+ });
+ }
+ };
+
+ return Chosen;
+
+ })(AbstractChosen);
+
+}).call(this); \ No newline at end of file
diff --git a/templates/assets/tether/examples/chosen/index.html b/templates/assets/tether/examples/chosen/index.html
new file mode 100644
index 0000000..cf5b490
--- /dev/null
+++ b/templates/assets/tether/examples/chosen/index.html
@@ -0,0 +1,110 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="chrome=1">
+ <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+ <link rel="stylesheet" href="../../css/drop.css" />
+ <link rel="stylesheet" href="../resources/css/base.css" />
+ <link rel="stylesheet" href="chosen.css" />
+ </head>
+ <body>
+ text<br/>
+ text<br/>
+ text<br/>
+ text<br/>
+ text<br/>
+ text<br/>
+ text<br/>
+ text<br/>
+ text<br/>
+ text<br/>
+ text<br/>
+ text<br/>
+ text<br/>
+ text<br/>
+ text<br/>
+ text<br/>
+ text<br/>
+ text<br/>
+ text<br/>
+ <br/>
+ Favorite pizza style: <br/>
+ <div class="drop-chosen-target chosen-container chosen-container-single chosen-with-drop" style="width: 350px">
+ <a class="chosen-single chosen-default" tabindex="-1"><span>Choose a style...</span><div><b></b></div></a>
+ </div>
+ <br/>
+ <br/>
+ text<br/>
+ text<br/>
+ text<br/>
+ text<br/>
+ text<br/>
+ text<br/>
+ text<br/>
+ text<br/>
+ text<br/>
+ text<br/>
+ <script src="../resources/js/log.js"></script>
+ <script src="../resources/js/jquery.js"></script>
+ <script src="chosen.js"></script>
+ <script src="../../drop.js"></script>
+ <script>
+ $(function(){
+ var $target, $drop;
+
+ $target = $('.drop-chosen-target').drop({
+ className: 'drop-chosen',
+ attach: 'bottom-left',
+ content: ''
+ });
+
+ $drop = $target.data().drop.$drop;
+
+ $drop.append('<select><option>Plain</option><option>Pepperoni</option><option>Supreme</option></select>');
+
+ $drop.on('openDrop', function(event){
+ $target.addClass('chosen-container-active');
+ }).on('closeDrop', function(event){
+ $target.removeClass('chosen-container-active');
+ });
+
+ $drop.on('openDrop', function(event) {
+ var $select = $drop.find('select');
+
+ if (!$drop.find('.chosen-container').length) {
+ $select
+ .css('width', $target.outerWidth())
+ .chosen({
+ allow_single_deselect: true,
+ disable_search_threshold: 0
+ })
+ ;
+ }
+
+ setTimeout(function(){
+ $drop.find('.chosen-search input').click().focus().keyup();
+ $target.drop('positionDrop');
+ }, 0);
+ });
+ });
+ </script>
+ <style>
+ .drop-chosen-target > a {
+ outline: none;
+ }
+
+ .drop.drop-chosen {
+ background: transparent;
+ }
+
+ .drop.drop-chosen .chosen-container > .chosen-single {
+ display: none;
+ }
+
+ .drop.drop-chosen .chosen-container .chosen-drop {
+ position: static;
+ }
+ </style>
+ </body>
+</html> \ No newline at end of file
diff --git a/templates/assets/tether/examples/common/css/style.css b/templates/assets/tether/examples/common/css/style.css
new file mode 100644
index 0000000..2d82380
--- /dev/null
+++ b/templates/assets/tether/examples/common/css/style.css
@@ -0,0 +1,48 @@
+body {
+ min-height: 3000px;
+}
+.element {
+ width: 200px;
+ height: 200px;
+ background-color: #fe8;
+ position: absolute;
+ z-index: 6;
+}
+
+.target {
+ width: 300px;
+ height: 50px;
+ margin: 0 35%;
+ background-color: #4e9;
+}
+
+.container {
+ height: 600px;
+ overflow: scroll;
+ width: 600px;
+ border: 20px solid #CCC;
+ margin-top: 100px;
+}
+
+body {
+ padding: 15px;
+}
+
+body > .container {
+ margin: 0 auto;
+}
+
+.pad {
+ height: 400px;
+ width: 100px;
+}
+
+.instructions {
+ width: 100%;
+ text-align: center;
+ font-size: 24px;
+ padding: 15px;
+ background-color: rgba(210, 180, 140, 0.4);
+ margin: -15px -15px 0 -15px;
+}
+
diff --git a/templates/assets/tether/examples/content-visible/index.html b/templates/assets/tether/examples/content-visible/index.html
new file mode 100644
index 0000000..fd15591
--- /dev/null
+++ b/templates/assets/tether/examples/content-visible/index.html
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <link rel="stylesheet" href="../resources/css/base.css" />
+ </head>
+ <body>
+
+ <div class="instructions">Scroll the page</div>
+
+ <style>
+ .instructions {
+ width: 100%;
+ text-align: center;
+ font-size: 24px;
+ padding: 15px;
+ background-color: rgba(210, 180, 140, 0.4);
+ }
+
+ * {
+ box-sizing: border-box;
+ }
+ body {
+ min-height: 1200vh;
+ height: 100%;
+ }
+
+ .content-box {
+ width: 600px;
+ border: 10px solid #999;
+ height: 600vh;
+ background-color: #439CCC;
+ margin: 200vh auto;
+ }
+ .element {
+ border: 10px solid #999;
+ background-color: #FFDC00;
+ width: 300px;
+ height: 200px;
+ padding: 0 15px;
+ font-size: 20px;
+ font-weight: bold;
+ }
+ </style>
+
+ <div class="content-box">
+ <div class="element">
+ <p>This is some sort of crazy dialog.</p>
+
+ <p>It's setup to align with the center of the visible part of the blue area.</p>
+ </div>
+ </div>
+
+ <script src="//github.hubspot.com/tether/dist/js/tether.js"></script>
+ <script>
+ new Tether({
+ element: '.element',
+ target: '.content-box',
+ attachment: 'middle center',
+ targetAttachment: 'middle center',
+ targetModifier: 'visible'
+ });
+ </script>
+ </body>
+</html>
diff --git a/templates/assets/tether/examples/dolls/dolls.css b/templates/assets/tether/examples/dolls/dolls.css
new file mode 100644
index 0000000..931c0de
--- /dev/null
+++ b/templates/assets/tether/examples/dolls/dolls.css
@@ -0,0 +1,18 @@
+.tether-element, .tether-target {
+ width: 200px;
+ height: 50px;
+ background-color: #4cc;
+ position: absolute;
+}
+body {
+ width: 100%;
+ height: 100%;
+ overflow: scroll;
+}
+.scroll {
+ width: 400%;
+ height: 400%;
+}
+.tether-target:not(.tether-element) {
+ cursor: move;
+}
diff --git a/templates/assets/tether/examples/dolls/dolls.js b/templates/assets/tether/examples/dolls/dolls.js
new file mode 100644
index 0000000..5d0b06b
--- /dev/null
+++ b/templates/assets/tether/examples/dolls/dolls.js
@@ -0,0 +1,83 @@
+var tethers = [];
+
+document.addEventListener('DOMContentLoaded', function(){
+ dragging = null;
+
+ document.body.addEventListener('mouseup', function(){
+ dragging = null;
+ });
+
+ document.body.addEventListener('mousemove', function(e){
+ if (dragging){
+ dragging.style.top = e.clientY + 'px';
+ dragging.style.left = e.clientX + 'px';
+
+ Tether.position()
+ }
+ });
+
+ document.body.addEventListener('mousedown', function(e){
+ if (e.target.getAttribute('data-index'))
+ dragging = e.target;
+ })
+
+ var count = 60;
+ var parent = null;
+ var dir = 'left';
+ var first = null;
+
+ while (count--){
+ var el = document.createElement('div');
+ el.setAttribute('data-index', count);
+ document.querySelector('.scroll').appendChild(el);
+
+ if (!first)
+ first = el;
+
+ if (count % 10 === 0)
+ dir = dir == 'right' ? 'left' : 'right';
+
+ if (parent){
+ tethers.push(new Tether({
+ element: el,
+ target: parent,
+ attachment: 'middle ' + dir,
+ targetOffset: (dir == 'left' ? '10px 10px' : '10px -10px')
+ }));
+
+ }
+
+ parent = el;
+ }
+
+ initAnim(first);
+});
+
+function initAnim(el){
+ var start = performance.now()
+ var last = 0;
+ var lastTop = 0;
+ var tick = function(){
+ var diff = performance.now() - last;
+
+ if (!last || diff > 50){
+ last = performance.now();
+
+ var nextTop = 50 * Math.sin((last - start) / 1000);
+
+ var curTop = parseFloat(el.style.top || 0);
+ var topChange = nextTop - lastTop;
+ lastTop = nextTop;
+
+ var top = curTop + topChange;
+
+ el.style.top = top + 'px';
+
+ Tether.position();
+ }
+
+ requestAnimationFrame(tick);
+ };
+
+ tick();
+}
diff --git a/templates/assets/tether/examples/dolls/index.html b/templates/assets/tether/examples/dolls/index.html
new file mode 100644
index 0000000..8f0167f
--- /dev/null
+++ b/templates/assets/tether/examples/dolls/index.html
@@ -0,0 +1,7 @@
+<link rel="stylesheet" href="./dolls.css" />
+<script src="//github.hubspot.com/tether/dist/js/tether.js"></script>
+<script src="./dolls.js"></script>
+<body>
+ <div class="scroll">
+ </div>
+</body>
diff --git a/templates/assets/tether/examples/element-scroll/index.html b/templates/assets/tether/examples/element-scroll/index.html
new file mode 100644
index 0000000..e93181a
--- /dev/null
+++ b/templates/assets/tether/examples/element-scroll/index.html
@@ -0,0 +1,499 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <link rel="stylesheet" href="../resources/css/base.css" />
+ </head>
+ <body>
+
+ <div class="scroll">
+ <p>For a long time after the course of the steamer <em>Sofala</em> had been
+ altered for the land, the low swampy coast had retained its appearance
+ of a mere smudge of darkness beyond a belt of glitter. The sunrays
+ seemed to fall violently upon the calm sea--seemed to shatter themselves
+ upon an adamantine surface into sparkling dust, into a dazzling vapor
+ of light that blinded the eye and wearied the brain with its unsteady
+ brightness.</p>
+
+ <p>Captain Whalley did not look at it. When his Serang, approaching the
+ roomy cane arm-chair which he filled capably, had informed him in a low
+ voice that the course was to be altered, he had risen at once and had
+ remained on his feet, face forward, while the head of his ship swung
+ through a quarter of a circle. He had not uttered a single word, not
+ even the word to steady the helm. It was the Serang, an elderly, alert,
+ little Malay, with a very dark skin, who murmured the order to the
+ helmsman. And then slowly Captain Whalley sat down again in the
+ arm-chair on the bridge and fixed his eyes on the deck between his feet.</p>
+
+ <p>He could not hope to see anything new upon this lane of the sea. He had
+ been on these coasts for the last three years. From Low Cape to Malantan
+ the distance was fifty miles, six hours' steaming for the old ship with
+ the tide, or seven against. Then you steered straight for the land, and
+ by-and-by three palms would appear on the sky, tall and slim, and with
+ their disheveled heads in a bunch, as if in confidential criticism of
+ the dark mangroves. The Sofala would be headed towards the somber
+ strip of the coast, which at a given moment, as the ship closed with
+ it obliquely, would show several clean shining fractures--the brimful
+ estuary of a river. Then on through a brown liquid, three parts water
+ and one part black earth, on and on between the low shores, three parts
+ black earth and one part brackish water, the Sofala would plow her way
+ up-stream, as she had done once every month for these seven years or
+ more, long before he was aware of her existence, long before he had ever
+ thought of having anything to do with her and her invariable voyages.
+ The old ship ought to have known the road better than her men, who had
+ not been kept so long at it without a change; better than the faithful
+ Serang, whom he had brought over from his last ship to keep the
+ captain's watch; better than he himself, who had been her captain for
+ the last three years only. She could always be depended upon to make her
+ courses. Her compasses were never out. She was no trouble at all to
+ take about, as if her great age had given her knowledge, wisdom, and
+ steadiness. She made her landfalls to a degree of the bearing, and
+ almost to a minute of her allowed time. At any moment, as he sat on
+ the bridge without looking up, or lay sleepless in his bed, simply by
+ reckoning the days and the hours he could tell where he was--the precise
+ spot of the beat. He knew it well too, this monotonous huckster's
+ round, up and down the Straits; he knew its order and its sights and its
+ people. Malacca to begin with, in at daylight and out at dusk, to cross
+ over with a rigid phosphorescent wake this highway of the Far East.
+ Darkness and gleams on the water, clear stars on a black sky, perhaps
+ the lights of a home steamer keeping her unswerving course in the
+ middle, or maybe the elusive shadow of a native craft with her mat sails
+ flitting by silently--and the low land on the other side in sight
+ at daylight. At noon the three palms of the next place of call, up a
+ sluggish river. The only white man residing there was a retired young
+ sailor, with whom he had become friendly in the course of many voyages.
+ Sixty miles farther on there was another place of call, a deep bay with
+ only a couple of houses on the beach. And so on, in and out, picking
+ up coastwise cargo here and there, and finishing with a hundred miles'
+ steady steaming through the maze of an archipelago of small islands up
+ to a large native town at the end of the beat. There was a three days'
+ rest for the old ship before he started her again in inverse order,
+ seeing the same shores from another bearing, hearing the same voices
+ in the same places, back again to the Sofala's port of registry on
+ the great highway to the East, where he would take up a berth nearly
+ opposite the big stone pile of the harbor office till it was time to
+ start again on the old round of 1600 miles and thirty days. Not a very
+ enterprising life, this, for Captain Whalley, Henry Whalley, otherwise
+ Dare-devil Harry--Whalley of the Condor, a famous clipper in her day.
+ No. Not a very enterprising life for a man who had served famous firms,
+ who had sailed famous ships (more than one or two of them his own); who
+ had made famous passages, had been the pioneer of new routes and new
+ trades; who had steered across the unsurveyed tracts of the South Seas,
+ and had seen the sun rise on uncharted islands. Fifty years at sea, and
+ forty out in the East ("a pretty thorough apprenticeship," he used
+ to remark smilingly), had made him honorably known to a generation of
+ shipowners and merchants in all the ports from Bombay clear over to
+ where the East merges into the West upon the coast of the two Americas.
+ His fame remained writ, not very large but plain enough, on the
+ Admiralty charts. Was there not somewhere between Australia and China a
+ Whalley Island and a Condor Reef? On that dangerous coral formation the
+ celebrated clipper had hung stranded for three days, her captain and
+ crew throwing her cargo overboard with one hand and with the other, as
+ it were, keeping off her a flotilla of savage war-canoes. At that time
+ neither the island nor the reef had any official existence. Later the
+ officers of her Majesty's steam vessel Fusilier, dispatched to make a
+ survey of the route, recognized in the adoption of these two names the
+ enterprise of the man and the solidity of the ship. Besides, as anyone
+ who cares may see, the "General Directory," vol. ii. p. 410, begins the
+ description of the "Malotu or Whalley Passage" with the words: "This
+ advantageous route, first discovered in 1850 by Captain Whalley in the
+ ship Condor," &amp;c., and ends by recommending it warmly to sailing vessels
+ leaving the China ports for the south in the months from December to
+ April inclusive.</p>
+
+ <p>This was the clearest gain he had out of life. Nothing could rob him
+ of this kind of fame. The piercing of the Isthmus of Suez, like the
+ breaking of a dam, had let in upon the East a flood of new ships, new
+ men, new methods of trade. It had changed the face of the Eastern seas
+ and the very spirit of their life; so that his early experiences meant
+ nothing whatever to the new generation of seamen.</p>
+
+ <p>In those bygone days he had handled many thousands of pounds of his
+ employers' money and of his own; he had attended faithfully, as by law
+ a shipmaster is expected to do, to the conflicting interests of owners,
+ charterers, and underwriters. He had never lost a ship or consented to
+ a shady transaction; and he had lasted well, outlasting in the end the
+ conditions that had gone to the making of his name. He had buried his
+ wife (in the Gulf of Petchili), had married off his daughter to the man
+ of her unlucky choice, and had lost more than an ample competence in the
+ crash of the notorious Travancore and Deccan Banking Corporation, whose
+ downfall had shaken the East like an earthquake. And he was sixty-five
+ years old.</p>
+
+ <p>His age sat lightly enough on him; and of his ruin he was not ashamed.
+ He had not been alone to believe in the stability of the Banking
+ Corporation. Men whose judgment in matters of finance was as expert as
+ his seamanship had commended the prudence of his investments, and had
+ themselves lost much money in the great failure. The only difference
+ between him and them was that he had lost his all. And yet not his all.
+ There had remained to him from his lost fortune a very pretty little
+ bark, Fair Maid, which he had bought to occupy his leisure of a retired
+ sailor--"to play with," as he expressed it himself.</p>
+
+ <p>He had formally declared himself tired of the sea the year preceding his
+ daughter's marriage. But after the young couple had gone to settle in
+ Melbourne he found out that he could not make himself happy on shore. He
+ was too much of a merchant sea-captain for mere yachting to satisfy him.
+ He wanted the illusion of affairs; and his acquisition of the Fair
+ Maid preserved the continuity of his life. He introduced her to his
+ acquaintances in various ports as "my last command." When he grew too
+ old to be trusted with a ship, he would lay her up and go ashore to be
+ buried, leaving directions in his will to have the bark towed out and
+ scuttled decently in deep water on the day of the funeral. His daughter
+ would not grudge him the satisfaction of knowing that no stranger would
+ handle his last command after him. With the fortune he was able to leave
+ her, the value of a 500-ton bark was neither here nor there. All this
+ would be said with a jocular twinkle in his eye: the vigorous old man
+ had too much vitality for the sentimentalism of regret; and a little
+ wistfully withal, because he was at home in life, taking a genuine
+ pleasure in its feelings and its possessions; in the dignity of his
+ reputation and his wealth, in his love for his daughter, and in his
+ satisfaction with the ship--the plaything of his lonely leisure.</p>
+
+ <p>He had the cabin arranged in accordance with his simple ideal of comfort
+ at sea. A big bookcase (he was a great reader) occupied one side of his
+ stateroom; the portrait of his late wife, a flat bituminous oil-painting
+ representing the profile and one long black ringlet of a young woman,
+ faced his bed-place. Three chronometers ticked him to sleep and greeted
+ him on waking with the tiny competition of their beats. He rose at five
+ every day. The officer of the morning watch, drinking his early cup
+ of coffee aft by the wheel, would hear through the wide orifice of the
+ copper ventilators all the splashings, blowings, and splutterings of
+ his captain's toilet. These noises would be followed by a sustained
+ deep murmur of the Lord's Prayer recited in a loud earnest voice. Five
+ minutes afterwards the head and shoulders of Captain Whalley emerged
+ out of the companion-hatchway. Invariably he paused for a while on the
+ stairs, looking all round at the horizon; upwards at the trim of the
+ sails; inhaling deep draughts of the fresh air. Only then he would step
+ out on the poop, acknowledging the hand raised to the peak of the cap
+ with a majestic and benign "Good morning to you." He walked the deck
+ till eight scrupulously. Sometimes, not above twice a year, he had to
+ use a thick cudgel-like stick on account of a stiffness in the hip--a
+ slight touch of rheumatism, he supposed. Otherwise he knew nothing of
+ the ills of the flesh. At the ringing of the breakfast bell he went
+ below to feed his canaries, wind up the chronometers, and take the
+ head of the table. From there he had before his eyes the big carbon
+ photographs of his daughter, her husband, and two fat-legged babies
+ --his grandchildren--set in black frames into the maplewood bulkheads
+ of the cuddy. After breakfast he dusted the glass over these portraits
+ himself with a cloth, and brushed the oil painting of his wife with a
+ plumate kept suspended from a small brass hook by the side of the heavy
+ gold frame. Then with the door of his stateroom shut, he would sit down
+ on the couch under the portrait to read a chapter out of a thick pocket
+ Bible--her Bible. But on some days he only sat there for half an hour
+ with his finger between the leaves and the closed book resting on his
+ knees. Perhaps he had remembered suddenly how fond of boat-sailing she
+ used to be.</p>
+
+ <p>She had been a real shipmate and a true woman too. It was like an
+ article of faith with him that there never had been, and never could be,
+ a brighter, cheerier home anywhere afloat or ashore than his home under
+ the poop-deck of the Condor, with the big main cabin all white and gold,
+ garlanded as if for a perpetual festival with an unfading wreath. She
+ had decorated the center of every panel with a cluster of home flowers.
+ It took her a twelvemonth to go round the cuddy with this labor of love.
+ To him it had remained a marvel of painting, the highest achievement of
+ taste and skill; and as to old Swinburne, his mate, every time he
+ came down to his meals he stood transfixed with admiration before the
+ progress of the work. You could almost smell these roses, he declared,
+ sniffing the faint flavor of turpentine which at that time pervaded the
+ saloon, and (as he confessed afterwards) made him somewhat less hearty
+ than usual in tackling his food. But there was nothing of the sort to
+ interfere with his enjoyment of her singing. "Mrs. Whalley is a regular
+ out-and-out nightingale, sir," he would pronounce with a judicial air
+ after listening profoundly over the skylight to the very end of the
+ piece. In fine weather, in the second dog-watch, the two men could hear
+ her trills and roulades going on to the accompaniment of the piano in
+ the cabin. On the very day they got engaged he had written to London
+ for the instrument; but they had been married for over a year before it
+ reached them, coming out round the Cape. The big case made part of the
+ first direct general cargo landed in Hong-kong harbor--an event that to
+ the men who walked the busy quays of to-day seemed as hazily remote as
+ the dark ages of history. But Captain Whalley could in a half hour of
+ solitude live again all his life, with its romance, its idyl, and its
+ sorrow. He had to close her eyes himself. She went away from under the
+ ensign like a sailor's wife, a sailor herself at heart. He had read
+ the service over her, out of her own prayer-book, without a break in his
+ voice. When he raised his eyes he could see old Swinburne facing him
+ with his cap pressed to his breast, and his rugged, weather-beaten,
+ impassive face streaming with drops of water like a lump of chipped red
+ granite in a shower. It was all very well for that old sea-dog to cry.
+ He had to read on to the end; but after the splash he did not remember
+ much of what happened for the next few days. An elderly sailor of the
+ crew, deft at needlework, put together a mourning frock for the child
+ out of one of her black skirts.</p>
+
+ <p>He was not likely to forget; but you cannot dam up life like a sluggish
+ stream. It will break out and flow over a man's troubles, it will close
+ upon a sorrow like the sea upon a dead body, no matter how much love has
+ gone to the bottom. And the world is not bad. People had been very
+ kind to him; especially Mrs. Gardner, the wife of the senior partner
+ in Gardner, Patteson, &amp; Co., the owners of the Condor. It was she who
+ volunteered to look after the little one, and in due course took her to
+ England (something of a journey in those days, even by the overland
+ mail route) with her own girls to finish her education. It was ten years
+ before he saw her again.</p>
+
+ <p>As a little child she had never been frightened of bad weather; she
+ would beg to be taken up on deck in the bosom of his oilskin coat to
+ watch the big seas hurling themselves upon the Condor. The swirl and
+ crash of the waves seemed to fill her small soul with a breathless
+ delight. "A good boy spoiled," he used to say of her in joke. He had
+ named her Ivy because of the sound of the word, and obscurely fascinated
+ by a vague association of ideas. She had twined herself tightly round
+ his heart, and he intended her to cling close to her father as to a
+ tower of strength; forgetting, while she was little, that in the nature
+ of things she would probably elect to cling to someone else. But
+ he loved life well enough for even that event to give him a certain
+ satisfaction, apart from his more intimate feeling of loss.</p>
+
+ <p>After he had purchased the Fair Maid to occupy his loneliness, he
+ hastened to accept a rather unprofitable freight to Australia simply for
+ the opportunity of seeing his daughter in her own home. What made him
+ dissatisfied there was not to see that she clung now to somebody else,
+ but that the prop she had selected seemed on closer examination "a
+ rather poor stick"--even in the matter of health. He disliked his
+ son-in-law's studied civility perhaps more than his method of
+ handling the sum of money he had given Ivy at her marriage. But of his
+ apprehensions he said nothing. Only on the day of his departure, with
+ the hall-door open already, holding her hands and looking steadily into
+ her eyes, he had said, "You know, my dear, all I have is for you and the
+ chicks. Mind you write to me openly." She had answered him by an almost
+ imperceptible movement of her head. She resembled her mother in
+ the color of her eyes, and in character--and also in this, that she
+ understood him without many words.</p>
+
+ <p>Sure enough she had to write; and some of these letters made Captain
+ Whalley lift his white eye-brows. For the rest he considered he was
+ reaping the true reward of his life by being thus able to produce on
+ demand whatever was needed. He had not enjoyed himself so much in a
+ way since his wife had died. Characteristically enough his son-in-law's
+ punctuality in failure caused him at a distance to feel a sort of
+ kindness towards the man. The fellow was so perpetually being jammed on
+ a lee shore that to charge it all to his reckless navigation would be
+ manifestly unfair. No, no! He knew well what that meant. It was bad
+ luck. His own had been simply marvelous, but he had seen in his life too
+ many good men--seamen and others--go under with the sheer weight of bad
+ luck not to recognize the fatal signs. For all that, he was cogitating
+ on the best way of tying up very strictly every penny he had to leave,
+ when, with a preliminary rumble of rumors (whose first sound reached
+ him in Shanghai as it happened), the shock of the big failure came;
+ and, after passing through the phases of stupor, of incredulity, of
+ indignation, he had to accept the fact that he had nothing to speak of
+ to leave.</p>
+
+ <p>Upon that, as if he had only waited for this catastrophe, the unlucky
+ man, away there in Melbourne, gave up his unprofitable game, and sat
+ down--in an invalid's bath-chair at that too. "He will never walk
+ again," wrote the wife. For the first time in his life Captain Whalley
+ was a bit staggered.</p>
+
+ <p>The Fair Maid had to go to work in bitter earnest now. It was no longer
+ a matter of preserving alive the memory of Dare-devil Harry Whalley in
+ the Eastern Seas, or of keeping an old man in pocket-money and clothes,
+ with, perhaps, a bill for a few hundred first-class cigars thrown in at
+ the end of the year. He would have to buckle-to, and keep her going hard
+ on a scant allowance of gilt for the ginger-bread scrolls at her stem
+ and stern.</p>
+
+ <p>This necessity opened his eyes to the fundamental changes of the world.
+ Of his past only the familiar names remained, here and there, but
+ the things and the men, as he had known them, were gone. The name of
+ Gardner, Patteson, &amp; Co. was still displayed on the walls of warehouses
+ by the waterside, on the brass plates and window-panes in the business
+ quarters of more than one Eastern port, but there was no longer a
+ Gardner or a Patteson in the firm. There was no longer for Captain
+ Whalley an arm-chair and a welcome in the private office, with a bit of
+ business ready to be put in the way of an old friend, for the sake of
+ bygone services. The husbands of the Gardner girls sat behind the desks
+ in that room where, long after he had left the employ, he had kept his
+ right of entrance in the old man's time. Their ships now had yellow
+ funnels with black tops, and a time-table of appointed routes like a
+ confounded service of tramways. The winds of December and June were all
+ one to them; their captains (excellent young men he doubted not) were,
+ to be sure, familiar with Whalley Island, because of late years the
+ Government had established a white fixed light on the north end (with
+ a red danger sector over the Condor Reef), but most of them would have
+ been extremely surprised to hear that a flesh-and-blood Whalley still
+ existed--an old man going about the world trying to pick up a cargo here
+ and there for his little bark.</p>
+
+ <p>And everywhere it was the same. Departed the men who would have nodded
+ appreciatively at the mention of his name, and would have thought
+ themselves bound in honor to do something for Dare-devil Harry Whalley.
+ Departed the opportunities which he would have known how to seize; and
+ gone with them the white-winged flock of clippers that lived in the
+ boisterous uncertain life of the winds, skimming big fortunes out of
+ the foam of the sea. In a world that pared down the profits to an
+ irreducible minimum, in a world that was able to count its disengaged
+ tonnage twice over every day, and in which lean charters were snapped up
+ by cable three months in advance, there were no chances of fortune for
+ an individual wandering haphazard with a little bark--hardly indeed any
+ room to exist.</p>
+
+ <p>He found it more difficult from year to year. He suffered greatly from
+ the smallness of remittances he was able to send his daughter. Meantime
+ he had given up good cigars, and even in the matter of inferior cheroots
+ limited himself to six a day. He never told her of his difficulties, and
+ she never enlarged upon her struggle to live. Their confidence in each
+ other needed no explanations, and their perfect understanding endured
+ without protestations of gratitude or regret. He would have been shocked
+ if she had taken it into her head to thank him in so many words, but
+ he found it perfectly natural that she should tell him she needed two
+ hundred pounds.</p>
+
+ <p>He had come in with the Fair Maid in ballast to look for a freight in
+ the Sofala's port of registry, and her letter met him there. Its tenor
+ was that it was no use mincing matters. Her only resource was in opening
+ a boarding-house, for which the prospects, she judged, were good. Good
+ enough, at any rate, to make her tell him frankly that with two hundred
+ pounds she could make a start. He had torn the envelope open, hastily,
+ on deck, where it was handed to him by the ship-chandler's runner, who
+ had brought his mail at the moment of anchoring. For the second time
+ in his life he was appalled, and remained stock-still at the cabin door
+ with the paper trembling between his fingers. Open a boarding-house! Two
+ hundred pounds for a start! The only resource! And he did not know where
+ to lay his hands on two hundred pence.</p>
+
+ <p>All that night Captain Whalley walked the poop of his anchored ship, as
+ though he had been about to close with the land in thick weather, and
+ uncertain of his position after a run of many gray days without a sight
+ of sun, moon, or stars. The black night twinkled with the guiding lights
+ of seamen and the steady straight lines of lights on shore; and all
+ around the Fair Maid the riding lights of ships cast trembling trails
+ upon the water of the roadstead. Captain Whalley saw not a gleam
+ anywhere till the dawn broke and he found out that his clothing was
+ soaked through with the heavy dew.</p>
+
+ <p>His ship was awake. He stopped short, stroked his wet beard, and
+ descended the poop ladder backwards, with tired feet. At the sight
+ of him the chief officer, lounging about sleepily on the quarterdeck,
+ remained open-mouthed in the middle of a great early-morning yawn.</p>
+
+ <p>"Good morning to you," pronounced Captain Whalley solemnly, passing into
+ the cabin. But he checked himself in the doorway, and without looking
+ back, "By the bye," he said, "there should be an empty wooden case put
+ away in the lazarette. It has not been broken up--has it?"</p>
+
+ <p>The mate shut his mouth, and then asked as if dazed, "What empty case,
+ sir?"</p>
+
+ <p>"A big flat packing-case belonging to that painting in my room. Let it
+ be taken up on deck and tell the carpenter to look it over. I may want
+ to use it before long."</p>
+
+ <p>The chief officer did not stir a limb till he had heard the door of the
+ captain's state-room slam within the cuddy. Then he beckoned aft the
+ second mate with his forefinger to tell him that there was something "in
+ the wind."</p>
+
+ <p>When the bell rang Captain Whalley's authoritative voice boomed out
+ through a closed door, "Sit down and don't wait for me." And his
+ impressed officers took their places, exchanging looks and whispers
+ across the table. What! No breakfast? And after apparently knocking
+ about all night on deck, too! Clearly, there was something in the wind.
+ In the skylight above their heads, bowed earnestly over the plates,
+ three wire cages rocked and rattled to the restless jumping of the
+ hungry canaries; and they could detect the sounds of their "old
+ man's" deliberate movements within his state-room. Captain Whalley was
+ methodically winding up the chronometers, dusting the portrait of
+ his late wife, getting a clean white shirt out of the drawers, making
+ himself ready in his punctilious unhurried manner to go ashore. He could
+ not have swallowed a single mouthful of food that morning. He had made
+ up his mind to sell the Fair Maid.</p>
+ </div>
+
+ <div class="pointer"></div>
+
+ <style>
+ body {
+ cursor: pointer;
+ }
+ .scroll {
+ height: 80vh;
+ width: 80vw;
+ max-height: 600px;
+ position: fixed;
+ top: 5em;
+ left: 10vw;
+
+ overflow-y: scroll;
+ padding: 4em;
+ box-sizing: border-box;
+ line-height: 1.2;
+ }
+ .scroll::-webkit-scrollbar, .scroll::-webkit-scrollbar-track, .scroll::-webkit-scrollbar-thumb {
+ display: none;
+ }
+
+ .pointer {
+ height: 3.6em;
+ width: 77vw;
+ border: 5px solid #CCC;
+ border-radius: 15px;
+ background-color: rgba(0, 0, 0, 0.05);
+ pointer-events: none;
+ }
+ .highlight {
+ background-color: rgba(255, 255, 0, 0.3);
+ }
+ .hover {
+ background-color: rgba(0, 255, 255, 0.2);
+ }
+ </style>
+
+ <script src="//github.hubspot.com/tether/dist/js/tether.js"></script>
+ <script>
+ var pointer = document.querySelector('.pointer');
+ var scroll = document.querySelector('.scroll');
+
+ // This creates the pointer tether and links it up
+ // with the scroll handle
+ new Tether({
+ element: pointer,
+ target: scroll,
+ attachment: 'middle right',
+ targetAttachment: 'middle left',
+ targetModifier: 'scroll-handle'
+ });
+
+ // Everything after this is for the highlighting effect
+ var paras = document.querySelectorAll('p');
+ for(var i=paras.length; i--;){
+ var sents = paras[i].innerHTML.split('.');
+ for (var j=sents.length; j--;){
+ if (sents[j].trim().length)
+ sents[j] = '<span>' + sents[j] + '.</span>';
+ }
+ paras[i].innerHTML = sents.join('');
+ }
+
+ var spans = document.querySelectorAll('p span');
+
+ function highlight(){
+ if (!spans) return;
+
+ var bar = pointer.getBoundingClientRect();
+
+ for (var i=spans.length; i--;){
+ var coord = spans[i].getBoundingClientRect();
+
+ if (bar.top < coord.top && bar.bottom > coord.top){
+ spans[i].classList.add('hover');
+ } else if (spans[i].classList.contains('hover')) {
+ spans[i].classList.remove('hover');
+ }
+ }
+
+ requestAnimationFrame(highlight);
+ }
+
+ highlight();
+
+ document.body.addEventListener('click', function(){
+ var els = document.querySelectorAll('.hover');
+ for (var i=els.length; i--;)
+ els[i].classList.toggle('highlight');
+ });
+ </script>
+ </body>
+</html>
diff --git a/templates/assets/tether/examples/enable-disable/index.html b/templates/assets/tether/examples/enable-disable/index.html
new file mode 100644
index 0000000..00036d4
--- /dev/null
+++ b/templates/assets/tether/examples/enable-disable/index.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="chrome=1">
+ <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+ <link rel="stylesheet" href="../resources/css/base.css" />
+ <link rel="stylesheet" href="../common/css/style.css" />
+ </head>
+ <body>
+ <div class="instructions">Click the green target to enable/disable the tethering.</div>
+
+ <div class="element"></div>
+ <div class="container">
+ <div class="pad"></div>
+ <div class="target"></div>
+ <div class="pad"></div>
+ </div>
+
+ <script src="//github.hubspot.com/tether/dist/js/tether.js"></script>
+ <script>
+ var tether = new Tether({
+ element: '.element',
+ target: '.target',
+ attachment: 'top left',
+ targetAttachment: 'top right'
+ });
+
+ document.querySelector('.target').addEventListener('click', function(){
+ if (tether.enabled)
+ tether.disable();
+ else
+ tether.enable();
+ });
+ </script>
+ </body>
+</html>
diff --git a/templates/assets/tether/examples/facebook/facebook.css b/templates/assets/tether/examples/facebook/facebook.css
new file mode 100644
index 0000000..eae1508
--- /dev/null
+++ b/templates/assets/tether/examples/facebook/facebook.css
@@ -0,0 +1,86 @@
+.drop-target.drop-open {
+ outline: 2px solid;
+}
+
+.body {
+ position: relative;
+ margin-right: 300px;
+}
+
+.page {
+ max-width: 100%;
+ width: 1080px;
+ padding: 0 10px;
+ box-sizing: border-box;
+ margin: 0 auto;
+}
+
+.navigation {
+ background: blue;
+ color: #fff;
+ margin-right: 300px;
+ margin-bottom: 30px;
+}
+
+.navigation .item a {
+ padding: 30px 20px;
+ display: inline-block;
+}
+
+.navigation .item a {
+ color: inherit;
+}
+
+.navigation .drop-target.drop-open {
+ background: #fff;
+ color: blue;
+ outline: none;
+}
+
+.right-sidebar {
+ position: fixed;
+ height: 50%;
+ width: 300px;
+ background: #eee;
+ overflow: auto;
+ right: 0;
+}
+
+.right-sidebar .drop-target.drop-open {
+ background: blue;
+ color: #fff;
+ outline: none;
+}
+
+.right-sidebar .item a {
+ display: block;
+ padding: 20px;
+ margin-bottom: 10px;
+ background: rgba(0, 0, 0, .1);
+}
+
+.right-sidebar-top {
+ top: 0;
+}
+
+.right-sidebar-bottom {
+ top: 50%;
+ background: #ccc;
+}
+
+.scroll-container {
+ position: relative;
+ overflow: auto;
+ background: #eee;
+ padding: 20px;
+ margin-bottom: 20px;
+ margin-right: 20px;
+ height: 200px;
+ width: 200px;
+}
+
+.absolute-container {
+ position: absolute;
+ top: 20px;
+ right: 300px;
+}
diff --git a/templates/assets/tether/examples/facebook/index.html b/templates/assets/tether/examples/facebook/index.html
new file mode 100644
index 0000000..d4bcf8e
--- /dev/null
+++ b/templates/assets/tether/examples/facebook/index.html
@@ -0,0 +1,209 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="chrome=1">
+ <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+ <link rel="stylesheet" href="../../css/drop.css" />
+ <link rel="stylesheet" href="../../css/drop-theme-default.css" />
+ <link rel="stylesheet" href="../../css/drop-theme-arrows.css" />
+ <link rel="stylesheet" href="../resources/css/base.css" />
+ <link rel="stylesheet" href="facebook.css" />
+ </head>
+ <body>
+ <div class="navigation">
+ <div class="page">
+ <span class="item">DROPBOOK</span>
+ <span class="item">
+ <a class="drop-target" data-constrain="false" data-attach="bottom left">DROP</a>
+ </span>
+ <span class="item">
+ <a class="drop-target" data-constrain="false" data-attach="bottom left">DROP</a>
+ </span>
+ <span class="item">
+ <a class="drop-target" data-constrain="false" data-attach="bottom left">DROP</a>
+ </span>
+ </div>
+ </div>
+ <div class="right-sidebar right-sidebar-top">
+ <div class="item">
+ <a class="drop-target" data-constrain="false" data-class="drop-theme-arrows" data-attach="left top">DROP</a>
+ </div>
+ <div class="item">
+ <a class="drop-target" data-constrain="false" data-class="drop-theme-arrows" data-attach="left top">DROP</a>
+ </div>
+ <div class="item">
+ <a class="drop-target" data-constrain="true" data-class="drop-theme-arrows" data-attach="left top">DROP</a>
+ </div>
+ <div class="item">
+ <a class="drop-target" data-constrain="false" data-class="drop-theme-arrows" data-attach="left top">DROP</a>
+ </div>
+ <div class="item">
+ <a class="drop-target" data-constrain="false" data-class="drop-theme-arrows" data-attach="left top">DROP</a>
+ </div>
+ <div class="item">
+ <a class="drop-target" data-constrain="false" data-class="drop-theme-arrows" data-attach="left top">DROP</a>
+ </div>
+ <div class="item">
+ <a class="drop-target" data-constrain="false" data-class="drop-theme-arrows" data-attach="left top">DROP</a>
+ </div>
+ <div class="item">
+ <a class="drop-target" data-constrain="false" data-class="drop-theme-arrows" data-attach="left top">DROP</a>
+ </div>
+ <div class="item">
+ <a class="drop-target" data-constrain="false" data-class="drop-theme-arrows" data-attach="left top">DROP</a>
+ </div>
+ <div class="item">
+ <a class="drop-target" data-constrain="false" data-class="drop-theme-arrows" data-attach="left top">DROP</a>
+ </div>
+ <div class="item">
+ <a class="drop-target" data-constrain="false" data-class="drop-theme-arrows" data-attach="left top">DROP</a>
+ </div>
+ <div class="item">
+ <a class="drop-target" data-constrain="false" data-class="drop-theme-arrows" data-attach="left top">DROP</a>
+ </div>
+ <div class="item">
+ <a class="drop-target" data-constrain="false" data-class="drop-theme-arrows" data-attach="left top">DROP</a>
+ </div>
+ <div class="item">
+ <a class="drop-target" data-constrain="false" data-class="drop-theme-arrows" data-attach="left top">DROP</a>
+ </div>
+ <div class="item">
+ <a class="drop-target" data-constrain="false" data-class="drop-theme-arrows" data-attach="left top">DROP</a>
+ </div>
+ <div class="item">
+ <a class="drop-target" data-constrain="false" data-class="drop-theme-arrows" data-attach="left top">DROP</a>
+ </div>
+ </div>
+ <div class="right-sidebar right-sidebar-bottom">
+ <div class="item">
+ <a class="drop-target" data-constrain="false" data-class="drop-theme-arrows" data-attach="left bottom">DROP</a>
+ </div>
+ <div class="item">
+ <a class="drop-target" data-constrain="false" data-class="drop-theme-arrows" data-attach="left bottom">DROP</a>
+ </div>
+ <div class="item">
+ <a class="drop-target" data-constrain="true" data-class="drop-theme-arrows" data-attach="left bottom">DROP</a>
+ </div>
+ <div class="item">
+ <a class="drop-target" data-constrain="false" data-class="drop-theme-arrows" data-attach="left bottom">DROP</a>
+ </div>
+ <div class="item">
+ <a class="drop-target" data-constrain="false" data-class="drop-theme-arrows" data-attach="left bottom">DROP</a>
+ </div>
+ <div class="item">
+ <a class="drop-target" data-constrain="false" data-class="drop-theme-arrows" data-attach="left bottom">DROP</a>
+ </div>
+ <div class="item">
+ <a class="drop-target" data-constrain="false" data-class="drop-theme-arrows" data-attach="left bottom">DROP</a>
+ </div>
+ <div class="item">
+ <a class="drop-target" data-constrain="false" data-class="drop-theme-arrows" data-attach="left bottom">DROP</a>
+ </div>
+ <div class="item">
+ <a class="drop-target" data-constrain="false" data-class="drop-theme-arrows" data-attach="left bottom">DROP</a>
+ </div>
+ <div class="item">
+ <a class="drop-target" data-constrain="false" data-class="drop-theme-arrows" data-attach="left bottom">DROP</a>
+ </div>
+ <div class="item">
+ <a class="drop-target" data-constrain="false" data-class="drop-theme-arrows" data-attach="left bottom">DROP</a>
+ </div>
+ <div class="item">
+ <a class="drop-target" data-constrain="false" data-class="drop-theme-arrows" data-attach="left bottom">DROP</a>
+ </div>
+ <div class="item">
+ <a class="drop-target" data-constrain="false" data-class="drop-theme-arrows" data-attach="left bottom">DROP</a>
+ </div>
+ <div class="item">
+ <a class="drop-target" data-constrain="false" data-class="drop-theme-arrows" data-attach="left bottom">DROP</a>
+ </div>
+ </div>
+ <div class="body">
+ <div class="page">
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor<br/>
+ incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud<br/>
+ exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.<br/><br/>
+
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor<br/>
+ incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud<br/>
+ exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.<br/><br/>
+
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor<br/>
+ incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud<br/>
+ exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.<br/><br/>
+
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor<br/>
+ incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud<br/>
+ exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.<br/><br/>
+
+ <a class="drop-target" data-constrain="true" data-attach="bottom left">DROP</a><br/><br/>
+ <div class="scroll-container">
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit,
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit,
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit,
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit,
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit,
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit,
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit,
+ <br/><br/><a class="drop-target" data-constrain="true" data-attach="bottom left">DROP</a><br/><br/> sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.<br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<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, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<br/><br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<br/><br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<br/><br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<br/><br/>
+ <div class="scroll-container">
+ <br/>
+ <a class="drop-target" data-constrain="true" data-attach="bottom left">DROP</a><br/>
+ <br/>
+ <div style="width: 150%; background: #ccc; height: 1px"></div>
+ </div>
+ <div class="scroll-container">
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.<br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.<br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.<br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.<br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.<br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.<br/>
+ <br/><br/>
+ <div style="width: 150%; background: #ccc; height: 1px">
+ <div style="margin-left: 100%">
+ <a class="drop-target" data-constrain="true" data-attach="bottom left">DROP</a>
+ </div>
+ </div>
+ <br/><br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<br/>
+ </div>
+ <div class="scroll-container absolute-container">
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, <br/><br/><a class="drop-target" data-constrain="false" data-attach="left top">DROP</a><br/><br/> sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.<br/>
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<br/>
+ </div>
+ </div>
+ </div>
+
+ <script src="../resources/js/log.js"></script>
+ <script src="../resources/js/jquery.js"></script>
+ <script src="../../utils.js"></script>
+ <script src="../../tether.js"></script>
+ <script src="../../drop.js"></script>
+ <script src="../../constraint.js"></script>
+ <style>
+ .drop .drop-content {
+ min-height: 100px;
+ min-width: 100px;
+ }
+ </style>
+ <script>
+ $('.drop-target').each(function(){
+ new Drop({
+ target: this,
+ className: $(this).data().class || 'drop-theme-default',
+ attach: $(this).data().attach,
+ constrainToScrollParent: $(this).data().constrain,
+ openOn: 'click'
+ });
+ });
+ </script>
+ </body>
+</html>
diff --git a/templates/assets/tether/examples/out-of-bounds/index.html b/templates/assets/tether/examples/out-of-bounds/index.html
new file mode 100644
index 0000000..c2a8c6d
--- /dev/null
+++ b/templates/assets/tether/examples/out-of-bounds/index.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="chrome=1">
+ <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+ <link rel="stylesheet" href="../resources/css/base.css" />
+ <link rel="stylesheet" href="../common/css/style.css" />
+ <style>
+ .tether-element.tether-out-of-bounds {
+ display: none;
+ }
+ </style>
+ </head>
+ <body>
+ <div class="instructions">Resize the screen to see the tethered element disappear when it can't fit.</div>
+
+ <div class="element"></div>
+ <div class="target"></div>
+
+ <script src="//github.hubspot.com/tether/dist/js/tether.js"></script>
+ <script>
+ var tether = new Tether({
+ element: '.element',
+ target: '.target',
+ attachment: 'top left',
+ targetAttachment: 'top right',
+ constraints: [{
+ to: 'window',
+ attachment: 'together'
+ }]
+ });
+ tether.on('update', function(event) {
+ console.log(event);
+ });
+ </script>
+ </body>
+</html>
diff --git a/templates/assets/tether/examples/pin/index.html b/templates/assets/tether/examples/pin/index.html
new file mode 100644
index 0000000..cd040ab
--- /dev/null
+++ b/templates/assets/tether/examples/pin/index.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="chrome=1">
+ <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+ <link rel="stylesheet" href="../resources/css/base.css" />
+ <link rel="stylesheet" href="../common/css/style.css" />
+ </head>
+ <body>
+ <div class="instructions">Resize the screen to see the tethered element stick to the edges of the screen when it's resized.</div>
+
+ <div class="element"></div>
+ <div class="target"></div>
+
+ <script src="//github.hubspot.com/tether/dist/js/tether.js"></script>
+ <script>
+ new Tether({
+ element: '.element',
+ target: '.target',
+ attachment: 'top left',
+ targetAttachment: 'top right',
+ constraints: [{
+ to: 'window',
+ pin: true
+ }]
+ });
+ </script>
+ </body>
+</html>
diff --git a/templates/assets/tether/examples/resources/css/base.css b/templates/assets/tether/examples/resources/css/base.css
new file mode 100644
index 0000000..8006e9d
--- /dev/null
+++ b/templates/assets/tether/examples/resources/css/base.css
@@ -0,0 +1,10 @@
+body {
+ font-family: "Helvetica Neue", sans-serif;
+ color: #444;
+ margin: 0px;
+}
+
+a {
+ cursor: pointer;
+ color: blue;
+} \ No newline at end of file
diff --git a/templates/assets/tether/examples/resources/js/jquery.js b/templates/assets/tether/examples/resources/js/jquery.js
new file mode 100644
index 0000000..a4faed1
--- /dev/null
+++ b/templates/assets/tether/examples/resources/js/jquery.js
@@ -0,0 +1,9597 @@
+/*!
+ * jQuery JavaScript Library v1.9.1
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2013-2-4
+ */
+(function( window, undefined ) {
+
+// Can't do this because several apps including ASP.NET trace
+// the stack via arguments.caller.callee and Firefox dies if
+// you try to trace through "use strict" call chains. (#13335)
+// Support: Firefox 18+
+//"use strict";
+var
+ // The deferred used on DOM ready
+ readyList,
+
+ // A central reference to the root jQuery(document)
+ rootjQuery,
+
+ // Support: IE<9
+ // For `typeof node.method` instead of `node.method !== undefined`
+ core_strundefined = typeof undefined,
+
+ // Use the correct document accordingly with window argument (sandbox)
+ document = window.document,
+ location = window.location,
+
+ // Map over jQuery in case of overwrite
+ _jQuery = window.jQuery,
+
+ // Map over the $ in case of overwrite
+ _$ = window.$,
+
+ // [[Class]] -> type pairs
+ class2type = {},
+
+ // List of deleted data cache ids, so we can reuse them
+ core_deletedIds = [],
+
+ core_version = "1.9.1",
+
+ // Save a reference to some core methods
+ core_concat = core_deletedIds.concat,
+ core_push = core_deletedIds.push,
+ core_slice = core_deletedIds.slice,
+ core_indexOf = core_deletedIds.indexOf,
+ core_toString = class2type.toString,
+ core_hasOwn = class2type.hasOwnProperty,
+ core_trim = core_version.trim,
+
+ // Define a local copy of jQuery
+ jQuery = function( selector, context ) {
+ // The jQuery object is actually just the init constructor 'enhanced'
+ return new jQuery.fn.init( selector, context, rootjQuery );
+ },
+
+ // Used for matching numbers
+ core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
+
+ // Used for splitting on whitespace
+ core_rnotwhite = /\S+/g,
+
+ // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
+ rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
+
+ // A simple way to check for HTML strings
+ // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
+ // Strict HTML recognition (#11290: must start with <)
+ rquickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,
+
+ // Match a standalone tag
+ rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
+
+ // JSON RegExp
+ rvalidchars = /^[\],:{}\s]*$/,
+ rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+ rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
+ rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,
+
+ // Matches dashed string for camelizing
+ rmsPrefix = /^-ms-/,
+ rdashAlpha = /-([\da-z])/gi,
+
+ // Used by jQuery.camelCase as callback to replace()
+ fcamelCase = function( all, letter ) {
+ return letter.toUpperCase();
+ },
+
+ // The ready event handler
+ completed = function( event ) {
+
+ // readyState === "complete" is good enough for us to call the dom ready in oldIE
+ if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) {
+ detach();
+ jQuery.ready();
+ }
+ },
+ // Clean-up method for dom ready events
+ detach = function() {
+ if ( document.addEventListener ) {
+ document.removeEventListener( "DOMContentLoaded", completed, false );
+ window.removeEventListener( "load", completed, false );
+
+ } else {
+ document.detachEvent( "onreadystatechange", completed );
+ window.detachEvent( "onload", completed );
+ }
+ };
+
+jQuery.fn = jQuery.prototype = {
+ // The current version of jQuery being used
+ jquery: core_version,
+
+ constructor: jQuery,
+ init: function( selector, context, rootjQuery ) {
+ var match, elem;
+
+ // HANDLE: $(""), $(null), $(undefined), $(false)
+ if ( !selector ) {
+ return this;
+ }
+
+ // Handle HTML strings
+ if ( typeof selector === "string" ) {
+ if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
+ // Assume that strings that start and end with <> are HTML and skip the regex check
+ match = [ null, selector, null ];
+
+ } else {
+ match = rquickExpr.exec( selector );
+ }
+
+ // Match html or make sure no context is specified for #id
+ if ( match && (match[1] || !context) ) {
+
+ // HANDLE: $(html) -> $(array)
+ if ( match[1] ) {
+ context = context instanceof jQuery ? context[0] : context;
+
+ // scripts is true for back-compat
+ jQuery.merge( this, jQuery.parseHTML(
+ match[1],
+ context && context.nodeType ? context.ownerDocument || context : document,
+ true
+ ) );
+
+ // HANDLE: $(html, props)
+ if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
+ for ( match in context ) {
+ // Properties of context are called as methods if possible
+ if ( jQuery.isFunction( this[ match ] ) ) {
+ this[ match ]( context[ match ] );
+
+ // ...and otherwise set as attributes
+ } else {
+ this.attr( match, context[ match ] );
+ }
+ }
+ }
+
+ return this;
+
+ // HANDLE: $(#id)
+ } else {
+ elem = document.getElementById( match[2] );
+
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ if ( elem && elem.parentNode ) {
+ // Handle the case where IE and Opera return items
+ // by name instead of ID
+ if ( elem.id !== match[2] ) {
+ return rootjQuery.find( selector );
+ }
+
+ // Otherwise, we inject the element directly into the jQuery object
+ this.length = 1;
+ this[0] = elem;
+ }
+
+ this.context = document;
+ this.selector = selector;
+ return this;
+ }
+
+ // HANDLE: $(expr, $(...))
+ } else if ( !context || context.jquery ) {
+ return ( context || rootjQuery ).find( selector );
+
+ // HANDLE: $(expr, context)
+ // (which is just equivalent to: $(context).find(expr)
+ } else {
+ return this.constructor( context ).find( selector );
+ }
+
+ // HANDLE: $(DOMElement)
+ } else if ( selector.nodeType ) {
+ this.context = this[0] = selector;
+ this.length = 1;
+ return this;
+
+ // HANDLE: $(function)
+ // Shortcut for document ready
+ } else if ( jQuery.isFunction( selector ) ) {
+ return rootjQuery.ready( selector );
+ }
+
+ if ( selector.selector !== undefined ) {
+ this.selector = selector.selector;
+ this.context = selector.context;
+ }
+
+ return jQuery.makeArray( selector, this );
+ },
+
+ // Start with an empty selector
+ selector: "",
+
+ // The default length of a jQuery object is 0
+ length: 0,
+
+ // The number of elements contained in the matched element set
+ size: function() {
+ return this.length;
+ },
+
+ toArray: function() {
+ return core_slice.call( this );
+ },
+
+ // Get the Nth element in the matched element set OR
+ // Get the whole matched element set as a clean array
+ get: function( num ) {
+ return num == null ?
+
+ // Return a 'clean' array
+ this.toArray() :
+
+ // Return just the object
+ ( num < 0 ? this[ this.length + num ] : this[ num ] );
+ },
+
+ // Take an array of elements and push it onto the stack
+ // (returning the new matched element set)
+ pushStack: function( elems ) {
+
+ // Build a new jQuery matched element set
+ var ret = jQuery.merge( this.constructor(), elems );
+
+ // Add the old object onto the stack (as a reference)
+ ret.prevObject = this;
+ ret.context = this.context;
+
+ // Return the newly-formed element set
+ return ret;
+ },
+
+ // Execute a callback for every element in the matched set.
+ // (You can seed the arguments with an array of args, but this is
+ // only used internally.)
+ each: function( callback, args ) {
+ return jQuery.each( this, callback, args );
+ },
+
+ ready: function( fn ) {
+ // Add the callback
+ jQuery.ready.promise().done( fn );
+
+ return this;
+ },
+
+ slice: function() {
+ return this.pushStack( core_slice.apply( this, arguments ) );
+ },
+
+ first: function() {
+ return this.eq( 0 );
+ },
+
+ last: function() {
+ return this.eq( -1 );
+ },
+
+ eq: function( i ) {
+ var len = this.length,
+ j = +i + ( i < 0 ? len : 0 );
+ return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
+ },
+
+ map: function( callback ) {
+ return this.pushStack( jQuery.map(this, function( elem, i ) {
+ return callback.call( elem, i, elem );
+ }));
+ },
+
+ end: function() {
+ return this.prevObject || this.constructor(null);
+ },
+
+ // For internal use only.
+ // Behaves like an Array's method, not like a jQuery method.
+ push: core_push,
+ sort: [].sort,
+ splice: [].splice
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+jQuery.extend = jQuery.fn.extend = function() {
+ var src, copyIsArray, copy, name, options, clone,
+ target = arguments[0] || {},
+ i = 1,
+ length = arguments.length,
+ deep = false;
+
+ // Handle a deep copy situation
+ if ( typeof target === "boolean" ) {
+ deep = target;
+ target = arguments[1] || {};
+ // skip the boolean and the target
+ i = 2;
+ }
+
+ // Handle case when target is a string or something (possible in deep copy)
+ if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+ target = {};
+ }
+
+ // extend jQuery itself if only one argument is passed
+ if ( length === i ) {
+ target = this;
+ --i;
+ }
+
+ for ( ; i < length; i++ ) {
+ // Only deal with non-null/undefined values
+ if ( (options = arguments[ i ]) != null ) {
+ // Extend the base object
+ for ( name in options ) {
+ src = target[ name ];
+ copy = options[ name ];
+
+ // Prevent never-ending loop
+ if ( target === copy ) {
+ continue;
+ }
+
+ // Recurse if we're merging plain objects or arrays
+ if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+ if ( copyIsArray ) {
+ copyIsArray = false;
+ clone = src && jQuery.isArray(src) ? src : [];
+
+ } else {
+ clone = src && jQuery.isPlainObject(src) ? src : {};
+ }
+
+ // Never move original objects, clone them
+ target[ name ] = jQuery.extend( deep, clone, copy );
+
+ // Don't bring in undefined values
+ } else if ( copy !== undefined ) {
+ target[ name ] = copy;
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
+
+jQuery.extend({
+ noConflict: function( deep ) {
+ if ( window.$ === jQuery ) {
+ window.$ = _$;
+ }
+
+ if ( deep && window.jQuery === jQuery ) {
+ window.jQuery = _jQuery;
+ }
+
+ return jQuery;
+ },
+
+ // Is the DOM ready to be used? Set to true once it occurs.
+ isReady: false,
+
+ // A counter to track how many items to wait for before
+ // the ready event fires. See #6781
+ readyWait: 1,
+
+ // Hold (or release) the ready event
+ holdReady: function( hold ) {
+ if ( hold ) {
+ jQuery.readyWait++;
+ } else {
+ jQuery.ready( true );
+ }
+ },
+
+ // Handle when the DOM is ready
+ ready: function( wait ) {
+
+ // Abort if there are pending holds or we're already ready
+ if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
+ return;
+ }
+
+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+ if ( !document.body ) {
+ return setTimeout( jQuery.ready );
+ }
+
+ // Remember that the DOM is ready
+ jQuery.isReady = true;
+
+ // If a normal DOM Ready event fired, decrement, and wait if need be
+ if ( wait !== true && --jQuery.readyWait > 0 ) {
+ return;
+ }
+
+ // If there are functions bound, to execute
+ readyList.resolveWith( document, [ jQuery ] );
+
+ // Trigger any bound ready events
+ if ( jQuery.fn.trigger ) {
+ jQuery( document ).trigger("ready").off("ready");
+ }
+ },
+
+ // See test/unit/core.js for details concerning isFunction.
+ // Since version 1.3, DOM methods and functions like alert
+ // aren't supported. They return false on IE (#2968).
+ isFunction: function( obj ) {
+ return jQuery.type(obj) === "function";
+ },
+
+ isArray: Array.isArray || function( obj ) {
+ return jQuery.type(obj) === "array";
+ },
+
+ isWindow: function( obj ) {
+ return obj != null && obj == obj.window;
+ },
+
+ isNumeric: function( obj ) {
+ return !isNaN( parseFloat(obj) ) && isFinite( obj );
+ },
+
+ type: function( obj ) {
+ if ( obj == null ) {
+ return String( obj );
+ }
+ return typeof obj === "object" || typeof obj === "function" ?
+ class2type[ core_toString.call(obj) ] || "object" :
+ typeof obj;
+ },
+
+ isPlainObject: function( obj ) {
+ // Must be an Object.
+ // Because of IE, we also have to check the presence of the constructor property.
+ // Make sure that DOM nodes and window objects don't pass through, as well
+ if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ try {
+ // Not own constructor property must be Object
+ if ( obj.constructor &&
+ !core_hasOwn.call(obj, "constructor") &&
+ !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
+ return false;
+ }
+ } catch ( e ) {
+ // IE8,9 Will throw exceptions on certain host objects #9897
+ return false;
+ }
+
+ // Own properties are enumerated firstly, so to speed up,
+ // if last one is own, then all properties are own.
+
+ var key;
+ for ( key in obj ) {}
+
+ return key === undefined || core_hasOwn.call( obj, key );
+ },
+
+ isEmptyObject: function( obj ) {
+ var name;
+ for ( name in obj ) {
+ return false;
+ }
+ return true;
+ },
+
+ error: function( msg ) {
+ throw new Error( msg );
+ },
+
+ // data: string of html
+ // context (optional): If specified, the fragment will be created in this context, defaults to document
+ // keepScripts (optional): If true, will include scripts passed in the html string
+ parseHTML: function( data, context, keepScripts ) {
+ if ( !data || typeof data !== "string" ) {
+ return null;
+ }
+ if ( typeof context === "boolean" ) {
+ keepScripts = context;
+ context = false;
+ }
+ context = context || document;
+
+ var parsed = rsingleTag.exec( data ),
+ scripts = !keepScripts && [];
+
+ // Single tag
+ if ( parsed ) {
+ return [ context.createElement( parsed[1] ) ];
+ }
+
+ parsed = jQuery.buildFragment( [ data ], context, scripts );
+ if ( scripts ) {
+ jQuery( scripts ).remove();
+ }
+ return jQuery.merge( [], parsed.childNodes );
+ },
+
+ parseJSON: function( data ) {
+ // Attempt to parse using the native JSON parser first
+ if ( window.JSON && window.JSON.parse ) {
+ return window.JSON.parse( data );
+ }
+
+ if ( data === null ) {
+ return data;
+ }
+
+ if ( typeof data === "string" ) {
+
+ // Make sure leading/trailing whitespace is removed (IE can't handle it)
+ data = jQuery.trim( data );
+
+ if ( data ) {
+ // Make sure the incoming data is actual JSON
+ // Logic borrowed from http://json.org/json2.js
+ if ( rvalidchars.test( data.replace( rvalidescape, "@" )
+ .replace( rvalidtokens, "]" )
+ .replace( rvalidbraces, "")) ) {
+
+ return ( new Function( "return " + data ) )();
+ }
+ }
+ }
+
+ jQuery.error( "Invalid JSON: " + data );
+ },
+
+ // Cross-browser xml parsing
+ parseXML: function( data ) {
+ var xml, tmp;
+ if ( !data || typeof data !== "string" ) {
+ return null;
+ }
+ try {
+ if ( window.DOMParser ) { // Standard
+ tmp = new DOMParser();
+ xml = tmp.parseFromString( data , "text/xml" );
+ } else { // IE
+ xml = new ActiveXObject( "Microsoft.XMLDOM" );
+ xml.async = "false";
+ xml.loadXML( data );
+ }
+ } catch( e ) {
+ xml = undefined;
+ }
+ if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
+ jQuery.error( "Invalid XML: " + data );
+ }
+ return xml;
+ },
+
+ noop: function() {},
+
+ // Evaluates a script in a global context
+ // Workarounds based on findings by Jim Driscoll
+ // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
+ globalEval: function( data ) {
+ if ( data && jQuery.trim( data ) ) {
+ // We use execScript on Internet Explorer
+ // We use an anonymous function so that context is window
+ // rather than jQuery in Firefox
+ ( window.execScript || function( data ) {
+ window[ "eval" ].call( window, data );
+ } )( data );
+ }
+ },
+
+ // Convert dashed to camelCase; used by the css and data modules
+ // Microsoft forgot to hump their vendor prefix (#9572)
+ camelCase: function( string ) {
+ return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+ },
+
+ nodeName: function( elem, name ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+ },
+
+ // args is for internal usage only
+ each: function( obj, callback, args ) {
+ var value,
+ i = 0,
+ length = obj.length,
+ isArray = isArraylike( obj );
+
+ if ( args ) {
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback.apply( obj[ i ], args );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( i in obj ) {
+ value = callback.apply( obj[ i ], args );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ }
+
+ // A special, fast, case for the most common use of each
+ } else {
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback.call( obj[ i ], i, obj[ i ] );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( i in obj ) {
+ value = callback.call( obj[ i ], i, obj[ i ] );
+
+ if ( value === false ) {
+ break;
+ }
+ }
+ }
+ }
+
+ return obj;
+ },
+
+ // Use native String.trim function wherever possible
+ trim: core_trim && !core_trim.call("\uFEFF\xA0") ?
+ function( text ) {
+ return text == null ?
+ "" :
+ core_trim.call( text );
+ } :
+
+ // Otherwise use our own trimming functionality
+ function( text ) {
+ return text == null ?
+ "" :
+ ( text + "" ).replace( rtrim, "" );
+ },
+
+ // results is for internal usage only
+ makeArray: function( arr, results ) {
+ var ret = results || [];
+
+ if ( arr != null ) {
+ if ( isArraylike( Object(arr) ) ) {
+ jQuery.merge( ret,
+ typeof arr === "string" ?
+ [ arr ] : arr
+ );
+ } else {
+ core_push.call( ret, arr );
+ }
+ }
+
+ return ret;
+ },
+
+ inArray: function( elem, arr, i ) {
+ var len;
+
+ if ( arr ) {
+ if ( core_indexOf ) {
+ return core_indexOf.call( arr, elem, i );
+ }
+
+ len = arr.length;
+ i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
+
+ for ( ; i < len; i++ ) {
+ // Skip accessing in sparse arrays
+ if ( i in arr && arr[ i ] === elem ) {
+ return i;
+ }
+ }
+ }
+
+ return -1;
+ },
+
+ merge: function( first, second ) {
+ var l = second.length,
+ i = first.length,
+ j = 0;
+
+ if ( typeof l === "number" ) {
+ for ( ; j < l; j++ ) {
+ first[ i++ ] = second[ j ];
+ }
+ } else {
+ while ( second[j] !== undefined ) {
+ first[ i++ ] = second[ j++ ];
+ }
+ }
+
+ first.length = i;
+
+ return first;
+ },
+
+ grep: function( elems, callback, inv ) {
+ var retVal,
+ ret = [],
+ i = 0,
+ length = elems.length;
+ inv = !!inv;
+
+ // Go through the array, only saving the items
+ // that pass the validator function
+ for ( ; i < length; i++ ) {
+ retVal = !!callback( elems[ i ], i );
+ if ( inv !== retVal ) {
+ ret.push( elems[ i ] );
+ }
+ }
+
+ return ret;
+ },
+
+ // arg is for internal usage only
+ map: function( elems, callback, arg ) {
+ var value,
+ i = 0,
+ length = elems.length,
+ isArray = isArraylike( elems ),
+ ret = [];
+
+ // Go through the array, translating each of the items to their
+ if ( isArray ) {
+ for ( ; i < length; i++ ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret[ ret.length ] = value;
+ }
+ }
+
+ // Go through every key on the object,
+ } else {
+ for ( i in elems ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret[ ret.length ] = value;
+ }
+ }
+ }
+
+ // Flatten any nested arrays
+ return core_concat.apply( [], ret );
+ },
+
+ // A global GUID counter for objects
+ guid: 1,
+
+ // Bind a function to a context, optionally partially applying any
+ // arguments.
+ proxy: function( fn, context ) {
+ var args, proxy, tmp;
+
+ if ( typeof context === "string" ) {
+ tmp = fn[ context ];
+ context = fn;
+ fn = tmp;
+ }
+
+ // Quick check to determine if target is callable, in the spec
+ // this throws a TypeError, but we will just return undefined.
+ if ( !jQuery.isFunction( fn ) ) {
+ return undefined;
+ }
+
+ // Simulated bind
+ args = core_slice.call( arguments, 2 );
+ proxy = function() {
+ return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );
+ };
+
+ // Set the guid of unique handler to the same of original handler, so it can be removed
+ proxy.guid = fn.guid = fn.guid || jQuery.guid++;
+
+ return proxy;
+ },
+
+ // Multifunctional method to get and set values of a collection
+ // The value/s can optionally be executed if it's a function
+ access: function( elems, fn, key, value, chainable, emptyGet, raw ) {
+ var i = 0,
+ length = elems.length,
+ bulk = key == null;
+
+ // Sets many values
+ if ( jQuery.type( key ) === "object" ) {
+ chainable = true;
+ for ( i in key ) {
+ jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
+ }
+
+ // Sets one value
+ } else if ( value !== undefined ) {
+ chainable = true;
+
+ if ( !jQuery.isFunction( value ) ) {
+ raw = true;
+ }
+
+ if ( bulk ) {
+ // Bulk operations run against the entire set
+ if ( raw ) {
+ fn.call( elems, value );
+ fn = null;
+
+ // ...except when executing function values
+ } else {
+ bulk = fn;
+ fn = function( elem, key, value ) {
+ return bulk.call( jQuery( elem ), value );
+ };
+ }
+ }
+
+ if ( fn ) {
+ for ( ; i < length; i++ ) {
+ fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
+ }
+ }
+ }
+
+ return chainable ?
+ elems :
+
+ // Gets
+ bulk ?
+ fn.call( elems ) :
+ length ? fn( elems[0], key ) : emptyGet;
+ },
+
+ now: function() {
+ return ( new Date() ).getTime();
+ }
+});
+
+jQuery.ready.promise = function( obj ) {
+ if ( !readyList ) {
+
+ readyList = jQuery.Deferred();
+
+ // Catch cases where $(document).ready() is called after the browser event has already occurred.
+ // we once tried to use readyState "interactive" here, but it caused issues like the one
+ // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
+ if ( document.readyState === "complete" ) {
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
+ setTimeout( jQuery.ready );
+
+ // Standards-based browsers support DOMContentLoaded
+ } else if ( document.addEventListener ) {
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", completed, false );
+
+ // A fallback to window.onload, that will always work
+ window.addEventListener( "load", completed, false );
+
+ // If IE event model is used
+ } else {
+ // Ensure firing before onload, maybe late but safe also for iframes
+ document.attachEvent( "onreadystatechange", completed );
+
+ // A fallback to window.onload, that will always work
+ window.attachEvent( "onload", completed );
+
+ // If IE and not a frame
+ // continually check to see if the document is ready
+ var top = false;
+
+ try {
+ top = window.frameElement == null && document.documentElement;
+ } catch(e) {}
+
+ if ( top && top.doScroll ) {
+ (function doScrollCheck() {
+ if ( !jQuery.isReady ) {
+
+ try {
+ // Use the trick by Diego Perini
+ // http://javascript.nwbox.com/IEContentLoaded/
+ top.doScroll("left");
+ } catch(e) {
+ return setTimeout( doScrollCheck, 50 );
+ }
+
+ // detach all dom ready events
+ detach();
+
+ // and execute any waiting functions
+ jQuery.ready();
+ }
+ })();
+ }
+ }
+ }
+ return readyList.promise( obj );
+};
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
+ class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+function isArraylike( obj ) {
+ var length = obj.length,
+ type = jQuery.type( obj );
+
+ if ( jQuery.isWindow( obj ) ) {
+ return false;
+ }
+
+ if ( obj.nodeType === 1 && length ) {
+ return true;
+ }
+
+ return type === "array" || type !== "function" &&
+ ( length === 0 ||
+ typeof length === "number" && length > 0 && ( length - 1 ) in obj );
+}
+
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
+// String to Object options format cache
+var optionsCache = {};
+
+// Convert String-formatted options into Object-formatted ones and store in cache
+function createOptions( options ) {
+ var object = optionsCache[ options ] = {};
+ jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) {
+ object[ flag ] = true;
+ });
+ return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ * options: an optional list of space-separated options that will change how
+ * the callback list behaves or a more traditional option object
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible options:
+ *
+ * once: will ensure the callback list can only be fired once (like a Deferred)
+ *
+ * memory: will keep track of previous values and will call any callback added
+ * after the list has been fired right away with the latest "memorized"
+ * values (like a Deferred)
+ *
+ * unique: will ensure a callback can only be added once (no duplicate in the list)
+ *
+ * stopOnFalse: interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( options ) {
+
+ // Convert options from String-formatted to Object-formatted if needed
+ // (we check in cache first)
+ options = typeof options === "string" ?
+ ( optionsCache[ options ] || createOptions( options ) ) :
+ jQuery.extend( {}, options );
+
+ var // Flag to know if list is currently firing
+ firing,
+ // Last fire value (for non-forgettable lists)
+ memory,
+ // Flag to know if list was already fired
+ fired,
+ // End of the loop when firing
+ firingLength,
+ // Index of currently firing callback (modified by remove if needed)
+ firingIndex,
+ // First callback to fire (used internally by add and fireWith)
+ firingStart,
+ // Actual callback list
+ list = [],
+ // Stack of fire calls for repeatable lists
+ stack = !options.once && [],
+ // Fire callbacks
+ fire = function( data ) {
+ memory = options.memory && data;
+ fired = true;
+ firingIndex = firingStart || 0;
+ firingStart = 0;
+ firingLength = list.length;
+ firing = true;
+ for ( ; list && firingIndex < firingLength; firingIndex++ ) {
+ if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
+ memory = false; // To prevent further calls using add
+ break;
+ }
+ }
+ firing = false;
+ if ( list ) {
+ if ( stack ) {
+ if ( stack.length ) {
+ fire( stack.shift() );
+ }
+ } else if ( memory ) {
+ list = [];
+ } else {
+ self.disable();
+ }
+ }
+ },
+ // Actual Callbacks object
+ self = {
+ // Add a callback or a collection of callbacks to the list
+ add: function() {
+ if ( list ) {
+ // First, we save the current length
+ var start = list.length;
+ (function add( args ) {
+ jQuery.each( args, function( _, arg ) {
+ var type = jQuery.type( arg );
+ if ( type === "function" ) {
+ if ( !options.unique || !self.has( arg ) ) {
+ list.push( arg );
+ }
+ } else if ( arg && arg.length && type !== "string" ) {
+ // Inspect recursively
+ add( arg );
+ }
+ });
+ })( arguments );
+ // Do we need to add the callbacks to the
+ // current firing batch?
+ if ( firing ) {
+ firingLength = list.length;
+ // With memory, if we're not firing then
+ // we should call right away
+ } else if ( memory ) {
+ firingStart = start;
+ fire( memory );
+ }
+ }
+ return this;
+ },
+ // Remove a callback from the list
+ remove: function() {
+ if ( list ) {
+ jQuery.each( arguments, function( _, arg ) {
+ var index;
+ while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
+ list.splice( index, 1 );
+ // Handle firing indexes
+ if ( firing ) {
+ if ( index <= firingLength ) {
+ firingLength--;
+ }
+ if ( index <= firingIndex ) {
+ firingIndex--;
+ }
+ }
+ }
+ });
+ }
+ return this;
+ },
+ // Check if a given callback is in the list.
+ // If no argument is given, return whether or not list has callbacks attached.
+ has: function( fn ) {
+ return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
+ },
+ // Remove all callbacks from the list
+ empty: function() {
+ list = [];
+ return this;
+ },
+ // Have the list do nothing anymore
+ disable: function() {
+ list = stack = memory = undefined;
+ return this;
+ },
+ // Is it disabled?
+ disabled: function() {
+ return !list;
+ },
+ // Lock the list in its current state
+ lock: function() {
+ stack = undefined;
+ if ( !memory ) {
+ self.disable();
+ }
+ return this;
+ },
+ // Is it locked?
+ locked: function() {
+ return !stack;
+ },
+ // Call all callbacks with the given context and arguments
+ fireWith: function( context, args ) {
+ args = args || [];
+ args = [ context, args.slice ? args.slice() : args ];
+ if ( list && ( !fired || stack ) ) {
+ if ( firing ) {
+ stack.push( args );
+ } else {
+ fire( args );
+ }
+ }
+ return this;
+ },
+ // Call all the callbacks with the given arguments
+ fire: function() {
+ self.fireWith( this, arguments );
+ return this;
+ },
+ // To know if the callbacks have already been called at least once
+ fired: function() {
+ return !!fired;
+ }
+ };
+
+ return self;
+};
+jQuery.extend({
+
+ Deferred: function( func ) {
+ var tuples = [
+ // action, add listener, listener list, final state
+ [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
+ [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
+ [ "notify", "progress", jQuery.Callbacks("memory") ]
+ ],
+ state = "pending",
+ promise = {
+ state: function() {
+ return state;
+ },
+ always: function() {
+ deferred.done( arguments ).fail( arguments );
+ return this;
+ },
+ then: function( /* fnDone, fnFail, fnProgress */ ) {
+ var fns = arguments;
+ return jQuery.Deferred(function( newDefer ) {
+ jQuery.each( tuples, function( i, tuple ) {
+ var action = tuple[ 0 ],
+ fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
+ // deferred[ done | fail | progress ] for forwarding actions to newDefer
+ deferred[ tuple[1] ](function() {
+ var returned = fn && fn.apply( this, arguments );
+ if ( returned && jQuery.isFunction( returned.promise ) ) {
+ returned.promise()
+ .done( newDefer.resolve )
+ .fail( newDefer.reject )
+ .progress( newDefer.notify );
+ } else {
+ newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
+ }
+ });
+ });
+ fns = null;
+ }).promise();
+ },
+ // Get a promise for this deferred
+ // If obj is provided, the promise aspect is added to the object
+ promise: function( obj ) {
+ return obj != null ? jQuery.extend( obj, promise ) : promise;
+ }
+ },
+ deferred = {};
+
+ // Keep pipe for back-compat
+ promise.pipe = promise.then;
+
+ // Add list-specific methods
+ jQuery.each( tuples, function( i, tuple ) {
+ var list = tuple[ 2 ],
+ stateString = tuple[ 3 ];
+
+ // promise[ done | fail | progress ] = list.add
+ promise[ tuple[1] ] = list.add;
+
+ // Handle state
+ if ( stateString ) {
+ list.add(function() {
+ // state = [ resolved | rejected ]
+ state = stateString;
+
+ // [ reject_list | resolve_list ].disable; progress_list.lock
+ }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
+ }
+
+ // deferred[ resolve | reject | notify ]
+ deferred[ tuple[0] ] = function() {
+ deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
+ return this;
+ };
+ deferred[ tuple[0] + "With" ] = list.fireWith;
+ });
+
+ // Make the deferred a promise
+ promise.promise( deferred );
+
+ // Call given func if any
+ if ( func ) {
+ func.call( deferred, deferred );
+ }
+
+ // All done!
+ return deferred;
+ },
+
+ // Deferred helper
+ when: function( subordinate /* , ..., subordinateN */ ) {
+ var i = 0,
+ resolveValues = core_slice.call( arguments ),
+ length = resolveValues.length,
+
+ // the count of uncompleted subordinates
+ remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
+
+ // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
+ deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
+
+ // Update function for both resolve and progress values
+ updateFunc = function( i, contexts, values ) {
+ return function( value ) {
+ contexts[ i ] = this;
+ values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;
+ if( values === progressValues ) {
+ deferred.notifyWith( contexts, values );
+ } else if ( !( --remaining ) ) {
+ deferred.resolveWith( contexts, values );
+ }
+ };
+ },
+
+ progressValues, progressContexts, resolveContexts;
+
+ // add listeners to Deferred subordinates; treat others as resolved
+ if ( length > 1 ) {
+ progressValues = new Array( length );
+ progressContexts = new Array( length );
+ resolveContexts = new Array( length );
+ for ( ; i < length; i++ ) {
+ if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
+ resolveValues[ i ].promise()
+ .done( updateFunc( i, resolveContexts, resolveValues ) )
+ .fail( deferred.reject )
+ .progress( updateFunc( i, progressContexts, progressValues ) );
+ } else {
+ --remaining;
+ }
+ }
+ }
+
+ // if we're not waiting on anything, resolve the master
+ if ( !remaining ) {
+ deferred.resolveWith( resolveContexts, resolveValues );
+ }
+
+ return deferred.promise();
+ }
+});
+jQuery.support = (function() {
+
+ var support, all, a,
+ input, select, fragment,
+ opt, eventName, isSupported, i,
+ div = document.createElement("div");
+
+ // Setup
+ div.setAttribute( "className", "t" );
+ div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
+
+ // Support tests won't run in some limited or non-browser environments
+ all = div.getElementsByTagName("*");
+ a = div.getElementsByTagName("a")[ 0 ];
+ if ( !all || !a || !all.length ) {
+ return {};
+ }
+
+ // First batch of tests
+ select = document.createElement("select");
+ opt = select.appendChild( document.createElement("option") );
+ input = div.getElementsByTagName("input")[ 0 ];
+
+ a.style.cssText = "top:1px;float:left;opacity:.5";
+ support = {
+ // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
+ getSetAttribute: div.className !== "t",
+
+ // IE strips leading whitespace when .innerHTML is used
+ leadingWhitespace: div.firstChild.nodeType === 3,
+
+ // Make sure that tbody elements aren't automatically inserted
+ // IE will insert them into empty tables
+ tbody: !div.getElementsByTagName("tbody").length,
+
+ // Make sure that link elements get serialized correctly by innerHTML
+ // This requires a wrapper element in IE
+ htmlSerialize: !!div.getElementsByTagName("link").length,
+
+ // Get the style information from getAttribute
+ // (IE uses .cssText instead)
+ style: /top/.test( a.getAttribute("style") ),
+
+ // Make sure that URLs aren't manipulated
+ // (IE normalizes it by default)
+ hrefNormalized: a.getAttribute("href") === "/a",
+
+ // Make sure that element opacity exists
+ // (IE uses filter instead)
+ // Use a regex to work around a WebKit issue. See #5145
+ opacity: /^0.5/.test( a.style.opacity ),
+
+ // Verify style float existence
+ // (IE uses styleFloat instead of cssFloat)
+ cssFloat: !!a.style.cssFloat,
+
+ // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
+ checkOn: !!input.value,
+
+ // Make sure that a selected-by-default option has a working selected property.
+ // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
+ optSelected: opt.selected,
+
+ // Tests for enctype support on a form (#6743)
+ enctype: !!document.createElement("form").enctype,
+
+ // Makes sure cloning an html5 element does not cause problems
+ // Where outerHTML is undefined, this still works
+ html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>",
+
+ // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode
+ boxModel: document.compatMode === "CSS1Compat",
+
+ // Will be defined later
+ deleteExpando: true,
+ noCloneEvent: true,
+ inlineBlockNeedsLayout: false,
+ shrinkWrapBlocks: false,
+ reliableMarginRight: true,
+ boxSizingReliable: true,
+ pixelPosition: false
+ };
+
+ // Make sure checked status is properly cloned
+ input.checked = true;
+ support.noCloneChecked = input.cloneNode( true ).checked;
+
+ // Make sure that the options inside disabled selects aren't marked as disabled
+ // (WebKit marks them as disabled)
+ select.disabled = true;
+ support.optDisabled = !opt.disabled;
+
+ // Support: IE<9
+ try {
+ delete div.test;
+ } catch( e ) {
+ support.deleteExpando = false;
+ }
+
+ // Check if we can trust getAttribute("value")
+ input = document.createElement("input");
+ input.setAttribute( "value", "" );
+ support.input = input.getAttribute( "value" ) === "";
+
+ // Check if an input maintains its value after becoming a radio
+ input.value = "t";
+ input.setAttribute( "type", "radio" );
+ support.radioValue = input.value === "t";
+
+ // #11217 - WebKit loses check when the name is after the checked attribute
+ input.setAttribute( "checked", "t" );
+ input.setAttribute( "name", "t" );
+
+ fragment = document.createDocumentFragment();
+ fragment.appendChild( input );
+
+ // Check if a disconnected checkbox will retain its checked
+ // value of true after appended to the DOM (IE6/7)
+ support.appendChecked = input.checked;
+
+ // WebKit doesn't clone checked state correctly in fragments
+ support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+ // Support: IE<9
+ // Opera does not clone events (and typeof div.attachEvent === undefined).
+ // IE9-10 clones events bound via attachEvent, but they don't trigger with .click()
+ if ( div.attachEvent ) {
+ div.attachEvent( "onclick", function() {
+ support.noCloneEvent = false;
+ });
+
+ div.cloneNode( true ).click();
+ }
+
+ // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event)
+ // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP), test/csp.php
+ for ( i in { submit: true, change: true, focusin: true }) {
+ div.setAttribute( eventName = "on" + i, "t" );
+
+ support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false;
+ }
+
+ div.style.backgroundClip = "content-box";
+ div.cloneNode( true ).style.backgroundClip = "";
+ support.clearCloneStyle = div.style.backgroundClip === "content-box";
+
+ // Run tests that need a body at doc ready
+ jQuery(function() {
+ var container, marginDiv, tds,
+ divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",
+ body = document.getElementsByTagName("body")[0];
+
+ if ( !body ) {
+ // Return for frameset docs that don't have a body
+ return;
+ }
+
+ container = document.createElement("div");
+ container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";
+
+ body.appendChild( container ).appendChild( div );
+
+ // Support: IE8
+ // Check if table cells still have offsetWidth/Height when they are set
+ // to display:none and there are still other visible table cells in a
+ // table row; if so, offsetWidth/Height are not reliable for use when
+ // determining if an element has been hidden directly using
+ // display:none (it is still safe to use offsets if a parent element is
+ // hidden; don safety goggles and see bug #4512 for more information).
+ div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
+ tds = div.getElementsByTagName("td");
+ tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none";
+ isSupported = ( tds[ 0 ].offsetHeight === 0 );
+
+ tds[ 0 ].style.display = "";
+ tds[ 1 ].style.display = "none";
+
+ // Support: IE8
+ // Check if empty table cells still have offsetWidth/Height
+ support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
+
+ // Check box-sizing and margin behavior
+ div.innerHTML = "";
+ div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";
+ support.boxSizing = ( div.offsetWidth === 4 );
+ support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 );
+
+ // Use window.getComputedStyle because jsdom on node.js will break without it.
+ if ( window.getComputedStyle ) {
+ support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
+ support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
+
+ // Check if div with explicit width and no margin-right incorrectly
+ // gets computed margin-right based on width of container. (#3333)
+ // Fails in WebKit before Feb 2011 nightlies
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+ marginDiv = div.appendChild( document.createElement("div") );
+ marginDiv.style.cssText = div.style.cssText = divReset;
+ marginDiv.style.marginRight = marginDiv.style.width = "0";
+ div.style.width = "1px";
+
+ support.reliableMarginRight =
+ !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );
+ }
+
+ if ( typeof div.style.zoom !== core_strundefined ) {
+ // Support: IE<8
+ // Check if natively block-level elements act like inline-block
+ // elements when setting their display to 'inline' and giving
+ // them layout
+ div.innerHTML = "";
+ div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
+ support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
+
+ // Support: IE6
+ // Check if elements with layout shrink-wrap their children
+ div.style.display = "block";
+ div.innerHTML = "<div></div>";
+ div.firstChild.style.width = "5px";
+ support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
+
+ if ( support.inlineBlockNeedsLayout ) {
+ // Prevent IE 6 from affecting layout for positioned elements #11048
+ // Prevent IE from shrinking the body in IE 7 mode #12869
+ // Support: IE<8
+ body.style.zoom = 1;
+ }
+ }
+
+ body.removeChild( container );
+
+ // Null elements to avoid leaks in IE
+ container = div = tds = marginDiv = null;
+ });
+
+ // Null elements to avoid leaks in IE
+ all = select = fragment = opt = a = input = null;
+
+ return support;
+})();
+
+var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
+ rmultiDash = /([A-Z])/g;
+
+function internalData( elem, name, data, pvt /* Internal Use Only */ ){
+ if ( !jQuery.acceptData( elem ) ) {
+ return;
+ }
+
+ var thisCache, ret,
+ internalKey = jQuery.expando,
+ getByName = typeof name === "string",
+
+ // We have to handle DOM nodes and JS objects differently because IE6-7
+ // can't GC object references properly across the DOM-JS boundary
+ isNode = elem.nodeType,
+
+ // Only DOM nodes need the global jQuery cache; JS object data is
+ // attached directly to the object so GC can occur automatically
+ cache = isNode ? jQuery.cache : elem,
+
+ // Only defining an ID for JS objects if its cache already exists allows
+ // the code to shortcut on the same path as a DOM node with no cache
+ id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
+
+ // Avoid doing any more work than we need to when trying to get data on an
+ // object that has no data at all
+ if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) {
+ return;
+ }
+
+ if ( !id ) {
+ // Only DOM nodes need a new unique ID for each element since their data
+ // ends up in the global cache
+ if ( isNode ) {
+ elem[ internalKey ] = id = core_deletedIds.pop() || jQuery.guid++;
+ } else {
+ id = internalKey;
+ }
+ }
+
+ if ( !cache[ id ] ) {
+ cache[ id ] = {};
+
+ // Avoids exposing jQuery metadata on plain JS objects when the object
+ // is serialized using JSON.stringify
+ if ( !isNode ) {
+ cache[ id ].toJSON = jQuery.noop;
+ }
+ }
+
+ // An object can be passed to jQuery.data instead of a key/value pair; this gets
+ // shallow copied over onto the existing cache
+ if ( typeof name === "object" || typeof name === "function" ) {
+ if ( pvt ) {
+ cache[ id ] = jQuery.extend( cache[ id ], name );
+ } else {
+ cache[ id ].data = jQuery.extend( cache[ id ].data, name );
+ }
+ }
+
+ thisCache = cache[ id ];
+
+ // jQuery data() is stored in a separate object inside the object's internal data
+ // cache in order to avoid key collisions between internal data and user-defined
+ // data.
+ if ( !pvt ) {
+ if ( !thisCache.data ) {
+ thisCache.data = {};
+ }
+
+ thisCache = thisCache.data;
+ }
+
+ if ( data !== undefined ) {
+ thisCache[ jQuery.camelCase( name ) ] = data;
+ }
+
+ // Check for both converted-to-camel and non-converted data property names
+ // If a data property was specified
+ if ( getByName ) {
+
+ // First Try to find as-is property data
+ ret = thisCache[ name ];
+
+ // Test for null|undefined property data
+ if ( ret == null ) {
+
+ // Try to find the camelCased property
+ ret = thisCache[ jQuery.camelCase( name ) ];
+ }
+ } else {
+ ret = thisCache;
+ }
+
+ return ret;
+}
+
+function internalRemoveData( elem, name, pvt ) {
+ if ( !jQuery.acceptData( elem ) ) {
+ return;
+ }
+
+ var i, l, thisCache,
+ isNode = elem.nodeType,
+
+ // See jQuery.data for more information
+ cache = isNode ? jQuery.cache : elem,
+ id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
+
+ // If there is already no cache entry for this object, there is no
+ // purpose in continuing
+ if ( !cache[ id ] ) {
+ return;
+ }
+
+ if ( name ) {
+
+ thisCache = pvt ? cache[ id ] : cache[ id ].data;
+
+ if ( thisCache ) {
+
+ // Support array or space separated string names for data keys
+ if ( !jQuery.isArray( name ) ) {
+
+ // try the string as a key before any manipulation
+ if ( name in thisCache ) {
+ name = [ name ];
+ } else {
+
+ // split the camel cased version by spaces unless a key with the spaces exists
+ name = jQuery.camelCase( name );
+ if ( name in thisCache ) {
+ name = [ name ];
+ } else {
+ name = name.split(" ");
+ }
+ }
+ } else {
+ // If "name" is an array of keys...
+ // When data is initially created, via ("key", "val") signature,
+ // keys will be converted to camelCase.
+ // Since there is no way to tell _how_ a key was added, remove
+ // both plain key and camelCase key. #12786
+ // This will only penalize the array argument path.
+ name = name.concat( jQuery.map( name, jQuery.camelCase ) );
+ }
+
+ for ( i = 0, l = name.length; i < l; i++ ) {
+ delete thisCache[ name[i] ];
+ }
+
+ // If there is no data left in the cache, we want to continue
+ // and let the cache object itself get destroyed
+ if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
+ return;
+ }
+ }
+ }
+
+ // See jQuery.data for more information
+ if ( !pvt ) {
+ delete cache[ id ].data;
+
+ // Don't destroy the parent cache unless the internal data object
+ // had been the only thing left in it
+ if ( !isEmptyDataObject( cache[ id ] ) ) {
+ return;
+ }
+ }
+
+ // Destroy the cache
+ if ( isNode ) {
+ jQuery.cleanData( [ elem ], true );
+
+ // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
+ } else if ( jQuery.support.deleteExpando || cache != cache.window ) {
+ delete cache[ id ];
+
+ // When all else fails, null
+ } else {
+ cache[ id ] = null;
+ }
+}
+
+jQuery.extend({
+ cache: {},
+
+ // Unique for each copy of jQuery on the page
+ // Non-digits removed to match rinlinejQuery
+ expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ),
+
+ // The following elements throw uncatchable exceptions if you
+ // attempt to add expando properties to them.
+ noData: {
+ "embed": true,
+ // Ban all objects except for Flash (which handle expandos)
+ "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
+ "applet": true
+ },
+
+ hasData: function( elem ) {
+ elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
+ return !!elem && !isEmptyDataObject( elem );
+ },
+
+ data: function( elem, name, data ) {
+ return internalData( elem, name, data );
+ },
+
+ removeData: function( elem, name ) {
+ return internalRemoveData( elem, name );
+ },
+
+ // For internal use only.
+ _data: function( elem, name, data ) {
+ return internalData( elem, name, data, true );
+ },
+
+ _removeData: function( elem, name ) {
+ return internalRemoveData( elem, name, true );
+ },
+
+ // A method for determining if a DOM node can handle the data expando
+ acceptData: function( elem ) {
+ // Do not set data on non-element because it will not be cleared (#8335).
+ if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) {
+ return false;
+ }
+
+ var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];
+
+ // nodes accept data unless otherwise specified; rejection can be conditional
+ return !noData || noData !== true && elem.getAttribute("classid") === noData;
+ }
+});
+
+jQuery.fn.extend({
+ data: function( key, value ) {
+ var attrs, name,
+ elem = this[0],
+ i = 0,
+ data = null;
+
+ // Gets all values
+ if ( key === undefined ) {
+ if ( this.length ) {
+ data = jQuery.data( elem );
+
+ if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
+ attrs = elem.attributes;
+ for ( ; i < attrs.length; i++ ) {
+ name = attrs[i].name;
+
+ if ( !name.indexOf( "data-" ) ) {
+ name = jQuery.camelCase( name.slice(5) );
+
+ dataAttr( elem, name, data[ name ] );
+ }
+ }
+ jQuery._data( elem, "parsedAttrs", true );
+ }
+ }
+
+ return data;
+ }
+
+ // Sets multiple values
+ if ( typeof key === "object" ) {
+ return this.each(function() {
+ jQuery.data( this, key );
+ });
+ }
+
+ return jQuery.access( this, function( value ) {
+
+ if ( value === undefined ) {
+ // Try to fetch any internally stored data first
+ return elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null;
+ }
+
+ this.each(function() {
+ jQuery.data( this, key, value );
+ });
+ }, null, value, arguments.length > 1, null, true );
+ },
+
+ removeData: function( key ) {
+ return this.each(function() {
+ jQuery.removeData( this, key );
+ });
+ }
+});
+
+function dataAttr( elem, key, data ) {
+ // If nothing was found internally, try to fetch any
+ // data from the HTML5 data-* attribute
+ if ( data === undefined && elem.nodeType === 1 ) {
+
+ var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
+
+ data = elem.getAttribute( name );
+
+ if ( typeof data === "string" ) {
+ try {
+ data = data === "true" ? true :
+ data === "false" ? false :
+ data === "null" ? null :
+ // Only convert to a number if it doesn't change the string
+ +data + "" === data ? +data :
+ rbrace.test( data ) ? jQuery.parseJSON( data ) :
+ data;
+ } catch( e ) {}
+
+ // Make sure we set the data so it isn't changed later
+ jQuery.data( elem, key, data );
+
+ } else {
+ data = undefined;
+ }
+ }
+
+ return data;
+}
+
+// checks a cache object for emptiness
+function isEmptyDataObject( obj ) {
+ var name;
+ for ( name in obj ) {
+
+ // if the public data object is empty, the private is still empty
+ if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
+ continue;
+ }
+ if ( name !== "toJSON" ) {
+ return false;
+ }
+ }
+
+ return true;
+}
+jQuery.extend({
+ queue: function( elem, type, data ) {
+ var queue;
+
+ if ( elem ) {
+ type = ( type || "fx" ) + "queue";
+ queue = jQuery._data( elem, type );
+
+ // Speed up dequeue by getting out quickly if this is just a lookup
+ if ( data ) {
+ if ( !queue || jQuery.isArray(data) ) {
+ queue = jQuery._data( elem, type, jQuery.makeArray(data) );
+ } else {
+ queue.push( data );
+ }
+ }
+ return queue || [];
+ }
+ },
+
+ dequeue: function( elem, type ) {
+ type = type || "fx";
+
+ var queue = jQuery.queue( elem, type ),
+ startLength = queue.length,
+ fn = queue.shift(),
+ hooks = jQuery._queueHooks( elem, type ),
+ next = function() {
+ jQuery.dequeue( elem, type );
+ };
+
+ // If the fx queue is dequeued, always remove the progress sentinel
+ if ( fn === "inprogress" ) {
+ fn = queue.shift();
+ startLength--;
+ }
+
+ hooks.cur = fn;
+ if ( fn ) {
+
+ // Add a progress sentinel to prevent the fx queue from being
+ // automatically dequeued
+ if ( type === "fx" ) {
+ queue.unshift( "inprogress" );
+ }
+
+ // clear up the last queue stop function
+ delete hooks.stop;
+ fn.call( elem, next, hooks );
+ }
+
+ if ( !startLength && hooks ) {
+ hooks.empty.fire();
+ }
+ },
+
+ // not intended for public consumption - generates a queueHooks object, or returns the current one
+ _queueHooks: function( elem, type ) {
+ var key = type + "queueHooks";
+ return jQuery._data( elem, key ) || jQuery._data( elem, key, {
+ empty: jQuery.Callbacks("once memory").add(function() {
+ jQuery._removeData( elem, type + "queue" );
+ jQuery._removeData( elem, key );
+ })
+ });
+ }
+});
+
+jQuery.fn.extend({
+ queue: function( type, data ) {
+ var setter = 2;
+
+ if ( typeof type !== "string" ) {
+ data = type;
+ type = "fx";
+ setter--;
+ }
+
+ if ( arguments.length < setter ) {
+ return jQuery.queue( this[0], type );
+ }
+
+ return data === undefined ?
+ this :
+ this.each(function() {
+ var queue = jQuery.queue( this, type, data );
+
+ // ensure a hooks for this queue
+ jQuery._queueHooks( this, type );
+
+ if ( type === "fx" && queue[0] !== "inprogress" ) {
+ jQuery.dequeue( this, type );
+ }
+ });
+ },
+ dequeue: function( type ) {
+ return this.each(function() {
+ jQuery.dequeue( this, type );
+ });
+ },
+ // Based off of the plugin by Clint Helfers, with permission.
+ // http://blindsignals.com/index.php/2009/07/jquery-delay/
+ delay: function( time, type ) {
+ time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
+ type = type || "fx";
+
+ return this.queue( type, function( next, hooks ) {
+ var timeout = setTimeout( next, time );
+ hooks.stop = function() {
+ clearTimeout( timeout );
+ };
+ });
+ },
+ clearQueue: function( type ) {
+ return this.queue( type || "fx", [] );
+ },
+ // Get a promise resolved when queues of a certain type
+ // are emptied (fx is the type by default)
+ promise: function( type, obj ) {
+ var tmp,
+ count = 1,
+ defer = jQuery.Deferred(),
+ elements = this,
+ i = this.length,
+ resolve = function() {
+ if ( !( --count ) ) {
+ defer.resolveWith( elements, [ elements ] );
+ }
+ };
+
+ if ( typeof type !== "string" ) {
+ obj = type;
+ type = undefined;
+ }
+ type = type || "fx";
+
+ while( i-- ) {
+ tmp = jQuery._data( elements[ i ], type + "queueHooks" );
+ if ( tmp && tmp.empty ) {
+ count++;
+ tmp.empty.add( resolve );
+ }
+ }
+ resolve();
+ return defer.promise( obj );
+ }
+});
+var nodeHook, boolHook,
+ rclass = /[\t\r\n]/g,
+ rreturn = /\r/g,
+ rfocusable = /^(?:input|select|textarea|button|object)$/i,
+ rclickable = /^(?:a|area)$/i,
+ rboolean = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,
+ ruseDefault = /^(?:checked|selected)$/i,
+ getSetAttribute = jQuery.support.getSetAttribute,
+ getSetInput = jQuery.support.input;
+
+jQuery.fn.extend({
+ attr: function( name, value ) {
+ return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
+ },
+
+ removeAttr: function( name ) {
+ return this.each(function() {
+ jQuery.removeAttr( this, name );
+ });
+ },
+
+ prop: function( name, value ) {
+ return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
+ },
+
+ removeProp: function( name ) {
+ name = jQuery.propFix[ name ] || name;
+ return this.each(function() {
+ // try/catch handles cases where IE balks (such as removing a property on window)
+ try {
+ this[ name ] = undefined;
+ delete this[ name ];
+ } catch( e ) {}
+ });
+ },
+
+ addClass: function( value ) {
+ var classes, elem, cur, clazz, j,
+ i = 0,
+ len = this.length,
+ proceed = typeof value === "string" && value;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( j ) {
+ jQuery( this ).addClass( value.call( this, j, this.className ) );
+ });
+ }
+
+ if ( proceed ) {
+ // The disjunction here is for better compressibility (see removeClass)
+ classes = ( value || "" ).match( core_rnotwhite ) || [];
+
+ for ( ; i < len; i++ ) {
+ elem = this[ i ];
+ cur = elem.nodeType === 1 && ( elem.className ?
+ ( " " + elem.className + " " ).replace( rclass, " " ) :
+ " "
+ );
+
+ if ( cur ) {
+ j = 0;
+ while ( (clazz = classes[j++]) ) {
+ if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
+ cur += clazz + " ";
+ }
+ }
+ elem.className = jQuery.trim( cur );
+
+ }
+ }
+ }
+
+ return this;
+ },
+
+ removeClass: function( value ) {
+ var classes, elem, cur, clazz, j,
+ i = 0,
+ len = this.length,
+ proceed = arguments.length === 0 || typeof value === "string" && value;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( j ) {
+ jQuery( this ).removeClass( value.call( this, j, this.className ) );
+ });
+ }
+ if ( proceed ) {
+ classes = ( value || "" ).match( core_rnotwhite ) || [];
+
+ for ( ; i < len; i++ ) {
+ elem = this[ i ];
+ // This expression is here for better compressibility (see addClass)
+ cur = elem.nodeType === 1 && ( elem.className ?
+ ( " " + elem.className + " " ).replace( rclass, " " ) :
+ ""
+ );
+
+ if ( cur ) {
+ j = 0;
+ while ( (clazz = classes[j++]) ) {
+ // Remove *all* instances
+ while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
+ cur = cur.replace( " " + clazz + " ", " " );
+ }
+ }
+ elem.className = value ? jQuery.trim( cur ) : "";
+ }
+ }
+ }
+
+ return this;
+ },
+
+ toggleClass: function( value, stateVal ) {
+ var type = typeof value,
+ isBool = typeof stateVal === "boolean";
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( i ) {
+ jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
+ });
+ }
+
+ return this.each(function() {
+ if ( type === "string" ) {
+ // toggle individual class names
+ var className,
+ i = 0,
+ self = jQuery( this ),
+ state = stateVal,
+ classNames = value.match( core_rnotwhite ) || [];
+
+ while ( (className = classNames[ i++ ]) ) {
+ // check each className given, space separated list
+ state = isBool ? state : !self.hasClass( className );
+ self[ state ? "addClass" : "removeClass" ]( className );
+ }
+
+ // Toggle whole class name
+ } else if ( type === core_strundefined || type === "boolean" ) {
+ if ( this.className ) {
+ // store className if set
+ jQuery._data( this, "__className__", this.className );
+ }
+
+ // If the element has a class name or if we're passed "false",
+ // then remove the whole classname (if there was one, the above saved it).
+ // Otherwise bring back whatever was previously saved (if anything),
+ // falling back to the empty string if nothing was stored.
+ this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
+ }
+ });
+ },
+
+ hasClass: function( selector ) {
+ var className = " " + selector + " ",
+ i = 0,
+ l = this.length;
+ for ( ; i < l; i++ ) {
+ if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
+ return true;
+ }
+ }
+
+ return false;
+ },
+
+ val: function( value ) {
+ var ret, hooks, isFunction,
+ elem = this[0];
+
+ if ( !arguments.length ) {
+ if ( elem ) {
+ hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
+
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
+ return ret;
+ }
+
+ ret = elem.value;
+
+ return typeof ret === "string" ?
+ // handle most common string cases
+ ret.replace(rreturn, "") :
+ // handle cases where value is null/undef or number
+ ret == null ? "" : ret;
+ }
+
+ return;
+ }
+
+ isFunction = jQuery.isFunction( value );
+
+ return this.each(function( i ) {
+ var val,
+ self = jQuery(this);
+
+ if ( this.nodeType !== 1 ) {
+ return;
+ }
+
+ if ( isFunction ) {
+ val = value.call( this, i, self.val() );
+ } else {
+ val = value;
+ }
+
+ // Treat null/undefined as ""; convert numbers to string
+ if ( val == null ) {
+ val = "";
+ } else if ( typeof val === "number" ) {
+ val += "";
+ } else if ( jQuery.isArray( val ) ) {
+ val = jQuery.map(val, function ( value ) {
+ return value == null ? "" : value + "";
+ });
+ }
+
+ hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
+
+ // If set returns undefined, fall back to normal setting
+ if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
+ this.value = val;
+ }
+ });
+ }
+});
+
+jQuery.extend({
+ valHooks: {
+ option: {
+ get: function( elem ) {
+ // attributes.value is undefined in Blackberry 4.7 but
+ // uses .value. See #6932
+ var val = elem.attributes.value;
+ return !val || val.specified ? elem.value : elem.text;
+ }
+ },
+ select: {
+ get: function( elem ) {
+ var value, option,
+ options = elem.options,
+ index = elem.selectedIndex,
+ one = elem.type === "select-one" || index < 0,
+ values = one ? null : [],
+ max = one ? index + 1 : options.length,
+ i = index < 0 ?
+ max :
+ one ? index : 0;
+
+ // Loop through all the selected options
+ for ( ; i < max; i++ ) {
+ option = options[ i ];
+
+ // oldIE doesn't update selected after form reset (#2551)
+ if ( ( option.selected || i === index ) &&
+ // Don't return options that are disabled or in a disabled optgroup
+ ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
+ ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
+
+ // Get the specific value for the option
+ value = jQuery( option ).val();
+
+ // We don't need an array for one selects
+ if ( one ) {
+ return value;
+ }
+
+ // Multi-Selects return an array
+ values.push( value );
+ }
+ }
+
+ return values;
+ },
+
+ set: function( elem, value ) {
+ var values = jQuery.makeArray( value );
+
+ jQuery(elem).find("option").each(function() {
+ this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
+ });
+
+ if ( !values.length ) {
+ elem.selectedIndex = -1;
+ }
+ return values;
+ }
+ }
+ },
+
+ attr: function( elem, name, value ) {
+ var hooks, notxml, ret,
+ nType = elem.nodeType;
+
+ // don't get/set attributes on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return;
+ }
+
+ // Fallback to prop when attributes are not supported
+ if ( typeof elem.getAttribute === core_strundefined ) {
+ return jQuery.prop( elem, name, value );
+ }
+
+ notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+ // All attributes are lowercase
+ // Grab necessary hook if one is defined
+ if ( notxml ) {
+ name = name.toLowerCase();
+ hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
+ }
+
+ if ( value !== undefined ) {
+
+ if ( value === null ) {
+ jQuery.removeAttr( elem, name );
+
+ } else if ( hooks && notxml && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+ return ret;
+
+ } else {
+ elem.setAttribute( name, value + "" );
+ return value;
+ }
+
+ } else if ( hooks && notxml && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
+ return ret;
+
+ } else {
+
+ // In IE9+, Flash objects don't have .getAttribute (#12945)
+ // Support: IE9+
+ if ( typeof elem.getAttribute !== core_strundefined ) {
+ ret = elem.getAttribute( name );
+ }
+
+ // Non-existent attributes return null, we normalize to undefined
+ return ret == null ?
+ undefined :
+ ret;
+ }
+ },
+
+ removeAttr: function( elem, value ) {
+ var name, propName,
+ i = 0,
+ attrNames = value && value.match( core_rnotwhite );
+
+ if ( attrNames && elem.nodeType === 1 ) {
+ while ( (name = attrNames[i++]) ) {
+ propName = jQuery.propFix[ name ] || name;
+
+ // Boolean attributes get special treatment (#10870)
+ if ( rboolean.test( name ) ) {
+ // Set corresponding property to false for boolean attributes
+ // Also clear defaultChecked/defaultSelected (if appropriate) for IE<8
+ if ( !getSetAttribute && ruseDefault.test( name ) ) {
+ elem[ jQuery.camelCase( "default-" + name ) ] =
+ elem[ propName ] = false;
+ } else {
+ elem[ propName ] = false;
+ }
+
+ // See #9699 for explanation of this approach (setting first, then removal)
+ } else {
+ jQuery.attr( elem, name, "" );
+ }
+
+ elem.removeAttribute( getSetAttribute ? name : propName );
+ }
+ }
+ },
+
+ attrHooks: {
+ type: {
+ set: function( elem, value ) {
+ if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
+ // Setting the type on a radio button after the value resets the value in IE6-9
+ // Reset value to default in case type is set after value during creation
+ var val = elem.value;
+ elem.setAttribute( "type", value );
+ if ( val ) {
+ elem.value = val;
+ }
+ return value;
+ }
+ }
+ }
+ },
+
+ propFix: {
+ tabindex: "tabIndex",
+ readonly: "readOnly",
+ "for": "htmlFor",
+ "class": "className",
+ maxlength: "maxLength",
+ cellspacing: "cellSpacing",
+ cellpadding: "cellPadding",
+ rowspan: "rowSpan",
+ colspan: "colSpan",
+ usemap: "useMap",
+ frameborder: "frameBorder",
+ contenteditable: "contentEditable"
+ },
+
+ prop: function( elem, name, value ) {
+ var ret, hooks, notxml,
+ nType = elem.nodeType;
+
+ // don't get/set properties on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return;
+ }
+
+ notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+ if ( notxml ) {
+ // Fix name and attach hooks
+ name = jQuery.propFix[ name ] || name;
+ hooks = jQuery.propHooks[ name ];
+ }
+
+ if ( value !== undefined ) {
+ if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+ return ret;
+
+ } else {
+ return ( elem[ name ] = value );
+ }
+
+ } else {
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
+ return ret;
+
+ } else {
+ return elem[ name ];
+ }
+ }
+ },
+
+ propHooks: {
+ tabIndex: {
+ get: function( elem ) {
+ // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
+ // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+ var attributeNode = elem.getAttributeNode("tabindex");
+
+ return attributeNode && attributeNode.specified ?
+ parseInt( attributeNode.value, 10 ) :
+ rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
+ 0 :
+ undefined;
+ }
+ }
+ }
+});
+
+// Hook for boolean attributes
+boolHook = {
+ get: function( elem, name ) {
+ var
+ // Use .prop to determine if this attribute is understood as boolean
+ prop = jQuery.prop( elem, name ),
+
+ // Fetch it accordingly
+ attr = typeof prop === "boolean" && elem.getAttribute( name ),
+ detail = typeof prop === "boolean" ?
+
+ getSetInput && getSetAttribute ?
+ attr != null :
+ // oldIE fabricates an empty string for missing boolean attributes
+ // and conflates checked/selected into attroperties
+ ruseDefault.test( name ) ?
+ elem[ jQuery.camelCase( "default-" + name ) ] :
+ !!attr :
+
+ // fetch an attribute node for properties not recognized as boolean
+ elem.getAttributeNode( name );
+
+ return detail && detail.value !== false ?
+ name.toLowerCase() :
+ undefined;
+ },
+ set: function( elem, value, name ) {
+ if ( value === false ) {
+ // Remove boolean attributes when set to false
+ jQuery.removeAttr( elem, name );
+ } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
+ // IE<8 needs the *property* name
+ elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );
+
+ // Use defaultChecked and defaultSelected for oldIE
+ } else {
+ elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true;
+ }
+
+ return name;
+ }
+};
+
+// fix oldIE value attroperty
+if ( !getSetInput || !getSetAttribute ) {
+ jQuery.attrHooks.value = {
+ get: function( elem, name ) {
+ var ret = elem.getAttributeNode( name );
+ return jQuery.nodeName( elem, "input" ) ?
+
+ // Ignore the value *property* by using defaultValue
+ elem.defaultValue :
+
+ ret && ret.specified ? ret.value : undefined;
+ },
+ set: function( elem, value, name ) {
+ if ( jQuery.nodeName( elem, "input" ) ) {
+ // Does not return so that setAttribute is also used
+ elem.defaultValue = value;
+ } else {
+ // Use nodeHook if defined (#1954); otherwise setAttribute is fine
+ return nodeHook && nodeHook.set( elem, value, name );
+ }
+ }
+ };
+}
+
+// IE6/7 do not support getting/setting some attributes with get/setAttribute
+if ( !getSetAttribute ) {
+
+ // Use this for any attribute in IE6/7
+ // This fixes almost every IE6/7 issue
+ nodeHook = jQuery.valHooks.button = {
+ get: function( elem, name ) {
+ var ret = elem.getAttributeNode( name );
+ return ret && ( name === "id" || name === "name" || name === "coords" ? ret.value !== "" : ret.specified ) ?
+ ret.value :
+ undefined;
+ },
+ set: function( elem, value, name ) {
+ // Set the existing or create a new attribute node
+ var ret = elem.getAttributeNode( name );
+ if ( !ret ) {
+ elem.setAttributeNode(
+ (ret = elem.ownerDocument.createAttribute( name ))
+ );
+ }
+
+ ret.value = value += "";
+
+ // Break association with cloned elements by also using setAttribute (#9646)
+ return name === "value" || value === elem.getAttribute( name ) ?
+ value :
+ undefined;
+ }
+ };
+
+ // Set contenteditable to false on removals(#10429)
+ // Setting to empty string throws an error as an invalid value
+ jQuery.attrHooks.contenteditable = {
+ get: nodeHook.get,
+ set: function( elem, value, name ) {
+ nodeHook.set( elem, value === "" ? false : value, name );
+ }
+ };
+
+ // Set width and height to auto instead of 0 on empty string( Bug #8150 )
+ // This is for removals
+ jQuery.each([ "width", "height" ], function( i, name ) {
+ jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+ set: function( elem, value ) {
+ if ( value === "" ) {
+ elem.setAttribute( name, "auto" );
+ return value;
+ }
+ }
+ });
+ });
+}
+
+
+// Some attributes require a special call on IE
+// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
+if ( !jQuery.support.hrefNormalized ) {
+ jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
+ jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+ get: function( elem ) {
+ var ret = elem.getAttribute( name, 2 );
+ return ret == null ? undefined : ret;
+ }
+ });
+ });
+
+ // href/src property should get the full normalized URL (#10299/#12915)
+ jQuery.each([ "href", "src" ], function( i, name ) {
+ jQuery.propHooks[ name ] = {
+ get: function( elem ) {
+ return elem.getAttribute( name, 4 );
+ }
+ };
+ });
+}
+
+if ( !jQuery.support.style ) {
+ jQuery.attrHooks.style = {
+ get: function( elem ) {
+ // Return undefined in the case of empty string
+ // Note: IE uppercases css property names, but if we were to .toLowerCase()
+ // .cssText, that would destroy case senstitivity in URL's, like in "background"
+ return elem.style.cssText || undefined;
+ },
+ set: function( elem, value ) {
+ return ( elem.style.cssText = value + "" );
+ }
+ };
+}
+
+// Safari mis-reports the default selected property of an option
+// Accessing the parent's selectedIndex property fixes it
+if ( !jQuery.support.optSelected ) {
+ jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
+ get: function( elem ) {
+ var parent = elem.parentNode;
+
+ if ( parent ) {
+ parent.selectedIndex;
+
+ // Make sure that it also works with optgroups, see #5701
+ if ( parent.parentNode ) {
+ parent.parentNode.selectedIndex;
+ }
+ }
+ return null;
+ }
+ });
+}
+
+// IE6/7 call enctype encoding
+if ( !jQuery.support.enctype ) {
+ jQuery.propFix.enctype = "encoding";
+}
+
+// Radios and checkboxes getter/setter
+if ( !jQuery.support.checkOn ) {
+ jQuery.each([ "radio", "checkbox" ], function() {
+ jQuery.valHooks[ this ] = {
+ get: function( elem ) {
+ // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
+ return elem.getAttribute("value") === null ? "on" : elem.value;
+ }
+ };
+ });
+}
+jQuery.each([ "radio", "checkbox" ], function() {
+ jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
+ set: function( elem, value ) {
+ if ( jQuery.isArray( value ) ) {
+ return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
+ }
+ }
+ });
+});
+var rformElems = /^(?:input|select|textarea)$/i,
+ rkeyEvent = /^key/,
+ rmouseEvent = /^(?:mouse|contextmenu)|click/,
+ rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
+ rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
+
+function returnTrue() {
+ return true;
+}
+
+function returnFalse() {
+ return false;
+}
+
+/*
+ * Helper functions for managing events -- not part of the public interface.
+ * Props to Dean Edwards' addEvent library for many of the ideas.
+ */
+jQuery.event = {
+
+ global: {},
+
+ add: function( elem, types, handler, data, selector ) {
+ var tmp, events, t, handleObjIn,
+ special, eventHandle, handleObj,
+ handlers, type, namespaces, origType,
+ elemData = jQuery._data( elem );
+
+ // Don't attach events to noData or text/comment nodes (but allow plain objects)
+ if ( !elemData ) {
+ return;
+ }
+
+ // Caller can pass in an object of custom data in lieu of the handler
+ if ( handler.handler ) {
+ handleObjIn = handler;
+ handler = handleObjIn.handler;
+ selector = handleObjIn.selector;
+ }
+
+ // Make sure that the handler has a unique ID, used to find/remove it later
+ if ( !handler.guid ) {
+ handler.guid = jQuery.guid++;
+ }
+
+ // Init the element's event structure and main handler, if this is the first
+ if ( !(events = elemData.events) ) {
+ events = elemData.events = {};
+ }
+ if ( !(eventHandle = elemData.handle) ) {
+ eventHandle = elemData.handle = function( e ) {
+ // Discard the second event of a jQuery.event.trigger() and
+ // when an event is called after a page has unloaded
+ return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ?
+ jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
+ undefined;
+ };
+ // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
+ eventHandle.elem = elem;
+ }
+
+ // Handle multiple events separated by a space
+ // jQuery(...).bind("mouseover mouseout", fn);
+ types = ( types || "" ).match( core_rnotwhite ) || [""];
+ t = types.length;
+ while ( t-- ) {
+ tmp = rtypenamespace.exec( types[t] ) || [];
+ type = origType = tmp[1];
+ namespaces = ( tmp[2] || "" ).split( "." ).sort();
+
+ // If event changes its type, use the special event handlers for the changed type
+ special = jQuery.event.special[ type ] || {};
+
+ // If selector defined, determine special event api type, otherwise given type
+ type = ( selector ? special.delegateType : special.bindType ) || type;
+
+ // Update special based on newly reset type
+ special = jQuery.event.special[ type ] || {};
+
+ // handleObj is passed to all event handlers
+ handleObj = jQuery.extend({
+ type: type,
+ origType: origType,
+ data: data,
+ handler: handler,
+ guid: handler.guid,
+ selector: selector,
+ needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
+ namespace: namespaces.join(".")
+ }, handleObjIn );
+
+ // Init the event handler queue if we're the first
+ if ( !(handlers = events[ type ]) ) {
+ handlers = events[ type ] = [];
+ handlers.delegateCount = 0;
+
+ // Only use addEventListener/attachEvent if the special events handler returns false
+ if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+ // Bind the global event handler to the element
+ if ( elem.addEventListener ) {
+ elem.addEventListener( type, eventHandle, false );
+
+ } else if ( elem.attachEvent ) {
+ elem.attachEvent( "on" + type, eventHandle );
+ }
+ }
+ }
+
+ if ( special.add ) {
+ special.add.call( elem, handleObj );
+
+ if ( !handleObj.handler.guid ) {
+ handleObj.handler.guid = handler.guid;
+ }
+ }
+
+ // Add to the element's handler list, delegates in front
+ if ( selector ) {
+ handlers.splice( handlers.delegateCount++, 0, handleObj );
+ } else {
+ handlers.push( handleObj );
+ }
+
+ // Keep track of which events have ever been used, for event optimization
+ jQuery.event.global[ type ] = true;
+ }
+
+ // Nullify elem to prevent memory leaks in IE
+ elem = null;
+ },
+
+ // Detach an event or set of events from an element
+ remove: function( elem, types, handler, selector, mappedTypes ) {
+ var j, handleObj, tmp,
+ origCount, t, events,
+ special, handlers, type,
+ namespaces, origType,
+ elemData = jQuery.hasData( elem ) && jQuery._data( elem );
+
+ if ( !elemData || !(events = elemData.events) ) {
+ return;
+ }
+
+ // Once for each type.namespace in types; type may be omitted
+ types = ( types || "" ).match( core_rnotwhite ) || [""];
+ t = types.length;
+ while ( t-- ) {
+ tmp = rtypenamespace.exec( types[t] ) || [];
+ type = origType = tmp[1];
+ namespaces = ( tmp[2] || "" ).split( "." ).sort();
+
+ // Unbind all events (on this namespace, if provided) for the element
+ if ( !type ) {
+ for ( type in events ) {
+ jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
+ }
+ continue;
+ }
+
+ special = jQuery.event.special[ type ] || {};
+ type = ( selector ? special.delegateType : special.bindType ) || type;
+ handlers = events[ type ] || [];
+ tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );
+
+ // Remove matching events
+ origCount = j = handlers.length;
+ while ( j-- ) {
+ handleObj = handlers[ j ];
+
+ if ( ( mappedTypes || origType === handleObj.origType ) &&
+ ( !handler || handler.guid === handleObj.guid ) &&
+ ( !tmp || tmp.test( handleObj.namespace ) ) &&
+ ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
+ handlers.splice( j, 1 );
+
+ if ( handleObj.selector ) {
+ handlers.delegateCount--;
+ }
+ if ( special.remove ) {
+ special.remove.call( elem, handleObj );
+ }
+ }
+ }
+
+ // Remove generic event handler if we removed something and no more handlers exist
+ // (avoids potential for endless recursion during removal of special event handlers)
+ if ( origCount && !handlers.length ) {
+ if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
+ jQuery.removeEvent( elem, type, elemData.handle );
+ }
+
+ delete events[ type ];
+ }
+ }
+
+ // Remove the expando if it's no longer used
+ if ( jQuery.isEmptyObject( events ) ) {
+ delete elemData.handle;
+
+ // removeData also checks for emptiness and clears the expando if empty
+ // so use it instead of delete
+ jQuery._removeData( elem, "events" );
+ }
+ },
+
+ trigger: function( event, data, elem, onlyHandlers ) {
+ var handle, ontype, cur,
+ bubbleType, special, tmp, i,
+ eventPath = [ elem || document ],
+ type = core_hasOwn.call( event, "type" ) ? event.type : event,
+ namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : [];
+
+ cur = tmp = elem = elem || document;
+
+ // Don't do events on text and comment nodes
+ if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+ return;
+ }
+
+ // focus/blur morphs to focusin/out; ensure we're not firing them right now
+ if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
+ return;
+ }
+
+ if ( type.indexOf(".") >= 0 ) {
+ // Namespaced trigger; create a regexp to match event type in handle()
+ namespaces = type.split(".");
+ type = namespaces.shift();
+ namespaces.sort();
+ }
+ ontype = type.indexOf(":") < 0 && "on" + type;
+
+ // Caller can pass in a jQuery.Event object, Object, or just an event type string
+ event = event[ jQuery.expando ] ?
+ event :
+ new jQuery.Event( type, typeof event === "object" && event );
+
+ event.isTrigger = true;
+ event.namespace = namespaces.join(".");
+ event.namespace_re = event.namespace ?
+ new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
+ null;
+
+ // Clean up the event in case it is being reused
+ event.result = undefined;
+ if ( !event.target ) {
+ event.target = elem;
+ }
+
+ // Clone any incoming data and prepend the event, creating the handler arg list
+ data = data == null ?
+ [ event ] :
+ jQuery.makeArray( data, [ event ] );
+
+ // Allow special events to draw outside the lines
+ special = jQuery.event.special[ type ] || {};
+ if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
+ return;
+ }
+
+ // Determine event propagation path in advance, per W3C events spec (#9951)
+ // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
+ if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
+
+ bubbleType = special.delegateType || type;
+ if ( !rfocusMorph.test( bubbleType + type ) ) {
+ cur = cur.parentNode;
+ }
+ for ( ; cur; cur = cur.parentNode ) {
+ eventPath.push( cur );
+ tmp = cur;
+ }
+
+ // Only add window if we got to document (e.g., not plain obj or detached DOM)
+ if ( tmp === (elem.ownerDocument || document) ) {
+ eventPath.push( tmp.defaultView || tmp.parentWindow || window );
+ }
+ }
+
+ // Fire handlers on the event path
+ i = 0;
+ while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {
+
+ event.type = i > 1 ?
+ bubbleType :
+ special.bindType || type;
+
+ // jQuery handler
+ handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
+ if ( handle ) {
+ handle.apply( cur, data );
+ }
+
+ // Native handler
+ handle = ontype && cur[ ontype ];
+ if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {
+ event.preventDefault();
+ }
+ }
+ event.type = type;
+
+ // If nobody prevented the default action, do it now
+ if ( !onlyHandlers && !event.isDefaultPrevented() ) {
+
+ if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&
+ !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
+
+ // Call a native DOM method on the target with the same name name as the event.
+ // Can't use an .isFunction() check here because IE6/7 fails that test.
+ // Don't do default actions on window, that's where global variables be (#6170)
+ if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {
+
+ // Don't re-trigger an onFOO event when we call its FOO() method
+ tmp = elem[ ontype ];
+
+ if ( tmp ) {
+ elem[ ontype ] = null;
+ }
+
+ // Prevent re-triggering of the same event, since we already bubbled it above
+ jQuery.event.triggered = type;
+ try {
+ elem[ type ]();
+ } catch ( e ) {
+ // IE<9 dies on focus/blur to hidden element (#1486,#12518)
+ // only reproducible on winXP IE8 native, not IE9 in IE8 mode
+ }
+ jQuery.event.triggered = undefined;
+
+ if ( tmp ) {
+ elem[ ontype ] = tmp;
+ }
+ }
+ }
+ }
+
+ return event.result;
+ },
+
+ dispatch: function( event ) {
+
+ // Make a writable jQuery.Event from the native event object
+ event = jQuery.event.fix( event );
+
+ var i, ret, handleObj, matched, j,
+ handlerQueue = [],
+ args = core_slice.call( arguments ),
+ handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [],
+ special = jQuery.event.special[ event.type ] || {};
+
+ // Use the fix-ed jQuery.Event rather than the (read-only) native event
+ args[0] = event;
+ event.delegateTarget = this;
+
+ // Call the preDispatch hook for the mapped type, and let it bail if desired
+ if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
+ return;
+ }
+
+ // Determine handlers
+ handlerQueue = jQuery.event.handlers.call( this, event, handlers );
+
+ // Run delegates first; they may want to stop propagation beneath us
+ i = 0;
+ while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {
+ event.currentTarget = matched.elem;
+
+ j = 0;
+ while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
+
+ // Triggered event must either 1) have no namespace, or
+ // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
+ if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
+
+ event.handleObj = handleObj;
+ event.data = handleObj.data;
+
+ ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
+ .apply( matched.elem, args );
+
+ if ( ret !== undefined ) {
+ if ( (event.result = ret) === false ) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ }
+ }
+ }
+ }
+
+ // Call the postDispatch hook for the mapped type
+ if ( special.postDispatch ) {
+ special.postDispatch.call( this, event );
+ }
+
+ return event.result;
+ },
+
+ handlers: function( event, handlers ) {
+ var sel, handleObj, matches, i,
+ handlerQueue = [],
+ delegateCount = handlers.delegateCount,
+ cur = event.target;
+
+ // Find delegate handlers
+ // Black-hole SVG <use> instance trees (#13180)
+ // Avoid non-left-click bubbling in Firefox (#3861)
+ if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
+
+ for ( ; cur != this; cur = cur.parentNode || this ) {
+
+ // Don't check non-elements (#13208)
+ // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
+ if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) {
+ matches = [];
+ for ( i = 0; i < delegateCount; i++ ) {
+ handleObj = handlers[ i ];
+
+ // Don't conflict with Object.prototype properties (#13203)
+ sel = handleObj.selector + " ";
+
+ if ( matches[ sel ] === undefined ) {
+ matches[ sel ] = handleObj.needsContext ?
+ jQuery( sel, this ).index( cur ) >= 0 :
+ jQuery.find( sel, this, null, [ cur ] ).length;
+ }
+ if ( matches[ sel ] ) {
+ matches.push( handleObj );
+ }
+ }
+ if ( matches.length ) {
+ handlerQueue.push({ elem: cur, handlers: matches });
+ }
+ }
+ }
+ }
+
+ // Add the remaining (directly-bound) handlers
+ if ( delegateCount < handlers.length ) {
+ handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });
+ }
+
+ return handlerQueue;
+ },
+
+ fix: function( event ) {
+ if ( event[ jQuery.expando ] ) {
+ return event;
+ }
+
+ // Create a writable copy of the event object and normalize some properties
+ var i, prop, copy,
+ type = event.type,
+ originalEvent = event,
+ fixHook = this.fixHooks[ type ];
+
+ if ( !fixHook ) {
+ this.fixHooks[ type ] = fixHook =
+ rmouseEvent.test( type ) ? this.mouseHooks :
+ rkeyEvent.test( type ) ? this.keyHooks :
+ {};
+ }
+ copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
+
+ event = new jQuery.Event( originalEvent );
+
+ i = copy.length;
+ while ( i-- ) {
+ prop = copy[ i ];
+ event[ prop ] = originalEvent[ prop ];
+ }
+
+ // Support: IE<9
+ // Fix target property (#1925)
+ if ( !event.target ) {
+ event.target = originalEvent.srcElement || document;
+ }
+
+ // Support: Chrome 23+, Safari?
+ // Target should not be a text node (#504, #13143)
+ if ( event.target.nodeType === 3 ) {
+ event.target = event.target.parentNode;
+ }
+
+ // Support: IE<9
+ // For mouse/key events, metaKey==false if it's undefined (#3368, #11328)
+ event.metaKey = !!event.metaKey;
+
+ return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
+ },
+
+ // Includes some event props shared by KeyEvent and MouseEvent
+ props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
+
+ fixHooks: {},
+
+ keyHooks: {
+ props: "char charCode key keyCode".split(" "),
+ filter: function( event, original ) {
+
+ // Add which for key events
+ if ( event.which == null ) {
+ event.which = original.charCode != null ? original.charCode : original.keyCode;
+ }
+
+ return event;
+ }
+ },
+
+ mouseHooks: {
+ props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
+ filter: function( event, original ) {
+ var body, eventDoc, doc,
+ button = original.button,
+ fromElement = original.fromElement;
+
+ // Calculate pageX/Y if missing and clientX/Y available
+ if ( event.pageX == null && original.clientX != null ) {
+ eventDoc = event.target.ownerDocument || document;
+ doc = eventDoc.documentElement;
+ body = eventDoc.body;
+
+ event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
+ event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
+ }
+
+ // Add relatedTarget, if necessary
+ if ( !event.relatedTarget && fromElement ) {
+ event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
+ }
+
+ // Add which for click: 1 === left; 2 === middle; 3 === right
+ // Note: button is not normalized, so don't use it
+ if ( !event.which && button !== undefined ) {
+ event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
+ }
+
+ return event;
+ }
+ },
+
+ special: {
+ load: {
+ // Prevent triggered image.load events from bubbling to window.load
+ noBubble: true
+ },
+ click: {
+ // For checkbox, fire native event so checked state will be right
+ trigger: function() {
+ if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) {
+ this.click();
+ return false;
+ }
+ }
+ },
+ focus: {
+ // Fire native event if possible so blur/focus sequence is correct
+ trigger: function() {
+ if ( this !== document.activeElement && this.focus ) {
+ try {
+ this.focus();
+ return false;
+ } catch ( e ) {
+ // Support: IE<9
+ // If we error on focus to hidden element (#1486, #12518),
+ // let .trigger() run the handlers
+ }
+ }
+ },
+ delegateType: "focusin"
+ },
+ blur: {
+ trigger: function() {
+ if ( this === document.activeElement && this.blur ) {
+ this.blur();
+ return false;
+ }
+ },
+ delegateType: "focusout"
+ },
+
+ beforeunload: {
+ postDispatch: function( event ) {
+
+ // Even when returnValue equals to undefined Firefox will still show alert
+ if ( event.result !== undefined ) {
+ event.originalEvent.returnValue = event.result;
+ }
+ }
+ }
+ },
+
+ simulate: function( type, elem, event, bubble ) {
+ // Piggyback on a donor event to simulate a different one.
+ // Fake originalEvent to avoid donor's stopPropagation, but if the
+ // simulated event prevents default then we do the same on the donor.
+ var e = jQuery.extend(
+ new jQuery.Event(),
+ event,
+ { type: type,
+ isSimulated: true,
+ originalEvent: {}
+ }
+ );
+ if ( bubble ) {
+ jQuery.event.trigger( e, null, elem );
+ } else {
+ jQuery.event.dispatch.call( elem, e );
+ }
+ if ( e.isDefaultPrevented() ) {
+ event.preventDefault();
+ }
+ }
+};
+
+jQuery.removeEvent = document.removeEventListener ?
+ function( elem, type, handle ) {
+ if ( elem.removeEventListener ) {
+ elem.removeEventListener( type, handle, false );
+ }
+ } :
+ function( elem, type, handle ) {
+ var name = "on" + type;
+
+ if ( elem.detachEvent ) {
+
+ // #8545, #7054, preventing memory leaks for custom events in IE6-8
+ // detachEvent needed property on element, by name of that event, to properly expose it to GC
+ if ( typeof elem[ name ] === core_strundefined ) {
+ elem[ name ] = null;
+ }
+
+ elem.detachEvent( name, handle );
+ }
+ };
+
+jQuery.Event = function( src, props ) {
+ // Allow instantiation without the 'new' keyword
+ if ( !(this instanceof jQuery.Event) ) {
+ return new jQuery.Event( src, props );
+ }
+
+ // Event object
+ if ( src && src.type ) {
+ this.originalEvent = src;
+ this.type = src.type;
+
+ // Events bubbling up the document may have been marked as prevented
+ // by a handler lower down the tree; reflect the correct value.
+ this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
+ src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
+
+ // Event type
+ } else {
+ this.type = src;
+ }
+
+ // Put explicitly provided properties onto the event object
+ if ( props ) {
+ jQuery.extend( this, props );
+ }
+
+ // Create a timestamp if incoming event doesn't have one
+ this.timeStamp = src && src.timeStamp || jQuery.now();
+
+ // Mark it as fixed
+ this[ jQuery.expando ] = true;
+};
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+ isDefaultPrevented: returnFalse,
+ isPropagationStopped: returnFalse,
+ isImmediatePropagationStopped: returnFalse,
+
+ preventDefault: function() {
+ var e = this.originalEvent;
+
+ this.isDefaultPrevented = returnTrue;
+ if ( !e ) {
+ return;
+ }
+
+ // If preventDefault exists, run it on the original event
+ if ( e.preventDefault ) {
+ e.preventDefault();
+
+ // Support: IE
+ // Otherwise set the returnValue property of the original event to false
+ } else {
+ e.returnValue = false;
+ }
+ },
+ stopPropagation: function() {
+ var e = this.originalEvent;
+
+ this.isPropagationStopped = returnTrue;
+ if ( !e ) {
+ return;
+ }
+ // If stopPropagation exists, run it on the original event
+ if ( e.stopPropagation ) {
+ e.stopPropagation();
+ }
+
+ // Support: IE
+ // Set the cancelBubble property of the original event to true
+ e.cancelBubble = true;
+ },
+ stopImmediatePropagation: function() {
+ this.isImmediatePropagationStopped = returnTrue;
+ this.stopPropagation();
+ }
+};
+
+// Create mouseenter/leave events using mouseover/out and event-time checks
+jQuery.each({
+ mouseenter: "mouseover",
+ mouseleave: "mouseout"
+}, function( orig, fix ) {
+ jQuery.event.special[ orig ] = {
+ delegateType: fix,
+ bindType: fix,
+
+ handle: function( event ) {
+ var ret,
+ target = this,
+ related = event.relatedTarget,
+ handleObj = event.handleObj;
+
+ // For mousenter/leave call the handler if related is outside the target.
+ // NB: No relatedTarget if the mouse left/entered the browser window
+ if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
+ event.type = handleObj.origType;
+ ret = handleObj.handler.apply( this, arguments );
+ event.type = fix;
+ }
+ return ret;
+ }
+ };
+});
+
+// IE submit delegation
+if ( !jQuery.support.submitBubbles ) {
+
+ jQuery.event.special.submit = {
+ setup: function() {
+ // Only need this for delegated form submit events
+ if ( jQuery.nodeName( this, "form" ) ) {
+ return false;
+ }
+
+ // Lazy-add a submit handler when a descendant form may potentially be submitted
+ jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
+ // Node name check avoids a VML-related crash in IE (#9807)
+ var elem = e.target,
+ form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
+ if ( form && !jQuery._data( form, "submitBubbles" ) ) {
+ jQuery.event.add( form, "submit._submit", function( event ) {
+ event._submit_bubble = true;
+ });
+ jQuery._data( form, "submitBubbles", true );
+ }
+ });
+ // return undefined since we don't need an event listener
+ },
+
+ postDispatch: function( event ) {
+ // If form was submitted by the user, bubble the event up the tree
+ if ( event._submit_bubble ) {
+ delete event._submit_bubble;
+ if ( this.parentNode && !event.isTrigger ) {
+ jQuery.event.simulate( "submit", this.parentNode, event, true );
+ }
+ }
+ },
+
+ teardown: function() {
+ // Only need this for delegated form submit events
+ if ( jQuery.nodeName( this, "form" ) ) {
+ return false;
+ }
+
+ // Remove delegated handlers; cleanData eventually reaps submit handlers attached above
+ jQuery.event.remove( this, "._submit" );
+ }
+ };
+}
+
+// IE change delegation and checkbox/radio fix
+if ( !jQuery.support.changeBubbles ) {
+
+ jQuery.event.special.change = {
+
+ setup: function() {
+
+ if ( rformElems.test( this.nodeName ) ) {
+ // IE doesn't fire change on a check/radio until blur; trigger it on click
+ // after a propertychange. Eat the blur-change in special.change.handle.
+ // This still fires onchange a second time for check/radio after blur.
+ if ( this.type === "checkbox" || this.type === "radio" ) {
+ jQuery.event.add( this, "propertychange._change", function( event ) {
+ if ( event.originalEvent.propertyName === "checked" ) {
+ this._just_changed = true;
+ }
+ });
+ jQuery.event.add( this, "click._change", function( event ) {
+ if ( this._just_changed && !event.isTrigger ) {
+ this._just_changed = false;
+ }
+ // Allow triggered, simulated change events (#11500)
+ jQuery.event.simulate( "change", this, event, true );
+ });
+ }
+ return false;
+ }
+ // Delegated event; lazy-add a change handler on descendant inputs
+ jQuery.event.add( this, "beforeactivate._change", function( e ) {
+ var elem = e.target;
+
+ if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) {
+ jQuery.event.add( elem, "change._change", function( event ) {
+ if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
+ jQuery.event.simulate( "change", this.parentNode, event, true );
+ }
+ });
+ jQuery._data( elem, "changeBubbles", true );
+ }
+ });
+ },
+
+ handle: function( event ) {
+ var elem = event.target;
+
+ // Swallow native change events from checkbox/radio, we already triggered them above
+ if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
+ return event.handleObj.handler.apply( this, arguments );
+ }
+ },
+
+ teardown: function() {
+ jQuery.event.remove( this, "._change" );
+
+ return !rformElems.test( this.nodeName );
+ }
+ };
+}
+
+// Create "bubbling" focus and blur events
+if ( !jQuery.support.focusinBubbles ) {
+ jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+
+ // Attach a single capturing handler while someone wants focusin/focusout
+ var attaches = 0,
+ handler = function( event ) {
+ jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
+ };
+
+ jQuery.event.special[ fix ] = {
+ setup: function() {
+ if ( attaches++ === 0 ) {
+ document.addEventListener( orig, handler, true );
+ }
+ },
+ teardown: function() {
+ if ( --attaches === 0 ) {
+ document.removeEventListener( orig, handler, true );
+ }
+ }
+ };
+ });
+}
+
+jQuery.fn.extend({
+
+ on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
+ var type, origFn;
+
+ // Types can be a map of types/handlers
+ if ( typeof types === "object" ) {
+ // ( types-Object, selector, data )
+ if ( typeof selector !== "string" ) {
+ // ( types-Object, data )
+ data = data || selector;
+ selector = undefined;
+ }
+ for ( type in types ) {
+ this.on( type, selector, data, types[ type ], one );
+ }
+ return this;
+ }
+
+ if ( data == null && fn == null ) {
+ // ( types, fn )
+ fn = selector;
+ data = selector = undefined;
+ } else if ( fn == null ) {
+ if ( typeof selector === "string" ) {
+ // ( types, selector, fn )
+ fn = data;
+ data = undefined;
+ } else {
+ // ( types, data, fn )
+ fn = data;
+ data = selector;
+ selector = undefined;
+ }
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ } else if ( !fn ) {
+ return this;
+ }
+
+ if ( one === 1 ) {
+ origFn = fn;
+ fn = function( event ) {
+ // Can use an empty set, since event contains the info
+ jQuery().off( event );
+ return origFn.apply( this, arguments );
+ };
+ // Use same guid so caller can remove using origFn
+ fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
+ }
+ return this.each( function() {
+ jQuery.event.add( this, types, fn, data, selector );
+ });
+ },
+ one: function( types, selector, data, fn ) {
+ return this.on( types, selector, data, fn, 1 );
+ },
+ off: function( types, selector, fn ) {
+ var handleObj, type;
+ if ( types && types.preventDefault && types.handleObj ) {
+ // ( event ) dispatched jQuery.Event
+ handleObj = types.handleObj;
+ jQuery( types.delegateTarget ).off(
+ handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
+ handleObj.selector,
+ handleObj.handler
+ );
+ return this;
+ }
+ if ( typeof types === "object" ) {
+ // ( types-object [, selector] )
+ for ( type in types ) {
+ this.off( type, selector, types[ type ] );
+ }
+ return this;
+ }
+ if ( selector === false || typeof selector === "function" ) {
+ // ( types [, fn] )
+ fn = selector;
+ selector = undefined;
+ }
+ if ( fn === false ) {
+ fn = returnFalse;
+ }
+ return this.each(function() {
+ jQuery.event.remove( this, types, fn, selector );
+ });
+ },
+
+ bind: function( types, data, fn ) {
+ return this.on( types, null, data, fn );
+ },
+ unbind: function( types, fn ) {
+ return this.off( types, null, fn );
+ },
+
+ delegate: function( selector, types, data, fn ) {
+ return this.on( types, selector, data, fn );
+ },
+ undelegate: function( selector, types, fn ) {
+ // ( namespace ) or ( selector, types [, fn] )
+ return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
+ },
+
+ trigger: function( type, data ) {
+ return this.each(function() {
+ jQuery.event.trigger( type, data, this );
+ });
+ },
+ triggerHandler: function( type, data ) {
+ var elem = this[0];
+ if ( elem ) {
+ return jQuery.event.trigger( type, data, elem, true );
+ }
+ }
+});
+/*!
+ * Sizzle CSS Selector Engine
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license
+ * http://sizzlejs.com/
+ */
+(function( window, undefined ) {
+
+var i,
+ cachedruns,
+ Expr,
+ getText,
+ isXML,
+ compile,
+ hasDuplicate,
+ outermostContext,
+
+ // Local document vars
+ setDocument,
+ document,
+ docElem,
+ documentIsXML,
+ rbuggyQSA,
+ rbuggyMatches,
+ matches,
+ contains,
+ sortOrder,
+
+ // Instance-specific data
+ expando = "sizzle" + -(new Date()),
+ preferredDoc = window.document,
+ support = {},
+ dirruns = 0,
+ done = 0,
+ classCache = createCache(),
+ tokenCache = createCache(),
+ compilerCache = createCache(),
+
+ // General-purpose constants
+ strundefined = typeof undefined,
+ MAX_NEGATIVE = 1 << 31,
+
+ // Array methods
+ arr = [],
+ pop = arr.pop,
+ push = arr.push,
+ slice = arr.slice,
+ // Use a stripped-down indexOf if we can't use a native one
+ indexOf = arr.indexOf || function( elem ) {
+ var i = 0,
+ len = this.length;
+ for ( ; i < len; i++ ) {
+ if ( this[i] === elem ) {
+ return i;
+ }
+ }
+ return -1;
+ },
+
+
+ // Regular expressions
+
+ // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
+ whitespace = "[\\x20\\t\\r\\n\\f]",
+ // http://www.w3.org/TR/css3-syntax/#characters
+ characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
+
+ // Loosely modeled on CSS identifier characters
+ // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
+ // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
+ identifier = characterEncoding.replace( "w", "w#" ),
+
+ // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
+ operators = "([*^$|!~]?=)",
+ attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +
+ "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
+
+ // Prefer arguments quoted,
+ // then not containing pseudos/brackets,
+ // then attribute selectors/non-parenthetical expressions,
+ // then anything else
+ // These preferences are here to reduce the number of selectors
+ // needing tokenize in the PSEUDO preFilter
+ pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)",
+
+ // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
+ rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
+
+ rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
+ rcombinators = new RegExp( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ),
+ rpseudo = new RegExp( pseudos ),
+ ridentifier = new RegExp( "^" + identifier + "$" ),
+
+ matchExpr = {
+ "ID": new RegExp( "^#(" + characterEncoding + ")" ),
+ "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
+ "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ),
+ "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
+ "ATTR": new RegExp( "^" + attributes ),
+ "PSEUDO": new RegExp( "^" + pseudos ),
+ "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
+ "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
+ "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
+ // For use in libraries implementing .is()
+ // We use this for POS matching in `select`
+ "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
+ whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
+ },
+
+ rsibling = /[\x20\t\r\n\f]*[+~]/,
+
+ rnative = /^[^{]+\{\s*\[native code/,
+
+ // Easily-parseable/retrievable ID or TAG or CLASS selectors
+ rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
+
+ rinputs = /^(?:input|select|textarea|button)$/i,
+ rheader = /^h\d$/i,
+
+ rescape = /'|\\/g,
+ rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,
+
+ // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
+ runescape = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,
+ funescape = function( _, escaped ) {
+ var high = "0x" + escaped - 0x10000;
+ // NaN means non-codepoint
+ return high !== high ?
+ escaped :
+ // BMP codepoint
+ high < 0 ?
+ String.fromCharCode( high + 0x10000 ) :
+ // Supplemental Plane codepoint (surrogate pair)
+ String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
+ };
+
+// Use a stripped-down slice if we can't use a native one
+try {
+ slice.call( preferredDoc.documentElement.childNodes, 0 )[0].nodeType;
+} catch ( e ) {
+ slice = function( i ) {
+ var elem,
+ results = [];
+ while ( (elem = this[i++]) ) {
+ results.push( elem );
+ }
+ return results;
+ };
+}
+
+/**
+ * For feature detection
+ * @param {Function} fn The function to test for native support
+ */
+function isNative( fn ) {
+ return rnative.test( fn + "" );
+}
+
+/**
+ * Create key-value caches of limited size
+ * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
+ * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
+ * deleting the oldest entry
+ */
+function createCache() {
+ var cache,
+ keys = [];
+
+ return (cache = function( key, value ) {
+ // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
+ if ( keys.push( key += " " ) > Expr.cacheLength ) {
+ // Only keep the most recent entries
+ delete cache[ keys.shift() ];
+ }
+ return (cache[ key ] = value);
+ });
+}
+
+/**
+ * Mark a function for special use by Sizzle
+ * @param {Function} fn The function to mark
+ */
+function markFunction( fn ) {
+ fn[ expando ] = true;
+ return fn;
+}
+
+/**
+ * Support testing using an element
+ * @param {Function} fn Passed the created div and expects a boolean result
+ */
+function assert( fn ) {
+ var div = document.createElement("div");
+
+ try {
+ return fn( div );
+ } catch (e) {
+ return false;
+ } finally {
+ // release memory in IE
+ div = null;
+ }
+}
+
+function Sizzle( selector, context, results, seed ) {
+ var match, elem, m, nodeType,
+ // QSA vars
+ i, groups, old, nid, newContext, newSelector;
+
+ if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
+ setDocument( context );
+ }
+
+ context = context || document;
+ results = results || [];
+
+ if ( !selector || typeof selector !== "string" ) {
+ return results;
+ }
+
+ if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
+ return [];
+ }
+
+ if ( !documentIsXML && !seed ) {
+
+ // Shortcuts
+ if ( (match = rquickExpr.exec( selector )) ) {
+ // Speed-up: Sizzle("#ID")
+ if ( (m = match[1]) ) {
+ if ( nodeType === 9 ) {
+ elem = context.getElementById( m );
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ if ( elem && elem.parentNode ) {
+ // Handle the case where IE, Opera, and Webkit return items
+ // by name instead of ID
+ if ( elem.id === m ) {
+ results.push( elem );
+ return results;
+ }
+ } else {
+ return results;
+ }
+ } else {
+ // Context is not a document
+ if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
+ contains( context, elem ) && elem.id === m ) {
+ results.push( elem );
+ return results;
+ }
+ }
+
+ // Speed-up: Sizzle("TAG")
+ } else if ( match[2] ) {
+ push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) );
+ return results;
+
+ // Speed-up: Sizzle(".CLASS")
+ } else if ( (m = match[3]) && support.getByClassName && context.getElementsByClassName ) {
+ push.apply( results, slice.call(context.getElementsByClassName( m ), 0) );
+ return results;
+ }
+ }
+
+ // QSA path
+ if ( support.qsa && !rbuggyQSA.test(selector) ) {
+ old = true;
+ nid = expando;
+ newContext = context;
+ newSelector = nodeType === 9 && selector;
+
+ // qSA works strangely on Element-rooted queries
+ // We can work around this by specifying an extra ID on the root
+ // and working up from there (Thanks to Andrew Dupont for the technique)
+ // IE 8 doesn't work on object elements
+ if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+ groups = tokenize( selector );
+
+ if ( (old = context.getAttribute("id")) ) {
+ nid = old.replace( rescape, "\\$&" );
+ } else {
+ context.setAttribute( "id", nid );
+ }
+ nid = "[id='" + nid + "'] ";
+
+ i = groups.length;
+ while ( i-- ) {
+ groups[i] = nid + toSelector( groups[i] );
+ }
+ newContext = rsibling.test( selector ) && context.parentNode || context;
+ newSelector = groups.join(",");
+ }
+
+ if ( newSelector ) {
+ try {
+ push.apply( results, slice.call( newContext.querySelectorAll(
+ newSelector
+ ), 0 ) );
+ return results;
+ } catch(qsaError) {
+ } finally {
+ if ( !old ) {
+ context.removeAttribute("id");
+ }
+ }
+ }
+ }
+ }
+
+ // All others
+ return select( selector.replace( rtrim, "$1" ), context, results, seed );
+}
+
+/**
+ * Detect xml
+ * @param {Element|Object} elem An element or a document
+ */
+isXML = Sizzle.isXML = function( elem ) {
+ // documentElement is verified for cases where it doesn't yet exist
+ // (such as loading iframes in IE - #4833)
+ var documentElement = elem && (elem.ownerDocument || elem).documentElement;
+ return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+/**
+ * Sets document-related variables once based on the current document
+ * @param {Element|Object} [doc] An element or document object to use to set the document
+ * @returns {Object} Returns the current document
+ */
+setDocument = Sizzle.setDocument = function( node ) {
+ var doc = node ? node.ownerDocument || node : preferredDoc;
+
+ // If no document and documentElement is available, return
+ if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
+ return document;
+ }
+
+ // Set our document
+ document = doc;
+ docElem = doc.documentElement;
+
+ // Support tests
+ documentIsXML = isXML( doc );
+
+ // Check if getElementsByTagName("*") returns only elements
+ support.tagNameNoComments = assert(function( div ) {
+ div.appendChild( doc.createComment("") );
+ return !div.getElementsByTagName("*").length;
+ });
+
+ // Check if attributes should be retrieved by attribute nodes
+ support.attributes = assert(function( div ) {
+ div.innerHTML = "<select></select>";
+ var type = typeof div.lastChild.getAttribute("multiple");
+ // IE8 returns a string for some attributes even when not present
+ return type !== "boolean" && type !== "string";
+ });
+
+ // Check if getElementsByClassName can be trusted
+ support.getByClassName = assert(function( div ) {
+ // Opera can't find a second classname (in 9.6)
+ div.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>";
+ if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) {
+ return false;
+ }
+
+ // Safari 3.2 caches class attributes and doesn't catch changes
+ div.lastChild.className = "e";
+ return div.getElementsByClassName("e").length === 2;
+ });
+
+ // Check if getElementById returns elements by name
+ // Check if getElementsByName privileges form controls or returns elements by ID
+ support.getByName = assert(function( div ) {
+ // Inject content
+ div.id = expando + 0;
+ div.innerHTML = "<a name='" + expando + "'></a><div name='" + expando + "'></div>";
+ docElem.insertBefore( div, docElem.firstChild );
+
+ // Test
+ var pass = doc.getElementsByName &&
+ // buggy browsers will return fewer than the correct 2
+ doc.getElementsByName( expando ).length === 2 +
+ // buggy browsers will return more than the correct 0
+ doc.getElementsByName( expando + 0 ).length;
+ support.getIdNotName = !doc.getElementById( expando );
+
+ // Cleanup
+ docElem.removeChild( div );
+
+ return pass;
+ });
+
+ // IE6/7 return modified attributes
+ Expr.attrHandle = assert(function( div ) {
+ div.innerHTML = "<a href='#'></a>";
+ return div.firstChild && typeof div.firstChild.getAttribute !== strundefined &&
+ div.firstChild.getAttribute("href") === "#";
+ }) ?
+ {} :
+ {
+ "href": function( elem ) {
+ return elem.getAttribute( "href", 2 );
+ },
+ "type": function( elem ) {
+ return elem.getAttribute("type");
+ }
+ };
+
+ // ID find and filter
+ if ( support.getIdNotName ) {
+ Expr.find["ID"] = function( id, context ) {
+ if ( typeof context.getElementById !== strundefined && !documentIsXML ) {
+ var m = context.getElementById( id );
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ return m && m.parentNode ? [m] : [];
+ }
+ };
+ Expr.filter["ID"] = function( id ) {
+ var attrId = id.replace( runescape, funescape );
+ return function( elem ) {
+ return elem.getAttribute("id") === attrId;
+ };
+ };
+ } else {
+ Expr.find["ID"] = function( id, context ) {
+ if ( typeof context.getElementById !== strundefined && !documentIsXML ) {
+ var m = context.getElementById( id );
+
+ return m ?
+ m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ?
+ [m] :
+ undefined :
+ [];
+ }
+ };
+ Expr.filter["ID"] = function( id ) {
+ var attrId = id.replace( runescape, funescape );
+ return function( elem ) {
+ var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
+ return node && node.value === attrId;
+ };
+ };
+ }
+
+ // Tag
+ Expr.find["TAG"] = support.tagNameNoComments ?
+ function( tag, context ) {
+ if ( typeof context.getElementsByTagName !== strundefined ) {
+ return context.getElementsByTagName( tag );
+ }
+ } :
+ function( tag, context ) {
+ var elem,
+ tmp = [],
+ i = 0,
+ results = context.getElementsByTagName( tag );
+
+ // Filter out possible comments
+ if ( tag === "*" ) {
+ while ( (elem = results[i++]) ) {
+ if ( elem.nodeType === 1 ) {
+ tmp.push( elem );
+ }
+ }
+
+ return tmp;
+ }
+ return results;
+ };
+
+ // Name
+ Expr.find["NAME"] = support.getByName && function( tag, context ) {
+ if ( typeof context.getElementsByName !== strundefined ) {
+ return context.getElementsByName( name );
+ }
+ };
+
+ // Class
+ Expr.find["CLASS"] = support.getByClassName && function( className, context ) {
+ if ( typeof context.getElementsByClassName !== strundefined && !documentIsXML ) {
+ return context.getElementsByClassName( className );
+ }
+ };
+
+ // QSA and matchesSelector support
+
+ // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
+ rbuggyMatches = [];
+
+ // qSa(:focus) reports false when true (Chrome 21),
+ // no need to also add to buggyMatches since matches checks buggyQSA
+ // A support test would require too much code (would include document ready)
+ rbuggyQSA = [ ":focus" ];
+
+ if ( (support.qsa = isNative(doc.querySelectorAll)) ) {
+ // Build QSA regex
+ // Regex strategy adopted from Diego Perini
+ assert(function( div ) {
+ // Select is set to empty string on purpose
+ // This is to test IE's treatment of not explictly
+ // setting a boolean content attribute,
+ // since its presence should be enough
+ // http://bugs.jquery.com/ticket/12359
+ div.innerHTML = "<select><option selected=''></option></select>";
+
+ // IE8 - Some boolean attributes are not treated correctly
+ if ( !div.querySelectorAll("[selected]").length ) {
+ rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" );
+ }
+
+ // Webkit/Opera - :checked should return selected option elements
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ // IE8 throws error here and will not see later tests
+ if ( !div.querySelectorAll(":checked").length ) {
+ rbuggyQSA.push(":checked");
+ }
+ });
+
+ assert(function( div ) {
+
+ // Opera 10-12/IE8 - ^= $= *= and empty values
+ // Should not select anything
+ div.innerHTML = "<input type='hidden' i=''/>";
+ if ( div.querySelectorAll("[i^='']").length ) {
+ rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" );
+ }
+
+ // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
+ // IE8 throws error here and will not see later tests
+ if ( !div.querySelectorAll(":enabled").length ) {
+ rbuggyQSA.push( ":enabled", ":disabled" );
+ }
+
+ // Opera 10-11 does not throw on post-comma invalid pseudos
+ div.querySelectorAll("*,:x");
+ rbuggyQSA.push(",.*:");
+ });
+ }
+
+ if ( (support.matchesSelector = isNative( (matches = docElem.matchesSelector ||
+ docElem.mozMatchesSelector ||
+ docElem.webkitMatchesSelector ||
+ docElem.oMatchesSelector ||
+ docElem.msMatchesSelector) )) ) {
+
+ assert(function( div ) {
+ // Check to see if it's possible to do matchesSelector
+ // on a disconnected node (IE 9)
+ support.disconnectedMatch = matches.call( div, "div" );
+
+ // This should fail with an exception
+ // Gecko does not error, returns false instead
+ matches.call( div, "[s!='']:x" );
+ rbuggyMatches.push( "!=", pseudos );
+ });
+ }
+
+ rbuggyQSA = new RegExp( rbuggyQSA.join("|") );
+ rbuggyMatches = new RegExp( rbuggyMatches.join("|") );
+
+ // Element contains another
+ // Purposefully does not implement inclusive descendent
+ // As in, an element does not contain itself
+ contains = isNative(docElem.contains) || docElem.compareDocumentPosition ?
+ function( a, b ) {
+ var adown = a.nodeType === 9 ? a.documentElement : a,
+ bup = b && b.parentNode;
+ return a === bup || !!( bup && bup.nodeType === 1 && (
+ adown.contains ?
+ adown.contains( bup ) :
+ a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
+ ));
+ } :
+ function( a, b ) {
+ if ( b ) {
+ while ( (b = b.parentNode) ) {
+ if ( b === a ) {
+ return true;
+ }
+ }
+ }
+ return false;
+ };
+
+ // Document order sorting
+ sortOrder = docElem.compareDocumentPosition ?
+ function( a, b ) {
+ var compare;
+
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
+ if ( (compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b )) ) {
+ if ( compare & 1 || a.parentNode && a.parentNode.nodeType === 11 ) {
+ if ( a === doc || contains( preferredDoc, a ) ) {
+ return -1;
+ }
+ if ( b === doc || contains( preferredDoc, b ) ) {
+ return 1;
+ }
+ return 0;
+ }
+ return compare & 4 ? -1 : 1;
+ }
+
+ return a.compareDocumentPosition ? -1 : 1;
+ } :
+ function( a, b ) {
+ var cur,
+ i = 0,
+ aup = a.parentNode,
+ bup = b.parentNode,
+ ap = [ a ],
+ bp = [ b ];
+
+ // Exit early if the nodes are identical
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+
+ // Parentless nodes are either documents or disconnected
+ } else if ( !aup || !bup ) {
+ return a === doc ? -1 :
+ b === doc ? 1 :
+ aup ? -1 :
+ bup ? 1 :
+ 0;
+
+ // If the nodes are siblings, we can do a quick check
+ } else if ( aup === bup ) {
+ return siblingCheck( a, b );
+ }
+
+ // Otherwise we need full lists of their ancestors for comparison
+ cur = a;
+ while ( (cur = cur.parentNode) ) {
+ ap.unshift( cur );
+ }
+ cur = b;
+ while ( (cur = cur.parentNode) ) {
+ bp.unshift( cur );
+ }
+
+ // Walk down the tree looking for a discrepancy
+ while ( ap[i] === bp[i] ) {
+ i++;
+ }
+
+ return i ?
+ // Do a sibling check if the nodes have a common ancestor
+ siblingCheck( ap[i], bp[i] ) :
+
+ // Otherwise nodes in our document sort first
+ ap[i] === preferredDoc ? -1 :
+ bp[i] === preferredDoc ? 1 :
+ 0;
+ };
+
+ // Always assume the presence of duplicates if sort doesn't
+ // pass them to our comparison function (as in Google Chrome).
+ hasDuplicate = false;
+ [0, 0].sort( sortOrder );
+ support.detectDuplicates = hasDuplicate;
+
+ return document;
+};
+
+Sizzle.matches = function( expr, elements ) {
+ return Sizzle( expr, null, null, elements );
+};
+
+Sizzle.matchesSelector = function( elem, expr ) {
+ // Set document vars if needed
+ if ( ( elem.ownerDocument || elem ) !== document ) {
+ setDocument( elem );
+ }
+
+ // Make sure that attribute selectors are quoted
+ expr = expr.replace( rattributeQuotes, "='$1']" );
+
+ // rbuggyQSA always contains :focus, so no need for an existence check
+ if ( support.matchesSelector && !documentIsXML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && !rbuggyQSA.test(expr) ) {
+ try {
+ var ret = matches.call( elem, expr );
+
+ // IE 9's matchesSelector returns false on disconnected nodes
+ if ( ret || support.disconnectedMatch ||
+ // As well, disconnected nodes are said to be in a document
+ // fragment in IE 9
+ elem.document && elem.document.nodeType !== 11 ) {
+ return ret;
+ }
+ } catch(e) {}
+ }
+
+ return Sizzle( expr, document, null, [elem] ).length > 0;
+};
+
+Sizzle.contains = function( context, elem ) {
+ // Set document vars if needed
+ if ( ( context.ownerDocument || context ) !== document ) {
+ setDocument( context );
+ }
+ return contains( context, elem );
+};
+
+Sizzle.attr = function( elem, name ) {
+ var val;
+
+ // Set document vars if needed
+ if ( ( elem.ownerDocument || elem ) !== document ) {
+ setDocument( elem );
+ }
+
+ if ( !documentIsXML ) {
+ name = name.toLowerCase();
+ }
+ if ( (val = Expr.attrHandle[ name ]) ) {
+ return val( elem );
+ }
+ if ( documentIsXML || support.attributes ) {
+ return elem.getAttribute( name );
+ }
+ return ( (val = elem.getAttributeNode( name )) || elem.getAttribute( name ) ) && elem[ name ] === true ?
+ name :
+ val && val.specified ? val.value : null;
+};
+
+Sizzle.error = function( msg ) {
+ throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+// Document sorting and removing duplicates
+Sizzle.uniqueSort = function( results ) {
+ var elem,
+ duplicates = [],
+ i = 1,
+ j = 0;
+
+ // Unless we *know* we can detect duplicates, assume their presence
+ hasDuplicate = !support.detectDuplicates;
+ results.sort( sortOrder );
+
+ if ( hasDuplicate ) {
+ for ( ; (elem = results[i]); i++ ) {
+ if ( elem === results[ i - 1 ] ) {
+ j = duplicates.push( i );
+ }
+ }
+ while ( j-- ) {
+ results.splice( duplicates[ j ], 1 );
+ }
+ }
+
+ return results;
+};
+
+function siblingCheck( a, b ) {
+ var cur = b && a,
+ diff = cur && ( ~b.sourceIndex || MAX_NEGATIVE ) - ( ~a.sourceIndex || MAX_NEGATIVE );
+
+ // Use IE sourceIndex if available on both nodes
+ if ( diff ) {
+ return diff;
+ }
+
+ // Check if b follows a
+ if ( cur ) {
+ while ( (cur = cur.nextSibling) ) {
+ if ( cur === b ) {
+ return -1;
+ }
+ }
+ }
+
+ return a ? 1 : -1;
+}
+
+// Returns a function to use in pseudos for input types
+function createInputPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && elem.type === type;
+ };
+}
+
+// Returns a function to use in pseudos for buttons
+function createButtonPseudo( type ) {
+ return function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return (name === "input" || name === "button") && elem.type === type;
+ };
+}
+
+// Returns a function to use in pseudos for positionals
+function createPositionalPseudo( fn ) {
+ return markFunction(function( argument ) {
+ argument = +argument;
+ return markFunction(function( seed, matches ) {
+ var j,
+ matchIndexes = fn( [], seed.length, argument ),
+ i = matchIndexes.length;
+
+ // Match elements found at the specified indexes
+ while ( i-- ) {
+ if ( seed[ (j = matchIndexes[i]) ] ) {
+ seed[j] = !(matches[j] = seed[j]);
+ }
+ }
+ });
+ });
+}
+
+/**
+ * Utility function for retrieving the text value of an array of DOM nodes
+ * @param {Array|Element} elem
+ */
+getText = Sizzle.getText = function( elem ) {
+ var node,
+ ret = "",
+ i = 0,
+ nodeType = elem.nodeType;
+
+ if ( !nodeType ) {
+ // If no nodeType, this is expected to be an array
+ for ( ; (node = elem[i]); i++ ) {
+ // Do not traverse comment nodes
+ ret += getText( node );
+ }
+ } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+ // Use textContent for elements
+ // innerText usage removed for consistency of new lines (see #11153)
+ if ( typeof elem.textContent === "string" ) {
+ return elem.textContent;
+ } else {
+ // Traverse its children
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+ ret += getText( elem );
+ }
+ }
+ } else if ( nodeType === 3 || nodeType === 4 ) {
+ return elem.nodeValue;
+ }
+ // Do not include comment or processing instruction nodes
+
+ return ret;
+};
+
+Expr = Sizzle.selectors = {
+
+ // Can be adjusted by the user
+ cacheLength: 50,
+
+ createPseudo: markFunction,
+
+ match: matchExpr,
+
+ find: {},
+
+ relative: {
+ ">": { dir: "parentNode", first: true },
+ " ": { dir: "parentNode" },
+ "+": { dir: "previousSibling", first: true },
+ "~": { dir: "previousSibling" }
+ },
+
+ preFilter: {
+ "ATTR": function( match ) {
+ match[1] = match[1].replace( runescape, funescape );
+
+ // Move the given value to match[3] whether quoted or unquoted
+ match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape );
+
+ if ( match[2] === "~=" ) {
+ match[3] = " " + match[3] + " ";
+ }
+
+ return match.slice( 0, 4 );
+ },
+
+ "CHILD": function( match ) {
+ /* matches from matchExpr["CHILD"]
+ 1 type (only|nth|...)
+ 2 what (child|of-type)
+ 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
+ 4 xn-component of xn+y argument ([+-]?\d*n|)
+ 5 sign of xn-component
+ 6 x of xn-component
+ 7 sign of y-component
+ 8 y of y-component
+ */
+ match[1] = match[1].toLowerCase();
+
+ if ( match[1].slice( 0, 3 ) === "nth" ) {
+ // nth-* requires argument
+ if ( !match[3] ) {
+ Sizzle.error( match[0] );
+ }
+
+ // numeric x and y parameters for Expr.filter.CHILD
+ // remember that false/true cast respectively to 0/1
+ match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
+ match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
+
+ // other types prohibit arguments
+ } else if ( match[3] ) {
+ Sizzle.error( match[0] );
+ }
+
+ return match;
+ },
+
+ "PSEUDO": function( match ) {
+ var excess,
+ unquoted = !match[5] && match[2];
+
+ if ( matchExpr["CHILD"].test( match[0] ) ) {
+ return null;
+ }
+
+ // Accept quoted arguments as-is
+ if ( match[4] ) {
+ match[2] = match[4];
+
+ // Strip excess characters from unquoted arguments
+ } else if ( unquoted && rpseudo.test( unquoted ) &&
+ // Get excess from tokenize (recursively)
+ (excess = tokenize( unquoted, true )) &&
+ // advance to the next closing parenthesis
+ (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
+
+ // excess is a negative index
+ match[0] = match[0].slice( 0, excess );
+ match[2] = unquoted.slice( 0, excess );
+ }
+
+ // Return only captures needed by the pseudo filter method (type and argument)
+ return match.slice( 0, 3 );
+ }
+ },
+
+ filter: {
+
+ "TAG": function( nodeName ) {
+ if ( nodeName === "*" ) {
+ return function() { return true; };
+ }
+
+ nodeName = nodeName.replace( runescape, funescape ).toLowerCase();
+ return function( elem ) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
+ };
+ },
+
+ "CLASS": function( className ) {
+ var pattern = classCache[ className + " " ];
+
+ return pattern ||
+ (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
+ classCache( className, function( elem ) {
+ return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" );
+ });
+ },
+
+ "ATTR": function( name, operator, check ) {
+ return function( elem ) {
+ var result = Sizzle.attr( elem, name );
+
+ if ( result == null ) {
+ return operator === "!=";
+ }
+ if ( !operator ) {
+ return true;
+ }
+
+ result += "";
+
+ return operator === "=" ? result === check :
+ operator === "!=" ? result !== check :
+ operator === "^=" ? check && result.indexOf( check ) === 0 :
+ operator === "*=" ? check && result.indexOf( check ) > -1 :
+ operator === "$=" ? check && result.slice( -check.length ) === check :
+ operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
+ operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
+ false;
+ };
+ },
+
+ "CHILD": function( type, what, argument, first, last ) {
+ var simple = type.slice( 0, 3 ) !== "nth",
+ forward = type.slice( -4 ) !== "last",
+ ofType = what === "of-type";
+
+ return first === 1 && last === 0 ?
+
+ // Shortcut for :nth-*(n)
+ function( elem ) {
+ return !!elem.parentNode;
+ } :
+
+ function( elem, context, xml ) {
+ var cache, outerCache, node, diff, nodeIndex, start,
+ dir = simple !== forward ? "nextSibling" : "previousSibling",
+ parent = elem.parentNode,
+ name = ofType && elem.nodeName.toLowerCase(),
+ useCache = !xml && !ofType;
+
+ if ( parent ) {
+
+ // :(first|last|only)-(child|of-type)
+ if ( simple ) {
+ while ( dir ) {
+ node = elem;
+ while ( (node = node[ dir ]) ) {
+ if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
+ return false;
+ }
+ }
+ // Reverse direction for :only-* (if we haven't yet done so)
+ start = dir = type === "only" && !start && "nextSibling";
+ }
+ return true;
+ }
+
+ start = [ forward ? parent.firstChild : parent.lastChild ];
+
+ // non-xml :nth-child(...) stores cache data on `parent`
+ if ( forward && useCache ) {
+ // Seek `elem` from a previously-cached index
+ outerCache = parent[ expando ] || (parent[ expando ] = {});
+ cache = outerCache[ type ] || [];
+ nodeIndex = cache[0] === dirruns && cache[1];
+ diff = cache[0] === dirruns && cache[2];
+ node = nodeIndex && parent.childNodes[ nodeIndex ];
+
+ while ( (node = ++nodeIndex && node && node[ dir ] ||
+
+ // Fallback to seeking `elem` from the start
+ (diff = nodeIndex = 0) || start.pop()) ) {
+
+ // When found, cache indexes on `parent` and break
+ if ( node.nodeType === 1 && ++diff && node === elem ) {
+ outerCache[ type ] = [ dirruns, nodeIndex, diff ];
+ break;
+ }
+ }
+
+ // Use previously-cached element index if available
+ } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
+ diff = cache[1];
+
+ // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
+ } else {
+ // Use the same loop as above to seek `elem` from the start
+ while ( (node = ++nodeIndex && node && node[ dir ] ||
+ (diff = nodeIndex = 0) || start.pop()) ) {
+
+ if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
+ // Cache the index of each encountered element
+ if ( useCache ) {
+ (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
+ }
+
+ if ( node === elem ) {
+ break;
+ }
+ }
+ }
+ }
+
+ // Incorporate the offset, then check against cycle size
+ diff -= last;
+ return diff === first || ( diff % first === 0 && diff / first >= 0 );
+ }
+ };
+ },
+
+ "PSEUDO": function( pseudo, argument ) {
+ // pseudo-class names are case-insensitive
+ // http://www.w3.org/TR/selectors/#pseudo-classes
+ // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
+ // Remember that setFilters inherits from pseudos
+ var args,
+ fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
+ Sizzle.error( "unsupported pseudo: " + pseudo );
+
+ // The user may use createPseudo to indicate that
+ // arguments are needed to create the filter function
+ // just as Sizzle does
+ if ( fn[ expando ] ) {
+ return fn( argument );
+ }
+
+ // But maintain support for old signatures
+ if ( fn.length > 1 ) {
+ args = [ pseudo, pseudo, "", argument ];
+ return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
+ markFunction(function( seed, matches ) {
+ var idx,
+ matched = fn( seed, argument ),
+ i = matched.length;
+ while ( i-- ) {
+ idx = indexOf.call( seed, matched[i] );
+ seed[ idx ] = !( matches[ idx ] = matched[i] );
+ }
+ }) :
+ function( elem ) {
+ return fn( elem, 0, args );
+ };
+ }
+
+ return fn;
+ }
+ },
+
+ pseudos: {
+ // Potentially complex pseudos
+ "not": markFunction(function( selector ) {
+ // Trim the selector passed to compile
+ // to avoid treating leading and trailing
+ // spaces as combinators
+ var input = [],
+ results = [],
+ matcher = compile( selector.replace( rtrim, "$1" ) );
+
+ return matcher[ expando ] ?
+ markFunction(function( seed, matches, context, xml ) {
+ var elem,
+ unmatched = matcher( seed, null, xml, [] ),
+ i = seed.length;
+
+ // Match elements unmatched by `matcher`
+ while ( i-- ) {
+ if ( (elem = unmatched[i]) ) {
+ seed[i] = !(matches[i] = elem);
+ }
+ }
+ }) :
+ function( elem, context, xml ) {
+ input[0] = elem;
+ matcher( input, null, xml, results );
+ return !results.pop();
+ };
+ }),
+
+ "has": markFunction(function( selector ) {
+ return function( elem ) {
+ return Sizzle( selector, elem ).length > 0;
+ };
+ }),
+
+ "contains": markFunction(function( text ) {
+ return function( elem ) {
+ return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
+ };
+ }),
+
+ // "Whether an element is represented by a :lang() selector
+ // is based solely on the element's language value
+ // being equal to the identifier C,
+ // or beginning with the identifier C immediately followed by "-".
+ // The matching of C against the element's language value is performed case-insensitively.
+ // The identifier C does not have to be a valid language name."
+ // http://www.w3.org/TR/selectors/#lang-pseudo
+ "lang": markFunction( function( lang ) {
+ // lang value must be a valid identifider
+ if ( !ridentifier.test(lang || "") ) {
+ Sizzle.error( "unsupported lang: " + lang );
+ }
+ lang = lang.replace( runescape, funescape ).toLowerCase();
+ return function( elem ) {
+ var elemLang;
+ do {
+ if ( (elemLang = documentIsXML ?
+ elem.getAttribute("xml:lang") || elem.getAttribute("lang") :
+ elem.lang) ) {
+
+ elemLang = elemLang.toLowerCase();
+ return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
+ }
+ } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
+ return false;
+ };
+ }),
+
+ // Miscellaneous
+ "target": function( elem ) {
+ var hash = window.location && window.location.hash;
+ return hash && hash.slice( 1 ) === elem.id;
+ },
+
+ "root": function( elem ) {
+ return elem === docElem;
+ },
+
+ "focus": function( elem ) {
+ return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
+ },
+
+ // Boolean properties
+ "enabled": function( elem ) {
+ return elem.disabled === false;
+ },
+
+ "disabled": function( elem ) {
+ return elem.disabled === true;
+ },
+
+ "checked": function( elem ) {
+ // In CSS3, :checked should return both checked and selected elements
+ // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+ var nodeName = elem.nodeName.toLowerCase();
+ return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
+ },
+
+ "selected": function( elem ) {
+ // Accessing this property makes selected-by-default
+ // options in Safari work properly
+ if ( elem.parentNode ) {
+ elem.parentNode.selectedIndex;
+ }
+
+ return elem.selected === true;
+ },
+
+ // Contents
+ "empty": function( elem ) {
+ // http://www.w3.org/TR/selectors/#empty-pseudo
+ // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
+ // not comment, processing instructions, or others
+ // Thanks to Diego Perini for the nodeName shortcut
+ // Greater than "@" means alpha characters (specifically not starting with "#" or "?")
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+ if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) {
+ return false;
+ }
+ }
+ return true;
+ },
+
+ "parent": function( elem ) {
+ return !Expr.pseudos["empty"]( elem );
+ },
+
+ // Element/input types
+ "header": function( elem ) {
+ return rheader.test( elem.nodeName );
+ },
+
+ "input": function( elem ) {
+ return rinputs.test( elem.nodeName );
+ },
+
+ "button": function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && elem.type === "button" || name === "button";
+ },
+
+ "text": function( elem ) {
+ var attr;
+ // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
+ // use getAttribute instead to test this case
+ return elem.nodeName.toLowerCase() === "input" &&
+ elem.type === "text" &&
+ ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type );
+ },
+
+ // Position-in-collection
+ "first": createPositionalPseudo(function() {
+ return [ 0 ];
+ }),
+
+ "last": createPositionalPseudo(function( matchIndexes, length ) {
+ return [ length - 1 ];
+ }),
+
+ "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ return [ argument < 0 ? argument + length : argument ];
+ }),
+
+ "even": createPositionalPseudo(function( matchIndexes, length ) {
+ var i = 0;
+ for ( ; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "odd": createPositionalPseudo(function( matchIndexes, length ) {
+ var i = 1;
+ for ( ; i < length; i += 2 ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ var i = argument < 0 ? argument + length : argument;
+ for ( ; --i >= 0; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ }),
+
+ "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+ var i = argument < 0 ? argument + length : argument;
+ for ( ; ++i < length; ) {
+ matchIndexes.push( i );
+ }
+ return matchIndexes;
+ })
+ }
+};
+
+// Add button/input type pseudos
+for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
+ Expr.pseudos[ i ] = createInputPseudo( i );
+}
+for ( i in { submit: true, reset: true } ) {
+ Expr.pseudos[ i ] = createButtonPseudo( i );
+}
+
+function tokenize( selector, parseOnly ) {
+ var matched, match, tokens, type,
+ soFar, groups, preFilters,
+ cached = tokenCache[ selector + " " ];
+
+ if ( cached ) {
+ return parseOnly ? 0 : cached.slice( 0 );
+ }
+
+ soFar = selector;
+ groups = [];
+ preFilters = Expr.preFilter;
+
+ while ( soFar ) {
+
+ // Comma and first run
+ if ( !matched || (match = rcomma.exec( soFar )) ) {
+ if ( match ) {
+ // Don't consume trailing commas as valid
+ soFar = soFar.slice( match[0].length ) || soFar;
+ }
+ groups.push( tokens = [] );
+ }
+
+ matched = false;
+
+ // Combinators
+ if ( (match = rcombinators.exec( soFar )) ) {
+ matched = match.shift();
+ tokens.push( {
+ value: matched,
+ // Cast descendant combinators to space
+ type: match[0].replace( rtrim, " " )
+ } );
+ soFar = soFar.slice( matched.length );
+ }
+
+ // Filters
+ for ( type in Expr.filter ) {
+ if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
+ (match = preFilters[ type ]( match ))) ) {
+ matched = match.shift();
+ tokens.push( {
+ value: matched,
+ type: type,
+ matches: match
+ } );
+ soFar = soFar.slice( matched.length );
+ }
+ }
+
+ if ( !matched ) {
+ break;
+ }
+ }
+
+ // Return the length of the invalid excess
+ // if we're just parsing
+ // Otherwise, throw an error or return tokens
+ return parseOnly ?
+ soFar.length :
+ soFar ?
+ Sizzle.error( selector ) :
+ // Cache the tokens
+ tokenCache( selector, groups ).slice( 0 );
+}
+
+function toSelector( tokens ) {
+ var i = 0,
+ len = tokens.length,
+ selector = "";
+ for ( ; i < len; i++ ) {
+ selector += tokens[i].value;
+ }
+ return selector;
+}
+
+function addCombinator( matcher, combinator, base ) {
+ var dir = combinator.dir,
+ checkNonElements = base && dir === "parentNode",
+ doneName = done++;
+
+ return combinator.first ?
+ // Check against closest ancestor/preceding element
+ function( elem, context, xml ) {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ return matcher( elem, context, xml );
+ }
+ }
+ } :
+
+ // Check against all ancestor/preceding elements
+ function( elem, context, xml ) {
+ var data, cache, outerCache,
+ dirkey = dirruns + " " + doneName;
+
+ // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
+ if ( xml ) {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ if ( matcher( elem, context, xml ) ) {
+ return true;
+ }
+ }
+ }
+ } else {
+ while ( (elem = elem[ dir ]) ) {
+ if ( elem.nodeType === 1 || checkNonElements ) {
+ outerCache = elem[ expando ] || (elem[ expando ] = {});
+ if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {
+ if ( (data = cache[1]) === true || data === cachedruns ) {
+ return data === true;
+ }
+ } else {
+ cache = outerCache[ dir ] = [ dirkey ];
+ cache[1] = matcher( elem, context, xml ) || cachedruns;
+ if ( cache[1] === true ) {
+ return true;
+ }
+ }
+ }
+ }
+ }
+ };
+}
+
+function elementMatcher( matchers ) {
+ return matchers.length > 1 ?
+ function( elem, context, xml ) {
+ var i = matchers.length;
+ while ( i-- ) {
+ if ( !matchers[i]( elem, context, xml ) ) {
+ return false;
+ }
+ }
+ return true;
+ } :
+ matchers[0];
+}
+
+function condense( unmatched, map, filter, context, xml ) {
+ var elem,
+ newUnmatched = [],
+ i = 0,
+ len = unmatched.length,
+ mapped = map != null;
+
+ for ( ; i < len; i++ ) {
+ if ( (elem = unmatched[i]) ) {
+ if ( !filter || filter( elem, context, xml ) ) {
+ newUnmatched.push( elem );
+ if ( mapped ) {
+ map.push( i );
+ }
+ }
+ }
+ }
+
+ return newUnmatched;
+}
+
+function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
+ if ( postFilter && !postFilter[ expando ] ) {
+ postFilter = setMatcher( postFilter );
+ }
+ if ( postFinder && !postFinder[ expando ] ) {
+ postFinder = setMatcher( postFinder, postSelector );
+ }
+ return markFunction(function( seed, results, context, xml ) {
+ var temp, i, elem,
+ preMap = [],
+ postMap = [],
+ preexisting = results.length,
+
+ // Get initial elements from seed or context
+ elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
+
+ // Prefilter to get matcher input, preserving a map for seed-results synchronization
+ matcherIn = preFilter && ( seed || !selector ) ?
+ condense( elems, preMap, preFilter, context, xml ) :
+ elems,
+
+ matcherOut = matcher ?
+ // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
+ postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
+
+ // ...intermediate processing is necessary
+ [] :
+
+ // ...otherwise use results directly
+ results :
+ matcherIn;
+
+ // Find primary matches
+ if ( matcher ) {
+ matcher( matcherIn, matcherOut, context, xml );
+ }
+
+ // Apply postFilter
+ if ( postFilter ) {
+ temp = condense( matcherOut, postMap );
+ postFilter( temp, [], context, xml );
+
+ // Un-match failing elements by moving them back to matcherIn
+ i = temp.length;
+ while ( i-- ) {
+ if ( (elem = temp[i]) ) {
+ matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
+ }
+ }
+ }
+
+ if ( seed ) {
+ if ( postFinder || preFilter ) {
+ if ( postFinder ) {
+ // Get the final matcherOut by condensing this intermediate into postFinder contexts
+ temp = [];
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) ) {
+ // Restore matcherIn since elem is not yet a final match
+ temp.push( (matcherIn[i] = elem) );
+ }
+ }
+ postFinder( null, (matcherOut = []), temp, xml );
+ }
+
+ // Move matched elements from seed to results to keep them synchronized
+ i = matcherOut.length;
+ while ( i-- ) {
+ if ( (elem = matcherOut[i]) &&
+ (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
+
+ seed[temp] = !(results[temp] = elem);
+ }
+ }
+ }
+
+ // Add elements to results, through postFinder if defined
+ } else {
+ matcherOut = condense(
+ matcherOut === results ?
+ matcherOut.splice( preexisting, matcherOut.length ) :
+ matcherOut
+ );
+ if ( postFinder ) {
+ postFinder( null, results, matcherOut, xml );
+ } else {
+ push.apply( results, matcherOut );
+ }
+ }
+ });
+}
+
+function matcherFromTokens( tokens ) {
+ var checkContext, matcher, j,
+ len = tokens.length,
+ leadingRelative = Expr.relative[ tokens[0].type ],
+ implicitRelative = leadingRelative || Expr.relative[" "],
+ i = leadingRelative ? 1 : 0,
+
+ // The foundational matcher ensures that elements are reachable from top-level context(s)
+ matchContext = addCombinator( function( elem ) {
+ return elem === checkContext;
+ }, implicitRelative, true ),
+ matchAnyContext = addCombinator( function( elem ) {
+ return indexOf.call( checkContext, elem ) > -1;
+ }, implicitRelative, true ),
+ matchers = [ function( elem, context, xml ) {
+ return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
+ (checkContext = context).nodeType ?
+ matchContext( elem, context, xml ) :
+ matchAnyContext( elem, context, xml ) );
+ } ];
+
+ for ( ; i < len; i++ ) {
+ if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
+ matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
+ } else {
+ matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
+
+ // Return special upon seeing a positional matcher
+ if ( matcher[ expando ] ) {
+ // Find the next relative operator (if any) for proper handling
+ j = ++i;
+ for ( ; j < len; j++ ) {
+ if ( Expr.relative[ tokens[j].type ] ) {
+ break;
+ }
+ }
+ return setMatcher(
+ i > 1 && elementMatcher( matchers ),
+ i > 1 && toSelector( tokens.slice( 0, i - 1 ) ).replace( rtrim, "$1" ),
+ matcher,
+ i < j && matcherFromTokens( tokens.slice( i, j ) ),
+ j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
+ j < len && toSelector( tokens )
+ );
+ }
+ matchers.push( matcher );
+ }
+ }
+
+ return elementMatcher( matchers );
+}
+
+function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
+ // A counter to specify which element is currently being matched
+ var matcherCachedRuns = 0,
+ bySet = setMatchers.length > 0,
+ byElement = elementMatchers.length > 0,
+ superMatcher = function( seed, context, xml, results, expandContext ) {
+ var elem, j, matcher,
+ setMatched = [],
+ matchedCount = 0,
+ i = "0",
+ unmatched = seed && [],
+ outermost = expandContext != null,
+ contextBackup = outermostContext,
+ // We must always have either seed elements or context
+ elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ),
+ // Use integer dirruns iff this is the outermost matcher
+ dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1);
+
+ if ( outermost ) {
+ outermostContext = context !== document && context;
+ cachedruns = matcherCachedRuns;
+ }
+
+ // Add elements passing elementMatchers directly to results
+ // Keep `i` a string if there are no elements so `matchedCount` will be "00" below
+ for ( ; (elem = elems[i]) != null; i++ ) {
+ if ( byElement && elem ) {
+ j = 0;
+ while ( (matcher = elementMatchers[j++]) ) {
+ if ( matcher( elem, context, xml ) ) {
+ results.push( elem );
+ break;
+ }
+ }
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ cachedruns = ++matcherCachedRuns;
+ }
+ }
+
+ // Track unmatched elements for set filters
+ if ( bySet ) {
+ // They will have gone through all possible matchers
+ if ( (elem = !matcher && elem) ) {
+ matchedCount--;
+ }
+
+ // Lengthen the array for every element, matched or not
+ if ( seed ) {
+ unmatched.push( elem );
+ }
+ }
+ }
+
+ // Apply set filters to unmatched elements
+ matchedCount += i;
+ if ( bySet && i !== matchedCount ) {
+ j = 0;
+ while ( (matcher = setMatchers[j++]) ) {
+ matcher( unmatched, setMatched, context, xml );
+ }
+
+ if ( seed ) {
+ // Reintegrate element matches to eliminate the need for sorting
+ if ( matchedCount > 0 ) {
+ while ( i-- ) {
+ if ( !(unmatched[i] || setMatched[i]) ) {
+ setMatched[i] = pop.call( results );
+ }
+ }
+ }
+
+ // Discard index placeholder values to get only actual matches
+ setMatched = condense( setMatched );
+ }
+
+ // Add matches to results
+ push.apply( results, setMatched );
+
+ // Seedless set matches succeeding multiple successful matchers stipulate sorting
+ if ( outermost && !seed && setMatched.length > 0 &&
+ ( matchedCount + setMatchers.length ) > 1 ) {
+
+ Sizzle.uniqueSort( results );
+ }
+ }
+
+ // Override manipulation of globals by nested matchers
+ if ( outermost ) {
+ dirruns = dirrunsUnique;
+ outermostContext = contextBackup;
+ }
+
+ return unmatched;
+ };
+
+ return bySet ?
+ markFunction( superMatcher ) :
+ superMatcher;
+}
+
+compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {
+ var i,
+ setMatchers = [],
+ elementMatchers = [],
+ cached = compilerCache[ selector + " " ];
+
+ if ( !cached ) {
+ // Generate a function of recursive functions that can be used to check each element
+ if ( !group ) {
+ group = tokenize( selector );
+ }
+ i = group.length;
+ while ( i-- ) {
+ cached = matcherFromTokens( group[i] );
+ if ( cached[ expando ] ) {
+ setMatchers.push( cached );
+ } else {
+ elementMatchers.push( cached );
+ }
+ }
+
+ // Cache the compiled function
+ cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
+ }
+ return cached;
+};
+
+function multipleContexts( selector, contexts, results ) {
+ var i = 0,
+ len = contexts.length;
+ for ( ; i < len; i++ ) {
+ Sizzle( selector, contexts[i], results );
+ }
+ return results;
+}
+
+function select( selector, context, results, seed ) {
+ var i, tokens, token, type, find,
+ match = tokenize( selector );
+
+ if ( !seed ) {
+ // Try to minimize operations if there is only one group
+ if ( match.length === 1 ) {
+
+ // Take a shortcut and set the context if the root selector is an ID
+ tokens = match[0] = match[0].slice( 0 );
+ if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
+ context.nodeType === 9 && !documentIsXML &&
+ Expr.relative[ tokens[1].type ] ) {
+
+ context = Expr.find["ID"]( token.matches[0].replace( runescape, funescape ), context )[0];
+ if ( !context ) {
+ return results;
+ }
+
+ selector = selector.slice( tokens.shift().value.length );
+ }
+
+ // Fetch a seed set for right-to-left matching
+ i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
+ while ( i-- ) {
+ token = tokens[i];
+
+ // Abort if we hit a combinator
+ if ( Expr.relative[ (type = token.type) ] ) {
+ break;
+ }
+ if ( (find = Expr.find[ type ]) ) {
+ // Search, expanding context for leading sibling combinators
+ if ( (seed = find(
+ token.matches[0].replace( runescape, funescape ),
+ rsibling.test( tokens[0].type ) && context.parentNode || context
+ )) ) {
+
+ // If seed is empty or no tokens remain, we can return early
+ tokens.splice( i, 1 );
+ selector = seed.length && toSelector( tokens );
+ if ( !selector ) {
+ push.apply( results, slice.call( seed, 0 ) );
+ return results;
+ }
+
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ // Compile and execute a filtering function
+ // Provide `match` to avoid retokenization if we modified the selector above
+ compile( selector, match )(
+ seed,
+ context,
+ documentIsXML,
+ results,
+ rsibling.test( selector )
+ );
+ return results;
+}
+
+// Deprecated
+Expr.pseudos["nth"] = Expr.pseudos["eq"];
+
+// Easy API for creating new setFilters
+function setFilters() {}
+Expr.filters = setFilters.prototype = Expr.pseudos;
+Expr.setFilters = new setFilters();
+
+// Initialize with the default document
+setDocument();
+
+// Override sizzle attribute retrieval
+Sizzle.attr = jQuery.attr;
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.pseudos;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+})( window );
+var runtil = /Until$/,
+ rparentsprev = /^(?:parents|prev(?:Until|All))/,
+ isSimple = /^.[^:#\[\.,]*$/,
+ rneedsContext = jQuery.expr.match.needsContext,
+ // methods guaranteed to produce a unique set when starting from a unique set
+ guaranteedUnique = {
+ children: true,
+ contents: true,
+ next: true,
+ prev: true
+ };
+
+jQuery.fn.extend({
+ find: function( selector ) {
+ var i, ret, self,
+ len = this.length;
+
+ if ( typeof selector !== "string" ) {
+ self = this;
+ return this.pushStack( jQuery( selector ).filter(function() {
+ for ( i = 0; i < len; i++ ) {
+ if ( jQuery.contains( self[ i ], this ) ) {
+ return true;
+ }
+ }
+ }) );
+ }
+
+ ret = [];
+ for ( i = 0; i < len; i++ ) {
+ jQuery.find( selector, this[ i ], ret );
+ }
+
+ // Needed because $( selector, context ) becomes $( context ).find( selector )
+ ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
+ ret.selector = ( this.selector ? this.selector + " " : "" ) + selector;
+ return ret;
+ },
+
+ has: function( target ) {
+ var i,
+ targets = jQuery( target, this ),
+ len = targets.length;
+
+ return this.filter(function() {
+ for ( i = 0; i < len; i++ ) {
+ if ( jQuery.contains( this, targets[i] ) ) {
+ return true;
+ }
+ }
+ });
+ },
+
+ not: function( selector ) {
+ return this.pushStack( winnow(this, selector, false) );
+ },
+
+ filter: function( selector ) {
+ return this.pushStack( winnow(this, selector, true) );
+ },
+
+ is: function( selector ) {
+ return !!selector && (
+ typeof selector === "string" ?
+ // If this is a positional/relative selector, check membership in the returned set
+ // so $("p:first").is("p:last") won't return true for a doc with two "p".
+ rneedsContext.test( selector ) ?
+ jQuery( selector, this.context ).index( this[0] ) >= 0 :
+ jQuery.filter( selector, this ).length > 0 :
+ this.filter( selector ).length > 0 );
+ },
+
+ closest: function( selectors, context ) {
+ var cur,
+ i = 0,
+ l = this.length,
+ ret = [],
+ pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
+ jQuery( selectors, context || this.context ) :
+ 0;
+
+ for ( ; i < l; i++ ) {
+ cur = this[i];
+
+ while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) {
+ if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
+ ret.push( cur );
+ break;
+ }
+ cur = cur.parentNode;
+ }
+ }
+
+ return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret );
+ },
+
+ // Determine the position of an element within
+ // the matched set of elements
+ index: function( elem ) {
+
+ // No argument, return index in parent
+ if ( !elem ) {
+ return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;
+ }
+
+ // index in selector
+ if ( typeof elem === "string" ) {
+ return jQuery.inArray( this[0], jQuery( elem ) );
+ }
+
+ // Locate the position of the desired element
+ return jQuery.inArray(
+ // If it receives a jQuery object, the first element is used
+ elem.jquery ? elem[0] : elem, this );
+ },
+
+ add: function( selector, context ) {
+ var set = typeof selector === "string" ?
+ jQuery( selector, context ) :
+ jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
+ all = jQuery.merge( this.get(), set );
+
+ return this.pushStack( jQuery.unique(all) );
+ },
+
+ addBack: function( selector ) {
+ return this.add( selector == null ?
+ this.prevObject : this.prevObject.filter(selector)
+ );
+ }
+});
+
+jQuery.fn.andSelf = jQuery.fn.addBack;
+
+function sibling( cur, dir ) {
+ do {
+ cur = cur[ dir ];
+ } while ( cur && cur.nodeType !== 1 );
+
+ return cur;
+}
+
+jQuery.each({
+ parent: function( elem ) {
+ var parent = elem.parentNode;
+ return parent && parent.nodeType !== 11 ? parent : null;
+ },
+ parents: function( elem ) {
+ return jQuery.dir( elem, "parentNode" );
+ },
+ parentsUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "parentNode", until );
+ },
+ next: function( elem ) {
+ return sibling( elem, "nextSibling" );
+ },
+ prev: function( elem ) {
+ return sibling( elem, "previousSibling" );
+ },
+ nextAll: function( elem ) {
+ return jQuery.dir( elem, "nextSibling" );
+ },
+ prevAll: function( elem ) {
+ return jQuery.dir( elem, "previousSibling" );
+ },
+ nextUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "nextSibling", until );
+ },
+ prevUntil: function( elem, i, until ) {
+ return jQuery.dir( elem, "previousSibling", until );
+ },
+ siblings: function( elem ) {
+ return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
+ },
+ children: function( elem ) {
+ return jQuery.sibling( elem.firstChild );
+ },
+ contents: function( elem ) {
+ return jQuery.nodeName( elem, "iframe" ) ?
+ elem.contentDocument || elem.contentWindow.document :
+ jQuery.merge( [], elem.childNodes );
+ }
+}, function( name, fn ) {
+ jQuery.fn[ name ] = function( until, selector ) {
+ var ret = jQuery.map( this, fn, until );
+
+ if ( !runtil.test( name ) ) {
+ selector = until;
+ }
+
+ if ( selector && typeof selector === "string" ) {
+ ret = jQuery.filter( selector, ret );
+ }
+
+ ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
+
+ if ( this.length > 1 && rparentsprev.test( name ) ) {
+ ret = ret.reverse();
+ }
+
+ return this.pushStack( ret );
+ };
+});
+
+jQuery.extend({
+ filter: function( expr, elems, not ) {
+ if ( not ) {
+ expr = ":not(" + expr + ")";
+ }
+
+ return elems.length === 1 ?
+ jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
+ jQuery.find.matches(expr, elems);
+ },
+
+ dir: function( elem, dir, until ) {
+ var matched = [],
+ cur = elem[ dir ];
+
+ while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
+ if ( cur.nodeType === 1 ) {
+ matched.push( cur );
+ }
+ cur = cur[dir];
+ }
+ return matched;
+ },
+
+ sibling: function( n, elem ) {
+ var r = [];
+
+ for ( ; n; n = n.nextSibling ) {
+ if ( n.nodeType === 1 && n !== elem ) {
+ r.push( n );
+ }
+ }
+
+ return r;
+ }
+});
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, keep ) {
+
+ // Can't pass null or undefined to indexOf in Firefox 4
+ // Set to 0 to skip string check
+ qualifier = qualifier || 0;
+
+ if ( jQuery.isFunction( qualifier ) ) {
+ return jQuery.grep(elements, function( elem, i ) {
+ var retVal = !!qualifier.call( elem, i, elem );
+ return retVal === keep;
+ });
+
+ } else if ( qualifier.nodeType ) {
+ return jQuery.grep(elements, function( elem ) {
+ return ( elem === qualifier ) === keep;
+ });
+
+ } else if ( typeof qualifier === "string" ) {
+ var filtered = jQuery.grep(elements, function( elem ) {
+ return elem.nodeType === 1;
+ });
+
+ if ( isSimple.test( qualifier ) ) {
+ return jQuery.filter(qualifier, filtered, !keep);
+ } else {
+ qualifier = jQuery.filter( qualifier, filtered );
+ }
+ }
+
+ return jQuery.grep(elements, function( elem ) {
+ return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;
+ });
+}
+function createSafeFragment( document ) {
+ var list = nodeNames.split( "|" ),
+ safeFrag = document.createDocumentFragment();
+
+ if ( safeFrag.createElement ) {
+ while ( list.length ) {
+ safeFrag.createElement(
+ list.pop()
+ );
+ }
+ }
+ return safeFrag;
+}
+
+var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
+ "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
+ rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
+ rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
+ rleadingWhitespace = /^\s+/,
+ rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
+ rtagName = /<([\w:]+)/,
+ rtbody = /<tbody/i,
+ rhtml = /<|&#?\w+;/,
+ rnoInnerhtml = /<(?:script|style|link)/i,
+ manipulation_rcheckableType = /^(?:checkbox|radio)$/i,
+ // checked="checked" or checked
+ rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+ rscriptType = /^$|\/(?:java|ecma)script/i,
+ rscriptTypeMasked = /^true\/(.*)/,
+ rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
+
+ // We have to close these tags to support XHTML (#13200)
+ wrapMap = {
+ option: [ 1, "<select multiple='multiple'>", "</select>" ],
+ legend: [ 1, "<fieldset>", "</fieldset>" ],
+ area: [ 1, "<map>", "</map>" ],
+ param: [ 1, "<object>", "</object>" ],
+ thead: [ 1, "<table>", "</table>" ],
+ tr: [ 2, "<table><tbody>", "</tbody></table>" ],
+ col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
+ td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
+
+ // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
+ // unless wrapped in a div with non-breaking characters in front of it.
+ _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ]
+ },
+ safeFragment = createSafeFragment( document ),
+ fragmentDiv = safeFragment.appendChild( document.createElement("div") );
+
+wrapMap.optgroup = wrapMap.option;
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+jQuery.fn.extend({
+ text: function( value ) {
+ return jQuery.access( this, function( value ) {
+ return value === undefined ?
+ jQuery.text( this ) :
+ this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
+ }, null, value, arguments.length );
+ },
+
+ wrapAll: function( html ) {
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function(i) {
+ jQuery(this).wrapAll( html.call(this, i) );
+ });
+ }
+
+ if ( this[0] ) {
+ // The elements to wrap the target around
+ var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
+
+ if ( this[0].parentNode ) {
+ wrap.insertBefore( this[0] );
+ }
+
+ wrap.map(function() {
+ var elem = this;
+
+ while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
+ elem = elem.firstChild;
+ }
+
+ return elem;
+ }).append( this );
+ }
+
+ return this;
+ },
+
+ wrapInner: function( html ) {
+ if ( jQuery.isFunction( html ) ) {
+ return this.each(function(i) {
+ jQuery(this).wrapInner( html.call(this, i) );
+ });
+ }
+
+ return this.each(function() {
+ var self = jQuery( this ),
+ contents = self.contents();
+
+ if ( contents.length ) {
+ contents.wrapAll( html );
+
+ } else {
+ self.append( html );
+ }
+ });
+ },
+
+ wrap: function( html ) {
+ var isFunction = jQuery.isFunction( html );
+
+ return this.each(function(i) {
+ jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
+ });
+ },
+
+ unwrap: function() {
+ return this.parent().each(function() {
+ if ( !jQuery.nodeName( this, "body" ) ) {
+ jQuery( this ).replaceWith( this.childNodes );
+ }
+ }).end();
+ },
+
+ append: function() {
+ return this.domManip(arguments, true, function( elem ) {
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+ this.appendChild( elem );
+ }
+ });
+ },
+
+ prepend: function() {
+ return this.domManip(arguments, true, function( elem ) {
+ if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+ this.insertBefore( elem, this.firstChild );
+ }
+ });
+ },
+
+ before: function() {
+ return this.domManip( arguments, false, function( elem ) {
+ if ( this.parentNode ) {
+ this.parentNode.insertBefore( elem, this );
+ }
+ });
+ },
+
+ after: function() {
+ return this.domManip( arguments, false, function( elem ) {
+ if ( this.parentNode ) {
+ this.parentNode.insertBefore( elem, this.nextSibling );
+ }
+ });
+ },
+
+ // keepData is for internal use only--do not document
+ remove: function( selector, keepData ) {
+ var elem,
+ i = 0;
+
+ for ( ; (elem = this[i]) != null; i++ ) {
+ if ( !selector || jQuery.filter( selector, [ elem ] ).length > 0 ) {
+ if ( !keepData && elem.nodeType === 1 ) {
+ jQuery.cleanData( getAll( elem ) );
+ }
+
+ if ( elem.parentNode ) {
+ if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
+ setGlobalEval( getAll( elem, "script" ) );
+ }
+ elem.parentNode.removeChild( elem );
+ }
+ }
+ }
+
+ return this;
+ },
+
+ empty: function() {
+ var elem,
+ i = 0;
+
+ for ( ; (elem = this[i]) != null; i++ ) {
+ // Remove element nodes and prevent memory leaks
+ if ( elem.nodeType === 1 ) {
+ jQuery.cleanData( getAll( elem, false ) );
+ }
+
+ // Remove any remaining nodes
+ while ( elem.firstChild ) {
+ elem.removeChild( elem.firstChild );
+ }
+
+ // If this is a select, ensure that it displays empty (#12336)
+ // Support: IE<9
+ if ( elem.options && jQuery.nodeName( elem, "select" ) ) {
+ elem.options.length = 0;
+ }
+ }
+
+ return this;
+ },
+
+ clone: function( dataAndEvents, deepDataAndEvents ) {
+ dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
+ deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
+
+ return this.map( function () {
+ return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
+ });
+ },
+
+ html: function( value ) {
+ return jQuery.access( this, function( value ) {
+ var elem = this[0] || {},
+ i = 0,
+ l = this.length;
+
+ if ( value === undefined ) {
+ return elem.nodeType === 1 ?
+ elem.innerHTML.replace( rinlinejQuery, "" ) :
+ undefined;
+ }
+
+ // See if we can take a shortcut and just use innerHTML
+ if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
+ ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) &&
+ ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
+ !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
+
+ value = value.replace( rxhtmlTag, "<$1></$2>" );
+
+ try {
+ for (; i < l; i++ ) {
+ // Remove element nodes and prevent memory leaks
+ elem = this[i] || {};
+ if ( elem.nodeType === 1 ) {
+ jQuery.cleanData( getAll( elem, false ) );
+ elem.innerHTML = value;
+ }
+ }
+
+ elem = 0;
+
+ // If using innerHTML throws an exception, use the fallback method
+ } catch(e) {}
+ }
+
+ if ( elem ) {
+ this.empty().append( value );
+ }
+ }, null, value, arguments.length );
+ },
+
+ replaceWith: function( value ) {
+ var isFunc = jQuery.isFunction( value );
+
+ // Make sure that the elements are removed from the DOM before they are inserted
+ // this can help fix replacing a parent with child elements
+ if ( !isFunc && typeof value !== "string" ) {
+ value = jQuery( value ).not( this ).detach();
+ }
+
+ return this.domManip( [ value ], true, function( elem ) {
+ var next = this.nextSibling,
+ parent = this.parentNode;
+
+ if ( parent ) {
+ jQuery( this ).remove();
+ parent.insertBefore( elem, next );
+ }
+ });
+ },
+
+ detach: function( selector ) {
+ return this.remove( selector, true );
+ },
+
+ domManip: function( args, table, callback ) {
+
+ // Flatten any nested arrays
+ args = core_concat.apply( [], args );
+
+ var first, node, hasScripts,
+ scripts, doc, fragment,
+ i = 0,
+ l = this.length,
+ set = this,
+ iNoClone = l - 1,
+ value = args[0],
+ isFunction = jQuery.isFunction( value );
+
+ // We can't cloneNode fragments that contain checked, in WebKit
+ if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) {
+ return this.each(function( index ) {
+ var self = set.eq( index );
+ if ( isFunction ) {
+ args[0] = value.call( this, index, table ? self.html() : undefined );
+ }
+ self.domManip( args, table, callback );
+ });
+ }
+
+ if ( l ) {
+ fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this );
+ first = fragment.firstChild;
+
+ if ( fragment.childNodes.length === 1 ) {
+ fragment = first;
+ }
+
+ if ( first ) {
+ table = table && jQuery.nodeName( first, "tr" );
+ scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
+ hasScripts = scripts.length;
+
+ // Use the original fragment for the last item instead of the first because it can end up
+ // being emptied incorrectly in certain situations (#8070).
+ for ( ; i < l; i++ ) {
+ node = fragment;
+
+ if ( i !== iNoClone ) {
+ node = jQuery.clone( node, true, true );
+
+ // Keep references to cloned scripts for later restoration
+ if ( hasScripts ) {
+ jQuery.merge( scripts, getAll( node, "script" ) );
+ }
+ }
+
+ callback.call(
+ table && jQuery.nodeName( this[i], "table" ) ?
+ findOrAppend( this[i], "tbody" ) :
+ this[i],
+ node,
+ i
+ );
+ }
+
+ if ( hasScripts ) {
+ doc = scripts[ scripts.length - 1 ].ownerDocument;
+
+ // Reenable scripts
+ jQuery.map( scripts, restoreScript );
+
+ // Evaluate executable scripts on first document insertion
+ for ( i = 0; i < hasScripts; i++ ) {
+ node = scripts[ i ];
+ if ( rscriptType.test( node.type || "" ) &&
+ !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
+
+ if ( node.src ) {
+ // Hope ajax is available...
+ jQuery.ajax({
+ url: node.src,
+ type: "GET",
+ dataType: "script",
+ async: false,
+ global: false,
+ "throws": true
+ });
+ } else {
+ jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) );
+ }
+ }
+ }
+ }
+
+ // Fix #11809: Avoid leaking memory
+ fragment = first = null;
+ }
+ }
+
+ return this;
+ }
+});
+
+function findOrAppend( elem, tag ) {
+ return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) );
+}
+
+// Replace/restore the type attribute of script elements for safe DOM manipulation
+function disableScript( elem ) {
+ var attr = elem.getAttributeNode("type");
+ elem.type = ( attr && attr.specified ) + "/" + elem.type;
+ return elem;
+}
+function restoreScript( elem ) {
+ var match = rscriptTypeMasked.exec( elem.type );
+ if ( match ) {
+ elem.type = match[1];
+ } else {
+ elem.removeAttribute("type");
+ }
+ return elem;
+}
+
+// Mark scripts as having already been evaluated
+function setGlobalEval( elems, refElements ) {
+ var elem,
+ i = 0;
+ for ( ; (elem = elems[i]) != null; i++ ) {
+ jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) );
+ }
+}
+
+function cloneCopyEvent( src, dest ) {
+
+ if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
+ return;
+ }
+
+ var type, i, l,
+ oldData = jQuery._data( src ),
+ curData = jQuery._data( dest, oldData ),
+ events = oldData.events;
+
+ if ( events ) {
+ delete curData.handle;
+ curData.events = {};
+
+ for ( type in events ) {
+ for ( i = 0, l = events[ type ].length; i < l; i++ ) {
+ jQuery.event.add( dest, type, events[ type ][ i ] );
+ }
+ }
+ }
+
+ // make the cloned public data object a copy from the original
+ if ( curData.data ) {
+ curData.data = jQuery.extend( {}, curData.data );
+ }
+}
+
+function fixCloneNodeIssues( src, dest ) {
+ var nodeName, e, data;
+
+ // We do not need to do anything for non-Elements
+ if ( dest.nodeType !== 1 ) {
+ return;
+ }
+
+ nodeName = dest.nodeName.toLowerCase();
+
+ // IE6-8 copies events bound via attachEvent when using cloneNode.
+ if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) {
+ data = jQuery._data( dest );
+
+ for ( e in data.events ) {
+ jQuery.removeEvent( dest, e, data.handle );
+ }
+
+ // Event data gets referenced instead of copied if the expando gets copied too
+ dest.removeAttribute( jQuery.expando );
+ }
+
+ // IE blanks contents when cloning scripts, and tries to evaluate newly-set text
+ if ( nodeName === "script" && dest.text !== src.text ) {
+ disableScript( dest ).text = src.text;
+ restoreScript( dest );
+
+ // IE6-10 improperly clones children of object elements using classid.
+ // IE10 throws NoModificationAllowedError if parent is null, #12132.
+ } else if ( nodeName === "object" ) {
+ if ( dest.parentNode ) {
+ dest.outerHTML = src.outerHTML;
+ }
+
+ // This path appears unavoidable for IE9. When cloning an object
+ // element in IE9, the outerHTML strategy above is not sufficient.
+ // If the src has innerHTML and the destination does not,
+ // copy the src.innerHTML into the dest.innerHTML. #10324
+ if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) {
+ dest.innerHTML = src.innerHTML;
+ }
+
+ } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) {
+ // IE6-8 fails to persist the checked state of a cloned checkbox
+ // or radio button. Worse, IE6-7 fail to give the cloned element
+ // a checked appearance if the defaultChecked value isn't also set
+
+ dest.defaultChecked = dest.checked = src.checked;
+
+ // IE6-7 get confused and end up setting the value of a cloned
+ // checkbox/radio button to an empty string instead of "on"
+ if ( dest.value !== src.value ) {
+ dest.value = src.value;
+ }
+
+ // IE6-8 fails to return the selected option to the default selected
+ // state when cloning options
+ } else if ( nodeName === "option" ) {
+ dest.defaultSelected = dest.selected = src.defaultSelected;
+
+ // IE6-8 fails to set the defaultValue to the correct value when
+ // cloning other types of input fields
+ } else if ( nodeName === "input" || nodeName === "textarea" ) {
+ dest.defaultValue = src.defaultValue;
+ }
+}
+
+jQuery.each({
+ appendTo: "append",
+ prependTo: "prepend",
+ insertBefore: "before",
+ insertAfter: "after",
+ replaceAll: "replaceWith"
+}, function( name, original ) {
+ jQuery.fn[ name ] = function( selector ) {
+ var elems,
+ i = 0,
+ ret = [],
+ insert = jQuery( selector ),
+ last = insert.length - 1;
+
+ for ( ; i <= last; i++ ) {
+ elems = i === last ? this : this.clone(true);
+ jQuery( insert[i] )[ original ]( elems );
+
+ // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
+ core_push.apply( ret, elems.get() );
+ }
+
+ return this.pushStack( ret );
+ };
+});
+
+function getAll( context, tag ) {
+ var elems, elem,
+ i = 0,
+ found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) :
+ typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) :
+ undefined;
+
+ if ( !found ) {
+ for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) {
+ if ( !tag || jQuery.nodeName( elem, tag ) ) {
+ found.push( elem );
+ } else {
+ jQuery.merge( found, getAll( elem, tag ) );
+ }
+ }
+ }
+
+ return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
+ jQuery.merge( [ context ], found ) :
+ found;
+}
+
+// Used in buildFragment, fixes the defaultChecked property
+function fixDefaultChecked( elem ) {
+ if ( manipulation_rcheckableType.test( elem.type ) ) {
+ elem.defaultChecked = elem.checked;
+ }
+}
+
+jQuery.extend({
+ clone: function( elem, dataAndEvents, deepDataAndEvents ) {
+ var destElements, node, clone, i, srcElements,
+ inPage = jQuery.contains( elem.ownerDocument, elem );
+
+ if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
+ clone = elem.cloneNode( true );
+
+ // IE<=8 does not properly clone detached, unknown element nodes
+ } else {
+ fragmentDiv.innerHTML = elem.outerHTML;
+ fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
+ }
+
+ if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
+ (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
+
+ // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
+ destElements = getAll( clone );
+ srcElements = getAll( elem );
+
+ // Fix all IE cloning issues
+ for ( i = 0; (node = srcElements[i]) != null; ++i ) {
+ // Ensure that the destination node is not null; Fixes #9587
+ if ( destElements[i] ) {
+ fixCloneNodeIssues( node, destElements[i] );
+ }
+ }
+ }
+
+ // Copy the events from the original to the clone
+ if ( dataAndEvents ) {
+ if ( deepDataAndEvents ) {
+ srcElements = srcElements || getAll( elem );
+ destElements = destElements || getAll( clone );
+
+ for ( i = 0; (node = srcElements[i]) != null; i++ ) {
+ cloneCopyEvent( node, destElements[i] );
+ }
+ } else {
+ cloneCopyEvent( elem, clone );
+ }
+ }
+
+ // Preserve script evaluation history
+ destElements = getAll( clone, "script" );
+ if ( destElements.length > 0 ) {
+ setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
+ }
+
+ destElements = srcElements = node = null;
+
+ // Return the cloned set
+ return clone;
+ },
+
+ buildFragment: function( elems, context, scripts, selection ) {
+ var j, elem, contains,
+ tmp, tag, tbody, wrap,
+ l = elems.length,
+
+ // Ensure a safe fragment
+ safe = createSafeFragment( context ),
+
+ nodes = [],
+ i = 0;
+
+ for ( ; i < l; i++ ) {
+ elem = elems[ i ];
+
+ if ( elem || elem === 0 ) {
+
+ // Add nodes directly
+ if ( jQuery.type( elem ) === "object" ) {
+ jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
+
+ // Convert non-html into a text node
+ } else if ( !rhtml.test( elem ) ) {
+ nodes.push( context.createTextNode( elem ) );
+
+ // Convert html into DOM nodes
+ } else {
+ tmp = tmp || safe.appendChild( context.createElement("div") );
+
+ // Deserialize a standard representation
+ tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase();
+ wrap = wrapMap[ tag ] || wrapMap._default;
+
+ tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2];
+
+ // Descend through wrappers to the right content
+ j = wrap[0];
+ while ( j-- ) {
+ tmp = tmp.lastChild;
+ }
+
+ // Manually add leading whitespace removed by IE
+ if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
+ nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );
+ }
+
+ // Remove IE's autoinserted <tbody> from table fragments
+ if ( !jQuery.support.tbody ) {
+
+ // String was a <table>, *may* have spurious <tbody>
+ elem = tag === "table" && !rtbody.test( elem ) ?
+ tmp.firstChild :
+
+ // String was a bare <thead> or <tfoot>
+ wrap[1] === "<table>" && !rtbody.test( elem ) ?
+ tmp :
+ 0;
+
+ j = elem && elem.childNodes.length;
+ while ( j-- ) {
+ if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) {
+ elem.removeChild( tbody );
+ }
+ }
+ }
+
+ jQuery.merge( nodes, tmp.childNodes );
+
+ // Fix #12392 for WebKit and IE > 9
+ tmp.textContent = "";
+
+ // Fix #12392 for oldIE
+ while ( tmp.firstChild ) {
+ tmp.removeChild( tmp.firstChild );
+ }
+
+ // Remember the top-level container for proper cleanup
+ tmp = safe.lastChild;
+ }
+ }
+ }
+
+ // Fix #11356: Clear elements from fragment
+ if ( tmp ) {
+ safe.removeChild( tmp );
+ }
+
+ // Reset defaultChecked for any radios and checkboxes
+ // about to be appended to the DOM in IE 6/7 (#8060)
+ if ( !jQuery.support.appendChecked ) {
+ jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked );
+ }
+
+ i = 0;
+ while ( (elem = nodes[ i++ ]) ) {
+
+ // #4087 - If origin and destination elements are the same, and this is
+ // that element, do not do anything
+ if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
+ continue;
+ }
+
+ contains = jQuery.contains( elem.ownerDocument, elem );
+
+ // Append to fragment
+ tmp = getAll( safe.appendChild( elem ), "script" );
+
+ // Preserve script evaluation history
+ if ( contains ) {
+ setGlobalEval( tmp );
+ }
+
+ // Capture executables
+ if ( scripts ) {
+ j = 0;
+ while ( (elem = tmp[ j++ ]) ) {
+ if ( rscriptType.test( elem.type || "" ) ) {
+ scripts.push( elem );
+ }
+ }
+ }
+ }
+
+ tmp = null;
+
+ return safe;
+ },
+
+ cleanData: function( elems, /* internal */ acceptData ) {
+ var elem, type, id, data,
+ i = 0,
+ internalKey = jQuery.expando,
+ cache = jQuery.cache,
+ deleteExpando = jQuery.support.deleteExpando,
+ special = jQuery.event.special;
+
+ for ( ; (elem = elems[i]) != null; i++ ) {
+
+ if ( acceptData || jQuery.acceptData( elem ) ) {
+
+ id = elem[ internalKey ];
+ data = id && cache[ id ];
+
+ if ( data ) {
+ if ( data.events ) {
+ for ( type in data.events ) {
+ if ( special[ type ] ) {
+ jQuery.event.remove( elem, type );
+
+ // This is a shortcut to avoid jQuery.event.remove's overhead
+ } else {
+ jQuery.removeEvent( elem, type, data.handle );
+ }
+ }
+ }
+
+ // Remove cache only if it was not already removed by jQuery.event.remove
+ if ( cache[ id ] ) {
+
+ delete cache[ id ];
+
+ // IE does not allow us to delete expando properties from nodes,
+ // nor does it have a removeAttribute function on Document nodes;
+ // we must handle all of these cases
+ if ( deleteExpando ) {
+ delete elem[ internalKey ];
+
+ } else if ( typeof elem.removeAttribute !== core_strundefined ) {
+ elem.removeAttribute( internalKey );
+
+ } else {
+ elem[ internalKey ] = null;
+ }
+
+ core_deletedIds.push( id );
+ }
+ }
+ }
+ }
+ }
+});
+var iframe, getStyles, curCSS,
+ ralpha = /alpha\([^)]*\)/i,
+ ropacity = /opacity\s*=\s*([^)]*)/,
+ rposition = /^(top|right|bottom|left)$/,
+ // swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
+ // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
+ rdisplayswap = /^(none|table(?!-c[ea]).+)/,
+ rmargin = /^margin/,
+ rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ),
+ rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ),
+ rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ),
+ elemdisplay = { BODY: "block" },
+
+ cssShow = { position: "absolute", visibility: "hidden", display: "block" },
+ cssNormalTransform = {
+ letterSpacing: 0,
+ fontWeight: 400
+ },
+
+ cssExpand = [ "Top", "Right", "Bottom", "Left" ],
+ cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];
+
+// return a css property mapped to a potentially vendor prefixed property
+function vendorPropName( style, name ) {
+
+ // shortcut for names that are not vendor prefixed
+ if ( name in style ) {
+ return name;
+ }
+
+ // check for vendor prefixed names
+ var capName = name.charAt(0).toUpperCase() + name.slice(1),
+ origName = name,
+ i = cssPrefixes.length;
+
+ while ( i-- ) {
+ name = cssPrefixes[ i ] + capName;
+ if ( name in style ) {
+ return name;
+ }
+ }
+
+ return origName;
+}
+
+function isHidden( elem, el ) {
+ // isHidden might be called from jQuery#filter function;
+ // in that case, element will be second argument
+ elem = el || elem;
+ return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
+}
+
+function showHide( elements, show ) {
+ var display, elem, hidden,
+ values = [],
+ index = 0,
+ length = elements.length;
+
+ for ( ; index < length; index++ ) {
+ elem = elements[ index ];
+ if ( !elem.style ) {
+ continue;
+ }
+
+ values[ index ] = jQuery._data( elem, "olddisplay" );
+ display = elem.style.display;
+ if ( show ) {
+ // Reset the inline display of this element to learn if it is
+ // being hidden by cascaded rules or not
+ if ( !values[ index ] && display === "none" ) {
+ elem.style.display = "";
+ }
+
+ // Set elements which have been overridden with display: none
+ // in a stylesheet to whatever the default browser style is
+ // for such an element
+ if ( elem.style.display === "" && isHidden( elem ) ) {
+ values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) );
+ }
+ } else {
+
+ if ( !values[ index ] ) {
+ hidden = isHidden( elem );
+
+ if ( display && display !== "none" || !hidden ) {
+ jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) );
+ }
+ }
+ }
+ }
+
+ // Set the display of most of the elements in a second loop
+ // to avoid the constant reflow
+ for ( index = 0; index < length; index++ ) {
+ elem = elements[ index ];
+ if ( !elem.style ) {
+ continue;
+ }
+ if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
+ elem.style.display = show ? values[ index ] || "" : "none";
+ }
+ }
+
+ return elements;
+}
+
+jQuery.fn.extend({
+ css: function( name, value ) {
+ return jQuery.access( this, function( elem, name, value ) {
+ var len, styles,
+ map = {},
+ i = 0;
+
+ if ( jQuery.isArray( name ) ) {
+ styles = getStyles( elem );
+ len = name.length;
+
+ for ( ; i < len; i++ ) {
+ map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
+ }
+
+ return map;
+ }
+
+ return value !== undefined ?
+ jQuery.style( elem, name, value ) :
+ jQuery.css( elem, name );
+ }, name, value, arguments.length > 1 );
+ },
+ show: function() {
+ return showHide( this, true );
+ },
+ hide: function() {
+ return showHide( this );
+ },
+ toggle: function( state ) {
+ var bool = typeof state === "boolean";
+
+ return this.each(function() {
+ if ( bool ? state : isHidden( this ) ) {
+ jQuery( this ).show();
+ } else {
+ jQuery( this ).hide();
+ }
+ });
+ }
+});
+
+jQuery.extend({
+ // Add in style property hooks for overriding the default
+ // behavior of getting and setting a style property
+ cssHooks: {
+ opacity: {
+ get: function( elem, computed ) {
+ if ( computed ) {
+ // We should always get a number back from opacity
+ var ret = curCSS( elem, "opacity" );
+ return ret === "" ? "1" : ret;
+ }
+ }
+ }
+ },
+
+ // Exclude the following css properties to add px
+ cssNumber: {
+ "columnCount": true,
+ "fillOpacity": true,
+ "fontWeight": true,
+ "lineHeight": true,
+ "opacity": true,
+ "orphans": true,
+ "widows": true,
+ "zIndex": true,
+ "zoom": true
+ },
+
+ // Add in properties whose names you wish to fix before
+ // setting or getting the value
+ cssProps: {
+ // normalize float css property
+ "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
+ },
+
+ // Get and set the style property on a DOM Node
+ style: function( elem, name, value, extra ) {
+ // Don't set styles on text and comment nodes
+ if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+ return;
+ }
+
+ // Make sure that we're working with the right name
+ var ret, type, hooks,
+ origName = jQuery.camelCase( name ),
+ style = elem.style;
+
+ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
+
+ // gets hook for the prefixed version
+ // followed by the unprefixed version
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+ // Check if we're setting a value
+ if ( value !== undefined ) {
+ type = typeof value;
+
+ // convert relative number strings (+= or -=) to relative numbers. #7345
+ if ( type === "string" && (ret = rrelNum.exec( value )) ) {
+ value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
+ // Fixes bug #9237
+ type = "number";
+ }
+
+ // Make sure that NaN and null values aren't set. See: #7116
+ if ( value == null || type === "number" && isNaN( value ) ) {
+ return;
+ }
+
+ // If a number was passed in, add 'px' to the (except for certain CSS properties)
+ if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
+ value += "px";
+ }
+
+ // Fixes #8908, it can be done more correctly by specifing setters in cssHooks,
+ // but it would mean to define eight (for every problematic property) identical functions
+ if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) {
+ style[ name ] = "inherit";
+ }
+
+ // If a hook was provided, use that value, otherwise just set the specified value
+ if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
+
+ // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
+ // Fixes bug #5509
+ try {
+ style[ name ] = value;
+ } catch(e) {}
+ }
+
+ } else {
+ // If a hook was provided get the non-computed value from there
+ if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
+ return ret;
+ }
+
+ // Otherwise just get the value from the style object
+ return style[ name ];
+ }
+ },
+
+ css: function( elem, name, extra, styles ) {
+ var num, val, hooks,
+ origName = jQuery.camelCase( name );
+
+ // Make sure that we're working with the right name
+ name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
+
+ // gets hook for the prefixed version
+ // followed by the unprefixed version
+ hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+ // If a hook was provided get the computed value from there
+ if ( hooks && "get" in hooks ) {
+ val = hooks.get( elem, true, extra );
+ }
+
+ // Otherwise, if a way to get the computed value exists, use that
+ if ( val === undefined ) {
+ val = curCSS( elem, name, styles );
+ }
+
+ //convert "normal" to computed value
+ if ( val === "normal" && name in cssNormalTransform ) {
+ val = cssNormalTransform[ name ];
+ }
+
+ // Return, converting to number if forced or a qualifier was provided and val looks numeric
+ if ( extra === "" || extra ) {
+ num = parseFloat( val );
+ return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
+ }
+ return val;
+ },
+
+ // A method for quickly swapping in/out CSS properties to get correct calculations
+ swap: function( elem, options, callback, args ) {
+ var ret, name,
+ old = {};
+
+ // Remember the old values, and insert the new ones
+ for ( name in options ) {
+ old[ name ] = elem.style[ name ];
+ elem.style[ name ] = options[ name ];
+ }
+
+ ret = callback.apply( elem, args || [] );
+
+ // Revert the old values
+ for ( name in options ) {
+ elem.style[ name ] = old[ name ];
+ }
+
+ return ret;
+ }
+});
+
+// NOTE: we've included the "window" in window.getComputedStyle
+// because jsdom on node.js will break without it.
+if ( window.getComputedStyle ) {
+ getStyles = function( elem ) {
+ return window.getComputedStyle( elem, null );
+ };
+
+ curCSS = function( elem, name, _computed ) {
+ var width, minWidth, maxWidth,
+ computed = _computed || getStyles( elem ),
+
+ // getPropertyValue is only needed for .css('filter') in IE9, see #12537
+ ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined,
+ style = elem.style;
+
+ if ( computed ) {
+
+ if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
+ ret = jQuery.style( elem, name );
+ }
+
+ // A tribute to the "awesome hack by Dean Edwards"
+ // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right
+ // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
+ // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
+ if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
+
+ // Remember the original values
+ width = style.width;
+ minWidth = style.minWidth;
+ maxWidth = style.maxWidth;
+
+ // Put in the new values to get a computed value out
+ style.minWidth = style.maxWidth = style.width = ret;
+ ret = computed.width;
+
+ // Revert the changed values
+ style.width = width;
+ style.minWidth = minWidth;
+ style.maxWidth = maxWidth;
+ }
+ }
+
+ return ret;
+ };
+} else if ( document.documentElement.currentStyle ) {
+ getStyles = function( elem ) {
+ return elem.currentStyle;
+ };
+
+ curCSS = function( elem, name, _computed ) {
+ var left, rs, rsLeft,
+ computed = _computed || getStyles( elem ),
+ ret = computed ? computed[ name ] : undefined,
+ style = elem.style;
+
+ // Avoid setting ret to empty string here
+ // so we don't default to auto
+ if ( ret == null && style && style[ name ] ) {
+ ret = style[ name ];
+ }
+
+ // From the awesome hack by Dean Edwards
+ // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
+
+ // If we're not dealing with a regular pixel number
+ // but a number that has a weird ending, we need to convert it to pixels
+ // but not position css attributes, as those are proportional to the parent element instead
+ // and we can't measure the parent instead because it might trigger a "stacking dolls" problem
+ if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {
+
+ // Remember the original values
+ left = style.left;
+ rs = elem.runtimeStyle;
+ rsLeft = rs && rs.left;
+
+ // Put in the new values to get a computed value out
+ if ( rsLeft ) {
+ rs.left = elem.currentStyle.left;
+ }
+ style.left = name === "fontSize" ? "1em" : ret;
+ ret = style.pixelLeft + "px";
+
+ // Revert the changed values
+ style.left = left;
+ if ( rsLeft ) {
+ rs.left = rsLeft;
+ }
+ }
+
+ return ret === "" ? "auto" : ret;
+ };
+}
+
+function setPositiveNumber( elem, value, subtract ) {
+ var matches = rnumsplit.exec( value );
+ return matches ?
+ // Guard against undefined "subtract", e.g., when used as in cssHooks
+ Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
+ value;
+}
+
+function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
+ var i = extra === ( isBorderBox ? "border" : "content" ) ?
+ // If we already have the right measurement, avoid augmentation
+ 4 :
+ // Otherwise initialize for horizontal or vertical properties
+ name === "width" ? 1 : 0,
+
+ val = 0;
+
+ for ( ; i < 4; i += 2 ) {
+ // both box models exclude margin, so add it if we want it
+ if ( extra === "margin" ) {
+ val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
+ }
+
+ if ( isBorderBox ) {
+ // border-box includes padding, so remove it if we want content
+ if ( extra === "content" ) {
+ val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+ }
+
+ // at this point, extra isn't border nor margin, so remove border
+ if ( extra !== "margin" ) {
+ val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+ }
+ } else {
+ // at this point, extra isn't content, so add padding
+ val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+
+ // at this point, extra isn't content nor padding, so add border
+ if ( extra !== "padding" ) {
+ val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+ }
+ }
+ }
+
+ return val;
+}
+
+function getWidthOrHeight( elem, name, extra ) {
+
+ // Start with offset property, which is equivalent to the border-box value
+ var valueIsBorderBox = true,
+ val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
+ styles = getStyles( elem ),
+ isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
+
+ // some non-html elements return undefined for offsetWidth, so check for null/undefined
+ // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
+ // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
+ if ( val <= 0 || val == null ) {
+ // Fall back to computed then uncomputed css if necessary
+ val = curCSS( elem, name, styles );
+ if ( val < 0 || val == null ) {
+ val = elem.style[ name ];
+ }
+
+ // Computed unit is not pixels. Stop here and return.
+ if ( rnumnonpx.test(val) ) {
+ return val;
+ }
+
+ // we need the check for style in case a browser which returns unreliable values
+ // for getComputedStyle silently falls back to the reliable elem.style
+ valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] );
+
+ // Normalize "", auto, and prepare for extra
+ val = parseFloat( val ) || 0;
+ }
+
+ // use the active box-sizing model to add/subtract irrelevant styles
+ return ( val +
+ augmentWidthOrHeight(
+ elem,
+ name,
+ extra || ( isBorderBox ? "border" : "content" ),
+ valueIsBorderBox,
+ styles
+ )
+ ) + "px";
+}
+
+// Try to determine the default display value of an element
+function css_defaultDisplay( nodeName ) {
+ var doc = document,
+ display = elemdisplay[ nodeName ];
+
+ if ( !display ) {
+ display = actualDisplay( nodeName, doc );
+
+ // If the simple way fails, read from inside an iframe
+ if ( display === "none" || !display ) {
+ // Use the already-created iframe if possible
+ iframe = ( iframe ||
+ jQuery("<iframe frameborder='0' width='0' height='0'/>")
+ .css( "cssText", "display:block !important" )
+ ).appendTo( doc.documentElement );
+
+ // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
+ doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document;
+ doc.write("<!doctype html><html><body>");
+ doc.close();
+
+ display = actualDisplay( nodeName, doc );
+ iframe.detach();
+ }
+
+ // Store the correct default display
+ elemdisplay[ nodeName ] = display;
+ }
+
+ return display;
+}
+
+// Called ONLY from within css_defaultDisplay
+function actualDisplay( name, doc ) {
+ var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
+ display = jQuery.css( elem[0], "display" );
+ elem.remove();
+ return display;
+}
+
+jQuery.each([ "height", "width" ], function( i, name ) {
+ jQuery.cssHooks[ name ] = {
+ get: function( elem, computed, extra ) {
+ if ( computed ) {
+ // certain elements can have dimension info if we invisibly show them
+ // however, it must have a current display style that would benefit from this
+ return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ?
+ jQuery.swap( elem, cssShow, function() {
+ return getWidthOrHeight( elem, name, extra );
+ }) :
+ getWidthOrHeight( elem, name, extra );
+ }
+ },
+
+ set: function( elem, value, extra ) {
+ var styles = extra && getStyles( elem );
+ return setPositiveNumber( elem, value, extra ?
+ augmentWidthOrHeight(
+ elem,
+ name,
+ extra,
+ jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
+ styles
+ ) : 0
+ );
+ }
+ };
+});
+
+if ( !jQuery.support.opacity ) {
+ jQuery.cssHooks.opacity = {
+ get: function( elem, computed ) {
+ // IE uses filters for opacity
+ return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
+ ( 0.01 * parseFloat( RegExp.$1 ) ) + "" :
+ computed ? "1" : "";
+ },
+
+ set: function( elem, value ) {
+ var style = elem.style,
+ currentStyle = elem.currentStyle,
+ opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
+ filter = currentStyle && currentStyle.filter || style.filter || "";
+
+ // IE has trouble with opacity if it does not have layout
+ // Force it by setting the zoom level
+ style.zoom = 1;
+
+ // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
+ // if value === "", then remove inline opacity #12685
+ if ( ( value >= 1 || value === "" ) &&
+ jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
+ style.removeAttribute ) {
+
+ // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
+ // if "filter:" is present at all, clearType is disabled, we want to avoid this
+ // style.removeAttribute is IE Only, but so apparently is this code path...
+ style.removeAttribute( "filter" );
+
+ // if there is no filter style applied in a css rule or unset inline opacity, we are done
+ if ( value === "" || currentStyle && !currentStyle.filter ) {
+ return;
+ }
+ }
+
+ // otherwise, set new filter values
+ style.filter = ralpha.test( filter ) ?
+ filter.replace( ralpha, opacity ) :
+ filter + " " + opacity;
+ }
+ };
+}
+
+// These hooks cannot be added until DOM ready because the support test
+// for it is not run until after DOM ready
+jQuery(function() {
+ if ( !jQuery.support.reliableMarginRight ) {
+ jQuery.cssHooks.marginRight = {
+ get: function( elem, computed ) {
+ if ( computed ) {
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+ // Work around by temporarily setting element display to inline-block
+ return jQuery.swap( elem, { "display": "inline-block" },
+ curCSS, [ elem, "marginRight" ] );
+ }
+ }
+ };
+ }
+
+ // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
+ // getComputedStyle returns percent when specified for top/left/bottom/right
+ // rather than make the css module depend on the offset module, we just check for it here
+ if ( !jQuery.support.pixelPosition && jQuery.fn.position ) {
+ jQuery.each( [ "top", "left" ], function( i, prop ) {
+ jQuery.cssHooks[ prop ] = {
+ get: function( elem, computed ) {
+ if ( computed ) {
+ computed = curCSS( elem, prop );
+ // if curCSS returns percentage, fallback to offset
+ return rnumnonpx.test( computed ) ?
+ jQuery( elem ).position()[ prop ] + "px" :
+ computed;
+ }
+ }
+ };
+ });
+ }
+
+});
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+ jQuery.expr.filters.hidden = function( elem ) {
+ // Support: Opera <= 12.12
+ // Opera reports offsetWidths and offsetHeights less than zero on some elements
+ return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 ||
+ (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
+ };
+
+ jQuery.expr.filters.visible = function( elem ) {
+ return !jQuery.expr.filters.hidden( elem );
+ };
+}
+
+// These hooks are used by animate to expand properties
+jQuery.each({
+ margin: "",
+ padding: "",
+ border: "Width"
+}, function( prefix, suffix ) {
+ jQuery.cssHooks[ prefix + suffix ] = {
+ expand: function( value ) {
+ var i = 0,
+ expanded = {},
+
+ // assumes a single number if not a string
+ parts = typeof value === "string" ? value.split(" ") : [ value ];
+
+ for ( ; i < 4; i++ ) {
+ expanded[ prefix + cssExpand[ i ] + suffix ] =
+ parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
+ }
+
+ return expanded;
+ }
+ };
+
+ if ( !rmargin.test( prefix ) ) {
+ jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
+ }
+});
+var r20 = /%20/g,
+ rbracket = /\[\]$/,
+ rCRLF = /\r?\n/g,
+ rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
+ rsubmittable = /^(?:input|select|textarea|keygen)/i;
+
+jQuery.fn.extend({
+ serialize: function() {
+ return jQuery.param( this.serializeArray() );
+ },
+ serializeArray: function() {
+ return this.map(function(){
+ // Can add propHook for "elements" to filter or add form elements
+ var elements = jQuery.prop( this, "elements" );
+ return elements ? jQuery.makeArray( elements ) : this;
+ })
+ .filter(function(){
+ var type = this.type;
+ // Use .is(":disabled") so that fieldset[disabled] works
+ return this.name && !jQuery( this ).is( ":disabled" ) &&
+ rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
+ ( this.checked || !manipulation_rcheckableType.test( type ) );
+ })
+ .map(function( i, elem ){
+ var val = jQuery( this ).val();
+
+ return val == null ?
+ null :
+ jQuery.isArray( val ) ?
+ jQuery.map( val, function( val ){
+ return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+ }) :
+ { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+ }).get();
+ }
+});
+
+//Serialize an array of form elements or a set of
+//key/values into a query string
+jQuery.param = function( a, traditional ) {
+ var prefix,
+ s = [],
+ add = function( key, value ) {
+ // If value is a function, invoke it and return its value
+ value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
+ s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
+ };
+
+ // Set traditional to true for jQuery <= 1.3.3 behavior.
+ if ( traditional === undefined ) {
+ traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
+ }
+
+ // If an array was passed in, assume that it is an array of form elements.
+ if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
+ // Serialize the form elements
+ jQuery.each( a, function() {
+ add( this.name, this.value );
+ });
+
+ } else {
+ // If traditional, encode the "old" way (the way 1.3.3 or older
+ // did it), otherwise encode params recursively.
+ for ( prefix in a ) {
+ buildParams( prefix, a[ prefix ], traditional, add );
+ }
+ }
+
+ // Return the resulting serialization
+ return s.join( "&" ).replace( r20, "+" );
+};
+
+function buildParams( prefix, obj, traditional, add ) {
+ var name;
+
+ if ( jQuery.isArray( obj ) ) {
+ // Serialize array item.
+ jQuery.each( obj, function( i, v ) {
+ if ( traditional || rbracket.test( prefix ) ) {
+ // Treat each array item as a scalar.
+ add( prefix, v );
+
+ } else {
+ // Item is non-scalar (array or object), encode its numeric index.
+ buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
+ }
+ });
+
+ } else if ( !traditional && jQuery.type( obj ) === "object" ) {
+ // Serialize object item.
+ for ( name in obj ) {
+ buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
+ }
+
+ } else {
+ // Serialize scalar item.
+ add( prefix, obj );
+ }
+}
+jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
+ "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+ "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
+
+ // Handle event binding
+ jQuery.fn[ name ] = function( data, fn ) {
+ return arguments.length > 0 ?
+ this.on( name, null, data, fn ) :
+ this.trigger( name );
+ };
+});
+
+jQuery.fn.hover = function( fnOver, fnOut ) {
+ return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+};
+var
+ // Document location
+ ajaxLocParts,
+ ajaxLocation,
+ ajax_nonce = jQuery.now(),
+
+ ajax_rquery = /\?/,
+ rhash = /#.*$/,
+ rts = /([?&])_=[^&]*/,
+ rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
+ // #7653, #8125, #8152: local protocol detection
+ rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
+ rnoContent = /^(?:GET|HEAD)$/,
+ rprotocol = /^\/\//,
+ rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
+
+ // Keep a copy of the old load method
+ _load = jQuery.fn.load,
+
+ /* Prefilters
+ * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
+ * 2) These are called:
+ * - BEFORE asking for a transport
+ * - AFTER param serialization (s.data is a string if s.processData is true)
+ * 3) key is the dataType
+ * 4) the catchall symbol "*" can be used
+ * 5) execution will start with transport dataType and THEN continue down to "*" if needed
+ */
+ prefilters = {},
+
+ /* Transports bindings
+ * 1) key is the dataType
+ * 2) the catchall symbol "*" can be used
+ * 3) selection will start with transport dataType and THEN go to "*" if needed
+ */
+ transports = {},
+
+ // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
+ allTypes = "*/".concat("*");
+
+// #8138, IE may throw an exception when accessing
+// a field from window.location if document.domain has been set
+try {
+ ajaxLocation = location.href;
+} catch( e ) {
+ // Use the href attribute of an A element
+ // since IE will modify it given document.location
+ ajaxLocation = document.createElement( "a" );
+ ajaxLocation.href = "";
+ ajaxLocation = ajaxLocation.href;
+}
+
+// Segment location into parts
+ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
+
+// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
+function addToPrefiltersOrTransports( structure ) {
+
+ // dataTypeExpression is optional and defaults to "*"
+ return function( dataTypeExpression, func ) {
+
+ if ( typeof dataTypeExpression !== "string" ) {
+ func = dataTypeExpression;
+ dataTypeExpression = "*";
+ }
+
+ var dataType,
+ i = 0,
+ dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || [];
+
+ if ( jQuery.isFunction( func ) ) {
+ // For each dataType in the dataTypeExpression
+ while ( (dataType = dataTypes[i++]) ) {
+ // Prepend if requested
+ if ( dataType[0] === "+" ) {
+ dataType = dataType.slice( 1 ) || "*";
+ (structure[ dataType ] = structure[ dataType ] || []).unshift( func );
+
+ // Otherwise append
+ } else {
+ (structure[ dataType ] = structure[ dataType ] || []).push( func );
+ }
+ }
+ }
+ };
+}
+
+// Base inspection function for prefilters and transports
+function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
+
+ var inspected = {},
+ seekingTransport = ( structure === transports );
+
+ function inspect( dataType ) {
+ var selected;
+ inspected[ dataType ] = true;
+ jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
+ var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
+ if( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
+ options.dataTypes.unshift( dataTypeOrTransport );
+ inspect( dataTypeOrTransport );
+ return false;
+ } else if ( seekingTransport ) {
+ return !( selected = dataTypeOrTransport );
+ }
+ });
+ return selected;
+ }
+
+ return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
+}
+
+// A special extend for ajax options
+// that takes "flat" options (not to be deep extended)
+// Fixes #9887
+function ajaxExtend( target, src ) {
+ var deep, key,
+ flatOptions = jQuery.ajaxSettings.flatOptions || {};
+
+ for ( key in src ) {
+ if ( src[ key ] !== undefined ) {
+ ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
+ }
+ }
+ if ( deep ) {
+ jQuery.extend( true, target, deep );
+ }
+
+ return target;
+}
+
+jQuery.fn.load = function( url, params, callback ) {
+ if ( typeof url !== "string" && _load ) {
+ return _load.apply( this, arguments );
+ }
+
+ var selector, response, type,
+ self = this,
+ off = url.indexOf(" ");
+
+ if ( off >= 0 ) {
+ selector = url.slice( off, url.length );
+ url = url.slice( 0, off );
+ }
+
+ // If it's a function
+ if ( jQuery.isFunction( params ) ) {
+
+ // We assume that it's the callback
+ callback = params;
+ params = undefined;
+
+ // Otherwise, build a param string
+ } else if ( params && typeof params === "object" ) {
+ type = "POST";
+ }
+
+ // If we have elements to modify, make the request
+ if ( self.length > 0 ) {
+ jQuery.ajax({
+ url: url,
+
+ // if "type" variable is undefined, then "GET" method will be used
+ type: type,
+ dataType: "html",
+ data: params
+ }).done(function( responseText ) {
+
+ // Save response for use in complete callback
+ response = arguments;
+
+ self.html( selector ?
+
+ // If a selector was specified, locate the right elements in a dummy div
+ // Exclude scripts to avoid IE 'Permission Denied' errors
+ jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) :
+
+ // Otherwise use the full result
+ responseText );
+
+ }).complete( callback && function( jqXHR, status ) {
+ self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
+ });
+ }
+
+ return this;
+};
+
+// Attach a bunch of functions for handling common AJAX events
+jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ){
+ jQuery.fn[ type ] = function( fn ){
+ return this.on( type, fn );
+ };
+});
+
+jQuery.each( [ "get", "post" ], function( i, method ) {
+ jQuery[ method ] = function( url, data, callback, type ) {
+ // shift arguments if data argument was omitted
+ if ( jQuery.isFunction( data ) ) {
+ type = type || callback;
+ callback = data;
+ data = undefined;
+ }
+
+ return jQuery.ajax({
+ url: url,
+ type: method,
+ dataType: type,
+ data: data,
+ success: callback
+ });
+ };
+});
+
+jQuery.extend({
+
+ // Counter for holding the number of active queries
+ active: 0,
+
+ // Last-Modified header cache for next request
+ lastModified: {},
+ etag: {},
+
+ ajaxSettings: {
+ url: ajaxLocation,
+ type: "GET",
+ isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
+ global: true,
+ processData: true,
+ async: true,
+ contentType: "application/x-www-form-urlencoded; charset=UTF-8",
+ /*
+ timeout: 0,
+ data: null,
+ dataType: null,
+ username: null,
+ password: null,
+ cache: null,
+ throws: false,
+ traditional: false,
+ headers: {},
+ */
+
+ accepts: {
+ "*": allTypes,
+ text: "text/plain",
+ html: "text/html",
+ xml: "application/xml, text/xml",
+ json: "application/json, text/javascript"
+ },
+
+ contents: {
+ xml: /xml/,
+ html: /html/,
+ json: /json/
+ },
+
+ responseFields: {
+ xml: "responseXML",
+ text: "responseText"
+ },
+
+ // Data converters
+ // Keys separate source (or catchall "*") and destination types with a single space
+ converters: {
+
+ // Convert anything to text
+ "* text": window.String,
+
+ // Text to html (true = no transformation)
+ "text html": true,
+
+ // Evaluate text as a json expression
+ "text json": jQuery.parseJSON,
+
+ // Parse text as xml
+ "text xml": jQuery.parseXML
+ },
+
+ // For options that shouldn't be deep extended:
+ // you can add your own custom options here if
+ // and when you create one that shouldn't be
+ // deep extended (see ajaxExtend)
+ flatOptions: {
+ url: true,
+ context: true
+ }
+ },
+
+ // Creates a full fledged settings object into target
+ // with both ajaxSettings and settings fields.
+ // If target is omitted, writes into ajaxSettings.
+ ajaxSetup: function( target, settings ) {
+ return settings ?
+
+ // Building a settings object
+ ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
+
+ // Extending ajaxSettings
+ ajaxExtend( jQuery.ajaxSettings, target );
+ },
+
+ ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
+ ajaxTransport: addToPrefiltersOrTransports( transports ),
+
+ // Main method
+ ajax: function( url, options ) {
+
+ // If url is an object, simulate pre-1.5 signature
+ if ( typeof url === "object" ) {
+ options = url;
+ url = undefined;
+ }
+
+ // Force options to be an object
+ options = options || {};
+
+ var // Cross-domain detection vars
+ parts,
+ // Loop variable
+ i,
+ // URL without anti-cache param
+ cacheURL,
+ // Response headers as string
+ responseHeadersString,
+ // timeout handle
+ timeoutTimer,
+
+ // To know if global events are to be dispatched
+ fireGlobals,
+
+ transport,
+ // Response headers
+ responseHeaders,
+ // Create the final options object
+ s = jQuery.ajaxSetup( {}, options ),
+ // Callbacks context
+ callbackContext = s.context || s,
+ // Context for global events is callbackContext if it is a DOM node or jQuery collection
+ globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
+ jQuery( callbackContext ) :
+ jQuery.event,
+ // Deferreds
+ deferred = jQuery.Deferred(),
+ completeDeferred = jQuery.Callbacks("once memory"),
+ // Status-dependent callbacks
+ statusCode = s.statusCode || {},
+ // Headers (they are sent all at once)
+ requestHeaders = {},
+ requestHeadersNames = {},
+ // The jqXHR state
+ state = 0,
+ // Default abort message
+ strAbort = "canceled",
+ // Fake xhr
+ jqXHR = {
+ readyState: 0,
+
+ // Builds headers hashtable if needed
+ getResponseHeader: function( key ) {
+ var match;
+ if ( state === 2 ) {
+ if ( !responseHeaders ) {
+ responseHeaders = {};
+ while ( (match = rheaders.exec( responseHeadersString )) ) {
+ responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
+ }
+ }
+ match = responseHeaders[ key.toLowerCase() ];
+ }
+ return match == null ? null : match;
+ },
+
+ // Raw string
+ getAllResponseHeaders: function() {
+ return state === 2 ? responseHeadersString : null;
+ },
+
+ // Caches the header
+ setRequestHeader: function( name, value ) {
+ var lname = name.toLowerCase();
+ if ( !state ) {
+ name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
+ requestHeaders[ name ] = value;
+ }
+ return this;
+ },
+
+ // Overrides response content-type header
+ overrideMimeType: function( type ) {
+ if ( !state ) {
+ s.mimeType = type;
+ }
+ return this;
+ },
+
+ // Status-dependent callbacks
+ statusCode: function( map ) {
+ var code;
+ if ( map ) {
+ if ( state < 2 ) {
+ for ( code in map ) {
+ // Lazy-add the new callback in a way that preserves old ones
+ statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
+ }
+ } else {
+ // Execute the appropriate callbacks
+ jqXHR.always( map[ jqXHR.status ] );
+ }
+ }
+ return this;
+ },
+
+ // Cancel the request
+ abort: function( statusText ) {
+ var finalText = statusText || strAbort;
+ if ( transport ) {
+ transport.abort( finalText );
+ }
+ done( 0, finalText );
+ return this;
+ }
+ };
+
+ // Attach deferreds
+ deferred.promise( jqXHR ).complete = completeDeferred.add;
+ jqXHR.success = jqXHR.done;
+ jqXHR.error = jqXHR.fail;
+
+ // Remove hash character (#7531: and string promotion)
+ // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
+ // Handle falsy url in the settings object (#10093: consistency with old signature)
+ // We also use the url parameter if available
+ s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
+
+ // Alias method option to type as per ticket #12004
+ s.type = options.method || options.type || s.method || s.type;
+
+ // Extract dataTypes list
+ s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( core_rnotwhite ) || [""];
+
+ // A cross-domain request is in order when we have a protocol:host:port mismatch
+ if ( s.crossDomain == null ) {
+ parts = rurl.exec( s.url.toLowerCase() );
+ s.crossDomain = !!( parts &&
+ ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
+ ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
+ ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
+ );
+ }
+
+ // Convert data if not already a string
+ if ( s.data && s.processData && typeof s.data !== "string" ) {
+ s.data = jQuery.param( s.data, s.traditional );
+ }
+
+ // Apply prefilters
+ inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
+
+ // If request was aborted inside a prefilter, stop there
+ if ( state === 2 ) {
+ return jqXHR;
+ }
+
+ // We can fire global events as of now if asked to
+ fireGlobals = s.global;
+
+ // Watch for a new set of requests
+ if ( fireGlobals && jQuery.active++ === 0 ) {
+ jQuery.event.trigger("ajaxStart");
+ }
+
+ // Uppercase the type
+ s.type = s.type.toUpperCase();
+
+ // Determine if request has content
+ s.hasContent = !rnoContent.test( s.type );
+
+ // Save the URL in case we're toying with the If-Modified-Since
+ // and/or If-None-Match header later on
+ cacheURL = s.url;
+
+ // More options handling for requests with no content
+ if ( !s.hasContent ) {
+
+ // If data is available, append data to url
+ if ( s.data ) {
+ cacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
+ // #9682: remove data so that it's not used in an eventual retry
+ delete s.data;
+ }
+
+ // Add anti-cache in url if needed
+ if ( s.cache === false ) {
+ s.url = rts.test( cacheURL ) ?
+
+ // If there is already a '_' parameter, set its value
+ cacheURL.replace( rts, "$1_=" + ajax_nonce++ ) :
+
+ // Otherwise add one to the end
+ cacheURL + ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ajax_nonce++;
+ }
+ }
+
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+ if ( s.ifModified ) {
+ if ( jQuery.lastModified[ cacheURL ] ) {
+ jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
+ }
+ if ( jQuery.etag[ cacheURL ] ) {
+ jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
+ }
+ }
+
+ // Set the correct header, if data is being sent
+ if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
+ jqXHR.setRequestHeader( "Content-Type", s.contentType );
+ }
+
+ // Set the Accepts header for the server, depending on the dataType
+ jqXHR.setRequestHeader(
+ "Accept",
+ s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
+ s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
+ s.accepts[ "*" ]
+ );
+
+ // Check for headers option
+ for ( i in s.headers ) {
+ jqXHR.setRequestHeader( i, s.headers[ i ] );
+ }
+
+ // Allow custom headers/mimetypes and early abort
+ if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
+ // Abort if not done already and return
+ return jqXHR.abort();
+ }
+
+ // aborting is no longer a cancellation
+ strAbort = "abort";
+
+ // Install callbacks on deferreds
+ for ( i in { success: 1, error: 1, complete: 1 } ) {
+ jqXHR[ i ]( s[ i ] );
+ }
+
+ // Get transport
+ transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
+
+ // If no transport, we auto-abort
+ if ( !transport ) {
+ done( -1, "No Transport" );
+ } else {
+ jqXHR.readyState = 1;
+
+ // Send global event
+ if ( fireGlobals ) {
+ globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
+ }
+ // Timeout
+ if ( s.async && s.timeout > 0 ) {
+ timeoutTimer = setTimeout(function() {
+ jqXHR.abort("timeout");
+ }, s.timeout );
+ }
+
+ try {
+ state = 1;
+ transport.send( requestHeaders, done );
+ } catch ( e ) {
+ // Propagate exception as error if not done
+ if ( state < 2 ) {
+ done( -1, e );
+ // Simply rethrow otherwise
+ } else {
+ throw e;
+ }
+ }
+ }
+
+ // Callback for when everything is done
+ function done( status, nativeStatusText, responses, headers ) {
+ var isSuccess, success, error, response, modified,
+ statusText = nativeStatusText;
+
+ // Called once
+ if ( state === 2 ) {
+ return;
+ }
+
+ // State is "done" now
+ state = 2;
+
+ // Clear timeout if it exists
+ if ( timeoutTimer ) {
+ clearTimeout( timeoutTimer );
+ }
+
+ // Dereference transport for early garbage collection
+ // (no matter how long the jqXHR object will be used)
+ transport = undefined;
+
+ // Cache response headers
+ responseHeadersString = headers || "";
+
+ // Set readyState
+ jqXHR.readyState = status > 0 ? 4 : 0;
+
+ // Get response data
+ if ( responses ) {
+ response = ajaxHandleResponses( s, jqXHR, responses );
+ }
+
+ // If successful, handle type chaining
+ if ( status >= 200 && status < 300 || status === 304 ) {
+
+ // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+ if ( s.ifModified ) {
+ modified = jqXHR.getResponseHeader("Last-Modified");
+ if ( modified ) {
+ jQuery.lastModified[ cacheURL ] = modified;
+ }
+ modified = jqXHR.getResponseHeader("etag");
+ if ( modified ) {
+ jQuery.etag[ cacheURL ] = modified;
+ }
+ }
+
+ // if no content
+ if ( status === 204 ) {
+ isSuccess = true;
+ statusText = "nocontent";
+
+ // if not modified
+ } else if ( status === 304 ) {
+ isSuccess = true;
+ statusText = "notmodified";
+
+ // If we have data, let's convert it
+ } else {
+ isSuccess = ajaxConvert( s, response );
+ statusText = isSuccess.state;
+ success = isSuccess.data;
+ error = isSuccess.error;
+ isSuccess = !error;
+ }
+ } else {
+ // We extract error from statusText
+ // then normalize statusText and status for non-aborts
+ error = statusText;
+ if ( status || !statusText ) {
+ statusText = "error";
+ if ( status < 0 ) {
+ status = 0;
+ }
+ }
+ }
+
+ // Set data for the fake xhr object
+ jqXHR.status = status;
+ jqXHR.statusText = ( nativeStatusText || statusText ) + "";
+
+ // Success/Error
+ if ( isSuccess ) {
+ deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
+ } else {
+ deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
+ }
+
+ // Status-dependent callbacks
+ jqXHR.statusCode( statusCode );
+ statusCode = undefined;
+
+ if ( fireGlobals ) {
+ globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
+ [ jqXHR, s, isSuccess ? success : error ] );
+ }
+
+ // Complete
+ completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
+
+ if ( fireGlobals ) {
+ globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
+ // Handle the global AJAX counter
+ if ( !( --jQuery.active ) ) {
+ jQuery.event.trigger("ajaxStop");
+ }
+ }
+ }
+
+ return jqXHR;
+ },
+
+ getScript: function( url, callback ) {
+ return jQuery.get( url, undefined, callback, "script" );
+ },
+
+ getJSON: function( url, data, callback ) {
+ return jQuery.get( url, data, callback, "json" );
+ }
+});
+
+/* Handles responses to an ajax request:
+ * - sets all responseXXX fields accordingly
+ * - finds the right dataType (mediates between content-type and expected dataType)
+ * - returns the corresponding response
+ */
+function ajaxHandleResponses( s, jqXHR, responses ) {
+ var firstDataType, ct, finalDataType, type,
+ contents = s.contents,
+ dataTypes = s.dataTypes,
+ responseFields = s.responseFields;
+
+ // Fill responseXXX fields
+ for ( type in responseFields ) {
+ if ( type in responses ) {
+ jqXHR[ responseFields[type] ] = responses[ type ];
+ }
+ }
+
+ // Remove auto dataType and get content-type in the process
+ while( dataTypes[ 0 ] === "*" ) {
+ dataTypes.shift();
+ if ( ct === undefined ) {
+ ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
+ }
+ }
+
+ // Check if we're dealing with a known content-type
+ if ( ct ) {
+ for ( type in contents ) {
+ if ( contents[ type ] && contents[ type ].test( ct ) ) {
+ dataTypes.unshift( type );
+ break;
+ }
+ }
+ }
+
+ // Check to see if we have a response for the expected dataType
+ if ( dataTypes[ 0 ] in responses ) {
+ finalDataType = dataTypes[ 0 ];
+ } else {
+ // Try convertible dataTypes
+ for ( type in responses ) {
+ if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
+ finalDataType = type;
+ break;
+ }
+ if ( !firstDataType ) {
+ firstDataType = type;
+ }
+ }
+ // Or just use first one
+ finalDataType = finalDataType || firstDataType;
+ }
+
+ // If we found a dataType
+ // We add the dataType to the list if needed
+ // and return the corresponding response
+ if ( finalDataType ) {
+ if ( finalDataType !== dataTypes[ 0 ] ) {
+ dataTypes.unshift( finalDataType );
+ }
+ return responses[ finalDataType ];
+ }
+}
+
+// Chain conversions given the request and the original response
+function ajaxConvert( s, response ) {
+ var conv2, current, conv, tmp,
+ converters = {},
+ i = 0,
+ // Work with a copy of dataTypes in case we need to modify it for conversion
+ dataTypes = s.dataTypes.slice(),
+ prev = dataTypes[ 0 ];
+
+ // Apply the dataFilter if provided
+ if ( s.dataFilter ) {
+ response = s.dataFilter( response, s.dataType );
+ }
+
+ // Create converters map with lowercased keys
+ if ( dataTypes[ 1 ] ) {
+ for ( conv in s.converters ) {
+ converters[ conv.toLowerCase() ] = s.converters[ conv ];
+ }
+ }
+
+ // Convert to each sequential dataType, tolerating list modification
+ for ( ; (current = dataTypes[++i]); ) {
+
+ // There's only work to do if current dataType is non-auto
+ if ( current !== "*" ) {
+
+ // Convert response if prev dataType is non-auto and differs from current
+ if ( prev !== "*" && prev !== current ) {
+
+ // Seek a direct converter
+ conv = converters[ prev + " " + current ] || converters[ "* " + current ];
+
+ // If none found, seek a pair
+ if ( !conv ) {
+ for ( conv2 in converters ) {
+
+ // If conv2 outputs current
+ tmp = conv2.split(" ");
+ if ( tmp[ 1 ] === current ) {
+
+ // If prev can be converted to accepted input
+ conv = converters[ prev + " " + tmp[ 0 ] ] ||
+ converters[ "* " + tmp[ 0 ] ];
+ if ( conv ) {
+ // Condense equivalence converters
+ if ( conv === true ) {
+ conv = converters[ conv2 ];
+
+ // Otherwise, insert the intermediate dataType
+ } else if ( converters[ conv2 ] !== true ) {
+ current = tmp[ 0 ];
+ dataTypes.splice( i--, 0, current );
+ }
+
+ break;
+ }
+ }
+ }
+ }
+
+ // Apply converter (if not an equivalence)
+ if ( conv !== true ) {
+
+ // Unless errors are allowed to bubble, catch and return them
+ if ( conv && s["throws"] ) {
+ response = conv( response );
+ } else {
+ try {
+ response = conv( response );
+ } catch ( e ) {
+ return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
+ }
+ }
+ }
+ }
+
+ // Update prev for next iteration
+ prev = current;
+ }
+ }
+
+ return { state: "success", data: response };
+}
+// Install script dataType
+jQuery.ajaxSetup({
+ accepts: {
+ script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
+ },
+ contents: {
+ script: /(?:java|ecma)script/
+ },
+ converters: {
+ "text script": function( text ) {
+ jQuery.globalEval( text );
+ return text;
+ }
+ }
+});
+
+// Handle cache's special case and global
+jQuery.ajaxPrefilter( "script", function( s ) {
+ if ( s.cache === undefined ) {
+ s.cache = false;
+ }
+ if ( s.crossDomain ) {
+ s.type = "GET";
+ s.global = false;
+ }
+});
+
+// Bind script tag hack transport
+jQuery.ajaxTransport( "script", function(s) {
+
+ // This transport only deals with cross domain requests
+ if ( s.crossDomain ) {
+
+ var script,
+ head = document.head || jQuery("head")[0] || document.documentElement;
+
+ return {
+
+ send: function( _, callback ) {
+
+ script = document.createElement("script");
+
+ script.async = true;
+
+ if ( s.scriptCharset ) {
+ script.charset = s.scriptCharset;
+ }
+
+ script.src = s.url;
+
+ // Attach handlers for all browsers
+ script.onload = script.onreadystatechange = function( _, isAbort ) {
+
+ if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
+
+ // Handle memory leak in IE
+ script.onload = script.onreadystatechange = null;
+
+ // Remove the script
+ if ( script.parentNode ) {
+ script.parentNode.removeChild( script );
+ }
+
+ // Dereference the script
+ script = null;
+
+ // Callback if not abort
+ if ( !isAbort ) {
+ callback( 200, "success" );
+ }
+ }
+ };
+
+ // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending
+ // Use native DOM manipulation to avoid our domManip AJAX trickery
+ head.insertBefore( script, head.firstChild );
+ },
+
+ abort: function() {
+ if ( script ) {
+ script.onload( undefined, true );
+ }
+ }
+ };
+ }
+});
+var oldCallbacks = [],
+ rjsonp = /(=)\?(?=&|$)|\?\?/;
+
+// Default jsonp settings
+jQuery.ajaxSetup({
+ jsonp: "callback",
+ jsonpCallback: function() {
+ var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( ajax_nonce++ ) );
+ this[ callback ] = true;
+ return callback;
+ }
+});
+
+// Detect, normalize options and install callbacks for jsonp requests
+jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
+
+ var callbackName, overwritten, responseContainer,
+ jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
+ "url" :
+ typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"
+ );
+
+ // Handle iff the expected data type is "jsonp" or we have a parameter to set
+ if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
+
+ // Get callback name, remembering preexisting value associated with it
+ callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
+ s.jsonpCallback() :
+ s.jsonpCallback;
+
+ // Insert callback into url or form data
+ if ( jsonProp ) {
+ s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
+ } else if ( s.jsonp !== false ) {
+ s.url += ( ajax_rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
+ }
+
+ // Use data converter to retrieve json after script execution
+ s.converters["script json"] = function() {
+ if ( !responseContainer ) {
+ jQuery.error( callbackName + " was not called" );
+ }
+ return responseContainer[ 0 ];
+ };
+
+ // force json dataType
+ s.dataTypes[ 0 ] = "json";
+
+ // Install callback
+ overwritten = window[ callbackName ];
+ window[ callbackName ] = function() {
+ responseContainer = arguments;
+ };
+
+ // Clean-up function (fires after converters)
+ jqXHR.always(function() {
+ // Restore preexisting value
+ window[ callbackName ] = overwritten;
+
+ // Save back as free
+ if ( s[ callbackName ] ) {
+ // make sure that re-using the options doesn't screw things around
+ s.jsonpCallback = originalSettings.jsonpCallback;
+
+ // save the callback name for future use
+ oldCallbacks.push( callbackName );
+ }
+
+ // Call if it was a function and we have a response
+ if ( responseContainer && jQuery.isFunction( overwritten ) ) {
+ overwritten( responseContainer[ 0 ] );
+ }
+
+ responseContainer = overwritten = undefined;
+ });
+
+ // Delegate to script
+ return "script";
+ }
+});
+var xhrCallbacks, xhrSupported,
+ xhrId = 0,
+ // #5280: Internet Explorer will keep connections alive if we don't abort on unload
+ xhrOnUnloadAbort = window.ActiveXObject && function() {
+ // Abort all pending requests
+ var key;
+ for ( key in xhrCallbacks ) {
+ xhrCallbacks[ key ]( undefined, true );
+ }
+ };
+
+// Functions to create xhrs
+function createStandardXHR() {
+ try {
+ return new window.XMLHttpRequest();
+ } catch( e ) {}
+}
+
+function createActiveXHR() {
+ try {
+ return new window.ActiveXObject("Microsoft.XMLHTTP");
+ } catch( e ) {}
+}
+
+// Create the request object
+// (This is still attached to ajaxSettings for backward compatibility)
+jQuery.ajaxSettings.xhr = window.ActiveXObject ?
+ /* Microsoft failed to properly
+ * implement the XMLHttpRequest in IE7 (can't request local files),
+ * so we use the ActiveXObject when it is available
+ * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
+ * we need a fallback.
+ */
+ function() {
+ return !this.isLocal && createStandardXHR() || createActiveXHR();
+ } :
+ // For all other browsers, use the standard XMLHttpRequest object
+ createStandardXHR;
+
+// Determine support properties
+xhrSupported = jQuery.ajaxSettings.xhr();
+jQuery.support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
+xhrSupported = jQuery.support.ajax = !!xhrSupported;
+
+// Create transport if the browser can provide an xhr
+if ( xhrSupported ) {
+
+ jQuery.ajaxTransport(function( s ) {
+ // Cross domain only allowed if supported through XMLHttpRequest
+ if ( !s.crossDomain || jQuery.support.cors ) {
+
+ var callback;
+
+ return {
+ send: function( headers, complete ) {
+
+ // Get a new xhr
+ var handle, i,
+ xhr = s.xhr();
+
+ // Open the socket
+ // Passing null username, generates a login popup on Opera (#2865)
+ if ( s.username ) {
+ xhr.open( s.type, s.url, s.async, s.username, s.password );
+ } else {
+ xhr.open( s.type, s.url, s.async );
+ }
+
+ // Apply custom fields if provided
+ if ( s.xhrFields ) {
+ for ( i in s.xhrFields ) {
+ xhr[ i ] = s.xhrFields[ i ];
+ }
+ }
+
+ // Override mime type if needed
+ if ( s.mimeType && xhr.overrideMimeType ) {
+ xhr.overrideMimeType( s.mimeType );
+ }
+
+ // X-Requested-With header
+ // For cross-domain requests, seeing as conditions for a preflight are
+ // akin to a jigsaw puzzle, we simply never set it to be sure.
+ // (it can always be set on a per-request basis or even using ajaxSetup)
+ // For same-domain requests, won't change header if already provided.
+ if ( !s.crossDomain && !headers["X-Requested-With"] ) {
+ headers["X-Requested-With"] = "XMLHttpRequest";
+ }
+
+ // Need an extra try/catch for cross domain requests in Firefox 3
+ try {
+ for ( i in headers ) {
+ xhr.setRequestHeader( i, headers[ i ] );
+ }
+ } catch( err ) {}
+
+ // Do send the request
+ // This may raise an exception which is actually
+ // handled in jQuery.ajax (so no try/catch here)
+ xhr.send( ( s.hasContent && s.data ) || null );
+
+ // Listener
+ callback = function( _, isAbort ) {
+ var status, responseHeaders, statusText, responses;
+
+ // Firefox throws exceptions when accessing properties
+ // of an xhr when a network error occurred
+ // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
+ try {
+
+ // Was never called and is aborted or complete
+ if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
+
+ // Only called once
+ callback = undefined;
+
+ // Do not keep as active anymore
+ if ( handle ) {
+ xhr.onreadystatechange = jQuery.noop;
+ if ( xhrOnUnloadAbort ) {
+ delete xhrCallbacks[ handle ];
+ }
+ }
+
+ // If it's an abort
+ if ( isAbort ) {
+ // Abort it manually if needed
+ if ( xhr.readyState !== 4 ) {
+ xhr.abort();
+ }
+ } else {
+ responses = {};
+ status = xhr.status;
+ responseHeaders = xhr.getAllResponseHeaders();
+
+ // When requesting binary data, IE6-9 will throw an exception
+ // on any attempt to access responseText (#11426)
+ if ( typeof xhr.responseText === "string" ) {
+ responses.text = xhr.responseText;
+ }
+
+ // Firefox throws an exception when accessing
+ // statusText for faulty cross-domain requests
+ try {
+ statusText = xhr.statusText;
+ } catch( e ) {
+ // We normalize with Webkit giving an empty statusText
+ statusText = "";
+ }
+
+ // Filter status for non standard behaviors
+
+ // If the request is local and we have data: assume a success
+ // (success with no data won't get notified, that's the best we
+ // can do given current implementations)
+ if ( !status && s.isLocal && !s.crossDomain ) {
+ status = responses.text ? 200 : 404;
+ // IE - #1450: sometimes returns 1223 when it should be 204
+ } else if ( status === 1223 ) {
+ status = 204;
+ }
+ }
+ }
+ } catch( firefoxAccessException ) {
+ if ( !isAbort ) {
+ complete( -1, firefoxAccessException );
+ }
+ }
+
+ // Call complete if needed
+ if ( responses ) {
+ complete( status, statusText, responses, responseHeaders );
+ }
+ };
+
+ if ( !s.async ) {
+ // if we're in sync mode we fire the callback
+ callback();
+ } else if ( xhr.readyState === 4 ) {
+ // (IE6 & IE7) if it's in cache and has been
+ // retrieved directly we need to fire the callback
+ setTimeout( callback );
+ } else {
+ handle = ++xhrId;
+ if ( xhrOnUnloadAbort ) {
+ // Create the active xhrs callbacks list if needed
+ // and attach the unload handler
+ if ( !xhrCallbacks ) {
+ xhrCallbacks = {};
+ jQuery( window ).unload( xhrOnUnloadAbort );
+ }
+ // Add to list of active xhrs callbacks
+ xhrCallbacks[ handle ] = callback;
+ }
+ xhr.onreadystatechange = callback;
+ }
+ },
+
+ abort: function() {
+ if ( callback ) {
+ callback( undefined, true );
+ }
+ }
+ };
+ }
+ });
+}
+var fxNow, timerId,
+ rfxtypes = /^(?:toggle|show|hide)$/,
+ rfxnum = new RegExp( "^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i" ),
+ rrun = /queueHooks$/,
+ animationPrefilters = [ defaultPrefilter ],
+ tweeners = {
+ "*": [function( prop, value ) {
+ var end, unit,
+ tween = this.createTween( prop, value ),
+ parts = rfxnum.exec( value ),
+ target = tween.cur(),
+ start = +target || 0,
+ scale = 1,
+ maxIterations = 20;
+
+ if ( parts ) {
+ end = +parts[2];
+ unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" );
+
+ // We need to compute starting value
+ if ( unit !== "px" && start ) {
+ // Iteratively approximate from a nonzero starting point
+ // Prefer the current property, because this process will be trivial if it uses the same units
+ // Fallback to end or a simple constant
+ start = jQuery.css( tween.elem, prop, true ) || end || 1;
+
+ do {
+ // If previous iteration zeroed out, double until we get *something*
+ // Use a string for doubling factor so we don't accidentally see scale as unchanged below
+ scale = scale || ".5";
+
+ // Adjust and apply
+ start = start / scale;
+ jQuery.style( tween.elem, prop, start + unit );
+
+ // Update scale, tolerating zero or NaN from tween.cur()
+ // And breaking the loop if scale is unchanged or perfect, or if we've just had enough
+ } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
+ }
+
+ tween.unit = unit;
+ tween.start = start;
+ // If a +=/-= token was provided, we're doing a relative animation
+ tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end;
+ }
+ return tween;
+ }]
+ };
+
+// Animations created synchronously will run synchronously
+function createFxNow() {
+ setTimeout(function() {
+ fxNow = undefined;
+ });
+ return ( fxNow = jQuery.now() );
+}
+
+function createTweens( animation, props ) {
+ jQuery.each( props, function( prop, value ) {
+ var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
+ index = 0,
+ length = collection.length;
+ for ( ; index < length; index++ ) {
+ if ( collection[ index ].call( animation, prop, value ) ) {
+
+ // we're done with this property
+ return;
+ }
+ }
+ });
+}
+
+function Animation( elem, properties, options ) {
+ var result,
+ stopped,
+ index = 0,
+ length = animationPrefilters.length,
+ deferred = jQuery.Deferred().always( function() {
+ // don't match elem in the :animated selector
+ delete tick.elem;
+ }),
+ tick = function() {
+ if ( stopped ) {
+ return false;
+ }
+ var currentTime = fxNow || createFxNow(),
+ remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
+ // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)
+ temp = remaining / animation.duration || 0,
+ percent = 1 - temp,
+ index = 0,
+ length = animation.tweens.length;
+
+ for ( ; index < length ; index++ ) {
+ animation.tweens[ index ].run( percent );
+ }
+
+ deferred.notifyWith( elem, [ animation, percent, remaining ]);
+
+ if ( percent < 1 && length ) {
+ return remaining;
+ } else {
+ deferred.resolveWith( elem, [ animation ] );
+ return false;
+ }
+ },
+ animation = deferred.promise({
+ elem: elem,
+ props: jQuery.extend( {}, properties ),
+ opts: jQuery.extend( true, { specialEasing: {} }, options ),
+ originalProperties: properties,
+ originalOptions: options,
+ startTime: fxNow || createFxNow(),
+ duration: options.duration,
+ tweens: [],
+ createTween: function( prop, end ) {
+ var tween = jQuery.Tween( elem, animation.opts, prop, end,
+ animation.opts.specialEasing[ prop ] || animation.opts.easing );
+ animation.tweens.push( tween );
+ return tween;
+ },
+ stop: function( gotoEnd ) {
+ var index = 0,
+ // if we are going to the end, we want to run all the tweens
+ // otherwise we skip this part
+ length = gotoEnd ? animation.tweens.length : 0;
+ if ( stopped ) {
+ return this;
+ }
+ stopped = true;
+ for ( ; index < length ; index++ ) {
+ animation.tweens[ index ].run( 1 );
+ }
+
+ // resolve when we played the last frame
+ // otherwise, reject
+ if ( gotoEnd ) {
+ deferred.resolveWith( elem, [ animation, gotoEnd ] );
+ } else {
+ deferred.rejectWith( elem, [ animation, gotoEnd ] );
+ }
+ return this;
+ }
+ }),
+ props = animation.props;
+
+ propFilter( props, animation.opts.specialEasing );
+
+ for ( ; index < length ; index++ ) {
+ result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
+ if ( result ) {
+ return result;
+ }
+ }
+
+ createTweens( animation, props );
+
+ if ( jQuery.isFunction( animation.opts.start ) ) {
+ animation.opts.start.call( elem, animation );
+ }
+
+ jQuery.fx.timer(
+ jQuery.extend( tick, {
+ elem: elem,
+ anim: animation,
+ queue: animation.opts.queue
+ })
+ );
+
+ // attach callbacks from options
+ return animation.progress( animation.opts.progress )
+ .done( animation.opts.done, animation.opts.complete )
+ .fail( animation.opts.fail )
+ .always( animation.opts.always );
+}
+
+function propFilter( props, specialEasing ) {
+ var value, name, index, easing, hooks;
+
+ // camelCase, specialEasing and expand cssHook pass
+ for ( index in props ) {
+ name = jQuery.camelCase( index );
+ easing = specialEasing[ name ];
+ value = props[ index ];
+ if ( jQuery.isArray( value ) ) {
+ easing = value[ 1 ];
+ value = props[ index ] = value[ 0 ];
+ }
+
+ if ( index !== name ) {
+ props[ name ] = value;
+ delete props[ index ];
+ }
+
+ hooks = jQuery.cssHooks[ name ];
+ if ( hooks && "expand" in hooks ) {
+ value = hooks.expand( value );
+ delete props[ name ];
+
+ // not quite $.extend, this wont overwrite keys already present.
+ // also - reusing 'index' from above because we have the correct "name"
+ for ( index in value ) {
+ if ( !( index in props ) ) {
+ props[ index ] = value[ index ];
+ specialEasing[ index ] = easing;
+ }
+ }
+ } else {
+ specialEasing[ name ] = easing;
+ }
+ }
+}
+
+jQuery.Animation = jQuery.extend( Animation, {
+
+ tweener: function( props, callback ) {
+ if ( jQuery.isFunction( props ) ) {
+ callback = props;
+ props = [ "*" ];
+ } else {
+ props = props.split(" ");
+ }
+
+ var prop,
+ index = 0,
+ length = props.length;
+
+ for ( ; index < length ; index++ ) {
+ prop = props[ index ];
+ tweeners[ prop ] = tweeners[ prop ] || [];
+ tweeners[ prop ].unshift( callback );
+ }
+ },
+
+ prefilter: function( callback, prepend ) {
+ if ( prepend ) {
+ animationPrefilters.unshift( callback );
+ } else {
+ animationPrefilters.push( callback );
+ }
+ }
+});
+
+function defaultPrefilter( elem, props, opts ) {
+ /*jshint validthis:true */
+ var prop, index, length,
+ value, dataShow, toggle,
+ tween, hooks, oldfire,
+ anim = this,
+ style = elem.style,
+ orig = {},
+ handled = [],
+ hidden = elem.nodeType && isHidden( elem );
+
+ // handle queue: false promises
+ if ( !opts.queue ) {
+ hooks = jQuery._queueHooks( elem, "fx" );
+ if ( hooks.unqueued == null ) {
+ hooks.unqueued = 0;
+ oldfire = hooks.empty.fire;
+ hooks.empty.fire = function() {
+ if ( !hooks.unqueued ) {
+ oldfire();
+ }
+ };
+ }
+ hooks.unqueued++;
+
+ anim.always(function() {
+ // doing this makes sure that the complete handler will be called
+ // before this completes
+ anim.always(function() {
+ hooks.unqueued--;
+ if ( !jQuery.queue( elem, "fx" ).length ) {
+ hooks.empty.fire();
+ }
+ });
+ });
+ }
+
+ // height/width overflow pass
+ if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
+ // Make sure that nothing sneaks out
+ // Record all 3 overflow attributes because IE does not
+ // change the overflow attribute when overflowX and
+ // overflowY are set to the same value
+ opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
+
+ // Set display property to inline-block for height/width
+ // animations on inline elements that are having width/height animated
+ if ( jQuery.css( elem, "display" ) === "inline" &&
+ jQuery.css( elem, "float" ) === "none" ) {
+
+ // inline-level elements accept inline-block;
+ // block-level elements need to be inline with layout
+ if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) {
+ style.display = "inline-block";
+
+ } else {
+ style.zoom = 1;
+ }
+ }
+ }
+
+ if ( opts.overflow ) {
+ style.overflow = "hidden";
+ if ( !jQuery.support.shrinkWrapBlocks ) {
+ anim.always(function() {
+ style.overflow = opts.overflow[ 0 ];
+ style.overflowX = opts.overflow[ 1 ];
+ style.overflowY = opts.overflow[ 2 ];
+ });
+ }
+ }
+
+
+ // show/hide pass
+ for ( index in props ) {
+ value = props[ index ];
+ if ( rfxtypes.exec( value ) ) {
+ delete props[ index ];
+ toggle = toggle || value === "toggle";
+ if ( value === ( hidden ? "hide" : "show" ) ) {
+ continue;
+ }
+ handled.push( index );
+ }
+ }
+
+ length = handled.length;
+ if ( length ) {
+ dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} );
+ if ( "hidden" in dataShow ) {
+ hidden = dataShow.hidden;
+ }
+
+ // store state if its toggle - enables .stop().toggle() to "reverse"
+ if ( toggle ) {
+ dataShow.hidden = !hidden;
+ }
+ if ( hidden ) {
+ jQuery( elem ).show();
+ } else {
+ anim.done(function() {
+ jQuery( elem ).hide();
+ });
+ }
+ anim.done(function() {
+ var prop;
+ jQuery._removeData( elem, "fxshow" );
+ for ( prop in orig ) {
+ jQuery.style( elem, prop, orig[ prop ] );
+ }
+ });
+ for ( index = 0 ; index < length ; index++ ) {
+ prop = handled[ index ];
+ tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 );
+ orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop );
+
+ if ( !( prop in dataShow ) ) {
+ dataShow[ prop ] = tween.start;
+ if ( hidden ) {
+ tween.end = tween.start;
+ tween.start = prop === "width" || prop === "height" ? 1 : 0;
+ }
+ }
+ }
+ }
+}
+
+function Tween( elem, options, prop, end, easing ) {
+ return new Tween.prototype.init( elem, options, prop, end, easing );
+}
+jQuery.Tween = Tween;
+
+Tween.prototype = {
+ constructor: Tween,
+ init: function( elem, options, prop, end, easing, unit ) {
+ this.elem = elem;
+ this.prop = prop;
+ this.easing = easing || "swing";
+ this.options = options;
+ this.start = this.now = this.cur();
+ this.end = end;
+ this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
+ },
+ cur: function() {
+ var hooks = Tween.propHooks[ this.prop ];
+
+ return hooks && hooks.get ?
+ hooks.get( this ) :
+ Tween.propHooks._default.get( this );
+ },
+ run: function( percent ) {
+ var eased,
+ hooks = Tween.propHooks[ this.prop ];
+
+ if ( this.options.duration ) {
+ this.pos = eased = jQuery.easing[ this.easing ](
+ percent, this.options.duration * percent, 0, 1, this.options.duration
+ );
+ } else {
+ this.pos = eased = percent;
+ }
+ this.now = ( this.end - this.start ) * eased + this.start;
+
+ if ( this.options.step ) {
+ this.options.step.call( this.elem, this.now, this );
+ }
+
+ if ( hooks && hooks.set ) {
+ hooks.set( this );
+ } else {
+ Tween.propHooks._default.set( this );
+ }
+ return this;
+ }
+};
+
+Tween.prototype.init.prototype = Tween.prototype;
+
+Tween.propHooks = {
+ _default: {
+ get: function( tween ) {
+ var result;
+
+ if ( tween.elem[ tween.prop ] != null &&
+ (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
+ return tween.elem[ tween.prop ];
+ }
+
+ // passing an empty string as a 3rd parameter to .css will automatically
+ // attempt a parseFloat and fallback to a string if the parse fails
+ // so, simple values such as "10px" are parsed to Float.
+ // complex values such as "rotate(1rad)" are returned as is.
+ result = jQuery.css( tween.elem, tween.prop, "" );
+ // Empty strings, null, undefined and "auto" are converted to 0.
+ return !result || result === "auto" ? 0 : result;
+ },
+ set: function( tween ) {
+ // use step hook for back compat - use cssHook if its there - use .style if its
+ // available and use plain properties where available
+ if ( jQuery.fx.step[ tween.prop ] ) {
+ jQuery.fx.step[ tween.prop ]( tween );
+ } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
+ jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
+ } else {
+ tween.elem[ tween.prop ] = tween.now;
+ }
+ }
+ }
+};
+
+// Remove in 2.0 - this supports IE8's panic based approach
+// to setting things on disconnected nodes
+
+Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
+ set: function( tween ) {
+ if ( tween.elem.nodeType && tween.elem.parentNode ) {
+ tween.elem[ tween.prop ] = tween.now;
+ }
+ }
+};
+
+jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
+ var cssFn = jQuery.fn[ name ];
+ jQuery.fn[ name ] = function( speed, easing, callback ) {
+ return speed == null || typeof speed === "boolean" ?
+ cssFn.apply( this, arguments ) :
+ this.animate( genFx( name, true ), speed, easing, callback );
+ };
+});
+
+jQuery.fn.extend({
+ fadeTo: function( speed, to, easing, callback ) {
+
+ // show any hidden elements after setting opacity to 0
+ return this.filter( isHidden ).css( "opacity", 0 ).show()
+
+ // animate to the value specified
+ .end().animate({ opacity: to }, speed, easing, callback );
+ },
+ animate: function( prop, speed, easing, callback ) {
+ var empty = jQuery.isEmptyObject( prop ),
+ optall = jQuery.speed( speed, easing, callback ),
+ doAnimation = function() {
+ // Operate on a copy of prop so per-property easing won't be lost
+ var anim = Animation( this, jQuery.extend( {}, prop ), optall );
+ doAnimation.finish = function() {
+ anim.stop( true );
+ };
+ // Empty animations, or finishing resolves immediately
+ if ( empty || jQuery._data( this, "finish" ) ) {
+ anim.stop( true );
+ }
+ };
+ doAnimation.finish = doAnimation;
+
+ return empty || optall.queue === false ?
+ this.each( doAnimation ) :
+ this.queue( optall.queue, doAnimation );
+ },
+ stop: function( type, clearQueue, gotoEnd ) {
+ var stopQueue = function( hooks ) {
+ var stop = hooks.stop;
+ delete hooks.stop;
+ stop( gotoEnd );
+ };
+
+ if ( typeof type !== "string" ) {
+ gotoEnd = clearQueue;
+ clearQueue = type;
+ type = undefined;
+ }
+ if ( clearQueue && type !== false ) {
+ this.queue( type || "fx", [] );
+ }
+
+ return this.each(function() {
+ var dequeue = true,
+ index = type != null && type + "queueHooks",
+ timers = jQuery.timers,
+ data = jQuery._data( this );
+
+ if ( index ) {
+ if ( data[ index ] && data[ index ].stop ) {
+ stopQueue( data[ index ] );
+ }
+ } else {
+ for ( index in data ) {
+ if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
+ stopQueue( data[ index ] );
+ }
+ }
+ }
+
+ for ( index = timers.length; index--; ) {
+ if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
+ timers[ index ].anim.stop( gotoEnd );
+ dequeue = false;
+ timers.splice( index, 1 );
+ }
+ }
+
+ // start the next in the queue if the last step wasn't forced
+ // timers currently will call their complete callbacks, which will dequeue
+ // but only if they were gotoEnd
+ if ( dequeue || !gotoEnd ) {
+ jQuery.dequeue( this, type );
+ }
+ });
+ },
+ finish: function( type ) {
+ if ( type !== false ) {
+ type = type || "fx";
+ }
+ return this.each(function() {
+ var index,
+ data = jQuery._data( this ),
+ queue = data[ type + "queue" ],
+ hooks = data[ type + "queueHooks" ],
+ timers = jQuery.timers,
+ length = queue ? queue.length : 0;
+
+ // enable finishing flag on private data
+ data.finish = true;
+
+ // empty the queue first
+ jQuery.queue( this, type, [] );
+
+ if ( hooks && hooks.cur && hooks.cur.finish ) {
+ hooks.cur.finish.call( this );
+ }
+
+ // look for any active animations, and finish them
+ for ( index = timers.length; index--; ) {
+ if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
+ timers[ index ].anim.stop( true );
+ timers.splice( index, 1 );
+ }
+ }
+
+ // look for any animations in the old queue and finish them
+ for ( index = 0; index < length; index++ ) {
+ if ( queue[ index ] && queue[ index ].finish ) {
+ queue[ index ].finish.call( this );
+ }
+ }
+
+ // turn off finishing flag
+ delete data.finish;
+ });
+ }
+});
+
+// Generate parameters to create a standard animation
+function genFx( type, includeWidth ) {
+ var which,
+ attrs = { height: type },
+ i = 0;
+
+ // if we include width, step value is 1 to do all cssExpand values,
+ // if we don't include width, step value is 2 to skip over Left and Right
+ includeWidth = includeWidth? 1 : 0;
+ for( ; i < 4 ; i += 2 - includeWidth ) {
+ which = cssExpand[ i ];
+ attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
+ }
+
+ if ( includeWidth ) {
+ attrs.opacity = attrs.width = type;
+ }
+
+ return attrs;
+}
+
+// Generate shortcuts for custom animations
+jQuery.each({
+ slideDown: genFx("show"),
+ slideUp: genFx("hide"),
+ slideToggle: genFx("toggle"),
+ fadeIn: { opacity: "show" },
+ fadeOut: { opacity: "hide" },
+ fadeToggle: { opacity: "toggle" }
+}, function( name, props ) {
+ jQuery.fn[ name ] = function( speed, easing, callback ) {
+ return this.animate( props, speed, easing, callback );
+ };
+});
+
+jQuery.speed = function( speed, easing, fn ) {
+ var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
+ complete: fn || !fn && easing ||
+ jQuery.isFunction( speed ) && speed,
+ duration: speed,
+ easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
+ };
+
+ opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
+ opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
+
+ // normalize opt.queue - true/undefined/null -> "fx"
+ if ( opt.queue == null || opt.queue === true ) {
+ opt.queue = "fx";
+ }
+
+ // Queueing
+ opt.old = opt.complete;
+
+ opt.complete = function() {
+ if ( jQuery.isFunction( opt.old ) ) {
+ opt.old.call( this );
+ }
+
+ if ( opt.queue ) {
+ jQuery.dequeue( this, opt.queue );
+ }
+ };
+
+ return opt;
+};
+
+jQuery.easing = {
+ linear: function( p ) {
+ return p;
+ },
+ swing: function( p ) {
+ return 0.5 - Math.cos( p*Math.PI ) / 2;
+ }
+};
+
+jQuery.timers = [];
+jQuery.fx = Tween.prototype.init;
+jQuery.fx.tick = function() {
+ var timer,
+ timers = jQuery.timers,
+ i = 0;
+
+ fxNow = jQuery.now();
+
+ for ( ; i < timers.length; i++ ) {
+ timer = timers[ i ];
+ // Checks the timer has not already been removed
+ if ( !timer() && timers[ i ] === timer ) {
+ timers.splice( i--, 1 );
+ }
+ }
+
+ if ( !timers.length ) {
+ jQuery.fx.stop();
+ }
+ fxNow = undefined;
+};
+
+jQuery.fx.timer = function( timer ) {
+ if ( timer() && jQuery.timers.push( timer ) ) {
+ jQuery.fx.start();
+ }
+};
+
+jQuery.fx.interval = 13;
+
+jQuery.fx.start = function() {
+ if ( !timerId ) {
+ timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );
+ }
+};
+
+jQuery.fx.stop = function() {
+ clearInterval( timerId );
+ timerId = null;
+};
+
+jQuery.fx.speeds = {
+ slow: 600,
+ fast: 200,
+ // Default speed
+ _default: 400
+};
+
+// Back Compat <1.8 extension point
+jQuery.fx.step = {};
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+ jQuery.expr.filters.animated = function( elem ) {
+ return jQuery.grep(jQuery.timers, function( fn ) {
+ return elem === fn.elem;
+ }).length;
+ };
+}
+jQuery.fn.offset = function( options ) {
+ if ( arguments.length ) {
+ return options === undefined ?
+ this :
+ this.each(function( i ) {
+ jQuery.offset.setOffset( this, options, i );
+ });
+ }
+
+ var docElem, win,
+ box = { top: 0, left: 0 },
+ elem = this[ 0 ],
+ doc = elem && elem.ownerDocument;
+
+ if ( !doc ) {
+ return;
+ }
+
+ docElem = doc.documentElement;
+
+ // Make sure it's not a disconnected DOM node
+ if ( !jQuery.contains( docElem, elem ) ) {
+ return box;
+ }
+
+ // If we don't have gBCR, just use 0,0 rather than error
+ // BlackBerry 5, iOS 3 (original iPhone)
+ if ( typeof elem.getBoundingClientRect !== core_strundefined ) {
+ box = elem.getBoundingClientRect();
+ }
+ win = getWindow( doc );
+ return {
+ top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ),
+ left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )
+ };
+};
+
+jQuery.offset = {
+
+ setOffset: function( elem, options, i ) {
+ var position = jQuery.css( elem, "position" );
+
+ // set position first, in-case top/left are set even on static elem
+ if ( position === "static" ) {
+ elem.style.position = "relative";
+ }
+
+ var curElem = jQuery( elem ),
+ curOffset = curElem.offset(),
+ curCSSTop = jQuery.css( elem, "top" ),
+ curCSSLeft = jQuery.css( elem, "left" ),
+ calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
+ props = {}, curPosition = {}, curTop, curLeft;
+
+ // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
+ if ( calculatePosition ) {
+ curPosition = curElem.position();
+ curTop = curPosition.top;
+ curLeft = curPosition.left;
+ } else {
+ curTop = parseFloat( curCSSTop ) || 0;
+ curLeft = parseFloat( curCSSLeft ) || 0;
+ }
+
+ if ( jQuery.isFunction( options ) ) {
+ options = options.call( elem, i, curOffset );
+ }
+
+ if ( options.top != null ) {
+ props.top = ( options.top - curOffset.top ) + curTop;
+ }
+ if ( options.left != null ) {
+ props.left = ( options.left - curOffset.left ) + curLeft;
+ }
+
+ if ( "using" in options ) {
+ options.using.call( elem, props );
+ } else {
+ curElem.css( props );
+ }
+ }
+};
+
+
+jQuery.fn.extend({
+
+ position: function() {
+ if ( !this[ 0 ] ) {
+ return;
+ }
+
+ var offsetParent, offset,
+ parentOffset = { top: 0, left: 0 },
+ elem = this[ 0 ];
+
+ // fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent
+ if ( jQuery.css( elem, "position" ) === "fixed" ) {
+ // we assume that getBoundingClientRect is available when computed position is fixed
+ offset = elem.getBoundingClientRect();
+ } else {
+ // Get *real* offsetParent
+ offsetParent = this.offsetParent();
+
+ // Get correct offsets
+ offset = this.offset();
+ if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
+ parentOffset = offsetParent.offset();
+ }
+
+ // Add offsetParent borders
+ parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
+ parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
+ }
+
+ // Subtract parent offsets and element margins
+ // note: when an element has margin: auto the offsetLeft and marginLeft
+ // are the same in Safari causing offset.left to incorrectly be 0
+ return {
+ top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
+ left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true)
+ };
+ },
+
+ offsetParent: function() {
+ return this.map(function() {
+ var offsetParent = this.offsetParent || document.documentElement;
+ while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) {
+ offsetParent = offsetParent.offsetParent;
+ }
+ return offsetParent || document.documentElement;
+ });
+ }
+});
+
+
+// Create scrollLeft and scrollTop methods
+jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) {
+ var top = /Y/.test( prop );
+
+ jQuery.fn[ method ] = function( val ) {
+ return jQuery.access( this, function( elem, method, val ) {
+ var win = getWindow( elem );
+
+ if ( val === undefined ) {
+ return win ? (prop in win) ? win[ prop ] :
+ win.document.documentElement[ method ] :
+ elem[ method ];
+ }
+
+ if ( win ) {
+ win.scrollTo(
+ !top ? val : jQuery( win ).scrollLeft(),
+ top ? val : jQuery( win ).scrollTop()
+ );
+
+ } else {
+ elem[ method ] = val;
+ }
+ }, method, val, arguments.length, null );
+ };
+});
+
+function getWindow( elem ) {
+ return jQuery.isWindow( elem ) ?
+ elem :
+ elem.nodeType === 9 ?
+ elem.defaultView || elem.parentWindow :
+ false;
+}
+// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
+jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
+ jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
+ // margin is only for outerHeight, outerWidth
+ jQuery.fn[ funcName ] = function( margin, value ) {
+ var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
+ extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
+
+ return jQuery.access( this, function( elem, type, value ) {
+ var doc;
+
+ if ( jQuery.isWindow( elem ) ) {
+ // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
+ // isn't a whole lot we can do. See pull request at this URL for discussion:
+ // https://github.com/jquery/jquery/pull/764
+ return elem.document.documentElement[ "client" + name ];
+ }
+
+ // Get document width or height
+ if ( elem.nodeType === 9 ) {
+ doc = elem.documentElement;
+
+ // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
+ // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
+ return Math.max(
+ elem.body[ "scroll" + name ], doc[ "scroll" + name ],
+ elem.body[ "offset" + name ], doc[ "offset" + name ],
+ doc[ "client" + name ]
+ );
+ }
+
+ return value === undefined ?
+ // Get width or height on the element, requesting but not forcing parseFloat
+ jQuery.css( elem, type, extra ) :
+
+ // Set width or height on the element
+ jQuery.style( elem, type, value, extra );
+ }, type, chainable ? margin : undefined, chainable, null );
+ };
+ });
+});
+// Limit scope pollution from any deprecated API
+// (function() {
+
+// })();
+// Expose jQuery to the global object
+window.jQuery = window.$ = jQuery;
+
+// Expose jQuery as an AMD module, but only for AMD loaders that
+// understand the issues with loading multiple versions of jQuery
+// in a page that all might call define(). The loader will indicate
+// they have special allowances for multiple jQuery versions by
+// specifying define.amd.jQuery = true. Register as a named module,
+// since jQuery can be concatenated with other files that may use define,
+// but not use a proper concatenation script that understands anonymous
+// AMD modules. A named AMD is safest and most robust way to register.
+// Lowercase jquery is used because AMD module names are derived from
+// file names, and jQuery is normally delivered in a lowercase file name.
+// Do this after creating the global so that if an AMD module wants to call
+// noConflict to hide this version of jQuery, it will work.
+if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
+ define( "jquery", [], function () { return jQuery; } );
+}
+
+})( window ); \ No newline at end of file
diff --git a/templates/assets/tether/examples/resources/js/log.js b/templates/assets/tether/examples/resources/js/log.js
new file mode 100644
index 0000000..6acd4fd
--- /dev/null
+++ b/templates/assets/tether/examples/resources/js/log.js
@@ -0,0 +1,134 @@
+(function() {
+ var ffSupport, formats, getOrderedMatches, hasMatches, isFF, isIE, isOpera, isSafari, log, makeArray, operaSupport, safariSupport, stringToArgs, _log;
+ if (!(window.console && window.console.log)) {
+ return;
+ }
+ log = function() {
+ var args;
+ args = [];
+ makeArray(arguments).forEach(function(arg) {
+ if (typeof arg === 'string') {
+ return args = args.concat(stringToArgs(arg));
+ } else {
+ return args.push(arg);
+ }
+ });
+ return _log.apply(window, args);
+ };
+ _log = function() {
+ return console.log.apply(console, makeArray(arguments));
+ };
+ makeArray = function(arrayLikeThing) {
+ return Array.prototype.slice.call(arrayLikeThing);
+ };
+ formats = [
+ {
+ regex: /\*([^\*]+)\*/,
+ replacer: function(m, p1) {
+ return "%c" + p1 + "%c";
+ },
+ styles: function() {
+ return ['font-style: italic', ''];
+ }
+ }, {
+ regex: /\_([^\_]+)\_/,
+ replacer: function(m, p1) {
+ return "%c" + p1 + "%c";
+ },
+ styles: function() {
+ return ['font-weight: bold', ''];
+ }
+ }, {
+ regex: /\`([^\`]+)\`/,
+ replacer: function(m, p1) {
+ return "%c" + p1 + "%c";
+ },
+ styles: function() {
+ return ['background: rgb(255, 255, 219); padding: 1px 5px; border: 1px solid rgba(0, 0, 0, 0.1)', ''];
+ }
+ }, {
+ regex: /\[c\=(?:\"|\')?((?:(?!(?:\"|\')\]).)*)(?:\"|\')?\]((?:(?!\[c\]).)*)\[c\]/,
+ replacer: function(m, p1, p2) {
+ return "%c" + p2 + "%c";
+ },
+ styles: function(match) {
+ return [match[1], ''];
+ }
+ }
+ ];
+ hasMatches = function(str) {
+ var _hasMatches;
+ _hasMatches = false;
+ formats.forEach(function(format) {
+ if (format.regex.test(str)) {
+ return _hasMatches = true;
+ }
+ });
+ return _hasMatches;
+ };
+ getOrderedMatches = function(str) {
+ var matches;
+ matches = [];
+ formats.forEach(function(format) {
+ var match;
+ match = str.match(format.regex);
+ if (match) {
+ return matches.push({
+ format: format,
+ match: match
+ });
+ }
+ });
+ return matches.sort(function(a, b) {
+ return a.match.index - b.match.index;
+ });
+ };
+ stringToArgs = function(str) {
+ var firstMatch, matches, styles;
+ styles = [];
+ while (hasMatches(str)) {
+ matches = getOrderedMatches(str);
+ firstMatch = matches[0];
+ str = str.replace(firstMatch.format.regex, firstMatch.format.replacer);
+ styles = styles.concat(firstMatch.format.styles(firstMatch.match));
+ }
+ return [str].concat(styles);
+ };
+ isSafari = function() {
+ return /Safari/.test(navigator.userAgent) && /Apple Computer/.test(navigator.vendor);
+ };
+ isOpera = function() {
+ return /OPR/.test(navigator.userAgent) && /Opera/.test(navigator.vendor);
+ };
+ isFF = function() {
+ return /Firefox/.test(navigator.userAgent);
+ };
+ isIE = function() {
+ return /MSIE/.test(navigator.userAgent);
+ };
+ safariSupport = function() {
+ var m;
+ m = navigator.userAgent.match(/AppleWebKit\/(\d+)\.(\d+)(\.|\+|\s)/);
+ if (!m) {
+ return false;
+ }
+ return 537.38 <= parseInt(m[1], 10) + (parseInt(m[2], 10) / 100);
+ };
+ operaSupport = function() {
+ var m;
+ m = navigator.userAgent.match(/OPR\/(\d+)\./);
+ if (!m) {
+ return false;
+ }
+ return 15 <= parseInt(m[1], 10);
+ };
+ ffSupport = function() {
+ return window.console.firebug || window.console.exception;
+ };
+ if (isIE() || (isFF() && !ffSupport()) || (isOpera() && !operaSupport()) || (isSafari() && !safariSupport())) {
+ window.log = _log;
+ } else {
+ window.log = log;
+ }
+ window.log.l = _log;
+}).call(this); \ No newline at end of file
diff --git a/templates/assets/tether/examples/scroll/index.html b/templates/assets/tether/examples/scroll/index.html
new file mode 100644
index 0000000..4d4fd64
--- /dev/null
+++ b/templates/assets/tether/examples/scroll/index.html
@@ -0,0 +1,922 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <link rel="stylesheet" href="../resources/css/base.css" />
+ <link rel="stylesheet" href="../common/css/style.css" />
+ </head>
+ <body>
+
+ <div class="instructions">Scroll the page</div>
+
+ <h2>THE END OF THE TETHER</h2>
+
+ <p>By Joseph Conrad</p>
+
+ <h3>Chapter I</h3>
+
+ <p>For a long time after the course of the steamer <em>Sofala</em> had been
+ altered for the land, the low swampy coast had retained its appearance
+ of a mere smudge of darkness beyond a belt of glitter. The sunrays
+ seemed to fall violently upon the calm sea--seemed to shatter themselves
+ upon an adamantine surface into sparkling dust, into a dazzling vapor
+ of light that blinded the eye and wearied the brain with its unsteady
+ brightness.</p>
+
+ <p>Captain Whalley did not look at it. When his Serang, approaching the
+ roomy cane arm-chair which he filled capably, had informed him in a low
+ voice that the course was to be altered, he had risen at once and had
+ remained on his feet, face forward, while the head of his ship swung
+ through a quarter of a circle. He had not uttered a single word, not
+ even the word to steady the helm. It was the Serang, an elderly, alert,
+ little Malay, with a very dark skin, who murmured the order to the
+ helmsman. And then slowly Captain Whalley sat down again in the
+ arm-chair on the bridge and fixed his eyes on the deck between his feet.</p>
+
+ <p>He could not hope to see anything new upon this lane of the sea. He had
+ been on these coasts for the last three years. From Low Cape to Malantan
+ the distance was fifty miles, six hours' steaming for the old ship with
+ the tide, or seven against. Then you steered straight for the land, and
+ by-and-by three palms would appear on the sky, tall and slim, and with
+ their disheveled heads in a bunch, as if in confidential criticism of
+ the dark mangroves. The Sofala would be headed towards the somber
+ strip of the coast, which at a given moment, as the ship closed with
+ it obliquely, would show several clean shining fractures--the brimful
+ estuary of a river. Then on through a brown liquid, three parts water
+ and one part black earth, on and on between the low shores, three parts
+ black earth and one part brackish water, the Sofala would plow her way
+ up-stream, as she had done once every month for these seven years or
+ more, long before he was aware of her existence, long before he had ever
+ thought of having anything to do with her and her invariable voyages.
+ The old ship ought to have known the road better than her men, who had
+ not been kept so long at it without a change; better than the faithful
+ Serang, whom he had brought over from his last ship to keep the
+ captain's watch; better than he himself, who had been her captain for
+ the last three years only. She could always be depended upon to make her
+ courses. Her compasses were never out. She was no trouble at all to
+ take about, as if her great age had given her knowledge, wisdom, and
+ steadiness. She made her landfalls to a degree of the bearing, and
+ almost to a minute of her allowed time. At any moment, as he sat on
+ the bridge without looking up, or lay sleepless in his bed, simply by
+ reckoning the days and the hours he could tell where he was--the precise
+ spot of the beat. He knew it well too, this monotonous huckster's
+ round, up and down the Straits; he knew its order and its sights and its
+ people. Malacca to begin with, in at daylight and out at dusk, to cross
+ over with a rigid phosphorescent wake this highway of the Far East.
+ Darkness and gleams on the water, clear stars on a black sky, perhaps
+ the lights of a home steamer keeping her unswerving course in the
+ middle, or maybe the elusive shadow of a native craft with her mat sails
+ flitting by silently--and the low land on the other side in sight
+ at daylight. At noon the three palms of the next place of call, up a
+ sluggish river. The only white man residing there was a retired young
+ sailor, with whom he had become friendly in the course of many voyages.
+ Sixty miles farther on there was another place of call, a deep bay with
+ only a couple of houses on the beach. And so on, in and out, picking
+ up coastwise cargo here and there, and finishing with a hundred miles'
+ steady steaming through the maze of an archipelago of small islands up
+ to a large native town at the end of the beat. There was a three days'
+ rest for the old ship before he started her again in inverse order,
+ seeing the same shores from another bearing, hearing the same voices
+ in the same places, back again to the Sofala's port of registry on
+ the great highway to the East, where he would take up a berth nearly
+ opposite the big stone pile of the harbor office till it was time to
+ start again on the old round of 1600 miles and thirty days. Not a very
+ enterprising life, this, for Captain Whalley, Henry Whalley, otherwise
+ Dare-devil Harry--Whalley of the Condor, a famous clipper in her day.
+ No. Not a very enterprising life for a man who had served famous firms,
+ who had sailed famous ships (more than one or two of them his own); who
+ had made famous passages, had been the pioneer of new routes and new
+ trades; who had steered across the unsurveyed tracts of the South Seas,
+ and had seen the sun rise on uncharted islands. Fifty years at sea, and
+ forty out in the East ("a pretty thorough apprenticeship," he used
+ to remark smilingly), had made him honorably known to a generation of
+ shipowners and merchants in all the ports from Bombay clear over to
+ where the East merges into the West upon the coast of the two Americas.
+ His fame remained writ, not very large but plain enough, on the
+ Admiralty charts. Was there not somewhere between Australia and China a
+ Whalley Island and a Condor Reef? On that dangerous coral formation the
+ celebrated clipper had hung stranded for three days, her captain and
+ crew throwing her cargo overboard with one hand and with the other, as
+ it were, keeping off her a flotilla of savage war-canoes. At that time
+ neither the island nor the reef had any official existence. Later the
+ officers of her Majesty's steam vessel Fusilier, dispatched to make a
+ survey of the route, recognized in the adoption of these two names the
+ enterprise of the man and the solidity of the ship. Besides, as anyone
+ who cares may see, the "General Directory," vol. ii. p. 410, begins the
+ description of the "Malotu or Whalley Passage" with the words: "This
+ advantageous route, first discovered in 1850 by Captain Whalley in the
+ ship Condor," &amp;c., and ends by recommending it warmly to sailing vessels
+ leaving the China ports for the south in the months from December to
+ April inclusive.</p>
+
+ <p>This was the clearest gain he had out of life. Nothing could rob him
+ of this kind of fame. The piercing of the Isthmus of Suez, like the
+ breaking of a dam, had let in upon the East a flood of new ships, new
+ men, new methods of trade. It had changed the face of the Eastern seas
+ and the very spirit of their life; so that his early experiences meant
+ nothing whatever to the new generation of seamen.</p>
+
+ <p>In those bygone days he had handled many thousands of pounds of his
+ employers' money and of his own; he had attended faithfully, as by law
+ a shipmaster is expected to do, to the conflicting interests of owners,
+ charterers, and underwriters. He had never lost a ship or consented to
+ a shady transaction; and he had lasted well, outlasting in the end the
+ conditions that had gone to the making of his name. He had buried his
+ wife (in the Gulf of Petchili), had married off his daughter to the man
+ of her unlucky choice, and had lost more than an ample competence in the
+ crash of the notorious Travancore and Deccan Banking Corporation, whose
+ downfall had shaken the East like an earthquake. And he was sixty-five
+ years old.</p>
+
+ <h3>Chapter II</h3>
+
+ <p>His age sat lightly enough on him; and of his ruin he was not ashamed.
+ He had not been alone to believe in the stability of the Banking
+ Corporation. Men whose judgment in matters of finance was as expert as
+ his seamanship had commended the prudence of his investments, and had
+ themselves lost much money in the great failure. The only difference
+ between him and them was that he had lost his all. And yet not his all.
+ There had remained to him from his lost fortune a very pretty little
+ bark, Fair Maid, which he had bought to occupy his leisure of a retired
+ sailor--"to play with," as he expressed it himself.</p>
+
+ <p>He had formally declared himself tired of the sea the year preceding his
+ daughter's marriage. But after the young couple had gone to settle in
+ Melbourne he found out that he could not make himself happy on shore. He
+ was too much of a merchant sea-captain for mere yachting to satisfy him.
+ He wanted the illusion of affairs; and his acquisition of the Fair
+ Maid preserved the continuity of his life. He introduced her to his
+ acquaintances in various ports as "my last command." When he grew too
+ old to be trusted with a ship, he would lay her up and go ashore to be
+ buried, leaving directions in his will to have the bark towed out and
+ scuttled decently in deep water on the day of the funeral. His daughter
+ would not grudge him the satisfaction of knowing that no stranger would
+ handle his last command after him. With the fortune he was able to leave
+ her, the value of a 500-ton bark was neither here nor there. All this
+ would be said with a jocular twinkle in his eye: the vigorous old man
+ had too much vitality for the sentimentalism of regret; and a little
+ wistfully withal, because he was at home in life, taking a genuine
+ pleasure in its feelings and its possessions; in the dignity of his
+ reputation and his wealth, in his love for his daughter, and in his
+ satisfaction with the ship--the plaything of his lonely leisure.</p>
+
+ <p>He had the cabin arranged in accordance with his simple ideal of comfort
+ at sea. A big bookcase (he was a great reader) occupied one side of his
+ stateroom; the portrait of his late wife, a flat bituminous oil-painting
+ representing the profile and one long black ringlet of a young woman,
+ faced his bed-place. Three chronometers ticked him to sleep and greeted
+ him on waking with the tiny competition of their beats. He rose at five
+ every day. The officer of the morning watch, drinking his early cup
+ of coffee aft by the wheel, would hear through the wide orifice of the
+ copper ventilators all the splashings, blowings, and splutterings of
+ his captain's toilet. These noises would be followed by a sustained
+ deep murmur of the Lord's Prayer recited in a loud earnest voice. Five
+ minutes afterwards the head and shoulders of Captain Whalley emerged
+ out of the companion-hatchway. Invariably he paused for a while on the
+ stairs, looking all round at the horizon; upwards at the trim of the
+ sails; inhaling deep draughts of the fresh air. Only then he would step
+ out on the poop, acknowledging the hand raised to the peak of the cap
+ with a majestic and benign "Good morning to you." He walked the deck
+ till eight scrupulously. Sometimes, not above twice a year, he had to
+ use a thick cudgel-like stick on account of a stiffness in the hip--a
+ slight touch of rheumatism, he supposed. Otherwise he knew nothing of
+ the ills of the flesh. At the ringing of the breakfast bell he went
+ below to feed his canaries, wind up the chronometers, and take the
+ head of the table. From there he had before his eyes the big carbon
+ photographs of his daughter, her husband, and two fat-legged babies
+ --his grandchildren--set in black frames into the maplewood bulkheads
+ of the cuddy. After breakfast he dusted the glass over these portraits
+ himself with a cloth, and brushed the oil painting of his wife with a
+ plumate kept suspended from a small brass hook by the side of the heavy
+ gold frame. Then with the door of his stateroom shut, he would sit down
+ on the couch under the portrait to read a chapter out of a thick pocket
+ Bible--her Bible. But on some days he only sat there for half an hour
+ with his finger between the leaves and the closed book resting on his
+ knees. Perhaps he had remembered suddenly how fond of boat-sailing she
+ used to be.</p>
+
+ <p>She had been a real shipmate and a true woman too. It was like an
+ article of faith with him that there never had been, and never could be,
+ a brighter, cheerier home anywhere afloat or ashore than his home under
+ the poop-deck of the Condor, with the big main cabin all white and gold,
+ garlanded as if for a perpetual festival with an unfading wreath. She
+ had decorated the center of every panel with a cluster of home flowers.
+ It took her a twelvemonth to go round the cuddy with this labor of love.
+ To him it had remained a marvel of painting, the highest achievement of
+ taste and skill; and as to old Swinburne, his mate, every time he
+ came down to his meals he stood transfixed with admiration before the
+ progress of the work. You could almost smell these roses, he declared,
+ sniffing the faint flavor of turpentine which at that time pervaded the
+ saloon, and (as he confessed afterwards) made him somewhat less hearty
+ than usual in tackling his food. But there was nothing of the sort to
+ interfere with his enjoyment of her singing. "Mrs. Whalley is a regular
+ out-and-out nightingale, sir," he would pronounce with a judicial air
+ after listening profoundly over the skylight to the very end of the
+ piece. In fine weather, in the second dog-watch, the two men could hear
+ her trills and roulades going on to the accompaniment of the piano in
+ the cabin. On the very day they got engaged he had written to London
+ for the instrument; but they had been married for over a year before it
+ reached them, coming out round the Cape. The big case made part of the
+ first direct general cargo landed in Hong-kong harbor--an event that to
+ the men who walked the busy quays of to-day seemed as hazily remote as
+ the dark ages of history. But Captain Whalley could in a half hour of
+ solitude live again all his life, with its romance, its idyl, and its
+ sorrow. He had to close her eyes himself. She went away from under the
+ ensign like a sailor's wife, a sailor herself at heart. He had read
+ the service over her, out of her own prayer-book, without a break in his
+ voice. When he raised his eyes he could see old Swinburne facing him
+ with his cap pressed to his breast, and his rugged, weather-beaten,
+ impassive face streaming with drops of water like a lump of chipped red
+ granite in a shower. It was all very well for that old sea-dog to cry.
+ He had to read on to the end; but after the splash he did not remember
+ much of what happened for the next few days. An elderly sailor of the
+ crew, deft at needlework, put together a mourning frock for the child
+ out of one of her black skirts.</p>
+
+ <p>He was not likely to forget; but you cannot dam up life like a sluggish
+ stream. It will break out and flow over a man's troubles, it will close
+ upon a sorrow like the sea upon a dead body, no matter how much love has
+ gone to the bottom. And the world is not bad. People had been very
+ kind to him; especially Mrs. Gardner, the wife of the senior partner
+ in Gardner, Patteson, &amp; Co., the owners of the Condor. It was she who
+ volunteered to look after the little one, and in due course took her to
+ England (something of a journey in those days, even by the overland
+ mail route) with her own girls to finish her education. It was ten years
+ before he saw her again.</p>
+
+ <p>As a little child she had never been frightened of bad weather; she
+ would beg to be taken up on deck in the bosom of his oilskin coat to
+ watch the big seas hurling themselves upon the Condor. The swirl and
+ crash of the waves seemed to fill her small soul with a breathless
+ delight. "A good boy spoiled," he used to say of her in joke. He had
+ named her Ivy because of the sound of the word, and obscurely fascinated
+ by a vague association of ideas. She had twined herself tightly round
+ his heart, and he intended her to cling close to her father as to a
+ tower of strength; forgetting, while she was little, that in the nature
+ of things she would probably elect to cling to someone else. But
+ he loved life well enough for even that event to give him a certain
+ satisfaction, apart from his more intimate feeling of loss.</p>
+
+ <p>After he had purchased the Fair Maid to occupy his loneliness, he
+ hastened to accept a rather unprofitable freight to Australia simply for
+ the opportunity of seeing his daughter in her own home. What made him
+ dissatisfied there was not to see that she clung now to somebody else,
+ but that the prop she had selected seemed on closer examination "a
+ rather poor stick"--even in the matter of health. He disliked his
+ son-in-law's studied civility perhaps more than his method of
+ handling the sum of money he had given Ivy at her marriage. But of his
+ apprehensions he said nothing. Only on the day of his departure, with
+ the hall-door open already, holding her hands and looking steadily into
+ her eyes, he had said, "You know, my dear, all I have is for you and the
+ chicks. Mind you write to me openly." She had answered him by an almost
+ imperceptible movement of her head. She resembled her mother in
+ the color of her eyes, and in character--and also in this, that she
+ understood him without many words.</p>
+
+ <p>Sure enough she had to write; and some of these letters made Captain
+ Whalley lift his white eye-brows. For the rest he considered he was
+ reaping the true reward of his life by being thus able to produce on
+ demand whatever was needed. He had not enjoyed himself so much in a
+ way since his wife had died. Characteristically enough his son-in-law's
+ punctuality in failure caused him at a distance to feel a sort of
+ kindness towards the man. The fellow was so perpetually being jammed on
+ a lee shore that to charge it all to his reckless navigation would be
+ manifestly unfair. No, no! He knew well what that meant. It was bad
+ luck. His own had been simply marvelous, but he had seen in his life too
+ many good men--seamen and others--go under with the sheer weight of bad
+ luck not to recognize the fatal signs. For all that, he was cogitating
+ on the best way of tying up very strictly every penny he had to leave,
+ when, with a preliminary rumble of rumors (whose first sound reached
+ him in Shanghai as it happened), the shock of the big failure came;
+ and, after passing through the phases of stupor, of incredulity, of
+ indignation, he had to accept the fact that he had nothing to speak of
+ to leave.</p>
+
+ <p>Upon that, as if he had only waited for this catastrophe, the unlucky
+ man, away there in Melbourne, gave up his unprofitable game, and sat
+ down--in an invalid's bath-chair at that too. "He will never walk
+ again," wrote the wife. For the first time in his life Captain Whalley
+ was a bit staggered.</p>
+
+ <p>The Fair Maid had to go to work in bitter earnest now. It was no longer
+ a matter of preserving alive the memory of Dare-devil Harry Whalley in
+ the Eastern Seas, or of keeping an old man in pocket-money and clothes,
+ with, perhaps, a bill for a few hundred first-class cigars thrown in at
+ the end of the year. He would have to buckle-to, and keep her going hard
+ on a scant allowance of gilt for the ginger-bread scrolls at her stem
+ and stern.</p>
+
+ <p>This necessity opened his eyes to the fundamental changes of the world.
+ Of his past only the familiar names remained, here and there, but
+ the things and the men, as he had known them, were gone. The name of
+ Gardner, Patteson, &amp; Co. was still displayed on the walls of warehouses
+ by the waterside, on the brass plates and window-panes in the business
+ quarters of more than one Eastern port, but there was no longer a
+ Gardner or a Patteson in the firm. There was no longer for Captain
+ Whalley an arm-chair and a welcome in the private office, with a bit of
+ business ready to be put in the way of an old friend, for the sake of
+ bygone services. The husbands of the Gardner girls sat behind the desks
+ in that room where, long after he had left the employ, he had kept his
+ right of entrance in the old man's time. Their ships now had yellow
+ funnels with black tops, and a time-table of appointed routes like a
+ confounded service of tramways. The winds of December and June were all
+ one to them; their captains (excellent young men he doubted not) were,
+ to be sure, familiar with Whalley Island, because of late years the
+ Government had established a white fixed light on the north end (with
+ a red danger sector over the Condor Reef), but most of them would have
+ been extremely surprised to hear that a flesh-and-blood Whalley still
+ existed--an old man going about the world trying to pick up a cargo here
+ and there for his little bark.</p>
+
+ <p>And everywhere it was the same. Departed the men who would have nodded
+ appreciatively at the mention of his name, and would have thought
+ themselves bound in honor to do something for Dare-devil Harry Whalley.
+ Departed the opportunities which he would have known how to seize; and
+ gone with them the white-winged flock of clippers that lived in the
+ boisterous uncertain life of the winds, skimming big fortunes out of
+ the foam of the sea. In a world that pared down the profits to an
+ irreducible minimum, in a world that was able to count its disengaged
+ tonnage twice over every day, and in which lean charters were snapped up
+ by cable three months in advance, there were no chances of fortune for
+ an individual wandering haphazard with a little bark--hardly indeed any
+ room to exist.</p>
+
+ <p>He found it more difficult from year to year. He suffered greatly from
+ the smallness of remittances he was able to send his daughter. Meantime
+ he had given up good cigars, and even in the matter of inferior cheroots
+ limited himself to six a day. He never told her of his difficulties, and
+ she never enlarged upon her struggle to live. Their confidence in each
+ other needed no explanations, and their perfect understanding endured
+ without protestations of gratitude or regret. He would have been shocked
+ if she had taken it into her head to thank him in so many words, but
+ he found it perfectly natural that she should tell him she needed two
+ hundred pounds.</p>
+
+ <p>He had come in with the Fair Maid in ballast to look for a freight in
+ the Sofala's port of registry, and her letter met him there. Its tenor
+ was that it was no use mincing matters. Her only resource was in opening
+ a boarding-house, for which the prospects, she judged, were good. Good
+ enough, at any rate, to make her tell him frankly that with two hundred
+ pounds she could make a start. He had torn the envelope open, hastily,
+ on deck, where it was handed to him by the ship-chandler's runner, who
+ had brought his mail at the moment of anchoring. For the second time
+ in his life he was appalled, and remained stock-still at the cabin door
+ with the paper trembling between his fingers. Open a boarding-house! Two
+ hundred pounds for a start! The only resource! And he did not know where
+ to lay his hands on two hundred pence.</p>
+
+ <p>All that night Captain Whalley walked the poop of his anchored ship, as
+ though he had been about to close with the land in thick weather, and
+ uncertain of his position after a run of many gray days without a sight
+ of sun, moon, or stars. The black night twinkled with the guiding lights
+ of seamen and the steady straight lines of lights on shore; and all
+ around the Fair Maid the riding lights of ships cast trembling trails
+ upon the water of the roadstead. Captain Whalley saw not a gleam
+ anywhere till the dawn broke and he found out that his clothing was
+ soaked through with the heavy dew.</p>
+
+ <p>His ship was awake. He stopped short, stroked his wet beard, and
+ descended the poop ladder backwards, with tired feet. At the sight
+ of him the chief officer, lounging about sleepily on the quarterdeck,
+ remained open-mouthed in the middle of a great early-morning yawn.</p>
+
+ <p>"Good morning to you," pronounced Captain Whalley solemnly, passing into
+ the cabin. But he checked himself in the doorway, and without looking
+ back, "By the bye," he said, "there should be an empty wooden case put
+ away in the lazarette. It has not been broken up--has it?"</p>
+
+ <p>The mate shut his mouth, and then asked as if dazed, "What empty case,
+ sir?"</p>
+
+ <p>"A big flat packing-case belonging to that painting in my room. Let it
+ be taken up on deck and tell the carpenter to look it over. I may want
+ to use it before long."</p>
+
+ <p>The chief officer did not stir a limb till he had heard the door of the
+ captain's state-room slam within the cuddy. Then he beckoned aft the
+ second mate with his forefinger to tell him that there was something "in
+ the wind."</p>
+
+ <p>When the bell rang Captain Whalley's authoritative voice boomed out
+ through a closed door, "Sit down and don't wait for me." And his
+ impressed officers took their places, exchanging looks and whispers
+ across the table. What! No breakfast? And after apparently knocking
+ about all night on deck, too! Clearly, there was something in the wind.
+ In the skylight above their heads, bowed earnestly over the plates,
+ three wire cages rocked and rattled to the restless jumping of the
+ hungry canaries; and they could detect the sounds of their "old
+ man's" deliberate movements within his state-room. Captain Whalley was
+ methodically winding up the chronometers, dusting the portrait of
+ his late wife, getting a clean white shirt out of the drawers, making
+ himself ready in his punctilious unhurried manner to go ashore. He could
+ not have swallowed a single mouthful of food that morning. He had made
+ up his mind to sell the Fair Maid.</p>
+
+ <h3>Chapter III</h3>
+
+ <p>Just at that time the Japanese were casting far and wide for ships
+ of European build, and he had no difficulty in finding a purchaser, a
+ speculator who drove a hard bargain, but paid cash down for the Fair
+ Maid, with a view to a profitable resale. Thus it came about that
+ Captain Whalley found himself on a certain afternoon descending the
+ steps of one of the most important post-offices of the East with a slip
+ of bluish paper in his hand. This was the receipt of a registered letter
+ enclosing a draft for two hundred pounds, and addressed to Melbourne.
+ Captain Whalley pushed the paper into his waistcoat-pocket, took his
+ stick from under his arm, and walked down the street.</p>
+
+ <p>It was a recently opened and untidy thoroughfare with rudimentary
+ side-walks and a soft layer of dust cushioning the whole width of
+ the road. One end touched the slummy street of Chinese shops near the
+ harbor, the other drove straight on, without houses, for a couple of
+ miles, through patches of jungle-like vegetation, to the yard gates
+ of the new Consolidated Docks Company. The crude frontages of the new
+ Government buildings alternated with the blank fencing of vacant plots,
+ and the view of the sky seemed to give an added spaciousness to the
+ broad vista. It was empty and shunned by natives after business
+ hours, as though they had expected to see one of the tigers from the
+ neighborhood of the New Waterworks on the hill coming at a loping canter
+ down the middle to get a Chinese shopkeeper for supper. Captain Whalley
+ was not dwarfed by the solitude of the grandly planned street. He
+ had too fine a presence for that. He was only a lonely figure walking
+ purposefully, with a great white beard like a pilgrim, and with a thick
+ stick that resembled a weapon. On one side the new Courts of Justice had
+ a low and unadorned portico of squat columns half concealed by a few old
+ trees left in the approach. On the other the pavilion wings of the
+ new Colonial Treasury came out to the line of the street. But Captain
+ Whalley, who had now no ship and no home, remembered in passing that
+ on that very site when he first came out from England there had stood a
+ fishing village, a few mat huts erected on piles between a muddy tidal
+ creek and a miry pathway that went writhing into a tangled wilderness
+ without any docks or waterworks.</p>
+
+ <p>No ship--no home. And his poor Ivy away there had no home either. A
+ boarding-house is no sort of home though it may get you a living. His
+ feelings were horribly rasped by the idea of the boarding-house. In his
+ rank of life he had that truly aristocratic temperament characterized by
+ a scorn of vulgar gentility and by prejudiced views as to the derogatory
+ nature of certain occupations. For his own part he had always preferred
+ sailing merchant ships (which is a straightforward occupation) to buying
+ and selling merchandise, of which the essence is to get the better of
+ somebody in a bargain--an undignified trial of wits at best. His father
+ had been Colonel Whalley (retired) of the H. E. I. Company's service,
+ with very slender means besides his pension, but with distinguished
+ connections. He could remember as a boy how frequently waiters at the
+ inns, country tradesmen and small people of that sort, used to "My lord"
+ the old warrior on the strength of his appearance.</p>
+
+ <p>Captain Whalley himself (he would have entered the Navy if his father
+ had not died before he was fourteen) had something of a grand air which
+ would have suited an old and glorious admiral; but he became lost like
+ a straw in the eddy of a brook amongst the swarm of brown and yellow
+ humanity filling a thoroughfare, that by contrast with the vast and
+ empty avenue he had left seemed as narrow as a lane and absolutely
+ riotous with life. The walls of the houses were blue; the shops of the
+ Chinamen yawned like cavernous lairs; heaps of nondescript merchandise
+ overflowed the gloom of the long range of arcades, and the fiery
+ serenity of sunset took the middle of the street from end to end with a
+ glow like the reflection of a fire. It fell on the bright colors and the
+ dark faces of the bare-footed crowd, on the pallid yellow backs of the
+ half-naked jostling coolies, on the accouterments of a tall Sikh trooper
+ with a parted beard and fierce mustaches on sentry before the gate of
+ the police compound. Looming very big above the heads in a red haze of
+ dust, the tightly packed car of the cable tramway navigated cautiously
+ up the human stream, with the incessant blare of its horn, in the manner
+ of a steamer groping in a fog.</p>
+
+ <p>Captain Whalley emerged like a diver on the other side, and in the
+ desert shade between the walls of closed warehouses removed his hat to
+ cool his brow. A certain disrepute attached to the calling of a
+ landlady of a boarding-house. These women were said to be rapacious,
+ unscrupulous, untruthful; and though he contemned no class of his
+ fellow-creatures--God forbid!--these were suspicions to which it was
+ unseemly that a Whalley should lay herself open. He had not expostulated
+ with her, however. He was confident she shared his feelings; he was
+ sorry for her; he trusted her judgment; he considered it a merciful
+ dispensation that he could help her once more,--but in his aristocratic
+ heart of hearts he would have found it more easy to reconcile himself to
+ the idea of her turning seamstress. Vaguely he remembered reading years
+ ago a touching piece called the "Song of the Shirt." It was all very
+ well making songs about poor women. The granddaughter of Colonel
+ Whalley, the landlady of a boarding-house! Pooh! He replaced his hat,
+ dived into two pockets, and stopping a moment to apply a flaring match
+ to the end of a cheap cheroot, blew an embittered cloud of smoke at a
+ world that could hold such surprises.</p>
+
+ <p>Of one thing he was certain--that she was the own child of a clever
+ mother. Now he had got over the wrench of parting with his ship, he
+ perceived clearly that such a step had been unavoidable. Perhaps he had
+ been growing aware of it all along with an unconfessed knowledge. But
+ she, far away there, must have had an intuitive perception of it, with
+ the pluck to face that truth and the courage to speak out--all the
+ qualities which had made her mother a woman of such excellent counsel.</p>
+
+ <p>It would have had to come to that in the end! It was fortunate she had
+ forced his hand. In another year or two it would have been an utterly
+ barren sale. To keep the ship going he had been involving himself deeper
+ every year. He was defenseless before the insidious work of adversity,
+ to whose more open assaults he could present a firm front; like a
+ cliff that stands unmoved the open battering of the sea, with a lofty
+ ignorance of the treacherous backwash undermining its base. As it was,
+ every liability satisfied, her request answered, and owing no man a
+ penny, there remained to him from the proceeds a sum of five hundred
+ pounds put away safely. In addition he had upon his person some forty
+ odd dollars--enough to pay his hotel bill, providing he did not linger
+ too long in the modest bedroom where he had taken refuge.</p>
+
+ <p>Scantily furnished, and with a waxed floor, it opened into one of
+ the side-verandas. The straggling building of bricks, as airy as a
+ bird-cage, resounded with the incessant flapping of rattan screens
+ worried by the wind between the white-washed square pillars of the
+ sea-front. The rooms were lofty, a ripple of sunshine flowed over the
+ ceilings; and the periodical invasions of tourists from some passenger
+ steamer in the harbor flitted through the wind-swept dusk of the
+ apartments with the tumult of their unfamiliar voices and impermanent
+ presences, like relays of migratory shades condemned to speed headlong
+ round the earth without leaving a trace. The babble of their irruptions
+ ebbed out as suddenly as it had arisen; the draughty corridors and
+ the long chairs of the verandas knew their sight-seeing hurry or
+ their prostrate repose no more; and Captain Whalley, substantial and
+ dignified, left well-nigh alone in the vast hotel by each light-hearted
+ skurry, felt more and more like a stranded tourist with no aim in view,
+ like a forlorn traveler without a home. In the solitude of his room he
+ smoked thoughtfully, gazing at the two sea-chests which held all that he
+ could call his own in this world. A thick roll of charts in a sheath
+ of sailcloth leaned in a corner; the flat packing-case containing the
+ portrait in oils and the three carbon photographs had been pushed under
+ the bed. He was tired of discussing terms, of assisting at surveys, of
+ all the routine of the business. What to the other parties was merely
+ the sale of a ship was to him a momentous event involving a radically
+ new view of existence. He knew that after this ship there would be no
+ other; and the hopes of his youth, the exercise of his abilities, every
+ feeling and achievement of his manhood, had been indissolubly connected
+ with ships. He had served ships; he had owned ships; and even the years
+ of his actual retirement from the sea had been made bearable by the idea
+ that he had only to stretch out his hand full of money to get a ship. He
+ had been at liberty to feel as though he were the owner of all the
+ ships in the world. The selling of this one was weary work; but when
+ she passed from him at last, when he signed the last receipt, it was as
+ though all the ships had gone out of the world together, leaving him on
+ the shore of inaccessible oceans with seven hundred pounds in his hands.</p>
+
+ <p>Striding firmly, without haste, along the quay, Captain Whalley averted
+ his glances from the familiar roadstead. Two generations of seamen born
+ since his first day at sea stood between him and all these ships at the
+ anchorage. His own was sold, and he had been asking himself, What next?</p>
+
+ <p>From the feeling of loneliness, of inward emptiness,--and of loss
+ too, as if his very soul had been taken out of him forcibly,--there had
+ sprung at first a desire to start right off and join his daughter.
+ "Here are the last pence," he would say to her; "take them, my dear. And
+ here's your old father: you must take him too."</p>
+
+ <p>His soul recoiled, as if afraid of what lay hidden at the bottom of
+ this impulse. Give up! Never! When one is thoroughly weary all sorts of
+ nonsense come into one's head. A pretty gift it would have been for a
+ poor woman--this seven hundred pounds with the incumbrance of a hale old
+ fellow more than likely to last for years and years to come. Was he not
+ as fit to die in harness as any of the youngsters in charge of these
+ anchored ships out yonder? He was as solid now as ever he had been. But
+ as to who would give him work to do, that was another matter. Were he,
+ with his appearance and antecedents, to go about looking for a junior's
+ berth, people, he was afraid, would not take him seriously; or else if
+ he succeeded in impressing them, he would maybe obtain their pity, which
+ would be like stripping yourself naked to be kicked. He was not anxious
+ to give himself away for less than nothing. He had no use for anybody's
+ pity. On the other hand, a command--the only thing he could try for with
+ due regard for common decency--was not likely to be lying in wait
+ for him at the corner of the next street. Commands don't go a-begging
+ nowadays. Ever since he had come ashore to carry out the business of
+ the sale he had kept his ears open, but had heard no hint of one being
+ vacant in the port. And even if there had been one, his successful past
+ itself stood in his way. He had been his own employer too long. The only
+ credential he could produce was the testimony of his whole life. What
+ better recommendation could anyone require? But vaguely he felt that
+ the unique document would be looked upon as an archaic curiosity of the
+ Eastern waters, a screed traced in obsolete words--in a half-forgotten
+ language.</p>
+
+ <h3>Chapter IV</h3>
+
+ <p>Revolving these thoughts, he strolled on near the railings of the quay,
+ broad-chested, without a stoop, as though his big shoulders had never
+ felt the burden of the loads that must be carried between the cradle
+ and the grave. No single betraying fold or line of care disfigured the
+ reposeful modeling of his face. It was full and untanned; and the upper
+ part emerged, massively quiet, out of the downward flow of silvery hair,
+ with the striking delicacy of its clear complexion and the powerful
+ width of the forehead. The first cast of his glance fell on you candid
+ and swift, like a boy's; but because of the ragged snowy thatch of the
+ eyebrows the affability of his attention acquired the character of a
+ dark and searching scrutiny. With age he had put on flesh a little, had
+ increased his girth like an old tree presenting no symptoms of decay;
+ and even the opulent, lustrous ripple of white hairs upon his chest
+ seemed an attribute of unquenchable vitality and vigor.</p>
+
+ <p>Once rather proud of his great bodily strength, and even of his personal
+ appearance, conscious of his worth, and firm in his rectitude, there had
+ remained to him, like the heritage of departed prosperity, the tranquil
+ bearing of a man who had proved himself fit in every sort of way for the
+ life of his choice. He strode on squarely under the projecting brim of
+ an ancient Panama hat. It had a low crown, a crease through its whole
+ diameter, a narrow black ribbon. Imperishable and a little discolored,
+ this headgear made it easy to pick him out from afar on thronged wharves
+ and in the busy streets. He had never adopted the comparatively modern
+ fashion of pipeclayed cork helmets. He disliked the form; and he hoped
+ he could manage to keep a cool head to the end of his life without all
+ these contrivances for hygienic ventilation. His hair was cropped close,
+ his linen always of immaculate whiteness; a suit of thin gray flannel,
+ worn threadbare but scrupulously brushed, floated about his burly limbs,
+ adding to his bulk by the looseness of its cut. The years had mellowed
+ the good-humored, imperturbable audacity of his prime into a temper
+ carelessly serene; and the leisurely tapping of his iron-shod stick
+ accompanied his footfalls with a self-confident sound on the flagstones.
+ It was impossible to connect such a fine presence and this unruffled
+ aspect with the belittling troubles of poverty; the man's whole
+ existence appeared to pass before you, facile and large, in the freedom
+ of means as ample as the clothing of his body.</p>
+
+ <p>The irrational dread of having to break into his five hundred pounds for
+ personal expenses in the hotel disturbed the steady poise of his mind.
+ There was no time to lose. The bill was running up. He nourished the
+ hope that this five hundred would perhaps be the means, if everything
+ else failed, of obtaining some work which, keeping his body and soul
+ together (not a matter of great outlay), would enable him to be of use
+ to his daughter. To his mind it was her own money which he employed, as
+ it were, in backing her father and solely for her benefit. Once at work,
+ he would help her with the greater part of his earnings; he was good for
+ many years yet, and this boarding-house business, he argued to himself,
+ whatever the prospects, could not be much of a gold-mine from the first
+ start. But what work? He was ready to lay hold of anything in an honest
+ way so that it came quickly to his hand; because the five hundred pounds
+ must be preserved intact for eventual use. That was the great point.
+ With the entire five hundred one felt a substance at one's back; but
+ it seemed to him that should he let it dwindle to four-fifty or even
+ four-eighty, all the efficiency would be gone out of the money, as though
+ there were some magic power in the round figure. But what sort of work?</p>
+
+ <p>Confronted by that haunting question as by an uneasy ghost, for whom he
+ had no exorcising formula, Captain Whalley stopped short on the apex
+ of a small bridge spanning steeply the bed of a canalized creek with
+ granite shores. Moored between the square blocks a seagoing Malay prau
+ floated half hidden under the arch of masonry, with her spars lowered
+ down, without a sound of life on board, and covered from stem to stern
+ with a ridge of palm-leaf mats. He had left behind him the overheated
+ pavements bordered by the stone frontages that, like the sheer face of
+ cliffs, followed the sweep of the quays; and an unconfined spaciousness
+ of orderly and sylvan aspect opened before him its wide plots of rolled
+ grass, like pieces of green carpet smoothly pegged out, its long ranges
+ of trees lined up in colossal porticos of dark shafts roofed with a
+ vault of branches.</p>
+
+ <p>Some of these avenues ended at the sea. It was a terraced shore; and
+ beyond, upon the level expanse, profound and glistening like the gaze
+ of a dark-blue eye, an oblique band of stippled purple lengthened itself
+ indefinitely through the gap between a couple of verdant twin islets.
+ The masts and spars of a few ships far away, hull down in the outer
+ roads, sprang straight from the water in a fine maze of rosy lines
+ penciled on the clear shadow of the eastern board. Captain Whalley gave
+ them a long glance. The ship, once his own, was anchored out there. It
+ was staggering to think that it was open to him no longer to take a boat
+ at the jetty and get himself pulled off to her when the evening came. To
+ no ship. Perhaps never more. Before the sale was concluded, and till the
+ purchase-money had been paid, he had spent daily some time on board the
+ Fair Maid. The money had been paid this very morning, and now, all at
+ once, there was positively no ship that he could go on board of when he
+ liked; no ship that would need his presence in order to do her work--to
+ live. It seemed an incredible state of affairs, something too bizarre
+ to last. And the sea was full of craft of all sorts. There was that prau
+ lying so still swathed in her shroud of sewn palm-leaves--she too had
+ her indispensable man. They lived through each other, this Malay he had
+ never seen, and this high-sterned thing of no size that seemed to be
+ resting after a long journey. And of all the ships in sight, near and
+ far, each was provided with a man, the man without whom the finest ship
+ is a dead thing, a floating and purposeless log.</p>
+
+ <p>After his one glance at the roadstead he went on, since there was
+ nothing to turn back for, and the time must be got through somehow. The
+ avenues of big trees ran straight over the Esplanade, cutting each other
+ at diverse angles, columnar below and luxuriant above. The interlaced
+ boughs high up there seemed to slumber; not a leaf stirred overhead:
+ and the reedy cast-iron lampposts in the middle of the road, gilt like
+ scepters, diminished in a long perspective, with their globes of white
+ porcelain atop, resembling a barbarous decoration of ostriches' eggs
+ displayed in a row. The flaming sky kindled a tiny crimson spark upon
+ the glistening surface of each glassy shell.</p>
+
+ <p>With his chin sunk a little, his hands behind his back, and the end of
+ his stick marking the gravel with a faint wavering line at his heels,
+ Captain Whalley reflected that if a ship without a man was like a body
+ without a soul, a sailor without a ship was of not much more account
+ in this world than an aimless log adrift upon the sea. The log might be
+ sound enough by itself, tough of fiber, and hard to destroy--but what of
+ that! And a sudden sense of irremediable idleness weighted his feet like
+ a great fatigue.</p>
+
+ <p>A succession of open carriages came bowling along the newly opened
+ sea-road. You could see across the wide grass-plots the discs of
+ vibration made by the spokes. The bright domes of the parasols swayed
+ lightly outwards like full-blown blossoms on the rim of a vase; and
+ the quiet sheet of dark-blue water, crossed by a bar of purple, made a
+ background for the spinning wheels and the high action of the horses,
+ whilst the turbaned heads of the Indian servants elevated above the line
+ of the sea horizon glided rapidly on the paler blue of the sky. In an
+ open space near the little bridge each turn-out trotted smartly in a
+ wide curve away from the sunset; then pulling up sharp, entered the main
+ alley in a long slow-moving file with the great red stillness of the sky
+ at the back. The trunks of mighty trees stood all touched with red on
+ the same side, the air seemed aflame under the high foliage, the
+ very ground under the hoofs of the horses was red. The wheels turned
+ solemnly; one after another the sunshades drooped, folding their colors
+ like gorgeous flowers shutting their petals at the end of the day. In
+ the whole half-mile of human beings no voice uttered a distinct word,
+ only a faint thudding noise went on mingled with slight jingling sounds,
+ and the motionless heads and shoulders of men and women sitting in
+ couples emerged stolidly above the lowered hoods--as if wooden. But one
+ carriage and pair coming late did not join the line.</p>
+
+ <p>It fled along in a noiseless roll; but on entering the avenue one of the
+ dark bays snorted, arching his neck and shying against the steel-tipped
+ pole; a flake of foam fell from the bit upon the point of a satiny
+ shoulder, and the dusky face of the coachman leaned forward at once over
+ the hands taking a fresh grip of the reins. It was a long dark-green
+ landau, having a dignified and buoyant motion between the sharply
+ curved C-springs, and a sort of strictly official majesty in its supreme
+ elegance. It seemed more roomy than is usual, its horses seemed slightly
+ bigger, the appointments a shade more perfect, the servants perched
+ somewhat higher on the box. The dresses of three women--two young
+ and pretty, and one, handsome, large, of mature age--seemed to fill
+ completely the shallow body of the carriage. The fourth face was that
+ of a man, heavy lidded, distinguished and sallow, with a somber, thick,
+ iron-gray imperial and mustaches, which somehow had the air of solid
+ appendages. His Excellency--</p>
+
+ <p>The rapid motion of that one equipage made all the others appear utterly
+ inferior, blighted, and reduced to crawl painfully at a snail's pace.
+ The landau distanced the whole file in a sort of sustained rush; the
+ features of the occupant whirling out of sight left behind an impression
+ of fixed stares and impassive vacancy; and after it had vanished in full
+ flight as it were, notwithstanding the long line of vehicles hugging the
+ curb at a walk, the whole lofty vista of the avenue seemed to lie open
+ and emptied of life in the enlarged impression of an august solitude.</p>
+
+ <p>Captain Whalley had lifted his head to look, and his mind, disturbed in
+ its meditation, turned with wonder (as men's minds will do) to matters
+ of no importance. It struck him that it was to this port, where he had
+ just sold his last ship, that he had come with the very first he had
+ ever owned, and with his head full of a plan for opening a new trade
+ with a distant part of the Archipelago. The then governor had given
+ him no end of encouragement. No Excellency he--this Mr. Denham--this
+ governor with his jacket off; a man who tended night and day, so to
+ speak, the growing prosperity of the settlement with the self-forgetful
+ devotion of a nurse for a child she loves; a lone bachelor who lived as
+ in a camp with the few servants and his three dogs in what was called
+ then the Government Bungalow: a low-roofed structure on the half-cleared
+ slope of a hill, with a new flagstaff in front and a police orderly on
+ the veranda. He remembered toiling up that hill under a heavy sun for
+ his audience; the unfurnished aspect of the cool shaded room; the long
+ table covered at one end with piles of papers, and with two guns, a
+ brass telescope, a small bottle of oil with a feather stuck in the neck
+ at the other--and the flattering attention given to him by the man in
+ power. It was an undertaking full of risk he had come to expound, but a
+ twenty minutes' talk in the Government Bungalow on the hill had made it
+ go smoothly from the start. And as he was retiring Mr. Denham, already
+ seated before the papers, called out after him, "Next month the Dido
+ starts for a cruise that way, and I shall request her captain officially
+ to give you a look in and see how you get on." The Dido was one of the
+ smart frigates on the China station--and five-and-thirty years make a
+ big slice of time. Five-and-thirty years ago an enterprise like his had
+ for the colony enough importance to be looked after by a Queen's ship.
+ A big slice of time. Individuals were of some account then. Men like
+ himself; men, too, like poor Evans, for instance, with his red face,
+ his coal-black whiskers, and his restless eyes, who had set up the first
+ patent slip for repairing small ships, on the edge of the forest, in
+ a lonely bay three miles up the coast. Mr. Denham had encouraged that
+ enterprise too, and yet somehow poor Evans had ended by dying at
+ home deucedly hard up. His son, they said, was squeezing oil out of
+ cocoa-nuts for a living on some God-forsaken islet of the Indian Ocean;
+ but it was from that patent slip in a lonely wooded bay that had sprung
+ the workshops of the Consolidated Docks Company, with its three
+ graving basins carved out of solid rock, its wharves, its jetties,
+ its electric-light plant, its steam-power houses--with its gigantic
+ sheer-legs, fit to lift the heaviest weight ever carried afloat, and
+ whose head could be seen like the top of a queer white monument peeping
+ over bushy points of land and sandy promontories, as you approached the
+ New Harbor from the west.</p>
+
+ <p>There had been a time when men counted: there were not so many carriages
+ in the colony then, though Mr. Denham, he fancied, had a buggy. And
+ Captain Whalley seemed to be swept out of the great avenue by the swirl
+ of a mental backwash. He remembered muddy shores, a harbor without
+ quays, the one solitary wooden pier (but that was a public work) jutting
+ out crookedly, the first coal-sheds erected on Monkey Point, that caught
+ fire mysteriously and smoldered for days, so that amazed ships came
+ into a roadstead full of sulphurous smoke, and the sun hung blood-red
+ at midday. He remembered the things, the faces, and something more
+ besides--like the faint flavor of a cup quaffed to the bottom, like a
+ subtle sparkle of the air that was not to be found in the atmosphere of
+ to-day.</p>
+
+ <p>In this evocation, swift and full of detail like a flash of magnesium
+ light into the niches of a dark memorial hall, Captain Whalley
+ contemplated things once important, the efforts of small men, the growth
+ of a great place, but now robbed of all consequence by the greatness
+ of accomplished facts, by hopes greater still; and they gave him for a
+ moment such an almost physical grip upon time, such a comprehension of
+ our unchangeable feelings, that he stopped short, struck the ground with
+ his stick, and ejaculated mentally, "What the devil am I doing here!" He
+ seemed lost in a sort of surprise; but he heard his name called out in
+ wheezy tones once, twice--and turned on his heels slowly.</p>
+
+ <p>He beheld then, waddling towards him autocratically, a man of an
+ old-fashioned and gouty aspect, with hair as white as his own, but with
+ shaved, florid cheeks, wearing a necktie--almost a neckcloth--whose
+ stiff ends projected far beyond his chin; with round legs, round arms,
+ a round body, a round face--generally producing the effect of his short
+ figure having been distended by means of an air-pump as much as the
+ seams of his clothing would stand. This was the Master-Attendant of the
+ port. A master-attendant is a superior sort of harbor-master; a person,
+ out in the East, of some consequence in his sphere; a Government
+ official, a magistrate for the waters of the port, and possessed of vast
+ but ill-defined disciplinary authority over seamen of all classes.
+ This particular Master-Attendant was reported to consider it miserably
+ inadequate, on the ground that it did not include the power of life
+ and death. This was a jocular exaggeration. Captain Eliott was fairly
+ satisfied with his position, and nursed no inconsiderable sense of such
+ power as he had. His conceited and tyrannical disposition did not allow
+ him to let it dwindle in his hands for want of use. The uproarious,
+ choleric frankness of his comments on people's character and conduct
+ caused him to be feared at bottom; though in conversation many pretended
+ not to mind him in the least, others would only smile sourly at the
+ mention of his name, and there were even some who dared to pronounce him
+ "a meddlesome old ruffian." But for almost all of them one of Captain
+ Eliott's outbreaks was nearly as distasteful to face as a chance of
+ annihilation.</p>
+
+ <style>
+ body {
+ padding: 15px;
+ }
+
+ .pointer {
+ padding: 15px;
+ background-color: rgba(0, 0, 0, 0.4);
+ color: white;
+ border-radius: 10px;
+ pointer-events: none;
+ opacity: 0;
+
+ transition: opacity 300ms;
+ -webkit-transition: opacity 300ms;
+ }
+
+ .pointer.show {
+ opacity: 1;
+ }
+ </style>
+
+
+ <div class="pointer"></div>
+
+ <script src="//github.hubspot.com/tether/dist/js/tether.js"></script>
+ <script>
+ new Tether({
+ element: '.pointer',
+ attachment: 'middle right',
+ targetAttachment: 'middle left',
+ targetModifier: 'scroll-handle',
+ target: document.body
+ });
+
+ var headers = document.querySelectorAll('h1,h2,h3,h4,h5,h6');
+ var hideTimeout = null;
+ var pointer = document.querySelector('.pointer')
+
+ var getSection = function(){
+ var closest, closestTop;
+ for (var i=0; i < headers.length; i++){
+ var rect = headers[i].getBoundingClientRect();
+
+ if (closestTop === undefined || (rect.top < 0 && rect.top > closestTop)){
+ closestTop = rect.top;
+ closest = headers[i];
+ }
+ }
+ return closest.innerHTML;
+ }
+
+ document.addEventListener('scroll', function(){
+ var percentage = Math.floor((100 * Math.max(0, pageYOffset)) / (document.body.scrollHeight - innerHeight)) + '%'
+ pointer.innerHTML = getSection() + ' - ' + percentage
+
+ pointer.classList.add('show');
+
+ if (hideTimeout)
+ clearTimeout(hideTimeout);
+
+ hideTimeout = setTimeout(function(){
+ pointer.classList.remove('show');
+ }, 1000);
+ });
+ </script>
+ </body>
+</html>
diff --git a/templates/assets/tether/examples/simple/index.html b/templates/assets/tether/examples/simple/index.html
new file mode 100644
index 0000000..c648c64
--- /dev/null
+++ b/templates/assets/tether/examples/simple/index.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="chrome=1">
+ <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+ <link rel="stylesheet" href="../resources/css/base.css" />
+ <link rel="stylesheet" href="../common/css/style.css" />
+ </head>
+ <body>
+ <div class="instructions">Resize the page to see the Tether flip.</div>
+
+ <div class="element"></div>
+ <div class="target"></div>
+
+ <script src="//github.hubspot.com/tether/dist/js/tether.js"></script>
+ <script>
+ new Tether({
+ element: '.element',
+ target: '.target',
+ attachment: 'top left',
+ targetAttachment: 'top right',
+ constraints: [{
+ to: 'window',
+ attachment: 'together'
+ }]
+ });
+ </script>
+ </body>
+</html>
diff --git a/templates/assets/tether/examples/testbed/index.html b/templates/assets/tether/examples/testbed/index.html
new file mode 100644
index 0000000..1a39445
--- /dev/null
+++ b/templates/assets/tether/examples/testbed/index.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="chrome=1">
+ <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+ <link rel="stylesheet" href="../resources/css/base.css" />
+ <link rel="stylesheet" href="../common/css/style.css" />
+ </head>
+ <body>
+
+ <div class="element">
+ </div>
+
+ <div class="container">
+ <div class="pad"></div>
+ <div class="target"></div>
+ <div class="pad"></div>
+ <div class="pad"></div>
+ </div>
+
+ <script src="//github.hubspot.com/tether/dist/js/tether.js"></script>
+ <script>
+ new Tether({
+ element: '.element',
+ target: '.target',
+ attachment: 'top center',
+ targetAttachment: 'bottom center',
+ constraints: [{
+ to: 'scrollParent',
+ attachment: 'together'
+ }]
+ });
+ </script>
+ </body>
+ </html>
diff --git a/templates/assets/tether/examples/tooltip/index.html b/templates/assets/tether/examples/tooltip/index.html
new file mode 100644
index 0000000..fbf247f
--- /dev/null
+++ b/templates/assets/tether/examples/tooltip/index.html
@@ -0,0 +1,86 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="chrome=1">
+ <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+ <script type="text/javascript" src="//use.typekit.net/jbn8qxr.js"></script>
+ <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
+ <link rel="stylesheet" href="../../css/drop.css" />
+ <link rel="stylesheet" href="../../css/drop-tooltip-theme-arrows.css" />
+ <style>
+ body {
+ font-family: "proxima-nova", "Helvetica Neue", sans-serif;
+ color: #444;
+ }
+
+ .scroll-parent {
+ margin: 200px;
+ height: 300px;
+ width: 300px;
+ display: inline-block;
+ overflow: auto;
+ border: 2px solid #eee;
+ padding: 40px;
+ }
+ </style>
+ </head>
+ <body>
+ <div class="scroll-parent">
+ <p>This is a paragraph of text</p>
+ <p>This is a paragraph of text</p>
+ <p><a href="javascript:;" class="drop-tooltip" data-tooltip-content="Whoa, I'm a tooltip" data-attach="top center">Tooltip on Top</a></p>
+ <p>This is a paragraph of text</p>
+ <p>This is a paragraph of text</p>
+ <p><a href="javascript:;" class="drop-tooltip" data-tooltip-content="Whoa, I'm a tooltip" data-attach="bottom center">Tooltip on Bottom</a></p>
+ <p>This is a paragraph of text</p>
+ <p>This is a paragraph of text</p>
+ <p><a href="javascript:;" class="drop-tooltip" data-tooltip-content="Whoa, I'm a tooltip" data-attach="left middle">Tooltip on Left</a></p>
+ <p>This is a paragraph of text</p>
+ <p>This is a paragraph of text</p>
+ <p><a href="javascript:;" class="drop-tooltip" data-tooltip-content="Whoa, I'm a tooltip" data-attach="right middle">Tooltip on Right</a></p>
+ <p>This is a paragraph of text</p>
+ <p>This is a paragraph of text</p>
+ <p><a href="javascript:;" class="drop-tooltip" data-tooltip-content="Whoa, I'm a tooltip" data-attach="bottom left">Tooltip on Bottom Left</a></p>
+ <p>This is a paragraph of text</p>
+ <p>This is a paragraph of text</p>
+ <p><a href="javascript:;" class="drop-tooltip" data-tooltip-content="Whoa, I'm a tooltip" data-attach="bottom right">Tooltip on Bottom Right</a></p>
+ <p>This is a paragraph of text</p>
+ <p>This is a paragraph of text</p>
+ <p><a href="javascript:;" class="drop-tooltip" data-tooltip-content="Whoa, I'm a tooltip" data-attach="top left">Tooltip on Top Left</a></p>
+ <p>This is a paragraph of text</p>
+ <p>This is a paragraph of text</p>
+ <p><a href="javascript:;" class="drop-tooltip" data-tooltip-content="Whoa, I'm a tooltip" data-attach="top right">Tooltip on Top Right</a></p>
+ <p>This is a paragraph of text</p>
+ <p>This is a paragraph of text</p>
+ <p><a href="javascript:;" class="drop-tooltip" data-tooltip-content="Whoa, I'm a tooltip" data-attach="left bottom">Tooltip on Left Bottom</a></p>
+ <p>This is a paragraph of text</p>
+ <p>This is a paragraph of text</p>
+ <p><a href="javascript:;" class="drop-tooltip" data-tooltip-content="Whoa, I'm a tooltip" data-attach="left top">Tooltip on Left Top</a></p>
+ <p>This is a paragraph of text</p>
+ <p>This is a paragraph of text</p>
+ <p><a href="javascript:;" class="drop-tooltip" data-tooltip-content="Whoa, I'm a tooltip" data-attach="right bottom">Tooltip on Right Bottom</a></p>
+ <p>This is a paragraph of text</p>
+ <p>This is a paragraph of text</p>
+ <p><a href="javascript:;" class="drop-tooltip" data-tooltip-content="Whoa, I'm a tooltip" data-attach="right top">Tooltip on Right Top</a></p>
+ <p>This is a paragraph of text</p>
+ <p>This is a paragraph of text</p>
+ </div>
+
+ <script src="../resources/js/log.js"></script>
+ <script src="../resources/js/jquery.js"></script>
+ <script src="../../utils.js"></script>
+ <script src="../../tether.js"></script>
+ <script src="/drop/drop.min.js"></script>
+ <script src="../../tooltip.js"></script>
+ <script src="../../constraint.js"></script>
+ <script>
+ $('.drop-tooltip').each(function(){
+ new Tooltip({
+ el: this,
+ attach: $(this).data('attach')
+ });
+ });
+ </script>
+ </body>
+</html>
diff --git a/templates/assets/tether/examples/viewport/colors.css b/templates/assets/tether/examples/viewport/colors.css
new file mode 100644
index 0000000..64f8c1c
--- /dev/null
+++ b/templates/assets/tether/examples/viewport/colors.css
@@ -0,0 +1,145 @@
+@charset "UTF-8";
+/****
+
+ colors.css v1.0 For a friendlier looking web
+ MIT License • http://clrs.cc • http://github.com/mrmrs/colors
+
+ Author: mrmrs
+ http://mrmrs.cc
+ @mrmrs_
+
+****/
+/*
+
+ SKINS
+ • Backgrounds
+ • Colors
+
+*/
+/* Backgrounds */
+.bg-navy {
+ background-color: #001f3f; }
+
+.bg-blue {
+ background-color: #0074d9; }
+
+.bg-aqua {
+ background-color: #7fdbff; }
+
+.bg-teal {
+ background-color: #39cccc; }
+
+.bg-olive {
+ background-color: #3d9970; }
+
+.bg-green {
+ background-color: #2ecc40; }
+
+.bg-lime {
+ background-color: #01ff70; }
+
+.bg-yellow {
+ background-color: #ffdc00; }
+
+.bg-orange {
+ background-color: #ff851b; }
+
+.bg-red {
+ background-color: #ff4136; }
+
+.bg-fuchsia {
+ background-color: #f012be; }
+
+.bg-purple {
+ background-color: #b10dc9; }
+
+.bg-maroon {
+ background-color: #85144b; }
+
+.bg-white {
+ background-color: white; }
+
+.bg-gray {
+ background-color: #aaaaaa; }
+
+.bg-silver {
+ background-color: #dddddd; }
+
+.bg-black {
+ background-color: #111111; }
+
+/* Colors */
+.navy {
+ color: #001f3f; }
+
+.blue {
+ color: #0074d9; }
+
+.aqua {
+ color: #7fdbff; }
+
+.teal {
+ color: #39cccc; }
+
+.olive {
+ color: #3d9970; }
+
+.green {
+ color: #2ecc40; }
+
+.lime {
+ color: #01ff70; }
+
+.yellow {
+ color: #ffdc00; }
+
+.orange {
+ color: #ff851b; }
+
+.red {
+ color: #ff4136; }
+
+.fuchsia {
+ color: #f012be; }
+
+.purple {
+ color: #b10dc9; }
+
+.maroon {
+ color: #85144b; }
+
+.white {
+ color: white; }
+
+.silver {
+ color: #dddddd; }
+
+.gray {
+ color: #aaaaaa; }
+
+.black {
+ color: #111111; }
+
+/* PRETTIER LINKS */
+a {
+ text-decoration: none;
+ -webkit-transition: color .3s ease-in-out;
+ transition: color .3s ease-in-out; }
+
+a:link {
+ color: #0074d9;
+ -webkit-transition: color .3s ease-in-out;
+ transition: color .3s ease-in-out; }
+
+a:visited {
+ color: #b10dc9; }
+
+a:hover {
+ color: #7fdbff;
+ -webkit-transition: color .3s ease-in-out;
+ transition: color .3s ease-in-out; }
+
+a:active {
+ color: #ff851b;
+ -webkit-transition: color .3s ease-in-out;
+ transition: color .3s ease-in-out; }
diff --git a/templates/assets/tether/examples/viewport/index.html b/templates/assets/tether/examples/viewport/index.html
new file mode 100644
index 0000000..742daa6
--- /dev/null
+++ b/templates/assets/tether/examples/viewport/index.html
@@ -0,0 +1,70 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <link rel="stylesheet" href="../resources/css/base.css" />
+ <link rel="stylesheet" href="./colors.css" />
+ <style>
+ * {
+ box-sizing: border-box;
+ }
+
+ .element {
+ background-color: #FFDC00;
+ width: 80%;
+ max-width: 300px;
+ padding: 0 15px;
+ font-size: 20px;
+ box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
+ }
+
+ @media (max-width: 380px) {
+ .element {
+ font-size: 16px;
+ }
+ }
+
+ .bit {
+ width: 10vw;
+ height: 10vw;
+ float: left;
+ }
+ </style>
+ </head>
+ <body>
+ <div class="element">
+ <p>This element is tethered to the middle of the visible part of the body.</p>
+
+ <p>Inspect the element to see how Tether decided
+ to use <code>position: fixed</code>.</p>
+ </div>
+
+ <script src="//github.hubspot.com/tether/dist/js/tether.js"></script>
+ <script>
+ new Tether({
+ element: '.element',
+ target: document.body,
+ attachment: 'middle center',
+ targetAttachment: 'middle center',
+ targetModifier: 'visible'
+ });
+ </script>
+
+ <script>
+ // Random colors bit, don't mind this
+ colors = ['navy', 'blue', 'aqua', 'teal', 'olive', 'green', 'lime',
+ 'yellow', 'orange', 'red', 'fuchsia', 'purple', 'maroon'];
+
+ curColors = null;
+ for(var i=300; i--;){
+ if (!curColors || !curColors.length)
+ curColors = colors.slice(0);
+
+ var bit = document.createElement('div')
+ var index = (Math.random() * curColors.length)|0;
+ bit.className = 'bit bg-' + curColors[index]
+ curColors.splice(index, 1);
+ document.body.appendChild(bit);
+ }
+ </script>
+ </body>
+</html>
diff --git a/templates/assets/tether/gulpfile.js b/templates/assets/tether/gulpfile.js
new file mode 100644
index 0000000..8b5e430
--- /dev/null
+++ b/templates/assets/tether/gulpfile.js
@@ -0,0 +1,96 @@
+var del = require('del');
+var gulp = require('gulp');
+var babel = require('gulp-babel');
+var bump = require('gulp-bump');
+var concat = require('gulp-concat');
+var header = require('gulp-header');
+var minify = require('gulp-minify-css');
+var plumber = require('gulp-plumber');
+var prefixer = require('gulp-autoprefixer');
+var rename = require('gulp-rename');
+var uglify = require('gulp-uglify');
+var sass = require('gulp-sass');
+var umd = require('gulp-wrap-umd');
+
+// Variables
+var distDir = './dist';
+var pkg = require('./package.json');
+var banner = ['/*!', pkg.name, pkg.version, '*/\n'].join(' ');
+var umdOptions = {
+ exports: 'Tether',
+ namespace: 'Tether'
+};
+
+
+// Clean
+gulp.task('clean', function() {
+ del.sync([distDir]);
+});
+
+
+// Javascript
+gulp.task('js', function() {
+ gulp.src([
+ './src/js/utils.js',
+ './src/js/tether.js',
+ './src/js/constraint.js',
+ './src/js/abutment.js',
+ './src/js/shift.js'
+ ])
+ .pipe(plumber())
+ .pipe(babel())
+ .pipe(concat('tether.js'))
+ .pipe(umd(umdOptions))
+ .pipe(header(banner))
+
+ // Original
+ .pipe(gulp.dest(distDir + '/js'))
+
+ // Minified
+ .pipe(uglify())
+ .pipe(rename({suffix: '.min'}))
+ .pipe(gulp.dest(distDir + '/js'));
+});
+
+
+// CSS
+gulp.task('css', function() {
+ gulp.src('./src/css/**/*.sass')
+ .pipe(plumber())
+ .pipe(sass())
+ .pipe(prefixer())
+
+ // Original
+ .pipe(gulp.dest(distDir + '/css'))
+
+ // Minified
+ .pipe(minify())
+ .pipe(rename({suffix: '.min'}))
+ .pipe(gulp.dest(distDir + '/css'));
+});
+
+
+// Version bump
+var VERSIONS = ['patch', 'minor', 'major'];
+for (var i = 0; i < VERSIONS.length; ++i){
+ (function(version) {
+ gulp.task('version:' + version, function() {
+ gulp.src(['package.json', 'bower.json', 'component.json'])
+ .pipe(bump({type: version}))
+ .pipe(gulp.dest('.'));
+ });
+ })(VERSIONS[i]);
+}
+
+
+// Watch
+gulp.task('watch', ['js', 'css'], function() {
+ gulp.watch('./src/js/**/*', ['js']);
+ gulp.watch('./src/css/**/*', ['css']);
+});
+
+
+// Defaults
+gulp.task('build', ['js', 'css']);
+gulp.task('default', ['build']);
+
diff --git a/templates/assets/tether/package.json b/templates/assets/tether/package.json
new file mode 100644
index 0000000..15f28d5
--- /dev/null
+++ b/templates/assets/tether/package.json
@@ -0,0 +1,40 @@
+{
+ "name": "tether",
+ "version": "1.4.0",
+ "description": "A client-side library to make absolutely positioned elements attach to elements in the page efficiently.",
+ "authors": [
+ "Zack Bloom <zackbloom@gmail.com>",
+ "Adam Schwartz <adam.flynn.schwartz@gmail.com>"
+ ],
+ "maintainers": [
+ "Nicholas Hwang <nick.joosung.hwang@gmail.com>",
+ "Trevor Burnham <trevorburnham@gmail.com>"
+ ],
+ "scripts": {
+ "reinstall": "del node_modules && npm install",
+ "watch": "gulp watch",
+ "build": "gulp build"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/HubSpot/tether.git"
+ },
+ "license": "MIT",
+ "main": "dist/js/tether.js",
+ "devDependencies": {
+ "del": "^2.0.2",
+ "del-cli": "^0.2.0",
+ "gulp": "^3.9.0",
+ "gulp-autoprefixer": "^3.0.1",
+ "gulp-babel": "^5.2.1",
+ "gulp-bump": "^0.3.1",
+ "gulp-concat": "^2.6.0",
+ "gulp-header": "^1.7.1",
+ "gulp-minify-css": "^1.2.1",
+ "gulp-plumber": "^1.0.1",
+ "gulp-rename": "^1.2.2",
+ "gulp-sass": "^2.0.4",
+ "gulp-uglify": "^1.4.1",
+ "gulp-wrap-umd": "^0.2.1"
+ }
+}
diff --git a/templates/assets/tether/src/css/helpers/_tether-theme-arrows.sass b/templates/assets/tether/src/css/helpers/_tether-theme-arrows.sass
new file mode 100644
index 0000000..55f2463
--- /dev/null
+++ b/templates/assets/tether/src/css/helpers/_tether-theme-arrows.sass
@@ -0,0 +1,192 @@
+=tether-theme-arrows($themePrefix: "tether", $themeName: "arrows", $arrowSize: 16px, $arrowPointerEvents: null, $backgroundColor: #fff, $color: inherit, $useDropShadow: false)
+ .#{ $themePrefix }-element.#{ $themePrefix }-theme-#{ $themeName }
+ max-width: 100%
+ max-height: 100%
+
+ .#{ $themePrefix }-content
+ border-radius: 5px
+ position: relative
+ font-family: inherit
+ background: $backgroundColor
+ color: $color
+ padding: 1em
+ font-size: 1.1em
+ line-height: 1.5em
+
+ @if $useDropShadow
+ transform: translateZ(0)
+ filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .2))
+
+ &:before
+ content: ""
+ display: block
+ position: absolute
+ width: 0
+ height: 0
+ border-color: transparent
+ border-width: $arrowSize
+ border-style: solid
+ pointer-events: $arrowPointerEvents
+
+ // Centers and middles
+
+ &.#{ $themePrefix }-element-attached-bottom.#{ $themePrefix }-element-attached-center .#{ $themePrefix }-content
+ margin-bottom: $arrowSize
+
+ &:before
+ top: 100%
+ left: 50%
+ margin-left: - $arrowSize
+ border-top-color: $backgroundColor
+ border-bottom: 0
+
+ &.#{ $themePrefix }-element-attached-top.#{ $themePrefix }-element-attached-center .#{ $themePrefix }-content
+ margin-top: $arrowSize
+
+ &:before
+ bottom: 100%
+ left: 50%
+ margin-left: - $arrowSize
+ border-bottom-color: $backgroundColor
+ border-top: 0
+
+ &.#{ $themePrefix }-element-attached-right.#{ $themePrefix }-element-attached-middle .#{ $themePrefix }-content
+ margin-right: $arrowSize
+
+ &:before
+ left: 100%
+ top: 50%
+ margin-top: - $arrowSize
+ border-left-color: $backgroundColor
+ border-right: 0
+
+ &.#{ $themePrefix }-element-attached-left.#{ $themePrefix }-element-attached-middle .#{ $themePrefix }-content
+ margin-left: $arrowSize
+
+ &:before
+ right: 100%
+ top: 50%
+ margin-top: - $arrowSize
+ border-right-color: $backgroundColor
+ border-left: 0
+
+ // Target middle/center, element corner
+
+ &.#{ $themePrefix }-element-attached-left.#{ $themePrefix }-target-attached-center .#{ $themePrefix }-content
+ left: - $arrowSize * 2
+
+ &.#{ $themePrefix }-element-attached-right.#{ $themePrefix }-target-attached-center .#{ $themePrefix }-content
+ left: $arrowSize * 2
+
+ &.#{ $themePrefix }-element-attached-top.#{ $themePrefix }-element-attached-left.#{ $themePrefix }-target-attached-middle .#{ $themePrefix }-content
+ margin-top: $arrowSize
+
+ &:before
+ bottom: 100%
+ left: $arrowSize
+ border-bottom-color: $backgroundColor
+ border-top: 0
+
+ &.#{ $themePrefix }-element-attached-top.#{ $themePrefix }-element-attached-right.#{ $themePrefix }-target-attached-middle .#{ $themePrefix }-content
+ margin-top: $arrowSize
+
+ &:before
+ bottom: 100%
+ right: $arrowSize
+ border-bottom-color: $backgroundColor
+ border-top: 0
+
+ &.#{ $themePrefix }-element-attached-bottom.#{ $themePrefix }-element-attached-left.#{ $themePrefix }-target-attached-middle .#{ $themePrefix }-content
+ margin-bottom: $arrowSize
+
+ &:before
+ top: 100%
+ left: $arrowSize
+ border-top-color: $backgroundColor
+ border-bottom: 0
+
+ &.#{ $themePrefix }-element-attached-bottom.#{ $themePrefix }-element-attached-right.#{ $themePrefix }-target-attached-middle .#{ $themePrefix }-content
+ margin-bottom: $arrowSize
+
+ &:before
+ top: 100%
+ right: $arrowSize
+ border-top-color: $backgroundColor
+ border-bottom: 0
+
+
+ // Top and bottom corners
+
+ &.#{ $themePrefix }-element-attached-top.#{ $themePrefix }-element-attached-left.#{ $themePrefix }-target-attached-bottom .#{ $themePrefix }-content
+ margin-top: $arrowSize
+
+ &:before
+ bottom: 100%
+ left: $arrowSize
+ border-bottom-color: $backgroundColor
+ border-top: 0
+
+ &.#{ $themePrefix }-element-attached-top.#{ $themePrefix }-element-attached-right.#{ $themePrefix }-target-attached-bottom .#{ $themePrefix }-content
+ margin-top: $arrowSize
+
+ &:before
+ bottom: 100%
+ right: $arrowSize
+ border-bottom-color: $backgroundColor
+ border-top: 0
+
+ &.#{ $themePrefix }-element-attached-bottom.#{ $themePrefix }-element-attached-left.#{ $themePrefix }-target-attached-top .#{ $themePrefix }-content
+ margin-bottom: $arrowSize
+
+ &:before
+ top: 100%
+ left: $arrowSize
+ border-top-color: $backgroundColor
+ border-bottom: 0
+
+ &.#{ $themePrefix }-element-attached-bottom.#{ $themePrefix }-element-attached-right.#{ $themePrefix }-target-attached-top .#{ $themePrefix }-content
+ margin-bottom: $arrowSize
+
+ &:before
+ top: 100%
+ right: $arrowSize
+ border-top-color: $backgroundColor
+ border-bottom: 0
+
+ // Side corners
+
+ &.#{ $themePrefix }-element-attached-top.#{ $themePrefix }-element-attached-right.#{ $themePrefix }-target-attached-left .#{ $themePrefix }-content
+ margin-right: $arrowSize
+
+ &:before
+ top: $arrowSize
+ left: 100%
+ border-left-color: $backgroundColor
+ border-right: 0
+
+ &.#{ $themePrefix }-element-attached-top.#{ $themePrefix }-element-attached-left.#{ $themePrefix }-target-attached-right .#{ $themePrefix }-content
+ margin-left: $arrowSize
+
+ &:before
+ top: $arrowSize
+ right: 100%
+ border-right-color: $backgroundColor
+ border-left: 0
+
+ &.#{ $themePrefix }-element-attached-bottom.#{ $themePrefix }-element-attached-right.#{ $themePrefix }-target-attached-left .#{ $themePrefix }-content
+ margin-right: $arrowSize
+
+ &:before
+ bottom: $arrowSize
+ left: 100%
+ border-left-color: $backgroundColor
+ border-right: 0
+
+ &.#{ $themePrefix }-element-attached-bottom.#{ $themePrefix }-element-attached-left.#{ $themePrefix }-target-attached-right .#{ $themePrefix }-content
+ margin-left: $arrowSize
+
+ &:before
+ bottom: $arrowSize
+ right: 100%
+ border-right-color: $backgroundColor
+ border-left: 0
diff --git a/templates/assets/tether/src/css/helpers/_tether-theme-basic.sass b/templates/assets/tether/src/css/helpers/_tether-theme-basic.sass
new file mode 100644
index 0000000..f7e9fb7
--- /dev/null
+++ b/templates/assets/tether/src/css/helpers/_tether-theme-basic.sass
@@ -0,0 +1,14 @@
+=tether-theme-basic($themePrefix: "tether", $themeName: "basic", $backgroundColor: #fff, $color: inherit)
+ .#{ $themePrefix }-element.#{ $themePrefix }-theme-#{ $themeName }
+ max-width: 100%
+ max-height: 100%
+
+ .#{ $themePrefix }-content
+ border-radius: 5px
+ box-shadow: 0 2px 8px rgba(0, 0, 0, .2)
+ font-family: inherit
+ background: $backgroundColor
+ color: $color
+ padding: 1em
+ font-size: 1.1em
+ line-height: 1.5em
diff --git a/templates/assets/tether/src/css/helpers/_tether.sass b/templates/assets/tether/src/css/helpers/_tether.sass
new file mode 100644
index 0000000..a6d8e50
--- /dev/null
+++ b/templates/assets/tether/src/css/helpers/_tether.sass
@@ -0,0 +1,12 @@
+=tether($themePrefix: "tether")
+ .#{ $themePrefix }-element, .#{ $themePrefix }-element *
+
+ &, &:after, &:before
+ box-sizing: border-box
+
+ .#{ $themePrefix }-element
+ position: absolute
+ display: none
+
+ &.#{ $themePrefix }-open
+ display: block
diff --git a/templates/assets/tether/src/css/mixins/_inline-block.sass b/templates/assets/tether/src/css/mixins/_inline-block.sass
new file mode 100644
index 0000000..0e98143
--- /dev/null
+++ b/templates/assets/tether/src/css/mixins/_inline-block.sass
@@ -0,0 +1,6 @@
+@mixin inline-block
+ display: inline-block
+ vertical-align: middle
+ *vertical-align: auto
+ *zoom: 1
+ *display: inline
diff --git a/templates/assets/tether/src/css/mixins/_pie-clearfix.sass b/templates/assets/tether/src/css/mixins/_pie-clearfix.sass
new file mode 100644
index 0000000..ef8c9c4
--- /dev/null
+++ b/templates/assets/tether/src/css/mixins/_pie-clearfix.sass
@@ -0,0 +1,7 @@
+@mixin pie-clearfix
+ *zoom: 1
+
+ &:after
+ content: ""
+ display: table
+ clear: both
diff --git a/templates/assets/tether/src/css/tether-theme-arrows-dark.sass b/templates/assets/tether/src/css/tether-theme-arrows-dark.sass
new file mode 100644
index 0000000..ad1caf0
--- /dev/null
+++ b/templates/assets/tether/src/css/tether-theme-arrows-dark.sass
@@ -0,0 +1,12 @@
+@import helpers/tether
+@import helpers/tether-theme-arrows
+
+$themePrefix: "tether"
+$themeName: "arrows-dark"
+$arrowSize: 16px
+$backgroundColor: #000
+$color: #fff
+$useDropShadow: false
+
++tether($themePrefix: $themePrefix)
++tether-theme-arrows($themePrefix: $themePrefix, $themeName: $themeName, $arrowSize: $arrowSize, $backgroundColor: $backgroundColor, $color: $color, $useDropShadow: $useDropShadow)
diff --git a/templates/assets/tether/src/css/tether-theme-arrows.sass b/templates/assets/tether/src/css/tether-theme-arrows.sass
new file mode 100644
index 0000000..87765b2
--- /dev/null
+++ b/templates/assets/tether/src/css/tether-theme-arrows.sass
@@ -0,0 +1,12 @@
+@import helpers/tether
+@import helpers/tether-theme-arrows
+
+$themePrefix: "tether"
+$themeName: "arrows"
+$arrowSize: 16px
+$backgroundColor: #fff
+$color: inherit
+$useDropShadow: true
+
++tether($themePrefix: $themePrefix)
++tether-theme-arrows($themePrefix: $themePrefix, $themeName: $themeName, $arrowSize: $arrowSize, $backgroundColor: $backgroundColor, $color: $color, $useDropShadow: $useDropShadow)
diff --git a/templates/assets/tether/src/css/tether-theme-basic.sass b/templates/assets/tether/src/css/tether-theme-basic.sass
new file mode 100644
index 0000000..9a2be06
--- /dev/null
+++ b/templates/assets/tether/src/css/tether-theme-basic.sass
@@ -0,0 +1,10 @@
+@import helpers/tether
+@import helpers/tether-theme-basic
+
+$themePrefix: "tether"
+$themeName: "basic"
+$backgroundColor: #fff
+$color: inherit
+
++tether($themePrefix: $themePrefix)
++tether-theme-basic($themePrefix: $themePrefix, $themeName: $themeName, $backgroundColor: $backgroundColor, $color: $color) \ No newline at end of file
diff --git a/templates/assets/tether/src/css/tether.sass b/templates/assets/tether/src/css/tether.sass
new file mode 100644
index 0000000..6421016
--- /dev/null
+++ b/templates/assets/tether/src/css/tether.sass
@@ -0,0 +1,5 @@
+@import helpers/tether
+
+$themePrefix: "tether"
+
++tether($themePrefix: $themePrefix) \ No newline at end of file
diff --git a/templates/assets/tether/src/js/abutment.js b/templates/assets/tether/src/js/abutment.js
new file mode 100644
index 0000000..9605635
--- /dev/null
+++ b/templates/assets/tether/src/js/abutment.js
@@ -0,0 +1,61 @@
+/* globals TetherBase */
+
+const {getBounds, updateClasses, defer} = TetherBase.Utils;
+
+TetherBase.modules.push({
+ position({top, left}) {
+ const {height, width} = this.cache('element-bounds', () => {
+ return getBounds(this.element);
+ });
+
+ const targetPos = this.getTargetBounds();
+
+ const bottom = top + height;
+ const right = left + width;
+
+ const abutted = [];
+ if (top <= targetPos.bottom && bottom >= targetPos.top) {
+ ['left', 'right'].forEach(side => {
+ const targetPosSide = targetPos[side];
+ if (targetPosSide === left || targetPosSide === right) {
+ abutted.push(side);
+ }
+ });
+ }
+
+ if (left <= targetPos.right && right >= targetPos.left) {
+ ['top', 'bottom'].forEach(side => {
+ const targetPosSide = targetPos[side];
+ if (targetPosSide === top || targetPosSide === bottom) {
+ abutted.push(side);
+ }
+ });
+ }
+
+ const allClasses = [];
+ const addClasses = [];
+
+ const sides = ['left', 'top', 'right', 'bottom'];
+ allClasses.push(this.getClass('abutted'));
+ sides.forEach(side => {
+ allClasses.push(`${ this.getClass('abutted') }-${ side }`);
+ });
+
+ if (abutted.length) {
+ addClasses.push(this.getClass('abutted'));
+ }
+
+ abutted.forEach(side => {
+ addClasses.push(`${ this.getClass('abutted') }-${ side }`);
+ });
+
+ defer(() => {
+ if (!(this.options.addTargetClasses === false)) {
+ updateClasses(this.target, addClasses, allClasses);
+ }
+ updateClasses(this.element, addClasses, allClasses);
+ });
+
+ return true;
+ }
+});
diff --git a/templates/assets/tether/src/js/constraint.js b/templates/assets/tether/src/js/constraint.js
new file mode 100644
index 0000000..1717149
--- /dev/null
+++ b/templates/assets/tether/src/js/constraint.js
@@ -0,0 +1,366 @@
+/* globals TetherBase */
+
+const {
+ getBounds,
+ extend,
+ updateClasses,
+ defer
+} = TetherBase.Utils;
+
+const BOUNDS_FORMAT = ['left', 'top', 'right', 'bottom'];
+
+function getBoundingRect(tether, to) {
+ if (to === 'scrollParent') {
+ to = tether.scrollParents[0];
+ } else if (to === 'window') {
+ to = [pageXOffset, pageYOffset, innerWidth + pageXOffset, innerHeight + pageYOffset];
+ }
+
+ if (to === document) {
+ to = to.documentElement;
+ }
+
+ if (typeof to.nodeType !== 'undefined') {
+ const node = to;
+ const size = getBounds(to);
+ const pos = size;
+ const style = getComputedStyle(to);
+
+ to = [pos.left, pos.top, size.width + pos.left, size.height + pos.top];
+
+ // Account any parent Frames scroll offset
+ if (node.ownerDocument !== document) {
+ let win = node.ownerDocument.defaultView;
+ to[0] += win.pageXOffset;
+ to[1] += win.pageYOffset;
+ to[2] += win.pageXOffset;
+ to[3] += win.pageYOffset;
+ }
+
+ BOUNDS_FORMAT.forEach((side, i) => {
+ side = side[0].toUpperCase() + side.substr(1);
+ if (side === 'Top' || side === 'Left') {
+ to[i] += parseFloat(style[`border${ side }Width`]);
+ } else {
+ to[i] -= parseFloat(style[`border${ side }Width`]);
+ }
+ });
+ }
+
+ return to;
+}
+
+TetherBase.modules.push({
+ position({top, left, targetAttachment}) {
+ if (!this.options.constraints) {
+ return true;
+ }
+
+ let {height, width} = this.cache('element-bounds', () => {
+ return getBounds(this.element);
+ });
+
+ if (width === 0 && height === 0 && typeof this.lastSize !== 'undefined') {
+ // Handle the item getting hidden as a result of our positioning without glitching
+ // the classes in and out
+ ({width, height} = this.lastSize);
+ }
+
+ const targetSize = this.cache('target-bounds', () => {
+ return this.getTargetBounds();
+ });
+
+ const {height: targetHeight, width: targetWidth} = targetSize;
+
+ const allClasses = [this.getClass('pinned'), this.getClass('out-of-bounds')];
+
+ this.options.constraints.forEach(constraint => {
+ const {outOfBoundsClass, pinnedClass} = constraint;
+ if (outOfBoundsClass) {
+ allClasses.push(outOfBoundsClass);
+ }
+ if (pinnedClass) {
+ allClasses.push(pinnedClass);
+ }
+ });
+
+ allClasses.forEach(cls => {
+ ['left', 'top', 'right', 'bottom'].forEach(side => {
+ allClasses.push(`${ cls }-${ side }`);
+ });
+ });
+
+ const addClasses = [];
+
+ const tAttachment = extend({}, targetAttachment);
+ const eAttachment = extend({}, this.attachment);
+
+ this.options.constraints.forEach(constraint => {
+ let {to, attachment, pin} = constraint;
+
+ if (typeof attachment === 'undefined') {
+ attachment = '';
+ }
+
+ let changeAttachX, changeAttachY;
+ if (attachment.indexOf(' ') >= 0) {
+ [changeAttachY, changeAttachX] = attachment.split(' ');
+ } else {
+ changeAttachX = changeAttachY = attachment;
+ }
+
+ const bounds = getBoundingRect(this, to);
+
+ if (changeAttachY === 'target' || changeAttachY === 'both') {
+ if (top < bounds[1] && tAttachment.top === 'top') {
+ top += targetHeight;
+ tAttachment.top = 'bottom';
+ }
+
+ if (top + height > bounds[3] && tAttachment.top === 'bottom') {
+ top -= targetHeight;
+ tAttachment.top = 'top';
+ }
+ }
+
+ if (changeAttachY === 'together') {
+ if (tAttachment.top === 'top') {
+ if (eAttachment.top === 'bottom' && top < bounds[1]) {
+ top += targetHeight;
+ tAttachment.top = 'bottom';
+
+ top += height;
+ eAttachment.top = 'top';
+
+ } else if (eAttachment.top === 'top' && top + height > bounds[3] && top - (height - targetHeight) >= bounds[1]) {
+ top -= height - targetHeight;
+ tAttachment.top = 'bottom';
+
+ eAttachment.top = 'bottom';
+ }
+ }
+
+ if (tAttachment.top === 'bottom') {
+ if (eAttachment.top === 'top' && top + height > bounds[3]) {
+ top -= targetHeight;
+ tAttachment.top = 'top';
+
+ top -= height;
+ eAttachment.top = 'bottom';
+
+ } else if (eAttachment.top === 'bottom'&& top < bounds[1] && top + (height*2 - targetHeight) <= bounds[3]) {
+ top += height - targetHeight;
+ tAttachment.top = 'top';
+
+ eAttachment.top = 'top';
+
+ }
+ }
+
+ if (tAttachment.top === 'middle') {
+ if (top + height > bounds[3] && eAttachment.top === 'top') {
+ top -= height;
+ eAttachment.top = 'bottom';
+
+ } else if (top < bounds[1] && eAttachment.top === 'bottom') {
+ top += height;
+ eAttachment.top = 'top';
+ }
+ }
+ }
+
+ if (changeAttachX === 'target' || changeAttachX === 'both') {
+ if (left < bounds[0] && tAttachment.left === 'left') {
+ left += targetWidth;
+ tAttachment.left = 'right';
+ }
+
+ if (left + width > bounds[2] && tAttachment.left === 'right') {
+ left -= targetWidth;
+ tAttachment.left = 'left';
+ }
+ }
+
+ if (changeAttachX === 'together') {
+ if (left < bounds[0] && tAttachment.left === 'left') {
+ if (eAttachment.left === 'right') {
+ left += targetWidth;
+ tAttachment.left = 'right';
+
+ left += width;
+ eAttachment.left = 'left';
+
+ } else if (eAttachment.left === 'left') {
+ left += targetWidth;
+ tAttachment.left = 'right';
+
+ left -= width;
+ eAttachment.left = 'right';
+ }
+
+ } else if (left + width > bounds[2] && tAttachment.left === 'right') {
+ if (eAttachment.left === 'left') {
+ left -= targetWidth;
+ tAttachment.left = 'left';
+
+ left -= width;
+ eAttachment.left = 'right';
+
+ } else if (eAttachment.left === 'right') {
+ left -= targetWidth;
+ tAttachment.left = 'left';
+
+ left += width;
+ eAttachment.left = 'left';
+ }
+
+ } else if (tAttachment.left === 'center') {
+ if (left + width > bounds[2] && eAttachment.left === 'left') {
+ left -= width;
+ eAttachment.left = 'right';
+
+ } else if (left < bounds[0] && eAttachment.left === 'right') {
+ left += width;
+ eAttachment.left = 'left';
+ }
+ }
+ }
+
+ if (changeAttachY === 'element' || changeAttachY === 'both') {
+ if (top < bounds[1] && eAttachment.top === 'bottom') {
+ top += height;
+ eAttachment.top = 'top';
+ }
+
+ if (top + height > bounds[3] && eAttachment.top === 'top') {
+ top -= height;
+ eAttachment.top = 'bottom';
+ }
+ }
+
+ if (changeAttachX === 'element' || changeAttachX === 'both') {
+ if (left < bounds[0]) {
+ if (eAttachment.left === 'right') {
+ left += width;
+ eAttachment.left = 'left';
+ } else if (eAttachment.left === 'center') {
+ left += (width / 2);
+ eAttachment.left = 'left';
+ }
+ }
+
+ if (left + width > bounds[2]) {
+ if (eAttachment.left === 'left') {
+ left -= width;
+ eAttachment.left = 'right';
+ } else if (eAttachment.left === 'center') {
+ left -= (width / 2);
+ eAttachment.left = 'right';
+ }
+ }
+ }
+
+ if (typeof pin === 'string') {
+ pin = pin.split(',').map(p => p.trim());
+ } else if (pin === true) {
+ pin = ['top', 'left', 'right', 'bottom'];
+ }
+
+ pin = pin || [];
+
+ const pinned = [];
+ const oob = [];
+
+ if (top < bounds[1]) {
+ if (pin.indexOf('top') >= 0) {
+ top = bounds[1];
+ pinned.push('top');
+ } else {
+ oob.push('top');
+ }
+ }
+
+ if (top + height > bounds[3]) {
+ if (pin.indexOf('bottom') >= 0) {
+ top = bounds[3] - height;
+ pinned.push('bottom');
+ } else {
+ oob.push('bottom');
+ }
+ }
+
+ if (left < bounds[0]) {
+ if (pin.indexOf('left') >= 0) {
+ left = bounds[0];
+ pinned.push('left');
+ } else {
+ oob.push('left');
+ }
+ }
+
+ if (left + width > bounds[2]) {
+ if (pin.indexOf('right') >= 0) {
+ left = bounds[2] - width;
+ pinned.push('right');
+ } else {
+ oob.push('right');
+ }
+ }
+
+ if (pinned.length) {
+ let pinnedClass;
+ if (typeof this.options.pinnedClass !== 'undefined') {
+ pinnedClass = this.options.pinnedClass;
+ } else {
+ pinnedClass = this.getClass('pinned');
+ }
+
+ addClasses.push(pinnedClass);
+ pinned.forEach(side => {
+ addClasses.push(`${ pinnedClass }-${ side }`);
+ });
+ }
+
+ if (oob.length) {
+ let oobClass;
+ if (typeof this.options.outOfBoundsClass !== 'undefined') {
+ oobClass = this.options.outOfBoundsClass;
+ } else {
+ oobClass = this.getClass('out-of-bounds');
+ }
+
+ addClasses.push(oobClass);
+ oob.forEach(side => {
+ addClasses.push(`${ oobClass }-${ side }`);
+ });
+ }
+
+ if (pinned.indexOf('left') >= 0 || pinned.indexOf('right') >= 0) {
+ eAttachment.left = tAttachment.left = false;
+ }
+ if (pinned.indexOf('top') >= 0 || pinned.indexOf('bottom') >= 0) {
+ eAttachment.top = tAttachment.top = false;
+ }
+
+ if (tAttachment.top !== targetAttachment.top ||
+ tAttachment.left !== targetAttachment.left ||
+ eAttachment.top !== this.attachment.top ||
+ eAttachment.left !== this.attachment.left) {
+ this.updateAttachClasses(eAttachment, tAttachment);
+ this.trigger('update', {
+ attachment: eAttachment,
+ targetAttachment: tAttachment,
+ });
+ }
+ });
+
+ defer(() => {
+ if (!(this.options.addTargetClasses === false)) {
+ updateClasses(this.target, addClasses, allClasses);
+ }
+ updateClasses(this.element, addClasses, allClasses);
+ });
+
+ return {top, left};
+ }
+});
diff --git a/templates/assets/tether/src/js/markAttachment.js b/templates/assets/tether/src/js/markAttachment.js
new file mode 100644
index 0000000..edcc79a
--- /dev/null
+++ b/templates/assets/tether/src/js/markAttachment.js
@@ -0,0 +1,46 @@
+/* globals Tether */
+
+Tether.modules.push({
+ initialize() {
+ this.markers = {};
+
+ ['target', 'element'].forEach(type => {
+ const el = document.createElement('div');
+ el.className = this.getClass(`${ type }-marker`);
+
+ const dot = document.createElement('div');
+ dot.className = this.getClass('marker-dot');
+ el.appendChild(dot);
+
+ this[type].appendChild(el);
+
+ this.markers[type] = {dot, el};
+ });
+ },
+
+ position({manualOffset, manualTargetOffset}) {
+ const offsets = {
+ element: manualOffset,
+ target: manualTargetOffset
+ };
+
+ for (let type in offsets) {
+ const offset = offsets[type];
+ for (let side in offset) {
+ let val = offset[side];
+ const notString = typeof val !== 'string';
+ if (notString ||
+ val.indexOf('%') === -1 &&
+ val.indexOf('px') === -1) {
+ val += 'px';
+ }
+
+ if (this.markers[type].dot.style[side] !== val) {
+ this.markers[type].dot.style[side] = val;
+ }
+ }
+ }
+
+ return true;
+ }
+});
diff --git a/templates/assets/tether/src/js/shift.js b/templates/assets/tether/src/js/shift.js
new file mode 100644
index 0000000..ecc872d
--- /dev/null
+++ b/templates/assets/tether/src/js/shift.js
@@ -0,0 +1,32 @@
+/* globals TetherBase */
+
+TetherBase.modules.push({
+ position({top, left}) {
+ if (!this.options.shift) {
+ return;
+ }
+
+ let shift = this.options.shift;
+ if (typeof this.options.shift === 'function') {
+ shift = this.options.shift.call(this, {top, left});
+ }
+
+ let shiftTop, shiftLeft;
+ if (typeof shift === 'string') {
+ shift = shift.split(' ');
+ shift[1] = shift[1] || shift[0];
+
+ ([shiftTop, shiftLeft] = shift);
+
+ shiftTop = parseFloat(shiftTop, 10);
+ shiftLeft = parseFloat(shiftLeft, 10);
+ } else {
+ ([shiftTop, shiftLeft] = [shift.top, shift.left]);
+ }
+
+ top += shiftTop;
+ left += shiftLeft;
+
+ return {top, left};
+ }
+});
diff --git a/templates/assets/tether/src/js/tether.js b/templates/assets/tether/src/js/tether.js
new file mode 100644
index 0000000..5ebc84f
--- /dev/null
+++ b/templates/assets/tether/src/js/tether.js
@@ -0,0 +1,809 @@
+/* globals TetherBase, performance */
+
+if (typeof TetherBase === 'undefined') {
+ throw new Error('You must include the utils.js file before tether.js');
+}
+
+const {
+ getScrollParents,
+ getBounds,
+ getOffsetParent,
+ extend,
+ addClass,
+ removeClass,
+ updateClasses,
+ defer,
+ flush,
+ getScrollBarSize,
+ removeUtilElements
+} = TetherBase.Utils;
+
+function within(a, b, diff=1) {
+ return (a + diff >= b && b >= a - diff);
+}
+
+const transformKey = (() => {
+ if(typeof document === 'undefined') {
+ return '';
+ }
+ const el = document.createElement('div');
+
+ const transforms = ['transform', 'WebkitTransform', 'OTransform', 'MozTransform', 'msTransform'];
+ for (let i = 0; i < transforms.length; ++i) {
+ const key = transforms[i];
+ if (el.style[key] !== undefined) {
+ return key;
+ }
+ }
+})();
+
+const tethers = [];
+
+const position = () => {
+ tethers.forEach(tether => {
+ tether.position(false);
+ });
+ flush();
+};
+
+function now() {
+ if (typeof performance !== 'undefined' && typeof performance.now !== 'undefined') {
+ return performance.now();
+ }
+ return +new Date;
+}
+
+(() => {
+ let lastCall = null;
+ let lastDuration = null;
+ let pendingTimeout = null;
+
+ const tick = () => {
+ if (typeof lastDuration !== 'undefined' && lastDuration > 16) {
+ // We voluntarily throttle ourselves if we can't manage 60fps
+ lastDuration = Math.min(lastDuration - 16, 250);
+
+ // Just in case this is the last event, remember to position just once more
+ pendingTimeout = setTimeout(tick, 250);
+ return;
+ }
+
+ if (typeof lastCall !== 'undefined' && (now() - lastCall) < 10) {
+ // Some browsers call events a little too frequently, refuse to run more than is reasonable
+ return;
+ }
+
+ if (pendingTimeout != null) {
+ clearTimeout(pendingTimeout);
+ pendingTimeout = null;
+ }
+
+ lastCall = now();
+ position();
+ lastDuration = now() - lastCall;
+ };
+
+ if(typeof window !== 'undefined' && typeof window.addEventListener !== 'undefined') {
+ ['resize', 'scroll', 'touchmove'].forEach(event => {
+ window.addEventListener(event, tick);
+ });
+ }
+})();
+
+const MIRROR_LR = {
+ center: 'center',
+ left: 'right',
+ right: 'left'
+};
+
+const MIRROR_TB = {
+ middle: 'middle',
+ top: 'bottom',
+ bottom: 'top'
+};
+
+const OFFSET_MAP = {
+ top: 0,
+ left: 0,
+ middle: '50%',
+ center: '50%',
+ bottom: '100%',
+ right: '100%'
+};
+
+const autoToFixedAttachment = (attachment, relativeToAttachment) => {
+ let {left, top} = attachment;
+
+ if (left === 'auto') {
+ left = MIRROR_LR[relativeToAttachment.left];
+ }
+
+ if (top === 'auto') {
+ top = MIRROR_TB[relativeToAttachment.top];
+ }
+
+ return {left, top};
+};
+
+const attachmentToOffset = (attachment) => {
+ let left = attachment.left;
+ let top = attachment.top;
+
+ if (typeof OFFSET_MAP[attachment.left] !== 'undefined') {
+ left = OFFSET_MAP[attachment.left];
+ }
+
+ if (typeof OFFSET_MAP[attachment.top] !== 'undefined') {
+ top = OFFSET_MAP[attachment.top];
+ }
+
+ return {left, top};
+};
+
+function addOffset(...offsets) {
+ const out = {top: 0, left: 0};
+
+ offsets.forEach(({top, left}) => {
+ if (typeof top === 'string') {
+ top = parseFloat(top, 10);
+ }
+ if (typeof left === 'string') {
+ left = parseFloat(left, 10);
+ }
+
+ out.top += top;
+ out.left += left;
+ });
+
+ return out;
+}
+
+function offsetToPx(offset, size) {
+ if (typeof offset.left === 'string' && offset.left.indexOf('%') !== -1) {
+ offset.left = parseFloat(offset.left, 10) / 100 * size.width;
+ }
+ if (typeof offset.top === 'string' && offset.top.indexOf('%') !== -1) {
+ offset.top = parseFloat(offset.top, 10) / 100 * size.height;
+ }
+
+ return offset;
+}
+
+const parseOffset = (value) => {
+ const [top, left] = value.split(' ');
+ return {top, left};
+};
+const parseAttachment = parseOffset;
+
+class TetherClass extends Evented {
+
+ constructor(options) {
+ super();
+ this.position = this.position.bind(this);
+
+ tethers.push(this);
+
+ this.history = [];
+
+ this.setOptions(options, false);
+
+ TetherBase.modules.forEach(module => {
+ if (typeof module.initialize !== 'undefined') {
+ module.initialize.call(this);
+ }
+ });
+
+ this.position();
+ }
+
+ getClass(key='') {
+ const {classes} = this.options;
+ if (typeof classes !== 'undefined' && classes[key]) {
+ return this.options.classes[key];
+ } else if (this.options.classPrefix) {
+ return `${ this.options.classPrefix }-${ key }`;
+ } else {
+ return key;
+ }
+ }
+
+ setOptions(options, pos=true) {
+ const defaults = {
+ offset: '0 0',
+ targetOffset: '0 0',
+ targetAttachment: 'auto auto',
+ classPrefix: 'tether'
+ };
+
+ this.options = extend(defaults, options);
+
+ let {element, target, targetModifier} = this.options;
+ this.element = element;
+ this.target = target;
+ this.targetModifier = targetModifier;
+
+ if (this.target === 'viewport') {
+ this.target = document.body;
+ this.targetModifier = 'visible';
+ } else if (this.target === 'scroll-handle') {
+ this.target = document.body;
+ this.targetModifier = 'scroll-handle';
+ }
+
+ ['element', 'target'].forEach(key => {
+ if (typeof this[key] === 'undefined') {
+ throw new Error('Tether Error: Both element and target must be defined');
+ }
+
+ if (typeof this[key].jquery !== 'undefined') {
+ this[key] = this[key][0];
+ } else if (typeof this[key] === 'string') {
+ this[key] = document.querySelector(this[key]);
+ }
+ });
+
+ addClass(this.element, this.getClass('element'));
+ if (!(this.options.addTargetClasses === false)) {
+ addClass(this.target, this.getClass('target'));
+ }
+
+ if (!this.options.attachment) {
+ throw new Error('Tether Error: You must provide an attachment');
+ }
+
+ this.targetAttachment = parseAttachment(this.options.targetAttachment);
+ this.attachment = parseAttachment(this.options.attachment);
+ this.offset = parseOffset(this.options.offset);
+ this.targetOffset = parseOffset(this.options.targetOffset);
+
+ if (typeof this.scrollParents !== 'undefined') {
+ this.disable();
+ }
+
+ if (this.targetModifier === 'scroll-handle') {
+ this.scrollParents = [this.target];
+ } else {
+ this.scrollParents = getScrollParents(this.target);
+ }
+
+ if(!(this.options.enabled === false)) {
+ this.enable(pos);
+ }
+ }
+
+ getTargetBounds() {
+ if (typeof this.targetModifier !== 'undefined') {
+ if (this.targetModifier === 'visible') {
+ if (this.target === document.body) {
+ return {top: pageYOffset, left: pageXOffset, height: innerHeight, width: innerWidth};
+ } else {
+ const bounds = getBounds(this.target);
+
+ const out = {
+ height: bounds.height,
+ width: bounds.width,
+ top: bounds.top,
+ left: bounds.left
+ };
+
+ out.height = Math.min(out.height, bounds.height - (pageYOffset - bounds.top));
+ out.height = Math.min(out.height, bounds.height - ((bounds.top + bounds.height) - (pageYOffset + innerHeight)));
+ out.height = Math.min(innerHeight, out.height);
+ out.height -= 2;
+
+ out.width = Math.min(out.width, bounds.width - (pageXOffset - bounds.left));
+ out.width = Math.min(out.width, bounds.width - ((bounds.left + bounds.width) - (pageXOffset + innerWidth)));
+ out.width = Math.min(innerWidth, out.width);
+ out.width -= 2;
+
+ if (out.top < pageYOffset) {
+ out.top = pageYOffset;
+ }
+ if (out.left < pageXOffset) {
+ out.left = pageXOffset;
+ }
+
+ return out;
+ }
+ } else if (this.targetModifier === 'scroll-handle') {
+ let bounds;
+ let target = this.target;
+ if (target === document.body) {
+ target = document.documentElement;
+
+ bounds = {
+ left: pageXOffset,
+ top: pageYOffset,
+ height: innerHeight,
+ width: innerWidth
+ };
+ } else {
+ bounds = getBounds(target);
+ }
+
+ const style = getComputedStyle(target);
+
+ const hasBottomScroll = (
+ target.scrollWidth > target.clientWidth ||
+ [style.overflow, style.overflowX].indexOf('scroll') >= 0 ||
+ this.target !== document.body
+ );
+
+ let scrollBottom = 0;
+ if (hasBottomScroll) {
+ scrollBottom = 15;
+ }
+
+ const height = bounds.height - parseFloat(style.borderTopWidth) - parseFloat(style.borderBottomWidth) - scrollBottom;
+
+ const out = {
+ width: 15,
+ height: height * 0.975 * (height / target.scrollHeight),
+ left: bounds.left + bounds.width - parseFloat(style.borderLeftWidth) - 15
+ };
+
+ let fitAdj = 0;
+ if (height < 408 && this.target === document.body) {
+ fitAdj = -0.00011 * Math.pow(height, 2) - 0.00727 * height + 22.58;
+ }
+
+ if (this.target !== document.body) {
+ out.height = Math.max(out.height, 24);
+ }
+
+ const scrollPercentage = this.target.scrollTop / (target.scrollHeight - height);
+ out.top = scrollPercentage * (height - out.height - fitAdj) + bounds.top + parseFloat(style.borderTopWidth);
+
+ if (this.target === document.body) {
+ out.height = Math.max(out.height, 24);
+ }
+
+ return out;
+ }
+ } else {
+ return getBounds(this.target);
+ }
+ }
+
+ clearCache() {
+ this._cache = {};
+ }
+
+ cache(k, getter) {
+ // More than one module will often need the same DOM info, so
+ // we keep a cache which is cleared on each position call
+ if (typeof this._cache === 'undefined') {
+ this._cache = {};
+ }
+
+ if (typeof this._cache[k] === 'undefined') {
+ this._cache[k] = getter.call(this);
+ }
+
+ return this._cache[k];
+ }
+
+ enable(pos=true) {
+ if (!(this.options.addTargetClasses === false)) {
+ addClass(this.target, this.getClass('enabled'));
+ }
+ addClass(this.element, this.getClass('enabled'));
+ this.enabled = true;
+
+ this.scrollParents.forEach((parent) => {
+ if (parent !== this.target.ownerDocument) {
+ parent.addEventListener('scroll', this.position);
+ }
+ })
+
+ if (pos) {
+ this.position();
+ }
+ }
+
+ disable() {
+ removeClass(this.target, this.getClass('enabled'));
+ removeClass(this.element, this.getClass('enabled'));
+ this.enabled = false;
+
+ if (typeof this.scrollParents !== 'undefined') {
+ this.scrollParents.forEach((parent) => {
+ parent.removeEventListener('scroll', this.position);
+ })
+ }
+ }
+
+ destroy() {
+ this.disable();
+
+ tethers.forEach((tether, i) => {
+ if (tether === this) {
+ tethers.splice(i, 1);
+ }
+ });
+
+ // Remove any elements we were using for convenience from the DOM
+ if (tethers.length === 0) {
+ removeUtilElements();
+ }
+ }
+
+ updateAttachClasses(elementAttach, targetAttach) {
+ elementAttach = elementAttach || this.attachment;
+ targetAttach = targetAttach || this.targetAttachment;
+ const sides = ['left', 'top', 'bottom', 'right', 'middle', 'center'];
+
+ if (typeof this._addAttachClasses !== 'undefined' && this._addAttachClasses.length) {
+ // updateAttachClasses can be called more than once in a position call, so
+ // we need to clean up after ourselves such that when the last defer gets
+ // ran it doesn't add any extra classes from previous calls.
+ this._addAttachClasses.splice(0, this._addAttachClasses.length);
+ }
+
+ if (typeof this._addAttachClasses === 'undefined') {
+ this._addAttachClasses = [];
+ }
+ const add = this._addAttachClasses;
+
+ if (elementAttach.top) {
+ add.push(`${ this.getClass('element-attached') }-${ elementAttach.top }`);
+ }
+ if (elementAttach.left) {
+ add.push(`${ this.getClass('element-attached') }-${ elementAttach.left }`);
+ }
+ if (targetAttach.top) {
+ add.push(`${ this.getClass('target-attached') }-${ targetAttach.top }`);
+ }
+ if (targetAttach.left) {
+ add.push(`${ this.getClass('target-attached') }-${ targetAttach.left }`);
+ }
+
+ const all = [];
+ sides.forEach(side => {
+ all.push(`${ this.getClass('element-attached') }-${ side }`);
+ all.push(`${ this.getClass('target-attached') }-${ side }`);
+ });
+
+ defer(() => {
+ if (!(typeof this._addAttachClasses !== 'undefined')) {
+ return;
+ }
+
+ updateClasses(this.element, this._addAttachClasses, all);
+ if (!(this.options.addTargetClasses === false)) {
+ updateClasses(this.target, this._addAttachClasses, all);
+ }
+
+ delete this._addAttachClasses;
+ });
+ }
+
+ position(flushChanges=true) {
+ // flushChanges commits the changes immediately, leave true unless you are positioning multiple
+ // tethers (in which case call Tether.Utils.flush yourself when you're done)
+
+ if (!this.enabled) {
+ return;
+ }
+
+ this.clearCache();
+
+ // Turn 'auto' attachments into the appropriate corner or edge
+ const targetAttachment = autoToFixedAttachment(this.targetAttachment, this.attachment);
+
+ this.updateAttachClasses(this.attachment, targetAttachment);
+
+ const elementPos = this.cache('element-bounds', () => {
+ return getBounds(this.element);
+ });
+
+ let {width, height} = elementPos;
+
+ if (width === 0 && height === 0 && typeof this.lastSize !== 'undefined') {
+ // We cache the height and width to make it possible to position elements that are
+ // getting hidden.
+ ({width, height} = this.lastSize);
+ } else {
+ this.lastSize = {width, height};
+ }
+
+ const targetPos = this.cache('target-bounds', () => {
+ return this.getTargetBounds();
+ });
+ const targetSize = targetPos;
+
+ // Get an actual px offset from the attachment
+ let offset = offsetToPx(attachmentToOffset(this.attachment), {width, height});
+ let targetOffset = offsetToPx(attachmentToOffset(targetAttachment), targetSize);
+
+ const manualOffset = offsetToPx(this.offset, {width, height});
+ const manualTargetOffset = offsetToPx(this.targetOffset, targetSize);
+
+ // Add the manually provided offset
+ offset = addOffset(offset, manualOffset);
+ targetOffset = addOffset(targetOffset, manualTargetOffset);
+
+ // It's now our goal to make (element position + offset) == (target position + target offset)
+ let left = targetPos.left + targetOffset.left - offset.left;
+ let top = targetPos.top + targetOffset.top - offset.top;
+
+ for (let i = 0; i < TetherBase.modules.length; ++i) {
+ const module = TetherBase.modules[i];
+ const ret = module.position.call(this, {
+ left,
+ top,
+ targetAttachment,
+ targetPos,
+ elementPos,
+ offset,
+ targetOffset,
+ manualOffset,
+ manualTargetOffset,
+ scrollbarSize,
+ attachment: this.attachment
+ });
+
+ if (ret === false) {
+ return false;
+ } else if (typeof ret === 'undefined' || typeof ret !== 'object') {
+ continue;
+ } else {
+ ({top, left} = ret);
+ }
+ }
+
+ // We describe the position three different ways to give the optimizer
+ // a chance to decide the best possible way to position the element
+ // with the fewest repaints.
+ const next = {
+ // It's position relative to the page (absolute positioning when
+ // the element is a child of the body)
+ page: {
+ top: top,
+ left: left
+ },
+
+ // It's position relative to the viewport (fixed positioning)
+ viewport: {
+ top: top - pageYOffset,
+ bottom: pageYOffset - top - height + innerHeight,
+ left: left - pageXOffset,
+ right: pageXOffset - left - width + innerWidth
+ }
+ };
+
+ var doc = this.target.ownerDocument;
+ var win = doc.defaultView;
+
+ let scrollbarSize;
+ if (win.innerHeight > doc.documentElement.clientHeight) {
+ scrollbarSize = this.cache('scrollbar-size', getScrollBarSize);
+ next.viewport.bottom -= scrollbarSize.height;
+ }
+
+ if (win.innerWidth > doc.documentElement.clientWidth) {
+ scrollbarSize = this.cache('scrollbar-size', getScrollBarSize);
+ next.viewport.right -= scrollbarSize.width;
+ }
+
+ if (['', 'static'].indexOf(doc.body.style.position) === -1 ||
+ ['', 'static'].indexOf(doc.body.parentElement.style.position) === -1) {
+ // Absolute positioning in the body will be relative to the page, not the 'initial containing block'
+ next.page.bottom = doc.body.scrollHeight - top - height;
+ next.page.right = doc.body.scrollWidth - left - width;
+ }
+
+ if (typeof this.options.optimizations !== 'undefined' &&
+ this.options.optimizations.moveElement !== false &&
+ !(typeof this.targetModifier !== 'undefined')) {
+ const offsetParent = this.cache('target-offsetparent', () => getOffsetParent(this.target));
+ const offsetPosition = this.cache('target-offsetparent-bounds', () => getBounds(offsetParent));
+ const offsetParentStyle = getComputedStyle(offsetParent);
+ const offsetParentSize = offsetPosition;
+
+ const offsetBorder = {};
+ ['Top', 'Left', 'Bottom', 'Right'].forEach(side => {
+ offsetBorder[side.toLowerCase()] = parseFloat(offsetParentStyle[`border${ side }Width`]);
+ });
+
+ offsetPosition.right = doc.body.scrollWidth - offsetPosition.left - offsetParentSize.width + offsetBorder.right;
+ offsetPosition.bottom = doc.body.scrollHeight - offsetPosition.top - offsetParentSize.height + offsetBorder.bottom;
+
+ if (next.page.top >= (offsetPosition.top + offsetBorder.top) && next.page.bottom >= offsetPosition.bottom) {
+ if (next.page.left >= (offsetPosition.left + offsetBorder.left) && next.page.right >= offsetPosition.right) {
+ // We're within the visible part of the target's scroll parent
+ const scrollTop = offsetParent.scrollTop;
+ const scrollLeft = offsetParent.scrollLeft;
+
+ // It's position relative to the target's offset parent (absolute positioning when
+ // the element is moved to be a child of the target's offset parent).
+ next.offset = {
+ top: next.page.top - offsetPosition.top + scrollTop - offsetBorder.top,
+ left: next.page.left - offsetPosition.left + scrollLeft - offsetBorder.left
+ };
+ }
+ }
+ }
+
+
+ // We could also travel up the DOM and try each containing context, rather than only
+ // looking at the body, but we're gonna get diminishing returns.
+
+ this.move(next);
+
+ this.history.unshift(next);
+
+ if (this.history.length > 3) {
+ this.history.pop();
+ }
+
+ if (flushChanges) {
+ flush();
+ }
+
+ return true;
+ }
+
+ // THE ISSUE
+ move(pos) {
+ if (!(typeof this.element.parentNode !== 'undefined')) {
+ return;
+ }
+
+ const same = {};
+
+ for (let type in pos) {
+ same[type] = {};
+
+ for (let key in pos[type]) {
+ let found = false;
+
+ for (let i = 0; i < this.history.length; ++i) {
+ const point = this.history[i];
+ if (typeof point[type] !== 'undefined' &&
+ !within(point[type][key], pos[type][key])) {
+ found = true;
+ break;
+ }
+
+ }
+
+ if (!found) {
+ same[type][key] = true;
+ }
+ }
+ }
+
+ let css = {top: '', left: '', right: '', bottom: ''};
+
+ const transcribe = (_same, _pos) => {
+ const hasOptimizations = typeof this.options.optimizations !== 'undefined';
+ const gpu = hasOptimizations ? this.options.optimizations.gpu : null;
+ if (gpu !== false) {
+ let yPos, xPos;
+ if (_same.top) {
+ css.top = 0;
+ yPos = _pos.top;
+ } else {
+ css.bottom = 0;
+ yPos = -_pos.bottom;
+ }
+
+ if (_same.left) {
+ css.left = 0;
+ xPos = _pos.left;
+ } else {
+ css.right = 0;
+ xPos = -_pos.right;
+ }
+
+ if (window.matchMedia) {
+ // HubSpot/tether#207
+ const retina = window.matchMedia('only screen and (min-resolution: 1.3dppx)').matches ||
+ window.matchMedia('only screen and (-webkit-min-device-pixel-ratio: 1.3)').matches;
+ if (!retina) {
+ xPos = Math.round(xPos);
+ yPos = Math.round(yPos);
+ }
+ }
+
+ css[transformKey] = `translateX(${ xPos }px) translateY(${ yPos }px)`;
+
+ if (transformKey !== 'msTransform') {
+ // The Z transform will keep this in the GPU (faster, and prevents artifacts),
+ // but IE9 doesn't support 3d transforms and will choke.
+ css[transformKey] += " translateZ(0)";
+ }
+
+ } else {
+ if (_same.top) {
+ css.top = `${ _pos.top }px`;
+ } else {
+ css.bottom = `${ _pos.bottom }px`;
+ }
+
+ if (_same.left) {
+ css.left = `${ _pos.left }px`;
+ } else {
+ css.right = `${ _pos.right }px`;
+ }
+ }
+ };
+
+ let moved = false;
+ if ((same.page.top || same.page.bottom) && (same.page.left || same.page.right)) {
+ css.position = 'absolute';
+ transcribe(same.page, pos.page);
+
+ } else if ((same.viewport.top || same.viewport.bottom) && (same.viewport.left || same.viewport.right)) {
+ css.position = 'fixed';
+ transcribe(same.viewport, pos.viewport);
+
+ } else if (typeof same.offset !== 'undefined' && same.offset.top && same.offset.left) {
+ css.position = 'absolute';
+ const offsetParent = this.cache('target-offsetparent', () => getOffsetParent(this.target));
+
+ if (getOffsetParent(this.element) !== offsetParent) {
+ defer(() => {
+ this.element.parentNode.removeChild(this.element);
+ offsetParent.appendChild(this.element);
+ });
+ }
+
+ transcribe(same.offset, pos.offset);
+ moved = true;
+
+ } else {
+ css.position = 'absolute';
+ transcribe({top: true, left: true}, pos.page);
+ }
+
+ if (!moved) {
+ if (this.options.bodyElement) {
+ this.options.bodyElement.appendChild(this.element);
+ } else {
+ let offsetParentIsBody = true;
+ let currentNode = this.element.parentNode;
+ while (currentNode && currentNode.nodeType === 1 && currentNode.tagName !== 'BODY') {
+ if (getComputedStyle(currentNode).position !== 'static') {
+ offsetParentIsBody = false;
+ break;
+ }
+
+ currentNode = currentNode.parentNode;
+ }
+
+ if (!offsetParentIsBody) {
+ this.element.parentNode.removeChild(this.element);
+ this.element.ownerDocument.body.appendChild(this.element);
+ }
+ }
+ }
+
+ // Any css change will trigger a repaint, so let's avoid one if nothing changed
+ const writeCSS = {};
+ let write = false;
+ for (let key in css) {
+ let val = css[key];
+ let elVal = this.element.style[key];
+
+ if (elVal !== val) {
+ write = true;
+ writeCSS[key] = val;
+ }
+ }
+
+ if (write) {
+ defer(() => {
+ extend(this.element.style, writeCSS);
+ this.trigger('repositioned');
+ });
+ }
+ }
+}
+
+TetherClass.modules = [];
+
+TetherBase.position = position;
+
+let Tether = extend(TetherClass, TetherBase);
diff --git a/templates/assets/tether/src/js/utils.js b/templates/assets/tether/src/js/utils.js
new file mode 100644
index 0000000..19ba7fe
--- /dev/null
+++ b/templates/assets/tether/src/js/utils.js
@@ -0,0 +1,370 @@
+let TetherBase;
+if (typeof TetherBase === 'undefined') {
+ TetherBase = {modules: []};
+}
+
+let zeroElement = null;
+
+// Same as native getBoundingClientRect, except it takes into account parent <frame> offsets
+// if the element lies within a nested document (<frame> or <iframe>-like).
+function getActualBoundingClientRect(node) {
+ let boundingRect = node.getBoundingClientRect();
+
+ // The original object returned by getBoundingClientRect is immutable, so we clone it
+ // We can't use extend because the properties are not considered part of the object by hasOwnProperty in IE9
+ let rect = {};
+ for (var k in boundingRect) {
+ rect[k] = boundingRect[k];
+ }
+
+ if (node.ownerDocument !== document) {
+ let frameElement = node.ownerDocument.defaultView.frameElement;
+ if (frameElement) {
+ let frameRect = getActualBoundingClientRect(frameElement);
+ rect.top += frameRect.top;
+ rect.bottom += frameRect.top;
+ rect.left += frameRect.left;
+ rect.right += frameRect.left;
+ }
+ }
+
+ return rect;
+}
+
+function getScrollParents(el) {
+ // In firefox if the el is inside an iframe with display: none; window.getComputedStyle() will return null;
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=548397
+ const computedStyle = getComputedStyle(el) || {};
+ const position = computedStyle.position;
+ let parents = [];
+
+ if (position === 'fixed') {
+ return [el];
+ }
+
+ let parent = el;
+ while ((parent = parent.parentNode) && parent && parent.nodeType === 1) {
+ let style;
+ try {
+ style = getComputedStyle(parent);
+ } catch (err) {}
+
+ if (typeof style === 'undefined' || style === null) {
+ parents.push(parent);
+ return parents;
+ }
+
+ const {overflow, overflowX, overflowY} = style;
+ if (/(auto|scroll)/.test(overflow + overflowY + overflowX)) {
+ if (position !== 'absolute' || ['relative', 'absolute', 'fixed'].indexOf(style.position) >= 0) {
+ parents.push(parent)
+ }
+ }
+ }
+
+ parents.push(el.ownerDocument.body);
+
+ // If the node is within a frame, account for the parent window scroll
+ if (el.ownerDocument !== document) {
+ parents.push(el.ownerDocument.defaultView);
+ }
+
+ return parents;
+}
+
+const uniqueId = (() => {
+ let id = 0;
+ return () => ++id;
+})();
+
+const zeroPosCache = {};
+const getOrigin = () => {
+ // getBoundingClientRect is unfortunately too accurate. It introduces a pixel or two of
+ // jitter as the user scrolls that messes with our ability to detect if two positions
+ // are equivilant or not. We place an element at the top left of the page that will
+ // get the same jitter, so we can cancel the two out.
+ let node = zeroElement;
+ if (!node || !document.body.contains(node)) {
+ node = document.createElement('div');
+ node.setAttribute('data-tether-id', uniqueId());
+ extend(node.style, {
+ top: 0,
+ left: 0,
+ position: 'absolute'
+ });
+
+ document.body.appendChild(node);
+
+ zeroElement = node;
+ }
+
+ const id = node.getAttribute('data-tether-id');
+ if (typeof zeroPosCache[id] === 'undefined') {
+ zeroPosCache[id] = getActualBoundingClientRect(node);
+
+ // Clear the cache when this position call is done
+ defer(() => {
+ delete zeroPosCache[id];
+ });
+ }
+
+ return zeroPosCache[id];
+};
+
+function removeUtilElements() {
+ if (zeroElement) {
+ document.body.removeChild(zeroElement);
+ }
+ zeroElement = null;
+};
+
+function getBounds(el) {
+ let doc;
+ if (el === document) {
+ doc = document;
+ el = document.documentElement;
+ } else {
+ doc = el.ownerDocument;
+ }
+
+ const docEl = doc.documentElement;
+
+ const box = getActualBoundingClientRect(el);
+
+ const origin = getOrigin();
+
+ box.top -= origin.top;
+ box.left -= origin.left;
+
+ if (typeof box.width === 'undefined') {
+ box.width = document.body.scrollWidth - box.left - box.right;
+ }
+ if (typeof box.height === 'undefined') {
+ box.height = document.body.scrollHeight - box.top - box.bottom;
+ }
+
+ box.top = box.top - docEl.clientTop;
+ box.left = box.left - docEl.clientLeft;
+ box.right = doc.body.clientWidth - box.width - box.left;
+ box.bottom = doc.body.clientHeight - box.height - box.top;
+
+ return box;
+}
+
+function getOffsetParent(el) {
+ return el.offsetParent || document.documentElement;
+}
+
+let _scrollBarSize = null;
+function getScrollBarSize() {
+ if (_scrollBarSize) {
+ return _scrollBarSize;
+ }
+ const inner = document.createElement('div');
+ inner.style.width = '100%';
+ inner.style.height = '200px';
+
+ const outer = document.createElement('div');
+ extend(outer.style, {
+ position: 'absolute',
+ top: 0,
+ left: 0,
+ pointerEvents: 'none',
+ visibility: 'hidden',
+ width: '200px',
+ height: '150px',
+ overflow: 'hidden'
+ });
+
+ outer.appendChild(inner);
+
+ document.body.appendChild(outer);
+
+ const widthContained = inner.offsetWidth;
+ outer.style.overflow = 'scroll';
+ let widthScroll = inner.offsetWidth;
+
+ if (widthContained === widthScroll) {
+ widthScroll = outer.clientWidth;
+ }
+
+ document.body.removeChild(outer);
+
+ const width = widthContained - widthScroll;
+
+ _scrollBarSize = {width, height: width};
+ return _scrollBarSize;
+}
+
+function extend(out={}) {
+ const args = [];
+
+ Array.prototype.push.apply(args, arguments);
+
+ args.slice(1).forEach(obj => {
+ if (obj) {
+ for (let key in obj) {
+ if ({}.hasOwnProperty.call(obj, key)) {
+ out[key] = obj[key];
+ }
+ }
+ }
+ });
+
+ return out;
+}
+
+function removeClass(el, name) {
+ if (typeof el.classList !== 'undefined') {
+ name.split(' ').forEach(cls => {
+ if (cls.trim()) {
+ el.classList.remove(cls);
+ }
+ });
+ } else {
+ const regex = new RegExp(`(^| )${ name.split(' ').join('|') }( |$)`, 'gi');
+ const className = getClassName(el).replace(regex, ' ');
+ setClassName(el, className);
+ }
+}
+
+function addClass(el, name) {
+ if (typeof el.classList !== 'undefined') {
+ name.split(' ').forEach(cls => {
+ if (cls.trim()) {
+ el.classList.add(cls);
+ }
+ });
+ } else {
+ removeClass(el, name);
+ const cls = getClassName(el) + ` ${name}`;
+ setClassName(el, cls);
+ }
+}
+
+function hasClass(el, name) {
+ if (typeof el.classList !== 'undefined') {
+ return el.classList.contains(name);
+ }
+ const className = getClassName(el);
+ return new RegExp(`(^| )${ name }( |$)`, 'gi').test(className);
+}
+
+function getClassName(el) {
+ // Can't use just SVGAnimatedString here since nodes within a Frame in IE have
+ // completely separately SVGAnimatedString base classes
+ if (el.className instanceof el.ownerDocument.defaultView.SVGAnimatedString) {
+ return el.className.baseVal;
+ }
+ return el.className;
+}
+
+function setClassName(el, className) {
+ el.setAttribute('class', className);
+}
+
+
+function updateClasses(el, add, all) {
+ // Of the set of 'all' classes, we need the 'add' classes, and only the
+ // 'add' classes to be set.
+ all.forEach(cls => {
+ if (add.indexOf(cls) === -1 && hasClass(el, cls)) {
+ removeClass(el, cls);
+ }
+ });
+
+ add.forEach(cls => {
+ if (!hasClass(el, cls)) {
+ addClass(el, cls);
+ }
+ });
+}
+
+const deferred = [];
+
+const defer = (fn) => {
+ deferred.push(fn);
+};
+
+const flush = () => {
+ let fn;
+ while(fn = deferred.pop()) {
+ fn();
+ }
+};
+
+class Evented {
+ on(event, handler, ctx, once=false) {
+ if (typeof this.bindings === 'undefined') {
+ this.bindings = {};
+ }
+ if (typeof this.bindings[event] === 'undefined') {
+ this.bindings[event] = [];
+ }
+ this.bindings[event].push({handler, ctx, once});
+ }
+
+ once(event, handler, ctx) {
+ this.on(event, handler, ctx, true);
+ }
+
+ off(event, handler) {
+ if (typeof this.bindings === 'undefined' ||
+ typeof this.bindings[event] === 'undefined') {
+ return;
+ }
+
+ if (typeof handler === 'undefined') {
+ delete this.bindings[event];
+ } else {
+ let i = 0;
+ while (i < this.bindings[event].length) {
+ if (this.bindings[event][i].handler === handler) {
+ this.bindings[event].splice(i, 1);
+ } else {
+ ++i;
+ }
+ }
+ }
+ }
+
+ trigger(event, ...args) {
+ if (typeof this.bindings !== 'undefined' && this.bindings[event]) {
+ let i = 0;
+ while (i < this.bindings[event].length) {
+ const {handler, ctx, once} = this.bindings[event][i];
+
+ let context = ctx;
+ if (typeof context === 'undefined') {
+ context = this;
+ }
+
+ handler.apply(context, args);
+
+ if (once) {
+ this.bindings[event].splice(i, 1);
+ } else {
+ ++i;
+ }
+ }
+ }
+ }
+}
+
+TetherBase.Utils = {
+ getActualBoundingClientRect,
+ getScrollParents,
+ getBounds,
+ getOffsetParent,
+ extend,
+ addClass,
+ removeClass,
+ hasClass,
+ updateClasses,
+ defer,
+ flush,
+ uniqueId,
+ Evented,
+ getScrollBarSize,
+ removeUtilElements
+};
diff --git a/templates/index.html b/templates/index.html
new file mode 100644
index 0000000..61f262e
--- /dev/null
+++ b/templates/index.html
@@ -0,0 +1,115 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <title>Minion Lives Matter</title>
+ <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" />
+ <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
+ <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" />
+ <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" />
+ <link rel="stylesheet" href="assets/tether/dist/css/tether.min.css" />
+ <link rel="stylesheet" href="assets/bootstrap/dist/css/bootstrap.min.css" />
+ <link rel="stylesheet" href="assets/bootstrap-material-design/dist/bootstrap-material-design.min.css" />
+ </head>
+ <body>
+ <nav class="navbar navbar-inverse bg-inverse fixed-top">
+ <a class="navbar-brand" href="alpha.vainsocial.com">Vainsocial</a>
+ </nav>
+
+ <div class="container" style="padding: 3rem 1.5rem;">
+ <div class="container">
+ <h1>Minion Lives Matter</h1>
+ <p>
+ <em>Based on Vainsocial users' data from the past 24 hours that by no means is representative to the whole player base of Vainglory. {{ sql_val("SELECT COUNT(*) FROM match WHERE created_at > NOW() - '1 day'::INTERVAL") }} matches are taken into account for this calculation.</em>
+ <noscript>This site works without JavaScript! However, be aware that live stats won't update.</noscript>
+ </p>
+ </div>
+
+ <div class="card">
+ <div class="card-block">
+ <h4 class="card-title"><span id="minions-killed-now">0</span> Minions died</h4>
+ <p class="card-text">since you opened this page</p>
+ <script type="text/javascript">
+ var minions_per_second = {{ sql_val("SELECT SUM(minion_kills)/SUM(match.duration)::FLOAT FROM participant JOIN roster ON participant.roster_api_id=roster.api_id JOIN match ON roster.match_api_id=match.api_id WHERE participant.created_at > NOW() - '1 day'::INTERVAL") }};
+ var minions = 0;
+ // sum(minions killed) / sum(game lengh s)
+ setInterval(() => {
+ minions += minions_per_second;
+ $("#minions-killed-now").text(Math.floor(minions));
+ }, 1000);
+ </script>
+ </div>
+ </div>
+ <div class="card">
+ <div class="card-block">
+ <h4 class="card-title">{{ sql_val("SELECT COUNT((item_grants->>'*1045_Item_FountainOfRenewal*')::INT)-COUNT((item_uses->>'*1045_Item_FountainOfRenewal*')::INT) FROM participant WHERE created_at > NOW() - '1 day'::INTERVAL") }} Fountains</h4>
+ <!-- sum(FoR bought) - sum(FoR used) -->
+ <p class="card-text">did not help their team</p>
+ </div>
+ </div>
+ <div class="card">
+ <div class="card-block">
+ <h4 class="card-title">{{ sql_val("SELECT (SUM(match.duration)/60*5) / SUM(roster.kraken_captures) FROM match JOIN roster ON roster.match_api_id=match.api_id WHERE match.created_at > NOW() - '1 day'::INTERVAL") }} Minions</h4>
+ <p class="card-text">are needed to unleash a Kraken</p>
+ <!-- 1 wave = 3m * 1CS/m + 1m * 2CS/m = 5CS, 3 waves/min = 15CS/min = 5m/min -->
+ <!-- (sum(game length s / 60)min * 5m/min) / sum(krakens) -->
+ </div>
+ </div>
+ <div class="card">
+ <div class="card-block">
+ <h4 class="card-title">{{ sql_val("SELECT SUM(participant.crystal_mine_captures) FROM participant WHERE participant.created_at > NOW() - '1 day'::INTERVAL") }} Crystal Sentries</h4>
+ <!-- sum(miners) -->
+ <p class="card-text">got slaugthered</p>
+ </div>
+ </div>
+ <div class="card">
+ <div class="card-block">
+ <h4 class="card-title">{{ sql_val("SELECT SUM((participant.item_sells->>'*1038_Item_Flare*')::INT) FROM participant WHERE participant.created_at > NOW() - '1 day'::INTERVAL") }} Flares</h4>
+ <!-- sum(flares sold) -->
+ <p class="card-text">got thrown into the trash</p>
+ </div>
+ </div>
+ <div class="card">
+ <div class="card-block">
+ <h4 class="card-title">Every {{ sql_val("SELECT SUM(match.duration)/60 / (SUM((participant.item_uses->>'*1052_Item_WeaponInfusion*')::INT) + SUM((participant.item_uses->>'*1053_Item_CrystalInfusion*')::INT)) FROM participant JOIN roster ON participant.roster_api_id=roster.api_id JOIN match ON roster.match_api_id=match.api_id WHERE participant.created_at > NOW() - '1 day'::INTERVAL") }} minutes</h4>
+ <!-- sum(game length s)/60 / (sum(infusion wp) + sum(infusion cp)) -->
+ <p class="card-text">A hero gets high on infusions</p>
+ </div>
+ </div>
+ <div class="card">
+ <div class="card-block">
+ <h4 class="card-title">{{ sql_val("SELECT SUM((item_uses->>'*1054_Item_ScoutTrap*')::INT) FROM participant WHERE participant.created_at > NOW() - '1 day'::INTERVAL") }} Scout Traps</h4>
+ <!-- sum(game length s)/60 / (sum(infusion wp) + sum(infusion cp)) -->
+ <p class="card-text">Scout Traps made the Halcyon Fold a dangerous place</p>
+ </div>
+ </div>
+ <div class="card">
+ <div class="card-block">
+ <h4 class="card-title">{{ sql_val("SELECT SUM(turret_kills) FROM participant WHERE hero='*SAW*' AND created_at > NOW() - '1 day'::INTERVAL") }} Turrets</h4>
+ <!-- sum(turret_kills) where hero=saw -->
+ <p class="card-text">were pushed by a SAW</p>
+ </div>
+ </div>
+ <div class="card">
+ <div class="card-block">
+ <h4 class="card-title">{{ sql_val("SELECT SUM(turret_kills) FROM participant WHERE created_at > NOW() - '1 day'::INTERVAL") }} Turrets</h4>
+ <!-- sum(turret_kills) -->
+ <p class="card-text">need to be rebuilt by Minion Workers every day</p>
+ </div>
+ </div>
+ <div class="card">
+ <div class="card-block">
+ <h4 class="card-title">{{ sql_val("SELECT SUM(minion_kills) FROM participant WHERE NOT winner AND created_at > NOW() - '1 day'::INTERVAL") }} out of {{ sql_val("SELECT SUM(minion_kills) FROM participant WHERE created_at > NOW() - '1 day'::INTERVAL") }} Minions</h4>
+ <!-- sum(minions killed) where match lost -->
+ <!-- sum(minions killed) -->
+ <p class="card-text">died for nothing</p>
+ </div>
+ </div>
+ </div>
+ <script src="assets/jquery/dist/jquery.min.js" type="text/javascript"></script>
+ <script src="assets/tether/dist/js/tether.min.js" type="text/javascript"></script>
+ <script src="assets/bootstrap/dist/js/bootstrap.min.js" type="text/javascript"></script>
+ <script src="assets/bootstrap-material-design/dist/bootstrap-material-design.iife.min.js" type="text/javascript"></script>
+ </body>
+</html>