From be9cd2f079b51037fca2ce5511b55a8f6e3eb32a Mon Sep 17 00:00:00 2001 From: Ana Maria Echeverri Date: Thu, 26 Feb 2015 14:33:27 -0500 Subject: [PATCH 01/31] initial --- tasker/.gitignore | 49 ++++ tasker/README.md | 56 ++++ tasker/manage.py | 29 ++ tasker/requirements.txt | 29 ++ tasker/tasker/__init__.py | 22 ++ tasker/tasker/extensions.py | 12 + tasker/tasker/forms.py | 3 + tasker/tasker/models.py | 3 + tasker/tasker/static/.gitkeep | 0 tasker/tasker/static/main.css | 0 tasker/tasker/static/main.js | 0 tasker/tasker/static/modernizr.js | 0 tasker/tasker/static/normalize.css | 427 ++++++++++++++++++++++++++++ tasker/tasker/templates/layout.html | 32 +++ tasker/tasker/views.py | 23 ++ tasker/tests/__init__.py | 0 16 files changed, 685 insertions(+) create mode 100644 tasker/.gitignore create mode 100644 tasker/README.md create mode 100644 tasker/manage.py create mode 100644 tasker/requirements.txt create mode 100644 tasker/tasker/__init__.py create mode 100644 tasker/tasker/extensions.py create mode 100644 tasker/tasker/forms.py create mode 100644 tasker/tasker/models.py create mode 100644 tasker/tasker/static/.gitkeep create mode 100644 tasker/tasker/static/main.css create mode 100644 tasker/tasker/static/main.js create mode 100644 tasker/tasker/static/modernizr.js create mode 100644 tasker/tasker/static/normalize.css create mode 100644 tasker/tasker/templates/layout.html create mode 100644 tasker/tasker/views.py create mode 100644 tasker/tests/__init__.py diff --git a/tasker/.gitignore b/tasker/.gitignore new file mode 100644 index 0000000..e57a07f --- /dev/null +++ b/tasker/.gitignore @@ -0,0 +1,49 @@ +*.py[cod] + +# C extensions +*.so + +# Packages +*.egg +*.egg-info +build +eggs +parts +bin +var +sdist +develop-eggs +.installed.cfg +lib +lib64 + +# Installer logs +pip-log.txt + +# Unit test / coverage reports +.coverage +.tox +nosetests.xml + +# Translations +*.mo + +# Mr Developer +.mr.developer.cfg +.project +.pydevproject + +# Complexity +output/*.html +output/*/index.html + +# Sphinx +docs/_build + +.webassets-cache + +.idea + +# Virtualenvs +env +.python-version diff --git a/tasker/README.md b/tasker/README.md new file mode 100644 index 0000000..38b655e --- /dev/null +++ b/tasker/README.md @@ -0,0 +1,56 @@ +# tasker + + +Quickstart +---------- + +Run the following commands to bootstrap your environment. + + +``` +cd tasker +pip install -r requirements.txt +python manage.py db init +python manage.py server +``` + + +Deployment +---------- + +In your production environment, make sure you have an application.cfg +file in your instance directory. + + +Shell +----- + +To open the interactive shell, run: + + python manage.py shell + +By default, you will have access to `app` and `db`. + + +Running Tests +------------- + +To run all tests, run: + + python manage.py test + + +Migrations +---------- + +Whenever a database migration needs to be made, run the following commmand: + + python manage.py db migrate + +This will generate a new migration script. Then run: + + python manage.py db upgrade + +to apply the migration. + +For a full migration command reference, run `python manage.py db --help`. diff --git a/tasker/manage.py b/tasker/manage.py new file mode 100644 index 0000000..5119641 --- /dev/null +++ b/tasker/manage.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python +import os + +from flask.ext.script import Manager, Shell, Server +from flask.ext.migrate import MigrateCommand +from flask.ext.script.commands import ShowUrls, Clean + +from tasker import create_app, db + + +app = create_app() +manager = Manager(app) +manager.add_command('server', Server()) +manager.add_command('db', MigrateCommand) +manager.add_command('show-urls', ShowUrls()) +manager.add_command('clean', Clean()) + + +@manager.shell +def make_shell_context(): + """ Creates a python REPL with several default imports + in the context of the app + """ + + return dict(app=app, db=db) + + +if __name__ == '__main__': + manager.run() diff --git a/tasker/requirements.txt b/tasker/requirements.txt new file mode 100644 index 0000000..d9f3861 --- /dev/null +++ b/tasker/requirements.txt @@ -0,0 +1,29 @@ +# Everything needed in production + +# Flask +Flask==0.10.1 +MarkupSafe==0.23 +Werkzeug==0.9.6 +Jinja2==2.7.3 +itsdangerous==0.24 + +# Database +Flask-SQLAlchemy==2.0 +SQLAlchemy==0.9.8 + +# Migrations +Flask-Migrate==1.3.0 + +# Forms +Flask-WTF==0.10.3 +WTForms==2.0.1 + +## Config +flask-appconfig==0.9.1 + +# Testing +pytest>=2.6.3 +webtest + +# Management script +Flask-Script diff --git a/tasker/tasker/__init__.py b/tasker/tasker/__init__.py new file mode 100644 index 0000000..e580b93 --- /dev/null +++ b/tasker/tasker/__init__.py @@ -0,0 +1,22 @@ +from flask import Flask, render_template + +from . import models +from .extensions import db, migrate, config +from .views import tasker + + +SQLALCHEMY_DATABASE_URI = "sqlite:////tmp/tasker.db" +DEBUG = True +SECRET_KEY = 'development-key' + + +def create_app(): + app = Flask(__name__) + app.config.from_object(__name__) + app.register_blueprint(tasker) + + config.init_app(app) + db.init_app(app) + migrate.init_app(app, db) + + return app \ No newline at end of file diff --git a/tasker/tasker/extensions.py b/tasker/tasker/extensions.py new file mode 100644 index 0000000..105f37e --- /dev/null +++ b/tasker/tasker/extensions.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +"""Extensions module.""" + +from flask.ext.sqlalchemy import SQLAlchemy +db = SQLAlchemy() + +from flask.ext.migrate import Migrate +migrate = Migrate() + +# Change this to HerokuConfig if using Heroku. +from flask.ext.appconfig import AppConfig +config = AppConfig() diff --git a/tasker/tasker/forms.py b/tasker/tasker/forms.py new file mode 100644 index 0000000..78118b6 --- /dev/null +++ b/tasker/tasker/forms.py @@ -0,0 +1,3 @@ +from flask_wtf import Form + +"""Add your forms here.""" \ No newline at end of file diff --git a/tasker/tasker/models.py b/tasker/tasker/models.py new file mode 100644 index 0000000..04e9e1b --- /dev/null +++ b/tasker/tasker/models.py @@ -0,0 +1,3 @@ +from .extensions import db + +"""Add your models here.""" \ No newline at end of file diff --git a/tasker/tasker/static/.gitkeep b/tasker/tasker/static/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tasker/tasker/static/main.css b/tasker/tasker/static/main.css new file mode 100644 index 0000000..e69de29 diff --git a/tasker/tasker/static/main.js b/tasker/tasker/static/main.js new file mode 100644 index 0000000..e69de29 diff --git a/tasker/tasker/static/modernizr.js b/tasker/tasker/static/modernizr.js new file mode 100644 index 0000000..e69de29 diff --git a/tasker/tasker/static/normalize.css b/tasker/tasker/static/normalize.css new file mode 100644 index 0000000..81c6f31 --- /dev/null +++ b/tasker/tasker/static/normalize.css @@ -0,0 +1,427 @@ +/*! normalize.css v3.0.2 | MIT License | git.io/normalize */ + +/** + * 1. Set default font family to sans-serif. + * 2. Prevent iOS text size adjust after orientation change, without disabling + * user zoom. + */ + +html { + font-family: sans-serif; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/** + * Remove default margin. + */ + +body { + margin: 0; +} + +/* HTML5 display definitions + ========================================================================== */ + +/** + * Correct `block` display not defined for any HTML5 element in IE 8/9. + * Correct `block` display not defined for `details` or `summary` in IE 10/11 + * and Firefox. + * Correct `block` display not defined for `main` in IE 11. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section, +summary { + display: block; +} + +/** + * 1. Correct `inline-block` display not defined in IE 8/9. + * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. + */ + +audio, +canvas, +progress, +video { + display: inline-block; /* 1 */ + vertical-align: baseline; /* 2 */ +} + +/** + * Prevent modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Address `[hidden]` styling not present in IE 8/9/10. + * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. + */ + +[hidden], +template { + display: none; +} + +/* Links + ========================================================================== */ + +/** + * Remove the gray background color from active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * Improve readability when focused and also mouse hovered in all browsers. + */ + +a:active, +a:hover { + outline: 0; +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Address styling not present in IE 8/9/10/11, Safari, and Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/** + * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. + */ + +b, +strong { + font-weight: bold; +} + +/** + * Address styling not present in Safari and Chrome. + */ + +dfn { + font-style: italic; +} + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari, and Chrome. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/** + * Address styling not present in IE 8/9. + */ + +mark { + background: #ff0; + color: #000; +} + +/** + * Address inconsistent and variable font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove border when inside `a` element in IE 8/9/10. + */ + +img { + border: 0; +} + +/** + * Correct overflow not hidden in IE 9/10/11. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* Grouping content + ========================================================================== */ + +/** + * Address margin not present in IE 8/9 and Safari. + */ + +figure { + margin: 1em 40px; +} + +/** + * Address differences between Firefox and other browsers. + */ + +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} + +/** + * Contain overflow in all browsers. + */ + +pre { + overflow: auto; +} + +/** + * Address odd `em`-unit font size rendering in all browsers. + */ + +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; +} + +/* Forms + ========================================================================== */ + +/** + * Known limitation: by default, Chrome and Safari on OS X allow very limited + * styling of `select`, unless a `border` property is set. + */ + +/** + * 1. Correct color not being inherited. + * Known issue: affects color of disabled elements. + * 2. Correct font properties not being inherited. + * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. + */ + +button, +input, +optgroup, +select, +textarea { + color: inherit; /* 1 */ + font: inherit; /* 2 */ + margin: 0; /* 3 */ +} + +/** + * Address `overflow` set to `hidden` in IE 8/9/10/11. + */ + +button { + overflow: visible; +} + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. + * Correct `select` style inheritance in Firefox. + */ + +button, +select { + text-transform: none; +} + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + */ + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ +} + +/** + * Re-set default cursor for disabled elements. + */ + +button[disabled], +html input[disabled] { + cursor: default; +} + +/** + * Remove inner padding and border in Firefox 4+. + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ + +input { + line-height: normal; +} + +/** + * It's recommended that you don't attempt to style these elements. + * Firefox's implementation doesn't respect box-sizing, padding, or width. + * + * 1. Address box sizing set to `content-box` in IE 8/9/10. + * 2. Remove excess padding in IE 8/9/10. + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Fix the cursor style for Chrome's increment/decrement buttons. For certain + * `font-size` values of the `input`, it causes the cursor style of the + * decrement button to change from `default` to `text`. + */ + +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Address `appearance` set to `searchfield` in Safari and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari and Chrome + * (include `-moz` to future-proof). + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; /* 2 */ + box-sizing: content-box; +} + +/** + * Remove inner padding and search cancel button in Safari and Chrome on OS X. + * Safari (but not Chrome) clips the cancel button when the search input has + * padding (and `textfield` appearance). + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/** + * 1. Correct `color` not being inherited in IE 8/9/10/11. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ + +legend { + border: 0; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Remove default vertical scrollbar in IE 8/9/10/11. + */ + +textarea { + overflow: auto; +} + +/** + * Don't inherit the `font-weight` (applied by a rule above). + * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. + */ + +optgroup { + font-weight: bold; +} + +/* Tables + ========================================================================== */ + +/** + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} + +td, +th { + padding: 0; +} \ No newline at end of file diff --git a/tasker/tasker/templates/layout.html b/tasker/tasker/templates/layout.html new file mode 100644 index 0000000..d34344a --- /dev/null +++ b/tasker/tasker/templates/layout.html @@ -0,0 +1,32 @@ + + + + + + + + + + + +
+ {% block header %} +
+

Hello World!

+
+ {% endblock %} + + {% block body %}{% endblock %} + + {% block footer %} +
+ Copyright (c) 2013 +
+ {% endblock %} +
+ + + + + + diff --git a/tasker/tasker/views.py b/tasker/tasker/views.py new file mode 100644 index 0000000..6a22f14 --- /dev/null +++ b/tasker/tasker/views.py @@ -0,0 +1,23 @@ +"""Add your views here. + +We have started you with an initial blueprint. Add more as needed. +""" + +from flask import Blueprint, flash + + +tasker = Blueprint("tasker", __name__) + + +@tasker.route("/") +def index(): + return "Hello, world!" + + +def flash_errors(form, category="warning"): + '''Flash all errors for a form.''' + for field, errors in form.errors.items(): + for error in errors: + flash("{0} - {1}" + .format(getattr(form, field).label.text, error), category) + diff --git a/tasker/tests/__init__.py b/tasker/tests/__init__.py new file mode 100644 index 0000000..e69de29 From e2ec176e87c48cb59ac583df6b086a5de9520bc8 Mon Sep 17 00:00:00 2001 From: Ana Maria Echeverri Date: Thu, 26 Feb 2015 16:43:54 -0500 Subject: [PATCH 02/31] initial --- Procfile | 1 + tasker/manage.py => manage.py | 25 +- migrations/README | 1 + migrations/__pycache__/env.cpython-34.pyc | Bin 0 -> 1797 bytes migrations/alembic.ini | 45 + migrations/env.py | 73 + migrations/script.py.mako | 22 + migrations/versions/20d4a510108_.py | 33 + .../__pycache__/20d4a510108_.cpython-34.pyc | Bin 0 -> 974 bytes requirements.txt | 53 + requirements/dev.txt | 9 + .../requirements.txt => requirements/prod.txt | 11 +- runtime.txt | 1 + tasker/.gitignore | 49 - tasker/README.md | 56 - tasker/__init__.py | 35 + tasker/__pycache__/__init__.cpython-34.pyc | Bin 0 -> 1076 bytes tasker/__pycache__/app.cpython-34.pyc | Bin 0 -> 775 bytes tasker/__pycache__/extensions.cpython-34.pyc | Bin 0 -> 660 bytes tasker/__pycache__/forms.cpython-34.pyc | Bin 0 -> 1155 bytes tasker/__pycache__/models.cpython-34.pyc | Bin 0 -> 1752 bytes tasker/__pycache__/utils.cpython-34.pyc | Bin 0 -> 572 bytes tasker/__pycache__/views.cpython-34.pyc | Bin 0 -> 7666 bytes tasker/extensions.py | 20 + tasker/forms.py | 21 + tasker/models.py | 31 + .../static/.gitkeep => static/.Rhistory} | 0 .../static/main.css => static/.gitkeep} | 0 tasker/static/app.css | 6201 +++++++++++++++++ tasker/static/main.css | 69 + tasker/{tasker => }/static/main.js | 0 tasker/{tasker => }/static/modernizr.js | 0 tasker/{tasker => }/static/normalize.css | 0 tasker/static/tasker.jpg | Bin 0 -> 6179 bytes tasker/tasker/__init__.py | 22 - tasker/tasker/extensions.py | 12 - tasker/tasker/forms.py | 3 - tasker/tasker/models.py | 3 - tasker/tasker/templates/layout.html | 32 - tasker/tasker/views.py | 23 - tasker/templates/index.html | 51 + tasker/templates/layout.html | 75 + tasker/templates/login.html | 22 + tasker/templates/register.html | 32 + tasker/views/__pycache__/api.cpython-34.pyc | Bin 0 -> 3296 bytes tasker/views/__pycache__/links.cpython-34.pyc | Bin 0 -> 6507 bytes tasker/views/__pycache__/tasks.cpython-34.pyc | Bin 0 -> 826 bytes tasker/views/__pycache__/users.cpython-34.pyc | Bin 0 -> 1954 bytes tasker/views/tasks.py | 21 + tasker/views/users.py | 46 + {tasker/tests => tests}/__init__.py | 0 51 files changed, 6886 insertions(+), 212 deletions(-) create mode 100644 Procfile rename tasker/manage.py => manage.py (51%) create mode 100755 migrations/README create mode 100644 migrations/__pycache__/env.cpython-34.pyc create mode 100644 migrations/alembic.ini create mode 100644 migrations/env.py create mode 100755 migrations/script.py.mako create mode 100644 migrations/versions/20d4a510108_.py create mode 100644 migrations/versions/__pycache__/20d4a510108_.cpython-34.pyc create mode 100644 requirements.txt create mode 100644 requirements/dev.txt rename tasker/requirements.txt => requirements/prod.txt (71%) create mode 100644 runtime.txt delete mode 100644 tasker/.gitignore delete mode 100644 tasker/README.md create mode 100644 tasker/__init__.py create mode 100644 tasker/__pycache__/__init__.cpython-34.pyc create mode 100644 tasker/__pycache__/app.cpython-34.pyc create mode 100644 tasker/__pycache__/extensions.cpython-34.pyc create mode 100644 tasker/__pycache__/forms.cpython-34.pyc create mode 100644 tasker/__pycache__/models.cpython-34.pyc create mode 100644 tasker/__pycache__/utils.cpython-34.pyc create mode 100644 tasker/__pycache__/views.cpython-34.pyc create mode 100644 tasker/extensions.py create mode 100644 tasker/forms.py create mode 100644 tasker/models.py rename tasker/{tasker/static/.gitkeep => static/.Rhistory} (100%) rename tasker/{tasker/static/main.css => static/.gitkeep} (100%) create mode 100644 tasker/static/app.css create mode 100644 tasker/static/main.css rename tasker/{tasker => }/static/main.js (100%) rename tasker/{tasker => }/static/modernizr.js (100%) rename tasker/{tasker => }/static/normalize.css (100%) create mode 100644 tasker/static/tasker.jpg delete mode 100644 tasker/tasker/__init__.py delete mode 100644 tasker/tasker/extensions.py delete mode 100644 tasker/tasker/forms.py delete mode 100644 tasker/tasker/models.py delete mode 100644 tasker/tasker/templates/layout.html delete mode 100644 tasker/tasker/views.py create mode 100644 tasker/templates/index.html create mode 100644 tasker/templates/layout.html create mode 100644 tasker/templates/login.html create mode 100644 tasker/templates/register.html create mode 100644 tasker/views/__pycache__/api.cpython-34.pyc create mode 100644 tasker/views/__pycache__/links.cpython-34.pyc create mode 100644 tasker/views/__pycache__/tasks.cpython-34.pyc create mode 100644 tasker/views/__pycache__/users.cpython-34.pyc create mode 100644 tasker/views/tasks.py create mode 100644 tasker/views/users.py rename {tasker/tests => tests}/__init__.py (100%) diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..b3c7363 --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: gunicorn manager:app --log-file=- diff --git a/tasker/manage.py b/manage.py similarity index 51% rename from tasker/manage.py rename to manage.py index 5119641..35d5745 100644 --- a/tasker/manage.py +++ b/manage.py @@ -1,12 +1,19 @@ #!/usr/bin/env python import os +import csv +import random + +from faker import Factory +from datetime import datetime from flask.ext.script import Manager, Shell, Server from flask.ext.migrate import MigrateCommand from flask.ext.script.commands import ShowUrls, Clean -from tasker import create_app, db +from tasker import create_app, db, models +HERE = os.path.abspath(os.path.dirname(__file__)) +TEST_PATH = os.path.join(HERE, 'tests') app = create_app() manager = Manager(app) @@ -21,8 +28,20 @@ def make_shell_context(): """ Creates a python REPL with several default imports in the context of the app """ - - return dict(app=app, db=db) + return dict(app=app, + db=db, + AppUser=models.AppUser, + stat=models.stat, + stat_track=models.stat_track + ) + + +@manager.command +def test(): + """Run the tests.""" + import pytest + exit_code = pytest.main([TEST_PATH, '--verbose']) + return exit_code if __name__ == '__main__': diff --git a/migrations/README b/migrations/README new file mode 100755 index 0000000..98e4f9c --- /dev/null +++ b/migrations/README @@ -0,0 +1 @@ +Generic single-database configuration. \ No newline at end of file diff --git a/migrations/__pycache__/env.cpython-34.pyc b/migrations/__pycache__/env.cpython-34.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1c06f03a10a0ab6bc98671b13d3fe66a6eca9daf GIT binary patch literal 1797 zcmZuxOK;>v5U#f8>3L@IV0lT+DU1ZeA3$i6Y!Hz`w0W#{nTzGvJu~*&?V-D!mv$wj zaN)%7;HMz2oP6cP1@4@vYEL#<7Hhhu>(NzRRbSU%-JbW`4}YJ@7Qi3y;H%;OF)sZ( zk_dkcQhM*TC)_`fFlGY$?Le_$53z%>rX~VP)q6MN2 zi3hhUUv)@3kac0&MJv?wAZmcw0!-H- z>Oj=B`wgIAn{W%Deg&~k8z!3|Hta6y!RfgFCuRm?R`xGrv+%VEjL3vEC~1bdG~&vP zopL1PJeIc^kXCjAYoL0EW&GK z9Y|a%|0}>;7$d$$S^Yc!%hYX(&m$L(Um!Uh*MhIn=}94Z6)VoA=CS14`D~VAZreP| zBQfzjj^EiL*1XEIP(pLF5X4e7IMs*4qdCRUpYCDj`}Z!t#pOp2asNMwQMYvn8jB&od?ghY|}FjQ*>2& z_dd#j36yQJFhLZU;Aq@aG%ZyJN!cNluELe0s_lL(<2#wElU3`eNYkh2-i{i&oyCdj zk)JIh)F?F|+j^MhTHq*ZRHI03l8T^Fku@^f{4XMG9Y05veuM;?E*r51>pET5#{Z`4 zvL4%T)W@hh8gG@J@6QT@FW&bR;iPN^smRXbu)?o*UzaLZ%3|72^EqO9KB>}F4HQ;Y z7_Jhh0qM&i6J>pdg?y=+N$R?OLxfWFN8hW_Q$m)McLYFRowSG5`Po literal 0 HcmV?d00001 diff --git a/migrations/alembic.ini b/migrations/alembic.ini new file mode 100644 index 0000000..f8ed480 --- /dev/null +++ b/migrations/alembic.ini @@ -0,0 +1,45 @@ +# A generic, single database configuration. + +[alembic] +# template used to generate migration files +# file_template = %%(rev)s_%%(slug)s + +# set to 'true' to run the environment during +# the 'revision' command, regardless of autogenerate +# revision_environment = false + + +# Logging configuration +[loggers] +keys = root,sqlalchemy,alembic + +[handlers] +keys = console + +[formatters] +keys = generic + +[logger_root] +level = WARN +handlers = console +qualname = + +[logger_sqlalchemy] +level = WARN +handlers = +qualname = sqlalchemy.engine + +[logger_alembic] +level = INFO +handlers = +qualname = alembic + +[handler_console] +class = StreamHandler +args = (sys.stderr,) +level = NOTSET +formatter = generic + +[formatter_generic] +format = %(levelname)-5.5s [%(name)s] %(message)s +datefmt = %H:%M:%S diff --git a/migrations/env.py b/migrations/env.py new file mode 100644 index 0000000..70961ce --- /dev/null +++ b/migrations/env.py @@ -0,0 +1,73 @@ +from __future__ import with_statement +from alembic import context +from sqlalchemy import engine_from_config, pool +from logging.config import fileConfig + +# this is the Alembic Config object, which provides +# access to the values within the .ini file in use. +config = context.config + +# Interpret the config file for Python logging. +# This line sets up loggers basically. +fileConfig(config.config_file_name) + +# add your model's MetaData object here +# for 'autogenerate' support +# from myapp import mymodel +# target_metadata = mymodel.Base.metadata +from flask import current_app +config.set_main_option('sqlalchemy.url', current_app.config.get('SQLALCHEMY_DATABASE_URI')) +target_metadata = current_app.extensions['migrate'].db.metadata + +# other values from the config, defined by the needs of env.py, +# can be acquired: +# my_important_option = config.get_main_option("my_important_option") +# ... etc. + +def run_migrations_offline(): + """Run migrations in 'offline' mode. + + This configures the context with just a URL + and not an Engine, though an Engine is acceptable + here as well. By skipping the Engine creation + we don't even need a DBAPI to be available. + + Calls to context.execute() here emit the given string to the + script output. + + """ + url = config.get_main_option("sqlalchemy.url") + context.configure(url=url) + + with context.begin_transaction(): + context.run_migrations() + +def run_migrations_online(): + """Run migrations in 'online' mode. + + In this scenario we need to create an Engine + and associate a connection with the context. + + """ + engine = engine_from_config( + config.get_section(config.config_ini_section), + prefix='sqlalchemy.', + poolclass=pool.NullPool) + + connection = engine.connect() + context.configure( + connection=connection, + target_metadata=target_metadata + ) + + try: + with context.begin_transaction(): + context.run_migrations() + finally: + connection.close() + +if context.is_offline_mode(): + run_migrations_offline() +else: + run_migrations_online() + diff --git a/migrations/script.py.mako b/migrations/script.py.mako new file mode 100755 index 0000000..9570201 --- /dev/null +++ b/migrations/script.py.mako @@ -0,0 +1,22 @@ +"""${message} + +Revision ID: ${up_revision} +Revises: ${down_revision} +Create Date: ${create_date} + +""" + +# revision identifiers, used by Alembic. +revision = ${repr(up_revision)} +down_revision = ${repr(down_revision)} + +from alembic import op +import sqlalchemy as sa +${imports if imports else ""} + +def upgrade(): + ${upgrades if upgrades else "pass"} + + +def downgrade(): + ${downgrades if downgrades else "pass"} diff --git a/migrations/versions/20d4a510108_.py b/migrations/versions/20d4a510108_.py new file mode 100644 index 0000000..22fb0c8 --- /dev/null +++ b/migrations/versions/20d4a510108_.py @@ -0,0 +1,33 @@ +"""empty message + +Revision ID: 20d4a510108 +Revises: None +Create Date: 2015-02-26 15:30:50.059246 + +""" + +# revision identifiers, used by Alembic. +revision = '20d4a510108' +down_revision = None + +from alembic import op +import sqlalchemy as sa + + +def upgrade(): + ### commands auto generated by Alembic - please adjust! ### + op.create_table('app_user', + sa.Column('id', sa.Integer(), nullable=False), + sa.Column('name', sa.String(length=255), nullable=False), + sa.Column('email', sa.String(length=255), nullable=False), + sa.Column('encrypted_password', sa.String(length=60), nullable=True), + sa.PrimaryKeyConstraint('id'), + sa.UniqueConstraint('email') + ) + ### end Alembic commands ### + + +def downgrade(): + ### commands auto generated by Alembic - please adjust! ### + op.drop_table('app_user') + ### end Alembic commands ### diff --git a/migrations/versions/__pycache__/20d4a510108_.cpython-34.pyc b/migrations/versions/__pycache__/20d4a510108_.cpython-34.pyc new file mode 100644 index 0000000000000000000000000000000000000000..de05cb7c709484d4f45e979fe27408c155317475 GIT binary patch literal 974 zcmah{L2uJA6n=5rB+XJZV2A?}D#sqSq-C9;nh;Vaq=8fr+c@+Rd9~GLBu-|h8`+Wa zUl4!ES5CdaoeR7q?N%ftocQV4{`}tizULoq%ensi^Y}vz;5)1hg8oaK>NOe$Fh*;@ z*Z@XgOn}vZ)gh`uT!(QTjABh7YQWe8)&OS07rbKu!{07_y8s+@n%4o3(=2btTq!!` zj`N;hhAK=%`|x1U?)hw&_Pc)9e^woEHE53#!JVPxG~?|9GzF~N-}Zaky}fp~KX~d7 z`u>jJf8N{ObDZ(UT9DBK%ZHAkNs>+qcQqVzhB(z%G#S7-GBY3}a9%PgoI1>rbV+nh zjO9_I#FPw?+q`0q$QywDKR|O0;H)BStRkR%1m;yGrFQ7gEldL_o;%VuP19hexYQ(M z+7`1YqNfpmrR##mT$>RW)9h^V8(HZFk7*d`dt6Lpo@Sf{DOKt!k!-P#=f@pe7H!t< zq|`RZib$F$s?A{%&0?XgLy_?*CNqyR8H%aidMCq}%KQz_hlx;`q@l?4=7|U|X8d;N z8_4?@xir7tdM8+~@~EJEa>g&Yl%W^OMC4R5Pf@{6lTTho)kiM9IGjqF;d4+P0*iN{ zytRG?J87=1S&AUW?_vsd2Mv&>@yK{mey$-O;LcyoE?Ab$E^gd38w&n6&>sEmeZk85}czha8 tmdVsbL?e_X&SeWjl*O09{+Zj}j}tbF_zMfM%0*+=Ov5CbhFf!6e*mX%<~9HT literal 0 HcmV?d00001 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..f6b9b0f --- /dev/null +++ b/requirements.txt @@ -0,0 +1,53 @@ +# Included because many Paas's require a requirements.txt file in the project root +# Just installs the production requirements. + + +# Everything needed in production + +## Flask +Flask==0.10.1 +MarkupSafe==0.23 +Werkzeug==0.10.1 +Jinja2==2.7.3 +itsdangerous==0.24 + +## Database +Flask-SQLAlchemy==2.0 +SQLAlchemy==0.9.8 + +## Migrations +Flask-Migrate==1.3.0 + +## Forms +Flask-WTF==0.11 +WTForms==2.0.2 + +## Login and users +Flask-Login==0.2.11 +Flask-Bcrypt==0.6.2 + +## Management script +Flask-Script==2.0.5 + +## Config +flask-appconfig==0.9.1 + +## Heroku +gunicorn==19.2.1 +psycopg2==2.6 + +# Everything the developer needs in addition to the production requirements + +Flask-DebugToolbar==0.9.1 + +## Testing +pytest>=2.6.4 +webtest + +hashids +matplotlib + + +static3==0.5.1 + +requests==2.3.0 diff --git a/requirements/dev.txt b/requirements/dev.txt new file mode 100644 index 0000000..0f9e9b7 --- /dev/null +++ b/requirements/dev.txt @@ -0,0 +1,9 @@ +# Everything the developer needs in addition to the production requirements +-r prod.txt + +# Testing +pytest>=2.6.3 +webtest + +# Management script +Flask-Script diff --git a/tasker/requirements.txt b/requirements/prod.txt similarity index 71% rename from tasker/requirements.txt rename to requirements/prod.txt index d9f3861..c83e81f 100644 --- a/tasker/requirements.txt +++ b/requirements/prod.txt @@ -18,12 +18,5 @@ Flask-Migrate==1.3.0 Flask-WTF==0.10.3 WTForms==2.0.1 -## Config -flask-appconfig==0.9.1 - -# Testing -pytest>=2.6.3 -webtest - -# Management script -Flask-Script +# Debug toolbar +Flask-DebugToolbar==0.9.1 diff --git a/runtime.txt b/runtime.txt new file mode 100644 index 0000000..bc42bd0 --- /dev/null +++ b/runtime.txt @@ -0,0 +1 @@ +python-3.4.2 diff --git a/tasker/.gitignore b/tasker/.gitignore deleted file mode 100644 index e57a07f..0000000 --- a/tasker/.gitignore +++ /dev/null @@ -1,49 +0,0 @@ -*.py[cod] - -# C extensions -*.so - -# Packages -*.egg -*.egg-info -build -eggs -parts -bin -var -sdist -develop-eggs -.installed.cfg -lib -lib64 - -# Installer logs -pip-log.txt - -# Unit test / coverage reports -.coverage -.tox -nosetests.xml - -# Translations -*.mo - -# Mr Developer -.mr.developer.cfg -.project -.pydevproject - -# Complexity -output/*.html -output/*/index.html - -# Sphinx -docs/_build - -.webassets-cache - -.idea - -# Virtualenvs -env -.python-version diff --git a/tasker/README.md b/tasker/README.md deleted file mode 100644 index 38b655e..0000000 --- a/tasker/README.md +++ /dev/null @@ -1,56 +0,0 @@ -# tasker - - -Quickstart ----------- - -Run the following commands to bootstrap your environment. - - -``` -cd tasker -pip install -r requirements.txt -python manage.py db init -python manage.py server -``` - - -Deployment ----------- - -In your production environment, make sure you have an application.cfg -file in your instance directory. - - -Shell ------ - -To open the interactive shell, run: - - python manage.py shell - -By default, you will have access to `app` and `db`. - - -Running Tests -------------- - -To run all tests, run: - - python manage.py test - - -Migrations ----------- - -Whenever a database migration needs to be made, run the following commmand: - - python manage.py db migrate - -This will generate a new migration script. Then run: - - python manage.py db upgrade - -to apply the migration. - -For a full migration command reference, run `python manage.py db --help`. diff --git a/tasker/__init__.py b/tasker/__init__.py new file mode 100644 index 0000000..7e318e7 --- /dev/null +++ b/tasker/__init__.py @@ -0,0 +1,35 @@ +from flask import Flask +from flask_wtf.csrf import CsrfProtect +from .extensions import ( + db, + migrate, + debug_toolbar, + bcrypt, + login_manager, + config +) + +from . import models +from .views.users import usersb +from .views.tasks import tasksb +#from .views.api import api + +SQLALCHEMY_DATABASE_URI = "postgres://localhost/tasker" +DEBUG = True +SECRET_KEY = 'development-key' +DEBUG_TB_INTERCEPT_REDIRECTS = False + +def create_app(): + app = Flask("tasker") + app.config.from_object(__name__) + app.register_blueprint(usersb) + app.register_blueprint(tasksb) +# app.register_blueprint(api, url_prefix="/urly_bird/api/V1") + config.init_app(app) + db.init_app(app) + debug_toolbar.init_app(app) + migrate.init_app(app, db) + bcrypt.init_app(app) + login_manager.init_app(app) + login_manager.login_view = "users.login" + return app diff --git a/tasker/__pycache__/__init__.cpython-34.pyc b/tasker/__pycache__/__init__.cpython-34.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4ee655a43b0c92bb173b5392eefed7e59d1f8d48 GIT binary patch literal 1076 zcmYjP&2G~`5FW>kllUhMr7cMC0y&V}5voX27b;3slJwA((8`WCsavld?QYtpf>VJf z;2Ds3C0{x90(VZ#Zdw%EJDzWMc6PsS=C>cX-@g7CeY637!OBxX|1}Qz15JXT1sMRh zfLLH@T!E|t+y-JJwjo)AYz=r7NENsP!~tFdQUhKGQU~4u(g5xPahK6m$UNXa5Pyjs z$O7O^Ak8JNLADOO1*C--Q#^tMQ*1zjDIP=O0ojDaha`Y60Avf2CJfu_cX(H5TV-`W zi{u45USEpIu_zQ9t2;|CI%Oq^%NkFoB2ugj5*E*=R24-QN1}A%u~^Jh8DzyY%_)!a zXv%PUT;!850G3$!Km(m~*tUzEh?ujl#7YoJ4XQ;3cX*U%`zKBH9l~JC=#r1s+9)6UX6KQ9* zDBZDO*a!OfZOkX1q5;ddT2^2M6&&~)-)dMwM;x`c%j!h8m*GvC#-~?m(ivl~30=t2 zW!H-3GA(ksBxU#*X8%bo6$9bn2I6UIvSV~L(mc$V)-pPgC&Leiy~F<7@ck*>>y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>rrgv1=-W;nQqN|-Cs}to{Wd{pZ<9Dr$_V~^_~FwbByL^ z2!X#tC6RI{bx66Cx}-cxJ#vIg!lTkB6;K* z4vO zNE6&FrCu5DLbf>BEyORR_wdf2eHH`h|H zU#bSI=4i1paardgTVjU+17Squ>PL`sR@YAm4n(a|sqXAK=o%QSOO}vqj!C-_=@h<$%V#Z8cQCk>$CivJ?A! zVgmcdpI16&oY(I>)WcEVVQy)I7r%K}ARj_`<8V1;sIIQGZ2EY`V`#RHk=}I;$9Gam#rWejSYe; zvAY>S&6fiaxE*k>!~6(EKfm7KvVb+m{(w+Fh5k0Uo$Zg_hs!#{2kQ)PyKIrY$uVDC z(0qkV+v|(sWU^n!$9yTDe*eQW^oH=f)+%pJAXQ$JQ^zLmZA4L)X}Qo@_N0epvc|GD zo=o=)JgZ#EEHlF_!%be6tS4D^v&_rRq8XqGU)1GNRc7#Y)k^d*&1g+{+UlaZFh0BL zPqAdPr9WWpBld_Ex?V`#uDaBH%!bccaKGsZu1kA`5-1JN66XnipE&QjiI@1hkk)=O z-8W=0S;{mQg4sPU(UXqkZF^)pt>zw+4!GXXQf)gj!{(;UOAw(}I)YipEciG*WHEv; uBko=q_c4UX^Ekvf1cmJ+@2Mg zPj?wUX`Gr{6EyoYBns!VsdB>zEQ9#8`Cbx-)gm! z8CGcr1mMT)kVVW4iJuj*&#Fqcbye+t;iey?5B5U#;3*aO!RvV|ms-6E^V%RhWkdcS D*YJ_+ literal 0 HcmV?d00001 diff --git a/tasker/__pycache__/views.cpython-34.pyc b/tasker/__pycache__/views.cpython-34.pyc new file mode 100644 index 0000000000000000000000000000000000000000..656c213d43626ee6dc1b199e997a8d7d1ef72b5a GIT binary patch literal 7666 zcmbVROLH7o6+YcPZ;hnUE4Cur87B~BoOt9Uj)5QyA&J2dlzHc-Wa1uIspsG^DmSpr2B1xr@9*s)>(KOifj$eu|D>s(BJy9tm)Z`IkN*}$L@|*|WO3Q1$fDRL*EVH`B8TDv zxdl@$P*kM2L~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z_|!yRjC*;iQXJywQk>vvA~ms?L{#jv>!R5plN(;Y6R}u#0dM_muTi*z2Y1f7CG%Uc znh@J_6u}SUc)ov0rcv;r1M#y=z;z9^@^mEc9TH`N z4{@L?o7n##3a&HQ(oG}{c<~LVZ9NNpoI`q!%htRzUtTG$RqNJDX{~hDT3KGNA)Q}u RtTon4>nrur+Tz;We*w-16#f7J literal 0 HcmV?d00001 diff --git a/tasker/extensions.py b/tasker/extensions.py new file mode 100644 index 0000000..7f391fa --- /dev/null +++ b/tasker/extensions.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +"""Extensions module.""" + +from flask.ext.sqlalchemy import SQLAlchemy +db = SQLAlchemy() + +from flask.ext.migrate import Migrate +migrate = Migrate() + +from flask.ext.debugtoolbar import DebugToolbarExtension +debug_toolbar = DebugToolbarExtension() + +from flask.ext.bcrypt import Bcrypt +bcrypt = Bcrypt() + +from flask.ext.login import LoginManager +login_manager = LoginManager() + +from flask.ext.appconfig import HerokuConfig +config = HerokuConfig() diff --git a/tasker/forms.py b/tasker/forms.py new file mode 100644 index 0000000..9691ed4 --- /dev/null +++ b/tasker/forms.py @@ -0,0 +1,21 @@ +from flask_wtf import Form +from wtforms import StringField, PasswordField +from wtforms.fields.html5 import EmailField, URLField, IntegerField +from wtforms.validators import DataRequired, Email, EqualTo + + + +class LoginForm(Form): + email = StringField('Email', validators=[DataRequired(), Email()]) + password = PasswordField('Password', validators=[DataRequired()]) + + +class RegistrationForm(Form): + name = StringField('Name', validators=[DataRequired()]) + email = EmailField('Email', validators=[DataRequired(), Email()]) + password = PasswordField( + 'Password', + validators=[DataRequired(), + EqualTo('password_verification', + message="Passwords must match")]) + password_verification = PasswordField('Repeat password') diff --git a/tasker/models.py b/tasker/models.py new file mode 100644 index 0000000..8759f35 --- /dev/null +++ b/tasker/models.py @@ -0,0 +1,31 @@ +from . import db, bcrypt, login_manager +from flask.ext.login import UserMixin +from hashids import Hashids +from sqlalchemy import func, and_ +from datetime import date, timedelta, datetime + +@login_manager.user_loader +def load_user(id): + return AppUser.query.get(id) + + +class AppUser(db.Model, UserMixin): + id = db.Column(db.Integer, primary_key=True, autoincrement=True) + name = db.Column(db.String(255), nullable=False) + email = db.Column(db.String(255), unique=True, nullable=False) + encrypted_password = db.Column(db.String(60)) + + def get_password(self): + return getattr(self, "_password", None) + + def set_password(self, password): + self._password = password + self.encrypted_password = bcrypt.generate_password_hash(password) + + password = property(get_password, set_password) + + def check_password(self, password): + return bcrypt.check_password_hash(self.encrypted_password, password) + + def __repr__(self): + return "".format(self.email) diff --git a/tasker/tasker/static/.gitkeep b/tasker/static/.Rhistory similarity index 100% rename from tasker/tasker/static/.gitkeep rename to tasker/static/.Rhistory diff --git a/tasker/tasker/static/main.css b/tasker/static/.gitkeep similarity index 100% rename from tasker/tasker/static/main.css rename to tasker/static/.gitkeep diff --git a/tasker/static/app.css b/tasker/static/app.css new file mode 100644 index 0000000..f63e314 --- /dev/null +++ b/tasker/static/app.css @@ -0,0 +1,6201 @@ +meta.foundation-version { + font-family: "/5.5.1/"; } + +meta.foundation-mq-small { + font-family: "/only screen/"; + width: 0; } + +meta.foundation-mq-small-only { + font-family: "/only screen and (max-width: 40em)/"; + width: 0; } + +meta.foundation-mq-medium { + font-family: "/only screen and (min-width:40.063em)/"; + width: 40.063em; } + +meta.foundation-mq-medium-only { + font-family: "/only screen and (min-width:40.063em) and (max-width:64em)/"; + width: 40.063em; } + +meta.foundation-mq-large { + font-family: "/only screen and (min-width:64.063em)/"; + width: 64.063em; } + +meta.foundation-mq-large-only { + font-family: "/only screen and (min-width:64.063em) and (max-width:90em)/"; + width: 64.063em; } + +meta.foundation-mq-xlarge { + font-family: "/only screen and (min-width:90.063em)/"; + width: 90.063em; } + +meta.foundation-mq-xlarge-only { + font-family: "/only screen and (min-width:90.063em) and (max-width:120em)/"; + width: 90.063em; } + +meta.foundation-mq-xxlarge { + font-family: "/only screen and (min-width:120.063em)/"; + width: 120.063em; } + +meta.foundation-data-attribute-namespace { + font-family: false; } + +html, body { + height: 100%; } + +*, +*:before, +*:after { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } + +html, +body { + font-size: 100%; } + +body { + background: #fff; + color: #222; + padding: 0; + margin: 0; + font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; + font-weight: normal; + font-style: normal; + line-height: 1.5; + position: relative; + cursor: auto; } + +a:hover { + cursor: pointer; } + +img { + max-width: 100%; + height: auto; } + +img { + -ms-interpolation-mode: bicubic; } + +#map_canvas img, +#map_canvas embed, +#map_canvas object, +.map_canvas img, +.map_canvas embed, +.map_canvas object { + max-width: none !important; } + +.left { + float: left !important; } + +.right { + float: right !important; } + +.clearfix:before, .clearfix:after { + content: " "; + display: table; } +.clearfix:after { + clear: both; } + +.hide { + display: none; } + +.invisible { + visibility: hidden; } + +.antialiased { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; } + +img { + display: inline-block; + vertical-align: middle; } + +textarea { + height: auto; + min-height: 50px; } + +select { + width: 100%; } + +.row { + width: 100%; + margin-left: auto; + margin-right: auto; + margin-top: 0; + margin-bottom: 0; + max-width: 62.5rem; } + .row:before, .row:after { + content: " "; + display: table; } + .row:after { + clear: both; } + .row.collapse > .column, + .row.collapse > .columns { + padding-left: 0; + padding-right: 0; } + .row.collapse .row { + margin-left: 0; + margin-right: 0; } + .row .row { + width: auto; + margin-left: -0.9375rem; + margin-right: -0.9375rem; + margin-top: 0; + margin-bottom: 0; + max-width: none; } + .row .row:before, .row .row:after { + content: " "; + display: table; } + .row .row:after { + clear: both; } + .row .row.collapse { + width: auto; + margin: 0; + max-width: none; } + .row .row.collapse:before, .row .row.collapse:after { + content: " "; + display: table; } + .row .row.collapse:after { + clear: both; } + +.column, +.columns { + padding-left: 0.9375rem; + padding-right: 0.9375rem; + width: 100%; + float: left; } + +[class*="column"] + [class*="column"]:last-child { + float: right; } + +[class*="column"] + [class*="column"].end { + float: left; } + +@media only screen { + .small-push-0 { + position: relative; + left: 0%; + right: auto; } + + .small-pull-0 { + position: relative; + right: 0%; + left: auto; } + + .small-push-1 { + position: relative; + left: 8.33333%; + right: auto; } + + .small-pull-1 { + position: relative; + right: 8.33333%; + left: auto; } + + .small-push-2 { + position: relative; + left: 16.66667%; + right: auto; } + + .small-pull-2 { + position: relative; + right: 16.66667%; + left: auto; } + + .small-push-3 { + position: relative; + left: 25%; + right: auto; } + + .small-pull-3 { + position: relative; + right: 25%; + left: auto; } + + .small-push-4 { + position: relative; + left: 33.33333%; + right: auto; } + + .small-pull-4 { + position: relative; + right: 33.33333%; + left: auto; } + + .small-push-5 { + position: relative; + left: 41.66667%; + right: auto; } + + .small-pull-5 { + position: relative; + right: 41.66667%; + left: auto; } + + .small-push-6 { + position: relative; + left: 50%; + right: auto; } + + .small-pull-6 { + position: relative; + right: 50%; + left: auto; } + + .small-push-7 { + position: relative; + left: 58.33333%; + right: auto; } + + .small-pull-7 { + position: relative; + right: 58.33333%; + left: auto; } + + .small-push-8 { + position: relative; + left: 66.66667%; + right: auto; } + + .small-pull-8 { + position: relative; + right: 66.66667%; + left: auto; } + + .small-push-9 { + position: relative; + left: 75%; + right: auto; } + + .small-pull-9 { + position: relative; + right: 75%; + left: auto; } + + .small-push-10 { + position: relative; + left: 83.33333%; + right: auto; } + + .small-pull-10 { + position: relative; + right: 83.33333%; + left: auto; } + + .small-push-11 { + position: relative; + left: 91.66667%; + right: auto; } + + .small-pull-11 { + position: relative; + right: 91.66667%; + left: auto; } + + .column, + .columns { + position: relative; + padding-left: 0.9375rem; + padding-right: 0.9375rem; + float: left; } + + .small-1 { + width: 8.33333%; } + + .small-2 { + width: 16.66667%; } + + .small-3 { + width: 25%; } + + .small-4 { + width: 33.33333%; } + + .small-5 { + width: 41.66667%; } + + .small-6 { + width: 50%; } + + .small-7 { + width: 58.33333%; } + + .small-8 { + width: 66.66667%; } + + .small-9 { + width: 75%; } + + .small-10 { + width: 83.33333%; } + + .small-11 { + width: 91.66667%; } + + .small-12 { + width: 100%; } + + .small-offset-0 { + margin-left: 0% !important; } + + .small-offset-1 { + margin-left: 8.33333% !important; } + + .small-offset-2 { + margin-left: 16.66667% !important; } + + .small-offset-3 { + margin-left: 25% !important; } + + .small-offset-4 { + margin-left: 33.33333% !important; } + + .small-offset-5 { + margin-left: 41.66667% !important; } + + .small-offset-6 { + margin-left: 50% !important; } + + .small-offset-7 { + margin-left: 58.33333% !important; } + + .small-offset-8 { + margin-left: 66.66667% !important; } + + .small-offset-9 { + margin-left: 75% !important; } + + .small-offset-10 { + margin-left: 83.33333% !important; } + + .small-offset-11 { + margin-left: 91.66667% !important; } + + .small-reset-order { + margin-left: 0; + margin-right: 0; + left: auto; + right: auto; + float: left; } + + .column.small-centered, + .columns.small-centered { + margin-left: auto; + margin-right: auto; + float: none; } + + .column.small-uncentered, + .columns.small-uncentered { + margin-left: 0; + margin-right: 0; + float: left; } + + .column.small-centered:last-child, + .columns.small-centered:last-child { + float: none; } + + .column.small-uncentered:last-child, + .columns.small-uncentered:last-child { + float: left; } + + .column.small-uncentered.opposite, + .columns.small-uncentered.opposite { + float: right; } + + .row.small-collapse > .column, + .row.small-collapse > .columns { + padding-left: 0; + padding-right: 0; } + .row.small-collapse .row { + margin-left: 0; + margin-right: 0; } + .row.small-uncollapse > .column, + .row.small-uncollapse > .columns { + padding-left: 0.9375rem; + padding-right: 0.9375rem; + float: left; } } +@media only screen and (min-width: 40.063em) { + .medium-push-0 { + position: relative; + left: 0%; + right: auto; } + + .medium-pull-0 { + position: relative; + right: 0%; + left: auto; } + + .medium-push-1 { + position: relative; + left: 8.33333%; + right: auto; } + + .medium-pull-1 { + position: relative; + right: 8.33333%; + left: auto; } + + .medium-push-2 { + position: relative; + left: 16.66667%; + right: auto; } + + .medium-pull-2 { + position: relative; + right: 16.66667%; + left: auto; } + + .medium-push-3 { + position: relative; + left: 25%; + right: auto; } + + .medium-pull-3 { + position: relative; + right: 25%; + left: auto; } + + .medium-push-4 { + position: relative; + left: 33.33333%; + right: auto; } + + .medium-pull-4 { + position: relative; + right: 33.33333%; + left: auto; } + + .medium-push-5 { + position: relative; + left: 41.66667%; + right: auto; } + + .medium-pull-5 { + position: relative; + right: 41.66667%; + left: auto; } + + .medium-push-6 { + position: relative; + left: 50%; + right: auto; } + + .medium-pull-6 { + position: relative; + right: 50%; + left: auto; } + + .medium-push-7 { + position: relative; + left: 58.33333%; + right: auto; } + + .medium-pull-7 { + position: relative; + right: 58.33333%; + left: auto; } + + .medium-push-8 { + position: relative; + left: 66.66667%; + right: auto; } + + .medium-pull-8 { + position: relative; + right: 66.66667%; + left: auto; } + + .medium-push-9 { + position: relative; + left: 75%; + right: auto; } + + .medium-pull-9 { + position: relative; + right: 75%; + left: auto; } + + .medium-push-10 { + position: relative; + left: 83.33333%; + right: auto; } + + .medium-pull-10 { + position: relative; + right: 83.33333%; + left: auto; } + + .medium-push-11 { + position: relative; + left: 91.66667%; + right: auto; } + + .medium-pull-11 { + position: relative; + right: 91.66667%; + left: auto; } + + .column, + .columns { + position: relative; + padding-left: 0.9375rem; + padding-right: 0.9375rem; + float: left; } + + .medium-1 { + width: 8.33333%; } + + .medium-2 { + width: 16.66667%; } + + .medium-3 { + width: 25%; } + + .medium-4 { + width: 33.33333%; } + + .medium-5 { + width: 41.66667%; } + + .medium-6 { + width: 50%; } + + .medium-7 { + width: 58.33333%; } + + .medium-8 { + width: 66.66667%; } + + .medium-9 { + width: 75%; } + + .medium-10 { + width: 83.33333%; } + + .medium-11 { + width: 91.66667%; } + + .medium-12 { + width: 100%; } + + .medium-offset-0 { + margin-left: 0% !important; } + + .medium-offset-1 { + margin-left: 8.33333% !important; } + + .medium-offset-2 { + margin-left: 16.66667% !important; } + + .medium-offset-3 { + margin-left: 25% !important; } + + .medium-offset-4 { + margin-left: 33.33333% !important; } + + .medium-offset-5 { + margin-left: 41.66667% !important; } + + .medium-offset-6 { + margin-left: 50% !important; } + + .medium-offset-7 { + margin-left: 58.33333% !important; } + + .medium-offset-8 { + margin-left: 66.66667% !important; } + + .medium-offset-9 { + margin-left: 75% !important; } + + .medium-offset-10 { + margin-left: 83.33333% !important; } + + .medium-offset-11 { + margin-left: 91.66667% !important; } + + .medium-reset-order { + margin-left: 0; + margin-right: 0; + left: auto; + right: auto; + float: left; } + + .column.medium-centered, + .columns.medium-centered { + margin-left: auto; + margin-right: auto; + float: none; } + + .column.medium-uncentered, + .columns.medium-uncentered { + margin-left: 0; + margin-right: 0; + float: left; } + + .column.medium-centered:last-child, + .columns.medium-centered:last-child { + float: none; } + + .column.medium-uncentered:last-child, + .columns.medium-uncentered:last-child { + float: left; } + + .column.medium-uncentered.opposite, + .columns.medium-uncentered.opposite { + float: right; } + + .row.medium-collapse > .column, + .row.medium-collapse > .columns { + padding-left: 0; + padding-right: 0; } + .row.medium-collapse .row { + margin-left: 0; + margin-right: 0; } + .row.medium-uncollapse > .column, + .row.medium-uncollapse > .columns { + padding-left: 0.9375rem; + padding-right: 0.9375rem; + float: left; } + + .push-0 { + position: relative; + left: 0%; + right: auto; } + + .pull-0 { + position: relative; + right: 0%; + left: auto; } + + .push-1 { + position: relative; + left: 8.33333%; + right: auto; } + + .pull-1 { + position: relative; + right: 8.33333%; + left: auto; } + + .push-2 { + position: relative; + left: 16.66667%; + right: auto; } + + .pull-2 { + position: relative; + right: 16.66667%; + left: auto; } + + .push-3 { + position: relative; + left: 25%; + right: auto; } + + .pull-3 { + position: relative; + right: 25%; + left: auto; } + + .push-4 { + position: relative; + left: 33.33333%; + right: auto; } + + .pull-4 { + position: relative; + right: 33.33333%; + left: auto; } + + .push-5 { + position: relative; + left: 41.66667%; + right: auto; } + + .pull-5 { + position: relative; + right: 41.66667%; + left: auto; } + + .push-6 { + position: relative; + left: 50%; + right: auto; } + + .pull-6 { + position: relative; + right: 50%; + left: auto; } + + .push-7 { + position: relative; + left: 58.33333%; + right: auto; } + + .pull-7 { + position: relative; + right: 58.33333%; + left: auto; } + + .push-8 { + position: relative; + left: 66.66667%; + right: auto; } + + .pull-8 { + position: relative; + right: 66.66667%; + left: auto; } + + .push-9 { + position: relative; + left: 75%; + right: auto; } + + .pull-9 { + position: relative; + right: 75%; + left: auto; } + + .push-10 { + position: relative; + left: 83.33333%; + right: auto; } + + .pull-10 { + position: relative; + right: 83.33333%; + left: auto; } + + .push-11 { + position: relative; + left: 91.66667%; + right: auto; } + + .pull-11 { + position: relative; + right: 91.66667%; + left: auto; } } +@media only screen and (min-width: 64.063em) { + .large-push-0 { + position: relative; + left: 0%; + right: auto; } + + .large-pull-0 { + position: relative; + right: 0%; + left: auto; } + + .large-push-1 { + position: relative; + left: 8.33333%; + right: auto; } + + .large-pull-1 { + position: relative; + right: 8.33333%; + left: auto; } + + .large-push-2 { + position: relative; + left: 16.66667%; + right: auto; } + + .large-pull-2 { + position: relative; + right: 16.66667%; + left: auto; } + + .large-push-3 { + position: relative; + left: 25%; + right: auto; } + + .large-pull-3 { + position: relative; + right: 25%; + left: auto; } + + .large-push-4 { + position: relative; + left: 33.33333%; + right: auto; } + + .large-pull-4 { + position: relative; + right: 33.33333%; + left: auto; } + + .large-push-5 { + position: relative; + left: 41.66667%; + right: auto; } + + .large-pull-5 { + position: relative; + right: 41.66667%; + left: auto; } + + .large-push-6 { + position: relative; + left: 50%; + right: auto; } + + .large-pull-6 { + position: relative; + right: 50%; + left: auto; } + + .large-push-7 { + position: relative; + left: 58.33333%; + right: auto; } + + .large-pull-7 { + position: relative; + right: 58.33333%; + left: auto; } + + .large-push-8 { + position: relative; + left: 66.66667%; + right: auto; } + + .large-pull-8 { + position: relative; + right: 66.66667%; + left: auto; } + + .large-push-9 { + position: relative; + left: 75%; + right: auto; } + + .large-pull-9 { + position: relative; + right: 75%; + left: auto; } + + .large-push-10 { + position: relative; + left: 83.33333%; + right: auto; } + + .large-pull-10 { + position: relative; + right: 83.33333%; + left: auto; } + + .large-push-11 { + position: relative; + left: 91.66667%; + right: auto; } + + .large-pull-11 { + position: relative; + right: 91.66667%; + left: auto; } + + .column, + .columns { + position: relative; + padding-left: 0.9375rem; + padding-right: 0.9375rem; + float: left; } + + .large-1 { + width: 8.33333%; } + + .large-2 { + width: 16.66667%; } + + .large-3 { + width: 25%; } + + .large-4 { + width: 33.33333%; } + + .large-5 { + width: 41.66667%; } + + .large-6 { + width: 50%; } + + .large-7 { + width: 58.33333%; } + + .large-8 { + width: 66.66667%; } + + .large-9 { + width: 75%; } + + .large-10 { + width: 83.33333%; } + + .large-11 { + width: 91.66667%; } + + .large-12 { + width: 100%; } + + .large-offset-0 { + margin-left: 0% !important; } + + .large-offset-1 { + margin-left: 8.33333% !important; } + + .large-offset-2 { + margin-left: 16.66667% !important; } + + .large-offset-3 { + margin-left: 25% !important; } + + .large-offset-4 { + margin-left: 33.33333% !important; } + + .large-offset-5 { + margin-left: 41.66667% !important; } + + .large-offset-6 { + margin-left: 50% !important; } + + .large-offset-7 { + margin-left: 58.33333% !important; } + + .large-offset-8 { + margin-left: 66.66667% !important; } + + .large-offset-9 { + margin-left: 75% !important; } + + .large-offset-10 { + margin-left: 83.33333% !important; } + + .large-offset-11 { + margin-left: 91.66667% !important; } + + .large-reset-order { + margin-left: 0; + margin-right: 0; + left: auto; + right: auto; + float: left; } + + .column.large-centered, + .columns.large-centered { + margin-left: auto; + margin-right: auto; + float: none; } + + .column.large-uncentered, + .columns.large-uncentered { + margin-left: 0; + margin-right: 0; + float: left; } + + .column.large-centered:last-child, + .columns.large-centered:last-child { + float: none; } + + .column.large-uncentered:last-child, + .columns.large-uncentered:last-child { + float: left; } + + .column.large-uncentered.opposite, + .columns.large-uncentered.opposite { + float: right; } + + .row.large-collapse > .column, + .row.large-collapse > .columns { + padding-left: 0; + padding-right: 0; } + .row.large-collapse .row { + margin-left: 0; + margin-right: 0; } + .row.large-uncollapse > .column, + .row.large-uncollapse > .columns { + padding-left: 0.9375rem; + padding-right: 0.9375rem; + float: left; } + + .push-0 { + position: relative; + left: 0%; + right: auto; } + + .pull-0 { + position: relative; + right: 0%; + left: auto; } + + .push-1 { + position: relative; + left: 8.33333%; + right: auto; } + + .pull-1 { + position: relative; + right: 8.33333%; + left: auto; } + + .push-2 { + position: relative; + left: 16.66667%; + right: auto; } + + .pull-2 { + position: relative; + right: 16.66667%; + left: auto; } + + .push-3 { + position: relative; + left: 25%; + right: auto; } + + .pull-3 { + position: relative; + right: 25%; + left: auto; } + + .push-4 { + position: relative; + left: 33.33333%; + right: auto; } + + .pull-4 { + position: relative; + right: 33.33333%; + left: auto; } + + .push-5 { + position: relative; + left: 41.66667%; + right: auto; } + + .pull-5 { + position: relative; + right: 41.66667%; + left: auto; } + + .push-6 { + position: relative; + left: 50%; + right: auto; } + + .pull-6 { + position: relative; + right: 50%; + left: auto; } + + .push-7 { + position: relative; + left: 58.33333%; + right: auto; } + + .pull-7 { + position: relative; + right: 58.33333%; + left: auto; } + + .push-8 { + position: relative; + left: 66.66667%; + right: auto; } + + .pull-8 { + position: relative; + right: 66.66667%; + left: auto; } + + .push-9 { + position: relative; + left: 75%; + right: auto; } + + .pull-9 { + position: relative; + right: 75%; + left: auto; } + + .push-10 { + position: relative; + left: 83.33333%; + right: auto; } + + .pull-10 { + position: relative; + right: 83.33333%; + left: auto; } + + .push-11 { + position: relative; + left: 91.66667%; + right: auto; } + + .pull-11 { + position: relative; + right: 91.66667%; + left: auto; } } +button, .button { + border-style: solid; + border-width: 0; + cursor: pointer; + font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; + font-weight: normal; + line-height: normal; + margin: 0 0 1.25rem; + position: relative; + text-decoration: none; + text-align: center; + -webkit-appearance: none; + -moz-appearance: none; + border-radius: 0; + display: inline-block; + padding-top: 1rem; + padding-right: 2rem; + padding-bottom: 1.0625rem; + padding-left: 2rem; + font-size: 1rem; + background-color: #008CBA; + border-color: #007095; + color: #FFFFFF; + transition: background-color 300ms ease-out; } + button:hover, button:focus, .button:hover, .button:focus { + background-color: #007095; } + button:hover, button:focus, .button:hover, .button:focus { + color: #FFFFFF; } + button.secondary, .button.secondary { + background-color: #e7e7e7; + border-color: #b9b9b9; + color: #333333; } + button.secondary:hover, button.secondary:focus, .button.secondary:hover, .button.secondary:focus { + background-color: #b9b9b9; } + button.secondary:hover, button.secondary:focus, .button.secondary:hover, .button.secondary:focus { + color: #333333; } + button.success, .button.success { + background-color: #43AC6A; + border-color: #368a55; + color: #FFFFFF; } + button.success:hover, button.success:focus, .button.success:hover, .button.success:focus { + background-color: #368a55; } + button.success:hover, button.success:focus, .button.success:hover, .button.success:focus { + color: #FFFFFF; } + button.alert, .button.alert { + background-color: #f04124; + border-color: #cf2a0e; + color: #FFFFFF; } + button.alert:hover, button.alert:focus, .button.alert:hover, .button.alert:focus { + background-color: #cf2a0e; } + button.alert:hover, button.alert:focus, .button.alert:hover, .button.alert:focus { + color: #FFFFFF; } + button.warning, .button.warning { + background-color: #f08a24; + border-color: #cf6e0e; + color: #FFFFFF; } + button.warning:hover, button.warning:focus, .button.warning:hover, .button.warning:focus { + background-color: #cf6e0e; } + button.warning:hover, button.warning:focus, .button.warning:hover, .button.warning:focus { + color: #FFFFFF; } + button.info, .button.info { + background-color: #a0d3e8; + border-color: #61b6d9; + color: #333333; } + button.info:hover, button.info:focus, .button.info:hover, .button.info:focus { + background-color: #61b6d9; } + button.info:hover, button.info:focus, .button.info:hover, .button.info:focus { + color: #FFFFFF; } + button.large, .button.large { + padding-top: 1.125rem; + padding-right: 2.25rem; + padding-bottom: 1.1875rem; + padding-left: 2.25rem; + font-size: 1.25rem; } + button.small, .button.small { + padding-top: 0.875rem; + padding-right: 1.75rem; + padding-bottom: 0.9375rem; + padding-left: 1.75rem; + font-size: 0.8125rem; } + button.tiny, .button.tiny { + padding-top: 0.625rem; + padding-right: 1.25rem; + padding-bottom: 0.6875rem; + padding-left: 1.25rem; + font-size: 0.6875rem; } + button.expand, .button.expand { + padding-right: 0; + padding-left: 0; + width: 100%; } + button.left-align, .button.left-align { + text-align: left; + text-indent: 0.75rem; } + button.right-align, .button.right-align { + text-align: right; + padding-right: 0.75rem; } + button.radius, .button.radius { + border-radius: 3px; } + button.round, .button.round { + border-radius: 1000px; } + button.disabled, button[disabled], .button.disabled, .button[disabled] { + background-color: #008CBA; + border-color: #007095; + color: #FFFFFF; + cursor: default; + opacity: 0.7; + box-shadow: none; } + button.disabled:hover, button.disabled:focus, button[disabled]:hover, button[disabled]:focus, .button.disabled:hover, .button.disabled:focus, .button[disabled]:hover, .button[disabled]:focus { + background-color: #007095; } + button.disabled:hover, button.disabled:focus, button[disabled]:hover, button[disabled]:focus, .button.disabled:hover, .button.disabled:focus, .button[disabled]:hover, .button[disabled]:focus { + color: #FFFFFF; } + button.disabled:hover, button.disabled:focus, button[disabled]:hover, button[disabled]:focus, .button.disabled:hover, .button.disabled:focus, .button[disabled]:hover, .button[disabled]:focus { + background-color: #008CBA; } + button.disabled.secondary, button[disabled].secondary, .button.disabled.secondary, .button[disabled].secondary { + background-color: #e7e7e7; + border-color: #b9b9b9; + color: #333333; + cursor: default; + opacity: 0.7; + box-shadow: none; } + button.disabled.secondary:hover, button.disabled.secondary:focus, button[disabled].secondary:hover, button[disabled].secondary:focus, .button.disabled.secondary:hover, .button.disabled.secondary:focus, .button[disabled].secondary:hover, .button[disabled].secondary:focus { + background-color: #b9b9b9; } + button.disabled.secondary:hover, button.disabled.secondary:focus, button[disabled].secondary:hover, button[disabled].secondary:focus, .button.disabled.secondary:hover, .button.disabled.secondary:focus, .button[disabled].secondary:hover, .button[disabled].secondary:focus { + color: #333333; } + button.disabled.secondary:hover, button.disabled.secondary:focus, button[disabled].secondary:hover, button[disabled].secondary:focus, .button.disabled.secondary:hover, .button.disabled.secondary:focus, .button[disabled].secondary:hover, .button[disabled].secondary:focus { + background-color: #e7e7e7; } + button.disabled.success, button[disabled].success, .button.disabled.success, .button[disabled].success { + background-color: #43AC6A; + border-color: #368a55; + color: #FFFFFF; + cursor: default; + opacity: 0.7; + box-shadow: none; } + button.disabled.success:hover, button.disabled.success:focus, button[disabled].success:hover, button[disabled].success:focus, .button.disabled.success:hover, .button.disabled.success:focus, .button[disabled].success:hover, .button[disabled].success:focus { + background-color: #368a55; } + button.disabled.success:hover, button.disabled.success:focus, button[disabled].success:hover, button[disabled].success:focus, .button.disabled.success:hover, .button.disabled.success:focus, .button[disabled].success:hover, .button[disabled].success:focus { + color: #FFFFFF; } + button.disabled.success:hover, button.disabled.success:focus, button[disabled].success:hover, button[disabled].success:focus, .button.disabled.success:hover, .button.disabled.success:focus, .button[disabled].success:hover, .button[disabled].success:focus { + background-color: #43AC6A; } + button.disabled.alert, button[disabled].alert, .button.disabled.alert, .button[disabled].alert { + background-color: #f04124; + border-color: #cf2a0e; + color: #FFFFFF; + cursor: default; + opacity: 0.7; + box-shadow: none; } + button.disabled.alert:hover, button.disabled.alert:focus, button[disabled].alert:hover, button[disabled].alert:focus, .button.disabled.alert:hover, .button.disabled.alert:focus, .button[disabled].alert:hover, .button[disabled].alert:focus { + background-color: #cf2a0e; } + button.disabled.alert:hover, button.disabled.alert:focus, button[disabled].alert:hover, button[disabled].alert:focus, .button.disabled.alert:hover, .button.disabled.alert:focus, .button[disabled].alert:hover, .button[disabled].alert:focus { + color: #FFFFFF; } + button.disabled.alert:hover, button.disabled.alert:focus, button[disabled].alert:hover, button[disabled].alert:focus, .button.disabled.alert:hover, .button.disabled.alert:focus, .button[disabled].alert:hover, .button[disabled].alert:focus { + background-color: #f04124; } + button.disabled.warning, button[disabled].warning, .button.disabled.warning, .button[disabled].warning { + background-color: #f08a24; + border-color: #cf6e0e; + color: #FFFFFF; + cursor: default; + opacity: 0.7; + box-shadow: none; } + button.disabled.warning:hover, button.disabled.warning:focus, button[disabled].warning:hover, button[disabled].warning:focus, .button.disabled.warning:hover, .button.disabled.warning:focus, .button[disabled].warning:hover, .button[disabled].warning:focus { + background-color: #cf6e0e; } + button.disabled.warning:hover, button.disabled.warning:focus, button[disabled].warning:hover, button[disabled].warning:focus, .button.disabled.warning:hover, .button.disabled.warning:focus, .button[disabled].warning:hover, .button[disabled].warning:focus { + color: #FFFFFF; } + button.disabled.warning:hover, button.disabled.warning:focus, button[disabled].warning:hover, button[disabled].warning:focus, .button.disabled.warning:hover, .button.disabled.warning:focus, .button[disabled].warning:hover, .button[disabled].warning:focus { + background-color: #f08a24; } + button.disabled.info, button[disabled].info, .button.disabled.info, .button[disabled].info { + background-color: #a0d3e8; + border-color: #61b6d9; + color: #333333; + cursor: default; + opacity: 0.7; + box-shadow: none; } + button.disabled.info:hover, button.disabled.info:focus, button[disabled].info:hover, button[disabled].info:focus, .button.disabled.info:hover, .button.disabled.info:focus, .button[disabled].info:hover, .button[disabled].info:focus { + background-color: #61b6d9; } + button.disabled.info:hover, button.disabled.info:focus, button[disabled].info:hover, button[disabled].info:focus, .button.disabled.info:hover, .button.disabled.info:focus, .button[disabled].info:hover, .button[disabled].info:focus { + color: #FFFFFF; } + button.disabled.info:hover, button.disabled.info:focus, button[disabled].info:hover, button[disabled].info:focus, .button.disabled.info:hover, .button.disabled.info:focus, .button[disabled].info:hover, .button[disabled].info:focus { + background-color: #a0d3e8; } + +button::-moz-focus-inner { + border: 0; + padding: 0; } + +@media only screen and (min-width: 40.063em) { + button, .button { + display: inline-block; } } +/* Standard Forms */ +form { + margin: 0 0 1rem; } + +/* Using forms within rows, we need to set some defaults */ +form .row .row { + margin: 0 -0.5rem; } + form .row .row .column, + form .row .row .columns { + padding: 0 0.5rem; } + form .row .row.collapse { + margin: 0; } + form .row .row.collapse .column, + form .row .row.collapse .columns { + padding: 0; } + form .row .row.collapse input { + -webkit-border-bottom-right-radius: 0; + -webkit-border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-top-right-radius: 0; } +form .row input.column, +form .row input.columns, +form .row textarea.column, +form .row textarea.columns { + padding-left: 0.5rem; } + +/* Label Styles */ +label { + font-size: 0.875rem; + color: #4d4d4d; + cursor: pointer; + display: block; + font-weight: normal; + line-height: 1.5; + margin-bottom: 0; + /* Styles for required inputs */ } + label.right { + float: none !important; + text-align: right; } + label.inline { + margin: 0 0 1rem 0; + padding: 0.5625rem 0; } + label small { + text-transform: capitalize; + color: #676767; } + +/* Attach elements to the beginning or end of an input */ +.prefix, +.postfix { + display: block; + position: relative; + z-index: 2; + text-align: center; + width: 100%; + padding-top: 0; + padding-bottom: 0; + border-style: solid; + border-width: 1px; + overflow: visible; + font-size: 0.875rem; + height: 2.3125rem; + line-height: 2.3125rem; } + +/* Adjust padding, alignment and radius if pre/post element is a button */ +.postfix.button { + padding-left: 0; + padding-right: 0; + padding-top: 0; + padding-bottom: 0; + text-align: center; + border: none; } + +.prefix.button { + padding-left: 0; + padding-right: 0; + padding-top: 0; + padding-bottom: 0; + text-align: center; + border: none; } + +.prefix.button.radius { + border-radius: 0; + -webkit-border-bottom-left-radius: 3px; + -webkit-border-top-left-radius: 3px; + border-bottom-left-radius: 3px; + border-top-left-radius: 3px; } + +.postfix.button.radius { + border-radius: 0; + -webkit-border-bottom-right-radius: 3px; + -webkit-border-top-right-radius: 3px; + border-bottom-right-radius: 3px; + border-top-right-radius: 3px; } + +.prefix.button.round { + border-radius: 0; + -webkit-border-bottom-left-radius: 1000px; + -webkit-border-top-left-radius: 1000px; + border-bottom-left-radius: 1000px; + border-top-left-radius: 1000px; } + +.postfix.button.round { + border-radius: 0; + -webkit-border-bottom-right-radius: 1000px; + -webkit-border-top-right-radius: 1000px; + border-bottom-right-radius: 1000px; + border-top-right-radius: 1000px; } + +/* Separate prefix and postfix styles when on span or label so buttons keep their own */ +span.prefix, label.prefix { + background: #f2f2f2; + border-right: none; + color: #333333; + border-color: #cccccc; } + +span.postfix, label.postfix { + background: #f2f2f2; + border-left: none; + color: #333333; + border-color: #cccccc; } + +/* We use this to get basic styling on all basic form elements */ +input[type="text"], input[type="password"], input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="month"], input[type="week"], input[type="email"], input[type="number"], input[type="search"], input[type="tel"], input[type="time"], input[type="url"], input[type="color"], textarea { + -webkit-appearance: none; + border-radius: 0; + background-color: #FFFFFF; + font-family: inherit; + border-style: solid; + border-width: 1px; + border-color: #cccccc; + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + color: rgba(0, 0, 0, 0.75); + display: block; + font-size: 0.875rem; + margin: 0 0 1rem 0; + padding: 0.5rem; + height: 2.3125rem; + width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + transition: all 0.15s linear; } + input[type="text"]:focus, input[type="password"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="week"]:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="time"]:focus, input[type="url"]:focus, input[type="color"]:focus, textarea:focus { + background: #fafafa; + border-color: #999999; + outline: none; } + input[type="text"]:disabled, input[type="password"]:disabled, input[type="date"]:disabled, input[type="datetime"]:disabled, input[type="datetime-local"]:disabled, input[type="month"]:disabled, input[type="week"]:disabled, input[type="email"]:disabled, input[type="number"]:disabled, input[type="search"]:disabled, input[type="tel"]:disabled, input[type="time"]:disabled, input[type="url"]:disabled, input[type="color"]:disabled, textarea:disabled { + background-color: #DDDDDD; + cursor: default; } + input[type="text"][disabled], input[type="text"][readonly], fieldset[disabled] input[type="text"], input[type="password"][disabled], input[type="password"][readonly], fieldset[disabled] input[type="password"], input[type="date"][disabled], input[type="date"][readonly], fieldset[disabled] input[type="date"], input[type="datetime"][disabled], input[type="datetime"][readonly], fieldset[disabled] input[type="datetime"], input[type="datetime-local"][disabled], input[type="datetime-local"][readonly], fieldset[disabled] input[type="datetime-local"], input[type="month"][disabled], input[type="month"][readonly], fieldset[disabled] input[type="month"], input[type="week"][disabled], input[type="week"][readonly], fieldset[disabled] input[type="week"], input[type="email"][disabled], input[type="email"][readonly], fieldset[disabled] input[type="email"], input[type="number"][disabled], input[type="number"][readonly], fieldset[disabled] input[type="number"], input[type="search"][disabled], input[type="search"][readonly], fieldset[disabled] input[type="search"], input[type="tel"][disabled], input[type="tel"][readonly], fieldset[disabled] input[type="tel"], input[type="time"][disabled], input[type="time"][readonly], fieldset[disabled] input[type="time"], input[type="url"][disabled], input[type="url"][readonly], fieldset[disabled] input[type="url"], input[type="color"][disabled], input[type="color"][readonly], fieldset[disabled] input[type="color"], textarea[disabled], textarea[readonly], fieldset[disabled] textarea { + background-color: #DDDDDD; + cursor: default; } + input[type="text"].radius, input[type="password"].radius, input[type="date"].radius, input[type="datetime"].radius, input[type="datetime-local"].radius, input[type="month"].radius, input[type="week"].radius, input[type="email"].radius, input[type="number"].radius, input[type="search"].radius, input[type="tel"].radius, input[type="time"].radius, input[type="url"].radius, input[type="color"].radius, textarea.radius { + border-radius: 3px; } + +form .row .prefix-radius.row.collapse input, +form .row .prefix-radius.row.collapse textarea, +form .row .prefix-radius.row.collapse select, +form .row .prefix-radius.row.collapse button { + border-radius: 0; + -webkit-border-bottom-right-radius: 3px; + -webkit-border-top-right-radius: 3px; + border-bottom-right-radius: 3px; + border-top-right-radius: 3px; } +form .row .prefix-radius.row.collapse .prefix { + border-radius: 0; + -webkit-border-bottom-left-radius: 3px; + -webkit-border-top-left-radius: 3px; + border-bottom-left-radius: 3px; + border-top-left-radius: 3px; } +form .row .postfix-radius.row.collapse input, +form .row .postfix-radius.row.collapse textarea, +form .row .postfix-radius.row.collapse select, +form .row .postfix-radius.row.collapse button { + border-radius: 0; + -webkit-border-bottom-left-radius: 3px; + -webkit-border-top-left-radius: 3px; + border-bottom-left-radius: 3px; + border-top-left-radius: 3px; } +form .row .postfix-radius.row.collapse .postfix { + border-radius: 0; + -webkit-border-bottom-right-radius: 3px; + -webkit-border-top-right-radius: 3px; + border-bottom-right-radius: 3px; + border-top-right-radius: 3px; } +form .row .prefix-round.row.collapse input, +form .row .prefix-round.row.collapse textarea, +form .row .prefix-round.row.collapse select, +form .row .prefix-round.row.collapse button { + border-radius: 0; + -webkit-border-bottom-right-radius: 1000px; + -webkit-border-top-right-radius: 1000px; + border-bottom-right-radius: 1000px; + border-top-right-radius: 1000px; } +form .row .prefix-round.row.collapse .prefix { + border-radius: 0; + -webkit-border-bottom-left-radius: 1000px; + -webkit-border-top-left-radius: 1000px; + border-bottom-left-radius: 1000px; + border-top-left-radius: 1000px; } +form .row .postfix-round.row.collapse input, +form .row .postfix-round.row.collapse textarea, +form .row .postfix-round.row.collapse select, +form .row .postfix-round.row.collapse button { + border-radius: 0; + -webkit-border-bottom-left-radius: 1000px; + -webkit-border-top-left-radius: 1000px; + border-bottom-left-radius: 1000px; + border-top-left-radius: 1000px; } +form .row .postfix-round.row.collapse .postfix { + border-radius: 0; + -webkit-border-bottom-right-radius: 1000px; + -webkit-border-top-right-radius: 1000px; + border-bottom-right-radius: 1000px; + border-top-right-radius: 1000px; } + +input[type="submit"] { + -webkit-appearance: none; + border-radius: 0; } + +/* Respect enforced amount of rows for textarea */ +textarea[rows] { + height: auto; } + +/* Not allow resize out of parent */ +textarea { + max-width: 100%; } + +/* Add height value for select elements to match text input height */ +select { + -webkit-appearance: none !important; + border-radius: 0; + background-color: #FAFAFA; + background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeD0iMTJweCIgeT0iMHB4IiB3aWR0aD0iMjRweCIgaGVpZ2h0PSIzcHgiIHZpZXdCb3g9IjAgMCA2IDMiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDYgMyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHBvbHlnb24gcG9pbnRzPSI1Ljk5MiwwIDIuOTkyLDMgLTAuMDA4LDAgIi8+PC9zdmc+); + background-position: 100% center; + background-repeat: no-repeat; + border-style: solid; + border-width: 1px; + border-color: #cccccc; + padding: 0.5rem; + font-size: 0.875rem; + font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; + color: rgba(0, 0, 0, 0.75); + line-height: normal; + border-radius: 0; + height: 2.3125rem; } + select::-ms-expand { + display: none; } + select.radius { + border-radius: 3px; } + select:hover { + background-color: #f3f3f3; + border-color: #999999; } + select:disabled { + background-color: #DDDDDD; + cursor: default; } + select[multiple] { + height: auto; } + +/* Adjust margin for form elements below */ +input[type="file"], +input[type="checkbox"], +input[type="radio"], +select { + margin: 0 0 1rem 0; } + +input[type="checkbox"] + label, +input[type="radio"] + label { + display: inline-block; + margin-left: 0.5rem; + margin-right: 1rem; + margin-bottom: 0; + vertical-align: baseline; } + +/* Normalize file input width */ +input[type="file"] { + width: 100%; } + +/* HTML5 Number spinners settings */ +/* We add basic fieldset styling */ +fieldset { + border: 1px solid #DDDDDD; + padding: 1.25rem; + margin: 1.125rem 0; } + fieldset legend { + font-weight: bold; + background: #FFFFFF; + padding: 0 0.1875rem; + margin: 0; + margin-left: -0.1875rem; } + +/* Error Handling */ +[data-abide] .error small.error, [data-abide] .error span.error, [data-abide] span.error, [data-abide] small.error { + display: block; + padding: 0.375rem 0.5625rem 0.5625rem; + margin-top: -1px; + margin-bottom: 1rem; + font-size: 0.75rem; + font-weight: normal; + font-style: italic; + background: #f04124; + color: #FFFFFF; } +[data-abide] span.error, [data-abide] small.error { + display: none; } + +span.error, small.error { + display: block; + padding: 0.375rem 0.5625rem 0.5625rem; + margin-top: -1px; + margin-bottom: 1rem; + font-size: 0.75rem; + font-weight: normal; + font-style: italic; + background: #f04124; + color: #FFFFFF; } + +.error input, +.error textarea, +.error select { + margin-bottom: 0; } +.error input[type="checkbox"], +.error input[type="radio"] { + margin-bottom: 1rem; } +.error label, +.error label.error { + color: #f04124; } +.error small.error { + display: block; + padding: 0.375rem 0.5625rem 0.5625rem; + margin-top: -1px; + margin-bottom: 1rem; + font-size: 0.75rem; + font-weight: normal; + font-style: italic; + background: #f04124; + color: #FFFFFF; } +.error > label > small { + color: #676767; + background: transparent; + padding: 0; + text-transform: capitalize; + font-style: normal; + font-size: 60%; + margin: 0; + display: inline; } +.error span.error-message { + display: block; } + +input.error, +textarea.error, +select.error { + margin-bottom: 0; } + +label.error { + color: #f04124; } + +meta.foundation-mq-topbar { + font-family: "/only screen and (min-width:40.063em)/"; + width: 40.063em; } + +/* Wrapped around .top-bar to contain to grid width */ +.contain-to-grid { + width: 100%; + background: #333333; } + .contain-to-grid .top-bar { + margin-bottom: 0; } + +.fixed { + width: 100%; + left: 0; + position: fixed; + top: 0; + z-index: 99; } + .fixed.expanded:not(.top-bar) { + overflow-y: auto; + height: auto; + width: 100%; + max-height: 100%; } + .fixed.expanded:not(.top-bar) .title-area { + position: fixed; + width: 100%; + z-index: 99; } + .fixed.expanded:not(.top-bar) .top-bar-section { + z-index: 98; + margin-top: 2.8125rem; } + +.top-bar { + overflow: hidden; + height: 2.8125rem; + line-height: 2.8125rem; + position: relative; + background: #333333; + margin-bottom: 0; } + .top-bar ul { + margin-bottom: 0; + list-style: none; } + .top-bar .row { + max-width: none; } + .top-bar form, + .top-bar input { + margin-bottom: 0; } + .top-bar input { + height: 1.75rem; + padding-top: .35rem; + padding-bottom: .35rem; + font-size: 0.75rem; } + .top-bar .button, .top-bar button { + padding-top: 0.4125rem; + padding-bottom: 0.4125rem; + margin-bottom: 0; + font-size: 0.75rem; } + @media only screen and (max-width: 40em) { + .top-bar .button, .top-bar button { + position: relative; + top: -1px; } } + .top-bar .title-area { + position: relative; + margin: 0; } + .top-bar .name { + height: 2.8125rem; + margin: 0; + font-size: 16px; } + .top-bar .name h1, .top-bar .name h2, .top-bar .name h3, .top-bar .name h4, .top-bar .name p, .top-bar .name span { + line-height: 2.8125rem; + font-size: 1.0625rem; + margin: 0; } + .top-bar .name h1 a, .top-bar .name h2 a, .top-bar .name h3 a, .top-bar .name h4 a, .top-bar .name p a, .top-bar .name span a { + font-weight: normal; + color: #FFFFFF; + width: 75%; + display: block; + padding: 0 0.9375rem; } + .top-bar .toggle-topbar { + position: absolute; + right: 0; + top: 0; } + .top-bar .toggle-topbar a { + color: #FFFFFF; + text-transform: uppercase; + font-size: 0.8125rem; + font-weight: bold; + position: relative; + display: block; + padding: 0 0.9375rem; + height: 2.8125rem; + line-height: 2.8125rem; } + .top-bar .toggle-topbar.menu-icon { + top: 50%; + margin-top: -16px; } + .top-bar .toggle-topbar.menu-icon a { + height: 34px; + line-height: 33px; + padding: 0 2.5rem 0 0.9375rem; + color: #FFFFFF; + position: relative; } + .top-bar .toggle-topbar.menu-icon a span::after { + content: ""; + position: absolute; + display: block; + height: 0; + top: 50%; + margin-top: -8px; + right: 0.9375rem; + box-shadow: 0 0 0 1px #FFFFFF, 0 7px 0 1px #FFFFFF, 0 14px 0 1px #FFFFFF; + width: 16px; } + .top-bar .toggle-topbar.menu-icon a span:hover:after { + box-shadow: 0 0 0 1px "", 0 7px 0 1px "", 0 14px 0 1px ""; } + .top-bar.expanded { + height: auto; + background: transparent; } + .top-bar.expanded .title-area { + background: #333333; } + .top-bar.expanded .toggle-topbar a { + color: #888888; } + .top-bar.expanded .toggle-topbar a span::after { + box-shadow: 0 0 0 1px #888888, 0 7px 0 1px #888888, 0 14px 0 1px #888888; } + +.top-bar-section { + left: 0; + position: relative; + width: auto; + transition: left 300ms ease-out; } + .top-bar-section ul { + padding: 0; + width: 100%; + height: auto; + display: block; + font-size: 16px; + margin: 0; } + .top-bar-section .divider, + .top-bar-section [role="separator"] { + border-top: solid 1px #1a1a1a; + clear: both; + height: 1px; + width: 100%; } + .top-bar-section ul li { + background: #333333; } + .top-bar-section ul li > a { + display: block; + width: 100%; + color: #FFFFFF; + padding: 12px 0 12px 0; + padding-left: 0.9375rem; + font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; + font-size: 0.8125rem; + font-weight: normal; + text-transform: none; } + .top-bar-section ul li > a.button { + font-size: 0.8125rem; + padding-right: 0.9375rem; + padding-left: 0.9375rem; + background-color: #008CBA; + border-color: #007095; + color: #FFFFFF; } + .top-bar-section ul li > a.button:hover, .top-bar-section ul li > a.button:focus { + background-color: #007095; } + .top-bar-section ul li > a.button:hover, .top-bar-section ul li > a.button:focus { + color: #FFFFFF; } + .top-bar-section ul li > a.button.secondary { + background-color: #e7e7e7; + border-color: #b9b9b9; + color: #333333; } + .top-bar-section ul li > a.button.secondary:hover, .top-bar-section ul li > a.button.secondary:focus { + background-color: #b9b9b9; } + .top-bar-section ul li > a.button.secondary:hover, .top-bar-section ul li > a.button.secondary:focus { + color: #333333; } + .top-bar-section ul li > a.button.success { + background-color: #43AC6A; + border-color: #368a55; + color: #FFFFFF; } + .top-bar-section ul li > a.button.success:hover, .top-bar-section ul li > a.button.success:focus { + background-color: #368a55; } + .top-bar-section ul li > a.button.success:hover, .top-bar-section ul li > a.button.success:focus { + color: #FFFFFF; } + .top-bar-section ul li > a.button.alert { + background-color: #f04124; + border-color: #cf2a0e; + color: #FFFFFF; } + .top-bar-section ul li > a.button.alert:hover, .top-bar-section ul li > a.button.alert:focus { + background-color: #cf2a0e; } + .top-bar-section ul li > a.button.alert:hover, .top-bar-section ul li > a.button.alert:focus { + color: #FFFFFF; } + .top-bar-section ul li > a.button.warning { + background-color: #f08a24; + border-color: #cf6e0e; + color: #FFFFFF; } + .top-bar-section ul li > a.button.warning:hover, .top-bar-section ul li > a.button.warning:focus { + background-color: #cf6e0e; } + .top-bar-section ul li > a.button.warning:hover, .top-bar-section ul li > a.button.warning:focus { + color: #FFFFFF; } + .top-bar-section ul li > button { + font-size: 0.8125rem; + padding-right: 0.9375rem; + padding-left: 0.9375rem; + background-color: #008CBA; + border-color: #007095; + color: #FFFFFF; } + .top-bar-section ul li > button:hover, .top-bar-section ul li > button:focus { + background-color: #007095; } + .top-bar-section ul li > button:hover, .top-bar-section ul li > button:focus { + color: #FFFFFF; } + .top-bar-section ul li > button.secondary { + background-color: #e7e7e7; + border-color: #b9b9b9; + color: #333333; } + .top-bar-section ul li > button.secondary:hover, .top-bar-section ul li > button.secondary:focus { + background-color: #b9b9b9; } + .top-bar-section ul li > button.secondary:hover, .top-bar-section ul li > button.secondary:focus { + color: #333333; } + .top-bar-section ul li > button.success { + background-color: #43AC6A; + border-color: #368a55; + color: #FFFFFF; } + .top-bar-section ul li > button.success:hover, .top-bar-section ul li > button.success:focus { + background-color: #368a55; } + .top-bar-section ul li > button.success:hover, .top-bar-section ul li > button.success:focus { + color: #FFFFFF; } + .top-bar-section ul li > button.alert { + background-color: #f04124; + border-color: #cf2a0e; + color: #FFFFFF; } + .top-bar-section ul li > button.alert:hover, .top-bar-section ul li > button.alert:focus { + background-color: #cf2a0e; } + .top-bar-section ul li > button.alert:hover, .top-bar-section ul li > button.alert:focus { + color: #FFFFFF; } + .top-bar-section ul li > button.warning { + background-color: #f08a24; + border-color: #cf6e0e; + color: #FFFFFF; } + .top-bar-section ul li > button.warning:hover, .top-bar-section ul li > button.warning:focus { + background-color: #cf6e0e; } + .top-bar-section ul li > button.warning:hover, .top-bar-section ul li > button.warning:focus { + color: #FFFFFF; } + .top-bar-section ul li:hover:not(.has-form) > a { + background-color: #555555; + background: #333333; + color: #FFFFFF; } + .top-bar-section ul li.active > a { + background: #008CBA; + color: #FFFFFF; } + .top-bar-section ul li.active > a:hover { + background: #0078a0; + color: #FFFFFF; } + .top-bar-section .has-form { + padding: 0.9375rem; } + .top-bar-section .has-dropdown { + position: relative; } + .top-bar-section .has-dropdown > a:after { + content: ""; + display: block; + width: 0; + height: 0; + border: inset 5px; + border-color: transparent transparent transparent rgba(255, 255, 255, 0.4); + border-left-style: solid; + margin-right: 0.9375rem; + margin-top: -4.5px; + position: absolute; + top: 50%; + right: 0; } + .top-bar-section .has-dropdown.moved { + position: static; } + .top-bar-section .has-dropdown.moved > .dropdown { + display: block; + position: static !important; + height: auto; + width: auto; + overflow: visible; + clip: auto; + position: absolute !important; + width: 100%; } + .top-bar-section .has-dropdown.moved > a:after { + display: none; } + .top-bar-section .dropdown { + padding: 0; + position: absolute; + left: 100%; + top: 0; + z-index: 99; + display: block; + position: absolute !important; + height: 1px; + width: 1px; + overflow: hidden; + clip: rect(1px, 1px, 1px, 1px); } + .top-bar-section .dropdown li { + width: 100%; + height: auto; } + .top-bar-section .dropdown li a { + font-weight: normal; + padding: 8px 0.9375rem; } + .top-bar-section .dropdown li a.parent-link { + font-weight: normal; } + .top-bar-section .dropdown li.title h5, .top-bar-section .dropdown li.parent-link { + margin-bottom: 0; + margin-top: 0; + font-size: 1.125rem; } + .top-bar-section .dropdown li.title h5 a, .top-bar-section .dropdown li.parent-link a { + color: #FFFFFF; + display: block; } + .top-bar-section .dropdown li.title h5 a:hover, .top-bar-section .dropdown li.parent-link a:hover { + background: none; } + .top-bar-section .dropdown li.has-form { + padding: 8px 0.9375rem; } + .top-bar-section .dropdown li .button, .top-bar-section .dropdown li button { + top: auto; } + .top-bar-section .dropdown label { + padding: 8px 0.9375rem 2px; + margin-bottom: 0; + text-transform: uppercase; + color: #777777; + font-weight: bold; + font-size: 0.625rem; } + +.js-generated { + display: block; } + +@media only screen and (min-width: 40.063em) { + .top-bar { + background: #333333; + overflow: visible; } + .top-bar:before, .top-bar:after { + content: " "; + display: table; } + .top-bar:after { + clear: both; } + .top-bar .toggle-topbar { + display: none; } + .top-bar .title-area { + float: left; } + .top-bar .name h1 a, + .top-bar .name h2 a, + .top-bar .name h3 a, + .top-bar .name h4 a, + .top-bar .name h5 a, + .top-bar .name h6 a { + width: auto; } + .top-bar input, + .top-bar .button, + .top-bar button { + font-size: 0.875rem; + position: relative; + height: 1.75rem; + top: 0.53125rem; } + .top-bar.expanded { + background: #333333; } + + .contain-to-grid .top-bar { + max-width: 62.5rem; + margin: 0 auto; + margin-bottom: 0; } + + .top-bar-section { + transition: none 0 0; + left: 0 !important; } + .top-bar-section ul { + width: auto; + height: auto !important; + display: inline; } + .top-bar-section ul li { + float: left; } + .top-bar-section ul li .js-generated { + display: none; } + .top-bar-section li.hover > a:not(.button) { + background-color: #555555; + background: #333333; + color: #FFFFFF; } + .top-bar-section li:not(.has-form) a:not(.button) { + padding: 0 0.9375rem; + line-height: 2.8125rem; + background: #333333; } + .top-bar-section li:not(.has-form) a:not(.button):hover { + background-color: #555555; + background: #333333; } + .top-bar-section li.active:not(.has-form) a:not(.button) { + padding: 0 0.9375rem; + line-height: 2.8125rem; + color: #FFFFFF; + background: #008CBA; } + .top-bar-section li.active:not(.has-form) a:not(.button):hover { + background: #0078a0; + color: #FFFFFF; } + .top-bar-section .has-dropdown > a { + padding-right: 2.1875rem !important; } + .top-bar-section .has-dropdown > a:after { + content: ""; + display: block; + width: 0; + height: 0; + border: inset 5px; + border-color: rgba(255, 255, 255, 0.4) transparent transparent transparent; + border-top-style: solid; + margin-top: -2.5px; + top: 1.40625rem; } + .top-bar-section .has-dropdown.moved { + position: relative; } + .top-bar-section .has-dropdown.moved > .dropdown { + display: block; + position: absolute !important; + height: 1px; + width: 1px; + overflow: hidden; + clip: rect(1px, 1px, 1px, 1px); } + .top-bar-section .has-dropdown.hover > .dropdown, .top-bar-section .has-dropdown.not-click:hover > .dropdown { + display: block; + position: static !important; + height: auto; + width: auto; + overflow: visible; + clip: auto; + position: absolute !important; } + .top-bar-section .has-dropdown > a:focus + .dropdown { + display: block; + position: static !important; + height: auto; + width: auto; + overflow: visible; + clip: auto; + position: absolute !important; } + .top-bar-section .has-dropdown .dropdown li.has-dropdown > a:after { + border: none; + content: "\00bb"; + top: 1rem; + margin-top: -1px; + right: 5px; + line-height: 1.2; } + .top-bar-section .dropdown { + left: 0; + top: auto; + background: transparent; + min-width: 100%; } + .top-bar-section .dropdown li a { + color: #FFFFFF; + line-height: 2.8125rem; + white-space: nowrap; + padding: 12px 0.9375rem; + background: #333333; } + .top-bar-section .dropdown li:not(.has-form):not(.active) > a:not(.button) { + color: #FFFFFF; + background: #333333; } + .top-bar-section .dropdown li:not(.has-form):not(.active):hover > a:not(.button) { + color: #FFFFFF; + background-color: #555555; + background: #333333; } + .top-bar-section .dropdown li label { + white-space: nowrap; + background: #333333; } + .top-bar-section .dropdown li .dropdown { + left: 100%; + top: 0; } + .top-bar-section > ul > .divider, .top-bar-section > ul > [role="separator"] { + border-bottom: none; + border-top: none; + border-right: solid 1px #4e4e4e; + clear: none; + height: 2.8125rem; + width: 0; } + .top-bar-section .has-form { + background: #333333; + padding: 0 0.9375rem; + height: 2.8125rem; } + .top-bar-section .right li .dropdown { + left: auto; + right: 0; } + .top-bar-section .right li .dropdown li .dropdown { + right: 100%; } + .top-bar-section .left li .dropdown { + right: auto; + left: 0; } + .top-bar-section .left li .dropdown li .dropdown { + left: 100%; } + + .no-js .top-bar-section ul li:hover > a { + background-color: #555555; + background: #333333; + color: #FFFFFF; } + .no-js .top-bar-section ul li:active > a { + background: #008CBA; + color: #FFFFFF; } + .no-js .top-bar-section .has-dropdown:hover > .dropdown { + display: block; + position: static !important; + height: auto; + width: auto; + overflow: visible; + clip: auto; + position: absolute !important; } + .no-js .top-bar-section .has-dropdown > a:focus + .dropdown { + display: block; + position: static !important; + height: auto; + width: auto; + overflow: visible; + clip: auto; + position: absolute !important; } } +.breadcrumbs { + display: block; + padding: 0.5625rem 0.875rem 0.5625rem; + overflow: hidden; + margin-left: 0; + list-style: none; + border-style: solid; + border-width: 1px; + background-color: #f4f4f4; + border-color: gainsboro; + border-radius: 3px; } + .breadcrumbs > * { + margin: 0; + float: left; + font-size: 0.6875rem; + line-height: 0.6875rem; + text-transform: uppercase; + color: #008CBA; } + .breadcrumbs > *:hover a, .breadcrumbs > *:focus a { + text-decoration: underline; } + .breadcrumbs > * a { + color: #008CBA; } + .breadcrumbs > *.current { + cursor: default; + color: #333333; } + .breadcrumbs > *.current a { + cursor: default; + color: #333333; } + .breadcrumbs > *.current:hover, .breadcrumbs > *.current:hover a, .breadcrumbs > *.current:focus, .breadcrumbs > *.current:focus a { + text-decoration: none; } + .breadcrumbs > *.unavailable { + color: #999999; } + .breadcrumbs > *.unavailable a { + color: #999999; } + .breadcrumbs > *.unavailable:hover, .breadcrumbs > *.unavailable:hover a, .breadcrumbs > *.unavailable:focus, + .breadcrumbs > *.unavailable a:focus { + text-decoration: none; + color: #999999; + cursor: not-allowed; } + .breadcrumbs > *:before { + content: "/"; + color: #AAAAAA; + margin: 0 0.75rem; + position: relative; + top: 1px; } + .breadcrumbs > *:first-child:before { + content: " "; + margin: 0; } + +/* Accessibility - hides the forward slash */ +[aria-label="breadcrumbs"] [aria-hidden="true"]:after { + content: "/"; } + +.alert-box { + border-style: solid; + border-width: 1px; + display: block; + font-weight: normal; + margin-bottom: 1.25rem; + position: relative; + padding: 0.875rem 1.5rem 0.875rem 0.875rem; + font-size: 0.8125rem; + transition: opacity 300ms ease-out; + background-color: #008CBA; + border-color: #0078a0; + color: #FFFFFF; } + .alert-box .close { + font-size: 1.375rem; + padding: 0 6px 4px; + line-height: .9; + position: absolute; + top: 50%; + margin-top: -0.6875rem; + right: 0.25rem; + color: #333333; + opacity: 0.3; + background: inherit; } + .alert-box .close:hover, .alert-box .close:focus { + opacity: 0.5; } + .alert-box.radius { + border-radius: 3px; } + .alert-box.round { + border-radius: 1000px; } + .alert-box.success { + background-color: #43AC6A; + border-color: #3a945b; + color: #FFFFFF; } + .alert-box.alert { + background-color: #f04124; + border-color: #de2d0f; + color: #FFFFFF; } + .alert-box.secondary { + background-color: #e7e7e7; + border-color: #c7c7c7; + color: #4f4f4f; } + .alert-box.warning { + background-color: #f08a24; + border-color: #de770f; + color: #FFFFFF; } + .alert-box.info { + background-color: #a0d3e8; + border-color: #74bfdd; + color: #4f4f4f; } + .alert-box.alert-close { + opacity: 0; } + +.inline-list { + margin: 0 auto 1.0625rem auto; + margin-left: -1.375rem; + margin-right: 0; + padding: 0; + list-style: none; + overflow: hidden; } + .inline-list > li { + list-style: none; + float: left; + margin-left: 1.375rem; + display: block; } + .inline-list > li > * { + display: block; } + +.button-group { + list-style: none; + margin: 0; + left: 0; } + .button-group:before, .button-group:after { + content: " "; + display: table; } + .button-group:after { + clear: both; } + .button-group.even-2 li { + margin: 0 -2px; + display: inline-block; + width: 50%; } + .button-group.even-2 li > button, .button-group.even-2 li .button { + border-left: 1px solid; + border-color: rgba(255, 255, 255, 0.5); } + .button-group.even-2 li:first-child button, .button-group.even-2 li:first-child .button { + border-left: 0; } + .button-group.even-2 li button, .button-group.even-2 li .button { + width: 100%; } + .button-group.even-3 li { + margin: 0 -2px; + display: inline-block; + width: 33.33333%; } + .button-group.even-3 li > button, .button-group.even-3 li .button { + border-left: 1px solid; + border-color: rgba(255, 255, 255, 0.5); } + .button-group.even-3 li:first-child button, .button-group.even-3 li:first-child .button { + border-left: 0; } + .button-group.even-3 li button, .button-group.even-3 li .button { + width: 100%; } + .button-group.even-4 li { + margin: 0 -2px; + display: inline-block; + width: 25%; } + .button-group.even-4 li > button, .button-group.even-4 li .button { + border-left: 1px solid; + border-color: rgba(255, 255, 255, 0.5); } + .button-group.even-4 li:first-child button, .button-group.even-4 li:first-child .button { + border-left: 0; } + .button-group.even-4 li button, .button-group.even-4 li .button { + width: 100%; } + .button-group.even-5 li { + margin: 0 -2px; + display: inline-block; + width: 20%; } + .button-group.even-5 li > button, .button-group.even-5 li .button { + border-left: 1px solid; + border-color: rgba(255, 255, 255, 0.5); } + .button-group.even-5 li:first-child button, .button-group.even-5 li:first-child .button { + border-left: 0; } + .button-group.even-5 li button, .button-group.even-5 li .button { + width: 100%; } + .button-group.even-6 li { + margin: 0 -2px; + display: inline-block; + width: 16.66667%; } + .button-group.even-6 li > button, .button-group.even-6 li .button { + border-left: 1px solid; + border-color: rgba(255, 255, 255, 0.5); } + .button-group.even-6 li:first-child button, .button-group.even-6 li:first-child .button { + border-left: 0; } + .button-group.even-6 li button, .button-group.even-6 li .button { + width: 100%; } + .button-group.even-7 li { + margin: 0 -2px; + display: inline-block; + width: 14.28571%; } + .button-group.even-7 li > button, .button-group.even-7 li .button { + border-left: 1px solid; + border-color: rgba(255, 255, 255, 0.5); } + .button-group.even-7 li:first-child button, .button-group.even-7 li:first-child .button { + border-left: 0; } + .button-group.even-7 li button, .button-group.even-7 li .button { + width: 100%; } + .button-group.even-8 li { + margin: 0 -2px; + display: inline-block; + width: 12.5%; } + .button-group.even-8 li > button, .button-group.even-8 li .button { + border-left: 1px solid; + border-color: rgba(255, 255, 255, 0.5); } + .button-group.even-8 li:first-child button, .button-group.even-8 li:first-child .button { + border-left: 0; } + .button-group.even-8 li button, .button-group.even-8 li .button { + width: 100%; } + .button-group > li { + margin: 0 -2px; + display: inline-block; } + .button-group > li > button, .button-group > li .button { + border-left: 1px solid; + border-color: rgba(255, 255, 255, 0.5); } + .button-group > li:first-child button, .button-group > li:first-child .button { + border-left: 0; } + .button-group.stack > li { + margin: 0 -2px; + display: inline-block; + display: block; + margin: 0; + float: none; } + .button-group.stack > li > button, .button-group.stack > li .button { + border-left: 1px solid; + border-color: rgba(255, 255, 255, 0.5); } + .button-group.stack > li:first-child button, .button-group.stack > li:first-child .button { + border-left: 0; } + .button-group.stack > li > button, .button-group.stack > li .button { + border-top: 1px solid; + border-color: rgba(255, 255, 255, 0.5); + border-left-width: 0; + margin: 0; + display: block; } + .button-group.stack > li > button { + width: 100%; } + .button-group.stack > li:first-child button, .button-group.stack > li:first-child .button { + border-top: 0; } + .button-group.stack-for-small > li { + margin: 0 -2px; + display: inline-block; } + .button-group.stack-for-small > li > button, .button-group.stack-for-small > li .button { + border-left: 1px solid; + border-color: rgba(255, 255, 255, 0.5); } + .button-group.stack-for-small > li:first-child button, .button-group.stack-for-small > li:first-child .button { + border-left: 0; } + @media only screen and (max-width: 40em) { + .button-group.stack-for-small > li { + margin: 0 -2px; + display: inline-block; + display: block; + margin: 0; } + .button-group.stack-for-small > li > button, .button-group.stack-for-small > li .button { + border-left: 1px solid; + border-color: rgba(255, 255, 255, 0.5); } + .button-group.stack-for-small > li:first-child button, .button-group.stack-for-small > li:first-child .button { + border-left: 0; } + .button-group.stack-for-small > li > button, .button-group.stack-for-small > li .button { + border-top: 1px solid; + border-color: rgba(255, 255, 255, 0.5); + border-left-width: 0; + margin: 0; + display: block; } + .button-group.stack-for-small > li > button { + width: 100%; } + .button-group.stack-for-small > li:first-child button, .button-group.stack-for-small > li:first-child .button { + border-top: 0; } } + .button-group.radius > * { + margin: 0 -2px; + display: inline-block; } + .button-group.radius > * > button, .button-group.radius > * .button { + border-left: 1px solid; + border-color: rgba(255, 255, 255, 0.5); } + .button-group.radius > *:first-child button, .button-group.radius > *:first-child .button { + border-left: 0; } + .button-group.radius > *, .button-group.radius > * > a, .button-group.radius > * > button, .button-group.radius > * > .button { + border-radius: 0; } + .button-group.radius > *:first-child, .button-group.radius > *:first-child > a, .button-group.radius > *:first-child > button, .button-group.radius > *:first-child > .button { + -webkit-border-bottom-left-radius: 3px; + -webkit-border-top-left-radius: 3px; + border-bottom-left-radius: 3px; + border-top-left-radius: 3px; } + .button-group.radius > *:last-child, .button-group.radius > *:last-child > a, .button-group.radius > *:last-child > button, .button-group.radius > *:last-child > .button { + -webkit-border-bottom-right-radius: 3px; + -webkit-border-top-right-radius: 3px; + border-bottom-right-radius: 3px; + border-top-right-radius: 3px; } + .button-group.radius.stack > * { + margin: 0 -2px; + display: inline-block; + display: block; + margin: 0; } + .button-group.radius.stack > * > button, .button-group.radius.stack > * .button { + border-left: 1px solid; + border-color: rgba(255, 255, 255, 0.5); } + .button-group.radius.stack > *:first-child button, .button-group.radius.stack > *:first-child .button { + border-left: 0; } + .button-group.radius.stack > * > button, .button-group.radius.stack > * .button { + border-top: 1px solid; + border-color: rgba(255, 255, 255, 0.5); + border-left-width: 0; + margin: 0; + display: block; } + .button-group.radius.stack > * > button { + width: 100%; } + .button-group.radius.stack > *:first-child button, .button-group.radius.stack > *:first-child .button { + border-top: 0; } + .button-group.radius.stack > *, .button-group.radius.stack > * > a, .button-group.radius.stack > * > button, .button-group.radius.stack > * > .button { + border-radius: 0; } + .button-group.radius.stack > *:first-child, .button-group.radius.stack > *:first-child > a, .button-group.radius.stack > *:first-child > button, .button-group.radius.stack > *:first-child > .button { + -webkit-top-left-radius: 3px; + -webkit-top-right-radius: 3px; + border-top-left-radius: 3px; + border-top-right-radius: 3px; } + .button-group.radius.stack > *:last-child, .button-group.radius.stack > *:last-child > a, .button-group.radius.stack > *:last-child > button, .button-group.radius.stack > *:last-child > .button { + -webkit-bottom-left-radius: 3px; + -webkit-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px; } + @media only screen and (min-width: 40.063em) { + .button-group.radius.stack-for-small > * { + margin: 0 -2px; + display: inline-block; } + .button-group.radius.stack-for-small > * > button, .button-group.radius.stack-for-small > * .button { + border-left: 1px solid; + border-color: rgba(255, 255, 255, 0.5); } + .button-group.radius.stack-for-small > *:first-child button, .button-group.radius.stack-for-small > *:first-child .button { + border-left: 0; } + .button-group.radius.stack-for-small > *, .button-group.radius.stack-for-small > * > a, .button-group.radius.stack-for-small > * > button, .button-group.radius.stack-for-small > * > .button { + border-radius: 0; } + .button-group.radius.stack-for-small > *:first-child, .button-group.radius.stack-for-small > *:first-child > a, .button-group.radius.stack-for-small > *:first-child > button, .button-group.radius.stack-for-small > *:first-child > .button { + -webkit-border-bottom-left-radius: 3px; + -webkit-border-top-left-radius: 3px; + border-bottom-left-radius: 3px; + border-top-left-radius: 3px; } + .button-group.radius.stack-for-small > *:last-child, .button-group.radius.stack-for-small > *:last-child > a, .button-group.radius.stack-for-small > *:last-child > button, .button-group.radius.stack-for-small > *:last-child > .button { + -webkit-border-bottom-right-radius: 3px; + -webkit-border-top-right-radius: 3px; + border-bottom-right-radius: 3px; + border-top-right-radius: 3px; } } + @media only screen and (max-width: 40em) { + .button-group.radius.stack-for-small > * { + margin: 0 -2px; + display: inline-block; + display: block; + margin: 0; } + .button-group.radius.stack-for-small > * > button, .button-group.radius.stack-for-small > * .button { + border-left: 1px solid; + border-color: rgba(255, 255, 255, 0.5); } + .button-group.radius.stack-for-small > *:first-child button, .button-group.radius.stack-for-small > *:first-child .button { + border-left: 0; } + .button-group.radius.stack-for-small > * > button, .button-group.radius.stack-for-small > * .button { + border-top: 1px solid; + border-color: rgba(255, 255, 255, 0.5); + border-left-width: 0; + margin: 0; + display: block; } + .button-group.radius.stack-for-small > * > button { + width: 100%; } + .button-group.radius.stack-for-small > *:first-child button, .button-group.radius.stack-for-small > *:first-child .button { + border-top: 0; } + .button-group.radius.stack-for-small > *, .button-group.radius.stack-for-small > * > a, .button-group.radius.stack-for-small > * > button, .button-group.radius.stack-for-small > * > .button { + border-radius: 0; } + .button-group.radius.stack-for-small > *:first-child, .button-group.radius.stack-for-small > *:first-child > a, .button-group.radius.stack-for-small > *:first-child > button, .button-group.radius.stack-for-small > *:first-child > .button { + -webkit-top-left-radius: 3px; + -webkit-top-right-radius: 3px; + border-top-left-radius: 3px; + border-top-right-radius: 3px; } + .button-group.radius.stack-for-small > *:last-child, .button-group.radius.stack-for-small > *:last-child > a, .button-group.radius.stack-for-small > *:last-child > button, .button-group.radius.stack-for-small > *:last-child > .button { + -webkit-bottom-left-radius: 3px; + -webkit-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px; } } + .button-group.round > * { + margin: 0 -2px; + display: inline-block; } + .button-group.round > * > button, .button-group.round > * .button { + border-left: 1px solid; + border-color: rgba(255, 255, 255, 0.5); } + .button-group.round > *:first-child button, .button-group.round > *:first-child .button { + border-left: 0; } + .button-group.round > *, .button-group.round > * > a, .button-group.round > * > button, .button-group.round > * > .button { + border-radius: 0; } + .button-group.round > *:first-child, .button-group.round > *:first-child > a, .button-group.round > *:first-child > button, .button-group.round > *:first-child > .button { + -webkit-border-bottom-left-radius: 1000px; + -webkit-border-top-left-radius: 1000px; + border-bottom-left-radius: 1000px; + border-top-left-radius: 1000px; } + .button-group.round > *:last-child, .button-group.round > *:last-child > a, .button-group.round > *:last-child > button, .button-group.round > *:last-child > .button { + -webkit-border-bottom-right-radius: 1000px; + -webkit-border-top-right-radius: 1000px; + border-bottom-right-radius: 1000px; + border-top-right-radius: 1000px; } + .button-group.round.stack > * { + margin: 0 -2px; + display: inline-block; + display: block; + margin: 0; } + .button-group.round.stack > * > button, .button-group.round.stack > * .button { + border-left: 1px solid; + border-color: rgba(255, 255, 255, 0.5); } + .button-group.round.stack > *:first-child button, .button-group.round.stack > *:first-child .button { + border-left: 0; } + .button-group.round.stack > * > button, .button-group.round.stack > * .button { + border-top: 1px solid; + border-color: rgba(255, 255, 255, 0.5); + border-left-width: 0; + margin: 0; + display: block; } + .button-group.round.stack > * > button { + width: 100%; } + .button-group.round.stack > *:first-child button, .button-group.round.stack > *:first-child .button { + border-top: 0; } + .button-group.round.stack > *, .button-group.round.stack > * > a, .button-group.round.stack > * > button, .button-group.round.stack > * > .button { + border-radius: 0; } + .button-group.round.stack > *:first-child, .button-group.round.stack > *:first-child > a, .button-group.round.stack > *:first-child > button, .button-group.round.stack > *:first-child > .button { + -webkit-top-left-radius: 1rem; + -webkit-top-right-radius: 1rem; + border-top-left-radius: 1rem; + border-top-right-radius: 1rem; } + .button-group.round.stack > *:last-child, .button-group.round.stack > *:last-child > a, .button-group.round.stack > *:last-child > button, .button-group.round.stack > *:last-child > .button { + -webkit-bottom-left-radius: 1rem; + -webkit-bottom-right-radius: 1rem; + border-bottom-left-radius: 1rem; + border-bottom-right-radius: 1rem; } + @media only screen and (min-width: 40.063em) { + .button-group.round.stack-for-small > * { + margin: 0 -2px; + display: inline-block; } + .button-group.round.stack-for-small > * > button, .button-group.round.stack-for-small > * .button { + border-left: 1px solid; + border-color: rgba(255, 255, 255, 0.5); } + .button-group.round.stack-for-small > *:first-child button, .button-group.round.stack-for-small > *:first-child .button { + border-left: 0; } + .button-group.round.stack-for-small > *, .button-group.round.stack-for-small > * > a, .button-group.round.stack-for-small > * > button, .button-group.round.stack-for-small > * > .button { + border-radius: 0; } + .button-group.round.stack-for-small > *:first-child, .button-group.round.stack-for-small > *:first-child > a, .button-group.round.stack-for-small > *:first-child > button, .button-group.round.stack-for-small > *:first-child > .button { + -webkit-border-bottom-left-radius: 1000px; + -webkit-border-top-left-radius: 1000px; + border-bottom-left-radius: 1000px; + border-top-left-radius: 1000px; } + .button-group.round.stack-for-small > *:last-child, .button-group.round.stack-for-small > *:last-child > a, .button-group.round.stack-for-small > *:last-child > button, .button-group.round.stack-for-small > *:last-child > .button { + -webkit-border-bottom-right-radius: 1000px; + -webkit-border-top-right-radius: 1000px; + border-bottom-right-radius: 1000px; + border-top-right-radius: 1000px; } } + @media only screen and (max-width: 40em) { + .button-group.round.stack-for-small > * { + margin: 0 -2px; + display: inline-block; + display: block; + margin: 0; } + .button-group.round.stack-for-small > * > button, .button-group.round.stack-for-small > * .button { + border-left: 1px solid; + border-color: rgba(255, 255, 255, 0.5); } + .button-group.round.stack-for-small > *:first-child button, .button-group.round.stack-for-small > *:first-child .button { + border-left: 0; } + .button-group.round.stack-for-small > * > button, .button-group.round.stack-for-small > * .button { + border-top: 1px solid; + border-color: rgba(255, 255, 255, 0.5); + border-left-width: 0; + margin: 0; + display: block; } + .button-group.round.stack-for-small > * > button { + width: 100%; } + .button-group.round.stack-for-small > *:first-child button, .button-group.round.stack-for-small > *:first-child .button { + border-top: 0; } + .button-group.round.stack-for-small > *, .button-group.round.stack-for-small > * > a, .button-group.round.stack-for-small > * > button, .button-group.round.stack-for-small > * > .button { + border-radius: 0; } + .button-group.round.stack-for-small > *:first-child, .button-group.round.stack-for-small > *:first-child > a, .button-group.round.stack-for-small > *:first-child > button, .button-group.round.stack-for-small > *:first-child > .button { + -webkit-top-left-radius: 1rem; + -webkit-top-right-radius: 1rem; + border-top-left-radius: 1rem; + border-top-right-radius: 1rem; } + .button-group.round.stack-for-small > *:last-child, .button-group.round.stack-for-small > *:last-child > a, .button-group.round.stack-for-small > *:last-child > button, .button-group.round.stack-for-small > *:last-child > .button { + -webkit-bottom-left-radius: 1rem; + -webkit-bottom-right-radius: 1rem; + border-bottom-left-radius: 1rem; + border-bottom-right-radius: 1rem; } } + +.button-bar:before, .button-bar:after { + content: " "; + display: table; } +.button-bar:after { + clear: both; } +.button-bar .button-group { + float: left; + margin-right: 0.625rem; } + .button-bar .button-group div { + overflow: hidden; } + +/* Panels */ +.panel { + border-style: solid; + border-width: 1px; + border-color: #d8d8d8; + margin-bottom: 1.25rem; + padding: 1.25rem; + background: #f2f2f2; + color: #333333; } + .panel > :first-child { + margin-top: 0; } + .panel > :last-child { + margin-bottom: 0; } + .panel h1, .panel h2, .panel h3, .panel h4, .panel h5, .panel h6, .panel p, .panel li, .panel dl { + color: #333333; } + .panel h1, .panel h2, .panel h3, .panel h4, .panel h5, .panel h6 { + line-height: 1; + margin-bottom: 0.625rem; } + .panel h1.subheader, .panel h2.subheader, .panel h3.subheader, .panel h4.subheader, .panel h5.subheader, .panel h6.subheader { + line-height: 1.4; } + .panel.callout { + border-style: solid; + border-width: 1px; + border-color: #b6edff; + margin-bottom: 1.25rem; + padding: 1.25rem; + background: #ecfaff; + color: #333333; } + .panel.callout > :first-child { + margin-top: 0; } + .panel.callout > :last-child { + margin-bottom: 0; } + .panel.callout h1, .panel.callout h2, .panel.callout h3, .panel.callout h4, .panel.callout h5, .panel.callout h6, .panel.callout p, .panel.callout li, .panel.callout dl { + color: #333333; } + .panel.callout h1, .panel.callout h2, .panel.callout h3, .panel.callout h4, .panel.callout h5, .panel.callout h6 { + line-height: 1; + margin-bottom: 0.625rem; } + .panel.callout h1.subheader, .panel.callout h2.subheader, .panel.callout h3.subheader, .panel.callout h4.subheader, .panel.callout h5.subheader, .panel.callout h6.subheader { + line-height: 1.4; } + .panel.callout a:not(.button) { + color: #008CBA; } + .panel.callout a:not(.button):hover, .panel.callout a:not(.button):focus { + color: #0078a0; } + .panel.radius { + border-radius: 3px; } + +.dropdown.button, button.dropdown { + position: relative; + outline: none; + padding-right: 3.5625rem; } + .dropdown.button::after, button.dropdown::after { + position: absolute; + content: ""; + width: 0; + height: 0; + display: block; + border-style: solid; + border-color: #FFFFFF transparent transparent transparent; + top: 50%; } + .dropdown.button::after, button.dropdown::after { + border-width: 0.375rem; + right: 1.40625rem; + margin-top: -0.15625rem; } + .dropdown.button::after, button.dropdown::after { + border-color: #FFFFFF transparent transparent transparent; } + .dropdown.button.tiny, button.dropdown.tiny { + padding-right: 2.625rem; } + .dropdown.button.tiny:after, button.dropdown.tiny:after { + border-width: 0.375rem; + right: 1.125rem; + margin-top: -0.125rem; } + .dropdown.button.tiny::after, button.dropdown.tiny::after { + border-color: #FFFFFF transparent transparent transparent; } + .dropdown.button.small, button.dropdown.small { + padding-right: 3.0625rem; } + .dropdown.button.small::after, button.dropdown.small::after { + border-width: 0.4375rem; + right: 1.3125rem; + margin-top: -0.15625rem; } + .dropdown.button.small::after, button.dropdown.small::after { + border-color: #FFFFFF transparent transparent transparent; } + .dropdown.button.large, button.dropdown.large { + padding-right: 3.625rem; } + .dropdown.button.large::after, button.dropdown.large::after { + border-width: 0.3125rem; + right: 1.71875rem; + margin-top: -0.15625rem; } + .dropdown.button.large::after, button.dropdown.large::after { + border-color: #FFFFFF transparent transparent transparent; } + .dropdown.button.secondary:after, button.dropdown.secondary:after { + border-color: #333333 transparent transparent transparent; } + +/* Image Thumbnails */ +.th { + line-height: 0; + display: inline-block; + border: solid 4px #FFFFFF; + max-width: 100%; + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); + transition: all 200ms ease-out; } + .th:hover, .th:focus { + box-shadow: 0 0 6px 1px rgba(0, 140, 186, 0.5); } + .th.radius { + border-radius: 3px; } + +.toolbar { + background: #333333; + width: 100%; + font-size: 0; + display: inline-block; } + .toolbar.label-bottom .tab .tab-content i, .toolbar.label-bottom .tab .tab-content img { + margin-bottom: 10px; } + .toolbar.label-right .tab .tab-content i, .toolbar.label-right .tab .tab-content img { + margin-right: 10px; + display: inline-block; } + .toolbar.label-right .tab .tab-content label { + display: inline-block; } + .toolbar.vertical.label-right .tab .tab-content { + text-align: left; } + .toolbar.vertical { + height: 100%; + width: auto; } + .toolbar.vertical .tab { + width: auto; + margin: auto; + float: none; } + .toolbar .tab { + text-align: center; + width: 25%; + margin: 0 auto; + display: block; + padding: 20px; + float: left; } + .toolbar .tab:hover { + background: rgba(255, 255, 255, 0.1); } + +.toolbar .tab-content { + font-size: 16px; + text-align: center; } + .toolbar .tab-content label { + color: #CCCCCC; } + .toolbar .tab-content i { + font-size: 30px; + display: block; + margin: 0 auto; + color: #CCCCCC; + vertical-align: middle; } + .toolbar .tab-content img { + width: 30px; + height: 30px; + display: block; + margin: 0 auto; } + +/* Pricing Tables */ +.pricing-table { + border: solid 1px #DDDDDD; + margin-left: 0; + margin-bottom: 1.25rem; } + .pricing-table * { + list-style: none; + line-height: 1; } + .pricing-table .title { + background-color: #333333; + padding: 0.9375rem 1.25rem; + text-align: center; + color: #EEEEEE; + font-weight: normal; + font-size: 1rem; + font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; } + .pricing-table .price { + background-color: #F6F6F6; + padding: 0.9375rem 1.25rem; + text-align: center; + color: #333333; + font-weight: normal; + font-size: 2rem; + font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; } + .pricing-table .description { + background-color: #FFFFFF; + padding: 0.9375rem; + text-align: center; + color: #777777; + font-size: 0.75rem; + font-weight: normal; + line-height: 1.4; + border-bottom: dotted 1px #DDDDDD; } + .pricing-table .bullet-item { + background-color: #FFFFFF; + padding: 0.9375rem; + text-align: center; + color: #333333; + font-size: 0.875rem; + font-weight: normal; + border-bottom: dotted 1px #DDDDDD; } + .pricing-table .cta-button { + background-color: #FFFFFF; + text-align: center; + padding: 1.25rem 1.25rem 0; } + +@-webkit-keyframes rotate { + from { + -webkit-transform: rotate(0deg); } + to { + -webkit-transform: rotate(360deg); } } +@-moz-keyframes rotate { + from { + -moz-transform: rotate(0deg); } + to { + -moz-transform: rotate(360deg); } } +@-o-keyframes rotate { + from { + -o-transform: rotate(0deg); } + to { + -o-transform: rotate(360deg); } } +@keyframes rotate { + from { + transform: rotate(0deg); } + to { + transform: rotate(360deg); } } +/* Orbit Graceful Loading */ +.slideshow-wrapper { + position: relative; } + .slideshow-wrapper ul { + list-style-type: none; + margin: 0; } + .slideshow-wrapper ul li, + .slideshow-wrapper ul li .orbit-caption { + display: none; } + .slideshow-wrapper ul li:first-child { + display: block; } + .slideshow-wrapper .orbit-container { + background-color: transparent; } + .slideshow-wrapper .orbit-container li { + display: block; } + .slideshow-wrapper .orbit-container li .orbit-caption { + display: block; } + .slideshow-wrapper .orbit-container .orbit-bullets li { + display: inline-block; } + .slideshow-wrapper .preloader { + display: block; + width: 40px; + height: 40px; + position: absolute; + top: 50%; + left: 50%; + margin-top: -20px; + margin-left: -20px; + border: solid 3px; + border-color: #555555 #FFFFFF; + border-radius: 1000px; + animation-name: rotate; + animation-duration: 1.5s; + animation-iteration-count: infinite; + animation-timing-function: linear; } + +.orbit-container { + overflow: hidden; + width: 100%; + position: relative; + background: none; } + .orbit-container .orbit-slides-container { + list-style: none; + margin: 0; + padding: 0; + position: relative; + -webkit-transform: translateZ(0); } + .orbit-container .orbit-slides-container img { + display: block; + max-width: 100%; } + .orbit-container .orbit-slides-container > * { + position: absolute; + top: 0; + width: 100%; + margin-left: 100%; } + .orbit-container .orbit-slides-container > *:first-child { + margin-left: 0; } + .orbit-container .orbit-slides-container > * .orbit-caption { + position: absolute; + bottom: 0; + background-color: rgba(51, 51, 51, 0.8); + color: #FFFFFF; + width: 100%; + padding: 0.625rem 0.875rem; + font-size: 0.875rem; } + .orbit-container .orbit-slide-number { + position: absolute; + top: 10px; + left: 10px; + font-size: 12px; + color: #FFFFFF; + background: transparent; + z-index: 10; } + .orbit-container .orbit-slide-number span { + font-weight: 700; + padding: 0.3125rem; } + .orbit-container .orbit-timer { + position: absolute; + top: 12px; + right: 10px; + height: 6px; + width: 100px; + z-index: 10; } + .orbit-container .orbit-timer .orbit-progress { + height: 3px; + background-color: rgba(255, 255, 255, 0.3); + display: block; + width: 0; + position: relative; + right: 20px; + top: 5px; } + .orbit-container .orbit-timer > span { + display: none; + position: absolute; + top: 0; + right: 0; + width: 11px; + height: 14px; + border: solid 4px #FFFFFF; + border-top: none; + border-bottom: none; } + .orbit-container .orbit-timer.paused > span { + right: -4px; + top: 0; + width: 11px; + height: 14px; + border: inset 8px; + border-left-style: solid; + border-color: transparent; + border-left-color: #FFFFFF; } + .orbit-container .orbit-timer.paused > span.dark { + border-left-color: #333333; } + .orbit-container:hover .orbit-timer > span { + display: block; } + .orbit-container .orbit-prev, + .orbit-container .orbit-next { + position: absolute; + top: 45%; + margin-top: -25px; + width: 36px; + height: 60px; + line-height: 50px; + color: white; + background-color: transparent; + text-indent: -9999px !important; + z-index: 10; } + .orbit-container .orbit-prev:hover, + .orbit-container .orbit-next:hover { + background-color: rgba(0, 0, 0, 0.3); } + .orbit-container .orbit-prev > span, + .orbit-container .orbit-next > span { + position: absolute; + top: 50%; + margin-top: -10px; + display: block; + width: 0; + height: 0; + border: inset 10px; } + .orbit-container .orbit-prev { + left: 0; } + .orbit-container .orbit-prev > span { + border-right-style: solid; + border-color: transparent; + border-right-color: #FFFFFF; } + .orbit-container .orbit-prev:hover > span { + border-right-color: #FFFFFF; } + .orbit-container .orbit-next { + right: 0; } + .orbit-container .orbit-next > span { + border-color: transparent; + border-left-style: solid; + border-left-color: #FFFFFF; + left: 50%; + margin-left: -4px; } + .orbit-container .orbit-next:hover > span { + border-left-color: #FFFFFF; } + +.orbit-bullets-container { + text-align: center; } + +.orbit-bullets { + margin: 0 auto 30px auto; + overflow: hidden; + position: relative; + top: 10px; + float: none; + text-align: center; + display: block; } + .orbit-bullets li { + cursor: pointer; + display: inline-block; + width: 0.5625rem; + height: 0.5625rem; + background: #CCCCCC; + float: none; + margin-right: 6px; + border-radius: 1000px; } + .orbit-bullets li.active { + background: #999999; } + .orbit-bullets li:last-child { + margin-right: 0; } + +.touch .orbit-container .orbit-prev, +.touch .orbit-container .orbit-next { + display: none; } +.touch .orbit-bullets { + display: none; } + +@media only screen and (min-width: 40.063em) { + .touch .orbit-container .orbit-prev, + .touch .orbit-container .orbit-next { + display: inherit; } + .touch .orbit-bullets { + display: block; } } +@media only screen and (max-width: 40em) { + .orbit-stack-on-small .orbit-slides-container { + height: auto !important; } + .orbit-stack-on-small .orbit-slides-container > * { + position: relative; + margin: 0 !important; + opacity: 1 !important; } + .orbit-stack-on-small .orbit-slide-number { + display: none; } + + .orbit-timer { + display: none; } + + .orbit-next, .orbit-prev { + display: none; } + + .orbit-bullets { + display: none; } } +[data-magellan-expedition], [data-magellan-expedition-clone] { + background: #FFFFFF; + z-index: 50; + min-width: 100%; + padding: 10px; } + [data-magellan-expedition] .sub-nav, [data-magellan-expedition-clone] .sub-nav { + margin-bottom: 0; } + [data-magellan-expedition] .sub-nav dd, [data-magellan-expedition-clone] .sub-nav dd { + margin-bottom: 0; } + [data-magellan-expedition] .sub-nav a, [data-magellan-expedition-clone] .sub-nav a { + line-height: 1.8em; } + +.icon-bar { + width: 100%; + font-size: 0; + display: inline-block; + background: #333333; } + .icon-bar > * { + text-align: center; + font-size: 1rem; + width: 25%; + margin: 0 auto; + display: block; + padding: 1.25rem; + float: left; } + .icon-bar > * i, .icon-bar > * img { + display: block; + margin: 0 auto; } + .icon-bar > * i + label, .icon-bar > * img + label { + margin-top: .0625rem; } + .icon-bar > * i { + font-size: 1.875rem; + vertical-align: middle; } + .icon-bar > * img { + width: 1.875rem; + height: 1.875rem; } + .icon-bar.label-right > * i, .icon-bar.label-right > * img { + margin: 0 .0625rem 0 0; + display: inline-block; } + .icon-bar.label-right > * i + label, .icon-bar.label-right > * img + label { + margin-top: 0; } + .icon-bar.label-right > * label { + display: inline-block; } + .icon-bar.vertical.label-right > * { + text-align: left; } + .icon-bar.vertical, .icon-bar.small-vertical { + height: 100%; + width: auto; } + .icon-bar.vertical .item, .icon-bar.small-vertical .item { + width: auto; + margin: auto; + float: none; } + @media only screen and (min-width: 40.063em) { + .icon-bar.medium-vertical { + height: 100%; + width: auto; } + .icon-bar.medium-vertical .item { + width: auto; + margin: auto; + float: none; } } + @media only screen and (min-width: 64.063em) { + .icon-bar.large-vertical { + height: 100%; + width: auto; } + .icon-bar.large-vertical .item { + width: auto; + margin: auto; + float: none; } } + .icon-bar > * { + font-size: 1rem; + padding: 1.25rem; } + .icon-bar > * i + label, .icon-bar > * img + label { + margin-top: .0625rem; } + .icon-bar > * i { + font-size: 1.875rem; } + .icon-bar > * img { + width: 1.875rem; + height: 1.875rem; } + .icon-bar > * label { + color: #FFFFFF; } + .icon-bar > * i { + color: #FFFFFF; } + .icon-bar > a:hover { + background: #008CBA; } + .icon-bar > a:hover label { + color: #FFFFFF; } + .icon-bar > a:hover i { + color: #FFFFFF; } + .icon-bar > a.active { + background: #008CBA; } + .icon-bar > a.active label { + color: #FFFFFF; } + .icon-bar > a.active i { + color: #FFFFFF; } + .icon-bar .item.disabled { + opacity: 0.7; + cursor: not-allowed; + pointer-events: none; } + .icon-bar .item.disabled > * { + opacity: 0.7; + cursor: not-allowed; } + +.icon-bar.two-up .item { + width: 50%; } +.icon-bar.two-up.vertical .item, .icon-bar.two-up.small-vertical .item { + width: auto; } +@media only screen and (min-width: 40.063em) { + .icon-bar.two-up.medium-vertical .item { + width: auto; } } +@media only screen and (min-width: 64.063em) { + .icon-bar.two-up.large-vertical .item { + width: auto; } } +.icon-bar.three-up .item { + width: 33.3333%; } +.icon-bar.three-up.vertical .item, .icon-bar.three-up.small-vertical .item { + width: auto; } +@media only screen and (min-width: 40.063em) { + .icon-bar.three-up.medium-vertical .item { + width: auto; } } +@media only screen and (min-width: 64.063em) { + .icon-bar.three-up.large-vertical .item { + width: auto; } } +.icon-bar.four-up .item { + width: 25%; } +.icon-bar.four-up.vertical .item, .icon-bar.four-up.small-vertical .item { + width: auto; } +@media only screen and (min-width: 40.063em) { + .icon-bar.four-up.medium-vertical .item { + width: auto; } } +@media only screen and (min-width: 64.063em) { + .icon-bar.four-up.large-vertical .item { + width: auto; } } +.icon-bar.five-up .item { + width: 20%; } +.icon-bar.five-up.vertical .item, .icon-bar.five-up.small-vertical .item { + width: auto; } +@media only screen and (min-width: 40.063em) { + .icon-bar.five-up.medium-vertical .item { + width: auto; } } +@media only screen and (min-width: 64.063em) { + .icon-bar.five-up.large-vertical .item { + width: auto; } } +.icon-bar.six-up .item { + width: 16.66667%; } +.icon-bar.six-up.vertical .item, .icon-bar.six-up.small-vertical .item { + width: auto; } +@media only screen and (min-width: 40.063em) { + .icon-bar.six-up.medium-vertical .item { + width: auto; } } +@media only screen and (min-width: 64.063em) { + .icon-bar.six-up.large-vertical .item { + width: auto; } } +.icon-bar.seven-up .item { + width: 14.28571%; } +.icon-bar.seven-up.vertical .item, .icon-bar.seven-up.small-vertical .item { + width: auto; } +@media only screen and (min-width: 40.063em) { + .icon-bar.seven-up.medium-vertical .item { + width: auto; } } +@media only screen and (min-width: 64.063em) { + .icon-bar.seven-up.large-vertical .item { + width: auto; } } +.icon-bar.eight-up .item { + width: 12.5%; } +.icon-bar.eight-up.vertical .item, .icon-bar.eight-up.small-vertical .item { + width: auto; } +@media only screen and (min-width: 40.063em) { + .icon-bar.eight-up.medium-vertical .item { + width: auto; } } +@media only screen and (min-width: 64.063em) { + .icon-bar.eight-up.large-vertical .item { + width: auto; } } + +.tabs { + margin-bottom: 0 !important; + margin-left: 0; } + .tabs:before, .tabs:after { + content: " "; + display: table; } + .tabs:after { + clear: both; } + .tabs dd, .tabs .tab-title { + position: relative; + margin-bottom: 0 !important; + list-style: none; + float: left; } + .tabs dd > a, .tabs .tab-title > a { + display: block; + background-color: #EFEFEF; + color: #222222; + padding: 1rem 2rem; + font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; + font-size: 1rem; } + .tabs dd > a:hover, .tabs .tab-title > a:hover { + background-color: #e1e1e1; } + .tabs dd > a:focus, .tabs .tab-title > a:focus { + outline: none; } + .tabs dd.active a, .tabs .tab-title.active a { + background-color: #FFFFFF; + color: #222222; } + .tabs.radius dd:first-child a, .tabs.radius .tab:first-child a { + -webkit-border-bottom-left-radius: 3px; + -webkit-border-top-left-radius: 3px; + border-bottom-left-radius: 3px; + border-top-left-radius: 3px; } + .tabs.radius dd:last-child a, .tabs.radius .tab:last-child a { + -webkit-border-bottom-right-radius: 3px; + -webkit-border-top-right-radius: 3px; + border-bottom-right-radius: 3px; + border-top-right-radius: 3px; } + .tabs.vertical dd, .tabs.vertical .tab-title { + position: inherit; + float: none; + display: block; + top: auto; } + +.tabs-content { + margin-bottom: 1.5rem; + width: 100%; } + .tabs-content:before, .tabs-content:after { + content: " "; + display: table; } + .tabs-content:after { + clear: both; } + .tabs-content > .content { + display: none; + float: left; + padding: 0.9375rem 0; + width: 100%; } + .tabs-content > .content.active { + display: block; + float: none; } + .tabs-content > .content.contained { + padding: 0.9375rem; } + .tabs-content.vertical { + display: block; } + .tabs-content.vertical > .content { + padding: 0 0.9375rem; } + +@media only screen and (min-width: 40.063em) { + .tabs.vertical { + width: 20%; + max-width: 20%; + float: left; + margin: 0 0 1.25rem; } + + .tabs-content.vertical { + width: 80%; + max-width: 80%; + float: left; + margin-left: -1px; + padding-left: 1rem; } } +.no-js .tabs-content > .content { + display: block; + float: none; } + +ul.pagination { + display: block; + min-height: 1.5rem; + margin-left: -0.3125rem; } + ul.pagination li { + height: 1.5rem; + color: #222222; + font-size: 0.875rem; + margin-left: 0.3125rem; } + ul.pagination li a, ul.pagination li button { + display: block; + padding: 0.0625rem 0.625rem 0.0625rem; + color: #999999; + background: none; + border-radius: 3px; + font-weight: normal; + font-size: 1em; + line-height: inherit; + transition: background-color 300ms ease-out; } + ul.pagination li:hover a, + ul.pagination li a:focus, ul.pagination li:hover button, + ul.pagination li button:focus { + background: #e6e6e6; } + ul.pagination li.unavailable a, ul.pagination li.unavailable button { + cursor: default; + color: #999999; } + ul.pagination li.unavailable:hover a, ul.pagination li.unavailable a:focus, ul.pagination li.unavailable:hover button, ul.pagination li.unavailable button:focus { + background: transparent; } + ul.pagination li.current a, ul.pagination li.current button { + background: #008CBA; + color: #FFFFFF; + font-weight: bold; + cursor: default; } + ul.pagination li.current a:hover, ul.pagination li.current a:focus, ul.pagination li.current button:hover, ul.pagination li.current button:focus { + background: #008CBA; } + ul.pagination li { + float: left; + display: block; } + +/* Pagination centred wrapper */ +.pagination-centered { + text-align: center; } + .pagination-centered ul.pagination li { + float: none; + display: inline-block; } + +.side-nav { + display: block; + margin: 0; + padding: 0.875rem 0; + list-style-type: none; + list-style-position: outside; + font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; } + .side-nav li { + margin: 0 0 0.4375rem 0; + font-size: 0.875rem; + font-weight: normal; } + .side-nav li a:not(.button) { + display: block; + color: #008CBA; + margin: 0; + padding: 0.4375rem 0.875rem; } + .side-nav li a:not(.button):hover, .side-nav li a:not(.button):focus { + background: rgba(0, 0, 0, 0.025); + color: #1cc7ff; } + .side-nav li.active > a:first-child:not(.button) { + color: #1cc7ff; + font-weight: normal; + font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; } + .side-nav li.divider { + border-top: 1px solid; + height: 0; + padding: 0; + list-style: none; + border-top-color: white; } + .side-nav li.heading { + color: #008CBA; + font-size: 0.875rem; + font-weight: bold; + text-transform: uppercase; } + +.accordion { + margin-bottom: 0; } + .accordion:before, .accordion:after { + content: " "; + display: table; } + .accordion:after { + clear: both; } + .accordion .accordion-navigation, .accordion dd { + display: block; + margin-bottom: 0 !important; } + .accordion .accordion-navigation.active > a, .accordion dd.active > a { + background: #e8e8e8; } + .accordion .accordion-navigation > a, .accordion dd > a { + background: #EFEFEF; + color: #222222; + padding: 1rem; + display: block; + font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; + font-size: 1rem; } + .accordion .accordion-navigation > a:hover, .accordion dd > a:hover { + background: #e3e3e3; } + .accordion .accordion-navigation > .content, .accordion dd > .content { + display: none; + padding: 0.9375rem; } + .accordion .accordion-navigation > .content.active, .accordion dd > .content.active { + display: block; + background: #FFFFFF; } + +.text-left { + text-align: left !important; } + +.text-right { + text-align: right !important; } + +.text-center { + text-align: center !important; } + +.text-justify { + text-align: justify !important; } + +@media only screen and (max-width: 40em) { + .small-only-text-left { + text-align: left !important; } + + .small-only-text-right { + text-align: right !important; } + + .small-only-text-center { + text-align: center !important; } + + .small-only-text-justify { + text-align: justify !important; } } +@media only screen { + .small-text-left { + text-align: left !important; } + + .small-text-right { + text-align: right !important; } + + .small-text-center { + text-align: center !important; } + + .small-text-justify { + text-align: justify !important; } } +@media only screen and (min-width: 40.063em) and (max-width: 64em) { + .medium-only-text-left { + text-align: left !important; } + + .medium-only-text-right { + text-align: right !important; } + + .medium-only-text-center { + text-align: center !important; } + + .medium-only-text-justify { + text-align: justify !important; } } +@media only screen and (min-width: 40.063em) { + .medium-text-left { + text-align: left !important; } + + .medium-text-right { + text-align: right !important; } + + .medium-text-center { + text-align: center !important; } + + .medium-text-justify { + text-align: justify !important; } } +@media only screen and (min-width: 64.063em) and (max-width: 90em) { + .large-only-text-left { + text-align: left !important; } + + .large-only-text-right { + text-align: right !important; } + + .large-only-text-center { + text-align: center !important; } + + .large-only-text-justify { + text-align: justify !important; } } +@media only screen and (min-width: 64.063em) { + .large-text-left { + text-align: left !important; } + + .large-text-right { + text-align: right !important; } + + .large-text-center { + text-align: center !important; } + + .large-text-justify { + text-align: justify !important; } } +@media only screen and (min-width: 90.063em) and (max-width: 120em) { + .xlarge-only-text-left { + text-align: left !important; } + + .xlarge-only-text-right { + text-align: right !important; } + + .xlarge-only-text-center { + text-align: center !important; } + + .xlarge-only-text-justify { + text-align: justify !important; } } +@media only screen and (min-width: 90.063em) { + .xlarge-text-left { + text-align: left !important; } + + .xlarge-text-right { + text-align: right !important; } + + .xlarge-text-center { + text-align: center !important; } + + .xlarge-text-justify { + text-align: justify !important; } } +@media only screen and (min-width: 120.063em) and (max-width: 99999999em) { + .xxlarge-only-text-left { + text-align: left !important; } + + .xxlarge-only-text-right { + text-align: right !important; } + + .xxlarge-only-text-center { + text-align: center !important; } + + .xxlarge-only-text-justify { + text-align: justify !important; } } +@media only screen and (min-width: 120.063em) { + .xxlarge-text-left { + text-align: left !important; } + + .xxlarge-text-right { + text-align: right !important; } + + .xxlarge-text-center { + text-align: center !important; } + + .xxlarge-text-justify { + text-align: justify !important; } } +/* Typography resets */ +div, +dl, +dt, +dd, +ul, +ol, +li, +h1, +h2, +h3, +h4, +h5, +h6, +pre, +form, +p, +blockquote, +th, +td { + margin: 0; + padding: 0; } + +/* Default Link Styles */ +a { + color: #008CBA; + text-decoration: none; + line-height: inherit; } + a:hover, a:focus { + color: #0078a0; } + a img { + border: none; } + +/* Default paragraph styles */ +p { + font-family: inherit; + font-weight: normal; + font-size: 1rem; + line-height: 1.6; + margin-bottom: 1.25rem; + text-rendering: optimizeLegibility; } + p.lead { + font-size: 1.21875rem; + line-height: 1.6; } + p aside { + font-size: 0.875rem; + line-height: 1.35; + font-style: italic; } + +/* Default header styles */ +h1, h2, h3, h4, h5, h6 { + font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; + font-weight: normal; + font-style: normal; + color: #222222; + text-rendering: optimizeLegibility; + margin-top: 0.2rem; + margin-bottom: 0.5rem; + line-height: 1.4; } + h1 small, h2 small, h3 small, h4 small, h5 small, h6 small { + font-size: 60%; + color: #6f6f6f; + line-height: 0; } + +h1 { + font-size: 2.125rem; } + +h2 { + font-size: 1.6875rem; } + +h3 { + font-size: 1.375rem; } + +h4 { + font-size: 1.125rem; } + +h5 { + font-size: 1.125rem; } + +h6 { + font-size: 1rem; } + +.subheader { + line-height: 1.4; + color: #6f6f6f; + font-weight: normal; + margin-top: 0.2rem; + margin-bottom: 0.5rem; } + +hr { + border: solid #DDDDDD; + border-width: 1px 0 0; + clear: both; + margin: 1.25rem 0 1.1875rem; + height: 0; } + +/* Helpful Typography Defaults */ +em, +i { + font-style: italic; + line-height: inherit; } + +strong, +b { + font-weight: bold; + line-height: inherit; } + +small { + font-size: 60%; + line-height: inherit; } + +code { + font-family: Consolas, "Liberation Mono", Courier, monospace; + font-weight: normal; + color: #333333; + background-color: #f8f8f8; + border-width: 1px; + border-style: solid; + border-color: #dfdfdf; + padding: 0.125rem 0.3125rem 0.0625rem; } + +/* Lists */ +ul, +ol, +dl { + font-size: 1rem; + line-height: 1.6; + margin-bottom: 1.25rem; + list-style-position: outside; + font-family: inherit; } + +ul { + margin-left: 1.1rem; } + ul.no-bullet { + margin-left: 0; } + ul.no-bullet li ul, + ul.no-bullet li ol { + margin-left: 1.25rem; + margin-bottom: 0; + list-style: none; } + +/* Unordered Lists */ +ul li ul, +ul li ol { + margin-left: 1.25rem; + margin-bottom: 0; } +ul.square li ul, ul.circle li ul, ul.disc li ul { + list-style: inherit; } +ul.square { + list-style-type: square; + margin-left: 1.1rem; } +ul.circle { + list-style-type: circle; + margin-left: 1.1rem; } +ul.disc { + list-style-type: disc; + margin-left: 1.1rem; } +ul.no-bullet { + list-style: none; } + +/* Ordered Lists */ +ol { + margin-left: 1.4rem; } + ol li ul, + ol li ol { + margin-left: 1.25rem; + margin-bottom: 0; } + +/* Definition Lists */ +dl dt { + margin-bottom: 0.3rem; + font-weight: bold; } +dl dd { + margin-bottom: 0.75rem; } + +/* Abbreviations */ +abbr, +acronym { + text-transform: uppercase; + font-size: 90%; + color: #222; + cursor: help; } + +abbr { + text-transform: none; } + abbr[title] { + border-bottom: 1px dotted #DDDDDD; } + +/* Blockquotes */ +blockquote { + margin: 0 0 1.25rem; + padding: 0.5625rem 1.25rem 0 1.1875rem; + border-left: 1px solid #DDDDDD; } + blockquote cite { + display: block; + font-size: 0.8125rem; + color: #555555; } + blockquote cite:before { + content: "\2014 \0020"; } + blockquote cite a, + blockquote cite a:visited { + color: #555555; } + +blockquote, +blockquote p { + line-height: 1.6; + color: #6f6f6f; } + +/* Microformats */ +.vcard { + display: inline-block; + margin: 0 0 1.25rem 0; + border: 1px solid #DDDDDD; + padding: 0.625rem 0.75rem; } + .vcard li { + margin: 0; + display: block; } + .vcard .fn { + font-weight: bold; + font-size: 0.9375rem; } + +.vevent .summary { + font-weight: bold; } +.vevent abbr { + cursor: default; + text-decoration: none; + font-weight: bold; + border: none; + padding: 0 0.0625rem; } + +@media only screen and (min-width: 40.063em) { + h1, h2, h3, h4, h5, h6 { + line-height: 1.4; } + + h1 { + font-size: 2.75rem; } + + h2 { + font-size: 2.3125rem; } + + h3 { + font-size: 1.6875rem; } + + h4 { + font-size: 1.4375rem; } + + h5 { + font-size: 1.125rem; } + + h6 { + font-size: 1rem; } } +.split.button { + position: relative; + padding-right: 5.0625rem; } + .split.button span { + display: block; + height: 100%; + position: absolute; + right: 0; + top: 0; + border-left: solid 1px; } + .split.button span:after { + position: absolute; + content: ""; + width: 0; + height: 0; + display: block; + border-style: inset; + top: 50%; + left: 50%; } + .split.button span:active { + background-color: rgba(0, 0, 0, 0.1); } + .split.button span { + border-left-color: rgba(255, 255, 255, 0.5); } + .split.button span { + width: 3.09375rem; } + .split.button span:after { + border-top-style: solid; + border-width: 0.375rem; + top: 48%; + margin-left: -0.375rem; } + .split.button span:after { + border-color: #FFFFFF transparent transparent transparent; } + .split.button.secondary span { + border-left-color: rgba(255, 255, 255, 0.5); } + .split.button.secondary span:after { + border-color: #FFFFFF transparent transparent transparent; } + .split.button.alert span { + border-left-color: rgba(255, 255, 255, 0.5); } + .split.button.success span { + border-left-color: rgba(255, 255, 255, 0.5); } + .split.button.tiny { + padding-right: 3.75rem; } + .split.button.tiny span { + width: 2.25rem; } + .split.button.tiny span:after { + border-top-style: solid; + border-width: 0.375rem; + top: 48%; + margin-left: -0.375rem; } + .split.button.small { + padding-right: 4.375rem; } + .split.button.small span { + width: 2.625rem; } + .split.button.small span:after { + border-top-style: solid; + border-width: 0.4375rem; + top: 48%; + margin-left: -0.375rem; } + .split.button.large { + padding-right: 5.5rem; } + .split.button.large span { + width: 3.4375rem; } + .split.button.large span:after { + border-top-style: solid; + border-width: 0.3125rem; + top: 48%; + margin-left: -0.375rem; } + .split.button.expand { + padding-left: 2rem; } + .split.button.secondary span:after { + border-color: #333333 transparent transparent transparent; } + .split.button.radius span { + -webkit-border-bottom-right-radius: 3px; + -webkit-border-top-right-radius: 3px; + border-bottom-right-radius: 3px; + border-top-right-radius: 3px; } + .split.button.round span { + -webkit-border-bottom-right-radius: 1000px; + -webkit-border-top-right-radius: 1000px; + border-bottom-right-radius: 1000px; + border-top-right-radius: 1000px; } + .split.button.no-pip span:before { + border-style: none; } + .split.button.no-pip span:after { + border-style: none; } + .split.button.no-pip span > i { + top: 50%; + display: block; + position: absolute; + left: 50%; + margin-left: -0.28889em; + margin-top: -0.48889em; } + +.reveal-modal-bg { + position: fixed; + top: 0; + bottom: 0; + left: 0; + right: 0; + background: #000000; + background: rgba(0, 0, 0, 0.45); + z-index: 1004; + display: none; + left: 0; } + +.reveal-modal { + visibility: hidden; + display: none; + position: absolute; + z-index: 1005; + width: 100%; + top: 0; + border-radius: 3px; + left: 0; + background-color: #FFFFFF; + padding: 1.875rem; + border: solid 1px #666666; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.4); } + @media only screen and (max-width: 40em) { + .reveal-modal { + min-height: 100vh; } } + .reveal-modal .column, .reveal-modal .columns { + min-width: 0; } + .reveal-modal > :first-child { + margin-top: 0; } + .reveal-modal > :last-child { + margin-bottom: 0; } + @media only screen and (min-width: 40.063em) { + .reveal-modal { + width: 80%; + max-width: 62.5rem; + left: 0; + right: 0; + margin: 0 auto; } } + @media only screen and (min-width: 40.063em) { + .reveal-modal { + top: 6.25rem; } } + .reveal-modal.radius { + border-radius: 3px; } + .reveal-modal.round { + border-radius: 1000px; } + .reveal-modal.collapse { + padding: 0; } + @media only screen and (min-width: 40.063em) { + .reveal-modal.tiny { + width: 30%; + max-width: 62.5rem; + left: 0; + right: 0; + margin: 0 auto; } } + @media only screen and (min-width: 40.063em) { + .reveal-modal.small { + width: 40%; + max-width: 62.5rem; + left: 0; + right: 0; + margin: 0 auto; } } + @media only screen and (min-width: 40.063em) { + .reveal-modal.medium { + width: 60%; + max-width: 62.5rem; + left: 0; + right: 0; + margin: 0 auto; } } + @media only screen and (min-width: 40.063em) { + .reveal-modal.large { + width: 70%; + max-width: 62.5rem; + left: 0; + right: 0; + margin: 0 auto; } } + @media only screen and (min-width: 40.063em) { + .reveal-modal.xlarge { + width: 95%; + max-width: 62.5rem; + left: 0; + right: 0; + margin: 0 auto; } } + .reveal-modal.full { + top: 0; + left: 0; + height: 100%; + height: 100vh; + min-height: 100vh; + max-width: none !important; + margin-left: 0 !important; } + @media only screen and (min-width: 40.063em) { + .reveal-modal.full { + width: 100%; + max-width: 62.5rem; + left: 0; + right: 0; + margin: 0 auto; } } + .reveal-modal.toback { + z-index: 1003; } + .reveal-modal .close-reveal-modal { + font-size: 2.5rem; + line-height: 1; + position: absolute; + top: 0.625rem; + right: 1.375rem; + color: #AAAAAA; + font-weight: bold; + cursor: pointer; } + +/* Tooltips */ +.has-tip { + border-bottom: dotted 1px #CCCCCC; + cursor: help; + font-weight: bold; + color: #333333; } + .has-tip:hover, .has-tip:focus { + border-bottom: dotted 1px #003f54; + color: #008CBA; } + .has-tip.tip-left, .has-tip.tip-right { + float: none !important; } + +.tooltip { + display: none; + position: absolute; + z-index: 1006; + font-weight: normal; + font-size: 0.875rem; + line-height: 1.3; + padding: 0.75rem; + max-width: 300px; + left: 50%; + width: 100%; + color: #FFFFFF; + background: #333333; } + .tooltip > .nub { + display: block; + left: 5px; + position: absolute; + width: 0; + height: 0; + border: solid 5px; + border-color: transparent transparent #333333 transparent; + top: -10px; + pointer-events: none; } + .tooltip > .nub.rtl { + left: auto; + right: 5px; } + .tooltip.radius { + border-radius: 3px; } + .tooltip.round { + border-radius: 1000px; } + .tooltip.round > .nub { + left: 2rem; } + .tooltip.opened { + color: #008CBA !important; + border-bottom: dotted 1px #003f54 !important; } + +.tap-to-close { + display: block; + font-size: 0.625rem; + color: #777777; + font-weight: normal; } + +@media only screen and (min-width: 40.063em) { + .tooltip > .nub { + border-color: transparent transparent #333333 transparent; + top: -10px; } + .tooltip.tip-top > .nub { + border-color: #333333 transparent transparent transparent; + top: auto; + bottom: -10px; } + .tooltip.tip-left, .tooltip.tip-right { + float: none !important; } + .tooltip.tip-left > .nub { + border-color: transparent transparent transparent #333333; + right: -10px; + left: auto; + top: 50%; + margin-top: -5px; } + .tooltip.tip-right > .nub { + border-color: transparent #333333 transparent transparent; + right: auto; + left: -10px; + top: 50%; + margin-top: -5px; } } +/* Clearing Styles */ +.clearing-thumbs, [data-clearing] { + margin-bottom: 0; + margin-left: 0; + list-style: none; } + .clearing-thumbs:before, .clearing-thumbs:after, [data-clearing]:before, [data-clearing]:after { + content: " "; + display: table; } + .clearing-thumbs:after, [data-clearing]:after { + clear: both; } + .clearing-thumbs li, [data-clearing] li { + float: left; + margin-right: 10px; } + .clearing-thumbs[class*="block-grid-"] li, [data-clearing][class*="block-grid-"] li { + margin-right: 0; } + +.clearing-blackout { + background: #333333; + position: fixed; + width: 100%; + height: 100%; + top: 0; + left: 0; + z-index: 998; } + .clearing-blackout .clearing-close { + display: block; } + +.clearing-container { + position: relative; + z-index: 998; + height: 100%; + overflow: hidden; + margin: 0; } + +.clearing-touch-label { + position: absolute; + top: 50%; + left: 50%; + color: #AAAAAA; + font-size: 0.6em; } + +.visible-img { + height: 95%; + position: relative; } + .visible-img img { + position: absolute; + left: 50%; + top: 50%; + transform: translateY(-50%) translateX(-50%); + -webkit-transform: translateY(-50%) translateX(-50%); + -ms-transform: translateY(-50%) translateX(-50%); + max-height: 100%; + max-width: 100%; } + +.clearing-caption { + color: #CCCCCC; + font-size: 0.875em; + line-height: 1.3; + margin-bottom: 0; + text-align: center; + bottom: 0; + background: #333333; + width: 100%; + padding: 10px 30px 20px; + position: absolute; + left: 0; } + +.clearing-close { + z-index: 999; + padding-left: 20px; + padding-top: 10px; + font-size: 30px; + line-height: 1; + color: #CCCCCC; + display: none; } + .clearing-close:hover, .clearing-close:focus { + color: #CCCCCC; } + +.clearing-assembled .clearing-container { + height: 100%; } + .clearing-assembled .clearing-container .carousel > ul { + display: none; } + +.clearing-feature li { + display: none; } + .clearing-feature li.clearing-featured-img { + display: block; } + +@media only screen and (min-width: 40.063em) { + .clearing-main-prev, + .clearing-main-next { + position: absolute; + height: 100%; + width: 40px; + top: 0; } + .clearing-main-prev > span, + .clearing-main-next > span { + position: absolute; + top: 50%; + display: block; + width: 0; + height: 0; + border: solid 12px; } + .clearing-main-prev > span:hover, + .clearing-main-next > span:hover { + opacity: 0.8; } + + .clearing-main-prev { + left: 0; } + .clearing-main-prev > span { + left: 5px; + border-color: transparent; + border-right-color: #CCCCCC; } + + .clearing-main-next { + right: 0; } + .clearing-main-next > span { + border-color: transparent; + border-left-color: #CCCCCC; } + + .clearing-main-prev.disabled, + .clearing-main-next.disabled { + opacity: 0.3; } + + .clearing-assembled .clearing-container .carousel { + background: rgba(51, 51, 51, 0.8); + height: 120px; + margin-top: 10px; + text-align: center; } + .clearing-assembled .clearing-container .carousel > ul { + display: inline-block; + z-index: 999; + height: 100%; + position: relative; + float: none; } + .clearing-assembled .clearing-container .carousel > ul li { + display: block; + width: 120px; + min-height: inherit; + float: left; + overflow: hidden; + margin-right: 0; + padding: 0; + position: relative; + cursor: pointer; + opacity: 0.4; + clear: none; } + .clearing-assembled .clearing-container .carousel > ul li.fix-height img { + height: 100%; + max-width: none; } + .clearing-assembled .clearing-container .carousel > ul li a.th { + border: none; + box-shadow: none; + display: block; } + .clearing-assembled .clearing-container .carousel > ul li img { + cursor: pointer !important; + width: 100% !important; } + .clearing-assembled .clearing-container .carousel > ul li.visible { + opacity: 1; } + .clearing-assembled .clearing-container .carousel > ul li:hover { + opacity: 0.8; } + .clearing-assembled .clearing-container .visible-img { + background: #333333; + overflow: hidden; + height: 85%; } + + .clearing-close { + position: absolute; + top: 10px; + right: 20px; + padding-left: 0; + padding-top: 0; } } +/* Progress Bar */ +.progress { + background-color: #F6F6F6; + height: 1.5625rem; + border: 1px solid white; + padding: 0.125rem; + margin-bottom: 0.625rem; } + .progress .meter { + background: #008CBA; + height: 100%; + display: block; } + .progress.secondary .meter { + background: #e7e7e7; + height: 100%; + display: block; } + .progress.success .meter { + background: #43AC6A; + height: 100%; + display: block; } + .progress.alert .meter { + background: #f04124; + height: 100%; + display: block; } + .progress.radius { + border-radius: 3px; } + .progress.radius .meter { + border-radius: 2px; } + .progress.round { + border-radius: 1000px; } + .progress.round .meter { + border-radius: 999px; } + +.sub-nav { + display: block; + width: auto; + overflow: hidden; + margin-bottom: -0.25rem 0 1.125rem; + padding-top: 0.25rem; } + .sub-nav dt { + text-transform: uppercase; } + .sub-nav dt, + .sub-nav dd, + .sub-nav li { + float: left; + margin-left: 1rem; + margin-bottom: 0; + font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; + font-weight: normal; + font-size: 0.875rem; + color: #999999; } + .sub-nav dt a, + .sub-nav dd a, + .sub-nav li a { + text-decoration: none; + color: #999999; + padding: 0.1875rem 1rem; } + .sub-nav dt a:hover, + .sub-nav dd a:hover, + .sub-nav li a:hover { + color: #737373; } + .sub-nav dt.active a, + .sub-nav dd.active a, + .sub-nav li.active a { + border-radius: 3px; + font-weight: normal; + background: #008CBA; + padding: 0.1875rem 1rem; + cursor: default; + color: #FFFFFF; } + .sub-nav dt.active a:hover, + .sub-nav dd.active a:hover, + .sub-nav li.active a:hover { + background: #0078a0; } + +/* Foundation Joyride */ +.joyride-list { + display: none; } + +/* Default styles for the container */ +.joyride-tip-guide { + display: none; + position: absolute; + background: #333333; + color: #FFFFFF; + z-index: 101; + top: 0; + left: 2.5%; + font-family: inherit; + font-weight: normal; + width: 95%; } + +.lt-ie9 .joyride-tip-guide { + max-width: 800px; + left: 50%; + margin-left: -400px; } + +.joyride-content-wrapper { + width: 100%; + padding: 1.125rem 1.25rem 1.5rem; } + .joyride-content-wrapper .button { + margin-bottom: 0 !important; } + .joyride-content-wrapper .joyride-prev-tip { + margin-right: 10px; } + +/* Add a little css triangle pip, older browser just miss out on the fanciness of it */ +.joyride-tip-guide .joyride-nub { + display: block; + position: absolute; + left: 22px; + width: 0; + height: 0; + border: 10px solid #333333; } + .joyride-tip-guide .joyride-nub.top { + border-top-style: solid; + border-color: #333333; + border-top-color: transparent !important; + border-left-color: transparent !important; + border-right-color: transparent !important; + top: -20px; } + .joyride-tip-guide .joyride-nub.bottom { + border-bottom-style: solid; + border-color: #333333 !important; + border-bottom-color: transparent !important; + border-left-color: transparent !important; + border-right-color: transparent !important; + bottom: -20px; } + .joyride-tip-guide .joyride-nub.right { + right: -20px; } + .joyride-tip-guide .joyride-nub.left { + left: -20px; } + +/* Typography */ +.joyride-tip-guide h1, +.joyride-tip-guide h2, +.joyride-tip-guide h3, +.joyride-tip-guide h4, +.joyride-tip-guide h5, +.joyride-tip-guide h6 { + line-height: 1.25; + margin: 0; + font-weight: bold; + color: #FFFFFF; } + +.joyride-tip-guide p { + margin: 0 0 1.125rem 0; + font-size: 0.875rem; + line-height: 1.3; } + +.joyride-timer-indicator-wrap { + width: 50px; + height: 3px; + border: solid 1px #555555; + position: absolute; + right: 1.0625rem; + bottom: 1rem; } + +.joyride-timer-indicator { + display: block; + width: 0; + height: inherit; + background: #666666; } + +.joyride-close-tip { + position: absolute; + right: 12px; + top: 10px; + color: #777777 !important; + text-decoration: none; + font-size: 24px; + font-weight: normal; + line-height: .5 !important; } + .joyride-close-tip:hover, .joyride-close-tip:focus { + color: #EEEEEE !important; } + +.joyride-modal-bg { + position: fixed; + height: 100%; + width: 100%; + background: transparent; + background: rgba(0, 0, 0, 0.5); + z-index: 100; + display: none; + top: 0; + left: 0; + cursor: pointer; } + +.joyride-expose-wrapper { + background-color: #FFFFFF; + position: absolute; + border-radius: 3px; + z-index: 102; + box-shadow: 0 0 15px #FFFFFF; } + +.joyride-expose-cover { + background: transparent; + border-radius: 3px; + position: absolute; + z-index: 9999; + top: 0; + left: 0; } + +/* Styles for screens that are at least 768px; */ +@media only screen and (min-width: 40.063em) { + .joyride-tip-guide { + width: 300px; + left: inherit; } + .joyride-tip-guide .joyride-nub.bottom { + border-color: #333333 !important; + border-bottom-color: transparent !important; + border-left-color: transparent !important; + border-right-color: transparent !important; + bottom: -20px; } + .joyride-tip-guide .joyride-nub.right { + border-color: #333333 !important; + border-top-color: transparent !important; + border-right-color: transparent !important; + border-bottom-color: transparent !important; + top: 22px; + left: auto; + right: -20px; } + .joyride-tip-guide .joyride-nub.left { + border-color: #333333 !important; + border-top-color: transparent !important; + border-left-color: transparent !important; + border-bottom-color: transparent !important; + top: 22px; + left: -20px; + right: auto; } } +.label { + font-weight: normal; + font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; + text-align: center; + text-decoration: none; + line-height: 1; + white-space: nowrap; + display: inline-block; + position: relative; + margin-bottom: auto; + padding: 0.25rem 0.5rem 0.25rem; + font-size: 0.6875rem; + background-color: #008CBA; + color: #FFFFFF; } + .label.radius { + border-radius: 3px; } + .label.round { + border-radius: 1000px; } + .label.alert { + background-color: #f04124; + color: #FFFFFF; } + .label.warning { + background-color: #f08a24; + color: #FFFFFF; } + .label.success { + background-color: #43AC6A; + color: #FFFFFF; } + .label.secondary { + background-color: #e7e7e7; + color: #333333; } + .label.info { + background-color: #a0d3e8; + color: #333333; } + +.off-canvas-wrap { + -webkit-backface-visibility: hidden; + position: relative; + width: 100%; + overflow: hidden; } + .off-canvas-wrap.move-right, .off-canvas-wrap.move-left { + min-height: 100%; + -webkit-overflow-scrolling: touch; } + +.inner-wrap { + position: relative; + width: 100%; + -webkit-transition: -webkit-transform 500ms ease; + -moz-transition: -moz-transform 500ms ease; + -ms-transition: -ms-transform 500ms ease; + -o-transition: -o-transform 500ms ease; + transition: transform 500ms ease; } + .inner-wrap:before, .inner-wrap:after { + content: " "; + display: table; } + .inner-wrap:after { + clear: both; } + +.tab-bar { + -webkit-backface-visibility: hidden; + background: #333333; + color: #FFFFFF; + height: 2.8125rem; + line-height: 2.8125rem; + position: relative; } + .tab-bar h1, .tab-bar h2, .tab-bar h3, .tab-bar h4, .tab-bar h5, .tab-bar h6 { + color: #FFFFFF; + font-weight: bold; + line-height: 2.8125rem; + margin: 0; } + .tab-bar h1, .tab-bar h2, .tab-bar h3, .tab-bar h4 { + font-size: 1.125rem; } + +.left-small { + width: 2.8125rem; + height: 2.8125rem; + position: absolute; + top: 0; + border-right: solid 1px #1a1a1a; + left: 0; } + +.right-small { + width: 2.8125rem; + height: 2.8125rem; + position: absolute; + top: 0; + border-left: solid 1px #1a1a1a; + right: 0; } + +.tab-bar-section { + padding: 0 0.625rem; + position: absolute; + text-align: center; + height: 2.8125rem; + top: 0; } + @media only screen and (min-width: 40.063em) { + .tab-bar-section.left { + text-align: left; } + .tab-bar-section.right { + text-align: right; } } + .tab-bar-section.left { + left: 0; + right: 2.8125rem; } + .tab-bar-section.right { + left: 2.8125rem; + right: 0; } + .tab-bar-section.middle { + left: 2.8125rem; + right: 2.8125rem; } + +.tab-bar .menu-icon { + text-indent: 2.1875rem; + width: 2.8125rem; + height: 2.8125rem; + display: block; + padding: 0; + color: #FFFFFF; + position: relative; + transform: translate3d(0, 0, 0); } + .tab-bar .menu-icon span::after { + content: ""; + position: absolute; + display: block; + height: 0; + top: 50%; + margin-top: -0.5rem; + left: 0.90625rem; + box-shadow: 0 0 0 1px #FFFFFF, 0 7px 0 1px #FFFFFF, 0 14px 0 1px #FFFFFF; + width: 1rem; } + .tab-bar .menu-icon span:hover:after { + box-shadow: 0 0 0 1px #b3b3b3, 0 7px 0 1px #b3b3b3, 0 14px 0 1px #b3b3b3; } + +.left-off-canvas-menu { + -webkit-backface-visibility: hidden; + width: 15.625rem; + top: 0; + bottom: 0; + position: absolute; + overflow-x: hidden; + overflow-y: auto; + background: #333333; + z-index: 1001; + box-sizing: content-box; + transition: transform 500ms ease 0s; + -webkit-overflow-scrolling: touch; + -ms-overflow-style: -ms-autohiding-scrollbar; + -ms-transform: translate(-100%, 0); + -webkit-transform: translate3d(-100%, 0, 0); + -moz-transform: translate3d(-100%, 0, 0); + -ms-transform: translate3d(-100%, 0, 0); + -o-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); + left: 0; } + .left-off-canvas-menu * { + -webkit-backface-visibility: hidden; } + +.right-off-canvas-menu { + -webkit-backface-visibility: hidden; + width: 15.625rem; + top: 0; + bottom: 0; + position: absolute; + overflow-x: hidden; + overflow-y: auto; + background: #333333; + z-index: 1001; + box-sizing: content-box; + transition: transform 500ms ease 0s; + -webkit-overflow-scrolling: touch; + -ms-overflow-style: -ms-autohiding-scrollbar; + -ms-transform: translate(100%, 0); + -webkit-transform: translate3d(100%, 0, 0); + -moz-transform: translate3d(100%, 0, 0); + -ms-transform: translate3d(100%, 0, 0); + -o-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + right: 0; } + .right-off-canvas-menu * { + -webkit-backface-visibility: hidden; } + +ul.off-canvas-list { + list-style-type: none; + padding: 0; + margin: 0; } + ul.off-canvas-list li label { + display: block; + padding: 0.3rem 0.9375rem; + color: #999999; + text-transform: uppercase; + font-size: 0.75rem; + font-weight: bold; + background: #444444; + border-top: 1px solid #5e5e5e; + border-bottom: none; + margin: 0; } + ul.off-canvas-list li a { + display: block; + padding: 0.66667rem; + color: rgba(255, 255, 255, 0.7); + border-bottom: 1px solid #262626; + transition: background 300ms ease; } + ul.off-canvas-list li a:hover { + background: #242424; } + +.move-right > .inner-wrap { + -ms-transform: translate(15.625rem, 0); + -webkit-transform: translate3d(15.625rem, 0, 0); + -moz-transform: translate3d(15.625rem, 0, 0); + -ms-transform: translate3d(15.625rem, 0, 0); + -o-transform: translate3d(15.625rem, 0, 0); + transform: translate3d(15.625rem, 0, 0); } +.move-right .exit-off-canvas { + -webkit-backface-visibility: hidden; + transition: background 300ms ease; + cursor: pointer; + box-shadow: -4px 0 4px rgba(0, 0, 0, 0.5), 4px 0 4px rgba(0, 0, 0, 0.5); + display: block; + position: absolute; + background: rgba(255, 255, 255, 0.2); + top: 0; + bottom: 0; + left: 0; + right: 0; + z-index: 1002; + -webkit-tap-highlight-color: transparent; } + @media only screen and (min-width: 40.063em) { + .move-right .exit-off-canvas:hover { + background: rgba(255, 255, 255, 0.05); } } + +.move-left > .inner-wrap { + -ms-transform: translate(-15.625rem, 0); + -webkit-transform: translate3d(-15.625rem, 0, 0); + -moz-transform: translate3d(-15.625rem, 0, 0); + -ms-transform: translate3d(-15.625rem, 0, 0); + -o-transform: translate3d(-15.625rem, 0, 0); + transform: translate3d(-15.625rem, 0, 0); } +.move-left .exit-off-canvas { + -webkit-backface-visibility: hidden; + transition: background 300ms ease; + cursor: pointer; + box-shadow: -4px 0 4px rgba(0, 0, 0, 0.5), 4px 0 4px rgba(0, 0, 0, 0.5); + display: block; + position: absolute; + background: rgba(255, 255, 255, 0.2); + top: 0; + bottom: 0; + left: 0; + right: 0; + z-index: 1002; + -webkit-tap-highlight-color: transparent; } + @media only screen and (min-width: 40.063em) { + .move-left .exit-off-canvas:hover { + background: rgba(255, 255, 255, 0.05); } } + +.offcanvas-overlap .left-off-canvas-menu, .offcanvas-overlap .right-off-canvas-menu { + -ms-transform: none; + -webkit-transform: none; + -moz-transform: none; + -o-transform: none; + transform: none; + z-index: 1003; } +.offcanvas-overlap .exit-off-canvas { + -webkit-backface-visibility: hidden; + transition: background 300ms ease; + cursor: pointer; + box-shadow: -4px 0 4px rgba(0, 0, 0, 0.5), 4px 0 4px rgba(0, 0, 0, 0.5); + display: block; + position: absolute; + background: rgba(255, 255, 255, 0.2); + top: 0; + bottom: 0; + left: 0; + right: 0; + z-index: 1002; + -webkit-tap-highlight-color: transparent; } + @media only screen and (min-width: 40.063em) { + .offcanvas-overlap .exit-off-canvas:hover { + background: rgba(255, 255, 255, 0.05); } } + +.offcanvas-overlap-left .right-off-canvas-menu { + -ms-transform: none; + -webkit-transform: none; + -moz-transform: none; + -o-transform: none; + transform: none; + z-index: 1003; } +.offcanvas-overlap-left .exit-off-canvas { + -webkit-backface-visibility: hidden; + transition: background 300ms ease; + cursor: pointer; + box-shadow: -4px 0 4px rgba(0, 0, 0, 0.5), 4px 0 4px rgba(0, 0, 0, 0.5); + display: block; + position: absolute; + background: rgba(255, 255, 255, 0.2); + top: 0; + bottom: 0; + left: 0; + right: 0; + z-index: 1002; + -webkit-tap-highlight-color: transparent; } + @media only screen and (min-width: 40.063em) { + .offcanvas-overlap-left .exit-off-canvas:hover { + background: rgba(255, 255, 255, 0.05); } } + +.offcanvas-overlap-right .left-off-canvas-menu { + -ms-transform: none; + -webkit-transform: none; + -moz-transform: none; + -o-transform: none; + transform: none; + z-index: 1003; } +.offcanvas-overlap-right .exit-off-canvas { + -webkit-backface-visibility: hidden; + transition: background 300ms ease; + cursor: pointer; + box-shadow: -4px 0 4px rgba(0, 0, 0, 0.5), 4px 0 4px rgba(0, 0, 0, 0.5); + display: block; + position: absolute; + background: rgba(255, 255, 255, 0.2); + top: 0; + bottom: 0; + left: 0; + right: 0; + z-index: 1002; + -webkit-tap-highlight-color: transparent; } + @media only screen and (min-width: 40.063em) { + .offcanvas-overlap-right .exit-off-canvas:hover { + background: rgba(255, 255, 255, 0.05); } } + +.no-csstransforms .left-off-canvas-menu { + left: -15.625rem; } +.no-csstransforms .right-off-canvas-menu { + right: -15.625rem; } +.no-csstransforms .move-left > .inner-wrap { + right: 15.625rem; } +.no-csstransforms .move-right > .inner-wrap { + left: 15.625rem; } + +.left-submenu { + -webkit-backface-visibility: hidden; + width: 15.625rem; + top: 0; + bottom: 0; + position: absolute; + margin: 0; + overflow-x: hidden; + overflow-y: auto; + background: #333333; + z-index: 1002; + box-sizing: content-box; + -webkit-overflow-scrolling: touch; + -ms-transform: translate(-100%, 0); + -webkit-transform: translate3d(-100%, 0, 0); + -moz-transform: translate3d(-100%, 0, 0); + -ms-transform: translate3d(-100%, 0, 0); + -o-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); + left: 0; + -webkit-transition: -webkit-transform 500ms ease; + -moz-transition: -moz-transform 500ms ease; + -ms-transition: -ms-transform 500ms ease; + -o-transition: -o-transform 500ms ease; + transition: transform 500ms ease; } + .left-submenu * { + -webkit-backface-visibility: hidden; } + .left-submenu .back > a { + padding: 0.3rem 0.9375rem; + color: #999999; + text-transform: uppercase; + font-weight: bold; + background: #444; + border-top: 1px solid #5e5e5e; + border-bottom: none; + margin: 0; } + .left-submenu .back > a:hover { + background: #303030; + border-top: 1px solid #5e5e5e; + border-bottom: none; } + .left-submenu .back > a:before { + content: "\AB"; + margin-right: 0.5rem; + display: inline; } + .left-submenu.move-right, .left-submenu.offcanvas-overlap-right, .left-submenu.offcanvas-overlap { + -ms-transform: translate(0%, 0); + -webkit-transform: translate3d(0%, 0, 0); + -moz-transform: translate3d(0%, 0, 0); + -ms-transform: translate3d(0%, 0, 0); + -o-transform: translate3d(0%, 0, 0); + transform: translate3d(0%, 0, 0); } + +.right-submenu { + -webkit-backface-visibility: hidden; + width: 15.625rem; + top: 0; + bottom: 0; + position: absolute; + margin: 0; + overflow-x: hidden; + overflow-y: auto; + background: #333333; + z-index: 1002; + box-sizing: content-box; + -webkit-overflow-scrolling: touch; + -ms-transform: translate(100%, 0); + -webkit-transform: translate3d(100%, 0, 0); + -moz-transform: translate3d(100%, 0, 0); + -ms-transform: translate3d(100%, 0, 0); + -o-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + right: 0; + -webkit-transition: -webkit-transform 500ms ease; + -moz-transition: -moz-transform 500ms ease; + -ms-transition: -ms-transform 500ms ease; + -o-transition: -o-transform 500ms ease; + transition: transform 500ms ease; } + .right-submenu * { + -webkit-backface-visibility: hidden; } + .right-submenu .back > a { + padding: 0.3rem 0.9375rem; + color: #999999; + text-transform: uppercase; + font-weight: bold; + background: #444; + border-top: 1px solid #5e5e5e; + border-bottom: none; + margin: 0; } + .right-submenu .back > a:hover { + background: #303030; + border-top: 1px solid #5e5e5e; + border-bottom: none; } + .right-submenu .back > a:after { + content: "\BB"; + margin-left: 0.5rem; + display: inline; } + .right-submenu.move-left, .right-submenu.offcanvas-overlap-left, .right-submenu.offcanvas-overlap { + -ms-transform: translate(0%, 0); + -webkit-transform: translate3d(0%, 0, 0); + -moz-transform: translate3d(0%, 0, 0); + -ms-transform: translate3d(0%, 0, 0); + -o-transform: translate3d(0%, 0, 0); + transform: translate3d(0%, 0, 0); } + +.left-off-canvas-menu ul.off-canvas-list li.has-submenu > a:after { + content: "\BB"; + margin-left: 0.5rem; + display: inline; } + +.right-off-canvas-menu ul.off-canvas-list li.has-submenu > a:before { + content: "\AB"; + margin-right: 0.5rem; + display: inline; } + +/* Foundation Dropdowns */ +.f-dropdown { + position: absolute; + left: -9999px; + list-style: none; + margin-left: 0; + outline: none; + width: 100%; + max-height: none; + height: auto; + background: #FFFFFF; + border: solid 1px #cccccc; + font-size: 0.875rem; + z-index: 89; + margin-top: 2px; + max-width: 200px; } + .f-dropdown > *:first-child { + margin-top: 0; } + .f-dropdown > *:last-child { + margin-bottom: 0; } + .f-dropdown:before { + content: ""; + display: block; + width: 0; + height: 0; + border: inset 6px; + border-color: transparent transparent #FFFFFF transparent; + border-bottom-style: solid; + position: absolute; + top: -12px; + left: 10px; + z-index: 89; } + .f-dropdown:after { + content: ""; + display: block; + width: 0; + height: 0; + border: inset 7px; + border-color: transparent transparent #cccccc transparent; + border-bottom-style: solid; + position: absolute; + top: -14px; + left: 9px; + z-index: 88; } + .f-dropdown.right:before { + left: auto; + right: 10px; } + .f-dropdown.right:after { + left: auto; + right: 9px; } + .f-dropdown.drop-right { + position: absolute; + left: -9999px; + list-style: none; + margin-left: 0; + outline: none; + width: 100%; + max-height: none; + height: auto; + background: #FFFFFF; + border: solid 1px #cccccc; + font-size: 0.875rem; + z-index: 89; + margin-top: 0; + margin-left: 2px; + max-width: 200px; } + .f-dropdown.drop-right > *:first-child { + margin-top: 0; } + .f-dropdown.drop-right > *:last-child { + margin-bottom: 0; } + .f-dropdown.drop-right:before { + content: ""; + display: block; + width: 0; + height: 0; + border: inset 6px; + border-color: transparent #FFFFFF transparent transparent; + border-right-style: solid; + position: absolute; + top: 10px; + left: -12px; + z-index: 89; } + .f-dropdown.drop-right:after { + content: ""; + display: block; + width: 0; + height: 0; + border: inset 7px; + border-color: transparent #cccccc transparent transparent; + border-right-style: solid; + position: absolute; + top: 9px; + left: -14px; + z-index: 88; } + .f-dropdown.drop-left { + position: absolute; + left: -9999px; + list-style: none; + margin-left: 0; + outline: none; + width: 100%; + max-height: none; + height: auto; + background: #FFFFFF; + border: solid 1px #cccccc; + font-size: 0.875rem; + z-index: 89; + margin-top: 0; + margin-left: -2px; + max-width: 200px; } + .f-dropdown.drop-left > *:first-child { + margin-top: 0; } + .f-dropdown.drop-left > *:last-child { + margin-bottom: 0; } + .f-dropdown.drop-left:before { + content: ""; + display: block; + width: 0; + height: 0; + border: inset 6px; + border-color: transparent transparent transparent #FFFFFF; + border-left-style: solid; + position: absolute; + top: 10px; + right: -12px; + left: auto; + z-index: 89; } + .f-dropdown.drop-left:after { + content: ""; + display: block; + width: 0; + height: 0; + border: inset 7px; + border-color: transparent transparent transparent #cccccc; + border-left-style: solid; + position: absolute; + top: 9px; + right: -14px; + left: auto; + z-index: 88; } + .f-dropdown.drop-top { + position: absolute; + left: -9999px; + list-style: none; + margin-left: 0; + outline: none; + width: 100%; + max-height: none; + height: auto; + background: #FFFFFF; + border: solid 1px #cccccc; + font-size: 0.875rem; + z-index: 89; + margin-top: -2px; + margin-left: 0; + max-width: 200px; } + .f-dropdown.drop-top > *:first-child { + margin-top: 0; } + .f-dropdown.drop-top > *:last-child { + margin-bottom: 0; } + .f-dropdown.drop-top:before { + content: ""; + display: block; + width: 0; + height: 0; + border: inset 6px; + border-color: #FFFFFF transparent transparent transparent; + border-top-style: solid; + position: absolute; + top: auto; + bottom: -12px; + left: 10px; + right: auto; + z-index: 89; } + .f-dropdown.drop-top:after { + content: ""; + display: block; + width: 0; + height: 0; + border: inset 7px; + border-color: #cccccc transparent transparent transparent; + border-top-style: solid; + position: absolute; + top: auto; + bottom: -14px; + left: 9px; + right: auto; + z-index: 88; } + .f-dropdown li { + font-size: 0.875rem; + cursor: pointer; + line-height: 1.125rem; + margin: 0; } + .f-dropdown li:hover, .f-dropdown li:focus { + background: #EEEEEE; } + .f-dropdown li.radius { + border-radius: 3px; } + .f-dropdown li a { + display: block; + padding: 0.5rem; + color: #555555; } + .f-dropdown.content { + position: absolute; + left: -9999px; + list-style: none; + margin-left: 0; + outline: none; + padding: 1.25rem; + width: 100%; + height: auto; + max-height: none; + background: #FFFFFF; + border: solid 1px #cccccc; + font-size: 0.875rem; + z-index: 89; + max-width: 200px; } + .f-dropdown.content > *:first-child { + margin-top: 0; } + .f-dropdown.content > *:last-child { + margin-bottom: 0; } + .f-dropdown.tiny { + max-width: 200px; } + .f-dropdown.small { + max-width: 300px; } + .f-dropdown.medium { + max-width: 500px; } + .f-dropdown.large { + max-width: 800px; } + .f-dropdown.mega { + width: 100% !important; + max-width: 100% !important; } + .f-dropdown.mega.open { + left: 0 !important; } + +table { + background: #FFFFFF; + margin-bottom: 1.25rem; + border: solid 1px #DDDDDD; + table-layout: auto; } + table caption { + background: transparent; + color: #222222; + font-size: 1rem; + font-weight: bold; } + table thead { + background: #F5F5F5; } + table thead tr th, + table thead tr td { + padding: 0.5rem 0.625rem 0.625rem; + font-size: 0.875rem; + font-weight: bold; + color: #222222; } + table tfoot { + background: #F5F5F5; } + table tfoot tr th, + table tfoot tr td { + padding: 0.5rem 0.625rem 0.625rem; + font-size: 0.875rem; + font-weight: bold; + color: #222222; } + table tr th, + table tr td { + padding: 0.5625rem 0.625rem; + font-size: 0.875rem; + color: #222222; + text-align: left; } + table tr.even, table tr.alt, table tr:nth-of-type(even) { + background: #F9F9F9; } + table thead tr th, + table tfoot tr th, + table tfoot tr td, + table tbody tr th, + table tbody tr td, + table tr td { + display: table-cell; + line-height: 1.125rem; } + +.range-slider { + position: relative; + border: 1px solid #DDDDDD; + margin: 1.25rem 0; + -ms-touch-action: none; + touch-action: none; + display: block; + width: 100%; + height: 1rem; + background: #FAFAFA; } + .range-slider.vertical-range { + position: relative; + border: 1px solid #DDDDDD; + margin: 1.25rem 0; + -ms-touch-action: none; + touch-action: none; + display: inline-block; + width: 1rem; + height: 12.5rem; } + .range-slider.vertical-range .range-slider-handle { + margin-top: 0; + margin-left: -0.5rem; + position: absolute; + bottom: -10.5rem; } + .range-slider.vertical-range .range-slider-active-segment { + width: 0.875rem; + height: auto; + bottom: 0; } + .range-slider.radius { + background: #FAFAFA; + border-radius: 3px; } + .range-slider.radius .range-slider-handle { + background: #008CBA; + border-radius: 3px; } + .range-slider.radius .range-slider-handle:hover { + background: #007ba4; } + .range-slider.round { + background: #FAFAFA; + border-radius: 1000px; } + .range-slider.round .range-slider-handle { + background: #008CBA; + border-radius: 1000px; } + .range-slider.round .range-slider-handle:hover { + background: #007ba4; } + .range-slider.disabled, .range-slider[disabled] { + background: #FAFAFA; + cursor: not-allowed; + opacity: 0.7; } + .range-slider.disabled .range-slider-handle, .range-slider[disabled] .range-slider-handle { + background: #008CBA; + cursor: default; + opacity: 0.7; } + .range-slider.disabled .range-slider-handle:hover, .range-slider[disabled] .range-slider-handle:hover { + background: #007ba4; } + +.range-slider-active-segment { + display: inline-block; + position: absolute; + height: 0.875rem; + background: #e5e5e5; } + +.range-slider-handle { + display: inline-block; + position: absolute; + z-index: 1; + top: -0.3125rem; + width: 2rem; + height: 1.375rem; + border: 1px solid none; + cursor: pointer; + -ms-touch-action: manipulation; + touch-action: manipulation; + background: #008CBA; } + .range-slider-handle:hover { + background: #007ba4; } + +[class*="block-grid-"] { + display: block; + padding: 0; + margin: 0 -0.625rem; } + [class*="block-grid-"]:before, [class*="block-grid-"]:after { + content: " "; + display: table; } + [class*="block-grid-"]:after { + clear: both; } + [class*="block-grid-"] > li { + display: block; + height: auto; + float: left; + padding: 0 0.625rem 1.25rem; } + +@media only screen { + .small-block-grid-1 > li { + width: 100%; + list-style: none; } + .small-block-grid-1 > li:nth-of-type(1n) { + clear: none; } + .small-block-grid-1 > li:nth-of-type(1n+1) { + clear: both; } + + .small-block-grid-2 > li { + width: 50%; + list-style: none; } + .small-block-grid-2 > li:nth-of-type(1n) { + clear: none; } + .small-block-grid-2 > li:nth-of-type(2n+1) { + clear: both; } + + .small-block-grid-3 > li { + width: 33.33333%; + list-style: none; } + .small-block-grid-3 > li:nth-of-type(1n) { + clear: none; } + .small-block-grid-3 > li:nth-of-type(3n+1) { + clear: both; } + + .small-block-grid-4 > li { + width: 25%; + list-style: none; } + .small-block-grid-4 > li:nth-of-type(1n) { + clear: none; } + .small-block-grid-4 > li:nth-of-type(4n+1) { + clear: both; } + + .small-block-grid-5 > li { + width: 20%; + list-style: none; } + .small-block-grid-5 > li:nth-of-type(1n) { + clear: none; } + .small-block-grid-5 > li:nth-of-type(5n+1) { + clear: both; } + + .small-block-grid-6 > li { + width: 16.66667%; + list-style: none; } + .small-block-grid-6 > li:nth-of-type(1n) { + clear: none; } + .small-block-grid-6 > li:nth-of-type(6n+1) { + clear: both; } + + .small-block-grid-7 > li { + width: 14.28571%; + list-style: none; } + .small-block-grid-7 > li:nth-of-type(1n) { + clear: none; } + .small-block-grid-7 > li:nth-of-type(7n+1) { + clear: both; } + + .small-block-grid-8 > li { + width: 12.5%; + list-style: none; } + .small-block-grid-8 > li:nth-of-type(1n) { + clear: none; } + .small-block-grid-8 > li:nth-of-type(8n+1) { + clear: both; } + + .small-block-grid-9 > li { + width: 11.11111%; + list-style: none; } + .small-block-grid-9 > li:nth-of-type(1n) { + clear: none; } + .small-block-grid-9 > li:nth-of-type(9n+1) { + clear: both; } + + .small-block-grid-10 > li { + width: 10%; + list-style: none; } + .small-block-grid-10 > li:nth-of-type(1n) { + clear: none; } + .small-block-grid-10 > li:nth-of-type(10n+1) { + clear: both; } + + .small-block-grid-11 > li { + width: 9.09091%; + list-style: none; } + .small-block-grid-11 > li:nth-of-type(1n) { + clear: none; } + .small-block-grid-11 > li:nth-of-type(11n+1) { + clear: both; } + + .small-block-grid-12 > li { + width: 8.33333%; + list-style: none; } + .small-block-grid-12 > li:nth-of-type(1n) { + clear: none; } + .small-block-grid-12 > li:nth-of-type(12n+1) { + clear: both; } } +@media only screen and (min-width: 40.063em) { + .medium-block-grid-1 > li { + width: 100%; + list-style: none; } + .medium-block-grid-1 > li:nth-of-type(1n) { + clear: none; } + .medium-block-grid-1 > li:nth-of-type(1n+1) { + clear: both; } + + .medium-block-grid-2 > li { + width: 50%; + list-style: none; } + .medium-block-grid-2 > li:nth-of-type(1n) { + clear: none; } + .medium-block-grid-2 > li:nth-of-type(2n+1) { + clear: both; } + + .medium-block-grid-3 > li { + width: 33.33333%; + list-style: none; } + .medium-block-grid-3 > li:nth-of-type(1n) { + clear: none; } + .medium-block-grid-3 > li:nth-of-type(3n+1) { + clear: both; } + + .medium-block-grid-4 > li { + width: 25%; + list-style: none; } + .medium-block-grid-4 > li:nth-of-type(1n) { + clear: none; } + .medium-block-grid-4 > li:nth-of-type(4n+1) { + clear: both; } + + .medium-block-grid-5 > li { + width: 20%; + list-style: none; } + .medium-block-grid-5 > li:nth-of-type(1n) { + clear: none; } + .medium-block-grid-5 > li:nth-of-type(5n+1) { + clear: both; } + + .medium-block-grid-6 > li { + width: 16.66667%; + list-style: none; } + .medium-block-grid-6 > li:nth-of-type(1n) { + clear: none; } + .medium-block-grid-6 > li:nth-of-type(6n+1) { + clear: both; } + + .medium-block-grid-7 > li { + width: 14.28571%; + list-style: none; } + .medium-block-grid-7 > li:nth-of-type(1n) { + clear: none; } + .medium-block-grid-7 > li:nth-of-type(7n+1) { + clear: both; } + + .medium-block-grid-8 > li { + width: 12.5%; + list-style: none; } + .medium-block-grid-8 > li:nth-of-type(1n) { + clear: none; } + .medium-block-grid-8 > li:nth-of-type(8n+1) { + clear: both; } + + .medium-block-grid-9 > li { + width: 11.11111%; + list-style: none; } + .medium-block-grid-9 > li:nth-of-type(1n) { + clear: none; } + .medium-block-grid-9 > li:nth-of-type(9n+1) { + clear: both; } + + .medium-block-grid-10 > li { + width: 10%; + list-style: none; } + .medium-block-grid-10 > li:nth-of-type(1n) { + clear: none; } + .medium-block-grid-10 > li:nth-of-type(10n+1) { + clear: both; } + + .medium-block-grid-11 > li { + width: 9.09091%; + list-style: none; } + .medium-block-grid-11 > li:nth-of-type(1n) { + clear: none; } + .medium-block-grid-11 > li:nth-of-type(11n+1) { + clear: both; } + + .medium-block-grid-12 > li { + width: 8.33333%; + list-style: none; } + .medium-block-grid-12 > li:nth-of-type(1n) { + clear: none; } + .medium-block-grid-12 > li:nth-of-type(12n+1) { + clear: both; } } +@media only screen and (min-width: 64.063em) { + .large-block-grid-1 > li { + width: 100%; + list-style: none; } + .large-block-grid-1 > li:nth-of-type(1n) { + clear: none; } + .large-block-grid-1 > li:nth-of-type(1n+1) { + clear: both; } + + .large-block-grid-2 > li { + width: 50%; + list-style: none; } + .large-block-grid-2 > li:nth-of-type(1n) { + clear: none; } + .large-block-grid-2 > li:nth-of-type(2n+1) { + clear: both; } + + .large-block-grid-3 > li { + width: 33.33333%; + list-style: none; } + .large-block-grid-3 > li:nth-of-type(1n) { + clear: none; } + .large-block-grid-3 > li:nth-of-type(3n+1) { + clear: both; } + + .large-block-grid-4 > li { + width: 25%; + list-style: none; } + .large-block-grid-4 > li:nth-of-type(1n) { + clear: none; } + .large-block-grid-4 > li:nth-of-type(4n+1) { + clear: both; } + + .large-block-grid-5 > li { + width: 20%; + list-style: none; } + .large-block-grid-5 > li:nth-of-type(1n) { + clear: none; } + .large-block-grid-5 > li:nth-of-type(5n+1) { + clear: both; } + + .large-block-grid-6 > li { + width: 16.66667%; + list-style: none; } + .large-block-grid-6 > li:nth-of-type(1n) { + clear: none; } + .large-block-grid-6 > li:nth-of-type(6n+1) { + clear: both; } + + .large-block-grid-7 > li { + width: 14.28571%; + list-style: none; } + .large-block-grid-7 > li:nth-of-type(1n) { + clear: none; } + .large-block-grid-7 > li:nth-of-type(7n+1) { + clear: both; } + + .large-block-grid-8 > li { + width: 12.5%; + list-style: none; } + .large-block-grid-8 > li:nth-of-type(1n) { + clear: none; } + .large-block-grid-8 > li:nth-of-type(8n+1) { + clear: both; } + + .large-block-grid-9 > li { + width: 11.11111%; + list-style: none; } + .large-block-grid-9 > li:nth-of-type(1n) { + clear: none; } + .large-block-grid-9 > li:nth-of-type(9n+1) { + clear: both; } + + .large-block-grid-10 > li { + width: 10%; + list-style: none; } + .large-block-grid-10 > li:nth-of-type(1n) { + clear: none; } + .large-block-grid-10 > li:nth-of-type(10n+1) { + clear: both; } + + .large-block-grid-11 > li { + width: 9.09091%; + list-style: none; } + .large-block-grid-11 > li:nth-of-type(1n) { + clear: none; } + .large-block-grid-11 > li:nth-of-type(11n+1) { + clear: both; } + + .large-block-grid-12 > li { + width: 8.33333%; + list-style: none; } + .large-block-grid-12 > li:nth-of-type(1n) { + clear: none; } + .large-block-grid-12 > li:nth-of-type(12n+1) { + clear: both; } } +.flex-video { + position: relative; + padding-top: 1.5625rem; + padding-bottom: 67.5%; + height: 0; + margin-bottom: 1rem; + overflow: hidden; } + .flex-video.widescreen { + padding-bottom: 56.34%; } + .flex-video.vimeo { + padding-top: 0; } + .flex-video iframe, + .flex-video object, + .flex-video embed, + .flex-video video { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; } + +.keystroke, +kbd { + background-color: #ededed; + border-color: #dddddd; + color: #222222; + border-style: solid; + border-width: 1px; + margin: 0; + font-family: "Consolas", "Menlo", "Courier", monospace; + font-size: inherit; + padding: 0.125rem 0.25rem 0; + border-radius: 3px; } + +.switch { + padding: 0; + border: none; + position: relative; + outline: 0; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; } + .switch label { + display: block; + margin-bottom: 1rem; + position: relative; + color: transparent; + background: #DDDDDD; + text-indent: 100%; + width: 4rem; + height: 2rem; + cursor: pointer; + transition: left 0.15s ease-out; } + .switch input { + opacity: 0; + position: absolute; + top: 9px; + left: 10px; + padding: 0; } + .switch input + label { + margin-left: 0; + margin-right: 0; } + .switch label:after { + content: ""; + display: block; + background: #FFFFFF; + position: absolute; + top: .25rem; + left: .25rem; + width: 1.5rem; + height: 1.5rem; + -webkit-transition: left 0.15s ease-out; + -moz-transition: left 0.15s ease-out; + -o-transition: translate3d(0, 0, 0); + transition: left 0.15s ease-out; + -webkit-transform: translate3d(0, 0, 0); + -moz-transform: translate3d(0, 0, 0); + -o-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); } + .switch input:checked + label { + background: #008CBA; } + .switch input:checked + label:after { + left: 2.25rem; } + .switch label { + width: 4rem; + height: 2rem; } + .switch label:after { + width: 1.5rem; + height: 1.5rem; } + .switch input:checked + label:after { + left: 2.25rem; } + .switch label { + color: transparent; + background: #DDDDDD; } + .switch label:after { + background: #FFFFFF; } + .switch input:checked + label { + background: #008CBA; } + .switch.large label { + width: 5rem; + height: 2.5rem; } + .switch.large label:after { + width: 2rem; + height: 2rem; } + .switch.large input:checked + label:after { + left: 2.75rem; } + .switch.small label { + width: 3.5rem; + height: 1.75rem; } + .switch.small label:after { + width: 1.25rem; + height: 1.25rem; } + .switch.small input:checked + label:after { + left: 2rem; } + .switch.tiny label { + width: 3rem; + height: 1.5rem; } + .switch.tiny label:after { + width: 1rem; + height: 1rem; } + .switch.tiny input:checked + label:after { + left: 1.75rem; } + .switch.radius label { + border-radius: 4px; } + .switch.radius label:after { + border-radius: 3px; } + .switch.round { + border-radius: 1000px; } + .switch.round label { + border-radius: 2rem; } + .switch.round label:after { + border-radius: 2rem; } + +/* small displays */ +@media only screen { + .show-for-small-only, .show-for-small-up, .show-for-small, .show-for-small-down, .hide-for-medium-only, .hide-for-medium-up, .hide-for-medium, .show-for-medium-down, .hide-for-large-only, .hide-for-large-up, .hide-for-large, .show-for-large-down, .hide-for-xlarge-only, .hide-for-xlarge-up, .hide-for-xlarge, .show-for-xlarge-down, .hide-for-xxlarge-only, .hide-for-xxlarge-up, .hide-for-xxlarge, .show-for-xxlarge-down { + display: inherit !important; } + + .hide-for-small-only, .hide-for-small-up, .hide-for-small, .hide-for-small-down, .show-for-medium-only, .show-for-medium-up, .show-for-medium, .hide-for-medium-down, .show-for-large-only, .show-for-large-up, .show-for-large, .hide-for-large-down, .show-for-xlarge-only, .show-for-xlarge-up, .show-for-xlarge, .hide-for-xlarge-down, .show-for-xxlarge-only, .show-for-xxlarge-up, .show-for-xxlarge, .hide-for-xxlarge-down { + display: none !important; } + + .visible-for-small-only, .visible-for-small-up, .visible-for-small, .visible-for-small-down, .hidden-for-medium-only, .hidden-for-medium-up, .hidden-for-medium, .visible-for-medium-down, .hidden-for-large-only, .hidden-for-large-up, .hidden-for-large, .visible-for-large-down, .hidden-for-xlarge-only, .hidden-for-xlarge-up, .hidden-for-xlarge, .visible-for-xlarge-down, .hidden-for-xxlarge-only, .hidden-for-xxlarge-up, .hidden-for-xxlarge, .visible-for-xxlarge-down { + position: static !important; + height: auto; + width: auto; + overflow: visible; + clip: auto; } + + .hidden-for-small-only, .hidden-for-small-up, .hidden-for-small, .hidden-for-small-down, .visible-for-medium-only, .visible-for-medium-up, .visible-for-medium, .hidden-for-medium-down, .visible-for-large-only, .visible-for-large-up, .visible-for-large, .hidden-for-large-down, .visible-for-xlarge-only, .visible-for-xlarge-up, .visible-for-xlarge, .hidden-for-xlarge-down, .visible-for-xxlarge-only, .visible-for-xxlarge-up, .visible-for-xxlarge, .hidden-for-xxlarge-down { + position: absolute !important; + height: 1px; + width: 1px; + overflow: hidden; + clip: rect(1px, 1px, 1px, 1px); } + + table.show-for-small-only, table.show-for-small-up, table.show-for-small, table.show-for-small-down, table.hide-for-medium-only, table.hide-for-medium-up, table.hide-for-medium, table.show-for-medium-down, table.hide-for-large-only, table.hide-for-large-up, table.hide-for-large, table.show-for-large-down, table.hide-for-xlarge-only, table.hide-for-xlarge-up, table.hide-for-xlarge, table.show-for-xlarge-down, table.hide-for-xxlarge-only, table.hide-for-xxlarge-up, table.hide-for-xxlarge, table.show-for-xxlarge-down { + display: table !important; } + + thead.show-for-small-only, thead.show-for-small-up, thead.show-for-small, thead.show-for-small-down, thead.hide-for-medium-only, thead.hide-for-medium-up, thead.hide-for-medium, thead.show-for-medium-down, thead.hide-for-large-only, thead.hide-for-large-up, thead.hide-for-large, thead.show-for-large-down, thead.hide-for-xlarge-only, thead.hide-for-xlarge-up, thead.hide-for-xlarge, thead.show-for-xlarge-down, thead.hide-for-xxlarge-only, thead.hide-for-xxlarge-up, thead.hide-for-xxlarge, thead.show-for-xxlarge-down { + display: table-header-group !important; } + + tbody.show-for-small-only, tbody.show-for-small-up, tbody.show-for-small, tbody.show-for-small-down, tbody.hide-for-medium-only, tbody.hide-for-medium-up, tbody.hide-for-medium, tbody.show-for-medium-down, tbody.hide-for-large-only, tbody.hide-for-large-up, tbody.hide-for-large, tbody.show-for-large-down, tbody.hide-for-xlarge-only, tbody.hide-for-xlarge-up, tbody.hide-for-xlarge, tbody.show-for-xlarge-down, tbody.hide-for-xxlarge-only, tbody.hide-for-xxlarge-up, tbody.hide-for-xxlarge, tbody.show-for-xxlarge-down { + display: table-row-group !important; } + + tr.show-for-small-only, tr.show-for-small-up, tr.show-for-small, tr.show-for-small-down, tr.hide-for-medium-only, tr.hide-for-medium-up, tr.hide-for-medium, tr.show-for-medium-down, tr.hide-for-large-only, tr.hide-for-large-up, tr.hide-for-large, tr.show-for-large-down, tr.hide-for-xlarge-only, tr.hide-for-xlarge-up, tr.hide-for-xlarge, tr.show-for-xlarge-down, tr.hide-for-xxlarge-only, tr.hide-for-xxlarge-up, tr.hide-for-xxlarge, tr.show-for-xxlarge-down { + display: table-row; } + + th.show-for-small-only, td.show-for-small-only, th.show-for-small-up, td.show-for-small-up, th.show-for-small, td.show-for-small, th.show-for-small-down, td.show-for-small-down, th.hide-for-medium-only, td.hide-for-medium-only, th.hide-for-medium-up, td.hide-for-medium-up, th.hide-for-medium, td.hide-for-medium, th.show-for-medium-down, td.show-for-medium-down, th.hide-for-large-only, td.hide-for-large-only, th.hide-for-large-up, td.hide-for-large-up, th.hide-for-large, td.hide-for-large, th.show-for-large-down, td.show-for-large-down, th.hide-for-xlarge-only, td.hide-for-xlarge-only, th.hide-for-xlarge-up, td.hide-for-xlarge-up, th.hide-for-xlarge, td.hide-for-xlarge, th.show-for-xlarge-down, td.show-for-xlarge-down, th.hide-for-xxlarge-only, td.hide-for-xxlarge-only, th.hide-for-xxlarge-up, td.hide-for-xxlarge-up, th.hide-for-xxlarge, td.hide-for-xxlarge, th.show-for-xxlarge-down, td.show-for-xxlarge-down { + display: table-cell !important; } } +/* medium displays */ +@media only screen and (min-width: 40.063em) { + .hide-for-small-only, .show-for-small-up, .hide-for-small, .hide-for-small-down, .show-for-medium-only, .show-for-medium-up, .show-for-medium, .show-for-medium-down, .hide-for-large-only, .hide-for-large-up, .hide-for-large, .show-for-large-down, .hide-for-xlarge-only, .hide-for-xlarge-up, .hide-for-xlarge, .show-for-xlarge-down, .hide-for-xxlarge-only, .hide-for-xxlarge-up, .hide-for-xxlarge, .show-for-xxlarge-down { + display: inherit !important; } + + .show-for-small-only, .hide-for-small-up, .show-for-small, .show-for-small-down, .hide-for-medium-only, .hide-for-medium-up, .hide-for-medium, .hide-for-medium-down, .show-for-large-only, .show-for-large-up, .show-for-large, .hide-for-large-down, .show-for-xlarge-only, .show-for-xlarge-up, .show-for-xlarge, .hide-for-xlarge-down, .show-for-xxlarge-only, .show-for-xxlarge-up, .show-for-xxlarge, .hide-for-xxlarge-down { + display: none !important; } + + .hidden-for-small-only, .visible-for-small-up, .hidden-for-small, .hidden-for-small-down, .visible-for-medium-only, .visible-for-medium-up, .visible-for-medium, .visible-for-medium-down, .hidden-for-large-only, .hidden-for-large-up, .hidden-for-large, .visible-for-large-down, .hidden-for-xlarge-only, .hidden-for-xlarge-up, .hidden-for-xlarge, .visible-for-xlarge-down, .hidden-for-xxlarge-only, .hidden-for-xxlarge-up, .hidden-for-xxlarge, .visible-for-xxlarge-down { + position: static !important; + height: auto; + width: auto; + overflow: visible; + clip: auto; } + + .visible-for-small-only, .hidden-for-small-up, .visible-for-small, .visible-for-small-down, .hidden-for-medium-only, .hidden-for-medium-up, .hidden-for-medium, .hidden-for-medium-down, .visible-for-large-only, .visible-for-large-up, .visible-for-large, .hidden-for-large-down, .visible-for-xlarge-only, .visible-for-xlarge-up, .visible-for-xlarge, .hidden-for-xlarge-down, .visible-for-xxlarge-only, .visible-for-xxlarge-up, .visible-for-xxlarge, .hidden-for-xxlarge-down { + position: absolute !important; + height: 1px; + width: 1px; + overflow: hidden; + clip: rect(1px, 1px, 1px, 1px); } + + table.hide-for-small-only, table.show-for-small-up, table.hide-for-small, table.hide-for-small-down, table.show-for-medium-only, table.show-for-medium-up, table.show-for-medium, table.show-for-medium-down, table.hide-for-large-only, table.hide-for-large-up, table.hide-for-large, table.show-for-large-down, table.hide-for-xlarge-only, table.hide-for-xlarge-up, table.hide-for-xlarge, table.show-for-xlarge-down, table.hide-for-xxlarge-only, table.hide-for-xxlarge-up, table.hide-for-xxlarge, table.show-for-xxlarge-down { + display: table !important; } + + thead.hide-for-small-only, thead.show-for-small-up, thead.hide-for-small, thead.hide-for-small-down, thead.show-for-medium-only, thead.show-for-medium-up, thead.show-for-medium, thead.show-for-medium-down, thead.hide-for-large-only, thead.hide-for-large-up, thead.hide-for-large, thead.show-for-large-down, thead.hide-for-xlarge-only, thead.hide-for-xlarge-up, thead.hide-for-xlarge, thead.show-for-xlarge-down, thead.hide-for-xxlarge-only, thead.hide-for-xxlarge-up, thead.hide-for-xxlarge, thead.show-for-xxlarge-down { + display: table-header-group !important; } + + tbody.hide-for-small-only, tbody.show-for-small-up, tbody.hide-for-small, tbody.hide-for-small-down, tbody.show-for-medium-only, tbody.show-for-medium-up, tbody.show-for-medium, tbody.show-for-medium-down, tbody.hide-for-large-only, tbody.hide-for-large-up, tbody.hide-for-large, tbody.show-for-large-down, tbody.hide-for-xlarge-only, tbody.hide-for-xlarge-up, tbody.hide-for-xlarge, tbody.show-for-xlarge-down, tbody.hide-for-xxlarge-only, tbody.hide-for-xxlarge-up, tbody.hide-for-xxlarge, tbody.show-for-xxlarge-down { + display: table-row-group !important; } + + tr.hide-for-small-only, tr.show-for-small-up, tr.hide-for-small, tr.hide-for-small-down, tr.show-for-medium-only, tr.show-for-medium-up, tr.show-for-medium, tr.show-for-medium-down, tr.hide-for-large-only, tr.hide-for-large-up, tr.hide-for-large, tr.show-for-large-down, tr.hide-for-xlarge-only, tr.hide-for-xlarge-up, tr.hide-for-xlarge, tr.show-for-xlarge-down, tr.hide-for-xxlarge-only, tr.hide-for-xxlarge-up, tr.hide-for-xxlarge, tr.show-for-xxlarge-down { + display: table-row; } + + th.hide-for-small-only, td.hide-for-small-only, th.show-for-small-up, td.show-for-small-up, th.hide-for-small, td.hide-for-small, th.hide-for-small-down, td.hide-for-small-down, th.show-for-medium-only, td.show-for-medium-only, th.show-for-medium-up, td.show-for-medium-up, th.show-for-medium, td.show-for-medium, th.show-for-medium-down, td.show-for-medium-down, th.hide-for-large-only, td.hide-for-large-only, th.hide-for-large-up, td.hide-for-large-up, th.hide-for-large, td.hide-for-large, th.show-for-large-down, td.show-for-large-down, th.hide-for-xlarge-only, td.hide-for-xlarge-only, th.hide-for-xlarge-up, td.hide-for-xlarge-up, th.hide-for-xlarge, td.hide-for-xlarge, th.show-for-xlarge-down, td.show-for-xlarge-down, th.hide-for-xxlarge-only, td.hide-for-xxlarge-only, th.hide-for-xxlarge-up, td.hide-for-xxlarge-up, th.hide-for-xxlarge, td.hide-for-xxlarge, th.show-for-xxlarge-down, td.show-for-xxlarge-down { + display: table-cell !important; } } +/* large displays */ +@media only screen and (min-width: 64.063em) { + .hide-for-small-only, .show-for-small-up, .hide-for-small, .hide-for-small-down, .hide-for-medium-only, .show-for-medium-up, .hide-for-medium, .hide-for-medium-down, .show-for-large-only, .show-for-large-up, .show-for-large, .show-for-large-down, .hide-for-xlarge-only, .hide-for-xlarge-up, .hide-for-xlarge, .show-for-xlarge-down, .hide-for-xxlarge-only, .hide-for-xxlarge-up, .hide-for-xxlarge, .show-for-xxlarge-down { + display: inherit !important; } + + .show-for-small-only, .hide-for-small-up, .show-for-small, .show-for-small-down, .show-for-medium-only, .hide-for-medium-up, .show-for-medium, .show-for-medium-down, .hide-for-large-only, .hide-for-large-up, .hide-for-large, .hide-for-large-down, .show-for-xlarge-only, .show-for-xlarge-up, .show-for-xlarge, .hide-for-xlarge-down, .show-for-xxlarge-only, .show-for-xxlarge-up, .show-for-xxlarge, .hide-for-xxlarge-down { + display: none !important; } + + .hidden-for-small-only, .visible-for-small-up, .hidden-for-small, .hidden-for-small-down, .hidden-for-medium-only, .visible-for-medium-up, .hidden-for-medium, .hidden-for-medium-down, .visible-for-large-only, .visible-for-large-up, .visible-for-large, .visible-for-large-down, .hidden-for-xlarge-only, .hidden-for-xlarge-up, .hidden-for-xlarge, .visible-for-xlarge-down, .hidden-for-xxlarge-only, .hidden-for-xxlarge-up, .hidden-for-xxlarge, .visible-for-xxlarge-down { + position: static !important; + height: auto; + width: auto; + overflow: visible; + clip: auto; } + + .visible-for-small-only, .hidden-for-small-up, .visible-for-small, .visible-for-small-down, .visible-for-medium-only, .hidden-for-medium-up, .visible-for-medium, .visible-for-medium-down, .hidden-for-large-only, .hidden-for-large-up, .hidden-for-large, .hidden-for-large-down, .visible-for-xlarge-only, .visible-for-xlarge-up, .visible-for-xlarge, .hidden-for-xlarge-down, .visible-for-xxlarge-only, .visible-for-xxlarge-up, .visible-for-xxlarge, .hidden-for-xxlarge-down { + position: absolute !important; + height: 1px; + width: 1px; + overflow: hidden; + clip: rect(1px, 1px, 1px, 1px); } + + table.hide-for-small-only, table.show-for-small-up, table.hide-for-small, table.hide-for-small-down, table.hide-for-medium-only, table.show-for-medium-up, table.hide-for-medium, table.hide-for-medium-down, table.show-for-large-only, table.show-for-large-up, table.show-for-large, table.show-for-large-down, table.hide-for-xlarge-only, table.hide-for-xlarge-up, table.hide-for-xlarge, table.show-for-xlarge-down, table.hide-for-xxlarge-only, table.hide-for-xxlarge-up, table.hide-for-xxlarge, table.show-for-xxlarge-down { + display: table !important; } + + thead.hide-for-small-only, thead.show-for-small-up, thead.hide-for-small, thead.hide-for-small-down, thead.hide-for-medium-only, thead.show-for-medium-up, thead.hide-for-medium, thead.hide-for-medium-down, thead.show-for-large-only, thead.show-for-large-up, thead.show-for-large, thead.show-for-large-down, thead.hide-for-xlarge-only, thead.hide-for-xlarge-up, thead.hide-for-xlarge, thead.show-for-xlarge-down, thead.hide-for-xxlarge-only, thead.hide-for-xxlarge-up, thead.hide-for-xxlarge, thead.show-for-xxlarge-down { + display: table-header-group !important; } + + tbody.hide-for-small-only, tbody.show-for-small-up, tbody.hide-for-small, tbody.hide-for-small-down, tbody.hide-for-medium-only, tbody.show-for-medium-up, tbody.hide-for-medium, tbody.hide-for-medium-down, tbody.show-for-large-only, tbody.show-for-large-up, tbody.show-for-large, tbody.show-for-large-down, tbody.hide-for-xlarge-only, tbody.hide-for-xlarge-up, tbody.hide-for-xlarge, tbody.show-for-xlarge-down, tbody.hide-for-xxlarge-only, tbody.hide-for-xxlarge-up, tbody.hide-for-xxlarge, tbody.show-for-xxlarge-down { + display: table-row-group !important; } + + tr.hide-for-small-only, tr.show-for-small-up, tr.hide-for-small, tr.hide-for-small-down, tr.hide-for-medium-only, tr.show-for-medium-up, tr.hide-for-medium, tr.hide-for-medium-down, tr.show-for-large-only, tr.show-for-large-up, tr.show-for-large, tr.show-for-large-down, tr.hide-for-xlarge-only, tr.hide-for-xlarge-up, tr.hide-for-xlarge, tr.show-for-xlarge-down, tr.hide-for-xxlarge-only, tr.hide-for-xxlarge-up, tr.hide-for-xxlarge, tr.show-for-xxlarge-down { + display: table-row; } + + th.hide-for-small-only, td.hide-for-small-only, th.show-for-small-up, td.show-for-small-up, th.hide-for-small, td.hide-for-small, th.hide-for-small-down, td.hide-for-small-down, th.hide-for-medium-only, td.hide-for-medium-only, th.show-for-medium-up, td.show-for-medium-up, th.hide-for-medium, td.hide-for-medium, th.hide-for-medium-down, td.hide-for-medium-down, th.show-for-large-only, td.show-for-large-only, th.show-for-large-up, td.show-for-large-up, th.show-for-large, td.show-for-large, th.show-for-large-down, td.show-for-large-down, th.hide-for-xlarge-only, td.hide-for-xlarge-only, th.hide-for-xlarge-up, td.hide-for-xlarge-up, th.hide-for-xlarge, td.hide-for-xlarge, th.show-for-xlarge-down, td.show-for-xlarge-down, th.hide-for-xxlarge-only, td.hide-for-xxlarge-only, th.hide-for-xxlarge-up, td.hide-for-xxlarge-up, th.hide-for-xxlarge, td.hide-for-xxlarge, th.show-for-xxlarge-down, td.show-for-xxlarge-down { + display: table-cell !important; } } +/* xlarge displays */ +@media only screen and (min-width: 90.063em) { + .hide-for-small-only, .show-for-small-up, .hide-for-small, .hide-for-small-down, .hide-for-medium-only, .show-for-medium-up, .hide-for-medium, .hide-for-medium-down, .hide-for-large-only, .show-for-large-up, .hide-for-large, .hide-for-large-down, .show-for-xlarge-only, .show-for-xlarge-up, .show-for-xlarge, .show-for-xlarge-down, .hide-for-xxlarge-only, .hide-for-xxlarge-up, .hide-for-xxlarge, .show-for-xxlarge-down { + display: inherit !important; } + + .show-for-small-only, .hide-for-small-up, .show-for-small, .show-for-small-down, .show-for-medium-only, .hide-for-medium-up, .show-for-medium, .show-for-medium-down, .show-for-large-only, .hide-for-large-up, .show-for-large, .show-for-large-down, .hide-for-xlarge-only, .hide-for-xlarge-up, .hide-for-xlarge, .hide-for-xlarge-down, .show-for-xxlarge-only, .show-for-xxlarge-up, .show-for-xxlarge, .hide-for-xxlarge-down { + display: none !important; } + + .hidden-for-small-only, .visible-for-small-up, .hidden-for-small, .hidden-for-small-down, .hidden-for-medium-only, .visible-for-medium-up, .hidden-for-medium, .hidden-for-medium-down, .hidden-for-large-only, .visible-for-large-up, .hidden-for-large, .hidden-for-large-down, .visible-for-xlarge-only, .visible-for-xlarge-up, .visible-for-xlarge, .visible-for-xlarge-down, .hidden-for-xxlarge-only, .hidden-for-xxlarge-up, .hidden-for-xxlarge, .visible-for-xxlarge-down { + position: static !important; + height: auto; + width: auto; + overflow: visible; + clip: auto; } + + .visible-for-small-only, .hidden-for-small-up, .visible-for-small, .visible-for-small-down, .visible-for-medium-only, .hidden-for-medium-up, .visible-for-medium, .visible-for-medium-down, .visible-for-large-only, .hidden-for-large-up, .visible-for-large, .visible-for-large-down, .hidden-for-xlarge-only, .hidden-for-xlarge-up, .hidden-for-xlarge, .hidden-for-xlarge-down, .visible-for-xxlarge-only, .visible-for-xxlarge-up, .visible-for-xxlarge, .hidden-for-xxlarge-down { + position: absolute !important; + height: 1px; + width: 1px; + overflow: hidden; + clip: rect(1px, 1px, 1px, 1px); } + + table.hide-for-small-only, table.show-for-small-up, table.hide-for-small, table.hide-for-small-down, table.hide-for-medium-only, table.show-for-medium-up, table.hide-for-medium, table.hide-for-medium-down, table.hide-for-large-only, table.show-for-large-up, table.hide-for-large, table.hide-for-large-down, table.show-for-xlarge-only, table.show-for-xlarge-up, table.show-for-xlarge, table.show-for-xlarge-down, table.hide-for-xxlarge-only, table.hide-for-xxlarge-up, table.hide-for-xxlarge, table.show-for-xxlarge-down { + display: table !important; } + + thead.hide-for-small-only, thead.show-for-small-up, thead.hide-for-small, thead.hide-for-small-down, thead.hide-for-medium-only, thead.show-for-medium-up, thead.hide-for-medium, thead.hide-for-medium-down, thead.hide-for-large-only, thead.show-for-large-up, thead.hide-for-large, thead.hide-for-large-down, thead.show-for-xlarge-only, thead.show-for-xlarge-up, thead.show-for-xlarge, thead.show-for-xlarge-down, thead.hide-for-xxlarge-only, thead.hide-for-xxlarge-up, thead.hide-for-xxlarge, thead.show-for-xxlarge-down { + display: table-header-group !important; } + + tbody.hide-for-small-only, tbody.show-for-small-up, tbody.hide-for-small, tbody.hide-for-small-down, tbody.hide-for-medium-only, tbody.show-for-medium-up, tbody.hide-for-medium, tbody.hide-for-medium-down, tbody.hide-for-large-only, tbody.show-for-large-up, tbody.hide-for-large, tbody.hide-for-large-down, tbody.show-for-xlarge-only, tbody.show-for-xlarge-up, tbody.show-for-xlarge, tbody.show-for-xlarge-down, tbody.hide-for-xxlarge-only, tbody.hide-for-xxlarge-up, tbody.hide-for-xxlarge, tbody.show-for-xxlarge-down { + display: table-row-group !important; } + + tr.hide-for-small-only, tr.show-for-small-up, tr.hide-for-small, tr.hide-for-small-down, tr.hide-for-medium-only, tr.show-for-medium-up, tr.hide-for-medium, tr.hide-for-medium-down, tr.hide-for-large-only, tr.show-for-large-up, tr.hide-for-large, tr.hide-for-large-down, tr.show-for-xlarge-only, tr.show-for-xlarge-up, tr.show-for-xlarge, tr.show-for-xlarge-down, tr.hide-for-xxlarge-only, tr.hide-for-xxlarge-up, tr.hide-for-xxlarge, tr.show-for-xxlarge-down { + display: table-row; } + + th.hide-for-small-only, td.hide-for-small-only, th.show-for-small-up, td.show-for-small-up, th.hide-for-small, td.hide-for-small, th.hide-for-small-down, td.hide-for-small-down, th.hide-for-medium-only, td.hide-for-medium-only, th.show-for-medium-up, td.show-for-medium-up, th.hide-for-medium, td.hide-for-medium, th.hide-for-medium-down, td.hide-for-medium-down, th.hide-for-large-only, td.hide-for-large-only, th.show-for-large-up, td.show-for-large-up, th.hide-for-large, td.hide-for-large, th.hide-for-large-down, td.hide-for-large-down, th.show-for-xlarge-only, td.show-for-xlarge-only, th.show-for-xlarge-up, td.show-for-xlarge-up, th.show-for-xlarge, td.show-for-xlarge, th.show-for-xlarge-down, td.show-for-xlarge-down, th.hide-for-xxlarge-only, td.hide-for-xxlarge-only, th.hide-for-xxlarge-up, td.hide-for-xxlarge-up, th.hide-for-xxlarge, td.hide-for-xxlarge, th.show-for-xxlarge-down, td.show-for-xxlarge-down { + display: table-cell !important; } } +/* xxlarge displays */ +@media only screen and (min-width: 120.063em) { + .hide-for-small-only, .show-for-small-up, .hide-for-small, .hide-for-small-down, .hide-for-medium-only, .show-for-medium-up, .hide-for-medium, .hide-for-medium-down, .hide-for-large-only, .show-for-large-up, .hide-for-large, .hide-for-large-down, .hide-for-xlarge-only, .show-for-xlarge-up, .hide-for-xlarge, .hide-for-xlarge-down, .show-for-xxlarge-only, .show-for-xxlarge-up, .show-for-xxlarge, .show-for-xxlarge-down { + display: inherit !important; } + + .show-for-small-only, .hide-for-small-up, .show-for-small, .show-for-small-down, .show-for-medium-only, .hide-for-medium-up, .show-for-medium, .show-for-medium-down, .show-for-large-only, .hide-for-large-up, .show-for-large, .show-for-large-down, .show-for-xlarge-only, .hide-for-xlarge-up, .show-for-xlarge, .show-for-xlarge-down, .hide-for-xxlarge-only, .hide-for-xxlarge-up, .hide-for-xxlarge, .hide-for-xxlarge-down { + display: none !important; } + + .hidden-for-small-only, .visible-for-small-up, .hidden-for-small, .hidden-for-small-down, .hidden-for-medium-only, .visible-for-medium-up, .hidden-for-medium, .hidden-for-medium-down, .hidden-for-large-only, .visible-for-large-up, .hidden-for-large, .hidden-for-large-down, .hidden-for-xlarge-only, .visible-for-xlarge-up, .hidden-for-xlarge, .hidden-for-xlarge-down, .visible-for-xxlarge-only, .visible-for-xxlarge-up, .visible-for-xxlarge, .visible-for-xxlarge-down { + position: static !important; + height: auto; + width: auto; + overflow: visible; + clip: auto; } + + .visible-for-small-only, .hidden-for-small-up, .visible-for-small, .visible-for-small-down, .visible-for-medium-only, .hidden-for-medium-up, .visible-for-medium, .visible-for-medium-down, .visible-for-large-only, .hidden-for-large-up, .visible-for-large, .visible-for-large-down, .visible-for-xlarge-only, .hidden-for-xlarge-up, .visible-for-xlarge, .visible-for-xlarge-down, .hidden-for-xxlarge-only, .hidden-for-xxlarge-up, .hidden-for-xxlarge, .hidden-for-xxlarge-down { + position: absolute !important; + height: 1px; + width: 1px; + overflow: hidden; + clip: rect(1px, 1px, 1px, 1px); } + + table.hide-for-small-only, table.show-for-small-up, table.hide-for-small, table.hide-for-small-down, table.hide-for-medium-only, table.show-for-medium-up, table.hide-for-medium, table.hide-for-medium-down, table.hide-for-large-only, table.show-for-large-up, table.hide-for-large, table.hide-for-large-down, table.hide-for-xlarge-only, table.show-for-xlarge-up, table.hide-for-xlarge, table.hide-for-xlarge-down, table.show-for-xxlarge-only, table.show-for-xxlarge-up, table.show-for-xxlarge, table.show-for-xxlarge-down { + display: table !important; } + + thead.hide-for-small-only, thead.show-for-small-up, thead.hide-for-small, thead.hide-for-small-down, thead.hide-for-medium-only, thead.show-for-medium-up, thead.hide-for-medium, thead.hide-for-medium-down, thead.hide-for-large-only, thead.show-for-large-up, thead.hide-for-large, thead.hide-for-large-down, thead.hide-for-xlarge-only, thead.show-for-xlarge-up, thead.hide-for-xlarge, thead.hide-for-xlarge-down, thead.show-for-xxlarge-only, thead.show-for-xxlarge-up, thead.show-for-xxlarge, thead.show-for-xxlarge-down { + display: table-header-group !important; } + + tbody.hide-for-small-only, tbody.show-for-small-up, tbody.hide-for-small, tbody.hide-for-small-down, tbody.hide-for-medium-only, tbody.show-for-medium-up, tbody.hide-for-medium, tbody.hide-for-medium-down, tbody.hide-for-large-only, tbody.show-for-large-up, tbody.hide-for-large, tbody.hide-for-large-down, tbody.hide-for-xlarge-only, tbody.show-for-xlarge-up, tbody.hide-for-xlarge, tbody.hide-for-xlarge-down, tbody.show-for-xxlarge-only, tbody.show-for-xxlarge-up, tbody.show-for-xxlarge, tbody.show-for-xxlarge-down { + display: table-row-group !important; } + + tr.hide-for-small-only, tr.show-for-small-up, tr.hide-for-small, tr.hide-for-small-down, tr.hide-for-medium-only, tr.show-for-medium-up, tr.hide-for-medium, tr.hide-for-medium-down, tr.hide-for-large-only, tr.show-for-large-up, tr.hide-for-large, tr.hide-for-large-down, tr.hide-for-xlarge-only, tr.show-for-xlarge-up, tr.hide-for-xlarge, tr.hide-for-xlarge-down, tr.show-for-xxlarge-only, tr.show-for-xxlarge-up, tr.show-for-xxlarge, tr.show-for-xxlarge-down { + display: table-row; } + + th.hide-for-small-only, td.hide-for-small-only, th.show-for-small-up, td.show-for-small-up, th.hide-for-small, td.hide-for-small, th.hide-for-small-down, td.hide-for-small-down, th.hide-for-medium-only, td.hide-for-medium-only, th.show-for-medium-up, td.show-for-medium-up, th.hide-for-medium, td.hide-for-medium, th.hide-for-medium-down, td.hide-for-medium-down, th.hide-for-large-only, td.hide-for-large-only, th.show-for-large-up, td.show-for-large-up, th.hide-for-large, td.hide-for-large, th.hide-for-large-down, td.hide-for-large-down, th.hide-for-xlarge-only, td.hide-for-xlarge-only, th.show-for-xlarge-up, td.show-for-xlarge-up, th.hide-for-xlarge, td.hide-for-xlarge, th.hide-for-xlarge-down, td.hide-for-xlarge-down, th.show-for-xxlarge-only, td.show-for-xxlarge-only, th.show-for-xxlarge-up, td.show-for-xxlarge-up, th.show-for-xxlarge, td.show-for-xxlarge, th.show-for-xxlarge-down, td.show-for-xxlarge-down { + display: table-cell !important; } } +/* Orientation targeting */ +.show-for-landscape, +.hide-for-portrait { + display: inherit !important; } + +.hide-for-landscape, +.show-for-portrait { + display: none !important; } + +/* Specific visibility for tables */ +table.hide-for-landscape, table.show-for-portrait { + display: table !important; } + +thead.hide-for-landscape, thead.show-for-portrait { + display: table-header-group !important; } + +tbody.hide-for-landscape, tbody.show-for-portrait { + display: table-row-group !important; } + +tr.hide-for-landscape, tr.show-for-portrait { + display: table-row !important; } + +td.hide-for-landscape, td.show-for-portrait, +th.hide-for-landscape, +th.show-for-portrait { + display: table-cell !important; } + +@media only screen and (orientation: landscape) { + .show-for-landscape, + .hide-for-portrait { + display: inherit !important; } + + .hide-for-landscape, + .show-for-portrait { + display: none !important; } + + /* Specific visibility for tables */ + table.show-for-landscape, table.hide-for-portrait { + display: table !important; } + + thead.show-for-landscape, thead.hide-for-portrait { + display: table-header-group !important; } + + tbody.show-for-landscape, tbody.hide-for-portrait { + display: table-row-group !important; } + + tr.show-for-landscape, tr.hide-for-portrait { + display: table-row !important; } + + td.show-for-landscape, td.hide-for-portrait, + th.show-for-landscape, + th.hide-for-portrait { + display: table-cell !important; } } +@media only screen and (orientation: portrait) { + .show-for-portrait, + .hide-for-landscape { + display: inherit !important; } + + .hide-for-portrait, + .show-for-landscape { + display: none !important; } + + /* Specific visibility for tables */ + table.show-for-portrait, table.hide-for-landscape { + display: table !important; } + + thead.show-for-portrait, thead.hide-for-landscape { + display: table-header-group !important; } + + tbody.show-for-portrait, tbody.hide-for-landscape { + display: table-row-group !important; } + + tr.show-for-portrait, tr.hide-for-landscape { + display: table-row !important; } + + td.show-for-portrait, td.hide-for-landscape, + th.show-for-portrait, + th.hide-for-landscape { + display: table-cell !important; } } +/* Touch-enabled device targeting */ +.show-for-touch { + display: none !important; } + +.hide-for-touch { + display: inherit !important; } + +.touch .show-for-touch { + display: inherit !important; } + +.touch .hide-for-touch { + display: none !important; } + +/* Specific visibility for tables */ +table.hide-for-touch { + display: table !important; } + +.touch table.show-for-touch { + display: table !important; } + +thead.hide-for-touch { + display: table-header-group !important; } + +.touch thead.show-for-touch { + display: table-header-group !important; } + +tbody.hide-for-touch { + display: table-row-group !important; } + +.touch tbody.show-for-touch { + display: table-row-group !important; } + +tr.hide-for-touch { + display: table-row !important; } + +.touch tr.show-for-touch { + display: table-row !important; } + +td.hide-for-touch { + display: table-cell !important; } + +.touch td.show-for-touch { + display: table-cell !important; } + +th.hide-for-touch { + display: table-cell !important; } + +.touch th.show-for-touch { + display: table-cell !important; } + +/* + * Print styles. + * + * Inlined to avoid required HTTP connection: www.phpied.com/delay-loading-your-print-css/ + * Credit to Paul Irish and HTML5 Boilerplate (html5boilerplate.com) +*/ +.print-only { + display: none !important; } + +@media print { + * { + background: transparent !important; + color: #000000 !important; + /* Black prints faster: h5bp.com/s */ + box-shadow: none !important; + text-shadow: none !important; } + + .show-for-print { + display: block; } + + .hide-for-print { + display: none; } + + table.show-for-print { + display: table !important; } + + thead.show-for-print { + display: table-header-group !important; } + + tbody.show-for-print { + display: table-row-group !important; } + + tr.show-for-print { + display: table-row !important; } + + td.show-for-print { + display: table-cell !important; } + + th.show-for-print { + display: table-cell !important; } + + a, + a:visited { + text-decoration: underline; } + + a[href]:after { + content: " (" attr(href) ")"; } + + abbr[title]:after { + content: " (" attr(title) ")"; } + + .ir a:after, + a[href^="javascript:"]:after, + a[href^="#"]:after { + content: ""; } + + pre, + blockquote { + border: 1px solid #999999; + page-break-inside: avoid; } + + thead { + display: table-header-group; + /* h5bp.com/t */ } + + tr, + img { + page-break-inside: avoid; } + + img { + max-width: 100% !important; } + + @page { + margin: 0.5cm; } + p, + h2, + h3 { + orphans: 3; + widows: 3; } + + h2, + h3 { + page-break-after: avoid; } + + .hide-on-print { + display: none !important; } + + .print-only { + display: block !important; } + + .hide-for-print { + display: none !important; } + + .show-for-print { + display: inherit !important; } } +/* Print visibility */ +@media print { + .show-for-print { + display: block; } + + .hide-for-print { + display: none; } + + table.show-for-print { + display: table !important; } + + thead.show-for-print { + display: table-header-group !important; } + + tbody.show-for-print { + display: table-row-group !important; } + + tr.show-for-print { + display: table-row !important; } + + td.show-for-print { + display: table-cell !important; } + + th.show-for-print { + display: table-cell !important; } } diff --git a/tasker/static/main.css b/tasker/static/main.css new file mode 100644 index 0000000..32b7536 --- /dev/null +++ b/tasker/static/main.css @@ -0,0 +1,69 @@ +.submitlink { + color: #008CBA; + background-color: transparent; + font-size: 0.6rem; + text-decoration: underline; + border: none; + cursor: pointer; + cursor: hand;} + +a.submitlink { + color: #008CBA; + background-color: transparent; + font-size: 0.6rem; + text-decoration: underline; + border: none; + cursor: pointer; + cursor: hand;} + + .center.row { + height: 300px; + margin-left: auto; + margin-right: auto; + margin-top: 5%; + max-width: 500px; + } + + .signup-panel { + padding: 15px; + } + + .signup-panel i { + font-size: 30px; + line-height: 50px; + color: #999; + } + + .signup-panel form input, .signup-panel form span { + height: 50px; + } + + .signup-panel .welcome { + font-size: 26px; + text-align: center; + margin-left: 0; + } + + .signup-panel .button { + margin-left: 35%; + } + + section.active { + padding-top: 75px !important; + } + + p.title { + border-bottom: 1px solid #cccccc !important; + } + + .content{ + height: 450px; + } + + table { + @include grid-row(); + } + + td, th { + @include grid-column(12); + } diff --git a/tasker/tasker/static/main.js b/tasker/static/main.js similarity index 100% rename from tasker/tasker/static/main.js rename to tasker/static/main.js diff --git a/tasker/tasker/static/modernizr.js b/tasker/static/modernizr.js similarity index 100% rename from tasker/tasker/static/modernizr.js rename to tasker/static/modernizr.js diff --git a/tasker/tasker/static/normalize.css b/tasker/static/normalize.css similarity index 100% rename from tasker/tasker/static/normalize.css rename to tasker/static/normalize.css diff --git a/tasker/static/tasker.jpg b/tasker/static/tasker.jpg new file mode 100644 index 0000000000000000000000000000000000000000..fcc6ff79e92349cea7b6a395e5dc3e118b159dca GIT binary patch literal 6179 zcmb7IcT`hp(+?n`q6mlr5kaIXCG=jb^nfBox=0fOM5@%V7C=E@4JFcF3_U=EP^C$Y zArv7LAp$}u(h`tBNN69sd*1!lJ>NgybI(0z=FGjnnfc9q?wz@ZUk|?nIF0lS^#Dvv z007g`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Lx-cRl5KcGoy7T;5@b%J%_ME?F%5**Yq8R%{Q5S!4zJ`h~ zlBt9PYmKIH*SFPh!l@}#!j z>+5`#VFnG^w&9=Kv`e+>ce8`*T6xlO-%?kl=ccu2L zTs|GLVDDbI1V^6|?1j5!t`|+SV2?6<2)G$LWw)_HFbGYAnKo_Gf`cmGHgw`H9KX$q zi@EmOFTpcG9zGbCbV*j=lg2OsLo@YlNxX@#(=98eI1@L$)4LZXZ`2znUcr2W@vX0G zLg3<>rEAY2x~H|)R6f_5$;z^Ktw)LIg%+R)vi+C*U7B294_B?!1}+=6$VXa>?g>4+ zk(;Ep=r^;b7O}jTVAe}e&t7&F{d}DeA=0<*NNeM_Qq{QKkMw6K-m)#Nzu{lO`TW2F zG3RhQIP@Z|8XtU4EG8X!SwZi%aF}a`wJ>`XXYoJcXC7s(a(!d|&^eREb_lGs@2$v7 z78g5rDT`e3l5tL{5?OfKT1Byt!|B?&lqv_i^!;cqh+~0q-1DVGy^1D^2)Hl%{ zek`j1A)2ONobKIHYltWv!aUf#nwT=~R+l@PS@WN+oXf5^*uU_Kb2e~Ce-{4Vv6M-V zwM@)~Mc}tCC4&w%CRC()JWWmuRh{2+1sJ?^I=Dv|8Js}9?UR;cg>mb#S;SK0>R|nE z!V)Pg){U4XzHV@cDAAFW_7xUyqE(+W3SG?}NXbYYY+vF%1c=ekndn;aH?#~JG%6aU zm}AfX+_`iYRZVuR3HqLP(OXaW^xIdruH4S^zi$8g%~kH`yEp&yH=WFHPARcgT)y{7 z3{uAK@X+Sk_0hE7IlHMRUaom;`=5M$e^)t#tI)xigc*AV)IgM - - - - - - - - - -
- {% block header %} -
-

Hello World!

-
- {% endblock %} - - {% block body %}{% endblock %} - - {% block footer %} -
- Copyright (c) 2013 -
- {% endblock %} -
- - - - - - diff --git a/tasker/tasker/views.py b/tasker/tasker/views.py deleted file mode 100644 index 6a22f14..0000000 --- a/tasker/tasker/views.py +++ /dev/null @@ -1,23 +0,0 @@ -"""Add your views here. - -We have started you with an initial blueprint. Add more as needed. -""" - -from flask import Blueprint, flash - - -tasker = Blueprint("tasker", __name__) - - -@tasker.route("/") -def index(): - return "Hello, world!" - - -def flash_errors(form, category="warning"): - '''Flash all errors for a form.''' - for field, errors in form.errors.items(): - for error in errors: - flash("{0} - {1}" - .format(getattr(form, field).label.text, error), category) - diff --git a/tasker/templates/index.html b/tasker/templates/index.html new file mode 100644 index 0000000..2c013ad --- /dev/null +++ b/tasker/templates/index.html @@ -0,0 +1,51 @@ +{% extends "layout.html" %} +{% block body %} + + + +
+
+ +
    + slide 1 +
+
+
+
+

Tasker

+
+ +{% endblock %} diff --git a/tasker/templates/layout.html b/tasker/templates/layout.html new file mode 100644 index 0000000..d1f626e --- /dev/null +++ b/tasker/templates/layout.html @@ -0,0 +1,75 @@ + + + + + + + Ana's Link Shortener + + + + + + +
+ {% block header %} +
+
+ +
+
+
+
+
+
    + {{ current_user.email }} +
+
+
+ {% endblock %} + {% block body %} + {% endblock %} + + + + + + + + + diff --git a/tasker/templates/login.html b/tasker/templates/login.html new file mode 100644 index 0000000..1926268 --- /dev/null +++ b/tasker/templates/login.html @@ -0,0 +1,22 @@ +{% extends "layout.html" %} + +{% block body %} +
+ {{ form.hidden_tag() }} +
+
+ {{ form.email.label }} {{ form.email(placeholder='yourname@email.com',size=20) }} +
+
+
+
+ {{ form.password.label }} {{ form.password(size=20) }} +
+
+
+
+ +
+
+
+{% endblock %} diff --git a/tasker/templates/register.html b/tasker/templates/register.html new file mode 100644 index 0000000..977b472 --- /dev/null +++ b/tasker/templates/register.html @@ -0,0 +1,32 @@ +{% extends "layout.html" %} + +{% block body %} +
+ {{ form.hidden_tag() }} +
+
+ {{ form.name.label }} {{ form.name(size=20) }} +
+
+
+
+ {{ form.email.label }} {{ form.email(size=20,placeholder='yourname@email.com') }} +
+
+
+
+ {{ form.password.label }} {{ form.password(size=20) }} +
+
+
+
+ {{ form.password_verification.label }} {{ form.password_verification(size=20) }} +
+
+
+
+ +
+
+
+{% endblock %} diff --git a/tasker/views/__pycache__/api.cpython-34.pyc b/tasker/views/__pycache__/api.cpython-34.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ba01933dd435cf50214ba5a57b3a91156aff8cd6 GIT binary patch literal 3296 zcmai0%WfRU6}|nM_i)JJOB5xChy%#&IHX_*0^%@&X+|~@7?gpbHv<@rW>=ByVL!%I zJ(4(}R`LhL$Ug)~{v^Lp+pM%n_FCoKY7WgX0o<6Xsn@N#k8@Aezk2;na`x}zzjTQH zNw>ZL?axv4fkPzlb0{Mk-?SYXJ9gZq%%$9;u}8U2W1sSX#sTFG8aF6!(zrhNUqUam&WTP+9W#k1Jv9gxlWT!5?y)=HG3rbJdXDG9?2n1wn!|I7%T?wlUOFP zVr93j>;n=*600QENUYPD3t2~Okl0*^JS1_C#FiELU?Fnf9=A>6!D87j*mI-s;XC&2 zQ5cx^7uifsRa#W0Inia2o?e=!lHbpyu1pZ0lnN6wl|`qe3LVqQ%CoeHW?HIuF183= z6MUT(7uxvWVl4Dbm%9f-d|9g8EZyoHeDlY;|Ls)7mE?Iy_v;PwxQNfBGOjo=UOY_` z-kd-F=incr=!d8(qKQLS4x4sGl)|6*x%BkZgJIs$d^w&@vowjTv@G`6qcXM&-d6Gy$7viaxPy=rP94rmBnSO#GZ}| zaZb7jv+BH5>0AO+3$0wWh4zg?tPD$A z&;K0_cza@<56$5GHx5-Udme3vTOLORn!fewem#RR^;e#mz>I)IgG7^;K%57Wdadi- zSh`JH{MV!{_l-+$JgNekG-%S~RJy{B)h=#5WTK26$m<*_&);nS$FgfI%bN2Y&p zZK4IjeE9MIeDk2g-`wM>@kOlDWJleDq3<{r@14&S|C>POahio4(>#~404j`kCXpN0 zNu%U6ixX)A4b)W%#03$gkGeGN(=@B3icT&~aGEM4)DpmyTtw4Y>sO@`VPNB9n!rnR zAukmJ+_Vg*8{?4V{j&jM8w{oq@CNZKH0w>SN3$ynsJ8=_aZ# z&_O;`bv$i^)mI!Uw6vk4W{ z4p)y*88;OG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a@jVbvK3iez6)~%h~p0!~&tPPZPXS-ar)(hK(i`M$;jS9-z McB5L{UftgQ7xj%-9smFU literal 0 HcmV?d00001 diff --git a/tasker/views/__pycache__/tasks.cpython-34.pyc b/tasker/views/__pycache__/tasks.cpython-34.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2a95d8b632c7efd5258b894c6d60f738996da850 GIT binary patch literal 826 zcmYjPxt7x~6uq{yID2LX4nN=~`2h|GW-6MY7--b^IFT~ZM6$z^JPYjr|H8-c18S+J zfqp6^hdH2QUA^V%ZSt?-sQ>Nj?+<4&@Du;7#LI8|Ha|RY|3y%M1{e?pJ%);)W3YIq zCr}BlT43#l-h%2tcfq>QDOd{K1MBUmZKyu<0Bis~1RFw+z(&wxurc%mYyv$6o9@^h zs6FU?uzlzQumf-Hf~Qc2&_`fLh{OQA2XTyhU(N}{39g=j_i-PAd)E+O5M=foJi$da zdhjhFi(JYJE3DMQ%iYsEE6lt1=UL)9D|uOyaD%G0+uG(Usf25pb#;?CxU9*C zvUzO;J@}Uh#l?K#I<_zyvv`c=%TV&u3XC(qP2YoU-p03gk;Uhq`_fl*J6l_=vWQae z{|-9vM+1*<=O29vGcU?QEZ5>%5Xrfus=OdejT=_3%ga7RdV5P1&MY3p2=2OHeOU4v7QBomE|S1{3U7! z=!7`UBsbIzhR_A|0)&2P5Mb!RO~SZ0GjVHY%|vMwT;t&Cd!s0gtV%=EU`X@4EVRgT t+6!u%{M(AA^nc^oNrw&nm9BWL#OugwCPbJ<(`XXCY|WzMc-opIe*k)O$=3h? literal 0 HcmV?d00001 diff --git a/tasker/views/__pycache__/users.cpython-34.pyc b/tasker/views/__pycache__/users.cpython-34.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d197eaa46c855f146f54a8dce203145c8a5d46bf GIT binary patch literal 1954 zcma)7&2A$_5Uw8ER?7j))2^=mrn|bnugZUQx~-po`up?;AK*{8_oC|f&ABE7T?R5C_2H@1%I*+ywHHkeG$avXWKmE?;!n{Kp1+a^2T z7&m$0@d3hmaz?1;myG%>$J7qKQHxj`j7*$64}t1O>-D$1gU|cu+0LK1ZEZbOW|>QE zE1!RQYO7y=b#glA$oazuROxw2kN%AYLkR=82KXLeCD_Jaz<98#z^clWv%dx_pO(a` z?!e>}fY&^(8V=BO0OvF<_7e%hw83;>)rA$Yz#PGP3x@JvVVk}uX260dv9wYvS2Bu> zNb#9^ih%e%88wb=O{Gzs*lMP(%&uc1eXeKYm>9U)y??rlOyJgo9D{YF^<|DSh;@+V zCYa~Qbc}cXB3om08CAF|$QUn8N*fbD>1c=@%8VUeL`f`()M=hg^=6jF27A0vBSLX& zn`d!ii2K-fwpNzi%L%qbwQ#^C;kUm-TPSf`bfTYU)R#6OD{|8>lPl40=pO z5v2;>;*1@Bmv4e)bfJQoQdv-@PsxA;5>TQSWX9R}WuA8366lJ-sc*E0UD^>3cwq4( zGmp%YixOXF>kS^9aNlE#W56~Iwyr5sYFV~IQCokWr(8sL72woRA>@tN@g06OxE-7_ zsF!l{Q}{OdHE&*O))!rGNb2p2f#{Ncoq9i@_2bc_q7$DZOU2bw5#Vj%xoWe0ZrA5y zYA0h?7Da3 Date: Sat, 28 Feb 2015 20:14:45 -0500 Subject: [PATCH 03/31] web app and api working except for updates --- curls | 5 + manage.py | 27 ++++- migrations/__pycache__/env.cpython-34.pyc | Bin 1797 -> 1797 bytes migrations/versions/20d4a510108_.py | 33 ------ .../__pycache__/20d4a510108_.cpython-34.pyc | Bin 974 -> 0 bytes .../__pycache__/c0fd22a946_.cpython-34.pyc | Bin 0 -> 1705 bytes migrations/versions/c0fd22a946_.py | 57 +++++++++ tasker/__init__.py | 6 +- tasker/__pycache__/__init__.cpython-34.pyc | Bin 1076 -> 1172 bytes tasker/__pycache__/forms.cpython-34.pyc | Bin 1155 -> 1720 bytes tasker/__pycache__/models.cpython-34.pyc | Bin 1752 -> 3550 bytes tasker/forms.py | 13 ++- tasker/models.py | 58 ++++++++- tasker/templates/add_task.html | 37 ++++++ tasker/templates/add_value.html | 32 +++++ tasker/templates/index.html | 46 ++++---- tasker/templates/layout.html | 16 +-- tasker/templates/task_details.html | 45 +++++++ tasker/templates/tasks.html | 32 +++++ tasker/templates/tasks.html.bak | 32 +++++ tasker/views/__pycache__/api.cpython-34.pyc | Bin 3296 -> 4076 bytes tasker/views/__pycache__/tasks.cpython-34.pyc | Bin 826 -> 4871 bytes tasker/views/__pycache__/users.cpython-34.pyc | Bin 1954 -> 1951 bytes tasker/views/api.py | 110 ++++++++++++++++++ tasker/views/tasks.py | 110 +++++++++++++++++- tasker/views/users.py | 8 +- 26 files changed, 576 insertions(+), 91 deletions(-) create mode 100644 curls delete mode 100644 migrations/versions/20d4a510108_.py delete mode 100644 migrations/versions/__pycache__/20d4a510108_.cpython-34.pyc create mode 100644 migrations/versions/__pycache__/c0fd22a946_.cpython-34.pyc create mode 100644 migrations/versions/c0fd22a946_.py create mode 100644 tasker/templates/add_task.html create mode 100644 tasker/templates/add_value.html create mode 100644 tasker/templates/task_details.html create mode 100644 tasker/templates/tasks.html create mode 100644 tasker/templates/tasks.html.bak create mode 100644 tasker/views/api.py diff --git a/curls b/curls new file mode 100644 index 0000000..1d4451f --- /dev/null +++ b/curls @@ -0,0 +1,5 @@ +curl -v -H "Authorization: Basic ana@ana.com:ana" -X PUT -d '{"name":"walking my dog","t_type":1,"units":"hours"}' http://127.0.0.1:5000/tasker/api/v1/activities/4 + +curl -v -H "Authorization: Basic ana@ana.com:ana" http://127.0.0.1:5000/tasker/api/v1/activities/1 + +curl -v -H "Authorization: Basic ana@ana.com:ana" -X DELETE http://127.0.0.1:5000/tasker/api/v1/activities/4 diff --git a/manage.py b/manage.py index 35d5745..58b53dc 100644 --- a/manage.py +++ b/manage.py @@ -2,9 +2,7 @@ import os import csv import random - -from faker import Factory -from datetime import datetime +from datetime import date from flask.ext.script import Manager, Shell, Server from flask.ext.migrate import MigrateCommand @@ -30,9 +28,9 @@ def make_shell_context(): """ return dict(app=app, db=db, - AppUser=models.AppUser, - stat=models.stat, - stat_track=models.stat_track + user=models.User, + task=models.Task, + tracking=models.Tracking ) @@ -43,6 +41,23 @@ def test(): exit_code = pytest.main([TEST_PATH, '--verbose']) return exit_code +@manager.command +def seed_stats(): + myusers = models.User.query.order_by(models.User.id.desc()).all() + for user in myusers: + tasks = models.Task.query.filter_by(t_user=user.id).all() + for task in tasks: + month = 1 + days = 31 + for month in range(1,3): + for day in range(1,days): + r_date = date(2015,month,day) + r_value = random.randint(1,100) + stat = models.Tracking(user.id, task.id, r_date, r_value) + db.session.add(stat) + days = 28 + db.session.commit() + if __name__ == '__main__': manager.run() diff --git a/migrations/__pycache__/env.cpython-34.pyc b/migrations/__pycache__/env.cpython-34.pyc index 1c06f03a10a0ab6bc98671b13d3fe66a6eca9daf..ebad25ae45b1d310c18430662ed132870302e5fd 100644 GIT binary patch delta 16 XcmZqWYvp5q$HU9DUgy(B_J3>uEMEo4 delta 16 XcmZqWYvp5q$HU8Yy5aps_J3>uFAN4X diff --git a/migrations/versions/20d4a510108_.py b/migrations/versions/20d4a510108_.py deleted file mode 100644 index 22fb0c8..0000000 --- a/migrations/versions/20d4a510108_.py +++ /dev/null @@ -1,33 +0,0 @@ -"""empty message - -Revision ID: 20d4a510108 -Revises: None -Create Date: 2015-02-26 15:30:50.059246 - -""" - -# revision identifiers, used by Alembic. -revision = '20d4a510108' -down_revision = None - -from alembic import op -import sqlalchemy as sa - - -def upgrade(): - ### commands auto generated by Alembic - please adjust! ### - op.create_table('app_user', - sa.Column('id', sa.Integer(), nullable=False), - sa.Column('name', sa.String(length=255), nullable=False), - sa.Column('email', sa.String(length=255), nullable=False), - sa.Column('encrypted_password', sa.String(length=60), nullable=True), - sa.PrimaryKeyConstraint('id'), - sa.UniqueConstraint('email') - ) - ### end Alembic commands ### - - -def downgrade(): - ### commands auto generated by Alembic - please adjust! ### - op.drop_table('app_user') - ### end Alembic commands ### diff --git a/migrations/versions/__pycache__/20d4a510108_.cpython-34.pyc b/migrations/versions/__pycache__/20d4a510108_.cpython-34.pyc deleted file mode 100644 index de05cb7c709484d4f45e979fe27408c155317475..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 974 zcmah{L2uJA6n=5rB+XJZV2A?}D#sqSq-C9;nh;Vaq=8fr+c@+Rd9~GLBu-|h8`+Wa zUl4!ES5CdaoeR7q?N%ftocQV4{`}tizULoq%ensi^Y}vz;5)1hg8oaK>NOe$Fh*;@ z*Z@XgOn}vZ)gh`uT!(QTjABh7YQWe8)&OS07rbKu!{07_y8s+@n%4o3(=2btTq!!` zj`N;hhAK=%`|x1U?)hw&_Pc)9e^woEHE53#!JVPxG~?|9GzF~N-}Zaky}fp~KX~d7 z`u>jJf8N{ObDZ(UT9DBK%ZHAkNs>+qcQqVzhB(z%G#S7-GBY3}a9%PgoI1>rbV+nh zjO9_I#FPw?+q`0q$QywDKR|O0;H)BStRkR%1m;yGrFQ7gEldL_o;%VuP19hexYQ(M z+7`1YqNfpmrR##mT$>RW)9h^V8(HZFk7*d`dt6Lpo@Sf{DOKt!k!-P#=f@pe7H!t< zq|`RZib$F$s?A{%&0?XgLy_?*CNqyR8H%aidMCq}%KQz_hlx;`q@l?4=7|U|X8d;N z8_4?@xir7tdM8+~@~EJEa>g&Yl%W^OMC4R5Pf@{6lTTho)kiM9IGjqF;d4+P0*iN{ zytRG?J87=1S&AUW?_vsd2Mv&>@yK{mey$-O;LcyoE?Ab$E^gd38w&n6&>sEmeZk85}czha8 tmdVsbL?e_X&SeWjl*O09{+Zj}j}tbF_zMfM%0*+=Ov5CbhFf!6e*mX%<~9HT diff --git a/migrations/versions/__pycache__/c0fd22a946_.cpython-34.pyc b/migrations/versions/__pycache__/c0fd22a946_.cpython-34.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f717341e1ec934aee9ab821b62603fdf00ed4299 GIT binary patch literal 1705 zcma)7PjAym6n}PHJMlW*z_u*VOLjp>5lhpCQXoPIsR#*HidG9;a#(AcnKh>NILu7S zrq}Rg_yl~Hx$dc#J?wEW@MfH(j?}{1@zd|kd-MMMJbw8nYKEVF`S;bw0N`(^TrT1# z_{bM1D8LY<149R>3qu!Z4X6iM4RQ~L9ymsKAzOo?4|ENv4fVbF} z1ImTBwhse5m|@Gd&6(@WO>5T2_J^I#%D&Na=}`ZcL!;slE+Txlh=Am|Fe@vu%psly z;LJ;m{zr+;N`iAsT(=JAw)g$F_O@2{F6+jZ+kym1yksPjYWP|-GpjEfxNHqy=lF-! z994EVR!z(F7;y7q(-muKEZ%2z*N>~FYObpn2fTKH30b&mS-4(d0T-`bOihGG2=KGm z8fb4Knb2-Zb)8SLj2vd{nf5rznf5cr6ZPiwGagyJ#&VKo`ZD7qF&!&L<1vx)eIe-S zBecKLo+9!{`zkK?s#s0OOb05S@Ki}-FquvQBezXDCCKO~<%vP@G07%OM~DttQqdTv zb8Q`Miim`%nBwP%kwpnYYmi4V1~u3uKztIIf-qAj6lSdGXk5sh5dvo+g4Q98I!|j%G&5?%8mO zx5rZ*OvdO#*(J;%_fde`aJHPE>>W9+xn@?joXxquh4}2=#C35Kcdkq*LzJCRw-GES z6pn+%EU_IlmGw# literal 0 HcmV?d00001 diff --git a/migrations/versions/c0fd22a946_.py b/migrations/versions/c0fd22a946_.py new file mode 100644 index 0000000..446b3dd --- /dev/null +++ b/migrations/versions/c0fd22a946_.py @@ -0,0 +1,57 @@ +"""empty message + +Revision ID: c0fd22a946 +Revises: None +Create Date: 2015-02-28 16:01:43.793939 + +""" + +# revision identifiers, used by Alembic. +revision = 'c0fd22a946' +down_revision = None + +from alembic import op +import sqlalchemy as sa + + +def upgrade(): + ### commands auto generated by Alembic - please adjust! ### + op.create_table('user', + sa.Column('id', sa.Integer(), nullable=False), + sa.Column('name', sa.String(length=255), nullable=False), + sa.Column('email', sa.String(length=255), nullable=False), + sa.Column('encrypted_password', sa.String(length=60), nullable=True), + sa.PrimaryKeyConstraint('id'), + sa.UniqueConstraint('email') + ) + op.create_table('task', + sa.Column('id', sa.Integer(), nullable=False), + sa.Column('t_name', sa.String(length=255), nullable=False), + sa.Column('t_type', sa.Integer(), nullable=False), + sa.Column('t_units', sa.String(length=255), nullable=False), + sa.Column('t_user', sa.Integer(), nullable=True), + sa.ForeignKeyConstraint(['t_user'], ['user.id'], ), + sa.PrimaryKeyConstraint('id') + ) + op.create_table('tracking', + sa.Column('id', sa.Integer(), nullable=False), + sa.Column('tr_value', sa.Integer(), nullable=False), + sa.Column('tr_beg_value', sa.Integer(), nullable=True), + sa.Column('tr_end_value', sa.Integer(), nullable=True), + sa.Column('tr_target_date', sa.Date(), nullable=True), + sa.Column('tr_date', sa.Date(), nullable=False), + sa.Column('tr_task_id', sa.Integer(), nullable=True), + sa.Column('tr_user_id', sa.Integer(), nullable=True), + sa.ForeignKeyConstraint(['tr_task_id'], ['task.id'], ), + sa.ForeignKeyConstraint(['tr_user_id'], ['user.id'], ), + sa.PrimaryKeyConstraint('id') + ) + ### end Alembic commands ### + + +def downgrade(): + ### commands auto generated by Alembic - please adjust! ### + op.drop_table('tracking') + op.drop_table('task') + op.drop_table('user') + ### end Alembic commands ### diff --git a/tasker/__init__.py b/tasker/__init__.py index 7e318e7..111980a 100644 --- a/tasker/__init__.py +++ b/tasker/__init__.py @@ -12,7 +12,7 @@ from . import models from .views.users import usersb from .views.tasks import tasksb -#from .views.api import api +from .views.api import api SQLALCHEMY_DATABASE_URI = "postgres://localhost/tasker" DEBUG = True @@ -24,12 +24,12 @@ def create_app(): app.config.from_object(__name__) app.register_blueprint(usersb) app.register_blueprint(tasksb) -# app.register_blueprint(api, url_prefix="/urly_bird/api/V1") + app.register_blueprint(api, url_prefix="/tasker/api/v1") config.init_app(app) db.init_app(app) debug_toolbar.init_app(app) migrate.init_app(app, db) bcrypt.init_app(app) login_manager.init_app(app) - login_manager.login_view = "users.login" + login_manager.login_view = "usersb.login" return app diff --git a/tasker/__pycache__/__init__.cpython-34.pyc b/tasker/__pycache__/__init__.cpython-34.pyc index 4ee655a43b0c92bb173b5392eefed7e59d1f8d48..cdb993b98cb7694b35755c15a76e81519576e4ff 100644 GIT binary patch delta 444 zcmY+9K~BOz6o&sdMWCex1O?)j#H1Sti5n7B3`-L>u(2D1nQA}~(iSj8Ln2-P>m9g& zapf6209*GiJb|ysqRz|wnQ#7=|INI`U)AEbZfKSIPy0dvz7Sf1&voAJ`?B~{RUqT& z?_!XFl>tc=Ru)o&wFjAiwGXMo%0U{CNjw8q9x{cNnO=TA#!Ol(ol)06r(-R`k&PgB z<-bsM{s8nM@M4exQo(|VJVGxHHWmc()G%maNNj;y7J@tVuxW%q@&E&u$sn_3?ljj? zujAg@&RQFrPXBV`*w@|rS+e|hTjrORCzY8#c5TPKD)omq-8(boH^ixMlKx!ODCd8O z_Td5l0;E%#46f`(jV-C<6xeN=1^-By>guFxPu&tHbHYk#o&~0p`!9LMb-Xqh%5mR5 TAtpEINONRK4U|hnX;b1C*g{j8 delta 358 zcmY+9ze)o^5XQgRlX!c7;zcjPJ~r2+HlR_kOOYn24n&kaM2!aaE(oFsiP|5VXAtat z4j&+ejlI5tv%%t=VTSq5eEY#J-Xt2FqG;nqOu5&Y$L)&O77D`Nd6A*Y+FQGo{!yAEHaKah=i5 zHZMT|MHEsfxHwlcNzyI84U(3bIk!fx^$#rT_%s5wS~0+8#MI HTBY~}GCDm% diff --git a/tasker/__pycache__/forms.cpython-34.pyc b/tasker/__pycache__/forms.cpython-34.pyc index 9a1f83189be443da362b398b21c0ff9b4c7b3dd5..dfd83796aeb59a066f5323c001e976cd445d4275 100644 GIT binary patch literal 1720 zcmbu9zi%5i6vrQ>`>m7hxQ=SHK_GMqZn36L4GIm7g8+dL*m6i#1c^Izoe;F>8*hK`-`9#3b*g_9wX#3%BReB}G^OMZ;|(e%l`(>D&ld-&{wZ5U(G z@6hD)l0f2zg|^QS049Zx8a=dgIo6 z2l76gCOaQ63rLu8jw>aTj_IA&s#q?L3sL5#|BP$>s#3XaCXR_7NnVsqXK;4%w5i2U zmbF+2)wIGtcrBUukVV0NwvpH_=vNx7*AVlmC`0? zvzsKL39@X-rN}Z9Wtpt^c(`siYF!?lbGT z!7RX@F%4Ox`3kcQ6&HkegBHTuvP2o7c$_Uu5kVt8lo~?aAn(~>0eVQIsJGK3GJ7Xt zQRrInx~ME|<4lmI>f^pFEVY9*bGN0GA&O#N%3o}FLr zo`?&<>tQ>2lJwOs1>Pfbhs^cK7>CYEk(iow_o+q%RgcUMWDdz(pHfr1OTGab!mcTD z%nlKHmwEUN*)FraH}F%~F%AC<%{SoR9E)!y{u%hKh+U-XnP7?vAq`)KR2yES-L$9c z3z52K%c9mOP2R^ue&u4vM&EPlpuKVs1y8e(zC6!~r^FvgzmA+Wiw z@l^5Ib9#R;TjS76Vl{NxpH?|vKhVQJdASmkB=~=pbQSE~G=8lzyy2qBG{6?#`IWde z$@@6#9+u4=!xYIgN%qrlULxx3RXtZ7bQvFObTb>N(aEO=8`sgC9!q_6Ud!^=Mta1| zuCHic>3%zM`}%C(kw%y#JF74Y*>2;u9h=}`^Emy^aDt{=wZ{hR7j~~Za0k7C`w5rQ BUoHRu delta 414 zcmZvXyGq1B6o${qWys{RyKc;?5VTmE1+lOeaUp28AX=pm0+R(HF)&%Rv{K#v* zqi0L5c8r*XgrOQ6dc(ncL=*AJrcb;2oTxDwf{l6AYp%DMHU|Fn(&`7NEpvJy8%euQL74LuxSjIlMae*iCdK&t=% diff --git a/tasker/__pycache__/models.cpython-34.pyc b/tasker/__pycache__/models.cpython-34.pyc index 55a82b345b2586672da13d4ca786dcbf12303efe..357f193d1f34f54827f21b919da434d0323adfbd 100644 GIT binary patch literal 3550 zcmb_fOOxD05-zFLt$wKI34>X@!18V$9u_tn3p;oROn8?dn9B?oMGy*2t2~x1b&pGG z);()Z!=K?F@DI2X!KJQy@`VFOF1z2C>ei@@dBg^-QFc~kbyZg7_hr_69}N3vpZ#$3 zZC|PXsK%!aeIIY}9YlgZM`cRojtU)>yDD^5-cn&pIf<*1mdZSpw^i7#+MdcfD)&|B zSM9dSx+?Ffu&46A3j0-WM`Z(*2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&>H98*klO`sLZt5{XG^PU*$J>{8p4|B#mn*!H delta 142 zcmca7eS=r|9S<*8a@+fmPs|Jqj~S2vE0FB~#KnszDlcM7;bsWd|iOGkV7qftbCa1H^WDx@~7+E`51VD@~*2BzxnnIIRc`GN2 ZvI$S#&C4&q12kKPQ2+?V7-g75SpjG@BI5u6 diff --git a/tasker/forms.py b/tasker/forms.py index 9691ed4..9b9f8f4 100644 --- a/tasker/forms.py +++ b/tasker/forms.py @@ -1,10 +1,9 @@ from flask_wtf import Form from wtforms import StringField, PasswordField -from wtforms.fields.html5 import EmailField, URLField, IntegerField +from wtforms.fields.html5 import EmailField, URLField, IntegerField, DateField from wtforms.validators import DataRequired, Email, EqualTo - class LoginForm(Form): email = StringField('Email', validators=[DataRequired(), Email()]) password = PasswordField('Password', validators=[DataRequired()]) @@ -19,3 +18,13 @@ class RegistrationForm(Form): EqualTo('password_verification', message="Passwords must match")]) password_verification = PasswordField('Repeat password') + + +class TaskForm(Form): + name = StringField('Task Name', validators=[DataRequired()]) + t_type = IntegerField('Task Type', validators=[DataRequired()]) + units = StringField('Units', validators=[DataRequired()]) + +class TrackingForm(Form): + tr_date = DateField('Date', validators =[DataRequired()]) + tr_value = IntegerField("Today's Value", validators=[DataRequired()]) diff --git a/tasker/models.py b/tasker/models.py index 8759f35..d61e708 100644 --- a/tasker/models.py +++ b/tasker/models.py @@ -6,10 +6,10 @@ @login_manager.user_loader def load_user(id): - return AppUser.query.get(id) + return User.query.get(id) -class AppUser(db.Model, UserMixin): +class User(db.Model, UserMixin): id = db.Column(db.Integer, primary_key=True, autoincrement=True) name = db.Column(db.String(255), nullable=False) email = db.Column(db.String(255), unique=True, nullable=False) @@ -29,3 +29,57 @@ def check_password(self, password): def __repr__(self): return "".format(self.email) + + +class Task(db.Model): + id = db.Column(db.Integer, primary_key=True, autoincrement=True) + t_name = db.Column(db.String(255), nullable=False) + t_type = db.Column(db.Integer, nullable=False) + t_units = db.Column(db.String(255), nullable=False) + t_user = db.Column(db.Integer, db.ForeignKey('user.id')) + + def __init__(self, t_name, t_units, t_type, t_user): + self.t_name = t_name + self.t_units = t_units + self.t_type = t_type + self.t_user = t_user + + + def to_dict(self): + return {'id': self.id, + 'name': self.t_name, + 'type': self.t_type, + 'user': self.t_user, + 'units': self.t_units + } + +class Tracking(db.Model): + id = db.Column(db.Integer, primary_key=True, autoincrement=True) + tr_value = db.Column(db.Integer, nullable=False) + tr_beg_value = db.Column(db.Integer) + tr_end_value = db.Column(db.Integer) + tr_target_date = db.Column(db.Date) + tr_date = db.Column(db.Date, nullable=False) + tr_task_id = db.Column(db.Integer, db.ForeignKey('task.id')) + tr_user_id = db.Column(db.Integer, db.ForeignKey('user.id')) + + def __init__(self, + user_id, + task_id, + date, + value=0, + beg_value=0, + end_value=0, + target_date=date(3000,1,1), + ): + self.tr_user_id = user_id + self.tr_value = value + self.tr_beg_value = beg_value + self.tr_end_value = end_value + self.tr_target_date = target_date + self.tr_date = date + self.tr_task_id = task_id + + def to_dict(self): + return {'date': str(self.tr_date), + 'value': self.tr_value} diff --git a/tasker/templates/add_task.html b/tasker/templates/add_task.html new file mode 100644 index 0000000..c38900c --- /dev/null +++ b/tasker/templates/add_task.html @@ -0,0 +1,37 @@ +{% extends "layout.html" %} + +{% block body %} +{% if current_user.is_authenticated() %} +
+ {{ form.hidden_tag() }} + +
+
+ Task {{ form.name(size=40) }} +
+
+
+
+ Units {{ form.units(size=40) }} +
+
+
+
+ Type {{ form.t_type }} +
+
+
+
+ +
+
+
+{% else %} +
+
+ Please Login +
+
+ +{% endif %} +{% endblock %} diff --git a/tasker/templates/add_value.html b/tasker/templates/add_value.html new file mode 100644 index 0000000..0f030b2 --- /dev/null +++ b/tasker/templates/add_value.html @@ -0,0 +1,32 @@ +{% extends "layout.html" %} + +{% block body %} +{% if current_user.is_authenticated() %} + +
+ {{ form.hidden_tag() }} +
+
+ Date {{ form.tr_date }} +
+
+
+
+ Value {{ form.tr_value }} +
+
+
+
+ +
+
+
+{% else %} +
+
+ Please Login +
+
+ +{% endif %} +{% endblock %} diff --git a/tasker/templates/index.html b/tasker/templates/index.html index 2c013ad..faf14e6 100644 --- a/tasker/templates/index.html +++ b/tasker/templates/index.html @@ -1,27 +1,25 @@ {% extends "layout.html" %} {% block body %} +
+
+

All Tasks

+
+
+
    + {% for task in tasks %} +
    +
    + {{task.t_name}}: +
    +
    +
    +
    +
    + {% endfor %} +
+{% endblock %} + - - + -{% endblock %} +{% endif %} +{% endblock %}--> diff --git a/tasker/templates/layout.html b/tasker/templates/layout.html index d1f626e..96e8c8c 100644 --- a/tasker/templates/layout.html +++ b/tasker/templates/layout.html @@ -4,7 +4,7 @@ - Ana's Link Shortener + Ana's Tasker - Task Management Tool @@ -33,20 +33,12 @@

Home

  • {% endif %} - + diff --git a/tasker/templates/task_details.html b/tasker/templates/task_details.html new file mode 100644 index 0000000..0d13833 --- /dev/null +++ b/tasker/templates/task_details.html @@ -0,0 +1,45 @@ +{% extends "layout.html" %} +{% block body %} +
    +
    + {{task.t_name}}: {{task.t_units}} +
    +
    + +
    + +
    +
    +
    + +
    +
    +
    + + + + + + + + +

    Values

    + {% for stat in stats %} + +
    +
    + + + + + {% endfor %} + +
    DateValue
    {{stat.tr_date}}: {{stat.tr_value}}
    + + +{% endblock %} diff --git a/tasker/templates/tasks.html b/tasker/templates/tasks.html new file mode 100644 index 0000000..a18983d --- /dev/null +++ b/tasker/templates/tasks.html @@ -0,0 +1,32 @@ +{% extends "layout.html" %} +{% block body %} +
    +
    +

    All Tasks

    +
    +
    + + {% for task in tasks %} +
    +
    + {{task.t_name}}: {{task.t_units}} +
    +
    + + +
    +
    +
    + + {% endfor %} +{% endblock %} diff --git a/tasker/templates/tasks.html.bak b/tasker/templates/tasks.html.bak new file mode 100644 index 0000000..de84295 --- /dev/null +++ b/tasker/templates/tasks.html.bak @@ -0,0 +1,32 @@ +{% extends "layout.html" %} +{% block body %} +
    +
    +

    All Tasks

    +
    +
    + + {% for task in tasks %} +
    +
    + {{task.t_name}}: {{task.t_units}} +
    +
    + +
    + +
    + +
    +
    +
    + + {% endfor %} +{% endblock %} diff --git a/tasker/views/__pycache__/api.cpython-34.pyc b/tasker/views/__pycache__/api.cpython-34.pyc index ba01933dd435cf50214ba5a57b3a91156aff8cd6..e6226feb1681095e08189f629def3d24ded59815 100644 GIT binary patch literal 4076 zcmbVP&2t+`6@T-kFH5$g#7?|Uc1`w>)mE*&ge5=-0rIs#1tpZc7g1ZPvAXSyGNaLU zkCL^^xsVhGPHYu7&Kx-LM{uC{7n&odTsUydiQju8$&M=&RgB%O{+RB5AHVm0J^yO9 z8h<+Y_wFB?ME|5yPX+Ctpx7rKk;1=6DN%pX_Ned4xKF81SwQ`OvXJ^AWfAow$|}^a zP*$aWl{{V_P+Fs`PW?LiA*qPc24zdsU!tr@{U&8C>bJ_d3Z=`Gtx$i3vQ_G@mZMcl z&r#NGsZ~O83nq}J%b$68OVle#!xa)s0-QX8`5eNxzAQ`#Sp z!rCj+-kNWP7s{Zq1;8WS5Os1Bae?)5at_iOI)@u~9oV9;?0l>zx8hX*2(MmgwhLF-f*3hpxp( z42-sud~Ed!3ojaZ<|5k3Hvsq$MIQcLsCWULQX$q1SPN&GMO{~}`(Fx*1|83Y*h$)D zwT`Z9PRH@Ic#@msNCO>nseH46_Cg>QhF6Qte~Sj}JQA}*GMN2^*x&qyy)g3G_@$sP zgW1#waz`g`stRr3Rj9JzzwqfrKt)KSh(;AsRXPUF$s1Ks(~FRfF;$~uhAZ(AA@#Y7im;gD^| z58E$5>7m%ms19WPm+d)DVLhU6eEO`=am~P;^;dWok568e1aOY~mAYiZ4 zI=XgOjA^&xt+9T-#dh1;H+hEsFM5x;sBRu5kP9n(kAws@x_uRer(nPQUP18tpk34+q4H6)q=?_$pJn^Bs_${LOuS9=zx z38u7RZ@F+BXSzH(nvRpgx=Jx9KvISo!&R-e7DoUDO1TQ)mLX+v@-W+6@qNj#G(sw_ zg5;AM3nH&_A{r#hg?qU=EDs1-H}fgK{dTCE&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A3z8xHIY!Lu89I?LBd@Ewj%)zMR?T64L?A^ zFYpgkbZM!efS!uA0}`v-x!s-Fz1zF>XY1;-Tybu1zVb;Q@leSzYqvI3=&WP z2UwPCkPJ!#*A}@Bsbge-o4MS8w4e&$1t=TbhAM&=7g7__fhvKQ?l0Dk@@W>N3*~`( zP(HX%!UBX1S%+$XH^9OYL=j;VGkUXyu!YeQgo7D_AgYXOWHDcc(9sJj@APj3Y;KD| z5+*~HZfFnPxs?p!llb79Z60R)pV9W{kjD-|l5b11dV$uxbcSOQp0|$^B?A`O#6KbO z>5BaHL*MnhtS#$@9yJJqmGsdKOs=2GBz<+y_UwLtJWyf3AGt)&&1f=B!d&`0hN_FG fp7HjUnuw_kw;5$|jiAPAtjbo6Hfw4%qpJS^clb`K diff --git a/tasker/views/__pycache__/users.cpython-34.pyc b/tasker/views/__pycache__/users.cpython-34.pyc index d197eaa46c855f146f54a8dce203145c8a5d46bf..b06bcfb5023872bd964ff5afd3d08ab9e34d26c2 100644 GIT binary patch delta 25 hcmZ3)KcAoT9S<*8`RR`##Tz--GcvMl-oyBe6##c+2|fS- delta 28 kcmbQwzlfjn9S<*8TkHFf`i-3H8ClpJ3ko*xWPHX70FbW=H2?qr diff --git a/tasker/views/api.py b/tasker/views/api.py new file mode 100644 index 0000000..05f551b --- /dev/null +++ b/tasker/views/api.py @@ -0,0 +1,110 @@ +import base64 +import json + +from flask import Blueprint, jsonify, request, abort, url_for +from flask.ext.login import login_user + +from ..models import User, Task, Tracking +from ..forms import TaskForm, TrackingForm +from ..extensions import login_manager, db + + +api = Blueprint("api", __name__) + + +def json_response(code, data): + return (json.dumps(data), code, {"Content-Type": "application/json"}) + + +@api.app_errorhandler(401) +def unauthorized(request): + return ("", 401, {"Content-Type": "application/json"}) + + +@login_manager.request_loader +def authorize_user(request): + # Authorization: Basic username:password + api_key = request.headers.get('Authorization') + if api_key: + api_key = api_key.replace('Basic ', '', 1) + api_key = api_key.split(":") + email, password = api_key[0], api_key[1] + #api_key = base64.b64decode(api_key).decode("utf-8") + #email, password = api_key.split(":") + user = User.query.filter_by(email=email).first() + if user.check_password(password): + return user + return None + + +def require_authorization(): + user = authorize_user(request) + if user: + login_user(user) + return(user.id) + else: + abort(401) + return None + + +@api.route("/activities", methods=["GET", "POST"]) +def activities(): + if request.method == "POST": + return create_task() + tasks = Task.query.all() + tasks = [task.to_dict() for task in tasks] + return jsonify({"activities": tasks}) + + +def create_task(): + """Creates a new task from a JSON request.""" + user_id=require_authorization() + body = request.get_data(as_text=True) + data = json.loads(body) + form = TaskForm(data=data, formdata=None, csrf_enabled=False) + if form.validate(): + task = Task(form.name.data, + form.units.data, + form.t_type.data, + user_id) + db.session.add(task) + db.session.commit() + return (json.dumps(task.to_dict()), 201, {"Location": url_for(".task", id=task.id)}) + else: + return json_response(400, form.errors) + + +def update_task(id): + user_id=require_authorization() + body = request.get_data(as_text=True) + data = json.loads(body) + task = Task.query.get(id) + form = TaskForm(obj=task, formdata=None, csrf_enabled=False) + if form.validate_on_submit(): + form.populate_obj(task) + db.session.commit() + return (json.dumps(task.to_dict()), 201, {"Location": url_for(".task", id=task.id)}) + else: + return json_response(400, form.errors) + + +def delete_task(id): + user_id=require_authorization() + task = Task.query.get(id) + if task: + db.session.delete(task) + db.session.commit() + return jsonify({'result': True}) + else: + abort(404) + + +@api.route("/activities/", methods=["GET", "PUT", "DELETE"]) +def task(id): + if request.method == "PUT": + return update_task(id) + elif request.method == "DELETE": + return delete_task(id) + stats = Tracking.query.filter_by(tr_task_id=id).order_by(Tracking.tr_date.desc()) + pairs = [stat.to_dict() for stat in stats] + return jsonify({"activity": task.to_dict(),"values":pairs}) diff --git a/tasker/views/tasks.py b/tasker/views/tasks.py index 5419738..516f2c8 100644 --- a/tasker/views/tasks.py +++ b/tasker/views/tasks.py @@ -1,4 +1,4 @@ -from datetime import datetime +from datetime import date from io import BytesIO import matplotlib.pyplot as plt from bokeh.plotting import figure, output_file, show @@ -9,13 +9,113 @@ from flask.ext.login import login_required, current_user from ..extensions import db -#from ..forms import LinkAddForm, LinkUpdateForm -#from ..models import Links, Clicks +from ..forms import TaskForm, TrackingForm +from ..models import Task, Tracking + +from sqlalchemy.sql import and_ tasksb = Blueprint("tasksb",__name__) @tasksb.route("/") def index(): - #if current_user.is_authenticated(): - return render_template("index.html") + if current_user.is_authenticated(): + tasks = Task.query.filter_by(t_user=current_user.id).order_by(Task.id.desc()) + return render_template("tasks.html",tasks=tasks) + else: + return render_template("tasks.html",tasks=[]) + + +@tasksb.route("/task/") +@login_required +def show_task(id): + task = Task.query.get(id) + stats = Tracking.query.filter_by(tr_task_id=id).order_by(Tracking.tr_date.desc()) + return render_template("task_details.html",stats=stats, task=task) + + +@tasksb.route("/task/new", methods=["GET", "POST"]) +@login_required +def add_task(): + form = TaskForm() + if form.validate_on_submit(): + new_task = Task(form.name.data, + form.units.data, + form.t_type.data, + current_user.id + ) + db.session.add(new_task) + db.session.commit() + return redirect(url_for("tasksb.index")) + return render_template("add_task.html", + form=form, + post_url=url_for("tasksb.add_task"), + b_label="Add Task") + + +@tasksb.route("/task//delete", methods=["GET", "POST"]) +@login_required +def delete_task(id): + task = Task.query.get(id) + db.session.delete(task) + db.session.commit() + tasks = Task.query.filter_by(t_user=current_user.id).order_by(Task.id.desc()) + return render_template("tasks.html",tasks=tasks) + + +@tasksb.route('/task//edit', methods=["GET", "POST"]) +@login_required +def update_task(id): + task = Task.query.get(id) + form = TaskForm(obj=task) + if form.validate_on_submit(): + form.populate_obj(task) + db.session.commit() + return redirect(url_for("tasksb.index")) + return render_template("add_task.html", + post_url = url_for("tasksb.update_task",id=task.id), + form=form, b_label="Update") + + +@tasksb.route('/task//stats', methods=["GET", "POST"]) +@login_required +def add_daily_value(id): + form = TrackingForm() + if form.validate_on_submit(): + date_read = form.tr_date.data + value_read = form.tr_value.data + stat = Tracking.query.filter(and_(Tracking.tr_date==date_read,Tracking.tr_task_id==id)).first() + if stat: + stat.tr_value = value_read + else: + stat = Tracking(id, date_read, value_read) + db.session.add(stat) + db.session.commit() + return redirect(url_for("tasksb.show_task",id=id)) + return render_template("add_value.html", form=form, task_id=id) + + +@tasksb.route("/task/_stats.png") +def stat_chart(id): + stats = Tracking.query.filter_by(tr_task_id=id).all() + values = [stat.tr_value for stat in stats] + dates = [stat.tr_date for stat in stats] + date_labels = [d.strftime("%b %d") for d in dates] + every_other_date_label = [d if i % 2 else "" for i, d in enumerate(date_labels)] + ax = plt.subplot(111) + ax.spines["top"].set_visible(False) + ax.spines["right"].set_visible(False) + ax.get_xaxis().tick_bottom() + ax.get_yaxis().tick_left() + plt.title("Values") + fig = plt.gcf() + fig.set_size_inches(6,4) + plt.plot_date(x=dates, y=values, fmt="-") + plt.xticks(dates, every_other_date_label, rotation=45, size="x-small") + plt.tight_layout() + + fig = BytesIO() # will store the plot as bytes + plt.savefig(fig) + plt.clf() + fig.seek(0) #go back to the beginning + return send_file(fig, mimetype="image/png") diff --git a/tasker/views/users.py b/tasker/views/users.py index 765588c..1fb25c1 100644 --- a/tasker/views/users.py +++ b/tasker/views/users.py @@ -3,7 +3,7 @@ from ..extensions import db from ..forms import LoginForm, RegistrationForm -from ..models import AppUser +from ..models import User usersb = Blueprint("usersb", __name__) @@ -11,7 +11,7 @@ def login(): form = LoginForm() if form.validate_on_submit(): - user = AppUser.query.filter_by(email=form.email.data).first() + user = User.query.filter_by(email=form.email.data).first() if user and user.check_password(form.password.data): login_user(user) return redirect(request.args.get("next") or url_for("tasksb.index")) @@ -31,11 +31,11 @@ def logout(): def register(): form = RegistrationForm() if form.validate_on_submit(): - user = AppUser.query.filter_by(email=form.email.data).first() + user = User.query.filter_by(email=form.email.data).first() if user: flash("A user with that email address already exists.") else: - user = AppUser(name=form.name.data, + user = User(name=form.name.data, email=form.email.data, password=form.password.data) db.session.add(user) From e99e89400c90b24ee136f778c4a73351bbf2e869 Mon Sep 17 00:00:00 2001 From: Ana Maria Echeverri Date: Sat, 28 Feb 2015 21:20:10 -0500 Subject: [PATCH 04/31] easy mode finished. Everything works except for task updates through the app --- curls | 8 ++- tasker/__pycache__/forms.cpython-34.pyc | Bin 1720 -> 1921 bytes tasker/forms.py | 3 + tasker/views/__pycache__/api.cpython-34.pyc | Bin 4076 -> 5933 bytes tasker/views/api.py | 65 ++++++++++++++++++-- 5 files changed, 71 insertions(+), 5 deletions(-) diff --git a/curls b/curls index 1d4451f..6f01be9 100644 --- a/curls +++ b/curls @@ -1,5 +1,11 @@ -curl -v -H "Authorization: Basic ana@ana.com:ana" -X PUT -d '{"name":"walking my dog","t_type":1,"units":"hours"}' http://127.0.0.1:5000/tasker/api/v1/activities/4 +curl -v -H "Authorization: Basic ana@ana.com:ana" -X PUT -d '{"name":"calories consumption","t_type":1,"units":"calories"}' http://127.0.0.1:5000/tasker/api/v1/activities/1 curl -v -H "Authorization: Basic ana@ana.com:ana" http://127.0.0.1:5000/tasker/api/v1/activities/1 curl -v -H "Authorization: Basic ana@ana.com:ana" -X DELETE http://127.0.0.1:5000/tasker/api/v1/activities/4 + +curl -v -H "Authorization: Basic ana@ana.com:ana" -X POST -d '{"tr_date":"2014/01/01","tr_value":1}' http://127.0.0.1:5000/tasker/api/v1/activities/1/stats + +curl -v -H "Authorization: Basic ana@ana.com:ana" -X DELETE -d '{"tr_date":"2014/01/01"}' http://127.0.0.1:5000/tasker/api/v1/activities/1/stats + +curl -v -H "Authorization: Basic ana@ana.com:ana" -X PUT -d '{"tr_date":"2015/02/27", "tr_value":20}' http://127.0.0.1:5000/tasker/api/v1/activities/1/stats diff --git a/tasker/__pycache__/forms.cpython-34.pyc b/tasker/__pycache__/forms.cpython-34.pyc index dfd83796aeb59a066f5323c001e976cd445d4275..e134ac0f95158bd89da1faad75128737ee2de70d 100644 GIT binary patch delta 211 zcmdnN+sLo{j)#}axcpNH11kf=V+JI^0%SV?aq+c@%KK&9Q+OFt_!wFkKx8T-Lo+i& zln_G-KSQvlz{VFMtm4T?S{dMaH6|Ods;j3k1C_Dd5^_n+Ni9hYDN0Pv&df`9%P-0; zk_T!l;sp|ZnrxF7uu3u&DNJr)6PGAb0*WaBaWNB+;9&&w{WOIq|7UGwR01kd6A=JP T2r!B$+z*J2rILnrqJYrY^{^M Z*_DL&7#J7?7{wTs7-g8nSjD)-SOK$h5DWkS diff --git a/tasker/forms.py b/tasker/forms.py index 9b9f8f4..bb5405c 100644 --- a/tasker/forms.py +++ b/tasker/forms.py @@ -28,3 +28,6 @@ class TaskForm(Form): class TrackingForm(Form): tr_date = DateField('Date', validators =[DataRequired()]) tr_value = IntegerField("Today's Value", validators=[DataRequired()]) + +class DeleteTrackingForm(Form): + tr_date = DateField('Date', validators =[DataRequired()]) diff --git a/tasker/views/__pycache__/api.cpython-34.pyc b/tasker/views/__pycache__/api.cpython-34.pyc index e6226feb1681095e08189f629def3d24ded59815..3b8d0bddc1fabb9a6463a5becf6d2eafc45d7949 100644 GIT binary patch literal 5933 zcmc&&OK%(36+SZ@zDbdy9+oU8k()RUokU8L)M!%IN&HHi2C`czKtVK}jCe=#&@&`+ zXJ|))y@`V^x=MilfUXL3+hteX6$P^H;&xM@-FVYQms#~Y=aQ66$Y~oCD9O3J@5edc zIp4YSk6OL*+P#17oL(gQ8y));kbfIb`lUmp@N+08>P+(vbsVX8DRwEzQ71=Avr1BJ3D5+AXN=c16HA?E#soS;!#dDN2sMDaN zNu4Go^VFHQZAFS(lq^tZfs#e)EZW&i6faS-Or2$N!W^kGg{SDDOPv)`6;f6D44Yr2 zaD{rON!92fHeV+-$Mwi})+k({-WgI2Qq4)_Q>5lewPftmGWHo#3#1lFEss==tnqw&zIUcTPr~ zBlSF~^O8sA1yXIvpP$TjL1tSfb$qrLNxd|g4MQB-ZomA9)x6ctoAQ--6b^ON&rGqG z4*JpFfhp?n<58GqCLin$G#W-a_V)(5?U+hD*pK@DC=K-^7gMxz#`^#T)NiV+liB)AM9f~SM6doFX$`Za9&aWV(snh27iX-B9ajGtz_pL7>%U zif!%=KH1E0;80Kg?ndD~j2K26!vj<2C43#G!$Cg{o4k2Bk)v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obw29EYXPddEl5l7wZdWwJ;#5h28}?(&K82z?aUdq0V5h zx%>xVaII;m%+=n=ABxT(QkKkUyE#pz_r37OP9XZqkvFwP`L#A?uAJBRas@(4qf{oQ zMG}x;A(s+Aqm9C60x2TZT;le-#J6a*nL`QPboSCBV5T5|{ z?=X|u%+hQo*5vEvC+wX3)x3;z)~!ZkA`fH#vA24iFnTxW54SJL>((1rme8tnuh$bg zYE7n$2q6n6??b!TKtU(8QGixp7Avp{6C2Q1IICghbB`eE1!26#2+%EX5Hok)}^b)5t~X3-=ug+iGKWgtRavPHPH zJBaT=z&{jK@}>@P!{R(e-#@O{MBCGN!Wk5xWmuWXW!q(&vR|mPALX;9^YYX#kGT%F zkT3WLzzyIgoPz$50k;h3W>5$5U98&_hMZtg7P<~}bL3-@4&6L?x&``9{IQ_JAVP+u ziDTp{#Shqqi-$VwMaYzFT(Lq-d}j~u-D^76#3gKVU+KX?S3HTTcnZaixQz0|Sf|Y- zpwLX6&lxVPD(>MewkV@S;u#XODna`d^YYW|>{vO&U^wb|k>95JvvzrE|Sp#3V0g$Xmj|xp^07jrt{f2 z9%7Mz0-sm`b1Ozv3-?I(&8@OqAv0%k|s=6#Oq6%xQ>>Ssyxj7 zWWI{3cuii&@0_D?ka_eJo0@nGKU6A=yy$^B#pCGd%Wv}AGf$uk- zr6@xLBZQvFAJb`K$apG*>iLKEpWf;ReAM%|@rgpXfWl#pw#tgyEUU4aUeKLX!*Gj^ My^?XtPTtA>3j+&L{Qv*} diff --git a/tasker/views/api.py b/tasker/views/api.py index 05f551b..f005652 100644 --- a/tasker/views/api.py +++ b/tasker/views/api.py @@ -5,9 +5,10 @@ from flask.ext.login import login_user from ..models import User, Task, Tracking -from ..forms import TaskForm, TrackingForm +from ..forms import TaskForm, TrackingForm, DeleteTrackingForm from ..extensions import login_manager, db +from sqlalchemy.sql import and_ api = Blueprint("api", __name__) @@ -79,9 +80,11 @@ def update_task(id): body = request.get_data(as_text=True) data = json.loads(body) task = Task.query.get(id) - form = TaskForm(obj=task, formdata=None, csrf_enabled=False) + form = TaskForm(data, formdata=None, csrf_enabled=False) if form.validate_on_submit(): - form.populate_obj(task) + task.t_name = form.name.data + task.t_type = form.t_type.data + task.t_units = form.units.data db.session.commit() return (json.dumps(task.to_dict()), 201, {"Location": url_for(".task", id=task.id)}) else: @@ -97,7 +100,7 @@ def delete_task(id): return jsonify({'result': True}) else: abort(404) - + @api.route("/activities/", methods=["GET", "PUT", "DELETE"]) def task(id): @@ -108,3 +111,57 @@ def task(id): stats = Tracking.query.filter_by(tr_task_id=id).order_by(Tracking.tr_date.desc()) pairs = [stat.to_dict() for stat in stats] return jsonify({"activity": task.to_dict(),"values":pairs}) + + +def add_stat(id): + user_id=require_authorization() + body = request.get_data(as_text=True) + data = json.loads(body) + form = TrackingForm(data=data, formdata=None, csrf_enabled=False) + if form.validate(): + stat = Tracking(user_id, id, form.tr_date.data,form.tr_value.data) + db.session.add(stat) + db.session.commit() + return jsonify({"stat":stat.to_dict()}) + else: + return json_response(400, form.errors) + + +def delete_stat(id): + user_id=require_authorization() + body = request.get_data(as_text=True) + data = json.loads(body) + form = DeleteTrackingForm(data=data, formdata=None, csrf_enabled=False) + stat = Tracking.query.filter(and_(Tracking.tr_task_id==id, Tracking.tr_date==form.tr_date.data)).first() + if stat: + db.session.delete(stat) + db.session.commit() + return jsonify({'result': True}) + else: + abort(404) + + +def update_stat(id): + user_id=require_authorization() + body = request.get_data(as_text=True) + data = json.loads(body) + form = TrackingForm(data=data, formdata=None, csrf_enabled=False) + stat = Tracking.query.filter(and_(Tracking.tr_task_id==id, Tracking.tr_date==form.tr_date.data)).first() + if stat: + stat.tr_date = form.tr_date.data + stat.tr_value = form.tr_value.data + db.session.add(stat) + db.session.commit() + return jsonify({"stat":stat.to_dict()}) + else: + abort(404) + + +@api.route("/activities//stats", methods=["POST", "PUT", "DELETE"]) +def stat(id): + if request.method == "PUT": + return update_stat(id) + elif request.method == "DELETE": + return delete_stat(id) + elif request.method == "POST": + return add_stat(id) From 9eab68408b1714371a7729f72c27f1295cf1fc55 Mon Sep 17 00:00:00 2001 From: Ana Maria Echeverri Date: Sun, 1 Mar 2015 13:45:35 -0500 Subject: [PATCH 05/31] fixed labels for links --- tasker/templates/tasks.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasker/templates/tasks.html b/tasker/templates/tasks.html index a18983d..a923b19 100644 --- a/tasker/templates/tasks.html +++ b/tasker/templates/tasks.html @@ -17,8 +17,8 @@

    All Tasks

    From 394acb4700bba38f00ea538f94af9865d64f2492 Mon Sep 17 00:00:00 2001 From: Ana Maria Echeverri Date: Sun, 1 Mar 2015 13:46:13 -0500 Subject: [PATCH 06/31] update issues fixed --- tasker/views/tasks.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tasker/views/tasks.py b/tasker/views/tasks.py index 516f2c8..66ffcd4 100644 --- a/tasker/views/tasks.py +++ b/tasker/views/tasks.py @@ -67,7 +67,9 @@ def delete_task(id): @login_required def update_task(id): task = Task.query.get(id) - form = TaskForm(obj=task) + form = TaskForm(name=task.t_name, + t_type=task.t_type, + units=task.t_units) if form.validate_on_submit(): form.populate_obj(task) db.session.commit() @@ -77,7 +79,7 @@ def update_task(id): form=form, b_label="Update") -@tasksb.route('/task//stats', methods=["GET", "POST"]) +@tasksb.route('/task//stats', methods=["GET", "POST", "PUT"]) @login_required def add_daily_value(id): form = TrackingForm() @@ -88,7 +90,7 @@ def add_daily_value(id): if stat: stat.tr_value = value_read else: - stat = Tracking(id, date_read, value_read) + stat = Tracking(current_user.id, id, date_read, value_read) db.session.add(stat) db.session.commit() return redirect(url_for("tasksb.show_task",id=id)) From cb0f8beb7496eaa6c3559f88ac347a21d504e43f Mon Sep 17 00:00:00 2001 From: Ana Maria Echeverri Date: Sun, 1 Mar 2015 13:46:56 -0500 Subject: [PATCH 07/31] api ready. issues still with update of task. update of stats works fine --- tasker/views/api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasker/views/api.py b/tasker/views/api.py index f005652..1d1f373 100644 --- a/tasker/views/api.py +++ b/tasker/views/api.py @@ -79,12 +79,12 @@ def update_task(id): user_id=require_authorization() body = request.get_data(as_text=True) data = json.loads(body) - task = Task.query.get(id) form = TaskForm(data, formdata=None, csrf_enabled=False) - if form.validate_on_submit(): + task = Task.query.get(id) + if task: task.t_name = form.name.data task.t_type = form.t_type.data - task.t_units = form.units.data + task.t_units = form.units.data db.session.commit() return (json.dumps(task.to_dict()), 201, {"Location": url_for(".task", id=task.id)}) else: From a2d81223d64aacdaa289c4d9695b800b311bed7b Mon Sep 17 00:00:00 2001 From: Ana Maria Echeverri Date: Sun, 1 Mar 2015 15:18:03 -0500 Subject: [PATCH 08/31] final forms easy mode --- tasker/forms.py | 4 ++-- tasker/templates/add_task.html | 37 ---------------------------------- 2 files changed, 2 insertions(+), 39 deletions(-) delete mode 100644 tasker/templates/add_task.html diff --git a/tasker/forms.py b/tasker/forms.py index bb5405c..6214786 100644 --- a/tasker/forms.py +++ b/tasker/forms.py @@ -21,9 +21,9 @@ class RegistrationForm(Form): class TaskForm(Form): - name = StringField('Task Name', validators=[DataRequired()]) + t_name = StringField('Task Name', validators=[DataRequired()]) t_type = IntegerField('Task Type', validators=[DataRequired()]) - units = StringField('Units', validators=[DataRequired()]) + t_units = StringField('Units', validators=[DataRequired()]) class TrackingForm(Form): tr_date = DateField('Date', validators =[DataRequired()]) diff --git a/tasker/templates/add_task.html b/tasker/templates/add_task.html deleted file mode 100644 index c38900c..0000000 --- a/tasker/templates/add_task.html +++ /dev/null @@ -1,37 +0,0 @@ -{% extends "layout.html" %} - -{% block body %} -{% if current_user.is_authenticated() %} -
    - {{ form.hidden_tag() }} - -
    -
    - Task {{ form.name(size=40) }} -
    -
    -
    -
    - Units {{ form.units(size=40) }} -
    -
    -
    -
    - Type {{ form.t_type }} -
    -
    -
    -
    - -
    -
    -
    -{% else %} -
    -
    - Please Login -
    -
    - -{% endif %} -{% endblock %} From 7d0f1a8ccc390d45ccbd65955d6809527b4bdcac Mon Sep 17 00:00:00 2001 From: Ana Maria Echeverri Date: Sun, 1 Mar 2015 15:18:32 -0500 Subject: [PATCH 09/31] final index.html easy mode --- tasker/templates/index.html | 59 ++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/tasker/templates/index.html b/tasker/templates/index.html index faf14e6..c01d279 100644 --- a/tasker/templates/index.html +++ b/tasker/templates/index.html @@ -1,49 +1,48 @@ {% extends "layout.html" %} {% block body %} + +{% if current_user.is_authenticated() %}

    All Tasks

    -
      + {% for task in tasks %}
      - {{task.t_name}}: + {{task.t_name}}: {{task.t_units}}
      -
      -
      - {% endfor %} -
    -{% endblock %} - - - +{% endblock %} From 86a6ccd45dcaf9dba54cc4c7a23d88cd8b888753 Mon Sep 17 00:00:00 2001 From: Ana Maria Echeverri Date: Sun, 1 Mar 2015 15:19:02 -0500 Subject: [PATCH 10/31] final tasks view easy mode --- tasker/views/tasks.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tasker/views/tasks.py b/tasker/views/tasks.py index 66ffcd4..4323b3b 100644 --- a/tasker/views/tasks.py +++ b/tasker/views/tasks.py @@ -21,9 +21,9 @@ def index(): if current_user.is_authenticated(): tasks = Task.query.filter_by(t_user=current_user.id).order_by(Task.id.desc()) - return render_template("tasks.html",tasks=tasks) + return render_template("index.html",tasks=tasks) else: - return render_template("tasks.html",tasks=[]) + return render_template("index.html",tasks=[]) @tasksb.route("/task/") @@ -47,7 +47,7 @@ def add_task(): db.session.add(new_task) db.session.commit() return redirect(url_for("tasksb.index")) - return render_template("add_task.html", + return render_template("task_form.html", form=form, post_url=url_for("tasksb.add_task"), b_label="Add Task") @@ -60,7 +60,7 @@ def delete_task(id): db.session.delete(task) db.session.commit() tasks = Task.query.filter_by(t_user=current_user.id).order_by(Task.id.desc()) - return render_template("tasks.html",tasks=tasks) + return render_template("index.html",tasks=tasks) @tasksb.route('/task//edit', methods=["GET", "POST"]) @@ -74,7 +74,7 @@ def update_task(id): form.populate_obj(task) db.session.commit() return redirect(url_for("tasksb.index")) - return render_template("add_task.html", + return render_template("task_form.html", post_url = url_for("tasksb.update_task",id=task.id), form=form, b_label="Update") From 7a69a167ffb39372a75e79e6ba7bb7a64164ed71 Mon Sep 17 00:00:00 2001 From: Ana Maria Echeverri Date: Sun, 1 Mar 2015 15:19:22 -0500 Subject: [PATCH 11/31] final api view easy mode --- tasker/views/api.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/tasker/views/api.py b/tasker/views/api.py index 1d1f373..eb8ef39 100644 --- a/tasker/views/api.py +++ b/tasker/views/api.py @@ -64,8 +64,8 @@ def create_task(): data = json.loads(body) form = TaskForm(data=data, formdata=None, csrf_enabled=False) if form.validate(): - task = Task(form.name.data, - form.units.data, + task = Task(form.t_name.data, + form.t_units.data, form.t_type.data, user_id) db.session.add(task) @@ -79,12 +79,20 @@ def update_task(id): user_id=require_authorization() body = request.get_data(as_text=True) data = json.loads(body) - form = TaskForm(data, formdata=None, csrf_enabled=False) + print('************') + print(data) + form = TaskForm(data=data, formdata=None, csrf_enabled=False) + print('************') + print(form.t_name.data) + print(form.t_type.data) + print(form.t_units.data) task = Task.query.get(id) if task: - task.t_name = form.name.data + task.t_name = form.t_name.data task.t_type = form.t_type.data - task.t_units = form.units.data + task.t_units = form.t_units.data + task.t_user = user_id + db.session.add(task) db.session.commit() return (json.dumps(task.to_dict()), 201, {"Location": url_for(".task", id=task.id)}) else: @@ -145,6 +153,8 @@ def update_stat(id): user_id=require_authorization() body = request.get_data(as_text=True) data = json.loads(body) + print("*****STAT*******") + print(data) form = TrackingForm(data=data, formdata=None, csrf_enabled=False) stat = Tracking.query.filter(and_(Tracking.tr_task_id==id, Tracking.tr_date==form.tr_date.data)).first() if stat: From a74bfc69e5e9fe75b3657ec72f42459f2b83677f Mon Sep 17 00:00:00 2001 From: Ana Maria Echeverri Date: Sun, 1 Mar 2015 17:17:44 -0500 Subject: [PATCH 12/31] added selectbox for type --- curls | 3 + requirements.txt | 121 +++++++++++------- tasker/__pycache__/forms.cpython-34.pyc | Bin 1921 -> 2142 bytes tasker/forms.py | 10 +- tasker/static/main.css | 2 +- tasker/templates/index.html | 11 +- tasker/templates/task_form.html | 37 ++++++ tasker/templates/tasks.html | 32 ----- tasker/templates/tasks.html.bak | 32 ----- tasker/views/__pycache__/api.cpython-34.pyc | Bin 5933 -> 5993 bytes tasker/views/__pycache__/tasks.cpython-34.pyc | Bin 4871 -> 4951 bytes tasker/views/api.py | 6 - tasker/views/tasks.py | 8 +- 13 files changed, 132 insertions(+), 130 deletions(-) create mode 100644 tasker/templates/task_form.html delete mode 100644 tasker/templates/tasks.html delete mode 100644 tasker/templates/tasks.html.bak diff --git a/curls b/curls index 6f01be9..36a5b0c 100644 --- a/curls +++ b/curls @@ -9,3 +9,6 @@ curl -v -H "Authorization: Basic ana@ana.com:ana" -X POST -d '{"tr_date":"2014/0 curl -v -H "Authorization: Basic ana@ana.com:ana" -X DELETE -d '{"tr_date":"2014/01/01"}' http://127.0.0.1:5000/tasker/api/v1/activities/1/stats curl -v -H "Authorization: Basic ana@ana.com:ana" -X PUT -d '{"tr_date":"2015/02/27", "tr_value":20}' http://127.0.0.1:5000/tasker/api/v1/activities/1/stats + + +curl -v -H "Authorization: Basic ana@ana.com:ana" -X PUT -d '{"t_name":"calories consumption","t_type":1,"t_units":"calories"}' http://127.0.0.1:5000/tasker/api/v1/activities/1 diff --git a/requirements.txt b/requirements.txt index f6b9b0f..a12e5a7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,53 +1,80 @@ -# Included because many Paas's require a requirements.txt file in the project root -# Just installs the production requirements. - - -# Everything needed in production - -## Flask +alembic==0.7.4 +beautifulsoup4==4.3.2 +binaryornot==0.3.0 +blinker==1.3 +bokeh==0.8.1 +certifi==14.5.14 +colorama==0.3.3 +cookiecutter==0.9.1 +dnspython3==1.12.0 +docutils==0.12 +fake-factory==0.5.0 Flask==0.10.1 -MarkupSafe==0.23 -Werkzeug==0.10.1 -Jinja2==2.7.3 -itsdangerous==0.24 - -## Database -Flask-SQLAlchemy==2.0 -SQLAlchemy==0.9.8 - -## Migrations -Flask-Migrate==1.3.0 - -## Forms -Flask-WTF==0.11 -WTForms==2.0.2 - -## Login and users -Flask-Login==0.2.11 +flask-appconfig==0.9.1 Flask-Bcrypt==0.6.2 - -## Management script +Flask-DebugToolbar==0.9.1 +Flask-Login==0.2.11 +Flask-Migrate==1.3.0 Flask-Script==2.0.5 - -## Config -flask-appconfig==0.9.1 - -## Heroku +Flask-SQLAlchemy==2.0 +Flask-WTF==0.11 +future==0.14.3 +gnureadline==6.3.3 +graphviz==0.4.2 +greenlet==0.4.5 gunicorn==19.2.1 +hashids==1.0.2 +html2text==2014.12.29 +htmllaundry==2.0 +ipwhois==0.10.1 +ipython==2.3.1 +itsdangerous==0.24 +Jinja2==2.7.3 +lxml==3.4.1 +Mako==1.0.1 +Markdown==2.6 +MarkupSafe==0.23 +matplotlib==1.4.2 +nltk==3.0.1 +nose==1.3.4 +numpy==1.9.1 +numpydoc==0.5 +ordereddict==1.1 +pandas==0.15.2 +pep8==1.5.7 +Pillow==2.7.0 +plotly==1.6.8 psycopg2==2.6 - -# Everything the developer needs in addition to the production requirements - -Flask-DebugToolbar==0.9.1 - -## Testing -pytest>=2.6.4 -webtest - -hashids -matplotlib - - -static3==0.5.1 - +py==1.4.26 +pydot2==1.0.33 +pygame==1.9.2a0 +Pygments==2.0.1 +pymongo==2.8 +pyparsing==2.0.3 +pystache==0.5.4 +pytest==2.6.4 +python-bcrypt==0.3.1 +python-dateutil==2.4.0 +python-geoip==1.2 +python-geoip-geolite2==2014.207 +pytz==2013b0 +PyYAML==3.11 +pyzmq==14.4.1 requests==2.3.0 +scikit-learn==0.15.2 +scipy==0.15.1 +seaborn==0.5.1 +simplejson==3.6.5 +six==1.9.0 +Sphinx==1.2.3 +SQLAlchemy==0.9.8 +static3==0.5.1 +statsmodels==0.6.1 +textblob==0.9.0 +tornado==4.0.2 +waitress==0.8.9 +WebOb==1.4 +WebTest==2.0.18 +Werkzeug==0.10.1 +WTForms==2.0.2 +xlrd==0.9.3 diff --git a/tasker/__pycache__/forms.cpython-34.pyc b/tasker/__pycache__/forms.cpython-34.pyc index e134ac0f95158bd89da1faad75128737ee2de70d..48326639950ac0ae3639edf82e372ffbb14dd648 100644 GIT binary patch literal 2142 zcmb7FOK;mo5FSdTL`sw;Kbr!9%chT1XltQ|o>~+J>evVn2!$mFC@;iDyOs%)qO-e7 zD&GqC&-ADCFD!cN$(LSw^QkjS(TW47Xhd`T?aXL*=bMNA4m+(se*I^B(g64i-uSqP z_wiMKqTu-FKn9RI5If+|x&~Pd@;bzI$X$qC$UTU?(pHD80eKVRCgeWEKI8$!0pu-+ zTcw8!SsU^Y;t=u<#2v`jAYKFKhY0lsFnYn65rco#Qi|r!}~8oESMnrqH3XPLV>? z`@mfc)ic4fVw%n$rn#k+6Gtg2<3A?dxAGY5N`IHhGY^`EGEcgj54IV`6e9UI{7FK`M*cf=ND5Y{p*{ zzYH`}=R#KhPVug4?_wc4xI+_PMF)h=u46TKIP=l6Pc91-|H0Xk6%Rz?4qHgxic73C ztS@)PrD#D}omh=X>XP!db@Nd}#f&96>bFeqSWHu;CDUnP**5MF*_3N|FH4r}A~M?* zO9@huo~9G)Z<@JKicQ7kR+SMI<#VN@oaxEgW%pQI2&SXz%fo(0_GsgE5*s9LGh8tF~!ty}Qc5s+xO9^N#VySSnP^mjR*ZmgD7mytojiIXNrR ziBQ)L-s)!a>Fi>zBNiQCtuCVHESrn#8d-LK%+kqu^kS}cF^hB&G0vlJ2w;z(6LESI zjMH31M+M8SiNu@6&q57`#Wi)S@kSGtiP$@trCJU9HMxsg`4I}l5#f(Z{D|-;CH|D~ zXC?le@MFTkyEEF*wlk$Y5*OMAsgpUKdT$yZ;*ONcDvh-O(^x*CBguLvjTG2Exs!O0 zG`=-+a1fOXX0suJ)ne^snM-^?oIogt-K>yS7D^n1<}zwLZD+L8o^1Dc zgL4fp!wYffD<>`-IC7$@#}g;WixAkJa(7jAP1n~|{d?SxKEM8B3NFB}aPQ;b_yiyQ z3yK_n3`zjWAZ5U4-hr|MvI}V!qywqbXuD9lAU#MukUpe7$NVR_IH#48NyqfgYgH^4r-dkU)Bl!heO;;CP7}vOuOu(Z z#u!|jy=g}AH_KWqglcBtOJ0j+LD$4M;b-FAs!$>~u3c{YSMOH5oK`b>cl$y54ee7L z2q4JFIPHMw5_yCz9Joc3OLEbHTgDKvKse~oS{FzS^#SA#X6KslO|>YNl$(k$u8H3B zvdDQ|DQ$u_yGat7Aj_6qiYzlxmdPq#l{AjCjJDcXR2L(tkc5rp3WA{=iW^*QNc{}z zfILY2`Q`XR3#G?=$;IqaycbFp<3d%-HCOpq^JV@+_2ana`mIpy-yHX znqCmIXUu9IFbmLfLN03*|G;cR#RcI#poQ?ZEU~z-q?|2F5kXUsSbzw1gS=!Px>jWa=-s*n4!u+$!o%#)T0mqKg45H|3Sr2J-fUaoQW&J>ruOSlJwPp0uM<%B5`*z#-X!PR7}l#_i01~Rgc7D5=SKNPN^9^ zA>APg!mcTD%#ILxmwEUN*??K=1N;>BgxtSJ@gMMSj>Weneh>V%h+U-XnP7?)LN$C7 z(r9#tb~B%@uSDuzEQ?xWDSwcS`WUyVsHBWnXEiP|?ur)eWbq05eT0wpP!NkFrbxG& zzzJIZ4}nd)##6;-Z|VNQY>h)ViLIfV{kJE5oVp(L@^<0s~_&B0lq-hJP()3`XI-b+Tu8%KkS$@&9 z37xNHrHEm=-+FFu%I%%kG!eCk?FL&A7Mb14u1%ZZtL8TSn&B$jSVMNmp0lUjL-(+U GkMkErp?Y-y diff --git a/tasker/forms.py b/tasker/forms.py index 6214786..21e15c0 100644 --- a/tasker/forms.py +++ b/tasker/forms.py @@ -1,5 +1,5 @@ from flask_wtf import Form -from wtforms import StringField, PasswordField +from wtforms import StringField, PasswordField, SelectField from wtforms.fields.html5 import EmailField, URLField, IntegerField, DateField from wtforms.validators import DataRequired, Email, EqualTo @@ -22,7 +22,13 @@ class RegistrationForm(Form): class TaskForm(Form): t_name = StringField('Task Name', validators=[DataRequired()]) - t_type = IntegerField('Task Type', validators=[DataRequired()]) +# t_type = IntegerField('Task Type', validators=[DataRequired()]) + t_type = SelectField('Task Type', + choices=[(1, 'Input a Daily Value'), + (2, 'Click button to add 1 to value'), + (3, 'Time Goal'), + (4, 'Yes/No'), + (5, 'Scale')]) t_units = StringField('Units', validators=[DataRequired()]) class TrackingForm(Form): diff --git a/tasker/static/main.css b/tasker/static/main.css index 32b7536..59844b8 100644 --- a/tasker/static/main.css +++ b/tasker/static/main.css @@ -10,7 +10,7 @@ a.submitlink { color: #008CBA; background-color: transparent; - font-size: 0.6rem; + font-size: 0.8rem; text-decoration: underline; border: none; cursor: pointer; diff --git a/tasker/templates/index.html b/tasker/templates/index.html index c01d279..fedf297 100644 --- a/tasker/templates/index.html +++ b/tasker/templates/index.html @@ -16,12 +16,11 @@

    All Tasks

    diff --git a/tasker/templates/task_form.html b/tasker/templates/task_form.html new file mode 100644 index 0000000..b02bef1 --- /dev/null +++ b/tasker/templates/task_form.html @@ -0,0 +1,37 @@ +{% extends "layout.html" %} + +{% block body %} +{% if current_user.is_authenticated() %} +
    + {{ form.hidden_tag() }} + +
    +
    + Task {{ form.t_name(size=40) }} +
    +
    +
    +
    + Units {{ form.t_units(size=40) }} +
    +
    +
    +
    + Type {{ form.t_type }} +
    +
    +
    +
    + +
    +
    +
    +{% else %} +
    +
    + Please Login +
    +
    + +{% endif %} +{% endblock %} diff --git a/tasker/templates/tasks.html b/tasker/templates/tasks.html deleted file mode 100644 index a923b19..0000000 --- a/tasker/templates/tasks.html +++ /dev/null @@ -1,32 +0,0 @@ -{% extends "layout.html" %} -{% block body %} -
    -
    -

    All Tasks

    -
    -
    - - {% for task in tasks %} -
    -
    - {{task.t_name}}: {{task.t_units}} -
    -
    - - -
    -
    -
    - - {% endfor %} -{% endblock %} diff --git a/tasker/templates/tasks.html.bak b/tasker/templates/tasks.html.bak deleted file mode 100644 index de84295..0000000 --- a/tasker/templates/tasks.html.bak +++ /dev/null @@ -1,32 +0,0 @@ -{% extends "layout.html" %} -{% block body %} -
    -
    -

    All Tasks

    -
    -
    - - {% for task in tasks %} -
    -
    - {{task.t_name}}: {{task.t_units}} -
    -
    - -
    - -
    - -
    -
    -
    - - {% endfor %} -{% endblock %} diff --git a/tasker/views/__pycache__/api.cpython-34.pyc b/tasker/views/__pycache__/api.cpython-34.pyc index 3b8d0bddc1fabb9a6463a5becf6d2eafc45d7949..44cfa11d15998d4ebcf962286ea9d5c34bdee7b8 100644 GIT binary patch delta 993 zcmZvaO=uHQ5XWco+1+fiA5A~fG=zdw8lgf<3sq42VMVO1bz?l{O3O zKgzeB8Mh555mwd~SC>>f0Bk423OzJl;7>a0&Q8<;HWAk2P>+N91oaqH4XB!uRt%k{ zcGHwjt=-guI_k1Cy>^QyqEPiDt+v9Z?inOu86nI<&;kLs;;AN?h8ENB5@&cq&C*atp`yo`@x+u2%+UAD6y>ElIMY=3`g#2muZVZ(tyjPWS&zS2#la1h5JT25 zDq>=ofFLGG5C^{1fYT(45?zl$n1pJJNF16vW&r?JB06S4S$)M@)mv1^H z`T6D1vJOh6#4uHb)He38y) z$M|Bmvc>)Px#%BXm}s&$Mw;FbUvxxNg+65O_BNE4t_K-?aTSwzNKg?h2Ro zt`5G|ALwSh-Q3<30|0Q4P|x(Y_*vQ6@%w=WK@vIudkDL6kp0l<1D}2XejNM+*<-s2 z=p-P}VGlsOi{ump26W=!nUQK8saB-gM`{|R13?A?m+zwNgCNV-f*k8qa>m!7g&_0b zC&8!Uj1yQ=v$>LbX*dfe59i)# zZngZT-1Kg?y>RE+c1wy2W6zw zEoMI9C3VuB)mAA;tgE(L#LMcDTcsjz+~MJe|7V!SUdNsq&y?^BEykqU&8)0_i1;ud zh*;5l1Q5uh@_{EZ2V z8#Wk582C{|hM_wNOT4^dl;MhcoSUPOhRpIAewZg@4F9F7j64<-#bgv>qCpY&2GwmV zr_SZWvt3p=)fhn~A>u5bXJ{~Z3|9#%C{8O(Wy{>~3pych8N||2v-9TFI-; diff --git a/tasker/views/__pycache__/tasks.cpython-34.pyc b/tasker/views/__pycache__/tasks.cpython-34.pyc index 03469e78686e21564e411aa978d31e90676d6698..45f138ab63a243bcce31bcffb718b2e82749c850 100644 GIT binary patch delta 666 zcmYjOOKVd>6#mYA#rw#;d00uUmBwhan<55$KtZW)T=<}=6rvDPCzjr(6>nxCB|)Wv z=yn#0KR~z21s94SuHCs1vUTA`+_-h&nVT#!Gw0*XIWuSG`_8lak9zG-koSH){=2qP z0DfX>IP70y>;HRS`$`wZ0ya(T6LrfFRfuDF3f}6~I*INAVh+~yRvd>oG0C=0L6~SR z*3+sX$llr&-G}K5^Mm1qveVyg-@BjesH;w^=*aeNXQw-|L`QZ;IoVF%Ip-!9)bHFE zdZ`}dDvtzVK!_~}BXewBUPm14!yIzZK%8SANiXvc=q!JVq>I=??CTuK05T6@O$an) z2*IVCESiJJZp9I&Nw~U>@F4i=5}D1#;CgbJbx9f;&M@o+noECUDWkVH#cb6*TP-AI zeQ-`gT|-gBR0Z|g-9B=NgD^`JkxK#3JkJ9AGn6c=d2hBcGH>2myG!~Q51UOl=rUXX zJA>qA0K>67%$T3}tb}*xMg`J_^brRbKvNlT7cC4e%{30eEC-nmG}#x%3KbzsV7ax> zy3xcUHf344{xv$N*8LSXGh82E<& zmc#y4w(QSA{Uhm@TBuERxV(N&XYzV@T z5r9UVw;)UGqkpIHouWh_^_+nyo}&3+jX|=Gha-e!82zA&JafbgMQ=RTTP&tCk)V` zjU5{!W)c_zGQyDMF#M0>>0|yeRK@7V5)?`jw=`8%-wM_!(XWGR`g^c->b99Y!xwCi z;hTMdTneou?}aBV>gX5K`}9C3@e|tA`|)#nm Date: Sun, 1 Mar 2015 19:03:35 -0500 Subject: [PATCH 13/31] easy-mode done. web and api --- tasker/__pycache__/__init__.cpython-34.pyc | Bin 1172 -> 0 bytes tasker/__pycache__/app.cpython-34.pyc | Bin 775 -> 0 bytes tasker/__pycache__/extensions.cpython-34.pyc | Bin 660 -> 0 bytes tasker/__pycache__/forms.cpython-34.pyc | Bin 2142 -> 0 bytes tasker/__pycache__/models.cpython-34.pyc | Bin 3550 -> 0 bytes tasker/__pycache__/utils.cpython-34.pyc | Bin 572 -> 0 bytes tasker/__pycache__/views.cpython-34.pyc | Bin 7666 -> 0 bytes tasker/views/__pycache__/api.cpython-34.pyc | Bin 5993 -> 0 bytes tasker/views/__pycache__/links.cpython-34.pyc | Bin 6507 -> 0 bytes tasker/views/__pycache__/tasks.cpython-34.pyc | Bin 4951 -> 0 bytes tasker/views/__pycache__/users.cpython-34.pyc | Bin 1951 -> 0 bytes 11 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 tasker/__pycache__/__init__.cpython-34.pyc delete mode 100644 tasker/__pycache__/app.cpython-34.pyc delete mode 100644 tasker/__pycache__/extensions.cpython-34.pyc delete mode 100644 tasker/__pycache__/forms.cpython-34.pyc delete mode 100644 tasker/__pycache__/models.cpython-34.pyc delete mode 100644 tasker/__pycache__/utils.cpython-34.pyc delete mode 100644 tasker/__pycache__/views.cpython-34.pyc delete mode 100644 tasker/views/__pycache__/api.cpython-34.pyc delete mode 100644 tasker/views/__pycache__/links.cpython-34.pyc delete mode 100644 tasker/views/__pycache__/tasks.cpython-34.pyc delete mode 100644 tasker/views/__pycache__/users.cpython-34.pyc diff --git a/tasker/__pycache__/__init__.cpython-34.pyc b/tasker/__pycache__/__init__.cpython-34.pyc deleted file mode 100644 index cdb993b98cb7694b35755c15a76e81519576e4ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1172 zcmYjQ%W~5&6unAnCvoB=v_Ki)2eKd@whY6xOHt4r?WtkBgT45U5aUZg07wFq z05QAqzlvq*#O!A*#z1I*#g=E=>hes)eeX@$PUm>#a$3S z$S%-s#Ty`cAp1c36>oyL2XYhWCUQ)+1u-VO4{;ml1BfxvLx_EdyYK~oZbRII$)Nue zza0jobPhyRe8iwVD%9dcWtz|RPhuwBvKG(EhD??!(!BIzK3grB&N4BJRO!y<>N?k@ zFS2ElG8v`OlH>3^OBcx!6S^{sxhPDuD!3|UCenDAjp|XJ+&sy%LN66BUIc;2=8^b- zJTPmxn%?wce!)eSOP=ayANlpc+!?`Pv88H902(=eUvp zh4NNPuw3y)a&^WyCRsK+N0-VbV`(HgW96pe z%cRg;v6)!$TqUVi9kaCF|#J7kVG`HIH~ zKsuyPd~915{X5no>JiQ!4<41y!dy;UKJD6=UFyYfjyF}|UkRnhuQX4KBuk5`EL)MS z?SEO7aG=__fwoO?#n9?&75X<~FQ%1?wyHJgg;kDjPu?Hx9*y3F@6Oo%?sRu=cM`JG z@nPxghkK{5OK%d6#^IE`4bSLPJH)1Y?C^LRjz{6il#Rpv!*Mv8PHbIP&^6dLbu?e% Z&$1HymATo4k*JSq3|j`V)m&m*?Jsy#6r}(F diff --git a/tasker/__pycache__/app.cpython-34.pyc b/tasker/__pycache__/app.cpython-34.pyc deleted file mode 100644 index 1c185d5893d33dc528528298145d46c8d13147b6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 775 zcmYjO&rj4q6n^c}ZdOsLN7>h(veGfw@fDoySs`X`5+5mMeda|I(Ov zF)<-A{sEqRgG6^``sID^ed+u4YY<0Yzx~YiU4ZYfaC&6FrLX-#Am}+D0h9yG0p$X7 z!4WQq9>^Z3C16XSJYXIuAD9oS53CO=02Y7>frX?dQ3QfS%OFTJ0CYg~;g)_G1IBP3 z!ucb>73*=3$g1^PB7%pw2w@wS79!{`67PYKc6Hsfw)u4R#H z;}=ssZ#ompdRA6k2(w4B{MZ|b(2X>4C5iL9r&JR_c5YB}dcsYQ0PBJc`j z-6*WO7Z*5Z;lJP>+uTiej^FWYhaVhe>3EcW%=kFnJs78>Y+}6ol(zh<5RR!-ILB#c0?w;kA?GG2tFq%HVA0>v*dh(+ zfz1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Pd3RkQ-p1ilf7)>#nkzAp*}R2;;Bij|$ZIQq6<8sS=$CbkRx^EjJn z8$dhOCykcIov*U3!B)nG1zIkEKH8#iDsBiWej1)MuBWY{ zG-e;V*<;5e%bbws5az`-VB0y{s2!>ayZu`T%SFt46xSfE_aQDU=I?CpQ@lg*KE>ZC zc%bH&>H98*klO`sLZt5{XG^PU*$J>{8p4|B#mn*!H diff --git a/tasker/__pycache__/utils.cpython-34.pyc b/tasker/__pycache__/utils.cpython-34.pyc deleted file mode 100644 index a85a389c04f5949c43a049e340f3ca8a9019c892..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 572 zcmYjO%We}f6g~F50%{@qb}Ekvf1cmJ+@2Mg zPj?wUX`Gr{6EyoYBns!VsdB>zEQ9#8`Cbx-)gm! z8CGcr1mMT)kVVW4iJuj*&#Fqcbye+t;iey?5B5U#;3*aO!RvV|ms-6E^V%RhWkdcS D*YJ_+ diff --git a/tasker/__pycache__/views.cpython-34.pyc b/tasker/__pycache__/views.cpython-34.pyc deleted file mode 100644 index 656c213d43626ee6dc1b199e997a8d7d1ef72b5a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7666 zcmbVROLH7o6+YcPZ;hnUE4Cur87B~BoOt9Uj)5QyA&J2dlzHc-Wa1uIspsG^DmSpr2B1xr@9*s)>(KOifj$eu|D>s(BJy9tm)Z`IkN*}$L@|*|WO3Q1$fDRL*EVH`B8TDv zxdl@$P*kM2L~e=VGPz}nE96!vu991&xJGV`;u&&hOz$E^b&6-nouzn=+&PNp$(^UT zL2kqJC{eUP?gIH`@+%ZAQoKkm(j{`2C|)La8U4^!rD%oXr^tPZ;xpu)q4+GhXDMDK zch&T$QS>y$Yvis`e2(066rU&eylI=E=mN#hko$~TwN6o!;)~>7G-d4KSvq)*+)t4| zOa2`B^Yo#`-GgO1_%!(q@)zhsqKBw_o`OX>SSNpxi~bV%%X!ladD99v1@q)TMgEyl zE01mE9nQ+wRq~(C$6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5%4ekWMdfM~CTVXNkFI@#=jMgVbolI41RGbQ zVb70}Ysiedn##1jRTN#Af|Zn+>*>HxgRZPr!F2isB=Ch%r1=Qgn8$6&%vSVeG=2?F z!h^_VAl02kN9ucA#UEBQYyCQ&E7y4zhgWWh z16bfP+Es~FoHm)#ABAWNG;7Ng((b^I1G{)J z?d}i4G~wD5M5UQEOfd58DL+SX2qW!B1IWF{%KO0)Y&e0|Wv`9^Lmy|4o!%ran;MQ5PTs z7Jw~VoRcE3Ws86W90R)5D4nN%U0@}IKU_0}BoI3#=W^RAP zm=)i&g-+s139zsrVIHf?x9nsvxs6^EnB-8%x^Q5yc5ZL?xUJ#ng5q7$i^f|3B$3XV5x zc`88@DpGJZR2aD_B4v3Xe;atx4#R<=q)E3OpR{J`3j1YYAR*$&OKcHpC zCM>*}ke|kNvQM;x{97SpiH^9^(lRna%S^>yrf9G+oE*%^v5E&ZL-$Tvm)HvKuOV2- zK#<~Y49AR#nwD=lEH6LK{k3r}>+KdF@9k>nq~GF1^zuW_v7<93XhZZUL^$i<#7s6Sb6e?-gwMQ;E`6L{$)1z4s#h_-Ot1f# zcHmIP_D3iq2HUMu+Mxad8{*i0ZCN522Z1r)jcoXWO_i(@PZ7S9r@F6XmV4M(=TCe4 z?QO}duiJ>=SSTa5EOdJ6v1ou(+vz&;H zEM{SB{0ieAiCHS}$*T_IgX0#)2<*IzUWaE-;_6Lt`4jvgrkLK$nc;z-rzL4SA}8$q zU5Z}Y#4AZoAx diff --git a/tasker/views/__pycache__/links.cpython-34.pyc b/tasker/views/__pycache__/links.cpython-34.pyc deleted file mode 100644 index 4afb9897358e48982434e4a2e710da8062e05f91..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6507 zcmbVQOLH5?5$@f^n*ae)e269`QL<$jvP8%!S00X{ax6zKSGi~>l;dP$7Ye{G$pv?@ z(Ck7Y5Hp9!x#f~$PN^L8H}Vs5oNG?HBzK+ibq^MVAUQ7pJDBO2otb`p-828F)+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fankSh9WT+7J0t#NaVgl z4r;m(#W?0BMz(SkD7D*zPUN@SYLlnPE5Ly-w}Wz%CihTslOV@m^*%552^XBfN;V|! zCK8*IvdCLRUAl`kN1=a@jVbvK3iez6)~%h~p0!~&tPPZPXS-ar)(hK(i`M$;jS9-z McB5L{UftgQ7xj%-9smFU diff --git a/tasker/views/__pycache__/tasks.cpython-34.pyc b/tasker/views/__pycache__/tasks.cpython-34.pyc deleted file mode 100644 index 45f138ab63a243bcce31bcffb718b2e82749c850..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4951 zcmbtXOK%*<5w4lpHfuU~yF1h3;_>iw^cKHI6OLlj9`%%-6ud2SP{#SFh@y|d0 zd;i%y(LdI z3YXDarMO1v3T3Mlt`_Y&rSDL-M&TM|>lCgRy$wq5P_{wg24$NRZWc4nPOlvI}~qR5q>lk-n>otF2(n*2tS?*-@g=&x9BjK?gXcM za7F(8sr-9SSPDORGVwbjPY}m|_}NK1d^TQiB>)9sw16t z4sz}42BI=i+jnzmewYk8TD=@WEOyP_NMkD785yPD_{GNjxC_zReq@fn$aUtL`#S0! zCxb(7VWh+(7@zd=Q6eniDi-~w`_|j(@e%n0W2X|H&+wQKg(d2H^qNS2LDr{!K>ZRs z1NWEF@AWIvU#5PQ#Q@?t-m0;K0KPNs@%Ap-heaC>wAU`}Vh3`NaU%gbC)-ChOI=xZ z)voI~EbrzM(}_m*2xm@u04~-`++BV-Qu@@@fwu*$-Baf$v8&~pK}M?-E7Q|8h_*ew zj=#T>-ooG8Pj_AbIkOWDBGo%muawrwPNMU{X{6&F16;cK$qsKp>FM9AM15RAObLBsCLYjg72vB_091 zjHBK_;etbDHJ?Xsa&eFQs+f!IUEk*}0W#2cx&DZYhg@u36z`%2!-d()23XGUX(?Fr z-uLtesEz9dG6VIkt7gg`<*{+Wm!I#u($`<@?e|!kKWx*yoB;JFQ~=a#Vxs~k6H`pt zA3c39B=KjHs5K*mREchTI#l8* zg>n$apgW_CN%DaUu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PlZBlZ-@rkZ z<$U1gvJCdcvdqYnWgpNVd|tU=L#(`t)Enk8fSq_#9bmZ@UU3ELAou6o@)G?e{%_j> z)HmJ1o1A3>n-9NmWt|)z*|73EW-0TA$@&d%%6TWwJ9WW9X5V@rg*BZ+Ysk6Ya6|)7 zBx5zMo_u7oC`~n+kgH`tfz!2dJ;|a&wF6gguU)d3BpFEA($v+}V3aA1;N^m0YQrjW z!C{(X8)ldclnG~yvYl6nNxG>D>qy@_C(%iQeq54{JKfycJS+N7rN1uysXDN@UL_VU z1&6(Zu*K8xRy)Z6mmw3@c@@d~!^#Q2W5T9o0Fbes;)<(TC)iH(O5x%g2EFtEXI1K0 zH!;wz6%6{2k6RJiG_K4{ik%6eO5SV2Rlawfc5+ZvzGQRUduT7Mj_%{4H;&B6y{sz+RwyW_L*c3H;8ZL}^ah!!LvV86| z>Ee1<;9UIc-$O8*>*mMmXqyKtF4daVuQ_sSwua&+f2^zA!HlizTwKN$M#i=Hx_`W_ zPVBba==CfM$ql!GPBq|s-AI~(32}iiawCuk=qg!`4AK;-&oWOpXI`dJ3YBH2+o($5 zbG43K5;`5tnF%Zx3R7?mEc5{voTN*xDd~v>A%W%!+FL9lL9O-#i;hzDlx^3r_c6RJ iZ?m-Rts?nf<_7V*^av^Knzh5rC^m=|pT diff --git a/tasker/views/__pycache__/users.cpython-34.pyc b/tasker/views/__pycache__/users.cpython-34.pyc deleted file mode 100644 index b06bcfb5023872bd964ff5afd3d08ab9e34d26c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1951 zcma)7&2A$_5Uw73#{WO-Y_j|bW*0>8#eM;VSXO|LP(UOcn2R-bckFTICtKZ4VvC%X zr{E3X5qJc6gT8Xw3ldjORP|(%td;{KPfc}ob$4}rUzPvr_S%Xc(2(k^5@h^IZU-PA!tr?jB`0Sb*w$z1MxA4l z8#_RiONBF|vhy@H%KE2itXH;)N+zfl#x_tr-zZJW2GiMTfn(3M(_)$AvyE10JERvI z;|4E1K0sJc&dICwHG6$gU}lHksb!)K#wID8g`Dc&^YVZ<(eqs}b$i-Irp&64+Sb1O z{KVG3{pR>&!C~{myVvP`Mz8*rgrRH!Tm$?FuokT2&tN=Q*I->|yxH!!x#PIR|GnZMG8v!gRoNVcml@LBIgP`4$W%zs5TKj?IwSQ2Ek~U(Mtc86grd z?i2xmdpvF)Szl#wlG=K%uFS4$VtuCPlZ4WLwfpd76`Rn_hXsb`vDTLb$}rJkUYKxE zAY(Dv4a#gy(4|x1u0&$8G8t`5;AGg5@Qed zodXB_3t&itf1XYmay^anSkVa=3Ne``SmfIn)87d%^!^)m2LP8nJTWH$^dT*&sCcpaIZd_P&=8p zvM6I?y4p4wRnF0CcbUlN=Ad0~a7nR2R!EiVvMDrYGX`Kb!vU}Mk!nY|QgSRt4(r~{ iLLQda`L-F%bveP#lP%H}DSohrz#U9l7TK From a96c706519d021e22847b9f683f9e821dc842216 Mon Sep 17 00:00:00 2001 From: Ana Maria Echeverri Date: Mon, 2 Mar 2015 07:15:54 -0500 Subject: [PATCH 14/31] removed select box for type --- tasker/forms.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tasker/forms.py b/tasker/forms.py index 21e15c0..c158436 100644 --- a/tasker/forms.py +++ b/tasker/forms.py @@ -22,13 +22,7 @@ class RegistrationForm(Form): class TaskForm(Form): t_name = StringField('Task Name', validators=[DataRequired()]) -# t_type = IntegerField('Task Type', validators=[DataRequired()]) - t_type = SelectField('Task Type', - choices=[(1, 'Input a Daily Value'), - (2, 'Click button to add 1 to value'), - (3, 'Time Goal'), - (4, 'Yes/No'), - (5, 'Scale')]) + t_type = IntegerField('Task Type', validators=[DataRequired()]) t_units = StringField('Units', validators=[DataRequired()]) class TrackingForm(Form): From 68e32e9588a77967876a9f52584051a3542a1433 Mon Sep 17 00:00:00 2001 From: Ana Maria Echeverri Date: Mon, 2 Mar 2015 07:16:25 -0500 Subject: [PATCH 15/31] added url to dict --- tasker/models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tasker/models.py b/tasker/models.py index d61e708..2155cdb 100644 --- a/tasker/models.py +++ b/tasker/models.py @@ -3,6 +3,7 @@ from hashids import Hashids from sqlalchemy import func, and_ from datetime import date, timedelta, datetime +from flask import request, url_for @login_manager.user_loader def load_user(id): @@ -50,8 +51,8 @@ def to_dict(self): 'name': self.t_name, 'type': self.t_type, 'user': self.t_user, - 'units': self.t_units - } + 'units': self.t_units, + 'url': str(request.url_root)+url_for('api.api_task', id=self.id)[1:] } class Tracking(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) From 1e08bdb98509c96e13b8b86dc5e493ebd873b320 Mon Sep 17 00:00:00 2001 From: Ana Maria Echeverri Date: Mon, 2 Mar 2015 07:17:17 -0500 Subject: [PATCH 16/31] nothing --- tasker/templates/task_form.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasker/templates/task_form.html b/tasker/templates/task_form.html index b02bef1..7d3c15c 100644 --- a/tasker/templates/task_form.html +++ b/tasker/templates/task_form.html @@ -12,7 +12,7 @@
    - Units {{ form.t_units(size=40) }} + Units {{ form.t_units(size=20) }}
    From f7798ee575f11d579a1315fc5a5806ea04cb5ad6 Mon Sep 17 00:00:00 2001 From: Ana Maria Echeverri Date: Mon, 2 Mar 2015 07:17:47 -0500 Subject: [PATCH 17/31] fixed url // --- tasker/views/api.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tasker/views/api.py b/tasker/views/api.py index 578cf31..3a732ba 100644 --- a/tasker/views/api.py +++ b/tasker/views/api.py @@ -30,8 +30,6 @@ def authorize_user(request): api_key = api_key.replace('Basic ', '', 1) api_key = api_key.split(":") email, password = api_key[0], api_key[1] - #api_key = base64.b64decode(api_key).decode("utf-8") - #email, password = api_key.split(":") user = User.query.filter_by(email=email).first() if user.check_password(password): return user @@ -54,6 +52,8 @@ def activities(): return create_task() tasks = Task.query.all() tasks = [task.to_dict() for task in tasks] +# for task in tasks: +# task['url'] = str(request.url_root)+url_for('.task', id=task['id']) return jsonify({"activities": tasks}) @@ -105,7 +105,8 @@ def delete_task(id): @api.route("/activities/", methods=["GET", "PUT", "DELETE"]) -def task(id): +def api_task(id): + task = Task.query.get(id) if request.method == "PUT": return update_task(id) elif request.method == "DELETE": @@ -147,8 +148,6 @@ def update_stat(id): user_id=require_authorization() body = request.get_data(as_text=True) data = json.loads(body) - print("*****STAT*******") - print(data) form = TrackingForm(data=data, formdata=None, csrf_enabled=False) stat = Tracking.query.filter(and_(Tracking.tr_task_id==id, Tracking.tr_date==form.tr_date.data)).first() if stat: @@ -162,7 +161,7 @@ def update_stat(id): @api.route("/activities//stats", methods=["POST", "PUT", "DELETE"]) -def stat(id): +def api_stat(id): if request.method == "PUT": return update_stat(id) elif request.method == "DELETE": From 39e9748106d6bb07b67d7f0debe35d14d0c38034 Mon Sep 17 00:00:00 2001 From: Ana Maria Echeverri Date: Mon, 2 Mar 2015 07:23:08 -0500 Subject: [PATCH 18/31] added cascade on delete --- tasker/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tasker/models.py b/tasker/models.py index 2155cdb..e71ebdd 100644 --- a/tasker/models.py +++ b/tasker/models.py @@ -63,6 +63,7 @@ class Tracking(db.Model): tr_date = db.Column(db.Date, nullable=False) tr_task_id = db.Column(db.Integer, db.ForeignKey('task.id')) tr_user_id = db.Column(db.Integer, db.ForeignKey('user.id')) + task_stats = db.relationship("Task", backref="stats", cascade="all,delete") def __init__(self, user_id, From b55a0208498634a87eee6867d4988506220e4dda Mon Sep 17 00:00:00 2001 From: Ana Maria Echeverri Date: Mon, 2 Mar 2015 09:53:24 -0500 Subject: [PATCH 19/31] updated Procfile --- Procfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Procfile b/Procfile index b3c7363..e36c8dc 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: gunicorn manager:app --log-file=- +web: gunicorn manage:app --log-file=- From 2fbeb3681b630d7e06bc68f7d74b569ace250eff Mon Sep 17 00:00:00 2001 From: Ana Maria Echeverri Date: Mon, 2 Mar 2015 10:11:19 -0500 Subject: [PATCH 20/31] updated --- requirements.txt | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/requirements.txt b/requirements.txt index a12e5a7..7b8ae37 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,11 +1,4 @@ alembic==0.7.4 -beautifulsoup4==4.3.2 -binaryornot==0.3.0 -blinker==1.3 -bokeh==0.8.1 -certifi==14.5.14 -colorama==0.3.3 -cookiecutter==0.9.1 dnspython3==1.12.0 docutils==0.12 fake-factory==0.5.0 @@ -18,15 +11,9 @@ Flask-Migrate==1.3.0 Flask-Script==2.0.5 Flask-SQLAlchemy==2.0 Flask-WTF==0.11 -future==0.14.3 -gnureadline==6.3.3 -graphviz==0.4.2 -greenlet==0.4.5 gunicorn==19.2.1 -hashids==1.0.2 html2text==2014.12.29 htmllaundry==2.0 -ipwhois==0.10.1 ipython==2.3.1 itsdangerous==0.24 Jinja2==2.7.3 @@ -35,21 +22,13 @@ Mako==1.0.1 Markdown==2.6 MarkupSafe==0.23 matplotlib==1.4.2 -nltk==3.0.1 -nose==1.3.4 numpy==1.9.1 numpydoc==0.5 ordereddict==1.1 -pandas==0.15.2 pep8==1.5.7 Pillow==2.7.0 -plotly==1.6.8 -psycopg2==2.6 py==1.4.26 -pydot2==1.0.33 -pygame==1.9.2a0 Pygments==2.0.1 -pymongo==2.8 pyparsing==2.0.3 pystache==0.5.4 pytest==2.6.4 @@ -61,16 +40,12 @@ pytz==2013b0 PyYAML==3.11 pyzmq==14.4.1 requests==2.3.0 -scikit-learn==0.15.2 -scipy==0.15.1 -seaborn==0.5.1 simplejson==3.6.5 six==1.9.0 Sphinx==1.2.3 SQLAlchemy==0.9.8 static3==0.5.1 statsmodels==0.6.1 -textblob==0.9.0 tornado==4.0.2 waitress==0.8.9 WebOb==1.4 From 89a7d69e52aa73bda46110c7226425e01f6bea58 Mon Sep 17 00:00:00 2001 From: Ana Maria Echeverri Date: Mon, 2 Mar 2015 10:28:07 -0500 Subject: [PATCH 21/31] r --- requirements.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 7b8ae37..e2d4a93 100644 --- a/requirements.txt +++ b/requirements.txt @@ -45,9 +45,6 @@ six==1.9.0 Sphinx==1.2.3 SQLAlchemy==0.9.8 static3==0.5.1 -statsmodels==0.6.1 -tornado==4.0.2 -waitress==0.8.9 WebOb==1.4 WebTest==2.0.18 Werkzeug==0.10.1 From fbb0f676c49340fa8a324fe6b19657e07041b557 Mon Sep 17 00:00:00 2001 From: Ana Maria Echeverri Date: Mon, 2 Mar 2015 10:49:13 -0500 Subject: [PATCH 22/31] updated file --- requirements.txt | 95 ++++++++++++++++++++++++------------------------ 1 file changed, 48 insertions(+), 47 deletions(-) diff --git a/requirements.txt b/requirements.txt index e2d4a93..9e8f267 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,52 +1,53 @@ -alembic==0.7.4 -dnspython3==1.12.0 -docutils==0.12 -fake-factory==0.5.0 +# Included because many Paas's require a requirements.txt file in the project root +# Just installs the production requirements. + + +# Everything needed in production + +## Flask Flask==0.10.1 -flask-appconfig==0.9.1 -Flask-Bcrypt==0.6.2 -Flask-DebugToolbar==0.9.1 -Flask-Login==0.2.11 -Flask-Migrate==1.3.0 -Flask-Script==2.0.5 +MarkupSafe==0.23 +Werkzeug==0.10.1 +Jinja2==2.7.3 +itsdangerous==0.24 + +## Database Flask-SQLAlchemy==2.0 +SQLAlchemy==0.9.8 + +## Migrations +Flask-Migrate==1.3.0 + +## Forms Flask-WTF==0.11 +WTForms==2.0.2 + +## Login and users +Flask-Login==0.2.11 +Flask-Bcrypt==0.6.2 + +## Management script +Flask-Script==2.0.5 + +## Config +flask-appconfig==0.9.1 + +## Heroku gunicorn==19.2.1 -html2text==2014.12.29 -htmllaundry==2.0 -ipython==2.3.1 -itsdangerous==0.24 -Jinja2==2.7.3 -lxml==3.4.1 -Mako==1.0.1 -Markdown==2.6 -MarkupSafe==0.23 -matplotlib==1.4.2 -numpy==1.9.1 -numpydoc==0.5 -ordereddict==1.1 -pep8==1.5.7 -Pillow==2.7.0 -py==1.4.26 -Pygments==2.0.1 -pyparsing==2.0.3 -pystache==0.5.4 -pytest==2.6.4 -python-bcrypt==0.3.1 -python-dateutil==2.4.0 -python-geoip==1.2 -python-geoip-geolite2==2014.207 -pytz==2013b0 -PyYAML==3.11 -pyzmq==14.4.1 -requests==2.3.0 -simplejson==3.6.5 -six==1.9.0 -Sphinx==1.2.3 -SQLAlchemy==0.9.8 +psycopg2==2.6 + +# Everything the developer needs in addition to the production requirements + +Flask-DebugToolbar==0.9.1 + +## Testing +pytest>=2.6.4 +webtest + + +matplotlib + + static3==0.5.1 -WebOb==1.4 -WebTest==2.0.18 -Werkzeug==0.10.1 -WTForms==2.0.2 -xlrd==0.9.3 + +requests==2.3.0 From 1769d88c65e9638d0aa5768d8f993eb728fa2100 Mon Sep 17 00:00:00 2001 From: Ana Maria Echeverri Date: Mon, 2 Mar 2015 11:33:45 -0500 Subject: [PATCH 23/31] remove import hashid --- tasker/models.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tasker/models.py b/tasker/models.py index e71ebdd..5b0e82d 100644 --- a/tasker/models.py +++ b/tasker/models.py @@ -1,6 +1,5 @@ from . import db, bcrypt, login_manager from flask.ext.login import UserMixin -from hashids import Hashids from sqlalchemy import func, and_ from datetime import date, timedelta, datetime from flask import request, url_for From 33f12a25ef9d73a524e000808006339e364713f0 Mon Sep 17 00:00:00 2001 From: Ana Maria Echeverri Date: Mon, 2 Mar 2015 11:37:40 -0500 Subject: [PATCH 24/31] heroku --- .gitignore | 46 +++++++++++++++++++++++++++++ curls | 4 +++ migrations/versions/22e559aaea2_.py | 26 ++++++++++++++++ 3 files changed, 76 insertions(+) create mode 100644 .gitignore create mode 100644 migrations/versions/22e559aaea2_.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b2534f8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,46 @@ +*.py[cod] + +# C extensions +*.so + +# Packages +*.egg +*.egg-info +build +eggs +parts +bin +var +sdist +develop-eggs +.installed.cfg +lib +lib64 + +# Installer logs +pip-log.txt + +# Unit test / coverage reports +.coverage +.tox +nosetests.xml + +# Translations +*.mo + +# Mr Developer +.mr.developer.cfg +.project +.pydevproject + +# Complexity +output/*.html +output/*/index.html + +# Sphinx +docs/_build + +.webassets-cache + +# Virtualenvs +env diff --git a/curls b/curls index 36a5b0c..684070d 100644 --- a/curls +++ b/curls @@ -12,3 +12,7 @@ curl -v -H "Authorization: Basic ana@ana.com:ana" -X PUT -d '{"tr_date":"2015/02 curl -v -H "Authorization: Basic ana@ana.com:ana" -X PUT -d '{"t_name":"calories consumption","t_type":1,"t_units":"calories"}' http://127.0.0.1:5000/tasker/api/v1/activities/1 + +curl -v -H "Authorization: Basic ana@ana.com:ana" -X POST -d '{"t_name":"cooking","t_type":1,"t_units":"hours"}' http://127.0.0.1:5000/tasker/api/v1/activities + +curl -v -H "Authorization: Basic ana@ana.com:ana" http://127.0.0.1:5000/tasker/api/v1/activities diff --git a/migrations/versions/22e559aaea2_.py b/migrations/versions/22e559aaea2_.py new file mode 100644 index 0000000..fbf5127 --- /dev/null +++ b/migrations/versions/22e559aaea2_.py @@ -0,0 +1,26 @@ +"""empty message + +Revision ID: 22e559aaea2 +Revises: c0fd22a946 +Create Date: 2015-03-02 07:22:03.294992 + +""" + +# revision identifiers, used by Alembic. +revision = '22e559aaea2' +down_revision = 'c0fd22a946' + +from alembic import op +import sqlalchemy as sa + + +def upgrade(): + ### commands auto generated by Alembic - please adjust! ### + pass + ### end Alembic commands ### + + +def downgrade(): + ### commands auto generated by Alembic - please adjust! ### + pass + ### end Alembic commands ### From d940fb1708df7b06539de978da8ec2e07d8cc3c6 Mon Sep 17 00:00:00 2001 From: Ana Maria Echeverri Date: Mon, 2 Mar 2015 11:39:27 -0500 Subject: [PATCH 25/31] removed library --- tasker/views/tasks.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tasker/views/tasks.py b/tasker/views/tasks.py index 740aadc..cbe6eac 100644 --- a/tasker/views/tasks.py +++ b/tasker/views/tasks.py @@ -1,7 +1,6 @@ from datetime import date from io import BytesIO import matplotlib.pyplot as plt -from bokeh.plotting import figure, output_file, show """Add your views here.""" From 4a95fc2aa028909432ffde7289702dd0e439d8ee Mon Sep 17 00:00:00 2001 From: Ana Maria Echeverri Date: Tue, 3 Mar 2015 21:12:30 -0500 Subject: [PATCH 26/31] added js. Messed up everything --- tasker/static/fastclick.js | 8 + tasker/static/foundation.min.js | 1151 ++++ tasker/static/jquery-2.1.3.js | 9205 ++++++++++++++++++++++++++++ tasker/static/jquery.js | 26 + tasker/static/main.css | 8 - tasker/static/main.js | 18 + tasker/static/main.js.back | 19 + tasker/templates/layout.html | 11 +- tasker/templates/task_details.html | 39 +- tasker/views/api.py | 21 +- tasker/views/tasks.py | 23 +- 11 files changed, 10493 insertions(+), 36 deletions(-) create mode 100644 tasker/static/fastclick.js create mode 100644 tasker/static/foundation.min.js create mode 100644 tasker/static/jquery-2.1.3.js create mode 100644 tasker/static/jquery.js create mode 100644 tasker/static/main.js.back diff --git a/tasker/static/fastclick.js b/tasker/static/fastclick.js new file mode 100644 index 0000000..93f82da --- /dev/null +++ b/tasker/static/fastclick.js @@ -0,0 +1,8 @@ +!function(){"use strict";/** + * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs. + * + * @codingstandard ftlabs-jsv2 + * @copyright The Financial Times Limited [All Rights Reserved] + * @license MIT License (see LICENSE.txt) + */ +function a(b,d){function e(a,b){return function(){return a.apply(b,arguments)}}var f;if(d=d||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=d.touchBoundary||10,this.layer=b,this.tapDelay=d.tapDelay||200,this.tapTimeout=d.tapTimeout||700,!a.notNeeded(b)){for(var g=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],h=this,i=0,j=g.length;j>i;i++)h[g[i]]=e(h[g[i]],h);c&&(b.addEventListener("mouseover",this.onMouse,!0),b.addEventListener("mousedown",this.onMouse,!0),b.addEventListener("mouseup",this.onMouse,!0)),b.addEventListener("click",this.onClick,!0),b.addEventListener("touchstart",this.onTouchStart,!1),b.addEventListener("touchmove",this.onTouchMove,!1),b.addEventListener("touchend",this.onTouchEnd,!1),b.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(b.removeEventListener=function(a,c,d){var e=Node.prototype.removeEventListener;"click"===a?e.call(b,a,c.hijacked||c,d):e.call(b,a,c,d)},b.addEventListener=function(a,c,d){var e=Node.prototype.addEventListener;"click"===a?e.call(b,a,c.hijacked||(c.hijacked=function(a){a.propagationStopped||c(a)}),d):e.call(b,a,c,d)}),"function"==typeof b.onclick&&(f=b.onclick,b.addEventListener("click",function(a){f(a)},!1),b.onclick=null)}}var b=navigator.userAgent.indexOf("Windows Phone")>=0,c=navigator.userAgent.indexOf("Android")>0&&!b,d=/iP(ad|hone|od)/.test(navigator.userAgent)&&!b,e=d&&/OS 4_\d(_\d)?/.test(navigator.userAgent),f=d&&/OS [6-7]_\d/.test(navigator.userAgent),g=navigator.userAgent.indexOf("BB10")>0;a.prototype.needsClick=function(a){switch(a.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(a.disabled)return!0;break;case"input":if(d&&"file"===a.type||a.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(a.className)},a.prototype.needsFocus=function(a){switch(a.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!c;case"input":switch(a.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!a.disabled&&!a.readOnly;default:return/\bneedsfocus\b/.test(a.className)}},a.prototype.sendClick=function(a,b){var c,d;document.activeElement&&document.activeElement!==a&&document.activeElement.blur(),d=b.changedTouches[0],c=document.createEvent("MouseEvents"),c.initMouseEvent(this.determineEventType(a),!0,!0,window,1,d.screenX,d.screenY,d.clientX,d.clientY,!1,!1,!1,!1,0,null),c.forwardedTouchEvent=!0,a.dispatchEvent(c)},a.prototype.determineEventType=function(a){return c&&"select"===a.tagName.toLowerCase()?"mousedown":"click"},a.prototype.focus=function(a){var b;d&&a.setSelectionRange&&0!==a.type.indexOf("date")&&"time"!==a.type&&"month"!==a.type?(b=a.value.length,a.setSelectionRange(b,b)):a.focus()},a.prototype.updateScrollParent=function(a){var b,c;if(b=a.fastClickScrollParent,!b||!b.contains(a)){c=a;do{if(c.scrollHeight>c.offsetHeight){b=c,a.fastClickScrollParent=c;break}c=c.parentElement}while(c)}b&&(b.fastClickLastScrollTop=b.scrollTop)},a.prototype.getTargetElementFromEventTarget=function(a){return a.nodeType===Node.TEXT_NODE?a.parentNode:a},a.prototype.onTouchStart=function(a){var b,c,f;if(a.targetTouches.length>1)return!0;if(b=this.getTargetElementFromEventTarget(a.target),c=a.targetTouches[0],d){if(f=window.getSelection(),f.rangeCount&&!f.isCollapsed)return!0;if(!e){if(c.identifier&&c.identifier===this.lastTouchIdentifier)return a.preventDefault(),!1;this.lastTouchIdentifier=c.identifier,this.updateScrollParent(b)}}return this.trackingClick=!0,this.trackingClickStart=a.timeStamp,this.targetElement=b,this.touchStartX=c.pageX,this.touchStartY=c.pageY,a.timeStamp-this.lastClickTimec||Math.abs(b.pageY-this.touchStartY)>c?!0:!1},a.prototype.onTouchMove=function(a){return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(a.target)||this.touchHasMoved(a))&&(this.trackingClick=!1,this.targetElement=null),!0):!0},a.prototype.findControl=function(a){return void 0!==a.control?a.control:a.htmlFor?document.getElementById(a.htmlFor):a.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},a.prototype.onTouchEnd=function(a){var b,g,h,i,j,k=this.targetElement;if(!this.trackingClick)return!0;if(a.timeStamp-this.lastClickTimethis.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=a.timeStamp,g=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,f&&(j=a.changedTouches[0],k=document.elementFromPoint(j.pageX-window.pageXOffset,j.pageY-window.pageYOffset)||k,k.fastClickScrollParent=this.targetElement.fastClickScrollParent),h=k.tagName.toLowerCase(),"label"===h){if(b=this.findControl(k)){if(this.focus(k),c)return!1;k=b}}else if(this.needsFocus(k))return a.timeStamp-g>100||d&&window.top!==window&&"input"===h?(this.targetElement=null,!1):(this.focus(k),this.sendClick(k,a),d&&"select"===h||(this.targetElement=null,a.preventDefault()),!1);return d&&!e&&(i=k.fastClickScrollParent,i&&i.fastClickLastScrollTop!==i.scrollTop)?!0:(this.needsClick(k)||(a.preventDefault(),this.sendClick(k,a)),!1)},a.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},a.prototype.onMouse=function(a){return this.targetElement?a.forwardedTouchEvent?!0:a.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick)?(a.stopImmediatePropagation?a.stopImmediatePropagation():a.propagationStopped=!0,a.stopPropagation(),a.preventDefault(),!1):!0:!0},a.prototype.onClick=function(a){var b;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===a.target.type&&0===a.detail?!0:(b=this.onMouse(a),b||(this.targetElement=null),b)},a.prototype.destroy=function(){var a=this.layer;c&&(a.removeEventListener("mouseover",this.onMouse,!0),a.removeEventListener("mousedown",this.onMouse,!0),a.removeEventListener("mouseup",this.onMouse,!0)),a.removeEventListener("click",this.onClick,!0),a.removeEventListener("touchstart",this.onTouchStart,!1),a.removeEventListener("touchmove",this.onTouchMove,!1),a.removeEventListener("touchend",this.onTouchEnd,!1),a.removeEventListener("touchcancel",this.onTouchCancel,!1)},a.notNeeded=function(a){var b,d,e,f;if("undefined"==typeof window.ontouchstart)return!0;if(d=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!c)return!0;if(b=document.querySelector("meta[name=viewport]")){if(-1!==b.content.indexOf("user-scalable=no"))return!0;if(d>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(g&&(e=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),e[1]>=10&&e[2]>=3&&(b=document.querySelector("meta[name=viewport]")))){if(-1!==b.content.indexOf("user-scalable=no"))return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===a.style.msTouchAction||"manipulation"===a.style.touchAction?!0:(f=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],f>=27&&(b=document.querySelector("meta[name=viewport]"),b&&(-1!==b.content.indexOf("user-scalable=no")||document.documentElement.scrollWidth<=window.outerWidth))?!0:"none"===a.style.touchAction||"manipulation"===a.style.touchAction?!0:!1)},a.attach=function(b,c){return new a(b,c)},"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return a}):"undefined"!=typeof module&&module.exports?(module.exports=a.attach,module.exports.FastClick=a):window.FastClick=a}(); diff --git a/tasker/static/foundation.min.js b/tasker/static/foundation.min.js new file mode 100644 index 0000000..1eb1a96 --- /dev/null +++ b/tasker/static/foundation.min.js @@ -0,0 +1,1151 @@ +/* + * Foundation Responsive Library + * http://foundation.zurb.com + * Copyright 2014, ZURB + * Free to use under the MIT license. + * http://www.opensource.org/licenses/mit-license.php +*/ + +(function ($, window, document, undefined) { + 'use strict'; + + var header_helpers = function (class_array) { + var i = class_array.length; + var head = $('head'); + + while (i--) { + if (head.has('.' + class_array[i]).length === 0) { + head.append(''); + } + } + }; + + header_helpers([ + 'foundation-mq-small', + 'foundation-mq-small-only', + 'foundation-mq-medium', + 'foundation-mq-medium-only', + 'foundation-mq-large', + 'foundation-mq-large-only', + 'foundation-mq-xlarge', + 'foundation-mq-xlarge-only', + 'foundation-mq-xxlarge', + 'foundation-data-attribute-namespace']); + + // Enable FastClick if present + + $(function () { + if (typeof FastClick !== 'undefined') { + // Don't attach to body if undefined + if (typeof document.body !== 'undefined') { + FastClick.attach(document.body); + } + } + }); + + // private Fast Selector wrapper, + // returns jQuery object. Only use where + // getElementById is not available. + var S = function (selector, context) { + if (typeof selector === 'string') { + if (context) { + var cont; + if (context.jquery) { + cont = context[0]; + if (!cont) { + return context; + } + } else { + cont = context; + } + return $(cont.querySelectorAll(selector)); + } + + return $(document.querySelectorAll(selector)); + } + + return $(selector, context); + }; + + // Namespace functions. + + var attr_name = function (init) { + var arr = []; + if (!init) { + arr.push('data'); + } + if (this.namespace.length > 0) { + arr.push(this.namespace); + } + arr.push(this.name); + + return arr.join('-'); + }; + + var add_namespace = function (str) { + var parts = str.split('-'), + i = parts.length, + arr = []; + + while (i--) { + if (i !== 0) { + arr.push(parts[i]); + } else { + if (this.namespace.length > 0) { + arr.push(this.namespace, parts[i]); + } else { + arr.push(parts[i]); + } + } + } + + return arr.reverse().join('-'); + }; + + // Event binding and data-options updating. + + var bindings = function (method, options) { + var self = this, + bind = function(){ + var $this = S(this), + should_bind_events = !$this.data(self.attr_name(true) + '-init'); + $this.data(self.attr_name(true) + '-init', $.extend({}, self.settings, (options || method), self.data_options($this))); + + if (should_bind_events) { + self.events(this); + } + }; + + if (S(this.scope).is('[' + this.attr_name() +']')) { + bind.call(this.scope); + } else { + S('[' + this.attr_name() +']', this.scope).each(bind); + } + // # Patch to fix #5043 to move this *after* the if/else clause in order for Backbone and similar frameworks to have improved control over event binding and data-options updating. + if (typeof method === 'string') { + return this[method].call(this, options); + } + + }; + + var single_image_loaded = function (image, callback) { + function loaded () { + callback(image[0]); + } + + function bindLoad () { + this.one('load', loaded); + + if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) { + var src = this.attr( 'src' ), + param = src.match( /\?/ ) ? '&' : '?'; + + param += 'random=' + (new Date()).getTime(); + this.attr('src', src + param); + } + } + + if (!image.attr('src')) { + loaded(); + return; + } + + if (image[0].complete || image[0].readyState === 4) { + loaded(); + } else { + bindLoad.call(image); + } + }; + + /* + https://github.com/paulirish/matchMedia.js + */ + + window.matchMedia = window.matchMedia || (function ( doc ) { + + 'use strict'; + + var bool, + docElem = doc.documentElement, + refNode = docElem.firstElementChild || docElem.firstChild, + // fakeBody required for + fakeBody = doc.createElement( 'body' ), + div = doc.createElement( 'div' ); + + div.id = 'mq-test-1'; + div.style.cssText = 'position:absolute;top:-100em'; + fakeBody.style.background = 'none'; + fakeBody.appendChild(div); + + return function (q) { + + div.innerHTML = '­'; + + docElem.insertBefore( fakeBody, refNode ); + bool = div.offsetWidth === 42; + docElem.removeChild( fakeBody ); + + return { + matches : bool, + media : q + }; + + }; + + }( document )); + + /* + * jquery.requestAnimationFrame + * https://github.com/gnarf37/jquery-requestAnimationFrame + * Requires jQuery 1.8+ + * + * Copyright (c) 2012 Corey Frang + * Licensed under the MIT license. + */ + + (function(jQuery) { + + + // requestAnimationFrame polyfill adapted from Erik Möller + // fixes from Paul Irish and Tino Zijdel + // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ + // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating + + var animating, + lastTime = 0, + vendors = ['webkit', 'moz'], + requestAnimationFrame = window.requestAnimationFrame, + cancelAnimationFrame = window.cancelAnimationFrame, + jqueryFxAvailable = 'undefined' !== typeof jQuery.fx; + + for (; lastTime < vendors.length && !requestAnimationFrame; lastTime++) { + requestAnimationFrame = window[ vendors[lastTime] + 'RequestAnimationFrame' ]; + cancelAnimationFrame = cancelAnimationFrame || + window[ vendors[lastTime] + 'CancelAnimationFrame' ] || + window[ vendors[lastTime] + 'CancelRequestAnimationFrame' ]; + } + + function raf() { + if (animating) { + requestAnimationFrame(raf); + + if (jqueryFxAvailable) { + jQuery.fx.tick(); + } + } + } + + if (requestAnimationFrame) { + // use rAF + window.requestAnimationFrame = requestAnimationFrame; + window.cancelAnimationFrame = cancelAnimationFrame; + + if (jqueryFxAvailable) { + jQuery.fx.timer = function (timer) { + if (timer() && jQuery.timers.push(timer) && !animating) { + animating = true; + raf(); + } + }; + + jQuery.fx.stop = function () { + animating = false; + }; + } + } else { + // polyfill + window.requestAnimationFrame = function (callback) { + var currTime = new Date().getTime(), + timeToCall = Math.max(0, 16 - (currTime - lastTime)), + id = window.setTimeout(function () { + callback(currTime + timeToCall); + }, timeToCall); + lastTime = currTime + timeToCall; + return id; + }; + + window.cancelAnimationFrame = function (id) { + clearTimeout(id); + }; + + } + + }( $ )); + + function removeQuotes (string) { + if (typeof string === 'string' || string instanceof String) { + string = string.replace(/^['\\/"]+|(;\s?})+|['\\/"]+$/g, ''); + } + + return string; + } + + window.Foundation = { + name : 'Foundation', + + version : '5.5.1', + + media_queries : { + 'small' : S('.foundation-mq-small').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''), + 'small-only' : S('.foundation-mq-small-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''), + 'medium' : S('.foundation-mq-medium').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''), + 'medium-only' : S('.foundation-mq-medium-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''), + 'large' : S('.foundation-mq-large').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''), + 'large-only' : S('.foundation-mq-large-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''), + 'xlarge' : S('.foundation-mq-xlarge').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''), + 'xlarge-only' : S('.foundation-mq-xlarge-only').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''), + 'xxlarge' : S('.foundation-mq-xxlarge').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, '') + }, + + stylesheet : $('').appendTo('head')[0].sheet, + + global : { + namespace : undefined + }, + + init : function (scope, libraries, method, options, response) { + var args = [scope, method, options, response], + responses = []; + + // check RTL + this.rtl = /rtl/i.test(S('html').attr('dir')); + + // set foundation global scope + this.scope = scope || this.scope; + + this.set_namespace(); + + if (libraries && typeof libraries === 'string' && !/reflow/i.test(libraries)) { + if (this.libs.hasOwnProperty(libraries)) { + responses.push(this.init_lib(libraries, args)); + } + } else { + for (var lib in this.libs) { + responses.push(this.init_lib(lib, libraries)); + } + } + + S(window).load(function () { + S(window) + .trigger('resize.fndtn.clearing') + .trigger('resize.fndtn.dropdown') + .trigger('resize.fndtn.equalizer') + .trigger('resize.fndtn.interchange') + .trigger('resize.fndtn.joyride') + .trigger('resize.fndtn.magellan') + .trigger('resize.fndtn.topbar') + .trigger('resize.fndtn.slider'); + }); + + return scope; + }, + + init_lib : function (lib, args) { + if (this.libs.hasOwnProperty(lib)) { + this.patch(this.libs[lib]); + + if (args && args.hasOwnProperty(lib)) { + if (typeof this.libs[lib].settings !== 'undefined') { + $.extend(true, this.libs[lib].settings, args[lib]); + } else if (typeof this.libs[lib].defaults !== 'undefined') { + $.extend(true, this.libs[lib].defaults, args[lib]); + } + return this.libs[lib].init.apply(this.libs[lib], [this.scope, args[lib]]); + } + + args = args instanceof Array ? args : new Array(args); + return this.libs[lib].init.apply(this.libs[lib], args); + } + + return function () {}; + }, + + patch : function (lib) { + lib.scope = this.scope; + lib.namespace = this.global.namespace; + lib.rtl = this.rtl; + lib['data_options'] = this.utils.data_options; + lib['attr_name'] = attr_name; + lib['add_namespace'] = add_namespace; + lib['bindings'] = bindings; + lib['S'] = this.utils.S; + }, + + inherit : function (scope, methods) { + var methods_arr = methods.split(' '), + i = methods_arr.length; + + while (i--) { + if (this.utils.hasOwnProperty(methods_arr[i])) { + scope[methods_arr[i]] = this.utils[methods_arr[i]]; + } + } + }, + + set_namespace : function () { + + // Description: + // Don't bother reading the namespace out of the meta tag + // if the namespace has been set globally in javascript + // + // Example: + // Foundation.global.namespace = 'my-namespace'; + // or make it an empty string: + // Foundation.global.namespace = ''; + // + // + + // If the namespace has not been set (is undefined), try to read it out of the meta element. + // Otherwise use the globally defined namespace, even if it's empty ('') + var namespace = ( this.global.namespace === undefined ) ? $('.foundation-data-attribute-namespace').css('font-family') : this.global.namespace; + + // Finally, if the namsepace is either undefined or false, set it to an empty string. + // Otherwise use the namespace value. + this.global.namespace = ( namespace === undefined || /false/i.test(namespace) ) ? '' : namespace; + }, + + libs : {}, + + // methods that can be inherited in libraries + utils : { + + // Description: + // Fast Selector wrapper returns jQuery object. Only use where getElementById + // is not available. + // + // Arguments: + // Selector (String): CSS selector describing the element(s) to be + // returned as a jQuery object. + // + // Scope (String): CSS selector describing the area to be searched. Default + // is document. + // + // Returns: + // Element (jQuery Object): jQuery object containing elements matching the + // selector within the scope. + S : S, + + // Description: + // Executes a function a max of once every n milliseconds + // + // Arguments: + // Func (Function): Function to be throttled. + // + // Delay (Integer): Function execution threshold in milliseconds. + // + // Returns: + // Lazy_function (Function): Function with throttling applied. + throttle : function (func, delay) { + var timer = null; + + return function () { + var context = this, args = arguments; + + if (timer == null) { + timer = setTimeout(function () { + func.apply(context, args); + timer = null; + }, delay); + } + }; + }, + + // Description: + // Executes a function when it stops being invoked for n seconds + // Modified version of _.debounce() http://underscorejs.org + // + // Arguments: + // Func (Function): Function to be debounced. + // + // Delay (Integer): Function execution threshold in milliseconds. + // + // Immediate (Bool): Whether the function should be called at the beginning + // of the delay instead of the end. Default is false. + // + // Returns: + // Lazy_function (Function): Function with debouncing applied. + debounce : function (func, delay, immediate) { + var timeout, result; + return function () { + var context = this, args = arguments; + var later = function () { + timeout = null; + if (!immediate) { + result = func.apply(context, args); + } + }; + var callNow = immediate && !timeout; + clearTimeout(timeout); + timeout = setTimeout(later, delay); + if (callNow) { + result = func.apply(context, args); + } + return result; + }; + }, + + // Description: + // Parses data-options attribute + // + // Arguments: + // El (jQuery Object): Element to be parsed. + // + // Returns: + // Options (Javascript Object): Contents of the element's data-options + // attribute. + data_options : function (el, data_attr_name) { + data_attr_name = data_attr_name || 'options'; + var opts = {}, ii, p, opts_arr, + data_options = function (el) { + var namespace = Foundation.global.namespace; + + if (namespace.length > 0) { + return el.data(namespace + '-' + data_attr_name); + } + + return el.data(data_attr_name); + }; + + var cached_options = data_options(el); + + if (typeof cached_options === 'object') { + return cached_options; + } + + opts_arr = (cached_options || ':').split(';'); + ii = opts_arr.length; + + function isNumber (o) { + return !isNaN (o - 0) && o !== null && o !== '' && o !== false && o !== true; + } + + function trim (str) { + if (typeof str === 'string') { + return $.trim(str); + } + return str; + } + + while (ii--) { + p = opts_arr[ii].split(':'); + p = [p[0], p.slice(1).join(':')]; + + if (/true/i.test(p[1])) { + p[1] = true; + } + if (/false/i.test(p[1])) { + p[1] = false; + } + if (isNumber(p[1])) { + if (p[1].indexOf('.') === -1) { + p[1] = parseInt(p[1], 10); + } else { + p[1] = parseFloat(p[1]); + } + } + + if (p.length === 2 && p[0].length > 0) { + opts[trim(p[0])] = trim(p[1]); + } + } + + return opts; + }, + + // Description: + // Adds JS-recognizable media queries + // + // Arguments: + // Media (String): Key string for the media query to be stored as in + // Foundation.media_queries + // + // Class (String): Class name for the generated tag + register_media : function (media, media_class) { + if (Foundation.media_queries[media] === undefined) { + $('head').append(''); + Foundation.media_queries[media] = removeQuotes($('.' + media_class).css('font-family')); + } + }, + + // Description: + // Add custom CSS within a JS-defined media query + // + // Arguments: + // Rule (String): CSS rule to be appended to the document. + // + // Media (String): Optional media query string for the CSS rule to be + // nested under. + add_custom_rule : function (rule, media) { + if (media === undefined && Foundation.stylesheet) { + Foundation.stylesheet.insertRule(rule, Foundation.stylesheet.cssRules.length); + } else { + var query = Foundation.media_queries[media]; + + if (query !== undefined) { + Foundation.stylesheet.insertRule('@media ' + + Foundation.media_queries[media] + '{ ' + rule + ' }'); + } + } + }, + + // Description: + // Performs a callback function when an image is fully loaded + // + // Arguments: + // Image (jQuery Object): Image(s) to check if loaded. + // + // Callback (Function): Function to execute when image is fully loaded. + image_loaded : function (images, callback) { + var self = this, + unloaded = images.length; + + if (unloaded === 0) { + callback(images); + } + + images.each(function () { + single_image_loaded(self.S(this), function () { + unloaded -= 1; + if (unloaded === 0) { + callback(images); + } + }); + }); + }, + + // Description: + // Returns a random, alphanumeric string + // + // Arguments: + // Length (Integer): Length of string to be generated. Defaults to random + // integer. + // + // Returns: + // Rand (String): Pseudo-random, alphanumeric string. + random_str : function () { + if (!this.fidx) { + this.fidx = 0; + } + this.prefix = this.prefix || [(this.name || 'F'), (+new Date).toString(36)].join('-'); + + return this.prefix + (this.fidx++).toString(36); + }, + + // Description: + // Helper for window.matchMedia + // + // Arguments: + // mq (String): Media query + // + // Returns: + // (Boolean): Whether the media query passes or not + match : function (mq) { + return window.matchMedia(mq).matches; + }, + + // Description: + // Helpers for checking Foundation default media queries with JS + // + // Returns: + // (Boolean): Whether the media query passes or not + + is_small_up : function () { + return this.match(Foundation.media_queries.small); + }, + + is_medium_up : function () { + return this.match(Foundation.media_queries.medium); + }, + + is_large_up : function () { + return this.match(Foundation.media_queries.large); + }, + + is_xlarge_up : function () { + return this.match(Foundation.media_queries.xlarge); + }, + + is_xxlarge_up : function () { + return this.match(Foundation.media_queries.xxlarge); + }, + + is_small_only : function () { + return !this.is_medium_up() && !this.is_large_up() && !this.is_xlarge_up() && !this.is_xxlarge_up(); + }, + + is_medium_only : function () { + return this.is_medium_up() && !this.is_large_up() && !this.is_xlarge_up() && !this.is_xxlarge_up(); + }, + + is_large_only : function () { + return this.is_medium_up() && this.is_large_up() && !this.is_xlarge_up() && !this.is_xxlarge_up(); + }, + + is_xlarge_only : function () { + return this.is_medium_up() && this.is_large_up() && this.is_xlarge_up() && !this.is_xxlarge_up(); + }, + + is_xxlarge_only : function () { + return this.is_medium_up() && this.is_large_up() && this.is_xlarge_up() && this.is_xxlarge_up(); + } + } + }; + + $.fn.foundation = function () { + var args = Array.prototype.slice.call(arguments, 0); + + return this.each(function () { + Foundation.init.apply(Foundation, [this].concat(args)); + return this; + }); + }; + +}(jQuery, window, window.document)); +;(function ($, window, document, undefined) { + 'use strict'; + + Foundation.libs.dropdown = { + name : 'dropdown', + + version : '5.5.1', + + settings : { + active_class : 'open', + disabled_class : 'disabled', + mega_class : 'mega', + align : 'bottom', + is_hover : false, + hover_timeout : 150, + opened : function () {}, + closed : function () {} + }, + + init : function (scope, method, options) { + Foundation.inherit(this, 'throttle'); + + $.extend(true, this.settings, method, options); + this.bindings(method, options); + }, + + events : function (scope) { + var self = this, + S = self.S; + + S(this.scope) + .off('.dropdown') + .on('click.fndtn.dropdown', '[' + this.attr_name() + ']', function (e) { + var settings = S(this).data(self.attr_name(true) + '-init') || self.settings; + if (!settings.is_hover || Modernizr.touch) { + e.preventDefault(); + if (S(this).parent('[data-reveal-id]')) { + e.stopPropagation(); + } + self.toggle($(this)); + } + }) + .on('mouseenter.fndtn.dropdown', '[' + this.attr_name() + '], [' + this.attr_name() + '-content]', function (e) { + var $this = S(this), + dropdown, + target; + + clearTimeout(self.timeout); + + if ($this.data(self.data_attr())) { + dropdown = S('#' + $this.data(self.data_attr())); + target = $this; + } else { + dropdown = $this; + target = S('[' + self.attr_name() + '="' + dropdown.attr('id') + '"]'); + } + + var settings = target.data(self.attr_name(true) + '-init') || self.settings; + + if (S(e.currentTarget).data(self.data_attr()) && settings.is_hover) { + self.closeall.call(self); + } + + if (settings.is_hover) { + self.open.apply(self, [dropdown, target]); + } + }) + .on('mouseleave.fndtn.dropdown', '[' + this.attr_name() + '], [' + this.attr_name() + '-content]', function (e) { + var $this = S(this); + var settings; + + if ($this.data(self.data_attr())) { + settings = $this.data(self.data_attr(true) + '-init') || self.settings; + } else { + var target = S('[' + self.attr_name() + '="' + S(this).attr('id') + '"]'), + settings = target.data(self.attr_name(true) + '-init') || self.settings; + } + + self.timeout = setTimeout(function () { + if ($this.data(self.data_attr())) { + if (settings.is_hover) { + self.close.call(self, S('#' + $this.data(self.data_attr()))); + } + } else { + if (settings.is_hover) { + self.close.call(self, $this); + } + } + }.bind(this), settings.hover_timeout); + }) + .on('click.fndtn.dropdown', function (e) { + var parent = S(e.target).closest('[' + self.attr_name() + '-content]'); + var links = parent.find('a'); + + if (links.length > 0 && parent.attr('aria-autoclose') !== 'false') { + self.close.call(self, S('[' + self.attr_name() + '-content]')); + } + + if (e.target !== document && !$.contains(document.documentElement, e.target)) { + return; + } + + if (S(e.target).closest('[' + self.attr_name() + ']').length > 0) { + return; + } + + if (!(S(e.target).data('revealId')) && + (parent.length > 0 && (S(e.target).is('[' + self.attr_name() + '-content]') || + $.contains(parent.first()[0], e.target)))) { + e.stopPropagation(); + return; + } + + self.close.call(self, S('[' + self.attr_name() + '-content]')); + }) + .on('opened.fndtn.dropdown', '[' + self.attr_name() + '-content]', function () { + self.settings.opened.call(this); + }) + .on('closed.fndtn.dropdown', '[' + self.attr_name() + '-content]', function () { + self.settings.closed.call(this); + }); + + S(window) + .off('.dropdown') + .on('resize.fndtn.dropdown', self.throttle(function () { + self.resize.call(self); + }, 50)); + + this.resize(); + }, + + close : function (dropdown) { + var self = this; + dropdown.each(function () { + var original_target = $('[' + self.attr_name() + '=' + dropdown[0].id + ']') || $('aria-controls=' + dropdown[0].id + ']'); + original_target.attr('aria-expanded', 'false'); + if (self.S(this).hasClass(self.settings.active_class)) { + self.S(this) + .css(Foundation.rtl ? 'right' : 'left', '-99999px') + .attr('aria-hidden', 'true') + .removeClass(self.settings.active_class) + .prev('[' + self.attr_name() + ']') + .removeClass(self.settings.active_class) + .removeData('target'); + + self.S(this).trigger('closed').trigger('closed.fndtn.dropdown', [dropdown]); + } + }); + dropdown.removeClass('f-open-' + this.attr_name(true)); + }, + + closeall : function () { + var self = this; + $.each(self.S('.f-open-' + this.attr_name(true)), function () { + self.close.call(self, self.S(this)); + }); + }, + + open : function (dropdown, target) { + this + .css(dropdown + .addClass(this.settings.active_class), target); + dropdown.prev('[' + this.attr_name() + ']').addClass(this.settings.active_class); + dropdown.data('target', target.get(0)).trigger('opened').trigger('opened.fndtn.dropdown', [dropdown, target]); + dropdown.attr('aria-hidden', 'false'); + target.attr('aria-expanded', 'true'); + dropdown.focus(); + dropdown.addClass('f-open-' + this.attr_name(true)); + }, + + data_attr : function () { + if (this.namespace.length > 0) { + return this.namespace + '-' + this.name; + } + + return this.name; + }, + + toggle : function (target) { + if (target.hasClass(this.settings.disabled_class)) { + return; + } + var dropdown = this.S('#' + target.data(this.data_attr())); + if (dropdown.length === 0) { + // No dropdown found, not continuing + return; + } + + this.close.call(this, this.S('[' + this.attr_name() + '-content]').not(dropdown)); + + if (dropdown.hasClass(this.settings.active_class)) { + this.close.call(this, dropdown); + if (dropdown.data('target') !== target.get(0)) { + this.open.call(this, dropdown, target); + } + } else { + this.open.call(this, dropdown, target); + } + }, + + resize : function () { + var dropdown = this.S('[' + this.attr_name() + '-content].open'); + var target = $(dropdown.data("target")); + + if (dropdown.length && target.length) { + this.css(dropdown, target); + } + }, + + css : function (dropdown, target) { + var left_offset = Math.max((target.width() - dropdown.width()) / 2, 8), + settings = target.data(this.attr_name(true) + '-init') || this.settings; + + this.clear_idx(); + + if (this.small()) { + var p = this.dirs.bottom.call(dropdown, target, settings); + + dropdown.attr('style', '').removeClass('drop-left drop-right drop-top').css({ + position : 'absolute', + width : '95%', + 'max-width' : 'none', + top : p.top + }); + + dropdown.css(Foundation.rtl ? 'right' : 'left', left_offset); + } else { + + this.style(dropdown, target, settings); + } + + return dropdown; + }, + + style : function (dropdown, target, settings) { + var css = $.extend({position : 'absolute'}, + this.dirs[settings.align].call(dropdown, target, settings)); + + dropdown.attr('style', '').css(css); + }, + + // return CSS property object + // `this` is the dropdown + dirs : { + // Calculate target offset + _base : function (t) { + var o_p = this.offsetParent(), + o = o_p.offset(), + p = t.offset(); + + p.top -= o.top; + p.left -= o.left; + + //set some flags on the p object to pass along + p.missRight = false; + p.missTop = false; + p.missLeft = false; + p.leftRightFlag = false; + + //lets see if the panel will be off the screen + //get the actual width of the page and store it + var actualBodyWidth; + if (document.getElementsByClassName('row')[0]) { + actualBodyWidth = document.getElementsByClassName('row')[0].clientWidth; + } else { + actualBodyWidth = window.outerWidth; + } + + var actualMarginWidth = (window.outerWidth - actualBodyWidth) / 2; + var actualBoundary = actualBodyWidth; + + if (!this.hasClass('mega')) { + //miss top + if (t.offset().top <= this.outerHeight()) { + p.missTop = true; + actualBoundary = window.outerWidth - actualMarginWidth; + p.leftRightFlag = true; + } + + //miss right + if (t.offset().left + this.outerWidth() > t.offset().left + actualMarginWidth && t.offset().left - actualMarginWidth > this.outerWidth()) { + p.missRight = true; + p.missLeft = false; + } + + //miss left + if (t.offset().left - this.outerWidth() <= 0) { + p.missLeft = true; + p.missRight = false; + } + } + + return p; + }, + + top : function (t, s) { + var self = Foundation.libs.dropdown, + p = self.dirs._base.call(this, t); + + this.addClass('drop-top'); + + if (p.missTop == true) { + p.top = p.top + t.outerHeight() + this.outerHeight(); + this.removeClass('drop-top'); + } + + if (p.missRight == true) { + p.left = p.left - this.outerWidth() + t.outerWidth(); + } + + if (t.outerWidth() < this.outerWidth() || self.small() || this.hasClass(s.mega_menu)) { + self.adjust_pip(this, t, s, p); + } + + if (Foundation.rtl) { + return {left : p.left - this.outerWidth() + t.outerWidth(), + top : p.top - this.outerHeight()}; + } + + return {left : p.left, top : p.top - this.outerHeight()}; + }, + + bottom : function (t, s) { + var self = Foundation.libs.dropdown, + p = self.dirs._base.call(this, t); + + if (p.missRight == true) { + p.left = p.left - this.outerWidth() + t.outerWidth(); + } + + if (t.outerWidth() < this.outerWidth() || self.small() || this.hasClass(s.mega_menu)) { + self.adjust_pip(this, t, s, p); + } + + if (self.rtl) { + return {left : p.left - this.outerWidth() + t.outerWidth(), top : p.top + t.outerHeight()}; + } + + return {left : p.left, top : p.top + t.outerHeight()}; + }, + + left : function (t, s) { + var p = Foundation.libs.dropdown.dirs._base.call(this, t); + + this.addClass('drop-left'); + + if (p.missLeft == true) { + p.left = p.left + this.outerWidth(); + p.top = p.top + t.outerHeight(); + this.removeClass('drop-left'); + } + + return {left : p.left - this.outerWidth(), top : p.top}; + }, + + right : function (t, s) { + var p = Foundation.libs.dropdown.dirs._base.call(this, t); + + this.addClass('drop-right'); + + if (p.missRight == true) { + p.left = p.left - this.outerWidth(); + p.top = p.top + t.outerHeight(); + this.removeClass('drop-right'); + } else { + p.triggeredRight = true; + } + + var self = Foundation.libs.dropdown; + + if (t.outerWidth() < this.outerWidth() || self.small() || this.hasClass(s.mega_menu)) { + self.adjust_pip(this, t, s, p); + } + + return {left : p.left + t.outerWidth(), top : p.top}; + } + }, + + // Insert rule to style psuedo elements + adjust_pip : function (dropdown, target, settings, position) { + var sheet = Foundation.stylesheet, + pip_offset_base = 8; + + if (dropdown.hasClass(settings.mega_class)) { + pip_offset_base = position.left + (target.outerWidth() / 2) - 8; + } else if (this.small()) { + pip_offset_base += position.left - 8; + } + + this.rule_idx = sheet.cssRules.length; + + //default + var sel_before = '.f-dropdown.open:before', + sel_after = '.f-dropdown.open:after', + css_before = 'left: ' + pip_offset_base + 'px;', + css_after = 'left: ' + (pip_offset_base - 1) + 'px;'; + + if (position.missRight == true) { + pip_offset_base = dropdown.outerWidth() - 23; + sel_before = '.f-dropdown.open:before', + sel_after = '.f-dropdown.open:after', + css_before = 'left: ' + pip_offset_base + 'px;', + css_after = 'left: ' + (pip_offset_base - 1) + 'px;'; + } + + //just a case where right is fired, but its not missing right + if (position.triggeredRight == true) { + sel_before = '.f-dropdown.open:before', + sel_after = '.f-dropdown.open:after', + css_before = 'left:-12px;', + css_after = 'left:-14px;'; + } + + if (sheet.insertRule) { + sheet.insertRule([sel_before, '{', css_before, '}'].join(' '), this.rule_idx); + sheet.insertRule([sel_after, '{', css_after, '}'].join(' '), this.rule_idx + 1); + } else { + sheet.addRule(sel_before, css_before, this.rule_idx); + sheet.addRule(sel_after, css_after, this.rule_idx + 1); + } + }, + + // Remove old dropdown rule index + clear_idx : function () { + var sheet = Foundation.stylesheet; + + if (typeof this.rule_idx !== 'undefined') { + sheet.deleteRule(this.rule_idx); + sheet.deleteRule(this.rule_idx); + delete this.rule_idx; + } + }, + + small : function () { + return matchMedia(Foundation.media_queries.small).matches && + !matchMedia(Foundation.media_queries.medium).matches; + }, + + off : function () { + this.S(this.scope).off('.fndtn.dropdown'); + this.S('html, body').off('.fndtn.dropdown'); + this.S(window).off('.fndtn.dropdown'); + this.S('[data-dropdown-content]').off('.fndtn.dropdown'); + }, + + reflow : function () {} + }; +}(jQuery, window, window.document)); diff --git a/tasker/static/jquery-2.1.3.js b/tasker/static/jquery-2.1.3.js new file mode 100644 index 0000000..79d631f --- /dev/null +++ b/tasker/static/jquery-2.1.3.js @@ -0,0 +1,9205 @@ +/*! + * jQuery JavaScript Library v2.1.3 + * http://jquery.com/ + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * + * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2014-12-18T15:11Z + */ + +(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) +// + +var arr = []; + +var slice = arr.slice; + +var concat = arr.concat; + +var push = arr.push; + +var indexOf = arr.indexOf; + +var class2type = {}; + +var toString = class2type.toString; + +var hasOwn = class2type.hasOwnProperty; + +var support = {}; + + + +var + // Use the correct document accordingly with window argument (sandbox) + document = window.document, + + version = "2.1.3", + + // 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. + // (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 ); + }, + + 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(null); + }, + + // 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) + return !jQuery.isArray( obj ) && (obj - parseFloat( obj ) + 1) >= 0; + }, + + isPlainObject: function( obj ) { + // 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; + } + + if ( obj.constructor && + !hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) { + return false; + } + + // If the function hasn't returned already, we're confident that + // |obj| is a plain object, created by {} or constructed with new Object + return true; + }, + + 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(); + }, + + // 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; + }, + + // 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 value, + i = 0, + length = elems.length, + isArray = isArraylike( elems ), + ret = []; + + // Go through the array, translating each of the items to their new values + if ( isArray ) { + 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 +}); + +// 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 ( type === "function" || jQuery.isWindow( obj ) ) { + return false; + } + + if ( obj.nodeType === 1 && length ) { + return true; + } + + return type === "array" || length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj; +} +var Sizzle = +/*! + * Sizzle CSS Selector Engine v2.2.0-pre + * http://sizzlejs.com/ + * + * Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2014-12-16 + */ +(function( window ) { + +var i, + support, + Expr, + getText, + isXML, + tokenize, + compile, + select, + outermostContext, + sortInput, + hasDuplicate, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + 1 * new Date(), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + } + return 0; + }, + + // General-purpose constants + MAX_NEGATIVE = 1 << 31, + + // Instance methods + hasOwn = ({}).hasOwnProperty, + arr = [], + pop = arr.pop, + push_native = arr.push, + push = arr.push, + slice = arr.slice, + // Use a stripped-down indexOf as it's faster than native + // http://jsperf.com/thor-indexof-vs-for/5 + indexOf = function( list, elem ) { + var i = 0, + len = list.length; + for ( ; i < len; i++ ) { + if ( list[i] === elem ) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", + + // 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#" ), + + // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace + + // Operator (capture 2) + "*([*^$|!~]?=)" + whitespace + + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + + "*\\]", + + pseudos = ":(" + characterEncoding + ")(?:\\((" + + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: + // 1. quoted (capture 3; capture 4 or capture 5) + "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + + // 2. simple (capture 6) + "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + + // 3. anything else (capture 2) + ".*" + + ")\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rwhitespace = new RegExp( whitespace + "+", "g" ), + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), + + rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + characterEncoding + ")" ), + "CLASS": new RegExp( "^\\.(" + 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" ), + "bool": new RegExp( "^(?:" + booleans + ")$", "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" ) + }, + + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rsibling = /[+~]/, + rescape = /'|\\/g, + + // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), + funescape = function( _, escaped, escapedWhitespace ) { + var high = "0x" + escaped - 0x10000; + // NaN means non-codepoint + // Support: Firefox<24 + // Workaround erroneous numeric interpretation of +"0x" + return high !== high || escapedWhitespace ? + escaped : + high < 0 ? + // BMP codepoint + String.fromCharCode( high + 0x10000 ) : + // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }, + + // Used for iframes + // See setDocument() + // Removing the function wrapper causes a "Permission Denied" + // error in IE + unloadHandler = function() { + setDocument(); + }; + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + (arr = slice.call( preferredDoc.childNodes )), + preferredDoc.childNodes + ); + // Support: Android<4.0 + // Detect silently failing push.apply + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + push_native.apply( target, slice.call(els) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + // Can't trust NodeList.length + while ( (target[j++] = els[i++]) ) {} + target.length = j - 1; + } + }; +} + +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 || []; + nodeType = context.nodeType; + + if ( typeof selector !== "string" || !selector || + nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { + + return results; + } + + if ( !seed && documentIsHTML ) { + + // Try to shortcut find operations when possible (e.g., not under DocumentFragment) + if ( nodeType !== 11 && (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 (jQuery #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, context.getElementsByTagName( selector ) ); + return results; + + // Speed-up: Sizzle(".CLASS") + } else if ( (m = match[3]) && support.getElementsByClassName ) { + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // QSA path + if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { + nid = old = expando; + newContext = context; + newSelector = nodeType !== 1 && 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 ) && testContext( context.parentNode ) || context; + newSelector = groups.join(","); + } + + if ( newSelector ) { + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch(qsaError) { + } finally { + if ( !old ) { + context.removeAttribute("id"); + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * 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 keys = []; + + function cache( 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); + } + return cache; +} + +/** + * 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 { + // Remove from its parent by default + if ( div.parentNode ) { + div.parentNode.removeChild( div ); + } + // release memory in IE + div = null; + } +} + +/** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ +function addHandle( attrs, handler ) { + var arr = attrs.split("|"), + i = attrs.length; + + while ( i-- ) { + Expr.attrHandle[ arr[i] ] = handler; + } +} + +/** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + ( ~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 + * @param {String} type + */ +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 + * @param {String} type + */ +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 + * @param {Function} fn + */ +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]); + } + } + }); + }); +} + +/** + * Checks a node for validity as a Sizzle context + * @param {Element|Object=} context + * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value + */ +function testContext( context ) { + return context && typeof context.getElementsByTagName !== "undefined" && context; +} + +// Expose support vars for convenience +support = Sizzle.support = {}; + +/** + * Detects XML nodes + * @param {Element|Object} elem An element or a document + * @returns {Boolean} True iff elem is a non-HTML XML node + */ +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 hasCompare, parent, + 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; + parent = doc.defaultView; + + // Support: IE>8 + // If iframe document is assigned to "document" variable and if iframe has been reloaded, + // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 + // IE6-8 do not support the defaultView property so parent will be undefined + if ( parent && parent !== parent.top ) { + // IE11 does not have attachEvent, so all must suffer + if ( parent.addEventListener ) { + parent.addEventListener( "unload", unloadHandler, false ); + } else if ( parent.attachEvent ) { + parent.attachEvent( "onunload", unloadHandler ); + } + } + + /* Support tests + ---------------------------------------------------------------------- */ + documentIsHTML = !isXML( doc ); + + /* Attributes + ---------------------------------------------------------------------- */ + + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties + // (excepting IE8 booleans) + support.attributes = assert(function( div ) { + div.className = "i"; + return !div.getAttribute("className"); + }); + + /* getElement(s)By* + ---------------------------------------------------------------------- */ + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert(function( div ) { + div.appendChild( doc.createComment("") ); + return !div.getElementsByTagName("*").length; + }); + + // Support: IE<9 + support.getElementsByClassName = rnative.test( doc.getElementsByClassName ); + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert(function( div ) { + docElem.appendChild( div ).id = expando; + return !doc.getElementsByName || !doc.getElementsByName( expando ).length; + }); + + // ID find and filter + if ( support.getById ) { + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + 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 { + // Support: IE6/7 + // getElementById is not reliable as a find shortcut + delete Expr.find["ID"]; + + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); + return node && node.value === attrId; + }; + }; + } + + // Tag + Expr.find["TAG"] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( tag ); + + // DocumentFragment nodes don't have gEBTN + } else if ( support.qsa ) { + return context.querySelectorAll( tag ); + } + } : + + function( tag, context ) { + var elem, + tmp = [], + i = 0, + // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too + 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; + }; + + // Class + Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { + if ( documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See http://bugs.jquery.com/ticket/13378 + rbuggyQSA = []; + + if ( (support.qsa = rnative.test( 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 explicitly + // setting a boolean content attribute, + // since its presence should be enough + // http://bugs.jquery.com/ticket/12359 + docElem.appendChild( div ).innerHTML = "" + + ""; + + // Support: IE8, Opera 11-12.16 + // Nothing should be selected when empty strings follow ^= or $= or *= + // The test attribute must be unknown in Opera but "safe" for WinRT + // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section + if ( div.querySelectorAll("[msallowcapture^='']").length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); + } + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if ( !div.querySelectorAll("[selected]").length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Support: Chrome<29, Android<4.2+, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.7+ + if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) { + rbuggyQSA.push("~="); + } + + // 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"); + } + + // Support: Safari 8+, iOS 8+ + // https://bugs.webkit.org/show_bug.cgi?id=136851 + // In-page `selector#id sibing-combinator selector` fails + if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) { + rbuggyQSA.push(".#.+[+~]"); + } + }); + + assert(function( div ) { + // Support: Windows 8 Native Apps + // The type and name attributes are restricted during .innerHTML assignment + var input = doc.createElement("input"); + input.setAttribute( "type", "hidden" ); + div.appendChild( input ).setAttribute( "name", "D" ); + + // Support: IE8 + // Enforce case-sensitivity of name attribute + if ( div.querySelectorAll("[name=d]").length ) { + rbuggyQSA.push( "name" + 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 = rnative.test( (matches = docElem.matches || + docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + 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 = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); + + /* Contains + ---------------------------------------------------------------------- */ + hasCompare = rnative.test( docElem.compareDocumentPosition ); + + // Element contains another + // Purposefully does not implement inclusive descendent + // As in, an element does not contain itself + contains = hasCompare || rnative.test( docElem.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 ? + 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; + }; + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = hasCompare ? + function( 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 || + (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { + + // Choose the first element that is related to our preferred document + if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { + return -1; + } + if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } : + function( a, b ) { + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Parentless nodes are either documents or disconnected + if ( !aup || !bup ) { + return a === doc ? -1 : + b === doc ? 1 : + aup ? -1 : + bup ? 1 : + sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 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; + }; + + return doc; +}; + +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']" ); + + if ( support.matchesSelector && documentIsHTML && + ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && + ( !rbuggyQSA || !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 ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + // Don't get fooled by Object.prototype properties (jQuery #13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + return val !== undefined ? + val : + support.attributes || !documentIsHTML ? + elem.getAttribute( name ) : + (val = elem.getAttributeNode(name)) && val.specified ? + val.value : + null; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + sortInput = !support.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; +}; + +/** + * 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 + while ( (node = elem[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 (jQuery #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, + + attrHandle: {}, + + 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[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[6] && match[2]; + + if ( matchExpr["CHILD"].test( match[0] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[3] ) { + match[2] = match[4] || match[5] || ""; + + // 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( nodeNameSelector ) { + var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { return true; } : + 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( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && 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.replace( rwhitespace, " " ) + " " ).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( 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 ); + // Don't keep the element (issue #299) + input[0] = null; + return !results.pop(); + }; + }), + + "has": markFunction(function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + }), + + "contains": markFunction(function( text ) { + text = text.replace( runescape, funescape ); + 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 identifier + if ( !ridentifier.test(lang || "") ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( (elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute("xml:lang") || elem.getAttribute("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 negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), + // but not by others (comment: 8; processing instruction: 7; etc.) + // nodeType < 6 works because attributes (2) do not appear as children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeType < 6 ) { + 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; + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + + // Support: IE<8 + // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); + }, + + // 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; + }) + } +}; + +Expr.pseudos["nth"] = Expr.pseudos["eq"]; + +// 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 ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +tokenize = Sizzle.tokenize = function( 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 oldCache, outerCache, + newCache = [ 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 ( (oldCache = outerCache[ dir ]) && + oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { + + // Assign to newCache so results back-propagate to previous elements + return (newCache[ 2 ] = oldCache[ 2 ]); + } else { + // Reuse newcache so results back-propagate to previous elements + outerCache[ dir ] = newCache; + + // A match means we're done; a fail means we have to keep checking + if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { + 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 multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[i], results ); + } + return results; +} + +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( 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( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + (checkContext = context).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + // Avoid hanging onto element (issue #299) + checkContext = null; + return ret; + } ]; + + 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( + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) + ).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 ) { + var bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, outermost ) { + var elem, j, matcher, + matchedCount = 0, + i = "0", + unmatched = seed && [], + setMatched = [], + contextBackup = outermostContext, + // We must always have either seed elements or outermost context + elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), + len = elems.length; + + if ( outermost ) { + outermostContext = context !== document && context; + } + + // Add elements passing elementMatchers directly to results + // Keep `i` a string if there are no elements so `matchedCount` will be "00" below + // Support: IE<9, Safari + // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id + for ( ; i !== len && (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; + } + } + + // 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, match /* 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 ( !match ) { + match = tokenize( selector ); + } + i = match.length; + while ( i-- ) { + cached = matcherFromTokens( match[i] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); + + // Save selector and tokenization + cached.selector = selector; + } + return cached; +}; + +/** + * A low-level selection function that works with Sizzle's compiled + * selector functions + * @param {String|Function} selector A selector or a pre-compiled + * selector function built with Sizzle.compile + * @param {Element} context + * @param {Array} [results] + * @param {Array} [seed] A set of elements to match against + */ +select = Sizzle.select = function( selector, context, results, seed ) { + var i, tokens, token, type, find, + compiled = typeof selector === "function" && selector, + match = !seed && tokenize( (selector = compiled.selector || selector) ); + + results = results || []; + + // Try to minimize operations if there is no seed and 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" && + support.getById && context.nodeType === 9 && documentIsHTML && + Expr.relative[ tokens[1].type ] ) { + + context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; + if ( !context ) { + return results; + + // Precompiled matchers will still verify ancestry, so step up a level + } else if ( compiled ) { + context = context.parentNode; + } + + 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 ) && testContext( 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, seed ); + return results; + } + + break; + } + } + } + } + + // Compile and execute a filtering function if one is not provided + // Provide `match` to avoid retokenization if we modified the selector above + ( compiled || compile( selector, match ) )( + seed, + context, + !documentIsHTML, + results, + rsibling.test( selector ) && testContext( context.parentNode ) || context + ); + return results; +}; + +// One-time assignments + +// Sort stability +support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; + +// Support: Chrome 14-35+ +// Always assume duplicates if they aren't passed to the comparison function +support.detectDuplicates = !!hasDuplicate; + +// Initialize against the default document +setDocument(); + +// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) +// Detached nodes confoundingly follow *each other* +support.sortDetached = assert(function( div1 ) { + // Should return 1, but returns 4 (following) + return div1.compareDocumentPosition( document.createElement("div") ) & 1; +}); + +// Support: IE<8 +// Prevent attribute/property "interpolation" +// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !assert(function( div ) { + div.innerHTML = ""; + return div.firstChild.getAttribute("href") === "#" ; +}) ) { + addHandle( "type|href|height|width", function( elem, name, isXML ) { + if ( !isXML ) { + return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); + } + }); +} + +// Support: IE<9 +// Use defaultValue in place of getAttribute("value") +if ( !support.attributes || !assert(function( div ) { + div.innerHTML = ""; + div.firstChild.setAttribute( "value", "" ); + return div.firstChild.getAttribute( "value" ) === ""; +}) ) { + addHandle( "value", function( elem, name, isXML ) { + if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { + return elem.defaultValue; + } + }); +} + +// Support: IE<9 +// Use getAttributeNode to fetch booleans when getAttribute lies +if ( !assert(function( div ) { + return div.getAttribute("disabled") == null; +}) ) { + addHandle( booleans, function( elem, name, isXML ) { + var val; + if ( !isXML ) { + return elem[ name ] === true ? name.toLowerCase() : + (val = elem.getAttributeNode( name )) && val.specified ? + val.value : + null; + } + }); +} + +return Sizzle; + +})( window ); + + + +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; + + + +var rneedsContext = jQuery.expr.match.needsContext; + +var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/); + + + +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 ) >= 0 ) !== 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; + } +}); + + +// Initialize a jQuery object + + +// A central reference to the root jQuery(document) +var rootjQuery, + + // A simple way to check for HTML strings + // Prioritize #id over 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 ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // 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 || 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 typeof rootjQuery.ready !== "undefined" ? + rootjQuery.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 ); + + +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.extend({ + dir: function( elem, dir, until ) { + var matched = [], + truncate = until !== undefined; + + while ( (elem = elem[ dir ]) && elem.nodeType !== 9 ) { + if ( elem.nodeType === 1 ) { + if ( truncate && jQuery( elem ).is( until ) ) { + break; + } + matched.push( elem ); + } + } + return matched; + }, + + sibling: function( n, elem ) { + var matched = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + matched.push( n ); + } + } + + return matched; + } +}); + +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.unique( 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.unique( + 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 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 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.unique( matched ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + matched.reverse(); + } + } + + return this.pushStack( matched ); + }; +}); +var rnotwhite = (/\S+/g); + + + +// 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( 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 // Last fire value (for non-forgettable lists) + memory, + // Flag to know if list was already fired + fired, + // Flag to know if list is currently firing + firing, + // First callback to fire (used internally by add and fireWith) + firingStart, + // End of the loop when firing + firingLength, + // Index of currently firing callback (modified by remove if needed) + firingIndex, + // 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 = []; + firingLength = 0; + 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 ) { + if ( list && ( !fired || stack ) ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + 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 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[ 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() + .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(); + } +}); + + +// 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, false ); + window.removeEventListener( "load", completed, false ); + 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. + // 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 ); + + } else { + + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed, false ); + } + } + return readyList.promise( obj ); +}; + +// Kick off the DOM ready check even if the user does not +jQuery.ready.promise(); + + + + +// Multifunctional method to get and set values of a collection +// The value/s can optionally be executed if it's a function +var access = jQuery.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 ) { + 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 < 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; +}; + + +/** + * Determines whether an object can have data + */ +jQuery.acceptData = function( owner ) { + // Accepts only: + // - Node + // - Node.ELEMENT_NODE + // - Node.DOCUMENT_NODE + // - Object + // - Any + /* jshint -W018 */ + return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); +}; + + +function Data() { + // Support: Android<4, + // Old WebKit does not have Object.preventExtensions/freeze method, + // return new empty object instead with no [[set]] accessor + Object.defineProperty( this.cache = {}, 0, { + get: function() { + return {}; + } + }); + + this.expando = jQuery.expando + Data.uid++; +} + +Data.uid = 1; +Data.accepts = jQuery.acceptData; + +Data.prototype = { + key: function( owner ) { + // We can accept data for non-element nodes in modern browsers, + // but we should not, see #8335. + // Always return the key for a frozen object. + if ( !Data.accepts( owner ) ) { + return 0; + } + + var descriptor = {}, + // Check if the owner object already has a cache key + unlock = owner[ this.expando ]; + + // If not, create one + if ( !unlock ) { + unlock = Data.uid++; + + // Secure it in a non-enumerable, non-writable property + try { + descriptor[ this.expando ] = { value: unlock }; + Object.defineProperties( owner, descriptor ); + + // Support: Android<4 + // Fallback to a less secure definition + } catch ( e ) { + descriptor[ this.expando ] = unlock; + jQuery.extend( owner, descriptor ); + } + } + + // Ensure the cache object + if ( !this.cache[ unlock ] ) { + this.cache[ unlock ] = {}; + } + + return unlock; + }, + set: function( owner, data, value ) { + var prop, + // There may be an unlock assigned to this node, + // if there is no entry for this "owner", create one inline + // and set the unlock as though an owner entry had always existed + unlock = this.key( owner ), + cache = this.cache[ unlock ]; + + // Handle: [ owner, key, value ] args + if ( typeof data === "string" ) { + cache[ data ] = value; + + // Handle: [ owner, { properties } ] args + } else { + // Fresh assignments by object are shallow copied + if ( jQuery.isEmptyObject( cache ) ) { + jQuery.extend( this.cache[ unlock ], data ); + // Otherwise, copy the properties one-by-one to the cache object + } else { + for ( prop in data ) { + cache[ prop ] = data[ prop ]; + } + } + } + return cache; + }, + get: function( owner, key ) { + // Either a valid cache is found, or will be created. + // New caches will be created and the unlock returned, + // allowing direct access to the newly created + // empty data object. A valid owner object must be provided. + var cache = this.cache[ this.key( owner ) ]; + + return key === undefined ? + cache : cache[ 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, + unlock = this.key( owner ), + cache = this.cache[ unlock ]; + + if ( key === undefined ) { + this.cache[ unlock ] = {}; + + } 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 ] ]; + } + } + }, + hasData: function( owner ) { + return !jQuery.isEmptyObject( + this.cache[ owner[ this.expando ] ] || {} + ); + }, + discard: function( owner ) { + if ( owner[ this.expando ] ) { + delete this.cache[ owner[ this.expando ] ]; + } + } +}; +var data_priv = new Data(); + +var data_user = new Data(); + + + +// 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, "-$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 + data_user.set( elem, key, data ); + } else { + data = undefined; + } + } + return data; +} + +jQuery.extend({ + hasData: function( elem ) { + return data_user.hasData( elem ) || data_priv.hasData( elem ); + }, + + data: function( elem, name, data ) { + return data_user.access( elem, name, data ); + }, + + removeData: function( elem, name ) { + data_user.remove( elem, name ); + }, + + // TODO: Now that all calls to _data and _removeData have been replaced + // with direct calls to data_priv methods, these can be deprecated. + _data: function( elem, name, data ) { + return data_priv.access( elem, name, data ); + }, + + _removeData: function( elem, name ) { + data_priv.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 = data_user.get( elem ); + + if ( elem.nodeType === 1 && !data_priv.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 ] ); + } + } + } + data_priv.set( elem, "hasDataAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each(function() { + data_user.set( this, key ); + }); + } + + return access( this, function( value ) { + var data, + camelKey = jQuery.camelCase( key ); + + // 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 = data_user.get( elem, key ); + if ( data !== undefined ) { + return data; + } + + // Attempt to get data from the cache + // with the key camelized + data = data_user.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... + 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 = data_user.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...* + data_user.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 ) { + data_user.set( this, key, value ); + } + }); + }, null, value, arguments.length > 1, null, true ); + }, + + removeData: function( key ) { + return this.each(function() { + data_user.remove( this, key ); + }); + } +}); + + +jQuery.extend({ + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = data_priv.get( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || jQuery.isArray( data ) ) { + queue = data_priv.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 data_priv.get( elem, key ) || data_priv.access( elem, key, { + empty: jQuery.Callbacks("once memory").add(function() { + data_priv.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 = data_priv.get( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +}); +var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source; + +var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; + +var isHidden = function( 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 ); + }; + +var rcheckableType = (/^(?:checkbox|radio)$/i); + + + +(function() { + var fragment = document.createDocumentFragment(), + div = fragment.appendChild( document.createElement( "div" ) ), + input = document.createElement( "input" ); + + // Support: 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 = ""; + support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; +})(); +var strundefined = typeof undefined; + + + +support.focusinBubbles = "onfocusin" in window; + + +var + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +/* + * 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 = data_priv.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 !== strundefined && 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, false ); + } + } + } + + 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 = data_priv.hasData( elem ) && data_priv.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 the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + delete elemData.handle; + data_priv.remove( elem, "events" ); + } + }, + + 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(".") >= 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 ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + 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 = ( data_priv.get( cur, "events" ) || {} )[ event.type ] && data_priv.get( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && handle.apply && jQuery.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) && + jQuery.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; + }, + + 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 = ( data_priv.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.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 i, matches, sel, handleObj, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + // Black-hole SVG 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 process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( 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; + }, + + // 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 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; + } + } + } + }, + + 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 = function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } +}; + +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 = { + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + + if ( e && e.preventDefault ) { + e.preventDefault(); + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + + if ( e && e.stopPropagation ) { + e.stopPropagation(); + } + }, + stopImmediatePropagation: function() { + var e = this.originalEvent; + + this.isImmediatePropagationStopped = returnTrue; + + if ( e && e.stopImmediatePropagation ) { + e.stopImmediatePropagation(); + } + + this.stopPropagation(); + } +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +// Support: Chrome 15+ +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 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; + } + }; +}); + +// Support: Firefox, Chrome, Safari +// Create "bubbling" focus and blur events +if ( !support.focusinBubbles ) { + 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 ), true ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + var doc = this.ownerDocument || this, + attaches = data_priv.access( doc, fix ); + + if ( !attaches ) { + doc.addEventListener( orig, handler, true ); + } + data_priv.access( doc, fix, ( attaches || 0 ) + 1 ); + }, + teardown: function() { + var doc = this.ownerDocument || this, + attaches = data_priv.access( doc, fix ) - 1; + + if ( !attaches ) { + doc.removeEventListener( orig, handler, true ); + data_priv.remove( doc, fix ); + + } else { + data_priv.access( doc, fix, attaches ); + } + } + }; + }); +} + +jQuery.fn.extend({ + + on: function( types, selector, data, fn, /*INTERNAL*/ 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 ) { + 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 ); + }); + }, + + 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 ); + } + } +}); + + +var + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, + rtagName = /<([\w:]+)/, + rhtml = /<|&#?\w+;/, + rnoInnerhtml = /<(?:script|style|link)/i, + // checked="checked" or checked + rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, + rscriptType = /^$|\/(?:java|ecma)script/i, + rscriptTypeMasked = /^true\/(.*)/, + rcleanScript = /^\s*\s*$/g, + + // We have to close these tags to support XHTML (#13200) + wrapMap = { + + // Support: IE9 + option: [ 1, "" ], + + thead: [ 1, "", "
    " ], + col: [ 2, "", "
    " ], + tr: [ 2, "", "
    " ], + td: [ 3, "", "
    " ], + + _default: [ 0, "", "" ] + }; + +// Support: IE9 +wrapMap.optgroup = wrapMap.option; + +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +// Support: 1.x compatibility +// 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; +} + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + data_priv.set( + elems[ i ], "globalEval", !refElements || data_priv.get( refElements[ i ], "globalEval" ) + ); + } +} + +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 ( data_priv.hasData( src ) ) { + pdataOld = data_priv.access( src ); + pdataCur = data_priv.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 ( data_user.hasData( src ) ) { + udataOld = data_user.access( src ); + udataCur = jQuery.extend( {}, udataOld ); + + data_user.set( dest, udataCur ); + } +} + +function getAll( context, tag ) { + var ret = context.getElementsByTagName ? context.getElementsByTagName( tag || "*" ) : + context.querySelectorAll ? context.querySelectorAll( tag || "*" ) : + []; + + return tag === undefined || tag && jQuery.nodeName( context, tag ) ? + jQuery.merge( [ context ], ret ) : + ret; +} + +// 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; + } +} + +jQuery.extend({ + 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; + }, + + buildFragment: function( elems, context, scripts, selection ) { + 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: QtWebKit, PhantomJS + // 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 ] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[ 2 ]; + + // Descend through wrappers to the right content + j = wrap[ 0 ]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Support: QtWebKit, PhantomJS + // 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++ ]) ) { + + // #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( 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; + }, + + cleanData: function( elems ) { + var data, elem, type, key, + special = jQuery.event.special, + i = 0; + + for ( ; (elem = elems[ i ]) !== undefined; i++ ) { + if ( jQuery.acceptData( elem ) ) { + key = elem[ data_priv.expando ]; + + if ( key && (data = data_priv.cache[ key ]) ) { + 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 ); + } + } + } + if ( data_priv.cache[ key ] ) { + // Discard any remaining `private` data + delete data_priv.cache[ key ]; + } + } + } + // Discard any remaining `user` data + delete data_user.cache[ elem[ data_user.expando ] ]; + } + } +}); + +jQuery.fn.extend({ + 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 this.domManip( arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + }); + }, + + prepend: function() { + return this.domManip( 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 this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + }); + }, + + after: function() { + return this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + }); + }, + + remove: function( selector, keepData /* Internal Use Only */ ) { + var elem, + elems = selector ? jQuery.filter( selector, this ) : this, + i = 0; + + for ( ; (elem = elems[i]) != null; i++ ) { + 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++ ) { + 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 = value.replace( rxhtmlTag, "<$1>" ); + + 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 arg = arguments[ 0 ]; + + // Make the changes, replacing each context element with the new content + this.domManip( arguments, function( elem ) { + arg = this.parentNode; + + jQuery.cleanData( getAll( this ) ); + + if ( arg ) { + arg.replaceChild( elem, this ); + } + }); + + // Force removal if there was no new content (e.g., from empty arguments) + return arg && (arg.length || arg.nodeType) ? this : this.remove(); + }, + + detach: function( selector ) { + return this.remove( selector, true ); + }, + + domManip: function( args, callback ) { + + // Flatten any nested arrays + args = concat.apply( [], args ); + + var fragment, first, scripts, hasScripts, node, doc, + 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" && + !support.checkClone && rchecked.test( value ) ) ) { + return this.each(function( index ) { + var self = set.eq( index ); + if ( isFunction ) { + args[ 0 ] = value.call( this, index, self.html() ); + } + self.domManip( args, callback ); + }); + } + + if ( l ) { + fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + if ( first ) { + 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: QtWebKit + // jQuery.merge because push.apply(_, arraylike) throws + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( 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 || "" ) && + !data_priv.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 this; + } +}); + +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 ); + }; +}); + + +var iframe, + elemdisplay = {}; + +/** + * 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 style, + elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), + + // getDefaultComputedStyle might be reliably used only on attached element + display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ? + + // Use of this method is a temporary fix (more like optimization) until something better comes along, + // since it was removed from specification and supported only in FF + style.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( "