├── .gitignore ├── CHANGELOG.md ├── public ├── js │ ├── index.js │ ├── shortcut.js │ ├── datetime.js │ ├── common.js │ ├── load.js │ ├── jquery.datetimepicker.js │ └── jquery.min.js ├── images │ ├── nasa_logo.gif │ └── swisseph_logo.jpg ├── styles │ ├── style.css │ ├── style.less │ └── jquery.datetimepicker.css └── index.html ├── routes └── index.js ├── README.md ├── api.js ├── package.json ├── app.js ├── bin └── server.js └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | ephe 2 | node_modules 3 | build 4 | .idea 5 | bower_components -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.1.0 2 | 3 | - Socket.io API 4 | - Batch function call 5 | -------------------------------------------------------------------------------- /public/js/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Ephemeris namespace 3 | */ 4 | $app = ephemeris = {}; 5 | -------------------------------------------------------------------------------- /public/images/nasa_logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mivion/swisseph-api/HEAD/public/images/nasa_logo.gif -------------------------------------------------------------------------------- /public/images/swisseph_logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mivion/swisseph-api/HEAD/public/images/swisseph_logo.jpg -------------------------------------------------------------------------------- /public/js/shortcut.js: -------------------------------------------------------------------------------- 1 | $copy = $app.copy; 2 | $is = $app.is; 3 | $make = $app.make; 4 | $def = $app.define; 5 | $assert = $app.assert; 6 | -------------------------------------------------------------------------------- /routes/index.js: -------------------------------------------------------------------------------- 1 | var express = require ('express'); 2 | var router = express.Router (); 3 | 4 | router.get ('/', function (req, res, next) { 5 | res.render ('index'); 6 | }); 7 | 8 | module.exports = router; 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## swisseph-api 2 | 3 | Swisseph API is an free and opensorce backend for getting Swisseph calculations online. 4 | 5 | ## Installation 6 | 7 | Clone project then run: 8 | 9 | > npm install 10 | 11 | to install all dependencies. 12 | 13 | ## Usage 14 | 15 | To run the API server: 16 | 17 | > npm start 18 | 19 | Access to server by URL: http://localhost:3000. 20 | 21 | ## Status 22 | 23 | Project is under development. 24 | -------------------------------------------------------------------------------- /api.js: -------------------------------------------------------------------------------- 1 | var swisseph = require ('swisseph'); 2 | 3 | swisseph.swe_set_ephe_path (process.env.SWISSEPH_EPHEMERIS_PATH || (__dirname + '/ephe')); 4 | 5 | module.exports = api; 6 | 7 | function api (server) { 8 | io = require('socket.io') (server); 9 | io.on ('connection', function (socket) { 10 | socket.on('swisseph', function (data) { 11 | handler (socket, data); 12 | }); 13 | }); 14 | }; 15 | 16 | function handler (socket, args) { 17 | var i; 18 | 19 | for (i = 0; i < args.length; i ++) { 20 | socket.emit ('swisseph result', swisseph [args [i].func].apply (this, args [i].args)); 21 | }; 22 | }; 23 | -------------------------------------------------------------------------------- /public/styles/style.css: -------------------------------------------------------------------------------- 1 | *{font:10pt Helvetica}html{padding:0;margin:0}td{vertical-align:middle;padding:10px;text-align:center}tr{padding:4px}input[type=text]{padding:3px;margin:0;box-sizing:border-box;width:100%;resize:none;border:none}select{width:100%;border:none}thead tr td th{text-align:center}th{font-weight:bold;padding:10px}body table{width:100%}body{width:800px;margin:auto;padding:0;background:white}.table-header{background:#A7DBD8;border:none}.table-group{background:#E0E4CC}table{border-spacing:0px}.numeric{font-family:Menlo, Consolas, Helvetica, Arial;text-align:right;overflow:hidden}.string{text-align:left;overflow:hidden}.title{text-align:right}.top-title{text-align:left}img{border:0px} -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "mivion", 3 | "name": "swisseph-api", 4 | "description": "Swiss Ephemeris API for node.js", 5 | "version": "0.1.0", 6 | "homepage": "http://github.com/mivion/swisseph-api", 7 | "repository": { 8 | "url": "http://github.com/mivion/swisseph-api.git" 9 | }, 10 | "main": "./lib/app.js", 11 | "keywords": [ 12 | "swiss", 13 | "swisseph", 14 | "ephemeris", 15 | "astrology", 16 | "astronomy" 17 | ], 18 | "dependencies": { 19 | "swisseph": ">=0.5", 20 | "socket.io": ">=1.0", 21 | "body-parser": "~1.10.2", 22 | "cookie-parser": "~1.3.3", 23 | "debug": "~2.1.1", 24 | "express": "~4.11.1", 25 | "jade": "~1.9.1", 26 | "less-middleware": "1.0.x", 27 | "morgan": "~1.5.1", 28 | "serve-favicon": "~2.2.0" 29 | }, 30 | "devDependencies": {}, 31 | "optionalDependencies": {}, 32 | "engines": { 33 | "node": ">=0.12" 34 | }, 35 | "scripts": { 36 | "start": "node ./bin/server" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /public/styles/style.less: -------------------------------------------------------------------------------- 1 | * { 2 | font: 10pt Helvetica; 3 | } 4 | 5 | html { 6 | padding: 0; 7 | margin: 0; 8 | } 9 | 10 | td { 11 | vertical-align: middle; 12 | padding: 10px; 13 | text-align: center; 14 | } 15 | 16 | tr { 17 | padding: 4px; 18 | } 19 | 20 | input[type=text] { 21 | padding: 3px; 22 | margin: 0; 23 | box-sizing: border-box; 24 | width: 100%; 25 | resize: none; 26 | border: none; 27 | } 28 | 29 | select { 30 | width: 100%; 31 | border: none; 32 | } 33 | 34 | thead tr td th { 35 | text-align: center; 36 | } 37 | 38 | th { 39 | font-weight: bold; 40 | padding: 10px; 41 | } 42 | 43 | body table { 44 | width: 100%; 45 | } 46 | 47 | body { 48 | width: 800px; 49 | margin: auto; 50 | padding: 0; 51 | background: white; 52 | } 53 | 54 | .table-header { 55 | background: #A7DBD8; 56 | border: none; 57 | } 58 | 59 | .table-group { 60 | background: #E0E4CC; 61 | } 62 | 63 | table { 64 | border-spacing: 0px; 65 | } 66 | 67 | .numeric { 68 | font-family: Menlo, Consolas, Helvetica, Arial; 69 | text-align: right; 70 | overflow: hidden; 71 | } 72 | 73 | .string { 74 | text-align: left; 75 | overflow: hidden; 76 | } 77 | 78 | .title { 79 | text-align: right; 80 | } 81 | 82 | .top-title { 83 | text-align: left; 84 | } 85 | 86 | img { 87 | border: 0px; 88 | } -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | var express = require ('express'); 2 | var path = require ('path'); 3 | var favicon = require ('serve-favicon'); 4 | var logger = require ('morgan'); 5 | var cookieParser = require ('cookie-parser'); 6 | var bodyParser = require ('body-parser'); 7 | 8 | var routes = require ('./routes/index'); 9 | 10 | var app = express (); 11 | 12 | // uncomment after placing your favicon in /public 13 | //app.use(favicon(__dirname + '/public/favicon.ico')); 14 | app.use (logger ('dev')); 15 | app.use (bodyParser.json ()); 16 | app.use (bodyParser.urlencoded ({ extended: false })); 17 | app.use (cookieParser ()); 18 | app.use (require ('less-middleware') (path.join (__dirname, 'public'))); 19 | app.use (express.static (path.join (__dirname, 'public'))); 20 | 21 | app.use('/', routes); 22 | 23 | // catch 404 and forward to error handler 24 | app.use (function (req, res, next) { 25 | var err = new Error ('Not Found'); 26 | err.status = 404; 27 | next (err); 28 | }); 29 | 30 | // error handlers 31 | 32 | // development error handler 33 | // will print stacktrace 34 | if (app.get ('env') === 'development') { 35 | app.use (function (err, req, res, next) { 36 | res.status (err.status || 500); 37 | res.render ('error', { 38 | message: err.message, 39 | error: err 40 | }); 41 | }); 42 | } 43 | 44 | // production error handler 45 | // no stacktraces leaked to user 46 | app.use (function (err, req, res, next) { 47 | res.status (err.status || 500); 48 | res.render ('error', { 49 | message: err.message, 50 | error: {} 51 | }); 52 | }); 53 | 54 | module.exports = app; 55 | -------------------------------------------------------------------------------- /public/js/datetime.js: -------------------------------------------------------------------------------- 1 | $app.formatHour = function (hour) { 2 | var result; 3 | var hours; 4 | var minutes; 5 | var seconds; 6 | 7 | hours = Math.floor (hour); 8 | hour -= hours; 9 | hour *= 60; 10 | minutes = Math.floor (hour); 11 | hour -= minutes; 12 | hour *= 60; 13 | seconds = Math.floor (hour); 14 | 15 | result = 16 | $app.twoDigitsString (hours) + ':' + 17 | $app.twoDigitsString (minutes) + ':' + 18 | $app.twoDigitsString (seconds) 19 | ; 20 | 21 | return result; 22 | }; 23 | 24 | $app.formatDate = function (date) { 25 | var result; 26 | 27 | result = 28 | $app.twoDigitsString (date.day) + '.' + 29 | $app.twoDigitsString (date.month) + '.' + 30 | date.year + ' ' + 31 | $app.formatHour (date.hour) 32 | ; 33 | 34 | return result; 35 | }; 36 | 37 | $app.twoDigitsString = function (value) { 38 | return value < 10 ? '0' + value : value; 39 | }; 40 | 41 | $app.formatDegreeMinuteSecond = function (value) { 42 | var deg = Math.abs (value); 43 | var min = (60.0 * (deg - Math.floor (deg))); 44 | var sec = 60.0 * (min - Math.floor (min)); 45 | 46 | sec = Math.floor (sec * $app.Precision) / $app.Precision; 47 | 48 | var result = ''; 49 | deg = Math.floor (deg); 50 | min = Math.floor (min); 51 | result += deg + '°'; 52 | result += min + '\''; 53 | result += sec + '"'; 54 | return result; 55 | }; 56 | 57 | $app.parseDate = function (date) { 58 | var tokens = date.split (' '); 59 | 60 | if (tokens.length > 1) { 61 | tokens [0] = tokens [0].split ('.'); 62 | tokens [1] = tokens [1].split (':'); 63 | 64 | date = { 65 | day: parseFloat (tokens [0][0]), 66 | month: parseFloat (tokens [0][1]), 67 | year: parseFloat (tokens [0][2]), 68 | hour: parseFloat (tokens [1][0] || 0) + (parseFloat (tokens [1][2] || 0) / 60 + parseFloat (tokens [1][1] || 0)) / 60 69 | }; 70 | } 71 | 72 | return date; 73 | }; -------------------------------------------------------------------------------- /public/js/common.js: -------------------------------------------------------------------------------- 1 | $app.copy = function (target /*, source ... */) { 2 | if (target) { 3 | for (var i = arguments.length - 1; i > 0; i --) { 4 | var source = arguments [i]; 5 | if (source && source.hasOwnProperty) { 6 | for (var key in source) { 7 | if (source.hasOwnProperty (key)) { 8 | if ($app.is (target [key], Object) && $app.is (source [key], Object)) { 9 | $app.copy (target [key], source [key]); 10 | } else { 11 | target [key] = source [key]; 12 | } 13 | } 14 | } 15 | } 16 | } 17 | } 18 | return target; 19 | }; 20 | 21 | $app.is = function (object, type) { 22 | var typeName = Object.prototype.toString.call (object).slice (8, -1); 23 | return ( 24 | object !== undefined && 25 | object !== null && ( 26 | type === object.constructor || 27 | type.name === typeName 28 | ) 29 | ); 30 | }; 31 | 32 | $app.make = function (context, path) { 33 | if ($is (context, String)) { 34 | path = context; 35 | context = window; 36 | } 37 | 38 | if (path) { 39 | var paths = path.split ('.'); 40 | var key = paths.shift (); 41 | context [key] = context [key] || {}; 42 | context = $make (context [key], paths.join ('.')); 43 | } 44 | return context; 45 | }; 46 | 47 | $app.define = function (context, path, object) { 48 | $copy ($make (context, path), object); 49 | }; 50 | 51 | $app.findNodesByAttr = function (node, attrName, result) { 52 | result = result || []; 53 | 54 | for (var i = 0; i < node.childNodes.length; i ++) { 55 | if (node.childNodes [i].getAttribute && node.childNodes [i].getAttribute (attrName)) { 56 | result.push (node.childNodes [i]); 57 | } else if (node.childNodes [i].childNodes) { 58 | $app.findNodesByAttr (node.childNodes [i], attrName, result); 59 | } 60 | } 61 | 62 | return result; 63 | }; 64 | 65 | $app.assert = function (variable, value) { 66 | if (variable != value) { 67 | throw 'Assertion failed: ' + variable + ' != ' + value + '!'; 68 | } 69 | }; -------------------------------------------------------------------------------- /bin/server.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * Module dependencies. 5 | */ 6 | 7 | var app = require ('../app'); 8 | var debug = require ('debug') ('swisseph-api:server'); 9 | var http = require ('http'); 10 | 11 | /** 12 | * Get port from environment and store in Express. 13 | */ 14 | 15 | var port = normalizePort (process.env.PORT || '3000'); 16 | app.set ('port', port); 17 | 18 | /** 19 | * Create HTTP server. 20 | */ 21 | 22 | var server = http.createServer (app); 23 | 24 | /** 25 | * Socket.io API 26 | */ 27 | 28 | var api = require ('../api') (server); 29 | 30 | /** 31 | * Listen on provided port, on all network interfaces. 32 | */ 33 | 34 | server.listen (port); 35 | server.on ('error', onError); 36 | server.on ('listening', onListening); 37 | 38 | /** 39 | * Normalize a port into a number, string, or false. 40 | */ 41 | 42 | function normalizePort (val) { 43 | var port = parseInt (val, 10); 44 | 45 | if (isNaN (port)) { 46 | // named pipe 47 | return val; 48 | } 49 | 50 | if (port >= 0) { 51 | // port number 52 | return port; 53 | } 54 | 55 | return false; 56 | } 57 | 58 | /** 59 | * Event listener for HTTP server "error" event. 60 | */ 61 | 62 | function onError (error) { 63 | if (error.syscall !== 'listen') { 64 | throw error; 65 | } 66 | 67 | var bind = typeof port === 'string' 68 | ? 'Pipe ' + port 69 | : 'Port ' + port 70 | 71 | // handle specific listen errors with friendly messages 72 | switch (error.code) { 73 | case 'EACCES': 74 | console.error (bind + ' requires elevated privileges'); 75 | process.exit (1); 76 | break; 77 | case 'EADDRINUSE': 78 | console.error (bind + ' is already in use'); 79 | process.exit (1); 80 | break; 81 | default: 82 | throw error; 83 | } 84 | } 85 | 86 | /** 87 | * Event listener for HTTP server "listening" event. 88 | */ 89 | 90 | function onListening () { 91 | var addr = server.address (); 92 | var bind = typeof addr === 'string' 93 | ? 'pipe ' + addr 94 | : 'port ' + addr.port; 95 | debug ('Listening on ' + bind); 96 | } 97 | -------------------------------------------------------------------------------- /public/js/load.js: -------------------------------------------------------------------------------- 1 | $app.AppVarAttribute = 'data-var'; 2 | $app.Precision = 1000000; 3 | 4 | window.addEventListener ('keypress', function (event) { 5 | if (event.keyCode == 13) { 6 | $app.update (event); 7 | } 8 | }); 9 | 10 | var socket = io.connect('http://swisseph.com'); 11 | 12 | jQuery ('#gt-date').datetimepicker ({ 13 | value: (new Date ()).dateFormat ('d.m.Y H:i:s'), 14 | mask: true, 15 | format: 'd.m.Y H:i:s' 16 | }); 17 | 18 | jQuery ('#gu-date').datetimepicker ({ 19 | mask: true, 20 | format: 'd.m.Y H:i:s' 21 | }); 22 | 23 | socket.on ('swisseph result', function (result) { 24 | console.log (result); 25 | $copy ($app, result); 26 | $app.setVar (); 27 | }); 28 | 29 | $app.update = function (event) { 30 | var dateVar; 31 | 32 | $app.varElements = $app.findNodesByAttr (document, $app.AppVarAttribute); 33 | 34 | $app.getVar (); 35 | 36 | if (event) { 37 | dateVar = event.target.getAttribute ($app.AppVarAttribute); 38 | } else { 39 | dateVar = '$app.date.gregorian.terrestrial'; 40 | } 41 | 42 | $app.getGroupVar ('$app.date', dateVar); 43 | 44 | socket.emit ('swisseph', [{ 45 | func: 'calc', 46 | args: [{ 47 | date: $app.date, 48 | observer: $app.observer, 49 | body: $app.body 50 | }] 51 | }]); 52 | }; 53 | 54 | $app.getGroupVar = function (varGroup, varName) { 55 | try { 56 | if (varName.indexOf (varGroup) == 0) { 57 | eval ('$app.varValue = ' + varName + ''); 58 | eval ('delete ' + varGroup); 59 | $make (varName); 60 | eval ('' + varName + ' = $app.varValue'); 61 | } 62 | } catch (exception) { 63 | } 64 | }; 65 | 66 | $app.getVar = function () { 67 | for (var i = 0; i < $app.varElements.length; i ++) { 68 | var element = $app.varElements [i]; 69 | var varName = element.getAttribute ($app.AppVarAttribute); 70 | try { 71 | $make (varName); 72 | if ( 73 | element.tagName == 'INPUT' || element.tagName == 'SELECT' 74 | ) { 75 | eval ('' + varName + ' = "' + element.value + '"'); 76 | } else { 77 | eval ('delete ' + varName + ''); 78 | } 79 | } catch (exception) { 80 | } 81 | element.setAttribute ('onchange', '$app.update (event)'); 82 | } 83 | 84 | $app.date.gregorian.terrestrial = $app.parseDate ($app.date.gregorian.terrestrial); 85 | $app.date.gregorian.universal = $app.parseDate ($app.date.gregorian.universal); 86 | 87 | $app.date.julian.terrestrial = parseFloat ($app.date.julian.terrestrial); 88 | $app.date.julian.universal = parseFloat ($app.date.julian.universal); 89 | 90 | $app.observer.geographic.longitude = parseFloat ($app.observer.geographic.longitude); 91 | $app.observer.geographic.latitude = parseFloat ($app.observer.geographic.latitude); 92 | $app.observer.geographic.height = parseFloat ($app.observer.geographic.height); 93 | }; 94 | 95 | $app.setVar = function () { 96 | $app.date.gregorian.terrestrial = $app.formatDate ($app.date.gregorian.terrestrial); 97 | $app.date.gregorian.universal = $app.formatDate ($app.date.gregorian.universal); 98 | 99 | $app.body.position.longitude.degreeMinuteSecond = $app.formatDegreeMinuteSecond ($app.body.position.longitude.decimalDegree); 100 | $app.body.position.latitude.degreeMinuteSecond = $app.formatDegreeMinuteSecond ($app.body.position.latitude.decimalDegree); 101 | 102 | for (var i = 0; i < $app.varElements.length; i ++) { 103 | var element = $app.varElements [i]; 104 | try { 105 | if (element.tagName == 'INPUT') { 106 | element.value = eval ('(' + element.getAttribute ($app.AppVarAttribute) + ')'); 107 | } else if (element.tagName != 'SELECT') { 108 | value = eval ('(' + element.getAttribute ($app.AppVarAttribute) + ')'); 109 | if (typeof (value) == 'number') { 110 | value = Math.floor (value * $app.Precision) / $app.Precision; 111 | }; 112 | element.innerHTML = value; 113 | } 114 | } catch (exception) { 115 | } 116 | } 117 | }; 118 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Swiss Ephemeris Online 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 52 | 53 | 54 | 94 | 95 | 96 | 178 | 179 | 180 | 200 | 201 |
Swiss Ephemeris Online
20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 |
Time
Terrestrial:Universal:Delta T:
Gregorian:
Julian:
Help: enter a value and press <Enter> to make calculations
51 |
55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 |
Observer
Body:EarthLongitude:Latitude:Height:
Ephemeris: 72 | 83 |
Help: Longitude = Latitude = Altitude = 0 for geocentric coordinates, otherwise for topocentric
93 |
97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 |
Body
Body: 107 | 146 | Decimal Degrees:Degrees Minutes Seconds:Speed:
Name:Longitude:
Latitude:
Distance:
177 |
181 | 182 | 183 | 184 | 185 | 187 | 188 | 189 | 190 | 191 | 192 | 196 | 197 | 198 |
Swiss Ephemeris, Copyright © 2015 Astrodienst AG
This site based on Swiss Ephemeris binding for node.js.
193 | Visit project page on GitHub or 194 | report a problem. 195 |
199 |
202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | -------------------------------------------------------------------------------- /public/styles/jquery.datetimepicker.css: -------------------------------------------------------------------------------- 1 | .xdsoft_datetimepicker{ 2 | box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.506); 3 | background: #FFFFFF; 4 | border-bottom: 1px solid #BBBBBB; 5 | border-left: 1px solid #CCCCCC; 6 | border-right: 1px solid #CCCCCC; 7 | border-top: 1px solid #CCCCCC; 8 | color: #333333; 9 | font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif; 10 | padding: 8px; 11 | padding-left: 0; 12 | padding-top: 2px; 13 | position: absolute; 14 | z-index: 9999; 15 | -moz-box-sizing: border-box; 16 | box-sizing: border-box; 17 | display:none; 18 | } 19 | 20 | .xdsoft_datetimepicker iframe { 21 | position: absolute; 22 | left: 0; 23 | top: 0; 24 | width: 75px; 25 | height: 210px; 26 | background: transparent; 27 | border:none; 28 | } 29 | /*For IE8 or lower*/ 30 | .xdsoft_datetimepicker button { 31 | border:none !important; 32 | } 33 | 34 | .xdsoft_noselect{ 35 | -webkit-touch-callout: none; 36 | -webkit-user-select: none; 37 | -khtml-user-select: none; 38 | -moz-user-select: none; 39 | -ms-user-select: none; 40 | -o-user-select: none; 41 | user-select: none; 42 | } 43 | .xdsoft_noselect::selection { background: transparent; } 44 | .xdsoft_noselect::-moz-selection { background: transparent; } 45 | .xdsoft_datetimepicker.xdsoft_inline{ 46 | display: inline-block; 47 | position: static; 48 | box-shadow: none; 49 | } 50 | .xdsoft_datetimepicker *{ 51 | -moz-box-sizing: border-box; 52 | box-sizing: border-box; 53 | padding: 0; 54 | margin: 0; 55 | } 56 | .xdsoft_datetimepicker .xdsoft_datepicker, .xdsoft_datetimepicker .xdsoft_timepicker{ 57 | display:none; 58 | } 59 | .xdsoft_datetimepicker .xdsoft_datepicker.active, .xdsoft_datetimepicker .xdsoft_timepicker.active{ 60 | display:block; 61 | } 62 | .xdsoft_datetimepicker .xdsoft_datepicker{ 63 | width: 224px; 64 | float:left; 65 | margin-left:8px; 66 | } 67 | .xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_datepicker{ 68 | width: 256px; 69 | } 70 | .xdsoft_datetimepicker .xdsoft_timepicker{ 71 | width: 58px; 72 | float:left; 73 | text-align:center; 74 | margin-left:8px; 75 | margin-top: 0; 76 | } 77 | .xdsoft_datetimepicker .xdsoft_datepicker.active+.xdsoft_timepicker{ 78 | margin-top:8px; 79 | margin-bottom:3px 80 | } 81 | .xdsoft_datetimepicker .xdsoft_mounthpicker{ 82 | position: relative; 83 | text-align: center; 84 | } 85 | 86 | .xdsoft_datetimepicker .xdsoft_label i, 87 | .xdsoft_datetimepicker .xdsoft_prev, 88 | .xdsoft_datetimepicker .xdsoft_next, 89 | .xdsoft_datetimepicker .xdsoft_today_button{ 90 | background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6Q0NBRjI1NjM0M0UwMTFFNDk4NkFGMzJFQkQzQjEwRUIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6Q0NBRjI1NjQ0M0UwMTFFNDk4NkFGMzJFQkQzQjEwRUIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDQ0FGMjU2MTQzRTAxMUU0OTg2QUYzMkVCRDNCMTBFQiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDQ0FGMjU2MjQzRTAxMUU0OTg2QUYzMkVCRDNCMTBFQiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PoNEP54AAAIOSURBVHja7Jq9TsMwEMcxrZD4WpBYeKUCe+kTMCACHZh4BFfHO/AAIHZGFhYkBBsSEqxsLCAgXKhbXYOTxh9pfJVP+qutnZ5s/5Lz2Y5I03QhWji2GIcgAokWgfCxNvcOCCGKqiSqhUp0laHOne05vdEyGMfkdxJDVjgwDlEQgYQBgx+ULJaWSXXS6r/ER5FBVR8VfGftTKcITNs+a1XpcFoExREIDF14AVIFxgQUS+h520cdud6wNkC0UBw6BCO/HoCYwBhD8QCkQ/x1mwDyD4plh4D6DDV0TAGyo4HcawLIBBSLDkHeH0Mg2yVP3l4TQMZQDDsEOl/MgHQqhMNuE0D+oBh0CIr8MAKyazBH9WyBuKxDWgbXfjNf32TZ1KWm/Ap1oSk/R53UtQ5xTh3LUlMmT8gt6g51Q9p+SobxgJQ/qmsfZhWywGFSl0yBjCLJCMgXail3b7+rumdVJ2YRss4cN+r6qAHDkPWjPjdJCF4n9RmAD/V9A/Wp4NQassDjwlB6XBiCxcJQWmZZb8THFilfy/lfrTvLghq2TqTHrRMTKNJ0sIhdo15RT+RpyWwFdY96UZ/LdQKBGjcXpcc1AlSFEfLmouD+1knuxBDUVrvOBmoOC/rEcN7OQxKVeJTCiAdUzUJhA2Oez9QTkp72OTVcxDcXY8iKNkxGAJXmJCOQwOa6dhyXsOa6XwEGAKdeb5ET3rQdAAAAAElFTkSuQmCC); 91 | } 92 | 93 | .xdsoft_datetimepicker .xdsoft_label i{ 94 | opacity:0.5; 95 | background-position:-92px -19px; 96 | display: inline-block; 97 | width: 9px; 98 | height: 20px; 99 | vertical-align: middle; 100 | } 101 | 102 | .xdsoft_datetimepicker .xdsoft_prev{ 103 | float: left; 104 | background-position:-20px 0; 105 | } 106 | .xdsoft_datetimepicker .xdsoft_today_button{ 107 | float: left; 108 | background-position:-70px 0; 109 | margin-left:5px; 110 | } 111 | 112 | .xdsoft_datetimepicker .xdsoft_next{ 113 | float: right; 114 | background-position: 0 0; 115 | } 116 | 117 | .xdsoft_datetimepicker .xdsoft_next, 118 | .xdsoft_datetimepicker .xdsoft_prev , 119 | .xdsoft_datetimepicker .xdsoft_today_button{ 120 | background-color: transparent; 121 | background-repeat: no-repeat; 122 | border: 0 none currentColor; 123 | cursor: pointer; 124 | display: block; 125 | height: 30px; 126 | opacity: 0.5; 127 | -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; 128 | outline: medium none currentColor; 129 | overflow: hidden; 130 | padding: 0; 131 | position: relative; 132 | text-indent: 100%; 133 | white-space: nowrap; 134 | width: 20px; 135 | } 136 | .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev, 137 | .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_next{ 138 | float:none; 139 | background-position:-40px -15px; 140 | height: 15px; 141 | width: 30px; 142 | display: block; 143 | margin-left:14px; 144 | margin-top:7px; 145 | } 146 | .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev{ 147 | background-position:-40px 0; 148 | margin-bottom:7px; 149 | margin-top: 0; 150 | } 151 | .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box{ 152 | height:151px; 153 | overflow:hidden; 154 | border-bottom:1px solid #DDDDDD; 155 | } 156 | .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div{ 157 | background: #F5F5F5; 158 | border-top:1px solid #DDDDDD; 159 | color: #666666; 160 | font-size: 12px; 161 | text-align: center; 162 | border-collapse:collapse; 163 | cursor:pointer; 164 | border-bottom-width: 0; 165 | height:25px; 166 | line-height:25px; 167 | } 168 | 169 | .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div > div:first-child{ 170 | border-top-width: 0; 171 | } 172 | .xdsoft_datetimepicker .xdsoft_today_button:hover, 173 | .xdsoft_datetimepicker .xdsoft_next:hover, 174 | .xdsoft_datetimepicker .xdsoft_prev:hover { 175 | opacity: 1; 176 | -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; 177 | } 178 | .xdsoft_datetimepicker .xdsoft_label{ 179 | display: inline; 180 | position: relative; 181 | z-index: 9999; 182 | margin: 0; 183 | padding: 5px 3px; 184 | font-size: 14px; 185 | line-height: 20px; 186 | font-weight: bold; 187 | background-color: #fff; 188 | float:left; 189 | width:182px; 190 | text-align:center; 191 | cursor:pointer; 192 | } 193 | .xdsoft_datetimepicker .xdsoft_label:hover>span{ 194 | text-decoration:underline; 195 | } 196 | .xdsoft_datetimepicker .xdsoft_label:hover i{ 197 | opacity:1.0; 198 | } 199 | .xdsoft_datetimepicker .xdsoft_label > .xdsoft_select{ 200 | border:1px solid #ccc; 201 | position:absolute; 202 | right: 0; 203 | top:30px; 204 | z-index:101; 205 | display:none; 206 | background:#fff; 207 | max-height:160px; 208 | overflow-y:hidden; 209 | } 210 | .xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_monthselect{right:-7px;} 211 | .xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_yearselect{right:2px;} 212 | .xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover{ 213 | color: #fff; 214 | background: #ff8000; 215 | } 216 | .xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option{ 217 | padding:2px 10px 2px 5px; 218 | text-decoration:none !important; 219 | } 220 | .xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current{ 221 | background: #33AAFF; 222 | box-shadow: #178FE5 0 1px 3px 0 inset; 223 | color:#fff; 224 | font-weight: 700; 225 | } 226 | .xdsoft_datetimepicker .xdsoft_month{ 227 | width:100px; 228 | text-align:right; 229 | } 230 | .xdsoft_datetimepicker .xdsoft_calendar{ 231 | clear:both; 232 | } 233 | .xdsoft_datetimepicker .xdsoft_year{ 234 | width: 48px; 235 | margin-left: 5px; 236 | } 237 | .xdsoft_datetimepicker .xdsoft_calendar table{ 238 | border-collapse:collapse; 239 | width:100%; 240 | 241 | } 242 | .xdsoft_datetimepicker .xdsoft_calendar td > div{ 243 | padding-right:5px; 244 | } 245 | .xdsoft_datetimepicker .xdsoft_calendar th{ 246 | height: 25px; 247 | } 248 | .xdsoft_datetimepicker .xdsoft_calendar td,.xdsoft_datetimepicker .xdsoft_calendar th{ 249 | width:14.2857142%; 250 | background: #F5F5F5; 251 | border:1px solid #DDDDDD; 252 | color: #666666; 253 | font-size: 12px; 254 | text-align: right; 255 | vertical-align: middle; 256 | padding: 0; 257 | border-collapse:collapse; 258 | cursor:pointer; 259 | height: 25px; 260 | } 261 | .xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar td,.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar th{ 262 | width:12.5%; 263 | } 264 | .xdsoft_datetimepicker .xdsoft_calendar th{ 265 | background: #F1F1F1; 266 | } 267 | .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_today{ 268 | color:#33AAFF; 269 | } 270 | .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_default, 271 | .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current, 272 | .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current{ 273 | background: #33AAFF; 274 | box-shadow: #178FE5 0 1px 3px 0 inset; 275 | color:#fff; 276 | font-weight: 700; 277 | } 278 | .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month, 279 | .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled, 280 | .xdsoft_datetimepicker .xdsoft_time_box >div >div.xdsoft_disabled{ 281 | opacity:0.5; 282 | -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; 283 | } 284 | .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month.xdsoft_disabled{ 285 | opacity:0.2; 286 | -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=20)"; 287 | } 288 | .xdsoft_datetimepicker .xdsoft_calendar td:hover, 289 | .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div:hover{ 290 | color: #fff !important; 291 | background: #ff8000 !important; 292 | box-shadow: none !important; 293 | } 294 | .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled:hover, 295 | .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_disabled:hover{ 296 | color: inherit !important; 297 | background: inherit !important; 298 | box-shadow: inherit !important; 299 | } 300 | .xdsoft_datetimepicker .xdsoft_calendar th{ 301 | font-weight: 700; 302 | text-align: center; 303 | color: #999; 304 | cursor:default; 305 | } 306 | .xdsoft_datetimepicker .xdsoft_copyright{ color:#ccc !important; font-size:10px;clear:both;float:none;margin-left:8px;} 307 | .xdsoft_datetimepicker .xdsoft_copyright a{ color:#eee !important;} 308 | .xdsoft_datetimepicker .xdsoft_copyright a:hover{ color:#aaa !important;} 309 | 310 | 311 | .xdsoft_time_box{ 312 | position:relative; 313 | border:1px solid #ccc; 314 | } 315 | .xdsoft_scrollbar >.xdsoft_scroller{ 316 | background:#ccc !important; 317 | height:20px; 318 | border-radius:3px; 319 | } 320 | .xdsoft_scrollbar{ 321 | position:absolute; 322 | width:7px; 323 | right: 0; 324 | top: 0; 325 | bottom: 0; 326 | cursor:pointer; 327 | } 328 | .xdsoft_scroller_box{ 329 | position:relative; 330 | } 331 | 332 | 333 | .xdsoft_datetimepicker.xdsoft_dark{ 334 | box-shadow: 0 5px 15px -5px rgba(255, 255, 255, 0.506); 335 | background: #000000; 336 | border-bottom: 1px solid #444444; 337 | border-left: 1px solid #333333; 338 | border-right: 1px solid #333333; 339 | border-top: 1px solid #333333; 340 | color: #cccccc; 341 | } 342 | 343 | .xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box{ 344 | border-bottom:1px solid #222222; 345 | } 346 | .xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div{ 347 | background: #0a0a0a; 348 | border-top:1px solid #222222; 349 | color: #999999; 350 | } 351 | 352 | .xdsoft_datetimepicker.xdsoft_dark .xdsoft_label{ 353 | background-color: #000; 354 | } 355 | .xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select{ 356 | border:1px solid #333; 357 | background:#000; 358 | } 359 | 360 | .xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover{ 361 | color: #000; 362 | background: #007fff; 363 | } 364 | 365 | .xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current{ 366 | background: #cc5500; 367 | box-shadow: #b03e00 0 1px 3px 0 inset; 368 | color:#000; 369 | } 370 | 371 | .xdsoft_datetimepicker.xdsoft_dark .xdsoft_label i, 372 | .xdsoft_datetimepicker.xdsoft_dark .xdsoft_prev, 373 | .xdsoft_datetimepicker.xdsoft_dark .xdsoft_next, 374 | .xdsoft_datetimepicker.xdsoft_dark .xdsoft_today_button{ 375 | background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUExQUUzOTA0M0UyMTFFNDlBM0FFQTJENTExRDVBODYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUExQUUzOTE0M0UyMTFFNDlBM0FFQTJENTExRDVBODYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQTFBRTM4RTQzRTIxMUU0OUEzQUVBMkQ1MTFENUE4NiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQTFBRTM4RjQzRTIxMUU0OUEzQUVBMkQ1MTFENUE4NiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pp0VxGEAAAIASURBVHja7JrNSgMxEMebtgh+3MSLr1T1Xn2CHoSKB08+QmR8Bx9A8e7RixdB9CKCoNdexIugxFlJa7rNZneTbLIpM/CnNLsdMvNjM8l0mRCiQ9Ye61IKCAgZAUnH+mU3MMZaHYChBnJUDzWOFZdVfc5+ZFLbrWDeXPwbxIqrLLfaeS0hEBVGIRQCEiZoHQwtlGSByCCdYBl8g8egTTAWoKQMRBRBcZxYlhzhKegqMOageErsCHVkk3hXIFooDgHB1KkHIHVgzKB4ADJQ/A1jAFmAYhkQqA5TOBtocrKrgXwQA8gcFIuAIO8sQSA7hidvPwaQGZSaAYHOUWJABhWWw2EMIH9QagQERU4SArJXo0ZZL18uvaxejXt/Em8xjVBXmvFr1KVm/AJ10tRe2XnraNqaJvKE3KHuUbfK1E+VHB0q40/y3sdQSxY4FHWeKJCunP8UyDdqJZenT3ntVV5jIYCAh20vT7ioP8tpf6E2lfEMwERe+whV1MHjwZB7PBiCxcGQWwKZKD62lfGNnP/1poFAA60T7rF1UgcKd2id3KDeUS+oLWV8DfWAepOfq00CgQabi9zjcgJVYVD7PVzQUAUGAQkbNJTBICDhgwYTjDYD6XeW08ZKh+A4pYkzenOxXUbvZcWz7E8ykRMnIHGX1XPl+1m2vPYpL+2qdb8CDAARlKFEz/ZVkAAAAABJRU5ErkJggg==); 376 | } 377 | 378 | .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td, 379 | .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th{ 380 | background: #0a0a0a; 381 | border:1px solid #222222; 382 | color: #999999; 383 | } 384 | 385 | .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th{ 386 | background: #0e0e0e; 387 | } 388 | .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_today{ 389 | color:#cc5500; 390 | } 391 | .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_default, 392 | .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_current, 393 | .xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current{ 394 | background: #cc5500; 395 | box-shadow: #b03e00 0 1px 3px 0 inset; 396 | color:#000; 397 | } 398 | 399 | .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td:hover, 400 | .xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div:hover{ 401 | color: #000 !important; 402 | background: #007fff !important; 403 | } 404 | 405 | .xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th{ 406 | color: #666; 407 | } 408 | .xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright{ color:#333 !important;} 409 | .xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a{ color:#111 !important;} 410 | .xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a:hover{ color:#555 !important;} 411 | 412 | 413 | .xdsoft_dark .xdsoft_time_box{ 414 | border:1px solid #333; 415 | } 416 | .xdsoft_dark .xdsoft_scrollbar >.xdsoft_scroller{ 417 | background:#333 !important; 418 | } 419 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | {description} 294 | Copyright (C) {year} {fullname} 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | 341 | -------------------------------------------------------------------------------- /public/js/jquery.datetimepicker.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve jQuery DateTimePicker plugin v2.4.1 3 | * @homepage http://xdsoft.net/jqplugins/datetimepicker/ 4 | * (c) 2014, Chupurnov Valeriy. 5 | */ 6 | /*global document,window,jQuery,setTimeout,clearTimeout*/ 7 | (function ($) { 8 | 'use strict'; 9 | var default_options = { 10 | i18n: { 11 | ar: { // Arabic 12 | months: [ 13 | "كانون الثاني", "شباط", "آذار", "نيسان", "مايو", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول" 14 | ], 15 | dayOfWeek: [ 16 | "ن", "ث", "ع", "خ", "ج", "س", "ح" 17 | ] 18 | }, 19 | ro: { // Romanian 20 | months: [ 21 | "ianuarie", "februarie", "martie", "aprilie", "mai", "iunie", "iulie", "august", "septembrie", "octombrie", "noiembrie", "decembrie" 22 | ], 23 | dayOfWeek: [ 24 | "l", "ma", "mi", "j", "v", "s", "d" 25 | ] 26 | }, 27 | id: { // Indonesian 28 | months: [ 29 | "Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember" 30 | ], 31 | dayOfWeek: [ 32 | "Sen", "Sel", "Rab", "Kam", "Jum", "Sab", "Min" 33 | ] 34 | }, 35 | bg: { // Bulgarian 36 | months: [ 37 | "Януари", "Февруари", "Март", "Април", "Май", "Юни", "Юли", "Август", "Септември", "Октомври", "Ноември", "Декември" 38 | ], 39 | dayOfWeek: [ 40 | "Нд", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб" 41 | ] 42 | }, 43 | fa: { // Persian/Farsi 44 | months: [ 45 | 'فروردین', 'اردیبهشت', 'خرداد', 'تیر', 'مرداد', 'شهریور', 'مهر', 'آبان', 'آذر', 'دی', 'بهمن', 'اسفند' 46 | ], 47 | dayOfWeek: [ 48 | 'یکشنبه', 'دوشنبه', 'سه شنبه', 'چهارشنبه', 'پنجشنبه', 'جمعه', 'شنبه' 49 | ] 50 | }, 51 | ru: { // Russian 52 | months: [ 53 | 'Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь' 54 | ], 55 | dayOfWeek: [ 56 | "Вск", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб" 57 | ] 58 | }, 59 | uk: { // Ukrainian 60 | months: [ 61 | 'Січень', 'Лютий', 'Березень', 'Квітень', 'Травень', 'Червень', 'Липень', 'Серпень', 'Вересень', 'Жовтень', 'Листопад', 'Грудень' 62 | ], 63 | dayOfWeek: [ 64 | "Ндл", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Сбт" 65 | ] 66 | }, 67 | en: { // English 68 | months: [ 69 | "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" 70 | ], 71 | dayOfWeek: [ 72 | "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" 73 | ] 74 | }, 75 | el: { // Ελληνικά 76 | months: [ 77 | "Ιανουάριος", "Φεβρουάριος", "Μάρτιος", "Απρίλιος", "Μάιος", "Ιούνιος", "Ιούλιος", "Αύγουστος", "Σεπτέμβριος", "Οκτώβριος", "Νοέμβριος", "Δεκέμβριος" 78 | ], 79 | dayOfWeek: [ 80 | "Κυρ", "Δευ", "Τρι", "Τετ", "Πεμ", "Παρ", "Σαβ" 81 | ] 82 | }, 83 | de: { // German 84 | months: [ 85 | 'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember' 86 | ], 87 | dayOfWeek: [ 88 | "So", "Mo", "Di", "Mi", "Do", "Fr", "Sa" 89 | ] 90 | }, 91 | nl: { // Dutch 92 | months: [ 93 | "januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december" 94 | ], 95 | dayOfWeek: [ 96 | "zo", "ma", "di", "wo", "do", "vr", "za" 97 | ] 98 | }, 99 | tr: { // Turkish 100 | months: [ 101 | "Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık" 102 | ], 103 | dayOfWeek: [ 104 | "Paz", "Pts", "Sal", "Çar", "Per", "Cum", "Cts" 105 | ] 106 | }, 107 | fr: { //French 108 | months: [ 109 | "Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre" 110 | ], 111 | dayOfWeek: [ 112 | "Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam" 113 | ] 114 | }, 115 | es: { // Spanish 116 | months: [ 117 | "Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre" 118 | ], 119 | dayOfWeek: [ 120 | "Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb" 121 | ] 122 | }, 123 | th: { // Thai 124 | months: [ 125 | 'มกราคม', 'กุมภาพันธ์', 'มีนาคม', 'เมษายน', 'พฤษภาคม', 'มิถุนายน', 'กรกฎาคม', 'สิงหาคม', 'กันยายน', 'ตุลาคม', 'พฤศจิกายน', 'ธันวาคม' 126 | ], 127 | dayOfWeek: [ 128 | 'อา.', 'จ.', 'อ.', 'พ.', 'พฤ.', 'ศ.', 'ส.' 129 | ] 130 | }, 131 | pl: { // Polish 132 | months: [ 133 | "styczeń", "luty", "marzec", "kwiecień", "maj", "czerwiec", "lipiec", "sierpień", "wrzesień", "październik", "listopad", "grudzień" 134 | ], 135 | dayOfWeek: [ 136 | "nd", "pn", "wt", "śr", "cz", "pt", "sb" 137 | ] 138 | }, 139 | pt: { // Portuguese 140 | months: [ 141 | "Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro" 142 | ], 143 | dayOfWeek: [ 144 | "Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sab" 145 | ] 146 | }, 147 | ch: { // Simplified Chinese 148 | months: [ 149 | "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月" 150 | ], 151 | dayOfWeek: [ 152 | "日", "一", "二", "三", "四", "五", "六" 153 | ] 154 | }, 155 | se: { // Swedish 156 | months: [ 157 | "Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December" 158 | ], 159 | dayOfWeek: [ 160 | "Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör" 161 | ] 162 | }, 163 | kr: { // Korean 164 | months: [ 165 | "1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월" 166 | ], 167 | dayOfWeek: [ 168 | "일", "월", "화", "수", "목", "금", "토" 169 | ] 170 | }, 171 | it: { // Italian 172 | months: [ 173 | "Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre" 174 | ], 175 | dayOfWeek: [ 176 | "Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab" 177 | ] 178 | }, 179 | da: { // Dansk 180 | months: [ 181 | "January", "Februar", "Marts", "April", "Maj", "Juni", "July", "August", "September", "Oktober", "November", "December" 182 | ], 183 | dayOfWeek: [ 184 | "Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør" 185 | ] 186 | }, 187 | no: { // Norwegian 188 | months: [ 189 | "Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember" 190 | ], 191 | dayOfWeek: [ 192 | "Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør" 193 | ] 194 | }, 195 | ja: { // Japanese 196 | months: [ 197 | "1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月" 198 | ], 199 | dayOfWeek: [ 200 | "日", "月", "火", "水", "木", "金", "土" 201 | ] 202 | }, 203 | vi: { // Vietnamese 204 | months: [ 205 | "Tháng 1", "Tháng 2", "Tháng 3", "Tháng 4", "Tháng 5", "Tháng 6", "Tháng 7", "Tháng 8", "Tháng 9", "Tháng 10", "Tháng 11", "Tháng 12" 206 | ], 207 | dayOfWeek: [ 208 | "CN", "T2", "T3", "T4", "T5", "T6", "T7" 209 | ] 210 | }, 211 | sl: { // Slovenščina 212 | months: [ 213 | "Januar", "Februar", "Marec", "April", "Maj", "Junij", "Julij", "Avgust", "September", "Oktober", "November", "December" 214 | ], 215 | dayOfWeek: [ 216 | "Ned", "Pon", "Tor", "Sre", "Čet", "Pet", "Sob" 217 | ] 218 | }, 219 | cs: { // Čeština 220 | months: [ 221 | "Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Červenec", "Srpen", "Září", "Říjen", "Listopad", "Prosinec" 222 | ], 223 | dayOfWeek: [ 224 | "Ne", "Po", "Út", "St", "Čt", "Pá", "So" 225 | ] 226 | }, 227 | hu: { // Hungarian 228 | months: [ 229 | "Január", "Február", "Március", "Április", "Május", "Június", "Július", "Augusztus", "Szeptember", "Október", "November", "December" 230 | ], 231 | dayOfWeek: [ 232 | "Va", "Hé", "Ke", "Sze", "Cs", "Pé", "Szo" 233 | ] 234 | }, 235 | az: { //Azerbaijanian (Azeri) 236 | months: [ 237 | "Yanvar", "Fevral", "Mart", "Aprel", "May", "Iyun", "Iyul", "Avqust", "Sentyabr", "Oktyabr", "Noyabr", "Dekabr" 238 | ], 239 | dayOfWeek: [ 240 | "B", "Be", "Ça", "Ç", "Ca", "C", "Ş" 241 | ] 242 | }, 243 | bs: { //Bosanski 244 | months: [ 245 | "Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar" 246 | ], 247 | dayOfWeek: [ 248 | "Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub" 249 | ] 250 | }, 251 | ca: { //Català 252 | months: [ 253 | "Gener", "Febrer", "Març", "Abril", "Maig", "Juny", "Juliol", "Agost", "Setembre", "Octubre", "Novembre", "Desembre" 254 | ], 255 | dayOfWeek: [ 256 | "Dg", "Dl", "Dt", "Dc", "Dj", "Dv", "Ds" 257 | ] 258 | }, 259 | 'en-GB': { //English (British) 260 | months: [ 261 | "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" 262 | ], 263 | dayOfWeek: [ 264 | "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" 265 | ] 266 | }, 267 | et: { //"Eesti" 268 | months: [ 269 | "Jaanuar", "Veebruar", "Märts", "Aprill", "Mai", "Juuni", "Juuli", "August", "September", "Oktoober", "November", "Detsember" 270 | ], 271 | dayOfWeek: [ 272 | "P", "E", "T", "K", "N", "R", "L" 273 | ] 274 | }, 275 | eu: { //Euskara 276 | months: [ 277 | "Urtarrila", "Otsaila", "Martxoa", "Apirila", "Maiatza", "Ekaina", "Uztaila", "Abuztua", "Iraila", "Urria", "Azaroa", "Abendua" 278 | ], 279 | dayOfWeek: [ 280 | "Ig.", "Al.", "Ar.", "Az.", "Og.", "Or.", "La." 281 | ] 282 | }, 283 | fi: { //Finnish (Suomi) 284 | months: [ 285 | "Tammikuu", "Helmikuu", "Maaliskuu", "Huhtikuu", "Toukokuu", "Kesäkuu", "Heinäkuu", "Elokuu", "Syyskuu", "Lokakuu", "Marraskuu", "Joulukuu" 286 | ], 287 | dayOfWeek: [ 288 | "Su", "Ma", "Ti", "Ke", "To", "Pe", "La" 289 | ] 290 | }, 291 | gl: { //Galego 292 | months: [ 293 | "Xan", "Feb", "Maz", "Abr", "Mai", "Xun", "Xul", "Ago", "Set", "Out", "Nov", "Dec" 294 | ], 295 | dayOfWeek: [ 296 | "Dom", "Lun", "Mar", "Mer", "Xov", "Ven", "Sab" 297 | ] 298 | }, 299 | hr: { //Hrvatski 300 | months: [ 301 | "Siječanj", "Veljača", "Ožujak", "Travanj", "Svibanj", "Lipanj", "Srpanj", "Kolovoz", "Rujan", "Listopad", "Studeni", "Prosinac" 302 | ], 303 | dayOfWeek: [ 304 | "Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub" 305 | ] 306 | }, 307 | ko: { //Korean (한국어) 308 | months: [ 309 | "1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월" 310 | ], 311 | dayOfWeek: [ 312 | "일", "월", "화", "수", "목", "금", "토" 313 | ] 314 | }, 315 | lt: { //Lithuanian (lietuvių) 316 | months: [ 317 | "Sausio", "Vasario", "Kovo", "Balandžio", "Gegužės", "Birželio", "Liepos", "Rugpjūčio", "Rugsėjo", "Spalio", "Lapkričio", "Gruodžio" 318 | ], 319 | dayOfWeek: [ 320 | "Sek", "Pir", "Ant", "Tre", "Ket", "Pen", "Šeš" 321 | ] 322 | }, 323 | lv: { //Latvian (Latviešu) 324 | months: [ 325 | "Janvāris", "Februāris", "Marts", "Aprīlis ", "Maijs", "Jūnijs", "Jūlijs", "Augusts", "Septembris", "Oktobris", "Novembris", "Decembris" 326 | ], 327 | dayOfWeek: [ 328 | "Sv", "Pr", "Ot", "Tr", "Ct", "Pk", "St" 329 | ] 330 | }, 331 | mk: { //Macedonian (Македонски) 332 | months: [ 333 | "јануари", "февруари", "март", "април", "мај", "јуни", "јули", "август", "септември", "октомври", "ноември", "декември" 334 | ], 335 | dayOfWeek: [ 336 | "нед", "пон", "вто", "сре", "чет", "пет", "саб" 337 | ] 338 | }, 339 | mn: { //Mongolian (Монгол) 340 | months: [ 341 | "1-р сар", "2-р сар", "3-р сар", "4-р сар", "5-р сар", "6-р сар", "7-р сар", "8-р сар", "9-р сар", "10-р сар", "11-р сар", "12-р сар" 342 | ], 343 | dayOfWeek: [ 344 | "Дав", "Мяг", "Лха", "Пүр", "Бсн", "Бям", "Ням" 345 | ] 346 | }, 347 | 'pt-BR': { //Português(Brasil) 348 | months: [ 349 | "Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro" 350 | ], 351 | dayOfWeek: [ 352 | "Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb" 353 | ] 354 | }, 355 | sk: { //Slovenčina 356 | months: [ 357 | "Január", "Február", "Marec", "Apríl", "Máj", "Jún", "Júl", "August", "September", "Október", "November", "December" 358 | ], 359 | dayOfWeek: [ 360 | "Ne", "Po", "Ut", "St", "Št", "Pi", "So" 361 | ] 362 | }, 363 | sq: { //Albanian (Shqip) 364 | months: [ 365 | "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" 366 | ], 367 | dayOfWeek: [ 368 | "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" 369 | ] 370 | }, 371 | 'sr-YU': { //Serbian (Srpski) 372 | months: [ 373 | "Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar" 374 | ], 375 | dayOfWeek: [ 376 | "Ned", "Pon", "Uto", "Sre", "čet", "Pet", "Sub" 377 | ] 378 | }, 379 | sr: { //Serbian Cyrillic (Српски) 380 | months: [ 381 | "јануар", "фебруар", "март", "април", "мај", "јун", "јул", "август", "септембар", "октобар", "новембар", "децембар" 382 | ], 383 | dayOfWeek: [ 384 | "нед", "пон", "уто", "сре", "чет", "пет", "суб" 385 | ] 386 | }, 387 | sv: { //Svenska 388 | months: [ 389 | "Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December" 390 | ], 391 | dayOfWeek: [ 392 | "Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör" 393 | ] 394 | }, 395 | 'zh-TW': { //Traditional Chinese (繁體中文) 396 | months: [ 397 | "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月" 398 | ], 399 | dayOfWeek: [ 400 | "日", "一", "二", "三", "四", "五", "六" 401 | ] 402 | }, 403 | zh: { //Simplified Chinese (简体中文) 404 | months: [ 405 | "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月" 406 | ], 407 | dayOfWeek: [ 408 | "日", "一", "二", "三", "四", "五", "六" 409 | ] 410 | }, 411 | he: { //Hebrew (עברית) 412 | months: [ 413 | 'ינואר', 'פברואר', 'מרץ', 'אפריל', 'מאי', 'יוני', 'יולי', 'אוגוסט', 'ספטמבר', 'אוקטובר', 'נובמבר', 'דצמבר' 414 | ], 415 | dayOfWeek: [ 416 | 'א\'', 'ב\'', 'ג\'', 'ד\'', 'ה\'', 'ו\'', 'שבת' 417 | ] 418 | } 419 | }, 420 | value: '', 421 | lang: 'en', 422 | 423 | format: 'Y/m/d H:i', 424 | formatTime: 'H:i', 425 | formatDate: 'Y/m/d', 426 | 427 | startDate: false, // new Date(), '1986/12/08', '-1970/01/05','-1970/01/05', 428 | step: 60, 429 | monthChangeSpinner: true, 430 | 431 | closeOnDateSelect: false, 432 | closeOnWithoutClick: true, 433 | closeOnInputClick: true, 434 | 435 | timepicker: true, 436 | datepicker: true, 437 | weeks: false, 438 | 439 | defaultTime: false, // use formatTime format (ex. '10:00' for formatTime: 'H:i') 440 | defaultDate: false, // use formatDate format (ex new Date() or '1986/12/08' or '-1970/01/05' or '-1970/01/05') 441 | 442 | minDate: false, 443 | maxDate: false, 444 | minTime: false, 445 | maxTime: false, 446 | 447 | allowTimes: [], 448 | opened: false, 449 | initTime: true, 450 | inline: false, 451 | theme: '', 452 | 453 | onSelectDate: function () {}, 454 | onSelectTime: function () {}, 455 | onChangeMonth: function () {}, 456 | onChangeYear: function () {}, 457 | onChangeDateTime: function () {}, 458 | onShow: function () {}, 459 | onClose: function () {}, 460 | onGenerate: function () {}, 461 | 462 | withoutCopyright: true, 463 | inverseButton: false, 464 | hours12: false, 465 | next: 'xdsoft_next', 466 | prev : 'xdsoft_prev', 467 | dayOfWeekStart: 0, 468 | parentID: 'body', 469 | timeHeightInTimePicker: 25, 470 | timepickerScrollbar: true, 471 | todayButton: true, 472 | defaultSelect: true, 473 | 474 | scrollMonth: true, 475 | scrollTime: true, 476 | scrollInput: true, 477 | 478 | lazyInit: false, 479 | mask: false, 480 | validateOnBlur: true, 481 | allowBlank: true, 482 | yearStart: 1950, 483 | yearEnd: 2050, 484 | style: '', 485 | id: '', 486 | fixed: false, 487 | roundTime: 'round', // ceil, floor 488 | className: '', 489 | weekends: [], 490 | disabledDates : [], 491 | yearOffset: 0, 492 | beforeShowDay: null, 493 | 494 | enterLikeTab: true 495 | }; 496 | // fix for ie8 497 | if (!Array.prototype.indexOf) { 498 | Array.prototype.indexOf = function (obj, start) { 499 | var i, j; 500 | for (i = (start || 0), j = this.length; i < j; i += 1) { 501 | if (this[i] === obj) { return i; } 502 | } 503 | return -1; 504 | }; 505 | } 506 | Date.prototype.countDaysInMonth = function () { 507 | return new Date(this.getFullYear(), this.getMonth() + 1, 0).getDate(); 508 | }; 509 | $.fn.xdsoftScroller = function (percent) { 510 | return this.each(function () { 511 | var timeboxparent = $(this), 512 | pointerEventToXY = function (e) { 513 | var out = {x: 0, y: 0}, 514 | touch; 515 | if (e.type === 'touchstart' || e.type === 'touchmove' || e.type === 'touchend' || e.type === 'touchcancel') { 516 | touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0]; 517 | out.x = touch.clientX; 518 | out.y = touch.clientY; 519 | } else if (e.type === 'mousedown' || e.type === 'mouseup' || e.type === 'mousemove' || e.type === 'mouseover' || e.type === 'mouseout' || e.type === 'mouseenter' || e.type === 'mouseleave') { 520 | out.x = e.clientX; 521 | out.y = e.clientY; 522 | } 523 | return out; 524 | }, 525 | move = 0, 526 | timebox, 527 | parentHeight, 528 | height, 529 | scrollbar, 530 | scroller, 531 | maximumOffset = 100, 532 | start = false, 533 | startY = 0, 534 | startTop = 0, 535 | h1 = 0, 536 | touchStart = false, 537 | startTopScroll = 0, 538 | calcOffset = function () {}; 539 | if (percent === 'hide') { 540 | timeboxparent.find('.xdsoft_scrollbar').hide(); 541 | return; 542 | } 543 | if (!$(this).hasClass('xdsoft_scroller_box')) { 544 | timebox = timeboxparent.children().eq(0); 545 | parentHeight = timeboxparent[0].clientHeight; 546 | height = timebox[0].offsetHeight; 547 | scrollbar = $('
'); 548 | scroller = $('
'); 549 | scrollbar.append(scroller); 550 | 551 | timeboxparent.addClass('xdsoft_scroller_box').append(scrollbar); 552 | calcOffset = function calcOffset(event) { 553 | var offset = pointerEventToXY(event).y - startY + startTopScroll; 554 | if (offset < 0) { 555 | offset = 0; 556 | } 557 | if (offset + scroller[0].offsetHeight > h1) { 558 | offset = h1 - scroller[0].offsetHeight; 559 | } 560 | timeboxparent.trigger('scroll_element.xdsoft_scroller', [maximumOffset ? offset / maximumOffset : 0]); 561 | }; 562 | 563 | scroller 564 | .on('touchstart.xdsoft_scroller mousedown.xdsoft_scroller', function (event) { 565 | if (!parentHeight) { 566 | timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percent]); 567 | } 568 | 569 | startY = pointerEventToXY(event).y; 570 | startTopScroll = parseInt(scroller.css('margin-top'), 10); 571 | h1 = scrollbar[0].offsetHeight; 572 | 573 | if (event.type === 'mousedown') { 574 | if (document) { 575 | $(document.body).addClass('xdsoft_noselect'); 576 | } 577 | $([document.body, window]).on('mouseup.xdsoft_scroller', function arguments_callee() { 578 | $([document.body, window]).off('mouseup.xdsoft_scroller', arguments_callee) 579 | .off('mousemove.xdsoft_scroller', calcOffset) 580 | .removeClass('xdsoft_noselect'); 581 | }); 582 | $(document.body).on('mousemove.xdsoft_scroller', calcOffset); 583 | } else { 584 | touchStart = true; 585 | event.stopPropagation(); 586 | event.preventDefault(); 587 | } 588 | }) 589 | .on('touchmove', function (event) { 590 | if (touchStart) { 591 | event.preventDefault(); 592 | calcOffset(event); 593 | } 594 | }) 595 | .on('touchend touchcancel', function (event) { 596 | touchStart = false; 597 | startTopScroll = 0; 598 | }); 599 | 600 | timeboxparent 601 | .on('scroll_element.xdsoft_scroller', function (event, percentage) { 602 | if (!parentHeight) { 603 | timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percentage, true]); 604 | } 605 | percentage = percentage > 1 ? 1 : (percentage < 0 || isNaN(percentage)) ? 0 : percentage; 606 | 607 | scroller.css('margin-top', maximumOffset * percentage); 608 | 609 | setTimeout(function () { 610 | timebox.css('marginTop', -parseInt((timebox[0].offsetHeight - parentHeight) * percentage, 10)); 611 | }, 10); 612 | }) 613 | .on('resize_scroll.xdsoft_scroller', function (event, percentage, noTriggerScroll) { 614 | var percent, sh; 615 | parentHeight = timeboxparent[0].clientHeight; 616 | height = timebox[0].offsetHeight; 617 | percent = parentHeight / height; 618 | sh = percent * scrollbar[0].offsetHeight; 619 | if (percent > 1) { 620 | scroller.hide(); 621 | } else { 622 | scroller.show(); 623 | scroller.css('height', parseInt(sh > 10 ? sh : 10, 10)); 624 | maximumOffset = scrollbar[0].offsetHeight - scroller[0].offsetHeight; 625 | if (noTriggerScroll !== true) { 626 | timeboxparent.trigger('scroll_element.xdsoft_scroller', [percentage || Math.abs(parseInt(timebox.css('marginTop'), 10)) / (height - parentHeight)]); 627 | } 628 | } 629 | }); 630 | 631 | timeboxparent.on('mousewheel', function (event) { 632 | var top = Math.abs(parseInt(timebox.css('marginTop'), 10)); 633 | 634 | top = top - (event.deltaY * 20); 635 | if (top < 0) { 636 | top = 0; 637 | } 638 | 639 | timeboxparent.trigger('scroll_element.xdsoft_scroller', [top / (height - parentHeight)]); 640 | event.stopPropagation(); 641 | return false; 642 | }); 643 | 644 | timeboxparent.on('touchstart', function (event) { 645 | start = pointerEventToXY(event); 646 | startTop = Math.abs(parseInt(timebox.css('marginTop'), 10)); 647 | }); 648 | 649 | timeboxparent.on('touchmove', function (event) { 650 | if (start) { 651 | event.preventDefault(); 652 | var coord = pointerEventToXY(event); 653 | timeboxparent.trigger('scroll_element.xdsoft_scroller', [(startTop - (coord.y - start.y)) / (height - parentHeight)]); 654 | } 655 | }); 656 | 657 | timeboxparent.on('touchend touchcancel', function (event) { 658 | start = false; 659 | startTop = 0; 660 | }); 661 | } 662 | timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percent]); 663 | }); 664 | }; 665 | 666 | $.fn.datetimepicker = function (opt) { 667 | var KEY0 = 48, 668 | KEY9 = 57, 669 | _KEY0 = 96, 670 | _KEY9 = 105, 671 | CTRLKEY = 17, 672 | DEL = 46, 673 | ENTER = 13, 674 | ESC = 27, 675 | BACKSPACE = 8, 676 | ARROWLEFT = 37, 677 | ARROWUP = 38, 678 | ARROWRIGHT = 39, 679 | ARROWDOWN = 40, 680 | TAB = 9, 681 | F5 = 116, 682 | AKEY = 65, 683 | CKEY = 67, 684 | VKEY = 86, 685 | ZKEY = 90, 686 | YKEY = 89, 687 | ctrlDown = false, 688 | options = ($.isPlainObject(opt) || !opt) ? $.extend(true, {}, default_options, opt) : $.extend(true, {}, default_options), 689 | 690 | lazyInitTimer = 0, 691 | createDateTimePicker, 692 | destroyDateTimePicker, 693 | _xdsoft_datetime, 694 | 695 | lazyInit = function (input) { 696 | input 697 | .on('open.xdsoft focusin.xdsoft mousedown.xdsoft', function initOnActionCallback(event) { 698 | if (input.is(':disabled') || input.is(':hidden') || !input.is(':visible') || input.data('xdsoft_datetimepicker')) { 699 | return; 700 | } 701 | clearTimeout(lazyInitTimer); 702 | lazyInitTimer = setTimeout(function () { 703 | 704 | if (!input.data('xdsoft_datetimepicker')) { 705 | createDateTimePicker(input); 706 | } 707 | input 708 | .off('open.xdsoft focusin.xdsoft mousedown.xdsoft', initOnActionCallback) 709 | .trigger('open.xdsoft'); 710 | }, 100); 711 | }); 712 | }; 713 | 714 | createDateTimePicker = function (input) { 715 | var datetimepicker = $('
'), 716 | xdsoft_copyright = $(''), 717 | datepicker = $('
'), 718 | mounth_picker = $('
' + 719 | '
' + 720 | '
' + 721 | '
'), 722 | calendar = $('
'), 723 | timepicker = $('
'), 724 | timeboxparent = timepicker.find('.xdsoft_time_box').eq(0), 725 | timebox = $('
'), 726 | /*scrollbar = $('
'), 727 | scroller = $('
'),*/ 728 | monthselect = $('
'), 729 | yearselect = $('
'), 730 | triggerAfterOpen = false, 731 | XDSoft_datetime, 732 | //scroll_element, 733 | xchangeTimer, 734 | timerclick, 735 | current_time_index, 736 | setPos, 737 | timer = 0, 738 | timer1 = 0; 739 | 740 | mounth_picker 741 | .find('.xdsoft_month span') 742 | .after(monthselect); 743 | mounth_picker 744 | .find('.xdsoft_year span') 745 | .after(yearselect); 746 | 747 | mounth_picker 748 | .find('.xdsoft_month,.xdsoft_year') 749 | .on('mousedown.xdsoft', function (event) { 750 | var select = $(this).find('.xdsoft_select').eq(0), 751 | val = 0, 752 | top = 0, 753 | visible = select.is(':visible'), 754 | items, 755 | i; 756 | 757 | mounth_picker 758 | .find('.xdsoft_select') 759 | .hide(); 760 | if (_xdsoft_datetime.currentTime) { 761 | val = _xdsoft_datetime.currentTime[$(this).hasClass('xdsoft_month') ? 'getMonth' : 'getFullYear'](); 762 | } 763 | 764 | select[visible ? 'hide' : 'show'](); 765 | for (items = select.find('div.xdsoft_option'), i = 0; i < items.length; i += 1) { 766 | if (items.eq(i).data('value') === val) { 767 | break; 768 | } else { 769 | top += items[0].offsetHeight; 770 | } 771 | } 772 | 773 | select.xdsoftScroller(top / (select.children()[0].offsetHeight - (select[0].clientHeight))); 774 | event.stopPropagation(); 775 | return false; 776 | }); 777 | 778 | mounth_picker 779 | .find('.xdsoft_select') 780 | .xdsoftScroller() 781 | .on('mousedown.xdsoft', function (event) { 782 | event.stopPropagation(); 783 | event.preventDefault(); 784 | }) 785 | .on('mousedown.xdsoft', '.xdsoft_option', function (event) { 786 | var year = _xdsoft_datetime.currentTime.getFullYear(); 787 | if (_xdsoft_datetime && _xdsoft_datetime.currentTime) { 788 | _xdsoft_datetime.currentTime[$(this).parent().parent().hasClass('xdsoft_monthselect') ? 'setMonth' : 'setFullYear']($(this).data('value')); 789 | } 790 | 791 | $(this).parent().parent().hide(); 792 | 793 | datetimepicker.trigger('xchange.xdsoft'); 794 | if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) { 795 | options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input')); 796 | } 797 | 798 | if (year !== _xdsoft_datetime.currentTime.getFullYear() && $.isFunction(options.onChangeYear)) { 799 | options.onChangeYear.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input')); 800 | } 801 | }); 802 | 803 | datetimepicker.setOptions = function (_options) { 804 | options = $.extend(true, {}, options, _options); 805 | 806 | if (_options.allowTimes && $.isArray(_options.allowTimes) && _options.allowTimes.length) { 807 | options.allowTimes = $.extend(true, [], _options.allowTimes); 808 | } 809 | 810 | if (_options.weekends && $.isArray(_options.weekends) && _options.weekends.length) { 811 | options.weekends = $.extend(true, [], _options.weekends); 812 | } 813 | 814 | if (_options.disabledDates && $.isArray(_options.disabledDates) && _options.disabledDates.length) { 815 | options.disabledDates = $.extend(true, [], _options.disabledDates); 816 | } 817 | 818 | if ((options.open || options.opened) && (!options.inline)) { 819 | input.trigger('open.xdsoft'); 820 | } 821 | 822 | if (options.inline) { 823 | triggerAfterOpen = true; 824 | datetimepicker.addClass('xdsoft_inline'); 825 | input.after(datetimepicker).hide(); 826 | } 827 | 828 | if (options.inverseButton) { 829 | options.next = 'xdsoft_prev'; 830 | options.prev = 'xdsoft_next'; 831 | } 832 | 833 | if (options.datepicker) { 834 | datepicker.addClass('active'); 835 | } else { 836 | datepicker.removeClass('active'); 837 | } 838 | 839 | if (options.timepicker) { 840 | timepicker.addClass('active'); 841 | } else { 842 | timepicker.removeClass('active'); 843 | } 844 | 845 | if (options.value) { 846 | if (input && input.val) { 847 | input.val(options.value); 848 | } 849 | _xdsoft_datetime.setCurrentTime(options.value); 850 | } 851 | 852 | if (isNaN(options.dayOfWeekStart)) { 853 | options.dayOfWeekStart = 0; 854 | } else { 855 | options.dayOfWeekStart = parseInt(options.dayOfWeekStart, 10) % 7; 856 | } 857 | 858 | if (!options.timepickerScrollbar) { 859 | timeboxparent.xdsoftScroller('hide'); 860 | } 861 | 862 | if (options.minDate && /^-(.*)$/.test(options.minDate)) { 863 | options.minDate = _xdsoft_datetime.strToDateTime(options.minDate).dateFormat(options.formatDate); 864 | } 865 | 866 | if (options.maxDate && /^\+(.*)$/.test(options.maxDate)) { 867 | options.maxDate = _xdsoft_datetime.strToDateTime(options.maxDate).dateFormat(options.formatDate); 868 | } 869 | 870 | mounth_picker 871 | .find('.xdsoft_today_button') 872 | .css('visibility', !options.todayButton ? 'hidden' : 'visible'); 873 | 874 | if (options.mask) { 875 | var e, 876 | getCaretPos = function (input) { 877 | try { 878 | if (document.selection && document.selection.createRange) { 879 | var range = document.selection.createRange(); 880 | return range.getBookmark().charCodeAt(2) - 2; 881 | } 882 | if (input.setSelectionRange) { 883 | return input.selectionStart; 884 | } 885 | } catch (e) { 886 | return 0; 887 | } 888 | }, 889 | setCaretPos = function (node, pos) { 890 | node = (typeof node === "string" || node instanceof String) ? document.getElementById(node) : node; 891 | if (!node) { 892 | return false; 893 | } 894 | if (node.createTextRange) { 895 | var textRange = node.createTextRange(); 896 | textRange.collapse(true); 897 | textRange.moveEnd('character', pos); 898 | textRange.moveStart('character', pos); 899 | textRange.select(); 900 | return true; 901 | } 902 | if (node.setSelectionRange) { 903 | node.setSelectionRange(pos, pos); 904 | return true; 905 | } 906 | return false; 907 | }, 908 | isValidValue = function (mask, value) { 909 | var reg = mask 910 | .replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g, '\\$1') 911 | .replace(/_/g, '{digit+}') 912 | .replace(/([0-9]{1})/g, '{digit$1}') 913 | .replace(/\{digit([0-9]{1})\}/g, '[0-$1_]{1}') 914 | .replace(/\{digit[\+]\}/g, '[0-9_]{1}'); 915 | return (new RegExp(reg)).test(value); 916 | }; 917 | input.off('keydown.xdsoft'); 918 | 919 | if (options.mask === true) { 920 | options.mask = options.format 921 | .replace(/Y/g, '9999') 922 | .replace(/F/g, '9999') 923 | .replace(/m/g, '19') 924 | .replace(/d/g, '39') 925 | .replace(/H/g, '29') 926 | .replace(/i/g, '59') 927 | .replace(/s/g, '59'); 928 | } 929 | 930 | if ($.type(options.mask) === 'string') { 931 | if (!isValidValue(options.mask, input.val())) { 932 | input.val(options.mask.replace(/[0-9]/g, '_')); 933 | } 934 | 935 | input.on('keydown.xdsoft', function (event) { 936 | var val = this.value, 937 | key = event.which, 938 | pos, 939 | digit; 940 | 941 | if (((key >= KEY0 && key <= KEY9) || (key >= _KEY0 && key <= _KEY9)) || (key === BACKSPACE || key === DEL)) { 942 | pos = getCaretPos(this); 943 | digit = (key !== BACKSPACE && key !== DEL) ? String.fromCharCode((_KEY0 <= key && key <= _KEY9) ? key - KEY0 : key) : '_'; 944 | 945 | if ((key === BACKSPACE || key === DEL) && pos) { 946 | pos -= 1; 947 | digit = '_'; 948 | } 949 | 950 | while (/[^0-9_]/.test(options.mask.substr(pos, 1)) && pos < options.mask.length && pos > 0) { 951 | pos += (key === BACKSPACE || key === DEL) ? -1 : 1; 952 | } 953 | 954 | val = val.substr(0, pos) + digit + val.substr(pos + 1); 955 | if ($.trim(val) === '') { 956 | val = options.mask.replace(/[0-9]/g, '_'); 957 | } else { 958 | if (pos === options.mask.length) { 959 | event.preventDefault(); 960 | return false; 961 | } 962 | } 963 | 964 | pos += (key === BACKSPACE || key === DEL) ? 0 : 1; 965 | while (/[^0-9_]/.test(options.mask.substr(pos, 1)) && pos < options.mask.length && pos > 0) { 966 | pos += (key === BACKSPACE || key === DEL) ? -1 : 1; 967 | } 968 | 969 | if (isValidValue(options.mask, val)) { 970 | this.value = val; 971 | setCaretPos(this, pos); 972 | } else if ($.trim(val) === '') { 973 | this.value = options.mask.replace(/[0-9]/g, '_'); 974 | } else { 975 | input.trigger('error_input.xdsoft'); 976 | } 977 | } else { 978 | if (([AKEY, CKEY, VKEY, ZKEY, YKEY].indexOf(key) !== -1 && ctrlDown) || [ESC, ARROWUP, ARROWDOWN, ARROWLEFT, ARROWRIGHT, F5, CTRLKEY, TAB, ENTER].indexOf(key) !== -1) { 979 | return true; 980 | } 981 | } 982 | 983 | event.preventDefault(); 984 | return false; 985 | }); 986 | } 987 | } 988 | if (options.validateOnBlur) { 989 | input 990 | .off('blur.xdsoft') 991 | .on('blur.xdsoft', function () { 992 | if (options.allowBlank && !$.trim($(this).val()).length) { 993 | $(this).val(null); 994 | datetimepicker.data('xdsoft_datetime').empty(); 995 | } else if (!Date.parseDate($(this).val(), options.format)) { 996 | $(this).val((_xdsoft_datetime.now()).dateFormat(options.format)); 997 | datetimepicker.data('xdsoft_datetime').setCurrentTime($(this).val()); 998 | } else { 999 | datetimepicker.data('xdsoft_datetime').setCurrentTime($(this).val()); 1000 | } 1001 | datetimepicker.trigger('changedatetime.xdsoft'); 1002 | }); 1003 | } 1004 | options.dayOfWeekStartPrev = (options.dayOfWeekStart === 0) ? 6 : options.dayOfWeekStart - 1; 1005 | 1006 | datetimepicker 1007 | .trigger('xchange.xdsoft') 1008 | .trigger('afterOpen.xdsoft'); 1009 | }; 1010 | 1011 | datetimepicker 1012 | .data('options', options) 1013 | .on('mousedown.xdsoft', function (event) { 1014 | event.stopPropagation(); 1015 | event.preventDefault(); 1016 | yearselect.hide(); 1017 | monthselect.hide(); 1018 | return false; 1019 | }); 1020 | 1021 | //scroll_element = timepicker.find('.xdsoft_time_box'); 1022 | timeboxparent.append(timebox); 1023 | timeboxparent.xdsoftScroller(); 1024 | 1025 | datetimepicker.on('afterOpen.xdsoft', function () { 1026 | timeboxparent.xdsoftScroller(); 1027 | }); 1028 | 1029 | datetimepicker 1030 | .append(datepicker) 1031 | .append(timepicker); 1032 | 1033 | if (options.withoutCopyright !== true) { 1034 | datetimepicker 1035 | .append(xdsoft_copyright); 1036 | } 1037 | 1038 | datepicker 1039 | .append(mounth_picker) 1040 | .append(calendar); 1041 | 1042 | $(options.parentID) 1043 | .append(datetimepicker); 1044 | 1045 | XDSoft_datetime = function () { 1046 | var _this = this; 1047 | _this.now = function (norecursion) { 1048 | var d = new Date(), 1049 | date, 1050 | time; 1051 | 1052 | if (!norecursion && options.defaultDate) { 1053 | date = _this.strToDate(options.defaultDate); 1054 | d.setFullYear(date.getFullYear()); 1055 | d.setMonth(date.getMonth()); 1056 | d.setDate(date.getDate()); 1057 | } 1058 | 1059 | if (options.yearOffset) { 1060 | d.setFullYear(d.getFullYear() + options.yearOffset); 1061 | } 1062 | 1063 | if (!norecursion && options.defaultTime) { 1064 | time = _this.strtotime(options.defaultTime); 1065 | d.setHours(time.getHours()); 1066 | d.setMinutes(time.getMinutes()); 1067 | } 1068 | 1069 | return d; 1070 | }; 1071 | 1072 | _this.isValidDate = function (d) { 1073 | if (Object.prototype.toString.call(d) !== "[object Date]") { 1074 | return false; 1075 | } 1076 | return !isNaN(d.getTime()); 1077 | }; 1078 | 1079 | _this.setCurrentTime = function (dTime) { 1080 | _this.currentTime = (typeof dTime === 'string') ? _this.strToDateTime(dTime) : _this.isValidDate(dTime) ? dTime : _this.now(); 1081 | datetimepicker.trigger('xchange.xdsoft'); 1082 | }; 1083 | 1084 | _this.empty = function () { 1085 | _this.currentTime = null; 1086 | }; 1087 | 1088 | _this.getCurrentTime = function (dTime) { 1089 | return _this.currentTime; 1090 | }; 1091 | 1092 | _this.nextMonth = function () { 1093 | var month = _this.currentTime.getMonth() + 1, 1094 | year; 1095 | if (month === 12) { 1096 | _this.currentTime.setFullYear(_this.currentTime.getFullYear() + 1); 1097 | month = 0; 1098 | } 1099 | 1100 | year = _this.currentTime.getFullYear(); 1101 | 1102 | _this.currentTime.setDate( 1103 | Math.min( 1104 | new Date(_this.currentTime.getFullYear(), month + 1, 0).getDate(), 1105 | _this.currentTime.getDate() 1106 | ) 1107 | ); 1108 | _this.currentTime.setMonth(month); 1109 | 1110 | if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) { 1111 | options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input')); 1112 | } 1113 | 1114 | if (year !== _this.currentTime.getFullYear() && $.isFunction(options.onChangeYear)) { 1115 | options.onChangeYear.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input')); 1116 | } 1117 | 1118 | datetimepicker.trigger('xchange.xdsoft'); 1119 | return month; 1120 | }; 1121 | 1122 | _this.prevMonth = function () { 1123 | var month = _this.currentTime.getMonth() - 1; 1124 | if (month === -1) { 1125 | _this.currentTime.setFullYear(_this.currentTime.getFullYear() - 1); 1126 | month = 11; 1127 | } 1128 | _this.currentTime.setDate( 1129 | Math.min( 1130 | new Date(_this.currentTime.getFullYear(), month + 1, 0).getDate(), 1131 | _this.currentTime.getDate() 1132 | ) 1133 | ); 1134 | _this.currentTime.setMonth(month); 1135 | if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) { 1136 | options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input')); 1137 | } 1138 | datetimepicker.trigger('xchange.xdsoft'); 1139 | return month; 1140 | }; 1141 | 1142 | _this.getWeekOfYear = function (datetime) { 1143 | var onejan = new Date(datetime.getFullYear(), 0, 1); 1144 | return Math.ceil((((datetime - onejan) / 86400000) + onejan.getDay() + 1) / 7); 1145 | }; 1146 | 1147 | _this.strToDateTime = function (sDateTime) { 1148 | var tmpDate = [], timeOffset, currentTime; 1149 | 1150 | if (sDateTime && sDateTime instanceof Date && _this.isValidDate(sDateTime)) { 1151 | return sDateTime; 1152 | } 1153 | 1154 | tmpDate = /^(\+|\-)(.*)$/.exec(sDateTime); 1155 | if (tmpDate) { 1156 | tmpDate[2] = Date.parseDate(tmpDate[2], options.formatDate); 1157 | } 1158 | if (tmpDate && tmpDate[2]) { 1159 | timeOffset = tmpDate[2].getTime() - (tmpDate[2].getTimezoneOffset()) * 60000; 1160 | currentTime = new Date((_xdsoft_datetime.now()).getTime() + parseInt(tmpDate[1] + '1', 10) * timeOffset); 1161 | } else { 1162 | currentTime = sDateTime ? Date.parseDate(sDateTime, options.format) : _this.now(); 1163 | } 1164 | 1165 | if (!_this.isValidDate(currentTime)) { 1166 | currentTime = _this.now(); 1167 | } 1168 | 1169 | return currentTime; 1170 | }; 1171 | 1172 | _this.strToDate = function (sDate) { 1173 | if (sDate && sDate instanceof Date && _this.isValidDate(sDate)) { 1174 | return sDate; 1175 | } 1176 | 1177 | var currentTime = sDate ? Date.parseDate(sDate, options.formatDate) : _this.now(true); 1178 | if (!_this.isValidDate(currentTime)) { 1179 | currentTime = _this.now(true); 1180 | } 1181 | return currentTime; 1182 | }; 1183 | 1184 | _this.strtotime = function (sTime) { 1185 | if (sTime && sTime instanceof Date && _this.isValidDate(sTime)) { 1186 | return sTime; 1187 | } 1188 | var currentTime = sTime ? Date.parseDate(sTime, options.formatTime) : _this.now(true); 1189 | if (!_this.isValidDate(currentTime)) { 1190 | currentTime = _this.now(true); 1191 | } 1192 | return currentTime; 1193 | }; 1194 | 1195 | _this.str = function () { 1196 | return _this.currentTime.dateFormat(options.format); 1197 | }; 1198 | _this.currentTime = this.now(); 1199 | }; 1200 | 1201 | _xdsoft_datetime = new XDSoft_datetime(); 1202 | 1203 | mounth_picker 1204 | .find('.xdsoft_today_button') 1205 | .on('mousedown.xdsoft', function () { 1206 | datetimepicker.data('changed', true); 1207 | _xdsoft_datetime.setCurrentTime(0); 1208 | datetimepicker.trigger('afterOpen.xdsoft'); 1209 | }).on('dblclick.xdsoft', function () { 1210 | input.val(_xdsoft_datetime.str()); 1211 | datetimepicker.trigger('close.xdsoft'); 1212 | }); 1213 | mounth_picker 1214 | .find('.xdsoft_prev,.xdsoft_next') 1215 | .on('mousedown.xdsoft', function () { 1216 | var $this = $(this), 1217 | timer = 0, 1218 | stop = false; 1219 | 1220 | (function arguments_callee1(v) { 1221 | var month = _xdsoft_datetime.currentTime.getMonth(); 1222 | if ($this.hasClass(options.next)) { 1223 | _xdsoft_datetime.nextMonth(); 1224 | } else if ($this.hasClass(options.prev)) { 1225 | _xdsoft_datetime.prevMonth(); 1226 | } 1227 | if (options.monthChangeSpinner) { 1228 | if (!stop) { 1229 | timer = setTimeout(arguments_callee1, v || 100); 1230 | } 1231 | } 1232 | }(500)); 1233 | 1234 | $([document.body, window]).on('mouseup.xdsoft', function arguments_callee2() { 1235 | clearTimeout(timer); 1236 | stop = true; 1237 | $([document.body, window]).off('mouseup.xdsoft', arguments_callee2); 1238 | }); 1239 | }); 1240 | 1241 | timepicker 1242 | .find('.xdsoft_prev,.xdsoft_next') 1243 | .on('mousedown.xdsoft', function () { 1244 | var $this = $(this), 1245 | timer = 0, 1246 | stop = false, 1247 | period = 110; 1248 | (function arguments_callee4(v) { 1249 | var pheight = timeboxparent[0].clientHeight, 1250 | height = timebox[0].offsetHeight, 1251 | top = Math.abs(parseInt(timebox.css('marginTop'), 10)); 1252 | if ($this.hasClass(options.next) && (height - pheight) - options.timeHeightInTimePicker >= top) { 1253 | timebox.css('marginTop', '-' + (top + options.timeHeightInTimePicker) + 'px'); 1254 | } else if ($this.hasClass(options.prev) && top - options.timeHeightInTimePicker >= 0) { 1255 | timebox.css('marginTop', '-' + (top - options.timeHeightInTimePicker) + 'px'); 1256 | } 1257 | timeboxparent.trigger('scroll_element.xdsoft_scroller', [Math.abs(parseInt(timebox.css('marginTop'), 10) / (height - pheight))]); 1258 | period = (period > 10) ? 10 : period - 10; 1259 | if (!stop) { 1260 | timer = setTimeout(arguments_callee4, v || period); 1261 | } 1262 | }(500)); 1263 | $([document.body, window]).on('mouseup.xdsoft', function arguments_callee5() { 1264 | clearTimeout(timer); 1265 | stop = true; 1266 | $([document.body, window]) 1267 | .off('mouseup.xdsoft', arguments_callee5); 1268 | }); 1269 | }); 1270 | 1271 | xchangeTimer = 0; 1272 | // base handler - generating a calendar and timepicker 1273 | datetimepicker 1274 | .on('xchange.xdsoft', function (event) { 1275 | clearTimeout(xchangeTimer); 1276 | xchangeTimer = setTimeout(function () { 1277 | var table = '', 1278 | start = new Date(_xdsoft_datetime.currentTime.getFullYear(), _xdsoft_datetime.currentTime.getMonth(), 1, 12, 0, 0), 1279 | i = 0, 1280 | j, 1281 | today = _xdsoft_datetime.now(), 1282 | maxDate = false, 1283 | minDate = false, 1284 | d, 1285 | y, 1286 | m, 1287 | w, 1288 | classes = [], 1289 | customDateSettings, 1290 | newRow = true, 1291 | time = '', 1292 | h = '', 1293 | line_time; 1294 | 1295 | while (start.getDay() !== options.dayOfWeekStart) { 1296 | start.setDate(start.getDate() - 1); 1297 | } 1298 | 1299 | table += ''; 1300 | 1301 | if (options.weeks) { 1302 | table += ''; 1303 | } 1304 | 1305 | for (j = 0; j < 7; j += 1) { 1306 | table += ''; 1307 | } 1308 | 1309 | table += ''; 1310 | table += ''; 1311 | 1312 | if (options.maxDate !== false) { 1313 | maxDate = _xdsoft_datetime.strToDate(options.maxDate); 1314 | maxDate = new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate(), 23, 59, 59, 999); 1315 | } 1316 | 1317 | if (options.minDate !== false) { 1318 | minDate = _xdsoft_datetime.strToDate(options.minDate); 1319 | minDate = new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate()); 1320 | } 1321 | 1322 | while (i < _xdsoft_datetime.currentTime.countDaysInMonth() || start.getDay() !== options.dayOfWeekStart || _xdsoft_datetime.currentTime.getMonth() === start.getMonth()) { 1323 | classes = []; 1324 | i += 1; 1325 | 1326 | d = start.getDate(); 1327 | y = start.getFullYear(); 1328 | m = start.getMonth(); 1329 | w = _xdsoft_datetime.getWeekOfYear(start); 1330 | 1331 | classes.push('xdsoft_date'); 1332 | 1333 | if (options.beforeShowDay && $.isFunction(options.beforeShowDay.call)) { 1334 | customDateSettings = options.beforeShowDay.call(datetimepicker, start); 1335 | } else { 1336 | customDateSettings = null; 1337 | } 1338 | 1339 | if ((maxDate !== false && start > maxDate) || (minDate !== false && start < minDate) || (customDateSettings && customDateSettings[0] === false)) { 1340 | classes.push('xdsoft_disabled'); 1341 | } else if (options.disabledDates.indexOf(start.dateFormat(options.formatDate)) !== -1) { 1342 | classes.push('xdsoft_disabled'); 1343 | } 1344 | 1345 | if (customDateSettings && customDateSettings[1] !== "") { 1346 | classes.push(customDateSettings[1]); 1347 | } 1348 | 1349 | if (_xdsoft_datetime.currentTime.getMonth() !== m) { 1350 | classes.push('xdsoft_other_month'); 1351 | } 1352 | 1353 | if ((options.defaultSelect || datetimepicker.data('changed')) && _xdsoft_datetime.currentTime.dateFormat(options.formatDate) === start.dateFormat(options.formatDate)) { 1354 | classes.push('xdsoft_current'); 1355 | } 1356 | 1357 | if (today.dateFormat(options.formatDate) === start.dateFormat(options.formatDate)) { 1358 | classes.push('xdsoft_today'); 1359 | } 1360 | 1361 | if (start.getDay() === 0 || start.getDay() === 6 || options.weekends.indexOf(start.dateFormat(options.formatDate)) === -1) { 1362 | classes.push('xdsoft_weekend'); 1363 | } 1364 | 1365 | if (options.beforeShowDay && $.isFunction(options.beforeShowDay)) { 1366 | classes.push(options.beforeShowDay(start)); 1367 | } 1368 | 1369 | if (newRow) { 1370 | table += ''; 1371 | newRow = false; 1372 | if (options.weeks) { 1373 | table += ''; 1374 | } 1375 | } 1376 | 1377 | table += ''; 1380 | 1381 | if (start.getDay() === options.dayOfWeekStartPrev) { 1382 | table += ''; 1383 | newRow = true; 1384 | } 1385 | 1386 | start.setDate(d + 1); 1387 | } 1388 | table += '
' + options.i18n[options.lang].dayOfWeek[(j + options.dayOfWeekStart) % 7] + '
' + w + '' + 1378 | '
' + d + '
' + 1379 | '
'; 1389 | 1390 | calendar.html(table); 1391 | 1392 | mounth_picker.find('.xdsoft_label span').eq(0).text(options.i18n[options.lang].months[_xdsoft_datetime.currentTime.getMonth()]); 1393 | mounth_picker.find('.xdsoft_label span').eq(1).text(_xdsoft_datetime.currentTime.getFullYear()); 1394 | 1395 | // generate timebox 1396 | time = ''; 1397 | h = ''; 1398 | m = ''; 1399 | line_time = function line_time(h, m) { 1400 | var now = _xdsoft_datetime.now(); 1401 | now.setHours(h); 1402 | h = parseInt(now.getHours(), 10); 1403 | now.setMinutes(m); 1404 | m = parseInt(now.getMinutes(), 10); 1405 | 1406 | classes = []; 1407 | if ((options.maxTime !== false && _xdsoft_datetime.strtotime(options.maxTime).getTime() < now.getTime()) || (options.minTime !== false && _xdsoft_datetime.strtotime(options.minTime).getTime() > now.getTime())) { 1408 | classes.push('xdsoft_disabled'); 1409 | } 1410 | if ((options.initTime || options.defaultSelect || datetimepicker.data('changed')) && parseInt(_xdsoft_datetime.currentTime.getHours(), 10) === parseInt(h, 10) && (options.step > 59 || Math[options.roundTime](_xdsoft_datetime.currentTime.getMinutes() / options.step) * options.step === parseInt(m, 10))) { 1411 | if (options.defaultSelect || datetimepicker.data('changed')) { 1412 | classes.push('xdsoft_current'); 1413 | } else if (options.initTime) { 1414 | classes.push('xdsoft_init_time'); 1415 | } 1416 | } 1417 | if (parseInt(today.getHours(), 10) === parseInt(h, 10) && parseInt(today.getMinutes(), 10) === parseInt(m, 10)) { 1418 | classes.push('xdsoft_today'); 1419 | } 1420 | time += '
' + now.dateFormat(options.formatTime) + '
'; 1421 | }; 1422 | 1423 | if (!options.allowTimes || !$.isArray(options.allowTimes) || !options.allowTimes.length) { 1424 | for (i = 0, j = 0; i < (options.hours12 ? 12 : 24); i += 1) { 1425 | for (j = 0; j < 60; j += options.step) { 1426 | h = (i < 10 ? '0' : '') + i; 1427 | m = (j < 10 ? '0' : '') + j; 1428 | line_time(h, m); 1429 | } 1430 | } 1431 | } else { 1432 | for (i = 0; i < options.allowTimes.length; i += 1) { 1433 | h = _xdsoft_datetime.strtotime(options.allowTimes[i]).getHours(); 1434 | m = _xdsoft_datetime.strtotime(options.allowTimes[i]).getMinutes(); 1435 | line_time(h, m); 1436 | } 1437 | } 1438 | 1439 | timebox.html(time); 1440 | 1441 | opt = ''; 1442 | i = 0; 1443 | 1444 | for (i = parseInt(options.yearStart, 10) + options.yearOffset; i <= parseInt(options.yearEnd, 10) + options.yearOffset; i += 1) { 1445 | opt += '
' + i + '
'; 1446 | } 1447 | yearselect.children().eq(0) 1448 | .html(opt); 1449 | 1450 | for (i = 0, opt = ''; i <= 11; i += 1) { 1451 | opt += '
' + options.i18n[options.lang].months[i] + '
'; 1452 | } 1453 | monthselect.children().eq(0).html(opt); 1454 | $(datetimepicker) 1455 | .trigger('generate.xdsoft'); 1456 | }, 10); 1457 | event.stopPropagation(); 1458 | }) 1459 | .on('afterOpen.xdsoft', function () { 1460 | if (options.timepicker) { 1461 | var classType, pheight, height, top; 1462 | if (timebox.find('.xdsoft_current').length) { 1463 | classType = '.xdsoft_current'; 1464 | } else if (timebox.find('.xdsoft_init_time').length) { 1465 | classType = '.xdsoft_init_time'; 1466 | } 1467 | if (classType) { 1468 | pheight = timeboxparent[0].clientHeight; 1469 | height = timebox[0].offsetHeight; 1470 | top = timebox.find(classType).index() * options.timeHeightInTimePicker + 1; 1471 | if ((height - pheight) < top) { 1472 | top = height - pheight; 1473 | } 1474 | timeboxparent.trigger('scroll_element.xdsoft_scroller', [parseInt(top, 10) / (height - pheight)]); 1475 | } else { 1476 | timeboxparent.trigger('scroll_element.xdsoft_scroller', [0]); 1477 | } 1478 | } 1479 | }); 1480 | 1481 | timerclick = 0; 1482 | calendar 1483 | .on('click.xdsoft', 'td', function (xdevent) { 1484 | xdevent.stopPropagation(); // Prevents closing of Pop-ups, Modals and Flyouts in Bootstrap 1485 | timerclick += 1; 1486 | var $this = $(this), 1487 | currentTime = _xdsoft_datetime.currentTime; 1488 | 1489 | if (currentTime === undefined || currentTime === null) { 1490 | _xdsoft_datetime.currentTime = _xdsoft_datetime.now(); 1491 | currentTime = _xdsoft_datetime.currentTime; 1492 | } 1493 | 1494 | if ($this.hasClass('xdsoft_disabled')) { 1495 | return false; 1496 | } 1497 | 1498 | currentTime.setDate(1); 1499 | currentTime.setFullYear($this.data('year')); 1500 | currentTime.setMonth($this.data('month')); 1501 | currentTime.setDate($this.data('date')); 1502 | 1503 | datetimepicker.trigger('select.xdsoft', [currentTime]); 1504 | 1505 | input.val(_xdsoft_datetime.str()); 1506 | if ((timerclick > 1 || (options.closeOnDateSelect === true || (options.closeOnDateSelect === 0 && !options.timepicker))) && !options.inline) { 1507 | datetimepicker.trigger('close.xdsoft'); 1508 | } 1509 | 1510 | if (options.onSelectDate && $.isFunction(options.onSelectDate)) { 1511 | options.onSelectDate.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), xdevent); 1512 | } 1513 | 1514 | datetimepicker.data('changed', true); 1515 | datetimepicker.trigger('xchange.xdsoft'); 1516 | datetimepicker.trigger('changedatetime.xdsoft'); 1517 | setTimeout(function () { 1518 | timerclick = 0; 1519 | }, 200); 1520 | }); 1521 | 1522 | timebox 1523 | .on('click.xdsoft', 'div', function (xdevent) { 1524 | xdevent.stopPropagation(); 1525 | var $this = $(this), 1526 | currentTime = _xdsoft_datetime.currentTime; 1527 | 1528 | if (currentTime === undefined || currentTime === null) { 1529 | _xdsoft_datetime.currentTime = _xdsoft_datetime.now(); 1530 | currentTime = _xdsoft_datetime.currentTime; 1531 | } 1532 | 1533 | if ($this.hasClass('xdsoft_disabled')) { 1534 | return false; 1535 | } 1536 | currentTime.setHours($this.data('hour')); 1537 | currentTime.setMinutes($this.data('minute')); 1538 | datetimepicker.trigger('select.xdsoft', [currentTime]); 1539 | 1540 | datetimepicker.data('input').val(_xdsoft_datetime.str()); 1541 | if (!options.inline) { 1542 | datetimepicker.trigger('close.xdsoft'); 1543 | } 1544 | 1545 | if (options.onSelectTime && $.isFunction(options.onSelectTime)) { 1546 | options.onSelectTime.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), xdevent); 1547 | } 1548 | datetimepicker.data('changed', true); 1549 | datetimepicker.trigger('xchange.xdsoft'); 1550 | datetimepicker.trigger('changedatetime.xdsoft'); 1551 | }); 1552 | 1553 | 1554 | datepicker 1555 | .on('mousewheel.xdsoft', function (event) { 1556 | if (!options.scrollMonth) { 1557 | return true; 1558 | } 1559 | if (event.deltaY < 0) { 1560 | _xdsoft_datetime.nextMonth(); 1561 | } else { 1562 | _xdsoft_datetime.prevMonth(); 1563 | } 1564 | return false; 1565 | }); 1566 | 1567 | input 1568 | .on('mousewheel.xdsoft', function (event) { 1569 | if (!options.scrollInput) { 1570 | return true; 1571 | } 1572 | if (!options.datepicker && options.timepicker) { 1573 | current_time_index = timebox.find('.xdsoft_current').length ? timebox.find('.xdsoft_current').eq(0).index() : 0; 1574 | if (current_time_index + event.deltaY >= 0 && current_time_index + event.deltaY < timebox.children().length) { 1575 | current_time_index += event.deltaY; 1576 | } 1577 | if (timebox.children().eq(current_time_index).length) { 1578 | timebox.children().eq(current_time_index).trigger('mousedown'); 1579 | } 1580 | return false; 1581 | } 1582 | if (options.datepicker && !options.timepicker) { 1583 | datepicker.trigger(event, [event.deltaY, event.deltaX, event.deltaY]); 1584 | if (input.val) { 1585 | input.val(_xdsoft_datetime.str()); 1586 | } 1587 | datetimepicker.trigger('changedatetime.xdsoft'); 1588 | return false; 1589 | } 1590 | }); 1591 | 1592 | datetimepicker 1593 | .on('changedatetime.xdsoft', function (event) { 1594 | if (options.onChangeDateTime && $.isFunction(options.onChangeDateTime)) { 1595 | var $input = datetimepicker.data('input'); 1596 | options.onChangeDateTime.call(datetimepicker, _xdsoft_datetime.currentTime, $input, event); 1597 | delete options.value; 1598 | $input.trigger('change'); 1599 | } 1600 | }) 1601 | .on('generate.xdsoft', function () { 1602 | if (options.onGenerate && $.isFunction(options.onGenerate)) { 1603 | options.onGenerate.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input')); 1604 | } 1605 | if (triggerAfterOpen) { 1606 | datetimepicker.trigger('afterOpen.xdsoft'); 1607 | triggerAfterOpen = false; 1608 | } 1609 | }) 1610 | .on('click.xdsoft', function (xdevent) { 1611 | xdevent.stopPropagation(); 1612 | }); 1613 | 1614 | current_time_index = 0; 1615 | 1616 | setPos = function () { 1617 | var offset = datetimepicker.data('input').offset(), top = offset.top + datetimepicker.data('input')[0].offsetHeight - 1, left = offset.left, position = "absolute"; 1618 | if (options.fixed) { 1619 | top -= $(window).scrollTop(); 1620 | left -= $(window).scrollLeft(); 1621 | position = "fixed"; 1622 | } else { 1623 | if (top + datetimepicker[0].offsetHeight > $(window).height() + $(window).scrollTop()) { 1624 | top = offset.top - datetimepicker[0].offsetHeight + 1; 1625 | } 1626 | if (top < 0) { 1627 | top = 0; 1628 | } 1629 | if (left + datetimepicker[0].offsetWidth > $(window).width()) { 1630 | left = $(window).width() - datetimepicker[0].offsetWidth; 1631 | } 1632 | } 1633 | datetimepicker.css({ 1634 | left: left, 1635 | top: top, 1636 | position: position 1637 | }); 1638 | }; 1639 | datetimepicker 1640 | .on('open.xdsoft', function (event) { 1641 | var onShow = true; 1642 | if (options.onShow && $.isFunction(options.onShow)) { 1643 | onShow = options.onShow.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), event); 1644 | } 1645 | if (onShow !== false) { 1646 | datetimepicker.show(); 1647 | setPos(); 1648 | $(window) 1649 | .off('resize.xdsoft', setPos) 1650 | .on('resize.xdsoft', setPos); 1651 | 1652 | if (options.closeOnWithoutClick) { 1653 | $([document.body, window]).on('mousedown.xdsoft', function arguments_callee6() { 1654 | datetimepicker.trigger('close.xdsoft'); 1655 | $([document.body, window]).off('mousedown.xdsoft', arguments_callee6); 1656 | }); 1657 | } 1658 | } 1659 | }) 1660 | .on('close.xdsoft', function (event) { 1661 | var onClose = true; 1662 | mounth_picker 1663 | .find('.xdsoft_month,.xdsoft_year') 1664 | .find('.xdsoft_select') 1665 | .hide(); 1666 | if (options.onClose && $.isFunction(options.onClose)) { 1667 | onClose = options.onClose.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), event); 1668 | } 1669 | if (onClose !== false && !options.opened && !options.inline) { 1670 | datetimepicker.hide(); 1671 | } 1672 | event.stopPropagation(); 1673 | }) 1674 | .on('toggle.xdsoft', function (event) { 1675 | if (datetimepicker.is(':visible')) { 1676 | datetimepicker.trigger('close.xdsoft'); 1677 | } else { 1678 | datetimepicker.trigger('open.xdsoft'); 1679 | } 1680 | }) 1681 | .data('input', input); 1682 | 1683 | timer = 0; 1684 | timer1 = 0; 1685 | 1686 | datetimepicker.data('xdsoft_datetime', _xdsoft_datetime); 1687 | datetimepicker.setOptions(options); 1688 | 1689 | function getCurrentValue() { 1690 | 1691 | var ct = false, time; 1692 | 1693 | if (options.startDate) { 1694 | ct = _xdsoft_datetime.strToDate(options.startDate); 1695 | } else { 1696 | ct = options.value || ((input && input.val && input.val()) ? input.val() : ''); 1697 | if (ct) { 1698 | ct = _xdsoft_datetime.strToDateTime(ct); 1699 | } else if (options.defaultDate) { 1700 | ct = _xdsoft_datetime.strToDate(options.defaultDate); 1701 | if (options.defaultTime) { 1702 | time = _xdsoft_datetime.strtotime(options.defaultTime); 1703 | ct.setHours(time.getHours()); 1704 | ct.setMinutes(time.getMinutes()); 1705 | } 1706 | } 1707 | } 1708 | 1709 | if (ct && _xdsoft_datetime.isValidDate(ct)) { 1710 | datetimepicker.data('changed', true); 1711 | } else { 1712 | ct = ''; 1713 | } 1714 | 1715 | return ct || 0; 1716 | } 1717 | 1718 | _xdsoft_datetime.setCurrentTime(getCurrentValue()); 1719 | 1720 | input 1721 | .data('xdsoft_datetimepicker', datetimepicker) 1722 | .on('open.xdsoft focusin.xdsoft mousedown.xdsoft', function (event) { 1723 | if (input.is(':disabled') || input.is(':hidden') || !input.is(':visible') || (input.data('xdsoft_datetimepicker').is(':visible') && options.closeOnInputClick)) { 1724 | return; 1725 | } 1726 | clearTimeout(timer); 1727 | timer = setTimeout(function () { 1728 | if (input.is(':disabled') || input.is(':hidden') || !input.is(':visible')) { 1729 | return; 1730 | } 1731 | 1732 | triggerAfterOpen = true; 1733 | _xdsoft_datetime.setCurrentTime(getCurrentValue()); 1734 | 1735 | datetimepicker.trigger('open.xdsoft'); 1736 | }, 100); 1737 | }) 1738 | .on('keydown.xdsoft', function (event) { 1739 | var val = this.value, elementSelector, 1740 | key = event.which; 1741 | if ([ENTER].indexOf(key) !== -1 && options.enterLikeTab) { 1742 | elementSelector = $("input:visible,textarea:visible"); 1743 | datetimepicker.trigger('close.xdsoft'); 1744 | elementSelector.eq(elementSelector.index(this) + 1).focus(); 1745 | return false; 1746 | } 1747 | if ([TAB].indexOf(key) !== -1) { 1748 | datetimepicker.trigger('close.xdsoft'); 1749 | return true; 1750 | } 1751 | }); 1752 | }; 1753 | destroyDateTimePicker = function (input) { 1754 | var datetimepicker = input.data('xdsoft_datetimepicker'); 1755 | if (datetimepicker) { 1756 | datetimepicker.data('xdsoft_datetime', null); 1757 | datetimepicker.remove(); 1758 | input 1759 | .data('xdsoft_datetimepicker', null) 1760 | .off('.xdsoft'); 1761 | $(window).off('resize.xdsoft'); 1762 | $([window, document.body]).off('mousedown.xdsoft'); 1763 | if (input.unmousewheel) { 1764 | input.unmousewheel(); 1765 | } 1766 | } 1767 | }; 1768 | $(document) 1769 | .off('keydown.xdsoftctrl keyup.xdsoftctrl') 1770 | .on('keydown.xdsoftctrl', function (e) { 1771 | if (e.keyCode === CTRLKEY) { 1772 | ctrlDown = true; 1773 | } 1774 | }) 1775 | .on('keyup.xdsoftctrl', function (e) { 1776 | if (e.keyCode === CTRLKEY) { 1777 | ctrlDown = false; 1778 | } 1779 | }); 1780 | return this.each(function () { 1781 | var datetimepicker = $(this).data('xdsoft_datetimepicker'); 1782 | if (datetimepicker) { 1783 | if ($.type(opt) === 'string') { 1784 | switch (opt) { 1785 | case 'show': 1786 | $(this).select().focus(); 1787 | datetimepicker.trigger('open.xdsoft'); 1788 | break; 1789 | case 'hide': 1790 | datetimepicker.trigger('close.xdsoft'); 1791 | break; 1792 | case 'toggle': 1793 | datetimepicker.trigger('toggle.xdsoft'); 1794 | break; 1795 | case 'destroy': 1796 | destroyDateTimePicker($(this)); 1797 | break; 1798 | case 'reset': 1799 | this.value = this.defaultValue; 1800 | if (!this.value || !datetimepicker.data('xdsoft_datetime').isValidDate(Date.parseDate(this.value, options.format))) { 1801 | datetimepicker.data('changed', false); 1802 | } 1803 | datetimepicker.data('xdsoft_datetime').setCurrentTime(this.value); 1804 | break; 1805 | } 1806 | } else { 1807 | datetimepicker 1808 | .setOptions(opt); 1809 | } 1810 | return 0; 1811 | } 1812 | if ($.type(opt) !== 'string') { 1813 | if (!options.lazyInit || options.open || options.inline) { 1814 | createDateTimePicker($(this)); 1815 | } else { 1816 | lazyInit($(this)); 1817 | } 1818 | } 1819 | }); 1820 | }; 1821 | $.fn.datetimepicker.defaults = default_options; 1822 | }(jQuery)); 1823 | (function () { 1824 | 1825 | /*! Copyright (c) 2013 Brandon Aaron (http://brandon.aaron.sh) 1826 | * Licensed under the MIT License (LICENSE.txt). 1827 | * 1828 | * Version: 3.1.12 1829 | * 1830 | * Requires: jQuery 1.2.2+ 1831 | */ 1832 | !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}); 1833 | 1834 | // Parse and Format Library 1835 | //http://www.xaprb.com/blog/2005/12/12/javascript-closures-for-runtime-efficiency/ 1836 | /* 1837 | * Copyright (C) 2004 Baron Schwartz 1838 | * 1839 | * This program is free software; you can redistribute it and/or modify it 1840 | * under the terms of the GNU Lesser General Public License as published by the 1841 | * Free Software Foundation, version 2.1. 1842 | * 1843 | * This program is distributed in the hope that it will be useful, but WITHOUT 1844 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 1845 | * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 1846 | * details. 1847 | */ 1848 | Date.parseFunctions={count:0};Date.parseRegexes=[];Date.formatFunctions={count:0};Date.prototype.dateFormat=function(b){if(b=="unixtime"){return parseInt(this.getTime()/1000);}if(Date.formatFunctions[b]==null){Date.createNewFormat(b);}var a=Date.formatFunctions[b];return this[a]();};Date.createNewFormat=function(format){var funcName="format"+Date.formatFunctions.count++;Date.formatFunctions[format]=funcName;var code="Date.prototype."+funcName+" = function() {return ";var special=false;var ch="";for(var i=0;i 0) {";var regex="";var special=false;var ch="";for(var i=0;i 0 && z > 0){\nvar doyDate = new Date(y,0);\ndoyDate.setDate(z);\nm = doyDate.getMonth();\nd = doyDate.getDate();\n}";code+="if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0)\n{return new Date(y, m, d, h, i, s);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n{return new Date(y, m, d, h, i);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0)\n{return new Date(y, m, d, h);}\nelse if (y > 0 && m >= 0 && d > 0)\n{return new Date(y, m, d);}\nelse if (y > 0 && m >= 0)\n{return new Date(y, m);}\nelse if (y > 0)\n{return new Date(y);}\n}return null;}";Date.parseRegexes[regexNum]=new RegExp("^"+regex+"$");eval(code);};Date.formatCodeToRegex=function(b,a){switch(b){case"D":return{g:0,c:null,s:"(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)"};case"j":case"d":return{g:1,c:"d = parseInt(results["+a+"], 10);\n",s:"(\\d{1,2})"};case"l":return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"};case"S":return{g:0,c:null,s:"(?:st|nd|rd|th)"};case"w":return{g:0,c:null,s:"\\d"};case"z":return{g:1,c:"z = parseInt(results["+a+"], 10);\n",s:"(\\d{1,3})"};case"W":return{g:0,c:null,s:"(?:\\d{2})"};case"F":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+a+"].substring(0, 3)], 10);\n",s:"("+Date.monthNames.join("|")+")"};case"M":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+a+"]], 10);\n",s:"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)"};case"n":case"m":return{g:1,c:"m = parseInt(results["+a+"], 10) - 1;\n",s:"(\\d{1,2})"};case"t":return{g:0,c:null,s:"\\d{1,2}"};case"L":return{g:0,c:null,s:"(?:1|0)"};case"Y":return{g:1,c:"y = parseInt(results["+a+"], 10);\n",s:"(\\d{4})"};case"y":return{g:1,c:"var ty = parseInt(results["+a+"], 10);\ny = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"};case"a":return{g:1,c:"if (results["+a+"] == 'am') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(am|pm)"};case"A":return{g:1,c:"if (results["+a+"] == 'AM') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"};case"g":case"G":case"h":case"H":return{g:1,c:"h = parseInt(results["+a+"], 10);\n",s:"(\\d{1,2})"};case"i":return{g:1,c:"i = parseInt(results["+a+"], 10);\n",s:"(\\d{2})"};case"s":return{g:1,c:"s = parseInt(results["+a+"], 10);\n",s:"(\\d{2})"};case"O":return{g:0,c:null,s:"[+-]\\d{4}"};case"T":return{g:0,c:null,s:"[A-Z]{3}"};case"Z":return{g:0,c:null,s:"[+-]\\d{1,5}"};default:return{g:0,c:null,s:String.escape(b)};}};Date.prototype.getTimezone=function(){return this.toString().replace(/^.*? ([A-Z]{3}) [0-9]{4}.*$/,"$1").replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/,"$1$2$3");};Date.prototype.getGMTOffset=function(){return(this.getTimezoneOffset()>0?"-":"+")+String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset())/60),2,"0")+String.leftPad(Math.abs(this.getTimezoneOffset())%60,2,"0");};Date.prototype.getDayOfYear=function(){var a=0;Date.daysInMonth[1]=this.isLeapYear()?29:28;for(var b=0;ba?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.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(null)},push:f,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){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.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?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.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,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),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):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.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,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"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=hb(),z=hb(),A=hb(),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=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),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")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),db=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)},eb=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fb){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 gb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+rb(o[l]);w=ab.test(a)&&pb(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function hb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ib(a){return a[u]=!0,a}function jb(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function kb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function lb(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 mb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function nb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function ob(a){return ib(function(b){return b=+b,ib(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 pb(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=gb.support={},f=gb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=gb.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",eb,!1):e.attachEvent&&e.attachEvent("onunload",eb)),p=!f(g),c.attributes=jb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=jb(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=jb(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.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.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);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 p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(jb(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(".#.+[+~]")}),jb(function(a){var b=g.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=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&jb(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.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===g||a.ownerDocument===v&&t(v,a)?-1:b===g||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,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return lb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?lb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},gb.matches=function(a,b){return gb(a,null,null,b)},gb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||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 gb(b,n,null,[a]).length>0},gb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},gb.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},gb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},gb.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=gb.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=gb.selectors={cacheLength:50,createPseudo:ib,match:X,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(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===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]||gb.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]&&gb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.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(cb,db).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=gb.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(Q," ")+" ").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;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||gb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ib(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:ib(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ib(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:ib(function(a){return function(b){return gb(a,b).length>0}}),contains:ib(function(a){return a=a.replace(cb,db),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ib(function(a){return W.test(a||"")||gb.error("unsupported lang: "+a),a=a.replace(cb,db).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 Z.test(a.nodeName)},input:function(a){return Y.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:ob(function(){return[0]}),last:ob(function(a,b){return[b-1]}),eq:ob(function(a,b,c){return[0>c?c+b:c]}),even:ob(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:ob(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:ob(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:ob(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function sb(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=[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(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function tb(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 ub(a,b,c){for(var d=0,e=b.length;e>d;d++)gb(a,b[d],c);return c}function vb(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 wb(a,b,c,d,e,f){return d&&!d[u]&&(d=wb(d)),e&&!e[u]&&(e=wb(e,f)),ib(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ub(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:vb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=vb(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=vb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sb(function(a){return a===b},h,!0),l=sb(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=[sb(tb(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 wb(i>1&&tb(m),i>1&&rb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xb(a.slice(i,e)),f>e&&xb(a=a.slice(e)),f>e&&rb(a))}m.push(c)}return tb(m)}function yb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=vb(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&gb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ib(f):f}return h=gb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,yb(e,d)),f.selector=a}return f},i=gb.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(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.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(cb,db),ab.test(j[0].type)&&pb(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&rb(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&pb(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=jb(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),jb(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||kb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&jb(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||kb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),jb(function(a){return null==a.getAttribute("disabled")})||kb(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}),gb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(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(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==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(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir: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},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),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=u.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.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.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.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(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 n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(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&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},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().done(c.resolve).fail(c.reject).progress(c.notify):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=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;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||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=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)n.access(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};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[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=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c) 3 | },removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.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=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.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 L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.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.lengthx",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.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 typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.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,!1)),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=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.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)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.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.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!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&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(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)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*\s*$/g,ib={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("