├── .gitignore
├── dev
├── sass
│ ├── application.scss
│ ├── _home.scss
│ ├── _color-var-func.scss
│ └── _daterange.scss
└── js
│ ├── app.js
│ ├── Calendar.js
│ └── vendor
│ └── moment.js
├── public
├── js
│ ├── app.js
│ ├── Calendar.js
│ └── vendor
│ │ ├── moment.js
│ │ └── jquery.js
├── index.html
└── css
│ └── application.css
├── package.json
├── bower.json
├── LICENSE.txt
├── gulpfile.js
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | .publish
2 | node_modules
3 | public/.DS_Store
--------------------------------------------------------------------------------
/dev/sass/application.scss:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | @import "color-var-func",
4 | "daterange",
5 | "home";
--------------------------------------------------------------------------------
/dev/sass/_home.scss:
--------------------------------------------------------------------------------
1 | .daterange {
2 | font-family: $font-family;
3 | float: left;
4 | padding: 20px;
5 | }
6 | .daterange--double {
7 | z-index: 2;
8 | }
9 | .daterange--single {
10 | z-index: 1;
11 | }
--------------------------------------------------------------------------------
/public/js/app.js:
--------------------------------------------------------------------------------
1 | new Calendar({element:$(".daterange--single"),current_date:new Date("June 15, 2015")}),new Calendar({element:$(".daterange--double"),earliest_date:new Date("January 1, 2000"),latest_date:new Date,start_date:new Date("May 1, 2015"),end_date:new Date("May 31, 2015"),callback:function(){var e=moment(this.start_date).format("ll"),a=moment(this.end_date).format("ll");console.log("Start Date: "+e+"\nEnd Date: "+a)}});
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "BaremetricsCalendar",
3 | "version": "1.0.2",
4 | "license": "MIT",
5 | "repository": {
6 | "type": "git",
7 | "url": "https://github.com/Baremetrics/calendar.git"
8 | },
9 | "devDependencies": {
10 | "gulp": "^3.8.10",
11 | "gulp-autoprefixer": "^0.0.10",
12 | "gulp-gh-pages": "^0.5.2",
13 | "gulp-livereload": "^2.1.1",
14 | "gulp-minify-css": "^0.3.8",
15 | "gulp-newer": "^0.3.0",
16 | "gulp-sass": "^0.7.3",
17 | "gulp-uglify": "^1.0.1"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/dev/js/app.js:
--------------------------------------------------------------------------------
1 | new Calendar({
2 | element: $('.daterange--single'),
3 | current_date: new Date('June 15, 2015')
4 | });
5 |
6 | new Calendar({
7 | element: $('.daterange--double'),
8 | earliest_date: new Date('January 1, 2000'),
9 | latest_date: new Date(),
10 | start_date: new Date('May 1, 2015'),
11 | end_date: new Date('May 31, 2015'),
12 | callback: function() {
13 | var start = moment(this.start_date).format('ll'),
14 | end = moment(this.end_date).format('ll');
15 |
16 | console.log('Start Date: '+ start +'\nEnd Date: '+ end);
17 | }
18 | });
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Baremetrics Date Range Picker
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/dev/sass/_color-var-func.scss:
--------------------------------------------------------------------------------
1 | // Colors
2 | $blue: #2693D5;
3 | $bluemoon: #BFDEEC;
4 | $moon: #EBF1F4;
5 | $white: #FFFFFF;
6 | $rat: #9BA3A7;
7 | $mouse: #C3CACD;
8 |
9 | // Variables
10 | $font-family: "proxima-nova", Proxima Nova, "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;
11 | $rem-base: 16px;
12 | $radius: 5px;
13 |
14 | // Functions
15 | @function strip-unit($num) {
16 | @return $num / ($num * 0 + 1);
17 | }
18 |
19 | @function convert-to-rem($value, $base-value: $rem-base) {
20 | $value: strip-unit($value) / strip-unit($base-value) * 1rem;
21 | @if ($value == 0rem) { $value: 0; } // Turn 0rem into 0
22 | @return $value;
23 | }
24 |
25 | @function rem($values, $base-value: $rem-base) {
26 | $max: length($values);
27 |
28 | @if $max == 1 { @return convert-to-rem(nth($values, 1), $base-value); }
29 |
30 | $remValues: ();
31 | @for $i from 1 through $max {
32 | $remValues: append($remValues, convert-to-rem(nth($values, $i), $base-value));
33 | }
34 | @return $remValues;
35 | }
--------------------------------------------------------------------------------
/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "BaremetricsCalendar",
3 | "version": "1.0.2",
4 | "homepage": "https://github.com/Baremetrics/calendar",
5 | "authors": [
6 | "Tyler van der Hoeven "
7 | ],
8 | "description": "The Baremetrics date range picker is a simplified solution for selecting both date ranges and single dates all from a single calender view. There aren't a billion options but the code is pretty basic and modular so feel free to edit however to meet your own needs.",
9 | "main": [
10 | "dev/js/Calendar.js",
11 | "dev/sass/application.scss"
12 | ],
13 | "dependencies": {
14 | "moment": "2.10.3",
15 | "jquery": "2.1.4"
16 | },
17 | "moduleType": [
18 | "globals"
19 | ],
20 | "keywords": [
21 | "calendar.js",
22 | "baremetrics",
23 | "date",
24 | "range",
25 | "date",
26 | "picker"
27 | ],
28 | "repository": {
29 | "type": "git",
30 | "url": "git://github.com/Baremetrics/calendar.git"
31 | },
32 | "license": "MIT",
33 | "ignore": [
34 | "**/.*",
35 | "node_modules",
36 | "bower_components",
37 | "test",
38 | "tests"
39 | ]
40 | }
41 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright © 2015 Baremetrics, Inc.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
--------------------------------------------------------------------------------
/gulpfile.js:
--------------------------------------------------------------------------------
1 | var gulp = require('gulp'),
2 | ghPages = require('gulp-gh-pages'),
3 | sass = require('gulp-sass'),
4 | autoprefixer = require('gulp-autoprefixer'),
5 | minifycss = require('gulp-minify-css'),
6 | uglify = require('gulp-uglify'),
7 | livereload = require('gulp-livereload'),
8 | newer = require('gulp-newer');
9 |
10 |
11 | // ROOT TASKS // ---------------------------------------------------------
12 | // Main style task
13 | gulp.task('css', function() {
14 | return gulp.src('dev/sass/application.scss')
15 | .pipe(sass())
16 | .on('error', handleError)
17 | .pipe(autoprefixer({cascade: false})) // auto prefix
18 | .pipe(minifycss()) // minify everything
19 | .pipe(gulp.dest('public/css'));
20 | });
21 |
22 | // Main Javascript task
23 | gulp.task('js', function() {
24 | return gulp.src('dev/js/**/*.js')
25 | .pipe(newer('public/js'))
26 | .pipe(uglify())
27 | .on('error', handleError)
28 | .pipe(gulp.dest('public/js'));
29 | });
30 |
31 | // Publish github page
32 | gulp.task('deploy', function() {
33 | return gulp.src('public/**/*')
34 | .pipe(ghPages());
35 | });
36 |
37 |
38 | // FUNCTIONS // ---------------------------------------------------------
39 | // Watch function
40 | gulp.task('watch', function() {
41 | gulp.start('js', 'css');
42 |
43 | gulp.watch('dev/sass/**/*.scss', ['css']);
44 | gulp.watch('dev/js/**/*.js', ['js']);
45 | gulp.watch('dev/img/**/*.{jpg,jpeg,png,gif,svg,ico}', ['img']);
46 |
47 | livereload.listen();
48 | gulp.watch(['public/*.html', 'public/js/**/*.js', 'public/img/**/*.{jpg,jpeg,png,gif,svg,ico}', 'public/css/*.css']).on('change', livereload.changed);
49 | });
50 |
51 | // Default function
52 | gulp.task('default', ['watch']);
53 |
54 | // Error reporting function
55 | function handleError(err) {
56 | console.log(err.toString());
57 | this.emit('end');
58 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # [Baremetrics](https://baremetrics.com/) Date Range Picker
2 | _[Baremetrics](https://baremetrics.com) provides one-click analytics & insights for Stripe. **[Get started today!](https://baremetrics.com)**_
3 |
4 | ---
5 |
6 | ## 1.0.2 Update
7 |
8 | - Added license and repo info to the package.json
9 | - Removed underscore dependency
10 | - Added the github page publisher function to the gulpfile
11 | - Added a switch statement for keycode checking (Thanks again [Theodore Brown](https://github.com/theodorejb))
12 | - Added the `'use strict'` label to the Calendar.js file
13 | - Cleaned out some unused gulp functions
14 | - Compressed the Sass folder to a single level
15 |
16 | ## 1.0.1 Update
17 |
18 | - Removed global CSS reset file
19 | - Fixed issue with presets not respecting earliest date
20 | - Registered the package with Bower `bower install BaremetricsCalendar` (Thanks [Agustin Diaz](https://github.com/HiroAgustin))
21 | - Shifted code base to support UMD support (Thanks [Derrick Reimer](https://github.com/djreimer))
22 | - Added up/down keyboard support
23 | - day = keystroke up/down
24 | - week = hold shift + keystroke up/down
25 | - month = hold meta + keystroke up/down
26 | - Fixed a couple minor typos hither and thither
27 |
28 | ---
29 |
30 | The Baremetrics date range picker is a simplified solution for selecting both date ranges and single dates all from a single calender view. There aren't a billion options but the code is pretty basic and modular so feel free to edit however to meet your own needs.
31 |
32 | Design by [Chris Meeks](https://dribbble.com/ChrisMeeks)
33 | Code by [Tyler van der Hoeven](https://github.com/tyvdh)
34 |
35 | [View a demo](http://baremetrics.github.io/calendar/)
36 | [View in a live production app](https://demo.baremetrics.com/)
37 |
38 | 
39 | 
40 | 
41 |
42 | ## Installing
43 |
44 | Using the date picker is pretty simple, you've just got to make a couple choices and include a couple settings.
45 | Create a div with a `daterange` class and then either the `daterange--double` or `daterange--single` classname for targeting the specific calendar you'd like to generate.
46 |
47 | ```html
48 |
49 |
50 | ```
51 |
52 | Next you've just gotta create a `new Calendar` instance.
53 |
54 | ```js
55 | new Calendar({
56 | element: $('.daterange--single'),
57 | current_date: new Date('June 15, 2015')
58 | });
59 |
60 | new Calendar({
61 | element: $('.daterange--double'),
62 | earliest_date: new Date('January 1, 2000'),
63 | latest_date: new Date(),
64 | start_date: new Date('May 1, 2015'),
65 | end_date: new Date('May 31, 2015'),
66 | callback: function() {
67 | var start = moment(this.start_date).format('ll'),
68 | end = moment(this.end_date).format('ll');
69 |
70 | console.log('Start Date: '+ start +'\nEnd Date: '+ end);
71 | }
72 | });
73 | ```
74 |
75 | ### Single Calendar params
76 | - element\*
77 | - jQuery DOM object of the calendar div you're working on
78 | - callback
79 | - A function for whenever a new date is saved
80 | - Inside you have access to variables like `this.earliest_date`, `this.latest_date` and `this.current_date` for doing things with the new dates.
81 | - earliest_date
82 | - The earliest date to show in the calendar
83 | - latest_date
84 | - The latest date to show in the calendar
85 | - current_date
86 | - The date to start the calendar on
87 |
88 | ### Double Calendar params
89 | - element\*
90 | - jQuery DOM object of the calendar div you're working on
91 | - callback
92 | - A function for whenever a new date is saved
93 | - Inside you have access to variables like `this.earliest_date`, `this.latest_date`, `this.end_date`, `this.start_date` and `this.current_date` for doing things with the new dates.
94 | - earliest_date
95 | - The earliest date to show in the calendar
96 | - latest_date
97 | - The latest date to show in the calendar
98 | - start_date
99 | - The date to start the selection on for the calendar
100 | - end_date
101 | - The date to end the selection on for the calendar
102 |
103 | ---
104 | \* required
105 |
106 | ## Developing
107 |
108 | I've included my signature gulpfile too so be sure and take a look at that as well.
109 |
110 | ```bash
111 | $ cd
112 | $ npm install
113 | $ gulp
114 | ```
115 |
116 | I also use [pow](http://pow.cx/) and the [powder gem](https://github.com/Rodreegez/powder) to run my local dev environments but however you plan on wrangling that the gulpfile turns on a livereload server so as long as you have the files serving somehow any changes you make will show up instantly.
117 |
118 | ## Dependencies
119 | - [jQuery](https://jquery.com/)
120 | - [MomentJS](http://momentjs.com/)
121 |
--------------------------------------------------------------------------------
/public/css/application.css:
--------------------------------------------------------------------------------
1 | .daterange{position:relative}.daterange *{-moz-box-sizing:border-box;box-sizing:border-box}.daterange div,.daterange li,.daterange span,.daterange ul{margin:0;padding:0;border:0}.daterange ul{list-style:none}.daterange .dr-input{display:-webkit-flex;display:-ms-flexbox;display:flex;border:1px solid #C3CACD;border-radius:5px;background-color:#FFF;position:relative;z-index:5;overflow:hidden}.daterange .dr-input:hover{border-color:#2693D5}.daterange .dr-input.active{box-shadow:0 0 0 3px rgba(191,222,236,.8);border-color:#2693D5}.daterange .dr-input .dr-dates{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;padding:0 1.5rem 0 .75rem;min-width:230px}.daterange .dr-input .dr-dates .dr-date{font-size:.9375rem;padding:.65625rem 0;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;outline:0}.daterange .dr-input .dr-dates .dr-date.active,.daterange .dr-input .dr-dates .dr-date:focus,.daterange .dr-input .dr-dates .dr-date:hover{color:#2693D5}.daterange .dr-input .dr-dates .dr-dates-dash{color:#C3CACD;position:relative;top:-2px;padding:0 5px;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;text-align:center}.daterange .dr-input .dr-presets{width:2.1875rem;border-left:1px solid #C3CACD;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;cursor:pointer;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.daterange .dr-input .dr-presets.active,.daterange .dr-input .dr-presets:hover{border-color:#2693D5;box-shadow:inset 0 2px 3px #EBF1F4}.daterange .dr-input .dr-presets.active .dr-preset-bar,.daterange .dr-input .dr-presets:hover .dr-preset-bar{background-color:#2693D5}.daterange .dr-input .dr-presets .dr-preset-bar{height:2px;background-color:#C3CACD;margin:1px 0 1px 25%}.daterange .dr-input .dr-presets .dr-preset-bar:nth-child(1){width:50%}.daterange .dr-input .dr-presets .dr-preset-bar:nth-child(2){width:40%}.daterange .dr-input .dr-presets .dr-preset-bar:nth-child(3){width:30%}.daterange .dr-selections{position:absolute}.daterange .dr-selections .dr-calendar{background-color:#FFF;font-size:.9375rem;box-shadow:0 0 5px #C3CACD;border-radius:0 0 5px 5px;position:relative;overflow:hidden;z-index:4;padding-top:5px;top:-5px;left:4px;transition:width .2s;min-width:210px}.daterange .dr-selections .dr-calendar .dr-range-switcher{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;padding:.375rem .5rem;font-size:.875rem}.daterange .dr-selections .dr-calendar .dr-range-switcher .dr-switcher{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-ms-flex-align:center;align-items:center;border:1px solid rgba(195,202,205,.5);border-radius:5px;height:1.5625rem}.daterange .dr-selections .dr-calendar .dr-range-switcher .dr-switcher i{color:#C3CACD;position:relative;top:-1px;cursor:pointer;font-size:.75rem;height:100%;width:20px}.daterange .dr-selections .dr-calendar .dr-range-switcher .dr-switcher i:hover:after,.daterange .dr-selections .dr-calendar .dr-range-switcher .dr-switcher i:hover:before{background-color:#2693D5}.daterange .dr-selections .dr-calendar .dr-range-switcher .dr-switcher i.dr-disabled{pointer-events:none;opacity:0}.daterange .dr-selections .dr-calendar .dr-range-switcher .dr-switcher i:after,.daterange .dr-selections .dr-calendar .dr-range-switcher .dr-switcher i:before{content:"";position:absolute;width:7px;height:2px;background-color:#C3CACD;border-radius:1px;left:50%}.daterange .dr-selections .dr-calendar .dr-range-switcher .dr-switcher i.dr-left:before{top:calc(50% - 2px);-webkit-transform:translate(-50%,-50%) rotate(-45deg);-ms-transform:translate(-50%,-50%) rotate(-45deg);transform:translate(-50%,-50%) rotate(-45deg)}.daterange .dr-selections .dr-calendar .dr-range-switcher .dr-switcher i.dr-left:after{top:calc(50% + 2px);-webkit-transform:translate(-50%,-50%) rotate(45deg);-ms-transform:translate(-50%,-50%) rotate(45deg);transform:translate(-50%,-50%) rotate(45deg)}.daterange .dr-selections .dr-calendar .dr-range-switcher .dr-switcher i.dr-right:before{top:calc(50% - 2px);-webkit-transform:translate(-50%,-50%) rotate(45deg);-ms-transform:translate(-50%,-50%) rotate(45deg);transform:translate(-50%,-50%) rotate(45deg)}.daterange .dr-selections .dr-calendar .dr-range-switcher .dr-switcher i.dr-right:after{top:calc(50% + 2px);-webkit-transform:translate(-50%,-50%) rotate(-45deg);-ms-transform:translate(-50%,-50%) rotate(-45deg);transform:translate(-50%,-50%) rotate(-45deg)}.daterange .dr-selections .dr-calendar .dr-range-switcher .dr-month-switcher{width:100%;margin-right:.375rem}.daterange .dr-selections .dr-calendar .dr-range-switcher .dr-year-switcher{min-width:80px}.daterange .dr-selections .dr-calendar .dr-days-of-week-list{display:-webkit-flex;display:-ms-flexbox;display:flex;background-color:#EBF1F4;font-size:.625rem;color:#9BA3A7;padding:.3125rem 0;border:1px solid rgba(195,202,205,.5);border-left:none;border-right:none}.daterange .dr-selections .dr-calendar .dr-days-of-week-list .dr-day-of-week{width:calc(100% / 7);text-align:center}.daterange .dr-selections .dr-calendar .dr-day-list{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;font-size:.9375rem}.daterange .dr-selections .dr-calendar .dr-day-list .dr-day{padding:.3125rem;text-align:center;width:calc(100% / 7);cursor:pointer}.daterange .dr-selections .dr-calendar .dr-day-list .dr-day.dr-hover:not(.dr-current){background-color:#EBF1F4!important}.daterange .dr-selections .dr-calendar .dr-day-list .dr-day.dr-hover-before{border-left:2px solid #2693D5!important;border-radius:2px 0 0 2px;padding-left:.1875rem!important}.daterange .dr-selections .dr-calendar .dr-day-list .dr-day.dr-hover-after{border-right:2px solid #2693D5!important;border-radius:0 2px 2px 0;padding-right:.1875rem!important}.daterange .dr-selections .dr-calendar .dr-day-list .dr-end,.daterange .dr-selections .dr-calendar .dr-day-list .dr-selected,.daterange .dr-selections .dr-calendar .dr-day-list .dr-start{background-color:#EBF1F4}.daterange .dr-selections .dr-calendar .dr-day-list .dr-maybe{background-color:#EBF1F4!important}.daterange .dr-selections .dr-calendar .dr-day-list .dr-fade{color:#C3CACD}.daterange .dr-selections .dr-calendar .dr-day-list .dr-start{border-left:2px solid #2693D5;border-radius:2px 0 0 2px;padding-left:.1875rem}.daterange .dr-selections .dr-calendar .dr-day-list .dr-end{border-right:2px solid #2693D5;border-radius:0 2px 2px 0;padding-right:.1875rem}.daterange .dr-selections .dr-calendar .dr-day-list .dr-current{color:#2693D5!important;background-color:rgba(38,147,213,.2)!important}.daterange .dr-selections .dr-calendar .dr-day-list .dr-outside{pointer-events:none;cursor:default;color:rgba(195,202,205,.5)}.daterange .dr-selections .dr-preset-list{background-color:#FFF;color:#2693D5;font-size:.9375rem;box-shadow:0 0 5px #C3CACD;border-radius:0 0 5px 5px;position:relative;overflow:hidden;z-index:4;padding-top:5px;top:-5px;left:4px;width:100%}.daterange .dr-selections .dr-list-item{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end;padding:.75rem .625rem;border-bottom:1px solid #EBF1F4;cursor:pointer;white-space:nowrap}.daterange .dr-selections .dr-list-item:hover{background-color:#EBF1F4}.daterange .dr-selections .dr-list-item .dr-item-aside{color:#9BA3A7;font-size:.75rem;margin-left:.3125rem}.daterange--single .dr-input{cursor:text}.daterange--single .dr-input .dr-dates{padding:0;min-width:160px;width:100%}.daterange--single .dr-input .dr-dates .dr-date{width:100%;padding:.65625rem .75rem;text-align:left}.daterange{font-family:proxima-nova,Proxima Nova,"Helvetica Neue",Helvetica,Helvetica,Arial,sans-serif;float:left;padding:20px}.daterange--double{z-index:2}.daterange--single{z-index:1}
--------------------------------------------------------------------------------
/dev/sass/_daterange.scss:
--------------------------------------------------------------------------------
1 | .daterange {
2 | position: relative;
3 |
4 | * {
5 | box-sizing: border-box;
6 | }
7 | div, span, ul, li {
8 | margin: 0;
9 | padding: 0;
10 | border: 0;
11 | }
12 | ul {
13 | list-style: none;
14 | }
15 | .dr-input {
16 | display: flex;
17 | border: 1px solid $mouse;
18 | border-radius: $radius;
19 | background-color: $white;
20 | position: relative;
21 | z-index: 5;
22 | overflow: hidden;
23 |
24 | &:hover {
25 | border-color: $blue;
26 | }
27 | &.active {
28 | box-shadow: 0 0 0 3px rgba($bluemoon, 0.8);
29 | border-color: $blue;
30 | }
31 | .dr-dates {
32 | display: flex;
33 | align-items: center;
34 | justify-content: space-between;
35 | padding: 0 rem(24) 0 rem(12);
36 | min-width: 230px;
37 |
38 | .dr-date {
39 | font-size: rem(15);
40 | padding: rem(10.5 0);
41 | text-align: center;
42 | white-space: nowrap;
43 | overflow: hidden;
44 | text-overflow: ellipsis;
45 | outline: none;
46 |
47 | &:hover, &:focus, &.active {
48 | color: $blue;
49 | }
50 | }
51 | .dr-dates-dash {
52 | color: $mouse;
53 | position: relative;
54 | top: -2px;
55 | padding: 0 5px;
56 | flex-grow: 0;
57 | text-align: center;
58 | }
59 | }
60 | .dr-presets {
61 | width: rem(35);
62 | border-left: 1px solid $mouse;
63 | flex-shrink: 0;
64 | cursor: pointer;
65 | display: flex;
66 | flex-direction: column;
67 | flex-wrap: wrap;
68 | align-items: flex-start;
69 | justify-content: center;
70 |
71 | &:hover, &.active {
72 | border-color: $blue;
73 | box-shadow: inset 0 2px 3px $moon;
74 |
75 | .dr-preset-bar {
76 | background-color: $blue;
77 | }
78 | }
79 | .dr-preset-bar {
80 | height: 2px;
81 | background-color: $mouse;
82 | margin: 1px 0 1px 25%;
83 |
84 | &:nth-child(1) {
85 | width: 50%;
86 | }
87 | &:nth-child(2) {
88 | width: 40%;
89 | }
90 | &:nth-child(3) {
91 | width: 30%;
92 | }
93 | }
94 | }
95 | }
96 |
97 |
98 | .dr-selections {
99 | position: absolute;
100 |
101 | .dr-calendar {
102 | background-color: $white;
103 | font-size: rem(15);
104 | box-shadow: 0 0 5px $mouse;
105 | border-radius: 0 0 $radius $radius;
106 | position: relative;
107 | overflow: hidden;
108 | z-index: 4;
109 | padding-top: 5px;
110 | top: -5px;
111 | left: 4px;
112 | transition: width .2s;
113 | min-width: 210px;
114 |
115 | .dr-range-switcher {
116 | display: flex;
117 | justify-content: space-between;
118 | padding: rem(6 8);
119 | font-size: rem(14);
120 |
121 | .dr-switcher {
122 | display: flex;
123 | justify-content: space-between;
124 | align-items: center;
125 | border: 1px solid rgba($mouse, 0.5);
126 | border-radius: $radius;
127 | height: rem(25);
128 |
129 | i {
130 | color: $mouse;
131 | position: relative;
132 | top: -1px;
133 | cursor: pointer;
134 | font-size: rem(12);
135 | height: 100%;
136 | width: 20px;
137 |
138 | &:hover:before, &:hover:after {
139 | background-color: $blue;
140 | }
141 | &.dr-disabled {
142 | pointer-events: none;
143 | opacity: 0;
144 | }
145 | &:before, &:after {
146 | content: "";
147 | position: absolute;
148 | width: 7px;
149 | height: 2px;
150 | background-color: $mouse;
151 | border-radius: 1px;
152 | left: 50%;
153 | }
154 | &.dr-left:before {
155 | top: calc(50% - 2px);
156 | transform: translate(-50%, -50%) rotate(-45deg);
157 | }
158 | &.dr-left:after {
159 | top: calc(50% + 2px);
160 | transform: translate(-50%, -50%) rotate(45deg);
161 | }
162 | &.dr-right:before {
163 | top: calc(50% - 2px);
164 | transform: translate(-50%, -50%) rotate(45deg);
165 | }
166 | &.dr-right:after {
167 | top: calc(50% + 2px);
168 | transform: translate(-50%, -50%) rotate(-45deg);
169 | }
170 | }
171 | }
172 | .dr-month-switcher {
173 | width: 100%;
174 | margin-right: rem(6);
175 | }
176 | .dr-year-switcher {
177 | min-width: 80px;
178 | }
179 | }
180 | .dr-days-of-week-list {
181 | display: flex;
182 | background-color: $moon;
183 | font-size: rem(10);
184 | color: $rat;
185 | padding: rem(5 0);
186 | border: 1px solid rgba($mouse, 0.5);
187 | border-left: none;
188 | border-right: none;
189 |
190 | .dr-day-of-week {
191 | width: calc(100% / 7);
192 | text-align: center;
193 | }
194 | }
195 | .dr-day-list {
196 | display: flex;
197 | flex-wrap: wrap;
198 | font-size: rem(15);
199 |
200 | .dr-day {
201 | padding: rem(5);
202 | text-align: center;
203 | width: calc(100% / 7);
204 | cursor: pointer;
205 |
206 | &.dr-hover:not(.dr-current) {
207 | background-color: $moon !important;
208 | }
209 | &.dr-hover-before {
210 | border-left: 2px solid $blue !important;
211 | border-radius: 2px 0 0 2px;
212 | padding-left: rem(3) !important;
213 | }
214 | &.dr-hover-after {
215 | border-right: 2px solid $blue !important;
216 | border-radius: 0 2px 2px 0;
217 | padding-right: rem(3) !important;
218 | }
219 | }
220 | .dr-selected, .dr-start, .dr-end {
221 | background-color: $moon;
222 | }
223 | .dr-maybe {
224 | background-color: $moon !important;
225 | }
226 | .dr-fade {
227 | color: $mouse;
228 | }
229 | .dr-start {
230 | border-left: 2px solid $blue;
231 | border-radius: 2px 0 0 2px;
232 | padding-left: rem(3);
233 | }
234 | .dr-end {
235 | border-right: 2px solid $blue;
236 | border-radius: 0 2px 2px 0;
237 | padding-right: rem(3);
238 | }
239 | .dr-current {
240 | color: $blue !important;
241 | background-color: rgba($blue, 0.2) !important;
242 | }
243 | .dr-outside {
244 | pointer-events: none;
245 | cursor: default;
246 | color: rgba($mouse, 0.5);
247 | }
248 | }
249 | }
250 |
251 | .dr-preset-list {
252 | background-color: $white;
253 | color: $blue;
254 | font-size: rem(15);
255 | box-shadow: 0 0 5px $mouse;
256 | border-radius: 0 0 $radius $radius;
257 | position: relative;
258 | overflow: hidden;
259 | z-index: 4;
260 | padding-top: 5px;
261 | top: -5px;
262 | left: 4px;
263 | width: 100%;
264 | }
265 | .dr-list-item {
266 | display: flex;
267 | align-items: flex-end;
268 | padding: rem(12 10);
269 | border-bottom: 1px solid $moon;
270 | cursor: pointer;
271 | white-space: nowrap;
272 |
273 | &:hover {
274 | background-color: $moon;
275 | }
276 | .dr-item-aside {
277 | color: $rat;
278 | font-size: rem(12);
279 | margin-left: rem(5);
280 | }
281 | }
282 | }
283 | }
284 |
285 | .daterange--single {
286 |
287 | .dr-input {
288 | cursor: text;
289 |
290 | .dr-dates {
291 | padding: 0;
292 | min-width: 160px;
293 | width: 100%;
294 |
295 | .dr-date {
296 | width: 100%;
297 | padding: rem(10.5 12);
298 | text-align: left;
299 | }
300 | }
301 | }
302 | }
--------------------------------------------------------------------------------
/public/js/Calendar.js:
--------------------------------------------------------------------------------
1 | "use strict";!function(e,t){"function"==typeof define&&define.amd?define(["jquery","moment"],t):"object"==typeof exports?module.exports=t(require("jquery"),require("moment")):e.Calendar=t(jQuery,moment)}(this,function(e,t){function a(a){var s=this;this.calIsOpen=!1,this.presetIsOpen=!1,this.element=a.element||e(".daterange"),this.type=this.element.hasClass("daterange--single")?"single":"double",this.selected=null,this.earliest_date=a.earliest_date||new Date("January 1, 1900"),this.latest_date=a.latest_date||new Date("December 31, 2900"),this.end_date=a.end_date||("double"==this.type?new Date:null),this.start_date=a.start_date||("double"==this.type?new Date(t(this.end_date).subtract(1,"month")):null),this.current_date=a.current_date||("single"==this.type?new Date:null),this.callback=a.callback||this.calendarSetDates,this.calendarHTML(this.type),e(".dr-presets",this.element).click(function(){s.presetToggle()}),e(".dr-list-item",this.element).click(function(){var t=e(".dr-item-aside",this).html().split("–");s.start_date=new Date(t[0]),s.end_date=new Date(t[1]),s.calendarSetDates(),s.presetToggle(),s.calendarSaveDates()}),e(".dr-date",this.element).on({click:function(){s.calendarOpen(this)},keyup:function(e){9!=e.keyCode||s.calIsOpen||s.start_date||s.end_date||s.calendarOpen(this)},keydown:function(a){switch(a.keyCode){case 9:e(s.selected).hasClass("dr-date-start")?(a.preventDefault(),e(".dr-date-end",s.element).trigger("click")):(s.calendarCheckDates(),s.calendarSaveDates(),s.calendarClose("force"));break;case 13:a.preventDefault(),s.calendarCheckDates(),s.calendarSetDates(),s.calendarSaveDates(),s.calendarClose("force");break;case 27:s.calendarSetDates(),s.calendarClose("force");break;case 38:a.preventDefault();var r="day";a.shiftKey&&(r="week"),a.metaKey&&(r="month");var d=t(s.current_date).subtract(1,r);e(this).html(d.format("MMMM D, YYYY")),s.current_date=d._d;break;case 40:a.preventDefault();var r="day";a.shiftKey&&(r="week"),a.metaKey&&(r="month");var i=t(s.current_date).add(1,r);e(this).html(i.format("MMMM D, YYYY")),s.current_date=i._d}}}),e(".dr-month-switcher i",this.element).click(function(){var a=e(".dr-month-switcher span",s.element).html(),r=e(".dr-year-switcher span",s.element).html(),d=t(new Date(a+" 1, "+r)).subtract(1,"month"),i=t(new Date(a+" 1, "+r)).add(1,"month").startOf("day");e(this).hasClass("dr-left")?(e(this).parent().find("span").html(d.format("MMMM")),s.calendarOpen(s.selected,d)):e(this).hasClass("dr-right")&&(e(this).parent().find("span").html(i.format("MMMM")),s.calendarOpen(s.selected,i))}),e(".dr-year-switcher i",this.element).click(function(){var a=e(".dr-month-switcher span",s.element).html(),r=e(".dr-year-switcher span",s.element).html(),d=t(new Date(a+" 1, "+r)).subtract(1,"year"),i=t(new Date(a+" 1, "+r)).add(1,"year").startOf("day");e(this).hasClass("dr-left")?(e(this).parent().find("span").html(d.format("YYYY")),s.calendarOpen(s.selected,d)):e(this).hasClass("dr-right")&&(e(this).parent().find("span").html(i.format("YYYY")),s.calendarOpen(s.selected,i))}),e(".dr-dates-dash",this.element).click(function(){e(".dr-date-start",s.element).trigger("click")}),e(this.element).click(function(t){e("html").one("click",function(){s.presetIsOpen&&s.presetToggle(),s.calIsOpen&&(s.calendarSetDates(),s.calendarClose("force"))}),t.stopPropagation()}),e(this.element).add(".dr-date",this.element).focus(function(t){e("html").one("click",function(){s.calIsOpen&&(s.calendarSetDates(),s.calendarClose("force"))}),t.stopPropagation()})}function s(e){for(var t=new Array(e),a=0;e>a;a++)t[a]=a;return t}return a.prototype.presetToggle=function(){0==this.presetIsOpen?(this.presetIsOpen=!0,this.presetCreate()):this.presetIsOpen&&(this.presetIsOpen=!1),1==this.calIsOpen&&this.calendarClose(),e(".dr-preset-list",this.element).slideToggle(200),e(".dr-input",this.element).toggleClass("active"),e(".dr-presets",this.element).toggleClass("active")},a.prototype.presetCreate=function(){var a=this,s=this.latest_date,r=new Date(e(".dr-date-start",a.element).html()),d=new Date(e(".dr-date-end",a.element).html());this.start_date="Invalid Date"==r?this.start_date:r,this.end_date="Invalid Date"==d?this.end_date:d,e(".dr-list-item",this.element).each(function(){var r,d=e(this).data("months"),i=t(s).endOf("month").startOf("day"),n=i.isSame(s);return n||(i=t(s).subtract(1,"month").endOf("month").startOf("day")),"number"==typeof d?(r=t(s).subtract(n?d-1:d,"month").startOf("month"),12==d&&(r=t(s).subtract(n?12:13,"month").endOf("month").startOf("day"))):"all"==d?(r=t(a.earliest_date),i=t(a.latest_date)):(r=t(a.latest_date).subtract(30,"day"),i=t(a.latest_date)),r.isBefore(a.earliest_date)?e(this).remove():void e(".dr-item-aside",this).html(r.format("ll")+" – "+i.format("ll"))})},a.prototype.calendarSetDates=function(){if(e(".dr-date-start",this.element).html(t(this.start_date).format("MMMM D, YYYY")),e(".dr-date-end",this.element).html(t(this.end_date).format("MMMM D, YYYY")),!this.start_date&&!this.end_date){var a=e(".dr-date",this.element).html(),s=t(this.current_date).format("MMMM D, YYYY");a!=s&&e(".dr-date",this.element).html(s)}},a.prototype.calendarSaveDates=function(){return this.callback()},a.prototype.calendarCheckDates=function(){var a=/(?!<=\d)(st|nd|rd|th)/,s=e(".dr-date-start",this.element).html(),r=e(".dr-date-end",this.element).html(),d=e(this.selected).html(),i=[],n=[],l=[];return s&&(s=s.replace(a,""),i=s.split(" ")),r&&(r=r.replace(a,""),n=r.split(" ")),d&&(d=d.replace(a,""),l=d.split(" ")),2==i.length&&(i.push(t().format("YYYY")),s=i.join(" ")),2==n.length&&(n.push(t().format("YYYY")),r=n.join(" ")),2==l.length&&(l.push(t().format("YYYY")),d=l.join(" ")),s=new Date(s),r=new Date(r),d=new Date(d),t(s).isAfter(r)||t(r).isBefore(s)||t(s).isSame(r)||t(s).isBefore(this.earliest_date)||t(r).isAfter(this.latest_date)?this.calendarSetDates():(this.start_date="Invalid Date"==s?this.start_date:s,this.end_date="Invalid Date"==r?this.end_date:r,void(this.current_date="Invalid Date"==d?this.current_date:d))},a.prototype.calendarOpen=function(a,r){var d,i=this,n=e(".dr-dates",this.element).innerWidth()-8;this.selected=a||this.selected,1==this.presetIsOpen&&this.presetToggle(),1==this.calIsOpen&&this.calendarClose(r?"switcher":void 0),this.calendarCheckDates(),this.calendarCreate(r),this.calendarSetDates();var l=t(r||this.current_date).add(1,"month").startOf("month").startOf("day"),c=t(r||this.current_date).subtract(1,"month").endOf("month"),h=t(r||this.current_date).add(1,"year").startOf("month").startOf("day"),o=t(r||this.current_date).subtract(1,"year").endOf("month");e(".dr-month-switcher span",this.element).html(t(r||this.current_date).format("MMMM")),e(".dr-year-switcher span",this.element).html(t(r||this.current_date).format("YYYY")),e(".dr-switcher i",this.element).removeClass("dr-disabled"),l.isAfter(this.latest_date)&&e(".dr-month-switcher .dr-right",this.element).addClass("dr-disabled"),c.isBefore(this.earliest_date)&&e(".dr-month-switcher .dr-left",this.element).addClass("dr-disabled"),h.isAfter(this.latest_date)&&e(".dr-year-switcher .dr-right",this.element).addClass("dr-disabled"),o.isBefore(this.earliest_date)&&e(".dr-year-switcher .dr-left",this.element).addClass("dr-disabled"),e(".dr-day",this.element).on({mouseenter:function(){function a(a){var d=void 0;s(42).forEach(function(s){var n=r.next().data("date"),l=r.prev().data("date"),c=r.data("date");if(!c)return!1;if(l||(l=c),n||(n=c),"start"==a){if(t(n).isSame(i.end_date))return!1;if(t(c).isAfter(i.end_date)&&(d=d||t(c).add(6,"day").startOf("day"),s>5||(n?t(n).isAfter(i.latest_date):!1)))return e(r).addClass("dr-end"),d=t(c),!1;r=r.next().addClass("dr-maybe")}else if("end"==a){if(t(l).isSame(i.start_date))return!1;if(t(c).isBefore(i.start_date)&&(d=d||t(c).subtract(6,"day"),s>5||(l?t(l).isBefore(i.earliest_date):!1)))return e(r).addClass("dr-start"),d=t(c),!1;r=r.prev().addClass("dr-maybe")}})}var r=e(this),d=t(i.start_date),n=t(i.end_date),l=t(i.current_date);d.isSame(l)&&(r.addClass("dr-hover dr-hover-before"),e(".dr-start",i.element).css({border:"none","padding-left":"0.3125rem"}),a("start")),n.isSame(l)&&(r.addClass("dr-hover dr-hover-after"),e(".dr-end",i.element).css({border:"none","padding-right":"0.3125rem"}),a("end")),i.start_date||i.end_date||r.addClass("dr-maybe"),e(".dr-selected",i.element).css("background-color","transparent")},mouseleave:function(){e(this).hasClass("dr-hover-before dr-end")&&e(this).removeClass("dr-end"),e(this).hasClass("dr-hover-after dr-start")&&e(this).removeClass("dr-start"),e(this).removeClass("dr-hover dr-hover-before dr-hover-after"),e(".dr-start, .dr-end",i.element).css({border:"",padding:""}),e(".dr-maybe:not(.dr-current)",i.element).removeClass("dr-start dr-end"),e(".dr-day",i.element).removeClass("dr-maybe"),e(".dr-selected",i.element).css("background-color","")},mousedown:function(){var a=e(this).data("date"),s=t(a).format("MMMM D, YYYY");d&&e(".dr-date",i.element).not(i.selected).html(d.format("MMMM D, YYYY")),e(i.selected).html(s),i.calendarOpen(i.selected),e(i.selected).hasClass("dr-date-start")?e(".dr-date-end",i.element).trigger("click"):(i.calendarSaveDates(),i.calendarClose("force"))}}),e(".dr-calendar",this.element).css("width",n).slideDown(200),e(".dr-input",this.element).addClass("active"),e(a).addClass("active").focus(),this.calIsOpen=!0},a.prototype.calendarClose=function(t){var a=this;return!this.calIsOpen||this.presetIsOpen||"force"==t?(e(".dr-date",this.element).blur(),e(".dr-calendar",this.element).slideUp(200,function(){e(".dr-day",a.element).remove()})):e(".dr-day",this.element).remove(),"switcher"==t?!1:(e(".dr-input, .dr-date",this.element).removeClass("active"),void(this.calIsOpen=!1))},a.prototype.calendarArray=function(e,a,r,d){var i=this;r=r||e||a;var n=t(d||r).startOf("month"),l=t(d||r).endOf("month"),c={start:{day:+n.format("d"),str:+n.format("D")},end:{day:+l.format("d"),str:+l.format("D")}},h=void 0,o=s(c.start.day).map(function(){return void 0==h&&(h=t(n)),h=h.subtract(1,"day"),{str:+h.format("D"),start:h.isSame(e),end:h.isSame(a),current:h.isSame(r),selected:h.isBetween(e,a),date:h.toISOString(),outside:h.isBefore(i.earliest_date),fade:!0}}).reverse(),m=42-(c.end.str+o.length);h=void 0;var f=s(m).map(function(){return void 0==h&&(h=t(l)),h=h.add(1,"day").startOf("day"),{str:+h.format("D"),start:h.isSame(e),end:h.isSame(a),current:h.isSame(r),selected:h.isBetween(e,a),date:h.toISOString(),outside:h.isAfter(i.latest_date),fade:!0}});h=void 0;var p=s(c.end.str).map(function(){return h=void 0==h?t(n):h.add(1,"day").startOf("day"),{str:+h.format("D"),start:h.isSame(e),end:h.isSame(a),current:h.isSame(r),selected:h.isBetween(e,a),date:h.toISOString(),outside:h.isBefore(i.earliest_date)||h.isAfter(i.latest_date),fade:!1}});return o.concat(p,f)},a.prototype.calendarCreate=function(t){var a=this,s=this.calendarArray(this.start_date,this.end_date,this.current_date,t);s.forEach(function(t,s){var r="dr-day";t.fade&&(r+=" dr-fade"),t.start&&(r+=" dr-start"),t.end&&(r+=" dr-end"),t.current&&(r+=" dr-current"),t.selected&&(r+=" dr-selected"),t.outside&&(r+=" dr-outside"),e(".dr-day-list",a.element).append(''+t.str+"")})},a.prototype.calendarHTML=function(e){return this.element.append("double"==e?'- Last 30 days
- Last month
- Last 3 months
- Last 6 months
- Last year
- All time
':'')},a});
--------------------------------------------------------------------------------
/dev/js/Calendar.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | (function (root, factory) {
4 | if (typeof define === 'function' && define.amd) {
5 | // AMD. Register as an anonymous module.
6 | define(['jquery', 'moment'], factory);
7 | } else if (typeof exports === 'object') {
8 | // Node/CommonJS
9 | module.exports = factory(require('jquery'), require('moment'));
10 | } else {
11 | // Browser globals
12 | root.Calendar = factory(jQuery, moment);
13 | }
14 | }(this, function ($, moment) {
15 | function Calendar(settings) {
16 | var self = this;
17 |
18 | this.calIsOpen = false;
19 | this.presetIsOpen = false;
20 | this.element = settings.element || $('.daterange');
21 | this.type = this.element.hasClass('daterange--single') ? 'single' : 'double';
22 | this.selected = null;
23 | this.earliest_date = settings.earliest_date || new Date('January 1, 1900');
24 | this.latest_date = settings.latest_date || new Date('December 31, 2900');
25 | this.end_date = settings.end_date || (this.type == 'double' ? new Date() : null);
26 | this.start_date = settings.start_date || (this.type == 'double' ? new Date(moment(this.end_date).subtract(1, 'month')) : null);
27 | this.current_date = settings.current_date || (this.type == 'single' ? new Date() : null);
28 | this.callback = settings.callback || this.calendarSetDates;
29 |
30 | this.calendarHTML(this.type);
31 |
32 | $('.dr-presets', this.element).click(function() {
33 | self.presetToggle();
34 | });
35 |
36 | $('.dr-list-item', this.element).click(function() {
37 | var range = $('.dr-item-aside', this).html().split('–');
38 |
39 | self.start_date = new Date(range[0]);
40 | self.end_date = new Date(range[1]);
41 | self.calendarSetDates();
42 | self.presetToggle();
43 | self.calendarSaveDates();
44 | });
45 |
46 | $('.dr-date', this.element).on({
47 | 'click': function() {
48 | self.calendarOpen(this);
49 | },
50 |
51 | 'keyup': function(event) {
52 | if (event.keyCode == 9 && !self.calIsOpen && !self.start_date && !self.end_date)
53 | self.calendarOpen(this);
54 | },
55 |
56 | 'keydown': function(event) {
57 | switch (event.keyCode) {
58 |
59 | case 9: // Tab
60 | if ($(self.selected).hasClass('dr-date-start')) {
61 | event.preventDefault();
62 | $('.dr-date-end', self.element).trigger('click');
63 | } else {
64 | self.calendarCheckDates();
65 | self.calendarSaveDates();
66 | self.calendarClose('force');
67 | }
68 | break;
69 |
70 | case 13: // Enter
71 | event.preventDefault();
72 | self.calendarCheckDates();
73 | self.calendarSetDates();
74 | self.calendarSaveDates();
75 | self.calendarClose('force');
76 | break;
77 |
78 | case 27: // ESC
79 | self.calendarSetDates();
80 | self.calendarClose('force');
81 | break;
82 |
83 | case 38: // Up
84 | event.preventDefault();
85 | var timeframe = 'day';
86 |
87 | if (event.shiftKey)
88 | timeframe = 'week';
89 |
90 | if (event.metaKey)
91 | timeframe = 'month';
92 |
93 | var back = moment(self.current_date).subtract(1, timeframe);
94 |
95 | $(this).html(back.format('MMMM D, YYYY'));
96 | self.current_date = back._d;
97 | break;
98 |
99 | case 40: // Down
100 | event.preventDefault();
101 | var timeframe = 'day';
102 |
103 | if (event.shiftKey)
104 | timeframe = 'week';
105 |
106 | if (event.metaKey)
107 | timeframe = 'month';
108 |
109 | var forward = moment(self.current_date).add(1, timeframe);
110 |
111 | $(this).html(forward.format('MMMM D, YYYY'));
112 | self.current_date = forward._d;
113 | break;
114 | }
115 | }
116 | });
117 |
118 | $('.dr-month-switcher i', this.element).click(function() {
119 | var m = $('.dr-month-switcher span', self.element).html();
120 | var y = $('.dr-year-switcher span', self.element).html();
121 | var back = moment(new Date(m +' 1, '+ y)).subtract(1, 'month');
122 | var forward = moment(new Date(m +' 1, '+ y)).add(1, 'month').startOf('day');
123 |
124 | if ($(this).hasClass('dr-left')) {
125 | $(this).parent().find('span').html(back.format('MMMM'));
126 | self.calendarOpen(self.selected, back);
127 | } else if ($(this).hasClass('dr-right')) {
128 | $(this).parent().find('span').html(forward.format('MMMM'));
129 | self.calendarOpen(self.selected, forward);
130 | }
131 | });
132 |
133 | $('.dr-year-switcher i', this.element).click(function() {
134 | var m = $('.dr-month-switcher span', self.element).html();
135 | var y = $('.dr-year-switcher span', self.element).html();
136 | var back = moment(new Date(m +' 1, '+ y)).subtract(1, 'year');
137 | var forward = moment(new Date(m +' 1, '+ y)).add(1, 'year').startOf('day');
138 |
139 | if ($(this).hasClass('dr-left')) {
140 | $(this).parent().find('span').html(back.format('YYYY'));
141 | self.calendarOpen(self.selected, back);
142 | } else if ($(this).hasClass('dr-right')) {
143 | $(this).parent().find('span').html(forward.format('YYYY'));
144 | self.calendarOpen(self.selected, forward);
145 | }
146 | });
147 |
148 | $('.dr-dates-dash', this.element).click(function() {
149 | $('.dr-date-start', self.element).trigger('click');
150 | });
151 |
152 | $(this.element).click(function(event) {
153 | $('html').one('click',function() {
154 | if (self.presetIsOpen)
155 | self.presetToggle();
156 |
157 | if (self.calIsOpen) {
158 | self.calendarSetDates();
159 | self.calendarClose('force');
160 | }
161 | });
162 |
163 | event.stopPropagation();
164 | });
165 |
166 | $(this.element).add('.dr-date', this.element).focus(function(event) {
167 | $('html').one('click',function() {
168 | if (self.calIsOpen) {
169 | self.calendarSetDates();
170 | self.calendarClose('force');
171 | }
172 | });
173 |
174 | event.stopPropagation();
175 | });
176 | }
177 |
178 |
179 | Calendar.prototype.presetToggle = function() {
180 | if (this.presetIsOpen == false) {
181 | this.presetIsOpen = true;
182 | this.presetCreate();
183 | } else if (this.presetIsOpen) {
184 | this.presetIsOpen = false;
185 | }
186 |
187 | if (this.calIsOpen == true)
188 | this.calendarClose();
189 |
190 | $('.dr-preset-list', this.element).slideToggle(200);
191 | $('.dr-input', this.element).toggleClass('active');
192 | $('.dr-presets', this.element).toggleClass('active');
193 | }
194 |
195 |
196 | Calendar.prototype.presetCreate = function() {
197 | var self = this;
198 | var date = this.latest_date;
199 |
200 | var s = new Date($('.dr-date-start', self.element).html());
201 | var e = new Date($('.dr-date-end', self.element).html());
202 | this.start_date = s == 'Invalid Date' ? this.start_date : s;
203 | this.end_date = e == 'Invalid Date' ? this.end_date : e;
204 |
205 | $('.dr-list-item', this.element).each(function() {
206 | var month_count = $(this).data('months');
207 | var last_day = moment(date).endOf('month').startOf('day');
208 | var is_last_day = last_day.isSame(date);
209 | var first_day;
210 |
211 | if (!is_last_day)
212 | last_day = moment(date).subtract(1, 'month').endOf('month').startOf('day');
213 |
214 | if (typeof month_count == 'number') {
215 | first_day = moment(date).subtract(is_last_day ? month_count - 1 : month_count, 'month').startOf('month');
216 |
217 | if (month_count == 12)
218 | first_day = moment(date).subtract(is_last_day ? 12 : 13, 'month').endOf('month').startOf('day');
219 | } else if (month_count == 'all') {
220 | first_day = moment(self.earliest_date);
221 | last_day = moment(self.latest_date);
222 | } else {
223 | first_day = moment(self.latest_date).subtract(30, 'day');
224 | last_day = moment(self.latest_date);
225 | }
226 |
227 | if (first_day.isBefore(self.earliest_date))
228 | return $(this).remove()
229 |
230 | $('.dr-item-aside', this).html(first_day.format('ll') +' – '+ last_day.format('ll'));
231 | });
232 | }
233 |
234 |
235 | Calendar.prototype.calendarSetDates = function() {
236 | $('.dr-date-start', this.element).html(moment(this.start_date).format('MMMM D, YYYY'));
237 | $('.dr-date-end', this.element).html(moment(this.end_date).format('MMMM D, YYYY'));
238 |
239 | if (!this.start_date && !this.end_date) {
240 | var old_date = $('.dr-date', this.element).html();
241 | var new_date = moment(this.current_date).format('MMMM D, YYYY');
242 |
243 | if (old_date != new_date)
244 | $('.dr-date', this.element).html(new_date);
245 | }
246 | }
247 |
248 |
249 | Calendar.prototype.calendarSaveDates = function() {
250 | return this.callback();
251 | }
252 |
253 |
254 | Calendar.prototype.calendarCheckDates = function() {
255 | var regex = /(?!<=\d)(st|nd|rd|th)/;
256 | var s = $('.dr-date-start', this.element).html();
257 | var e = $('.dr-date-end', this.element).html();
258 | var c = $(this.selected).html();
259 | var s_array = [];
260 | var e_array = [];
261 | var c_array = [];
262 |
263 | if (s) {
264 | s = s.replace(regex, '');
265 | s_array = s.split(' ');
266 | }
267 |
268 | if (e) {
269 | e = e.replace(regex, '');
270 | e_array = e.split(' ');
271 | }
272 |
273 | if (c) {
274 | c = c.replace(regex, '');
275 | c_array = c.split(' ');
276 | }
277 |
278 | if (s_array.length == 2) {
279 | s_array.push(moment().format('YYYY'))
280 | s = s_array.join(' ');
281 | }
282 |
283 | if (e_array.length == 2) {
284 | e_array.push(moment().format('YYYY'))
285 | e = e_array.join(' ');
286 | }
287 |
288 | if (c_array.length == 2) {
289 | c_array.push(moment().format('YYYY'))
290 | c = c_array.join(' ');
291 | }
292 |
293 | s = new Date(s);
294 | e = new Date(e);
295 | c = new Date(c);
296 |
297 | if (moment(s).isAfter(e) ||
298 | moment(e).isBefore(s) ||
299 | moment(s).isSame(e) ||
300 | moment(s).isBefore(this.earliest_date) ||
301 | moment(e).isAfter(this.latest_date)) {
302 | return this.calendarSetDates();
303 | }
304 |
305 | this.start_date = s == 'Invalid Date' ? this.start_date : s;
306 | this.end_date = e == 'Invalid Date' ? this.end_date : e;
307 | this.current_date = c == 'Invalid Date' ? this.current_date : c;
308 | }
309 |
310 |
311 | Calendar.prototype.calendarOpen = function(selected, switcher) {
312 | var self = this;
313 | var other;
314 | var cal_width = $('.dr-dates', this.element).innerWidth() - 8;
315 |
316 | this.selected = selected || this.selected;
317 |
318 | if (this.presetIsOpen == true)
319 | this.presetToggle();
320 |
321 | if (this.calIsOpen == true)
322 | this.calendarClose(switcher ? 'switcher' : undefined);
323 |
324 | this.calendarCheckDates();
325 | this.calendarCreate(switcher);
326 | this.calendarSetDates();
327 |
328 | var next_month = moment(switcher || this.current_date).add(1, 'month').startOf('month').startOf('day');
329 | var past_month = moment(switcher || this.current_date).subtract(1, 'month').endOf('month');
330 | var next_year = moment(switcher || this.current_date).add(1, 'year').startOf('month').startOf('day');
331 | var past_year = moment(switcher || this.current_date).subtract(1, 'year').endOf('month');
332 |
333 | $('.dr-month-switcher span', this.element).html(moment(switcher || this.current_date).format('MMMM'));
334 | $('.dr-year-switcher span', this.element).html(moment(switcher || this.current_date).format('YYYY'));
335 |
336 | $('.dr-switcher i', this.element).removeClass('dr-disabled');
337 |
338 | if (next_month.isAfter(this.latest_date))
339 | $('.dr-month-switcher .dr-right', this.element).addClass('dr-disabled');
340 |
341 | if (past_month.isBefore(this.earliest_date))
342 | $('.dr-month-switcher .dr-left', this.element).addClass('dr-disabled');
343 |
344 | if (next_year.isAfter(this.latest_date))
345 | $('.dr-year-switcher .dr-right', this.element).addClass('dr-disabled');
346 |
347 | if (past_year.isBefore(this.earliest_date))
348 | $('.dr-year-switcher .dr-left', this.element).addClass('dr-disabled');
349 |
350 | $('.dr-day', this.element).on({
351 | mouseenter: function() {
352 | var selected = $(this);
353 | var start_date = moment(self.start_date);
354 | var end_date = moment(self.end_date);
355 | var current_date = moment(self.current_date);
356 |
357 | if (start_date.isSame(current_date)) {
358 | selected.addClass('dr-hover dr-hover-before');
359 | $('.dr-start', self.element).css({'border': 'none', 'padding-left': '0.3125rem'});
360 | setMaybeRange('start');
361 | }
362 |
363 | if (end_date.isSame(current_date)) {
364 | selected.addClass('dr-hover dr-hover-after');
365 | $('.dr-end', self.element).css({'border': 'none', 'padding-right': '0.3125rem'});
366 | setMaybeRange('end');
367 | }
368 |
369 | if (!self.start_date && !self.end_date)
370 | selected.addClass('dr-maybe');
371 |
372 | $('.dr-selected', self.element).css('background-color', 'transparent');
373 |
374 | function setMaybeRange(type) {
375 | var other = undefined;
376 |
377 | range(6 * 7).forEach(function(i) {
378 | var next = selected.next().data('date');
379 | var prev = selected.prev().data('date');
380 | var curr = selected.data('date');
381 |
382 | if (!curr)
383 | return false;
384 |
385 | if (!prev)
386 | prev = curr;
387 |
388 | if (!next)
389 | next = curr;
390 |
391 | if (type == 'start') {
392 | if (moment(next).isSame(self.end_date))
393 | return false;
394 |
395 | if (moment(curr).isAfter(self.end_date)) {
396 | other = other || moment(curr).add(6, 'day').startOf('day');
397 |
398 | if (i > 5 || (next ? moment(next).isAfter(self.latest_date) : false)) {
399 | $(selected).addClass('dr-end');
400 | other = moment(curr);
401 | return false;
402 | }
403 | }
404 |
405 | selected = selected.next().addClass('dr-maybe');
406 | } else if (type == 'end') {
407 | if (moment(prev).isSame(self.start_date))
408 | return false;
409 |
410 | if (moment(curr).isBefore(self.start_date)) {
411 | other = other || moment(curr).subtract(6, 'day');
412 |
413 | if (i > 5 || (prev ? moment(prev).isBefore(self.earliest_date) : false)) {
414 | $(selected).addClass('dr-start');
415 | other = moment(curr);
416 | return false;
417 | }
418 | }
419 |
420 | selected = selected.prev().addClass('dr-maybe');
421 | }
422 | });
423 | }
424 | },
425 | mouseleave: function() {
426 | if ($(this).hasClass('dr-hover-before dr-end'))
427 | $(this).removeClass('dr-end');
428 |
429 | if ($(this).hasClass('dr-hover-after dr-start'))
430 | $(this).removeClass('dr-start');
431 |
432 | $(this).removeClass('dr-hover dr-hover-before dr-hover-after');
433 | $('.dr-start, .dr-end', self.element).css({'border': '', 'padding': ''});
434 | $('.dr-maybe:not(.dr-current)', self.element).removeClass('dr-start dr-end');
435 | $('.dr-day', self.element).removeClass('dr-maybe');
436 | $('.dr-selected', self.element).css('background-color', '');
437 | },
438 | mousedown: function() {
439 | var date = $(this).data('date');
440 | var string = moment(date).format('MMMM D, YYYY');
441 |
442 | if (other) {
443 | $('.dr-date', self.element)
444 | .not(self.selected)
445 | .html(other.format('MMMM D, YYYY'));
446 | }
447 |
448 | $(self.selected).html(string);
449 | self.calendarOpen(self.selected);
450 |
451 | if ($(self.selected).hasClass('dr-date-start')) {
452 | $('.dr-date-end', self.element).trigger('click');
453 | } else {
454 | self.calendarSaveDates();
455 | self.calendarClose('force');
456 | }
457 | }
458 | });
459 |
460 | $('.dr-calendar', this.element)
461 | .css('width', cal_width)
462 | .slideDown(200);
463 | $('.dr-input', this.element).addClass('active');
464 | $(selected).addClass('active').focus();
465 |
466 | this.calIsOpen = true;
467 | }
468 |
469 |
470 | Calendar.prototype.calendarClose = function(type) {
471 | var self = this;
472 |
473 | if (!this.calIsOpen || this.presetIsOpen || type == 'force') {
474 | $('.dr-date', this.element).blur();
475 | $('.dr-calendar', this.element).slideUp(200, function() {
476 | $('.dr-day', self.element).remove();
477 | });
478 | } else {
479 | $('.dr-day', this.element).remove();
480 | }
481 |
482 | if (type == 'switcher') {
483 | return false;
484 | }
485 |
486 | $('.dr-input, .dr-date', this.element).removeClass('active');
487 |
488 | this.calIsOpen = false;
489 | }
490 |
491 |
492 | Calendar.prototype.calendarArray = function(start, end, current, switcher) {
493 | var self = this;
494 | current = current || start || end;
495 |
496 | var first_day = moment(switcher || current).startOf('month');
497 | var last_day = moment(switcher || current).endOf('month');
498 |
499 | var current_month = {
500 | start: {
501 | day: +first_day.format('d'),
502 | str: +first_day.format('D')
503 | },
504 | end: {
505 | day: +last_day.format('d'),
506 | str: +last_day.format('D')
507 | }
508 | }
509 |
510 |
511 | // Beginning faded dates
512 | var d = undefined;
513 |
514 | var start_hidden = range(current_month.start.day).map(function() {
515 | if (d == undefined) {
516 | d = moment(first_day);
517 | } d = d.subtract(1, 'day');
518 |
519 | return {
520 | str: +d.format('D'),
521 | start: d.isSame(start),
522 | end: d.isSame(end),
523 | current: d.isSame(current),
524 | selected: d.isBetween(start, end),
525 | date: d.toISOString(),
526 | outside: d.isBefore(self.earliest_date),
527 | fade: true
528 | }
529 | }).reverse();
530 |
531 |
532 | // Leftover faded dates
533 | var leftover = (6 * 7) - (current_month.end.str + start_hidden.length);
534 | d = undefined;
535 |
536 | var end_hidden = range(leftover).map(function() {
537 | if (d == undefined) {
538 | d = moment(last_day);
539 | } d = d.add(1, 'day').startOf('day');
540 |
541 | return {
542 | str: +d.format('D'),
543 | start: d.isSame(start),
544 | end: d.isSame(end),
545 | current: d.isSame(current),
546 | selected: d.isBetween(start, end),
547 | date: d.toISOString(),
548 | outside: d.isAfter(self.latest_date),
549 | fade: true
550 | }
551 | });
552 |
553 |
554 | // Actual visible dates
555 | d = undefined;
556 |
557 | var visible = range(current_month.end.str).map(function() {
558 | if (d == undefined) {
559 | d = moment(first_day);
560 | } else {
561 | d = d.add(1, 'day').startOf('day');
562 | }
563 |
564 | return {
565 | str: +d.format('D'),
566 | start: d.isSame(start),
567 | end: d.isSame(end),
568 | current: d.isSame(current),
569 | selected: d.isBetween(start, end),
570 | date: d.toISOString(),
571 | outside: d.isBefore(self.earliest_date) || d.isAfter(self.latest_date),
572 | fade: false
573 | }
574 | });
575 |
576 |
577 | return start_hidden.concat(visible, end_hidden);
578 | }
579 |
580 |
581 | Calendar.prototype.calendarCreate = function(switcher) {
582 | var self = this;
583 | var array = this.calendarArray(this.start_date, this.end_date, this.current_date, switcher);
584 |
585 | array.forEach(function(d, i) {
586 | var classString = "dr-day";
587 |
588 | if (d.fade)
589 | classString += " dr-fade";
590 |
591 | if (d.start)
592 | classString += " dr-start";
593 |
594 | if (d.end)
595 | classString += " dr-end";
596 |
597 | if (d.current)
598 | classString += " dr-current";
599 |
600 | if (d.selected)
601 | classString += " dr-selected";
602 |
603 | if (d.outside)
604 | classString += " dr-outside";
605 |
606 | $('.dr-day-list', self.element).append(''+ d.str +'');
607 | });
608 | }
609 |
610 |
611 | Calendar.prototype.calendarHTML = function(type) {
612 | if (type == "double")
613 | return this.element.append('' +
626 |
627 | '' +
628 | '
' +
629 | '
' +
630 | '
' +
631 | '' +
632 | 'April' +
633 | '' +
634 | '
' +
635 | '
' +
636 | '' +
637 | '2015' +
638 | '' +
639 | '
' +
640 | '
' +
641 | '
' +
642 | '- S
' +
643 | '- M
' +
644 | '- T
' +
645 | '- W
' +
646 | '- T
' +
647 | '- F
' +
648 | '- S
' +
649 | '
' +
650 | '
' +
651 | '
' +
652 |
653 | '
' +
654 | '- Last 30 days
' +
655 | '- Last month
' +
656 | '- Last 3 months
' +
657 | '- Last 6 months
' +
658 | '- Last year
' +
659 | '- All time
' +
660 | '
' +
661 | '
');
662 |
663 | return this.element.append('' +
668 |
669 | '' +
670 | '
' +
671 | '
' +
672 | '
' +
673 | '' +
674 | '' +
675 | '' +
676 | '
' +
677 | '
' +
678 | '' +
679 | '' +
680 | '' +
681 | '
' +
682 | '
' +
683 | '
' +
684 | '- S
' +
685 | '- M
' +
686 | '- T
' +
687 | '- W
' +
688 | '- T
' +
689 | '- F
' +
690 | '- S
' +
691 | '
' +
692 | '
' +
693 | '
' +
694 | '
');
695 | }
696 |
697 | // Returns a contiguous array of integers with the specified length
698 | function range(length) {
699 | var range = new Array(length);
700 |
701 | for (var idx = 0; idx < length; idx++) {
702 | range[idx] = idx;
703 | }
704 |
705 | return range;
706 | }
707 |
708 | return Calendar;
709 | }));
--------------------------------------------------------------------------------
/public/js/vendor/moment.js:
--------------------------------------------------------------------------------
1 | !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.moment=e()}(this,function(){"use strict";function t(){return Cn.apply(null,arguments)}function e(t){Cn=t}function n(t){return"[object Array]"===Object.prototype.toString.call(t)}function i(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function r(t,e){var n,i=[];for(n=0;n0)for(n in Gn)i=Gn[n],r=e[i],"undefined"!=typeof r&&(t[i]=r);return t}function h(e){f(this,e),this._d=new Date(+e._d),Fn===!1&&(Fn=!0,t.updateOffset(this),Fn=!1)}function m(t){return t instanceof h||null!=t&&null!=t._isAMomentObject}function _(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=e>=0?Math.floor(e):Math.ceil(e)),n}function y(t,e,n){var i,r=Math.min(t.length,e.length),s=Math.abs(t.length-e.length),a=0;for(i=0;r>i;i++)(n&&t[i]!==e[i]||!n&&_(t[i])!==_(e[i]))&&a++;return a+s}function p(){}function g(t){return t?t.toLowerCase().replace("_","-"):t}function D(t){for(var e,n,i,r,s=0;s0;){if(i=v(r.slice(0,e).join("-")))return i;if(n&&n.length>=e&&y(r,n,!0)>=e-1)break;e--}s++}return null}function v(t){var e=null;if(!Pn[t]&&"undefined"!=typeof module&&module&&module.exports)try{e=Wn._abbr,require("./locale/"+t),M(e)}catch(n){}return Pn[t]}function M(t,e){var n;return t&&(n="undefined"==typeof e?w(t):Y(t,e),n&&(Wn=n)),Wn._abbr}function Y(t,e){return null!==e?(e.abbr=t,Pn[t]||(Pn[t]=new p),Pn[t].set(e),M(t),Pn[t]):(delete Pn[t],null)}function w(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Wn;if(!n(t)){if(e=v(t))return e;t=[t]}return D(t)}function k(t,e){var n=t.toLowerCase();Ln[n]=Ln[n+"s"]=Ln[e]=t}function T(t){return"string"==typeof t?Ln[t]||Ln[t.toLowerCase()]:void 0}function S(t){var e,n,i={};for(n in t)s(t,n)&&(e=T(n),e&&(i[e]=t[n]));return i}function b(e,n){return function(i){return null!=i?(U(this,e,i),t.updateOffset(this,n),this):O(this,e)}}function O(t,e){return t._d["get"+(t._isUTC?"UTC":"")+e]()}function U(t,e,n){return t._d["set"+(t._isUTC?"UTC":"")+e](n)}function C(t,e){var n;if("object"==typeof t)for(n in t)this.set(n,t[n]);else if(t=T(t),"function"==typeof this[t])return this[t](e);return this}function W(t,e,n){for(var i=""+Math.abs(t),r=t>=0;i.lengthe;e++)i[e]=An[i[e]]?An[i[e]]:F(i[e]);return function(r){var s="";for(e=0;n>e;e++)s+=i[e]instanceof Function?i[e].call(r,t):i[e];return s}}function L(t,e){return t.isValid()?(e=x(e,t.localeData()),In[e]||(In[e]=P(e)),In[e](t)):t.localeData().invalidDate()}function x(t,e){function n(t){return e.longDateFormat(t)||t}var i=5;for(Hn.lastIndex=0;i>=0&&Hn.test(t);)t=t.replace(Hn,n),Hn.lastIndex=0,i-=1;return t}function H(t,e,n){ti[t]="function"==typeof e?e:function(t){return t&&n?n:e}}function I(t,e){return s(ti,t)?ti[t](e._strict,e._locale):new RegExp(A(t))}function A(t){return t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,i,r){return e||n||i||r}).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function z(t,e){var n,i=e;for("string"==typeof t&&(t=[t]),"number"==typeof e&&(i=function(t,n){n[e]=_(t)}),n=0;ni;i++){if(r=o([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(s="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[i]=new RegExp(s.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[i].test(t))return i;if(n&&"MMM"===e&&this._shortMonthsParse[i].test(t))return i;if(!n&&this._monthsParse[i].test(t))return i}}function J(t,e){var n;return"string"==typeof e&&(e=t.localeData().monthsParse(e),"number"!=typeof e)?t:(n=Math.min(t.date(),j(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t)}function $(e){return null!=e?(J(this,e),t.updateOffset(this,!0),this):O(this,"Month")}function R(){return j(this.year(),this.month())}function B(t){var e,n=t._a;return n&&-2===d(t).overflow&&(e=n[ii]<0||n[ii]>11?ii:n[ri]<1||n[ri]>j(n[ni],n[ii])?ri:n[si]<0||n[si]>24||24===n[si]&&(0!==n[ai]||0!==n[oi]||0!==n[ui])?si:n[ai]<0||n[ai]>59?ai:n[oi]<0||n[oi]>59?oi:n[ui]<0||n[ui]>999?ui:-1,d(t)._overflowDayOfYear&&(ni>e||e>ri)&&(e=ri),d(t).overflow=e),t}function Q(e){t.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function X(t,e){var n=!0,i=t+"\n"+(new Error).stack;return a(function(){return n&&(Q(i),n=!1),e.apply(this,arguments)},e)}function K(t,e){ci[t]||(Q(e),ci[t]=!0)}function tt(t){var e,n,i=t._i,r=fi.exec(i);if(r){for(d(t).iso=!0,e=0,n=hi.length;n>e;e++)if(hi[e][1].exec(i)){t._f=hi[e][0]+(r[6]||" ");break}for(e=0,n=mi.length;n>e;e++)if(mi[e][1].exec(i)){t._f+=mi[e][0];break}i.match(Qn)&&(t._f+="Z"),Dt(t)}else t._isValid=!1}function et(e){var n=_i.exec(e._i);return null!==n?void(e._d=new Date(+n[1])):(tt(e),void(e._isValid===!1&&(delete e._isValid,t.createFromInputFallback(e))))}function nt(t,e,n,i,r,s,a){var o=new Date(t,e,n,i,r,s,a);return 1970>t&&o.setFullYear(t),o}function it(t){var e=new Date(Date.UTC.apply(null,arguments));return 1970>t&&e.setUTCFullYear(t),e}function rt(t){return st(t)?366:365}function st(t){return t%4===0&&t%100!==0||t%400===0}function at(){return st(this.year())}function ot(t,e,n){var i,r=n-e,s=n-t.day();return s>r&&(s-=7),r-7>s&&(s+=7),i=St(t).add(s,"d"),{week:Math.ceil(i.dayOfYear()/7),year:i.year()}}function ut(t){return ot(t,this._week.dow,this._week.doy).week}function dt(){return this._week.dow}function lt(){return this._week.doy}function ct(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function ft(t){var e=ot(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function ht(t,e,n,i,r){var s,a,o=it(t,0,1).getUTCDay();return o=0===o?7:o,n=null!=n?n:r,s=r-o+(o>i?7:0)-(r>o?7:0),a=7*(e-1)+(n-r)+s+1,{year:a>0?t:t-1,dayOfYear:a>0?a:rt(t-1)+a}}function mt(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function _t(t,e,n){return null!=t?t:null!=e?e:n}function yt(t){var e=new Date;return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function pt(t){var e,n,i,r,s=[];if(!t._d){for(i=yt(t),t._w&&null==t._a[ri]&&null==t._a[ii]&>(t),t._dayOfYear&&(r=_t(t._a[ni],i[ni]),t._dayOfYear>rt(r)&&(d(t)._overflowDayOfYear=!0),n=it(r,0,t._dayOfYear),t._a[ii]=n.getUTCMonth(),t._a[ri]=n.getUTCDate()),e=0;3>e&&null==t._a[e];++e)t._a[e]=s[e]=i[e];for(;7>e;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[si]&&0===t._a[ai]&&0===t._a[oi]&&0===t._a[ui]&&(t._nextDay=!0,t._a[si]=0),t._d=(t._useUTC?it:nt).apply(null,s),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[si]=24)}}function gt(t){var e,n,i,r,s,a,o;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(s=1,a=4,n=_t(e.GG,t._a[ni],ot(St(),1,4).year),i=_t(e.W,1),r=_t(e.E,1)):(s=t._locale._week.dow,a=t._locale._week.doy,n=_t(e.gg,t._a[ni],ot(St(),s,a).year),i=_t(e.w,1),null!=e.d?(r=e.d,s>r&&++i):r=null!=e.e?e.e+s:s),o=ht(n,i,r,a,s),t._a[ni]=o.year,t._dayOfYear=o.dayOfYear}function Dt(e){if(e._f===t.ISO_8601)return void tt(e);e._a=[],d(e).empty=!0;var n,i,r,s,a,o=""+e._i,u=o.length,l=0;for(r=x(e._f,e._locale).match(xn)||[],n=0;n0&&d(e).unusedInput.push(a),o=o.slice(o.indexOf(i)+i.length),l+=i.length),An[s]?(i?d(e).empty=!1:d(e).unusedTokens.push(s),E(s,i,e)):e._strict&&!i&&d(e).unusedTokens.push(s);d(e).charsLeftOver=u-l,o.length>0&&d(e).unusedInput.push(o),d(e).bigHour===!0&&e._a[si]<=12&&e._a[si]>0&&(d(e).bigHour=void 0),e._a[si]=vt(e._locale,e._a[si],e._meridiem),pt(e),B(e)}function vt(t,e,n){var i;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?(i=t.isPM(n),i&&12>e&&(e+=12),i||12!==e||(e=0),e):e}function Mt(t){var e,n,i,r,s;if(0===t._f.length)return d(t).invalidFormat=!0,void(t._d=new Date(0/0));for(r=0;rs)&&(i=s,n=e));a(t,n||e)}function Yt(t){if(!t._d){var e=S(t._i);t._a=[e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],pt(t)}}function wt(t){var e,r=t._i,s=t._f;return t._locale=t._locale||w(t._l),null===r||void 0===s&&""===r?c({nullInput:!0}):("string"==typeof r&&(t._i=r=t._locale.preparse(r)),m(r)?new h(B(r)):(n(s)?Mt(t):s?Dt(t):i(r)?t._d=r:kt(t),e=new h(B(t)),e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e))}function kt(e){var s=e._i;void 0===s?e._d=new Date:i(s)?e._d=new Date(+s):"string"==typeof s?et(e):n(s)?(e._a=r(s.slice(0),function(t){return parseInt(t,10)}),pt(e)):"object"==typeof s?Yt(e):"number"==typeof s?e._d=new Date(s):t.createFromInputFallback(e)}function Tt(t,e,n,i,r){var s={};return"boolean"==typeof n&&(i=n,n=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=r,s._l=n,s._i=t,s._f=e,s._strict=i,wt(s)}function St(t,e,n,i){return Tt(t,e,n,i,!1)}function bt(t,e){var i,r;if(1===e.length&&n(e[0])&&(e=e[0]),!e.length)return St();for(i=e[0],r=1;rt&&(t=-t,n="-"),n+W(~~(t/60),2)+e+W(~~t%60,2)})}function Ft(t){var e=(t||"").match(Qn)||[],n=e[e.length-1]||[],i=(n+"").match(vi)||["-",0,0],r=+(60*i[1])+_(i[2]);return"+"===i[0]?r:-r}function Pt(e,n){var r,s;return n._isUTC?(r=n.clone(),s=(m(e)||i(e)?+e:+St(e))-+r,r._d.setTime(+r._d+s),t.updateOffset(r,!1),r):St(e).local()}function Lt(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function xt(e,n){var i,r=this._offset||0;return null!=e?("string"==typeof e&&(e=Ft(e)),Math.abs(e)<16&&(e=60*e),!this._isUTC&&n&&(i=Lt(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),r!==e&&(!n||this._changeInProgress?Xt(this,Jt(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?r:Lt(this)}function Ht(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function It(t){return this.utcOffset(0,t)}function At(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Lt(this),"m")),this}function zt(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Ft(this._i)),this}function Zt(t){return t=t?St(t).utcOffset():0,(this.utcOffset()-t)%60===0}function Et(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function jt(){if(this._a){var t=this._isUTC?o(this._a):St(this._a);return this.isValid()&&y(this._a,t.toArray())>0}return!1}function Nt(){return!this._isUTC}function Vt(){return this._isUTC}function qt(){return this._isUTC&&0===this._offset}function Jt(t,e){var n,i,r,a=t,o=null;return Wt(t)?a={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(a={},e?a[e]=t:a.milliseconds=t):(o=Mi.exec(t))?(n="-"===o[1]?-1:1,a={y:0,d:_(o[ri])*n,h:_(o[si])*n,m:_(o[ai])*n,s:_(o[oi])*n,ms:_(o[ui])*n}):(o=Yi.exec(t))?(n="-"===o[1]?-1:1,a={y:$t(o[2],n),M:$t(o[3],n),d:$t(o[4],n),h:$t(o[5],n),m:$t(o[6],n),s:$t(o[7],n),w:$t(o[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(r=Bt(St(a.from),St(a.to)),a={},a.ms=r.milliseconds,a.M=r.months),i=new Ct(a),Wt(t)&&s(t,"_locale")&&(i._locale=t._locale),i}function $t(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Rt(t,e){var n={milliseconds:0,months:0};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function Bt(t,e){var n;return e=Pt(e,t),t.isBefore(e)?n=Rt(t,e):(n=Rt(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n}function Qt(t,e){return function(n,i){var r,s;return null===i||isNaN(+i)||(K(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),s=n,n=i,i=s),n="string"==typeof n?+n:n,r=Jt(n,i),Xt(this,r,t),this}}function Xt(e,n,i,r){var s=n._milliseconds,a=n._days,o=n._months;r=null==r?!0:r,s&&e._d.setTime(+e._d+s*i),a&&U(e,"Date",O(e,"Date")+a*i),o&&J(e,O(e,"Month")+o*i),r&&t.updateOffset(e,a||o)}function Kt(t){var e=t||St(),n=Pt(e,this).startOf("day"),i=this.diff(n,"days",!0),r=-6>i?"sameElse":-1>i?"lastWeek":0>i?"lastDay":1>i?"sameDay":2>i?"nextDay":7>i?"nextWeek":"sameElse";return this.format(this.localeData().calendar(r,this,St(e)))}function te(){return new h(this)}function ee(t,e){var n;return e=T("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=m(t)?t:St(t),+this>+t):(n=m(t)?+t:+St(t),n<+this.clone().startOf(e))}function ne(t,e){var n;return e=T("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=m(t)?t:St(t),+t>+this):(n=m(t)?+t:+St(t),+this.clone().endOf(e)t?Math.ceil(t):Math.floor(t)}function ae(t,e,n){var i,r,s=Pt(t,this),a=6e4*(s.utcOffset()-this.utcOffset());return e=T(e),"year"===e||"month"===e||"quarter"===e?(r=oe(this,s),"quarter"===e?r/=3:"year"===e&&(r/=12)):(i=this-s,r="second"===e?i/1e3:"minute"===e?i/6e4:"hour"===e?i/36e5:"day"===e?(i-a)/864e5:"week"===e?(i-a)/6048e5:i),n?r:se(r)}function oe(t,e){var n,i,r=12*(e.year()-t.year())+(e.month()-t.month()),s=t.clone().add(r,"months");return 0>e-s?(n=t.clone().add(r-1,"months"),i=(e-s)/(s-n)):(n=t.clone().add(r+1,"months"),i=(e-s)/(n-s)),-(r+i)}function ue(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function de(){var t=this.clone().utc();return 0e;e++)if(this._weekdaysParse[e]||(n=St([2e3,1]).day(e),i="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[e]=new RegExp(i.replace(".",""),"i")),this._weekdaysParse[e].test(t))return e}function Ie(t){var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=Fe(t,this.localeData()),this.add(t-e,"d")):e}function Ae(t){var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function ze(t){return null==t?this.day()||7:this.day(this.day()%7?t:t-7)}function Ze(t,e){G(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function Ee(t,e){return e._meridiemParse}function je(t){return"p"===(t+"").toLowerCase().charAt(0)}function Ne(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}function Ve(t){G(0,[t,3],0,"millisecond")}function qe(){return this._isUTC?"UTC":""}function Je(){return this._isUTC?"Coordinated Universal Time":""}function $e(t){return St(1e3*t)}function Re(){return St.apply(null,arguments).parseZone()}function Be(t,e,n){var i=this._calendar[t];return"function"==typeof i?i.call(e,n):i}function Qe(t){var e=this._longDateFormat[t];return!e&&this._longDateFormat[t.toUpperCase()]&&(e=this._longDateFormat[t.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t]=e),e}function Xe(){return this._invalidDate}function Ke(t){return this._ordinal.replace("%d",t)}function tn(t){return t}function en(t,e,n,i){var r=this._relativeTime[n];return"function"==typeof r?r(t,e,n,i):r.replace(/%d/i,t)}function nn(t,e){var n=this._relativeTime[t>0?"future":"past"];return"function"==typeof n?n(e):n.replace(/%s/i,e)}function rn(t){var e,n;for(n in t)e=t[n],"function"==typeof e?this[n]=e:this["_"+n]=e;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function sn(t,e,n,i){var r=w(),s=o().set(i,e);return r[n](s,t)}function an(t,e,n,i,r){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return sn(t,e,n,r);var s,a=[];for(s=0;i>s;s++)a[s]=sn(t,s,n,r);return a}function on(t,e){return an(t,e,"months",12,"month")}function un(t,e){return an(t,e,"monthsShort",12,"month")}function dn(t,e){return an(t,e,"weekdays",7,"day")}function ln(t,e){return an(t,e,"weekdaysShort",7,"day")}function cn(t,e){return an(t,e,"weekdaysMin",7,"day")}function fn(){var t=this._data;return this._milliseconds=Ni(this._milliseconds),this._days=Ni(this._days),this._months=Ni(this._months),t.milliseconds=Ni(t.milliseconds),t.seconds=Ni(t.seconds),t.minutes=Ni(t.minutes),t.hours=Ni(t.hours),t.months=Ni(t.months),t.years=Ni(t.years),this}function hn(t,e,n,i){var r=Jt(e,n);return t._milliseconds+=i*r._milliseconds,t._days+=i*r._days,t._months+=i*r._months,t._bubble()}function mn(t,e){return hn(this,t,e,1)}function _n(t,e){return hn(this,t,e,-1)}function yn(){var t,e,n,i=this._milliseconds,r=this._days,s=this._months,a=this._data,o=0;return a.milliseconds=i%1e3,t=se(i/1e3),a.seconds=t%60,e=se(t/60),a.minutes=e%60,n=se(e/60),a.hours=n%24,r+=se(n/24),o=se(pn(r)),r-=se(gn(o)),s+=se(r/30),r%=30,o+=se(s/12),s%=12,a.days=r,a.months=s,a.years=o,this}function pn(t){return 400*t/146097}function gn(t){return 146097*t/400}function Dn(t){var e,n,i=this._milliseconds;if(t=T(t),"month"===t||"year"===t)return e=this._days+i/864e5,n=this._months+12*pn(e),"month"===t?n:n/12;switch(e=this._days+Math.round(gn(this._months/12)),t){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return 24*e+i/36e5;case"minute":return 1440*e+i/6e4;case"second":return 86400*e+i/1e3;case"millisecond":return Math.floor(864e5*e)+i;default:throw new Error("Unknown unit "+t)}}function vn(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*_(this._months/12)}function Mn(t){return function(){return this.as(t)}}function Yn(t){return t=T(t),this[t+"s"]()}function wn(t){return function(){return this._data[t]}}function kn(){return se(this.days()/7)}function Tn(t,e,n,i,r){return r.relativeTime(e||1,!!n,t,i)}function Sn(t,e,n){var i=Jt(t).abs(),r=ar(i.as("s")),s=ar(i.as("m")),a=ar(i.as("h")),o=ar(i.as("d")),u=ar(i.as("M")),d=ar(i.as("y")),l=r0,l[4]=n,Tn.apply(null,l)}function bn(t,e){return void 0===or[t]?!1:void 0===e?or[t]:(or[t]=e,!0)}function On(t){var e=this.localeData(),n=Sn(this,!t,e);return t&&(n=e.pastFuture(+this,n)),e.postformat(n)}function Un(){var t=ur(this.years()),e=ur(this.months()),n=ur(this.days()),i=ur(this.hours()),r=ur(this.minutes()),s=ur(this.seconds()+this.milliseconds()/1e3),a=this.asSeconds();return a?(0>a?"-":"")+"P"+(t?t+"Y":"")+(e?e+"M":"")+(n?n+"D":"")+(i||r||s?"T":"")+(i?i+"H":"")+(r?r+"M":"")+(s?s+"S":""):"P0D"}var Cn,Wn,Gn=t.momentProperties=[],Fn=!1,Pn={},Ln={},xn=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g,Hn=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,In={},An={},zn=/\d/,Zn=/\d\d/,En=/\d{3}/,jn=/\d{4}/,Nn=/[+-]?\d{6}/,Vn=/\d\d?/,qn=/\d{1,3}/,Jn=/\d{1,4}/,$n=/[+-]?\d{1,6}/,Rn=/\d+/,Bn=/[+-]?\d+/,Qn=/Z|[+-]\d\d:?\d\d/gi,Xn=/[+-]?\d+(\.\d{1,3})?/,Kn=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,ti={},ei={},ni=0,ii=1,ri=2,si=3,ai=4,oi=5,ui=6;G("M",["MM",2],"Mo",function(){return this.month()+1}),G("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),G("MMMM",0,0,function(t){return this.localeData().months(this,t)}),k("month","M"),H("M",Vn),H("MM",Vn,Zn),H("MMM",Kn),H("MMMM",Kn),z(["M","MM"],function(t,e){e[ii]=_(t)-1}),z(["MMM","MMMM"],function(t,e,n,i){var r=n._locale.monthsParse(t,i,n._strict);null!=r?e[ii]=r:d(n).invalidMonth=t});var di="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),li="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ci={};t.suppressDeprecationWarnings=!1;var fi=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,hi=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],mi=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],_i=/^\/?Date\((\-?\d+)/i;t.createFromInputFallback=X("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),G(0,["YY",2],0,function(){return this.year()%100}),G(0,["YYYY",4],0,"year"),G(0,["YYYYY",5],0,"year"),G(0,["YYYYYY",6,!0],0,"year"),k("year","y"),H("Y",Bn),H("YY",Vn,Zn),H("YYYY",Jn,jn),H("YYYYY",$n,Nn),H("YYYYYY",$n,Nn),z(["YYYY","YYYYY","YYYYYY"],ni),z("YY",function(e,n){n[ni]=t.parseTwoDigitYear(e)}),t.parseTwoDigitYear=function(t){return _(t)+(_(t)>68?1900:2e3)};var yi=b("FullYear",!1);G("w",["ww",2],"wo","week"),G("W",["WW",2],"Wo","isoWeek"),k("week","w"),k("isoWeek","W"),H("w",Vn),H("ww",Vn,Zn),H("W",Vn),H("WW",Vn,Zn),Z(["w","ww","W","WW"],function(t,e,n,i){e[i.substr(0,1)]=_(t)});var pi={dow:0,doy:6};G("DDD",["DDDD",3],"DDDo","dayOfYear"),k("dayOfYear","DDD"),H("DDD",qn),H("DDDD",En),z(["DDD","DDDD"],function(t,e,n){n._dayOfYear=_(t)}),t.ISO_8601=function(){};var gi=X("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var t=St.apply(null,arguments);return this>t?this:t}),Di=X("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var t=St.apply(null,arguments);return t>this?this:t});Gt("Z",":"),Gt("ZZ",""),H("Z",Qn),H("ZZ",Qn),z(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=Ft(t)});var vi=/([\+\-]|\d\d)/gi;t.updateOffset=function(){};var Mi=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,Yi=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;Jt.fn=Ct.prototype;var wi=Qt(1,"add"),ki=Qt(-1,"subtract");t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var Ti=X("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});G(0,["gg",2],0,function(){return this.weekYear()%100}),G(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Se("gggg","weekYear"),Se("ggggg","weekYear"),Se("GGGG","isoWeekYear"),Se("GGGGG","isoWeekYear"),k("weekYear","gg"),k("isoWeekYear","GG"),H("G",Bn),H("g",Bn),H("GG",Vn,Zn),H("gg",Vn,Zn),H("GGGG",Jn,jn),H("gggg",Jn,jn),H("GGGGG",$n,Nn),H("ggggg",$n,Nn),Z(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,i){e[i.substr(0,2)]=_(t)}),Z(["gg","GG"],function(e,n,i,r){n[r]=t.parseTwoDigitYear(e)}),G("Q",0,0,"quarter"),k("quarter","Q"),H("Q",zn),z("Q",function(t,e){e[ii]=3*(_(t)-1)}),G("D",["DD",2],"Do","date"),k("date","D"),H("D",Vn),H("DD",Vn,Zn),H("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),z(["D","DD"],ri),z("Do",function(t,e){e[ri]=_(t.match(Vn)[0],10)});var Si=b("Date",!0);G("d",0,"do","day"),G("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),G("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),G("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),G("e",0,0,"weekday"),G("E",0,0,"isoWeekday"),k("day","d"),k("weekday","e"),k("isoWeekday","E"),H("d",Vn),H("e",Vn),H("E",Vn),H("dd",Kn),H("ddd",Kn),H("dddd",Kn),Z(["dd","ddd","dddd"],function(t,e,n){var i=n._locale.weekdaysParse(t);null!=i?e.d=i:d(n).invalidWeekday=t}),Z(["d","e","E"],function(t,e,n,i){e[i]=_(t)});var bi="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Oi="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ui="Su_Mo_Tu_We_Th_Fr_Sa".split("_");G("H",["HH",2],0,"hour"),G("h",["hh",2],0,function(){return this.hours()%12||12}),Ze("a",!0),Ze("A",!1),k("hour","h"),H("a",Ee),H("A",Ee),H("H",Vn),H("h",Vn),H("HH",Vn,Zn),H("hh",Vn,Zn),z(["H","HH"],si),z(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),z(["h","hh"],function(t,e,n){e[si]=_(t),d(n).bigHour=!0});var Ci=/[ap]\.?m?\.?/i,Wi=b("Hours",!0);G("m",["mm",2],0,"minute"),k("minute","m"),H("m",Vn),H("mm",Vn,Zn),z(["m","mm"],ai);var Gi=b("Minutes",!1);G("s",["ss",2],0,"second"),k("second","s"),H("s",Vn),H("ss",Vn,Zn),z(["s","ss"],oi);var Fi=b("Seconds",!1);G("S",0,0,function(){return~~(this.millisecond()/100)}),G(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Ve("SSS"),Ve("SSSS"),k("millisecond","ms"),H("S",qn,zn),H("SS",qn,Zn),H("SSS",qn,En),H("SSSS",Rn),z(["S","SS","SSS","SSSS"],function(t,e){e[ui]=_(1e3*("0."+t))});var Pi=b("Milliseconds",!1);G("z",0,0,"zoneAbbr"),G("zz",0,0,"zoneName");var Li=h.prototype;Li.add=wi,Li.calendar=Kt,Li.clone=te,Li.diff=ae,Li.endOf=ge,Li.format=le,Li.from=ce,Li.fromNow=fe,Li.to=he,Li.toNow=me,Li.get=C,Li.invalidAt=Te,Li.isAfter=ee,Li.isBefore=ne,Li.isBetween=ie,Li.isSame=re,Li.isValid=we,Li.lang=Ti,Li.locale=_e,Li.localeData=ye,Li.max=Di,Li.min=gi,Li.parsingFlags=ke,Li.set=C,Li.startOf=pe,Li.subtract=ki,Li.toArray=Ye,Li.toDate=Me,Li.toISOString=de,Li.toJSON=de,Li.toString=ue,Li.unix=ve,Li.valueOf=De,Li.year=yi,Li.isLeapYear=at,Li.weekYear=Oe,Li.isoWeekYear=Ue,Li.quarter=Li.quarters=Ge,Li.month=$,Li.daysInMonth=R,Li.week=Li.weeks=ct,Li.isoWeek=Li.isoWeeks=ft,Li.weeksInYear=We,Li.isoWeeksInYear=Ce,Li.date=Si,Li.day=Li.days=Ie,Li.weekday=Ae,Li.isoWeekday=ze,Li.dayOfYear=mt,Li.hour=Li.hours=Wi,Li.minute=Li.minutes=Gi,Li.second=Li.seconds=Fi,Li.millisecond=Li.milliseconds=Pi,Li.utcOffset=xt,Li.utc=It,Li.local=At,Li.parseZone=zt,Li.hasAlignedHourOffset=Zt,Li.isDST=Et,Li.isDSTShifted=jt,Li.isLocal=Nt,Li.isUtcOffset=Vt,Li.isUtc=qt,Li.isUTC=qt,Li.zoneAbbr=qe,Li.zoneName=Je,Li.dates=X("dates accessor is deprecated. Use date instead.",Si),Li.months=X("months accessor is deprecated. Use month instead",$),Li.years=X("years accessor is deprecated. Use year instead",yi),Li.zone=X("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Ht);var xi=Li,Hi={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Ii={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},Ai="Invalid date",zi="%d",Zi=/\d{1,2}/,Ei={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",
2 | y:"a year",yy:"%d years"},ji=p.prototype;ji._calendar=Hi,ji.calendar=Be,ji._longDateFormat=Ii,ji.longDateFormat=Qe,ji._invalidDate=Ai,ji.invalidDate=Xe,ji._ordinal=zi,ji.ordinal=Ke,ji._ordinalParse=Zi,ji.preparse=tn,ji.postformat=tn,ji._relativeTime=Ei,ji.relativeTime=en,ji.pastFuture=nn,ji.set=rn,ji.months=N,ji._months=di,ji.monthsShort=V,ji._monthsShort=li,ji.monthsParse=q,ji.week=ut,ji._week=pi,ji.firstDayOfYear=lt,ji.firstDayOfWeek=dt,ji.weekdays=Pe,ji._weekdays=bi,ji.weekdaysMin=xe,ji._weekdaysMin=Ui,ji.weekdaysShort=Le,ji._weekdaysShort=Oi,ji.weekdaysParse=He,ji.isPM=je,ji._meridiemParse=Ci,ji.meridiem=Ne,M("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=1===_(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),t.lang=X("moment.lang is deprecated. Use moment.locale instead.",M),t.langData=X("moment.langData is deprecated. Use moment.localeData instead.",w);var Ni=Math.abs,Vi=Mn("ms"),qi=Mn("s"),Ji=Mn("m"),$i=Mn("h"),Ri=Mn("d"),Bi=Mn("w"),Qi=Mn("M"),Xi=Mn("y"),Ki=wn("milliseconds"),tr=wn("seconds"),er=wn("minutes"),nr=wn("hours"),ir=wn("days"),rr=wn("months"),sr=wn("years"),ar=Math.round,or={s:45,m:45,h:22,d:26,M:11},ur=Math.abs,dr=Ct.prototype;dr.abs=fn,dr.add=mn,dr.subtract=_n,dr.as=Dn,dr.asMilliseconds=Vi,dr.asSeconds=qi,dr.asMinutes=Ji,dr.asHours=$i,dr.asDays=Ri,dr.asWeeks=Bi,dr.asMonths=Qi,dr.asYears=Xi,dr.valueOf=vn,dr._bubble=yn,dr.get=Yn,dr.milliseconds=Ki,dr.seconds=tr,dr.minutes=er,dr.hours=nr,dr.days=ir,dr.weeks=kn,dr.months=rr,dr.years=sr,dr.humanize=On,dr.toISOString=Un,dr.toString=Un,dr.toJSON=Un,dr.locale=_e,dr.localeData=ye,dr.toIsoString=X("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Un),dr.lang=Ti,G("X",0,0,"unix"),G("x",0,0,"valueOf"),H("x",Bn),H("X",Xn),z("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))}),z("x",function(t,e,n){n._d=new Date(_(t))}),t.version="2.10.3",e(St),t.fn=xi,t.min=Ot,t.max=Ut,t.utc=o,t.unix=$e,t.months=on,t.isDate=i,t.locale=M,t.invalid=c,t.duration=Jt,t.isMoment=m,t.weekdays=dn,t.parseZone=Re,t.localeData=w,t.isDuration=Wt,t.monthsShort=un,t.weekdaysMin=cn,t.defineLocale=Y,t.weekdaysShort=ln,t.normalizeUnits=T,t.relativeTimeThreshold=bn;var lr=t;return lr});
--------------------------------------------------------------------------------
/dev/js/vendor/moment.js:
--------------------------------------------------------------------------------
1 | //! moment.js
2 | //! version : 2.10.3
3 | //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
4 | //! license : MIT
5 | //! momentjs.com
6 | !function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.moment=b()}(this,function(){"use strict";function a(){return Dc.apply(null,arguments)}function b(a){Dc=a}function c(a){return"[object Array]"===Object.prototype.toString.call(a)}function d(a){return a instanceof Date||"[object Date]"===Object.prototype.toString.call(a)}function e(a,b){var c,d=[];for(c=0;c0)for(c in Fc)d=Fc[c],e=b[d],"undefined"!=typeof e&&(a[d]=e);return a}function n(b){m(this,b),this._d=new Date(+b._d),Gc===!1&&(Gc=!0,a.updateOffset(this),Gc=!1)}function o(a){return a instanceof n||null!=a&&null!=a._isAMomentObject}function p(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=b>=0?Math.floor(b):Math.ceil(b)),c}function q(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&p(a[d])!==p(b[d]))&&g++;return g+f}function r(){}function s(a){return a?a.toLowerCase().replace("_","-"):a}function t(a){for(var b,c,d,e,f=0;f0;){if(d=u(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&q(e,c,!0)>=b-1)break;b--}f++}return null}function u(a){var b=null;if(!Hc[a]&&"undefined"!=typeof module&&module&&module.exports)try{b=Ec._abbr,require("./locale/"+a),v(b)}catch(c){}return Hc[a]}function v(a,b){var c;return a&&(c="undefined"==typeof b?x(a):w(a,b),c&&(Ec=c)),Ec._abbr}function w(a,b){return null!==b?(b.abbr=a,Hc[a]||(Hc[a]=new r),Hc[a].set(b),v(a),Hc[a]):(delete Hc[a],null)}function x(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return Ec;if(!c(a)){if(b=u(a))return b;a=[a]}return t(a)}function y(a,b){var c=a.toLowerCase();Ic[c]=Ic[c+"s"]=Ic[b]=a}function z(a){return"string"==typeof a?Ic[a]||Ic[a.toLowerCase()]:void 0}function A(a){var b,c,d={};for(c in a)f(a,c)&&(b=z(c),b&&(d[b]=a[c]));return d}function B(b,c){return function(d){return null!=d?(D(this,b,d),a.updateOffset(this,c),this):C(this,b)}}function C(a,b){return a._d["get"+(a._isUTC?"UTC":"")+b]()}function D(a,b,c){return a._d["set"+(a._isUTC?"UTC":"")+b](c)}function E(a,b){var c;if("object"==typeof a)for(c in a)this.set(c,a[c]);else if(a=z(a),"function"==typeof this[a])return this[a](b);return this}function F(a,b,c){for(var d=""+Math.abs(a),e=a>=0;d.lengthb;b++)Mc[d[b]]?d[b]=Mc[d[b]]:d[b]=H(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function J(a,b){return a.isValid()?(b=K(b,a.localeData()),Lc[b]||(Lc[b]=I(b)),Lc[b](a)):a.localeData().invalidDate()}function K(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(Kc.lastIndex=0;d>=0&&Kc.test(a);)a=a.replace(Kc,c),Kc.lastIndex=0,d-=1;return a}function L(a,b,c){_c[a]="function"==typeof b?b:function(a){return a&&c?c:b}}function M(a,b){return f(_c,a)?_c[a](b._strict,b._locale):new RegExp(N(a))}function N(a){return a.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e}).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function O(a,b){var c,d=b;for("string"==typeof a&&(a=[a]),"number"==typeof b&&(d=function(a,c){c[b]=p(a)}),c=0;cd;d++){if(e=h([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}}function V(a,b){var c;return"string"==typeof b&&(b=a.localeData().monthsParse(b),"number"!=typeof b)?a:(c=Math.min(a.date(),R(a.year(),b)),a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c),a)}function W(b){return null!=b?(V(this,b),a.updateOffset(this,!0),this):C(this,"Month")}function X(){return R(this.year(),this.month())}function Y(a){var b,c=a._a;return c&&-2===j(a).overflow&&(b=c[cd]<0||c[cd]>11?cd:c[dd]<1||c[dd]>R(c[bd],c[cd])?dd:c[ed]<0||c[ed]>24||24===c[ed]&&(0!==c[fd]||0!==c[gd]||0!==c[hd])?ed:c[fd]<0||c[fd]>59?fd:c[gd]<0||c[gd]>59?gd:c[hd]<0||c[hd]>999?hd:-1,j(a)._overflowDayOfYear&&(bd>b||b>dd)&&(b=dd),j(a).overflow=b),a}function Z(b){a.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+b)}function $(a,b){var c=!0,d=a+"\n"+(new Error).stack;return g(function(){return c&&(Z(d),c=!1),b.apply(this,arguments)},b)}function _(a,b){kd[a]||(Z(b),kd[a]=!0)}function aa(a){var b,c,d=a._i,e=ld.exec(d);if(e){for(j(a).iso=!0,b=0,c=md.length;c>b;b++)if(md[b][1].exec(d)){a._f=md[b][0]+(e[6]||" ");break}for(b=0,c=nd.length;c>b;b++)if(nd[b][1].exec(d)){a._f+=nd[b][0];break}d.match(Yc)&&(a._f+="Z"),ta(a)}else a._isValid=!1}function ba(b){var c=od.exec(b._i);return null!==c?void(b._d=new Date(+c[1])):(aa(b),void(b._isValid===!1&&(delete b._isValid,a.createFromInputFallback(b))))}function ca(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 1970>a&&h.setFullYear(a),h}function da(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function ea(a){return fa(a)?366:365}function fa(a){return a%4===0&&a%100!==0||a%400===0}function ga(){return fa(this.year())}function ha(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=Aa(a).add(f,"d"),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function ia(a){return ha(a,this._week.dow,this._week.doy).week}function ja(){return this._week.dow}function ka(){return this._week.doy}function la(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")}function ma(a){var b=ha(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")}function na(a,b,c,d,e){var f,g,h=da(a,0,1).getUTCDay();return h=0===h?7:h,c=null!=c?c:e,f=e-h+(h>d?7:0)-(e>h?7:0),g=7*(b-1)+(c-e)+f+1,{year:g>0?a:a-1,dayOfYear:g>0?g:ea(a-1)+g}}function oa(a){var b=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")}function pa(a,b,c){return null!=a?a:null!=b?b:c}function qa(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function ra(a){var b,c,d,e,f=[];if(!a._d){for(d=qa(a),a._w&&null==a._a[dd]&&null==a._a[cd]&&sa(a),a._dayOfYear&&(e=pa(a._a[bd],d[bd]),a._dayOfYear>ea(e)&&(j(a)._overflowDayOfYear=!0),c=da(e,0,a._dayOfYear),a._a[cd]=c.getUTCMonth(),a._a[dd]=c.getUTCDate()),b=0;3>b&&null==a._a[b];++b)a._a[b]=f[b]=d[b];for(;7>b;b++)a._a[b]=f[b]=null==a._a[b]?2===b?1:0:a._a[b];24===a._a[ed]&&0===a._a[fd]&&0===a._a[gd]&&0===a._a[hd]&&(a._nextDay=!0,a._a[ed]=0),a._d=(a._useUTC?da:ca).apply(null,f),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[ed]=24)}}function sa(a){var b,c,d,e,f,g,h;b=a._w,null!=b.GG||null!=b.W||null!=b.E?(f=1,g=4,c=pa(b.GG,a._a[bd],ha(Aa(),1,4).year),d=pa(b.W,1),e=pa(b.E,1)):(f=a._locale._week.dow,g=a._locale._week.doy,c=pa(b.gg,a._a[bd],ha(Aa(),f,g).year),d=pa(b.w,1),null!=b.d?(e=b.d,f>e&&++d):e=null!=b.e?b.e+f:f),h=na(c,d,e,g,f),a._a[bd]=h.year,a._dayOfYear=h.dayOfYear}function ta(b){if(b._f===a.ISO_8601)return void aa(b);b._a=[],j(b).empty=!0;var c,d,e,f,g,h=""+b._i,i=h.length,k=0;for(e=K(b._f,b._locale).match(Jc)||[],c=0;c0&&j(b).unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),k+=d.length),Mc[f]?(d?j(b).empty=!1:j(b).unusedTokens.push(f),Q(f,d,b)):b._strict&&!d&&j(b).unusedTokens.push(f);j(b).charsLeftOver=i-k,h.length>0&&j(b).unusedInput.push(h),j(b).bigHour===!0&&b._a[ed]<=12&&b._a[ed]>0&&(j(b).bigHour=void 0),b._a[ed]=ua(b._locale,b._a[ed],b._meridiem),ra(b),Y(b)}function ua(a,b,c){var d;return null==c?b:null!=a.meridiemHour?a.meridiemHour(b,c):null!=a.isPM?(d=a.isPM(c),d&&12>b&&(b+=12),d||12!==b||(b=0),b):b}function va(a){var b,c,d,e,f;if(0===a._f.length)return j(a).invalidFormat=!0,void(a._d=new Date(0/0));for(e=0;ef)&&(d=f,c=b));g(a,c||b)}function wa(a){if(!a._d){var b=A(a._i);a._a=[b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],ra(a)}}function xa(a){var b,e=a._i,f=a._f;return a._locale=a._locale||x(a._l),null===e||void 0===f&&""===e?l({nullInput:!0}):("string"==typeof e&&(a._i=e=a._locale.preparse(e)),o(e)?new n(Y(e)):(c(f)?va(a):f?ta(a):d(e)?a._d=e:ya(a),b=new n(Y(a)),b._nextDay&&(b.add(1,"d"),b._nextDay=void 0),b))}function ya(b){var f=b._i;void 0===f?b._d=new Date:d(f)?b._d=new Date(+f):"string"==typeof f?ba(b):c(f)?(b._a=e(f.slice(0),function(a){return parseInt(a,10)}),ra(b)):"object"==typeof f?wa(b):"number"==typeof f?b._d=new Date(f):a.createFromInputFallback(b)}function za(a,b,c,d,e){var f={};return"boolean"==typeof c&&(d=c,c=void 0),f._isAMomentObject=!0,f._useUTC=f._isUTC=e,f._l=c,f._i=a,f._f=b,f._strict=d,xa(f)}function Aa(a,b,c,d){return za(a,b,c,d,!1)}function Ba(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return Aa();for(d=b[0],e=1;ea&&(a=-a,c="-"),c+F(~~(a/60),2)+b+F(~~a%60,2)})}function Ha(a){var b=(a||"").match(Yc)||[],c=b[b.length-1]||[],d=(c+"").match(td)||["-",0,0],e=+(60*d[1])+p(d[2]);return"+"===d[0]?e:-e}function Ia(b,c){var e,f;return c._isUTC?(e=c.clone(),f=(o(b)||d(b)?+b:+Aa(b))-+e,e._d.setTime(+e._d+f),a.updateOffset(e,!1),e):Aa(b).local();return c._isUTC?Aa(b).zone(c._offset||0):Aa(b).local()}function Ja(a){return 15*-Math.round(a._d.getTimezoneOffset()/15)}function Ka(b,c){var d,e=this._offset||0;return null!=b?("string"==typeof b&&(b=Ha(b)),Math.abs(b)<16&&(b=60*b),!this._isUTC&&c&&(d=Ja(this)),this._offset=b,this._isUTC=!0,null!=d&&this.add(d,"m"),e!==b&&(!c||this._changeInProgress?$a(this,Va(b-e,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?e:Ja(this)}function La(a,b){return null!=a?("string"!=typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()}function Ma(a){return this.utcOffset(0,a)}function Na(a){return this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(Ja(this),"m")),this}function Oa(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Ha(this._i)),this}function Pa(a){return a=a?Aa(a).utcOffset():0,(this.utcOffset()-a)%60===0}function Qa(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ra(){if(this._a){var a=this._isUTC?h(this._a):Aa(this._a);return this.isValid()&&q(this._a,a.toArray())>0}return!1}function Sa(){return!this._isUTC}function Ta(){return this._isUTC}function Ua(){return this._isUTC&&0===this._offset}function Va(a,b){var c,d,e,g=a,h=null;return Fa(a)?g={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(g={},b?g[b]=a:g.milliseconds=a):(h=ud.exec(a))?(c="-"===h[1]?-1:1,g={y:0,d:p(h[dd])*c,h:p(h[ed])*c,m:p(h[fd])*c,s:p(h[gd])*c,ms:p(h[hd])*c}):(h=vd.exec(a))?(c="-"===h[1]?-1:1,g={y:Wa(h[2],c),M:Wa(h[3],c),d:Wa(h[4],c),h:Wa(h[5],c),m:Wa(h[6],c),s:Wa(h[7],c),w:Wa(h[8],c)}):null==g?g={}:"object"==typeof g&&("from"in g||"to"in g)&&(e=Ya(Aa(g.from),Aa(g.to)),g={},g.ms=e.milliseconds,g.M=e.months),d=new Ea(g),Fa(a)&&f(a,"_locale")&&(d._locale=a._locale),d}function Wa(a,b){var c=a&&parseFloat(a.replace(",","."));return(isNaN(c)?0:c)*b}function Xa(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function Ya(a,b){var c;return b=Ia(b,a),a.isBefore(b)?c=Xa(a,b):(c=Xa(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c}function Za(a,b){return function(c,d){var e,f;return null===d||isNaN(+d)||(_(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period)."),f=c,c=d,d=f),c="string"==typeof c?+c:c,e=Va(c,d),$a(this,e,a),this}}function $a(b,c,d,e){var f=c._milliseconds,g=c._days,h=c._months;e=null==e?!0:e,f&&b._d.setTime(+b._d+f*d),g&&D(b,"Date",C(b,"Date")+g*d),h&&V(b,C(b,"Month")+h*d),e&&a.updateOffset(b,g||h)}function _a(a){var b=a||Aa(),c=Ia(b,this).startOf("day"),d=this.diff(c,"days",!0),e=-6>d?"sameElse":-1>d?"lastWeek":0>d?"lastDay":1>d?"sameDay":2>d?"nextDay":7>d?"nextWeek":"sameElse";return this.format(this.localeData().calendar(e,this,Aa(b)))}function ab(){return new n(this)}function bb(a,b){var c;return b=z("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=o(a)?a:Aa(a),+this>+a):(c=o(a)?+a:+Aa(a),c<+this.clone().startOf(b))}function cb(a,b){var c;return b=z("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=o(a)?a:Aa(a),+a>+this):(c=o(a)?+a:+Aa(a),+this.clone().endOf(b)a?Math.ceil(a):Math.floor(a)}function gb(a,b,c){var d,e,f=Ia(a,this),g=6e4*(f.utcOffset()-this.utcOffset());return b=z(b),"year"===b||"month"===b||"quarter"===b?(e=hb(this,f),"quarter"===b?e/=3:"year"===b&&(e/=12)):(d=this-f,e="second"===b?d/1e3:"minute"===b?d/6e4:"hour"===b?d/36e5:"day"===b?(d-g)/864e5:"week"===b?(d-g)/6048e5:d),c?e:fb(e)}function hb(a,b){var c,d,e=12*(b.year()-a.year())+(b.month()-a.month()),f=a.clone().add(e,"months");return 0>b-f?(c=a.clone().add(e-1,"months"),d=(b-f)/(f-c)):(c=a.clone().add(e+1,"months"),d=(b-f)/(c-f)),-(e+d)}function ib(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function jb(){var a=this.clone().utc();return 0b;b++)if(this._weekdaysParse[b]||(c=Aa([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b}function Mb(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=Hb(a,this.localeData()),this.add(a-b,"d")):b}function Nb(a){var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")}function Ob(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)}function Pb(a,b){G(a,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),b)})}function Qb(a,b){return b._meridiemParse}function Rb(a){return"p"===(a+"").toLowerCase().charAt(0)}function Sb(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"}function Tb(a){G(0,[a,3],0,"millisecond")}function Ub(){return this._isUTC?"UTC":""}function Vb(){return this._isUTC?"Coordinated Universal Time":""}function Wb(a){return Aa(1e3*a)}function Xb(){return Aa.apply(null,arguments).parseZone()}function Yb(a,b,c){var d=this._calendar[a];return"function"==typeof d?d.call(b,c):d}function Zb(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b),b}function $b(){return this._invalidDate}function _b(a){return this._ordinal.replace("%d",a)}function ac(a){return a}function bc(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)}function cc(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)}function dc(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function ec(a,b,c,d){var e=x(),f=h().set(d,b);return e[c](f,a)}function fc(a,b,c,d,e){if("number"==typeof a&&(b=a,a=void 0),a=a||"",null!=b)return ec(a,b,c,e);var f,g=[];for(f=0;d>f;f++)g[f]=ec(a,f,c,e);return g}function gc(a,b){return fc(a,b,"months",12,"month")}function hc(a,b){return fc(a,b,"monthsShort",12,"month")}function ic(a,b){return fc(a,b,"weekdays",7,"day")}function jc(a,b){return fc(a,b,"weekdaysShort",7,"day")}function kc(a,b){return fc(a,b,"weekdaysMin",7,"day")}function lc(){var a=this._data;return this._milliseconds=Rd(this._milliseconds),this._days=Rd(this._days),this._months=Rd(this._months),a.milliseconds=Rd(a.milliseconds),a.seconds=Rd(a.seconds),a.minutes=Rd(a.minutes),a.hours=Rd(a.hours),a.months=Rd(a.months),a.years=Rd(a.years),this}function mc(a,b,c,d){var e=Va(b,c);return a._milliseconds+=d*e._milliseconds,a._days+=d*e._days,a._months+=d*e._months,a._bubble()}function nc(a,b){return mc(this,a,b,1)}function oc(a,b){return mc(this,a,b,-1)}function pc(){var a,b,c,d=this._milliseconds,e=this._days,f=this._months,g=this._data,h=0;return g.milliseconds=d%1e3,a=fb(d/1e3),g.seconds=a%60,b=fb(a/60),g.minutes=b%60,c=fb(b/60),g.hours=c%24,e+=fb(c/24),h=fb(qc(e)),e-=fb(rc(h)),f+=fb(e/30),e%=30,h+=fb(f/12),f%=12,g.days=e,g.months=f,g.years=h,this}function qc(a){return 400*a/146097}function rc(a){return 146097*a/400}function sc(a){var b,c,d=this._milliseconds;if(a=z(a),"month"===a||"year"===a)return b=this._days+d/864e5,c=this._months+12*qc(b),"month"===a?c:c/12;switch(b=this._days+Math.round(rc(this._months/12)),a){case"week":return b/7+d/6048e5;case"day":return b+d/864e5;case"hour":return 24*b+d/36e5;case"minute":return 1440*b+d/6e4;case"second":return 86400*b+d/1e3;case"millisecond":return Math.floor(864e5*b)+d;default:throw new Error("Unknown unit "+a)}}function tc(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*p(this._months/12)}function uc(a){return function(){return this.as(a)}}function vc(a){return a=z(a),this[a+"s"]()}function wc(a){return function(){return this._data[a]}}function xc(){return fb(this.days()/7)}function yc(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function zc(a,b,c){var d=Va(a).abs(),e=fe(d.as("s")),f=fe(d.as("m")),g=fe(d.as("h")),h=fe(d.as("d")),i=fe(d.as("M")),j=fe(d.as("y")),k=e0,k[4]=c,yc.apply(null,k)}function Ac(a,b){return void 0===ge[a]?!1:void 0===b?ge[a]:(ge[a]=b,!0)}function Bc(a){var b=this.localeData(),c=zc(this,!a,b);return a&&(c=b.pastFuture(+this,c)),b.postformat(c)}function Cc(){var a=he(this.years()),b=he(this.months()),c=he(this.days()),d=he(this.hours()),e=he(this.minutes()),f=he(this.seconds()+this.milliseconds()/1e3),g=this.asSeconds();return g?(0>g?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":""):"P0D"}var Dc,Ec,Fc=a.momentProperties=[],Gc=!1,Hc={},Ic={},Jc=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g,Kc=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Lc={},Mc={},Nc=/\d/,Oc=/\d\d/,Pc=/\d{3}/,Qc=/\d{4}/,Rc=/[+-]?\d{6}/,Sc=/\d\d?/,Tc=/\d{1,3}/,Uc=/\d{1,4}/,Vc=/[+-]?\d{1,6}/,Wc=/\d+/,Xc=/[+-]?\d+/,Yc=/Z|[+-]\d\d:?\d\d/gi,Zc=/[+-]?\d+(\.\d{1,3})?/,$c=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,_c={},ad={},bd=0,cd=1,dd=2,ed=3,fd=4,gd=5,hd=6;G("M",["MM",2],"Mo",function(){return this.month()+1}),G("MMM",0,0,function(a){return this.localeData().monthsShort(this,a)}),G("MMMM",0,0,function(a){return this.localeData().months(this,a)}),y("month","M"),L("M",Sc),L("MM",Sc,Oc),L("MMM",$c),L("MMMM",$c),O(["M","MM"],function(a,b){b[cd]=p(a)-1}),O(["MMM","MMMM"],function(a,b,c,d){var e=c._locale.monthsParse(a,d,c._strict);null!=e?b[cd]=e:j(c).invalidMonth=a});var id="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),jd="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),kd={};a.suppressDeprecationWarnings=!1;var ld=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,md=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],nd=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],od=/^\/?Date\((\-?\d+)/i;a.createFromInputFallback=$("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),G(0,["YY",2],0,function(){return this.year()%100}),G(0,["YYYY",4],0,"year"),G(0,["YYYYY",5],0,"year"),G(0,["YYYYYY",6,!0],0,"year"),y("year","y"),L("Y",Xc),L("YY",Sc,Oc),L("YYYY",Uc,Qc),L("YYYYY",Vc,Rc),L("YYYYYY",Vc,Rc),O(["YYYY","YYYYY","YYYYYY"],bd),O("YY",function(b,c){c[bd]=a.parseTwoDigitYear(b)}),a.parseTwoDigitYear=function(a){return p(a)+(p(a)>68?1900:2e3)};var pd=B("FullYear",!1);G("w",["ww",2],"wo","week"),G("W",["WW",2],"Wo","isoWeek"),y("week","w"),y("isoWeek","W"),L("w",Sc),L("ww",Sc,Oc),L("W",Sc),L("WW",Sc,Oc),P(["w","ww","W","WW"],function(a,b,c,d){b[d.substr(0,1)]=p(a)});var qd={dow:0,doy:6};G("DDD",["DDDD",3],"DDDo","dayOfYear"),y("dayOfYear","DDD"),L("DDD",Tc),L("DDDD",Pc),O(["DDD","DDDD"],function(a,b,c){c._dayOfYear=p(a)}),a.ISO_8601=function(){};var rd=$("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var a=Aa.apply(null,arguments);return this>a?this:a}),sd=$("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var a=Aa.apply(null,arguments);return a>this?this:a});Ga("Z",":"),Ga("ZZ",""),L("Z",Yc),L("ZZ",Yc),O(["Z","ZZ"],function(a,b,c){c._useUTC=!0,c._tzm=Ha(a)});var td=/([\+\-]|\d\d)/gi;a.updateOffset=function(){};var ud=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,vd=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;Va.fn=Ea.prototype;var wd=Za(1,"add"),xd=Za(-1,"subtract");a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var yd=$("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(a){return void 0===a?this.localeData():this.locale(a)});G(0,["gg",2],0,function(){return this.weekYear()%100}),G(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Ab("gggg","weekYear"),Ab("ggggg","weekYear"),Ab("GGGG","isoWeekYear"),Ab("GGGGG","isoWeekYear"),y("weekYear","gg"),y("isoWeekYear","GG"),L("G",Xc),L("g",Xc),L("GG",Sc,Oc),L("gg",Sc,Oc),L("GGGG",Uc,Qc),L("gggg",Uc,Qc),L("GGGGG",Vc,Rc),L("ggggg",Vc,Rc),P(["gggg","ggggg","GGGG","GGGGG"],function(a,b,c,d){b[d.substr(0,2)]=p(a)}),P(["gg","GG"],function(b,c,d,e){c[e]=a.parseTwoDigitYear(b)}),G("Q",0,0,"quarter"),y("quarter","Q"),L("Q",Nc),O("Q",function(a,b){b[cd]=3*(p(a)-1)}),G("D",["DD",2],"Do","date"),y("date","D"),L("D",Sc),L("DD",Sc,Oc),L("Do",function(a,b){return a?b._ordinalParse:b._ordinalParseLenient}),O(["D","DD"],dd),O("Do",function(a,b){b[dd]=p(a.match(Sc)[0],10)});var zd=B("Date",!0);G("d",0,"do","day"),G("dd",0,0,function(a){return this.localeData().weekdaysMin(this,a)}),G("ddd",0,0,function(a){return this.localeData().weekdaysShort(this,a)}),G("dddd",0,0,function(a){return this.localeData().weekdays(this,a)}),G("e",0,0,"weekday"),G("E",0,0,"isoWeekday"),y("day","d"),y("weekday","e"),y("isoWeekday","E"),L("d",Sc),L("e",Sc),L("E",Sc),L("dd",$c),L("ddd",$c),L("dddd",$c),P(["dd","ddd","dddd"],function(a,b,c){var d=c._locale.weekdaysParse(a);null!=d?b.d=d:j(c).invalidWeekday=a}),P(["d","e","E"],function(a,b,c,d){b[d]=p(a)});var Ad="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Bd="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Cd="Su_Mo_Tu_We_Th_Fr_Sa".split("_");G("H",["HH",2],0,"hour"),G("h",["hh",2],0,function(){return this.hours()%12||12}),Pb("a",!0),Pb("A",!1),y("hour","h"),L("a",Qb),L("A",Qb),L("H",Sc),L("h",Sc),L("HH",Sc,Oc),L("hh",Sc,Oc),O(["H","HH"],ed),O(["a","A"],function(a,b,c){c._isPm=c._locale.isPM(a),c._meridiem=a}),O(["h","hh"],function(a,b,c){b[ed]=p(a),j(c).bigHour=!0});var Dd=/[ap]\.?m?\.?/i,Ed=B("Hours",!0);G("m",["mm",2],0,"minute"),y("minute","m"),L("m",Sc),L("mm",Sc,Oc),O(["m","mm"],fd);var Fd=B("Minutes",!1);G("s",["ss",2],0,"second"),y("second","s"),L("s",Sc),L("ss",Sc,Oc),O(["s","ss"],gd);var Gd=B("Seconds",!1);G("S",0,0,function(){return~~(this.millisecond()/100)}),G(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Tb("SSS"),Tb("SSSS"),y("millisecond","ms"),L("S",Tc,Nc),L("SS",Tc,Oc),L("SSS",Tc,Pc),L("SSSS",Wc),O(["S","SS","SSS","SSSS"],function(a,b){b[hd]=p(1e3*("0."+a))});var Hd=B("Milliseconds",!1);G("z",0,0,"zoneAbbr"),G("zz",0,0,"zoneName");var Id=n.prototype;Id.add=wd,Id.calendar=_a,Id.clone=ab,Id.diff=gb,Id.endOf=sb,Id.format=kb,Id.from=lb,Id.fromNow=mb,Id.to=nb,Id.toNow=ob,Id.get=E,Id.invalidAt=zb,Id.isAfter=bb,Id.isBefore=cb,Id.isBetween=db,Id.isSame=eb,Id.isValid=xb,Id.lang=yd,Id.locale=pb,Id.localeData=qb,Id.max=sd,Id.min=rd,Id.parsingFlags=yb,Id.set=E,Id.startOf=rb,Id.subtract=xd,Id.toArray=wb,Id.toDate=vb,Id.toISOString=jb,Id.toJSON=jb,Id.toString=ib,Id.unix=ub,Id.valueOf=tb,Id.year=pd,Id.isLeapYear=ga,Id.weekYear=Cb,Id.isoWeekYear=Db,Id.quarter=Id.quarters=Gb,Id.month=W,Id.daysInMonth=X,Id.week=Id.weeks=la,Id.isoWeek=Id.isoWeeks=ma,Id.weeksInYear=Fb,Id.isoWeeksInYear=Eb,Id.date=zd,Id.day=Id.days=Mb,Id.weekday=Nb,Id.isoWeekday=Ob,Id.dayOfYear=oa,Id.hour=Id.hours=Ed,Id.minute=Id.minutes=Fd,Id.second=Id.seconds=Gd,Id.millisecond=Id.milliseconds=Hd,Id.utcOffset=Ka,Id.utc=Ma,Id.local=Na,Id.parseZone=Oa,Id.hasAlignedHourOffset=Pa,Id.isDST=Qa,Id.isDSTShifted=Ra,Id.isLocal=Sa,Id.isUtcOffset=Ta,Id.isUtc=Ua,Id.isUTC=Ua,Id.zoneAbbr=Ub,Id.zoneName=Vb,Id.dates=$("dates accessor is deprecated. Use date instead.",zd),Id.months=$("months accessor is deprecated. Use month instead",W),Id.years=$("years accessor is deprecated. Use year instead",pd),Id.zone=$("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",La);var Jd=Id,Kd={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Ld={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},Md="Invalid date",Nd="%d",Od=/\d{1,2}/,Pd={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",
7 | hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},Qd=r.prototype;Qd._calendar=Kd,Qd.calendar=Yb,Qd._longDateFormat=Ld,Qd.longDateFormat=Zb,Qd._invalidDate=Md,Qd.invalidDate=$b,Qd._ordinal=Nd,Qd.ordinal=_b,Qd._ordinalParse=Od,Qd.preparse=ac,Qd.postformat=ac,Qd._relativeTime=Pd,Qd.relativeTime=bc,Qd.pastFuture=cc,Qd.set=dc,Qd.months=S,Qd._months=id,Qd.monthsShort=T,Qd._monthsShort=jd,Qd.monthsParse=U,Qd.week=ia,Qd._week=qd,Qd.firstDayOfYear=ka,Qd.firstDayOfWeek=ja,Qd.weekdays=Ib,Qd._weekdays=Ad,Qd.weekdaysMin=Kb,Qd._weekdaysMin=Cd,Qd.weekdaysShort=Jb,Qd._weekdaysShort=Bd,Qd.weekdaysParse=Lb,Qd.isPM=Rb,Qd._meridiemParse=Dd,Qd.meridiem=Sb,v("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===p(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),a.lang=$("moment.lang is deprecated. Use moment.locale instead.",v),a.langData=$("moment.langData is deprecated. Use moment.localeData instead.",x);var Rd=Math.abs,Sd=uc("ms"),Td=uc("s"),Ud=uc("m"),Vd=uc("h"),Wd=uc("d"),Xd=uc("w"),Yd=uc("M"),Zd=uc("y"),$d=wc("milliseconds"),_d=wc("seconds"),ae=wc("minutes"),be=wc("hours"),ce=wc("days"),de=wc("months"),ee=wc("years"),fe=Math.round,ge={s:45,m:45,h:22,d:26,M:11},he=Math.abs,ie=Ea.prototype;ie.abs=lc,ie.add=nc,ie.subtract=oc,ie.as=sc,ie.asMilliseconds=Sd,ie.asSeconds=Td,ie.asMinutes=Ud,ie.asHours=Vd,ie.asDays=Wd,ie.asWeeks=Xd,ie.asMonths=Yd,ie.asYears=Zd,ie.valueOf=tc,ie._bubble=pc,ie.get=vc,ie.milliseconds=$d,ie.seconds=_d,ie.minutes=ae,ie.hours=be,ie.days=ce,ie.weeks=xc,ie.months=de,ie.years=ee,ie.humanize=Bc,ie.toISOString=Cc,ie.toString=Cc,ie.toJSON=Cc,ie.locale=pb,ie.localeData=qb,ie.toIsoString=$("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Cc),ie.lang=yd,G("X",0,0,"unix"),G("x",0,0,"valueOf"),L("x",Xc),L("X",Zc),O("X",function(a,b,c){c._d=new Date(1e3*parseFloat(a,10))}),O("x",function(a,b,c){c._d=new Date(p(a))}),a.version="2.10.3",b(Aa),a.fn=Jd,a.min=Ca,a.max=Da,a.utc=h,a.unix=Wb,a.months=gc,a.isDate=d,a.locale=v,a.invalid=l,a.duration=Va,a.isMoment=o,a.weekdays=ic,a.parseZone=Xb,a.localeData=x,a.isDuration=Fa,a.monthsShort=hc,a.weekdaysMin=kc,a.defineLocale=w,a.weekdaysShort=jc,a.normalizeUnits=z,a.relativeTimeThreshold=Ac;var je=a;return je});
--------------------------------------------------------------------------------
/public/js/vendor/jquery.js:
--------------------------------------------------------------------------------
1 | !function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=e.length,n=Z.type(e);return"function"===n||Z.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function r(e,t,n){if(Z.isFunction(t))return Z.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return Z.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(ae.test(t))return Z.filter(t,e,n);t=Z.filter(t,e)}return Z.grep(e,function(e){return U.call(t,e)>=0!==n})}function i(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function o(e){var t=he[e]={};return Z.each(e.match(de)||[],function(e,n){t[n]=!0}),t}function s(){J.removeEventListener("DOMContentLoaded",s,!1),e.removeEventListener("load",s,!1),Z.ready()}function a(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=Z.expando+Math.random()}function u(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(be,"-$1").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:xe.test(n)?Z.parseJSON(n):n}catch(i){}ye.set(e,t,n)}else n=void 0;return n}function l(){return!0}function c(){return!1}function f(){try{return J.activeElement}catch(e){}}function p(e,t){return Z.nodeName(e,"table")&&Z.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function d(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function h(e){var t=Pe.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function g(e,t){for(var n=0,r=e.length;r>n;n++)ve.set(e[n],"globalEval",!t||ve.get(t[n],"globalEval"))}function m(e,t){var n,r,i,o,s,a,u,l;if(1===t.nodeType){if(ve.hasData(e)&&(o=ve.access(e),s=ve.set(t,o),l=o.events)){delete s.handle,s.events={};for(i in l)for(n=0,r=l[i].length;r>n;n++)Z.event.add(t,i,l[i][n])}ye.hasData(e)&&(a=ye.access(e),u=Z.extend({},a),ye.set(t,u))}}function v(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&Z.nodeName(e,t)?Z.merge([e],n):n}function y(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ne.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function x(t,n){var r,i=Z(n.createElement(t)).appendTo(n.body),o=e.getDefaultComputedStyle&&(r=e.getDefaultComputedStyle(i[0]))?r.display:Z.css(i[0],"display");return i.detach(),o}function b(e){var t=J,n=$e[e];return n||(n=x(e,t),"none"!==n&&n||(We=(We||Z("")).appendTo(t.documentElement),t=We[0].contentDocument,t.write(),t.close(),n=x(e,t),We.detach()),$e[e]=n),n}function w(e,t,n){var r,i,o,s,a=e.style;return n=n||_e(e),n&&(s=n.getPropertyValue(t)||n[t]),n&&(""!==s||Z.contains(e.ownerDocument,e)||(s=Z.style(e,t)),Ie.test(s)&&Be.test(t)&&(r=a.width,i=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=r,a.minWidth=i,a.maxWidth=o)),void 0!==s?s+"":s}function T(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function C(e,t){if(t in e)return t;for(var n=t[0].toUpperCase()+t.slice(1),r=t,i=Ge.length;i--;)if(t=Ge[i]+n,t in e)return t;return r}function N(e,t,n){var r=Xe.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function k(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,s=0;4>o;o+=2)"margin"===n&&(s+=Z.css(e,n+Te[o],!0,i)),r?("content"===n&&(s-=Z.css(e,"padding"+Te[o],!0,i)),"margin"!==n&&(s-=Z.css(e,"border"+Te[o]+"Width",!0,i))):(s+=Z.css(e,"padding"+Te[o],!0,i),"padding"!==n&&(s+=Z.css(e,"border"+Te[o]+"Width",!0,i)));return s}function E(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=_e(e),s="border-box"===Z.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=w(e,t,o),(0>i||null==i)&&(i=e.style[t]),Ie.test(i))return i;r=s&&(Q.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+k(e,t,n||(s?"border":"content"),r,o)+"px"}function S(e,t){for(var n,r,i,o=[],s=0,a=e.length;a>s;s++)r=e[s],r.style&&(o[s]=ve.get(r,"olddisplay"),n=r.style.display,t?(o[s]||"none"!==n||(r.style.display=""),""===r.style.display&&Ce(r)&&(o[s]=ve.access(r,"olddisplay",b(r.nodeName)))):(i=Ce(r),"none"===n&&i||ve.set(r,"olddisplay",i?n:Z.css(r,"display"))));for(s=0;a>s;s++)r=e[s],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[s]||"":"none"));return e}function j(e,t,n,r,i){return new j.prototype.init(e,t,n,r,i)}function D(){return setTimeout(function(){Qe=void 0}),Qe=Z.now()}function A(e,t){var n,r=0,i={height:e};for(t=t?1:0;4>r;r+=2-t)n=Te[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function L(e,t,n){for(var r,i=(nt[t]||[]).concat(nt["*"]),o=0,s=i.length;s>o;o++)if(r=i[o].call(n,t,e))return r}function q(e,t,n){var r,i,o,s,a,u,l,c,f=this,p={},d=e.style,h=e.nodeType&&Ce(e),g=ve.get(e,"fxshow");n.queue||(a=Z._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,u=a.empty.fire,a.empty.fire=function(){a.unqueued||u()}),a.unqueued++,f.always(function(){f.always(function(){a.unqueued--,Z.queue(e,"fx").length||a.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],l=Z.css(e,"display"),c="none"===l?ve.get(e,"olddisplay")||b(e.nodeName):l,"inline"===c&&"none"===Z.css(e,"float")&&(d.display="inline-block")),n.overflow&&(d.overflow="hidden",f.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Ke.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(h?"hide":"show")){if("show"!==i||!g||void 0===g[r])continue;h=!0}p[r]=g&&g[r]||Z.style(e,r)}else l=void 0;if(Z.isEmptyObject(p))"inline"===("none"===l?b(e.nodeName):l)&&(d.display=l);else{g?"hidden"in g&&(h=g.hidden):g=ve.access(e,"fxshow",{}),o&&(g.hidden=!h),h?Z(e).show():f.done(function(){Z(e).hide()}),f.done(function(){var t;ve.remove(e,"fxshow");for(t in p)Z.style(e,t,p[t])});for(r in p)s=L(h?g[r]:0,r,f),r in g||(g[r]=s.start,h&&(s.end=s.start,s.start="width"===r||"height"===r?1:0))}}function H(e,t){var n,r,i,o,s;for(n in e)if(r=Z.camelCase(n),i=t[r],o=e[n],Z.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),s=Z.cssHooks[r],s&&"expand"in s){o=s.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function O(e,t,n){var r,i,o=0,s=tt.length,a=Z.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=Qe||D(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,s=0,u=l.tweens.length;u>s;s++)l.tweens[s].run(o);return a.notifyWith(e,[l,o,n]),1>o&&u?n:(a.resolveWith(e,[l]),!1)},l=a.promise({elem:e,props:Z.extend({},t),opts:Z.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Qe||D(),duration:n.duration,tweens:[],createTween:function(t,n){var r=Z.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?a.resolveWith(e,[l,t]):a.rejectWith(e,[l,t]),this}}),c=l.props;for(H(c,l.opts.specialEasing);s>o;o++)if(r=tt[o].call(l,e,c,l.opts))return r;return Z.map(c,L,l),Z.isFunction(l.opts.start)&&l.opts.start.call(e,l),Z.fx.timer(Z.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function F(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(de)||[];if(Z.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function P(e,t,n,r){function i(a){var u;return o[a]=!0,Z.each(e[a]||[],function(e,a){var l=a(t,n,r);return"string"!=typeof l||s||o[l]?s?!(u=l):void 0:(t.dataTypes.unshift(l),i(l),!1)}),u}var o={},s=e===wt;return i(t.dataTypes[0])||!o["*"]&&i("*")}function M(e,t){var n,r,i=Z.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&Z.extend(!0,e,r),e}function R(e,t,n){for(var r,i,o,s,a=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}s||(s=i)}o=o||s}return o?(o!==u[0]&&u.unshift(o),n[o]):void 0}function W(e,t,n,r){var i,o,s,a,u,l={},c=e.dataTypes.slice();if(c[1])for(s in e.converters)l[s.toLowerCase()]=e.converters[s];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(s=l[u+" "+o]||l["* "+o],!s)for(i in l)if(a=i.split(" "),a[1]===o&&(s=l[u+" "+a[0]]||l["* "+a[0]])){s===!0?s=l[i]:l[i]!==!0&&(o=a[0],c.unshift(a[1]));break}if(s!==!0)if(s&&e["throws"])t=s(t);else try{t=s(t)}catch(f){return{state:"parsererror",error:s?f:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}function $(e,t,n,r){var i;if(Z.isArray(t))Z.each(t,function(t,i){n||kt.test(e)?r(e,i):$(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==Z.type(t))r(e,t);else for(i in t)$(e+"["+i+"]",t[i],n,r)}function B(e){return Z.isWindow(e)?e:9===e.nodeType&&e.defaultView}var I=[],_=I.slice,z=I.concat,X=I.push,U=I.indexOf,V={},Y=V.toString,G=V.hasOwnProperty,Q={},J=e.document,K="2.1.1",Z=function(e,t){return new Z.fn.init(e,t)},ee=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,te=/^-ms-/,ne=/-([\da-z])/gi,re=function(e,t){return t.toUpperCase()};Z.fn=Z.prototype={jquery:K,constructor:Z,selector:"",length:0,toArray:function(){return _.call(this)},get:function(e){return null!=e?0>e?this[e+this.length]:this[e]:_.call(this)},pushStack:function(e){var t=Z.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return Z.each(this,e,t)},map:function(e){return this.pushStack(Z.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(_.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:X,sort:I.sort,splice:I.splice},Z.extend=Z.fn.extend=function(){var e,t,n,r,i,o,s=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[a]||{},a++),"object"==typeof s||Z.isFunction(s)||(s={}),a===u&&(s=this,a--);u>a;a++)if(null!=(e=arguments[a]))for(t in e)n=s[t],r=e[t],s!==r&&(l&&r&&(Z.isPlainObject(r)||(i=Z.isArray(r)))?(i?(i=!1,o=n&&Z.isArray(n)?n:[]):o=n&&Z.isPlainObject(n)?n:{},s[t]=Z.extend(l,o,r)):void 0!==r&&(s[t]=r));return s},Z.extend({expando:"jQuery"+(K+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===Z.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){return!Z.isArray(e)&&e-parseFloat(e)>=0},isPlainObject:function(e){return"object"!==Z.type(e)||e.nodeType||Z.isWindow(e)?!1:e.constructor&&!G.call(e.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?V[Y.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;e=Z.trim(e),e&&(1===e.indexOf("use strict")?(t=J.createElement("script"),t.text=e,J.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(te,"ms-").replace(ne,re)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,r){var i,o=0,s=e.length,a=n(e);if(r){if(a)for(;s>o&&(i=t.apply(e[o],r),i!==!1);o++);else for(o in e)if(i=t.apply(e[o],r),i===!1)break}else if(a)for(;s>o&&(i=t.call(e[o],o,e[o]),i!==!1);o++);else for(o in e)if(i=t.call(e[o],o,e[o]),i===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(ee,"")},makeArray:function(e,t){var r=t||[];return null!=e&&(n(Object(e))?Z.merge(r,"string"==typeof e?[e]:e):X.call(r,e)),r},inArray:function(e,t,n){return null==t?-1:U.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;n>r;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],o=0,s=e.length,a=!n;s>o;o++)r=!t(e[o],o),r!==a&&i.push(e[o]);return i},map:function(e,t,r){var i,o=0,s=e.length,a=n(e),u=[];if(a)for(;s>o;o++)i=t(e[o],o,r),null!=i&&u.push(i);else for(o in e)i=t(e[o],o,r),null!=i&&u.push(i);return z.apply([],u)},guid:1,proxy:function(e,t){var n,r,i;return"string"==typeof t&&(n=e[t],t=e,e=n),Z.isFunction(e)?(r=_.call(arguments,2),i=function(){return e.apply(t||this,r.concat(_.call(arguments)))},i.guid=e.guid=e.guid||Z.guid++,i):void 0},now:Date.now,support:Q}),Z.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){V["[object "+t+"]"]=t.toLowerCase()});var ie=function(e){function t(e,t,n,r){var i,o,s,a,u,l,f,d,h,g;if((t?t.ownerDocument||t:$)!==q&&L(t),t=t||q,n=n||[],!e||"string"!=typeof e)return n;if(1!==(a=t.nodeType)&&9!==a)return[];if(O&&!r){if(i=ye.exec(e))if(s=i[1]){if(9===a){if(o=t.getElementById(s),!o||!o.parentNode)return n;if(o.id===s)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(s))&&R(t,o)&&o.id===s)return n.push(o),n}else{if(i[2])return Z.apply(n,t.getElementsByTagName(e)),n;if((s=i[3])&&w.getElementsByClassName&&t.getElementsByClassName)return Z.apply(n,t.getElementsByClassName(s)),n}if(w.qsa&&(!F||!F.test(e))){if(d=f=W,h=t,g=9===a&&e,1===a&&"object"!==t.nodeName.toLowerCase()){for(l=k(e),(f=t.getAttribute("id"))?d=f.replace(be,"\\$&"):t.setAttribute("id",d),d="[id='"+d+"'] ",u=l.length;u--;)l[u]=d+p(l[u]);h=xe.test(e)&&c(t.parentNode)||t,g=l.join(",")}if(g)try{return Z.apply(n,h.querySelectorAll(g)),n}catch(m){}finally{f||t.removeAttribute("id")}}}return S(e.replace(ue,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>T.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[W]=!0,e}function i(e){var t=q.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=e.length;r--;)T.attrHandle[n[r]]=t}function s(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||Y)-(~e.sourceIndex||Y);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function a(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),s=o.length;s--;)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))})})}function c(e){return e&&typeof e.getElementsByTagName!==V&&e}function f(){}function p(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function d(e,t,n){var r=t.dir,i=n&&"parentNode"===r,o=I++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,s){var a,u,l=[B,o];if(s){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,s))return!0}else for(;t=t[r];)if(1===t.nodeType||i){if(u=t[W]||(t[W]={}),(a=u[r])&&a[0]===B&&a[1]===o)return l[2]=a[2];if(u[r]=l,l[2]=e(t,n,s))return!0}}}function h(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function g(e,n,r){for(var i=0,o=n.length;o>i;i++)t(e,n[i],r);return r}function m(e,t,n,r,i){for(var o,s=[],a=0,u=e.length,l=null!=t;u>a;a++)(o=e[a])&&(!n||n(o,r,i))&&(s.push(o),l&&t.push(a));return s}function v(e,t,n,i,o,s){return i&&!i[W]&&(i=v(i)),o&&!o[W]&&(o=v(o,s)),r(function(r,s,a,u){var l,c,f,p=[],d=[],h=s.length,v=r||g(t||"*",a.nodeType?[a]:a,[]),y=!e||!r&&t?v:m(v,p,e,a,u),x=n?o||(r?e:h||i)?[]:s:y;if(n&&n(y,x,a,u),i)for(l=m(x,d),i(l,[],a,u),c=l.length;c--;)(f=l[c])&&(x[d[c]]=!(y[d[c]]=f));if(r){if(o||e){if(o){for(l=[],c=x.length;c--;)(f=x[c])&&l.push(y[c]=f);o(null,x=[],l,u)}for(c=x.length;c--;)(f=x[c])&&(l=o?te.call(r,f):p[c])>-1&&(r[l]=!(s[l]=f))}}else x=m(x===s?x.splice(h,x.length):x),o?o(null,s,x,u):Z.apply(s,x)})}function y(e){for(var t,n,r,i=e.length,o=T.relative[e[0].type],s=o||T.relative[" "],a=o?1:0,u=d(function(e){return e===t},s,!0),l=d(function(e){return te.call(t,e)>-1},s,!0),c=[function(e,n,r){return!o&&(r||n!==j)||((t=n).nodeType?u(e,n,r):l(e,n,r))}];i>a;a++)if(n=T.relative[e[a].type])c=[d(h(c),n)];else{if(n=T.filter[e[a].type].apply(null,e[a].matches),n[W]){for(r=++a;i>r&&!T.relative[e[r].type];r++);return v(a>1&&h(c),a>1&&p(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(ue,"$1"),n,r>a&&y(e.slice(a,r)),i>r&&y(e=e.slice(r)),i>r&&p(e))}c.push(n)}return h(c)}function x(e,n){var i=n.length>0,o=e.length>0,s=function(r,s,a,u,l){var c,f,p,d=0,h="0",g=r&&[],v=[],y=j,x=r||o&&T.find.TAG("*",l),b=B+=null==y?1:Math.random()||.1,w=x.length;for(l&&(j=s!==q&&s);h!==w&&null!=(c=x[h]);h++){if(o&&c){for(f=0;p=e[f++];)if(p(c,s,a)){u.push(c);break}l&&(B=b)}i&&((c=!p&&c)&&d--,r&&g.push(c))}if(d+=h,i&&h!==d){for(f=0;p=n[f++];)p(g,v,s,a);if(r){if(d>0)for(;h--;)g[h]||v[h]||(v[h]=J.call(u));v=m(v)}Z.apply(u,v),l&&!r&&v.length>0&&d+n.length>1&&t.uniqueSort(u)}return l&&(B=b,j=y),g};return i?r(s):s}var b,w,T,C,N,k,E,S,j,D,A,L,q,H,O,F,P,M,R,W="sizzle"+-new Date,$=e.document,B=0,I=0,_=n(),z=n(),X=n(),U=function(e,t){return e===t&&(A=!0),0},V="undefined",Y=1<<31,G={}.hasOwnProperty,Q=[],J=Q.pop,K=Q.push,Z=Q.push,ee=Q.slice,te=Q.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},ne="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",re="[\\x20\\t\\r\\n\\f]",ie="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",oe=ie.replace("w","w#"),se="\\["+re+"*("+ie+")(?:"+re+"*([*^$|!~]?=)"+re+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+oe+"))|)"+re+"*\\]",ae=":("+ie+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+se+")*)|.*)\\)|)",ue=new RegExp("^"+re+"+|((?:^|[^\\\\])(?:\\\\.)*)"+re+"+$","g"),le=new RegExp("^"+re+"*,"+re+"*"),ce=new RegExp("^"+re+"*([>+~]|"+re+")"+re+"*"),fe=new RegExp("="+re+"*([^\\]'\"]*?)"+re+"*\\]","g"),pe=new RegExp(ae),de=new RegExp("^"+oe+"$"),he={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie.replace("w","w*")+")"),ATTR:new RegExp("^"+se),PSEUDO:new RegExp("^"+ae),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+re+"*(even|odd|(([+-]|)(\\d*)n|)"+re+"*(?:([+-]|)"+re+"*(\\d+)|))"+re+"*\\)|)","i"),bool:new RegExp("^(?:"+ne+")$","i"),needsContext:new RegExp("^"+re+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+re+"*((?:-\\d)?\\d*)"+re+"*\\)|)(?=[^-]|$)","i")},ge=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ve=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,xe=/[+~]/,be=/'|\\/g,we=new RegExp("\\\\([\\da-f]{1,6}"+re+"?|("+re+")|.)","ig"),Te=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{Z.apply(Q=ee.call($.childNodes),$.childNodes),Q[$.childNodes.length].nodeType}catch(Ce){Z={apply:Q.length?function(e,t){K.apply(e,ee.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}w=t.support={},N=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},L=t.setDocument=function(e){var t,n=e?e.ownerDocument||e:$,r=n.defaultView;return n!==q&&9===n.nodeType&&n.documentElement?(q=n,H=n.documentElement,O=!N(n),r&&r!==r.top&&(r.addEventListener?r.addEventListener("unload",function(){L()},!1):r.attachEvent&&r.attachEvent("onunload",function(){L()})),w.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),w.getElementsByTagName=i(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),w.getElementsByClassName=ve.test(n.getElementsByClassName)&&i(function(e){return e.innerHTML="",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),w.getById=i(function(e){return H.appendChild(e).id=W,!n.getElementsByName||!n.getElementsByName(W).length}),w.getById?(T.find.ID=function(e,t){if(typeof t.getElementById!==V&&O){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},T.filter.ID=function(e){var t=e.replace(we,Te);return function(e){return e.getAttribute("id")===t}}):(delete T.find.ID,T.filter.ID=function(e){var t=e.replace(we,Te);return function(e){var n=typeof e.getAttributeNode!==V&&e.getAttributeNode("id");return n&&n.value===t}}),T.find.TAG=w.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==V?t.getElementsByTagName(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},T.find.CLASS=w.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!==V&&O?t.getElementsByClassName(e):void 0},P=[],F=[],(w.qsa=ve.test(n.querySelectorAll))&&(i(function(e){e.innerHTML="",e.querySelectorAll("[msallowclip^='']").length&&F.push("[*^$]="+re+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||F.push("\\["+re+"*(?:value|"+ne+")"),e.querySelectorAll(":checked").length||F.push(":checked")}),i(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&F.push("name"+re+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||F.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),F.push(",.*:")})),(w.matchesSelector=ve.test(M=H.matches||H.webkitMatchesSelector||H.mozMatchesSelector||H.oMatchesSelector||H.msMatchesSelector))&&i(function(e){w.disconnectedMatch=M.call(e,"div"),M.call(e,"[s!='']:x"),P.push("!=",ae)}),F=F.length&&new RegExp(F.join("|")),P=P.length&&new RegExp(P.join("|")),t=ve.test(H.compareDocumentPosition),R=t||ve.test(H.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},U=t?function(e,t){if(e===t)return A=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r?r:(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&r||!w.sortDetached&&t.compareDocumentPosition(e)===r?e===n||e.ownerDocument===$&&R($,e)?-1:t===n||t.ownerDocument===$&&R($,t)?1:D?te.call(D,e)-te.call(D,t):0:4&r?-1:1)}:function(e,t){if(e===t)return A=!0,0;var r,i=0,o=e.parentNode,a=t.parentNode,u=[e],l=[t];if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:D?te.call(D,e)-te.call(D,t):0;if(o===a)return s(e,t);for(r=e;r=r.parentNode;)u.unshift(r);for(r=t;r=r.parentNode;)l.unshift(r);for(;u[i]===l[i];)i++;return i?s(u[i],l[i]):u[i]===$?-1:l[i]===$?1:0},n):q},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==q&&L(e),n=n.replace(fe,"='$1']"),!(!w.matchesSelector||!O||P&&P.test(n)||F&&F.test(n)))try{var r=M.call(e,n);if(r||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return t(n,q,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==q&&L(e),R(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==q&&L(e);var n=T.attrHandle[t.toLowerCase()],r=n&&G.call(T.attrHandle,t.toLowerCase())?n(e,t,!O):void 0;return void 0!==r?r:w.attributes||!O?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(A=!w.detectDuplicates,D=!w.sortStable&&e.slice(0),e.sort(U),A){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return D=null,e},C=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=C(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=C(t);return n},T=t.selectors={cacheLength:50,createPseudo:r,match:he,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(we,Te),e[3]=(e[3]||e[4]||e[5]||"").replace(we,Te),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return he.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&pe.test(n)&&(t=k(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(we,Te).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=_[e+" "];return t||(t=new RegExp("(^|"+re+")"+e+"("+re+"|$)"))&&_(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==V&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:n?(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o+" ").indexOf(r)>-1:"|="===n?o===r||o.slice(0,r.length+1)===r+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==s?"nextSibling":"previousSibling",m=t.parentNode,v=a&&t.nodeName.toLowerCase(),y=!u&&!a;if(m){if(o){for(;g;){for(f=t;f=f[g];)if(a?f.nodeName.toLowerCase()===v:1===f.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[s?m.firstChild:m.lastChild],s&&y){for(c=m[W]||(m[W]={}),l=c[e]||[],d=l[0]===B&&l[1],p=l[0]===B&&l[2],f=d&&m.childNodes[d];f=++d&&f&&f[g]||(p=d=0)||h.pop();)if(1===f.nodeType&&++p&&f===t){c[e]=[B,d,p];break}}else if(y&&(l=(t[W]||(t[W]={}))[e])&&l[0]===B)p=l[1];else for(;(f=++d&&f&&f[g]||(p=d=0)||h.pop())&&((a?f.nodeName.toLowerCase()!==v:1!==f.nodeType)||!++p||(y&&((f[W]||(f[W]={}))[e]=[B,p]),f!==t)););return p-=i,p===r||p%r===0&&p/r>=0}}},PSEUDO:function(e,n){var i,o=T.pseudos[e]||T.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[W]?o(n):o.length>1?(i=[e,e,"",n],T.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),s=i.length;s--;)r=te.call(e,i[s]),e[r]=!(t[r]=i[s])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=E(e.replace(ue,"$1"));return i[W]?r(function(e,t,n,r){for(var o,s=i(e,null,r,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return function(t){return(t.textContent||t.innerText||C(t)).indexOf(e)>-1}}),lang:r(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(we,Te).toLowerCase(),function(t){var n;do if(n=O?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===H},focus:function(e){return e===q.activeElement&&(!q.hasFocus||q.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!T.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return ge.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[0>n?n+t:n]}),even:l(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:l(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:l(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=0>n?n+t:n;++r2&&"ID"===(s=o[0]).type&&w.getById&&9===t.nodeType&&O&&T.relative[o[1].type]){if(t=(T.find.ID(s.matches[0].replace(we,Te),t)||[])[0],!t)return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=he.needsContext.test(e)?0:o.length;i--&&(s=o[i],!T.relative[a=s.type]);)if((u=T.find[a])&&(r=u(s.matches[0].replace(we,Te),xe.test(o[0].type)&&c(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&p(o),!e)return Z.apply(n,r),n;break}}return(l||E(e,f))(r,t,!O,n,xe.test(e)&&c(t.parentNode)||t),n},w.sortStable=W.split("").sort(U).join("")===W,w.detectDuplicates=!!A,L(),w.sortDetached=i(function(e){return 1&e.compareDocumentPosition(q.createElement("div"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(ne,function(e,t,n){var r;return n?void 0:e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);Z.find=ie,Z.expr=ie.selectors,Z.expr[":"]=Z.expr.pseudos,Z.unique=ie.uniqueSort,Z.text=ie.getText,Z.isXMLDoc=ie.isXML,Z.contains=ie.contains;var oe=Z.expr.match.needsContext,se=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ae=/^.[^:#\[\.,]*$/;Z.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?Z.find.matchesSelector(r,e)?[r]:[]:Z.find.matches(e,Z.grep(t,function(e){return 1===e.nodeType}))},Z.fn.extend({find:function(e){var t,n=this.length,r=[],i=this;if("string"!=typeof e)return this.pushStack(Z(e).filter(function(){
2 | for(t=0;n>t;t++)if(Z.contains(i[t],this))return!0}));for(t=0;n>t;t++)Z.find(e,i[t],r);return r=this.pushStack(n>1?Z.unique(r):r),r.selector=this.selector?this.selector+" "+e:e,r},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&oe.test(e)?Z(e):e||[],!1).length}});var ue,le=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ce=Z.fn.init=function(e,t){var n,r;if(!e)return this;if("string"==typeof e){if(n="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:le.exec(e),!n||!n[1]&&t)return!t||t.jquery?(t||ue).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof Z?t[0]:t,Z.merge(this,Z.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:J,!0)),se.test(n[1])&&Z.isPlainObject(t))for(n in t)Z.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return r=J.getElementById(n[2]),r&&r.parentNode&&(this.length=1,this[0]=r),this.context=J,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):Z.isFunction(e)?"undefined"!=typeof ue.ready?ue.ready(e):e(Z):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),Z.makeArray(e,this))};ce.prototype=Z.fn,ue=Z(J);var fe=/^(?:parents|prev(?:Until|All))/,pe={children:!0,contents:!0,next:!0,prev:!0};Z.extend({dir:function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&Z(e).is(n))break;r.push(e)}return r},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),Z.fn.extend({has:function(e){var t=Z(e,this),n=t.length;return this.filter(function(){for(var e=0;n>e;e++)if(Z.contains(this,t[e]))return!0})},closest:function(e,t){for(var n,r=0,i=this.length,o=[],s=oe.test(e)||"string"!=typeof e?Z(e,t||this.context):0;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&Z.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?Z.unique(o):o)},index:function(e){return e?"string"==typeof e?U.call(Z(e),this[0]):U.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(Z.unique(Z.merge(this.get(),Z(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),Z.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Z.dir(e,"parentNode")},parentsUntil:function(e,t,n){return Z.dir(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return Z.dir(e,"nextSibling")},prevAll:function(e){return Z.dir(e,"previousSibling")},nextUntil:function(e,t,n){return Z.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return Z.dir(e,"previousSibling",n)},siblings:function(e){return Z.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return Z.sibling(e.firstChild)},contents:function(e){return e.contentDocument||Z.merge([],e.childNodes)}},function(e,t){Z.fn[e]=function(n,r){var i=Z.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=Z.filter(r,i)),this.length>1&&(pe[e]||Z.unique(i),fe.test(e)&&i.reverse()),this.pushStack(i)}});var de=/\S+/g,he={};Z.Callbacks=function(e){e="string"==typeof e?he[e]||o(e):Z.extend({},e);var t,n,r,i,s,a,u=[],l=!e.once&&[],c=function(o){for(t=e.memory&&o,n=!0,a=i||0,i=0,s=u.length,r=!0;u&&s>a;a++)if(u[a].apply(o[0],o[1])===!1&&e.stopOnFalse){t=!1;break}r=!1,u&&(l?l.length&&c(l.shift()):t?u=[]:f.disable())},f={add:function(){if(u){var n=u.length;!function o(t){Z.each(t,function(t,n){var r=Z.type(n);"function"===r?e.unique&&f.has(n)||u.push(n):n&&n.length&&"string"!==r&&o(n)})}(arguments),r?s=u.length:t&&(i=n,c(t))}return this},remove:function(){return u&&Z.each(arguments,function(e,t){for(var n;(n=Z.inArray(t,u,n))>-1;)u.splice(n,1),r&&(s>=n&&s--,a>=n&&a--)}),this},has:function(e){return e?Z.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],s=0,this},disable:function(){return u=l=t=void 0,this},disabled:function(){return!u},lock:function(){return l=void 0,t||f.disable(),this},locked:function(){return!l},fireWith:function(e,t){return!u||n&&!l||(t=t||[],t=[e,t.slice?t.slice():t],r?l.push(t):c(t)),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!n}};return f},Z.extend({Deferred:function(e){var t=[["resolve","done",Z.Callbacks("once memory"),"resolved"],["reject","fail",Z.Callbacks("once memory"),"rejected"],["notify","progress",Z.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return Z.Deferred(function(n){Z.each(t,function(t,o){var s=Z.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&Z.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o[0]+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?Z.extend(e,r):r}},i={};return r.pipe=r.then,Z.each(t,function(e,o){var s=o[2],a=o[3];r[o[1]]=s.add,a&&s.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=s.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=_.call(arguments),s=o.length,a=1!==s||e&&Z.isFunction(e.promise)?s:0,u=1===a?e:Z.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?_.call(arguments):i,r===t?u.notifyWith(n,r):--a||u.resolveWith(n,r)}};if(s>1)for(t=new Array(s),n=new Array(s),r=new Array(s);s>i;i++)o[i]&&Z.isFunction(o[i].promise)?o[i].promise().done(l(i,r,o)).fail(u.reject).progress(l(i,n,t)):--a;return a||u.resolveWith(r,o),u.promise()}});var ge;Z.fn.ready=function(e){return Z.ready.promise().done(e),this},Z.extend({isReady:!1,readyWait:1,holdReady:function(e){e?Z.readyWait++:Z.ready(!0)},ready:function(e){(e===!0?--Z.readyWait:Z.isReady)||(Z.isReady=!0,e!==!0&&--Z.readyWait>0||(ge.resolveWith(J,[Z]),Z.fn.triggerHandler&&(Z(J).triggerHandler("ready"),Z(J).off("ready"))))}}),Z.ready.promise=function(t){return ge||(ge=Z.Deferred(),"complete"===J.readyState?setTimeout(Z.ready):(J.addEventListener("DOMContentLoaded",s,!1),e.addEventListener("load",s,!1))),ge.promise(t)},Z.ready.promise();var me=Z.access=function(e,t,n,r,i,o,s){var a=0,u=e.length,l=null==n;if("object"===Z.type(n)){i=!0;for(a in n)Z.access(e,t,a,n[a],!0,o,s)}else if(void 0!==r&&(i=!0,Z.isFunction(r)||(s=!0),l&&(s?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(Z(e),n)})),t))for(;u>a;a++)t(e[a],n,s?r:r.call(e[a],a,t(e[a],n)));return i?e:l?t.call(e):u?t(e[0],n):o};Z.acceptData=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType},a.uid=1,a.accepts=Z.acceptData,a.prototype={key:function(e){if(!a.accepts(e))return 0;var t={},n=e[this.expando];if(!n){n=a.uid++;try{t[this.expando]={value:n},Object.defineProperties(e,t)}catch(r){t[this.expando]=n,Z.extend(e,t)}}return this.cache[n]||(this.cache[n]={}),n},set:function(e,t,n){var r,i=this.key(e),o=this.cache[i];if("string"==typeof t)o[t]=n;else if(Z.isEmptyObject(o))Z.extend(this.cache[i],t);else for(r in t)o[r]=t[r];return o},get:function(e,t){var n=this.cache[this.key(e)];return void 0===t?n:n[t]},access:function(e,t,n){var r;return void 0===t||t&&"string"==typeof t&&void 0===n?(r=this.get(e,t),void 0!==r?r:this.get(e,Z.camelCase(t))):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r,i,o=this.key(e),s=this.cache[o];if(void 0===t)this.cache[o]={};else{Z.isArray(t)?r=t.concat(t.map(Z.camelCase)):(i=Z.camelCase(t),t in s?r=[t,i]:(r=i,r=r in s?[r]:r.match(de)||[])),n=r.length;for(;n--;)delete s[r[n]]}},hasData:function(e){return!Z.isEmptyObject(this.cache[e[this.expando]]||{})},discard:function(e){e[this.expando]&&delete this.cache[e[this.expando]]}};var ve=new a,ye=new a,xe=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,be=/([A-Z])/g;Z.extend({hasData:function(e){return ye.hasData(e)||ve.hasData(e)},data:function(e,t,n){return ye.access(e,t,n)},removeData:function(e,t){ye.remove(e,t)},_data:function(e,t,n){return ve.access(e,t,n)},_removeData:function(e,t){ve.remove(e,t)}}),Z.fn.extend({data:function(e,t){var n,r,i,o=this[0],s=o&&o.attributes;if(void 0===e){if(this.length&&(i=ye.get(o),1===o.nodeType&&!ve.get(o,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&(r=s[n].name,0===r.indexOf("data-")&&(r=Z.camelCase(r.slice(5)),u(o,r,i[r])));ve.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){ye.set(this,e)}):me(this,function(t){var n,r=Z.camelCase(e);if(o&&void 0===t){if(n=ye.get(o,e),void 0!==n)return n;if(n=ye.get(o,r),void 0!==n)return n;if(n=u(o,r,void 0),void 0!==n)return n}else this.each(function(){var n=ye.get(this,r);ye.set(this,r,t),-1!==e.indexOf("-")&&void 0!==n&&ye.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){ye.remove(this,e)})}}),Z.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=ve.get(e,t),n&&(!r||Z.isArray(n)?r=ve.access(e,t,Z.makeArray(n)):r.push(n)),r||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=Z.queue(e,t),r=n.length,i=n.shift(),o=Z._queueHooks(e,t),s=function(){Z.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,s,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ve.get(e,n)||ve.access(e,n,{empty:Z.Callbacks("once memory").add(function(){ve.remove(e,[t+"queue",n])})})}}),Z.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.lengthx",Q.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var ke="undefined";Q.focusinBubbles="onfocusin"in e;var Ee=/^key/,Se=/^(?:mouse|pointer|contextmenu)|click/,je=/^(?:focusinfocus|focusoutblur)$/,De=/^([^.]*)(?:\.(.+)|)$/;Z.event={global:{},add:function(e,t,n,r,i){var o,s,a,u,l,c,f,p,d,h,g,m=ve.get(e);if(m)for(n.handler&&(o=n,n=o.handler,i=o.selector),n.guid||(n.guid=Z.guid++),(u=m.events)||(u=m.events={}),(s=m.handle)||(s=m.handle=function(t){return typeof Z!==ke&&Z.event.triggered!==t.type?Z.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(de)||[""],l=t.length;l--;)a=De.exec(t[l])||[],d=g=a[1],h=(a[2]||"").split(".").sort(),d&&(f=Z.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=Z.event.special[d]||{},c=Z.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&Z.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||(p=u[d]=[],p.delegateCount=0,f.setup&&f.setup.call(e,r,h,s)!==!1||e.addEventListener&&e.addEventListener(d,s,!1)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),Z.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,s,a,u,l,c,f,p,d,h,g,m=ve.hasData(e)&&ve.get(e);if(m&&(u=m.events)){for(t=(t||"").match(de)||[""],l=t.length;l--;)if(a=De.exec(t[l])||[],d=g=a[1],h=(a[2]||"").split(".").sort(),d){for(f=Z.event.special[d]||{},d=(r?f.delegateType:f.bindType)||d,p=u[d]||[],a=a[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));s&&!p.length&&(f.teardown&&f.teardown.call(e,h,m.handle)!==!1||Z.removeEvent(e,d,m.handle),delete u[d])}else for(d in u)Z.event.remove(e,d+t[l],n,r,!0);Z.isEmptyObject(u)&&(delete m.handle,ve.remove(e,"events"))}},trigger:function(t,n,r,i){var o,s,a,u,l,c,f,p=[r||J],d=G.call(t,"type")?t.type:t,h=G.call(t,"namespace")?t.namespace.split("."):[];if(s=a=r=r||J,3!==r.nodeType&&8!==r.nodeType&&!je.test(d+Z.event.triggered)&&(d.indexOf(".")>=0&&(h=d.split("."),d=h.shift(),h.sort()),l=d.indexOf(":")<0&&"on"+d,t=t[Z.expando]?t:new Z.Event(d,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=h.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:Z.makeArray(n,[t]),f=Z.event.special[d]||{},i||!f.trigger||f.trigger.apply(r,n)!==!1)){if(!i&&!f.noBubble&&!Z.isWindow(r)){for(u=f.delegateType||d,je.test(u+d)||(s=s.parentNode);s;s=s.parentNode)p.push(s),a=s;a===(r.ownerDocument||J)&&p.push(a.defaultView||a.parentWindow||e)}for(o=0;(s=p[o++])&&!t.isPropagationStopped();)t.type=o>1?u:f.bindType||d,c=(ve.get(s,"events")||{})[t.type]&&ve.get(s,"handle"),c&&c.apply(s,n),c=l&&s[l],c&&c.apply&&Z.acceptData(s)&&(t.result=c.apply(s,n),t.result===!1&&t.preventDefault());return t.type=d,i||t.isDefaultPrevented()||f._default&&f._default.apply(p.pop(),n)!==!1||!Z.acceptData(r)||l&&Z.isFunction(r[d])&&!Z.isWindow(r)&&(a=r[l],a&&(r[l]=null),Z.event.triggered=d,r[d](),Z.event.triggered=void 0,a&&(r[l]=a)),t.result}},dispatch:function(e){e=Z.event.fix(e);var t,n,r,i,o,s=[],a=_.call(arguments),u=(ve.get(this,"events")||{})[e.type]||[],l=Z.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){for(s=Z.event.handlers.call(this,e,u),t=0;(i=s[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(o.namespace))&&(e.handleObj=o,e.data=o.data,r=((Z.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,a),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,s=[],a=t.delegateCount,u=e.target;if(a&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!==this;u=u.parentNode||this)if(u.disabled!==!0||"click"!==e.type){for(r=[],n=0;a>n;n++)o=t[n],i=o.selector+" ",void 0===r[i]&&(r[i]=o.needsContext?Z(i,this).index(u)>=0:Z.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&s.push({elem:u,handlers:r})}return a]*)\/>/gi,Le=/<([\w:]+)/,qe=/<|?\w+;/,He=/<(?:script|style|link)/i,Oe=/checked\s*(?:[^=]|=\s*.checked.)/i,Fe=/^$|\/(?:java|ecma)script/i,Pe=/^true\/(.*)/,Me=/^\s*\s*$/g,Re={option:[1,""],thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};Re.optgroup=Re.option,Re.tbody=Re.tfoot=Re.colgroup=Re.caption=Re.thead,Re.th=Re.td,Z.extend({clone:function(e,t,n){var r,i,o,s,a=e.cloneNode(!0),u=Z.contains(e.ownerDocument,e);if(!(Q.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||Z.isXMLDoc(e)))for(s=v(a),o=v(e),r=0,i=o.length;i>r;r++)y(o[r],s[r]);if(t)if(n)for(o=o||v(e),s=s||v(a),r=0,i=o.length;i>r;r++)m(o[r],s[r]);else m(e,a);return s=v(a,"script"),s.length>0&&g(s,!u&&v(e,"script")),a},buildFragment:function(e,t,n,r){for(var i,o,s,a,u,l,c=t.createDocumentFragment(),f=[],p=0,d=e.length;d>p;p++)if(i=e[p],i||0===i)if("object"===Z.type(i))Z.merge(f,i.nodeType?[i]:i);else if(qe.test(i)){for(o=o||c.appendChild(t.createElement("div")),s=(Le.exec(i)||["",""])[1].toLowerCase(),a=Re[s]||Re._default,o.innerHTML=a[1]+i.replace(Ae,"<$1>$2>")+a[2],l=a[0];l--;)o=o.lastChild;Z.merge(f,o.childNodes),o=c.firstChild,o.textContent=""}else f.push(t.createTextNode(i));for(c.textContent="",p=0;i=f[p++];)if((!r||-1===Z.inArray(i,r))&&(u=Z.contains(i.ownerDocument,i),o=v(c.appendChild(i),"script"),u&&g(o),n))for(l=0;i=o[l++];)Fe.test(i.type||"")&&n.push(i);return c},cleanData:function(e){for(var t,n,r,i,o=Z.event.special,s=0;void 0!==(n=e[s]);s++){if(Z.acceptData(n)&&(i=n[ve.expando],i&&(t=ve.cache[i]))){if(t.events)for(r in t.events)o[r]?Z.event.remove(n,r):Z.removeEvent(n,r,t.handle);ve.cache[i]&&delete ve.cache[i]}delete ye.cache[n[ye.expando]]}}}),Z.fn.extend({text:function(e){return me(this,function(e){return void 0===e?Z.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=e)})},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=p(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=p(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,r=e?Z.filter(e,this):this,i=0;null!=(n=r[i]);i++)t||1!==n.nodeType||Z.cleanData(v(n)),n.parentNode&&(t&&Z.contains(n.ownerDocument,n)&&g(v(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(Z.cleanData(v(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return Z.clone(this,e,t)})},html:function(e){return me(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!He.test(e)&&!Re[(Le.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(Ae,"<$1>$2>");try{for(;r>n;n++)t=this[n]||{},1===t.nodeType&&(Z.cleanData(v(t,!1)),t.innerHTML=e);t=0}catch(i){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,Z.cleanData(v(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=z.apply([],e);var n,r,i,o,s,a,u=0,l=this.length,c=this,f=l-1,p=e[0],g=Z.isFunction(p);if(g||l>1&&"string"==typeof p&&!Q.checkClone&&Oe.test(p))return this.each(function(n){var r=c.eq(n);g&&(e[0]=p.call(this,n,r.html())),r.domManip(e,t)});if(l&&(n=Z.buildFragment(e,this[0].ownerDocument,!1,this),r=n.firstChild,1===n.childNodes.length&&(n=r),r)){for(i=Z.map(v(n,"script"),d),o=i.length;l>u;u++)s=n,u!==f&&(s=Z.clone(s,!0,!0),o&&Z.merge(i,v(s,"script"))),t.call(this[u],s,u);if(o)for(a=i[i.length-1].ownerDocument,Z.map(i,h),u=0;o>u;u++)s=i[u],Fe.test(s.type||"")&&!ve.access(s,"globalEval")&&Z.contains(a,s)&&(s.src?Z._evalUrl&&Z._evalUrl(s.src):Z.globalEval(s.textContent.replace(Me,"")))}return this}}),Z.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){Z.fn[e]=function(e){for(var n,r=[],i=Z(e),o=i.length-1,s=0;o>=s;s++)n=s===o?this:this.clone(!0),Z(i[s])[t](n),X.apply(r,n.get());return this.pushStack(r)}});var We,$e={},Be=/^margin/,Ie=new RegExp("^("+we+")(?!px)[a-z%]+$","i"),_e=function(e){return e.ownerDocument.defaultView.getComputedStyle(e,null)};!function(){function t(){s.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",s.innerHTML="",i.appendChild(o);var t=e.getComputedStyle(s,null);n="1%"!==t.top,r="4px"===t.width,i.removeChild(o)}var n,r,i=J.documentElement,o=J.createElement("div"),s=J.createElement("div");s.style&&(s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",Q.clearCloneStyle="content-box"===s.style.backgroundClip,o.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",o.appendChild(s),e.getComputedStyle&&Z.extend(Q,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return null==r&&t(),r},reliableMarginRight:function(){var t,n=s.appendChild(J.createElement("div"));return n.style.cssText=s.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",n.style.marginRight=n.style.width="0",s.style.width="1px",i.appendChild(o),t=!parseFloat(e.getComputedStyle(n,null).marginRight),i.removeChild(o),t}}))}(),Z.swap=function(e,t,n,r){var i,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=s[o];return i};var ze=/^(none|table(?!-c[ea]).+)/,Xe=new RegExp("^("+we+")(.*)$","i"),Ue=new RegExp("^([+-])=("+we+")","i"),Ve={position:"absolute",visibility:"hidden",display:"block"},Ye={letterSpacing:"0",fontWeight:"400"},Ge=["Webkit","O","Moz","ms"];Z.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=w(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=Z.camelCase(t),u=e.style;return t=Z.cssProps[a]||(Z.cssProps[a]=C(u,a)),s=Z.cssHooks[t]||Z.cssHooks[a],void 0===n?s&&"get"in s&&void 0!==(i=s.get(e,!1,r))?i:u[t]:(o=typeof n,"string"===o&&(i=Ue.exec(n))&&(n=(i[1]+1)*i[2]+parseFloat(Z.css(e,t)),o="number"),void(null!=n&&n===n&&("number"!==o||Z.cssNumber[a]||(n+="px"),Q.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(u[t]=n))))}},css:function(e,t,n,r){var i,o,s,a=Z.camelCase(t);return t=Z.cssProps[a]||(Z.cssProps[a]=C(e.style,a)),s=Z.cssHooks[t]||Z.cssHooks[a],s&&"get"in s&&(i=s.get(e,!0,n)),void 0===i&&(i=w(e,t,r)),"normal"===i&&t in Ye&&(i=Ye[t]),""===n||n?(o=parseFloat(i),n===!0||Z.isNumeric(o)?o||0:i):i}}),Z.each(["height","width"],function(e,t){Z.cssHooks[t]={get:function(e,n,r){return n?ze.test(Z.css(e,"display"))&&0===e.offsetWidth?Z.swap(e,Ve,function(){return E(e,t,r)}):E(e,t,r):void 0},set:function(e,n,r){var i=r&&_e(e);return N(e,n,r?k(e,t,r,"border-box"===Z.css(e,"boxSizing",!1,i),i):0)}}}),Z.cssHooks.marginRight=T(Q.reliableMarginRight,function(e,t){return t?Z.swap(e,{display:"inline-block"},w,[e,"marginRight"]):void 0}),Z.each({margin:"",padding:"",border:"Width"},function(e,t){Z.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];4>r;r++)i[e+Te[r]+t]=o[r]||o[r-2]||o[0];return i}},Be.test(e)||(Z.cssHooks[e+t].set=N)}),Z.fn.extend({css:function(e,t){return me(this,function(e,t,n){var r,i,o={},s=0;if(Z.isArray(t)){for(r=_e(e),i=t.length;i>s;s++)o[t[s]]=Z.css(e,t[s],!1,r);return o}return void 0!==n?Z.style(e,t,n):Z.css(e,t)},e,t,arguments.length>1)},show:function(){return S(this,!0)},hide:function(){return S(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Ce(this)?Z(this).show():Z(this).hide()})}}),Z.Tween=j,j.prototype={constructor:j,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(Z.cssNumber[n]?"":"px")},cur:function(){var e=j.propHooks[this.prop];return e&&e.get?e.get(this):j.propHooks._default.get(this)},run:function(e){var t,n=j.propHooks[this.prop];return this.pos=t=this.options.duration?Z.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):j.propHooks._default.set(this),this}},j.prototype.init.prototype=j.prototype,j.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=Z.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){Z.fx.step[e.prop]?Z.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[Z.cssProps[e.prop]]||Z.cssHooks[e.prop])?Z.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},j.propHooks.scrollTop=j.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},Z.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},Z.fx=j.prototype.init,Z.fx.step={};var Qe,Je,Ke=/^(?:toggle|show|hide)$/,Ze=new RegExp("^(?:([+-])=|)("+we+")([a-z%]*)$","i"),et=/queueHooks$/,tt=[q],nt={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Ze.exec(t),o=i&&i[3]||(Z.cssNumber[e]?"":"px"),s=(Z.cssNumber[e]||"px"!==o&&+r)&&Ze.exec(Z.css(n.elem,e)),a=1,u=20;if(s&&s[3]!==o){o=o||s[3],i=i||[],s=+r||1;do a=a||".5",s/=a,Z.style(n.elem,e,s+o);while(a!==(a=n.cur()/r)&&1!==a&&--u)}return i&&(s=n.start=+s||+r||0,n.unit=o,n.end=i[1]?s+(i[1]+1)*i[2]:+i[2]),n}]};Z.Animation=Z.extend(O,{tweener:function(e,t){Z.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,i=e.length;i>r;r++)n=e[r],nt[n]=nt[n]||[],nt[n].unshift(t)},prefilter:function(e,t){t?tt.unshift(e):tt.push(e)}}),Z.speed=function(e,t,n){var r=e&&"object"==typeof e?Z.extend({},e):{complete:n||!n&&t||Z.isFunction(e)&&e,duration:e,easing:n&&t||t&&!Z.isFunction(t)&&t};return r.duration=Z.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in Z.fx.speeds?Z.fx.speeds[r.duration]:Z.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){Z.isFunction(r.old)&&r.old.call(this),r.queue&&Z.dequeue(this,r.queue)},r},Z.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Ce).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=Z.isEmptyObject(e),o=Z.speed(t,n,r),s=function(){var t=O(this,Z.extend({},e),o);(i||ve.get(this,"finish"))&&t.stop(!0)};return s.finish=s,i||o.queue===!1?this.each(s):this.queue(o.queue,s)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=Z.timers,s=ve.get(this);if(i)s[i]&&s[i].stop&&r(s[i]);else for(i in s)s[i]&&s[i].stop&&et.test(i)&&r(s[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));(t||!n)&&Z.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=ve.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=Z.timers,s=r?r.length:0;for(n.finish=!0,Z.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;s>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);
3 |
4 | delete n.finish})}}),Z.each(["toggle","show","hide"],function(e,t){var n=Z.fn[t];Z.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(A(t,!0),e,r,i)}}),Z.each({slideDown:A("show"),slideUp:A("hide"),slideToggle:A("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){Z.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),Z.timers=[],Z.fx.tick=function(){var e,t=0,n=Z.timers;for(Qe=Z.now();t1)},removeAttr:function(e){return this.each(function(){Z.removeAttr(this,e)})}}),Z.extend({attr:function(e,t,n){var r,i,o=e.nodeType;return e&&3!==o&&8!==o&&2!==o?typeof e.getAttribute===ke?Z.prop(e,t,n):(1===o&&Z.isXMLDoc(e)||(t=t.toLowerCase(),r=Z.attrHooks[t]||(Z.expr.match.bool.test(t)?it:rt)),void 0===n?r&&"get"in r&&null!==(i=r.get(e,t))?i:(i=Z.find.attr(e,t),null==i?void 0:i):null!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):void Z.removeAttr(e,t)):void 0},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(de);if(o&&1===e.nodeType)for(;n=o[i++];)r=Z.propFix[n]||n,Z.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!Q.radioValue&&"radio"===t&&Z.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),it={set:function(e,t,n){return t===!1?Z.removeAttr(e,n):e.setAttribute(n,n),n}},Z.each(Z.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ot[t]||Z.find.attr;ot[t]=function(e,t,r){var i,o;return r||(o=ot[t],ot[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,ot[t]=o),i}});var st=/^(?:input|select|textarea|button)$/i;Z.fn.extend({prop:function(e,t){return me(this,Z.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[Z.propFix[e]||e]})}}),Z.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var r,i,o,s=e.nodeType;return e&&3!==s&&8!==s&&2!==s?(o=1!==s||!Z.isXMLDoc(e),o&&(t=Z.propFix[t]||t,i=Z.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]):void 0},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||st.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),Q.optSelected||(Z.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),Z.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){Z.propFix[this.toLowerCase()]=this});var at=/[\t\r\n\f]/g;Z.fn.extend({addClass:function(e){var t,n,r,i,o,s,a="string"==typeof e&&e,u=0,l=this.length;if(Z.isFunction(e))return this.each(function(t){Z(this).addClass(e.call(this,t,this.className))});if(a)for(t=(e||"").match(de)||[];l>u;u++)if(n=this[u],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(at," "):" ")){for(o=0;i=t[o++];)r.indexOf(" "+i+" ")<0&&(r+=i+" ");s=Z.trim(r),n.className!==s&&(n.className=s)}return this},removeClass:function(e){var t,n,r,i,o,s,a=0===arguments.length||"string"==typeof e&&e,u=0,l=this.length;if(Z.isFunction(e))return this.each(function(t){Z(this).removeClass(e.call(this,t,this.className))});if(a)for(t=(e||"").match(de)||[];l>u;u++)if(n=this[u],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(at," "):"")){for(o=0;i=t[o++];)for(;r.indexOf(" "+i+" ")>=0;)r=r.replace(" "+i+" "," ");s=e?Z.trim(r):"",n.className!==s&&(n.className=s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):this.each(Z.isFunction(e)?function(n){Z(this).toggleClass(e.call(this,n,this.className,t),t)}:function(){if("string"===n)for(var t,r=0,i=Z(this),o=e.match(de)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else(n===ke||"boolean"===n)&&(this.className&&ve.set(this,"__className__",this.className),this.className=this.className||e===!1?"":ve.get(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(at," ").indexOf(t)>=0)return!0;return!1}});var ut=/\r/g;Z.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=Z.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,Z(this).val()):e,null==i?i="":"number"==typeof i?i+="":Z.isArray(i)&&(i=Z.map(i,function(e){return null==e?"":e+""})),t=Z.valHooks[this.type]||Z.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})):i?(t=Z.valHooks[i.type]||Z.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(ut,""):null==n?"":n)):void 0}}),Z.extend({valHooks:{option:{get:function(e){var t=Z.find.attr(e,"value");return null!=t?t:Z.trim(Z.text(e))}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,s=o?null:[],a=o?i+1:r.length,u=0>i?a:o?i:0;a>u;u++)if(n=r[u],!(!n.selected&&u!==i||(Q.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&Z.nodeName(n.parentNode,"optgroup"))){if(t=Z(n).val(),o)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=Z.makeArray(t),s=i.length;s--;)r=i[s],(r.selected=Z.inArray(r.value,o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),Z.each(["radio","checkbox"],function(){Z.valHooks[this]={set:function(e,t){return Z.isArray(t)?e.checked=Z.inArray(Z(e).val(),t)>=0:void 0}},Q.checkOn||(Z.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),Z.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){Z.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),Z.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var lt=Z.now(),ct=/\?/;Z.parseJSON=function(e){return JSON.parse(e+"")},Z.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(r){t=void 0}return(!t||t.getElementsByTagName("parsererror").length)&&Z.error("Invalid XML: "+e),t};var ft,pt,dt=/#.*$/,ht=/([?&])_=[^&]*/,gt=/^(.*?):[ \t]*([^\r\n]*)$/gm,mt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,vt=/^(?:GET|HEAD)$/,yt=/^\/\//,xt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,bt={},wt={},Tt="*/".concat("*");try{pt=location.href}catch(Ct){pt=J.createElement("a"),pt.href="",pt=pt.href}ft=xt.exec(pt.toLowerCase())||[],Z.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:pt,type:"GET",isLocal:mt.test(ft[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Tt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":Z.parseJSON,"text xml":Z.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?M(M(e,Z.ajaxSettings),t):M(Z.ajaxSettings,e)},ajaxPrefilter:F(bt),ajaxTransport:F(wt),ajax:function(e,t){function n(e,t,n,s){var u,c,v,y,b,T=t;2!==x&&(x=2,a&&clearTimeout(a),r=void 0,o=s||"",w.readyState=e>0?4:0,u=e>=200&&300>e||304===e,n&&(y=R(f,w,n)),y=W(f,y,w,u),u?(f.ifModified&&(b=w.getResponseHeader("Last-Modified"),b&&(Z.lastModified[i]=b),b=w.getResponseHeader("etag"),b&&(Z.etag[i]=b)),204===e||"HEAD"===f.type?T="nocontent":304===e?T="notmodified":(T=y.state,c=y.data,v=y.error,u=!v)):(v=T,(e||!T)&&(T="error",0>e&&(e=0))),w.status=e,w.statusText=(t||T)+"",u?h.resolveWith(p,[c,T,w]):h.rejectWith(p,[w,T,v]),w.statusCode(m),m=void 0,l&&d.trigger(u?"ajaxSuccess":"ajaxError",[w,f,u?c:v]),g.fireWith(p,[w,T]),l&&(d.trigger("ajaxComplete",[w,f]),--Z.active||Z.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,i,o,s,a,u,l,c,f=Z.ajaxSetup({},t),p=f.context||f,d=f.context&&(p.nodeType||p.jquery)?Z(p):Z.event,h=Z.Deferred(),g=Z.Callbacks("once memory"),m=f.statusCode||{},v={},y={},x=0,b="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!s)for(s={};t=gt.exec(o);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?o:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=y[n]=y[n]||e,v[e]=t),this},overrideMimeType:function(e){return x||(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)m[t]=[m[t],e[t]];else w.always(e[w.status]);return this},abort:function(e){var t=e||b;return r&&r.abort(t),n(0,t),this}};if(h.promise(w).complete=g.add,w.success=w.done,w.error=w.fail,f.url=((e||f.url||pt)+"").replace(dt,"").replace(yt,ft[1]+"//"),f.type=t.method||t.type||f.method||f.type,f.dataTypes=Z.trim(f.dataType||"*").toLowerCase().match(de)||[""],null==f.crossDomain&&(u=xt.exec(f.url.toLowerCase()),f.crossDomain=!(!u||u[1]===ft[1]&&u[2]===ft[2]&&(u[3]||("http:"===u[1]?"80":"443"))===(ft[3]||("http:"===ft[1]?"80":"443")))),f.data&&f.processData&&"string"!=typeof f.data&&(f.data=Z.param(f.data,f.traditional)),P(bt,f,t,w),2===x)return w;l=f.global,l&&0===Z.active++&&Z.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!vt.test(f.type),i=f.url,f.hasContent||(f.data&&(i=f.url+=(ct.test(i)?"&":"?")+f.data,delete f.data),f.cache===!1&&(f.url=ht.test(i)?i.replace(ht,"$1_="+lt++):i+(ct.test(i)?"&":"?")+"_="+lt++)),f.ifModified&&(Z.lastModified[i]&&w.setRequestHeader("If-Modified-Since",Z.lastModified[i]),Z.etag[i]&&w.setRequestHeader("If-None-Match",Z.etag[i])),(f.data&&f.hasContent&&f.contentType!==!1||t.contentType)&&w.setRequestHeader("Content-Type",f.contentType),w.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Tt+"; q=0.01":""):f.accepts["*"]);for(c in f.headers)w.setRequestHeader(c,f.headers[c]);if(f.beforeSend&&(f.beforeSend.call(p,w,f)===!1||2===x))return w.abort();b="abort";for(c in{success:1,error:1,complete:1})w[c](f[c]);if(r=P(wt,f,t,w)){w.readyState=1,l&&d.trigger("ajaxSend",[w,f]),f.async&&f.timeout>0&&(a=setTimeout(function(){w.abort("timeout")},f.timeout));try{x=1,r.send(v,n)}catch(T){if(!(2>x))throw T;n(-1,T)}}else n(-1,"No Transport");return w},getJSON:function(e,t,n){return Z.get(e,t,n,"json")},getScript:function(e,t){return Z.get(e,void 0,t,"script")}}),Z.each(["get","post"],function(e,t){Z[t]=function(e,n,r,i){return Z.isFunction(n)&&(i=i||r,r=n,n=void 0),Z.ajax({url:e,type:t,dataType:i,data:n,success:r})}}),Z.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){Z.fn[t]=function(e){return this.on(t,e)}}),Z._evalUrl=function(e){return Z.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},Z.fn.extend({wrapAll:function(e){var t;return Z.isFunction(e)?this.each(function(t){Z(this).wrapAll(e.call(this,t))}):(this[0]&&(t=Z(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return this.each(Z.isFunction(e)?function(t){Z(this).wrapInner(e.call(this,t))}:function(){var t=Z(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=Z.isFunction(e);return this.each(function(n){Z(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){Z.nodeName(this,"body")||Z(this).replaceWith(this.childNodes)}).end()}}),Z.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0},Z.expr.filters.visible=function(e){return!Z.expr.filters.hidden(e)};var Nt=/%20/g,kt=/\[\]$/,Et=/\r?\n/g,St=/^(?:submit|button|image|reset|file)$/i,jt=/^(?:input|select|textarea|keygen)/i;Z.param=function(e,t){var n,r=[],i=function(e,t){t=Z.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=Z.ajaxSettings&&Z.ajaxSettings.traditional),Z.isArray(e)||e.jquery&&!Z.isPlainObject(e))Z.each(e,function(){i(this.name,this.value)});else for(n in e)$(n,e[n],t,i);return r.join("&").replace(Nt,"+")},Z.fn.extend({serialize:function(){return Z.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=Z.prop(this,"elements");return e?Z.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!Z(this).is(":disabled")&&jt.test(this.nodeName)&&!St.test(e)&&(this.checked||!Ne.test(e))}).map(function(e,t){var n=Z(this).val();return null==n?null:Z.isArray(n)?Z.map(n,function(e){return{name:t.name,value:e.replace(Et,"\r\n")}}):{name:t.name,value:n.replace(Et,"\r\n")}}).get()}}),Z.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var Dt=0,At={},Lt={0:200,1223:204},qt=Z.ajaxSettings.xhr();e.ActiveXObject&&Z(e).on("unload",function(){for(var e in At)At[e]()}),Q.cors=!!qt&&"withCredentials"in qt,Q.ajax=qt=!!qt,Z.ajaxTransport(function(e){var t;return Q.cors||qt&&!e.crossDomain?{send:function(n,r){var i,o=e.xhr(),s=++Dt;if(o.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(i in e.xhrFields)o[i]=e.xhrFields[i];e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(i in n)o.setRequestHeader(i,n[i]);t=function(e){return function(){t&&(delete At[s],t=o.onload=o.onerror=null,"abort"===e?o.abort():"error"===e?r(o.status,o.statusText):r(Lt[o.status]||o.status,o.statusText,"string"==typeof o.responseText?{text:o.responseText}:void 0,o.getAllResponseHeaders()))}},o.onload=t(),o.onerror=t("error"),t=At[s]=t("abort");try{o.send(e.hasContent&&e.data||null)}catch(a){if(t)throw a}},abort:function(){t&&t()}}:void 0}),Z.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return Z.globalEval(e),e}}}),Z.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),Z.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=Z("