├── .editorconfig
├── .eslintignore
├── .eslintrc
├── .gitignore
├── .npmrc
├── .travis.yml
├── History.textile
├── LICENSE-2.0.txt
├── README.md
├── build
├── jquery.continuousCalendar-latest-min.css
├── jquery.continuousCalendar-latest-min.js
└── jquery.continuousCalendar-latest.js
├── continuousCalendar.jquery.json
├── ghpages.sh
├── index.html
├── package-lock.json
├── package.json
├── release.sh
├── site
├── index.js
└── styles.css
└── src
├── build
└── bundleWrapper.js
├── continuousCalendar
├── jquery.continuousCalendar.js
└── jquery.continuousCalendar.less
├── lib
├── jquery.min.js
└── jquery.numberformatter-1.1.2.min.js
└── main
└── jquery.tinyscrollbar-1.66
├── _jquery.tinyscrollbar.scss
├── bg-scrollbar-thumb-y.png
├── bg-scrollbar-track-y.png
├── bg-scrollbar-trackend-y.png
└── jquery.tinyscrollbar.js
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | end_of_line = lf
5 | insert_final_newline = true
6 | trim_trailing_whitespace = true
7 |
8 | [*.js]
9 | indent_style = space
10 | indent_size = 2
11 |
12 | [*.json]
13 | indent_style = space
14 | indent_size = 2
15 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | build
2 | **/node_modules
3 | src/main/jquery.tinyscrollbar-1.66/
4 | src/lib
5 | site
6 |
--------------------------------------------------------------------------------
/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "eslint:recommended",
3 | "rules": {
4 | "arrow-parens": [2, "as-needed"],
5 | "no-console": 0,
6 | "no-const-assign": 2,
7 | "no-sparse-arrays": 0,
8 | "no-unneeded-ternary": 2,
9 | "prefer-const": 2,
10 | "semi": [2, "never"],
11 | "indent": ["error", 2],
12 | "quotes": ["error", "single"],
13 | "no-multiple-empty-lines": ["error", {"max": 1}]
14 | },
15 | "env": {
16 | "browser": true,
17 | "mocha": true,
18 | "jquery": true,
19 | "node": true,
20 | "es6": false
21 | },
22 | "globals": {
23 | "expect": true,
24 | "define": true,
25 | "requirejs": true
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *~
2 |
3 | # IDEA Project files
4 |
5 | *.ipr
6 | *.iml
7 | *.iws
8 | *.swp
9 | out/
10 | .sass-cache
11 | .idea
12 | .DS_Store
13 | node_modules
14 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | loglevel=silent
2 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - stable
4 | branches:
5 | only:
6 | - master
7 |
--------------------------------------------------------------------------------
/History.textile:
--------------------------------------------------------------------------------
1 | h3. 5.1.1
2 |
3 | * No functional changes
4 |
5 | h3. 5.1.0
6 |
7 | * Support Chinese
8 |
9 | h3. 5.0.1
10 |
11 | * Replace symlink with copy because for github pages issues
12 |
13 | h3. 5.0.0
14 |
15 | * Drop RequireJS support and use browserify for bundles
16 |
17 | h3. 4.12.2
18 |
19 | * Use commonJS for source files
20 |
21 | h3. 4.12.1
22 |
23 | * Update dateutils to stable version
24 |
25 | h3. 4.12.0
26 |
27 | * Add Language support for German and French
28 |
29 | h3. 4.11.0
30 |
31 | * Highlight Finnish holidays and show tooltips
32 |
33 | h3. 4.10.0
34 |
35 | * Provide possibility to use iso date format for input field
36 |
37 | h3. 4.9.0
38 |
39 | * Read dateutils from external dependency
40 | * Ensure box-sizing=content box for calendar icon
41 |
42 | h3. 4.8.0
43 |
44 | * Support js date objects and DateTime objects as first and last date
45 | * Add callback for popup opening
46 | * Use inline images for custom scrollbar
47 |
48 | h3. 4.7.0
49 |
50 | * Prevent date labels wrap between week day and date
51 | * Add possibility to set date selection as constructor parameter
52 | * Add DateTime.toISODateString
53 | * De-couple DateLocale and continuousCalendar
54 | * Remove IE 6 tweaks
55 | * Make tinyscrollbar as separate dependency
56 | * Add Duration module
57 |
58 | h3. 4.6.2
59 |
60 | * Bring old IE support back by using $.map instead of Array.prototype.map
61 | * Make DateTime constructor less ambigous and rely on factory methods instead
62 |
63 | h3. 4.6.1
64 |
65 | Get rid of eval in DateFormat.js. Fixes #67
66 |
67 | h3. 4.6.0
68 |
69 | * Determine single date vs range with configuration parameter instead of provided input elements. Fixes #9
70 |
71 | h3. 4.5.3
72 |
73 | * Leave only production files under src/main
74 |
75 | h3. 4.5.1
76 |
77 | * Refer to tinyscrollbar directly
78 | * Provide project as npm module
79 |
80 | h3. 4.5.0
81 |
82 | * Fix parsing localized input fields
83 | * Add selection setting through field(s)
84 | * Do not throw an error when range selection is dragged outside of calendar
85 |
86 | h3. 4.4.1
87 |
88 | * Fix declensions for russian localization
89 |
90 | h3. 4.4.0
91 |
92 | * Add possibility to use fixed height scroll when using custom scrollbar
93 | * Update russian translations for clear date labels
94 |
95 | h3. 4.3.0
96 |
97 | * Add the option of allowing clearing of dates on both range and single date calendars
98 |
99 | h3. 4.2.2
100 |
101 | * Add DateTime.today() to show current date with midnight time
102 | * Improve code quality
103 |
104 | h3. 4.2.1
105 |
106 | * Update latvian translations
107 | * Fix off by one bug when calculating last date to be shown
108 |
109 | h3. 4.2.0
110 |
111 | * Fix issue #57 by replacing setInterval with setTimeout for scroll throttling
112 | * Add language support for Latvian
113 |
114 | h3. 4.1.1
115 |
116 | * Fix dependency issues
117 |
118 | h3. 4.1.0
119 |
120 | * Extract single date behavior to separate module
121 | * Extract translations to separate modules
122 |
123 | h3. 4.0.0
124 |
125 | * Improve DateTime constructor
126 | * Support non-AMD usage only by using bundles
127 | * Stop providing non-minified version of js and css bundle
128 | * Include almond.js in bundle
129 |
130 | h3. 3.0.4
131 |
132 | * Set hour, minutes and seconds to 0 when not specified for DateTime constructor
133 |
134 | h3. 3.0.3
135 |
136 | * Update manifest file for jquery plugins site indexing
137 |
138 | h3. 3.0.2
139 |
140 | * Modify tinyscrollbar plugin: Stop options leaking as global variable, trigger scroll event also from wheel event
141 |
142 | h3. 3.0.1
143 |
144 | * Fix syntax error in tinyscrollbar style file
145 | * Update dateTimeFormat for Estonian langueage, it shoud use kl instead of klo
146 |
147 | h3. 3.0.0
148 |
149 | * Remove duplicate or unused methods from DateTime:
150 | ** getDaysInMonth (duplicate)
151 | ** getWeekOfYear (duplicate)
152 | ** getDayOfYear (use getDayInYear)
153 | ** isLeapYear
154 | ** getSuffix
155 | ** stripped
156 | ** getTimezone
157 | * Add new methods to DateTime:
158 | ** fromDate(year, month, day)
159 | ** fromMillis(ms)
160 | ** fromDateObject(date)
161 | ** withResetMS
162 | ** toISOString
163 | ** minusDays
164 | * Add more validation logic to following DateTime methods:
165 | ** fromIsoDate
166 | ** fromIsoDateTime
167 | ** getDaysInMonth
168 | ** isBetweenDates
169 | * Provide milliseconds for DateTime constructor and make it stricter
170 | * Fix spelling of DateTime.WEDNESDAY constant
171 | * Make dateTime.toString() return local instead of UTC times
172 |
173 | h3. 2.4.3
174 |
175 | * Update shortWeekday locales for estonian, english and australian and make calendar to use that instead of subtracting 2 letters from long weekday name
176 | * Force vertical alignment of text in continuous calendar
177 | * Bugfix: Scroll viewport to selected date
178 |
179 | h3. 2.4.2
180 |
181 | * Move calendar rendering to separate module
182 | * Move range behavior to separate module
183 | * Remove DateLocale.DEFAULT
184 | * Update custom scroll styles for all themes
185 |
186 | h3. 2.4.1
187 |
188 | * Add constants for all weekdays in DateTime
189 | * Add support for jquery 1.9.0+
190 |
191 | h3. 2.4.0
192 |
193 | * Add support for themes with elem.continuousCalendar({theme: 'transparent|rounded'})
194 | * Fix order of dependencies in build script
195 |
196 | h3. 2.3.0
197 |
198 | * Move hoursAndMinutes() from DateLocale to DateFormat
199 | * Move weekday constants from DateLocale to DateTime
200 | * Move getFirstDateOfWeek() from DateLocale to DateTime
201 |
202 | h3. 2.2.5
203 |
204 | * Take disabled dates into account also when selecting ranges
205 | * Fix bug related to fromIsoDate and fromIsoDateTime in DateTime.js
206 |
207 | h3. 2.2.4
208 |
209 | * Add DateTime.fromIsoDate and DateTime.fromIsoDateTime
210 | * Add support for swedish
211 |
212 | h3. 2.2.3
213 |
214 | * Fix issues when using custom scroll bar with popup version
215 |
216 | h3. 2.2.2
217 |
218 | * Overload constructor with y,m,d,h,m arguments
219 | * Bug fix: fix DateTime.withTime by resetting allways seconds
220 | * Bug fix: Update year title when using custom scroll
221 |
222 | h3. 2.2.1
223 |
224 | * Allow overriding bg image path for custom scrollbar
225 |
226 | h3. 2.2.0
227 |
228 | * Add support for Russian and Estonian translations
229 | * Allow setting locale as case insensitive string
230 |
231 | h3. 2.1.0
232 |
233 | * Provide script for compiling scss styles
234 | * Include compiling of scss files to build script
235 | * Add support for custom scrollbar (jquery.tinyscrollbar)
236 |
237 | h3. 2.0.1
238 |
239 | * Introduce dayNames and shortDayNames in DateLocale
240 | * Define AMD paths as relative and let require.js determine module name from name of the file
241 |
242 | h3. 2.0.0
243 |
244 | * Use SASS for styles
245 | * Move all formatting related code from DateTime to DateFormat
246 | * Remove close icon from popup calendar
247 | * Update example and playground
248 |
249 | h3. 1.3.0
250 |
251 | * Add optional "AMD":http://requirejs.org/docs/whyamd.html support
252 | * Backwards incompatible change: rename global @Locale@ object to @DateLocale@
253 |
254 | h3. Older releases (1.2.x series and below)
255 |
256 | * (Changes not listed)
257 |
--------------------------------------------------------------------------------
/LICENSE-2.0.txt:
--------------------------------------------------------------------------------
1 |
2 | Apache License
3 | Version 2.0, January 2004
4 | http://www.apache.org/licenses/
5 |
6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7 |
8 | 1. Definitions.
9 |
10 | "License" shall mean the terms and conditions for use, reproduction,
11 | and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by
14 | the copyright owner that is granting the License.
15 |
16 | "Legal Entity" shall mean the union of the acting entity and all
17 | other entities that control, are controlled by, or are under common
18 | control with that entity. For the purposes of this definition,
19 | "control" means (i) the power, direct or indirect, to cause the
20 | direction or management of such entity, whether by contract or
21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
22 | outstanding shares, or (iii) beneficial ownership of such entity.
23 |
24 | "You" (or "Your") shall mean an individual or Legal Entity
25 | exercising permissions granted by this License.
26 |
27 | "Source" form shall mean the preferred form for making modifications,
28 | including but not limited to software source code, documentation
29 | source, and configuration files.
30 |
31 | "Object" form shall mean any form resulting from mechanical
32 | transformation or translation of a Source form, including but
33 | not limited to compiled object code, generated documentation,
34 | and conversions to other media types.
35 |
36 | "Work" shall mean the work of authorship, whether in Source or
37 | Object form, made available under the License, as indicated by a
38 | copyright notice that is included in or attached to the work
39 | (an example is provided in the Appendix below).
40 |
41 | "Derivative Works" shall mean any work, whether in Source or Object
42 | form, that is based on (or derived from) the Work and for which the
43 | editorial revisions, annotations, elaborations, or other modifications
44 | represent, as a whole, an original work of authorship. For the purposes
45 | of this License, Derivative Works shall not include works that remain
46 | separable from, or merely link (or bind by name) to the interfaces of,
47 | the Work and Derivative Works thereof.
48 |
49 | "Contribution" shall mean any work of authorship, including
50 | the original version of the Work and any modifications or additions
51 | to that Work or Derivative Works thereof, that is intentionally
52 | submitted to Licensor for inclusion in the Work by the copyright owner
53 | or by an individual or Legal Entity authorized to submit on behalf of
54 | the copyright owner. For the purposes of this definition, "submitted"
55 | means any form of electronic, verbal, or written communication sent
56 | to the Licensor or its representatives, including but not limited to
57 | communication on electronic mailing lists, source code control systems,
58 | and issue tracking systems that are managed by, or on behalf of, the
59 | Licensor for the purpose of discussing and improving the Work, but
60 | excluding communication that is conspicuously marked or otherwise
61 | designated in writing by the copyright owner as "Not a Contribution."
62 |
63 | "Contributor" shall mean Licensor and any individual or Legal Entity
64 | on behalf of whom a Contribution has been received by Licensor and
65 | subsequently incorporated within the Work.
66 |
67 | 2. Grant of Copyright License. Subject to the terms and conditions of
68 | this License, each Contributor hereby grants to You a perpetual,
69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 | copyright license to reproduce, prepare Derivative Works of,
71 | publicly display, publicly perform, sublicense, and distribute the
72 | Work and such Derivative Works in Source or Object form.
73 |
74 | 3. Grant of Patent License. Subject to the terms and conditions of
75 | this License, each Contributor hereby grants to You a perpetual,
76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 | (except as stated in this section) patent license to make, have made,
78 | use, offer to sell, sell, import, and otherwise transfer the Work,
79 | where such license applies only to those patent claims licensable
80 | by such Contributor that are necessarily infringed by their
81 | Contribution(s) alone or by combination of their Contribution(s)
82 | with the Work to which such Contribution(s) was submitted. If You
83 | institute patent litigation against any entity (including a
84 | cross-claim or counterclaim in a lawsuit) alleging that the Work
85 | or a Contribution incorporated within the Work constitutes direct
86 | or contributory patent infringement, then any patent licenses
87 | granted to You under this License for that Work shall terminate
88 | as of the date such litigation is filed.
89 |
90 | 4. Redistribution. You may reproduce and distribute copies of the
91 | Work or Derivative Works thereof in any medium, with or without
92 | modifications, and in Source or Object form, provided that You
93 | meet the following conditions:
94 |
95 | (a) You must give any other recipients of the Work or
96 | Derivative Works a copy of this License; and
97 |
98 | (b) You must cause any modified files to carry prominent notices
99 | stating that You changed the files; and
100 |
101 | (c) You must retain, in the Source form of any Derivative Works
102 | that You distribute, all copyright, patent, trademark, and
103 | attribution notices from the Source form of the Work,
104 | excluding those notices that do not pertain to any part of
105 | the Derivative Works; and
106 |
107 | (d) If the Work includes a "NOTICE" text file as part of its
108 | distribution, then any Derivative Works that You distribute must
109 | include a readable copy of the attribution notices contained
110 | within such NOTICE file, excluding those notices that do not
111 | pertain to any part of the Derivative Works, in at least one
112 | of the following places: within a NOTICE text file distributed
113 | as part of the Derivative Works; within the Source form or
114 | documentation, if provided along with the Derivative Works; or,
115 | within a display generated by the Derivative Works, if and
116 | wherever such third-party notices normally appear. The contents
117 | of the NOTICE file are for informational purposes only and
118 | do not modify the License. You may add Your own attribution
119 | notices within Derivative Works that You distribute, alongside
120 | or as an addendum to the NOTICE text from the Work, provided
121 | that such additional attribution notices cannot be construed
122 | as modifying the License.
123 |
124 | You may add Your own copyright statement to Your modifications and
125 | may provide additional or different license terms and conditions
126 | for use, reproduction, or distribution of Your modifications, or
127 | for any such Derivative Works as a whole, provided Your use,
128 | reproduction, and distribution of the Work otherwise complies with
129 | the conditions stated in this License.
130 |
131 | 5. Submission of Contributions. Unless You explicitly state otherwise,
132 | any Contribution intentionally submitted for inclusion in the Work
133 | by You to the Licensor shall be under the terms and conditions of
134 | this License, without any additional terms or conditions.
135 | Notwithstanding the above, nothing herein shall supersede or modify
136 | the terms of any separate license agreement you may have executed
137 | with Licensor regarding such Contributions.
138 |
139 | 6. Trademarks. This License does not grant permission to use the trade
140 | names, trademarks, service marks, or product names of the Licensor,
141 | except as required for reasonable and customary use in describing the
142 | origin of the Work and reproducing the content of the NOTICE file.
143 |
144 | 7. Disclaimer of Warranty. Unless required by applicable law or
145 | agreed to in writing, Licensor provides the Work (and each
146 | Contributor provides its Contributions) on an "AS IS" BASIS,
147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148 | implied, including, without limitation, any warranties or conditions
149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150 | PARTICULAR PURPOSE. You are solely responsible for determining the
151 | appropriateness of using or redistributing the Work and assume any
152 | risks associated with Your exercise of permissions under this License.
153 |
154 | 8. Limitation of Liability. In no event and under no legal theory,
155 | whether in tort (including negligence), contract, or otherwise,
156 | unless required by applicable law (such as deliberate and grossly
157 | negligent acts) or agreed to in writing, shall any Contributor be
158 | liable to You for damages, including any direct, indirect, special,
159 | incidental, or consequential damages of any character arising as a
160 | result of this License or out of the use or inability to use the
161 | Work (including but not limited to damages for loss of goodwill,
162 | work stoppage, computer failure or malfunction, or any and all
163 | other commercial damages or losses), even if such Contributor
164 | has been advised of the possibility of such damages.
165 |
166 | 9. Accepting Warranty or Additional Liability. While redistributing
167 | the Work or Derivative Works thereof, You may choose to offer,
168 | and charge a fee for, acceptance of support, warranty, indemnity,
169 | or other liability obligations and/or rights consistent with this
170 | License. However, in accepting such obligations, You may act only
171 | on Your own behalf and on Your sole responsibility, not on behalf
172 | of any other Contributor, and only if You agree to indemnify,
173 | defend, and hold each Contributor harmless for any liability
174 | incurred by, or claims asserted against, such Contributor by reason
175 | of your accepting any such warranty or additional liability.
176 |
177 | END OF TERMS AND CONDITIONS
178 |
179 | APPENDIX: How to apply the Apache License to your work.
180 |
181 | To apply the Apache License to your work, attach the following
182 | boilerplate notice, with the fields enclosed by brackets "[]"
183 | replaced with your own identifying information. (Don't include
184 | the brackets!) The text should be enclosed in the appropriate
185 | comment syntax for the file format. We also recommend that a
186 | file or class name and description of purpose be included on the
187 | same "printed page" as the copyright notice for easier
188 | identification within third-party archives.
189 |
190 | Copyright [yyyy] [name of copyright owner]
191 |
192 | Licensed under the Apache License, Version 2.0 (the "License");
193 | you may not use this file except in compliance with the License.
194 | You may obtain a copy of the License at
195 |
196 | http://www.apache.org/licenses/LICENSE-2.0
197 |
198 | Unless required by applicable law or agreed to in writing, software
199 | distributed under the License is distributed on an "AS IS" BASIS,
200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201 | See the License for the specific language governing permissions and
202 | limitations under the License.
203 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 | [Homepage]: http://continuouscalendar.github.io/jquery-continuous-calendar/
3 | [Playground]: http://continuouscalendar.github.io/jquery-continuous-calendar/site/playground.html
4 | [Unit tests]: http://continuouscalendar.github.io/jquery-continuous-calendar/src/test/jquery.continuousCalendar.spec.html
5 | [Latest revision as ZIP file]: http://github.com/continuouscalendar/jquery-continuous-calendar/zipball/master
6 | [Change log]: https://github.com/continuouscalendar/jquery-continuous-calendar/blob/master/History.textile
7 | [wicket-continuous-calendar]: https://code.google.com/p/wicket-continuous-calendar/
8 |
9 | Features
10 | ========
11 |
12 | - Date dragging
13 | - No pagination, continuous month flow
14 | - Range shifting by dragging
15 | - Range expand with Shift + Mouse click
16 | - Display current date
17 | - Allow disabling of dates
18 | - Month select
19 | - Week select
20 | - Popup support (with current day in calndar icon)
21 | - Support for different date formats
22 | - Support for specifying holidays or disabled days
23 | - Support for setting minimum range
24 | - AMD Support
25 |
26 | Supported languages
27 | ===================
28 |
29 | - English
30 | - Estonian
31 | - Finnish
32 | - Latvian
33 | - Russian
34 | - Swedish
35 | - German
36 | - French
37 | - Chinese
38 |
39 |
40 | Supported browsers
41 | ==================
42 |
43 | - IE7 -\>
44 | - FireFox
45 | - Chrome
46 | - Opera
47 | - Safari
48 |
49 | Getting started
50 | ===============
51 |
52 | For NPM project just type
53 |
54 | npm install jquery-continuous-calendar
55 |
56 | Insert in head
57 | --------------
58 |
59 |
60 |
61 |
62 |
63 |
66 |
67 |
68 |
69 |
70 |
71 | Insert in body
72 | --------------
73 |
74 |
75 |
76 |
77 |
78 |
79 |
82 |
83 |
84 | Instructions for contributors
85 | =============================
86 |
87 | - make a fork
88 | - code by using existing code style
89 | - update and run tests (src/test/**.html)\
90 | - make pull request
91 |
92 | License
93 | =======
94 |
95 | Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
96 |
97 | http://www.apache.org/licenses/LICENSE-2.0
98 |
99 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
100 |
--------------------------------------------------------------------------------
/build/jquery.continuousCalendar-latest-min.css:
--------------------------------------------------------------------------------
1 | .continuousCalendarContainer {
2 | position: relative;
3 | }
4 | .continuousCalendarContainer div,
5 | .continuousCalendarContainer th,
6 | .continuousCalendarContainer td {
7 | margin: 0;
8 | padding: 0;
9 | vertical-align: middle;
10 | }
11 | .continuousCalendarContainer th {
12 | font-style: normal;
13 | font-weight: normal;
14 | text-align: left;
15 | }
16 | .continuousCalendarContainer a.calendarIcon {
17 | box-sizing: content-box;
18 | font-size: 9px;
19 | color: #000;
20 | text-decoration: none;
21 | display: block;
22 | background: #eee;
23 | border: 1px solid #666;
24 | border-top: 4px solid #a00;
25 | float: left;
26 | padding: 1px 3px;
27 | line-height: 1;
28 | text-align: center;
29 | width: 10px;
30 | }
31 | .continuousCalendarContainer .popup {
32 | position: absolute;
33 | z-index: 10000 !important;
34 | box-shadow: 5px 5px 5px -5px #999999;
35 | }
36 | .continuousCalendarContainer .popup .calendarHeader {
37 | width: 220px;
38 | }
39 | .continuousCalendarContainer input.endDate,
40 | .continuousCalendarContainer input.startDate {
41 | display: none;
42 | }
43 | .continuousCalendarContainer div.label {
44 | margin-left: 7px;
45 | margin-bottom: 2px;
46 | float: left;
47 | }
48 | .continuousCalendarContainer div.label span.clickable {
49 | cursor: pointer;
50 | text-decoration: underline;
51 | }
52 | .continuousCalendarContainer div.label.clearLabel {
53 | margin-right: 7px;
54 | float: right;
55 | }
56 | .continuousCalendarContainer .popUpContainer {
57 | width: 1px;
58 | height: 1px;
59 | position: relative;
60 | clear: both;
61 | }
62 | .continuousCalendarContainer .continuousCalendar {
63 | clear: both;
64 | }
65 | .continuousCalendarContainer .continuousCalendar table {
66 | table-layout: fixed;
67 | line-height: 13px;
68 | font: 11px Arial, Verdana, sans-serif;
69 | color: black;
70 | background-color: white;
71 | border-collapse: collapse;
72 | border-spacing: 0;
73 | width: 201px;
74 | }
75 | .continuousCalendarContainer .continuousCalendar table .month {
76 | width: 58px;
77 | padding-left: 2px;
78 | }
79 | .continuousCalendarContainer .continuousCalendar table .week {
80 | border-right: 1px solid #888888;
81 | width: 15px;
82 | font-size: 10px;
83 | }
84 | .continuousCalendarContainer .continuousCalendar table.calendarHeader {
85 | border: 1px solid #999999;
86 | border-bottom: none;
87 | text-align: center;
88 | position: relative;
89 | width: 202px;
90 | }
91 | .continuousCalendarContainer .continuousCalendar table.calendarHeader .weekDay {
92 | text-align: center;
93 | padding: 2px;
94 | }
95 | .continuousCalendarContainer .continuousCalendar table.calendarHeader .month {
96 | text-align: center;
97 | }
98 | .continuousCalendarContainer .continuousCalendar .calendarScrollContent {
99 | overflow-y: auto;
100 | width: 218px;
101 | height: 100px;
102 | border: 1px solid #999999;
103 | position: relative;
104 | background: white;
105 | }
106 | .continuousCalendarContainer .continuousCalendar .calendarScrollContent table.calendarBody.weekRange .week {
107 | text-decoration: underline;
108 | cursor: pointer;
109 | }
110 | .continuousCalendarContainer .continuousCalendar .calendarScrollContent table.calendarBody.freeRange .selected:hover {
111 | cursor: move;
112 | }
113 | .continuousCalendarContainer .continuousCalendar .calendarScrollContent table.calendarBody.freeRange .week,
114 | .continuousCalendarContainer .continuousCalendar .calendarScrollContent table.calendarBody.freeRange .month {
115 | text-decoration: underline;
116 | cursor: pointer;
117 | }
118 | .continuousCalendarContainer .continuousCalendar .calendarScrollContent table.calendarBody.freeRange td {
119 | cursor: w-resize;
120 | cursor: ew-resize;
121 | }
122 | .continuousCalendarContainer .continuousCalendar .calendarScrollContent table.calendarBody.freeRange td.rangeStart:hover {
123 | cursor: w-resize;
124 | cursor: ew-resize;
125 | }
126 | .continuousCalendarContainer .continuousCalendar .calendarScrollContent table.calendarBody.freeRange td.rangeEnd:hover {
127 | cursor: e-resize;
128 | cursor: ew-resize;
129 | }
130 | .continuousCalendarContainer .continuousCalendar .calendarScrollContent table.calendarBody th {
131 | font-weight: normal;
132 | }
133 | .continuousCalendarContainer .continuousCalendar .calendarScrollContent table.calendarBody th .month {
134 | text-align: left;
135 | }
136 | .continuousCalendarContainer .continuousCalendar .calendarScrollContent table.calendarBody td {
137 | text-align: center;
138 | padding: 2px;
139 | cursor: pointer;
140 | }
141 | .continuousCalendarContainer .continuousCalendar .calendarScrollContent table.calendarBody td.disabled {
142 | cursor: default;
143 | color: gray;
144 | }
145 | .continuousCalendarContainer .continuousCalendar .calendarScrollContent table.calendarBody td.holiday {
146 | color: #f00;
147 | }
148 | .continuousCalendarContainer .continuousCalendar .calendarScrollContent table.calendarBody td.holiday.disabled {
149 | color: #a66;
150 | }
151 | .continuousCalendarContainer .continuousCalendar .calendarScrollContent table.calendarBody td.holiday.selected {
152 | color: #fbb;
153 | }
154 | .continuousCalendarContainer .continuousCalendar .calendarScrollContent table.calendarBody td:hover {
155 | font-weight: bold;
156 | color: blue;
157 | }
158 | .continuousCalendarContainer .continuousCalendar .calendarScrollContent table.calendarBody td.today {
159 | position: relative;
160 | padding: 0;
161 | }
162 | .continuousCalendarContainer .continuousCalendar .calendarScrollContent table.calendarBody td.today div {
163 | border: 2px solid red;
164 | margin: 0;
165 | border-radius: 10px;
166 | position: relative;
167 | }
168 | .continuousCalendarContainer .continuousCalendar .calendarScrollContent table.calendarBody td.selected {
169 | background: #88AAFF;
170 | color: white;
171 | }
172 | .continuousCalendarContainer .continuousCalendar .calendarScrollContent table.calendarBody td.invalidSelection {
173 | background: red;
174 | }
175 | .continuousCalendarContainer .continuousCalendar .calendarScrollContent table.calendarBody .odd {
176 | background-color: #e8e8e8;
177 | }
178 | .continuousCalendarContainer.rounded .continuousCalendar .tinyscrollbar {
179 | width: 285px;
180 | }
181 | .continuousCalendarContainer.rounded .continuousCalendar .tinyscrollbar .viewport {
182 | width: 272px;
183 | }
184 | .continuousCalendarContainer.rounded .continuousCalendar th,
185 | .continuousCalendarContainer.rounded .continuousCalendar td {
186 | padding: 0;
187 | margin: 0;
188 | vertical-align: middle;
189 | }
190 | .continuousCalendarContainer.rounded .continuousCalendar table.calendarHeader {
191 | font-size: 14px;
192 | border: none;
193 | width: 274px;
194 | }
195 | .continuousCalendarContainer.rounded .continuousCalendar table.calendarHeader thead th {
196 | color: #FFF;
197 | border: none;
198 | background: #787878;
199 | background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzc4Nzg3OCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzNjM2MzYyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
200 | background-size: 100%;
201 | background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #787878), color-stop(100%, #3c3c3c));
202 | background-image: -moz-linear-gradient(#787878, #3c3c3c);
203 | background-image: -webkit-linear-gradient(#787878, #3c3c3c);
204 | background-image: linear-gradient(#787878, #3c3c3c);
205 | *zoom: 1;
206 | filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#FF787878', endColorstr='#FF3C3C3C');
207 | }
208 | .continuousCalendarContainer.rounded .continuousCalendar table.calendarHeader thead th.weekDay {
209 | padding: 4px;
210 | }
211 | .continuousCalendarContainer.rounded .continuousCalendar table.calendarHeader thead th.weekDay:last-of-type {
212 | -moz-border-radius-topright: 4px;
213 | border-top-right-radius: 4px;
214 | padding-right: 10px;
215 | }
216 | .continuousCalendarContainer.rounded .continuousCalendar table.calendarHeader thead th:nth-of-type(3) {
217 | padding-left: 10px;
218 | -moz-border-radius-topleft: 4px;
219 | border-top-left-radius: 4px;
220 | }
221 | .continuousCalendarContainer.rounded .continuousCalendar table.calendarHeader .month {
222 | -moz-border-radius-topleft: 4px;
223 | border-top-left-radius: 4px;
224 | width: 57px;
225 | text-align: right;
226 | }
227 | .continuousCalendarContainer.rounded .continuousCalendar table.calendarHeader .week {
228 | border-right: 1px solid #E7F2F7;
229 | -moz-border-radius-topright: 4px;
230 | border-top-right-radius: 4px;
231 | }
232 | .continuousCalendarContainer.rounded .continuousCalendar .calendarScrollContent {
233 | height: 120px;
234 | width: 288px;
235 | overflow-x: hidden;
236 | }
237 | .continuousCalendarContainer.rounded .continuousCalendar .calendarScrollContent table.calendarBody {
238 | color: #000;
239 | border: none;
240 | width: 274px;
241 | }
242 | .continuousCalendarContainer.rounded .continuousCalendar .calendarScrollContent table.calendarBody .date:first-of-type {
243 | padding-left: 10px;
244 | }
245 | .continuousCalendarContainer.rounded .continuousCalendar .calendarScrollContent table.calendarBody .date:last-of-type {
246 | padding-right: 10px;
247 | }
248 | .continuousCalendarContainer.rounded .continuousCalendar .calendarScrollContent table.calendarBody th.month {
249 | width: 53px;
250 | color: #3B3B3B;
251 | padding-left: 3px;
252 | }
253 | .continuousCalendarContainer.rounded .continuousCalendar .calendarScrollContent table.calendarBody th.week {
254 | color: #6E6E6E;
255 | }
256 | .continuousCalendarContainer.rounded .continuousCalendar .calendarScrollContent table.calendarBody td {
257 | padding: 1px 5px 1px 5px;
258 | }
259 | .continuousCalendarContainer.rounded .continuousCalendar .calendarScrollContent table.calendarBody td.today div {
260 | border: 1px solid #F67F00;
261 | border-radius: 0;
262 | }
263 | .continuousCalendarContainer.rounded .continuousCalendar .calendarScrollContent table.calendarBody td.disabled {
264 | color: #999;
265 | }
266 | .continuousCalendarContainer.rounded .continuousCalendar .calendarScrollContent table.calendarBody td.odd {
267 | background: #E7E7E7;
268 | }
269 | .continuousCalendarContainer.rounded .continuousCalendar .calendarScrollContent table.calendarBody td.selected {
270 | background: #0161AC;
271 | }
272 |
--------------------------------------------------------------------------------
/build/jquery.continuousCalendar-latest-min.js:
--------------------------------------------------------------------------------
1 | (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i '},scrollContent))}else{calendarContainer.appendChild(scrollContent)}highlightToday(dateCellMap);return{bodyTable:bodyTable,scrollContent:scrollContent,dateCells:dateCells,yearTitle:yearTitle,dateCellMap:dateCellMap,dateCellDates:dateCellDates,dateStyles:dateStyles,getDateCell:getDateCell};function headerRow(yearTitle){var thead=el("thead");var tr=el("tr",{className:"month"},yearTitle);tr.insertAdjacentHTML("beforeend",' '+locale.dayNames.map(function(name,index){return''+locale.shortDayNames[(index+locale.firstWeekday)%7]+" "}).join(""));thead.appendChild(tr);return thead}function highlightToday(dateCellMap){var todayKey=DateFormat.format(DateTime.today(),"Ymd",locale);if(todayKey in dateCellMap){var dateCell=getDateCell(dateCellMap[todayKey]);dateCell.classList.add("today");dateCell.innerHTML=""+dateCell.innerText+"
"}}function calendarBody(){var firstWeekDay=calendarRange.start.getFirstDateOfWeek(locale);var isFirst=true;var rows=document.createDocumentFragment();while(firstWeekDay.compareTo(calendarRange.end)<=0){rows.appendChild(calendarRow(firstWeekDay,isFirst));isFirst=false;firstWeekDay=firstWeekDay.plusDays(7)}return el("tbody",{},rows);function calendarRow(firstDayOfWeek,isFirst){var row=el("tr",{},monthCell(firstDayOfWeek,isFirst));row.appendChild(weekCell(firstDayOfWeek));for(var i=0;i<7;i++){var date=firstDayOfWeek.plusDays(i);row.appendChild(dateCell(date))}return row}function dateCell(date){var td=el("td",{className:dateStyles(date),innerText:date.getDate()});if(locale.holidays&&date.toISODateString()in locale.holidays)td.title=locale.holidays[date.toISODateString()];td.setAttribute("date-cell-index",String(dateCellDates.length));dateCellMap[DateFormat.format(date,"Ymd",locale)]=dateCellDates.length;dateCellDates.push(date);dateCells.push(td);return td}function monthCell(firstDayOfWeek,isFirst){var showMonth=isFirst||firstDayOfWeek.getDate()<=7;var showYear=firstDayOfWeek.getDate()<=7*2&&firstDayOfWeek.getMonth()===1;return el("th",{className:"month "+backgroundBy(firstDayOfWeek)+(showMonth?" monthName":""),innerText:showMonth?locale.monthNames[firstDayOfWeek.getMonth()-1]:showYear?firstDayOfWeek.getFullYear():""})}function weekCell(firstDayOfWeek){return el("th",{className:"week "+backgroundBy(firstDayOfWeek),innerText:firstDayOfWeek.getWeekInYear("ISO")})}}function dateStyles(date){return["date",backgroundBy(date),disabledOrNot(date),todayStyle(date),holidayStyle(date)].filter(function(x){return x}).join(" ")}function backgroundBy(date){return date.isOddMonth()?"odd":""}function disabledOrNot(date){var disabledWeekendDay=disableWeekends&&date.isWeekend();var disabledDay=disabledDatesObject[date.getOnlyDate().date];var outOfBounds=!calendarRange.hasDate(date);return outOfBounds||disabledWeekendDay||disabledDay?"disabled":""}function todayStyle(date){return date.isToday()?"today":""}function holidayStyle(date){var isSunday=date.getDay()===0;var isHoliday=locale.holidays&&date.toISODateString()in locale.holidays;return isSunday||isHoliday?"holiday":""}function getDateCell(index){return dateCells[index]}}},{"./util":6,dateutils:13}],2:[function(require,module,exports){var DateFormat=require("dateutils").DateFormat;var DateRange=require("dateutils").DateRange;var DateTime=require("dateutils").DateTime;var elemsAsList=require("./util").elemsAsList;var toggle=require("./util").toggle;module.exports=function(container,calendarBody,executeCallback,locale,params,getElemDate,calendar,startDate,setStartField,endDate,setEndField,calendarRange,disabledDatesList){var mouseDownDate=null;var selection;var Status={CREATE_OR_RESIZE:"create",MOVE:"move",NONE:"none"};var status=Status.NONE;return{showInitialSelection:setRangeLabels,initEvents:initEvents,addRangeLengthLabel:addRangeLengthLabel,addEndDateLabel:addEndDateLabel,addDateClearingLabel:addDateClearingLabel,setSelection:setSelection,performTrigger:performTrigger};function initEvents(){setInitialSelection();initRangeCalendarEvents(container,calendarBody.bodyTable);drawSelection()}function setSelection(start,end){if(start&&end)selection=new DateRange(start,end);mouseUp()}function addRangeLengthLabel(){var rangeLengthLabel=container.querySelector(".rangeLengthLabel");if(rangeLengthLabel&&rangeLengthLabel.childNodes)return;container.querySelector(".continuousCalendar").insertAdjacentHTML("beforeend",'
')}function addEndDateLabel(dateLabelContainer){dateLabelContainer.insertAdjacentHTML("beforeend",' - ')}function addDateClearingLabel(){if(params.allowClearDates){container.querySelector(".continuousCalendar").insertAdjacentHTML("beforeend",''+locale.clearRangeLabel+"
")}}function performTrigger(){container.calendarRange=selection;executeCallback(container,selection,params)}function setInitialSelection(){selection=startDate&&endDate?new DateRange(startDate,endDate):DateRange.emptyRange();toggle(container.querySelector("span.separator"),selection.start||selection.end)}function initRangeCalendarEvents(container,bodyTable){var rangeLengthLabel=container.querySelector("span.rangeLengthLabel");rangeLengthLabel.innerText=locale.daysLabel(selection.days());if(params.allowClearDates){container.querySelector("span.clearDates").addEventListener("click",clearRangeClick)}bodyTable.classList.add(params.selectWeek?"weekRange":"freeRange");bodyTable.addEventListener("mousedown",mouseDown);bodyTable.addEventListener("mouseover",mouseMove);bodyTable.addEventListener("mouseup",mouseUp);disableTextSelection(bodyTable)}function mouseDown(event){var elem=event.target;var hasShiftKeyPressed=event.shiftKey;if(isInstantSelection(elem,hasShiftKeyPressed)){selection=instantSelection(elem,hasShiftKeyPressed)}else{status=Status.CREATE_OR_RESIZE;mouseDownDate=getElemDate(elem);if(mouseDownDate.equalsOnlyDate(selection.end))mouseDownDate=selection.start;else if(mouseDownDate.equalsOnlyDate(selection.start))mouseDownDate=selection.end;else if(selection.hasDate(mouseDownDate))status=Status.MOVE;else if(enabledCell(elem))startNewRange()}function enabledCell(elem){return isDateCell(elem)&&isEnabled(elem)}function isInstantSelection(elem,hasShiftKeyPressed){if(params.selectWeek)return enabledCell(elem)||isWeekCell(elem);else return isWeekCell(elem)||isMonthCell(elem)||hasShiftKeyPressed}function instantSelection(elem,hasShiftKeyPressed){if(params.selectWeek&&enabledCell(elem)||isWeekCell(elem)){status=Status.NONE;var firstDayOfWeek=getElemDate(elem.parentNode.querySelector(".date"));return instantSelectWeek(firstDayOfWeek)}else if(isMonthCell(elem)){status=Status.NONE;var dayInMonth=getElemDate(elem.parentNode.querySelector(".date"));return new DateRange(dayInMonth.firstDateOfMonth(),dayInMonth.lastDateOfMonth(),locale)}else if(hasShiftKeyPressed){if(selection.days()>0&&enabledCell(elem)){status=Status.NONE;selection=selection.expandTo(getElemDate(elem));return selection}}return selection}function instantSelectWeek(firstDayOfWeek){var firstDay=firstDayOfWeek;var lastDay=firstDayOfWeek.plusDays(6);if(params.disableWeekends){firstDay=firstDayOfWeek.withWeekday(DateTime.MONDAY);lastDay=firstDayOfWeek.withWeekday(DateTime.FRIDAY)}return new DateRange(firstDay,lastDay,locale).and(calendarRange)}}function startNewRange(){selection=new DateRange(mouseDownDate,mouseDownDate,locale)}function disableTextSelection(elem){elem.style.MozUserSelect="none";elem.addEventListener("selectstart",function(){return false});elem.addEventListener("onmousedown",function(){return false})}function mouseMove(event){if(status!==Status.NONE){var date=getElemDate(event.target);var actions={move:function(){var deltaDays=mouseDownDate.distanceInDays(date);var movedSelection=selection.shiftDays(deltaDays).and(calendarRange);if(isPermittedRange(movedSelection)){mouseDownDate=date;selection=movedSelection}},create:function(){var newSelection=new DateRange(mouseDownDate,date,locale);if(isEnabled(event.target)&&isPermittedRange(newSelection))selection=newSelection}};if(date)actions[status]();drawSelection()}}function isPermittedRange(newSelection){return newSelection.isPermittedRange(params.minimumRange,params.disableWeekends,calendarRange)}function mouseUp(){status=Status.NONE;if(rangeHasDisabledDate())selection=DateRange.emptyRange();drawSelection();afterSelection()}function clearRangeClick(){selection=DateRange.emptyRange();drawSelection();afterSelection()}function rangeHasDisabledDate(){for(var i=0;i0){var startIndex=index(range.start);var endIndex=index(range.end);for(var i=startIndex;i<=endIndex;i++)calendarBody.getDateCell(i).className=dateCellStyle(calendarBody.dateCellDates[i],range.start,range.end).join(" ");if(rangeHasDisabledDate())container.querySelector("td.selected").classList.add("invalidSelection")}function index(date){return calendarBody.dateCellMap[DateFormat.format(date,"Ymd",locale)]}}function dateCellStyle(date,start,end){var styleClass=[calendarBody.dateStyles(date)];if(date.equalsOnlyDate(end))return styleClass.concat("selected rangeEnd");if(date.equalsOnlyDate(start))return styleClass.concat("selected rangeStart");if(date.isBetweenDates(start,end))return styleClass.concat("selected");return styleClass}function afterSelection(){if(rangeHasDisabledDate()){selection=DateRange.emptyRange();setTimeout(function(){drawSelectionBetweenDates(selection)},200)}container.calendarRange=selection;setStartField(selection.start);setEndField(selection.end);setRangeLabels();if(params.selectWeek)calendar.close();executeCallback(container,selection,params)}function setRangeLabels(){if(!selection)setInitialSelection();var cont=container;var startDateLabel=cont.querySelector("span.startDateLabel");var endDateLabel=cont.querySelector("span.endDateLabel");var clearRangeLabel=cont.querySelector("span.clearRangeLabel");var separator=cont.querySelector("span.separator");if(selection.start&&selection.end){var format=locale.weekDateFormat;startDateLabel.innerText=DateFormat.format(selection.start,format,locale);endDateLabel.innerText=DateFormat.format(selection.end,format,locale);toggle(separator,true);if(clearRangeLabel)toggle(clearRangeLabel,true);toggle(startDateLabel.parentNode,true)}else{if(!selection.start){startDateLabel.innerText="";toggle(startDateLabel.parentNode,false)}if(!selection.end){endDateLabel.innerText=""}toggle(separator,false);if(clearRangeLabel)toggle(clearRangeLabel,false)}}function isDateCell(elem){return elem.classList.contains("date")||elem.parentNode.classList.contains("date")}function isWeekCell(elem){return elem.classList.contains("week")}function isMonthCell(elem){return elem.classList.contains("month")}function isEnabled(elem){return!elem.classList.contains("disabled")}}},{"./util":6,dateutils:13}],3:[function(require,module,exports){var DateFormat=require("dateutils").DateFormat;var DateParse=require("dateutils").DateParse;var toggle=require("./util").toggle;module.exports=function(container,calendarBody,executeCallback,locale,params,getElemDate,popupBehavior,startDate,setStartField){return{showInitialSelection:showInitialSelection,initEvents:initEvents,addRangeLengthLabel:function(){},addEndDateLabel:function(){},addDateClearingLabel:addDateClearingLabel,setSelection:setSelection,performTrigger:performTrigger};function showInitialSelection(){if(startDate){setFieldValues(startDate);var clearDates=container.querySelector(".clearDates");if(clearDates)toggle(clearDates,true)}}function initEvents(){initSingleDateCalendarEvents();setSelection(fieldDate(params.startField)||startDate)}function fieldDate(field){return field&&field.value&&field.value.length>0?DateParse.parse(field.value,locale):null}function setSelection(date){var selectedDateKey=date&&DateFormat.format(date,"Ymd",locale);if(selectedDateKey in calendarBody.dateCellMap){setSelectedDate(date,calendarBody.getDateCell(calendarBody.dateCellMap[selectedDateKey]))}}function setSelectedDate(date,cell){var selectedElem=container.querySelector("td.selected");selectedElem&&selectedElem.classList.remove("selected");cell.classList.add("selected");setFieldValues(date)}function setFieldValues(date){container.calendarRange=date;setStartField(date);setDateLabel(DateFormat.format(date,locale.weekDateFormat,locale))}function addDateClearingLabel(){if(params.allowClearDates){container.querySelector(".continuousCalendar").insertAdjacentHTML("beforeend",''+''+locale.clearDateLabel+"
")}}function performTrigger(){container.calendarRange=startDate;executeCallback(container,startDate,params)}function initSingleDateCalendarEvents(){container.addEventListener("click",function(e){var dateCell=e.target.tagName==="DIV"?e.target.parentNode:e.target;if(dateCell.classList.contains("date")&&!dateCell.classList.contains("disabled")){var selectedDate=getElemDate(dateCell);setSelectedDate(selectedDate,dateCell);popupBehavior.close();executeCallback(container,selectedDate,params)}});var clearDates=container.querySelector(".clearDates");if(clearDates)clearDates.addEventListener("click",clickClearDate)}function setDateLabel(val){container.querySelector("span.startDateLabel").innerText=val;if(params.allowClearDates){toggle(container.querySelector(".clearDates"),val!=="")}}function clickClearDate(){container.querySelector("td.selected").classList.remove("selected");params.startField.value="";setDateLabel("")}}},{"./util":6,dateutils:13}],4:[function(require,module,exports){var DateFormat=require("dateutils").DateFormat;var DateParse=require("dateutils").DateParse;var EN=require("dateutils").DateLocale.EN;var DateRange=require("dateutils").DateRange;var DateTime=require("dateutils").DateTime;var CalendarBody=require("./CalendarBody");var RangeEvents=require("./RangeEvents");var SingleDateEvents=require("./SingleDateEvents");var el=require("./util").el;var extend=require("./util").extend;var elemsAsList=require("./util").elemsAsList;var toggle=require("./util").toggle;module.exports=function(container,options){var defaults={weeksBefore:26,weeksAfter:26,firstDate:null,lastDate:null,startField:container.querySelector("input.startDate"),endField:container.querySelector("input.endDate"),isPopup:false,selectToday:false,locale:EN,disableWeekends:false,disabledDates:null,minimumRange:-1,selectWeek:false,fadeOutDuration:0,callback:function(){},popupCallback:function(){},customScroll:false,scrollOptions:{sizethumb:"auto"},theme:"",allowClearDates:false,isRange:false,startDate:null,endDate:null,useIsoForInput:false,initScrollBar:function(){},executeCallback:function(){}};var params=extend(defaults,options);var locale=params.locale;var startDate=fieldDate(params.startField)||params.startDate;var endDate=fieldDate(params.endField)||params.endDate;var today=DateTime.today();if(params.selectToday){startDate=today;endDate=today;setStartField(today);setEndField(today)}var averageCellHeight;var calendarContainer;var beforeFirstOpening=true;var popupBehavior;var dateBehavior;var customScrollContainer;var calendarBody={};var calendarRange;var disabledDatesList;var disabledDatesObject;container.classList.add("continuousCalendarContainer","params.theme");createCalendar();function createCalendar(){disabledDatesList=params.disabledDates?params.disabledDates.split(" ").map(function(slashStr){var mdy=slashStr.split("/");var year=mdy[2];var month=mdy[0];var day=mdy[1];return[year,(month.length===1?"0":"")+month,(day.length===1?"0":"")+day].join("-")}):[];disabledDatesObject=params.disabledDates?parseDisabledDates(disabledDatesList):{};calendarRange=determineRangeToRenderFormParams(params);popupBehavior=popUpBehaviour(params.isPopup);dateBehavior=dateBehaviour(params.isRange);params.fadeOutDuration=+params.fadeOutDuration;calendarContainer=getCalendarContainerOrCreateOne();if(!container.querySelector(".startDateLabel"))addDateLabels(container,popupBehavior,dateBehavior);popupBehavior.initUI();dateBehavior.showInitialSelection();dateBehavior.performTrigger()}function initCalendarTable(){if(!calendarBody.scrollContent){calendarBody=extend(calendarBody,CalendarBody(calendarContainer,calendarRange,locale,params.customScroll,params.disableWeekends,disabledDatesObject));bindScrollEvent();popupBehavior.initState();dateBehavior.addRangeLengthLabel();dateBehavior.addDateClearingLabel();dateBehavior.initEvents();scrollToSelection()}}function determineRangeToRenderFormParams(params){var firstWeekdayOfGivenDate=(startDate||DateTime.today()).getFirstDateOfWeek(locale);var rangeStart=dateOrWeek(params.firstDate,-params.weeksBefore*7);var rangeEnd=dateOrWeek(params.lastDate,params.weeksAfter*7+6);return new DateRange(rangeStart,rangeEnd);function dateOrWeek(date,week){if(date){if(date instanceof Date){return DateTime.fromDateObject(date)}else if(date instanceof DateTime){return date}else{return DateParse.parse(date,locale)}}return firstWeekdayOfGivenDate.plusDays(week)}}function bindScrollEvent(){if(params.customScroll){if(!customScrollContainer)customScrollContainer=params.initScrollBar(container,params);customScrollContainer.bind("scroll",setYearLabel)}else{var waiting=false;calendarBody.scrollContent.addEventListener("scroll",function(){if(!waiting){setTimeout(function(){waiting=false;setYearLabel()},250);waiting=true}})}}function parseDisabledDates(dates){var dateMap={};dates.forEach(function(date){dateMap[DateTime.fromIsoDate(date).date]=true});return dateMap}function dateBehaviour(isRange){var basicParams=[container,calendarBody,params.executeCallback,locale,params,getElemDate,popupBehavior,startDate,setStartField];var rangeParams=[endDate,setEndField,calendarRange,disabledDatesList];return isRange?RangeEvents.apply(null,basicParams.concat(rangeParams)):SingleDateEvents.apply(null,basicParams)}function popUpBehaviour(isPopup){var popUpVersion={initUI:function(){calendarContainer.classList.add("popup");toggle(calendarContainer,false);var icon=el("a",{href:"#",className:"calendarIcon",innerText:today.getDate()});icon.addEventListener("click",toggleCalendar);container.insertBefore(icon,container.firstChild)},initState:function(){},getContainer:function(newContainer){var popUpContainer=el("div",{className:"popUpContainer"});popUpContainer.appendChild(newContainer);return popUpContainer},close:toggleCalendar,addDateLabelBehaviour:function(labels){elemsAsList(labels).forEach(function(label){label.classList.add("clickable");label.addEventListener("click",toggleCalendar)})}};function toggleCalendar(){initCalendarTable();if(calendarContainer.style.display===""){toggle(calendarContainer,false)}else{params.popupCallback();toggle(calendarContainer,true);if(beforeFirstOpening){params.initScrollBar(container,params);calculateCellHeight();setYearLabel();beforeFirstOpening=false}dateBehavior.setSelection(fieldDate(params.startField),fieldDate(params.endField));scrollToSelection()}return false}var inlineVersion={initUI:initCalendarTable,initState:calculateCellHeightAndInitScroll,getContainer:function(newContainer){return newContainer},close:function(){},addDateLabelBehaviour:function(){}};return isPopup?popUpVersion:inlineVersion}function getCalendarContainerOrCreateOne(){var existingContainer=container.querySelector(".continuousCalendar");if(existingContainer){return existingContainer}else{var newContainer=el("div",{className:"continuousCalendar"});container.appendChild(popupBehavior.getContainer(newContainer));return newContainer}}function addDateLabels(container2,popupBehavior,dateBehavior){var dateLabelContainer=el("div",{className:"label"});dateLabelContainer.appendChild(el("span",{className:"startDateLabel"}));dateBehavior.addEndDateLabel(dateLabelContainer);container2.insertBefore(dateLabelContainer,container2.firstChild);popupBehavior.addDateLabelBehaviour(dateLabelContainer.childNodes)}function scrollToSelection(){var scrollContent=calendarBody.scrollContent;var selectionStartOrToday=scrollContent.querySelector(".selected")||scrollContent.querySelector(".today");if(selectionStartOrToday){var height=calendarBody.scrollContent.clientHeight;var position=selectionStartOrToday.offsetTop-(height-selectionStartOrToday.offsetHeight)/2;if(params.customScroll){var totalHeight=calendarBody.bodyTable.clientHeight;var maxScroll=totalHeight-height;var validPosition=position>maxScroll?maxScroll:position;customScrollContainer.tinyscrollbar_update(validPosition>0?validPosition:0)}else{calendarBody.scrollContent.scrollTop=position}}}function setYearLabel(){var scrollContent=calendarBody.scrollContent;var table=scrollContent.querySelector("table");var scrollTop=params.customScroll?-calendarContainer.querySelector(".overview").offsetTop:scrollContent.scrollTop;var rowNumber=parseInt(scrollTop/averageCellHeight,10);var date=getElemDate(table.rows[rowNumber].cells[2]);calendarBody.yearTitle.innerText=date.getFullYear()}function calculateCellHeightAndInitScroll(){params.initScrollBar(container,params);calculateCellHeight();setYearLabel()}function calculateCellHeight(){averageCellHeight=parseInt(calendarBody.bodyTable.clientHeight/calendarBody.bodyTable.querySelectorAll("tr").length,10)}function fieldDate(field){return field&&field.value&&field.value.length>0?params.useIsoForInput?DateTime.fromIsoDate(field.value):DateParse.parse(field.value,locale):null}function getElemDate(elem){return calendarBody.dateCellDates[elem.getAttribute("date-cell-index")||elem.parentNode.getAttribute("date-cell-index")]}function setStartField(date){if(params.startField)params.startField.value=formatDate(date)}function setEndField(date){if(params.endField)params.endField.value=formatDate(date)}function formatDate(date){return date?params.useIsoForInput?date.toISODateString():DateFormat.shortDateFormat(date,locale):""}}},{"./CalendarBody":1,"./RangeEvents":2,"./SingleDateEvents":3,"./util":6,dateutils:13}],5:[function(require,module,exports){module.exports={CalendarBody:require("./CalendarBody"),continuousCalendar:require("./continuousCalendar")}},{"./CalendarBody":1,"./continuousCalendar":4}],6:[function(require,module,exports){module.exports={el:el,extend:extend,elemsAsList:elemsAsList,toggle:toggle};function extend(destination,source){for(var property in source)destination[property]=source[property];return destination}function el(tagName,properties,childNode){var elem=document.createElement(tagName);for(var i in properties)elem[i]=properties[i];if(childNode)elem.appendChild(childNode);return elem}function elemsAsList(selector){return Array.prototype.slice.call(selector)}function toggle(elem,show){if(elem)elem.style.display=show?"":"none"}},{}],7:[function(require,module,exports){var DateTime=require("./DateTime");var DateFormat={};var codes={d:function(d){return leftPad(d.getDate(),2,"0")},D:function(d,l){return l.shortDayNames[d.getDay()]},j:function(d){return d.getDate()},l:function(d,l){return l.dayNames[d.getDay()]},w:function(d){return d.getDay()},z:function(d){return d.getDayInYear()},F:function(d,l){return l.monthNames[d.getMonth()-1]},m:function(d){return leftPad(d.getMonth(),2,"0")},M:function(d,l){return l.monthNames[d.getMonth()-1].substring(0,3)},n:function(d){return d.getMonth()},t:function(d){return d.getDaysInMonth()},Y:function(d){return d.getFullYear()},y:function(d){return(""+d.getFullYear()).substring(2,4)},a:function(d){return d.getHours()<12?"am":"pm"},A:function(d){return d.getHours()<12?"AM":"PM"},g:function(d){return d.getHours()%12?d.getHours()%12:12},G:function(d){return d.getHours()},h:function(d){return leftPad(d.getHours()%12?d.getHours()%12:12,2,"0")},H:function(d){return leftPad(d.getHours(),2,"0")},i:function(d){return leftPad(d.getMinutes(),2,"0")},s:function(d){return leftPad(d.getSeconds(),2,"0")},Z:function(d){return d.date.getTimezoneOffset()/-60}};DateFormat.hoursAndMinutes=function(hours,minutes){return(Math.round((hours+minutes/60)*100)/100).toString()};DateFormat.format=function(dateTime,format,locale){var result="";var special=false;var ch="";for(var i=0;i0)return locale.yearsLabel(years);var months=parseInt(dateRange.days()/30,10);if(months>0)return locale.monthsLabel(months);return locale.daysLabel(dateRange.days())};DateFormat.patterns={ISO8601LongPattern:"Y-m-d H:i:s",ISO8601ShortPattern:"Y-m-d",ShortDatePattern:"n/j/Y",FiShortDatePattern:"j.n.Y",FiWeekdayDatePattern:"D j.n.Y",FiWeekdayDateTimePattern:"D j.n.Y k\\lo G:i",LongDatePattern:"l, F d, Y",FullDateTimePattern:"l, F d, Y g:i:s A",MonthDayPattern:"F d",ShortTimePattern:"g:i A",LongTimePattern:"g:i:s A",SortableDateTimePattern:"Y-m-d\\TH:i:s",UniversalSortableDateTimePattern:"Y-m-d H:i:sO",YearMonthPattern:"F, Y"};function codeToValue(dateTime,ch,locale){return ch in codes?codes[ch](dateTime,locale):ch}function getGMTOffset(dateTime){return(dateTime.date.getTimezoneOffset()>0?"-":"+")+leftPad(Math.floor(dateTime.date.getTimezoneOffset()/60),2,"0")+leftPad(dateTime.date.getTimezoneOffset()%60,2,"0")}function leftPad(val,size,ch){var result=String(val);if(ch===null){ch=" "}while(result.length=0&&minutes<=59}function isHour(hours){return!isNaN(hours)&&hours>=0&&hours<=23}};module.exports=DateParse},{"./DateTime":11}],10:[function(require,module,exports){var DateTime=require("./DateTime");var DateFormat=require("./DateFormat");var DateParse=require("./DateParse");function DateRange(date1,date2){if(!date1||!date2){throw"two dates must be specified, date1="+date1+", date2="+date2}this.start=date1.compareTo(date2)>0?date2:date1;this.end=date1.compareTo(date2)>0?date1:date2;this._days=0;this._hours=0;this._minutes=0;this._valid=true}DateRange.emptyRange=function(){function NullDateRange(){this.start=null;this.end=null;this.days=function(){return 0};this.shiftDays=function(){};this.hasDate=function(){return false};this.clone=function(){return DateRange.emptyRange()};this.expandDaysTo=function(){return this};this.hasEndsOnWeekend=function(){return false};this.isPermittedRange=function(){return true};this.hasSelection=function(){return false}}return new NullDateRange};DateRange.rangeWithMinimumSize=function(oldRange,minimumSize,disableWeekends,outerRange){if(isTooSmallSelection()){var newRange=oldRange.expandDaysTo(minimumSize);if(disableWeekends&&newRange.hasEndsOnWeekend()){var shiftedDays=newRange.shiftDays(delta(newRange.end.getDay())).shiftInside(outerRange);while(!shiftedDays.isPermittedRange(minimumSize,disableWeekends,outerRange)||shiftedDays.end.compareTo(outerRange.end)>0){if(!shiftedDays.isPermittedRange(minimumSize,false,outerRange)){return DateRange.emptyRange()}shiftedDays=shiftedDays.shiftDays(1)}newRange=shiftedDays}if(!newRange.isPermittedRange(minimumSize,false,outerRange)){return DateRange.emptyRange()}return newRange}return oldRange;function isTooSmallSelection(){return minimumSize&&oldRange.days()<=minimumSize}function delta(x){return-((x+1)%7+1)}}
2 | ;DateRange.prototype._setDaysHoursAndMinutes=function(){if(this._hasTimes){var ms=parseInt(this.end.getTime()-this.start.getTime(),10);this._days=parseInt(ms/DateTime.DAY,10);ms=ms-this._days*DateTime.DAY;this._hours=parseInt(ms/DateTime.HOUR,10);ms=ms-this._hours*DateTime.HOUR;this._minutes=parseInt(ms/DateTime.MINUTE,10)}};DateRange.prototype._dateWithTime=function(dateWithoutTime,parsedTime){return dateWithoutTime.withTime(parsedTime[0],parsedTime[1])};DateRange.prototype.hours=function(){return this._hours};DateRange.prototype.minutes=function(){return this._minutes};DateRange.prototype.hasDate=function(date){return date.isBetweenDates(this.start,this.end)};DateRange.prototype.isValid=function(){return this._valid&&this.end.getTime()-this.start.getTime()>=0};DateRange.prototype.days=function(){return this._hasTimes?this._days:Math.round(this.start.distanceInDays(this.end)+1)};DateRange.prototype.shiftDays=function(days){return new DateRange(this.start.plusDays(days),this.end.plusDays(days))};DateRange.prototype.expandTo=function(date){var newStart=this.start.clone();var newEnd=this.end.clone();if(date.compareTo(this.start)<0)newStart=date;else if(date.compareTo(this.end)>0)newEnd=date;return new DateRange(newStart,newEnd)};DateRange.prototype.expandDaysTo=function(days){return new DateRange(this.start,this.start.plusDays(days-1))};DateRange.prototype.hasValidSize=function(minimumDays){return minimumDays<0||this.days()>=minimumDays};DateRange.prototype.hasValidSizeAndEndsOnWorkWeek=function(minimumDays){return this.hasValidSize(minimumDays)&&this.hasEndsOnWeekend()};DateRange.prototype.and=function(that){var latestStart=this.start.compareTo(that.start)>0?this.start:that.start;var earliestEnd=this.end.compareTo(that.end)>0?that.end:this.end;return latestStart.compareTo(earliestEnd)<0?new DateRange(latestStart,earliestEnd):DateRange.emptyRange()};DateRange.prototype.isInside=function(outer){return this.start.compareTo(outer.start)>=0&&this.end.compareTo(outer.end)<=0};DateRange.prototype.hasEndsOnWeekend=function(){return this.start.isWeekend()||this.end.isWeekend()};DateRange.prototype.withTimes=function(startTimeStr,endTimeStr){var parsedStartTime=DateParse.parseTime(startTimeStr);var parsedEndTime=DateParse.parseTime(endTimeStr);var rangeWithTimes=this.clone();if(parsedStartTime&&parsedEndTime){rangeWithTimes._valid=true;rangeWithTimes._hasTimes=true;rangeWithTimes.start=this._dateWithTime(this.start,parsedStartTime);rangeWithTimes.end=this._dateWithTime(this.end,parsedEndTime);rangeWithTimes._setDaysHoursAndMinutes()}else{rangeWithTimes._valid=false}return rangeWithTimes};DateRange.prototype.clone=function(){return new DateRange(this.start,this.end)};DateRange.prototype.toString=function(){return["DateRange:",this.start.toString(),"-",this.end.toString(),this._days,"days",this._hours,"hours",this._minutes,"minutes",this._valid?"valid":"invalid"].join(" ")};DateRange.prototype.isPermittedRange=function(minimumSize,disableWeekends,outerRange){return this.hasValidSize(minimumSize)&&!(disableWeekends&&this.hasEndsOnWeekend())&&this.isInside(outerRange)};DateRange.prototype.shiftInside=function(outerRange){if(this.days()>outerRange.days()){return DateRange.emptyRange()}var distanceToOuterRangeStart=this.start.distanceInDays(outerRange.start);var distanceToOuterRangeEnd=this.end.distanceInDays(outerRange.end);if(distanceToOuterRangeStart>0){return this.shiftDays(distanceToOuterRangeStart)}if(distanceToOuterRangeEnd<0){return this.shiftDays(distanceToOuterRangeEnd)}return this};DateRange.prototype.hasSelection=function(){return this.days()>0};module.exports=DateRange},{"./DateFormat":7,"./DateParse":9,"./DateTime":11}],11:[function(require,module,exports){function DateTime(date){if(arguments.length===0)this.date=new Date;else if(date instanceof Date)this.date=new Date(date);else throw Error("Argument must be a date object. "+date+" was given")}DateTime.SUNDAY=0;DateTime.MONDAY=1;DateTime.TUESDAY=2;DateTime.WEDNESDAY=3;DateTime.THURSDAY=4;DateTime.FRIDAY=5;DateTime.SATURDAY=6;DateTime.daysInMonth=[31,28,31,30,31,30,31,31,30,31,30,31];DateTime.y2kYear=50;DateTime.monthNumbers={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11};DateTime.fromDateTime=function(year,month,day,hours,minutes,seconds){return new DateTime(createSafeDate(+year,+month,+day,+hours,+minutes,+seconds||0))};DateTime.fromDate=function(year,month,day){return DateTime.fromDateTime(year,month,day,0,0,0)};DateTime.fromDateObject=function(date){return new DateTime(date)};DateTime.fromIsoDate=function(isoDate){var optionalTimePattern=/^\d{4}-[01]\d-[0-3]\d(T[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z?))?$/;if(!optionalTimePattern.test(isoDate))throw Error(isoDate+" is not valid ISO Date (YYYY-MM-DD or YYYY-MM-DDTHH:MM)");var date=parseDate(isoDate.split("T")[0]);return DateTime.fromDate(date.year,date.month,date.day)};DateTime.fromIsoDateTime=function(isoDateTime){var fullPatternTest=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z?)/;if(!fullPatternTest.test(isoDateTime))throw Error(isoDateTime+" is not valid ISO Date (YYYY-MM-DDTHH:MM)");var dateAndTime=isoDateTime.split("T");var time=parseTime(dateAndTime.length===2&&dateAndTime[1]);var date=parseDate(dateAndTime[0]);return DateTime.fromDateTime(date.year,date.month,date.day,time.hours,time.minutes,time.seconds)};DateTime.fromMillis=function(ms){return new DateTime(new Date(ms))};DateTime.prototype.withResetMS=function(){var newDate=this.clone();newDate.date.setMilliseconds(0);return newDate};DateTime.prototype.withTime=function(h,m){if(typeof h==="string"){var hoursAndMinutes=h.split(":");h=hoursAndMinutes[0];m=hoursAndMinutes[1]}var dateWithTime=this.clone();dateWithTime.date.setHours(h);dateWithTime.date.setMinutes(m);dateWithTime.date.setSeconds(0);dateWithTime.date.setMilliseconds(0);return dateWithTime};DateTime.SECOND=1e3;DateTime.MINUTE=60*DateTime.SECOND;DateTime.HOUR=60*DateTime.MINUTE;DateTime.DAY=24*DateTime.HOUR;DateTime.WEEK=7*DateTime.DAY;DateTime.now=function(){return new DateTime};DateTime.today=function(){return DateTime.now().getOnlyDate()};DateTime.prototype.getTime=function(){return this.date.getTime()};DateTime.prototype.getFullYear=function(){return this.date.getFullYear()};DateTime.prototype.getDate=function(){return this.date.getDate()};DateTime.prototype.getMonth=function(){return this.date.getMonth()+1};DateTime.prototype.getDay=function(){return this.date.getDay()};DateTime.prototype.getHours=function(){return this.date.getHours()};DateTime.prototype.getMinutes=function(){return this.date.getMinutes()};DateTime.prototype.getSeconds=function(){return this.date.getSeconds()};DateTime.prototype.getMilliseconds=function(){return this.date.getMilliseconds()};DateTime.prototype.getDaysInMonth=function(){return DateTime.getDaysInMonth(this.getFullYear(),this.getMonth())};DateTime.prototype.getDayInYear=function(){return DateTime.getDayInYear(this.getFullYear(),this.getMonth(),this.getDate())};DateTime.prototype.plusDays=function(days){var newDateTime=DateTime.fromMillis(this.getTime()+days*DateTime.DAY);var hours=this.getHours();var delta=hours-newDateTime.getHours();if(delta!==0){if(delta>12){delta-=24}if(delta<-12){delta+=24}return DateTime.fromMillis(newDateTime.getTime()+delta*DateTime.HOUR)}return newDateTime};DateTime.prototype.plusMinutes=function(minutes){return DateTime.fromMillis(this.clone().getTime()+minutes*DateTime.MINUTE)};DateTime.prototype.minusMinutes=function(minutes){return this.plusMinutes(-minutes)};DateTime.prototype.minusDays=function(days){return this.plusDays(-days)};DateTime.prototype.compareTo=function(date){if(!date){return 1}var diff=this.getTime()-date.getTime();return diff===0?0:diff/Math.abs(diff)};DateTime.prototype.isToday=function(){return this.equalsOnlyDate(DateTime.today())};DateTime.prototype.getWeekInYear=function(weekNumberingSystem){if(weekNumberingSystem!=="US"&&weekNumberingSystem!=="ISO"){throw"Week numbering system must be either US or ISO, was "+weekNumberingSystem}var firstDay=new Date(this.getFullYear(),0,1).getDay();if(weekNumberingSystem==="US"){return Math.ceil((this.getDayInYear()+firstDay)/7)}var THU=4;var weekday=this.getDay();if(weekday===0)weekday=7;if(firstDay===0)firstDay=7;if(this.getMonth()===12&&this.getDate()>=29&&this.getDate()-weekday>27){return 1}if(this.getMonth()===1&&this.getDate()<4&&weekday>THU){return new DateTime(new Date(this.getFullYear()-1,11,31)).getWeekInYear("ISO")}var week=Math.ceil((this.getDayInYear()+firstDay-1)/7);if(firstDay>THU)week--;return week};DateTime.prototype.clone=function(){return new DateTime(this.date)};DateTime.prototype.isOddMonth=function(){return this.getMonth()%2===0};DateTime.prototype.equalsOnlyDate=function(date){if(!date)return false;return this.getMonth()===date.getMonth()&&this.getDate()===date.getDate()&&this.getFullYear()===date.getFullYear()};DateTime.prototype.firstDateOfMonth=function(){return DateTime.fromDate(this.getFullYear(),this.getMonth(),1)};DateTime.prototype.lastDateOfMonth=function(){return DateTime.fromDate(this.getFullYear(),this.getMonth(),this.getDaysInMonth())};DateTime.prototype.distanceInDays=function(date){var first=parseInt(this.getTime()/DateTime.DAY,10);var last=parseInt(date.getTime()/DateTime.DAY,10);return last-first};DateTime.prototype.withWeekday=function(weekday){return this.plusDays(weekday-this.getDay())};DateTime.prototype.getOnlyDate=function(){return DateTime.fromDate(this.getFullYear(),this.getMonth(),this.getDate())};DateTime.prototype.isWeekend=function(){return this.getDay()===6||this.getDay()===0};DateTime.prototype.toString=function(){return this.toISOString()};DateTime.prototype.getFirstDateOfWeek=function(locale){var firstWeekday=locale?locale.firstWeekday:DateTime.MONDAY;if(firstWeekday==this.getDay)return this.clone();else return this.plusDays(firstWeekday-this.getDay()-(firstWeekday>this.getDay()?7:0))};DateTime.prototype.toISOString=function(){return isoDate.call(this)+"T"+isoTime.call(this)};DateTime.prototype.toISODateString=function(){return isoDate.call(this)};DateTime.prototype.isBetweenDates=function(start,end){if(start.getTime()>end.getTime())throw Error("start date can't be after end date");var onlyDate=this.getOnlyDate();return onlyDate.compareTo(start.getOnlyDate())>=0&&onlyDate.compareTo(end.getOnlyDate())<=0};DateTime.getDaysInMonth=function(year,month){if(month>12||month<1)throw new Error("Month must be between 1-12");var yearAndMonth=year*12+month;return DateTime.fromDate(Math.floor(yearAndMonth/12),yearAndMonth%12+1,1).minusDays(1).getDate()};DateTime.getDayInYear=function(year,month,day){return DateTime.fromDate(year,1,1).distanceInDays(DateTime.fromDate(year,month,day))+1};function isoDate(){return this.getFullYear()+"-"+twoDigits(this.getMonth())+"-"+twoDigits(this.getDate())}function isoTime(){return twoDigits(this.getHours())+":"+twoDigits(this.getMinutes())+":"+twoDigits(this.getSeconds())}function twoDigits(value){return value<10?"0"+value:""+value}function createSafeDate(year,month,date,hours,minutes,seconds){hours=hours||0;minutes=minutes||0;seconds=seconds||0;var newDate=new Date(year,month-1,date,hours,minutes,seconds,0);if(newDate.toString()==="Invalid Date"||month!==newDate.getMonth()+1||year!==newDate.getFullYear()||date!==newDate.getDate()||hours!==newDate.getHours()||minutes!==newDate.getMinutes()||seconds!==newDate.getSeconds())throw Error("Invalid Date: "+year+"-"+month+"-"+date+" "+hours+":"+minutes+":"+seconds);return newDate}function parseDate(str){var dateComponents=str.split("-");return{year:+dateComponents[0],month:+dateComponents[1],day:+dateComponents[2]}}function parseTime(str){if(str){var timeComponents=str.split(":");return{hours:+timeComponents[0],minutes:+timeComponents[1],seconds:+timeComponents[2]||0}}else{return{hours:0,minutes:0}}}module.exports=DateTime},{}],12:[function(require,module,exports){var Duration=function(durationMs){this.durationMs=durationMs};Duration.MS=1;Duration.SECOND=1e3;Duration.MIN=60*Duration.SECOND;Duration.HOUR=60*Duration.MIN;Duration.DAY=24*Duration.HOUR;Duration.fromMS=function(milliSeconds){return new Duration(milliSeconds)};Duration.fromSeconds=function(seconds){return Duration.fromMS(seconds*Duration.SECOND)};Duration.fromMinutes=function(minutes){return Duration.fromMS(minutes*Duration.MIN)};Duration.fromHours=function(hours){return Duration.fromMS(hours*Duration.HOUR)};Duration.fromDays=function(days){return Duration.fromMS(days*Duration.DAY)};Duration.prototype.toMS=function(){return this.durationMs};Duration.prototype.asUnit=function(unit){return Number(this.durationMs/unit)};module.exports=Duration},{}],13:[function(require,module,exports){module.exports={version:"0.3.1",DateFormat:require("./DateFormat"),DateLocale:require("./DateLocale"),DateParse:require("./DateParse"),DateRange:require("./DateRange"),DateTime:require("./DateTime"),Duration:require("./Duration")}},{"./DateFormat":7,"./DateLocale":8,"./DateParse":9,"./DateRange":10,"./DateTime":11,"./Duration":12}],14:[function(require,module,exports){var DateTime=require("../DateTime");var DateFormat=require("../DateFormat");module.exports={id:"AU",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],yearsLabel:function(years){return years+" "+(years===1?"Year":"Years")},monthsLabel:function(months){return months+" "+(months===1?"Months":"Months")},daysLabel:function(days){return days+" "+(days===1?"Day":"Days")},hoursLabel:function(hours,minutes){var hoursAndMinutes=DateFormat.hoursAndMinutes(hours,minutes);return hoursAndMinutes+" "+(+hoursAndMinutes===1?"Hour":"Hours")},clearRangeLabel:"Clear Range",clearDateLabel:"Clear Date",shortDateFormat:"j/n/Y",weekDateFormat:"D j/n/Y",dateTimeFormat:"D j/n/Y G:i",firstWeekday:DateTime.SUNDAY,holidays:{}}},{"../DateFormat":7,"../DateTime":11}],15:[function(require,module,exports){var DateTime=require("../DateTime");var DateFormat=require("../DateFormat");module.exports={id:"AU",monthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayNames:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],shortDayNames:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],yearsLabel:function(years){return years+" "+(years===1?"年":"年")},monthsLabel:function(months){return months+" "+(months===1?"月":"月")},daysLabel:function(days){return days+" "+(days===1?"日":"日")},hoursLabel:function(hours,minutes){var hoursAndMinutes=DateFormat.hoursAndMinutes(hours,minutes);return hoursAndMinutes+" "+(+hoursAndMinutes===1?"小时":"小时")},clearRangeLabel:"范围",clearDateLabel:"日期",shortDateFormat:"Y年m月d日",weekDateFormat:"Y年m月d日 D",dateTimeFormat:"Y年m月d日 H时i分s秒",firstWeekday:DateTime.MONDAY,holidays:{}}},{"../DateFormat":7,"../DateTime":11}],16:[function(require,module,exports){var DateTime=require("../DateTime");var DateFormat=require("../DateFormat");module.exports={id:"DE",monthNames:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],shortDayNames:["So","Mo","Di","Mi","Do","Fr","Sa"],yearsLabel:function(years){return years+" "+"Jahr"},monthsLabel:function(months){return months+" "+(months===1?"Monat":"Months")},daysLabel:function(days){return days+" "+(days===1?"Tag":"Tage")},hoursLabel:function(hours,minutes){var hoursAndMinutes=DateFormat.hoursAndMinutes(hours,minutes);return hoursAndMinutes+" "+(+hoursAndMinutes===1?"Stunde":"Stunden")},clearRangeLabel:"Auswahl löschen",clearDateLabel:"Auswahl löschen",shortDateFormat:"j.n.Y",weekDateFormat:"D j.n.Y",dateTimeFormat:"D j.n.Y G:i",firstWeekday:DateTime.MONDAY,holidays:{}}},{"../DateFormat":7,"../DateTime":11}],17:[function(require,module,exports){var DateTime=require("../DateTime");var DateFormat=require("../DateFormat");module.exports={id:"EN",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],yearsLabel:function(years){return years+" "+(years===1?"Year":"Years")},monthsLabel:function(months){return months+" "+(months===1?"Months":"Months")},daysLabel:function(days){return days+" "+(days===1?"Day":"Days")},hoursLabel:function(hours,minutes){var hoursAndMinutes=DateFormat.hoursAndMinutes(hours,minutes);return hoursAndMinutes+" "+(+hoursAndMinutes===1?"Hour":"Hours")},clearRangeLabel:"Clear Range",clearDateLabel:"Clear Date",shortDateFormat:"n/j/Y",weekDateFormat:"D n/j/Y",dateTimeFormat:"D n/j/Y G:i",firstWeekday:DateTime.SUNDAY,holidays:{}}},{"../DateFormat":7,"../DateTime":11}],18:[function(require,module,exports){var DateTime=require("../DateTime");var DateFormat=require("../DateFormat");module.exports={id:"ET",monthNames:["Jaanuar","Veebruar","Märts","Aprill","Mai","Juuni","Juuli","August","September","Oktoober","November","Detsember"],dayNames:["Pühapäev","Esmaspäev","Teisipäev","Kolmapäev","Neljapäev","Reede","Laupäev"],shortDayNames:["P","E","T","K","N","R","L"],yearsLabel:function(years){return years+" "+(years===1?"Aasta":"Aastat")},monthsLabel:function(months){return months+" "+(months===1?"Kuu":"Kuud")},daysLabel:function(days){return days+" "+(days===1?"Päev":"Päeva")},hoursLabel:function(hours,minutes){var hoursAndMinutes=DateFormat.hoursAndMinutes(hours,minutes).replace(".",",");return hoursAndMinutes+" "+(+hoursAndMinutes===1?"Tund":"Tundi")},clearRangeLabel:"TODO",clearDateLabel:"TODO",shortDateFormat:"j.n.Y",weekDateFormat:"D j.n.Y",dateTimeFormat:"D j.n.Y G:i",firstWeekday:DateTime.MONDAY,holidays:{}}},{"../DateFormat":7,"../DateTime":11}],19:[function(require,module,exports){module.exports={"2015-01-01":"Uudenvuodenpäivä","2015-01-06":"Loppiainen","2015-04-03":"Pitkäperjantai","2015-04-04":"Pääsiäislauantai","2015-04-05":"Pääsiäispäivä","2015-04-06":"2. pääsiäispäivä","2015-05-01":"Vappu","2015-05-14":"Helatorstai","2015-06-19":"Juhannusaatto","2015-06-20":"Juhannuspäivä","2015-10-31":"Pyhäinpäivä","2015-12-06":"Itsenäisyyspäivä","2015-12-24":"Jouluaatto","2015-12-25":"Joulupäivä","2015-12-26":"Tapaninpäivä","2016-01-01":"Uudenvuodenpäivä","2016-01-06":"Loppiainen","2016-03-25":"Pitkäperjantai","2016-03-26":"Pääsiäislauantai","2016-03-27":"Pääsiäispäivä","2016-03-28":"2. pääsiäispäivä","2016-05-01":"Vappu","2016-05-05":"Helatorstai","2016-06-24":"Juhannusaatto","2016-06-25":"Juhannuspäivä","2016-11-05":"Pyhäinpäivä","2016-12-06":"Itsenäisyyspäivä","2016-12-24":"Jouluaatto","2016-12-25":"Joulupäivä","2016-12-26":"Tapaninpäivä","2017-01-01":"Uudenvuodenpäivä","2017-01-06":"Loppiainen","2017-04-14":"Pitkäperjantai","2017-04-15":"Pääsiäislauantai","2017-04-16":"Pääsiäispäivä","2017-04-17":"2. pääsiäispäivä","2017-05-01":"Vappu","2017-05-25":"Helatorstai","2017-06-23":"Juhannusaatto","2017-06-24":"Juhannuspäivä","2017-11-04":"Pyhäinpäivä","2017-12-06":"Itsenäisyyspäivä","2017-12-24":"Jouluaatto","2017-12-25":"Joulupäivä","2017-12-26":"Tapaninpäivä","2018-01-01":"Uudenvuodenpäivä","2018-01-06":"Loppiainen","2018-03-30":"Pitkäperjantai","2018-03-31":"Pääsiäislauantai","2018-04-01":"Pääsiäispäivä","2018-04-02":"2. pääsiäispäivä","2018-05-01":"Vappu","2018-05-10":"Helatorstai","2018-06-22":"Juhannusaatto","2018-06-23":"Juhannuspäivä","2018-11-03":"Pyhäinpäivä","2018-12-06":"Itsenäisyyspäivä","2018-12-24":"Jouluaatto","2018-12-25":"Joulupäivä","2018-12-26":"Tapaninpäivä","2019-01-01":"Uudenvuodenpäivä","2019-01-06":"Loppiainen","2019-04-19":"Pitkäperjantai","2019-04-20":"Pääsiäislauantai","2019-04-21":"Pääsiäispäivä","2019-04-22":"2. pääsiäispäivä","2019-05-01":"Vappu","2019-05-30":"Helatorstai","2019-06-21":"Juhannusaatto","2019-06-22":"Juhannuspäivä","2019-11-02":"Pyhäinpäivä","2019-12-06":"Itsenäisyyspäivä","2019-12-24":"Jouluaatto","2019-12-25":"Joulupäivä","2019-12-26":"Tapaninpäivä","2020-01-01":"Uudenvuodenpäivä","2020-01-06":"Loppiainen","2020-04-10":"Pitkäperjantai","2020-04-11":"Pääsiäislauantai","2020-04-12":"Pääsiäispäivä","2020-04-13":"2. pääsiäispäivä","2020-05-01":"Vappu","2020-05-21":"Helatorstai","2020-06-19":"Juhannusaatto","2020-06-20":"Juhannuspäivä","2020-10-31":"Pyhäinpäivä","2020-12-06":"Itsenäisyyspäivä","2020-12-24":"Jouluaatto","2020-12-25":"Joulupäivä","2020-12-26":"Tapaninpäivä","2021-01-01":"Uudenvuodenpäivä","2021-01-06":"Loppiainen","2021-04-02":"Pitkäperjantai","2021-04-03":"Pääsiäislauantai","2021-04-04":"Pääsiäispäivä","2021-04-05":"2. pääsiäispäivä","2021-05-01":"Vappu","2021-05-13":"Helatorstai","2021-06-25":"Juhannusaatto","2021-06-26":"Juhannuspäivä","2021-11-06":"Pyhäinpäivä","2021-12-06":"Itsenäisyyspäivä","2021-12-24":"Jouluaatto","2021-12-25":"Joulupäivä","2021-12-26":"Tapaninpäivä"}},{}],20:[function(require,module,exports){var DateTime=require("../DateTime");var DateFormat=require("../DateFormat");var holidays=require("./FI-holidays");module.exports={id:"FI",monthNames:["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu"],dayNames:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"],shortDayNames:["su","ma","ti","ke","to","pe","la"],yearsLabel:function(years){return years+" "+(years===1?"vuosi":"vuotta")},monthsLabel:function(months){return months+" "+(months===1?"kuukausi":"kuukautta")},daysLabel:function(days){return days+" "+(days===1?"päivä":"päivää")},hoursLabel:function(hours,minutes){var hoursAndMinutes=DateFormat.hoursAndMinutes(hours,minutes).replace(".",",");return hoursAndMinutes+" "+(+hoursAndMinutes===1?"tunti":"tuntia")},clearRangeLabel:"Poista valinta",clearDateLabel:"Poista valinta",shortDateFormat:"j.n.Y",weekDateFormat:"D j.n.Y",dateTimeFormat:"D j.n.Y k\\lo G:i",firstWeekday:DateTime.MONDAY,holidays:holidays}},{"../DateFormat":7,"../DateTime":11,"./FI-holidays":19}],21:[function(require,module,exports){var DateTime=require("../DateTime");var DateFormat=require("../DateFormat");module.exports={id:"FR",monthNames:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],dayNames:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],shortDayNames:["D","L","M","M","J","V","S"],yearsLabel:function(years){return years+" "+(years===1?"Année":"Années")},monthsLabel:function(months){return months+" "+(months===1?"Mois":"Moiss")},daysLabel:function(days){return days+" "+(days===1?"Jour":"Jours")},hoursLabel:function(hours,minutes){var hoursAndMinutes=DateFormat.hoursAndMinutes(hours,minutes);return hoursAndMinutes+" "+(+hoursAndMinutes===1?"Heure":"Heures")},clearRangeLabel:"Effacer la sélection",clearDateLabel:"Effacer la date",shortDateFormat:"j/n/Y",weekDateFormat:"D j/n/Y",dateTimeFormat:"D j/n/Y G:i",firstWeekday:DateTime.MONDAY,holidays:{}}},{"../DateFormat":7,"../DateTime":11}],22:[function(require,module,exports){var DateTime=require("../DateTime");var DateFormat=require("../DateFormat");module.exports={id:"LV",monthNames:["Janvāris","Februāris","Marts","Aprīlis","Maijs","Jūnijs"," Jūlijs","Augusts","Septembris","Oktobris","Novembris","Decembris"],dayNames:["Svētdiena","Pirmdiena","Otrdiena","Trešdiena","Ceturtdiena","Piektdiena","Sestdiena"],shortDayNames:["Sv","P","O","T","C","Pk","S"],yearsLabel:function(years){return years+" "+(years===1?"G":"G")},monthsLabel:function(months){return months+" "+(months===1?"Mēnesī":"Mēnešiem")},daysLabel:function(days){return days+" "+(days===1?"Diena":"Dienas")},hoursLabel:function(hours,minutes){var hoursAndMinutes=DateFormat.hoursAndMinutes(hours,minutes);return hoursAndMinutes+" "+(+hoursAndMinutes===1?"Stundas":"Minūtes")},clearRangeLabel:"TODO",clearDateLabel:"TODO",shortDateFormat:"j.n.Y",weekDateFormat:"D j.n.Y",dateTimeFormat:"D j.n.Y G:i",firstWeekday:DateTime.MONDAY,holidays:{}}},{"../DateFormat":7,"../DateTime":11}],23:[function(require,module,exports){var DateTime=require("../DateTime");var DateFormat=require("../DateFormat");function pluralize(number,words){var magnitude=number%100;var pluralWord="";if(magnitude>10&&magnitude<20||number===0){pluralWord=words[2]}else{switch(Math.abs(number%10)){case 1:pluralWord=words[0];break;case 2:case 3:case 4:pluralWord=words[1];break;default:pluralWord=words[2];break}}return[number,pluralWord].join(" ")}module.exports={id:"RU",monthNames:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],dayNames:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"],shortDayNames:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],yearsLabel:function(years){return pluralize(years,["Год","Года","Лет"])},monthsLabel:function(months){return pluralize(months,["Месяц","Месяца","Месяцев"])},daysLabel:function(days){return pluralize(days,["День","Дня","Дней"])},hoursLabel:function(hours,minutes){var hoursAndMinutes=DateFormat.hoursAndMinutes(hours,minutes).replace(".",",");return hoursAndMinutes+" Часа"},learRangeLabel:"Очистить диапазон",clearDateLabel:"Очистить дату",shortDateFormat:"j.n.Y",weekDateFormat:"D j.n.Y",dateTimeFormat:"D j.n.Y G:i",firstWeekday:DateTime.MONDAY,holidays:{}}},{"../DateFormat":7,"../DateTime":11}],24:[function(require,module,exports){var DateTime=require("../DateTime");var DateFormat=require("../DateFormat");module.exports={id:"SV",monthNames:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayNames:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag"],shortDayNames:["Sö","Må","Ti","On","To","Fr","Lö"],yearsLabel:function(years){return years+" "+(years===1?"År":"År")},monthsLabel:function(months){return months+" "+(months===1?"Månad":"Månader")},daysLabel:function(days){return days+" "+(days===1?"Dag":"Dagar")},hoursLabel:function(hours,minutes){var hoursAndMinutes=DateFormat.hoursAndMinutes(hours,minutes).replace(".",",");return hoursAndMinutes+" "+(+hoursAndMinutes===1?"Minut":"Minuter")},clearRangeLabel:"TODO",clearDateLabel:"TODO",shortDateFormat:"j.n.Y",weekDateFormat:"D j.n.Y",dateTimeFormat:"D j.n.Y G:i",firstWeekday:DateTime.MONDAY,holidays:{}}},{"../DateFormat":7,"../DateTime":11}],25:[function(require,module,exports){require("../continuousCalendar/jquery.continuousCalendar");window.DateFormat=require("dateutils").DateFormat;window.DateParse=require("dateutils").DateParse;window.DateLocale=require("dateutils").DateLocale;window.DateTime=require("dateutils").DateTime;window.DateRange=require("dateutils").DateRange},{"../continuousCalendar/jquery.continuousCalendar":26,dateutils:13}],26:[function(require,module,exports){var continuousCalendar=require("continuous-calendar").continuousCalendar;$.continuousCalendar={version:"5.1.1"};$.fn.continuousCalendar=function(options){return this.each(function(){options.initScrollBar=function(container,params){return params.customScroll&&$(".tinyscrollbar",container).tinyscrollbar(params.scrollOptions)};options.executeCallback=function(container,selection,params){params.callback.call(container,selection);$(container).trigger("calendarChange",selection)};continuousCalendar($(this).get(0),options)})};$.fn.calendarRange=function(){return this.get(0).calendarRange};$.fn.exists=function(){return this.length>0};$.fn.isEmpty=function(){return this.length===0}},{"continuous-calendar":5}]},{},[25]);
3 |
--------------------------------------------------------------------------------
/continuousCalendar.jquery.json:
--------------------------------------------------------------------------------
1 | {
2 | "name" : "continuousCalendar",
3 | "title" : "jQuery Continuous Calendar",
4 | "description" : "Date picker and range selector with scrollable months instead of paged",
5 | "keywords" : [
6 | "tags",
7 | "ui",
8 | "input",
9 | "calendar",
10 | "date",
11 | "datepicker",
12 | "dateinput",
13 | "dates",
14 | "form",
15 | "i18n"
16 | ],
17 | "version" : "5.1.1",
18 | "author" : {
19 | "name": "Eero Anttila",
20 | "url" : "http://eeroanttila.wordpress.com/about/"
21 | },
22 | "maintainers" : [
23 | {
24 | "name" : "Eero Anttila",
25 | "email": "eea@iki.fi",
26 | "url" : "http://eeroanttila.wordpress.com/about/"
27 | }
28 | ],
29 | "licenses" : [
30 | {
31 | "type": "Apache License, Version 2.0",
32 | "url" : "http://www.apache.org/licenses/LICENSE-2.0"
33 | }
34 | ],
35 | "bugs" : "https://github.com/continuouscalendar/jquery-continuous-calendar/issues",
36 | "homepage" : "http://continuouscalendar.github.com/jquery-continuous-calendar/",
37 | "docs" : "http://continuouscalendar.github.com/jquery-continuous-calendar/#api_documentation",
38 | "download" : "https://github.com/continuouscalendar/jquery-continuous-calendar/archive/3.0.3.zip",
39 | "dependencies": {
40 | "jquery": ">=1.5"
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/ghpages.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | git checkout gh-pages
3 | git reset --hard master
4 | git push -f origin gh-pages
5 | git checkout master
6 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Jquery continuous calendar
6 |
7 |
8 |
9 |
10 |
11 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
33 |
40 |
41 |
Jquery continuous calendar
42 |
50 |
51 |
52 |
53 |
An example of range select with integrated time values
54 |
55 |
56 |
57 |
58 |
59 |
Select Days
60 |
61 |
62 |
63 |
64 | Starts
65 |
66 |
67 |
68 |
69 | Ends
70 |
71 |
72 |
73 |
74 | Duration
75 |
76 |
77 |
78 |
79 |
80 |
Date picker example
81 |
82 |
83 |
84 |
85 |
86 |
Features
87 |
88 |
89 | Date dragging
90 | No pagination, continuous month flow
91 | Range shifting by dragging
92 | Range expand with Shift + Mouse click
93 | Display current date
94 | Allow disabling of dates
95 | Month select
96 | Week select
97 | Popup support
98 | Support for different date formats
99 | Support for specifying holidays or disabled days
100 | Support for setting minimum range
101 | Support for custom scrollbar
102 | Three different themes
103 |
104 |
105 |
Supported browsers
106 |
107 |
108 | IE7 →
109 | FireFox
110 | Chrome
111 | Opera
112 | Safari
113 |
114 |
115 |
Getting started
116 |
117 |
118 |
Insert in head
119 |
<!-- basic default calendar styles -->
120 | <link rel="stylesheet" type="text/css"
121 | href="http://continuouscalendar.github.com/jquery-continuous-calendar/build/jquery.continuousCalendar-latest.css" />
122 |
123 | <!-- custom user specified calendar styles -->
124 | <style type="text/css">
125 | .calendarScrollContent {height: 250px;}
126 | </style>
127 | <!-- required JavaScript files -->
128 | <script type="text/javascript"
129 | src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
130 | <script type="text/javascript"
131 | src="http://continuouscalendar.github.com/jquery-continuous-calendar/build/jquery.continuousCalendar-latest.js">
132 | </script>
133 |
134 |
Insert in body
135 |
<!-- range selection is attached to fields with class startDate and endDate -->
136 | <div id="dateRange1">
137 | <input type="hidden" class="startDate" name="range_start">
138 | <input type="hidden" class="endDate" name="range_end">
139 | </div>
140 | <script type="text/javascript" language="JavaScript">
141 | $("#dateRange1").continuousCalendar();
142 | </script>
143 |
144 |
145 |
146 |
Api Documentation
147 |
148 |
149 |
150 |
Events
151 |
152 |
153 | calendarChange
154 | Triggered in calendar init and calendar selections. Event object contains DateRange or Date for current selection
155 |
156 |
157 |
Methods
158 |
159 |
160 | .continuousCalendar(options)
161 | Creates a continuous calendar. Start and end input's are created if they don't exist. When created manually, they must have classes startDate and endDate and they must be inside the container. Options are passed in object. See options below.
162 |
163 | .calendarRange(), returns DateRange
164 | Returns calendar range object for current selection
165 |
166 |
167 |
Options, color codes:
168 |
169 |
170 |
171 | Property name , Default value Type
172 |
173 | weeksBefore 26 Number
174 | Specifies amount of weeks displayed before selection. If no default selection then count from current day.
175 |
176 | weeksAfter 26 Number
177 | Specifies amount of weeks displayed after selection. If no default selection then count from current day.
178 |
179 | firstDate null String
180 | Specifies exact date for calendar start. this is alternative for weeksBefore. Date is in current short date format, i.e. 12/31/2011 or 31.1.2011.
181 |
182 | lastDate null String
183 | Specifies exact date for calendar end. This is alternative for weeksAfter. Date is in current short date format, i.e. 12/31/2011 or 31.1.2011.
184 |
185 | startField $('input.startDate', this) jQuery object
186 | Specifies jquery element for start input field. This is used also for single date calendar
187 |
188 | endField $('input.endDate', this) jQuery object
189 | Specifies jquery element for end input field.
190 |
191 | isPopup false Boolean
192 | Specifies if calendar opens as popup or as inline version
193 |
194 | selectToday false Boolean
195 | True, of current date is to be chosen, even if input field is empty.
196 |
197 | locale DateLocale.EN Object
198 | Specifies locale for rendering calendar and parsing input fields.
199 |
200 | disableWeekends false Boolean
201 | True if weekends are disabled.
202 |
203 | disabledDates null String
204 | Space separated list of disabled dates. Dates are presented in short date format of current locale.
205 |
206 | minimumRange -1 Number
207 | Sets minimum range permitted in days. Shorter selections are expanded automatically.
208 |
209 | selectWeek false Boolean
210 | Set to true for automatically selecting full weeks.
211 |
212 | fadeOutDuration 0 Number
213 | Duration for fade out. Value is passed for jQuery's .fadeOut function.
214 |
215 | callback $.noop Function
216 | Function called in init and after date selection. DateRange or Date is passed as argument and this points to calendar container.
217 |
218 | theme '' String
219 | Theme to be used. Currently available alternative themes are rounded and transparent. Don't forget to include the required css for the theme.
220 |
221 |
222 |
223 |
224 |
Instructions for contributors
225 |
226 |
227 | make a fork
228 | code
229 | run tests: jquery.continuousCalendar.spec.html
230 | Update documentation to index.html
231 | Update release notes to History.textile
232 | make pull request
233 |
234 |
License
235 |
236 |
237 |
Licensed under the Apache License, Version 2.0 (the “License”); you may not
238 | use this file except in compliance with the License. You may obtain a copy of
239 | the License at
240 |
241 |
http://www.apache.org/licenses/LICENSE-2.0
242 |
243 |
Unless required by applicable law or agreed to in writing, software
244 | distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
245 | License for the specific language governing permissions and limitations under
246 | the License.
247 |
248 |
249 |
250 |
254 |
255 |
285 |
300 |
312 |
313 |
314 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "jquery-continuous-calendar",
3 | "version": "5.1.1",
4 | "description": "Date picker and range selector with scrollable months instead of paged",
5 | "repository": {
6 | "type": "git",
7 | "url": "https://github.com/continuouscalendar/jquery-continuous-calendar"
8 | },
9 | "scripts": {
10 | "test": "eslint .",
11 | "buildBundle": "browserify src/build/bundleWrapper.js -o build/jquery.continuousCalendar-latest.js",
12 | "minifyBundle": "uglifyjs build/jquery.continuousCalendar-latest.js > build/jquery.continuousCalendar-latest-min.js",
13 | "prepublish": "npm run buildBundle && npm run minifyBundle",
14 | "buildStyles": "lessc src/continuousCalendar/jquery.continuousCalendar.less build/jquery.continuousCalendar-latest-min.css"
15 | },
16 | "keywords": [
17 | "calendar",
18 | "date",
19 | "dateinput",
20 | "datepicker",
21 | "dates",
22 | "form",
23 | "i18n",
24 | "input",
25 | "ui",
26 | "jquery",
27 | "jquery-plugin"
28 | ],
29 | "author": "Eero Anttila",
30 | "license": "Apache-2.0",
31 | "bugs": {
32 | "url": "https://github.com/continuouscalendar/jquery-continuous-calendar/issues"
33 | },
34 | "main": "./src/continuousCalendar/jquery.continuousCalendar",
35 | "homepage": "http://continuouscalendar.github.com/jquery-continuous-calendar/",
36 | "files": [
37 | "build",
38 | "src/main",
39 | "package.json",
40 | "LICENSE-2.0.txt"
41 | ],
42 | "devDependencies": {
43 | "browserify": "^13.0.0",
44 | "eslint": "^3.3.1",
45 | "less": "^3.10.3",
46 | "uglify-js": "^2.6.1"
47 | },
48 | "dependencies": {
49 | "continuous-calendar": "^1.0.2",
50 | "dateutils": "^0.3.0"
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/release.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e
3 | BUILD_PREFIX=build/jquery.continuousCalendar
4 | LATEST_JS_MIN=$BUILD_PREFIX-latest-min.js
5 | LATEST_CSS_MIN=$BUILD_PREFIX-latest-min.css
6 | current_dir=$(pwd)
7 | cd $(dirname $0)
8 | echo Build nightly...
9 | old_version=$(git tag | tail -n1)
10 | version=$1
11 | npm test
12 | compass compile -c config.rb
13 | rm build/*latest* || true
14 | [ "$version" != "" -a ! -f $BUILD_PREFIX-$version.js ] && rm build/*
15 | echo "Compressing js..."
16 | update_version() { sed -i '' -E "s/(\"version\".*:.*\").*(\".*)/\1$version\2/g" $@; }
17 | update_version src/continuousCalendar/jquery.continuousCalendar.js
18 | npm install
19 | echo "Compressing css..."
20 | node node_modules/requirejs/bin/r.js -o cssIn=src/main/jquery.continuousCalendar.css optimizeCss=standard out=$LATEST_CSS_MIN
21 | if [ "$version" = "" ]
22 | then
23 | echo "Version information not found. Type ./release.sh "
24 | echo "Previous version was $old_version"
25 | else
26 | if [ -f $BUILD_PREFIX-$version.js ]
27 | then
28 | echo "Version $version exists, no new versions. Create by typing ./build.sh "
29 | echo "Previous version was $old_version"
30 | else
31 | echo "Creating version $version"
32 | cp $LATEST_JS_MIN $BUILD_PREFIX-$version-min.js
33 | cp $LATEST_CSS_MIN $BUILD_PREFIX-$version-min.css
34 | update_version continuousCalendar.jquery.json
35 | update_version package.json
36 | echo -e "h3. $version \n\n$PLEASE EDIT:\n$(git log --pretty=format:%s $old_version^..)\n\n$(cat History.textile)" > History.textile
37 | vim History.textile
38 | git add -A .
39 | git commit -m "Build for version $version"
40 | git tag $version
41 | git status
42 | echo "Now type:"
43 | echo "git push --follow-tags"
44 | echo "./ghpages.sh"
45 | echo "npm publish"
46 | fi
47 | fi
48 | cd $current_dir
49 |
--------------------------------------------------------------------------------
/site/index.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/continuouscalendar/jquery-continuous-calendar/540df60df27746808e8986a5e8034490f1b512aa/site/index.js
--------------------------------------------------------------------------------
/site/styles.css:
--------------------------------------------------------------------------------
1 | /*
2 | Run at project root: sass --watch scss:css --style compact
3 | */
4 |
5 | html { background: #f5f5f5; }
6 |
7 | body { font-family: Arial, Helvetica, sans-serif; color: #4c4c4c; line-height: 17px; font-size: 14px; margin: 0 auto; }
8 |
9 | h1 { font-size: 26px; font-family: "HelveticaNeueLTStd65Medium", Arial, Helvetica, sans-serif; margin-bottom: 20px; }
10 |
11 | h2 { font-size: 22px; line-height: 24px; margin-top: 18px; margin-bottom: 10px; }
12 |
13 | h3 { font-family: "HelveticaNeueLTStd65Medium", Arial, Helvetica, sans-serif; font-size: 14px; line-height: 16px; }
14 |
15 | h4 { margin-bottom: 10px; }
16 |
17 | p { margin-bottom: 20px; }
18 |
19 | pre { font-size: 11px; background: #fafafa; border: 1px solid #ccc; padding: 4px; color: #000; }
20 |
21 | a { color: #25b2ff; text-decoration: none; }
22 | a:hover { text-decoration: underline; }
23 |
24 | strong { font-weight: bold; }
25 |
26 | em { font-style: italic; }
27 |
28 | header { width: 960px; margin: 0 auto; }
29 | header img { margin-top: 20px; margin-bottom: 20px; }
30 |
31 | .article { width: 960px; margin: 0 auto; }
32 | h1 { width: 600px; line-height: 30px; }
33 |
34 | .slides { margin-bottom: 30px; }
35 |
36 | li { list-style-type: disc; list-style-position: inside; }
37 |
38 | .wrap { display: block; }
39 | .wrap:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
40 | * html .wrap { height: 1px; }
41 |
42 | .section { box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1); -moz-box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1); -webkit-box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1); background-color: #fff; filter: progid:DXImageTransform.Microsoft.Shadow(color = '#f0f0f0', Direction = 135, Strength = 4); background: #fff; padding: 24px 43px 20px 30px; margin-bottom: 27px; }
43 |
44 | .calendarScrollContent { height: 250px; }
45 | ul { margin-bottom: 10px; }
46 | dt { margin-bottom: 10px; font-family: monospace; font-size: 18px; }
47 | dt.title { margin-bottom: 20px; text-decoration: underline; }
48 | .default { color: green; }
49 | .type { color: #0041c4; }
50 | dd { margin-bottom: 20px; margin-left: 10px; }
51 | input { margin: 3px; }
52 | .wide { margin: 20px; }
53 | #timeCalendar .continuousCalendar { float: left; }
54 | #timeCalendar .dateLabels div { clear: both; margin: 1em; }
55 | #timeCalendar .dateLabels div label { float: left; display: block; width: 5em; font-weight: bold;}
56 | #timeCalendar .dateLabels div span { float: left; display: block; width: 9em; }
57 |
58 | #singleDate2 { z-index: 4; }
59 | #singleDate3 { z-index: 3; }
60 | #range1 { z-index: 2; }
61 | #range1 .continuousCalendar,
62 | #singleDate3 .continuousCalendar { top: 15pt; }
63 |
64 | .dateLabels { float: left; }
65 | .c { clear: both; }
66 |
67 | .navi { overflow: hidden; padding: 0; margin:0; position: fixed; z-index: 99999; width: 100%; top:0; left: 0; }
68 | .navi li { display: block; float: left; background: #fff; margin: 0; }
69 | .navi li a,
70 | .navi li span { display: block; padding: 3px 7px 3px 13px; margin: 5px; border-left: 1px solid #ccc; }
71 | .navi .first { border-left: none; }
72 |
73 | .footer { margin-bottom: 0; }
74 |
--------------------------------------------------------------------------------
/src/build/bundleWrapper.js:
--------------------------------------------------------------------------------
1 | require('../continuousCalendar/jquery.continuousCalendar')
2 | window.DateFormat = require('dateutils').DateFormat
3 | window.DateParse = require('dateutils').DateParse
4 | window.DateLocale = require('dateutils').DateLocale
5 | window.DateTime = require('dateutils').DateTime
6 | window.DateRange = require('dateutils').DateRange
7 |
--------------------------------------------------------------------------------
/src/continuousCalendar/jquery.continuousCalendar.js:
--------------------------------------------------------------------------------
1 | var continuousCalendar = require('continuous-calendar').continuousCalendar
2 |
3 | $.continuousCalendar = {
4 | 'version': '5.1.1'
5 | }
6 | $.fn.continuousCalendar = function(options) {
7 | return this.each(function() {
8 | options.initScrollBar = function(container, params) {
9 | return params.customScroll && $('.tinyscrollbar', container).tinyscrollbar(params.scrollOptions)
10 | }
11 | options.executeCallback = function(container, selection, params) {
12 | params.callback.call(container, selection)
13 | $(container).trigger('calendarChange', selection)
14 | }
15 | continuousCalendar($(this).get(0), options)
16 | })
17 | }
18 |
19 | $.fn.calendarRange = function() { return this.get(0).calendarRange }
20 | $.fn.exists = function() { return this.length > 0 }
21 | $.fn.isEmpty = function() { return this.length === 0 }
22 |
23 |
--------------------------------------------------------------------------------
/src/continuousCalendar/jquery.continuousCalendar.less:
--------------------------------------------------------------------------------
1 | @import '../../node_modules/continuous-calendar/src/continuousCalendar.less';
2 | @import '../../node_modules/continuous-calendar/src/theme.rounded.less';
3 |
--------------------------------------------------------------------------------
/src/lib/jquery.min.js:
--------------------------------------------------------------------------------
1 | /*! jQuery v2.2.0 | (c) jQuery Foundation | jquery.org/license */
2 | !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="2.2.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!k.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=d.createElement("script"),b.text=a,d.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:h.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(d=e.call(arguments,2),f=function(){return a.apply(b||this,d.concat(e.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML=" ",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML=" ","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML=" ",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return h.call(b,a)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&f.parentNode&&(this.length=1,this[0]=f),this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?void 0!==c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?h.call(n(a),this[0]):h.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||n.uniqueSort(e),D.test(a)&&e.reverse()),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.removeEventListener("DOMContentLoaded",J),a.removeEventListener("load",J),n.ready()}n.ready.promise=function(b){return I||(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(n.ready):(d.addEventListener("DOMContentLoaded",J),a.addEventListener("load",J))),I.promise(b)},n.ready.promise();var K=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)K(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},L=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function M(){this.expando=n.expando+M.uid++}M.uid=1,M.prototype={register:function(a,b){var c=b||{};return a.nodeType?a[this.expando]=c:Object.defineProperty(a,this.expando,{value:c,writable:!0,configurable:!0}),a[this.expando]},cache:function(a){if(!L(a))return{};var b=a[this.expando];return b||(b={},L(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[b]=c;else for(d in b)e[d]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=a[this.expando];if(void 0!==f){if(void 0===b)this.register(a);else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in f?d=[b,e]:(d=e,d=d in f?[d]:d.match(G)||[])),c=d.length;while(c--)delete f[d[c]]}(void 0===b||n.isEmptyObject(f))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!n.isEmptyObject(b)}};var N=new M,O=new M,P=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Q=/[A-Z]/g;function R(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Q,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:P.test(c)?n.parseJSON(c):c}catch(e){}O.set(a,b,c);
3 | }else c=void 0;return c}n.extend({hasData:function(a){return O.hasData(a)||N.hasData(a)},data:function(a,b,c){return O.access(a,b,c)},removeData:function(a,b){O.remove(a,b)},_data:function(a,b,c){return N.access(a,b,c)},_removeData:function(a,b){N.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=O.get(f),1===f.nodeType&&!N.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),R(f,d,e[d])));N.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){O.set(this,a)}):K(this,function(b){var c,d;if(f&&void 0===b){if(c=O.get(f,a)||O.get(f,a.replace(Q,"-$&").toLowerCase()),void 0!==c)return c;if(d=n.camelCase(a),c=O.get(f,d),void 0!==c)return c;if(c=R(f,d,void 0),void 0!==c)return c}else d=n.camelCase(a),this.each(function(){var c=O.get(this,d);O.set(this,d,b),a.indexOf("-")>-1&&void 0!==c&&O.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){O.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=N.get(a,b),c&&(!d||n.isArray(c)?d=N.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return N.get(a,c)||N.access(a,c,{empty:n.Callbacks("once memory").add(function(){N.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length",""],thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};$.optgroup=$.option,$.tbody=$.tfoot=$.colgroup=$.caption=$.thead,$.th=$.td;function _(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function aa(a,b){for(var c=0,d=a.length;d>c;c++)N.set(a[c],"globalEval",!b||N.get(b[c],"globalEval"))}var ba=/<|?\w+;/;function ca(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],o=0,p=a.length;p>o;o++)if(f=a[o],f||0===f)if("object"===n.type(f))n.merge(m,f.nodeType?[f]:f);else if(ba.test(f)){g=g||l.appendChild(b.createElement("div")),h=(Y.exec(f)||["",""])[1].toLowerCase(),i=$[h]||$._default,g.innerHTML=i[1]+n.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;n.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",o=0;while(f=m[o++])if(d&&n.inArray(f,d)>-1)e&&e.push(f);else if(j=n.contains(f.ownerDocument,f),g=_(l.appendChild(f),"script"),j&&aa(g),c){k=0;while(f=g[k++])Z.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var da=/^key/,ea=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,fa=/^([^.]*)(?:\.(.+)|)/;function ga(){return!0}function ha(){return!1}function ia(){try{return d.activeElement}catch(a){}}function ja(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ja(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=ha;else if(!e)return this;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return"undefined"!=typeof n&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(G)||[""],j=b.length;while(j--)h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.hasData(a)&&N.get(a);if(r&&(i=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&N.remove(a,"handle events")}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(N.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.rnamespace||a.rnamespace.test(g.namespace))&&(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!==this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,la=/